]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.4
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.312 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20030208.
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
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -disable-* | --disable-*)
198     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199     # Reject names that are not valid shell variable names.
200     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202    { (exit 1); exit 1; }; }
203     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204     eval "enable_$ac_feature=no" ;;
205
206   -enable-* | --enable-*)
207     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208     # Reject names that are not valid shell variable names.
209     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211    { (exit 1); exit 1; }; }
212     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213     case $ac_option in
214       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215       *) ac_optarg=yes ;;
216     esac
217     eval "enable_$ac_feature='$ac_optarg'" ;;
218
219   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221   | --exec | --exe | --ex)
222     ac_prev=exec_prefix ;;
223   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225   | --exec=* | --exe=* | --ex=*)
226     exec_prefix=$ac_optarg ;;
227
228   -gas | --gas | --ga | --g)
229     # Obsolete; use --with-gas.
230     with_gas=yes ;;
231
232   -help | --help | --hel | --he | -h)
233     ac_init_help=long ;;
234   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235     ac_init_help=recursive ;;
236   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237     ac_init_help=short ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host_alias ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host_alias=$ac_optarg ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir=$ac_optarg ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir=$ac_optarg ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir=$ac_optarg ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir=$ac_optarg ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir=$ac_optarg ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir=$ac_optarg ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir=$ac_optarg ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix=$ac_optarg ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix=$ac_optarg ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix=$ac_optarg ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
330   -program-transform-name=* | --program-transform-name=* \
331   | --program-transform-nam=* | --program-transform-na=* \
332   | --program-transform-n=* | --program-transform-=* \
333   | --program-transform=* | --program-transfor=* \
334   | --program-transfo=* | --program-transf=* \
335   | --program-trans=* | --program-tran=* \
336   | --progr-tra=* | --program-tr=* | --program-t=*)
337     program_transform_name=$ac_optarg ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir=$ac_optarg ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir=$ac_optarg ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site=$ac_optarg ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir=$ac_optarg ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir=$ac_optarg ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target_alias ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target_alias=$ac_optarg ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers | -V)
386     ac_init_version=: ;;
387
388   -with-* | --with-*)
389     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390     # Reject names that are not valid shell variable names.
391     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392       { echo "$as_me: error: invalid package name: $ac_package" >&2
393    { (exit 1); exit 1; }; }
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case $ac_option in
396       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_$ac_package='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid package name: $ac_package" >&2
406    { (exit 1); exit 1; }; }
407     ac_package=`echo $ac_package | sed 's/-/_/g'`
408     eval "with_$ac_package=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes=$ac_optarg ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries=$ac_optarg ;;
427
428   -*) { echo "$as_me: error: unrecognized option: $ac_option
429 Try \`$0 --help' for more information." >&2
430    { (exit 1); exit 1; }; }
431     ;;
432
433   *=*)
434     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435     # Reject names that are not valid shell variable names.
436     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438    { (exit 1); exit 1; }; }
439     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440     eval "$ac_envvar='$ac_optarg'"
441     export $ac_envvar ;;
442
443   *)
444     # FIXME: should be removed in autoconf 3.0.
445     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449     ;;
450
451   esac
452 done
453
454 if test -n "$ac_prev"; then
455   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456   { echo "$as_me: error: missing argument to $ac_option" >&2
457    { (exit 1); exit 1; }; }
458 fi
459
460 # Be sure to have absolute paths.
461 for ac_var in exec_prefix prefix
462 do
463   eval ac_val=$`echo $ac_var`
464   case $ac_val in
465     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467    { (exit 1); exit 1; }; };;
468   esac
469 done
470
471 # Be sure to have absolute paths.
472 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473               localstatedir libdir includedir oldincludedir infodir mandir
474 do
475   eval ac_val=$`echo $ac_var`
476   case $ac_val in
477     [\\/$]* | ?:[\\/]* ) ;;
478     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479    { (exit 1); exit 1; }; };;
480   esac
481 done
482
483 # There might be people who depend on the old broken behavior: `$host'
484 # used to hold the argument of --host etc.
485 build=$build_alias
486 host=$host_alias
487 target=$target_alias
488
489 # FIXME: should be removed in autoconf 3.0.
490 if test "x$host_alias" != x; then
491   if test "x$build_alias" = x; then
492     cross_compiling=maybe
493     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494     If a cross compiler is detected then cross compile mode will be used." >&2
495   elif test "x$build_alias" != "x$host_alias"; then
496     cross_compiling=yes
497   fi
498 fi
499
500 ac_tool_prefix=
501 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503 test "$silent" = yes && exec 6>/dev/null
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522    { (exit 1); exit 1; }; }
523   else
524     { echo "$as_me: error: cannot find sources in $srcdir" >&2
525    { (exit 1); exit 1; }; }
526   fi
527 fi
528 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529 ac_env_build_alias_set=${build_alias+set}
530 ac_env_build_alias_value=$build_alias
531 ac_cv_env_build_alias_set=${build_alias+set}
532 ac_cv_env_build_alias_value=$build_alias
533 ac_env_host_alias_set=${host_alias+set}
534 ac_env_host_alias_value=$host_alias
535 ac_cv_env_host_alias_set=${host_alias+set}
536 ac_cv_env_host_alias_value=$host_alias
537 ac_env_target_alias_set=${target_alias+set}
538 ac_env_target_alias_value=$target_alias
539 ac_cv_env_target_alias_set=${target_alias+set}
540 ac_cv_env_target_alias_value=$target_alias
541 ac_env_CC_set=${CC+set}
542 ac_env_CC_value=$CC
543 ac_cv_env_CC_set=${CC+set}
544 ac_cv_env_CC_value=$CC
545 ac_env_CFLAGS_set=${CFLAGS+set}
546 ac_env_CFLAGS_value=$CFLAGS
547 ac_cv_env_CFLAGS_set=${CFLAGS+set}
548 ac_cv_env_CFLAGS_value=$CFLAGS
549 ac_env_LDFLAGS_set=${LDFLAGS+set}
550 ac_env_LDFLAGS_value=$LDFLAGS
551 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552 ac_cv_env_LDFLAGS_value=$LDFLAGS
553 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554 ac_env_CPPFLAGS_value=$CPPFLAGS
555 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557 ac_env_CPP_set=${CPP+set}
558 ac_env_CPP_value=$CPP
559 ac_cv_env_CPP_set=${CPP+set}
560 ac_cv_env_CPP_value=$CPP
561 ac_env_CXX_set=${CXX+set}
562 ac_env_CXX_value=$CXX
563 ac_cv_env_CXX_set=${CXX+set}
564 ac_cv_env_CXX_value=$CXX
565 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
566 ac_env_CXXFLAGS_value=$CXXFLAGS
567 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
568 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
569 ac_env_CXXCPP_set=${CXXCPP+set}
570 ac_env_CXXCPP_value=$CXXCPP
571 ac_cv_env_CXXCPP_set=${CXXCPP+set}
572 ac_cv_env_CXXCPP_value=$CXXCPP
573
574 #
575 # Report the --help message.
576 #
577 if test "$ac_init_help" = "long"; then
578   # Omit some internal or obsolete options to make the list less imposing.
579   # This message is too long to be a string in the A/UX 3.1 sh.
580   cat <<EOF
581 \`configure' configures this package to adapt to many kinds of systems.
582
583 Usage: $0 [OPTION]... [VAR=VALUE]...
584
585 To assign environment variables (e.g., CC, CFLAGS...), specify them as
586 VAR=VALUE.  See below for descriptions of some of the useful variables.
587
588 Defaults for the options are specified in brackets.
589
590 Configuration:
591   -h, --help              display this help and exit
592       --help=short        display options specific to this package
593       --help=recursive    display the short help of all the included packages
594   -V, --version           display version information and exit
595   -q, --quiet, --silent   do not print \`checking...' messages
596       --cache-file=FILE   cache test results in FILE [disabled]
597   -C, --config-cache      alias for \`--cache-file=config.cache'
598   -n, --no-create         do not create output files
599       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
600
601 EOF
602
603   cat <<EOF
604 Installation directories:
605   --prefix=PREFIX         install architecture-independent files in PREFIX
606                           [$ac_default_prefix]
607   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
608                           [PREFIX]
609
610 By default, \`make install' will install all the files in
611 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
612 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
613 for instance \`--prefix=\$HOME'.
614
615 For better control, use the options below.
616
617 Fine tuning of the installation directories:
618   --bindir=DIR            user executables [EPREFIX/bin]
619   --sbindir=DIR           system admin executables [EPREFIX/sbin]
620   --libexecdir=DIR        program executables [EPREFIX/libexec]
621   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
622   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
623   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
624   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
625   --libdir=DIR            object code libraries [EPREFIX/lib]
626   --includedir=DIR        C header files [PREFIX/include]
627   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
628   --infodir=DIR           info documentation [PREFIX/info]
629   --mandir=DIR            man documentation [PREFIX/man]
630 EOF
631
632   cat <<\EOF
633
634 Program names:
635   --program-prefix=PREFIX            prepend PREFIX to installed program names
636   --program-suffix=SUFFIX            append SUFFIX to installed program names
637   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
638
639 System types:
640   --build=BUILD           configure for building on BUILD [guessed]
641   --host=HOST       build programs to run on HOST [BUILD]
642   --target=TARGET   configure for building compilers for TARGET [HOST]
643 EOF
644 fi
645
646 if test -n "$ac_init_help"; then
647
648   cat <<\EOF
649
650 Optional Packages:
651   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
652   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
653
654 Optional Features:
655   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
656   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
657
658   --with-rel-version=XXX  override derived release version
659   --with-abi-version=XXX  override derived ABI version
660   --with-system-type=XXX  test: override derived host system-type
661   --without-cxx           do not adjust ncurses bool to match C++
662   --without-cxx-binding   do not build C++ binding and demo
663   --without-ada           suppress check for Ada95, don't build demo
664   --without-progs         suppress build with programs (e.g., tic)
665   --without-curses-h      install curses.h as ncurses.h only
666   --with-install-prefix   prefixes actual install-location ($DESTDIR)
667 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
668   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
669   --with-build-cflags=XXX the build C compiler-flags
670   --with-build-cppflags=XXX the build C preprocessor-flags
671   --with-build-ldflags=XXX the build linker-flags
672   --with-build-libs=XXX   the build libraries
673 Options to Specify the Libraries Built/Used:
674   --with-libtool          generate libraries with libtool
675   --with-shared           generate shared-libraries
676   --with-normal           generate normal-libraries (default)
677   --with-debug            generate debug-libraries (default)
678   --with-profile          generate profile-libraries
679   --with-termlib          generate separate terminfo library
680   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
681   --with-dmalloc          test: use Gray Watson's dmalloc library
682   --with-gpm              use Alessandro Rubini's GPM library
683   --with-sysmouse         use sysmouse (FreeBSD console)
684   --enable-rpath          use rpath option when generating shared libraries
685   --with-shlib-version=X  Specify rel or abi version for shared libs
686 Fine-Tuning Your Configuration:
687   --disable-overwrite     leave out the link to -lcurses
688   --disable-database      do not use terminfo, only fallbacks/termcap
689   --with-database=XXX     specify terminfo source to install
690   --with-fallbacks=XXX    specify list of fallback terminal descriptions
691   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
692   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
693   --disable-big-core      assume machine has little memory
694   --enable-termcap        compile in termcap fallback support
695   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
696   --enable-getcap         fast termcap load, no xrefs to terminfo
697   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
698   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
699   --enable-symlinks       make tic use symbolic links not hard links
700   --enable-broken_linker  compile with broken-linker support code
701   --with-bool=TYPE        override fallback type of bool variable
702   --with-ospeed=TYPE      override type of ospeed variable
703   --enable-bsdpad         recognize BSD-style prefix padding
704   --with-rcs-ids          compile-in RCS identifiers
705 Options to Specify How Manpages are Installed:
706   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
707                           optionally formatted/catonly, e.g., gzip,formatted
708   --with-manpage-renames  specify manpage-renaming
709   --with-manpage-aliases  specify manpage-aliases using .so
710   --with-manpage-symlinks specify manpage-aliases using symlinks
711   --with-manpage-tbl      specify manpage processing with tbl
712 Extensions:
713   --disable-ext-funcs     disable function-extensions
714   --enable-const          compile with extra/non-standard const
715   --enable-no-padding     compile with $NCURSES_NO_PADDING code
716   --enable-sigwinch       compile with SIGWINCH handler
717   --enable-tcap-names     compile with user-definable terminal capabilities
718 Development Code:
719   --with-develop          enable all development options
720   --enable-hard-tabs      compile with hard-tabs code
721   --disable-root-environ  limit environment when running as root
722   --enable-xmc-glitch     compile with limited support for xmc
723 Experimental Code:
724   --disable-assumed-color do not assume anything about default-colors
725   --disable-hashmap       compile without hashmap scrolling-optimization
726   --enable-colorfgbg      compile with $COLORFGBG code
727   --enable-safe-sprintf   compile with experimental safe-sprintf code
728   --disable-scroll-hints  compile without scroll-hints code
729   --enable-widec          compile with experimental wide-char/UTF-8 code
730   --with-caps=alt         compile with experimental alternate Caps file
731 Testing/development Options:
732   --enable-echo           build: display "compiling" commands (default)
733   --enable-warnings       build: turn on GCC compiler warnings
734   --enable-assertions     test: turn on generation of assertion code
735   --disable-leaks         test: suppress permanent memory-leaks
736   --enable-expanded       test: generate functions for certain macros
737   --disable-macros        test: use functions rather than macros
738   --with-trace            test: add trace() function to all models of ncurses
739 Ada95 Binding Options:
740   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
741   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
742   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
743
744 Some influential environment variables:
745   CC          C compiler command
746   CFLAGS      C compiler flags
747   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
748               nonstandard directory <lib dir>
749   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
750               headers in a nonstandard directory <include dir>
751   CPP         C preprocessor
752   CXX         C++ compiler command
753   CXXFLAGS    C++ compiler flags
754   CXXCPP      C++ preprocessor
755
756 Use these variables to override the choices made by `configure' or to help
757 it to find libraries and programs with nonstandard names/locations.
758
759 EOF
760 fi
761
762 if test "$ac_init_help" = "recursive"; then
763   # If there are subdirs, report their specific --help.
764   ac_popdir=`pwd`
765   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
766     cd $ac_subdir
767     # A "../" for each directory in /$ac_subdir.
768     ac_dots=`echo $ac_subdir |
769              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
770
771     case $srcdir in
772     .) # No --srcdir option.  We are building in place.
773       ac_sub_srcdir=$srcdir ;;
774     [\\/]* | ?:[\\/]* ) # Absolute path.
775       ac_sub_srcdir=$srcdir/$ac_subdir ;;
776     *) # Relative path.
777       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
778     esac
779
780     # Check for guested configure; otherwise get Cygnus style configure.
781     if test -f $ac_sub_srcdir/configure.gnu; then
782       echo
783       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
784     elif test -f $ac_sub_srcdir/configure; then
785       echo
786       $SHELL $ac_sub_srcdir/configure  --help=recursive
787     elif test -f $ac_sub_srcdir/configure.ac ||
788            test -f $ac_sub_srcdir/configure.in; then
789       echo
790       $ac_configure --help
791     else
792       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
793     fi
794     cd $ac_popdir
795   done
796 fi
797
798 test -n "$ac_init_help" && exit 0
799 if $ac_init_version; then
800   cat <<\EOF
801
802 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
803 Free Software Foundation, Inc.
804 This configure script is free software; the Free Software Foundation
805 gives unlimited permission to copy, distribute and modify it.
806 EOF
807   exit 0
808 fi
809 exec 5>config.log
810 cat >&5 <<EOF
811 This file contains any messages produced by compilers while
812 running configure, to aid debugging if configure makes a mistake.
813
814 It was created by $as_me, which was
815 generated by GNU Autoconf 2.52.20030208.  Invocation command line was
816
817   $ $0 $@
818
819 EOF
820 {
821 cat <<_ASUNAME
822 ## ---------- ##
823 ## Platform.  ##
824 ## ---------- ##
825
826 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
827 uname -m = `(uname -m) 2>/dev/null || echo unknown`
828 uname -r = `(uname -r) 2>/dev/null || echo unknown`
829 uname -s = `(uname -s) 2>/dev/null || echo unknown`
830 uname -v = `(uname -v) 2>/dev/null || echo unknown`
831
832 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
833 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
834
835 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
836 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
837 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
838 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
839 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
840 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
841 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
842
843 PATH = $PATH
844
845 _ASUNAME
846 } >&5
847
848 cat >&5 <<EOF
849 ## ------------ ##
850 ## Core tests.  ##
851 ## ------------ ##
852
853 EOF
854
855 # Keep a trace of the command line.
856 # Strip out --no-create and --no-recursion so they do not pile up.
857 # Also quote any args containing shell meta-characters.
858 ac_configure_args=
859 ac_sep=
860 for ac_arg
861 do
862   case $ac_arg in
863   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
864   | --no-cr | --no-c) ;;
865   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
866   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
867   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
868     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
869     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
870     ac_sep=" " ;;
871   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
872      ac_sep=" " ;;
873   esac
874   # Get rid of the leading space.
875 done
876
877 # When interrupted or exit'd, cleanup temporary files, and complete
878 # config.log.  We remove comments because anyway the quotes in there
879 # would cause problems or look ugly.
880 trap 'exit_status=$?
881   # Save into config.log some information that might help in debugging.
882   echo >&5
883   echo "## ----------------- ##" >&5
884   echo "## Cache variables.  ##" >&5
885   echo "## ----------------- ##" >&5
886   echo >&5
887   # The following way of writing the cache mishandles newlines in values,
888 {
889   (set) 2>&1 |
890     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
891     *ac_space=\ *)
892       sed -n \
893         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
894           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
895       ;;
896     *)
897       sed -n \
898         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
899       ;;
900     esac;
901 } >&5
902   sed "/^$/d" confdefs.h >conftest.log
903   if test -s conftest.log; then
904     echo >&5
905     echo "## ------------ ##" >&5
906     echo "## confdefs.h.  ##" >&5
907     echo "## ------------ ##" >&5
908     echo >&5
909     cat conftest.log >&5
910   fi
911   (echo; echo) >&5
912   test "$ac_signal" != 0 &&
913     echo "$as_me: caught signal $ac_signal" >&5
914   echo "$as_me: exit $exit_status" >&5
915   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
916     exit $exit_status
917      ' 0
918 for ac_signal in 1 2 13 15; do
919   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
920 done
921 ac_signal=0
922
923 # confdefs.h avoids OS command line length limits that DEFS can exceed.
924 rm -rf conftest* confdefs.h
925 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
926 echo >confdefs.h
927
928 # Let the site file select an alternate cache file if it wants to.
929 # Prefer explicitly selected file to automatically selected ones.
930 if test -z "$CONFIG_SITE"; then
931   if test "x$prefix" != xNONE; then
932     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
933   else
934     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
935   fi
936 fi
937 for ac_site_file in $CONFIG_SITE; do
938   if test -r "$ac_site_file"; then
939     { echo "$as_me:939: loading site script $ac_site_file" >&5
940 echo "$as_me: loading site script $ac_site_file" >&6;}
941     cat "$ac_site_file" >&5
942     . "$ac_site_file"
943   fi
944 done
945
946 if test -r "$cache_file"; then
947   # Some versions of bash will fail to source /dev/null (special
948   # files actually), so we avoid doing that.
949   if test -f "$cache_file"; then
950     { echo "$as_me:950: loading cache $cache_file" >&5
951 echo "$as_me: loading cache $cache_file" >&6;}
952     case $cache_file in
953       [\\/]* | ?:[\\/]* ) . $cache_file;;
954       *)                      . ./$cache_file;;
955     esac
956   fi
957 else
958   { echo "$as_me:958: creating cache $cache_file" >&5
959 echo "$as_me: creating cache $cache_file" >&6;}
960   >$cache_file
961 fi
962
963 # Check that the precious variables saved in the cache have kept the same
964 # value.
965 ac_cache_corrupted=false
966 for ac_var in `(set) 2>&1 |
967                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
968   eval ac_old_set=\$ac_cv_env_${ac_var}_set
969   eval ac_new_set=\$ac_env_${ac_var}_set
970   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
971   eval ac_new_val="\$ac_env_${ac_var}_value"
972   case $ac_old_set,$ac_new_set in
973     set,)
974       { echo "$as_me:974: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
975 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
976       ac_cache_corrupted=: ;;
977     ,set)
978       { echo "$as_me:978: error: \`$ac_var' was not set in the previous run" >&5
979 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
980       ac_cache_corrupted=: ;;
981     ,);;
982     *)
983       if test "x$ac_old_val" != "x$ac_new_val"; then
984         { echo "$as_me:984: error: \`$ac_var' has changed since the previous run:" >&5
985 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
986         { echo "$as_me:986:   former value:  $ac_old_val" >&5
987 echo "$as_me:   former value:  $ac_old_val" >&2;}
988         { echo "$as_me:988:   current value: $ac_new_val" >&5
989 echo "$as_me:   current value: $ac_new_val" >&2;}
990         ac_cache_corrupted=:
991       fi;;
992   esac
993   # Pass precious variables to config.status.  It doesn't matter if
994   # we pass some twice (in addition to the command line arguments).
995   if test "$ac_new_set" = set; then
996     case $ac_new_val in
997     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
998       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
999       ac_configure_args="$ac_configure_args '$ac_arg'"
1000       ;;
1001     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1002        ;;
1003     esac
1004   fi
1005 done
1006 if $ac_cache_corrupted; then
1007   { echo "$as_me:1007: error: changes in the environment can compromise the build" >&5
1008 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1009   { { echo "$as_me:1009: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1010 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1011    { (exit 1); exit 1; }; }
1012 fi
1013
1014 ac_ext=c
1015 ac_cpp='$CPP $CPPFLAGS'
1016 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1017 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1019
1020 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1021   *c*,-n*) ECHO_N= ECHO_C='
1022 ' ECHO_T='      ' ;;
1023   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1024   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1025 esac
1026 echo "#! $SHELL" >conftest.sh
1027 echo  "exit 0"   >>conftest.sh
1028 chmod +x conftest.sh
1029 if { (echo "$as_me:1029: PATH=\".;.\"; conftest.sh") >&5
1030   (PATH=".;."; conftest.sh) 2>&5
1031   ac_status=$?
1032   echo "$as_me:1032: \$? = $ac_status" >&5
1033   (exit $ac_status); }; then
1034   ac_path_separator=';'
1035 else
1036   ac_path_separator=:
1037 fi
1038 PATH_SEPARATOR="$ac_path_separator"
1039 rm -f conftest.sh
1040
1041 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1042
1043 NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1044 NCURSES_MINOR="`egrep '^NCURSES_MINOR[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1045 NCURSES_PATCH="`egrep '^NCURSES_PATCH[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1046 cf_cv_abi_version=${NCURSES_MAJOR}
1047 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1048 cf_cv_timestamp=`date`
1049 echo "$as_me:1049: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1050 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1051
1052 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1053
1054 # Check whether --with-rel-version or --without-rel-version was given.
1055 if test "${with_rel_version+set}" = set; then
1056   withval="$with_rel_version"
1057   { echo "$as_me:1057: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1058 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1059  cf_cv_rel_version=$withval
1060 fi;
1061
1062  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1063  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1064
1065 if test -n "$NCURSES_MAJOR" ; then
1066   case $NCURSES_MAJOR in #(vi
1067   [0-9]*) #(vi
1068         ;;
1069   *)
1070         { { echo "$as_me:1070: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1071 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1072    { (exit 1); exit 1; }; }
1073         ;;
1074   esac
1075 else
1076   { { echo "$as_me:1076: error: Release major-version value is empty" >&5
1077 echo "$as_me: error: Release major-version value is empty" >&2;}
1078    { (exit 1); exit 1; }; }
1079 fi
1080
1081 if test -n "$NCURSES_MINOR" ; then
1082   case $NCURSES_MINOR in #(vi
1083   [0-9]*) #(vi
1084         ;;
1085   *)
1086         { { echo "$as_me:1086: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1087 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1088    { (exit 1); exit 1; }; }
1089         ;;
1090   esac
1091 else
1092   { { echo "$as_me:1092: error: Release minor-version value is empty" >&5
1093 echo "$as_me: error: Release minor-version value is empty" >&2;}
1094    { (exit 1); exit 1; }; }
1095 fi
1096
1097 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1098
1099 # Check whether --with-abi-version or --without-abi-version was given.
1100 if test "${with_abi_version+set}" = set; then
1101   withval="$with_abi_version"
1102   { echo "$as_me:1102: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1103 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1104  cf_cv_abi_version=$withval
1105 fi;
1106
1107 if test -n "$cf_cv_abi_version" ; then
1108   case $cf_cv_abi_version in #(vi
1109   [0-9]*) #(vi
1110         ;;
1111   *)
1112         { { echo "$as_me:1112: error: ABI version is not a number: $cf_cv_abi_version" >&5
1113 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1114    { (exit 1); exit 1; }; }
1115         ;;
1116   esac
1117 else
1118   { { echo "$as_me:1118: error: ABI version value is empty" >&5
1119 echo "$as_me: error: ABI version value is empty" >&2;}
1120    { (exit 1); exit 1; }; }
1121 fi
1122
1123 ac_aux_dir=
1124 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1125   if test -f $ac_dir/install-sh; then
1126     ac_aux_dir=$ac_dir
1127     ac_install_sh="$ac_aux_dir/install-sh -c"
1128     break
1129   elif test -f $ac_dir/install.sh; then
1130     ac_aux_dir=$ac_dir
1131     ac_install_sh="$ac_aux_dir/install.sh -c"
1132     break
1133   elif test -f $ac_dir/shtool; then
1134     ac_aux_dir=$ac_dir
1135     ac_install_sh="$ac_aux_dir/shtool install -c"
1136     break
1137   fi
1138 done
1139 if test -z "$ac_aux_dir"; then
1140   { { echo "$as_me:1140: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1141 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1142    { (exit 1); exit 1; }; }
1143 fi
1144 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1145 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1146 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1147
1148 # Make sure we can run config.sub.
1149 $ac_config_sub sun4 >/dev/null 2>&1 ||
1150   { { echo "$as_me:1150: error: cannot run $ac_config_sub" >&5
1151 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1152    { (exit 1); exit 1; }; }
1153
1154 echo "$as_me:1154: checking build system type" >&5
1155 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1156 if test "${ac_cv_build+set}" = set; then
1157   echo $ECHO_N "(cached) $ECHO_C" >&6
1158 else
1159   ac_cv_build_alias=$build_alias
1160 test -z "$ac_cv_build_alias" &&
1161   ac_cv_build_alias=`$ac_config_guess`
1162 test -z "$ac_cv_build_alias" &&
1163   { { echo "$as_me:1163: error: cannot guess build type; you must specify one" >&5
1164 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1165    { (exit 1); exit 1; }; }
1166 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1167   { { echo "$as_me:1167: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1168 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1169    { (exit 1); exit 1; }; }
1170
1171 fi
1172 echo "$as_me:1172: result: $ac_cv_build" >&5
1173 echo "${ECHO_T}$ac_cv_build" >&6
1174 build=$ac_cv_build
1175 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1176 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1177 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1178
1179 echo "$as_me:1179: checking host system type" >&5
1180 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1181 if test "${ac_cv_host+set}" = set; then
1182   echo $ECHO_N "(cached) $ECHO_C" >&6
1183 else
1184   ac_cv_host_alias=$host_alias
1185 test -z "$ac_cv_host_alias" &&
1186   ac_cv_host_alias=$ac_cv_build_alias
1187 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1188   { { echo "$as_me:1188: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1189 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1190    { (exit 1); exit 1; }; }
1191
1192 fi
1193 echo "$as_me:1193: result: $ac_cv_host" >&5
1194 echo "${ECHO_T}$ac_cv_host" >&6
1195 host=$ac_cv_host
1196 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1197 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1198 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1199
1200 if test -f $srcdir/config.guess ; then
1201         echo "$as_me:1201: checking target system type" >&5
1202 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1203 if test "${ac_cv_target+set}" = set; then
1204   echo $ECHO_N "(cached) $ECHO_C" >&6
1205 else
1206   ac_cv_target_alias=$target_alias
1207 test "x$ac_cv_target_alias" = "x" &&
1208   ac_cv_target_alias=$ac_cv_host_alias
1209 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1210   { { echo "$as_me:1210: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1211 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1212    { (exit 1); exit 1; }; }
1213
1214 fi
1215 echo "$as_me:1215: result: $ac_cv_target" >&5
1216 echo "${ECHO_T}$ac_cv_target" >&6
1217 target=$ac_cv_target
1218 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1219 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1220 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1221
1222 # The aliases save the names the user supplied, while $host etc.
1223 # will get canonicalized.
1224 test -n "$target_alias" &&
1225   test "$program_prefix$program_suffix$program_transform_name" = \
1226     NONENONEs,x,x, &&
1227   program_prefix=${target_alias}-
1228         system_name="$host_os"
1229 else
1230         system_name="`(uname -s -r) 2>/dev/null`"
1231         if test -z "$system_name" ; then
1232                 system_name="`(hostname) 2>/dev/null`"
1233         fi
1234 fi
1235 test -n "$system_name" && cat >>confdefs.h <<EOF
1236 #define SYSTEM_NAME "$system_name"
1237 EOF
1238
1239 if test "${cf_cv_system_name+set}" = set; then
1240   echo $ECHO_N "(cached) $ECHO_C" >&6
1241 else
1242   cf_cv_system_name="$system_name"
1243 fi
1244
1245 test -z "$system_name" && system_name="$cf_cv_system_name"
1246 test -n "$cf_cv_system_name" && echo "$as_me:1246: result: Configuring for $cf_cv_system_name" >&5
1247 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1248
1249 if test ".$system_name" != ".$cf_cv_system_name" ; then
1250         echo "$as_me:1250: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1251 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1252         { { echo "$as_me:1252: error: \"Please remove config.cache and try again.\"" >&5
1253 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1254    { (exit 1); exit 1; }; }
1255 fi
1256
1257 # Check whether --with-system-type or --without-system-type was given.
1258 if test "${with_system_type+set}" = set; then
1259   withval="$with_system_type"
1260   { echo "$as_me:1260: WARNING: overriding system type to $withval" >&5
1261 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1262  cf_cv_system_name=$withval
1263 fi;
1264
1265 ###     Save the given $CFLAGS to allow user-override.
1266 cf_user_CFLAGS="$CFLAGS"
1267
1268 ###     Default install-location
1269
1270 echo "$as_me:1270: checking for prefix" >&5
1271 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1272 if test "x$prefix" = "xNONE" ; then
1273         case "$cf_cv_system_name" in
1274                 # non-vendor systems don't have a conflict
1275         openbsd*|netbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1276                 prefix=/usr
1277                 ;;
1278         *)      prefix=$ac_default_prefix
1279                 ;;
1280         esac
1281 fi
1282 echo "$as_me:1282: result: $prefix" >&5
1283 echo "${ECHO_T}$prefix" >&6
1284
1285 if test "x$prefix" = "xNONE" ; then
1286 echo "$as_me:1286: checking for default include-directory" >&5
1287 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1288 test -n "$verbose" && echo 1>&6
1289 for cf_symbol in \
1290         $includedir \
1291         $includedir/ncurses \
1292         $prefix/include \
1293         $prefix/include/ncurses \
1294         /usr/local/include \
1295         /usr/local/include/ncurses \
1296         /usr/include \
1297         /usr/include/ncurses
1298 do
1299         cf_dir=`eval echo $cf_symbol`
1300         if test -f $cf_dir/curses.h ; then
1301         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1302                 includedir="$cf_symbol"
1303                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1304                 break
1305         fi
1306         fi
1307         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1308 done
1309 echo "$as_me:1309: result: $includedir" >&5
1310 echo "${ECHO_T}$includedir" >&6
1311 fi
1312
1313 ###     Checks for programs.
1314 ac_ext=c
1315 ac_cpp='$CPP $CPPFLAGS'
1316 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1317 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1318 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1319 if test -n "$ac_tool_prefix"; then
1320   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1321 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1322 echo "$as_me:1322: checking for $ac_word" >&5
1323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1324 if test "${ac_cv_prog_CC+set}" = set; then
1325   echo $ECHO_N "(cached) $ECHO_C" >&6
1326 else
1327   if test -n "$CC"; then
1328   ac_cv_prog_CC="$CC" # Let the user override the test.
1329 else
1330   ac_save_IFS=$IFS; IFS=$ac_path_separator
1331 ac_dummy="$PATH"
1332 for ac_dir in $ac_dummy; do
1333   IFS=$ac_save_IFS
1334   test -z "$ac_dir" && ac_dir=.
1335   $as_executable_p "$ac_dir/$ac_word" || continue
1336 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1337 echo "$as_me:1337: found $ac_dir/$ac_word" >&5
1338 break
1339 done
1340
1341 fi
1342 fi
1343 CC=$ac_cv_prog_CC
1344 if test -n "$CC"; then
1345   echo "$as_me:1345: result: $CC" >&5
1346 echo "${ECHO_T}$CC" >&6
1347 else
1348   echo "$as_me:1348: result: no" >&5
1349 echo "${ECHO_T}no" >&6
1350 fi
1351
1352 fi
1353 if test -z "$ac_cv_prog_CC"; then
1354   ac_ct_CC=$CC
1355   # Extract the first word of "gcc", so it can be a program name with args.
1356 set dummy gcc; ac_word=$2
1357 echo "$as_me:1357: checking for $ac_word" >&5
1358 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1359 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1360   echo $ECHO_N "(cached) $ECHO_C" >&6
1361 else
1362   if test -n "$ac_ct_CC"; then
1363   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1364 else
1365   ac_save_IFS=$IFS; IFS=$ac_path_separator
1366 ac_dummy="$PATH"
1367 for ac_dir in $ac_dummy; do
1368   IFS=$ac_save_IFS
1369   test -z "$ac_dir" && ac_dir=.
1370   $as_executable_p "$ac_dir/$ac_word" || continue
1371 ac_cv_prog_ac_ct_CC="gcc"
1372 echo "$as_me:1372: found $ac_dir/$ac_word" >&5
1373 break
1374 done
1375
1376 fi
1377 fi
1378 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1379 if test -n "$ac_ct_CC"; then
1380   echo "$as_me:1380: result: $ac_ct_CC" >&5
1381 echo "${ECHO_T}$ac_ct_CC" >&6
1382 else
1383   echo "$as_me:1383: result: no" >&5
1384 echo "${ECHO_T}no" >&6
1385 fi
1386
1387   CC=$ac_ct_CC
1388 else
1389   CC="$ac_cv_prog_CC"
1390 fi
1391
1392 if test -z "$CC"; then
1393   if test -n "$ac_tool_prefix"; then
1394   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1395 set dummy ${ac_tool_prefix}cc; ac_word=$2
1396 echo "$as_me:1396: checking for $ac_word" >&5
1397 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1398 if test "${ac_cv_prog_CC+set}" = set; then
1399   echo $ECHO_N "(cached) $ECHO_C" >&6
1400 else
1401   if test -n "$CC"; then
1402   ac_cv_prog_CC="$CC" # Let the user override the test.
1403 else
1404   ac_save_IFS=$IFS; IFS=$ac_path_separator
1405 ac_dummy="$PATH"
1406 for ac_dir in $ac_dummy; do
1407   IFS=$ac_save_IFS
1408   test -z "$ac_dir" && ac_dir=.
1409   $as_executable_p "$ac_dir/$ac_word" || continue
1410 ac_cv_prog_CC="${ac_tool_prefix}cc"
1411 echo "$as_me:1411: found $ac_dir/$ac_word" >&5
1412 break
1413 done
1414
1415 fi
1416 fi
1417 CC=$ac_cv_prog_CC
1418 if test -n "$CC"; then
1419   echo "$as_me:1419: result: $CC" >&5
1420 echo "${ECHO_T}$CC" >&6
1421 else
1422   echo "$as_me:1422: result: no" >&5
1423 echo "${ECHO_T}no" >&6
1424 fi
1425
1426 fi
1427 if test -z "$ac_cv_prog_CC"; then
1428   ac_ct_CC=$CC
1429   # Extract the first word of "cc", so it can be a program name with args.
1430 set dummy cc; ac_word=$2
1431 echo "$as_me:1431: checking for $ac_word" >&5
1432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1433 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   if test -n "$ac_ct_CC"; then
1437   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1438 else
1439   ac_save_IFS=$IFS; IFS=$ac_path_separator
1440 ac_dummy="$PATH"
1441 for ac_dir in $ac_dummy; do
1442   IFS=$ac_save_IFS
1443   test -z "$ac_dir" && ac_dir=.
1444   $as_executable_p "$ac_dir/$ac_word" || continue
1445 ac_cv_prog_ac_ct_CC="cc"
1446 echo "$as_me:1446: found $ac_dir/$ac_word" >&5
1447 break
1448 done
1449
1450 fi
1451 fi
1452 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1453 if test -n "$ac_ct_CC"; then
1454   echo "$as_me:1454: result: $ac_ct_CC" >&5
1455 echo "${ECHO_T}$ac_ct_CC" >&6
1456 else
1457   echo "$as_me:1457: result: no" >&5
1458 echo "${ECHO_T}no" >&6
1459 fi
1460
1461   CC=$ac_ct_CC
1462 else
1463   CC="$ac_cv_prog_CC"
1464 fi
1465
1466 fi
1467 if test -z "$CC"; then
1468   # Extract the first word of "cc", so it can be a program name with args.
1469 set dummy cc; ac_word=$2
1470 echo "$as_me:1470: checking for $ac_word" >&5
1471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1472 if test "${ac_cv_prog_CC+set}" = set; then
1473   echo $ECHO_N "(cached) $ECHO_C" >&6
1474 else
1475   if test -n "$CC"; then
1476   ac_cv_prog_CC="$CC" # Let the user override the test.
1477 else
1478   ac_prog_rejected=no
1479   ac_save_IFS=$IFS; IFS=$ac_path_separator
1480 ac_dummy="$PATH"
1481 for ac_dir in $ac_dummy; do
1482   IFS=$ac_save_IFS
1483   test -z "$ac_dir" && ac_dir=.
1484   $as_executable_p "$ac_dir/$ac_word" || continue
1485 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1486   ac_prog_rejected=yes
1487   continue
1488 fi
1489 ac_cv_prog_CC="cc"
1490 echo "$as_me:1490: found $ac_dir/$ac_word" >&5
1491 break
1492 done
1493
1494 if test $ac_prog_rejected = yes; then
1495   # We found a bogon in the path, so make sure we never use it.
1496   set dummy $ac_cv_prog_CC
1497   shift
1498   if test $# != 0; then
1499     # We chose a different compiler from the bogus one.
1500     # However, it has the same basename, so the bogon will be chosen
1501     # first if we set CC to just the basename; use the full file name.
1502     shift
1503     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1504     shift
1505     ac_cv_prog_CC="$@"
1506   fi
1507 fi
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 "$CC"; then
1521   if test -n "$ac_tool_prefix"; then
1522   for ac_prog in cl
1523   do
1524     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1525 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1526 echo "$as_me:1526: checking for $ac_word" >&5
1527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1528 if test "${ac_cv_prog_CC+set}" = set; then
1529   echo $ECHO_N "(cached) $ECHO_C" >&6
1530 else
1531   if test -n "$CC"; then
1532   ac_cv_prog_CC="$CC" # Let the user override the test.
1533 else
1534   ac_save_IFS=$IFS; IFS=$ac_path_separator
1535 ac_dummy="$PATH"
1536 for ac_dir in $ac_dummy; do
1537   IFS=$ac_save_IFS
1538   test -z "$ac_dir" && ac_dir=.
1539   $as_executable_p "$ac_dir/$ac_word" || continue
1540 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1541 echo "$as_me:1541: found $ac_dir/$ac_word" >&5
1542 break
1543 done
1544
1545 fi
1546 fi
1547 CC=$ac_cv_prog_CC
1548 if test -n "$CC"; then
1549   echo "$as_me:1549: result: $CC" >&5
1550 echo "${ECHO_T}$CC" >&6
1551 else
1552   echo "$as_me:1552: result: no" >&5
1553 echo "${ECHO_T}no" >&6
1554 fi
1555
1556     test -n "$CC" && break
1557   done
1558 fi
1559 if test -z "$CC"; then
1560   ac_ct_CC=$CC
1561   for ac_prog in cl
1562 do
1563   # Extract the first word of "$ac_prog", so it can be a program name with args.
1564 set dummy $ac_prog; ac_word=$2
1565 echo "$as_me:1565: checking for $ac_word" >&5
1566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1567 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1568   echo $ECHO_N "(cached) $ECHO_C" >&6
1569 else
1570   if test -n "$ac_ct_CC"; then
1571   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1572 else
1573   ac_save_IFS=$IFS; IFS=$ac_path_separator
1574 ac_dummy="$PATH"
1575 for ac_dir in $ac_dummy; do
1576   IFS=$ac_save_IFS
1577   test -z "$ac_dir" && ac_dir=.
1578   $as_executable_p "$ac_dir/$ac_word" || continue
1579 ac_cv_prog_ac_ct_CC="$ac_prog"
1580 echo "$as_me:1580: found $ac_dir/$ac_word" >&5
1581 break
1582 done
1583
1584 fi
1585 fi
1586 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1587 if test -n "$ac_ct_CC"; then
1588   echo "$as_me:1588: result: $ac_ct_CC" >&5
1589 echo "${ECHO_T}$ac_ct_CC" >&6
1590 else
1591   echo "$as_me:1591: result: no" >&5
1592 echo "${ECHO_T}no" >&6
1593 fi
1594
1595   test -n "$ac_ct_CC" && break
1596 done
1597
1598   CC=$ac_ct_CC
1599 fi
1600
1601 fi
1602
1603 test -z "$CC" && { { echo "$as_me:1603: error: no acceptable cc found in \$PATH" >&5
1604 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1605    { (exit 1); exit 1; }; }
1606
1607 # Provide some information about the compiler.
1608 echo "$as_me:1608:" \
1609      "checking for C compiler version" >&5
1610 ac_compiler=`set X $ac_compile; echo $2`
1611 { (eval echo "$as_me:1611: \"$ac_compiler --version </dev/null >&5\"") >&5
1612   (eval $ac_compiler --version </dev/null >&5) 2>&5
1613   ac_status=$?
1614   echo "$as_me:1614: \$? = $ac_status" >&5
1615   (exit $ac_status); }
1616 { (eval echo "$as_me:1616: \"$ac_compiler -v </dev/null >&5\"") >&5
1617   (eval $ac_compiler -v </dev/null >&5) 2>&5
1618   ac_status=$?
1619   echo "$as_me:1619: \$? = $ac_status" >&5
1620   (exit $ac_status); }
1621 { (eval echo "$as_me:1621: \"$ac_compiler -V </dev/null >&5\"") >&5
1622   (eval $ac_compiler -V </dev/null >&5) 2>&5
1623   ac_status=$?
1624   echo "$as_me:1624: \$? = $ac_status" >&5
1625   (exit $ac_status); }
1626
1627 cat >conftest.$ac_ext <<_ACEOF
1628 #line 1628 "configure"
1629 #include "confdefs.h"
1630
1631 int
1632 main ()
1633 {
1634
1635   ;
1636   return 0;
1637 }
1638 _ACEOF
1639 ac_clean_files_save=$ac_clean_files
1640 ac_clean_files="$ac_clean_files a.out a.exe"
1641 # Try to create an executable without -o first, disregard a.out.
1642 # It will help us diagnose broken compilers, and finding out an intuition
1643 # of exeext.
1644 echo "$as_me:1644: checking for C compiler default output" >&5
1645 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1646 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1647 if { (eval echo "$as_me:1647: \"$ac_link_default\"") >&5
1648   (eval $ac_link_default) 2>&5
1649   ac_status=$?
1650   echo "$as_me:1650: \$? = $ac_status" >&5
1651   (exit $ac_status); }; then
1652   # Find the output, starting from the most likely.  This scheme is
1653 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1654 # resort.
1655 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1656                 ls a.out conftest 2>/dev/null;
1657                 ls a.* conftest.* 2>/dev/null`; do
1658   case $ac_file in
1659     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1660     a.out ) # We found the default executable, but exeext='' is most
1661             # certainly right.
1662             break;;
1663     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1664           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1665           export ac_cv_exeext
1666           break;;
1667     * ) break;;
1668   esac
1669 done
1670 else
1671   echo "$as_me: failed program was:" >&5
1672 cat conftest.$ac_ext >&5
1673 { { echo "$as_me:1673: error: C compiler cannot create executables" >&5
1674 echo "$as_me: error: C compiler cannot create executables" >&2;}
1675    { (exit 77); exit 77; }; }
1676 fi
1677
1678 ac_exeext=$ac_cv_exeext
1679 echo "$as_me:1679: result: $ac_file" >&5
1680 echo "${ECHO_T}$ac_file" >&6
1681
1682 # Check the compiler produces executables we can run.  If not, either
1683 # the compiler is broken, or we cross compile.
1684 echo "$as_me:1684: checking whether the C compiler works" >&5
1685 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1686 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1687 # If not cross compiling, check that we can run a simple program.
1688 if test "$cross_compiling" != yes; then
1689   if { ac_try='./$ac_file'
1690   { (eval echo "$as_me:1690: \"$ac_try\"") >&5
1691   (eval $ac_try) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }; }; then
1695     cross_compiling=no
1696   else
1697     if test "$cross_compiling" = maybe; then
1698         cross_compiling=yes
1699     else
1700         { { echo "$as_me:1700: error: cannot run C compiled programs.
1701 If you meant to cross compile, use \`--host'." >&5
1702 echo "$as_me: error: cannot run C compiled programs.
1703 If you meant to cross compile, use \`--host'." >&2;}
1704    { (exit 1); exit 1; }; }
1705     fi
1706   fi
1707 fi
1708 echo "$as_me:1708: result: yes" >&5
1709 echo "${ECHO_T}yes" >&6
1710
1711 rm -f a.out a.exe conftest$ac_cv_exeext
1712 ac_clean_files=$ac_clean_files_save
1713 # Check the compiler produces executables we can run.  If not, either
1714 # the compiler is broken, or we cross compile.
1715 echo "$as_me:1715: checking whether we are cross compiling" >&5
1716 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1717 echo "$as_me:1717: result: $cross_compiling" >&5
1718 echo "${ECHO_T}$cross_compiling" >&6
1719
1720 echo "$as_me:1720: checking for executable suffix" >&5
1721 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1722 if { (eval echo "$as_me:1722: \"$ac_link\"") >&5
1723   (eval $ac_link) 2>&5
1724   ac_status=$?
1725   echo "$as_me:1725: \$? = $ac_status" >&5
1726   (exit $ac_status); }; then
1727   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1728 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1729 # work properly (i.e., refer to `conftest.exe'), while it won't with
1730 # `rm'.
1731 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1732   case $ac_file in
1733     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1734     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1735           export ac_cv_exeext
1736           break;;
1737     * ) break;;
1738   esac
1739 done
1740 else
1741   { { echo "$as_me:1741: error: cannot compute EXEEXT: cannot compile and link" >&5
1742 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1743    { (exit 1); exit 1; }; }
1744 fi
1745
1746 rm -f conftest$ac_cv_exeext
1747 echo "$as_me:1747: result: $ac_cv_exeext" >&5
1748 echo "${ECHO_T}$ac_cv_exeext" >&6
1749
1750 rm -f conftest.$ac_ext
1751 EXEEXT=$ac_cv_exeext
1752 ac_exeext=$EXEEXT
1753 echo "$as_me:1753: checking for object suffix" >&5
1754 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1755 if test "${ac_cv_objext+set}" = set; then
1756   echo $ECHO_N "(cached) $ECHO_C" >&6
1757 else
1758   cat >conftest.$ac_ext <<_ACEOF
1759 #line 1759 "configure"
1760 #include "confdefs.h"
1761
1762 int
1763 main ()
1764 {
1765
1766   ;
1767   return 0;
1768 }
1769 _ACEOF
1770 rm -f conftest.o conftest.obj
1771 if { (eval echo "$as_me:1771: \"$ac_compile\"") >&5
1772   (eval $ac_compile) 2>&5
1773   ac_status=$?
1774   echo "$as_me:1774: \$? = $ac_status" >&5
1775   (exit $ac_status); }; then
1776   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1777   case $ac_file in
1778     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1779     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1780        break;;
1781   esac
1782 done
1783 else
1784   echo "$as_me: failed program was:" >&5
1785 cat conftest.$ac_ext >&5
1786 { { echo "$as_me:1786: error: cannot compute OBJEXT: cannot compile" >&5
1787 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1788    { (exit 1); exit 1; }; }
1789 fi
1790
1791 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1792 fi
1793 echo "$as_me:1793: result: $ac_cv_objext" >&5
1794 echo "${ECHO_T}$ac_cv_objext" >&6
1795 OBJEXT=$ac_cv_objext
1796 ac_objext=$OBJEXT
1797 echo "$as_me:1797: checking whether we are using the GNU C compiler" >&5
1798 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1799 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1800   echo $ECHO_N "(cached) $ECHO_C" >&6
1801 else
1802   cat >conftest.$ac_ext <<_ACEOF
1803 #line 1803 "configure"
1804 #include "confdefs.h"
1805
1806 int
1807 main ()
1808 {
1809 #ifndef __GNUC__
1810        choke me
1811 #endif
1812
1813   ;
1814   return 0;
1815 }
1816 _ACEOF
1817 rm -f conftest.$ac_objext
1818 if { (eval echo "$as_me:1818: \"$ac_compile\"") >&5
1819   (eval $ac_compile) 2>&5
1820   ac_status=$?
1821   echo "$as_me:1821: \$? = $ac_status" >&5
1822   (exit $ac_status); } &&
1823          { ac_try='test -s conftest.$ac_objext'
1824   { (eval echo "$as_me:1824: \"$ac_try\"") >&5
1825   (eval $ac_try) 2>&5
1826   ac_status=$?
1827   echo "$as_me:1827: \$? = $ac_status" >&5
1828   (exit $ac_status); }; }; then
1829   ac_compiler_gnu=yes
1830 else
1831   echo "$as_me: failed program was:" >&5
1832 cat conftest.$ac_ext >&5
1833 ac_compiler_gnu=no
1834 fi
1835 rm -f conftest.$ac_objext conftest.$ac_ext
1836 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1837
1838 fi
1839 echo "$as_me:1839: result: $ac_cv_c_compiler_gnu" >&5
1840 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1841 GCC=`test $ac_compiler_gnu = yes && echo yes`
1842 ac_test_CFLAGS=${CFLAGS+set}
1843 ac_save_CFLAGS=$CFLAGS
1844 CFLAGS="-g"
1845 echo "$as_me:1845: checking whether $CC accepts -g" >&5
1846 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1847 if test "${ac_cv_prog_cc_g+set}" = set; then
1848   echo $ECHO_N "(cached) $ECHO_C" >&6
1849 else
1850   cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853
1854 int
1855 main ()
1856 {
1857
1858   ;
1859   return 0;
1860 }
1861 _ACEOF
1862 rm -f conftest.$ac_objext
1863 if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5
1864   (eval $ac_compile) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit $ac_status); } &&
1868          { ac_try='test -s conftest.$ac_objext'
1869   { (eval echo "$as_me:1869: \"$ac_try\"") >&5
1870   (eval $ac_try) 2>&5
1871   ac_status=$?
1872   echo "$as_me:1872: \$? = $ac_status" >&5
1873   (exit $ac_status); }; }; then
1874   ac_cv_prog_cc_g=yes
1875 else
1876   echo "$as_me: failed program was:" >&5
1877 cat conftest.$ac_ext >&5
1878 ac_cv_prog_cc_g=no
1879 fi
1880 rm -f conftest.$ac_objext conftest.$ac_ext
1881 fi
1882 echo "$as_me:1882: result: $ac_cv_prog_cc_g" >&5
1883 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1884 if test "$ac_test_CFLAGS" = set; then
1885   CFLAGS=$ac_save_CFLAGS
1886 elif test $ac_cv_prog_cc_g = yes; then
1887   if test "$GCC" = yes; then
1888     CFLAGS="-g -O2"
1889   else
1890     CFLAGS="-g"
1891   fi
1892 else
1893   if test "$GCC" = yes; then
1894     CFLAGS="-O2"
1895   else
1896     CFLAGS=
1897   fi
1898 fi
1899 # Some people use a C++ compiler to compile C.  Since we use `exit',
1900 # in C++ we need to declare it.  In case someone uses the same compiler
1901 # for both compiling C and C++ we need to have the C++ compiler decide
1902 # the declaration of exit, since it's the most demanding environment.
1903 cat >conftest.$ac_ext <<_ACEOF
1904 #ifndef __cplusplus
1905   choke me
1906 #endif
1907 _ACEOF
1908 rm -f conftest.$ac_objext
1909 if { (eval echo "$as_me:1909: \"$ac_compile\"") >&5
1910   (eval $ac_compile) 2>&5
1911   ac_status=$?
1912   echo "$as_me:1912: \$? = $ac_status" >&5
1913   (exit $ac_status); } &&
1914          { ac_try='test -s conftest.$ac_objext'
1915   { (eval echo "$as_me:1915: \"$ac_try\"") >&5
1916   (eval $ac_try) 2>&5
1917   ac_status=$?
1918   echo "$as_me:1918: \$? = $ac_status" >&5
1919   (exit $ac_status); }; }; then
1920   for ac_declaration in \
1921    ''\
1922    '#include <stdlib.h>' \
1923    'extern "C" void std::exit (int) throw (); using std::exit;' \
1924    'extern "C" void std::exit (int); using std::exit;' \
1925    'extern "C" void exit (int) throw ();' \
1926    'extern "C" void exit (int);' \
1927    'void exit (int);'
1928 do
1929   cat >conftest.$ac_ext <<_ACEOF
1930 #line 1930 "configure"
1931 #include "confdefs.h"
1932 #include <stdlib.h>
1933 $ac_declaration
1934 int
1935 main ()
1936 {
1937 exit (42);
1938   ;
1939   return 0;
1940 }
1941 _ACEOF
1942 rm -f conftest.$ac_objext
1943 if { (eval echo "$as_me:1943: \"$ac_compile\"") >&5
1944   (eval $ac_compile) 2>&5
1945   ac_status=$?
1946   echo "$as_me:1946: \$? = $ac_status" >&5
1947   (exit $ac_status); } &&
1948          { ac_try='test -s conftest.$ac_objext'
1949   { (eval echo "$as_me:1949: \"$ac_try\"") >&5
1950   (eval $ac_try) 2>&5
1951   ac_status=$?
1952   echo "$as_me:1952: \$? = $ac_status" >&5
1953   (exit $ac_status); }; }; then
1954   :
1955 else
1956   echo "$as_me: failed program was:" >&5
1957 cat conftest.$ac_ext >&5
1958 continue
1959 fi
1960 rm -f conftest.$ac_objext conftest.$ac_ext
1961   cat >conftest.$ac_ext <<_ACEOF
1962 #line 1962 "configure"
1963 #include "confdefs.h"
1964 $ac_declaration
1965 int
1966 main ()
1967 {
1968 exit (42);
1969   ;
1970   return 0;
1971 }
1972 _ACEOF
1973 rm -f conftest.$ac_objext
1974 if { (eval echo "$as_me:1974: \"$ac_compile\"") >&5
1975   (eval $ac_compile) 2>&5
1976   ac_status=$?
1977   echo "$as_me:1977: \$? = $ac_status" >&5
1978   (exit $ac_status); } &&
1979          { ac_try='test -s conftest.$ac_objext'
1980   { (eval echo "$as_me:1980: \"$ac_try\"") >&5
1981   (eval $ac_try) 2>&5
1982   ac_status=$?
1983   echo "$as_me:1983: \$? = $ac_status" >&5
1984   (exit $ac_status); }; }; then
1985   break
1986 else
1987   echo "$as_me: failed program was:" >&5
1988 cat conftest.$ac_ext >&5
1989 fi
1990 rm -f conftest.$ac_objext conftest.$ac_ext
1991 done
1992 rm -f conftest*
1993 if test -n "$ac_declaration"; then
1994   echo '#ifdef __cplusplus' >>confdefs.h
1995   echo $ac_declaration      >>confdefs.h
1996   echo '#endif'             >>confdefs.h
1997 fi
1998
1999 else
2000   echo "$as_me: failed program was:" >&5
2001 cat conftest.$ac_ext >&5
2002 fi
2003 rm -f conftest.$ac_objext conftest.$ac_ext
2004 ac_ext=c
2005 ac_cpp='$CPP $CPPFLAGS'
2006 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2007 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2008 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2009
2010 GCC_VERSION=none
2011 if test "$GCC" = yes ; then
2012         echo "$as_me:2012: checking version of $CC" >&5
2013 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2014         GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2015         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2016         echo "$as_me:2016: result: $GCC_VERSION" >&5
2017 echo "${ECHO_T}$GCC_VERSION" >&6
2018 fi
2019
2020 ac_ext=c
2021 ac_cpp='$CPP $CPPFLAGS'
2022 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2023 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2024 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2025 echo "$as_me:2025: checking how to run the C preprocessor" >&5
2026 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2027 # On Suns, sometimes $CPP names a directory.
2028 if test -n "$CPP" && test -d "$CPP"; then
2029   CPP=
2030 fi
2031 if test -z "$CPP"; then
2032   if test "${ac_cv_prog_CPP+set}" = set; then
2033   echo $ECHO_N "(cached) $ECHO_C" >&6
2034 else
2035       # Double quotes because CPP needs to be expanded
2036     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2037     do
2038       ac_preproc_ok=false
2039 for ac_c_preproc_warn_flag in '' yes
2040 do
2041   # Use a header file that comes with gcc, so configuring glibc
2042   # with a fresh cross-compiler works.
2043   # On the NeXT, cc -E runs the code through the compiler's parser,
2044   # not just through cpp. "Syntax error" is here to catch this case.
2045   cat >conftest.$ac_ext <<_ACEOF
2046 #line 2046 "configure"
2047 #include "confdefs.h"
2048 #include <assert.h>
2049                      Syntax error
2050 _ACEOF
2051 if { (eval echo "$as_me:2051: \"$ac_cpp conftest.$ac_ext\"") >&5
2052   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2053   ac_status=$?
2054   egrep -v '^ *\+' conftest.er1 >conftest.err
2055   rm -f conftest.er1
2056   cat conftest.err >&5
2057   echo "$as_me:2057: \$? = $ac_status" >&5
2058   (exit $ac_status); } >/dev/null; then
2059   if test -s conftest.err; then
2060     ac_cpp_err=$ac_c_preproc_warn_flag
2061   else
2062     ac_cpp_err=
2063   fi
2064 else
2065   ac_cpp_err=yes
2066 fi
2067 if test -z "$ac_cpp_err"; then
2068   :
2069 else
2070   echo "$as_me: failed program was:" >&5
2071   cat conftest.$ac_ext >&5
2072   # Broken: fails on valid input.
2073 continue
2074 fi
2075 rm -f conftest.err conftest.$ac_ext
2076
2077   # OK, works on sane cases.  Now check whether non-existent headers
2078   # can be detected and how.
2079   cat >conftest.$ac_ext <<_ACEOF
2080 #line 2080 "configure"
2081 #include "confdefs.h"
2082 #include <ac_nonexistent.h>
2083 _ACEOF
2084 if { (eval echo "$as_me:2084: \"$ac_cpp conftest.$ac_ext\"") >&5
2085   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2086   ac_status=$?
2087   egrep -v '^ *\+' conftest.er1 >conftest.err
2088   rm -f conftest.er1
2089   cat conftest.err >&5
2090   echo "$as_me:2090: \$? = $ac_status" >&5
2091   (exit $ac_status); } >/dev/null; then
2092   if test -s conftest.err; then
2093     ac_cpp_err=$ac_c_preproc_warn_flag
2094   else
2095     ac_cpp_err=
2096   fi
2097 else
2098   ac_cpp_err=yes
2099 fi
2100 if test -z "$ac_cpp_err"; then
2101   # Broken: success on invalid input.
2102 continue
2103 else
2104   echo "$as_me: failed program was:" >&5
2105   cat conftest.$ac_ext >&5
2106   # Passes both tests.
2107 ac_preproc_ok=:
2108 break
2109 fi
2110 rm -f conftest.err conftest.$ac_ext
2111
2112 done
2113 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2114 rm -f conftest.err conftest.$ac_ext
2115 if $ac_preproc_ok; then
2116   break
2117 fi
2118
2119     done
2120     ac_cv_prog_CPP=$CPP
2121
2122 fi
2123   CPP=$ac_cv_prog_CPP
2124 else
2125   ac_cv_prog_CPP=$CPP
2126 fi
2127 echo "$as_me:2127: result: $CPP" >&5
2128 echo "${ECHO_T}$CPP" >&6
2129 ac_preproc_ok=false
2130 for ac_c_preproc_warn_flag in '' yes
2131 do
2132   # Use a header file that comes with gcc, so configuring glibc
2133   # with a fresh cross-compiler works.
2134   # On the NeXT, cc -E runs the code through the compiler's parser,
2135   # not just through cpp. "Syntax error" is here to catch this case.
2136   cat >conftest.$ac_ext <<_ACEOF
2137 #line 2137 "configure"
2138 #include "confdefs.h"
2139 #include <assert.h>
2140                      Syntax error
2141 _ACEOF
2142 if { (eval echo "$as_me:2142: \"$ac_cpp conftest.$ac_ext\"") >&5
2143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2144   ac_status=$?
2145   egrep -v '^ *\+' conftest.er1 >conftest.err
2146   rm -f conftest.er1
2147   cat conftest.err >&5
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } >/dev/null; then
2150   if test -s conftest.err; then
2151     ac_cpp_err=$ac_c_preproc_warn_flag
2152   else
2153     ac_cpp_err=
2154   fi
2155 else
2156   ac_cpp_err=yes
2157 fi
2158 if test -z "$ac_cpp_err"; then
2159   :
2160 else
2161   echo "$as_me: failed program was:" >&5
2162   cat conftest.$ac_ext >&5
2163   # Broken: fails on valid input.
2164 continue
2165 fi
2166 rm -f conftest.err conftest.$ac_ext
2167
2168   # OK, works on sane cases.  Now check whether non-existent headers
2169   # can be detected and how.
2170   cat >conftest.$ac_ext <<_ACEOF
2171 #line 2171 "configure"
2172 #include "confdefs.h"
2173 #include <ac_nonexistent.h>
2174 _ACEOF
2175 if { (eval echo "$as_me:2175: \"$ac_cpp conftest.$ac_ext\"") >&5
2176   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2177   ac_status=$?
2178   egrep -v '^ *\+' conftest.er1 >conftest.err
2179   rm -f conftest.er1
2180   cat conftest.err >&5
2181   echo "$as_me:2181: \$? = $ac_status" >&5
2182   (exit $ac_status); } >/dev/null; then
2183   if test -s conftest.err; then
2184     ac_cpp_err=$ac_c_preproc_warn_flag
2185   else
2186     ac_cpp_err=
2187   fi
2188 else
2189   ac_cpp_err=yes
2190 fi
2191 if test -z "$ac_cpp_err"; then
2192   # Broken: success on invalid input.
2193 continue
2194 else
2195   echo "$as_me: failed program was:" >&5
2196   cat conftest.$ac_ext >&5
2197   # Passes both tests.
2198 ac_preproc_ok=:
2199 break
2200 fi
2201 rm -f conftest.err conftest.$ac_ext
2202
2203 done
2204 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2205 rm -f conftest.err conftest.$ac_ext
2206 if $ac_preproc_ok; then
2207   :
2208 else
2209   { { echo "$as_me:2209: error: C preprocessor \"$CPP\" fails sanity check" >&5
2210 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2211    { (exit 1); exit 1; }; }
2212 fi
2213
2214 ac_ext=c
2215 ac_cpp='$CPP $CPPFLAGS'
2216 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2217 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2218 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2219
2220 if test $ac_cv_c_compiler_gnu = yes; then
2221     echo "$as_me:2221: checking whether $CC needs -traditional" >&5
2222 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2223 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2224   echo $ECHO_N "(cached) $ECHO_C" >&6
2225 else
2226     ac_pattern="Autoconf.*'x'"
2227   cat >conftest.$ac_ext <<_ACEOF
2228 #line 2228 "configure"
2229 #include "confdefs.h"
2230 #include <sgtty.h>
2231 int Autoconf = TIOCGETP;
2232 _ACEOF
2233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2234   egrep "$ac_pattern" >/dev/null 2>&1; then
2235   ac_cv_prog_gcc_traditional=yes
2236 else
2237   ac_cv_prog_gcc_traditional=no
2238 fi
2239 rm -f conftest*
2240
2241   if test $ac_cv_prog_gcc_traditional = no; then
2242     cat >conftest.$ac_ext <<_ACEOF
2243 #line 2243 "configure"
2244 #include "confdefs.h"
2245 #include <termio.h>
2246 int Autoconf = TCGETA;
2247 _ACEOF
2248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2249   egrep "$ac_pattern" >/dev/null 2>&1; then
2250   ac_cv_prog_gcc_traditional=yes
2251 fi
2252 rm -f conftest*
2253
2254   fi
2255 fi
2256 echo "$as_me:2256: result: $ac_cv_prog_gcc_traditional" >&5
2257 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2258   if test $ac_cv_prog_gcc_traditional = yes; then
2259     CC="$CC -traditional"
2260   fi
2261 fi
2262
2263 echo "$as_me:2263: checking for POSIXized ISC" >&5
2264 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2265 if test -d /etc/conf/kconfig.d &&
2266    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2267 then
2268   echo "$as_me:2268: result: yes" >&5
2269 echo "${ECHO_T}yes" >&6
2270   ISC=yes # If later tests want to check for ISC.
2271
2272 cat >>confdefs.h <<\EOF
2273 #define _POSIX_SOURCE 1
2274 EOF
2275
2276   if test "$GCC" = yes; then
2277     CC="$CC -posix"
2278   else
2279     CC="$CC -Xp"
2280   fi
2281 else
2282   echo "$as_me:2282: result: no" >&5
2283 echo "${ECHO_T}no" >&6
2284   ISC=
2285 fi
2286
2287 echo "$as_me:2287: checking for ${CC-cc} option to accept ANSI C" >&5
2288 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2289 if test "${cf_cv_ansi_cc+set}" = set; then
2290   echo $ECHO_N "(cached) $ECHO_C" >&6
2291 else
2292
2293 cf_cv_ansi_cc=no
2294 cf_save_CFLAGS="$CFLAGS"
2295 cf_save_CPPFLAGS="$CPPFLAGS"
2296 # Don't try gcc -ansi; that turns off useful extensions and
2297 # breaks some systems' header files.
2298 # AIX                   -qlanglvl=ansi
2299 # Ultrix and OSF/1      -std1
2300 # HP-UX                 -Aa -D_HPUX_SOURCE
2301 # SVR4                  -Xc
2302 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2303 for cf_arg in "-DCC_HAS_PROTOS" \
2304         "" \
2305         -qlanglvl=ansi \
2306         -std1 \
2307         -Ae \
2308         "-Aa -D_HPUX_SOURCE" \
2309         -Xc
2310 do
2311
2312 cf_new_cflags=
2313 cf_new_cppflags=
2314 for cf_add_cflags in $cf_arg
2315 do
2316         case $cf_add_cflags in #(vi
2317         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2318                 case "$CPPFLAGS" in
2319                 *$cf_add_cflags) #(vi
2320                         ;;
2321                 *) #(vi
2322                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2323                         ;;
2324                 esac
2325                 ;;
2326         *)
2327                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2328                 ;;
2329         esac
2330 done
2331
2332 if test -n "$cf_new_cflags" ; then
2333
2334         CFLAGS="$CFLAGS $cf_new_cflags"
2335 fi
2336
2337 if test -n "$cf_new_cppflags" ; then
2338
2339         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2340 fi
2341
2342         cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345
2346 #ifndef CC_HAS_PROTOS
2347 #if !defined(__STDC__) || (__STDC__ != 1)
2348 choke me
2349 #endif
2350 #endif
2351
2352 int
2353 main ()
2354 {
2355
2356         int test (int i, double x);
2357         struct s1 {int (*f) (int a);};
2358         struct s2 {int (*f) (double a);};
2359   ;
2360   return 0;
2361 }
2362 _ACEOF
2363 rm -f conftest.$ac_objext
2364 if { (eval echo "$as_me:2364: \"$ac_compile\"") >&5
2365   (eval $ac_compile) 2>&5
2366   ac_status=$?
2367   echo "$as_me:2367: \$? = $ac_status" >&5
2368   (exit $ac_status); } &&
2369          { ac_try='test -s conftest.$ac_objext'
2370   { (eval echo "$as_me:2370: \"$ac_try\"") >&5
2371   (eval $ac_try) 2>&5
2372   ac_status=$?
2373   echo "$as_me:2373: \$? = $ac_status" >&5
2374   (exit $ac_status); }; }; then
2375   cf_cv_ansi_cc="$cf_arg"; break
2376 else
2377   echo "$as_me: failed program was:" >&5
2378 cat conftest.$ac_ext >&5
2379 fi
2380 rm -f conftest.$ac_objext conftest.$ac_ext
2381 done
2382 CFLAGS="$cf_save_CFLAGS"
2383 CPPFLAGS="$cf_save_CPPFLAGS"
2384
2385 fi
2386 echo "$as_me:2386: result: $cf_cv_ansi_cc" >&5
2387 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2388
2389 if test "$cf_cv_ansi_cc" != "no"; then
2390 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2391
2392 cf_new_cflags=
2393 cf_new_cppflags=
2394 for cf_add_cflags in $cf_cv_ansi_cc
2395 do
2396         case $cf_add_cflags in #(vi
2397         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2398                 case "$CPPFLAGS" in
2399                 *$cf_add_cflags) #(vi
2400                         ;;
2401                 *) #(vi
2402                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2403                         ;;
2404                 esac
2405                 ;;
2406         *)
2407                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2408                 ;;
2409         esac
2410 done
2411
2412 if test -n "$cf_new_cflags" ; then
2413
2414         CFLAGS="$CFLAGS $cf_new_cflags"
2415 fi
2416
2417 if test -n "$cf_new_cppflags" ; then
2418
2419         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2420 fi
2421
2422 else
2423         cat >>confdefs.h <<\EOF
2424 #define CC_HAS_PROTOS 1
2425 EOF
2426
2427 fi
2428 fi
2429
2430 if test "$cf_cv_ansi_cc" = "no"; then
2431         { { echo "$as_me:2431: error: Your compiler does not appear to recognize prototypes.
2432 You have the following choices:
2433         a. adjust your compiler options
2434         b. get an up-to-date compiler
2435         c. use a wrapper such as unproto" >&5
2436 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2437 You have the following choices:
2438         a. adjust your compiler options
2439         b. get an up-to-date compiler
2440         c. use a wrapper such as unproto" >&2;}
2441    { (exit 1); exit 1; }; }
2442 fi
2443
2444 case $cf_cv_system_name in
2445 os2*)
2446     CFLAGS="$CFLAGS -Zmt"
2447     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2448     CXXFLAGS="$CXXFLAGS -Zmt"
2449     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2450     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2451     ac_cv_exeext=.exe
2452     ;;
2453 esac
2454
2455 PROG_EXT="$EXEEXT"
2456
2457 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2458 #define PROG_EXT "$PROG_EXT"
2459 EOF
2460
2461 if test "$cross_compiling" = yes ; then
2462   LDCONFIG=:
2463 else
2464 case "$cf_cv_system_name" in #(vi
2465 freebsd*) #(vi
2466   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2467   ;;
2468 *) LDPATH=$PATH:/sbin:/usr/sbin
2469   # Extract the first word of "ldconfig", so it can be a program name with args.
2470 set dummy ldconfig; ac_word=$2
2471 echo "$as_me:2471: checking for $ac_word" >&5
2472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2473 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2474   echo $ECHO_N "(cached) $ECHO_C" >&6
2475 else
2476   case $LDCONFIG in
2477   [\\/]* | ?:[\\/]*)
2478   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2479   ;;
2480   *)
2481   ac_save_IFS=$IFS; IFS=$ac_path_separator
2482 ac_dummy="$LDPATH"
2483 for ac_dir in $ac_dummy; do
2484   IFS=$ac_save_IFS
2485   test -z "$ac_dir" && ac_dir=.
2486   if $as_executable_p "$ac_dir/$ac_word"; then
2487    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2488    echo "$as_me:2488: found $ac_dir/$ac_word" >&5
2489    break
2490 fi
2491 done
2492
2493   ;;
2494 esac
2495 fi
2496 LDCONFIG=$ac_cv_path_LDCONFIG
2497
2498 if test -n "$LDCONFIG"; then
2499   echo "$as_me:2499: result: $LDCONFIG" >&5
2500 echo "${ECHO_T}$LDCONFIG" >&6
2501 else
2502   echo "$as_me:2502: result: no" >&5
2503 echo "${ECHO_T}no" >&6
2504 fi
2505
2506   ;;
2507 esac
2508 fi
2509
2510 echo "$as_me:2510: checking if you want to ensure bool is consistent with C++" >&5
2511 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2512
2513 # Check whether --with-cxx or --without-cxx was given.
2514 if test "${with_cxx+set}" = set; then
2515   withval="$with_cxx"
2516   cf_with_cxx=$withval
2517 else
2518   cf_with_cxx=yes
2519 fi;
2520 echo "$as_me:2520: result: $cf_with_cxx" >&5
2521 echo "${ECHO_T}$cf_with_cxx" >&6
2522 if test "X$cf_with_cxx" = Xno ; then
2523         CXX=""
2524         GXX=""
2525 else
2526         # with autoconf 2.13, we can change the error to a warning:
2527                 ac_ext=cc
2528 ac_cpp='$CXXCPP $CPPFLAGS'
2529 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2530 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2531 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2532 if test -n "$ac_tool_prefix"; then
2533   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2534   do
2535     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2536 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2537 echo "$as_me:2537: checking for $ac_word" >&5
2538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2539 if test "${ac_cv_prog_CXX+set}" = set; then
2540   echo $ECHO_N "(cached) $ECHO_C" >&6
2541 else
2542   if test -n "$CXX"; then
2543   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2544 else
2545   ac_save_IFS=$IFS; IFS=$ac_path_separator
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548   IFS=$ac_save_IFS
2549   test -z "$ac_dir" && ac_dir=.
2550   $as_executable_p "$ac_dir/$ac_word" || continue
2551 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2552 echo "$as_me:2552: found $ac_dir/$ac_word" >&5
2553 break
2554 done
2555
2556 fi
2557 fi
2558 CXX=$ac_cv_prog_CXX
2559 if test -n "$CXX"; then
2560   echo "$as_me:2560: result: $CXX" >&5
2561 echo "${ECHO_T}$CXX" >&6
2562 else
2563   echo "$as_me:2563: result: no" >&5
2564 echo "${ECHO_T}no" >&6
2565 fi
2566
2567     test -n "$CXX" && break
2568   done
2569 fi
2570 if test -z "$CXX"; then
2571   ac_ct_CXX=$CXX
2572   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2573 do
2574   # Extract the first word of "$ac_prog", so it can be a program name with args.
2575 set dummy $ac_prog; ac_word=$2
2576 echo "$as_me:2576: checking for $ac_word" >&5
2577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2578 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2579   echo $ECHO_N "(cached) $ECHO_C" >&6
2580 else
2581   if test -n "$ac_ct_CXX"; then
2582   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2583 else
2584   ac_save_IFS=$IFS; IFS=$ac_path_separator
2585 ac_dummy="$PATH"
2586 for ac_dir in $ac_dummy; do
2587   IFS=$ac_save_IFS
2588   test -z "$ac_dir" && ac_dir=.
2589   $as_executable_p "$ac_dir/$ac_word" || continue
2590 ac_cv_prog_ac_ct_CXX="$ac_prog"
2591 echo "$as_me:2591: found $ac_dir/$ac_word" >&5
2592 break
2593 done
2594
2595 fi
2596 fi
2597 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2598 if test -n "$ac_ct_CXX"; then
2599   echo "$as_me:2599: result: $ac_ct_CXX" >&5
2600 echo "${ECHO_T}$ac_ct_CXX" >&6
2601 else
2602   echo "$as_me:2602: result: no" >&5
2603 echo "${ECHO_T}no" >&6
2604 fi
2605
2606   test -n "$ac_ct_CXX" && break
2607 done
2608 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2609
2610   CXX=$ac_ct_CXX
2611 fi
2612
2613 # Provide some information about the compiler.
2614 echo "$as_me:2614:" \
2615      "checking for C++ compiler version" >&5
2616 ac_compiler=`set X $ac_compile; echo $2`
2617 { (eval echo "$as_me:2617: \"$ac_compiler --version </dev/null >&5\"") >&5
2618   (eval $ac_compiler --version </dev/null >&5) 2>&5
2619   ac_status=$?
2620   echo "$as_me:2620: \$? = $ac_status" >&5
2621   (exit $ac_status); }
2622 { (eval echo "$as_me:2622: \"$ac_compiler -v </dev/null >&5\"") >&5
2623   (eval $ac_compiler -v </dev/null >&5) 2>&5
2624   ac_status=$?
2625   echo "$as_me:2625: \$? = $ac_status" >&5
2626   (exit $ac_status); }
2627 { (eval echo "$as_me:2627: \"$ac_compiler -V </dev/null >&5\"") >&5
2628   (eval $ac_compiler -V </dev/null >&5) 2>&5
2629   ac_status=$?
2630   echo "$as_me:2630: \$? = $ac_status" >&5
2631   (exit $ac_status); }
2632
2633 echo "$as_me:2633: checking whether we are using the GNU C++ compiler" >&5
2634 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2635 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2636   echo $ECHO_N "(cached) $ECHO_C" >&6
2637 else
2638   cat >conftest.$ac_ext <<_ACEOF
2639 #line 2639 "configure"
2640 #include "confdefs.h"
2641
2642 int
2643 main ()
2644 {
2645 #ifndef __GNUC__
2646        choke me
2647 #endif
2648
2649   ;
2650   return 0;
2651 }
2652 _ACEOF
2653 rm -f conftest.$ac_objext
2654 if { (eval echo "$as_me:2654: \"$ac_compile\"") >&5
2655   (eval $ac_compile) 2>&5
2656   ac_status=$?
2657   echo "$as_me:2657: \$? = $ac_status" >&5
2658   (exit $ac_status); } &&
2659          { ac_try='test -s conftest.$ac_objext'
2660   { (eval echo "$as_me:2660: \"$ac_try\"") >&5
2661   (eval $ac_try) 2>&5
2662   ac_status=$?
2663   echo "$as_me:2663: \$? = $ac_status" >&5
2664   (exit $ac_status); }; }; then
2665   ac_compiler_gnu=yes
2666 else
2667   echo "$as_me: failed program was:" >&5
2668 cat conftest.$ac_ext >&5
2669 ac_compiler_gnu=no
2670 fi
2671 rm -f conftest.$ac_objext conftest.$ac_ext
2672 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2673
2674 fi
2675 echo "$as_me:2675: result: $ac_cv_cxx_compiler_gnu" >&5
2676 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2677 GXX=`test $ac_compiler_gnu = yes && echo yes`
2678 ac_test_CXXFLAGS=${CXXFLAGS+set}
2679 ac_save_CXXFLAGS=$CXXFLAGS
2680 CXXFLAGS="-g"
2681 echo "$as_me:2681: checking whether $CXX accepts -g" >&5
2682 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2683 if test "${ac_cv_prog_cxx_g+set}" = set; then
2684   echo $ECHO_N "(cached) $ECHO_C" >&6
2685 else
2686   cat >conftest.$ac_ext <<_ACEOF
2687 #line 2687 "configure"
2688 #include "confdefs.h"
2689
2690 int
2691 main ()
2692 {
2693
2694   ;
2695   return 0;
2696 }
2697 _ACEOF
2698 rm -f conftest.$ac_objext
2699 if { (eval echo "$as_me:2699: \"$ac_compile\"") >&5
2700   (eval $ac_compile) 2>&5
2701   ac_status=$?
2702   echo "$as_me:2702: \$? = $ac_status" >&5
2703   (exit $ac_status); } &&
2704          { ac_try='test -s conftest.$ac_objext'
2705   { (eval echo "$as_me:2705: \"$ac_try\"") >&5
2706   (eval $ac_try) 2>&5
2707   ac_status=$?
2708   echo "$as_me:2708: \$? = $ac_status" >&5
2709   (exit $ac_status); }; }; then
2710   ac_cv_prog_cxx_g=yes
2711 else
2712   echo "$as_me: failed program was:" >&5
2713 cat conftest.$ac_ext >&5
2714 ac_cv_prog_cxx_g=no
2715 fi
2716 rm -f conftest.$ac_objext conftest.$ac_ext
2717 fi
2718 echo "$as_me:2718: result: $ac_cv_prog_cxx_g" >&5
2719 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2720 if test "$ac_test_CXXFLAGS" = set; then
2721   CXXFLAGS=$ac_save_CXXFLAGS
2722 elif test $ac_cv_prog_cxx_g = yes; then
2723   if test "$GXX" = yes; then
2724     CXXFLAGS="-g -O2"
2725   else
2726     CXXFLAGS="-g"
2727   fi
2728 else
2729   if test "$GXX" = yes; then
2730     CXXFLAGS="-O2"
2731   else
2732     CXXFLAGS=
2733   fi
2734 fi
2735 for ac_declaration in \
2736    ''\
2737    '#include <stdlib.h>' \
2738    'extern "C" void std::exit (int) throw (); using std::exit;' \
2739    'extern "C" void std::exit (int); using std::exit;' \
2740    'extern "C" void exit (int) throw ();' \
2741    'extern "C" void exit (int);' \
2742    'void exit (int);'
2743 do
2744   cat >conftest.$ac_ext <<_ACEOF
2745 #line 2745 "configure"
2746 #include "confdefs.h"
2747 #include <stdlib.h>
2748 $ac_declaration
2749 int
2750 main ()
2751 {
2752 exit (42);
2753   ;
2754   return 0;
2755 }
2756 _ACEOF
2757 rm -f conftest.$ac_objext
2758 if { (eval echo "$as_me:2758: \"$ac_compile\"") >&5
2759   (eval $ac_compile) 2>&5
2760   ac_status=$?
2761   echo "$as_me:2761: \$? = $ac_status" >&5
2762   (exit $ac_status); } &&
2763          { ac_try='test -s conftest.$ac_objext'
2764   { (eval echo "$as_me:2764: \"$ac_try\"") >&5
2765   (eval $ac_try) 2>&5
2766   ac_status=$?
2767   echo "$as_me:2767: \$? = $ac_status" >&5
2768   (exit $ac_status); }; }; then
2769   :
2770 else
2771   echo "$as_me: failed program was:" >&5
2772 cat conftest.$ac_ext >&5
2773 continue
2774 fi
2775 rm -f conftest.$ac_objext conftest.$ac_ext
2776   cat >conftest.$ac_ext <<_ACEOF
2777 #line 2777 "configure"
2778 #include "confdefs.h"
2779 $ac_declaration
2780 int
2781 main ()
2782 {
2783 exit (42);
2784   ;
2785   return 0;
2786 }
2787 _ACEOF
2788 rm -f conftest.$ac_objext
2789 if { (eval echo "$as_me:2789: \"$ac_compile\"") >&5
2790   (eval $ac_compile) 2>&5
2791   ac_status=$?
2792   echo "$as_me:2792: \$? = $ac_status" >&5
2793   (exit $ac_status); } &&
2794          { ac_try='test -s conftest.$ac_objext'
2795   { (eval echo "$as_me:2795: \"$ac_try\"") >&5
2796   (eval $ac_try) 2>&5
2797   ac_status=$?
2798   echo "$as_me:2798: \$? = $ac_status" >&5
2799   (exit $ac_status); }; }; then
2800   break
2801 else
2802   echo "$as_me: failed program was:" >&5
2803 cat conftest.$ac_ext >&5
2804 fi
2805 rm -f conftest.$ac_objext conftest.$ac_ext
2806 done
2807 rm -f conftest*
2808 if test -n "$ac_declaration"; then
2809   echo '#ifdef __cplusplus' >>confdefs.h
2810   echo $ac_declaration      >>confdefs.h
2811   echo '#endif'             >>confdefs.h
2812 fi
2813
2814 ac_ext=c
2815 ac_cpp='$CPP $CPPFLAGS'
2816 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2817 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2818 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2819
2820                 # autoconf 2.5x removed the error - by hardcoding it to g++.
2821         if test "$CXX" = "g++" ; then
2822                 # Extract the first word of "g++", so it can be a program name with args.
2823 set dummy g++; ac_word=$2
2824 echo "$as_me:2824: checking for $ac_word" >&5
2825 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2826 if test "${ac_cv_path_CXX+set}" = set; then
2827   echo $ECHO_N "(cached) $ECHO_C" >&6
2828 else
2829   case $CXX in
2830   [\\/]* | ?:[\\/]*)
2831   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2832   ;;
2833   *)
2834   ac_save_IFS=$IFS; IFS=$ac_path_separator
2835 ac_dummy="$PATH"
2836 for ac_dir in $ac_dummy; do
2837   IFS=$ac_save_IFS
2838   test -z "$ac_dir" && ac_dir=.
2839   if $as_executable_p "$ac_dir/$ac_word"; then
2840    ac_cv_path_CXX="$ac_dir/$ac_word"
2841    echo "$as_me:2841: found $ac_dir/$ac_word" >&5
2842    break
2843 fi
2844 done
2845
2846   ;;
2847 esac
2848 fi
2849 CXX=$ac_cv_path_CXX
2850
2851 if test -n "$CXX"; then
2852   echo "$as_me:2852: result: $CXX" >&5
2853 echo "${ECHO_T}$CXX" >&6
2854 else
2855   echo "$as_me:2855: result: no" >&5
2856 echo "${ECHO_T}no" >&6
2857 fi
2858
2859         fi
2860         if test "$CXX" = "g++" ; then
2861                 { echo "$as_me:2861: WARNING: ignoring hardcoded g++" >&5
2862 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
2863                 cf_with_cxx=no; CXX=""; GXX="";
2864         fi
2865 fi
2866
2867 GXX_VERSION=none
2868 if test "$GXX" = yes; then
2869         echo "$as_me:2869: checking version of g++" >&5
2870 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
2871         GXX_VERSION="`${CXX-g++} --version|sed -e '2,$d'`"
2872         echo "$as_me:2872: result: $GXX_VERSION" >&5
2873 echo "${ECHO_T}$GXX_VERSION" >&6
2874 fi
2875
2876 case $GXX_VERSION in
2877 1*|2.[0-6]*)
2878         GXX=""; CXX=""; ac_cv_cxx_compiler_gnu=no
2879         cf_cxx_library=no
2880         { echo "$as_me:2880: WARNING: templates do not work" >&5
2881 echo "$as_me: WARNING: templates do not work" >&2;}
2882         ;;
2883 esac
2884
2885 echo "$as_me:2885: checking if you want to build C++ binding and demo" >&5
2886 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2887
2888 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2889 if test "${with_cxx_binding+set}" = set; then
2890   withval="$with_cxx_binding"
2891   cf_with_cxx_binding=$withval
2892 else
2893   cf_with_cxx_binding=$cf_with_cxx
2894 fi;
2895 echo "$as_me:2895: result: $cf_with_cxx_binding" >&5
2896 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2897
2898 echo "$as_me:2898: checking if you want to build with Ada95" >&5
2899 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2900
2901 # Check whether --with-ada or --without-ada was given.
2902 if test "${with_ada+set}" = set; then
2903   withval="$with_ada"
2904   cf_with_ada=$withval
2905 else
2906   cf_with_ada=yes
2907 fi;
2908 echo "$as_me:2908: result: $cf_with_ada" >&5
2909 echo "${ECHO_T}$cf_with_ada" >&6
2910
2911 echo "$as_me:2911: checking if you want to build programs such as tic" >&5
2912 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2913
2914 # Check whether --with-progs or --without-progs was given.
2915 if test "${with_progs+set}" = set; then
2916   withval="$with_progs"
2917   cf_with_progs=$withval
2918 else
2919   cf_with_progs=yes
2920 fi;
2921 echo "$as_me:2921: result: $cf_with_progs" >&5
2922 echo "${ECHO_T}$cf_with_progs" >&6
2923
2924 echo "$as_me:2924: checking if you wish to install curses.h" >&5
2925 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2926
2927 # Check whether --with-curses-h or --without-curses-h was given.
2928 if test "${with_curses_h+set}" = set; then
2929   withval="$with_curses_h"
2930   with_curses_h=$withval
2931 else
2932   with_curses_h=yes
2933 fi;
2934 echo "$as_me:2934: result: $with_curses_h" >&5
2935 echo "${ECHO_T}$with_curses_h" >&6
2936
2937 modules_to_build="ncurses"
2938 if test "X$cf_with_progs" != Xno ; then
2939 modules_to_build="$modules_to_build progs tack"
2940 fi
2941 modules_to_build="$modules_to_build panel menu form"
2942
2943 test "$program_prefix" != NONE &&
2944   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2945 # Use a double $ so make ignores it.
2946 test "$program_suffix" != NONE &&
2947   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2948 # Double any \ or $.  echo might interpret backslashes.
2949 # By default was `s,x,x', remove it if useless.
2950 cat <<\_ACEOF >conftest.sed
2951 s/[\\$]/&&/g;s/;s,x,x,$//
2952 _ACEOF
2953 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2954 rm conftest.sed
2955
2956 for ac_prog in mawk gawk nawk awk
2957 do
2958   # Extract the first word of "$ac_prog", so it can be a program name with args.
2959 set dummy $ac_prog; ac_word=$2
2960 echo "$as_me:2960: checking for $ac_word" >&5
2961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2962 if test "${ac_cv_prog_AWK+set}" = set; then
2963   echo $ECHO_N "(cached) $ECHO_C" >&6
2964 else
2965   if test -n "$AWK"; then
2966   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2967 else
2968   ac_save_IFS=$IFS; IFS=$ac_path_separator
2969 ac_dummy="$PATH"
2970 for ac_dir in $ac_dummy; do
2971   IFS=$ac_save_IFS
2972   test -z "$ac_dir" && ac_dir=.
2973   $as_executable_p "$ac_dir/$ac_word" || continue
2974 ac_cv_prog_AWK="$ac_prog"
2975 echo "$as_me:2975: found $ac_dir/$ac_word" >&5
2976 break
2977 done
2978
2979 fi
2980 fi
2981 AWK=$ac_cv_prog_AWK
2982 if test -n "$AWK"; then
2983   echo "$as_me:2983: result: $AWK" >&5
2984 echo "${ECHO_T}$AWK" >&6
2985 else
2986   echo "$as_me:2986: result: no" >&5
2987 echo "${ECHO_T}no" >&6
2988 fi
2989
2990   test -n "$AWK" && break
2991 done
2992
2993 echo "$as_me:2993: checking whether ${MAKE-make} sets \${MAKE}" >&5
2994 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2995 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2996 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2997   echo $ECHO_N "(cached) $ECHO_C" >&6
2998 else
2999   cat >conftest.make <<\EOF
3000 all:
3001         @echo 'ac_maketemp="${MAKE}"'
3002 EOF
3003 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3004 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3005 if test -n "$ac_maketemp"; then
3006   eval ac_cv_prog_make_${ac_make}_set=yes
3007 else
3008   eval ac_cv_prog_make_${ac_make}_set=no
3009 fi
3010 rm -f conftest.make
3011 fi
3012 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3013   echo "$as_me:3013: result: yes" >&5
3014 echo "${ECHO_T}yes" >&6
3015   SET_MAKE=
3016 else
3017   echo "$as_me:3017: result: no" >&5
3018 echo "${ECHO_T}no" >&6
3019   SET_MAKE="MAKE=${MAKE-make}"
3020 fi
3021
3022 # Find a good install program.  We prefer a C program (faster),
3023 # so one script is as good as another.  But avoid the broken or
3024 # incompatible versions:
3025 # SysV /etc/install, /usr/sbin/install
3026 # SunOS /usr/etc/install
3027 # IRIX /sbin/install
3028 # AIX /bin/install
3029 # AmigaOS /C/install, which installs bootblocks on floppy discs
3030 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3031 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3032 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3033 # ./install, which can be erroneously created by make from ./install.sh.
3034 echo "$as_me:3034: checking for a BSD compatible install" >&5
3035 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3036 if test -z "$INSTALL"; then
3037 if test "${ac_cv_path_install+set}" = set; then
3038   echo $ECHO_N "(cached) $ECHO_C" >&6
3039 else
3040     ac_save_IFS=$IFS; IFS=$ac_path_separator
3041   for ac_dir in $PATH; do
3042     IFS=$ac_save_IFS
3043     # Account for people who put trailing slashes in PATH elements.
3044     case $ac_dir/ in
3045     / | ./ | .// | /cC/* \
3046     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3047     | /usr/ucb/* ) ;;
3048     *)
3049       # OSF1 and SCO ODT 3.0 have their own names for install.
3050       # Don't use installbsd from OSF since it installs stuff as root
3051       # by default.
3052       for ac_prog in ginstall scoinst install; do
3053         if $as_executable_p "$ac_dir/$ac_prog"; then
3054           if test $ac_prog = install &&
3055             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3056             # AIX install.  It has an incompatible calling convention.
3057             :
3058           elif test $ac_prog = install &&
3059             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3060             # program-specific install script used by HP pwplus--don't use.
3061             :
3062           else
3063             ac_cv_path_install="$ac_dir/$ac_prog -c"
3064             break 2
3065           fi
3066         fi
3067       done
3068       ;;
3069     esac
3070   done
3071
3072 fi
3073   if test "${ac_cv_path_install+set}" = set; then
3074     INSTALL=$ac_cv_path_install
3075   else
3076     # As a last resort, use the slow shell script.  We don't cache a
3077     # path for INSTALL within a source directory, because that will
3078     # break other packages using the cache if that directory is
3079     # removed, or if the path is relative.
3080     INSTALL=$ac_install_sh
3081   fi
3082 fi
3083 echo "$as_me:3083: result: $INSTALL" >&5
3084 echo "${ECHO_T}$INSTALL" >&6
3085
3086 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3087 # It thinks the first close brace ends the variable substitution.
3088 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3089
3090 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3091
3092 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3093
3094 case $INSTALL in
3095 /*)
3096   ;;
3097 *)
3098   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3099   test -z "$cf_dir" && cf_dir=.
3100   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3101   ;;
3102 esac
3103
3104 echo "$as_me:3104: checking for long file names" >&5
3105 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3106 if test "${ac_cv_sys_long_file_names+set}" = set; then
3107   echo $ECHO_N "(cached) $ECHO_C" >&6
3108 else
3109   ac_cv_sys_long_file_names=yes
3110 # Test for long file names in all the places we know might matter:
3111 #      .                the current directory, where building will happen
3112 #      $prefix/lib      where we will be installing things
3113 #      $exec_prefix/lib likewise
3114 # eval it to expand exec_prefix.
3115 #      $TMPDIR          if set, where it might want to write temporary files
3116 # if $TMPDIR is not set:
3117 #      /tmp             where it might want to write temporary files
3118 #      /var/tmp         likewise
3119 #      /usr/tmp         likewise
3120 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3121   ac_tmpdirs=$TMPDIR
3122 else
3123   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3124 fi
3125 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3126   test -d $ac_dir || continue
3127   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3128   ac_xdir=$ac_dir/cf$$
3129   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3130   ac_tf1=$ac_xdir/conftest9012345
3131   ac_tf2=$ac_xdir/conftest9012346
3132   (echo 1 >$ac_tf1) 2>/dev/null
3133   (echo 2 >$ac_tf2) 2>/dev/null
3134   ac_val=`cat $ac_tf1 2>/dev/null`
3135   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3136     ac_cv_sys_long_file_names=no
3137     rm -rf $ac_xdir 2>/dev/null
3138     break
3139   fi
3140   rm -rf $ac_xdir 2>/dev/null
3141 done
3142 fi
3143 echo "$as_me:3143: result: $ac_cv_sys_long_file_names" >&5
3144 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3145 if test $ac_cv_sys_long_file_names = yes; then
3146
3147 cat >>confdefs.h <<\EOF
3148 #define HAVE_LONG_FILE_NAMES 1
3149 EOF
3150
3151 fi
3152
3153 echo "$as_me:3153: checking if filesystem supports mixed-case filenames" >&5
3154 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3155 if test "${cf_cv_mixedcase+set}" = set; then
3156   echo $ECHO_N "(cached) $ECHO_C" >&6
3157 else
3158
3159 if test "$cross_compiling" = yes ; then
3160         case $target_alias in #(vi
3161         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3162                 cf_cv_mixedcase=no
3163                 ;;
3164         *)
3165                 cf_cv_mixedcase=yes
3166                 ;;
3167         esac
3168 else
3169         rm -f conftest CONFTEST
3170         echo test >conftest
3171         if test -f CONFTEST ; then
3172                 cf_cv_mixedcase=no
3173         else
3174                 cf_cv_mixedcase=yes
3175         fi
3176         rm -f conftest CONFTEST
3177 fi
3178
3179 fi
3180 echo "$as_me:3180: result: $cf_cv_mixedcase" >&5
3181 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3182 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3183 #define MIXEDCASE_FILENAMES 1
3184 EOF
3185
3186 echo "$as_me:3186: checking whether ln -s works" >&5
3187 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3188 LN_S=$as_ln_s
3189 if test "$LN_S" = "ln -s"; then
3190   echo "$as_me:3190: result: yes" >&5
3191 echo "${ECHO_T}yes" >&6
3192 else
3193   echo "$as_me:3193: result: no, using $LN_S" >&5
3194 echo "${ECHO_T}no, using $LN_S" >&6
3195 fi
3196
3197 # Extract the first word of "ctags", so it can be a program name with args.
3198 set dummy ctags; ac_word=$2
3199 echo "$as_me:3199: checking for $ac_word" >&5
3200 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3201 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3202   echo $ECHO_N "(cached) $ECHO_C" >&6
3203 else
3204   if test -n "$MAKE_LOWER_TAGS"; then
3205   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3206 else
3207   ac_save_IFS=$IFS; IFS=$ac_path_separator
3208 ac_dummy="$PATH"
3209 for ac_dir in $ac_dummy; do
3210   IFS=$ac_save_IFS
3211   test -z "$ac_dir" && ac_dir=.
3212   $as_executable_p "$ac_dir/$ac_word" || continue
3213 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3214 echo "$as_me:3214: found $ac_dir/$ac_word" >&5
3215 break
3216 done
3217
3218   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3219 fi
3220 fi
3221 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3222 if test -n "$MAKE_LOWER_TAGS"; then
3223   echo "$as_me:3223: result: $MAKE_LOWER_TAGS" >&5
3224 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3225 else
3226   echo "$as_me:3226: result: no" >&5
3227 echo "${ECHO_T}no" >&6
3228 fi
3229
3230 if test "$cf_cv_mixedcase" = yes ; then
3231         # Extract the first word of "etags", so it can be a program name with args.
3232 set dummy etags; ac_word=$2
3233 echo "$as_me:3233: checking for $ac_word" >&5
3234 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3235 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3236   echo $ECHO_N "(cached) $ECHO_C" >&6
3237 else
3238   if test -n "$MAKE_UPPER_TAGS"; then
3239   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3240 else
3241   ac_save_IFS=$IFS; IFS=$ac_path_separator
3242 ac_dummy="$PATH"
3243 for ac_dir in $ac_dummy; do
3244   IFS=$ac_save_IFS
3245   test -z "$ac_dir" && ac_dir=.
3246   $as_executable_p "$ac_dir/$ac_word" || continue
3247 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3248 echo "$as_me:3248: found $ac_dir/$ac_word" >&5
3249 break
3250 done
3251
3252   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3253 fi
3254 fi
3255 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3256 if test -n "$MAKE_UPPER_TAGS"; then
3257   echo "$as_me:3257: result: $MAKE_UPPER_TAGS" >&5
3258 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3259 else
3260   echo "$as_me:3260: result: no" >&5
3261 echo "${ECHO_T}no" >&6
3262 fi
3263
3264 else
3265         MAKE_UPPER_TAGS=no
3266 fi
3267
3268 if test "$MAKE_UPPER_TAGS" = yes ; then
3269         MAKE_UPPER_TAGS=
3270 else
3271         MAKE_UPPER_TAGS="#"
3272 fi
3273
3274 if test "$MAKE_LOWER_TAGS" = yes ; then
3275         MAKE_LOWER_TAGS=
3276 else
3277         MAKE_LOWER_TAGS="#"
3278 fi
3279
3280 for ac_prog in tdlint lint alint
3281 do
3282   # Extract the first word of "$ac_prog", so it can be a program name with args.
3283 set dummy $ac_prog; ac_word=$2
3284 echo "$as_me:3284: checking for $ac_word" >&5
3285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3286 if test "${ac_cv_prog_LINT+set}" = set; then
3287   echo $ECHO_N "(cached) $ECHO_C" >&6
3288 else
3289   if test -n "$LINT"; then
3290   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3291 else
3292   ac_save_IFS=$IFS; IFS=$ac_path_separator
3293 ac_dummy="$PATH"
3294 for ac_dir in $ac_dummy; do
3295   IFS=$ac_save_IFS
3296   test -z "$ac_dir" && ac_dir=.
3297   $as_executable_p "$ac_dir/$ac_word" || continue
3298 ac_cv_prog_LINT="$ac_prog"
3299 echo "$as_me:3299: found $ac_dir/$ac_word" >&5
3300 break
3301 done
3302
3303 fi
3304 fi
3305 LINT=$ac_cv_prog_LINT
3306 if test -n "$LINT"; then
3307   echo "$as_me:3307: result: $LINT" >&5
3308 echo "${ECHO_T}$LINT" >&6
3309 else
3310   echo "$as_me:3310: result: no" >&5
3311 echo "${ECHO_T}no" >&6
3312 fi
3313
3314   test -n "$LINT" && break
3315 done
3316
3317 for ac_prog in man man_db
3318 do
3319   # Extract the first word of "$ac_prog", so it can be a program name with args.
3320 set dummy $ac_prog; ac_word=$2
3321 echo "$as_me:3321: checking for $ac_word" >&5
3322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3323 if test "${ac_cv_prog_MAN+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326   if test -n "$MAN"; then
3327   ac_cv_prog_MAN="$MAN" # Let the user override the test.
3328 else
3329   ac_save_IFS=$IFS; IFS=$ac_path_separator
3330 ac_dummy="$PATH"
3331 for ac_dir in $ac_dummy; do
3332   IFS=$ac_save_IFS
3333   test -z "$ac_dir" && ac_dir=.
3334   $as_executable_p "$ac_dir/$ac_word" || continue
3335 ac_cv_prog_MAN="$ac_prog"
3336 echo "$as_me:3336: found $ac_dir/$ac_word" >&5
3337 break
3338 done
3339
3340 fi
3341 fi
3342 MAN=$ac_cv_prog_MAN
3343 if test -n "$MAN"; then
3344   echo "$as_me:3344: result: $MAN" >&5
3345 echo "${ECHO_T}$MAN" >&6
3346 else
3347   echo "$as_me:3347: result: no" >&5
3348 echo "${ECHO_T}no" >&6
3349 fi
3350
3351   test -n "$MAN" && break
3352 done
3353
3354 if test -n "$ac_tool_prefix"; then
3355   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3356 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3357 echo "$as_me:3357: checking for $ac_word" >&5
3358 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3359 if test "${ac_cv_prog_RANLIB+set}" = set; then
3360   echo $ECHO_N "(cached) $ECHO_C" >&6
3361 else
3362   if test -n "$RANLIB"; then
3363   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3364 else
3365   ac_save_IFS=$IFS; IFS=$ac_path_separator
3366 ac_dummy="$PATH"
3367 for ac_dir in $ac_dummy; do
3368   IFS=$ac_save_IFS
3369   test -z "$ac_dir" && ac_dir=.
3370   $as_executable_p "$ac_dir/$ac_word" || continue
3371 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3372 echo "$as_me:3372: found $ac_dir/$ac_word" >&5
3373 break
3374 done
3375
3376 fi
3377 fi
3378 RANLIB=$ac_cv_prog_RANLIB
3379 if test -n "$RANLIB"; then
3380   echo "$as_me:3380: result: $RANLIB" >&5
3381 echo "${ECHO_T}$RANLIB" >&6
3382 else
3383   echo "$as_me:3383: result: no" >&5
3384 echo "${ECHO_T}no" >&6
3385 fi
3386
3387 fi
3388 if test -z "$ac_cv_prog_RANLIB"; then
3389   ac_ct_RANLIB=$RANLIB
3390   # Extract the first word of "ranlib", so it can be a program name with args.
3391 set dummy ranlib; ac_word=$2
3392 echo "$as_me:3392: checking for $ac_word" >&5
3393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3394 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3395   echo $ECHO_N "(cached) $ECHO_C" >&6
3396 else
3397   if test -n "$ac_ct_RANLIB"; then
3398   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3399 else
3400   ac_save_IFS=$IFS; IFS=$ac_path_separator
3401 ac_dummy="$PATH"
3402 for ac_dir in $ac_dummy; do
3403   IFS=$ac_save_IFS
3404   test -z "$ac_dir" && ac_dir=.
3405   $as_executable_p "$ac_dir/$ac_word" || continue
3406 ac_cv_prog_ac_ct_RANLIB="ranlib"
3407 echo "$as_me:3407: found $ac_dir/$ac_word" >&5
3408 break
3409 done
3410
3411   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3412 fi
3413 fi
3414 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3415 if test -n "$ac_ct_RANLIB"; then
3416   echo "$as_me:3416: result: $ac_ct_RANLIB" >&5
3417 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3418 else
3419   echo "$as_me:3419: result: no" >&5
3420 echo "${ECHO_T}no" >&6
3421 fi
3422
3423   RANLIB=$ac_ct_RANLIB
3424 else
3425   RANLIB="$ac_cv_prog_RANLIB"
3426 fi
3427
3428 if test -n "$ac_tool_prefix"; then
3429   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3430 set dummy ${ac_tool_prefix}ld; ac_word=$2
3431 echo "$as_me:3431: checking for $ac_word" >&5
3432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3433 if test "${ac_cv_prog_LD+set}" = set; then
3434   echo $ECHO_N "(cached) $ECHO_C" >&6
3435 else
3436   if test -n "$LD"; then
3437   ac_cv_prog_LD="$LD" # Let the user override the test.
3438 else
3439   ac_save_IFS=$IFS; IFS=$ac_path_separator
3440 ac_dummy="$PATH"
3441 for ac_dir in $ac_dummy; do
3442   IFS=$ac_save_IFS
3443   test -z "$ac_dir" && ac_dir=.
3444   $as_executable_p "$ac_dir/$ac_word" || continue
3445 ac_cv_prog_LD="${ac_tool_prefix}ld"
3446 echo "$as_me:3446: found $ac_dir/$ac_word" >&5
3447 break
3448 done
3449
3450 fi
3451 fi
3452 LD=$ac_cv_prog_LD
3453 if test -n "$LD"; then
3454   echo "$as_me:3454: result: $LD" >&5
3455 echo "${ECHO_T}$LD" >&6
3456 else
3457   echo "$as_me:3457: result: no" >&5
3458 echo "${ECHO_T}no" >&6
3459 fi
3460
3461 fi
3462 if test -z "$ac_cv_prog_LD"; then
3463   ac_ct_LD=$LD
3464   # Extract the first word of "ld", so it can be a program name with args.
3465 set dummy ld; ac_word=$2
3466 echo "$as_me:3466: checking for $ac_word" >&5
3467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3468 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3469   echo $ECHO_N "(cached) $ECHO_C" >&6
3470 else
3471   if test -n "$ac_ct_LD"; then
3472   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3473 else
3474   ac_save_IFS=$IFS; IFS=$ac_path_separator
3475 ac_dummy="$PATH"
3476 for ac_dir in $ac_dummy; do
3477   IFS=$ac_save_IFS
3478   test -z "$ac_dir" && ac_dir=.
3479   $as_executable_p "$ac_dir/$ac_word" || continue
3480 ac_cv_prog_ac_ct_LD="ld"
3481 echo "$as_me:3481: found $ac_dir/$ac_word" >&5
3482 break
3483 done
3484
3485   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3486 fi
3487 fi
3488 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3489 if test -n "$ac_ct_LD"; then
3490   echo "$as_me:3490: result: $ac_ct_LD" >&5
3491 echo "${ECHO_T}$ac_ct_LD" >&6
3492 else
3493   echo "$as_me:3493: result: no" >&5
3494 echo "${ECHO_T}no" >&6
3495 fi
3496
3497   LD=$ac_ct_LD
3498 else
3499   LD="$ac_cv_prog_LD"
3500 fi
3501
3502 if test -n "$ac_tool_prefix"; then
3503   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3504 set dummy ${ac_tool_prefix}ar; ac_word=$2
3505 echo "$as_me:3505: checking for $ac_word" >&5
3506 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3507 if test "${ac_cv_prog_AR+set}" = set; then
3508   echo $ECHO_N "(cached) $ECHO_C" >&6
3509 else
3510   if test -n "$AR"; then
3511   ac_cv_prog_AR="$AR" # Let the user override the test.
3512 else
3513   ac_save_IFS=$IFS; IFS=$ac_path_separator
3514 ac_dummy="$PATH"
3515 for ac_dir in $ac_dummy; do
3516   IFS=$ac_save_IFS
3517   test -z "$ac_dir" && ac_dir=.
3518   $as_executable_p "$ac_dir/$ac_word" || continue
3519 ac_cv_prog_AR="${ac_tool_prefix}ar"
3520 echo "$as_me:3520: found $ac_dir/$ac_word" >&5
3521 break
3522 done
3523
3524 fi
3525 fi
3526 AR=$ac_cv_prog_AR
3527 if test -n "$AR"; then
3528   echo "$as_me:3528: result: $AR" >&5
3529 echo "${ECHO_T}$AR" >&6
3530 else
3531   echo "$as_me:3531: result: no" >&5
3532 echo "${ECHO_T}no" >&6
3533 fi
3534
3535 fi
3536 if test -z "$ac_cv_prog_AR"; then
3537   ac_ct_AR=$AR
3538   # Extract the first word of "ar", so it can be a program name with args.
3539 set dummy ar; ac_word=$2
3540 echo "$as_me:3540: checking for $ac_word" >&5
3541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3542 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3543   echo $ECHO_N "(cached) $ECHO_C" >&6
3544 else
3545   if test -n "$ac_ct_AR"; then
3546   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3547 else
3548   ac_save_IFS=$IFS; IFS=$ac_path_separator
3549 ac_dummy="$PATH"
3550 for ac_dir in $ac_dummy; do
3551   IFS=$ac_save_IFS
3552   test -z "$ac_dir" && ac_dir=.
3553   $as_executable_p "$ac_dir/$ac_word" || continue
3554 ac_cv_prog_ac_ct_AR="ar"
3555 echo "$as_me:3555: found $ac_dir/$ac_word" >&5
3556 break
3557 done
3558
3559   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3560 fi
3561 fi
3562 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3563 if test -n "$ac_ct_AR"; then
3564   echo "$as_me:3564: result: $ac_ct_AR" >&5
3565 echo "${ECHO_T}$ac_ct_AR" >&6
3566 else
3567   echo "$as_me:3567: result: no" >&5
3568 echo "${ECHO_T}no" >&6
3569 fi
3570
3571   AR=$ac_ct_AR
3572 else
3573   AR="$ac_cv_prog_AR"
3574 fi
3575
3576 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3577   echo $ECHO_N "(cached) $ECHO_C" >&6
3578 else
3579
3580 echo "$as_me:3580: checking for archiver options (symbol AR_OPTS)" >&5
3581 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3582 test -z "$AR_OPTS" && AR_OPTS=rv
3583 echo "$as_me:3583: result: $AR_OPTS" >&5
3584 echo "${ECHO_T}$AR_OPTS" >&6
3585
3586 cf_cv_subst_AR_OPTS=$AR_OPTS
3587 fi
3588
3589 AR_OPTS=${cf_cv_subst_AR_OPTS}
3590
3591 echo "$as_me:3591: checking for makeflags variable" >&5
3592 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3593 if test "${cf_cv_makeflags+set}" = set; then
3594   echo $ECHO_N "(cached) $ECHO_C" >&6
3595 else
3596
3597         cf_cv_makeflags=''
3598         for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
3599         do
3600                 cat >cf_makeflags.tmp <<CF_EOF
3601 SHELL = /bin/sh
3602 all :
3603         @ echo '.$cf_option'
3604 CF_EOF
3605                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
3606                 case "$cf_result" in
3607                 .*k)
3608                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3609                         case "$cf_result" in
3610                         .*CC=*) cf_cv_makeflags=
3611                                 ;;
3612                         *)      cf_cv_makeflags=$cf_option
3613                                 ;;
3614                         esac
3615                         break
3616                         ;;
3617                 *)      echo no match "$cf_result"
3618                         ;;
3619                 esac
3620         done
3621         rm -f cf_makeflags.tmp
3622
3623 fi
3624 echo "$as_me:3624: result: $cf_cv_makeflags" >&5
3625 echo "${ECHO_T}$cf_cv_makeflags" >&6
3626
3627 echo "$as_me:3627: checking if you have specified an install-prefix" >&5
3628 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3629
3630 # Check whether --with-install-prefix or --without-install-prefix was given.
3631 if test "${with_install_prefix+set}" = set; then
3632   withval="$with_install_prefix"
3633   case "$withval" in #(vi
3634         yes|no) #(vi
3635                 ;;
3636         *)      DESTDIR="$withval"
3637                 ;;
3638         esac
3639 fi;
3640 echo "$as_me:3640: result: $DESTDIR" >&5
3641 echo "${ECHO_T}$DESTDIR" >&6
3642
3643 ###############################################################################
3644
3645 # If we're cross-compiling, allow the user to override the tools and their
3646 # options.  The configure script is oriented toward identifying the host
3647 # compiler, etc., but we need a build compiler to generate parts of the source.
3648 : ${BUILD_CC:='$(CC)'}
3649 : ${BUILD_CFLAGS:='$(CFLAGS)'}
3650 : ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}
3651 : ${BUILD_LDFLAGS:='$(LDFLAGS)'}
3652 : ${BUILD_LIBS:='$(LIBS)'}
3653 : ${BUILD_EXEEXT:='$x'}
3654 if test "$cross_compiling" = yes ; then
3655
3656 # Check whether --with-build-cc or --without-build-cc was given.
3657 if test "${with_build_cc+set}" = set; then
3658   withval="$with_build_cc"
3659   BUILD_CC="$withval"
3660 else
3661   for ac_prog in $CC gcc cc
3662 do
3663   # Extract the first word of "$ac_prog", so it can be a program name with args.
3664 set dummy $ac_prog; ac_word=$2
3665 echo "$as_me:3665: checking for $ac_word" >&5
3666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3667 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3668   echo $ECHO_N "(cached) $ECHO_C" >&6
3669 else
3670   if test -n "$BUILD_CC"; then
3671   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3672 else
3673   ac_save_IFS=$IFS; IFS=$ac_path_separator
3674 ac_dummy="$PATH"
3675 for ac_dir in $ac_dummy; do
3676   IFS=$ac_save_IFS
3677   test -z "$ac_dir" && ac_dir=.
3678   $as_executable_p "$ac_dir/$ac_word" || continue
3679 ac_cv_prog_BUILD_CC="$ac_prog"
3680 echo "$as_me:3680: found $ac_dir/$ac_word" >&5
3681 break
3682 done
3683
3684 fi
3685 fi
3686 BUILD_CC=$ac_cv_prog_BUILD_CC
3687 if test -n "$BUILD_CC"; then
3688   echo "$as_me:3688: result: $BUILD_CC" >&5
3689 echo "${ECHO_T}$BUILD_CC" >&6
3690 else
3691   echo "$as_me:3691: result: no" >&5
3692 echo "${ECHO_T}no" >&6
3693 fi
3694
3695   test -n "$BUILD_CC" && break
3696 done
3697
3698 fi;
3699
3700 # Check whether --with-build-cflags or --without-build-cflags was given.
3701 if test "${with_build_cflags+set}" = set; then
3702   withval="$with_build_cflags"
3703   BUILD_CFLAGS="$withval"
3704 fi;
3705
3706 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3707 if test "${with_build_cppflags+set}" = set; then
3708   withval="$with_build_cppflags"
3709   BUILD_CPPFLAGS="$withval"
3710 fi;
3711
3712 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3713 if test "${with_build_ldflags+set}" = set; then
3714   withval="$with_build_ldflags"
3715   BUILD_LDFLAGS="$withval"
3716 fi;
3717
3718 # Check whether --with-build-libs or --without-build-libs was given.
3719 if test "${with_build_libs+set}" = set; then
3720   withval="$with_build_libs"
3721   BUILD_LIBS="$withval"
3722 fi;
3723         BUILD_EXEEXT=
3724 fi
3725
3726 ###############################################################################
3727
3728 ### Options to allow the user to specify the set of libraries which are used.
3729 ### Use "--without-normal --with-shared" to allow the default model to be
3730 ### shared, for example.
3731 cf_list_models=""
3732
3733 LIBTOOL=
3734
3735 # common library maintenance symbols that are convenient for libtool scripts:
3736 LIB_CREATE='$(AR) -cr'
3737 LIB_OBJECT='$(OBJECTS)'
3738 LIB_SUFFIX=.a
3739 LIB_PREP="$RANLIB"
3740
3741 # symbols used to prop libtool up to enable it to determine what it should be
3742 # doing:
3743 LIB_CLEAN=
3744 LIB_COMPILE=
3745 LIB_LINK=
3746 LIB_INSTALL=
3747 LIB_UNINSTALL=
3748
3749 echo "$as_me:3749: checking if you want to build libraries with libtool" >&5
3750 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
3751
3752 # Check whether --with-libtool or --without-libtool was given.
3753 if test "${with_libtool+set}" = set; then
3754   withval="$with_libtool"
3755   with_libtool=$withval
3756 else
3757   with_libtool=no
3758 fi;
3759 echo "$as_me:3759: result: $with_libtool" >&5
3760 echo "${ECHO_T}$with_libtool" >&6
3761 if test "$with_libtool" != "no"; then
3762
3763         if test "$with_libtool" != "yes" ; then
3764
3765 case ".$with_libtool" in #(vi
3766 .\$\(*\)*|.\'*\'*) #(vi
3767   ;;
3768 ..|./*|.\\*) #(vi
3769   ;;
3770 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3771   ;;
3772 .\${*prefix}*) #(vi
3773   eval with_libtool="$with_libtool"
3774   case ".$with_libtool" in #(vi
3775   .NONE/*)
3776     with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
3777     ;;
3778   esac
3779   ;; #(vi
3780 .NONE/*)
3781   with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
3782   ;;
3783 *)
3784   { { echo "$as_me:3784: error: expected a pathname, not \"$with_libtool\"" >&5
3785 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
3786    { (exit 1); exit 1; }; }
3787   ;;
3788 esac
3789
3790                 LIBTOOL=$with_libtool
3791         else
3792                 # Extract the first word of "libtool", so it can be a program name with args.
3793 set dummy libtool; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_path_LIBTOOL+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   case $LIBTOOL in
3800   [\\/]* | ?:[\\/]*)
3801   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
3802   ;;
3803   *)
3804   ac_save_IFS=$IFS; IFS=$ac_path_separator
3805 ac_dummy="$PATH"
3806 for ac_dir in $ac_dummy; do
3807   IFS=$ac_save_IFS
3808   test -z "$ac_dir" && ac_dir=.
3809   if $as_executable_p "$ac_dir/$ac_word"; then
3810    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
3811    echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3812    break
3813 fi
3814 done
3815
3816   ;;
3817 esac
3818 fi
3819 LIBTOOL=$ac_cv_path_LIBTOOL
3820
3821 if test -n "$LIBTOOL"; then
3822   echo "$as_me:3822: result: $LIBTOOL" >&5
3823 echo "${ECHO_T}$LIBTOOL" >&6
3824 else
3825   echo "$as_me:3825: result: no" >&5
3826 echo "${ECHO_T}no" >&6
3827 fi
3828
3829         fi
3830         if test -z "$LIBTOOL" ; then
3831                 { { echo "$as_me:3831: error: Cannot find libtool" >&5
3832 echo "$as_me: error: Cannot find libtool" >&2;}
3833    { (exit 1); exit 1; }; }
3834         fi
3835         LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o'
3836         LIB_OBJECT='$(OBJECTS:.o=.lo)'
3837         LIB_SUFFIX=.la
3838         LIB_CLEAN='$(LIBTOOL) --mode=clean'
3839         LIB_COMPILE='$(LIBTOOL) --mode=compile'
3840         LIB_LINK='$(LIBTOOL) --mode=link'
3841         LIB_INSTALL='$(LIBTOOL) --mode=install'
3842         LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall'
3843         LIB_PREP=:
3844
3845         # Show the version of libtool
3846         echo "$as_me:3846: checking version of libtool" >&5
3847 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
3848
3849         # Save the version in a cache variable - this is not entirely a good
3850         # thing, but the version string from libtool is very ugly, and for
3851         # bug reports it might be useful to have the original string.
3852         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
3853         echo "$as_me:3853: result: $cf_cv_libtool_version" >&5
3854 echo "${ECHO_T}$cf_cv_libtool_version" >&6
3855         if test -z "$cf_cv_libtool_version" ; then
3856                 { { echo "$as_me:3856: error: This is not libtool" >&5
3857 echo "$as_me: error: This is not libtool" >&2;}
3858    { (exit 1); exit 1; }; }
3859         fi
3860
3861         # special hack to add --tag option for C++ compiler
3862         case $cf_cv_libtool_version in
3863         1.[5-9]*|[2-9]*)
3864                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
3865                 ;;
3866         *)
3867                 LIBTOOL_CXX="$LIBTOOL"
3868                 ;;
3869         esac
3870 else
3871         LIBTOOL=""
3872         LIBTOOL_CXX=""
3873 fi
3874
3875 test -z "$LIBTOOL" && ECHO_LT=
3876
3877 if test "$with_libtool" != "no" ; then
3878
3879 cf_list_models="$cf_list_models libtool"
3880
3881 else
3882
3883 echo "$as_me:3883: checking if you want to build shared libraries" >&5
3884 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
3885
3886 # Check whether --with-shared or --without-shared was given.
3887 if test "${with_shared+set}" = set; then
3888   withval="$with_shared"
3889   with_shared=$withval
3890 else
3891   with_shared=no
3892 fi;
3893 echo "$as_me:3893: result: $with_shared" >&5
3894 echo "${ECHO_T}$with_shared" >&6
3895 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3896
3897 echo "$as_me:3897: checking if you want to build static libraries" >&5
3898 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
3899
3900 # Check whether --with-normal or --without-normal was given.
3901 if test "${with_normal+set}" = set; then
3902   withval="$with_normal"
3903   with_normal=$withval
3904 else
3905   with_normal=yes
3906 fi;
3907 echo "$as_me:3907: result: $with_normal" >&5
3908 echo "${ECHO_T}$with_normal" >&6
3909 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
3910
3911 echo "$as_me:3911: checking if you want to build debug libraries" >&5
3912 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
3913
3914 # Check whether --with-debug or --without-debug was given.
3915 if test "${with_debug+set}" = set; then
3916   withval="$with_debug"
3917   with_debug=$withval
3918 else
3919   with_debug=yes
3920 fi;
3921 echo "$as_me:3921: result: $with_debug" >&5
3922 echo "${ECHO_T}$with_debug" >&6
3923 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
3924
3925 echo "$as_me:3925: checking if you want to build profiling libraries" >&5
3926 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
3927
3928 # Check whether --with-profile or --without-profile was given.
3929 if test "${with_profile+set}" = set; then
3930   withval="$with_profile"
3931   with_profile=$withval
3932 else
3933   with_profile=no
3934 fi;
3935 echo "$as_me:3935: result: $with_profile" >&5
3936 echo "${ECHO_T}$with_profile" >&6
3937 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
3938
3939 fi
3940
3941 ###############################################################################
3942
3943 echo "$as_me:3943: checking for specified models" >&5
3944 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3945 test -z "$cf_list_models" && cf_list_models=normal
3946 test "$with_libtool" != "no" && cf_list_models=libtool
3947 echo "$as_me:3947: result: $cf_list_models" >&5
3948 echo "${ECHO_T}$cf_list_models" >&6
3949
3950 ### Use the first model as the default, and save its suffix for use in building
3951 ### up test-applications.
3952 echo "$as_me:3952: checking for default model" >&5
3953 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3954 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3955 echo "$as_me:3955: result: $DFT_LWR_MODEL" >&5
3956 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3957
3958 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3959
3960 TINFO_NAME=tinfo
3961
3962 LIB_NAME=ncurses
3963
3964 LIB_DIR=../lib
3965
3966         case $cf_cv_system_name in
3967         OS/2*)  LIB_PREFIX=''     ;;
3968         os2*)   LIB_PREFIX=''     ;;
3969         *)      LIB_PREFIX='lib'  ;;
3970         esac
3971 cf_prefix=$LIB_PREFIX
3972
3973 LIB_PREFIX=$cf_prefix
3974
3975 LIB_SUFFIX=
3976
3977 ###############################################################################
3978
3979 echo "$as_me:3979: checking if you want to build a separate terminfo library" >&5
3980 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
3981
3982 # Check whether --with-termlib or --without-termlib was given.
3983 if test "${with_termlib+set}" = set; then
3984   withval="$with_termlib"
3985   with_termlib=$withval
3986 else
3987   with_termlib=no
3988 fi;
3989 echo "$as_me:3989: result: $with_termlib" >&5
3990 echo "${ECHO_T}$with_termlib" >&6
3991
3992 ### Checks for special libraries, must be done up-front.
3993
3994 echo "$as_me:3994: checking if you want to link with dbmalloc for testing" >&5
3995 echo $ECHO_N "checking if you want to link with dbmalloc for testing... $ECHO_C" >&6
3996
3997 # Check whether --with-dbmalloc or --without-dbmalloc was given.
3998 if test "${with_dbmalloc+set}" = set; then
3999   withval="$with_dbmalloc"
4000   with_dbmalloc=$withval
4001 else
4002   with_dbmalloc=no
4003 fi;
4004 echo "$as_me:4004: result: $with_dbmalloc" >&5
4005 echo "${ECHO_T}$with_dbmalloc" >&6
4006 if test $with_dbmalloc = yes ; then
4007
4008 echo "$as_me:4008: checking for debug_malloc in -ldbmalloc" >&5
4009 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4010 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4011   echo $ECHO_N "(cached) $ECHO_C" >&6
4012 else
4013   ac_check_lib_save_LIBS=$LIBS
4014 LIBS="-ldbmalloc  $LIBS"
4015 cat >conftest.$ac_ext <<_ACEOF
4016 #line 4016 "configure"
4017 #include "confdefs.h"
4018
4019 /* Override any gcc2 internal prototype to avoid an error.  */
4020 #ifdef __cplusplus
4021 extern "C"
4022 #endif
4023 /* We use char because int might match the return type of a gcc2
4024    builtin and then its argument prototype would still apply.  */
4025 char debug_malloc ();
4026 int
4027 main ()
4028 {
4029 debug_malloc ();
4030   ;
4031   return 0;
4032 }
4033 _ACEOF
4034 rm -f conftest.$ac_objext conftest$ac_exeext
4035 if { (eval echo "$as_me:4035: \"$ac_link\"") >&5
4036   (eval $ac_link) 2>&5
4037   ac_status=$?
4038   echo "$as_me:4038: \$? = $ac_status" >&5
4039   (exit $ac_status); } &&
4040          { ac_try='test -s conftest$ac_exeext'
4041   { (eval echo "$as_me:4041: \"$ac_try\"") >&5
4042   (eval $ac_try) 2>&5
4043   ac_status=$?
4044   echo "$as_me:4044: \$? = $ac_status" >&5
4045   (exit $ac_status); }; }; then
4046   ac_cv_lib_dbmalloc_debug_malloc=yes
4047 else
4048   echo "$as_me: failed program was:" >&5
4049 cat conftest.$ac_ext >&5
4050 ac_cv_lib_dbmalloc_debug_malloc=no
4051 fi
4052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4053 LIBS=$ac_check_lib_save_LIBS
4054 fi
4055 echo "$as_me:4055: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4056 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4057 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4058   cat >>confdefs.h <<EOF
4059 #define HAVE_LIBDBMALLOC 1
4060 EOF
4061
4062   LIBS="-ldbmalloc $LIBS"
4063
4064 fi
4065
4066 fi
4067
4068 echo "$as_me:4068: checking if you want to link with dmalloc for testing" >&5
4069 echo $ECHO_N "checking if you want to link with dmalloc for testing... $ECHO_C" >&6
4070
4071 # Check whether --with-dmalloc or --without-dmalloc was given.
4072 if test "${with_dmalloc+set}" = set; then
4073   withval="$with_dmalloc"
4074   with_dmalloc=$withval
4075 else
4076   with_dmalloc=no
4077 fi;
4078 echo "$as_me:4078: result: $with_dmalloc" >&5
4079 echo "${ECHO_T}$with_dmalloc" >&6
4080 if test $with_dmalloc = yes ; then
4081
4082 echo "$as_me:4082: checking for dmalloc_debug in -ldmalloc" >&5
4083 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4084 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4085   echo $ECHO_N "(cached) $ECHO_C" >&6
4086 else
4087   ac_check_lib_save_LIBS=$LIBS
4088 LIBS="-ldmalloc  $LIBS"
4089 cat >conftest.$ac_ext <<_ACEOF
4090 #line 4090 "configure"
4091 #include "confdefs.h"
4092
4093 /* Override any gcc2 internal prototype to avoid an error.  */
4094 #ifdef __cplusplus
4095 extern "C"
4096 #endif
4097 /* We use char because int might match the return type of a gcc2
4098    builtin and then its argument prototype would still apply.  */
4099 char dmalloc_debug ();
4100 int
4101 main ()
4102 {
4103 dmalloc_debug ();
4104   ;
4105   return 0;
4106 }
4107 _ACEOF
4108 rm -f conftest.$ac_objext conftest$ac_exeext
4109 if { (eval echo "$as_me:4109: \"$ac_link\"") >&5
4110   (eval $ac_link) 2>&5
4111   ac_status=$?
4112   echo "$as_me:4112: \$? = $ac_status" >&5
4113   (exit $ac_status); } &&
4114          { ac_try='test -s conftest$ac_exeext'
4115   { (eval echo "$as_me:4115: \"$ac_try\"") >&5
4116   (eval $ac_try) 2>&5
4117   ac_status=$?
4118   echo "$as_me:4118: \$? = $ac_status" >&5
4119   (exit $ac_status); }; }; then
4120   ac_cv_lib_dmalloc_dmalloc_debug=yes
4121 else
4122   echo "$as_me: failed program was:" >&5
4123 cat conftest.$ac_ext >&5
4124 ac_cv_lib_dmalloc_dmalloc_debug=no
4125 fi
4126 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4127 LIBS=$ac_check_lib_save_LIBS
4128 fi
4129 echo "$as_me:4129: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4130 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4131 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4132   cat >>confdefs.h <<EOF
4133 #define HAVE_LIBDMALLOC 1
4134 EOF
4135
4136   LIBS="-ldmalloc $LIBS"
4137
4138 fi
4139
4140 fi
4141
4142 SHLIB_LIST=""
4143 echo "$as_me:4143: checking if you want to link with the gpm mouse library" >&5
4144 echo $ECHO_N "checking if you want to link with the gpm mouse library... $ECHO_C" >&6
4145
4146 # Check whether --with-gpm or --without-gpm was given.
4147 if test "${with_gpm+set}" = set; then
4148   withval="$with_gpm"
4149   with_gpm=$withval
4150 else
4151   with_gpm=no
4152 fi;
4153 echo "$as_me:4153: result: $with_gpm" >&5
4154 echo "${ECHO_T}$with_gpm" >&6
4155 if test "$with_gpm" = yes ; then
4156         echo "$as_me:4156: checking for Gpm_Open in -lgpm" >&5
4157 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4158 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4159   echo $ECHO_N "(cached) $ECHO_C" >&6
4160 else
4161   ac_check_lib_save_LIBS=$LIBS
4162 LIBS="-lgpm  $LIBS"
4163 cat >conftest.$ac_ext <<_ACEOF
4164 #line 4164 "configure"
4165 #include "confdefs.h"
4166
4167 /* Override any gcc2 internal prototype to avoid an error.  */
4168 #ifdef __cplusplus
4169 extern "C"
4170 #endif
4171 /* We use char because int might match the return type of a gcc2
4172    builtin and then its argument prototype would still apply.  */
4173 char Gpm_Open ();
4174 int
4175 main ()
4176 {
4177 Gpm_Open ();
4178   ;
4179   return 0;
4180 }
4181 _ACEOF
4182 rm -f conftest.$ac_objext conftest$ac_exeext
4183 if { (eval echo "$as_me:4183: \"$ac_link\"") >&5
4184   (eval $ac_link) 2>&5
4185   ac_status=$?
4186   echo "$as_me:4186: \$? = $ac_status" >&5
4187   (exit $ac_status); } &&
4188          { ac_try='test -s conftest$ac_exeext'
4189   { (eval echo "$as_me:4189: \"$ac_try\"") >&5
4190   (eval $ac_try) 2>&5
4191   ac_status=$?
4192   echo "$as_me:4192: \$? = $ac_status" >&5
4193   (exit $ac_status); }; }; then
4194   ac_cv_lib_gpm_Gpm_Open=yes
4195 else
4196   echo "$as_me: failed program was:" >&5
4197 cat conftest.$ac_ext >&5
4198 ac_cv_lib_gpm_Gpm_Open=no
4199 fi
4200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4201 LIBS=$ac_check_lib_save_LIBS
4202 fi
4203 echo "$as_me:4203: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4204 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4205 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4206
4207                 EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
4208                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4209                 cat >>confdefs.h <<\EOF
4210 #define HAVE_LIBGPM 1
4211 EOF
4212
4213 for ac_header in gpm.h
4214 do
4215 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4216 echo "$as_me:4216: checking for $ac_header" >&5
4217 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4218 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4219   echo $ECHO_N "(cached) $ECHO_C" >&6
4220 else
4221   cat >conftest.$ac_ext <<_ACEOF
4222 #line 4222 "configure"
4223 #include "confdefs.h"
4224 #include <$ac_header>
4225 _ACEOF
4226 if { (eval echo "$as_me:4226: \"$ac_cpp conftest.$ac_ext\"") >&5
4227   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4228   ac_status=$?
4229   egrep -v '^ *\+' conftest.er1 >conftest.err
4230   rm -f conftest.er1
4231   cat conftest.err >&5
4232   echo "$as_me:4232: \$? = $ac_status" >&5
4233   (exit $ac_status); } >/dev/null; then
4234   if test -s conftest.err; then
4235     ac_cpp_err=$ac_c_preproc_warn_flag
4236   else
4237     ac_cpp_err=
4238   fi
4239 else
4240   ac_cpp_err=yes
4241 fi
4242 if test -z "$ac_cpp_err"; then
4243   eval "$as_ac_Header=yes"
4244 else
4245   echo "$as_me: failed program was:" >&5
4246   cat conftest.$ac_ext >&5
4247   eval "$as_ac_Header=no"
4248 fi
4249 rm -f conftest.err conftest.$ac_ext
4250 fi
4251 echo "$as_me:4251: result: `eval echo '${'$as_ac_Header'}'`" >&5
4252 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4253 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4254   cat >>confdefs.h <<EOF
4255 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4256 EOF
4257
4258 fi
4259 done
4260
4261 else
4262   { echo "$as_me:4262: WARNING: Cannot link with gpm library - read the FAQ" >&5
4263 echo "$as_me: WARNING: Cannot link with gpm library - read the FAQ" >&2;}
4264 fi
4265
4266 fi
4267
4268 # not everyone has "test -c"
4269 if test -c /dev/sysmouse 2>/dev/null ; then
4270 echo "$as_me:4270: checking if you want to use sysmouse" >&5
4271 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4272
4273 # Check whether --with-sysmouse or --without-sysmouse was given.
4274 if test "${with_sysmouse+set}" = set; then
4275   withval="$with_sysmouse"
4276   cf_with_sysmouse=$withval
4277 else
4278   cf_with_sysmouse=maybe
4279 fi;
4280         if test "$cf_with_sysmouse" != no ; then
4281         cat >conftest.$ac_ext <<_ACEOF
4282 #line 4282 "configure"
4283 #include "confdefs.h"
4284
4285 #include <osreldate.h>
4286 #if (__FreeBSD_version >= 400017)
4287 #include <sys/consio.h>
4288 #include <sys/fbio.h>
4289 #else
4290 #include <machine/console.h>
4291 #endif
4292
4293 int
4294 main ()
4295 {
4296
4297         struct mouse_info the_mouse;
4298         ioctl(0, CONS_MOUSECTL, &the_mouse);
4299
4300   ;
4301   return 0;
4302 }
4303 _ACEOF
4304 rm -f conftest.$ac_objext
4305 if { (eval echo "$as_me:4305: \"$ac_compile\"") >&5
4306   (eval $ac_compile) 2>&5
4307   ac_status=$?
4308   echo "$as_me:4308: \$? = $ac_status" >&5
4309   (exit $ac_status); } &&
4310          { ac_try='test -s conftest.$ac_objext'
4311   { (eval echo "$as_me:4311: \"$ac_try\"") >&5
4312   (eval $ac_try) 2>&5
4313   ac_status=$?
4314   echo "$as_me:4314: \$? = $ac_status" >&5
4315   (exit $ac_status); }; }; then
4316   cf_with_sysmouse=yes
4317 else
4318   echo "$as_me: failed program was:" >&5
4319 cat conftest.$ac_ext >&5
4320 cf_with_sysmouse=no
4321 fi
4322 rm -f conftest.$ac_objext conftest.$ac_ext
4323         fi
4324 echo "$as_me:4324: result: $cf_with_sysmouse" >&5
4325 echo "${ECHO_T}$cf_with_sysmouse" >&6
4326 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4327 #define USE_SYSMOUSE 1
4328 EOF
4329
4330 fi
4331
4332 if test X"$CC_G_OPT" = X"" ; then
4333         CC_G_OPT='-g'
4334         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4335 fi
4336
4337 if test X"$CXX_G_OPT" = X"" ; then
4338         CXX_G_OPT='-g'
4339         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4340 fi
4341
4342 echo "$as_me:4342: checking for default loader flags" >&5
4343 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4344 case $DFT_LWR_MODEL in
4345 libtool) LD_MODEL=''   ;;
4346 normal)  LD_MODEL=''   ;;
4347 debug)   LD_MODEL=$CC_G_OPT ;;
4348 profile) LD_MODEL='-pg';;
4349 shared)  LD_MODEL=''   ;;
4350 esac
4351 echo "$as_me:4351: result: $LD_MODEL" >&5
4352 echo "${ECHO_T}$LD_MODEL" >&6
4353
4354 echo "$as_me:4354: checking if rpath option should be used" >&5
4355 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4356
4357 # Check whether --enable-rpath or --disable-rpath was given.
4358 if test "${enable_rpath+set}" = set; then
4359   enableval="$enable_rpath"
4360   cf_cv_ld_rpath=$enableval
4361 else
4362   cf_cv_ld_rpath=no
4363 fi;
4364 echo "$as_me:4364: result: $cf_cv_ld_rpath" >&5
4365 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4366
4367         LOCAL_LDFLAGS=
4368         LOCAL_LDFLAGS2=
4369         LD_SHARED_OPTS=
4370         INSTALL_LIB="-m 644"
4371
4372         cf_cv_do_symlinks=no
4373
4374         echo "$as_me:4374: checking if release/abi version should be used for shared libs" >&5
4375 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4376
4377 # Check whether --with-shlib-version or --without-shlib-version was given.
4378 if test "${with_shlib_version+set}" = set; then
4379   withval="$with_shlib_version"
4380   test -z "$withval" && withval=auto
4381         case $withval in #(vi
4382         yes) #(vi
4383                 cf_cv_shlib_version=auto
4384                 ;;
4385         rel|abi|auto|no) #(vi
4386                 cf_cv_shlib_version=$withval
4387                 ;;
4388         *)
4389                 { { echo "$as_me:4389: error: option value must be one of: rel, abi, auto or no" >&5
4390 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4391    { (exit 1); exit 1; }; }
4392                 ;;
4393         esac
4394
4395 else
4396   cf_cv_shlib_version=auto
4397 fi;
4398         echo "$as_me:4398: result: $cf_cv_shlib_version" >&5
4399 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4400
4401         cf_cv_rm_so_locs=no
4402
4403         # Some less-capable ports of gcc support only -fpic
4404         CC_SHARED_OPTS=
4405         if test "$GCC" = yes
4406         then
4407                 echo "$as_me:4407: checking which $CC option to use" >&5
4408 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4409                 cf_save_CFLAGS="$CFLAGS"
4410                 for CC_SHARED_OPTS in -fPIC -fpic ''
4411                 do
4412                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4413                         cat >conftest.$ac_ext <<_ACEOF
4414 #line 4414 "configure"
4415 #include "confdefs.h"
4416 #include <stdio.h>
4417 int
4418 main ()
4419 {
4420 int x = 1
4421   ;
4422   return 0;
4423 }
4424 _ACEOF
4425 rm -f conftest.$ac_objext
4426 if { (eval echo "$as_me:4426: \"$ac_compile\"") >&5
4427   (eval $ac_compile) 2>&5
4428   ac_status=$?
4429   echo "$as_me:4429: \$? = $ac_status" >&5
4430   (exit $ac_status); } &&
4431          { ac_try='test -s conftest.$ac_objext'
4432   { (eval echo "$as_me:4432: \"$ac_try\"") >&5
4433   (eval $ac_try) 2>&5
4434   ac_status=$?
4435   echo "$as_me:4435: \$? = $ac_status" >&5
4436   (exit $ac_status); }; }; then
4437   break
4438 else
4439   echo "$as_me: failed program was:" >&5
4440 cat conftest.$ac_ext >&5
4441 fi
4442 rm -f conftest.$ac_objext conftest.$ac_ext
4443                 done
4444                 echo "$as_me:4444: result: $CC_SHARED_OPTS" >&5
4445 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4446                 CFLAGS="$cf_save_CFLAGS"
4447         fi
4448
4449         cf_cv_shlib_version_infix=no
4450
4451         case $cf_cv_system_name in
4452         beos*)
4453                 MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4454                 ;;
4455         cygwin*)
4456                 CC_SHARED_OPTS=
4457                 MK_SHARED_LIB='$(CC) -shared -Wl,--out-implib=$(IMPORT_LIB) -Wl,--export-all-symbols -o $(SHARED_LIB)'
4458                 cf_cv_shlib_version=cygdll
4459                 cf_cv_shlib_version_infix=cygdll
4460                 ;;
4461         darwin*)
4462                 EXTRA_CFLAGS="-no-cpp-precomp"
4463                 CC_SHARED_OPTS="-dynamic"
4464                 MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
4465                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4466                 cf_cv_shlib_version_infix=yes
4467                 ;;
4468         hpux*)
4469                 # (tested with gcc 2.7.2 -- I don't have c89)
4470                 if test "$GCC" = yes; then
4471                         LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
4472                 else
4473                         CC_SHARED_OPTS='+Z'
4474                         LD_SHARED_OPTS='-Wl,+b,$(libdir)'
4475                 fi
4476                 MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@'
4477                 # HP-UX shared libraries must be executable, and should be
4478                 # readonly to exploit a quirk in the memory manager.
4479                 INSTALL_LIB="-m 555"
4480                 ;;
4481         irix*)
4482                 if test "$cf_cv_ld_rpath" = yes ; then
4483                         cf_ld_rpath_opt="-Wl,-rpath,"
4484                         EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
4485                 fi
4486                 # tested with IRIX 5.2 and 'cc'.
4487                 if test "$GCC" != yes; then
4488                         CC_SHARED_OPTS='-KPIC'
4489                 fi
4490                 MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
4491                 cf_cv_rm_so_locs=yes
4492                 ;;
4493         linux*|gnu*|k*bsd*-gnu)
4494                 if test "$DFT_LWR_MODEL" = "shared" ; then
4495                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
4496                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
4497                 fi
4498                 if test "$cf_cv_ld_rpath" = yes ; then
4499                         cf_ld_rpath_opt="-Wl,-rpath,"
4500                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
4501                 fi
4502                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4503                 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
4504                 ;;
4505         openbsd2*)
4506                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4507                 MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
4508                 ;;
4509         freebsd[45]*)
4510                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4511                 MK_SHARED_LIB='$(LD) -Bshareable -soname=`basename $@` -o $@'
4512                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4513
4514 # This doesn't work - I keep getting spurious references to needing
4515 # libncurses.so.5.3 when ldd says it's resolved.  LOCAL_LDFLAGS2 seems to be
4516 # no longer used anyway.  And the rpath logic isn't relative - so I have to
4517 # add the local and install lib-directories:
4518 #
4519 #               if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
4520 #                       LOCAL_LDFLAGS="-rpath `pwd`/lib"
4521 #                       LOCAL_LDFLAGS2="-rpath \$(libdir) $LOCAL_LDFLAGS"
4522 #                       cf_ld_rpath_opt="-rpath "
4523 #                       EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
4524 #               fi
4525                 ;;
4526         openbsd*|freebsd*)
4527                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4528                 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
4529                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4530                 ;;
4531         netbsd*)
4532                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4533                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
4534                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
4535                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
4536                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
4537                         EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
4538                         MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
4539                         if test "$cf_cv_shlib_version" = auto; then
4540                         if test ! -f /usr/libexec/ld.elf_so; then
4541                                 cf_cv_shlib_version=rel
4542                         fi
4543                         fi
4544                 else
4545                         MK_SHARED_LIB='$(LD) -Bshareable -o $@'
4546                 fi
4547                 ;;
4548         osf*|mls+*)
4549                 # tested with OSF/1 V3.2 and 'cc'
4550                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
4551                 # link with shared libs).
4552                 MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
4553                 case $host_os in
4554                 osf4*)
4555                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
4556                         ;;
4557                 esac
4558                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
4559                 if test "$DFT_LWR_MODEL" = "shared" ; then
4560                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
4561                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
4562                 fi
4563                 if test "$cf_cv_ld_rpath" = yes ; then
4564                         cf_ld_rpath_opt="-rpath"
4565                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
4566                 fi
4567                 cf_cv_rm_so_locs=yes
4568                 ;;
4569         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
4570                 # tested with osr5.0.5
4571                 if test "$GCC" != yes; then
4572                         CC_SHARED_OPTS='-belf -KPIC'
4573                 fi
4574                 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
4575                 if test "$cf_cv_ld_rpath" = yes ; then
4576                         # only way is to set LD_RUN_PATH but no switch for it
4577                         RUN_PATH=$libdir
4578                 fi
4579                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4580                 LINK_PROGS='LD_RUN_PATH=$(libdir)'
4581                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
4582                 ;;
4583         sunos4*)
4584                 # tested with SunOS 4.1.1 and gcc 2.7.0
4585                 if test "$GCC" != yes; then
4586                         CC_SHARED_OPTS='-KPIC'
4587                 fi
4588                 MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
4589                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4590                 ;;
4591         solaris2*)
4592                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
4593                 if test "$GCC" != yes; then
4594                         CC_SHARED_OPTS='-KPIC'
4595                 fi
4596                 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
4597                 if test "$DFT_LWR_MODEL" = "shared" ; then
4598                         LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
4599                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
4600                 fi
4601                 if test "$cf_cv_ld_rpath" = yes ; then
4602                         cf_ld_rpath_opt="-R"
4603                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
4604                 fi
4605                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4606                 ;;
4607         sysv5uw7*|unix_sv*)
4608                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
4609                 if test "$GCC" != yes; then
4610                         CC_SHARED_OPTS='-KPIC'
4611                 fi
4612                 MK_SHARED_LIB='$(LD) -d y -G -o $@'
4613                 ;;
4614         *)
4615                 CC_SHARED_OPTS='unknown'
4616                 MK_SHARED_LIB='echo unknown'
4617                 ;;
4618         esac
4619
4620         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
4621         case "$cf_cv_shlib_version" in #(vi
4622         rel|abi)
4623                 case "$MK_SHARED_LIB" in #(vi
4624                 *'-o $@')
4625                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
4626                         ;;
4627                 *)
4628                         { echo "$as_me:4628: WARNING: ignored --with-shlib-version" >&5
4629 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
4630                         ;;
4631                 esac
4632                 ;;
4633         esac
4634
4635         if test -n "$cf_ld_rpath_opt" ; then
4636                 echo "$as_me:4636: checking if we need a space after rpath option" >&5
4637 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
4638                 cf_save_LIBS="$LIBS"
4639                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
4640                 cat >conftest.$ac_ext <<_ACEOF
4641 #line 4641 "configure"
4642 #include "confdefs.h"
4643
4644 int
4645 main ()
4646 {
4647
4648   ;
4649   return 0;
4650 }
4651 _ACEOF
4652 rm -f conftest.$ac_objext conftest$ac_exeext
4653 if { (eval echo "$as_me:4653: \"$ac_link\"") >&5
4654   (eval $ac_link) 2>&5
4655   ac_status=$?
4656   echo "$as_me:4656: \$? = $ac_status" >&5
4657   (exit $ac_status); } &&
4658          { ac_try='test -s conftest$ac_exeext'
4659   { (eval echo "$as_me:4659: \"$ac_try\"") >&5
4660   (eval $ac_try) 2>&5
4661   ac_status=$?
4662   echo "$as_me:4662: \$? = $ac_status" >&5
4663   (exit $ac_status); }; }; then
4664   cf_rpath_space=no
4665 else
4666   echo "$as_me: failed program was:" >&5
4667 cat conftest.$ac_ext >&5
4668 cf_rpath_space=yes
4669 fi
4670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4671                 LIBS="$cf_save_LIBS"
4672                 echo "$as_me:4672: result: $cf_rpath_space" >&5
4673 echo "${ECHO_T}$cf_rpath_space" >&6
4674                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
4675                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
4676         fi
4677
4678 if test "$CC_SHARED_OPTS" = "unknown"; then
4679         for model in $cf_list_models; do
4680                 if test "$model" = "shared"; then
4681                         { { echo "$as_me:4681: error: Shared libraries are not supported in this version" >&5
4682 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
4683    { (exit 1); exit 1; }; }
4684                 fi
4685         done
4686 fi
4687
4688 ###############################################################################
4689
4690 ###     use option --disable-overwrite to leave out the link to -lcurses
4691 echo "$as_me:4691: checking if you wish to install ncurses overwriting curses" >&5
4692 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
4693
4694 # Check whether --enable-overwrite or --disable-overwrite was given.
4695 if test "${enable_overwrite+set}" = set; then
4696   enableval="$enable_overwrite"
4697   with_overwrite=$enableval
4698 else
4699   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
4700 fi;
4701 echo "$as_me:4701: result: $with_overwrite" >&5
4702 echo "${ECHO_T}$with_overwrite" >&6
4703
4704 echo "$as_me:4704: checking if external terminfo-database is used" >&5
4705 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
4706
4707 # Check whether --enable-database or --disable-database was given.
4708 if test "${enable_database+set}" = set; then
4709   enableval="$enable_database"
4710   use_database=$enableval
4711 else
4712   use_database=yes
4713 fi;
4714 echo "$as_me:4714: result: $use_database" >&5
4715 echo "${ECHO_T}$use_database" >&6
4716
4717 case $host_os in #(vi
4718 os2*) #(vi
4719         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
4720         ;;
4721 *) #(vi
4722         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
4723         ;;
4724 esac
4725
4726         case $cf_cv_system_name in
4727         os2*)   PATHSEP=';'  ;;
4728         *)      PATHSEP=':'  ;;
4729         esac
4730
4731 if test "$use_database" != no ; then
4732         cat >>confdefs.h <<\EOF
4733 #define USE_DATABASE 1
4734 EOF
4735
4736         echo "$as_me:4736: checking which terminfo source-file will be installed" >&5
4737 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
4738
4739 # Check whether --enable-database or --disable-database was given.
4740 if test "${enable_database+set}" = set; then
4741   enableval="$enable_database"
4742   TERMINFO_SRC=$withval
4743 fi;
4744         echo "$as_me:4744: result: $TERMINFO_SRC" >&5
4745 echo "${ECHO_T}$TERMINFO_SRC" >&6
4746 fi
4747
4748 echo "$as_me:4748: checking for list of fallback descriptions" >&5
4749 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
4750
4751 # Check whether --with-fallbacks or --without-fallbacks was given.
4752 if test "${with_fallbacks+set}" = set; then
4753   withval="$with_fallbacks"
4754   with_fallback=$withval
4755 else
4756   with_fallback=
4757 fi;
4758 echo "$as_me:4758: result: $with_fallback" >&5
4759 echo "${ECHO_T}$with_fallback" >&6
4760 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
4761
4762 MAKE_TERMINFO=
4763 if test "$use_database" = no ; then
4764         TERMINFO="${datadir}/terminfo"
4765         MAKE_TERMINFO="#"
4766 else
4767
4768 echo "$as_me:4768: checking for list of terminfo directories" >&5
4769 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
4770
4771 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
4772 if test "${with_terminfo_dirs+set}" = set; then
4773   withval="$with_terminfo_dirs"
4774
4775 else
4776   withval=${TERMINFO_DIRS-${datadir}/terminfo}
4777 fi;
4778 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
4779 cf_dst_path=
4780 for cf_src_path in $withval
4781 do
4782
4783 case ".$cf_src_path" in #(vi
4784 .\$\(*\)*|.\'*\'*) #(vi
4785   ;;
4786 ..|./*|.\\*) #(vi
4787   ;;
4788 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4789   ;;
4790 .\${*prefix}*) #(vi
4791   eval cf_src_path="$cf_src_path"
4792   case ".$cf_src_path" in #(vi
4793   .NONE/*)
4794     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
4795     ;;
4796   esac
4797   ;; #(vi
4798 .NONE/*)
4799   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
4800   ;;
4801 *)
4802   { { echo "$as_me:4802: error: expected a pathname, not \"$cf_src_path\"" >&5
4803 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
4804    { (exit 1); exit 1; }; }
4805   ;;
4806 esac
4807
4808   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
4809   cf_dst_path="${cf_dst_path}${cf_src_path}"
4810 done
4811 IFS="$ac_save_ifs"
4812
4813 eval 'TERMINFO_DIRS="$cf_dst_path"'
4814
4815 echo "$as_me:4815: result: $TERMINFO_DIRS" >&5
4816 echo "${ECHO_T}$TERMINFO_DIRS" >&6
4817 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
4818 #define TERMINFO_DIRS "$TERMINFO_DIRS"
4819 EOF
4820
4821 echo "$as_me:4821: checking for default terminfo directory" >&5
4822 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
4823
4824 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
4825 if test "${with_default_terminfo_dir+set}" = set; then
4826   withval="$with_default_terminfo_dir"
4827
4828 else
4829   withval="${TERMINFO-${datadir}/terminfo}"
4830 fi;
4831 case ".$withval" in #(vi
4832 .\$\(*\)*|.\'*\'*) #(vi
4833   ;;
4834 ..|./*|.\\*) #(vi
4835   ;;
4836 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4837   ;;
4838 .\${*prefix}*) #(vi
4839   eval withval="$withval"
4840   case ".$withval" in #(vi
4841   .NONE/*)
4842     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
4843     ;;
4844   esac
4845   ;; #(vi
4846 .NONE/*)
4847   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
4848   ;;
4849 *)
4850   { { echo "$as_me:4850: error: expected a pathname, not \"$withval\"" >&5
4851 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4852    { (exit 1); exit 1; }; }
4853   ;;
4854 esac
4855
4856 eval TERMINFO="$withval"
4857
4858 echo "$as_me:4858: result: $TERMINFO" >&5
4859 echo "${ECHO_T}$TERMINFO" >&6
4860 cat >>confdefs.h <<EOF
4861 #define TERMINFO "$TERMINFO"
4862 EOF
4863
4864 fi
4865
4866 ###     use option --disable-big-core to make tic run on small machines
4867 ###     We need 4Mb, check if we can allocate 50% more than that.
4868 echo "$as_me:4868: checking if big-core option selected" >&5
4869 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
4870
4871 # Check whether --enable-big-core or --disable-big-core was given.
4872 if test "${enable_big_core+set}" = set; then
4873   enableval="$enable_big_core"
4874   with_big_core=$enableval
4875 else
4876   if test "$cross_compiling" = yes; then
4877   with_big_core=no
4878 else
4879   cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4882
4883 #include <stdlib.h>
4884 #include <string.h>
4885 int main() {
4886         unsigned long n = 6000000L;
4887         char *s = malloc(n);
4888         if (s != 0)
4889                 s[0] = s[n-1] = 0;
4890         exit(s == 0);
4891 }
4892 _ACEOF
4893 rm -f conftest$ac_exeext
4894 if { (eval echo "$as_me:4894: \"$ac_link\"") >&5
4895   (eval $ac_link) 2>&5
4896   ac_status=$?
4897   echo "$as_me:4897: \$? = $ac_status" >&5
4898   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4899   { (eval echo "$as_me:4899: \"$ac_try\"") >&5
4900   (eval $ac_try) 2>&5
4901   ac_status=$?
4902   echo "$as_me:4902: \$? = $ac_status" >&5
4903   (exit $ac_status); }; }; then
4904   with_big_core=yes
4905 else
4906   echo "$as_me: program exited with status $ac_status" >&5
4907 echo "$as_me: failed program was:" >&5
4908 cat conftest.$ac_ext >&5
4909 with_big_core=no
4910 fi
4911 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4912 fi
4913 fi;
4914 echo "$as_me:4914: result: $with_big_core" >&5
4915 echo "${ECHO_T}$with_big_core" >&6
4916 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
4917 #define HAVE_BIG_CORE 1
4918 EOF
4919
4920 ###     use option --enable-termcap to compile in the termcap fallback support
4921 echo "$as_me:4921: checking if you want termcap-fallback support" >&5
4922 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
4923
4924 # Check whether --enable-termcap or --disable-termcap was given.
4925 if test "${enable_termcap+set}" = set; then
4926   enableval="$enable_termcap"
4927   with_termcap=$enableval
4928 else
4929   with_termcap=no
4930 fi;
4931 echo "$as_me:4931: result: $with_termcap" >&5
4932 echo "${ECHO_T}$with_termcap" >&6
4933
4934 if test "$with_termcap" != "yes" ; then
4935         if test "$use_database" = no ; then
4936                 if test -z "$with_fallback" ; then
4937                         { { echo "$as_me:4937: error: You have disabled the database w/o specifying fallbacks" >&5
4938 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
4939    { (exit 1); exit 1; }; }
4940                 fi
4941         fi
4942         cat >>confdefs.h <<\EOF
4943 #define PURE_TERMINFO 1
4944 EOF
4945
4946 else
4947
4948 cat >>confdefs.h <<\EOF
4949 #define USE_TERMCAP 1
4950 EOF
4951
4952 echo "$as_me:4952: checking for list of termcap files" >&5
4953 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
4954
4955 # Check whether --with-termpath or --without-termpath was given.
4956 if test "${with_termpath+set}" = set; then
4957   withval="$with_termpath"
4958
4959 else
4960   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
4961 fi;
4962 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
4963 cf_dst_path=
4964 for cf_src_path in $withval
4965 do
4966
4967 case ".$cf_src_path" in #(vi
4968 .\$\(*\)*|.\'*\'*) #(vi
4969   ;;
4970 ..|./*|.\\*) #(vi
4971   ;;
4972 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4973   ;;
4974 .\${*prefix}*) #(vi
4975   eval cf_src_path="$cf_src_path"
4976   case ".$cf_src_path" in #(vi
4977   .NONE/*)
4978     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
4979     ;;
4980   esac
4981   ;; #(vi
4982 .NONE/*)
4983   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
4984   ;;
4985 *)
4986   { { echo "$as_me:4986: error: expected a pathname, not \"$cf_src_path\"" >&5
4987 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
4988    { (exit 1); exit 1; }; }
4989   ;;
4990 esac
4991
4992   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
4993   cf_dst_path="${cf_dst_path}${cf_src_path}"
4994 done
4995 IFS="$ac_save_ifs"
4996
4997 eval 'TERMPATH="$cf_dst_path"'
4998
4999 echo "$as_me:4999: result: $TERMPATH" >&5
5000 echo "${ECHO_T}$TERMPATH" >&6
5001 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5002 #define TERMPATH "$TERMPATH"
5003 EOF
5004
5005 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5006 echo "$as_me:5006: checking if fast termcap-loader is needed" >&5
5007 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5008
5009 # Check whether --enable-getcap or --disable-getcap was given.
5010 if test "${enable_getcap+set}" = set; then
5011   enableval="$enable_getcap"
5012   with_getcap=$enableval
5013 else
5014   with_getcap=no
5015 fi;
5016 echo "$as_me:5016: result: $with_getcap" >&5
5017 echo "${ECHO_T}$with_getcap" >&6
5018 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5019 #define USE_GETCAP 1
5020 EOF
5021
5022 echo "$as_me:5022: checking if translated termcaps will be cached in ~/.terminfo" >&5
5023 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5024
5025 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5026 if test "${enable_getcap_cache+set}" = set; then
5027   enableval="$enable_getcap_cache"
5028   with_getcap_cache=$enableval
5029 else
5030   with_getcap_cache=no
5031 fi;
5032 echo "$as_me:5032: result: $with_getcap_cache" >&5
5033 echo "${ECHO_T}$with_getcap_cache" >&6
5034 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5035 #define USE_GETCAP_CACHE 1
5036 EOF
5037
5038 fi
5039
5040 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5041 echo "$as_me:5041: checking if ~/.terminfo is wanted" >&5
5042 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5043
5044 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5045 if test "${enable_home_terminfo+set}" = set; then
5046   enableval="$enable_home_terminfo"
5047   with_home_terminfo=$enableval
5048 else
5049   with_home_terminfo=yes
5050 fi;
5051 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5052 #define USE_HOME_TERMINFO 1
5053 EOF
5054
5055 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5056 ###   to reduce storage requirements for the terminfo database.
5057
5058 for ac_func in \
5059         remove \
5060         unlink
5061 do
5062 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5063 echo "$as_me:5063: checking for $ac_func" >&5
5064 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5065 if eval "test \"\${$as_ac_var+set}\" = set"; then
5066   echo $ECHO_N "(cached) $ECHO_C" >&6
5067 else
5068   cat >conftest.$ac_ext <<_ACEOF
5069 #line 5069 "configure"
5070 #include "confdefs.h"
5071 /* System header to define __stub macros and hopefully few prototypes,
5072     which can conflict with char $ac_func (); below.  */
5073 #include <assert.h>
5074 /* Override any gcc2 internal prototype to avoid an error.  */
5075 #ifdef __cplusplus
5076 extern "C"
5077 #endif
5078 /* We use char because int might match the return type of a gcc2
5079    builtin and then its argument prototype would still apply.  */
5080 char $ac_func ();
5081 char (*f) ();
5082
5083 int
5084 main ()
5085 {
5086 /* The GNU C library defines this for functions which it implements
5087     to always fail with ENOSYS.  Some functions are actually named
5088     something starting with __ and the normal name is an alias.  */
5089 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5090 choke me
5091 #else
5092 f = $ac_func;
5093 #endif
5094
5095   ;
5096   return 0;
5097 }
5098 _ACEOF
5099 rm -f conftest.$ac_objext conftest$ac_exeext
5100 if { (eval echo "$as_me:5100: \"$ac_link\"") >&5
5101   (eval $ac_link) 2>&5
5102   ac_status=$?
5103   echo "$as_me:5103: \$? = $ac_status" >&5
5104   (exit $ac_status); } &&
5105          { ac_try='test -s conftest$ac_exeext'
5106   { (eval echo "$as_me:5106: \"$ac_try\"") >&5
5107   (eval $ac_try) 2>&5
5108   ac_status=$?
5109   echo "$as_me:5109: \$? = $ac_status" >&5
5110   (exit $ac_status); }; }; then
5111   eval "$as_ac_var=yes"
5112 else
5113   echo "$as_me: failed program was:" >&5
5114 cat conftest.$ac_ext >&5
5115 eval "$as_ac_var=no"
5116 fi
5117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5118 fi
5119 echo "$as_me:5119: result: `eval echo '${'$as_ac_var'}'`" >&5
5120 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5121 if test `eval echo '${'$as_ac_var'}'` = yes; then
5122   cat >>confdefs.h <<EOF
5123 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5124 EOF
5125
5126 fi
5127 done
5128
5129 if test "$cross_compiling" = yes ; then
5130
5131 for ac_func in \
5132                 link \
5133                 symlink
5134 do
5135 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5136 echo "$as_me:5136: checking for $ac_func" >&5
5137 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5138 if eval "test \"\${$as_ac_var+set}\" = set"; then
5139   echo $ECHO_N "(cached) $ECHO_C" >&6
5140 else
5141   cat >conftest.$ac_ext <<_ACEOF
5142 #line 5142 "configure"
5143 #include "confdefs.h"
5144 /* System header to define __stub macros and hopefully few prototypes,
5145     which can conflict with char $ac_func (); below.  */
5146 #include <assert.h>
5147 /* Override any gcc2 internal prototype to avoid an error.  */
5148 #ifdef __cplusplus
5149 extern "C"
5150 #endif
5151 /* We use char because int might match the return type of a gcc2
5152    builtin and then its argument prototype would still apply.  */
5153 char $ac_func ();
5154 char (*f) ();
5155
5156 int
5157 main ()
5158 {
5159 /* The GNU C library defines this for functions which it implements
5160     to always fail with ENOSYS.  Some functions are actually named
5161     something starting with __ and the normal name is an alias.  */
5162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5163 choke me
5164 #else
5165 f = $ac_func;
5166 #endif
5167
5168   ;
5169   return 0;
5170 }
5171 _ACEOF
5172 rm -f conftest.$ac_objext conftest$ac_exeext
5173 if { (eval echo "$as_me:5173: \"$ac_link\"") >&5
5174   (eval $ac_link) 2>&5
5175   ac_status=$?
5176   echo "$as_me:5176: \$? = $ac_status" >&5
5177   (exit $ac_status); } &&
5178          { ac_try='test -s conftest$ac_exeext'
5179   { (eval echo "$as_me:5179: \"$ac_try\"") >&5
5180   (eval $ac_try) 2>&5
5181   ac_status=$?
5182   echo "$as_me:5182: \$? = $ac_status" >&5
5183   (exit $ac_status); }; }; then
5184   eval "$as_ac_var=yes"
5185 else
5186   echo "$as_me: failed program was:" >&5
5187 cat conftest.$ac_ext >&5
5188 eval "$as_ac_var=no"
5189 fi
5190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5191 fi
5192 echo "$as_me:5192: result: `eval echo '${'$as_ac_var'}'`" >&5
5193 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5194 if test `eval echo '${'$as_ac_var'}'` = yes; then
5195   cat >>confdefs.h <<EOF
5196 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5197 EOF
5198
5199 fi
5200 done
5201
5202 else
5203         echo "$as_me:5203: checking if link/symlink functions work" >&5
5204 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5205 if test "${cf_cv_link_funcs+set}" = set; then
5206   echo $ECHO_N "(cached) $ECHO_C" >&6
5207 else
5208
5209                 cf_cv_link_funcs=
5210                 for cf_func in link symlink ; do
5211                         if test "$cross_compiling" = yes; then
5212
5213                         eval 'ac_cv_func_'$cf_func'=error'
5214 else
5215   cat >conftest.$ac_ext <<_ACEOF
5216 #line 5216 "configure"
5217 #include "confdefs.h"
5218
5219 #include <sys/types.h>
5220 #include <sys/stat.h>
5221 #ifdef HAVE_UNISTD_H
5222 #include <unistd.h>
5223 #endif
5224 int main()
5225 {
5226         int fail = 0;
5227         char *src = "config.log";
5228         char *dst = "conftest.chk";
5229         struct stat src_sb;
5230         struct stat dst_sb;
5231
5232         stat(src, &src_sb);
5233         fail = ($cf_func("config.log", "conftest.chk") < 0)
5234             || (stat(dst, &dst_sb) < 0)
5235             || (dst_sb.st_mtime != src_sb.st_mtime);
5236 #ifdef HAVE_UNLINK
5237         unlink(dst);
5238 #else
5239         remove(dst);
5240 #endif
5241         exit (fail);
5242 }
5243
5244 _ACEOF
5245 rm -f conftest$ac_exeext
5246 if { (eval echo "$as_me:5246: \"$ac_link\"") >&5
5247   (eval $ac_link) 2>&5
5248   ac_status=$?
5249   echo "$as_me:5249: \$? = $ac_status" >&5
5250   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5251   { (eval echo "$as_me:5251: \"$ac_try\"") >&5
5252   (eval $ac_try) 2>&5
5253   ac_status=$?
5254   echo "$as_me:5254: \$? = $ac_status" >&5
5255   (exit $ac_status); }; }; then
5256
5257                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5258                         eval 'ac_cv_func_'$cf_func'=yes'
5259 else
5260   echo "$as_me: program exited with status $ac_status" >&5
5261 echo "$as_me: failed program was:" >&5
5262 cat conftest.$ac_ext >&5
5263
5264                         eval 'ac_cv_func_'$cf_func'=no'
5265 fi
5266 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5267 fi
5268                 done
5269                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5270
5271 fi
5272 echo "$as_me:5272: result: $cf_cv_link_funcs" >&5
5273 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5274         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5275 #define HAVE_LINK 1
5276 EOF
5277
5278         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5279 #define HAVE_SYMLINK 1
5280 EOF
5281
5282 fi
5283
5284 with_links=no
5285 with_symlinks=no
5286
5287 if test "$ac_cv_func_link" != yes ; then
5288     echo "$as_me:5288: checking if tic should use symbolic links" >&5
5289 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5290     if test "$ac_cv_func_symlink" = yes ; then
5291         with_symlinks=yes
5292     else
5293         with_symlinks=no
5294     fi
5295     echo "$as_me:5295: result: $with_symlinks" >&5
5296 echo "${ECHO_T}$with_symlinks" >&6
5297 elif test "$ac_cv_func_symlink" != yes ; then
5298     echo "$as_me:5298: checking if tic should use hard links" >&5
5299 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5300     if test "$ac_cv_func_link" = yes ; then
5301         with_links=yes
5302     else
5303         with_links=no
5304     fi
5305     echo "$as_me:5305: result: $with_links" >&5
5306 echo "${ECHO_T}$with_links" >&6
5307 else
5308     echo "$as_me:5308: checking if tic should use symbolic links" >&5
5309 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5310
5311 # Check whether --enable-symlinks or --disable-symlinks was given.
5312 if test "${enable_symlinks+set}" = set; then
5313   enableval="$enable_symlinks"
5314   with_symlinks=$enableval
5315 else
5316   with_symlinks=no
5317 fi;
5318     echo "$as_me:5318: result: $with_symlinks" >&5
5319 echo "${ECHO_T}$with_symlinks" >&6
5320 fi
5321
5322 test "$with_links" = yes && cat >>confdefs.h <<\EOF
5323 #define USE_LINKS 1
5324 EOF
5325
5326 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5327 #define USE_SYMLINKS 1
5328 EOF
5329
5330 ###   use option --enable-broken-linker to force on use of broken-linker support
5331 echo "$as_me:5331: checking if you want broken-linker support code" >&5
5332 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5333
5334 # Check whether --enable-broken_linker or --disable-broken_linker was given.
5335 if test "${enable_broken_linker+set}" = set; then
5336   enableval="$enable_broken_linker"
5337   with_broken_linker=$enableval
5338 else
5339   with_broken_linker=${BROKEN_LINKER-no}
5340 fi;
5341 echo "$as_me:5341: result: $with_broken_linker" >&5
5342 echo "${ECHO_T}$with_broken_linker" >&6
5343
5344 BROKEN_LINKER=0
5345 if test "$with_broken_linker" = yes ; then
5346         cat >>confdefs.h <<\EOF
5347 #define BROKEN_LINKER 1
5348 EOF
5349
5350         BROKEN_LINKER=1
5351 elif test "$DFT_LWR_MODEL" = shared ; then
5352         case $cf_cv_system_name in #(vi
5353         cygwin*)
5354                 cat >>confdefs.h <<\EOF
5355 #define BROKEN_LINKER 1
5356 EOF
5357
5358                 BROKEN_LINKER=1
5359                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
5360
5361                 ;;
5362         esac
5363 fi
5364
5365 ###   use option --with-bool to override bool's type
5366 echo "$as_me:5366: checking for type of bool" >&5
5367 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
5368
5369 # Check whether --with-bool or --without-bool was given.
5370 if test "${with_bool+set}" = set; then
5371   withval="$with_bool"
5372   NCURSES_BOOL="$withval"
5373 else
5374   NCURSES_BOOL=auto
5375 fi;
5376 echo "$as_me:5376: result: $NCURSES_BOOL" >&5
5377 echo "${ECHO_T}$NCURSES_BOOL" >&6
5378
5379 ###   use option --with-ospeed to override ospeed's type
5380 echo "$as_me:5380: checking for type of ospeed" >&5
5381 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
5382
5383 # Check whether --with-ospeed or --without-ospeed was given.
5384 if test "${with_ospeed+set}" = set; then
5385   withval="$with_ospeed"
5386   NCURSES_OSPEED="$withval"
5387 else
5388   NCURSES_OSPEED=short
5389 fi;
5390 echo "$as_me:5390: result: $NCURSES_OSPEED" >&5
5391 echo "${ECHO_T}$NCURSES_OSPEED" >&6
5392
5393 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
5394 echo "$as_me:5394: checking if tputs should process BSD-style prefix padding" >&5
5395 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
5396
5397 # Check whether --enable-bsdpad or --disable-bsdpad was given.
5398 if test "${enable_bsdpad+set}" = set; then
5399   enableval="$enable_bsdpad"
5400   with_bsdpad=$enableval
5401 else
5402   with_bsdpad=no
5403 fi;
5404 echo "$as_me:5404: result: $with_bsdpad" >&5
5405 echo "${ECHO_T}$with_bsdpad" >&6
5406 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
5407 #define BSD_TPUTS 1
5408 EOF
5409
5410 ### Enable compiling-in rcs id's
5411 echo "$as_me:5411: checking if RCS identifiers should be compiled-in" >&5
5412 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
5413
5414 # Check whether --with-rcs-ids or --without-rcs-ids was given.
5415 if test "${with_rcs_ids+set}" = set; then
5416   withval="$with_rcs_ids"
5417   with_rcs_ids=$withval
5418 else
5419   with_rcs_ids=no
5420 fi;
5421 echo "$as_me:5421: result: $with_rcs_ids" >&5
5422 echo "${ECHO_T}$with_rcs_ids" >&6
5423 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
5424 #define USE_RCS_IDS 1
5425 EOF
5426
5427 ###############################################################################
5428
5429 echo "$as_me:5429: checking format of man-pages" >&5
5430 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
5431
5432 # Check whether --with-manpage-format or --without-manpage-format was given.
5433 if test "${with_manpage_format+set}" = set; then
5434   withval="$with_manpage_format"
5435   MANPAGE_FORMAT=$withval
5436 else
5437   MANPAGE_FORMAT=unknown
5438 fi;
5439
5440 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
5441 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
5442
5443 cf_unknown=
5444
5445 case $MANPAGE_FORMAT in
5446 unknown)
5447   if test -z "$MANPATH" ; then
5448     MANPATH="/usr/man:/usr/share/man"
5449   fi
5450
5451   # look for the 'date' man-page (it's most likely to be installed!)
5452   MANPAGE_FORMAT=
5453   cf_preform=no
5454   cf_catonly=yes
5455   cf_example=date
5456
5457   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
5458   for cf_dir in $MANPATH; do
5459     test -z "$cf_dir" && cf_dir=/usr/man
5460     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
5461     do
5462       cf_test=`echo $cf_name | sed -e 's/*//'`
5463       if test "x$cf_test" = "x$cf_name" ; then
5464
5465         case "$cf_name" in
5466         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
5467         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
5468         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
5469         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
5470         esac
5471
5472         case "$cf_name" in
5473         $cf_dir/man*)
5474           cf_catonly=no
5475           ;;
5476         $cf_dir/cat*)
5477           cf_preform=yes
5478           ;;
5479         esac
5480         break
5481       fi
5482
5483       # if we found a match in either man* or cat*, stop looking
5484       if test -n "$MANPAGE_FORMAT" ; then
5485         cf_found=no
5486         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
5487         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
5488         case "$cf_name" in
5489         $cf_dir/cat*)
5490           cf_found=yes
5491           ;;
5492         esac
5493         test $cf_found=yes && break
5494       fi
5495     done
5496     # only check the first directory in $MANPATH where we find manpages
5497     if test -n "$MANPAGE_FORMAT" ; then
5498        break
5499     fi
5500   done
5501   # if we did not find the example, just assume it is normal
5502   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
5503   IFS="$ac_save_ifs"
5504   ;;
5505 *)
5506   for cf_option in $MANPAGE_FORMAT; do
5507      case $cf_option in #(vi
5508      gzip|compress|BSDI|normal|formatted|catonly)
5509        ;;
5510      *)
5511        cf_unknown="$cf_unknown $cf_option"
5512        ;;
5513      esac
5514   done
5515   ;;
5516 esac
5517
5518 echo "$as_me:5518: result: $MANPAGE_FORMAT" >&5
5519 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
5520 if test -n "$cf_unknown" ; then
5521   { echo "$as_me:5521: WARNING: Unexpected manpage-format $cf_unknown" >&5
5522 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
5523 fi
5524
5525 echo "$as_me:5525: checking for manpage renaming" >&5
5526 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
5527
5528 # Check whether --with-manpage-renames or --without-manpage-renames was given.
5529 if test "${with_manpage_renames+set}" = set; then
5530   withval="$with_manpage_renames"
5531   MANPAGE_RENAMES=$withval
5532 else
5533   MANPAGE_RENAMES=yes
5534 fi;
5535
5536 case ".$MANPAGE_RENAMES" in #(vi
5537 .no) #(vi
5538   ;;
5539 .|.yes)
5540   # Debian 'man' program?
5541   if test -f /etc/debian_version ; then
5542     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
5543   else
5544     MANPAGE_RENAMES=no
5545   fi
5546   ;;
5547 esac
5548
5549 if test "$MANPAGE_RENAMES" != no ; then
5550   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
5551     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
5552   elif test ! -f $MANPAGE_RENAMES ; then
5553     { { echo "$as_me:5553: error: not a filename: $MANPAGE_RENAMES" >&5
5554 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
5555    { (exit 1); exit 1; }; }
5556   fi
5557
5558   test ! -d man && mkdir man
5559
5560   # Construct a sed-script to perform renaming within man-pages
5561   if test -n "$MANPAGE_RENAMES" ; then
5562     test ! -d man && mkdir man
5563     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >man/edit_man.sed
5564   fi
5565 fi
5566
5567 echo "$as_me:5567: result: $MANPAGE_RENAMES" >&5
5568 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
5569
5570 echo "$as_me:5570: checking if manpage aliases will be installed" >&5
5571 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
5572
5573 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
5574 if test "${with_manpage_aliases+set}" = set; then
5575   withval="$with_manpage_aliases"
5576   MANPAGE_ALIASES=$withval
5577 else
5578   MANPAGE_ALIASES=yes
5579 fi;
5580
5581 echo "$as_me:5581: result: $MANPAGE_ALIASES" >&5
5582 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
5583
5584 if test "$LN_S" = "ln -s"; then
5585         cf_use_symlinks=yes
5586 else
5587         cf_use_symlinks=no
5588 fi
5589
5590 MANPAGE_SYMLINKS=no
5591 if test "$MANPAGE_ALIASES" = yes ; then
5592 echo "$as_me:5592: checking if manpage symlinks should be used" >&5
5593 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
5594
5595 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
5596 if test "${with_manpage_symlinks+set}" = set; then
5597   withval="$with_manpage_symlinks"
5598   MANPAGE_SYMLINKS=$withval
5599 else
5600   MANPAGE_SYMLINKS=$cf_use_symlinks
5601 fi;
5602
5603 if test "$$cf_use_symlinks" = no; then
5604 if test "$MANPAGE_SYMLINKS" = yes ; then
5605         { echo "$as_me:5605: WARNING: cannot make symlinks" >&5
5606 echo "$as_me: WARNING: cannot make symlinks" >&2;}
5607         MANPAGE_SYMLINKS=no
5608 fi
5609 fi
5610
5611 echo "$as_me:5611: result: $MANPAGE_SYMLINKS" >&5
5612 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
5613 fi
5614
5615 echo "$as_me:5615: checking for manpage tbl" >&5
5616 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
5617
5618 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
5619 if test "${with_manpage_tbl+set}" = set; then
5620   withval="$with_manpage_tbl"
5621   MANPAGE_TBL=$withval
5622 else
5623   MANPAGE_TBL=no
5624 fi;
5625
5626 echo "$as_me:5626: result: $MANPAGE_TBL" >&5
5627 echo "${ECHO_T}$MANPAGE_TBL" >&6
5628
5629   if test "$prefix" = "NONE" ; then
5630      cf_prefix="$ac_default_prefix"
5631   else
5632      cf_prefix="$prefix"
5633   fi
5634
5635   case "$MANPAGE_FORMAT" in # (vi
5636   *catonly*) # (vi
5637     cf_format=yes
5638     cf_inboth=no
5639     ;;
5640   *formatted*) # (vi
5641     cf_format=yes
5642     cf_inboth=yes
5643     ;;
5644   *)
5645     cf_format=no
5646     cf_inboth=no
5647     ;;
5648   esac
5649
5650 test ! -d man && mkdir man
5651
5652 cf_so_strip=
5653 cf_compress=
5654 case "$MANPAGE_FORMAT" in #(vi
5655 *compress*) #(vi
5656         cf_so_strip="Z"
5657         cf_compress=compress
5658   ;;
5659 *gzip*) #(vi
5660         cf_so_strip="gz"
5661         cf_compress=gzip
5662   ;;
5663 esac
5664
5665 cf_edit_man=man/edit_man.sh
5666
5667 cat >$cf_edit_man <<CF_EOF
5668 #! /bin/sh
5669 # this script is generated by the configure-script CF_MAN_PAGES macro.
5670 prefix="$cf_prefix"
5671 datadir="$datadir"
5672 NCURSES_OSPEED="$NCURSES_OSPEED"
5673 TERMINFO="$TERMINFO"
5674 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
5675 INSTALL="$INSTALL"
5676 INSTALL_DATA="$INSTALL_DATA"
5677 transform="$program_transform_name"
5678
5679 TMP=\${TMPDIR-/tmp}/man\$\$
5680 trap "rm -f \$TMP" 0 1 2 5 15
5681
5682 form=\$1
5683 shift || exit 1
5684
5685 verb=\$1
5686 shift || exit 1
5687
5688 mandir=\$1
5689 shift || exit 1
5690
5691 srcdir=\$1
5692 shift || exit 1
5693
5694 if test "\$form" = normal ; then
5695         if test "$cf_format" = yes ; then
5696         if test "$cf_inboth" = no ; then
5697                 sh \$0 format \$verb \$mandir \$srcdir \$*
5698                 exit $?
5699         fi
5700         fi
5701         cf_subdir=\$mandir/man
5702         cf_tables=$MANPAGE_TBL
5703 else
5704         cf_subdir=\$mandir/cat
5705         cf_tables=yes
5706 fi
5707
5708 # process the list of source-files
5709 for i in \$* ; do
5710 case \$i in #(vi
5711 *.orig|*.rej) ;; #(vi
5712 *.[0-9]*)
5713         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
5714         if test \$verb = installing ; then
5715         if test ! -d \$cf_subdir\${section} ; then
5716                 \$MKDIRS \$cf_subdir\$section
5717         fi
5718         fi
5719         aliases=
5720         source=\`basename \$i\`
5721         inalias=\$source
5722         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
5723         if test ! -f \$inalias ; then
5724                 echo .. skipped \$source
5725                 continue
5726         fi
5727 CF_EOF
5728
5729 if test "$MANPAGE_ALIASES" != no ; then
5730 cat >>$cf_edit_man <<CF_EOF
5731         aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
5732 CF_EOF
5733 fi
5734
5735 if test "$MANPAGE_RENAMES" = no ; then
5736 cat >>$cf_edit_man <<CF_EOF
5737         # perform program transformations for section 1 man pages
5738         if test \$section = 1 ; then
5739                 target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
5740         else
5741                 target=\$cf_subdir\${section}/\$source
5742         fi
5743 CF_EOF
5744 else
5745 cat >>$cf_edit_man <<CF_EOF
5746         target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
5747         if test -z "\$target" ; then
5748                 echo '? missing rename for '\$source
5749                 target="\$source"
5750         fi
5751         target="\$cf_subdir\${section}/\${target}"
5752 CF_EOF
5753 fi
5754
5755         # replace variables in man page
5756
5757         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
5758         do
5759 cat >>$cf_edit_man <<CF_EOF
5760         prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
5761 CF_EOF
5762         done
5763
5764 cat >>$cf_edit_man <<CF_EOF
5765         sed     -e "s,@DATADIR@,\$datadir," \\
5766                 -e "s,@TERMINFO@,\$TERMINFO," \\
5767                 -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
5768 CF_EOF
5769
5770         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
5771         do
5772                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5773 cat >>$cf_edit_man <<CF_EOF
5774                 -e "s,@$cf_NAME@,\$prog_$cf_name," \\
5775 CF_EOF
5776         done
5777
5778 if test -f $MANPAGE_RENAMES ; then
5779 cat >>$cf_edit_man <<CF_EOF
5780                 < \$i | sed -f $srcdir/edit_man.sed >\$TMP
5781 CF_EOF
5782 else
5783 cat >>$cf_edit_man <<CF_EOF
5784                 < \$i >\$TMP
5785 CF_EOF
5786 fi
5787
5788 cat >>$cf_edit_man <<CF_EOF
5789 if test \$cf_tables = yes ; then
5790         tbl \$TMP >\$TMP.out
5791         mv \$TMP.out \$TMP
5792 fi
5793 CF_EOF
5794
5795 if test $with_curses_h != yes ; then
5796 cat >>$cf_edit_man <<CF_EOF
5797         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
5798         mv \$TMP.out \$TMP
5799 CF_EOF
5800 fi
5801
5802 cat >>$cf_edit_man <<CF_EOF
5803         if test \$form = format ; then
5804                 nroff -man \$TMP >\$TMP.out
5805                 mv \$TMP.out \$TMP
5806         fi
5807 CF_EOF
5808
5809 if test -n "$cf_compress" ; then
5810 cat >>$cf_edit_man <<CF_EOF
5811         if test \$verb = installing ; then
5812         if ( $cf_compress -f \$TMP )
5813         then
5814                 mv \$TMP.$cf_so_strip \$TMP
5815         fi
5816         fi
5817         target="\$target.$cf_so_strip"
5818 CF_EOF
5819 fi
5820
5821 case "$MANPAGE_FORMAT" in #(vi
5822 *BSDI*)
5823 cat >>$cf_edit_man <<CF_EOF
5824         if test \$form = format ; then
5825                 # BSDI installs only .0 suffixes in the cat directories
5826                 target="\`echo \$target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
5827         fi
5828 CF_EOF
5829   ;;
5830 esac
5831
5832 cat >>$cf_edit_man <<CF_EOF
5833         suffix=\`basename \$target | sed -e 's%^[^.]*%%'\`
5834         if test \$verb = installing ; then
5835                 echo \$verb \$target
5836                 \$INSTALL_DATA \$TMP \$target
5837                 test -n "\$aliases" && (
5838                         cd \$cf_subdir\${section} && (
5839                                 source=\`echo \$target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
5840                                 test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
5841                                 target=\`basename \$target\`
5842                                 for cf_alias in \$aliases
5843                                 do
5844                                         if test \$section = 1 ; then
5845                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
5846                                         fi
5847
5848                                         if test "$MANPAGE_SYMLINKS" = yes ; then
5849                                                 if test -f \$cf_alias\${suffix} ; then
5850                                                         if ( cmp -s \$target \$cf_alias\${suffix} )
5851                                                         then
5852                                                                 continue
5853                                                         fi
5854                                                 fi
5855                                                 echo .. \$verb alias \$cf_alias\${suffix}
5856                                                 rm -f \$cf_alias\${suffix}
5857                                                 $LN_S \$target \$cf_alias\${suffix}
5858                                         elif test "\$target" != "\$cf_alias\${suffix}" ; then
5859                                                 echo ".so \$source" >\$TMP
5860 CF_EOF
5861 if test -n "$cf_compress" ; then
5862 cat >>$cf_edit_man <<CF_EOF
5863                                                 if test -n "$cf_so_strip" ; then
5864                                                         $cf_compress -f \$TMP
5865                                                         mv \$TMP.$cf_so_strip \$TMP
5866                                                 fi
5867 CF_EOF
5868 fi
5869 cat >>$cf_edit_man <<CF_EOF
5870                                                 echo .. \$verb alias \$cf_alias\${suffix}
5871                                                 rm -f \$cf_alias\${suffix}
5872                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
5873                                         fi
5874                                 done
5875                         )
5876                 )
5877         elif test \$verb = removing ; then
5878                 echo \$verb \$target
5879                 rm -f \$target
5880                 test -n "\$aliases" && (
5881                         cd \$cf_subdir\${section} && (
5882                                 for cf_alias in \$aliases
5883                                 do
5884                                         if test \$section = 1 ; then
5885                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
5886                                         fi
5887
5888                                         echo .. \$verb alias \$cf_alias\${suffix}
5889                                         rm -f \$cf_alias\${suffix}
5890                                 done
5891                         )
5892                 )
5893         else
5894 #               echo ".hy 0"
5895                 cat \$TMP
5896         fi
5897         ;;
5898 esac
5899 done
5900
5901 if test $cf_inboth = yes ; then
5902 if test \$form != format ; then
5903         sh \$0 format \$verb \$mandir \$srcdir \$*
5904 fi
5905 fi
5906
5907 exit 0
5908 CF_EOF
5909 chmod 755 $cf_edit_man
5910
5911 ###############################################################################
5912
5913 ### Note that some functions (such as const) are normally disabled anyway.
5914 echo "$as_me:5914: checking if you want to build with function extensions" >&5
5915 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
5916
5917 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
5918 if test "${enable_ext_funcs+set}" = set; then
5919   enableval="$enable_ext_funcs"
5920   with_ext_funcs=$enableval
5921 else
5922   with_ext_funcs=yes
5923 fi;
5924 echo "$as_me:5924: result: $with_ext_funcs" >&5
5925 echo "${ECHO_T}$with_ext_funcs" >&6
5926 if test "$with_ext_funcs" = yes ; then
5927         NCURSES_EXT_FUNCS=1
5928         cat >>confdefs.h <<\EOF
5929 #define HAVE_CURSES_VERSION 1
5930 EOF
5931
5932         cat >>confdefs.h <<\EOF
5933 #define HAVE_HAS_KEY 1
5934 EOF
5935
5936         cat >>confdefs.h <<\EOF
5937 #define HAVE_RESIZETERM 1
5938 EOF
5939
5940         cat >>confdefs.h <<\EOF
5941 #define HAVE_RESIZE_TERM 1
5942 EOF
5943
5944         cat >>confdefs.h <<\EOF
5945 #define HAVE_USE_DEFAULT_COLORS 1
5946 EOF
5947
5948         cat >>confdefs.h <<\EOF
5949 #define HAVE_WRESIZE 1
5950 EOF
5951
5952         cat >>confdefs.h <<\EOF
5953 #define NCURSES_EXT_FUNCS 1
5954 EOF
5955
5956 else
5957         NCURSES_EXT_FUNCS=0
5958 fi
5959
5960 ###   use option --enable-const to turn on use of const beyond that in XSI.
5961 echo "$as_me:5961: checking for extended use of const keyword" >&5
5962 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
5963
5964 # Check whether --enable-const or --disable-const was given.
5965 if test "${enable_const+set}" = set; then
5966   enableval="$enable_const"
5967   with_ext_const=$enableval
5968 else
5969   with_ext_const=no
5970 fi;
5971 echo "$as_me:5971: result: $with_ext_const" >&5
5972 echo "${ECHO_T}$with_ext_const" >&6
5973 NCURSES_CONST='/*nothing*/'
5974 if test "$with_ext_const" = yes ; then
5975         NCURSES_CONST=const
5976 fi
5977
5978 echo "$as_me:5978: checking if you want \$NCURSES_NO_PADDING code" >&5
5979 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
5980
5981 # Check whether --enable-no-padding or --disable-no-padding was given.
5982 if test "${enable_no_padding+set}" = set; then
5983   enableval="$enable_no_padding"
5984   with_no_padding=$enableval
5985 else
5986   with_no_padding=$with_ext_funcs
5987 fi;
5988 echo "$as_me:5988: result: $with_no_padding" >&5
5989 echo "${ECHO_T}$with_no_padding" >&6
5990 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
5991 #define NCURSES_NO_PADDING 1
5992 EOF
5993
5994 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
5995 echo "$as_me:5995: checking if you want SIGWINCH handler" >&5
5996 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
5997
5998 # Check whether --enable-sigwinch or --disable-sigwinch was given.
5999 if test "${enable_sigwinch+set}" = set; then
6000   enableval="$enable_sigwinch"
6001   with_sigwinch=$enableval
6002 else
6003   with_sigwinch=$with_ext_funcs
6004 fi;
6005 echo "$as_me:6005: result: $with_sigwinch" >&5
6006 echo "${ECHO_T}$with_sigwinch" >&6
6007 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
6008 #define USE_SIGWINCH 1
6009 EOF
6010
6011 ###   use option --enable-tcap-names to allow user to define new capabilities
6012 echo "$as_me:6012: checking if you want user-definable terminal capabilities like termcap" >&5
6013 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
6014
6015 # Check whether --enable-tcap-names or --disable-tcap-names was given.
6016 if test "${enable_tcap_names+set}" = set; then
6017   enableval="$enable_tcap_names"
6018   with_tcap_names=$enableval
6019 else
6020   with_tcap_names=$with_ext_funcs
6021 fi;
6022 echo "$as_me:6022: result: $with_tcap_names" >&5
6023 echo "${ECHO_T}$with_tcap_names" >&6
6024 NCURSES_XNAMES=0
6025 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
6026
6027 ###############################################################################
6028 # These options are relatively safe to experiment with.
6029
6030 echo "$as_me:6030: checking if you want all development code" >&5
6031 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
6032
6033 # Check whether --with-develop or --without-develop was given.
6034 if test "${with_develop+set}" = set; then
6035   withval="$with_develop"
6036   with_develop=$withval
6037 else
6038   with_develop=no
6039 fi;
6040 echo "$as_me:6040: result: $with_develop" >&5
6041 echo "${ECHO_T}$with_develop" >&6
6042
6043 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
6044 echo "$as_me:6044: checking if you want hard-tabs code" >&5
6045 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
6046
6047 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
6048 if test "${enable_hard_tabs+set}" = set; then
6049   enableval="$enable_hard_tabs"
6050   with_hardtabs=$enableval
6051 else
6052   with_hardtabs=$with_develop
6053 fi;
6054 echo "$as_me:6054: result: $with_hardtabs" >&5
6055 echo "${ECHO_T}$with_hardtabs" >&6
6056 test "$with_hardtabs" = yes && cat >>confdefs.h <<\EOF
6057 #define USE_HARD_TABS 1
6058 EOF
6059
6060 echo "$as_me:6060: checking if you want to use restrict environment when running as root" >&5
6061 echo $ECHO_N "checking if you want to use restrict environment when running as root... $ECHO_C" >&6
6062
6063 # Check whether --enable-root-environ or --disable-root-environ was given.
6064 if test "${enable_root_environ+set}" = set; then
6065   enableval="$enable_root_environ"
6066   with_root_environ=$enableval
6067 else
6068   with_root_environ=yes
6069 fi;
6070 echo "$as_me:6070: result: $with_root_environ" >&5
6071 echo "${ECHO_T}$with_root_environ" >&6
6072 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6073 #define USE_ROOT_ENVIRON 1
6074 EOF
6075
6076 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
6077 echo "$as_me:6077: checking if you want limited support for xmc" >&5
6078 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
6079
6080 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
6081 if test "${enable_xmc_glitch+set}" = set; then
6082   enableval="$enable_xmc_glitch"
6083   with_xmc_glitch=$enableval
6084 else
6085   with_xmc_glitch=$with_develop
6086 fi;
6087 echo "$as_me:6087: result: $with_xmc_glitch" >&5
6088 echo "${ECHO_T}$with_xmc_glitch" >&6
6089 test "$with_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
6090 #define USE_XMC_SUPPORT 1
6091 EOF
6092
6093 ###############################################################################
6094 # These are just experimental, probably should not be in a package:
6095
6096 echo "$as_me:6096: checking if you do not want to assume colors are white-on-black" >&5
6097 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
6098
6099 # Check whether --enable-assumed-color or --disable-assumed-color was given.
6100 if test "${enable_assumed_color+set}" = set; then
6101   enableval="$enable_assumed_color"
6102   with_assumed_color=$enableval
6103 else
6104   with_assumed_color=yes
6105 fi;
6106 echo "$as_me:6106: result: $with_assumed_color" >&5
6107 echo "${ECHO_T}$with_assumed_color" >&6
6108 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
6109 #define USE_ASSUMED_COLOR 1
6110 EOF
6111
6112 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
6113 echo "$as_me:6113: checking if you want hashmap scrolling-optimization code" >&5
6114 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
6115
6116 # Check whether --enable-hashmap or --disable-hashmap was given.
6117 if test "${enable_hashmap+set}" = set; then
6118   enableval="$enable_hashmap"
6119   with_hashmap=$enableval
6120 else
6121   with_hashmap=yes
6122 fi;
6123 echo "$as_me:6123: result: $with_hashmap" >&5
6124 echo "${ECHO_T}$with_hashmap" >&6
6125 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
6126 #define USE_HASHMAP 1
6127 EOF
6128
6129 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
6130 echo "$as_me:6130: checking if you want colorfgbg code" >&5
6131 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
6132
6133 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
6134 if test "${enable_colorfgbg+set}" = set; then
6135   enableval="$enable_colorfgbg"
6136   with_colorfgbg=$enableval
6137 else
6138   with_colorfgbg=no
6139 fi;
6140 echo "$as_me:6140: result: $with_colorfgbg" >&5
6141 echo "${ECHO_T}$with_colorfgbg" >&6
6142 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
6143 #define USE_COLORFGBG 1
6144 EOF
6145
6146 echo "$as_me:6146: checking if you want experimental safe-sprintf code" >&5
6147 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
6148
6149 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
6150 if test "${enable_safe_sprintf+set}" = set; then
6151   enableval="$enable_safe_sprintf"
6152   with_safe_sprintf=$enableval
6153 else
6154   with_safe_sprintf=no
6155 fi;
6156 echo "$as_me:6156: result: $with_safe_sprintf" >&5
6157 echo "${ECHO_T}$with_safe_sprintf" >&6
6158 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
6159 #define USE_SAFE_SPRINTF 1
6160 EOF
6161
6162 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
6163 # when hashmap is used scroll hints are useless
6164 if test "$with_hashmap" = no ; then
6165 echo "$as_me:6165: checking if you want to experiment without scrolling-hints code" >&5
6166 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
6167
6168 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
6169 if test "${enable_scroll_hints+set}" = set; then
6170   enableval="$enable_scroll_hints"
6171   with_scroll_hints=$enableval
6172 else
6173   with_scroll_hints=yes
6174 fi;
6175 echo "$as_me:6175: result: $with_scroll_hints" >&5
6176 echo "${ECHO_T}$with_scroll_hints" >&6
6177 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
6178 #define USE_SCROLL_HINTS 1
6179 EOF
6180
6181 fi
6182
6183 ###   use option --enable-widec to turn on use of wide-character support
6184 NCURSES_CH_T=chtype
6185 NCURSES_LIBUTF8=0
6186
6187 NEED_WCHAR_H=0
6188 NCURSES_MBSTATE_T=0
6189 NCURSES_WCHAR_T=0
6190 NCURSES_WINT_T=0
6191
6192 # Check to define _XOPEN_SOURCE "automatically"
6193
6194 case $host_os in #(vi
6195 freebsd*) #(vi
6196         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600"
6197         ;;
6198 hpux*) #(vi
6199         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6200         ;;
6201 irix6.*) #(vi
6202         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6203         ;;
6204 linux*) #(vi
6205
6206 echo "$as_me:6206: checking if we must define _GNU_SOURCE" >&5
6207 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6208 if test "${cf_cv_gnu_source+set}" = set; then
6209   echo $ECHO_N "(cached) $ECHO_C" >&6
6210 else
6211
6212 cat >conftest.$ac_ext <<_ACEOF
6213 #line 6213 "configure"
6214 #include "confdefs.h"
6215 #include <sys/types.h>
6216 int
6217 main ()
6218 {
6219
6220 #ifndef _XOPEN_SOURCE
6221 make an error
6222 #endif
6223   ;
6224   return 0;
6225 }
6226 _ACEOF
6227 rm -f conftest.$ac_objext
6228 if { (eval echo "$as_me:6228: \"$ac_compile\"") >&5
6229   (eval $ac_compile) 2>&5
6230   ac_status=$?
6231   echo "$as_me:6231: \$? = $ac_status" >&5
6232   (exit $ac_status); } &&
6233          { ac_try='test -s conftest.$ac_objext'
6234   { (eval echo "$as_me:6234: \"$ac_try\"") >&5
6235   (eval $ac_try) 2>&5
6236   ac_status=$?
6237   echo "$as_me:6237: \$? = $ac_status" >&5
6238   (exit $ac_status); }; }; then
6239   cf_cv_gnu_source=no
6240 else
6241   echo "$as_me: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6243 cf_save="$CPPFLAGS"
6244          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6245          cat >conftest.$ac_ext <<_ACEOF
6246 #line 6246 "configure"
6247 #include "confdefs.h"
6248 #include <sys/types.h>
6249 int
6250 main ()
6251 {
6252
6253 #ifdef _XOPEN_SOURCE
6254 make an error
6255 #endif
6256   ;
6257   return 0;
6258 }
6259 _ACEOF
6260 rm -f conftest.$ac_objext
6261 if { (eval echo "$as_me:6261: \"$ac_compile\"") >&5
6262   (eval $ac_compile) 2>&5
6263   ac_status=$?
6264   echo "$as_me:6264: \$? = $ac_status" >&5
6265   (exit $ac_status); } &&
6266          { ac_try='test -s conftest.$ac_objext'
6267   { (eval echo "$as_me:6267: \"$ac_try\"") >&5
6268   (eval $ac_try) 2>&5
6269   ac_status=$?
6270   echo "$as_me:6270: \$? = $ac_status" >&5
6271   (exit $ac_status); }; }; then
6272   cf_cv_gnu_source=no
6273 else
6274   echo "$as_me: failed program was:" >&5
6275 cat conftest.$ac_ext >&5
6276 cf_cv_gnu_source=yes
6277 fi
6278 rm -f conftest.$ac_objext conftest.$ac_ext
6279         CPPFLAGS="$cf_save"
6280
6281 fi
6282 rm -f conftest.$ac_objext conftest.$ac_ext
6283
6284 fi
6285 echo "$as_me:6285: result: $cf_cv_gnu_source" >&5
6286 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6287 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6288
6289         ;;
6290 mirbsd*) #(vi
6291         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6292         ;;
6293 netbsd*) #(vi
6294         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6295         ;;
6296 openbsd*) #(vi
6297         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6298         ;;
6299 osf[45]*) #(vi
6300         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6301         ;;
6302 sco*) #(vi
6303         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6304         ;;
6305 solaris*) #(vi
6306         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6307         ;;
6308 *)
6309         echo "$as_me:6309: checking if we should define _XOPEN_SOURCE" >&5
6310 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6311 if test "${cf_cv_xopen_source+set}" = set; then
6312   echo $ECHO_N "(cached) $ECHO_C" >&6
6313 else
6314
6315         cat >conftest.$ac_ext <<_ACEOF
6316 #line 6316 "configure"
6317 #include "confdefs.h"
6318 #include <sys/types.h>
6319 int
6320 main ()
6321 {
6322
6323 #ifndef _XOPEN_SOURCE
6324 make an error
6325 #endif
6326   ;
6327   return 0;
6328 }
6329 _ACEOF
6330 rm -f conftest.$ac_objext
6331 if { (eval echo "$as_me:6331: \"$ac_compile\"") >&5
6332   (eval $ac_compile) 2>&5
6333   ac_status=$?
6334   echo "$as_me:6334: \$? = $ac_status" >&5
6335   (exit $ac_status); } &&
6336          { ac_try='test -s conftest.$ac_objext'
6337   { (eval echo "$as_me:6337: \"$ac_try\"") >&5
6338   (eval $ac_try) 2>&5
6339   ac_status=$?
6340   echo "$as_me:6340: \$? = $ac_status" >&5
6341   (exit $ac_status); }; }; then
6342   cf_cv_xopen_source=no
6343 else
6344   echo "$as_me: failed program was:" >&5
6345 cat conftest.$ac_ext >&5
6346 cf_save="$CPPFLAGS"
6347          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
6348          cat >conftest.$ac_ext <<_ACEOF
6349 #line 6349 "configure"
6350 #include "confdefs.h"
6351 #include <sys/types.h>
6352 int
6353 main ()
6354 {
6355
6356 #ifdef _XOPEN_SOURCE
6357 make an error
6358 #endif
6359   ;
6360   return 0;
6361 }
6362 _ACEOF
6363 rm -f conftest.$ac_objext
6364 if { (eval echo "$as_me:6364: \"$ac_compile\"") >&5
6365   (eval $ac_compile) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit $ac_status); } &&
6369          { ac_try='test -s conftest.$ac_objext'
6370   { (eval echo "$as_me:6370: \"$ac_try\"") >&5
6371   (eval $ac_try) 2>&5
6372   ac_status=$?
6373   echo "$as_me:6373: \$? = $ac_status" >&5
6374   (exit $ac_status); }; }; then
6375   cf_cv_xopen_source=no
6376 else
6377   echo "$as_me: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6379 cf_cv_xopen_source=yes
6380 fi
6381 rm -f conftest.$ac_objext conftest.$ac_ext
6382         CPPFLAGS="$cf_save"
6383
6384 fi
6385 rm -f conftest.$ac_objext conftest.$ac_ext
6386
6387 fi
6388 echo "$as_me:6388: result: $cf_cv_xopen_source" >&5
6389 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6390 test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
6391
6392         # FreeBSD 5.x headers demand this...
6393         echo "$as_me:6393: checking if we should define _POSIX_C_SOURCE" >&5
6394 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6395 if test "${cf_cv_xopen_source+set}" = set; then
6396   echo $ECHO_N "(cached) $ECHO_C" >&6
6397 else
6398
6399         cat >conftest.$ac_ext <<_ACEOF
6400 #line 6400 "configure"
6401 #include "confdefs.h"
6402 #include <sys/types.h>
6403 int
6404 main ()
6405 {
6406
6407 #ifndef _POSIX_C_SOURCE
6408 make an error
6409 #endif
6410   ;
6411   return 0;
6412 }
6413 _ACEOF
6414 rm -f conftest.$ac_objext
6415 if { (eval echo "$as_me:6415: \"$ac_compile\"") >&5
6416   (eval $ac_compile) 2>&5
6417   ac_status=$?
6418   echo "$as_me:6418: \$? = $ac_status" >&5
6419   (exit $ac_status); } &&
6420          { ac_try='test -s conftest.$ac_objext'
6421   { (eval echo "$as_me:6421: \"$ac_try\"") >&5
6422   (eval $ac_try) 2>&5
6423   ac_status=$?
6424   echo "$as_me:6424: \$? = $ac_status" >&5
6425   (exit $ac_status); }; }; then
6426   cf_cv_xopen_source=no
6427 else
6428   echo "$as_me: failed program was:" >&5
6429 cat conftest.$ac_ext >&5
6430 cf_save="$CPPFLAGS"
6431          CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
6432          cat >conftest.$ac_ext <<_ACEOF
6433 #line 6433 "configure"
6434 #include "confdefs.h"
6435 #include <sys/types.h>
6436 int
6437 main ()
6438 {
6439
6440 #ifdef _POSIX_C_SOURCE
6441 make an error
6442 #endif
6443   ;
6444   return 0;
6445 }
6446 _ACEOF
6447 rm -f conftest.$ac_objext
6448 if { (eval echo "$as_me:6448: \"$ac_compile\"") >&5
6449   (eval $ac_compile) 2>&5
6450   ac_status=$?
6451   echo "$as_me:6451: \$? = $ac_status" >&5
6452   (exit $ac_status); } &&
6453          { ac_try='test -s conftest.$ac_objext'
6454   { (eval echo "$as_me:6454: \"$ac_try\"") >&5
6455   (eval $ac_try) 2>&5
6456   ac_status=$?
6457   echo "$as_me:6457: \$? = $ac_status" >&5
6458   (exit $ac_status); }; }; then
6459   cf_cv_xopen_source=no
6460 else
6461   echo "$as_me: failed program was:" >&5
6462 cat conftest.$ac_ext >&5
6463 cf_cv_xopen_source=yes
6464 fi
6465 rm -f conftest.$ac_objext conftest.$ac_ext
6466         CPPFLAGS="$cf_save"
6467
6468 fi
6469 rm -f conftest.$ac_objext conftest.$ac_ext
6470
6471 fi
6472 echo "$as_me:6472: result: $cf_cv_xopen_source" >&5
6473 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6474 test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE"
6475         ;;
6476 esac
6477
6478 # use these variables to work around a defect in gcc's fixincludes.
6479 NCURSES_OK_WCHAR_T=
6480 NCURSES_OK_WINT_T=
6481
6482 echo "$as_me:6482: checking if you want experimental wide-character code" >&5
6483 echo $ECHO_N "checking if you want experimental wide-character code... $ECHO_C" >&6
6484
6485 # Check whether --enable-widec or --disable-widec was given.
6486 if test "${enable_widec+set}" = set; then
6487   enableval="$enable_widec"
6488   with_widec=$enableval
6489 else
6490   with_widec=no
6491 fi;
6492 echo "$as_me:6492: result: $with_widec" >&5
6493 echo "${ECHO_T}$with_widec" >&6
6494 if test "$with_widec" = yes ; then
6495         LIB_SUFFIX="w${LIB_SUFFIX}"
6496         cat >>confdefs.h <<\EOF
6497 #define USE_WIDEC_SUPPORT 1
6498 EOF
6499
6500 echo "$as_me:6500: checking if we must define _XOPEN_SOURCE" >&5
6501 echo $ECHO_N "checking if we must define _XOPEN_SOURCE... $ECHO_C" >&6
6502 cat >conftest.$ac_ext <<_ACEOF
6503 #line 6503 "configure"
6504 #include "confdefs.h"
6505 #include <sys/types.h>
6506
6507 int
6508 main ()
6509 {
6510
6511 #ifndef _XOPEN_SOURCE
6512 make an error
6513 #endif
6514   ;
6515   return 0;
6516 }
6517 _ACEOF
6518 rm -f conftest.$ac_objext
6519 if { (eval echo "$as_me:6519: \"$ac_compile\"") >&5
6520   (eval $ac_compile) 2>&5
6521   ac_status=$?
6522   echo "$as_me:6522: \$? = $ac_status" >&5
6523   (exit $ac_status); } &&
6524          { ac_try='test -s conftest.$ac_objext'
6525   { (eval echo "$as_me:6525: \"$ac_try\"") >&5
6526   (eval $ac_try) 2>&5
6527   ac_status=$?
6528   echo "$as_me:6528: \$? = $ac_status" >&5
6529   (exit $ac_status); }; }; then
6530   cf_result=no
6531 else
6532   echo "$as_me: failed program was:" >&5
6533 cat conftest.$ac_ext >&5
6534 cf_result=yes
6535 fi
6536 rm -f conftest.$ac_objext conftest.$ac_ext
6537 echo "$as_me:6537: result: $cf_result" >&5
6538 echo "${ECHO_T}$cf_result" >&6
6539
6540 if test "$cf_result" = yes ; then
6541         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
6542 elif test "x500" != "x" ; then
6543         echo "$as_me:6543: checking checking for compatible value versus 500" >&5
6544 echo $ECHO_N "checking checking for compatible value versus 500... $ECHO_C" >&6
6545         cat >conftest.$ac_ext <<_ACEOF
6546 #line 6546 "configure"
6547 #include "confdefs.h"
6548 #include <sys/types.h>
6549
6550 int
6551 main ()
6552 {
6553
6554 #if _XOPEN_SOURCE-500 < 0
6555 make an error
6556 #endif
6557   ;
6558   return 0;
6559 }
6560 _ACEOF
6561 rm -f conftest.$ac_objext
6562 if { (eval echo "$as_me:6562: \"$ac_compile\"") >&5
6563   (eval $ac_compile) 2>&5
6564   ac_status=$?
6565   echo "$as_me:6565: \$? = $ac_status" >&5
6566   (exit $ac_status); } &&
6567          { ac_try='test -s conftest.$ac_objext'
6568   { (eval echo "$as_me:6568: \"$ac_try\"") >&5
6569   (eval $ac_try) 2>&5
6570   ac_status=$?
6571   echo "$as_me:6571: \$? = $ac_status" >&5
6572   (exit $ac_status); }; }; then
6573   cf_result=yes
6574 else
6575   echo "$as_me: failed program was:" >&5
6576 cat conftest.$ac_ext >&5
6577 cf_result=no
6578 fi
6579 rm -f conftest.$ac_objext conftest.$ac_ext
6580         echo "$as_me:6580: result: $cf_result" >&5
6581 echo "${ECHO_T}$cf_result" >&6
6582         if test "$cf_result" = no ; then
6583                 # perhaps we can override it - try...
6584                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
6585         fi
6586 fi
6587
6588 echo "$as_me:6588: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6589 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6590 cat >conftest.$ac_ext <<_ACEOF
6591 #line 6591 "configure"
6592 #include "confdefs.h"
6593 #include <sys/types.h>
6594
6595 int
6596 main ()
6597 {
6598
6599 #ifndef _XOPEN_SOURCE_EXTENDED
6600 make an error
6601 #endif
6602   ;
6603   return 0;
6604 }
6605 _ACEOF
6606 rm -f conftest.$ac_objext
6607 if { (eval echo "$as_me:6607: \"$ac_compile\"") >&5
6608   (eval $ac_compile) 2>&5
6609   ac_status=$?
6610   echo "$as_me:6610: \$? = $ac_status" >&5
6611   (exit $ac_status); } &&
6612          { ac_try='test -s conftest.$ac_objext'
6613   { (eval echo "$as_me:6613: \"$ac_try\"") >&5
6614   (eval $ac_try) 2>&5
6615   ac_status=$?
6616   echo "$as_me:6616: \$? = $ac_status" >&5
6617   (exit $ac_status); }; }; then
6618   cf_result=no
6619 else
6620   echo "$as_me: failed program was:" >&5
6621 cat conftest.$ac_ext >&5
6622 cf_result=yes
6623 fi
6624 rm -f conftest.$ac_objext conftest.$ac_ext
6625 echo "$as_me:6625: result: $cf_result" >&5
6626 echo "${ECHO_T}$cf_result" >&6
6627
6628 if test "$cf_result" = yes ; then
6629         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6630 elif test "x" != "x" ; then
6631         echo "$as_me:6631: checking checking for compatible value versus " >&5
6632 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6633         cat >conftest.$ac_ext <<_ACEOF
6634 #line 6634 "configure"
6635 #include "confdefs.h"
6636 #include <sys/types.h>
6637
6638 int
6639 main ()
6640 {
6641
6642 #if _XOPEN_SOURCE_EXTENDED- < 0
6643 make an error
6644 #endif
6645   ;
6646   return 0;
6647 }
6648 _ACEOF
6649 rm -f conftest.$ac_objext
6650 if { (eval echo "$as_me:6650: \"$ac_compile\"") >&5
6651   (eval $ac_compile) 2>&5
6652   ac_status=$?
6653   echo "$as_me:6653: \$? = $ac_status" >&5
6654   (exit $ac_status); } &&
6655          { ac_try='test -s conftest.$ac_objext'
6656   { (eval echo "$as_me:6656: \"$ac_try\"") >&5
6657   (eval $ac_try) 2>&5
6658   ac_status=$?
6659   echo "$as_me:6659: \$? = $ac_status" >&5
6660   (exit $ac_status); }; }; then
6661   cf_result=yes
6662 else
6663   echo "$as_me: failed program was:" >&5
6664 cat conftest.$ac_ext >&5
6665 cf_result=no
6666 fi
6667 rm -f conftest.$ac_objext conftest.$ac_ext
6668         echo "$as_me:6668: result: $cf_result" >&5
6669 echo "${ECHO_T}$cf_result" >&6
6670         if test "$cf_result" = no ; then
6671                 # perhaps we can override it - try...
6672                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6673         fi
6674 fi
6675
6676         # with_overwrite=no
6677         NCURSES_CH_T=cchar_t
6678
6679 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6680 do
6681 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6682 echo "$as_me:6682: checking for $ac_func" >&5
6683 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6684 if eval "test \"\${$as_ac_var+set}\" = set"; then
6685   echo $ECHO_N "(cached) $ECHO_C" >&6
6686 else
6687   cat >conftest.$ac_ext <<_ACEOF
6688 #line 6688 "configure"
6689 #include "confdefs.h"
6690 /* System header to define __stub macros and hopefully few prototypes,
6691     which can conflict with char $ac_func (); below.  */
6692 #include <assert.h>
6693 /* Override any gcc2 internal prototype to avoid an error.  */
6694 #ifdef __cplusplus
6695 extern "C"
6696 #endif
6697 /* We use char because int might match the return type of a gcc2
6698    builtin and then its argument prototype would still apply.  */
6699 char $ac_func ();
6700 char (*f) ();
6701
6702 int
6703 main ()
6704 {
6705 /* The GNU C library defines this for functions which it implements
6706     to always fail with ENOSYS.  Some functions are actually named
6707     something starting with __ and the normal name is an alias.  */
6708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6709 choke me
6710 #else
6711 f = $ac_func;
6712 #endif
6713
6714   ;
6715   return 0;
6716 }
6717 _ACEOF
6718 rm -f conftest.$ac_objext conftest$ac_exeext
6719 if { (eval echo "$as_me:6719: \"$ac_link\"") >&5
6720   (eval $ac_link) 2>&5
6721   ac_status=$?
6722   echo "$as_me:6722: \$? = $ac_status" >&5
6723   (exit $ac_status); } &&
6724          { ac_try='test -s conftest$ac_exeext'
6725   { (eval echo "$as_me:6725: \"$ac_try\"") >&5
6726   (eval $ac_try) 2>&5
6727   ac_status=$?
6728   echo "$as_me:6728: \$? = $ac_status" >&5
6729   (exit $ac_status); }; }; then
6730   eval "$as_ac_var=yes"
6731 else
6732   echo "$as_me: failed program was:" >&5
6733 cat conftest.$ac_ext >&5
6734 eval "$as_ac_var=no"
6735 fi
6736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6737 fi
6738 echo "$as_me:6738: result: `eval echo '${'$as_ac_var'}'`" >&5
6739 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6740 if test `eval echo '${'$as_ac_var'}'` = yes; then
6741   cat >>confdefs.h <<EOF
6742 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6743 EOF
6744
6745 fi
6746 done
6747
6748         if test "$ac_cv_func_putwc" != yes ; then
6749
6750 echo "$as_me:6750: checking for putwc in libutf8" >&5
6751 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6752 if test "${cf_cv_libutf8+set}" = set; then
6753   echo $ECHO_N "(cached) $ECHO_C" >&6
6754 else
6755
6756         cf_save_LIBS="$LIBS"
6757         LIBS="-lutf8 $LIBS"
6758 cat >conftest.$ac_ext <<_ACEOF
6759 #line 6759 "configure"
6760 #include "confdefs.h"
6761
6762 #include <libutf8.h>
6763 int
6764 main ()
6765 {
6766 putwc(0,0);
6767   ;
6768   return 0;
6769 }
6770 _ACEOF
6771 rm -f conftest.$ac_objext conftest$ac_exeext
6772 if { (eval echo "$as_me:6772: \"$ac_link\"") >&5
6773   (eval $ac_link) 2>&5
6774   ac_status=$?
6775   echo "$as_me:6775: \$? = $ac_status" >&5
6776   (exit $ac_status); } &&
6777          { ac_try='test -s conftest$ac_exeext'
6778   { (eval echo "$as_me:6778: \"$ac_try\"") >&5
6779   (eval $ac_try) 2>&5
6780   ac_status=$?
6781   echo "$as_me:6781: \$? = $ac_status" >&5
6782   (exit $ac_status); }; }; then
6783   cf_cv_libutf8=yes
6784 else
6785   echo "$as_me: failed program was:" >&5
6786 cat conftest.$ac_ext >&5
6787 cf_cv_libutf8=no
6788 fi
6789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6790         LIBS="$cf_save_LIBS"
6791
6792 fi
6793 echo "$as_me:6793: result: $cf_cv_libutf8" >&5
6794 echo "${ECHO_T}$cf_cv_libutf8" >&6
6795
6796 if test "$cf_cv_libutf8" = yes ; then
6797         cat >>confdefs.h <<\EOF
6798 #define HAVE_LIBUTF8_H 1
6799 EOF
6800
6801         LIBS="-lutf8 $LIBS"
6802 fi
6803
6804                 if test "$cf_cv_libutf8" = yes ; then
6805                         NCURSES_LIBUTF8=1
6806                 fi
6807         fi
6808
6809 # This is needed on Tru64 5.0 to declare mbstate_t
6810 echo "$as_me:6810: checking if we must include wchar.h to declare mbstate_t" >&5
6811 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6812 if test "${cf_cv_mbstate_t+set}" = set; then
6813   echo $ECHO_N "(cached) $ECHO_C" >&6
6814 else
6815
6816 cat >conftest.$ac_ext <<_ACEOF
6817 #line 6817 "configure"
6818 #include "confdefs.h"
6819
6820 #include <stdlib.h>
6821 #include <stdarg.h>
6822 #include <stdio.h>
6823 #ifdef HAVE_LIBUTF8_H
6824 #include <libutf8.h>
6825 #endif
6826 int
6827 main ()
6828 {
6829 mbstate_t state
6830   ;
6831   return 0;
6832 }
6833 _ACEOF
6834 rm -f conftest.$ac_objext
6835 if { (eval echo "$as_me:6835: \"$ac_compile\"") >&5
6836   (eval $ac_compile) 2>&5
6837   ac_status=$?
6838   echo "$as_me:6838: \$? = $ac_status" >&5
6839   (exit $ac_status); } &&
6840          { ac_try='test -s conftest.$ac_objext'
6841   { (eval echo "$as_me:6841: \"$ac_try\"") >&5
6842   (eval $ac_try) 2>&5
6843   ac_status=$?
6844   echo "$as_me:6844: \$? = $ac_status" >&5
6845   (exit $ac_status); }; }; then
6846   cf_cv_mbstate_t=no
6847 else
6848   echo "$as_me: failed program was:" >&5
6849 cat conftest.$ac_ext >&5
6850 cat >conftest.$ac_ext <<_ACEOF
6851 #line 6851 "configure"
6852 #include "confdefs.h"
6853
6854 #include <stdlib.h>
6855 #include <stdarg.h>
6856 #include <stdio.h>
6857 #include <wchar.h>
6858 #ifdef HAVE_LIBUTF8_H
6859 #include <libutf8.h>
6860 #endif
6861 int
6862 main ()
6863 {
6864 mbstate_t value
6865   ;
6866   return 0;
6867 }
6868 _ACEOF
6869 rm -f conftest.$ac_objext
6870 if { (eval echo "$as_me:6870: \"$ac_compile\"") >&5
6871   (eval $ac_compile) 2>&5
6872   ac_status=$?
6873   echo "$as_me:6873: \$? = $ac_status" >&5
6874   (exit $ac_status); } &&
6875          { ac_try='test -s conftest.$ac_objext'
6876   { (eval echo "$as_me:6876: \"$ac_try\"") >&5
6877   (eval $ac_try) 2>&5
6878   ac_status=$?
6879   echo "$as_me:6879: \$? = $ac_status" >&5
6880   (exit $ac_status); }; }; then
6881   cf_cv_mbstate_t=yes
6882 else
6883   echo "$as_me: failed program was:" >&5
6884 cat conftest.$ac_ext >&5
6885 cf_cv_mbstate_t=unknown
6886 fi
6887 rm -f conftest.$ac_objext conftest.$ac_ext
6888 fi
6889 rm -f conftest.$ac_objext conftest.$ac_ext
6890 fi
6891 echo "$as_me:6891: result: $cf_cv_mbstate_t" >&5
6892 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
6893
6894 if test "$cf_cv_mbstate_t" = yes ; then
6895         cat >>confdefs.h <<\EOF
6896 #define NEED_WCHAR_H 1
6897 EOF
6898
6899         NEED_WCHAR_H=1
6900 fi
6901
6902 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
6903 if test "$cf_cv_mbstate_t" = unknown ; then
6904         NCURSES_MBSTATE_T=1
6905 fi
6906
6907 # This is needed on Tru64 5.0 to declare wchar_t
6908 echo "$as_me:6908: checking if we must include wchar.h to declare wchar_t" >&5
6909 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
6910 if test "${cf_cv_wchar_t+set}" = set; then
6911   echo $ECHO_N "(cached) $ECHO_C" >&6
6912 else
6913
6914 cat >conftest.$ac_ext <<_ACEOF
6915 #line 6915 "configure"
6916 #include "confdefs.h"
6917
6918 #include <stdlib.h>
6919 #include <stdarg.h>
6920 #include <stdio.h>
6921 #ifdef HAVE_LIBUTF8_H
6922 #include <libutf8.h>
6923 #endif
6924 int
6925 main ()
6926 {
6927 wchar_t state
6928   ;
6929   return 0;
6930 }
6931 _ACEOF
6932 rm -f conftest.$ac_objext
6933 if { (eval echo "$as_me:6933: \"$ac_compile\"") >&5
6934   (eval $ac_compile) 2>&5
6935   ac_status=$?
6936   echo "$as_me:6936: \$? = $ac_status" >&5
6937   (exit $ac_status); } &&
6938          { ac_try='test -s conftest.$ac_objext'
6939   { (eval echo "$as_me:6939: \"$ac_try\"") >&5
6940   (eval $ac_try) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit $ac_status); }; }; then
6944   cf_cv_wchar_t=no
6945 else
6946   echo "$as_me: failed program was:" >&5
6947 cat conftest.$ac_ext >&5
6948 cat >conftest.$ac_ext <<_ACEOF
6949 #line 6949 "configure"
6950 #include "confdefs.h"
6951
6952 #include <stdlib.h>
6953 #include <stdarg.h>
6954 #include <stdio.h>
6955 #include <wchar.h>
6956 #ifdef HAVE_LIBUTF8_H
6957 #include <libutf8.h>
6958 #endif
6959 int
6960 main ()
6961 {
6962 wchar_t value
6963   ;
6964   return 0;
6965 }
6966 _ACEOF
6967 rm -f conftest.$ac_objext
6968 if { (eval echo "$as_me:6968: \"$ac_compile\"") >&5
6969   (eval $ac_compile) 2>&5
6970   ac_status=$?
6971   echo "$as_me:6971: \$? = $ac_status" >&5
6972   (exit $ac_status); } &&
6973          { ac_try='test -s conftest.$ac_objext'
6974   { (eval echo "$as_me:6974: \"$ac_try\"") >&5
6975   (eval $ac_try) 2>&5
6976   ac_status=$?
6977   echo "$as_me:6977: \$? = $ac_status" >&5
6978   (exit $ac_status); }; }; then
6979   cf_cv_wchar_t=yes
6980 else
6981   echo "$as_me: failed program was:" >&5
6982 cat conftest.$ac_ext >&5
6983 cf_cv_wchar_t=unknown
6984 fi
6985 rm -f conftest.$ac_objext conftest.$ac_ext
6986 fi
6987 rm -f conftest.$ac_objext conftest.$ac_ext
6988 fi
6989 echo "$as_me:6989: result: $cf_cv_wchar_t" >&5
6990 echo "${ECHO_T}$cf_cv_wchar_t" >&6
6991
6992 if test "$cf_cv_wchar_t" = yes ; then
6993         cat >>confdefs.h <<\EOF
6994 #define NEED_WCHAR_H 1
6995 EOF
6996
6997         NEED_WCHAR_H=1
6998 fi
6999
7000 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7001 if test "$cf_cv_wchar_t" = unknown ; then
7002         NCURSES_WCHAR_T=1
7003 fi
7004
7005 # if we find wchar_t in either place, use substitution to provide a fallback.
7006 if test "$cf_cv_wchar_t" != unknown ; then
7007         NCURSES_OK_WCHAR_T=1
7008 fi
7009
7010 # This is needed on Tru64 5.0 to declare wint_t
7011 echo "$as_me:7011: checking if we must include wchar.h to declare wint_t" >&5
7012 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7013 if test "${cf_cv_wint_t+set}" = set; then
7014   echo $ECHO_N "(cached) $ECHO_C" >&6
7015 else
7016
7017 cat >conftest.$ac_ext <<_ACEOF
7018 #line 7018 "configure"
7019 #include "confdefs.h"
7020
7021 #include <stdlib.h>
7022 #include <stdarg.h>
7023 #include <stdio.h>
7024 #ifdef HAVE_LIBUTF8_H
7025 #include <libutf8.h>
7026 #endif
7027 int
7028 main ()
7029 {
7030 wint_t state
7031   ;
7032   return 0;
7033 }
7034 _ACEOF
7035 rm -f conftest.$ac_objext
7036 if { (eval echo "$as_me:7036: \"$ac_compile\"") >&5
7037   (eval $ac_compile) 2>&5
7038   ac_status=$?
7039   echo "$as_me:7039: \$? = $ac_status" >&5
7040   (exit $ac_status); } &&
7041          { ac_try='test -s conftest.$ac_objext'
7042   { (eval echo "$as_me:7042: \"$ac_try\"") >&5
7043   (eval $ac_try) 2>&5
7044   ac_status=$?
7045   echo "$as_me:7045: \$? = $ac_status" >&5
7046   (exit $ac_status); }; }; then
7047   cf_cv_wint_t=no
7048 else
7049   echo "$as_me: failed program was:" >&5
7050 cat conftest.$ac_ext >&5
7051 cat >conftest.$ac_ext <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054
7055 #include <stdlib.h>
7056 #include <stdarg.h>
7057 #include <stdio.h>
7058 #include <wchar.h>
7059 #ifdef HAVE_LIBUTF8_H
7060 #include <libutf8.h>
7061 #endif
7062 int
7063 main ()
7064 {
7065 wint_t value
7066   ;
7067   return 0;
7068 }
7069 _ACEOF
7070 rm -f conftest.$ac_objext
7071 if { (eval echo "$as_me:7071: \"$ac_compile\"") >&5
7072   (eval $ac_compile) 2>&5
7073   ac_status=$?
7074   echo "$as_me:7074: \$? = $ac_status" >&5
7075   (exit $ac_status); } &&
7076          { ac_try='test -s conftest.$ac_objext'
7077   { (eval echo "$as_me:7077: \"$ac_try\"") >&5
7078   (eval $ac_try) 2>&5
7079   ac_status=$?
7080   echo "$as_me:7080: \$? = $ac_status" >&5
7081   (exit $ac_status); }; }; then
7082   cf_cv_wint_t=yes
7083 else
7084   echo "$as_me: failed program was:" >&5
7085 cat conftest.$ac_ext >&5
7086 cf_cv_wint_t=unknown
7087 fi
7088 rm -f conftest.$ac_objext conftest.$ac_ext
7089 fi
7090 rm -f conftest.$ac_objext conftest.$ac_ext
7091 fi
7092 echo "$as_me:7092: result: $cf_cv_wint_t" >&5
7093 echo "${ECHO_T}$cf_cv_wint_t" >&6
7094
7095 if test "$cf_cv_wint_t" = yes ; then
7096         cat >>confdefs.h <<\EOF
7097 #define NEED_WCHAR_H 1
7098 EOF
7099
7100         NEED_WCHAR_H=1
7101 fi
7102
7103 # if we do not find wint_t in either place, use substitution to provide a fallback.
7104 if test "$cf_cv_wint_t" = unknown ; then
7105         NCURSES_WINT_T=1
7106 fi
7107
7108 # if we find wint_t in either place, use substitution to provide a fallback.
7109 if test "$cf_cv_wint_t" != unknown ; then
7110         NCURSES_OK_WINT_T=1
7111 fi
7112
7113 fi
7114
7115 echo "$as_me:7115: checking for terminal capabilities file" >&5
7116 echo $ECHO_N "checking for terminal capabilities file... $ECHO_C" >&6
7117
7118 # Check whether --with-caps or --without-caps was given.
7119 if test "${with_caps+set}" = set; then
7120   withval="$with_caps"
7121   TERMINFO_CAPS=Caps.$withval
7122 else
7123   TERMINFO_CAPS=Caps
7124 fi;
7125 test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
7126 echo "$as_me:7126: result: $TERMINFO_CAPS" >&5
7127 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7128
7129 ###############################################################################
7130
7131 ###     use option --disable-echo to suppress full display compiling commands
7132 echo "$as_me:7132: checking if you want to display full commands during build" >&5
7133 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
7134
7135 # Check whether --enable-echo or --disable-echo was given.
7136 if test "${enable_echo+set}" = set; then
7137   enableval="$enable_echo"
7138   with_echo=$enableval
7139 else
7140   with_echo=yes
7141 fi;
7142 if test "$with_echo" = yes; then
7143         ECHO_LINK=
7144 else
7145         ECHO_LINK='@ echo linking $@ ... ;'
7146         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
7147 fi
7148 echo "$as_me:7148: result: $with_echo" >&5
7149 echo "${ECHO_T}$with_echo" >&6
7150
7151 ###     use option --enable-warnings to turn on all gcc warnings
7152 echo "$as_me:7152: checking if you want to see compiler warnings" >&5
7153 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
7154
7155 # Check whether --enable-warnings or --disable-warnings was given.
7156 if test "${enable_warnings+set}" = set; then
7157   enableval="$enable_warnings"
7158   with_warnings=$enableval
7159 fi;
7160 echo "$as_me:7160: result: $with_warnings" >&5
7161 echo "${ECHO_T}$with_warnings" >&6
7162
7163 if test -n "$with_warnings"; then
7164         ADAFLAGS="$ADAFLAGS -gnatg"
7165
7166 if test "$GCC" = yes
7167 then
7168         cat > conftest.$ac_ext <<EOF
7169 #line 7169 "configure"
7170 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
7171 EOF
7172         { echo "$as_me:7172: checking for $CC warning options..." >&5
7173 echo "$as_me: checking for $CC warning options..." >&6;}
7174         cf_save_CFLAGS="$CFLAGS"
7175         EXTRA_CFLAGS="-W -Wall"
7176         cf_warn_CONST=""
7177         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
7178         for cf_opt in \
7179                 Wbad-function-cast \
7180                 Wcast-align \
7181                 Wcast-qual \
7182                 Winline \
7183                 Wmissing-declarations \
7184                 Wmissing-prototypes \
7185                 Wnested-externs \
7186                 Wpointer-arith \
7187                 Wshadow \
7188                 Wstrict-prototypes \
7189                 Wundef $cf_warn_CONST
7190         do
7191                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
7192                 if { (eval echo "$as_me:7192: \"$ac_compile\"") >&5
7193   (eval $ac_compile) 2>&5
7194   ac_status=$?
7195   echo "$as_me:7195: \$? = $ac_status" >&5
7196   (exit $ac_status); }; then
7197                         test -n "$verbose" && echo "$as_me:7197: result: ... -$cf_opt" >&5
7198 echo "${ECHO_T}... -$cf_opt" >&6
7199                         case $cf_opt in #(vi
7200                         Wcast-qual) #(vi
7201                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
7202                                 ;;
7203                         Winline) #(vi
7204                                 case $GCC_VERSION in
7205                                 3.3*)
7206                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
7207
7208                                         continue;;
7209                                 esac
7210                                 ;;
7211                         esac
7212                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
7213                 fi
7214         done
7215         rm -f conftest*
7216         CFLAGS="$cf_save_CFLAGS"
7217 fi
7218
7219 fi
7220
7221 if test "$GCC" = yes
7222 then
7223 cat > conftest.i <<EOF
7224 #ifndef GCC_PRINTF
7225 #define GCC_PRINTF 0
7226 #endif
7227 #ifndef GCC_SCANF
7228 #define GCC_SCANF 0
7229 #endif
7230 #ifndef GCC_NORETURN
7231 #define GCC_NORETURN /* nothing */
7232 #endif
7233 #ifndef GCC_UNUSED
7234 #define GCC_UNUSED /* nothing */
7235 #endif
7236 EOF
7237 if test "$GCC" = yes
7238 then
7239         { echo "$as_me:7239: checking for $CC __attribute__ directives..." >&5
7240 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
7241 cat > conftest.$ac_ext <<EOF
7242 #line 7242 "configure"
7243 #include "confdefs.h"
7244 #include "conftest.h"
7245 #include "conftest.i"
7246 #if     GCC_PRINTF
7247 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
7248 #else
7249 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
7250 #endif
7251 #if     GCC_SCANF
7252 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
7253 #else
7254 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
7255 #endif
7256 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
7257 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
7258 extern void foo(void) GCC_NORETURN;
7259 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
7260 EOF
7261         for cf_attribute in scanf printf unused noreturn
7262         do
7263
7264 CF_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7265
7266                 cf_directive="__attribute__(($cf_attribute))"
7267                 echo "checking for $CC $cf_directive" 1>&5
7268                 case $cf_attribute in
7269                 scanf|printf)
7270                 cat >conftest.h <<EOF
7271 #define GCC_$CF_ATTRIBUTE 1
7272 EOF
7273                         ;;
7274                 *)
7275                 cat >conftest.h <<EOF
7276 #define GCC_$CF_ATTRIBUTE $cf_directive
7277 EOF
7278                         ;;
7279                 esac
7280                 if { (eval echo "$as_me:7280: \"$ac_compile\"") >&5
7281   (eval $ac_compile) 2>&5
7282   ac_status=$?
7283   echo "$as_me:7283: \$? = $ac_status" >&5
7284   (exit $ac_status); }; then
7285                         test -n "$verbose" && echo "$as_me:7285: result: ... $cf_attribute" >&5
7286 echo "${ECHO_T}... $cf_attribute" >&6
7287                         cat conftest.h >>confdefs.h
7288                 fi
7289         done
7290 else
7291         fgrep define conftest.i >>confdefs.h
7292 fi
7293 rm -rf conftest*
7294 fi
7295
7296 ###     use option --enable-assertions to turn on generation of assertion code
7297 echo "$as_me:7297: checking if you want to enable runtime assertions" >&5
7298 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
7299
7300 # Check whether --enable-assertions or --disable-assertions was given.
7301 if test "${enable_assertions+set}" = set; then
7302   enableval="$enable_assertions"
7303   with_assertions=$enableval
7304 else
7305   with_assertions=no
7306 fi;
7307 echo "$as_me:7307: result: $with_assertions" >&5
7308 echo "${ECHO_T}$with_assertions" >&6
7309 if test -n "$GCC"
7310 then
7311         if test "$with_assertions" = no
7312         then
7313                 cat >>confdefs.h <<\EOF
7314 #define NDEBUG 1
7315 EOF
7316
7317                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
7318         else
7319                 ADAFLAGS="$ADAFLAGS -gnata"
7320         fi
7321 fi
7322
7323 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
7324
7325 # Check whether --enable-leaks or --disable-leaks was given.
7326 if test "${enable_leaks+set}" = set; then
7327   enableval="$enable_leaks"
7328   test "$enableval" = no && cat >>confdefs.h <<\EOF
7329 #define NO_LEAKS 1
7330 EOF
7331
7332 fi;
7333 cat >>confdefs.h <<\EOF
7334 #define HAVE_NC_ALLOC_H 1
7335 EOF
7336
7337 ###     use option --enable-expanded to generate certain macros as functions
7338
7339 # Check whether --enable-expanded or --disable-expanded was given.
7340 if test "${enable_expanded+set}" = set; then
7341   enableval="$enable_expanded"
7342   test "$enableval" = yes && cat >>confdefs.h <<\EOF
7343 #define NCURSES_EXPANDED 1
7344 EOF
7345
7346 fi;
7347
7348 ###     use option --disable-macros to suppress macros in favor of functions
7349
7350 # Check whether --enable-macros or --disable-macros was given.
7351 if test "${enable_macros+set}" = set; then
7352   enableval="$enable_macros"
7353   test "$enableval" = no && cat >>confdefs.h <<\EOF
7354 #define NCURSES_NOMACROS 1
7355 EOF
7356
7357 fi;
7358
7359 # Normally we only add trace() to the debug-library.  Allow this to be
7360 # extended to all models of the ncurses library:
7361 cf_all_traces=no
7362 case "$CFLAGS $CPPFLAGS" in
7363 *-DTRACE*)
7364         cf_all_traces=yes
7365         ;;
7366 esac
7367
7368 echo "$as_me:7368: checking whether to add trace feature to all models" >&5
7369 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
7370
7371 # Check whether --with-trace or --without-trace was given.
7372 if test "${with_trace+set}" = set; then
7373   withval="$with_trace"
7374   cf_with_trace=$withval
7375 else
7376   cf_with_trace=$cf_all_traces
7377 fi;
7378 echo "$as_me:7378: result: $with_trace" >&5
7379 echo "${ECHO_T}$with_trace" >&6
7380
7381 if test "$cf_with_trace" = yes ; then
7382         LIB_TRACING=all
7383         ADA_TRACE=TRUE
7384
7385 cf_new_cflags=
7386 cf_new_cppflags=
7387 for cf_add_cflags in -DTRACE
7388 do
7389         case $cf_add_cflags in #(vi
7390         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7391                 case "$CPPFLAGS" in
7392                 *$cf_add_cflags) #(vi
7393                         ;;
7394                 *) #(vi
7395                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7396                         ;;
7397                 esac
7398                 ;;
7399         *)
7400                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7401                 ;;
7402         esac
7403 done
7404
7405 if test -n "$cf_new_cflags" ; then
7406
7407         CFLAGS="$CFLAGS $cf_new_cflags"
7408 fi
7409
7410 if test -n "$cf_new_cppflags" ; then
7411
7412         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
7413 fi
7414
7415 else
7416         LIB_TRACING=DEBUG
7417         ADA_TRACE=FALSE
7418 fi
7419
7420 ###     Checks for libraries.
7421 echo "$as_me:7421: checking for gettimeofday" >&5
7422 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
7423 if test "${ac_cv_func_gettimeofday+set}" = set; then
7424   echo $ECHO_N "(cached) $ECHO_C" >&6
7425 else
7426   cat >conftest.$ac_ext <<_ACEOF
7427 #line 7427 "configure"
7428 #include "confdefs.h"
7429 /* System header to define __stub macros and hopefully few prototypes,
7430     which can conflict with char gettimeofday (); below.  */
7431 #include <assert.h>
7432 /* Override any gcc2 internal prototype to avoid an error.  */
7433 #ifdef __cplusplus
7434 extern "C"
7435 #endif
7436 /* We use char because int might match the return type of a gcc2
7437    builtin and then its argument prototype would still apply.  */
7438 char gettimeofday ();
7439 char (*f) ();
7440
7441 int
7442 main ()
7443 {
7444 /* The GNU C library defines this for functions which it implements
7445     to always fail with ENOSYS.  Some functions are actually named
7446     something starting with __ and the normal name is an alias.  */
7447 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
7448 choke me
7449 #else
7450 f = gettimeofday;
7451 #endif
7452
7453   ;
7454   return 0;
7455 }
7456 _ACEOF
7457 rm -f conftest.$ac_objext conftest$ac_exeext
7458 if { (eval echo "$as_me:7458: \"$ac_link\"") >&5
7459   (eval $ac_link) 2>&5
7460   ac_status=$?
7461   echo "$as_me:7461: \$? = $ac_status" >&5
7462   (exit $ac_status); } &&
7463          { ac_try='test -s conftest$ac_exeext'
7464   { (eval echo "$as_me:7464: \"$ac_try\"") >&5
7465   (eval $ac_try) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit $ac_status); }; }; then
7469   ac_cv_func_gettimeofday=yes
7470 else
7471   echo "$as_me: failed program was:" >&5
7472 cat conftest.$ac_ext >&5
7473 ac_cv_func_gettimeofday=no
7474 fi
7475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7476 fi
7477 echo "$as_me:7477: result: $ac_cv_func_gettimeofday" >&5
7478 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
7479 if test $ac_cv_func_gettimeofday = yes; then
7480   cat >>confdefs.h <<\EOF
7481 #define HAVE_GETTIMEOFDAY 1
7482 EOF
7483
7484 else
7485
7486 echo "$as_me:7486: checking for gettimeofday in -lbsd" >&5
7487 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
7488 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
7489   echo $ECHO_N "(cached) $ECHO_C" >&6
7490 else
7491   ac_check_lib_save_LIBS=$LIBS
7492 LIBS="-lbsd  $LIBS"
7493 cat >conftest.$ac_ext <<_ACEOF
7494 #line 7494 "configure"
7495 #include "confdefs.h"
7496
7497 /* Override any gcc2 internal prototype to avoid an error.  */
7498 #ifdef __cplusplus
7499 extern "C"
7500 #endif
7501 /* We use char because int might match the return type of a gcc2
7502    builtin and then its argument prototype would still apply.  */
7503 char gettimeofday ();
7504 int
7505 main ()
7506 {
7507 gettimeofday ();
7508   ;
7509   return 0;
7510 }
7511 _ACEOF
7512 rm -f conftest.$ac_objext conftest$ac_exeext
7513 if { (eval echo "$as_me:7513: \"$ac_link\"") >&5
7514   (eval $ac_link) 2>&5
7515   ac_status=$?
7516   echo "$as_me:7516: \$? = $ac_status" >&5
7517   (exit $ac_status); } &&
7518          { ac_try='test -s conftest$ac_exeext'
7519   { (eval echo "$as_me:7519: \"$ac_try\"") >&5
7520   (eval $ac_try) 2>&5
7521   ac_status=$?
7522   echo "$as_me:7522: \$? = $ac_status" >&5
7523   (exit $ac_status); }; }; then
7524   ac_cv_lib_bsd_gettimeofday=yes
7525 else
7526   echo "$as_me: failed program was:" >&5
7527 cat conftest.$ac_ext >&5
7528 ac_cv_lib_bsd_gettimeofday=no
7529 fi
7530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7531 LIBS=$ac_check_lib_save_LIBS
7532 fi
7533 echo "$as_me:7533: result: $ac_cv_lib_bsd_gettimeofday" >&5
7534 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
7535 if test $ac_cv_lib_bsd_gettimeofday = yes; then
7536   cat >>confdefs.h <<\EOF
7537 #define HAVE_GETTIMEOFDAY 1
7538 EOF
7539
7540         LIBS="$LIBS -lbsd"
7541 fi
7542
7543 fi
7544
7545 echo "$as_me:7545: checking if -lm needed for math functions" >&5
7546 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
7547 if test "${cf_cv_need_libm+set}" = set; then
7548   echo $ECHO_N "(cached) $ECHO_C" >&6
7549 else
7550
7551         cat >conftest.$ac_ext <<_ACEOF
7552 #line 7552 "configure"
7553 #include "confdefs.h"
7554
7555         #include <stdio.h>
7556         #include <math.h>
7557
7558 int
7559 main ()
7560 {
7561 double x = rand(); printf("result = %g\n", sin(x))
7562   ;
7563   return 0;
7564 }
7565 _ACEOF
7566 rm -f conftest.$ac_objext conftest$ac_exeext
7567 if { (eval echo "$as_me:7567: \"$ac_link\"") >&5
7568   (eval $ac_link) 2>&5
7569   ac_status=$?
7570   echo "$as_me:7570: \$? = $ac_status" >&5
7571   (exit $ac_status); } &&
7572          { ac_try='test -s conftest$ac_exeext'
7573   { (eval echo "$as_me:7573: \"$ac_try\"") >&5
7574   (eval $ac_try) 2>&5
7575   ac_status=$?
7576   echo "$as_me:7576: \$? = $ac_status" >&5
7577   (exit $ac_status); }; }; then
7578   cf_cv_need_libm=no
7579 else
7580   echo "$as_me: failed program was:" >&5
7581 cat conftest.$ac_ext >&5
7582 cf_cv_need_libm=yes
7583 fi
7584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7585 fi
7586 echo "$as_me:7586: result: $cf_cv_need_libm" >&5
7587 echo "${ECHO_T}$cf_cv_need_libm" >&6
7588 if test "$cf_cv_need_libm" = yes
7589 then
7590 MATH_LIB=-lm
7591 fi
7592
7593 ###     Checks for header files.
7594 echo "$as_me:7594: checking for ANSI C header files" >&5
7595 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7596 if test "${ac_cv_header_stdc+set}" = set; then
7597   echo $ECHO_N "(cached) $ECHO_C" >&6
7598 else
7599   cat >conftest.$ac_ext <<_ACEOF
7600 #line 7600 "configure"
7601 #include "confdefs.h"
7602 #include <stdlib.h>
7603 #include <stdarg.h>
7604 #include <string.h>
7605 #include <float.h>
7606
7607 _ACEOF
7608 if { (eval echo "$as_me:7608: \"$ac_cpp conftest.$ac_ext\"") >&5
7609   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7610   ac_status=$?
7611   egrep -v '^ *\+' conftest.er1 >conftest.err
7612   rm -f conftest.er1
7613   cat conftest.err >&5
7614   echo "$as_me:7614: \$? = $ac_status" >&5
7615   (exit $ac_status); } >/dev/null; then
7616   if test -s conftest.err; then
7617     ac_cpp_err=$ac_c_preproc_warn_flag
7618   else
7619     ac_cpp_err=
7620   fi
7621 else
7622   ac_cpp_err=yes
7623 fi
7624 if test -z "$ac_cpp_err"; then
7625   ac_cv_header_stdc=yes
7626 else
7627   echo "$as_me: failed program was:" >&5
7628   cat conftest.$ac_ext >&5
7629   ac_cv_header_stdc=no
7630 fi
7631 rm -f conftest.err conftest.$ac_ext
7632
7633 if test $ac_cv_header_stdc = yes; then
7634   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7635   cat >conftest.$ac_ext <<_ACEOF
7636 #line 7636 "configure"
7637 #include "confdefs.h"
7638 #include <string.h>
7639
7640 _ACEOF
7641 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7642   egrep "memchr" >/dev/null 2>&1; then
7643   :
7644 else
7645   ac_cv_header_stdc=no
7646 fi
7647 rm -f conftest*
7648
7649 fi
7650
7651 if test $ac_cv_header_stdc = yes; then
7652   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7653   cat >conftest.$ac_ext <<_ACEOF
7654 #line 7654 "configure"
7655 #include "confdefs.h"
7656 #include <stdlib.h>
7657
7658 _ACEOF
7659 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7660   egrep "free" >/dev/null 2>&1; then
7661   :
7662 else
7663   ac_cv_header_stdc=no
7664 fi
7665 rm -f conftest*
7666
7667 fi
7668
7669 if test $ac_cv_header_stdc = yes; then
7670   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7671   if test "$cross_compiling" = yes; then
7672   :
7673 else
7674   cat >conftest.$ac_ext <<_ACEOF
7675 #line 7675 "configure"
7676 #include "confdefs.h"
7677 #include <ctype.h>
7678 #if ((' ' & 0x0FF) == 0x020)
7679 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7680 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7681 #else
7682 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
7683                      || ('j' <= (c) && (c) <= 'r') \
7684                      || ('s' <= (c) && (c) <= 'z'))
7685 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7686 #endif
7687
7688 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7689 int
7690 main ()
7691 {
7692   int i;
7693   for (i = 0; i < 256; i++)
7694     if (XOR (islower (i), ISLOWER (i))
7695         || toupper (i) != TOUPPER (i))
7696       exit(2);
7697   exit (0);
7698 }
7699 _ACEOF
7700 rm -f conftest$ac_exeext
7701 if { (eval echo "$as_me:7701: \"$ac_link\"") >&5
7702   (eval $ac_link) 2>&5
7703   ac_status=$?
7704   echo "$as_me:7704: \$? = $ac_status" >&5
7705   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7706   { (eval echo "$as_me:7706: \"$ac_try\"") >&5
7707   (eval $ac_try) 2>&5
7708   ac_status=$?
7709   echo "$as_me:7709: \$? = $ac_status" >&5
7710   (exit $ac_status); }; }; then
7711   :
7712 else
7713   echo "$as_me: program exited with status $ac_status" >&5
7714 echo "$as_me: failed program was:" >&5
7715 cat conftest.$ac_ext >&5
7716 ac_cv_header_stdc=no
7717 fi
7718 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7719 fi
7720 fi
7721 fi
7722 echo "$as_me:7722: result: $ac_cv_header_stdc" >&5
7723 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7724 if test $ac_cv_header_stdc = yes; then
7725
7726 cat >>confdefs.h <<\EOF
7727 #define STDC_HEADERS 1
7728 EOF
7729
7730 fi
7731
7732 ac_header_dirent=no
7733 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7734   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7735 echo "$as_me:7735: checking for $ac_hdr that defines DIR" >&5
7736 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
7737 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7738   echo $ECHO_N "(cached) $ECHO_C" >&6
7739 else
7740   cat >conftest.$ac_ext <<_ACEOF
7741 #line 7741 "configure"
7742 #include "confdefs.h"
7743 #include <sys/types.h>
7744 #include <$ac_hdr>
7745
7746 int
7747 main ()
7748 {
7749 if ((DIR *) 0)
7750 return 0;
7751   ;
7752   return 0;
7753 }
7754 _ACEOF
7755 rm -f conftest.$ac_objext
7756 if { (eval echo "$as_me:7756: \"$ac_compile\"") >&5
7757   (eval $ac_compile) 2>&5
7758   ac_status=$?
7759   echo "$as_me:7759: \$? = $ac_status" >&5
7760   (exit $ac_status); } &&
7761          { ac_try='test -s conftest.$ac_objext'
7762   { (eval echo "$as_me:7762: \"$ac_try\"") >&5
7763   (eval $ac_try) 2>&5
7764   ac_status=$?
7765   echo "$as_me:7765: \$? = $ac_status" >&5
7766   (exit $ac_status); }; }; then
7767   eval "$as_ac_Header=yes"
7768 else
7769   echo "$as_me: failed program was:" >&5
7770 cat conftest.$ac_ext >&5
7771 eval "$as_ac_Header=no"
7772 fi
7773 rm -f conftest.$ac_objext conftest.$ac_ext
7774 fi
7775 echo "$as_me:7775: result: `eval echo '${'$as_ac_Header'}'`" >&5
7776 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7777 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7778   cat >>confdefs.h <<EOF
7779 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7780 EOF
7781
7782 ac_header_dirent=$ac_hdr; break
7783 fi
7784
7785 done
7786 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7787 if test $ac_header_dirent = dirent.h; then
7788   echo "$as_me:7788: checking for opendir in -ldir" >&5
7789 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
7790 if test "${ac_cv_lib_dir_opendir+set}" = set; then
7791   echo $ECHO_N "(cached) $ECHO_C" >&6
7792 else
7793   ac_check_lib_save_LIBS=$LIBS
7794 LIBS="-ldir  $LIBS"
7795 cat >conftest.$ac_ext <<_ACEOF
7796 #line 7796 "configure"
7797 #include "confdefs.h"
7798
7799 /* Override any gcc2 internal prototype to avoid an error.  */
7800 #ifdef __cplusplus
7801 extern "C"
7802 #endif
7803 /* We use char because int might match the return type of a gcc2
7804    builtin and then its argument prototype would still apply.  */
7805 char opendir ();
7806 int
7807 main ()
7808 {
7809 opendir ();
7810   ;
7811   return 0;
7812 }
7813 _ACEOF
7814 rm -f conftest.$ac_objext conftest$ac_exeext
7815 if { (eval echo "$as_me:7815: \"$ac_link\"") >&5
7816   (eval $ac_link) 2>&5
7817   ac_status=$?
7818   echo "$as_me:7818: \$? = $ac_status" >&5
7819   (exit $ac_status); } &&
7820          { ac_try='test -s conftest$ac_exeext'
7821   { (eval echo "$as_me:7821: \"$ac_try\"") >&5
7822   (eval $ac_try) 2>&5
7823   ac_status=$?
7824   echo "$as_me:7824: \$? = $ac_status" >&5
7825   (exit $ac_status); }; }; then
7826   ac_cv_lib_dir_opendir=yes
7827 else
7828   echo "$as_me: failed program was:" >&5
7829 cat conftest.$ac_ext >&5
7830 ac_cv_lib_dir_opendir=no
7831 fi
7832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7833 LIBS=$ac_check_lib_save_LIBS
7834 fi
7835 echo "$as_me:7835: result: $ac_cv_lib_dir_opendir" >&5
7836 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
7837 if test $ac_cv_lib_dir_opendir = yes; then
7838   LIBS="$LIBS -ldir"
7839 fi
7840
7841 else
7842   echo "$as_me:7842: checking for opendir in -lx" >&5
7843 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
7844 if test "${ac_cv_lib_x_opendir+set}" = set; then
7845   echo $ECHO_N "(cached) $ECHO_C" >&6
7846 else
7847   ac_check_lib_save_LIBS=$LIBS
7848 LIBS="-lx  $LIBS"
7849 cat >conftest.$ac_ext <<_ACEOF
7850 #line 7850 "configure"
7851 #include "confdefs.h"
7852
7853 /* Override any gcc2 internal prototype to avoid an error.  */
7854 #ifdef __cplusplus
7855 extern "C"
7856 #endif
7857 /* We use char because int might match the return type of a gcc2
7858    builtin and then its argument prototype would still apply.  */
7859 char opendir ();
7860 int
7861 main ()
7862 {
7863 opendir ();
7864   ;
7865   return 0;
7866 }
7867 _ACEOF
7868 rm -f conftest.$ac_objext conftest$ac_exeext
7869 if { (eval echo "$as_me:7869: \"$ac_link\"") >&5
7870   (eval $ac_link) 2>&5
7871   ac_status=$?
7872   echo "$as_me:7872: \$? = $ac_status" >&5
7873   (exit $ac_status); } &&
7874          { ac_try='test -s conftest$ac_exeext'
7875   { (eval echo "$as_me:7875: \"$ac_try\"") >&5
7876   (eval $ac_try) 2>&5
7877   ac_status=$?
7878   echo "$as_me:7878: \$? = $ac_status" >&5
7879   (exit $ac_status); }; }; then
7880   ac_cv_lib_x_opendir=yes
7881 else
7882   echo "$as_me: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7884 ac_cv_lib_x_opendir=no
7885 fi
7886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7887 LIBS=$ac_check_lib_save_LIBS
7888 fi
7889 echo "$as_me:7889: result: $ac_cv_lib_x_opendir" >&5
7890 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
7891 if test $ac_cv_lib_x_opendir = yes; then
7892   LIBS="$LIBS -lx"
7893 fi
7894
7895 fi
7896
7897 echo "$as_me:7897: checking whether time.h and sys/time.h may both be included" >&5
7898 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
7899 if test "${ac_cv_header_time+set}" = set; then
7900   echo $ECHO_N "(cached) $ECHO_C" >&6
7901 else
7902   cat >conftest.$ac_ext <<_ACEOF
7903 #line 7903 "configure"
7904 #include "confdefs.h"
7905 #include <sys/types.h>
7906 #include <sys/time.h>
7907 #include <time.h>
7908
7909 int
7910 main ()
7911 {
7912 if ((struct tm *) 0)
7913 return 0;
7914   ;
7915   return 0;
7916 }
7917 _ACEOF
7918 rm -f conftest.$ac_objext
7919 if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
7920   (eval $ac_compile) 2>&5
7921   ac_status=$?
7922   echo "$as_me:7922: \$? = $ac_status" >&5
7923   (exit $ac_status); } &&
7924          { ac_try='test -s conftest.$ac_objext'
7925   { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:7928: \$? = $ac_status" >&5
7929   (exit $ac_status); }; }; then
7930   ac_cv_header_time=yes
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934 ac_cv_header_time=no
7935 fi
7936 rm -f conftest.$ac_objext conftest.$ac_ext
7937 fi
7938 echo "$as_me:7938: result: $ac_cv_header_time" >&5
7939 echo "${ECHO_T}$ac_cv_header_time" >&6
7940 if test $ac_cv_header_time = yes; then
7941
7942 cat >>confdefs.h <<\EOF
7943 #define TIME_WITH_SYS_TIME 1
7944 EOF
7945
7946 fi
7947
7948 echo "$as_me:7948: checking for regular-expression headers" >&5
7949 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
7950 if test "${cf_cv_regex+set}" = set; then
7951   echo $ECHO_N "(cached) $ECHO_C" >&6
7952 else
7953
7954 cat >conftest.$ac_ext <<_ACEOF
7955 #line 7955 "configure"
7956 #include "confdefs.h"
7957 #include <sys/types.h>
7958 #include <regex.h>
7959 int
7960 main ()
7961 {
7962
7963         regex_t *p;
7964         int x = regcomp(p, "", 0);
7965         int y = regexec(p, "", 0, 0, 0);
7966         regfree(p);
7967
7968   ;
7969   return 0;
7970 }
7971 _ACEOF
7972 rm -f conftest.$ac_objext conftest$ac_exeext
7973 if { (eval echo "$as_me:7973: \"$ac_link\"") >&5
7974   (eval $ac_link) 2>&5
7975   ac_status=$?
7976   echo "$as_me:7976: \$? = $ac_status" >&5
7977   (exit $ac_status); } &&
7978          { ac_try='test -s conftest$ac_exeext'
7979   { (eval echo "$as_me:7979: \"$ac_try\"") >&5
7980   (eval $ac_try) 2>&5
7981   ac_status=$?
7982   echo "$as_me:7982: \$? = $ac_status" >&5
7983   (exit $ac_status); }; }; then
7984   cf_cv_regex="regex.h"
7985 else
7986   echo "$as_me: failed program was:" >&5
7987 cat conftest.$ac_ext >&5
7988
7989         cat >conftest.$ac_ext <<_ACEOF
7990 #line 7990 "configure"
7991 #include "confdefs.h"
7992 #include <regexp.h>
7993 int
7994 main ()
7995 {
7996
7997                 char *p = compile("", "", "", 0);
7998                 int x = step("", "");
7999
8000   ;
8001   return 0;
8002 }
8003 _ACEOF
8004 rm -f conftest.$ac_objext conftest$ac_exeext
8005 if { (eval echo "$as_me:8005: \"$ac_link\"") >&5
8006   (eval $ac_link) 2>&5
8007   ac_status=$?
8008   echo "$as_me:8008: \$? = $ac_status" >&5
8009   (exit $ac_status); } &&
8010          { ac_try='test -s conftest$ac_exeext'
8011   { (eval echo "$as_me:8011: \"$ac_try\"") >&5
8012   (eval $ac_try) 2>&5
8013   ac_status=$?
8014   echo "$as_me:8014: \$? = $ac_status" >&5
8015   (exit $ac_status); }; }; then
8016   cf_cv_regex="regexp.h"
8017 else
8018   echo "$as_me: failed program was:" >&5
8019 cat conftest.$ac_ext >&5
8020
8021                 cf_save_LIBS="$LIBS"
8022                 LIBS="-lgen $LIBS"
8023                 cat >conftest.$ac_ext <<_ACEOF
8024 #line 8024 "configure"
8025 #include "confdefs.h"
8026 #include <regexpr.h>
8027 int
8028 main ()
8029 {
8030
8031                         char *p = compile("", "", "");
8032                         int x = step("", "");
8033
8034   ;
8035   return 0;
8036 }
8037 _ACEOF
8038 rm -f conftest.$ac_objext conftest$ac_exeext
8039 if { (eval echo "$as_me:8039: \"$ac_link\"") >&5
8040   (eval $ac_link) 2>&5
8041   ac_status=$?
8042   echo "$as_me:8042: \$? = $ac_status" >&5
8043   (exit $ac_status); } &&
8044          { ac_try='test -s conftest$ac_exeext'
8045   { (eval echo "$as_me:8045: \"$ac_try\"") >&5
8046   (eval $ac_try) 2>&5
8047   ac_status=$?
8048   echo "$as_me:8048: \$? = $ac_status" >&5
8049   (exit $ac_status); }; }; then
8050   cf_cv_regex="regexpr.h"
8051 else
8052   echo "$as_me: failed program was:" >&5
8053 cat conftest.$ac_ext >&5
8054 LIBS="$cf_save_LIBS"
8055 fi
8056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8057 fi
8058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8059 fi
8060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8061
8062 fi
8063
8064 echo "$as_me:8064: result: $cf_cv_regex" >&5
8065 echo "${ECHO_T}$cf_cv_regex" >&6
8066 case $cf_cv_regex in
8067         regex.h)   cat >>confdefs.h <<\EOF
8068 #define HAVE_REGEX_H_FUNCS 1
8069 EOF
8070  ;;
8071         regexp.h)  cat >>confdefs.h <<\EOF
8072 #define HAVE_REGEXP_H_FUNCS 1
8073 EOF
8074  ;;
8075         regexpr.h) cat >>confdefs.h <<\EOF
8076 #define HAVE_REGEXPR_H_FUNCS 1
8077 EOF
8078  ;;
8079 esac
8080
8081 for ac_header in \
8082 fcntl.h \
8083 getopt.h \
8084 libc.h \
8085 limits.h \
8086 locale.h \
8087 poll.h \
8088 sys/bsdtypes.h \
8089 sys/ioctl.h \
8090 sys/param.h \
8091 sys/poll.h \
8092 sys/select.h \
8093 sys/time.h \
8094 sys/times.h \
8095 ttyent.h \
8096 unistd.h \
8097 wctype.h
8098 do
8099 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8100 echo "$as_me:8100: checking for $ac_header" >&5
8101 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8102 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8103   echo $ECHO_N "(cached) $ECHO_C" >&6
8104 else
8105   cat >conftest.$ac_ext <<_ACEOF
8106 #line 8106 "configure"
8107 #include "confdefs.h"
8108 #include <$ac_header>
8109 _ACEOF
8110 if { (eval echo "$as_me:8110: \"$ac_cpp conftest.$ac_ext\"") >&5
8111   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8112   ac_status=$?
8113   egrep -v '^ *\+' conftest.er1 >conftest.err
8114   rm -f conftest.er1
8115   cat conftest.err >&5
8116   echo "$as_me:8116: \$? = $ac_status" >&5
8117   (exit $ac_status); } >/dev/null; then
8118   if test -s conftest.err; then
8119     ac_cpp_err=$ac_c_preproc_warn_flag
8120   else
8121     ac_cpp_err=
8122   fi
8123 else
8124   ac_cpp_err=yes
8125 fi
8126 if test -z "$ac_cpp_err"; then
8127   eval "$as_ac_Header=yes"
8128 else
8129   echo "$as_me: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   eval "$as_ac_Header=no"
8132 fi
8133 rm -f conftest.err conftest.$ac_ext
8134 fi
8135 echo "$as_me:8135: result: `eval echo '${'$as_ac_Header'}'`" >&5
8136 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8137 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8138   cat >>confdefs.h <<EOF
8139 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8140 EOF
8141
8142 fi
8143 done
8144
8145 # check for ISC (this may also define _POSIX_SOURCE)
8146 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
8147 if test "$ISC" = yes ; then
8148
8149 echo "$as_me:8149: checking for main in -lcposix" >&5
8150 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
8151 if test "${ac_cv_lib_cposix_main+set}" = set; then
8152   echo $ECHO_N "(cached) $ECHO_C" >&6
8153 else
8154   ac_check_lib_save_LIBS=$LIBS
8155 LIBS="-lcposix  $LIBS"
8156 cat >conftest.$ac_ext <<_ACEOF
8157 #line 8157 "configure"
8158 #include "confdefs.h"
8159
8160 int
8161 main ()
8162 {
8163 main ();
8164   ;
8165   return 0;
8166 }
8167 _ACEOF
8168 rm -f conftest.$ac_objext conftest$ac_exeext
8169 if { (eval echo "$as_me:8169: \"$ac_link\"") >&5
8170   (eval $ac_link) 2>&5
8171   ac_status=$?
8172   echo "$as_me:8172: \$? = $ac_status" >&5
8173   (exit $ac_status); } &&
8174          { ac_try='test -s conftest$ac_exeext'
8175   { (eval echo "$as_me:8175: \"$ac_try\"") >&5
8176   (eval $ac_try) 2>&5
8177   ac_status=$?
8178   echo "$as_me:8178: \$? = $ac_status" >&5
8179   (exit $ac_status); }; }; then
8180   ac_cv_lib_cposix_main=yes
8181 else
8182   echo "$as_me: failed program was:" >&5
8183 cat conftest.$ac_ext >&5
8184 ac_cv_lib_cposix_main=no
8185 fi
8186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8187 LIBS=$ac_check_lib_save_LIBS
8188 fi
8189 echo "$as_me:8189: result: $ac_cv_lib_cposix_main" >&5
8190 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
8191 if test $ac_cv_lib_cposix_main = yes; then
8192   cat >>confdefs.h <<EOF
8193 #define HAVE_LIBCPOSIX 1
8194 EOF
8195
8196   LIBS="-lcposix $LIBS"
8197
8198 fi
8199
8200         echo "$as_me:8200: checking for bzero in -linet" >&5
8201 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
8202 if test "${ac_cv_lib_inet_bzero+set}" = set; then
8203   echo $ECHO_N "(cached) $ECHO_C" >&6
8204 else
8205   ac_check_lib_save_LIBS=$LIBS
8206 LIBS="-linet  $LIBS"
8207 cat >conftest.$ac_ext <<_ACEOF
8208 #line 8208 "configure"
8209 #include "confdefs.h"
8210
8211 /* Override any gcc2 internal prototype to avoid an error.  */
8212 #ifdef __cplusplus
8213 extern "C"
8214 #endif
8215 /* We use char because int might match the return type of a gcc2
8216    builtin and then its argument prototype would still apply.  */
8217 char bzero ();
8218 int
8219 main ()
8220 {
8221 bzero ();
8222   ;
8223   return 0;
8224 }
8225 _ACEOF
8226 rm -f conftest.$ac_objext conftest$ac_exeext
8227 if { (eval echo "$as_me:8227: \"$ac_link\"") >&5
8228   (eval $ac_link) 2>&5
8229   ac_status=$?
8230   echo "$as_me:8230: \$? = $ac_status" >&5
8231   (exit $ac_status); } &&
8232          { ac_try='test -s conftest$ac_exeext'
8233   { (eval echo "$as_me:8233: \"$ac_try\"") >&5
8234   (eval $ac_try) 2>&5
8235   ac_status=$?
8236   echo "$as_me:8236: \$? = $ac_status" >&5
8237   (exit $ac_status); }; }; then
8238   ac_cv_lib_inet_bzero=yes
8239 else
8240   echo "$as_me: failed program was:" >&5
8241 cat conftest.$ac_ext >&5
8242 ac_cv_lib_inet_bzero=no
8243 fi
8244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8245 LIBS=$ac_check_lib_save_LIBS
8246 fi
8247 echo "$as_me:8247: result: $ac_cv_lib_inet_bzero" >&5
8248 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
8249 if test $ac_cv_lib_inet_bzero = yes; then
8250   LIBS="$LIBS -linet"
8251 fi
8252 fi
8253
8254 echo "$as_me:8254: checking if sys/time.h works with sys/select.h" >&5
8255 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
8256 if test "${cf_cv_sys_time_select+set}" = set; then
8257   echo $ECHO_N "(cached) $ECHO_C" >&6
8258 else
8259
8260 cat >conftest.$ac_ext <<_ACEOF
8261 #line 8261 "configure"
8262 #include "confdefs.h"
8263
8264 #include <sys/types.h>
8265 #ifdef HAVE_SYS_TIME_H
8266 #include <sys/time.h>
8267 #endif
8268 #ifdef HAVE_SYS_SELECT_H
8269 #include <sys/select.h>
8270 #endif
8271
8272 int
8273 main ()
8274 {
8275
8276   ;
8277   return 0;
8278 }
8279 _ACEOF
8280 rm -f conftest.$ac_objext
8281 if { (eval echo "$as_me:8281: \"$ac_compile\"") >&5
8282   (eval $ac_compile) 2>&5
8283   ac_status=$?
8284   echo "$as_me:8284: \$? = $ac_status" >&5
8285   (exit $ac_status); } &&
8286          { ac_try='test -s conftest.$ac_objext'
8287   { (eval echo "$as_me:8287: \"$ac_try\"") >&5
8288   (eval $ac_try) 2>&5
8289   ac_status=$?
8290   echo "$as_me:8290: \$? = $ac_status" >&5
8291   (exit $ac_status); }; }; then
8292   cf_cv_sys_time_select=yes
8293 else
8294   echo "$as_me: failed program was:" >&5
8295 cat conftest.$ac_ext >&5
8296 cf_cv_sys_time_select=no
8297 fi
8298 rm -f conftest.$ac_objext conftest.$ac_ext
8299
8300 fi
8301
8302 echo "$as_me:8302: result: $cf_cv_sys_time_select" >&5
8303 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
8304 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
8305 #define HAVE_SYS_TIME_SELECT 1
8306 EOF
8307
8308 ###     checks for compiler characteristics
8309 ac_ext=c
8310 ac_cpp='$CPP $CPPFLAGS'
8311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8314
8315 echo "$as_me:8315: checking for $CC option to accept ANSI C" >&5
8316 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
8317 if test "${ac_cv_prog_cc_stdc+set}" = set; then
8318   echo $ECHO_N "(cached) $ECHO_C" >&6
8319 else
8320   ac_cv_prog_cc_stdc=no
8321 ac_save_CC=$CC
8322 cat >conftest.$ac_ext <<_ACEOF
8323 #line 8323 "configure"
8324 #include "confdefs.h"
8325 #include <stdarg.h>
8326 #include <stdio.h>
8327 #include <sys/types.h>
8328 #include <sys/stat.h>
8329 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8330 struct buf { int x; };
8331 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8332 static char *e (p, i)
8333      char **p;
8334      int i;
8335 {
8336   return p[i];
8337 }
8338 static char *f (char * (*g) (char **, int), char **p, ...)
8339 {
8340   char *s;
8341   va_list v;
8342   va_start (v,p);
8343   s = g (p, va_arg (v,int));
8344   va_end (v);
8345   return s;
8346 }
8347 int test (int i, double x);
8348 struct s1 {int (*f) (int a);};
8349 struct s2 {int (*f) (double a);};
8350 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8351 int argc;
8352 char **argv;
8353 int
8354 main ()
8355 {
8356 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8357   ;
8358   return 0;
8359 }
8360 _ACEOF
8361 # Don't try gcc -ansi; that turns off useful extensions and
8362 # breaks some systems' header files.
8363 # AIX                   -qlanglvl=ansi
8364 # Ultrix and OSF/1      -std1
8365 # HP-UX 10.20 and later -Ae
8366 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8367 # SVR4                  -Xc -D__EXTENSIONS__
8368 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8369 do
8370   CC="$ac_save_CC $ac_arg"
8371   rm -f conftest.$ac_objext
8372 if { (eval echo "$as_me:8372: \"$ac_compile\"") >&5
8373   (eval $ac_compile) 2>&5
8374   ac_status=$?
8375   echo "$as_me:8375: \$? = $ac_status" >&5
8376   (exit $ac_status); } &&
8377          { ac_try='test -s conftest.$ac_objext'
8378   { (eval echo "$as_me:8378: \"$ac_try\"") >&5
8379   (eval $ac_try) 2>&5
8380   ac_status=$?
8381   echo "$as_me:8381: \$? = $ac_status" >&5
8382   (exit $ac_status); }; }; then
8383   ac_cv_prog_cc_stdc=$ac_arg
8384 break
8385 else
8386   echo "$as_me: failed program was:" >&5
8387 cat conftest.$ac_ext >&5
8388 fi
8389 rm -f conftest.$ac_objext
8390 done
8391 rm -f conftest.$ac_ext conftest.$ac_objext
8392 CC=$ac_save_CC
8393
8394 fi
8395
8396 case "x$ac_cv_prog_cc_stdc" in
8397   x|xno)
8398     echo "$as_me:8398: result: none needed" >&5
8399 echo "${ECHO_T}none needed" >&6 ;;
8400   *)
8401     echo "$as_me:8401: result: $ac_cv_prog_cc_stdc" >&5
8402 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
8403     CC="$CC $ac_cv_prog_cc_stdc" ;;
8404 esac
8405
8406 echo "$as_me:8406: checking for an ANSI C-conforming const" >&5
8407 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
8408 if test "${ac_cv_c_const+set}" = set; then
8409   echo $ECHO_N "(cached) $ECHO_C" >&6
8410 else
8411   cat >conftest.$ac_ext <<_ACEOF
8412 #line 8412 "configure"
8413 #include "confdefs.h"
8414
8415 int
8416 main ()
8417 {
8418 /* FIXME: Include the comments suggested by Paul. */
8419 #ifndef __cplusplus
8420   /* Ultrix mips cc rejects this.  */
8421   typedef int charset[2];
8422   const charset x;
8423   /* SunOS 4.1.1 cc rejects this.  */
8424   char const *const *ccp;
8425   char **p;
8426   /* NEC SVR4.0.2 mips cc rejects this.  */
8427   struct point {int x, y;};
8428   static struct point const zero = {0,0};
8429   /* AIX XL C 1.02.0.0 rejects this.
8430      It does not let you subtract one const X* pointer from another in
8431      an arm of an if-expression whose if-part is not a constant
8432      expression */
8433   const char *g = "string";
8434   ccp = &g + (g ? g-g : 0);
8435   /* HPUX 7.0 cc rejects these. */
8436   ++ccp;
8437   p = (char**) ccp;
8438   ccp = (char const *const *) p;
8439   { /* SCO 3.2v4 cc rejects this.  */
8440     char *t;
8441     char const *s = 0 ? (char *) 0 : (char const *) 0;
8442
8443     *t++ = 0;
8444   }
8445   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8446     int x[] = {25, 17};
8447     const int *foo = &x[0];
8448     ++foo;
8449   }
8450   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8451     typedef const int *iptr;
8452     iptr p = 0;
8453     ++p;
8454   }
8455   { /* AIX XL C 1.02.0.0 rejects this saying
8456        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8457     struct s { int j; const int *ap[3]; };
8458     struct s *b; b->j = 5;
8459   }
8460   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8461     const int foo = 10;
8462   }
8463 #endif
8464
8465   ;
8466   return 0;
8467 }
8468 _ACEOF
8469 rm -f conftest.$ac_objext
8470 if { (eval echo "$as_me:8470: \"$ac_compile\"") >&5
8471   (eval $ac_compile) 2>&5
8472   ac_status=$?
8473   echo "$as_me:8473: \$? = $ac_status" >&5
8474   (exit $ac_status); } &&
8475          { ac_try='test -s conftest.$ac_objext'
8476   { (eval echo "$as_me:8476: \"$ac_try\"") >&5
8477   (eval $ac_try) 2>&5
8478   ac_status=$?
8479   echo "$as_me:8479: \$? = $ac_status" >&5
8480   (exit $ac_status); }; }; then
8481   ac_cv_c_const=yes
8482 else
8483   echo "$as_me: failed program was:" >&5
8484 cat conftest.$ac_ext >&5
8485 ac_cv_c_const=no
8486 fi
8487 rm -f conftest.$ac_objext conftest.$ac_ext
8488 fi
8489 echo "$as_me:8489: result: $ac_cv_c_const" >&5
8490 echo "${ECHO_T}$ac_cv_c_const" >&6
8491 if test $ac_cv_c_const = no; then
8492
8493 cat >>confdefs.h <<\EOF
8494 #define const
8495 EOF
8496
8497 fi
8498
8499 echo "$as_me:8499: checking for inline" >&5
8500 echo $ECHO_N "checking for inline... $ECHO_C" >&6
8501 if test "${ac_cv_c_inline+set}" = set; then
8502   echo $ECHO_N "(cached) $ECHO_C" >&6
8503 else
8504   ac_cv_c_inline=no
8505 for ac_kw in inline __inline__ __inline; do
8506   cat >conftest.$ac_ext <<_ACEOF
8507 #line 8507 "configure"
8508 #include "confdefs.h"
8509 #ifndef __cplusplus
8510 static $ac_kw int static_foo () {return 0; }
8511 $ac_kw int foo () {return 0; }
8512 #endif
8513
8514 _ACEOF
8515 rm -f conftest.$ac_objext
8516 if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
8517   (eval $ac_compile) 2>&5
8518   ac_status=$?
8519   echo "$as_me:8519: \$? = $ac_status" >&5
8520   (exit $ac_status); } &&
8521          { ac_try='test -s conftest.$ac_objext'
8522   { (eval echo "$as_me:8522: \"$ac_try\"") >&5
8523   (eval $ac_try) 2>&5
8524   ac_status=$?
8525   echo "$as_me:8525: \$? = $ac_status" >&5
8526   (exit $ac_status); }; }; then
8527   ac_cv_c_inline=$ac_kw; break
8528 else
8529   echo "$as_me: failed program was:" >&5
8530 cat conftest.$ac_ext >&5
8531 fi
8532 rm -f conftest.$ac_objext conftest.$ac_ext
8533 done
8534
8535 fi
8536 echo "$as_me:8536: result: $ac_cv_c_inline" >&5
8537 echo "${ECHO_T}$ac_cv_c_inline" >&6
8538 case $ac_cv_c_inline in
8539   inline | yes) ;;
8540   no)
8541 cat >>confdefs.h <<\EOF
8542 #define inline
8543 EOF
8544  ;;
8545   *)  cat >>confdefs.h <<EOF
8546 #define inline $ac_cv_c_inline
8547 EOF
8548  ;;
8549 esac
8550
8551 test "$ac_cv_c_inline" != no && cat >>confdefs.h <<\EOF
8552 #define CC_HAS_INLINE_FUNCS 1
8553 EOF
8554
8555 echo "$as_me:8555: checking if unsigned literals are legal" >&5
8556 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
8557 if test "${cf_cv_unsigned_literals+set}" = set; then
8558   echo $ECHO_N "(cached) $ECHO_C" >&6
8559 else
8560
8561         cat >conftest.$ac_ext <<_ACEOF
8562 #line 8562 "configure"
8563 #include "confdefs.h"
8564
8565 int
8566 main ()
8567 {
8568 long x = 1L + 1UL + 1U + 1
8569   ;
8570   return 0;
8571 }
8572 _ACEOF
8573 rm -f conftest.$ac_objext
8574 if { (eval echo "$as_me:8574: \"$ac_compile\"") >&5
8575   (eval $ac_compile) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); } &&
8579          { ac_try='test -s conftest.$ac_objext'
8580   { (eval echo "$as_me:8580: \"$ac_try\"") >&5
8581   (eval $ac_try) 2>&5
8582   ac_status=$?
8583   echo "$as_me:8583: \$? = $ac_status" >&5
8584   (exit $ac_status); }; }; then
8585   cf_cv_unsigned_literals=yes
8586 else
8587   echo "$as_me: failed program was:" >&5
8588 cat conftest.$ac_ext >&5
8589 cf_cv_unsigned_literals=no
8590 fi
8591 rm -f conftest.$ac_objext conftest.$ac_ext
8592
8593 fi
8594
8595 echo "$as_me:8595: result: $cf_cv_unsigned_literals" >&5
8596 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
8597
8598 echo "$as_me:8598: checking for type of chtype" >&5
8599 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8600 if test "${cf_cv_typeof_chtype+set}" = set; then
8601   echo $ECHO_N "(cached) $ECHO_C" >&6
8602 else
8603
8604                 if test "$cross_compiling" = yes; then
8605   cf_cv_typeof_chtype=long
8606 else
8607   cat >conftest.$ac_ext <<_ACEOF
8608 #line 8608 "configure"
8609 #include "confdefs.h"
8610
8611 #ifdef USE_WIDEC_SUPPORT
8612 #include <stddef.h>     /* we want wchar_t */
8613 #define WANT_BITS 39
8614 #else
8615 #define WANT_BITS 31
8616 #endif
8617 #include <stdio.h>
8618 int main()
8619 {
8620         FILE *fp = fopen("cf_test.out", "w");
8621         if (fp != 0) {
8622                 char *result = "long";
8623 #ifdef USE_WIDEC_SUPPORT
8624                 /*
8625                  * If wchar_t is smaller than a long, it must be an int or a
8626                  * short.  We prefer not to use a short anyway.
8627                  */
8628                 if (sizeof(unsigned long) > sizeof(wchar_t))
8629                         result = "int";
8630 #endif
8631                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
8632                         int n;
8633                         unsigned int x;
8634                         for (n = 0; n < WANT_BITS; n++) {
8635                                 unsigned int y = (x >> n);
8636                                 if (y != 1 || x == 0) {
8637                                         x = 0;
8638                                         break;
8639                                 }
8640                         }
8641                         /*
8642                          * If x is nonzero, an int is big enough for the bits
8643                          * that we want.
8644                          */
8645                         result = (x != 0) ? "int" : "long";
8646                 }
8647                 fputs(result, fp);
8648                 fclose(fp);
8649         }
8650         exit(0);
8651 }
8652
8653 _ACEOF
8654 rm -f conftest$ac_exeext
8655 if { (eval echo "$as_me:8655: \"$ac_link\"") >&5
8656   (eval $ac_link) 2>&5
8657   ac_status=$?
8658   echo "$as_me:8658: \$? = $ac_status" >&5
8659   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8660   { (eval echo "$as_me:8660: \"$ac_try\"") >&5
8661   (eval $ac_try) 2>&5
8662   ac_status=$?
8663   echo "$as_me:8663: \$? = $ac_status" >&5
8664   (exit $ac_status); }; }; then
8665   cf_cv_typeof_chtype=`cat cf_test.out`
8666 else
8667   echo "$as_me: program exited with status $ac_status" >&5
8668 echo "$as_me: failed program was:" >&5
8669 cat conftest.$ac_ext >&5
8670 cf_cv_typeof_chtype=long
8671 fi
8672 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8673 fi
8674                 rm -f cf_test.out
8675
8676 fi
8677
8678 echo "$as_me:8678: result: $cf_cv_typeof_chtype" >&5
8679 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
8680
8681 cat >>confdefs.h <<EOF
8682 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
8683 EOF
8684
8685 cf_cv_1UL="1"
8686 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
8687 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
8688
8689 ###     Checks for external-data
8690
8691 echo "$as_me:8691: checking if external errno is declared" >&5
8692 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
8693 if test "${cf_cv_dcl_errno+set}" = set; then
8694   echo $ECHO_N "(cached) $ECHO_C" >&6
8695 else
8696
8697     cat >conftest.$ac_ext <<_ACEOF
8698 #line 8698 "configure"
8699 #include "confdefs.h"
8700
8701 #ifdef HAVE_STDLIB_H
8702 #include <stdlib.h>
8703 #endif
8704 #include <stdio.h>
8705 #include <sys/types.h>
8706 #include <errno.h>
8707 int
8708 main ()
8709 {
8710 long x = (long) errno
8711   ;
8712   return 0;
8713 }
8714 _ACEOF
8715 rm -f conftest.$ac_objext
8716 if { (eval echo "$as_me:8716: \"$ac_compile\"") >&5
8717   (eval $ac_compile) 2>&5
8718   ac_status=$?
8719   echo "$as_me:8719: \$? = $ac_status" >&5
8720   (exit $ac_status); } &&
8721          { ac_try='test -s conftest.$ac_objext'
8722   { (eval echo "$as_me:8722: \"$ac_try\"") >&5
8723   (eval $ac_try) 2>&5
8724   ac_status=$?
8725   echo "$as_me:8725: \$? = $ac_status" >&5
8726   (exit $ac_status); }; }; then
8727   cf_cv_dcl_errno=yes
8728 else
8729   echo "$as_me: failed program was:" >&5
8730 cat conftest.$ac_ext >&5
8731 cf_cv_dcl_errno=no
8732 fi
8733 rm -f conftest.$ac_objext conftest.$ac_ext
8734
8735 fi
8736 echo "$as_me:8736: result: $cf_cv_dcl_errno" >&5
8737 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
8738
8739 if test "$cf_cv_dcl_errno" = no ; then
8740
8741 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8742
8743     cat >>confdefs.h <<EOF
8744 #define $cf_result 1
8745 EOF
8746
8747 fi
8748
8749 # It's possible (for near-UNIX clones) that the data doesn't exist
8750
8751 echo "$as_me:8751: checking if external errno exists" >&5
8752 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
8753 if test "${cf_cv_have_errno+set}" = set; then
8754   echo $ECHO_N "(cached) $ECHO_C" >&6
8755 else
8756
8757     cat >conftest.$ac_ext <<_ACEOF
8758 #line 8758 "configure"
8759 #include "confdefs.h"
8760
8761 #undef errno
8762 extern int errno;
8763
8764 int
8765 main ()
8766 {
8767 errno = 2
8768   ;
8769   return 0;
8770 }
8771 _ACEOF
8772 rm -f conftest.$ac_objext conftest$ac_exeext
8773 if { (eval echo "$as_me:8773: \"$ac_link\"") >&5
8774   (eval $ac_link) 2>&5
8775   ac_status=$?
8776   echo "$as_me:8776: \$? = $ac_status" >&5
8777   (exit $ac_status); } &&
8778          { ac_try='test -s conftest$ac_exeext'
8779   { (eval echo "$as_me:8779: \"$ac_try\"") >&5
8780   (eval $ac_try) 2>&5
8781   ac_status=$?
8782   echo "$as_me:8782: \$? = $ac_status" >&5
8783   (exit $ac_status); }; }; then
8784   cf_cv_have_errno=yes
8785 else
8786   echo "$as_me: failed program was:" >&5
8787 cat conftest.$ac_ext >&5
8788 cf_cv_have_errno=no
8789 fi
8790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8791
8792 fi
8793 echo "$as_me:8793: result: $cf_cv_have_errno" >&5
8794 echo "${ECHO_T}$cf_cv_have_errno" >&6
8795
8796 if test "$cf_cv_have_errno" = yes ; then
8797
8798 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8799
8800     cat >>confdefs.h <<EOF
8801 #define $cf_result 1
8802 EOF
8803
8804 fi
8805
8806 echo "$as_me:8806: checking if data-only library module links" >&5
8807 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
8808 if test "${cf_cv_link_dataonly+set}" = set; then
8809   echo $ECHO_N "(cached) $ECHO_C" >&6
8810 else
8811
8812         rm -f conftest.a
8813         cat >conftest.$ac_ext <<EOF
8814 #line 8814 "configure"
8815 int     testdata[3] = { 123, 456, 789 };
8816 EOF
8817         if { (eval echo "$as_me:8817: \"$ac_compile\"") >&5
8818   (eval $ac_compile) 2>&5
8819   ac_status=$?
8820   echo "$as_me:8820: \$? = $ac_status" >&5
8821   (exit $ac_status); } ; then
8822                 mv conftest.o data.o && \
8823                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
8824         fi
8825         rm -f conftest.$ac_ext data.o
8826         cat >conftest.$ac_ext <<EOF
8827 #line 8827 "configure"
8828 int     testfunc()
8829 {
8830 #if defined(NeXT)
8831         exit(1);        /* I'm told this linker is broken */
8832 #else
8833         extern int testdata[3];
8834         return testdata[0] == 123
8835            &&  testdata[1] == 456
8836            &&  testdata[2] == 789;
8837 #endif
8838 }
8839 EOF
8840         if { (eval echo "$as_me:8840: \"$ac_compile\"") >&5
8841   (eval $ac_compile) 2>&5
8842   ac_status=$?
8843   echo "$as_me:8843: \$? = $ac_status" >&5
8844   (exit $ac_status); }; then
8845                 mv conftest.o func.o && \
8846                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
8847         fi
8848         rm -f conftest.$ac_ext func.o
8849         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
8850         cf_saveLIBS="$LIBS"
8851         LIBS="conftest.a $LIBS"
8852         if test "$cross_compiling" = yes; then
8853   cf_cv_link_dataonly=unknown
8854 else
8855   cat >conftest.$ac_ext <<_ACEOF
8856 #line 8856 "configure"
8857 #include "confdefs.h"
8858
8859         int main()
8860         {
8861                 extern int testfunc();
8862                 exit (!testfunc());
8863         }
8864
8865 _ACEOF
8866 rm -f conftest$ac_exeext
8867 if { (eval echo "$as_me:8867: \"$ac_link\"") >&5
8868   (eval $ac_link) 2>&5
8869   ac_status=$?
8870   echo "$as_me:8870: \$? = $ac_status" >&5
8871   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8872   { (eval echo "$as_me:8872: \"$ac_try\"") >&5
8873   (eval $ac_try) 2>&5
8874   ac_status=$?
8875   echo "$as_me:8875: \$? = $ac_status" >&5
8876   (exit $ac_status); }; }; then
8877   cf_cv_link_dataonly=yes
8878 else
8879   echo "$as_me: program exited with status $ac_status" >&5
8880 echo "$as_me: failed program was:" >&5
8881 cat conftest.$ac_ext >&5
8882 cf_cv_link_dataonly=no
8883 fi
8884 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8885 fi
8886         LIBS="$cf_saveLIBS"
8887
8888 fi
8889
8890 echo "$as_me:8890: result: $cf_cv_link_dataonly" >&5
8891 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
8892
8893 if test "$cf_cv_link_dataonly" = no ; then
8894         cat >>confdefs.h <<\EOF
8895 #define BROKEN_LINKER 1
8896 EOF
8897
8898         BROKEN_LINKER=1
8899 fi
8900
8901 ###     Checks for library functions.
8902
8903 for ac_func in \
8904 getcwd \
8905 getegid \
8906 geteuid \
8907 getttynam \
8908 issetugid \
8909 memccpy \
8910 nanosleep \
8911 poll \
8912 remove \
8913 select \
8914 setbuf \
8915 setbuffer \
8916 setvbuf \
8917 sigaction \
8918 sigvec \
8919 strdup \
8920 strstr \
8921 tcgetpgrp \
8922 times \
8923 vsnprintf \
8924
8925 do
8926 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8927 echo "$as_me:8927: checking for $ac_func" >&5
8928 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8929 if eval "test \"\${$as_ac_var+set}\" = set"; then
8930   echo $ECHO_N "(cached) $ECHO_C" >&6
8931 else
8932   cat >conftest.$ac_ext <<_ACEOF
8933 #line 8933 "configure"
8934 #include "confdefs.h"
8935 /* System header to define __stub macros and hopefully few prototypes,
8936     which can conflict with char $ac_func (); below.  */
8937 #include <assert.h>
8938 /* Override any gcc2 internal prototype to avoid an error.  */
8939 #ifdef __cplusplus
8940 extern "C"
8941 #endif
8942 /* We use char because int might match the return type of a gcc2
8943    builtin and then its argument prototype would still apply.  */
8944 char $ac_func ();
8945 char (*f) ();
8946
8947 int
8948 main ()
8949 {
8950 /* The GNU C library defines this for functions which it implements
8951     to always fail with ENOSYS.  Some functions are actually named
8952     something starting with __ and the normal name is an alias.  */
8953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8954 choke me
8955 #else
8956 f = $ac_func;
8957 #endif
8958
8959   ;
8960   return 0;
8961 }
8962 _ACEOF
8963 rm -f conftest.$ac_objext conftest$ac_exeext
8964 if { (eval echo "$as_me:8964: \"$ac_link\"") >&5
8965   (eval $ac_link) 2>&5
8966   ac_status=$?
8967   echo "$as_me:8967: \$? = $ac_status" >&5
8968   (exit $ac_status); } &&
8969          { ac_try='test -s conftest$ac_exeext'
8970   { (eval echo "$as_me:8970: \"$ac_try\"") >&5
8971   (eval $ac_try) 2>&5
8972   ac_status=$?
8973   echo "$as_me:8973: \$? = $ac_status" >&5
8974   (exit $ac_status); }; }; then
8975   eval "$as_ac_var=yes"
8976 else
8977   echo "$as_me: failed program was:" >&5
8978 cat conftest.$ac_ext >&5
8979 eval "$as_ac_var=no"
8980 fi
8981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8982 fi
8983 echo "$as_me:8983: result: `eval echo '${'$as_ac_var'}'`" >&5
8984 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8985 if test `eval echo '${'$as_ac_var'}'` = yes; then
8986   cat >>confdefs.h <<EOF
8987 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8988 EOF
8989
8990 fi
8991 done
8992
8993 if test "$with_getcap" = "yes" ; then
8994
8995 echo "$as_me:8995: checking for terminal-capability database functions" >&5
8996 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
8997 if test "${cf_cv_cgetent+set}" = set; then
8998   echo $ECHO_N "(cached) $ECHO_C" >&6
8999 else
9000
9001 cat >conftest.$ac_ext <<_ACEOF
9002 #line 9002 "configure"
9003 #include "confdefs.h"
9004
9005 #include <stdlib.h>
9006 int
9007 main ()
9008 {
9009
9010         char temp[128];
9011         char *buf = temp;
9012         char *db_array = temp;
9013         cgetent(&buf, /* int *, */ &db_array, "vt100");
9014         cgetcap(buf, "tc", '=');
9015         cgetmatch(buf, "tc");
9016
9017   ;
9018   return 0;
9019 }
9020 _ACEOF
9021 rm -f conftest.$ac_objext conftest$ac_exeext
9022 if { (eval echo "$as_me:9022: \"$ac_link\"") >&5
9023   (eval $ac_link) 2>&5
9024   ac_status=$?
9025   echo "$as_me:9025: \$? = $ac_status" >&5
9026   (exit $ac_status); } &&
9027          { ac_try='test -s conftest$ac_exeext'
9028   { (eval echo "$as_me:9028: \"$ac_try\"") >&5
9029   (eval $ac_try) 2>&5
9030   ac_status=$?
9031   echo "$as_me:9031: \$? = $ac_status" >&5
9032   (exit $ac_status); }; }; then
9033   cf_cv_cgetent=yes
9034 else
9035   echo "$as_me: failed program was:" >&5
9036 cat conftest.$ac_ext >&5
9037 cf_cv_cgetent=no
9038 fi
9039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9040
9041 fi
9042
9043 echo "$as_me:9043: result: $cf_cv_cgetent" >&5
9044 echo "${ECHO_T}$cf_cv_cgetent" >&6
9045 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
9046 #define HAVE_BSD_CGETENT 1
9047 EOF
9048
9049 fi
9050
9051 echo "$as_me:9051: checking for isascii" >&5
9052 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
9053 if test "${cf_cv_have_isascii+set}" = set; then
9054   echo $ECHO_N "(cached) $ECHO_C" >&6
9055 else
9056
9057         cat >conftest.$ac_ext <<_ACEOF
9058 #line 9058 "configure"
9059 #include "confdefs.h"
9060 #include <ctype.h>
9061 int
9062 main ()
9063 {
9064 int x = isascii(' ')
9065   ;
9066   return 0;
9067 }
9068 _ACEOF
9069 rm -f conftest.$ac_objext conftest$ac_exeext
9070 if { (eval echo "$as_me:9070: \"$ac_link\"") >&5
9071   (eval $ac_link) 2>&5
9072   ac_status=$?
9073   echo "$as_me:9073: \$? = $ac_status" >&5
9074   (exit $ac_status); } &&
9075          { ac_try='test -s conftest$ac_exeext'
9076   { (eval echo "$as_me:9076: \"$ac_try\"") >&5
9077   (eval $ac_try) 2>&5
9078   ac_status=$?
9079   echo "$as_me:9079: \$? = $ac_status" >&5
9080   (exit $ac_status); }; }; then
9081   cf_cv_have_isascii=yes
9082 else
9083   echo "$as_me: failed program was:" >&5
9084 cat conftest.$ac_ext >&5
9085 cf_cv_have_isascii=no
9086 fi
9087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9088
9089 fi
9090 echo "$as_me:9090: result: $cf_cv_have_isascii" >&5
9091 echo "${ECHO_T}$cf_cv_have_isascii" >&6
9092 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
9093 #define HAVE_ISASCII 1
9094 EOF
9095
9096 if test "$ac_cv_func_sigaction" = yes; then
9097 echo "$as_me:9097: checking whether sigaction needs _POSIX_SOURCE" >&5
9098 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
9099 cat >conftest.$ac_ext <<_ACEOF
9100 #line 9100 "configure"
9101 #include "confdefs.h"
9102
9103 #include <sys/types.h>
9104 #include <signal.h>
9105 int
9106 main ()
9107 {
9108 struct sigaction act
9109   ;
9110   return 0;
9111 }
9112 _ACEOF
9113 rm -f conftest.$ac_objext
9114 if { (eval echo "$as_me:9114: \"$ac_compile\"") >&5
9115   (eval $ac_compile) 2>&5
9116   ac_status=$?
9117   echo "$as_me:9117: \$? = $ac_status" >&5
9118   (exit $ac_status); } &&
9119          { ac_try='test -s conftest.$ac_objext'
9120   { (eval echo "$as_me:9120: \"$ac_try\"") >&5
9121   (eval $ac_try) 2>&5
9122   ac_status=$?
9123   echo "$as_me:9123: \$? = $ac_status" >&5
9124   (exit $ac_status); }; }; then
9125   sigact_bad=no
9126 else
9127   echo "$as_me: failed program was:" >&5
9128 cat conftest.$ac_ext >&5
9129
9130 cat >conftest.$ac_ext <<_ACEOF
9131 #line 9131 "configure"
9132 #include "confdefs.h"
9133
9134 #define _POSIX_SOURCE
9135 #include <sys/types.h>
9136 #include <signal.h>
9137 int
9138 main ()
9139 {
9140 struct sigaction act
9141   ;
9142   return 0;
9143 }
9144 _ACEOF
9145 rm -f conftest.$ac_objext
9146 if { (eval echo "$as_me:9146: \"$ac_compile\"") >&5
9147   (eval $ac_compile) 2>&5
9148   ac_status=$?
9149   echo "$as_me:9149: \$? = $ac_status" >&5
9150   (exit $ac_status); } &&
9151          { ac_try='test -s conftest.$ac_objext'
9152   { (eval echo "$as_me:9152: \"$ac_try\"") >&5
9153   (eval $ac_try) 2>&5
9154   ac_status=$?
9155   echo "$as_me:9155: \$? = $ac_status" >&5
9156   (exit $ac_status); }; }; then
9157   sigact_bad=yes
9158          cat >>confdefs.h <<\EOF
9159 #define SVR4_ACTION 1
9160 EOF
9161
9162 else
9163   echo "$as_me: failed program was:" >&5
9164 cat conftest.$ac_ext >&5
9165 sigact_bad=unknown
9166 fi
9167 rm -f conftest.$ac_objext conftest.$ac_ext
9168 fi
9169 rm -f conftest.$ac_objext conftest.$ac_ext
9170 echo "$as_me:9170: result: $sigact_bad" >&5
9171 echo "${ECHO_T}$sigact_bad" >&6
9172 fi
9173
9174 for ac_header in \
9175 termio.h \
9176 termios.h \
9177 unistd.h \
9178
9179 do
9180 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9181 echo "$as_me:9181: checking for $ac_header" >&5
9182 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9184   echo $ECHO_N "(cached) $ECHO_C" >&6
9185 else
9186   cat >conftest.$ac_ext <<_ACEOF
9187 #line 9187 "configure"
9188 #include "confdefs.h"
9189 #include <$ac_header>
9190 _ACEOF
9191 if { (eval echo "$as_me:9191: \"$ac_cpp conftest.$ac_ext\"") >&5
9192   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9193   ac_status=$?
9194   egrep -v '^ *\+' conftest.er1 >conftest.err
9195   rm -f conftest.er1
9196   cat conftest.err >&5
9197   echo "$as_me:9197: \$? = $ac_status" >&5
9198   (exit $ac_status); } >/dev/null; then
9199   if test -s conftest.err; then
9200     ac_cpp_err=$ac_c_preproc_warn_flag
9201   else
9202     ac_cpp_err=
9203   fi
9204 else
9205   ac_cpp_err=yes
9206 fi
9207 if test -z "$ac_cpp_err"; then
9208   eval "$as_ac_Header=yes"
9209 else
9210   echo "$as_me: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   eval "$as_ac_Header=no"
9213 fi
9214 rm -f conftest.err conftest.$ac_ext
9215 fi
9216 echo "$as_me:9216: result: `eval echo '${'$as_ac_Header'}'`" >&5
9217 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9218 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9219   cat >>confdefs.h <<EOF
9220 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9221 EOF
9222
9223 fi
9224 done
9225
9226 if test "$ISC" = yes ; then
9227
9228 for ac_header in sys/termio.h
9229 do
9230 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9231 echo "$as_me:9231: checking for $ac_header" >&5
9232 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9233 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9234   echo $ECHO_N "(cached) $ECHO_C" >&6
9235 else
9236   cat >conftest.$ac_ext <<_ACEOF
9237 #line 9237 "configure"
9238 #include "confdefs.h"
9239 #include <$ac_header>
9240 _ACEOF
9241 if { (eval echo "$as_me:9241: \"$ac_cpp conftest.$ac_ext\"") >&5
9242   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9243   ac_status=$?
9244   egrep -v '^ *\+' conftest.er1 >conftest.err
9245   rm -f conftest.er1
9246   cat conftest.err >&5
9247   echo "$as_me:9247: \$? = $ac_status" >&5
9248   (exit $ac_status); } >/dev/null; then
9249   if test -s conftest.err; then
9250     ac_cpp_err=$ac_c_preproc_warn_flag
9251   else
9252     ac_cpp_err=
9253   fi
9254 else
9255   ac_cpp_err=yes
9256 fi
9257 if test -z "$ac_cpp_err"; then
9258   eval "$as_ac_Header=yes"
9259 else
9260   echo "$as_me: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262   eval "$as_ac_Header=no"
9263 fi
9264 rm -f conftest.err conftest.$ac_ext
9265 fi
9266 echo "$as_me:9266: result: `eval echo '${'$as_ac_Header'}'`" >&5
9267 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9268 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9269   cat >>confdefs.h <<EOF
9270 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9271 EOF
9272
9273 fi
9274 done
9275
9276 fi
9277 if test "$ac_cv_header_termios_h" = yes ; then
9278         case "$CFLAGS $CPPFLAGS" in
9279         *-D_POSIX_SOURCE*)
9280                 termios_bad=dunno ;;
9281         *)      termios_bad=maybe ;;
9282         esac
9283         if test "$termios_bad" = maybe ; then
9284         echo "$as_me:9284: checking whether termios.h needs _POSIX_SOURCE" >&5
9285 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
9286         cat >conftest.$ac_ext <<_ACEOF
9287 #line 9287 "configure"
9288 #include "confdefs.h"
9289 #include <termios.h>
9290 int
9291 main ()
9292 {
9293 struct termios foo; int x = foo.c_iflag
9294   ;
9295   return 0;
9296 }
9297 _ACEOF
9298 rm -f conftest.$ac_objext
9299 if { (eval echo "$as_me:9299: \"$ac_compile\"") >&5
9300   (eval $ac_compile) 2>&5
9301   ac_status=$?
9302   echo "$as_me:9302: \$? = $ac_status" >&5
9303   (exit $ac_status); } &&
9304          { ac_try='test -s conftest.$ac_objext'
9305   { (eval echo "$as_me:9305: \"$ac_try\"") >&5
9306   (eval $ac_try) 2>&5
9307   ac_status=$?
9308   echo "$as_me:9308: \$? = $ac_status" >&5
9309   (exit $ac_status); }; }; then
9310   termios_bad=no
9311 else
9312   echo "$as_me: failed program was:" >&5
9313 cat conftest.$ac_ext >&5
9314
9315                 cat >conftest.$ac_ext <<_ACEOF
9316 #line 9316 "configure"
9317 #include "confdefs.h"
9318
9319 #define _POSIX_SOURCE
9320 #include <termios.h>
9321 int
9322 main ()
9323 {
9324 struct termios foo; int x = foo.c_iflag
9325   ;
9326   return 0;
9327 }
9328 _ACEOF
9329 rm -f conftest.$ac_objext
9330 if { (eval echo "$as_me:9330: \"$ac_compile\"") >&5
9331   (eval $ac_compile) 2>&5
9332   ac_status=$?
9333   echo "$as_me:9333: \$? = $ac_status" >&5
9334   (exit $ac_status); } &&
9335          { ac_try='test -s conftest.$ac_objext'
9336   { (eval echo "$as_me:9336: \"$ac_try\"") >&5
9337   (eval $ac_try) 2>&5
9338   ac_status=$?
9339   echo "$as_me:9339: \$? = $ac_status" >&5
9340   (exit $ac_status); }; }; then
9341   termios_bad=unknown
9342 else
9343   echo "$as_me: failed program was:" >&5
9344 cat conftest.$ac_ext >&5
9345 termios_bad=yes cat >>confdefs.h <<\EOF
9346 #define SVR4_TERMIO 1
9347 EOF
9348
9349 fi
9350 rm -f conftest.$ac_objext conftest.$ac_ext
9351
9352 fi
9353 rm -f conftest.$ac_objext conftest.$ac_ext
9354         echo "$as_me:9354: result: $termios_bad" >&5
9355 echo "${ECHO_T}$termios_bad" >&6
9356         fi
9357 fi
9358
9359 echo "$as_me:9359: checking for tcgetattr" >&5
9360 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
9361 if test "${cf_cv_have_tcgetattr+set}" = set; then
9362   echo $ECHO_N "(cached) $ECHO_C" >&6
9363 else
9364
9365 cat >conftest.$ac_ext <<_ACEOF
9366 #line 9366 "configure"
9367 #include "confdefs.h"
9368
9369 #include <sys/types.h>
9370 #ifdef HAVE_UNISTD_H
9371 #include <unistd.h>
9372 #endif
9373 #ifdef HAVE_TERMIOS_H
9374 #include <termios.h>
9375 #define TTY struct termios
9376 #else
9377 #ifdef HAVE_TERMIO_H
9378 #include <termio.h>
9379 #define TTY struct termio
9380 #endif
9381 #endif
9382
9383 int
9384 main ()
9385 {
9386
9387 TTY foo;
9388 tcgetattr(1, &foo);
9389   ;
9390   return 0;
9391 }
9392 _ACEOF
9393 rm -f conftest.$ac_objext conftest$ac_exeext
9394 if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
9395   (eval $ac_link) 2>&5
9396   ac_status=$?
9397   echo "$as_me:9397: \$? = $ac_status" >&5
9398   (exit $ac_status); } &&
9399          { ac_try='test -s conftest$ac_exeext'
9400   { (eval echo "$as_me:9400: \"$ac_try\"") >&5
9401   (eval $ac_try) 2>&5
9402   ac_status=$?
9403   echo "$as_me:9403: \$? = $ac_status" >&5
9404   (exit $ac_status); }; }; then
9405   cf_cv_have_tcgetattr=yes
9406 else
9407   echo "$as_me: failed program was:" >&5
9408 cat conftest.$ac_ext >&5
9409 cf_cv_have_tcgetattr=no
9410 fi
9411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9412 fi
9413 echo "$as_me:9413: result: $cf_cv_have_tcgetattr" >&5
9414 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
9415 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
9416 #define HAVE_TCGETATTR 1
9417 EOF
9418
9419 echo "$as_me:9419: checking for vsscanf function or workaround" >&5
9420 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
9421 if test "${cf_cv_func_vsscanf+set}" = set; then
9422   echo $ECHO_N "(cached) $ECHO_C" >&6
9423 else
9424
9425 cat >conftest.$ac_ext <<_ACEOF
9426 #line 9426 "configure"
9427 #include "confdefs.h"
9428
9429 #include <stdarg.h>
9430 #include <stdio.h>
9431 int
9432 main ()
9433 {
9434
9435         va_list ap;
9436         vsscanf("from", "%d", ap)
9437   ;
9438   return 0;
9439 }
9440 _ACEOF
9441 rm -f conftest.$ac_objext conftest$ac_exeext
9442 if { (eval echo "$as_me:9442: \"$ac_link\"") >&5
9443   (eval $ac_link) 2>&5
9444   ac_status=$?
9445   echo "$as_me:9445: \$? = $ac_status" >&5
9446   (exit $ac_status); } &&
9447          { ac_try='test -s conftest$ac_exeext'
9448   { (eval echo "$as_me:9448: \"$ac_try\"") >&5
9449   (eval $ac_try) 2>&5
9450   ac_status=$?
9451   echo "$as_me:9451: \$? = $ac_status" >&5
9452   (exit $ac_status); }; }; then
9453   cf_cv_func_vsscanf=vsscanf
9454 else
9455   echo "$as_me: failed program was:" >&5
9456 cat conftest.$ac_ext >&5
9457
9458 cat >conftest.$ac_ext <<_ACEOF
9459 #line 9459 "configure"
9460 #include "confdefs.h"
9461
9462 #include <stdarg.h>
9463 #include <stdio.h>
9464 int
9465 main ()
9466 {
9467
9468     FILE strbuf;
9469     char *str = "from";
9470
9471     strbuf._flag = _IOREAD;
9472     strbuf._ptr = strbuf._base = (unsigned char *) str;
9473     strbuf._cnt = strlen(str);
9474     strbuf._file = _NFILE;
9475     return (vfscanf(&strbuf, "%d", ap))
9476   ;
9477   return 0;
9478 }
9479 _ACEOF
9480 rm -f conftest.$ac_objext conftest$ac_exeext
9481 if { (eval echo "$as_me:9481: \"$ac_link\"") >&5
9482   (eval $ac_link) 2>&5
9483   ac_status=$?
9484   echo "$as_me:9484: \$? = $ac_status" >&5
9485   (exit $ac_status); } &&
9486          { ac_try='test -s conftest$ac_exeext'
9487   { (eval echo "$as_me:9487: \"$ac_try\"") >&5
9488   (eval $ac_try) 2>&5
9489   ac_status=$?
9490   echo "$as_me:9490: \$? = $ac_status" >&5
9491   (exit $ac_status); }; }; then
9492   cf_cv_func_vsscanf=vfscanf
9493 else
9494   echo "$as_me: failed program was:" >&5
9495 cat conftest.$ac_ext >&5
9496
9497 cat >conftest.$ac_ext <<_ACEOF
9498 #line 9498 "configure"
9499 #include "confdefs.h"
9500
9501 #include <stdarg.h>
9502 #include <stdio.h>
9503 int
9504 main ()
9505 {
9506
9507     FILE strbuf;
9508     char *str = "from";
9509
9510     strbuf._flag = _IOREAD;
9511     strbuf._ptr = strbuf._base = (unsigned char *) str;
9512     strbuf._cnt = strlen(str);
9513     strbuf._file = _NFILE;
9514     return (_doscan(&strbuf, "%d", ap))
9515   ;
9516   return 0;
9517 }
9518 _ACEOF
9519 rm -f conftest.$ac_objext conftest$ac_exeext
9520 if { (eval echo "$as_me:9520: \"$ac_link\"") >&5
9521   (eval $ac_link) 2>&5
9522   ac_status=$?
9523   echo "$as_me:9523: \$? = $ac_status" >&5
9524   (exit $ac_status); } &&
9525          { ac_try='test -s conftest$ac_exeext'
9526   { (eval echo "$as_me:9526: \"$ac_try\"") >&5
9527   (eval $ac_try) 2>&5
9528   ac_status=$?
9529   echo "$as_me:9529: \$? = $ac_status" >&5
9530   (exit $ac_status); }; }; then
9531   cf_cv_func_vsscanf=_doscan
9532 else
9533   echo "$as_me: failed program was:" >&5
9534 cat conftest.$ac_ext >&5
9535
9536 cf_cv_func_vsscanf=no
9537 fi
9538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9539 fi
9540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9541 fi
9542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9543 fi
9544 echo "$as_me:9544: result: $cf_cv_func_vsscanf" >&5
9545 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
9546
9547 case $cf_cv_func_vsscanf in #(vi
9548 vsscanf) cat >>confdefs.h <<\EOF
9549 #define HAVE_VSSCANF 1
9550 EOF
9551 ;; #(vi
9552 vfscanf) cat >>confdefs.h <<\EOF
9553 #define HAVE_VFSCANF 1
9554 EOF
9555 ;; #(vi
9556 _doscan) cat >>confdefs.h <<\EOF
9557 #define HAVE__DOSCAN 1
9558 EOF
9559 ;;
9560 esac
9561
9562 echo "$as_me:9562: checking for working mkstemp" >&5
9563 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
9564 if test "${cf_cv_func_mkstemp+set}" = set; then
9565   echo $ECHO_N "(cached) $ECHO_C" >&6
9566 else
9567
9568 rm -f conftest*
9569 if test "$cross_compiling" = yes; then
9570   echo "$as_me:9570: checking for mkstemp" >&5
9571 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
9572 if test "${ac_cv_func_mkstemp+set}" = set; then
9573   echo $ECHO_N "(cached) $ECHO_C" >&6
9574 else
9575   cat >conftest.$ac_ext <<_ACEOF
9576 #line 9576 "configure"
9577 #include "confdefs.h"
9578 /* System header to define __stub macros and hopefully few prototypes,
9579     which can conflict with char mkstemp (); below.  */
9580 #include <assert.h>
9581 /* Override any gcc2 internal prototype to avoid an error.  */
9582 #ifdef __cplusplus
9583 extern "C"
9584 #endif
9585 /* We use char because int might match the return type of a gcc2
9586    builtin and then its argument prototype would still apply.  */
9587 char mkstemp ();
9588 char (*f) ();
9589
9590 int
9591 main ()
9592 {
9593 /* The GNU C library defines this for functions which it implements
9594     to always fail with ENOSYS.  Some functions are actually named
9595     something starting with __ and the normal name is an alias.  */
9596 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
9597 choke me
9598 #else
9599 f = mkstemp;
9600 #endif
9601
9602   ;
9603   return 0;
9604 }
9605 _ACEOF
9606 rm -f conftest.$ac_objext conftest$ac_exeext
9607 if { (eval echo "$as_me:9607: \"$ac_link\"") >&5
9608   (eval $ac_link) 2>&5
9609   ac_status=$?
9610   echo "$as_me:9610: \$? = $ac_status" >&5
9611   (exit $ac_status); } &&
9612          { ac_try='test -s conftest$ac_exeext'
9613   { (eval echo "$as_me:9613: \"$ac_try\"") >&5
9614   (eval $ac_try) 2>&5
9615   ac_status=$?
9616   echo "$as_me:9616: \$? = $ac_status" >&5
9617   (exit $ac_status); }; }; then
9618   ac_cv_func_mkstemp=yes
9619 else
9620   echo "$as_me: failed program was:" >&5
9621 cat conftest.$ac_ext >&5
9622 ac_cv_func_mkstemp=no
9623 fi
9624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9625 fi
9626 echo "$as_me:9626: result: $ac_cv_func_mkstemp" >&5
9627 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
9628
9629 else
9630   cat >conftest.$ac_ext <<_ACEOF
9631 #line 9631 "configure"
9632 #include "confdefs.h"
9633
9634 #include <sys/types.h>
9635 #include <stdlib.h>
9636 #include <stdio.h>
9637 #include <string.h>
9638 #include <sys/stat.h>
9639 int main()
9640 {
9641         char *tmpl = "conftestXXXXXX";
9642         char name[2][80];
9643         int n;
9644         int result = 0;
9645         int fd;
9646         struct stat sb;
9647
9648         umask(077);
9649         for (n = 0; n < 2; ++n) {
9650                 strcpy(name[n], tmpl);
9651                 if ((fd = mkstemp(name[n])) >= 0) {
9652                         if (!strcmp(name[n], tmpl)
9653                          || stat(name[n], &sb) != 0
9654                          || (sb.st_mode & S_IFMT) != S_IFREG
9655                          || (sb.st_mode & 077) != 0) {
9656                                 result = 1;
9657                         }
9658                         close(fd);
9659                 }
9660         }
9661         if (result == 0
9662          && !strcmp(name[0], name[1]))
9663                 result = 1;
9664         exit(result);
9665 }
9666
9667 _ACEOF
9668 rm -f conftest$ac_exeext
9669 if { (eval echo "$as_me:9669: \"$ac_link\"") >&5
9670   (eval $ac_link) 2>&5
9671   ac_status=$?
9672   echo "$as_me:9672: \$? = $ac_status" >&5
9673   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9674   { (eval echo "$as_me:9674: \"$ac_try\"") >&5
9675   (eval $ac_try) 2>&5
9676   ac_status=$?
9677   echo "$as_me:9677: \$? = $ac_status" >&5
9678   (exit $ac_status); }; }; then
9679   cf_cv_func_mkstemp=yes
9680
9681 else
9682   echo "$as_me: program exited with status $ac_status" >&5
9683 echo "$as_me: failed program was:" >&5
9684 cat conftest.$ac_ext >&5
9685 cf_cv_func_mkstemp=no
9686
9687 fi
9688 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9689 fi
9690
9691 fi
9692 echo "$as_me:9692: result: $cf_cv_func_mkstemp" >&5
9693 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
9694 if test "$cf_cv_func_mkstemp" = yes ; then
9695         cat >>confdefs.h <<\EOF
9696 #define HAVE_MKSTEMP 1
9697 EOF
9698
9699 fi
9700
9701 # setup for prototype of fallback for vsscanf()
9702 if test "$cf_cv_func_vsscanf" = vsscanf ; then
9703         HAVE_VSSCANF=1
9704 else
9705         HAVE_VSSCANF=0
9706 fi
9707
9708 if test "$cross_compiling" = yes ; then
9709         { echo "$as_me:9709: WARNING: cross compiling: assume setvbuf params not reversed" >&5
9710 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
9711 else
9712         echo "$as_me:9712: checking whether setvbuf arguments are reversed" >&5
9713 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
9714 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
9715   echo $ECHO_N "(cached) $ECHO_C" >&6
9716 else
9717   if test "$cross_compiling" = yes; then
9718   { { echo "$as_me:9718: error: cannot run test program while cross compiling" >&5
9719 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9720    { (exit 1); exit 1; }; }
9721 else
9722   cat >conftest.$ac_ext <<_ACEOF
9723 #line 9723 "configure"
9724 #include "confdefs.h"
9725 #include <stdio.h>
9726 /* If setvbuf has the reversed format, exit 0. */
9727 int
9728 main ()
9729 {
9730   /* This call has the arguments reversed.
9731      A reversed system may check and see that the address of main
9732      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
9733   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
9734     exit(1);
9735   putc('\r', stdout);
9736   exit(0);                      /* Non-reversed systems segv here.  */
9737 }
9738 _ACEOF
9739 rm -f conftest$ac_exeext
9740 if { (eval echo "$as_me:9740: \"$ac_link\"") >&5
9741   (eval $ac_link) 2>&5
9742   ac_status=$?
9743   echo "$as_me:9743: \$? = $ac_status" >&5
9744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9745   { (eval echo "$as_me:9745: \"$ac_try\"") >&5
9746   (eval $ac_try) 2>&5
9747   ac_status=$?
9748   echo "$as_me:9748: \$? = $ac_status" >&5
9749   (exit $ac_status); }; }; then
9750   ac_cv_func_setvbuf_reversed=yes
9751 else
9752   echo "$as_me: program exited with status $ac_status" >&5
9753 echo "$as_me: failed program was:" >&5
9754 cat conftest.$ac_ext >&5
9755 ac_cv_func_setvbuf_reversed=no
9756 fi
9757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9758 fi
9759 rm -f core core.* *.core
9760 fi
9761 echo "$as_me:9761: result: $ac_cv_func_setvbuf_reversed" >&5
9762 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
9763 if test $ac_cv_func_setvbuf_reversed = yes; then
9764
9765 cat >>confdefs.h <<\EOF
9766 #define SETVBUF_REVERSED 1
9767 EOF
9768
9769 fi
9770
9771 fi
9772 echo "$as_me:9772: checking return type of signal handlers" >&5
9773 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
9774 if test "${ac_cv_type_signal+set}" = set; then
9775   echo $ECHO_N "(cached) $ECHO_C" >&6
9776 else
9777   cat >conftest.$ac_ext <<_ACEOF
9778 #line 9778 "configure"
9779 #include "confdefs.h"
9780 #include <sys/types.h>
9781 #include <signal.h>
9782 #ifdef signal
9783 # undef signal
9784 #endif
9785 #ifdef __cplusplus
9786 extern "C" void (*signal (int, void (*)(int)))(int);
9787 #else
9788 void (*signal ()) ();
9789 #endif
9790
9791 int
9792 main ()
9793 {
9794 int i;
9795   ;
9796   return 0;
9797 }
9798 _ACEOF
9799 rm -f conftest.$ac_objext
9800 if { (eval echo "$as_me:9800: \"$ac_compile\"") >&5
9801   (eval $ac_compile) 2>&5
9802   ac_status=$?
9803   echo "$as_me:9803: \$? = $ac_status" >&5
9804   (exit $ac_status); } &&
9805          { ac_try='test -s conftest.$ac_objext'
9806   { (eval echo "$as_me:9806: \"$ac_try\"") >&5
9807   (eval $ac_try) 2>&5
9808   ac_status=$?
9809   echo "$as_me:9809: \$? = $ac_status" >&5
9810   (exit $ac_status); }; }; then
9811   ac_cv_type_signal=void
9812 else
9813   echo "$as_me: failed program was:" >&5
9814 cat conftest.$ac_ext >&5
9815 ac_cv_type_signal=int
9816 fi
9817 rm -f conftest.$ac_objext conftest.$ac_ext
9818 fi
9819 echo "$as_me:9819: result: $ac_cv_type_signal" >&5
9820 echo "${ECHO_T}$ac_cv_type_signal" >&6
9821
9822 cat >>confdefs.h <<EOF
9823 #define RETSIGTYPE $ac_cv_type_signal
9824 EOF
9825
9826 echo "$as_me:9826: checking for type sigaction_t" >&5
9827 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
9828 if test "${cf_cv_type_sigaction+set}" = set; then
9829   echo $ECHO_N "(cached) $ECHO_C" >&6
9830 else
9831
9832         cat >conftest.$ac_ext <<_ACEOF
9833 #line 9833 "configure"
9834 #include "confdefs.h"
9835
9836 #include <signal.h>
9837 int
9838 main ()
9839 {
9840 sigaction_t x
9841   ;
9842   return 0;
9843 }
9844 _ACEOF
9845 rm -f conftest.$ac_objext
9846 if { (eval echo "$as_me:9846: \"$ac_compile\"") >&5
9847   (eval $ac_compile) 2>&5
9848   ac_status=$?
9849   echo "$as_me:9849: \$? = $ac_status" >&5
9850   (exit $ac_status); } &&
9851          { ac_try='test -s conftest.$ac_objext'
9852   { (eval echo "$as_me:9852: \"$ac_try\"") >&5
9853   (eval $ac_try) 2>&5
9854   ac_status=$?
9855   echo "$as_me:9855: \$? = $ac_status" >&5
9856   (exit $ac_status); }; }; then
9857   cf_cv_type_sigaction=yes
9858 else
9859   echo "$as_me: failed program was:" >&5
9860 cat conftest.$ac_ext >&5
9861 cf_cv_type_sigaction=no
9862 fi
9863 rm -f conftest.$ac_objext conftest.$ac_ext
9864 fi
9865
9866 echo "$as_me:9866: result: $cf_cv_type_sigaction" >&5
9867 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
9868 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
9869 #define HAVE_TYPE_SIGACTION 1
9870 EOF
9871
9872 echo "$as_me:9872: checking declaration of size-change" >&5
9873 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
9874 if test "${cf_cv_sizechange+set}" = set; then
9875   echo $ECHO_N "(cached) $ECHO_C" >&6
9876 else
9877
9878     cf_cv_sizechange=unknown
9879     cf_save_CPPFLAGS="$CPPFLAGS"
9880
9881 for cf_opts in "" "NEED_PTEM_H"
9882 do
9883
9884     CPPFLAGS="$cf_save_CPPFLAGS"
9885     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
9886     cat >conftest.$ac_ext <<_ACEOF
9887 #line 9887 "configure"
9888 #include "confdefs.h"
9889 #include <sys/types.h>
9890 #ifdef HAVE_TERMIOS_H
9891 #include <termios.h>
9892 #else
9893 #ifdef HAVE_TERMIO_H
9894 #include <termio.h>
9895 #endif
9896 #endif
9897 #ifdef NEED_PTEM_H
9898 /* This is a workaround for SCO:  they neglected to define struct winsize in
9899  * termios.h -- it's only in termio.h and ptem.h
9900  */
9901 #include        <sys/stream.h>
9902 #include        <sys/ptem.h>
9903 #endif
9904 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
9905 #include <sys/ioctl.h>
9906 #endif
9907
9908 int
9909 main ()
9910 {
9911
9912 #ifdef TIOCGSIZE
9913         struct ttysize win;     /* FIXME: what system is this? */
9914         int y = win.ts_lines;
9915         int x = win.ts_cols;
9916 #else
9917 #ifdef TIOCGWINSZ
9918         struct winsize win;
9919         int y = win.ws_row;
9920         int x = win.ws_col;
9921 #else
9922         no TIOCGSIZE or TIOCGWINSZ
9923 #endif /* TIOCGWINSZ */
9924 #endif /* TIOCGSIZE */
9925
9926   ;
9927   return 0;
9928 }
9929 _ACEOF
9930 rm -f conftest.$ac_objext
9931 if { (eval echo "$as_me:9931: \"$ac_compile\"") >&5
9932   (eval $ac_compile) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); } &&
9936          { ac_try='test -s conftest.$ac_objext'
9937   { (eval echo "$as_me:9937: \"$ac_try\"") >&5
9938   (eval $ac_try) 2>&5
9939   ac_status=$?
9940   echo "$as_me:9940: \$? = $ac_status" >&5
9941   (exit $ac_status); }; }; then
9942   cf_cv_sizechange=yes
9943 else
9944   echo "$as_me: failed program was:" >&5
9945 cat conftest.$ac_ext >&5
9946 cf_cv_sizechange=no
9947 fi
9948 rm -f conftest.$ac_objext conftest.$ac_ext
9949
9950         CPPFLAGS="$cf_save_CPPFLAGS"
9951         if test "$cf_cv_sizechange" = yes ; then
9952                 echo "size-change succeeded ($cf_opts)" >&5
9953                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
9954                 break
9955         fi
9956 done
9957
9958 fi
9959 echo "$as_me:9959: result: $cf_cv_sizechange" >&5
9960 echo "${ECHO_T}$cf_cv_sizechange" >&6
9961 if test "$cf_cv_sizechange" != no ; then
9962         cat >>confdefs.h <<\EOF
9963 #define HAVE_SIZECHANGE 1
9964 EOF
9965
9966         case $cf_cv_sizechange in #(vi
9967         NEED*)
9968                 cat >>confdefs.h <<EOF
9969 #define $cf_cv_sizechange  1
9970 EOF
9971
9972                 ;;
9973         esac
9974 fi
9975
9976 echo "$as_me:9976: checking for memmove" >&5
9977 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
9978 if test "${ac_cv_func_memmove+set}" = set; then
9979   echo $ECHO_N "(cached) $ECHO_C" >&6
9980 else
9981   cat >conftest.$ac_ext <<_ACEOF
9982 #line 9982 "configure"
9983 #include "confdefs.h"
9984 /* System header to define __stub macros and hopefully few prototypes,
9985     which can conflict with char memmove (); below.  */
9986 #include <assert.h>
9987 /* Override any gcc2 internal prototype to avoid an error.  */
9988 #ifdef __cplusplus
9989 extern "C"
9990 #endif
9991 /* We use char because int might match the return type of a gcc2
9992    builtin and then its argument prototype would still apply.  */
9993 char memmove ();
9994 char (*f) ();
9995
9996 int
9997 main ()
9998 {
9999 /* The GNU C library defines this for functions which it implements
10000     to always fail with ENOSYS.  Some functions are actually named
10001     something starting with __ and the normal name is an alias.  */
10002 #if defined (__stub_memmove) || defined (__stub___memmove)
10003 choke me
10004 #else
10005 f = memmove;
10006 #endif
10007
10008   ;
10009   return 0;
10010 }
10011 _ACEOF
10012 rm -f conftest.$ac_objext conftest$ac_exeext
10013 if { (eval echo "$as_me:10013: \"$ac_link\"") >&5
10014   (eval $ac_link) 2>&5
10015   ac_status=$?
10016   echo "$as_me:10016: \$? = $ac_status" >&5
10017   (exit $ac_status); } &&
10018          { ac_try='test -s conftest$ac_exeext'
10019   { (eval echo "$as_me:10019: \"$ac_try\"") >&5
10020   (eval $ac_try) 2>&5
10021   ac_status=$?
10022   echo "$as_me:10022: \$? = $ac_status" >&5
10023   (exit $ac_status); }; }; then
10024   ac_cv_func_memmove=yes
10025 else
10026   echo "$as_me: failed program was:" >&5
10027 cat conftest.$ac_ext >&5
10028 ac_cv_func_memmove=no
10029 fi
10030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10031 fi
10032 echo "$as_me:10032: result: $ac_cv_func_memmove" >&5
10033 echo "${ECHO_T}$ac_cv_func_memmove" >&6
10034 if test $ac_cv_func_memmove = yes; then
10035   :
10036 else
10037
10038 echo "$as_me:10038: checking for bcopy" >&5
10039 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
10040 if test "${ac_cv_func_bcopy+set}" = set; then
10041   echo $ECHO_N "(cached) $ECHO_C" >&6
10042 else
10043   cat >conftest.$ac_ext <<_ACEOF
10044 #line 10044 "configure"
10045 #include "confdefs.h"
10046 /* System header to define __stub macros and hopefully few prototypes,
10047     which can conflict with char bcopy (); below.  */
10048 #include <assert.h>
10049 /* Override any gcc2 internal prototype to avoid an error.  */
10050 #ifdef __cplusplus
10051 extern "C"
10052 #endif
10053 /* We use char because int might match the return type of a gcc2
10054    builtin and then its argument prototype would still apply.  */
10055 char bcopy ();
10056 char (*f) ();
10057
10058 int
10059 main ()
10060 {
10061 /* The GNU C library defines this for functions which it implements
10062     to always fail with ENOSYS.  Some functions are actually named
10063     something starting with __ and the normal name is an alias.  */
10064 #if defined (__stub_bcopy) || defined (__stub___bcopy)
10065 choke me
10066 #else
10067 f = bcopy;
10068 #endif
10069
10070   ;
10071   return 0;
10072 }
10073 _ACEOF
10074 rm -f conftest.$ac_objext conftest$ac_exeext
10075 if { (eval echo "$as_me:10075: \"$ac_link\"") >&5
10076   (eval $ac_link) 2>&5
10077   ac_status=$?
10078   echo "$as_me:10078: \$? = $ac_status" >&5
10079   (exit $ac_status); } &&
10080          { ac_try='test -s conftest$ac_exeext'
10081   { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082   (eval $ac_try) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); }; }; then
10086   ac_cv_func_bcopy=yes
10087 else
10088   echo "$as_me: failed program was:" >&5
10089 cat conftest.$ac_ext >&5
10090 ac_cv_func_bcopy=no
10091 fi
10092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10093 fi
10094 echo "$as_me:10094: result: $ac_cv_func_bcopy" >&5
10095 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
10096 if test $ac_cv_func_bcopy = yes; then
10097
10098         echo "$as_me:10098: checking if bcopy does overlapping moves" >&5
10099 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
10100 if test "${cf_cv_good_bcopy+set}" = set; then
10101   echo $ECHO_N "(cached) $ECHO_C" >&6
10102 else
10103
10104                 if test "$cross_compiling" = yes; then
10105   cf_cv_good_bcopy=unknown
10106 else
10107   cat >conftest.$ac_ext <<_ACEOF
10108 #line 10108 "configure"
10109 #include "confdefs.h"
10110
10111 int main() {
10112         static char data[] = "abcdefghijklmnopqrstuwwxyz";
10113         char temp[40];
10114         bcopy(data, temp, sizeof(data));
10115         bcopy(temp+10, temp, 15);
10116         bcopy(temp+5, temp+15, 10);
10117         exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
10118 }
10119
10120 _ACEOF
10121 rm -f conftest$ac_exeext
10122 if { (eval echo "$as_me:10122: \"$ac_link\"") >&5
10123   (eval $ac_link) 2>&5
10124   ac_status=$?
10125   echo "$as_me:10125: \$? = $ac_status" >&5
10126   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10127   { (eval echo "$as_me:10127: \"$ac_try\"") >&5
10128   (eval $ac_try) 2>&5
10129   ac_status=$?
10130   echo "$as_me:10130: \$? = $ac_status" >&5
10131   (exit $ac_status); }; }; then
10132   cf_cv_good_bcopy=yes
10133 else
10134   echo "$as_me: program exited with status $ac_status" >&5
10135 echo "$as_me: failed program was:" >&5
10136 cat conftest.$ac_ext >&5
10137 cf_cv_good_bcopy=no
10138 fi
10139 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10140 fi
10141
10142 fi
10143 echo "$as_me:10143: result: $cf_cv_good_bcopy" >&5
10144 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
10145
10146 else
10147   cf_cv_good_bcopy=no
10148 fi
10149
10150         if test "$cf_cv_good_bcopy" = yes ; then
10151                 cat >>confdefs.h <<\EOF
10152 #define USE_OK_BCOPY 1
10153 EOF
10154
10155         else
10156                 cat >>confdefs.h <<\EOF
10157 #define USE_MY_MEMMOVE 1
10158 EOF
10159
10160         fi
10161
10162 fi
10163
10164 echo "$as_me:10164: checking if poll really works" >&5
10165 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
10166 if test "${cf_cv_working_poll+set}" = set; then
10167   echo $ECHO_N "(cached) $ECHO_C" >&6
10168 else
10169
10170 if test "$cross_compiling" = yes; then
10171   cf_cv_working_poll=unknown
10172 else
10173   cat >conftest.$ac_ext <<_ACEOF
10174 #line 10174 "configure"
10175 #include "confdefs.h"
10176
10177 #include <stdio.h>
10178 #ifdef HAVE_POLL_H
10179 #include <poll.h>
10180 #else
10181 #include <sys/poll.h>
10182 #endif
10183 int main() {
10184         struct pollfd myfds;
10185         int ret;
10186
10187         myfds.fd = 0;
10188         myfds.events = POLLIN;
10189
10190         ret = poll(&myfds, 1, 100);
10191         exit(ret != 0);
10192 }
10193 _ACEOF
10194 rm -f conftest$ac_exeext
10195 if { (eval echo "$as_me:10195: \"$ac_link\"") >&5
10196   (eval $ac_link) 2>&5
10197   ac_status=$?
10198   echo "$as_me:10198: \$? = $ac_status" >&5
10199   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10200   { (eval echo "$as_me:10200: \"$ac_try\"") >&5
10201   (eval $ac_try) 2>&5
10202   ac_status=$?
10203   echo "$as_me:10203: \$? = $ac_status" >&5
10204   (exit $ac_status); }; }; then
10205   cf_cv_working_poll=yes
10206 else
10207   echo "$as_me: program exited with status $ac_status" >&5
10208 echo "$as_me: failed program was:" >&5
10209 cat conftest.$ac_ext >&5
10210 cf_cv_working_poll=no
10211 fi
10212 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10213 fi
10214 fi
10215 echo "$as_me:10215: result: $cf_cv_working_poll" >&5
10216 echo "${ECHO_T}$cf_cv_working_poll" >&6
10217 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
10218 #define HAVE_WORKING_POLL 1
10219 EOF
10220
10221 if test -z "$cf_user_CFLAGS" ; then
10222         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10223         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10224 fi
10225
10226 # Just in case, check if the C compiler has a bool type.
10227
10228 echo "$as_me:10228: checking if we should include stdbool.h" >&5
10229 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
10230
10231 if test "${cf_cv_header_stdbool_h+set}" = set; then
10232   echo $ECHO_N "(cached) $ECHO_C" >&6
10233 else
10234
10235         cat >conftest.$ac_ext <<_ACEOF
10236 #line 10236 "configure"
10237 #include "confdefs.h"
10238
10239 int
10240 main ()
10241 {
10242 bool foo = false
10243   ;
10244   return 0;
10245 }
10246 _ACEOF
10247 rm -f conftest.$ac_objext
10248 if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
10249   (eval $ac_compile) 2>&5
10250   ac_status=$?
10251   echo "$as_me:10251: \$? = $ac_status" >&5
10252   (exit $ac_status); } &&
10253          { ac_try='test -s conftest.$ac_objext'
10254   { (eval echo "$as_me:10254: \"$ac_try\"") >&5
10255   (eval $ac_try) 2>&5
10256   ac_status=$?
10257   echo "$as_me:10257: \$? = $ac_status" >&5
10258   (exit $ac_status); }; }; then
10259   cf_cv_header_stdbool_h=0
10260 else
10261   echo "$as_me: failed program was:" >&5
10262 cat conftest.$ac_ext >&5
10263 cat >conftest.$ac_ext <<_ACEOF
10264 #line 10264 "configure"
10265 #include "confdefs.h"
10266
10267 #ifndef __BEOS__
10268 #include <stdbool.h>
10269 #endif
10270
10271 int
10272 main ()
10273 {
10274 bool foo = false
10275   ;
10276   return 0;
10277 }
10278 _ACEOF
10279 rm -f conftest.$ac_objext
10280 if { (eval echo "$as_me:10280: \"$ac_compile\"") >&5
10281   (eval $ac_compile) 2>&5
10282   ac_status=$?
10283   echo "$as_me:10283: \$? = $ac_status" >&5
10284   (exit $ac_status); } &&
10285          { ac_try='test -s conftest.$ac_objext'
10286   { (eval echo "$as_me:10286: \"$ac_try\"") >&5
10287   (eval $ac_try) 2>&5
10288   ac_status=$?
10289   echo "$as_me:10289: \$? = $ac_status" >&5
10290   (exit $ac_status); }; }; then
10291   cf_cv_header_stdbool_h=1
10292 else
10293   echo "$as_me: failed program was:" >&5
10294 cat conftest.$ac_ext >&5
10295 cf_cv_header_stdbool_h=0
10296 fi
10297 rm -f conftest.$ac_objext conftest.$ac_ext
10298 fi
10299 rm -f conftest.$ac_objext conftest.$ac_ext
10300 fi
10301
10302 if test "$cf_cv_header_stdbool_h" = 1
10303 then    echo "$as_me:10303: result: yes" >&5
10304 echo "${ECHO_T}yes" >&6
10305 else    echo "$as_me:10305: result: no" >&5
10306 echo "${ECHO_T}no" >&6
10307 fi
10308
10309 echo "$as_me:10309: checking for builtin bool type" >&5
10310 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
10311
10312 if test "${cf_cv_cc_bool_type+set}" = set; then
10313   echo $ECHO_N "(cached) $ECHO_C" >&6
10314 else
10315
10316         cat >conftest.$ac_ext <<_ACEOF
10317 #line 10317 "configure"
10318 #include "confdefs.h"
10319
10320 #include <stdio.h>
10321 #include <sys/types.h>
10322
10323 int
10324 main ()
10325 {
10326 bool x = false
10327   ;
10328   return 0;
10329 }
10330 _ACEOF
10331 rm -f conftest.$ac_objext
10332 if { (eval echo "$as_me:10332: \"$ac_compile\"") >&5
10333   (eval $ac_compile) 2>&5
10334   ac_status=$?
10335   echo "$as_me:10335: \$? = $ac_status" >&5
10336   (exit $ac_status); } &&
10337          { ac_try='test -s conftest.$ac_objext'
10338   { (eval echo "$as_me:10338: \"$ac_try\"") >&5
10339   (eval $ac_try) 2>&5
10340   ac_status=$?
10341   echo "$as_me:10341: \$? = $ac_status" >&5
10342   (exit $ac_status); }; }; then
10343   cf_cv_cc_bool_type=1
10344 else
10345   echo "$as_me: failed program was:" >&5
10346 cat conftest.$ac_ext >&5
10347 cf_cv_cc_bool_type=0
10348 fi
10349 rm -f conftest.$ac_objext conftest.$ac_ext
10350
10351 fi
10352
10353 if test "$cf_cv_cc_bool_type" = 1
10354 then    echo "$as_me:10354: result: yes" >&5
10355 echo "${ECHO_T}yes" >&6
10356 else    echo "$as_me:10356: result: no" >&5
10357 echo "${ECHO_T}no" >&6
10358 fi
10359
10360 # Check for C++ compiler characteristics (and ensure that it's there!)
10361 if test -n "$CXX" ; then
10362         ac_ext=cc
10363 ac_cpp='$CXXCPP $CPPFLAGS'
10364 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10365 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10366 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10367
10368 if test -n "$GXX" ; then
10369 case $cf_cv_system_name in #(vi
10370 os2*) #(vi
10371         cf_stdcpp_libname=stdcpp
10372         ;;
10373 *)
10374         cf_stdcpp_libname=stdc++
10375         ;;
10376 esac
10377 echo "$as_me:10377: checking for library $cf_stdcpp_libname" >&5
10378 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
10379 if test "${cf_cv_libstdcpp+set}" = set; then
10380   echo $ECHO_N "(cached) $ECHO_C" >&6
10381 else
10382
10383         cf_save="$LIBS"
10384         LIBS="$LIBS -l$cf_stdcpp_libname"
10385 cat >conftest.$ac_ext <<_ACEOF
10386 #line 10386 "configure"
10387 #include "confdefs.h"
10388
10389 #include <strstream.h>
10390 int
10391 main ()
10392 {
10393
10394 char buf[80];
10395 strstreambuf foo(buf, sizeof(buf))
10396
10397   ;
10398   return 0;
10399 }
10400 _ACEOF
10401 rm -f conftest.$ac_objext conftest$ac_exeext
10402 if { (eval echo "$as_me:10402: \"$ac_link\"") >&5
10403   (eval $ac_link) 2>&5
10404   ac_status=$?
10405   echo "$as_me:10405: \$? = $ac_status" >&5
10406   (exit $ac_status); } &&
10407          { ac_try='test -s conftest$ac_exeext'
10408   { (eval echo "$as_me:10408: \"$ac_try\"") >&5
10409   (eval $ac_try) 2>&5
10410   ac_status=$?
10411   echo "$as_me:10411: \$? = $ac_status" >&5
10412   (exit $ac_status); }; }; then
10413   cf_cv_libstdcpp=yes
10414 else
10415   echo "$as_me: failed program was:" >&5
10416 cat conftest.$ac_ext >&5
10417 cf_cv_libstdcpp=no
10418 fi
10419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10420         LIBS="$cf_save"
10421
10422 fi
10423 echo "$as_me:10423: result: $cf_cv_libstdcpp" >&5
10424 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
10425 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
10426 fi
10427
10428         case $GXX_VERSION in
10429         1*|2.0-6*)
10430                 cf_cxx_library=yes
10431                 ;;
10432         *-2.7*|2.7*)
10433
10434 cf_cxx_library=unknown
10435 case $cf_cv_system_name in #(vi
10436 os2*) #(vi
10437         cf_gpp_libname=gpp
10438         ;;
10439 *)
10440         cf_gpp_libname=g++
10441         ;;
10442 esac
10443 if test "$GXX" = yes; then
10444         echo "$as_me:10444: checking for lib$cf_gpp_libname" >&5
10445 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
10446         cf_save="$LIBS"
10447         LIBS="$LIBS -l$cf_gpp_libname"
10448         cat >conftest.$ac_ext <<_ACEOF
10449 #line 10449 "configure"
10450 #include "confdefs.h"
10451
10452 #include <$cf_gpp_libname/builtin.h>
10453
10454 int
10455 main ()
10456 {
10457 two_arg_error_handler_t foo2 = lib_error_handler
10458   ;
10459   return 0;
10460 }
10461 _ACEOF
10462 rm -f conftest.$ac_objext conftest$ac_exeext
10463 if { (eval echo "$as_me:10463: \"$ac_link\"") >&5
10464   (eval $ac_link) 2>&5
10465   ac_status=$?
10466   echo "$as_me:10466: \$? = $ac_status" >&5
10467   (exit $ac_status); } &&
10468          { ac_try='test -s conftest$ac_exeext'
10469   { (eval echo "$as_me:10469: \"$ac_try\"") >&5
10470   (eval $ac_try) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit $ac_status); }; }; then
10474   cf_cxx_library=yes
10475          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
10476          if test "$cf_gpp_libname" = cpp ; then
10477             cat >>confdefs.h <<\EOF
10478 #define HAVE_GPP_BUILTIN_H 1
10479 EOF
10480
10481          else
10482             cat >>confdefs.h <<\EOF
10483 #define HAVE_GXX_BUILTIN_H 1
10484 EOF
10485
10486          fi
10487 else
10488   echo "$as_me: failed program was:" >&5
10489 cat conftest.$ac_ext >&5
10490 cat >conftest.$ac_ext <<_ACEOF
10491 #line 10491 "configure"
10492 #include "confdefs.h"
10493
10494 #include <builtin.h>
10495
10496 int
10497 main ()
10498 {
10499 two_arg_error_handler_t foo2 = lib_error_handler
10500   ;
10501   return 0;
10502 }
10503 _ACEOF
10504 rm -f conftest.$ac_objext conftest$ac_exeext
10505 if { (eval echo "$as_me:10505: \"$ac_link\"") >&5
10506   (eval $ac_link) 2>&5
10507   ac_status=$?
10508   echo "$as_me:10508: \$? = $ac_status" >&5
10509   (exit $ac_status); } &&
10510          { ac_try='test -s conftest$ac_exeext'
10511   { (eval echo "$as_me:10511: \"$ac_try\"") >&5
10512   (eval $ac_try) 2>&5
10513   ac_status=$?
10514   echo "$as_me:10514: \$? = $ac_status" >&5
10515   (exit $ac_status); }; }; then
10516   cf_cxx_library=yes
10517          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
10518          cat >>confdefs.h <<\EOF
10519 #define HAVE_BUILTIN_H 1
10520 EOF
10521
10522 else
10523   echo "$as_me: failed program was:" >&5
10524 cat conftest.$ac_ext >&5
10525 cf_cxx_library=no
10526 fi
10527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10528 fi
10529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10530         LIBS="$cf_save"
10531         echo "$as_me:10531: result: $cf_cxx_library" >&5
10532 echo "${ECHO_T}$cf_cxx_library" >&6
10533 fi
10534
10535                 ;;
10536         *)
10537                 cf_cxx_library=no
10538                 ;;
10539         esac
10540
10541         ac_ext=cc
10542 ac_cpp='$CXXCPP $CPPFLAGS'
10543 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10544 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10545 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10546 echo "$as_me:10546: checking how to run the C++ preprocessor" >&5
10547 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
10548 if test -z "$CXXCPP"; then
10549   if test "${ac_cv_prog_CXXCPP+set}" = set; then
10550   echo $ECHO_N "(cached) $ECHO_C" >&6
10551 else
10552       # Double quotes because CXXCPP needs to be expanded
10553     for CXXCPP in "$CXX -E" "/lib/cpp"
10554     do
10555       ac_preproc_ok=false
10556 for ac_cxx_preproc_warn_flag in '' yes
10557 do
10558   # Use a header file that comes with gcc, so configuring glibc
10559   # with a fresh cross-compiler works.
10560   # On the NeXT, cc -E runs the code through the compiler's parser,
10561   # not just through cpp. "Syntax error" is here to catch this case.
10562   cat >conftest.$ac_ext <<_ACEOF
10563 #line 10563 "configure"
10564 #include "confdefs.h"
10565 #include <assert.h>
10566                      Syntax error
10567 _ACEOF
10568 if { (eval echo "$as_me:10568: \"$ac_cpp conftest.$ac_ext\"") >&5
10569   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10570   ac_status=$?
10571   egrep -v '^ *\+' conftest.er1 >conftest.err
10572   rm -f conftest.er1
10573   cat conftest.err >&5
10574   echo "$as_me:10574: \$? = $ac_status" >&5
10575   (exit $ac_status); } >/dev/null; then
10576   if test -s conftest.err; then
10577     ac_cpp_err=$ac_cxx_preproc_warn_flag
10578   else
10579     ac_cpp_err=
10580   fi
10581 else
10582   ac_cpp_err=yes
10583 fi
10584 if test -z "$ac_cpp_err"; then
10585   :
10586 else
10587   echo "$as_me: failed program was:" >&5
10588   cat conftest.$ac_ext >&5
10589   # Broken: fails on valid input.
10590 continue
10591 fi
10592 rm -f conftest.err conftest.$ac_ext
10593
10594   # OK, works on sane cases.  Now check whether non-existent headers
10595   # can be detected and how.
10596   cat >conftest.$ac_ext <<_ACEOF
10597 #line 10597 "configure"
10598 #include "confdefs.h"
10599 #include <ac_nonexistent.h>
10600 _ACEOF
10601 if { (eval echo "$as_me:10601: \"$ac_cpp conftest.$ac_ext\"") >&5
10602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10603   ac_status=$?
10604   egrep -v '^ *\+' conftest.er1 >conftest.err
10605   rm -f conftest.er1
10606   cat conftest.err >&5
10607   echo "$as_me:10607: \$? = $ac_status" >&5
10608   (exit $ac_status); } >/dev/null; then
10609   if test -s conftest.err; then
10610     ac_cpp_err=$ac_cxx_preproc_warn_flag
10611   else
10612     ac_cpp_err=
10613   fi
10614 else
10615   ac_cpp_err=yes
10616 fi
10617 if test -z "$ac_cpp_err"; then
10618   # Broken: success on invalid input.
10619 continue
10620 else
10621   echo "$as_me: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   # Passes both tests.
10624 ac_preproc_ok=:
10625 break
10626 fi
10627 rm -f conftest.err conftest.$ac_ext
10628
10629 done
10630 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
10631 rm -f conftest.err conftest.$ac_ext
10632 if $ac_preproc_ok; then
10633   break
10634 fi
10635
10636     done
10637     ac_cv_prog_CXXCPP=$CXXCPP
10638
10639 fi
10640   CXXCPP=$ac_cv_prog_CXXCPP
10641 else
10642   ac_cv_prog_CXXCPP=$CXXCPP
10643 fi
10644 echo "$as_me:10644: result: $CXXCPP" >&5
10645 echo "${ECHO_T}$CXXCPP" >&6
10646 ac_preproc_ok=false
10647 for ac_cxx_preproc_warn_flag in '' yes
10648 do
10649   # Use a header file that comes with gcc, so configuring glibc
10650   # with a fresh cross-compiler works.
10651   # On the NeXT, cc -E runs the code through the compiler's parser,
10652   # not just through cpp. "Syntax error" is here to catch this case.
10653   cat >conftest.$ac_ext <<_ACEOF
10654 #line 10654 "configure"
10655 #include "confdefs.h"
10656 #include <assert.h>
10657                      Syntax error
10658 _ACEOF
10659 if { (eval echo "$as_me:10659: \"$ac_cpp conftest.$ac_ext\"") >&5
10660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10661   ac_status=$?
10662   egrep -v '^ *\+' conftest.er1 >conftest.err
10663   rm -f conftest.er1
10664   cat conftest.err >&5
10665   echo "$as_me:10665: \$? = $ac_status" >&5
10666   (exit $ac_status); } >/dev/null; then
10667   if test -s conftest.err; then
10668     ac_cpp_err=$ac_cxx_preproc_warn_flag
10669   else
10670     ac_cpp_err=
10671   fi
10672 else
10673   ac_cpp_err=yes
10674 fi
10675 if test -z "$ac_cpp_err"; then
10676   :
10677 else
10678   echo "$as_me: failed program was:" >&5
10679   cat conftest.$ac_ext >&5
10680   # Broken: fails on valid input.
10681 continue
10682 fi
10683 rm -f conftest.err conftest.$ac_ext
10684
10685   # OK, works on sane cases.  Now check whether non-existent headers
10686   # can be detected and how.
10687   cat >conftest.$ac_ext <<_ACEOF
10688 #line 10688 "configure"
10689 #include "confdefs.h"
10690 #include <ac_nonexistent.h>
10691 _ACEOF
10692 if { (eval echo "$as_me:10692: \"$ac_cpp conftest.$ac_ext\"") >&5
10693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10694   ac_status=$?
10695   egrep -v '^ *\+' conftest.er1 >conftest.err
10696   rm -f conftest.er1
10697   cat conftest.err >&5
10698   echo "$as_me:10698: \$? = $ac_status" >&5
10699   (exit $ac_status); } >/dev/null; then
10700   if test -s conftest.err; then
10701     ac_cpp_err=$ac_cxx_preproc_warn_flag
10702   else
10703     ac_cpp_err=
10704   fi
10705 else
10706   ac_cpp_err=yes
10707 fi
10708 if test -z "$ac_cpp_err"; then
10709   # Broken: success on invalid input.
10710 continue
10711 else
10712   echo "$as_me: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   # Passes both tests.
10715 ac_preproc_ok=:
10716 break
10717 fi
10718 rm -f conftest.err conftest.$ac_ext
10719
10720 done
10721 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
10722 rm -f conftest.err conftest.$ac_ext
10723 if $ac_preproc_ok; then
10724   :
10725 else
10726   { { echo "$as_me:10726: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
10727 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
10728    { (exit 1); exit 1; }; }
10729 fi
10730
10731 ac_ext=cc
10732 ac_cpp='$CXXCPP $CPPFLAGS'
10733 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10734 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10735 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10736
10737 for ac_header in typeinfo
10738 do
10739 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10740 echo "$as_me:10740: checking for $ac_header" >&5
10741 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10742 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10743   echo $ECHO_N "(cached) $ECHO_C" >&6
10744 else
10745   cat >conftest.$ac_ext <<_ACEOF
10746 #line 10746 "configure"
10747 #include "confdefs.h"
10748 #include <$ac_header>
10749 _ACEOF
10750 if { (eval echo "$as_me:10750: \"$ac_cpp conftest.$ac_ext\"") >&5
10751   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10752   ac_status=$?
10753   egrep -v '^ *\+' conftest.er1 >conftest.err
10754   rm -f conftest.er1
10755   cat conftest.err >&5
10756   echo "$as_me:10756: \$? = $ac_status" >&5
10757   (exit $ac_status); } >/dev/null; then
10758   if test -s conftest.err; then
10759     ac_cpp_err=$ac_cxx_preproc_warn_flag
10760   else
10761     ac_cpp_err=
10762   fi
10763 else
10764   ac_cpp_err=yes
10765 fi
10766 if test -z "$ac_cpp_err"; then
10767   eval "$as_ac_Header=yes"
10768 else
10769   echo "$as_me: failed program was:" >&5
10770   cat conftest.$ac_ext >&5
10771   eval "$as_ac_Header=no"
10772 fi
10773 rm -f conftest.err conftest.$ac_ext
10774 fi
10775 echo "$as_me:10775: result: `eval echo '${'$as_ac_Header'}'`" >&5
10776 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10777 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10778   cat >>confdefs.h <<EOF
10779 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10780 EOF
10781
10782 fi
10783 done
10784
10785 echo "$as_me:10785: checking if we should include stdbool.h" >&5
10786 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
10787
10788 if test "${cf_cv_header_stdbool_h+set}" = set; then
10789   echo $ECHO_N "(cached) $ECHO_C" >&6
10790 else
10791
10792         cat >conftest.$ac_ext <<_ACEOF
10793 #line 10793 "configure"
10794 #include "confdefs.h"
10795
10796 int
10797 main ()
10798 {
10799 bool foo = false
10800   ;
10801   return 0;
10802 }
10803 _ACEOF
10804 rm -f conftest.$ac_objext
10805 if { (eval echo "$as_me:10805: \"$ac_compile\"") >&5
10806   (eval $ac_compile) 2>&5
10807   ac_status=$?
10808   echo "$as_me:10808: \$? = $ac_status" >&5
10809   (exit $ac_status); } &&
10810          { ac_try='test -s conftest.$ac_objext'
10811   { (eval echo "$as_me:10811: \"$ac_try\"") >&5
10812   (eval $ac_try) 2>&5
10813   ac_status=$?
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); }; }; then
10816   cf_cv_header_stdbool_h=0
10817 else
10818   echo "$as_me: failed program was:" >&5
10819 cat conftest.$ac_ext >&5
10820 cat >conftest.$ac_ext <<_ACEOF
10821 #line 10821 "configure"
10822 #include "confdefs.h"
10823
10824 #ifndef __BEOS__
10825 #include <stdbool.h>
10826 #endif
10827
10828 int
10829 main ()
10830 {
10831 bool foo = false
10832   ;
10833   return 0;
10834 }
10835 _ACEOF
10836 rm -f conftest.$ac_objext
10837 if { (eval echo "$as_me:10837: \"$ac_compile\"") >&5
10838   (eval $ac_compile) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit $ac_status); } &&
10842          { ac_try='test -s conftest.$ac_objext'
10843   { (eval echo "$as_me:10843: \"$ac_try\"") >&5
10844   (eval $ac_try) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit $ac_status); }; }; then
10848   cf_cv_header_stdbool_h=1
10849 else
10850   echo "$as_me: failed program was:" >&5
10851 cat conftest.$ac_ext >&5
10852 cf_cv_header_stdbool_h=0
10853 fi
10854 rm -f conftest.$ac_objext conftest.$ac_ext
10855 fi
10856 rm -f conftest.$ac_objext conftest.$ac_ext
10857 fi
10858
10859 if test "$cf_cv_header_stdbool_h" = 1
10860 then    echo "$as_me:10860: result: yes" >&5
10861 echo "${ECHO_T}yes" >&6
10862 else    echo "$as_me:10862: result: no" >&5
10863 echo "${ECHO_T}no" >&6
10864 fi
10865
10866 echo "$as_me:10866: checking for builtin bool type" >&5
10867 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
10868
10869 if test "${cf_cv_builtin_bool+set}" = set; then
10870   echo $ECHO_N "(cached) $ECHO_C" >&6
10871 else
10872
10873         cat >conftest.$ac_ext <<_ACEOF
10874 #line 10874 "configure"
10875 #include "confdefs.h"
10876
10877 #include <stdio.h>
10878 #include <sys/types.h>
10879
10880 int
10881 main ()
10882 {
10883 bool x = false
10884   ;
10885   return 0;
10886 }
10887 _ACEOF
10888 rm -f conftest.$ac_objext
10889 if { (eval echo "$as_me:10889: \"$ac_compile\"") >&5
10890   (eval $ac_compile) 2>&5
10891   ac_status=$?
10892   echo "$as_me:10892: \$? = $ac_status" >&5
10893   (exit $ac_status); } &&
10894          { ac_try='test -s conftest.$ac_objext'
10895   { (eval echo "$as_me:10895: \"$ac_try\"") >&5
10896   (eval $ac_try) 2>&5
10897   ac_status=$?
10898   echo "$as_me:10898: \$? = $ac_status" >&5
10899   (exit $ac_status); }; }; then
10900   cf_cv_builtin_bool=1
10901 else
10902   echo "$as_me: failed program was:" >&5
10903 cat conftest.$ac_ext >&5
10904 cf_cv_builtin_bool=0
10905 fi
10906 rm -f conftest.$ac_objext conftest.$ac_ext
10907
10908 fi
10909
10910 if test "$cf_cv_builtin_bool" = 1
10911 then    echo "$as_me:10911: result: yes" >&5
10912 echo "${ECHO_T}yes" >&6
10913 else    echo "$as_me:10913: result: no" >&5
10914 echo "${ECHO_T}no" >&6
10915 fi
10916
10917 echo "$as_me:10917: checking for size of bool" >&5
10918 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
10919 if test "${cf_cv_type_of_bool+set}" = set; then
10920   echo $ECHO_N "(cached) $ECHO_C" >&6
10921 else
10922
10923         rm -f cf_test.out
10924         if test "$cross_compiling" = yes; then
10925   cf_cv_type_of_bool=unknown
10926 else
10927   cat >conftest.$ac_ext <<_ACEOF
10928 #line 10928 "configure"
10929 #include "confdefs.h"
10930
10931 #include <stdlib.h>
10932 #include <stdio.h>
10933
10934 #if defined(__cplusplus)
10935
10936 #ifdef HAVE_GXX_BUILTIN_H
10937 #include <g++/builtin.h>
10938 #elif HAVE_GPP_BUILTIN_H
10939 #include <gpp/builtin.h>
10940 #elif HAVE_BUILTIN_H
10941 #include <builtin.h>
10942 #endif
10943
10944 #else
10945
10946 #if $cf_cv_header_stdbool_h
10947 #include <stdbool.h>
10948 #endif
10949
10950 #endif
10951
10952 main()
10953 {
10954         FILE *fp = fopen("cf_test.out", "w");
10955         if (fp != 0) {
10956                 bool x = true;
10957                 if ((bool)(-x) >= 0)
10958                         fputs("unsigned ", fp);
10959                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
10960                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
10961                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
10962                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
10963                 fclose(fp);
10964         }
10965         exit(0);
10966 }
10967
10968 _ACEOF
10969 rm -f conftest$ac_exeext
10970 if { (eval echo "$as_me:10970: \"$ac_link\"") >&5
10971   (eval $ac_link) 2>&5
10972   ac_status=$?
10973   echo "$as_me:10973: \$? = $ac_status" >&5
10974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10975   { (eval echo "$as_me:10975: \"$ac_try\"") >&5
10976   (eval $ac_try) 2>&5
10977   ac_status=$?
10978   echo "$as_me:10978: \$? = $ac_status" >&5
10979   (exit $ac_status); }; }; then
10980   cf_cv_type_of_bool=`cat cf_test.out`
10981                  if test -z "$cf_cv_type_of_bool"; then
10982                    cf_cv_type_of_bool=unknown
10983                  fi
10984 else
10985   echo "$as_me: program exited with status $ac_status" >&5
10986 echo "$as_me: failed program was:" >&5
10987 cat conftest.$ac_ext >&5
10988 cf_cv_type_of_bool=unknown
10989 fi
10990 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10991 fi
10992
10993 fi
10994
10995         rm -f cf_test.out
10996 echo "$as_me:10996: result: $cf_cv_type_of_bool" >&5
10997 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
10998 if test "$cf_cv_type_of_bool" = unknown ; then
10999         case .$NCURSES_BOOL in #(vi
11000         .auto|.) NCURSES_BOOL=unsigned;;
11001         esac
11002         { echo "$as_me:11002: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
11003 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
11004         cf_cv_type_of_bool=$NCURSES_BOOL
11005 fi
11006
11007 echo "$as_me:11007: checking for special defines needed for etip.h" >&5
11008 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
11009 cf_save_CXXFLAGS="$CXXFLAGS"
11010 cf_result="none"
11011 for cf_math in "" MATH_H
11012 do
11013 for cf_excp in "" MATH_EXCEPTION
11014 do
11015         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
11016         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
11017         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
11018 cat >conftest.$ac_ext <<_ACEOF
11019 #line 11019 "configure"
11020 #include "confdefs.h"
11021
11022 #include <etip.h.in>
11023
11024 int
11025 main ()
11026 {
11027
11028   ;
11029   return 0;
11030 }
11031 _ACEOF
11032 rm -f conftest.$ac_objext
11033 if { (eval echo "$as_me:11033: \"$ac_compile\"") >&5
11034   (eval $ac_compile) 2>&5
11035   ac_status=$?
11036   echo "$as_me:11036: \$? = $ac_status" >&5
11037   (exit $ac_status); } &&
11038          { ac_try='test -s conftest.$ac_objext'
11039   { (eval echo "$as_me:11039: \"$ac_try\"") >&5
11040   (eval $ac_try) 2>&5
11041   ac_status=$?
11042   echo "$as_me:11042: \$? = $ac_status" >&5
11043   (exit $ac_status); }; }; then
11044
11045         test -n "$cf_math" && cat >>confdefs.h <<EOF
11046 #define ETIP_NEEDS_${cf_math} 1
11047 EOF
11048
11049         test -n "$cf_excp" && cat >>confdefs.h <<EOF
11050 #define ETIP_NEEDS_${cf_excp} 1
11051 EOF
11052
11053         cf_result="$cf_math $cf_excp"
11054         break
11055
11056 else
11057   echo "$as_me: failed program was:" >&5
11058 cat conftest.$ac_ext >&5
11059 fi
11060 rm -f conftest.$ac_objext conftest.$ac_ext
11061 done
11062 done
11063 echo "$as_me:11063: result: $cf_result" >&5
11064 echo "${ECHO_T}$cf_result" >&6
11065 CXXFLAGS="$cf_save_CXXFLAGS"
11066
11067 if test -n "$CXX"; then
11068 echo "$as_me:11068: checking if $CXX accepts parameter initialization" >&5
11069 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
11070 if test "${cf_cv_cpp_param_init+set}" = set; then
11071   echo $ECHO_N "(cached) $ECHO_C" >&6
11072 else
11073
11074         ac_ext=cc
11075 ac_cpp='$CXXCPP $CPPFLAGS'
11076 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11077 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11078 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11079
11080         if test "$cross_compiling" = yes; then
11081   cf_cv_cpp_param_init=unknown
11082 else
11083   cat >conftest.$ac_ext <<_ACEOF
11084 #line 11084 "configure"
11085 #include "confdefs.h"
11086
11087 class TEST {
11088 private:
11089         int value;
11090 public:
11091         TEST(int x = 1);
11092         ~TEST();
11093 };
11094
11095 TEST::TEST(int x = 1)   // some compilers do not like second initializer
11096 {
11097         value = x;
11098 }
11099 void main() { }
11100
11101 _ACEOF
11102 rm -f conftest$ac_exeext
11103 if { (eval echo "$as_me:11103: \"$ac_link\"") >&5
11104   (eval $ac_link) 2>&5
11105   ac_status=$?
11106   echo "$as_me:11106: \$? = $ac_status" >&5
11107   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11108   { (eval echo "$as_me:11108: \"$ac_try\"") >&5
11109   (eval $ac_try) 2>&5
11110   ac_status=$?
11111   echo "$as_me:11111: \$? = $ac_status" >&5
11112   (exit $ac_status); }; }; then
11113   cf_cv_cpp_param_init=yes
11114 else
11115   echo "$as_me: program exited with status $ac_status" >&5
11116 echo "$as_me: failed program was:" >&5
11117 cat conftest.$ac_ext >&5
11118 cf_cv_cpp_param_init=no
11119 fi
11120 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11121 fi
11122         ac_ext=cc
11123 ac_cpp='$CXXCPP $CPPFLAGS'
11124 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11125 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11126 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11127
11128 fi
11129 echo "$as_me:11129: result: $cf_cv_cpp_param_init" >&5
11130 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
11131 fi
11132 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
11133 #define CPP_HAS_PARAM_INIT 1
11134 EOF
11135
11136 if test -n "$CXX"; then
11137
11138 ac_ext=cc
11139 ac_cpp='$CXXCPP $CPPFLAGS'
11140 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11141 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11142 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11143
11144 for ac_header in strstream.h
11145 do
11146 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11147 echo "$as_me:11147: checking for $ac_header" >&5
11148 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11149 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11150   echo $ECHO_N "(cached) $ECHO_C" >&6
11151 else
11152   cat >conftest.$ac_ext <<_ACEOF
11153 #line 11153 "configure"
11154 #include "confdefs.h"
11155 #include <$ac_header>
11156 _ACEOF
11157 if { (eval echo "$as_me:11157: \"$ac_cpp conftest.$ac_ext\"") >&5
11158   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11159   ac_status=$?
11160   egrep -v '^ *\+' conftest.er1 >conftest.err
11161   rm -f conftest.er1
11162   cat conftest.err >&5
11163   echo "$as_me:11163: \$? = $ac_status" >&5
11164   (exit $ac_status); } >/dev/null; then
11165   if test -s conftest.err; then
11166     ac_cpp_err=$ac_cxx_preproc_warn_flag
11167   else
11168     ac_cpp_err=
11169   fi
11170 else
11171   ac_cpp_err=yes
11172 fi
11173 if test -z "$ac_cpp_err"; then
11174   eval "$as_ac_Header=yes"
11175 else
11176   echo "$as_me: failed program was:" >&5
11177   cat conftest.$ac_ext >&5
11178   eval "$as_ac_Header=no"
11179 fi
11180 rm -f conftest.err conftest.$ac_ext
11181 fi
11182 echo "$as_me:11182: result: `eval echo '${'$as_ac_Header'}'`" >&5
11183 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11184 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11185   cat >>confdefs.h <<EOF
11186 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11187 EOF
11188
11189 fi
11190 done
11191
11192 echo "$as_me:11192: checking if $CXX supports vscan function" >&5
11193 echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
11194 if test "${cf_cv_cpp_vscan_func+set}" = set; then
11195   echo $ECHO_N "(cached) $ECHO_C" >&6
11196 else
11197
11198         for cf_vscan_func in strstream strstream_cast stdio
11199         do
11200         case $cf_vscan_func in #(vi
11201         stdio)          cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
11202         strstream)      cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
11203         strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
11204         esac
11205         cat >conftest.$ac_ext <<_ACEOF
11206 #line 11206 "configure"
11207 #include "confdefs.h"
11208
11209 #include <stdio.h>
11210 #include <stdarg.h>
11211 #define $cf_vscan_defs 1
11212 #if defined(USE_STDIO_VSCAN)
11213 #elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
11214 #include <strstream.h>
11215 #endif
11216
11217 int scanw(const char* fmt, ...)
11218 {
11219     int result = -1;
11220     char buf[BUFSIZ];
11221
11222     va_list args;
11223     va_start(args, fmt);
11224 #if defined(USE_STDIO_VSCAN)
11225     if (::vsscanf(buf, fmt, args) != -1)
11226         result = 0;
11227 #elif defined(USE_STRSTREAM_VSCAN)
11228     strstreambuf ss(buf, sizeof(buf));
11229     if (ss.vscan(fmt, args) != -1)
11230         result = 0;
11231 #elif defined(USE_STRSTREAM_VSCAN_CAST)
11232     strstreambuf ss(buf, sizeof(buf));
11233     if (ss.vscan(fmt, (_IO_va_list)args) != -1)
11234         result = 0;
11235 #else
11236 #error case $cf_vscan_func failed
11237 #endif
11238     va_end(args);
11239     return result;
11240 }
11241
11242 int
11243 main ()
11244 {
11245 int tmp, foo = scanw("%d", &tmp)
11246   ;
11247   return 0;
11248 }
11249 _ACEOF
11250 rm -f conftest.$ac_objext conftest$ac_exeext
11251 if { (eval echo "$as_me:11251: \"$ac_link\"") >&5
11252   (eval $ac_link) 2>&5
11253   ac_status=$?
11254   echo "$as_me:11254: \$? = $ac_status" >&5
11255   (exit $ac_status); } &&
11256          { ac_try='test -s conftest$ac_exeext'
11257   { (eval echo "$as_me:11257: \"$ac_try\"") >&5
11258   (eval $ac_try) 2>&5
11259   ac_status=$?
11260   echo "$as_me:11260: \$? = $ac_status" >&5
11261   (exit $ac_status); }; }; then
11262   cf_cv_cpp_vscan_func=$cf_vscan_func; break
11263 else
11264   echo "$as_me: failed program was:" >&5
11265 cat conftest.$ac_ext >&5
11266 cf_cv_cpp_vscan_func=no
11267 fi
11268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11269         test "$cf_cv_cpp_vscan_func" != no && break
11270         done
11271
11272 fi
11273 echo "$as_me:11273: result: $cf_cv_cpp_vscan_func" >&5
11274 echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
11275
11276 ac_ext=cc
11277 ac_cpp='$CXXCPP $CPPFLAGS'
11278 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11279 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11280 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11281
11282 fi
11283
11284 case $cf_cv_cpp_vscan_func in #(vi
11285 stdio) #(vi
11286         cat >>confdefs.h <<\EOF
11287 #define CPP_HAS_VSCAN_FUNC 1
11288 EOF
11289
11290         cat >>confdefs.h <<\EOF
11291 #define USE_STDIO_VSCAN 1
11292 EOF
11293
11294         ;;
11295 strstream)
11296         cat >>confdefs.h <<\EOF
11297 #define CPP_HAS_VSCAN_FUNC 1
11298 EOF
11299
11300         cat >>confdefs.h <<\EOF
11301 #define USE_STRSTREAM_VSCAN 1
11302 EOF
11303
11304         ;;
11305 strstream_cast)
11306         cat >>confdefs.h <<\EOF
11307 #define CPP_HAS_VSCAN_FUNC 1
11308 EOF
11309
11310         cat >>confdefs.h <<\EOF
11311 #define USE_STRSTREAM_VSCAN_CAST 1
11312 EOF
11313
11314         ;;
11315 esac
11316
11317         CXX_AR='$(AR)'
11318         CXX_AR_OPTS='$(AR_OPTS)'
11319         case $cf_cv_system_name in #(vi
11320         irix*) #(vi
11321             if test "$GXX" != yes ; then
11322                 CXX_AR='$(CXX)'
11323                 CXX_AR_OPTS='-ar -o'
11324             fi
11325             ;;
11326         sco3.2v5*) #(vi
11327             CXXLDFLAGS="-u main"
11328             ;;
11329         solaris2*)
11330             if test "$GXX" != yes ; then
11331                 CXX_AR='$(CXX)'
11332                 CXX_AR_OPTS='-xar -o'
11333             fi
11334             ;;
11335         esac
11336
11337 else
11338         cf_cxx_library=no
11339         cf_cv_builtin_bool=1
11340
11341         # Just because we are not configuring against C++ right now does not
11342         # mean that a user will not want to use C++.  Some distributors disable
11343         # the C++ portion of this configuration as a shortcut (or just to avoid
11344         # compiling the demo in the c++ directory).  So we need a reasonable
11345         # default for the 'bool' type.
11346         #
11347         # Caveat: since the storage of the bool type is not standardized, it
11348         # may change.
11349
11350         if test "$NCURSES_BOOL" != auto ; then
11351                 cf_cv_type_of_bool=$NCURSES_AUTO
11352         else
11353                 if test "$cf_cv_header_stdbool_h" = 1 ; then
11354
11355 echo "$as_me:11355: checking for size of bool" >&5
11356 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
11357 if test "${cf_cv_type_of_bool+set}" = set; then
11358   echo $ECHO_N "(cached) $ECHO_C" >&6
11359 else
11360
11361         rm -f cf_test.out
11362         if test "$cross_compiling" = yes; then
11363   cf_cv_type_of_bool=unknown
11364 else
11365   cat >conftest.$ac_ext <<_ACEOF
11366 #line 11366 "configure"
11367 #include "confdefs.h"
11368
11369 #include <stdlib.h>
11370 #include <stdio.h>
11371
11372 #if defined(__cplusplus)
11373
11374 #ifdef HAVE_GXX_BUILTIN_H
11375 #include <g++/builtin.h>
11376 #elif HAVE_GPP_BUILTIN_H
11377 #include <gpp/builtin.h>
11378 #elif HAVE_BUILTIN_H
11379 #include <builtin.h>
11380 #endif
11381
11382 #else
11383
11384 #if $cf_cv_header_stdbool_h
11385 #include <stdbool.h>
11386 #endif
11387
11388 #endif
11389
11390 main()
11391 {
11392         FILE *fp = fopen("cf_test.out", "w");
11393         if (fp != 0) {
11394                 bool x = true;
11395                 if ((bool)(-x) >= 0)
11396                         fputs("unsigned ", fp);
11397                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
11398                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
11399                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
11400                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
11401                 fclose(fp);
11402         }
11403         exit(0);
11404 }
11405
11406 _ACEOF
11407 rm -f conftest$ac_exeext
11408 if { (eval echo "$as_me:11408: \"$ac_link\"") >&5
11409   (eval $ac_link) 2>&5
11410   ac_status=$?
11411   echo "$as_me:11411: \$? = $ac_status" >&5
11412   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11413   { (eval echo "$as_me:11413: \"$ac_try\"") >&5
11414   (eval $ac_try) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); }; }; then
11418   cf_cv_type_of_bool=`cat cf_test.out`
11419                  if test -z "$cf_cv_type_of_bool"; then
11420                    cf_cv_type_of_bool=unknown
11421                  fi
11422 else
11423   echo "$as_me: program exited with status $ac_status" >&5
11424 echo "$as_me: failed program was:" >&5
11425 cat conftest.$ac_ext >&5
11426 cf_cv_type_of_bool=unknown
11427 fi
11428 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11429 fi
11430
11431 fi
11432
11433         rm -f cf_test.out
11434 echo "$as_me:11434: result: $cf_cv_type_of_bool" >&5
11435 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
11436 if test "$cf_cv_type_of_bool" = unknown ; then
11437         case .$NCURSES_BOOL in #(vi
11438         .auto|.) NCURSES_BOOL=unsigned;;
11439         esac
11440         { echo "$as_me:11440: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
11441 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
11442         cf_cv_type_of_bool=$NCURSES_BOOL
11443 fi
11444
11445                 else
11446                         echo "$as_me:11446: checking for fallback type of bool" >&5
11447 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
11448                         case "$host_cpu" in #(vi
11449                         i?86)   cf_cv_type_of_bool=char ;; #(vi
11450                         *)      cf_cv_type_of_bool=int  ;;
11451                         esac
11452                         echo "$as_me:11452: result: $cf_cv_type_of_bool" >&5
11453 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
11454                 fi
11455         fi
11456 fi
11457
11458 # If the C compiler did not declare bool, and we did not determine that the C++
11459 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
11460 # ncurses library use the same type as C++ bool.  Note that this allows one to
11461 # specify the type of bool in a configure-script option and postpone
11462 # integration with the C++ compiler provided that the types are compatible.
11463 USE_CXX_BOOL=1
11464 if test $cf_cv_cc_bool_type = 1
11465 then
11466         # oops: C has a bool.  Unlikely, but C++ could differ.
11467         USE_CXX_BOOL=0
11468 elif test $cf_cv_builtin_bool = 0
11469 then
11470         # C++ has no bool
11471         USE_CXX_BOOL=0
11472 else
11473         # this is the normal case
11474         USE_CXX_BOOL='defined(__cplusplus)'
11475 fi
11476
11477 if test "$cf_with_ada" != "no" ; then
11478 cf_ada_make=gnatmake
11479 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
11480 set dummy $cf_ada_make; ac_word=$2
11481 echo "$as_me:11481: checking for $ac_word" >&5
11482 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11483 if test "${ac_cv_prog_gnat_exists+set}" = set; then
11484   echo $ECHO_N "(cached) $ECHO_C" >&6
11485 else
11486   if test -n "$gnat_exists"; then
11487   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
11488 else
11489   ac_save_IFS=$IFS; IFS=$ac_path_separator
11490 ac_dummy="$PATH"
11491 for ac_dir in $ac_dummy; do
11492   IFS=$ac_save_IFS
11493   test -z "$ac_dir" && ac_dir=.
11494   $as_executable_p "$ac_dir/$ac_word" || continue
11495 ac_cv_prog_gnat_exists="yes"
11496 echo "$as_me:11496: found $ac_dir/$ac_word" >&5
11497 break
11498 done
11499
11500   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
11501 fi
11502 fi
11503 gnat_exists=$ac_cv_prog_gnat_exists
11504 if test -n "$gnat_exists"; then
11505   echo "$as_me:11505: result: $gnat_exists" >&5
11506 echo "${ECHO_T}$gnat_exists" >&6
11507 else
11508   echo "$as_me:11508: result: no" >&5
11509 echo "${ECHO_T}no" >&6
11510 fi
11511
11512 if test "$ac_cv_prog_gnat_exists" = no; then
11513    cf_ada_make=
11514 else
11515
11516 echo "$as_me:11516: checking for gnat version" >&5
11517 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
11518 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
11519   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
11520 echo "$as_me:11520: result: $cf_gnat_version" >&5
11521 echo "${ECHO_T}$cf_gnat_version" >&6
11522
11523 case $cf_gnat_version in
11524   3.1[1-9]*|3.[2-9]*|[4-9].*)
11525     cf_cv_prog_gnat_correct=yes
11526     ;;
11527   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
11528      cf_cv_prog_gnat_correct=no
11529      ;;
11530 esac
11531 case $cf_gnat_version in
11532   3.[1-9]*|[4-9].*)
11533       cf_compile_generics=generics
11534       cf_generic_objects="\$(GENOBJS)"
11535       ;;
11536   *)  cf_compile_generics=
11537       cf_generic_objects=
11538       ;;
11539 esac
11540
11541    # Extract the first word of "m4", so it can be a program name with args.
11542 set dummy m4; ac_word=$2
11543 echo "$as_me:11543: checking for $ac_word" >&5
11544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11545 if test "${ac_cv_prog_M4_exists+set}" = set; then
11546   echo $ECHO_N "(cached) $ECHO_C" >&6
11547 else
11548   if test -n "$M4_exists"; then
11549   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11550 else
11551   ac_save_IFS=$IFS; IFS=$ac_path_separator
11552 ac_dummy="$PATH"
11553 for ac_dir in $ac_dummy; do
11554   IFS=$ac_save_IFS
11555   test -z "$ac_dir" && ac_dir=.
11556   $as_executable_p "$ac_dir/$ac_word" || continue
11557 ac_cv_prog_M4_exists="yes"
11558 echo "$as_me:11558: found $ac_dir/$ac_word" >&5
11559 break
11560 done
11561
11562   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11563 fi
11564 fi
11565 M4_exists=$ac_cv_prog_M4_exists
11566 if test -n "$M4_exists"; then
11567   echo "$as_me:11567: result: $M4_exists" >&5
11568 echo "${ECHO_T}$M4_exists" >&6
11569 else
11570   echo "$as_me:11570: result: no" >&5
11571 echo "${ECHO_T}no" >&6
11572 fi
11573
11574    if test "$ac_cv_prog_M4_exists" = no; then
11575       cf_cv_prog_gnat_correct=no
11576       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11577    fi
11578    if test "$cf_cv_prog_gnat_correct" = yes; then
11579       echo "$as_me:11579: checking if GNAT works" >&5
11580 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11581
11582 rm -f conftest*
11583 cat >>conftest.ads <<CF_EOF
11584 procedure conftest;
11585 CF_EOF
11586 cat >>conftest.adb <<CF_EOF
11587 with Text_IO;
11588 with GNAT.OS_Lib;
11589 procedure conftest is
11590 begin
11591    Text_IO.Put ("Hello World");
11592    Text_IO.New_Line;
11593    GNAT.OS_Lib.OS_Exit (0);
11594 end conftest;
11595 CF_EOF
11596 if ( $cf_ada_make conftest 1>&5 2>&1 ) ; then
11597    if ( ./conftest 1>&5 2>&1 ) ; then
11598       cf_cv_prog_gnat_correct=yes
11599    else
11600       cf_cv_prog_gnat_correct=no
11601    fi
11602 else
11603    cf_cv_prog_gnat_correct=no
11604 fi
11605 rm -f conftest*
11606
11607       echo "$as_me:11607: result: $cf_cv_prog_gnat_correct" >&5
11608 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11609    fi
11610 fi
11611 if test "$cf_cv_prog_gnat_correct" = yes; then
11612    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
11613
11614 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11615 if test "${with_ada_compiler+set}" = set; then
11616   withval="$with_ada_compiler"
11617   cf_ada_compiler=$withval
11618 else
11619   cf_ada_compiler=gnatmake
11620 fi;
11621
11622    cf_ada_package=terminal_interface
11623
11624 # Check whether --with-ada-include or --without-ada-include was given.
11625 if test "${with_ada_include+set}" = set; then
11626   withval="$with_ada_include"
11627
11628 else
11629   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
11630 fi;
11631 case ".$withval" in #(vi
11632 .\$\(*\)*|.\'*\'*) #(vi
11633   ;;
11634 ..|./*|.\\*) #(vi
11635   ;;
11636 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11637   ;;
11638 .\${*prefix}*) #(vi
11639   eval withval="$withval"
11640   case ".$withval" in #(vi
11641   .NONE/*)
11642     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
11643     ;;
11644   esac
11645   ;; #(vi
11646 .NONE/*)
11647   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
11648   ;;
11649 *)
11650   { { echo "$as_me:11650: error: expected a pathname, not \"$withval\"" >&5
11651 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11652    { (exit 1); exit 1; }; }
11653   ;;
11654 esac
11655
11656 eval ADA_INCLUDE="$withval"
11657
11658 # Check whether --with-ada-objects or --without-ada-objects was given.
11659 if test "${with_ada_objects+set}" = set; then
11660   withval="$with_ada_objects"
11661
11662 else
11663   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
11664 fi;
11665 case ".$withval" in #(vi
11666 .\$\(*\)*|.\'*\'*) #(vi
11667   ;;
11668 ..|./*|.\\*) #(vi
11669   ;;
11670 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11671   ;;
11672 .\${*prefix}*) #(vi
11673   eval withval="$withval"
11674   case ".$withval" in #(vi
11675   .NONE/*)
11676     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
11677     ;;
11678   esac
11679   ;; #(vi
11680 .NONE/*)
11681   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
11682   ;;
11683 *)
11684   { { echo "$as_me:11684: error: expected a pathname, not \"$withval\"" >&5
11685 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11686    { (exit 1); exit 1; }; }
11687   ;;
11688 esac
11689
11690 eval ADA_OBJECTS="$withval"
11691
11692 fi
11693 fi
11694
11695 ### Construct the library-subsets, if any, from this set of keywords:
11696 ### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
11697 echo "$as_me:11697: checking for library subsets" >&5
11698 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
11699 if test "$with_termlib" = yes ; then
11700         LIB_SUBSETS="termlib"
11701         test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
11702         LIB_SUBSETS="${LIB_SUBSETS} "
11703 else
11704         LIB_SUBSETS="termlib+"
11705         test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
11706 fi
11707 LIB_SUBSETS="${LIB_SUBSETS}base"
11708 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
11709 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
11710 echo "$as_me:11710: result: $LIB_SUBSETS" >&5
11711 echo "${ECHO_T}$LIB_SUBSETS" >&6
11712
11713 ### Construct the list of include-directories to be generated
11714
11715 CPPFLAGS="-I. -I../include $CPPFLAGS"
11716 if test "$srcdir" != "."; then
11717         CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
11718 fi
11719 if test "$GCC" != yes; then
11720         CPPFLAGS="$CPPFLAGS -I\$(includedir)"
11721 elif test "$includedir" != "/usr/include"; then
11722         if test "$includedir" = '${prefix}/include' ; then
11723                 if test $prefix != /usr ; then
11724                         CPPFLAGS="$CPPFLAGS -I\$(includedir)"
11725                 fi
11726         else
11727                 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
11728         fi
11729 fi
11730
11731 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
11732 if test "$srcdir" != "."; then
11733         ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS"
11734 fi
11735 if test "$GCC" != yes; then
11736         ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
11737 elif test "$includedir" != "/usr/include"; then
11738         if test "$includedir" = '${prefix}/include' ; then
11739                 if test $prefix != /usr ; then
11740                         ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
11741                 fi
11742         else
11743                 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
11744         fi
11745 fi
11746
11747 ### Build up pieces for makefile rules
11748 echo "$as_me:11748: checking default library suffix" >&5
11749 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11750
11751         case $DFT_LWR_MODEL in
11752         libtool) DFT_ARG_SUFFIX=''   ;;
11753         normal)  DFT_ARG_SUFFIX=''   ;;
11754         debug)   DFT_ARG_SUFFIX='_g' ;;
11755         profile) DFT_ARG_SUFFIX='_p' ;;
11756         shared)  DFT_ARG_SUFFIX=''   ;;
11757         esac
11758         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11759 echo "$as_me:11759: result: $DFT_ARG_SUFFIX" >&5
11760 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11761
11762 echo "$as_me:11762: checking default library-dependency suffix" >&5
11763 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11764
11765         case $DFT_LWR_MODEL in
11766         libtool) DFT_DEP_SUFFIX='.la'  ;;
11767         normal)  DFT_DEP_SUFFIX='.a'   ;;
11768         debug)   DFT_DEP_SUFFIX='_g.a' ;;
11769         profile) DFT_DEP_SUFFIX='_p.a' ;;
11770         shared)
11771                 case $cf_cv_system_name in
11772                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
11773                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
11774                 hpux*)
11775                         case $target in
11776                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
11777                         *)      DFT_DEP_SUFFIX='.sl' ;;
11778                         esac
11779                         ;;
11780                 *)      DFT_DEP_SUFFIX='.so'  ;;
11781                 esac
11782         esac
11783         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11784 if test $DFT_LWR_MODEL = shared ; then
11785         case $cf_cv_system_name in #(vi
11786         cygwin*)
11787                 DFT_DEP_SUFFIX=".dll.a"
11788                 ;;
11789         esac
11790 fi
11791 echo "$as_me:11791: result: $DFT_DEP_SUFFIX" >&5
11792 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11793
11794 echo "$as_me:11794: checking default object directory" >&5
11795 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11796
11797         case $DFT_LWR_MODEL in
11798         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11799         normal)  DFT_OBJ_SUBDIR='objects' ;;
11800         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11801         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11802         shared)
11803                 case $cf_cv_system_name in #(vi
11804                 cygwin) #(vi
11805                         DFT_OBJ_SUBDIR='objects' ;;
11806                 *)
11807                         DFT_OBJ_SUBDIR='obj_s' ;;
11808                 esac
11809         esac
11810 echo "$as_me:11810: result: $DFT_OBJ_SUBDIR" >&5
11811 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11812
11813 # libtool thinks it can make c++ shared libraries (perhaps only g++)
11814 if test "$cf_with_cxx" = yes ; then
11815 echo "$as_me:11815: checking c++ library-dependency suffix" >&5
11816 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
11817 if test "$with_libtool" != "no"; then
11818         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
11819 else
11820
11821         case normal in
11822         libtool) CXX_LIB_SUFFIX='.la'  ;;
11823         normal)  CXX_LIB_SUFFIX='.a'   ;;
11824         debug)   CXX_LIB_SUFFIX='_g.a' ;;
11825         profile) CXX_LIB_SUFFIX='_p.a' ;;
11826         shared)
11827                 case $cf_cv_system_name in
11828                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
11829                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
11830                 hpux*)
11831                         case $target in
11832                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
11833                         *)      CXX_LIB_SUFFIX='.sl' ;;
11834                         esac
11835                         ;;
11836                 *)      CXX_LIB_SUFFIX='.so'  ;;
11837                 esac
11838         esac
11839         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
11840 fi
11841 echo "$as_me:11841: result: $CXX_LIB_SUFFIX" >&5
11842 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
11843
11844 fi
11845
11846 TINFO_LIST="$SHLIB_LIST"
11847 if test "$with_libtool" = no ; then
11848         test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
11849 fi
11850
11851 echo "$as_me:11851: checking where we will install curses.h" >&5
11852 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
11853 test "$with_overwrite" = no && \
11854 test "x$includedir" = 'x${prefix}/include' && \
11855         includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
11856 echo "$as_me:11856: result: $includedir" >&5
11857 echo "${ECHO_T}$includedir" >&6
11858
11859 ### Resolve a conflict between normal and wide-curses by forcing applications
11860 ### that will need libutf8 to add it to their configure script.
11861 if test "$with_overwrite" != no ; then
11862 if test "$NCURSES_LIBUTF8" = 1 ; then
11863         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
11864         { echo "$as_me:11864: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
11865 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
11866 fi
11867 fi
11868
11869 ### Set up low-level terminfo dependencies for makefiles.  Note that we
11870 ### could override this.
11871 if test "$with_termlib" = yes ; then
11872         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
11873         if test "$DFT_LWR_MODEL" = "libtool"; then
11874                 TEST_ARGS="${TEST_DEPS}"
11875         else
11876                 TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
11877         fi
11878 fi
11879 PROG_DEPS="$TEST_DEPS"
11880 PROG_ARGS="$TEST_ARGS"
11881
11882 ### predefined stuff for the test programs
11883 cat >>confdefs.h <<\EOF
11884 #define HAVE_SLK_COLOR 1
11885 EOF
11886
11887 ### Construct the list of subdirectories for which we'll customize makefiles
11888 ### with the appropriate compile-rules.
11889
11890 echo "$as_me:11890: checking for src modules" >&5
11891 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
11892
11893 # dependencies and linker-arguments for test-programs
11894 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
11895 if test "$DFT_LWR_MODEL" = "libtool"; then
11896         TEST_ARGS="${TEST_DEPS}"
11897 else
11898         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
11899 fi
11900
11901 # dependencies and linker-arguments for utility-programs
11902 test "$with_termlib" != yes && PROG_ARGS="$TEST_ARGS"
11903
11904 cf_cv_src_modules=
11905 for cf_dir in $modules_to_build
11906 do
11907         if test -f $srcdir/$cf_dir/modules; then
11908
11909                 # We may/may not have tack in the distribution, though the
11910                 # makefile is.
11911                 if test $cf_dir = tack ; then
11912                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
11913                                 continue
11914                         fi
11915                 fi
11916
11917                 if test -z "$cf_cv_src_modules"; then
11918                         cf_cv_src_modules=$cf_dir
11919                 else
11920                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
11921                 fi
11922
11923                 # Make the ncurses_cfg.h file record the library interface files as
11924                 # well.  These are header files that are the same name as their
11925                 # directory.  Ncurses is the only library that does not follow
11926                 # that pattern.
11927                 if test $cf_dir = tack ; then
11928                         continue
11929                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
11930
11931 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11932
11933                         cat >>confdefs.h <<EOF
11934 #define HAVE_${cf_have_include}_H 1
11935 EOF
11936
11937                         cat >>confdefs.h <<EOF
11938 #define HAVE_LIB${cf_have_include} 1
11939 EOF
11940
11941                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
11942                         if test "$DFT_LWR_MODEL" = "libtool"; then
11943                                 TEST_ARGS="${TEST_DEPS}"
11944                         else
11945                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
11946                         fi
11947                 fi
11948         fi
11949 done
11950 echo "$as_me:11950: result: $cf_cv_src_modules" >&5
11951 echo "${ECHO_T}$cf_cv_src_modules" >&6
11952 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
11953
11954 PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
11955
11956 SRC_SUBDIRS="man include"
11957 for cf_dir in $cf_cv_src_modules
11958 do
11959         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
11960 done
11961 SRC_SUBDIRS="$SRC_SUBDIRS test"
11962 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
11963 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
11964
11965 ADA_SUBDIRS=
11966 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
11967    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
11968    ADA_SUBDIRS="gen src samples"
11969 fi
11970
11971 SUB_MAKEFILES=
11972 for cf_dir in $SRC_SUBDIRS
11973 do
11974         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11975 done
11976
11977 if test -n "$ADA_SUBDIRS"; then
11978    for cf_dir in $ADA_SUBDIRS
11979    do
11980       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
11981    done
11982
11983 fi
11984
11985 DIRS_TO_MAKE="lib"
11986 for cf_item in $cf_list_models
11987 do
11988
11989         case $cf_item in
11990         libtool) cf_subdir='obj_lo'  ;;
11991         normal)  cf_subdir='objects' ;;
11992         debug)   cf_subdir='obj_g' ;;
11993         profile) cf_subdir='obj_p' ;;
11994         shared)
11995                 case $cf_cv_system_name in #(vi
11996                 cygwin) #(vi
11997                         cf_subdir='objects' ;;
11998                 *)
11999                         cf_subdir='obj_s' ;;
12000                 esac
12001         esac
12002
12003         for cf_item2 in $DIRS_TO_MAKE
12004         do
12005                 test $cf_item2 = $cf_subdir && break
12006         done
12007         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
12008 done
12009 for cf_dir in $DIRS_TO_MAKE
12010 do
12011         test ! -d $cf_dir && mkdir $cf_dir
12012 done
12013
12014 cat >>confdefs.h <<EOF
12015 #define NCURSES_PATHSEP '$PATHSEP'
12016 EOF
12017
12018 cat >>confdefs.h <<EOF
12019 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
12020 EOF
12021
12022 ### Now that we're done running tests, add the compiler-warnings, if any
12023
12024 cf_new_cflags=
12025 cf_new_cppflags=
12026 for cf_add_cflags in $EXTRA_CFLAGS
12027 do
12028         case $cf_add_cflags in #(vi
12029         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12030                 case "$CPPFLAGS" in
12031                 *$cf_add_cflags) #(vi
12032                         ;;
12033                 *) #(vi
12034                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12035                         ;;
12036                 esac
12037                 ;;
12038         *)
12039                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12040                 ;;
12041         esac
12042 done
12043
12044 if test -n "$cf_new_cflags" ; then
12045
12046         CFLAGS="$CFLAGS $cf_new_cflags"
12047 fi
12048
12049 if test -n "$cf_new_cppflags" ; then
12050
12051         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
12052 fi
12053
12054 ################################################################################
12055 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
12056 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
12057 ac_config_commands="$ac_config_commands default"
12058 cat >confcache <<\_ACEOF
12059 # This file is a shell script that caches the results of configure
12060 # tests run on this system so they can be shared between configure
12061 # scripts and configure runs, see configure's option --config-cache.
12062 # It is not useful on other systems.  If it contains results you don't
12063 # want to keep, you may remove or edit it.
12064 #
12065 # config.status only pays attention to the cache file if you give it
12066 # the --recheck option to rerun configure.
12067 #
12068 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12069 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12070 # following values.
12071
12072 _ACEOF
12073
12074 # The following way of writing the cache mishandles newlines in values,
12075 # but we know of no workaround that is simple, portable, and efficient.
12076 # So, don't put newlines in cache variables' values.
12077 # Ultrix sh set writes to stderr and can't be redirected directly,
12078 # and sets the high bit in the cache file unless we assign to the vars.
12079 {
12080   (set) 2>&1 |
12081     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12082     *ac_space=\ *)
12083       # `set' does not quote correctly, so add quotes (double-quote
12084       # substitution turns \\\\ into \\, and sed turns \\ into \).
12085       sed -n \
12086         "s/'/'\\\\''/g;
12087           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12088       ;;
12089     *)
12090       # `set' quotes correctly as required by POSIX, so do not add quotes.
12091       sed -n \
12092         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12093       ;;
12094     esac;
12095 } |
12096   sed '
12097      t clear
12098      : clear
12099      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12100      t end
12101      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12102      : end' >>confcache
12103 if cmp -s $cache_file confcache; then :; else
12104   if test -w $cache_file; then
12105     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12106     cat confcache >$cache_file
12107   else
12108     echo "not updating unwritable cache $cache_file"
12109   fi
12110 fi
12111 rm -f confcache
12112
12113 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12114 # Let make expand exec_prefix.
12115 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12116
12117 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12118 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12119 # trailing colons and then remove the whole line if VPATH becomes empty
12120 # (actually we leave an empty line to preserve line numbers).
12121 if test "x$srcdir" = x.; then
12122   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12123 s/:*\$(srcdir):*/:/;
12124 s/:*\${srcdir}:*/:/;
12125 s/:*@srcdir@:*/:/;
12126 s/^\([^=]*=[    ]*\):*/\1/;
12127 s/:*$//;
12128 s/^[^=]*=[      ]*$//;
12129 }'
12130 fi
12131
12132 DEFS=-DHAVE_CONFIG_H
12133
12134 : ${CONFIG_STATUS=./config.status}
12135 ac_clean_files_save=$ac_clean_files
12136 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12137 { echo "$as_me:12137: creating $CONFIG_STATUS" >&5
12138 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12139 cat >$CONFIG_STATUS <<_ACEOF
12140 #! $SHELL
12141 # Generated automatically by configure.
12142 # Run this file to recreate the current configuration.
12143 # Compiler output produced by configure, useful for debugging
12144 # configure, is in config.log if it exists.
12145
12146 debug=false
12147 SHELL=\${CONFIG_SHELL-$SHELL}
12148 ac_cs_invocation="\$0 \$@"
12149
12150 _ACEOF
12151
12152 cat >>$CONFIG_STATUS <<\_ACEOF
12153 # Be Bourne compatible
12154 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12155   emulate sh
12156   NULLCMD=:
12157 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12158   set -o posix
12159 fi
12160
12161 # Name of the executable.
12162 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12163
12164 if expr a : '\(a\)' >/dev/null 2>&1; then
12165   as_expr=expr
12166 else
12167   as_expr=false
12168 fi
12169
12170 rm -f conf$$ conf$$.exe conf$$.file
12171 echo >conf$$.file
12172 if ln -s conf$$.file conf$$ 2>/dev/null; then
12173   # We could just check for DJGPP; but this test a) works b) is more generic
12174   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12175   if test -f conf$$.exe; then
12176     # Don't use ln at all; we don't have any links
12177     as_ln_s='cp -p'
12178   else
12179     as_ln_s='ln -s'
12180   fi
12181 elif ln conf$$.file conf$$ 2>/dev/null; then
12182   as_ln_s=ln
12183 else
12184   as_ln_s='cp -p'
12185 fi
12186 rm -f conf$$ conf$$.exe conf$$.file
12187
12188 as_executable_p="test -f"
12189
12190 # Support unset when possible.
12191 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12192   as_unset=unset
12193 else
12194   as_unset=false
12195 fi
12196
12197 # NLS nuisances.
12198 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12199 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12200 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12201 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12202 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12203 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12204 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12205 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12206
12207 # IFS
12208 # We need space, tab and new line, in precisely that order.
12209 as_nl='
12210 '
12211 IFS="   $as_nl"
12212
12213 # CDPATH.
12214 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12215
12216 exec 6>&1
12217
12218 _ACEOF
12219
12220 # Files that config.status was made for.
12221 if test -n "$ac_config_files"; then
12222   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12223 fi
12224
12225 if test -n "$ac_config_headers"; then
12226   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12227 fi
12228
12229 if test -n "$ac_config_links"; then
12230   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12231 fi
12232
12233 if test -n "$ac_config_commands"; then
12234   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12235 fi
12236
12237 cat >>$CONFIG_STATUS <<\EOF
12238
12239 ac_cs_usage="\
12240 \`$as_me' instantiates files from templates according to the
12241 current configuration.
12242
12243 Usage: $0 [OPTIONS] [FILE]...
12244
12245   -h, --help       print this help, then exit
12246   -V, --version    print version number, then exit
12247   -d, --debug      don't remove temporary files
12248       --recheck    update $as_me by reconfiguring in the same conditions
12249   --file=FILE[:TEMPLATE]
12250                    instantiate the configuration file FILE
12251   --header=FILE[:TEMPLATE]
12252                    instantiate the configuration header FILE
12253
12254 Configuration files:
12255 $config_files
12256
12257 Configuration headers:
12258 $config_headers
12259
12260 Configuration commands:
12261 $config_commands
12262
12263 Report bugs to <bug-autoconf@gnu.org>."
12264 EOF
12265
12266 cat >>$CONFIG_STATUS <<EOF
12267 ac_cs_version="\\
12268 config.status
12269 configured by $0, generated by GNU Autoconf 2.52.20030208,
12270   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12271
12272 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12273 Free Software Foundation, Inc.
12274 This config.status script is free software; the Free Software Foundation
12275 gives unlimited permission to copy, distribute and modify it."
12276 srcdir=$srcdir
12277 INSTALL="$INSTALL"
12278 EOF
12279
12280 cat >>$CONFIG_STATUS <<\EOF
12281 # If no file are specified by the user, then we need to provide default
12282 # value.  By we need to know if files were specified by the user.
12283 ac_need_defaults=:
12284 while test $# != 0
12285 do
12286   case $1 in
12287   --*=*)
12288     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12289     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12290     shift
12291     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12292     shift
12293     ;;
12294   -*);;
12295   *) # This is not an option, so the user has probably given explicit
12296      # arguments.
12297      ac_need_defaults=false;;
12298   esac
12299
12300   case $1 in
12301   # Handling of the options.
12302 EOF
12303 cat >>$CONFIG_STATUS <<EOF
12304   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12305     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12306     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12307 EOF
12308 cat >>$CONFIG_STATUS <<\EOF
12309   --version | --vers* | -V )
12310     echo "$ac_cs_version"; exit 0 ;;
12311   --he | --h)
12312     # Conflict between --help and --header
12313     { { echo "$as_me:12313: error: ambiguous option: $1
12314 Try \`$0 --help' for more information." >&5
12315 echo "$as_me: error: ambiguous option: $1
12316 Try \`$0 --help' for more information." >&2;}
12317    { (exit 1); exit 1; }; };;
12318   --help | --hel | -h )
12319     echo "$ac_cs_usage"; exit 0 ;;
12320   --debug | --d* | -d )
12321     debug=: ;;
12322   --file | --fil | --fi | --f )
12323     shift
12324     CONFIG_FILES="$CONFIG_FILES $1"
12325     ac_need_defaults=false;;
12326   --header | --heade | --head | --hea )
12327     shift
12328     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12329     ac_need_defaults=false;;
12330
12331   # This is an error.
12332   -*) { { echo "$as_me:12332: error: unrecognized option: $1
12333 Try \`$0 --help' for more information." >&5
12334 echo "$as_me: error: unrecognized option: $1
12335 Try \`$0 --help' for more information." >&2;}
12336    { (exit 1); exit 1; }; } ;;
12337
12338   *) ac_config_targets="$ac_config_targets $1" ;;
12339
12340   esac
12341   shift
12342 done
12343
12344 exec 5>>config.log
12345 cat >&5 << _ACEOF
12346
12347 ## ----------------------- ##
12348 ## Running config.status.  ##
12349 ## ----------------------- ##
12350
12351 This file was extended by $as_me 2.52.20030208, executed with
12352   CONFIG_FILES    = $CONFIG_FILES
12353   CONFIG_HEADERS  = $CONFIG_HEADERS
12354   CONFIG_LINKS    = $CONFIG_LINKS
12355   CONFIG_COMMANDS = $CONFIG_COMMANDS
12356   > $ac_cs_invocation
12357 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12358
12359 _ACEOF
12360 EOF
12361
12362 cat >>$CONFIG_STATUS <<EOF
12363 #
12364 # INIT-COMMANDS section.
12365 #
12366
12367 ### Special initialization commands, used to pass information from the
12368 ### configuration-run into config.status
12369
12370 AWK="$AWK"
12371 CF_LIST_MODELS="$cf_list_models"
12372 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12373 LDCONFIG="$LDCONFIG"
12374 LIB_NAME="$LIB_NAME"
12375 LIB_SUBSETS="$LIB_SUBSETS"
12376 LIB_SUFFIX="$LIB_SUFFIX"
12377 LIB_TRACING="$LIB_TRACING"
12378 MAKE_TERMINFO="$MAKE_TERMINFO"
12379 NCURSES_OSPEED="$NCURSES_OSPEED"
12380 SRC_SUBDIRS="$SRC_SUBDIRS"
12381 TERMINFO="$TERMINFO"
12382 TINFO_NAME="$TINFO_NAME"
12383 WITH_CURSES_H="$with_curses_h"
12384 WITH_ECHO="$with_echo"
12385 WITH_OVERWRITE="$with_overwrite"
12386 cf_cv_abi_version="$cf_cv_abi_version"
12387 cf_cv_do_symlinks="$cf_cv_do_symlinks"
12388 cf_cv_rel_version="$cf_cv_rel_version"
12389 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12390 cf_cv_shlib_version="$cf_cv_shlib_version"
12391 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12392 cf_cv_system_name="$cf_cv_system_name"
12393 cf_with_cxx_binding="$cf_with_cxx_binding"
12394 host="$host"
12395 target="$target"
12396
12397 EOF
12398
12399 cat >>$CONFIG_STATUS <<\EOF
12400 for ac_config_target in $ac_config_targets
12401 do
12402   case "$ac_config_target" in
12403   # Handling of arguments.
12404   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
12405   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
12406   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
12407   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
12408   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12409   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12410   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12411   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12412   *) { { echo "$as_me:12412: error: invalid argument: $ac_config_target" >&5
12413 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12414    { (exit 1); exit 1; }; };;
12415   esac
12416 done
12417
12418 # If the user did not use the arguments to specify the items to instantiate,
12419 # then the envvar interface is used.  Set only those that are not.
12420 # We use the long form for the default assignment because of an extremely
12421 # bizarre bug on SunOS 4.1.3.
12422 if $ac_need_defaults; then
12423   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12424   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12425   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12426 fi
12427
12428 # Create a temporary directory, and hook for its removal unless debugging.
12429 $debug ||
12430 {
12431   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12432   trap '{ (exit 1); exit 1; }' 1 2 13 15
12433 }
12434
12435 # Create a (secure) tmp directory for tmp files.
12436 : ${TMPDIR=/tmp}
12437 {
12438   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12439   test -n "$tmp" && test -d "$tmp"
12440 }  ||
12441 {
12442   tmp=$TMPDIR/cs$$-$RANDOM
12443   (umask 077 && mkdir $tmp)
12444 } ||
12445 {
12446    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12447    { (exit 1); exit 1; }
12448 }
12449
12450 EOF
12451
12452 cat >>$CONFIG_STATUS <<EOF
12453
12454 #
12455 # CONFIG_FILES section.
12456 #
12457
12458 # No need to generate the scripts if there are no CONFIG_FILES.
12459 # This happens for instance when ./config.status config.h
12460 if test -n "\$CONFIG_FILES"; then
12461   # Protect against being on the right side of a sed subst in config.status.
12462   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12463    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12464 s,@SHELL@,$SHELL,;t t
12465 s,@exec_prefix@,$exec_prefix,;t t
12466 s,@prefix@,$prefix,;t t
12467 s,@program_transform_name@,$program_transform_name,;t t
12468 s,@bindir@,$bindir,;t t
12469 s,@sbindir@,$sbindir,;t t
12470 s,@libexecdir@,$libexecdir,;t t
12471 s,@datadir@,$datadir,;t t
12472 s,@sysconfdir@,$sysconfdir,;t t
12473 s,@sharedstatedir@,$sharedstatedir,;t t
12474 s,@localstatedir@,$localstatedir,;t t
12475 s,@libdir@,$libdir,;t t
12476 s,@includedir@,$includedir,;t t
12477 s,@oldincludedir@,$oldincludedir,;t t
12478 s,@infodir@,$infodir,;t t
12479 s,@mandir@,$mandir,;t t
12480 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12481 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12482 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12483 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12484 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12485 s,@build_alias@,$build_alias,;t t
12486 s,@host_alias@,$host_alias,;t t
12487 s,@target_alias@,$target_alias,;t t
12488 s,@ECHO_C@,$ECHO_C,;t t
12489 s,@ECHO_N@,$ECHO_N,;t t
12490 s,@ECHO_T@,$ECHO_T,;t t
12491 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12492 s,@DEFS@,$DEFS,;t t
12493 s,@LIBS@,$LIBS,;t t
12494 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12495 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12496 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12497 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12498 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12499 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12500 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12501 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12502 s,@build@,$build,;t t
12503 s,@build_cpu@,$build_cpu,;t t
12504 s,@build_vendor@,$build_vendor,;t t
12505 s,@build_os@,$build_os,;t t
12506 s,@host@,$host,;t t
12507 s,@host_cpu@,$host_cpu,;t t
12508 s,@host_vendor@,$host_vendor,;t t
12509 s,@host_os@,$host_os,;t t
12510 s,@target@,$target,;t t
12511 s,@target_cpu@,$target_cpu,;t t
12512 s,@target_vendor@,$target_vendor,;t t
12513 s,@target_os@,$target_os,;t t
12514 s,@CC@,$CC,;t t
12515 s,@CFLAGS@,$CFLAGS,;t t
12516 s,@LDFLAGS@,$LDFLAGS,;t t
12517 s,@CPPFLAGS@,$CPPFLAGS,;t t
12518 s,@ac_ct_CC@,$ac_ct_CC,;t t
12519 s,@EXEEXT@,$EXEEXT,;t t
12520 s,@OBJEXT@,$OBJEXT,;t t
12521 s,@CPP@,$CPP,;t t
12522 s,@PROG_EXT@,$PROG_EXT,;t t
12523 s,@LDCONFIG@,$LDCONFIG,;t t
12524 s,@CXX@,$CXX,;t t
12525 s,@CXXFLAGS@,$CXXFLAGS,;t t
12526 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
12527 s,@AWK@,$AWK,;t t
12528 s,@SET_MAKE@,$SET_MAKE,;t t
12529 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12530 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12531 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12532 s,@LN_S@,$LN_S,;t t
12533 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12534 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12535 s,@LINT@,$LINT,;t t
12536 s,@MAN@,$MAN,;t t
12537 s,@LINT_OPTS@,$LINT_OPTS,;t t
12538 s,@RANLIB@,$RANLIB,;t t
12539 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12540 s,@LD@,$LD,;t t
12541 s,@ac_ct_LD@,$ac_ct_LD,;t t
12542 s,@AR@,$AR,;t t
12543 s,@ac_ct_AR@,$ac_ct_AR,;t t
12544 s,@AR_OPTS@,$AR_OPTS,;t t
12545 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12546 s,@DESTDIR@,$DESTDIR,;t t
12547 s,@BUILD_CC@,$BUILD_CC,;t t
12548 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12549 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12550 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12551 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12552 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12553 s,@cf_list_models@,$cf_list_models,;t t
12554 s,@LIBTOOL@,$LIBTOOL,;t t
12555 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
12556 s,@LIB_CREATE@,$LIB_CREATE,;t t
12557 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
12558 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12559 s,@LIB_PREP@,$LIB_PREP,;t t
12560 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
12561 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
12562 s,@LIB_LINK@,$LIB_LINK,;t t
12563 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
12564 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
12565 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12566 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12567 s,@TINFO_NAME@,$TINFO_NAME,;t t
12568 s,@LIB_NAME@,$LIB_NAME,;t t
12569 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12570 s,@CC_G_OPT@,$CC_G_OPT,;t t
12571 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
12572 s,@LD_MODEL@,$LD_MODEL,;t t
12573 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12574 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12575 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12576 s,@LINK_PROGS@,$LINK_PROGS,;t t
12577 s,@LINK_TESTS@,$LINK_TESTS,;t t
12578 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12579 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12580 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12581 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12582 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
12583 s,@PATHSEP@,$PATHSEP,;t t
12584 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
12585 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
12586 s,@TERMINFO@,$TERMINFO,;t t
12587 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
12588 s,@TERMPATH@,$TERMPATH,;t t
12589 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12590 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
12591 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
12592 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
12593 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12594 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12595 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
12596 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
12597 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
12598 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
12599 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
12600 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
12601 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
12602 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
12603 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
12604 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
12605 s,@ECHO_LINK@,$ECHO_LINK,;t t
12606 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12607 s,@ADA_TRACE@,$ADA_TRACE,;t t
12608 s,@MATH_LIB@,$MATH_LIB,;t t
12609 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
12610 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
12611 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
12612 s,@CXXCPP@,$CXXCPP,;t t
12613 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
12614 s,@CXX_AR@,$CXX_AR,;t t
12615 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
12616 s,@CXXLIBS@,$CXXLIBS,;t t
12617 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
12618 s,@gnat_exists@,$gnat_exists,;t t
12619 s,@M4_exists@,$M4_exists,;t t
12620 s,@cf_ada_make@,$cf_ada_make,;t t
12621 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12622 s,@cf_ada_package@,$cf_ada_package,;t t
12623 s,@ADAFLAGS@,$ADAFLAGS,;t t
12624 s,@cf_compile_generics@,$cf_compile_generics,;t t
12625 s,@cf_generic_objects@,$cf_generic_objects,;t t
12626 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12627 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12628 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12629 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12630 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12631 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12632 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
12633 s,@EXTRA_LIBS@,$EXTRA_LIBS,;t t
12634 s,@TINFO_LIST@,$TINFO_LIST,;t t
12635 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
12636 s,@TEST_DEPS@,$TEST_DEPS,;t t
12637 s,@TEST_ARGS@,$TEST_ARGS,;t t
12638 s,@PROG_ARGS@,$PROG_ARGS,;t t
12639 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12640 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
12641 CEOF
12642
12643 EOF
12644
12645   cat >>$CONFIG_STATUS <<\EOF
12646   # Split the substitutions into bite-sized pieces for seds with
12647   # small command number limits, like on Digital OSF/1 and HP-UX.
12648   ac_max_sed_lines=48
12649   ac_sed_frag=1 # Number of current file.
12650   ac_beg=1 # First line for current file.
12651   ac_end=$ac_max_sed_lines # Line after last line for current file.
12652   ac_more_lines=:
12653   ac_sed_cmds=
12654   while $ac_more_lines; do
12655     if test $ac_beg -gt 1; then
12656       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12657     else
12658       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12659     fi
12660     if test ! -s $tmp/subs.frag; then
12661       ac_more_lines=false
12662     else
12663       # The purpose of the label and of the branching condition is to
12664       # speed up the sed processing (if there are no `@' at all, there
12665       # is no need to browse any of the substitutions).
12666       # These are the two extra sed commands mentioned above.
12667       (echo ':t
12668   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12669       if test -z "$ac_sed_cmds"; then
12670         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12671       else
12672         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12673       fi
12674       ac_sed_frag=`expr $ac_sed_frag + 1`
12675       ac_beg=$ac_end
12676       ac_end=`expr $ac_end + $ac_max_sed_lines`
12677     fi
12678   done
12679   if test -z "$ac_sed_cmds"; then
12680     ac_sed_cmds=cat
12681   fi
12682 fi # test -n "$CONFIG_FILES"
12683
12684 EOF
12685 cat >>$CONFIG_STATUS <<\EOF
12686 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12687   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12688   case $ac_file in
12689   - | *:- | *:-:* ) # input from stdin
12690         cat >$tmp/stdin
12691         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12692         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12693   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12694         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12695   * )   ac_file_in=$ac_file.in ;;
12696   esac
12697
12698   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12699   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12700          X"$ac_file" : 'X\(//\)[^/]' \| \
12701          X"$ac_file" : 'X\(//\)$' \| \
12702          X"$ac_file" : 'X\(/\)' \| \
12703          .     : '\(.\)' 2>/dev/null ||
12704 echo X"$ac_file" |
12705     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12706           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12707           /^X\(\/\/\)$/{ s//\1/; q; }
12708           /^X\(\/\).*/{ s//\1/; q; }
12709           s/.*/./; q'`
12710   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12711     { case "$ac_dir" in
12712   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12713   *)                      as_incr_dir=.;;
12714 esac
12715 as_dummy="$ac_dir"
12716 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12717   case $as_mkdir_dir in
12718     # Skip DOS drivespec
12719     ?:) as_incr_dir=$as_mkdir_dir ;;
12720     *)
12721       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12722       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12723     ;;
12724   esac
12725 done; }
12726
12727     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12728     # A "../" for each directory in $ac_dir_suffix.
12729     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12730   else
12731     ac_dir_suffix= ac_dots=
12732   fi
12733
12734   case $srcdir in
12735   .)  ac_srcdir=.
12736       if test -z "$ac_dots"; then
12737          ac_top_srcdir=.
12738       else
12739          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12740       fi ;;
12741   [\\/]* | ?:[\\/]* )
12742       ac_srcdir=$srcdir$ac_dir_suffix;
12743       ac_top_srcdir=$srcdir ;;
12744   *) # Relative path.
12745     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12746     ac_top_srcdir=$ac_dots$srcdir ;;
12747   esac
12748
12749   case $INSTALL in
12750   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12751   *) ac_INSTALL=$ac_dots$INSTALL ;;
12752   esac
12753
12754   if test x"$ac_file" != x-; then
12755     { echo "$as_me:12755: creating $ac_file" >&5
12756 echo "$as_me: creating $ac_file" >&6;}
12757     rm -f "$ac_file"
12758   fi
12759   # Let's still pretend it is `configure' which instantiates (i.e., don't
12760   # use $as_me), people would be surprised to read:
12761   #    /* config.h.  Generated automatically by config.status.  */
12762   configure_input="Generated automatically from `echo $ac_file_in |
12763                                                  sed 's,.*/,,'` by configure."
12764
12765   # First look for the input files in the build tree, otherwise in the
12766   # src tree.
12767   ac_file_inputs=`IFS=:
12768     for f in $ac_file_in; do
12769       case $f in
12770       -) echo $tmp/stdin ;;
12771       [\\/$]*)
12772          # Absolute (can't be DOS-style, as IFS=:)
12773          test -f "$f" || { { echo "$as_me:12773: error: cannot find input file: $f" >&5
12774 echo "$as_me: error: cannot find input file: $f" >&2;}
12775    { (exit 1); exit 1; }; }
12776          echo $f;;
12777       *) # Relative
12778          if test -f "$f"; then
12779            # Build tree
12780            echo $f
12781          elif test -f "$srcdir/$f"; then
12782            # Source tree
12783            echo $srcdir/$f
12784          else
12785            # /dev/null tree
12786            { { echo "$as_me:12786: error: cannot find input file: $f" >&5
12787 echo "$as_me: error: cannot find input file: $f" >&2;}
12788    { (exit 1); exit 1; }; }
12789          fi;;
12790       esac
12791     done` || { (exit 1); exit 1; }
12792 EOF
12793 cat >>$CONFIG_STATUS <<EOF
12794   sed "$ac_vpsub
12795 $extrasub
12796 EOF
12797 cat >>$CONFIG_STATUS <<\EOF
12798 :t
12799 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12800 s,@configure_input@,$configure_input,;t t
12801 s,@srcdir@,$ac_srcdir,;t t
12802 s,@top_srcdir@,$ac_top_srcdir,;t t
12803 s,@INSTALL@,$ac_INSTALL,;t t
12804 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12805   rm -f $tmp/stdin
12806   if test x"$ac_file" != x-; then
12807     mv $tmp/out $ac_file
12808   else
12809     cat $tmp/out
12810     rm -f $tmp/out
12811   fi
12812
12813 done
12814 EOF
12815 cat >>$CONFIG_STATUS <<\EOF
12816
12817 #
12818 # CONFIG_HEADER section.
12819 #
12820
12821 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12822 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12823 #
12824 # ac_d sets the value in "#define NAME VALUE" lines.
12825 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12826 ac_dB='[        ].*$,\1#\2'
12827 ac_dC=' '
12828 ac_dD=',;t'
12829 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12830 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12831 ac_iB='\([      ]\),\1#\2define\3'
12832 ac_iC=' '
12833 ac_iD='\4,;t'
12834 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12835 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12836 ac_uB='$,\1#\2define\3'
12837 ac_uC=' '
12838 ac_uD=',;t'
12839
12840 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12841   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12842   case $ac_file in
12843   - | *:- | *:-:* ) # input from stdin
12844         cat >$tmp/stdin
12845         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12846         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12847   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12848         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12849   * )   ac_file_in=$ac_file.in ;;
12850   esac
12851
12852   test x"$ac_file" != x- && { echo "$as_me:12852: creating $ac_file" >&5
12853 echo "$as_me: creating $ac_file" >&6;}
12854
12855   # First look for the input files in the build tree, otherwise in the
12856   # src tree.
12857   ac_file_inputs=`IFS=:
12858     for f in $ac_file_in; do
12859       case $f in
12860       -) echo $tmp/stdin ;;
12861       [\\/$]*)
12862          # Absolute (can't be DOS-style, as IFS=:)
12863          test -f "$f" || { { echo "$as_me:12863: error: cannot find input file: $f" >&5
12864 echo "$as_me: error: cannot find input file: $f" >&2;}
12865    { (exit 1); exit 1; }; }
12866          echo $f;;
12867       *) # Relative
12868          if test -f "$f"; then
12869            # Build tree
12870            echo $f
12871          elif test -f "$srcdir/$f"; then
12872            # Source tree
12873            echo $srcdir/$f
12874          else
12875            # /dev/null tree
12876            { { echo "$as_me:12876: error: cannot find input file: $f" >&5
12877 echo "$as_me: error: cannot find input file: $f" >&2;}
12878    { (exit 1); exit 1; }; }
12879          fi;;
12880       esac
12881     done` || { (exit 1); exit 1; }
12882   # Remove the trailing spaces.
12883   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12884
12885 EOF
12886
12887 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12888 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12889 # be either 'cat' or 'sort'.
12890 cat confdefs.h | uniq >conftest.vals
12891
12892 # Break up conftest.vals because some shells have a limit on
12893 # the size of here documents, and old seds have small limits too.
12894
12895 rm -f conftest.tail
12896 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12897 while grep . conftest.vals >/dev/null
12898 do
12899   # Write chunks of a limited-size here document to conftest.frag.
12900   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12901   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12902   echo 'CEOF' >> $CONFIG_STATUS
12903   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12904   rm -f conftest.vals
12905   mv conftest.tail conftest.vals
12906 done
12907 rm -f conftest.vals
12908
12909 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12910 # marker @DEFS@.
12911 echo '  cat >> conftest.edit <<CEOF
12912 /@DEFS@/r conftest.frag
12913 /@DEFS@/d
12914 CEOF
12915 sed -f conftest.edit $tmp/in > $tmp/out
12916 rm -f $tmp/in
12917 mv $tmp/out $tmp/in
12918 rm -f conftest.edit conftest.frag
12919 ' >> $CONFIG_STATUS
12920
12921 cat >>$CONFIG_STATUS <<\EOF
12922   # Let's still pretend it is `configure' which instantiates (i.e., don't
12923   # use $as_me), people would be surprised to read:
12924   #    /* config.h.  Generated automatically by config.status.  */
12925   if test x"$ac_file" = x-; then
12926     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12927   else
12928     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12929   fi
12930   cat $tmp/in >>$tmp/config.h
12931   rm -f $tmp/in
12932   if test x"$ac_file" != x-; then
12933     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12934       { echo "$as_me:12934: $ac_file is unchanged" >&5
12935 echo "$as_me: $ac_file is unchanged" >&6;}
12936     else
12937       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12938          X"$ac_file" : 'X\(//\)[^/]' \| \
12939          X"$ac_file" : 'X\(//\)$' \| \
12940          X"$ac_file" : 'X\(/\)' \| \
12941          .     : '\(.\)' 2>/dev/null ||
12942 echo X"$ac_file" |
12943     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12944           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12945           /^X\(\/\/\)$/{ s//\1/; q; }
12946           /^X\(\/\).*/{ s//\1/; q; }
12947           s/.*/./; q'`
12948       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12949         { case "$ac_dir" in
12950   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12951   *)                      as_incr_dir=.;;
12952 esac
12953 as_dummy="$ac_dir"
12954 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12955   case $as_mkdir_dir in
12956     # Skip DOS drivespec
12957     ?:) as_incr_dir=$as_mkdir_dir ;;
12958     *)
12959       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12960       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12961     ;;
12962   esac
12963 done; }
12964
12965       fi
12966       rm -f $ac_file
12967       mv $tmp/config.h $ac_file
12968     fi
12969   else
12970     cat $tmp/config.h
12971     rm -f $tmp/config.h
12972   fi
12973 done
12974 EOF
12975 cat >>$CONFIG_STATUS <<\EOF
12976
12977 #
12978 # CONFIG_COMMANDS section.
12979 #
12980 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12981   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12982   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12983
12984   case $ac_dest in
12985     default )
12986
12987         case $cf_cv_system_name in
12988         OS/2*)  LIB_PREFIX=''     ;;
12989         os2*)   LIB_PREFIX=''     ;;
12990         *)      LIB_PREFIX='lib'  ;;
12991         esac
12992 cf_prefix=$LIB_PREFIX
12993
12994 for cf_dir in $SRC_SUBDIRS
12995 do
12996         if test -f $srcdir/$cf_dir/modules; then
12997
12998                 IMPORT_LIB=
12999                 SHARED_LIB=
13000                 LIBS_TO_MAKE=
13001                 for cf_item in $CF_LIST_MODELS
13002                 do
13003
13004         case $cf_item in
13005         libtool) cf_suffix='.la'  ;;
13006         normal)  cf_suffix='.a'   ;;
13007         debug)   cf_suffix='_g.a' ;;
13008         profile) cf_suffix='_p.a' ;;
13009         shared)
13010                 case $cf_cv_system_name in
13011                 cygwin*) cf_suffix='.dll' ;;
13012                 darwin*) cf_suffix='.dylib' ;;
13013                 hpux*)
13014                         case $target in
13015                         ia64*)  cf_suffix='.so' ;;
13016                         *)      cf_suffix='.sl' ;;
13017                         esac
13018                         ;;
13019                 *)      cf_suffix='.so'  ;;
13020                 esac
13021         esac
13022         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
13023
13024                         if test $cf_item = shared ; then
13025                         if test "$cf_cv_do_symlinks" = yes ; then
13026                                 case "$cf_cv_shlib_version" in #(vi
13027                                 rel) #(vi
13028                                         case "$cf_cv_system_name" in #(vi
13029                                         darwin*) cf_suffix='.$(REL_VERSION)'"$cf_suffix" ;; #(vi
13030                                         *) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
13031                                         esac
13032                                         ;;
13033                                 abi)
13034                                         case "$cf_cv_system_name" in #(vi
13035                                         darwin*) cf_suffix='.$(ABI_VERSION)'"$cf_suffix" ;; #(vi
13036                                         *) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
13037                                         esac
13038                                         ;;
13039                                 esac
13040                         fi
13041                         # cygwin needs import library, and has unique naming convention
13042                         # use autodetected ${cf_prefix} for import lib and static lib, but
13043                         # use 'cyg' prefix for shared lib.
13044                         if test $cf_cv_shlib_version = cygdll ; then
13045                                 SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll"
13046                                 IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
13047                                 LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
13048                                 continue
13049                         fi
13050                         fi
13051                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
13052                 done
13053
13054                 if test $cf_dir = ncurses ; then
13055                         cf_subsets="$LIB_SUBSETS"
13056                         cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
13057                         if test "$cf_termlib" != "$cf_subsets" ; then
13058                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%$LIB_NAME%$TINFO_NAME%g`
13059                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
13060                         fi
13061                 else
13062                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
13063                 fi
13064
13065                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
13066                     -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
13067                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
13068                         $cf_dir/Makefile >$cf_dir/Makefile.out
13069                 mv $cf_dir/Makefile.out $cf_dir/Makefile
13070
13071                 $AWK -f $srcdir/mk-0th.awk \
13072                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
13073                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
13074
13075                 for cf_subset in $cf_subsets
13076                 do
13077                         cf_subdirs=
13078                         for cf_item in $CF_LIST_MODELS
13079                         do
13080                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
13081
13082 CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13083
13084         case $cf_item in
13085         libtool) cf_suffix='.la'  ;;
13086         normal)  cf_suffix='.a'   ;;
13087         debug)   cf_suffix='_g.a' ;;
13088         profile) cf_suffix='_p.a' ;;
13089         shared)
13090                 case $cf_cv_system_name in
13091                 cygwin*) cf_suffix='.dll' ;;
13092                 darwin*) cf_suffix='.dylib' ;;
13093                 hpux*)
13094                         case $target in
13095                         ia64*)  cf_suffix='.so' ;;
13096                         *)      cf_suffix='.sl' ;;
13097                         esac
13098                         ;;
13099                 *)      cf_suffix='.so'  ;;
13100                 esac
13101         esac
13102         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
13103
13104         case $cf_item in
13105         libtool) cf_subdir='obj_lo'  ;;
13106         normal)  cf_subdir='objects' ;;
13107         debug)   cf_subdir='obj_g' ;;
13108         profile) cf_subdir='obj_p' ;;
13109         shared)
13110                 case $cf_cv_system_name in #(vi
13111                 cygwin) #(vi
13112                         cf_subdir='objects' ;;
13113                 *)
13114                         cf_subdir='obj_s' ;;
13115                 esac
13116         esac
13117
13118                         # These dependencies really are for development, not
13119                         # builds, but they are useful in porting, too.
13120                         cf_depend="../include/ncurses_cfg.h"
13121                         if test "$srcdir" = "."; then
13122                                 cf_reldir="."
13123                         else
13124                                 cf_reldir="\$(srcdir)"
13125                         fi
13126
13127                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
13128                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
13129                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
13130                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
13131                         fi
13132
13133                         $AWK -f $srcdir/mk-1st.awk \
13134                                 name=$cf_dir \
13135                                 traces=$LIB_TRACING \
13136                                 MODEL=$CF_ITEM \
13137                                 model=$cf_subdir \
13138                                 prefix=$cf_prefix \
13139                                 suffix=$cf_suffix \
13140                                 subset=$cf_subset \
13141                                 ShlibVer=$cf_cv_shlib_version \
13142                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
13143                                 DoLinks=$cf_cv_do_symlinks \
13144                                 rmSoLocs=$cf_cv_rm_so_locs \
13145                                 ldconfig="$LDCONFIG" \
13146                                 overwrite=$WITH_OVERWRITE \
13147                                 depend="$cf_depend" \
13148                                 host="$host" \
13149                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
13150                         for cf_subdir2 in $cf_subdirs lib
13151                         do
13152                                 test $cf_subdir = $cf_subdir2 && break
13153                         done
13154                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
13155                         $AWK -f $srcdir/mk-2nd.awk \
13156                                 name=$cf_dir \
13157                                 traces=$LIB_TRACING \
13158                                 MODEL=$CF_ITEM \
13159                                 model=$cf_subdir \
13160                                 subset=$cf_subset \
13161                                 srcdir=$srcdir \
13162                                 echo=$WITH_ECHO \
13163                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
13164                         cf_subdirs="$cf_subdirs $cf_subdir"
13165                         done
13166                 done
13167         fi
13168
13169         echo '  cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
13170 done
13171
13172 for cf_dir in $SRC_SUBDIRS
13173 do
13174         if test -f $cf_dir/Makefile ; then
13175                 case "$cf_dir" in
13176                 Ada95) #(vi
13177                         echo 'libs \' >> Makefile
13178                         echo 'install.libs \' >> Makefile
13179                         echo 'uninstall.libs ::' >> Makefile
13180                         echo '  cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile
13181                         ;;
13182                 esac
13183         fi
13184
13185         if test -f $srcdir/$cf_dir/modules; then
13186                 echo >> Makefile
13187                 if test -f $srcdir/$cf_dir/headers; then
13188 cat >> Makefile <<CF_EOF
13189 install.includes \\
13190 uninstall.includes \\
13191 CF_EOF
13192                 fi
13193 if test "$cf_dir" != "c++" ; then
13194 echo 'lint \' >> Makefile
13195 fi
13196 cat >> Makefile <<CF_EOF
13197 libs \\
13198 lintlib \\
13199 install.libs \\
13200 uninstall.libs \\
13201 install.$cf_dir \\
13202 uninstall.$cf_dir ::
13203         cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
13204 CF_EOF
13205         elif test -f $srcdir/$cf_dir/headers; then
13206 cat >> Makefile <<CF_EOF
13207
13208 libs \\
13209 install.libs \\
13210 uninstall.libs \\
13211 install.includes \\
13212 uninstall.includes ::
13213         cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
13214 CF_EOF
13215 fi
13216 done
13217
13218 cat >> Makefile <<CF_EOF
13219
13220 install.data \\
13221 uninstall.data ::
13222 $MAKE_TERMINFO  cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
13223
13224 install.man \\
13225 uninstall.man ::
13226         cd man && \$(MAKE) \$(CF_MFLAGS) \$@
13227
13228 distclean ::
13229         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
13230         rm -f headers.sh headers.sed
13231         rm -rf \$(DIRS_TO_MAKE)
13232 CF_EOF
13233
13234 # Special case: tack's manpage lives in its own directory.
13235 if test -d tack ; then
13236 if test -f $srcdir/$tack.h; then
13237 cat >> Makefile <<CF_EOF
13238
13239 install.man \\
13240 uninstall.man ::
13241         cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
13242 CF_EOF
13243 fi
13244 fi
13245
13246 rm -f headers.sed headers.sh
13247
13248 echo creating headers.sh
13249 cat >headers.sh <<CF_EOF
13250 #! /bin/sh
13251 # This shell script is generated by the 'configure' script.  It is invoked in a
13252 # subdirectory of the build tree.  It generates a sed-script in the parent
13253 # directory that is used to adjust includes for header files that reside in a
13254 # subdirectory of /usr/include, etc.
13255 PRG=""
13256 while test \$# != 3
13257 do
13258 PRG="\$PRG \$1"; shift
13259 done
13260 DST=\$1
13261 REF=\$2
13262 SRC=\$3
13263 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
13264 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
13265 echo installing \$SRC in \$DST
13266 CF_EOF
13267 if test $WITH_CURSES_H = yes; then
13268         cat >>headers.sh <<CF_EOF
13269 case \$DST in
13270 /*/include/*)
13271         END=\`basename \$DST\`
13272         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
13273         do
13274                 NAME=\`basename \$i\`
13275                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
13276         done
13277         ;;
13278 *)
13279         echo "" >> \$TMPSED
13280         ;;
13281 esac
13282 CF_EOF
13283 else
13284         cat >>headers.sh <<CF_EOF
13285 case \$DST in
13286 /*/include/*)
13287         END=\`basename \$DST\`
13288         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
13289         do
13290                 NAME=\`basename \$i\`
13291                 if test "\$NAME" = "curses.h"
13292                 then
13293                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
13294                         NAME=ncurses.h
13295                 fi
13296                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
13297         done
13298         ;;
13299 *)
13300         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
13301         ;;
13302 esac
13303 CF_EOF
13304 fi
13305 cat >>headers.sh <<CF_EOF
13306 rm -f \$TMPSRC
13307 sed -f \$TMPSED \$SRC > \$TMPSRC
13308 NAME=\`basename \$SRC\`
13309 CF_EOF
13310 if test $WITH_CURSES_H != yes; then
13311         cat >>headers.sh <<CF_EOF
13312 test "\$NAME" = "curses.h" && NAME=ncurses.h
13313 CF_EOF
13314 fi
13315 cat >>headers.sh <<CF_EOF
13316 # Just in case someone gzip'd manpages, remove the conflicting copy.
13317 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
13318
13319 eval \$PRG \$TMPSRC \$DST/\$NAME
13320 rm -f \$TMPSRC \$TMPSED
13321 CF_EOF
13322
13323 chmod 0755 headers.sh
13324
13325 for cf_dir in $SRC_SUBDIRS
13326 do
13327         if test -f $srcdir/$cf_dir/headers; then
13328         cat >>$cf_dir/Makefile <<CF_EOF
13329 \$(DESTDIR)\$(includedir) :
13330         sh \$(srcdir)/../mkinstalldirs \$@
13331
13332 install \\
13333 install.libs \\
13334 install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
13335 CF_EOF
13336                 j=""
13337                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
13338                 do
13339                         test -n "$j" && echo "          $j \\" >>$cf_dir/Makefile
13340                         j=$i
13341                 done
13342                 echo "          $j" >>$cf_dir/Makefile
13343                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
13344                 do
13345                         echo "  @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
13346                         test $i = curses.h && test $WITH_CURSES_H = yes && echo "       @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
13347                 done
13348
13349         cat >>$cf_dir/Makefile <<CF_EOF
13350
13351 uninstall \\
13352 uninstall.libs \\
13353 uninstall.includes ::
13354 CF_EOF
13355                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
13356                 do
13357                         i=`basename $i`
13358                         echo "  -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
13359                         test $i = curses.h && echo "    -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
13360                 done
13361         fi
13362
13363         if test -f $srcdir/$cf_dir/modules; then
13364                 if test "$cf_dir" != "c++" ; then
13365                         cat >>$cf_dir/Makefile <<"CF_EOF"
13366 depend : $(AUTO_SRC)
13367         makedepend -- $(CPPFLAGS) -- $(C_SRC)
13368
13369 # DO NOT DELETE THIS LINE -- make depend depends on it.
13370 CF_EOF
13371                 fi
13372         fi
13373 done
13374
13375  ;;
13376   esac
13377 done
13378 EOF
13379
13380 cat >>$CONFIG_STATUS <<\EOF
13381
13382 { (exit 0); exit 0; }
13383 EOF
13384 chmod +x $CONFIG_STATUS
13385 ac_clean_files=$ac_clean_files_save
13386
13387 # configure is writing to config.log, and then calls config.status.
13388 # config.status does its own redirection, appending to config.log.
13389 # Unfortunately, on DOS this fails, as config.log is still kept open
13390 # by configure, so config.status won't be able to write to it; its
13391 # output is simply discarded.  So we exec the FD to /dev/null,
13392 # effectively closing config.log, so it can be properly (re)opened and
13393 # appended to by config.status.  When coming back to configure, we
13394 # need to make the FD available again.
13395 if test "$no_create" != yes; then
13396   ac_cs_success=:
13397   exec 5>/dev/null
13398   $SHELL $CONFIG_STATUS || ac_cs_success=false
13399   exec 5>>config.log
13400   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13401   # would make configure fail if this is the last instruction.
13402   $ac_cs_success || { (exit 1); exit 1; }
13403 fi
13404 ${MAKE-make} preinstall