]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.5
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.351 .
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-cpp=XXX    the build C preprocessor ($BUILD_CPP)
670   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
671   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
672   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
673   --with-build-libs=XXX   the build libraries ($(BUILD_LIBS)
674 Options to Specify the Libraries Built/Used:
675   --with-libtool          generate libraries with libtool
676   --with-shared           generate shared-libraries
677   --with-normal           generate normal-libraries (default)
678   --with-debug            generate debug-libraries (default)
679   --with-profile          generate profile-libraries
680   --with-termlib          generate separate terminfo library
681   --with-dbmalloc         use Conor Cahill's dbmalloc library
682   --with-dmalloc          use Gray Watson's dmalloc library
683   --with-gpm              use Alessandro Rubini's GPM library
684   --with-sysmouse         use sysmouse (FreeBSD console)
685   --enable-rpath          use rpath option when generating shared libraries
686   --with-shlib-version=X  Specify rel or abi version for shared libs
687 Fine-Tuning Your Configuration:
688   --disable-overwrite     leave out the link to -lcurses
689   --disable-database      do not use terminfo, only fallbacks/termcap
690   --with-database=XXX     specify terminfo source to install
691   --with-fallbacks=XXX    specify list of fallback terminal descriptions
692   --without-xterm-new     specify if xterm terminfo should be old version
693   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
694   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
695   --disable-big-core      assume machine has little memory
696   --enable-termcap        compile in termcap fallback support
697   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
698   --enable-getcap         fast termcap load, no xrefs to terminfo
699   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
700   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
701   --disable-root-environ  limit environment when running as root
702   --enable-symlinks       make tic use symbolic links not hard links
703   --enable-broken_linker  compile with broken-linker support code
704   --enable-widec          compile with wide-char/UTF-8 code
705   --disable-lp64          allow chtype to be long (ignore _LP64)
706   --disable-largefile     omit support for large files
707   --with-bool=TYPE        override fallback type of bool variable
708   --with-caps=alt         compile with alternate Caps file
709   --with-chtype=TYPE      override type of chtype
710   --with-ospeed=TYPE      override type of ospeed variable
711   --with-mmask-t=TYPE     override type of mmask_t
712   --enable-bsdpad         recognize BSD-style prefix padding
713   --with-rcs-ids          compile-in RCS identifiers
714 Options to Specify How Manpages are Installed:
715   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
716                           optionally formatted/catonly, e.g., gzip,formatted
717   --with-manpage-renames  specify manpage-renaming
718   --with-manpage-aliases  specify manpage-aliases using .so
719   --with-manpage-symlinks specify manpage-aliases using symlinks
720   --with-manpage-tbl      specify manpage processing with tbl
721 Extensions:
722   --disable-ext-funcs     disable function-extensions
723   --enable-const          compile with extra/non-standard const
724   --enable-no-padding     compile with $NCURSES_NO_PADDING code
725   --enable-sigwinch       compile with SIGWINCH handler
726   --enable-tcap-names     compile with user-definable terminal capabilities
727 Development Code:
728   --with-develop          enable all development options
729   --enable-hard-tabs      compile with hard-tabs code
730   --enable-xmc-glitch     compile with limited support for xmc
731 Experimental Code:
732   --disable-assumed-color do not assume anything about default-colors
733   --disable-hashmap       compile without hashmap scrolling-optimization
734   --enable-colorfgbg      compile with $COLORFGBG code
735   --enable-ext-colors     compile for experimental 256-color support
736   --enable-ext-mouse      compile for experimental mouse-encoding
737   --enable-safe-sprintf   compile with experimental safe-sprintf code
738   --disable-scroll-hints  compile without scroll-hints code
739 Testing/development Options:
740   --enable-echo           build: display "compiling" commands (default)
741   --enable-warnings       build: turn on GCC compiler warnings
742   --enable-assertions     test: turn on generation of assertion code
743   --disable-leaks         test: suppress permanent memory-leaks
744   --enable-expanded       test: generate functions for certain macros
745   --disable-macros        test: use functions rather than macros
746   --with-trace            test: add trace() function to all models of ncurses
747 Ada95 Binding Options:
748   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
749   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
750   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
751
752 Some influential environment variables:
753   CC          C compiler command
754   CFLAGS      C compiler flags
755   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
756               nonstandard directory <lib dir>
757   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
758               headers in a nonstandard directory <include dir>
759   CPP         C preprocessor
760   CXX         C++ compiler command
761   CXXFLAGS    C++ compiler flags
762   CXXCPP      C++ preprocessor
763
764 Use these variables to override the choices made by `configure' or to help
765 it to find libraries and programs with nonstandard names/locations.
766
767 EOF
768 fi
769
770 if test "$ac_init_help" = "recursive"; then
771   # If there are subdirs, report their specific --help.
772   ac_popdir=`pwd`
773   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
774     cd $ac_subdir
775     # A "../" for each directory in /$ac_subdir.
776     ac_dots=`echo $ac_subdir |
777              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
778
779     case $srcdir in
780     .) # No --srcdir option.  We are building in place.
781       ac_sub_srcdir=$srcdir ;;
782     [\\/]* | ?:[\\/]* ) # Absolute path.
783       ac_sub_srcdir=$srcdir/$ac_subdir ;;
784     *) # Relative path.
785       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
786     esac
787
788     # Check for guested configure; otherwise get Cygnus style configure.
789     if test -f $ac_sub_srcdir/configure.gnu; then
790       echo
791       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
792     elif test -f $ac_sub_srcdir/configure; then
793       echo
794       $SHELL $ac_sub_srcdir/configure  --help=recursive
795     elif test -f $ac_sub_srcdir/configure.ac ||
796            test -f $ac_sub_srcdir/configure.in; then
797       echo
798       $ac_configure --help
799     else
800       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
801     fi
802     cd $ac_popdir
803   done
804 fi
805
806 test -n "$ac_init_help" && exit 0
807 if $ac_init_version; then
808   cat <<\EOF
809
810 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
811 Free Software Foundation, Inc.
812 This configure script is free software; the Free Software Foundation
813 gives unlimited permission to copy, distribute and modify it.
814 EOF
815   exit 0
816 fi
817 exec 5>config.log
818 cat >&5 <<EOF
819 This file contains any messages produced by compilers while
820 running configure, to aid debugging if configure makes a mistake.
821
822 It was created by $as_me, which was
823 generated by GNU Autoconf 2.52.20030208.  Invocation command line was
824
825   $ $0 $@
826
827 EOF
828 {
829 cat <<_ASUNAME
830 ## ---------- ##
831 ## Platform.  ##
832 ## ---------- ##
833
834 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
835 uname -m = `(uname -m) 2>/dev/null || echo unknown`
836 uname -r = `(uname -r) 2>/dev/null || echo unknown`
837 uname -s = `(uname -s) 2>/dev/null || echo unknown`
838 uname -v = `(uname -v) 2>/dev/null || echo unknown`
839
840 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
841 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
842
843 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
844 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
845 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
846 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
847 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
848 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
849 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
850
851 PATH = $PATH
852
853 _ASUNAME
854 } >&5
855
856 cat >&5 <<EOF
857 ## ------------ ##
858 ## Core tests.  ##
859 ## ------------ ##
860
861 EOF
862
863 # Keep a trace of the command line.
864 # Strip out --no-create and --no-recursion so they do not pile up.
865 # Also quote any args containing shell meta-characters.
866 ac_configure_args=
867 ac_sep=
868 for ac_arg
869 do
870   case $ac_arg in
871   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
872   | --no-cr | --no-c) ;;
873   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
874   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
875   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
876     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
877     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
878     ac_sep=" " ;;
879   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
880      ac_sep=" " ;;
881   esac
882   # Get rid of the leading space.
883 done
884
885 # When interrupted or exit'd, cleanup temporary files, and complete
886 # config.log.  We remove comments because anyway the quotes in there
887 # would cause problems or look ugly.
888 trap 'exit_status=$?
889   # Save into config.log some information that might help in debugging.
890   echo >&5
891   echo "## ----------------- ##" >&5
892   echo "## Cache variables.  ##" >&5
893   echo "## ----------------- ##" >&5
894   echo >&5
895   # The following way of writing the cache mishandles newlines in values,
896 {
897   (set) 2>&1 |
898     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
899     *ac_space=\ *)
900       sed -n \
901         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
902           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
903       ;;
904     *)
905       sed -n \
906         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
907       ;;
908     esac;
909 } >&5
910   sed "/^$/d" confdefs.h >conftest.log
911   if test -s conftest.log; then
912     echo >&5
913     echo "## ------------ ##" >&5
914     echo "## confdefs.h.  ##" >&5
915     echo "## ------------ ##" >&5
916     echo >&5
917     cat conftest.log >&5
918   fi
919   (echo; echo) >&5
920   test "$ac_signal" != 0 &&
921     echo "$as_me: caught signal $ac_signal" >&5
922   echo "$as_me: exit $exit_status" >&5
923   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
924     exit $exit_status
925      ' 0
926 for ac_signal in 1 2 13 15; do
927   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
928 done
929 ac_signal=0
930
931 # confdefs.h avoids OS command line length limits that DEFS can exceed.
932 rm -rf conftest* confdefs.h
933 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
934 echo >confdefs.h
935
936 # Let the site file select an alternate cache file if it wants to.
937 # Prefer explicitly selected file to automatically selected ones.
938 if test -z "$CONFIG_SITE"; then
939   if test "x$prefix" != xNONE; then
940     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
941   else
942     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
943   fi
944 fi
945 for ac_site_file in $CONFIG_SITE; do
946   if test -r "$ac_site_file"; then
947     { echo "$as_me:947: loading site script $ac_site_file" >&5
948 echo "$as_me: loading site script $ac_site_file" >&6;}
949     cat "$ac_site_file" >&5
950     . "$ac_site_file"
951   fi
952 done
953
954 if test -r "$cache_file"; then
955   # Some versions of bash will fail to source /dev/null (special
956   # files actually), so we avoid doing that.
957   if test -f "$cache_file"; then
958     { echo "$as_me:958: loading cache $cache_file" >&5
959 echo "$as_me: loading cache $cache_file" >&6;}
960     case $cache_file in
961       [\\/]* | ?:[\\/]* ) . $cache_file;;
962       *)                      . ./$cache_file;;
963     esac
964   fi
965 else
966   { echo "$as_me:966: creating cache $cache_file" >&5
967 echo "$as_me: creating cache $cache_file" >&6;}
968   >$cache_file
969 fi
970
971 # Check that the precious variables saved in the cache have kept the same
972 # value.
973 ac_cache_corrupted=false
974 for ac_var in `(set) 2>&1 |
975                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
976   eval ac_old_set=\$ac_cv_env_${ac_var}_set
977   eval ac_new_set=\$ac_env_${ac_var}_set
978   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
979   eval ac_new_val="\$ac_env_${ac_var}_value"
980   case $ac_old_set,$ac_new_set in
981     set,)
982       { echo "$as_me:982: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
983 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
984       ac_cache_corrupted=: ;;
985     ,set)
986       { echo "$as_me:986: error: \`$ac_var' was not set in the previous run" >&5
987 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
988       ac_cache_corrupted=: ;;
989     ,);;
990     *)
991       if test "x$ac_old_val" != "x$ac_new_val"; then
992         { echo "$as_me:992: error: \`$ac_var' has changed since the previous run:" >&5
993 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
994         { echo "$as_me:994:   former value:  $ac_old_val" >&5
995 echo "$as_me:   former value:  $ac_old_val" >&2;}
996         { echo "$as_me:996:   current value: $ac_new_val" >&5
997 echo "$as_me:   current value: $ac_new_val" >&2;}
998         ac_cache_corrupted=:
999       fi;;
1000   esac
1001   # Pass precious variables to config.status.  It doesn't matter if
1002   # we pass some twice (in addition to the command line arguments).
1003   if test "$ac_new_set" = set; then
1004     case $ac_new_val in
1005     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1006       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1007       ac_configure_args="$ac_configure_args '$ac_arg'"
1008       ;;
1009     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1010        ;;
1011     esac
1012   fi
1013 done
1014 if $ac_cache_corrupted; then
1015   { echo "$as_me:1015: error: changes in the environment can compromise the build" >&5
1016 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1017   { { echo "$as_me:1017: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1018 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1019    { (exit 1); exit 1; }; }
1020 fi
1021
1022 ac_ext=c
1023 ac_cpp='$CPP $CPPFLAGS'
1024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1026 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1027
1028 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1029   *c*,-n*) ECHO_N= ECHO_C='
1030 ' ECHO_T='      ' ;;
1031   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1032   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1033 esac
1034 echo "#! $SHELL" >conftest.sh
1035 echo  "exit 0"   >>conftest.sh
1036 chmod +x conftest.sh
1037 if { (echo "$as_me:1037: PATH=\".;.\"; conftest.sh") >&5
1038   (PATH=".;."; conftest.sh) 2>&5
1039   ac_status=$?
1040   echo "$as_me:1040: \$? = $ac_status" >&5
1041   (exit $ac_status); }; then
1042   ac_path_separator=';'
1043 else
1044   ac_path_separator=:
1045 fi
1046 PATH_SEPARATOR="$ac_path_separator"
1047 rm -f conftest.sh
1048
1049 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1050
1051 NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1052 NCURSES_MINOR="`egrep '^NCURSES_MINOR[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1053 NCURSES_PATCH="`egrep '^NCURSES_PATCH[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1054 cf_cv_abi_version=${NCURSES_MAJOR}
1055 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1056 cf_cv_timestamp=`date`
1057 echo "$as_me:1057: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1058 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1059
1060 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1061
1062 # Check whether --with-rel-version or --without-rel-version was given.
1063 if test "${with_rel_version+set}" = set; then
1064   withval="$with_rel_version"
1065   { echo "$as_me:1065: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1066 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1067  cf_cv_rel_version=$withval
1068 fi;
1069
1070  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1071  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1072
1073 if test -n "$NCURSES_MAJOR" ; then
1074   case $NCURSES_MAJOR in #(vi
1075   [0-9]*) #(vi
1076         ;;
1077   *)
1078         { { echo "$as_me:1078: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1079 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1080    { (exit 1); exit 1; }; }
1081         ;;
1082   esac
1083 else
1084   { { echo "$as_me:1084: error: Release major-version value is empty" >&5
1085 echo "$as_me: error: Release major-version value is empty" >&2;}
1086    { (exit 1); exit 1; }; }
1087 fi
1088
1089 if test -n "$NCURSES_MINOR" ; then
1090   case $NCURSES_MINOR in #(vi
1091   [0-9]*) #(vi
1092         ;;
1093   *)
1094         { { echo "$as_me:1094: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1095 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1096    { (exit 1); exit 1; }; }
1097         ;;
1098   esac
1099 else
1100   { { echo "$as_me:1100: error: Release minor-version value is empty" >&5
1101 echo "$as_me: error: Release minor-version value is empty" >&2;}
1102    { (exit 1); exit 1; }; }
1103 fi
1104
1105 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1106
1107 # Check whether --with-abi-version or --without-abi-version was given.
1108 if test "${with_abi_version+set}" = set; then
1109   withval="$with_abi_version"
1110   { echo "$as_me:1110: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1111 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1112  cf_cv_abi_version=$withval
1113 fi;
1114
1115 if test -n "$cf_cv_abi_version" ; then
1116   case $cf_cv_abi_version in #(vi
1117   [0-9]*) #(vi
1118         ;;
1119   *)
1120         { { echo "$as_me:1120: error: ABI version is not a number: $cf_cv_abi_version" >&5
1121 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1122    { (exit 1); exit 1; }; }
1123         ;;
1124   esac
1125 else
1126   { { echo "$as_me:1126: error: ABI version value is empty" >&5
1127 echo "$as_me: error: ABI version value is empty" >&2;}
1128    { (exit 1); exit 1; }; }
1129 fi
1130
1131 ac_aux_dir=
1132 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1133   if test -f $ac_dir/install-sh; then
1134     ac_aux_dir=$ac_dir
1135     ac_install_sh="$ac_aux_dir/install-sh -c"
1136     break
1137   elif test -f $ac_dir/install.sh; then
1138     ac_aux_dir=$ac_dir
1139     ac_install_sh="$ac_aux_dir/install.sh -c"
1140     break
1141   elif test -f $ac_dir/shtool; then
1142     ac_aux_dir=$ac_dir
1143     ac_install_sh="$ac_aux_dir/shtool install -c"
1144     break
1145   fi
1146 done
1147 if test -z "$ac_aux_dir"; then
1148   { { echo "$as_me:1148: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1149 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1150    { (exit 1); exit 1; }; }
1151 fi
1152 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1153 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1154 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1155
1156 # Make sure we can run config.sub.
1157 $ac_config_sub sun4 >/dev/null 2>&1 ||
1158   { { echo "$as_me:1158: error: cannot run $ac_config_sub" >&5
1159 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1160    { (exit 1); exit 1; }; }
1161
1162 echo "$as_me:1162: checking build system type" >&5
1163 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1164 if test "${ac_cv_build+set}" = set; then
1165   echo $ECHO_N "(cached) $ECHO_C" >&6
1166 else
1167   ac_cv_build_alias=$build_alias
1168 test -z "$ac_cv_build_alias" &&
1169   ac_cv_build_alias=`$ac_config_guess`
1170 test -z "$ac_cv_build_alias" &&
1171   { { echo "$as_me:1171: error: cannot guess build type; you must specify one" >&5
1172 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1173    { (exit 1); exit 1; }; }
1174 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1175   { { echo "$as_me:1175: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1176 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1177    { (exit 1); exit 1; }; }
1178
1179 fi
1180 echo "$as_me:1180: result: $ac_cv_build" >&5
1181 echo "${ECHO_T}$ac_cv_build" >&6
1182 build=$ac_cv_build
1183 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1184 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1185 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1186
1187 echo "$as_me:1187: checking host system type" >&5
1188 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1189 if test "${ac_cv_host+set}" = set; then
1190   echo $ECHO_N "(cached) $ECHO_C" >&6
1191 else
1192   ac_cv_host_alias=$host_alias
1193 test -z "$ac_cv_host_alias" &&
1194   ac_cv_host_alias=$ac_cv_build_alias
1195 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1196   { { echo "$as_me:1196: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1197 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1198    { (exit 1); exit 1; }; }
1199
1200 fi
1201 echo "$as_me:1201: result: $ac_cv_host" >&5
1202 echo "${ECHO_T}$ac_cv_host" >&6
1203 host=$ac_cv_host
1204 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1205 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1206 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1207
1208 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1209         echo "$as_me:1209: checking target system type" >&5
1210 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1211 if test "${ac_cv_target+set}" = set; then
1212   echo $ECHO_N "(cached) $ECHO_C" >&6
1213 else
1214   ac_cv_target_alias=$target_alias
1215 test "x$ac_cv_target_alias" = "x" &&
1216   ac_cv_target_alias=$ac_cv_host_alias
1217 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1218   { { echo "$as_me:1218: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1219 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1220    { (exit 1); exit 1; }; }
1221
1222 fi
1223 echo "$as_me:1223: result: $ac_cv_target" >&5
1224 echo "${ECHO_T}$ac_cv_target" >&6
1225 target=$ac_cv_target
1226 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1227 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1228 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1229
1230 # The aliases save the names the user supplied, while $host etc.
1231 # will get canonicalized.
1232 test -n "$target_alias" &&
1233   test "$program_prefix$program_suffix$program_transform_name" = \
1234     NONENONEs,x,x, &&
1235   program_prefix=${target_alias}-
1236         system_name="$host_os"
1237 else
1238         system_name="`(uname -s -r) 2>/dev/null`"
1239         if test -z "$system_name" ; then
1240                 system_name="`(hostname) 2>/dev/null`"
1241         fi
1242 fi
1243 test -n "$system_name" && cat >>confdefs.h <<EOF
1244 #define SYSTEM_NAME "$system_name"
1245 EOF
1246
1247 if test "${cf_cv_system_name+set}" = set; then
1248   echo $ECHO_N "(cached) $ECHO_C" >&6
1249 else
1250   cf_cv_system_name="$system_name"
1251 fi
1252
1253 test -z "$system_name" && system_name="$cf_cv_system_name"
1254 test -n "$cf_cv_system_name" && echo "$as_me:1254: result: Configuring for $cf_cv_system_name" >&5
1255 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1256
1257 if test ".$system_name" != ".$cf_cv_system_name" ; then
1258         echo "$as_me:1258: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1259 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1260         { { echo "$as_me:1260: error: \"Please remove config.cache and try again.\"" >&5
1261 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1262    { (exit 1); exit 1; }; }
1263 fi
1264
1265 # Check whether --with-system-type or --without-system-type was given.
1266 if test "${with_system_type+set}" = set; then
1267   withval="$with_system_type"
1268   { echo "$as_me:1268: WARNING: overriding system type to $withval" >&5
1269 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1270  cf_cv_system_name=$withval
1271 fi;
1272
1273 ###     Save the given $CFLAGS to allow user-override.
1274 cf_user_CFLAGS="$CFLAGS"
1275
1276 ###     Default install-location
1277
1278 echo "$as_me:1278: checking for prefix" >&5
1279 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1280 if test "x$prefix" = "xNONE" ; then
1281         case "$cf_cv_system_name" in
1282                 # non-vendor systems don't have a conflict
1283         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1284                 prefix=/usr
1285                 ;;
1286         *)      prefix=$ac_default_prefix
1287                 ;;
1288         esac
1289 fi
1290 echo "$as_me:1290: result: $prefix" >&5
1291 echo "${ECHO_T}$prefix" >&6
1292
1293 if test "x$prefix" = "xNONE" ; then
1294 echo "$as_me:1294: checking for default include-directory" >&5
1295 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1296 test -n "$verbose" && echo 1>&6
1297 for cf_symbol in \
1298         $includedir \
1299         $includedir/ncurses \
1300         $prefix/include \
1301         $prefix/include/ncurses \
1302         /usr/local/include \
1303         /usr/local/include/ncurses \
1304         /usr/include \
1305         /usr/include/ncurses
1306 do
1307         cf_dir=`eval echo $cf_symbol`
1308         if test -f $cf_dir/curses.h ; then
1309         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1310                 includedir="$cf_symbol"
1311                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1312                 break
1313         fi
1314         fi
1315         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1316 done
1317 echo "$as_me:1317: result: $includedir" >&5
1318 echo "${ECHO_T}$includedir" >&6
1319 fi
1320
1321 ###     Checks for programs.
1322 ac_ext=c
1323 ac_cpp='$CPP $CPPFLAGS'
1324 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1325 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1326 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1327 if test -n "$ac_tool_prefix"; then
1328   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1329 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1330 echo "$as_me:1330: checking for $ac_word" >&5
1331 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1332 if test "${ac_cv_prog_CC+set}" = set; then
1333   echo $ECHO_N "(cached) $ECHO_C" >&6
1334 else
1335   if test -n "$CC"; then
1336   ac_cv_prog_CC="$CC" # Let the user override the test.
1337 else
1338   ac_save_IFS=$IFS; IFS=$ac_path_separator
1339 ac_dummy="$PATH"
1340 for ac_dir in $ac_dummy; do
1341   IFS=$ac_save_IFS
1342   test -z "$ac_dir" && ac_dir=.
1343   $as_executable_p "$ac_dir/$ac_word" || continue
1344 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1345 echo "$as_me:1345: found $ac_dir/$ac_word" >&5
1346 break
1347 done
1348
1349 fi
1350 fi
1351 CC=$ac_cv_prog_CC
1352 if test -n "$CC"; then
1353   echo "$as_me:1353: result: $CC" >&5
1354 echo "${ECHO_T}$CC" >&6
1355 else
1356   echo "$as_me:1356: result: no" >&5
1357 echo "${ECHO_T}no" >&6
1358 fi
1359
1360 fi
1361 if test -z "$ac_cv_prog_CC"; then
1362   ac_ct_CC=$CC
1363   # Extract the first word of "gcc", so it can be a program name with args.
1364 set dummy gcc; ac_word=$2
1365 echo "$as_me:1365: checking for $ac_word" >&5
1366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1367 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1368   echo $ECHO_N "(cached) $ECHO_C" >&6
1369 else
1370   if test -n "$ac_ct_CC"; then
1371   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1372 else
1373   ac_save_IFS=$IFS; IFS=$ac_path_separator
1374 ac_dummy="$PATH"
1375 for ac_dir in $ac_dummy; do
1376   IFS=$ac_save_IFS
1377   test -z "$ac_dir" && ac_dir=.
1378   $as_executable_p "$ac_dir/$ac_word" || continue
1379 ac_cv_prog_ac_ct_CC="gcc"
1380 echo "$as_me:1380: found $ac_dir/$ac_word" >&5
1381 break
1382 done
1383
1384 fi
1385 fi
1386 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1387 if test -n "$ac_ct_CC"; then
1388   echo "$as_me:1388: result: $ac_ct_CC" >&5
1389 echo "${ECHO_T}$ac_ct_CC" >&6
1390 else
1391   echo "$as_me:1391: result: no" >&5
1392 echo "${ECHO_T}no" >&6
1393 fi
1394
1395   CC=$ac_ct_CC
1396 else
1397   CC="$ac_cv_prog_CC"
1398 fi
1399
1400 if test -z "$CC"; then
1401   if test -n "$ac_tool_prefix"; then
1402   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1403 set dummy ${ac_tool_prefix}cc; ac_word=$2
1404 echo "$as_me:1404: checking for $ac_word" >&5
1405 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1406 if test "${ac_cv_prog_CC+set}" = set; then
1407   echo $ECHO_N "(cached) $ECHO_C" >&6
1408 else
1409   if test -n "$CC"; then
1410   ac_cv_prog_CC="$CC" # Let the user override the test.
1411 else
1412   ac_save_IFS=$IFS; IFS=$ac_path_separator
1413 ac_dummy="$PATH"
1414 for ac_dir in $ac_dummy; do
1415   IFS=$ac_save_IFS
1416   test -z "$ac_dir" && ac_dir=.
1417   $as_executable_p "$ac_dir/$ac_word" || continue
1418 ac_cv_prog_CC="${ac_tool_prefix}cc"
1419 echo "$as_me:1419: found $ac_dir/$ac_word" >&5
1420 break
1421 done
1422
1423 fi
1424 fi
1425 CC=$ac_cv_prog_CC
1426 if test -n "$CC"; then
1427   echo "$as_me:1427: result: $CC" >&5
1428 echo "${ECHO_T}$CC" >&6
1429 else
1430   echo "$as_me:1430: result: no" >&5
1431 echo "${ECHO_T}no" >&6
1432 fi
1433
1434 fi
1435 if test -z "$ac_cv_prog_CC"; then
1436   ac_ct_CC=$CC
1437   # Extract the first word of "cc", so it can be a program name with args.
1438 set dummy cc; ac_word=$2
1439 echo "$as_me:1439: checking for $ac_word" >&5
1440 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1441 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1442   echo $ECHO_N "(cached) $ECHO_C" >&6
1443 else
1444   if test -n "$ac_ct_CC"; then
1445   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1446 else
1447   ac_save_IFS=$IFS; IFS=$ac_path_separator
1448 ac_dummy="$PATH"
1449 for ac_dir in $ac_dummy; do
1450   IFS=$ac_save_IFS
1451   test -z "$ac_dir" && ac_dir=.
1452   $as_executable_p "$ac_dir/$ac_word" || continue
1453 ac_cv_prog_ac_ct_CC="cc"
1454 echo "$as_me:1454: found $ac_dir/$ac_word" >&5
1455 break
1456 done
1457
1458 fi
1459 fi
1460 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1461 if test -n "$ac_ct_CC"; then
1462   echo "$as_me:1462: result: $ac_ct_CC" >&5
1463 echo "${ECHO_T}$ac_ct_CC" >&6
1464 else
1465   echo "$as_me:1465: result: no" >&5
1466 echo "${ECHO_T}no" >&6
1467 fi
1468
1469   CC=$ac_ct_CC
1470 else
1471   CC="$ac_cv_prog_CC"
1472 fi
1473
1474 fi
1475 if test -z "$CC"; then
1476   # Extract the first word of "cc", so it can be a program name with args.
1477 set dummy cc; ac_word=$2
1478 echo "$as_me:1478: checking for $ac_word" >&5
1479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1480 if test "${ac_cv_prog_CC+set}" = set; then
1481   echo $ECHO_N "(cached) $ECHO_C" >&6
1482 else
1483   if test -n "$CC"; then
1484   ac_cv_prog_CC="$CC" # Let the user override the test.
1485 else
1486   ac_prog_rejected=no
1487   ac_save_IFS=$IFS; IFS=$ac_path_separator
1488 ac_dummy="$PATH"
1489 for ac_dir in $ac_dummy; do
1490   IFS=$ac_save_IFS
1491   test -z "$ac_dir" && ac_dir=.
1492   $as_executable_p "$ac_dir/$ac_word" || continue
1493 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1494   ac_prog_rejected=yes
1495   continue
1496 fi
1497 ac_cv_prog_CC="cc"
1498 echo "$as_me:1498: found $ac_dir/$ac_word" >&5
1499 break
1500 done
1501
1502 if test $ac_prog_rejected = yes; then
1503   # We found a bogon in the path, so make sure we never use it.
1504   set dummy $ac_cv_prog_CC
1505   shift
1506   if test $# != 0; then
1507     # We chose a different compiler from the bogus one.
1508     # However, it has the same basename, so the bogon will be chosen
1509     # first if we set CC to just the basename; use the full file name.
1510     shift
1511     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1512     shift
1513     ac_cv_prog_CC="$@"
1514   fi
1515 fi
1516 fi
1517 fi
1518 CC=$ac_cv_prog_CC
1519 if test -n "$CC"; then
1520   echo "$as_me:1520: result: $CC" >&5
1521 echo "${ECHO_T}$CC" >&6
1522 else
1523   echo "$as_me:1523: result: no" >&5
1524 echo "${ECHO_T}no" >&6
1525 fi
1526
1527 fi
1528 if test -z "$CC"; then
1529   if test -n "$ac_tool_prefix"; then
1530   for ac_prog in cl
1531   do
1532     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1533 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1534 echo "$as_me:1534: checking for $ac_word" >&5
1535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1536 if test "${ac_cv_prog_CC+set}" = set; then
1537   echo $ECHO_N "(cached) $ECHO_C" >&6
1538 else
1539   if test -n "$CC"; then
1540   ac_cv_prog_CC="$CC" # Let the user override the test.
1541 else
1542   ac_save_IFS=$IFS; IFS=$ac_path_separator
1543 ac_dummy="$PATH"
1544 for ac_dir in $ac_dummy; do
1545   IFS=$ac_save_IFS
1546   test -z "$ac_dir" && ac_dir=.
1547   $as_executable_p "$ac_dir/$ac_word" || continue
1548 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1549 echo "$as_me:1549: found $ac_dir/$ac_word" >&5
1550 break
1551 done
1552
1553 fi
1554 fi
1555 CC=$ac_cv_prog_CC
1556 if test -n "$CC"; then
1557   echo "$as_me:1557: result: $CC" >&5
1558 echo "${ECHO_T}$CC" >&6
1559 else
1560   echo "$as_me:1560: result: no" >&5
1561 echo "${ECHO_T}no" >&6
1562 fi
1563
1564     test -n "$CC" && break
1565   done
1566 fi
1567 if test -z "$CC"; then
1568   ac_ct_CC=$CC
1569   for ac_prog in cl
1570 do
1571   # Extract the first word of "$ac_prog", so it can be a program name with args.
1572 set dummy $ac_prog; ac_word=$2
1573 echo "$as_me:1573: checking for $ac_word" >&5
1574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1575 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1576   echo $ECHO_N "(cached) $ECHO_C" >&6
1577 else
1578   if test -n "$ac_ct_CC"; then
1579   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1580 else
1581   ac_save_IFS=$IFS; IFS=$ac_path_separator
1582 ac_dummy="$PATH"
1583 for ac_dir in $ac_dummy; do
1584   IFS=$ac_save_IFS
1585   test -z "$ac_dir" && ac_dir=.
1586   $as_executable_p "$ac_dir/$ac_word" || continue
1587 ac_cv_prog_ac_ct_CC="$ac_prog"
1588 echo "$as_me:1588: found $ac_dir/$ac_word" >&5
1589 break
1590 done
1591
1592 fi
1593 fi
1594 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1595 if test -n "$ac_ct_CC"; then
1596   echo "$as_me:1596: result: $ac_ct_CC" >&5
1597 echo "${ECHO_T}$ac_ct_CC" >&6
1598 else
1599   echo "$as_me:1599: result: no" >&5
1600 echo "${ECHO_T}no" >&6
1601 fi
1602
1603   test -n "$ac_ct_CC" && break
1604 done
1605
1606   CC=$ac_ct_CC
1607 fi
1608
1609 fi
1610
1611 test -z "$CC" && { { echo "$as_me:1611: error: no acceptable cc found in \$PATH" >&5
1612 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1613    { (exit 1); exit 1; }; }
1614
1615 # Provide some information about the compiler.
1616 echo "$as_me:1616:" \
1617      "checking for C compiler version" >&5
1618 ac_compiler=`set X $ac_compile; echo $2`
1619 { (eval echo "$as_me:1619: \"$ac_compiler --version </dev/null >&5\"") >&5
1620   (eval $ac_compiler --version </dev/null >&5) 2>&5
1621   ac_status=$?
1622   echo "$as_me:1622: \$? = $ac_status" >&5
1623   (exit $ac_status); }
1624 { (eval echo "$as_me:1624: \"$ac_compiler -v </dev/null >&5\"") >&5
1625   (eval $ac_compiler -v </dev/null >&5) 2>&5
1626   ac_status=$?
1627   echo "$as_me:1627: \$? = $ac_status" >&5
1628   (exit $ac_status); }
1629 { (eval echo "$as_me:1629: \"$ac_compiler -V </dev/null >&5\"") >&5
1630   (eval $ac_compiler -V </dev/null >&5) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }
1634
1635 cat >conftest.$ac_ext <<_ACEOF
1636 #line 1636 "configure"
1637 #include "confdefs.h"
1638
1639 int
1640 main ()
1641 {
1642
1643   ;
1644   return 0;
1645 }
1646 _ACEOF
1647 ac_clean_files_save=$ac_clean_files
1648 ac_clean_files="$ac_clean_files a.out a.exe"
1649 # Try to create an executable without -o first, disregard a.out.
1650 # It will help us diagnose broken compilers, and finding out an intuition
1651 # of exeext.
1652 echo "$as_me:1652: checking for C compiler default output" >&5
1653 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1654 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1655 if { (eval echo "$as_me:1655: \"$ac_link_default\"") >&5
1656   (eval $ac_link_default) 2>&5
1657   ac_status=$?
1658   echo "$as_me:1658: \$? = $ac_status" >&5
1659   (exit $ac_status); }; then
1660   # Find the output, starting from the most likely.  This scheme is
1661 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1662 # resort.
1663 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1664                 ls a.out conftest 2>/dev/null;
1665                 ls a.* conftest.* 2>/dev/null`; do
1666   case $ac_file in
1667     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1668     a.out ) # We found the default executable, but exeext='' is most
1669             # certainly right.
1670             break;;
1671     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1672           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1673           export ac_cv_exeext
1674           break;;
1675     * ) break;;
1676   esac
1677 done
1678 else
1679   echo "$as_me: failed program was:" >&5
1680 cat conftest.$ac_ext >&5
1681 { { echo "$as_me:1681: error: C compiler cannot create executables" >&5
1682 echo "$as_me: error: C compiler cannot create executables" >&2;}
1683    { (exit 77); exit 77; }; }
1684 fi
1685
1686 ac_exeext=$ac_cv_exeext
1687 echo "$as_me:1687: result: $ac_file" >&5
1688 echo "${ECHO_T}$ac_file" >&6
1689
1690 # Check the compiler produces executables we can run.  If not, either
1691 # the compiler is broken, or we cross compile.
1692 echo "$as_me:1692: checking whether the C compiler works" >&5
1693 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1694 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1695 # If not cross compiling, check that we can run a simple program.
1696 if test "$cross_compiling" != yes; then
1697   if { ac_try='./$ac_file'
1698   { (eval echo "$as_me:1698: \"$ac_try\"") >&5
1699   (eval $ac_try) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); }; }; then
1703     cross_compiling=no
1704   else
1705     if test "$cross_compiling" = maybe; then
1706         cross_compiling=yes
1707     else
1708         { { echo "$as_me:1708: error: cannot run C compiled programs.
1709 If you meant to cross compile, use \`--host'." >&5
1710 echo "$as_me: error: cannot run C compiled programs.
1711 If you meant to cross compile, use \`--host'." >&2;}
1712    { (exit 1); exit 1; }; }
1713     fi
1714   fi
1715 fi
1716 echo "$as_me:1716: result: yes" >&5
1717 echo "${ECHO_T}yes" >&6
1718
1719 rm -f a.out a.exe conftest$ac_cv_exeext
1720 ac_clean_files=$ac_clean_files_save
1721 # Check the compiler produces executables we can run.  If not, either
1722 # the compiler is broken, or we cross compile.
1723 echo "$as_me:1723: checking whether we are cross compiling" >&5
1724 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1725 echo "$as_me:1725: result: $cross_compiling" >&5
1726 echo "${ECHO_T}$cross_compiling" >&6
1727
1728 echo "$as_me:1728: checking for executable suffix" >&5
1729 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1730 if { (eval echo "$as_me:1730: \"$ac_link\"") >&5
1731   (eval $ac_link) 2>&5
1732   ac_status=$?
1733   echo "$as_me:1733: \$? = $ac_status" >&5
1734   (exit $ac_status); }; then
1735   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1736 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1737 # work properly (i.e., refer to `conftest.exe'), while it won't with
1738 # `rm'.
1739 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1740   case $ac_file in
1741     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1742     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1743           export ac_cv_exeext
1744           break;;
1745     * ) break;;
1746   esac
1747 done
1748 else
1749   { { echo "$as_me:1749: error: cannot compute EXEEXT: cannot compile and link" >&5
1750 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1751    { (exit 1); exit 1; }; }
1752 fi
1753
1754 rm -f conftest$ac_cv_exeext
1755 echo "$as_me:1755: result: $ac_cv_exeext" >&5
1756 echo "${ECHO_T}$ac_cv_exeext" >&6
1757
1758 rm -f conftest.$ac_ext
1759 EXEEXT=$ac_cv_exeext
1760 ac_exeext=$EXEEXT
1761 echo "$as_me:1761: checking for object suffix" >&5
1762 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1763 if test "${ac_cv_objext+set}" = set; then
1764   echo $ECHO_N "(cached) $ECHO_C" >&6
1765 else
1766   cat >conftest.$ac_ext <<_ACEOF
1767 #line 1767 "configure"
1768 #include "confdefs.h"
1769
1770 int
1771 main ()
1772 {
1773
1774   ;
1775   return 0;
1776 }
1777 _ACEOF
1778 rm -f conftest.o conftest.obj
1779 if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780   (eval $ac_compile) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); }; then
1784   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1785   case $ac_file in
1786     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1787     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1788        break;;
1789   esac
1790 done
1791 else
1792   echo "$as_me: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 { { echo "$as_me:1794: error: cannot compute OBJEXT: cannot compile" >&5
1795 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1796    { (exit 1); exit 1; }; }
1797 fi
1798
1799 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1800 fi
1801 echo "$as_me:1801: result: $ac_cv_objext" >&5
1802 echo "${ECHO_T}$ac_cv_objext" >&6
1803 OBJEXT=$ac_cv_objext
1804 ac_objext=$OBJEXT
1805 echo "$as_me:1805: checking whether we are using the GNU C compiler" >&5
1806 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1807 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1808   echo $ECHO_N "(cached) $ECHO_C" >&6
1809 else
1810   cat >conftest.$ac_ext <<_ACEOF
1811 #line 1811 "configure"
1812 #include "confdefs.h"
1813
1814 int
1815 main ()
1816 {
1817 #ifndef __GNUC__
1818        choke me
1819 #endif
1820
1821   ;
1822   return 0;
1823 }
1824 _ACEOF
1825 rm -f conftest.$ac_objext
1826 if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5
1827   (eval $ac_compile) 2>&5
1828   ac_status=$?
1829   echo "$as_me:1829: \$? = $ac_status" >&5
1830   (exit $ac_status); } &&
1831          { ac_try='test -s conftest.$ac_objext'
1832   { (eval echo "$as_me:1832: \"$ac_try\"") >&5
1833   (eval $ac_try) 2>&5
1834   ac_status=$?
1835   echo "$as_me:1835: \$? = $ac_status" >&5
1836   (exit $ac_status); }; }; then
1837   ac_compiler_gnu=yes
1838 else
1839   echo "$as_me: failed program was:" >&5
1840 cat conftest.$ac_ext >&5
1841 ac_compiler_gnu=no
1842 fi
1843 rm -f conftest.$ac_objext conftest.$ac_ext
1844 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1845
1846 fi
1847 echo "$as_me:1847: result: $ac_cv_c_compiler_gnu" >&5
1848 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1849 GCC=`test $ac_compiler_gnu = yes && echo yes`
1850 ac_test_CFLAGS=${CFLAGS+set}
1851 ac_save_CFLAGS=$CFLAGS
1852 CFLAGS="-g"
1853 echo "$as_me:1853: checking whether $CC accepts -g" >&5
1854 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1855 if test "${ac_cv_prog_cc_g+set}" = set; then
1856   echo $ECHO_N "(cached) $ECHO_C" >&6
1857 else
1858   cat >conftest.$ac_ext <<_ACEOF
1859 #line 1859 "configure"
1860 #include "confdefs.h"
1861
1862 int
1863 main ()
1864 {
1865
1866   ;
1867   return 0;
1868 }
1869 _ACEOF
1870 rm -f conftest.$ac_objext
1871 if { (eval echo "$as_me:1871: \"$ac_compile\"") >&5
1872   (eval $ac_compile) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit $ac_status); } &&
1876          { ac_try='test -s conftest.$ac_objext'
1877   { (eval echo "$as_me:1877: \"$ac_try\"") >&5
1878   (eval $ac_try) 2>&5
1879   ac_status=$?
1880   echo "$as_me:1880: \$? = $ac_status" >&5
1881   (exit $ac_status); }; }; then
1882   ac_cv_prog_cc_g=yes
1883 else
1884   echo "$as_me: failed program was:" >&5
1885 cat conftest.$ac_ext >&5
1886 ac_cv_prog_cc_g=no
1887 fi
1888 rm -f conftest.$ac_objext conftest.$ac_ext
1889 fi
1890 echo "$as_me:1890: result: $ac_cv_prog_cc_g" >&5
1891 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1892 if test "$ac_test_CFLAGS" = set; then
1893   CFLAGS=$ac_save_CFLAGS
1894 elif test $ac_cv_prog_cc_g = yes; then
1895   if test "$GCC" = yes; then
1896     CFLAGS="-g -O2"
1897   else
1898     CFLAGS="-g"
1899   fi
1900 else
1901   if test "$GCC" = yes; then
1902     CFLAGS="-O2"
1903   else
1904     CFLAGS=
1905   fi
1906 fi
1907 # Some people use a C++ compiler to compile C.  Since we use `exit',
1908 # in C++ we need to declare it.  In case someone uses the same compiler
1909 # for both compiling C and C++ we need to have the C++ compiler decide
1910 # the declaration of exit, since it's the most demanding environment.
1911 cat >conftest.$ac_ext <<_ACEOF
1912 #ifndef __cplusplus
1913   choke me
1914 #endif
1915 _ACEOF
1916 rm -f conftest.$ac_objext
1917 if { (eval echo "$as_me:1917: \"$ac_compile\"") >&5
1918   (eval $ac_compile) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); } &&
1922          { ac_try='test -s conftest.$ac_objext'
1923   { (eval echo "$as_me:1923: \"$ac_try\"") >&5
1924   (eval $ac_try) 2>&5
1925   ac_status=$?
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit $ac_status); }; }; then
1928   for ac_declaration in \
1929    ''\
1930    '#include <stdlib.h>' \
1931    'extern "C" void std::exit (int) throw (); using std::exit;' \
1932    'extern "C" void std::exit (int); using std::exit;' \
1933    'extern "C" void exit (int) throw ();' \
1934    'extern "C" void exit (int);' \
1935    'void exit (int);'
1936 do
1937   cat >conftest.$ac_ext <<_ACEOF
1938 #line 1938 "configure"
1939 #include "confdefs.h"
1940 #include <stdlib.h>
1941 $ac_declaration
1942 int
1943 main ()
1944 {
1945 exit (42);
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 rm -f conftest.$ac_objext
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952   (eval $ac_compile) 2>&5
1953   ac_status=$?
1954   echo "$as_me:1954: \$? = $ac_status" >&5
1955   (exit $ac_status); } &&
1956          { ac_try='test -s conftest.$ac_objext'
1957   { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1958   (eval $ac_try) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); }; }; then
1962   :
1963 else
1964   echo "$as_me: failed program was:" >&5
1965 cat conftest.$ac_ext >&5
1966 continue
1967 fi
1968 rm -f conftest.$ac_objext conftest.$ac_ext
1969   cat >conftest.$ac_ext <<_ACEOF
1970 #line 1970 "configure"
1971 #include "confdefs.h"
1972 $ac_declaration
1973 int
1974 main ()
1975 {
1976 exit (42);
1977   ;
1978   return 0;
1979 }
1980 _ACEOF
1981 rm -f conftest.$ac_objext
1982 if { (eval echo "$as_me:1982: \"$ac_compile\"") >&5
1983   (eval $ac_compile) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); } &&
1987          { ac_try='test -s conftest.$ac_objext'
1988   { (eval echo "$as_me:1988: \"$ac_try\"") >&5
1989   (eval $ac_try) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); }; }; then
1993   break
1994 else
1995   echo "$as_me: failed program was:" >&5
1996 cat conftest.$ac_ext >&5
1997 fi
1998 rm -f conftest.$ac_objext conftest.$ac_ext
1999 done
2000 rm -f conftest*
2001 if test -n "$ac_declaration"; then
2002   echo '#ifdef __cplusplus' >>confdefs.h
2003   echo $ac_declaration      >>confdefs.h
2004   echo '#endif'             >>confdefs.h
2005 fi
2006
2007 else
2008   echo "$as_me: failed program was:" >&5
2009 cat conftest.$ac_ext >&5
2010 fi
2011 rm -f conftest.$ac_objext conftest.$ac_ext
2012 ac_ext=c
2013 ac_cpp='$CPP $CPPFLAGS'
2014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2017
2018 GCC_VERSION=none
2019 if test "$GCC" = yes ; then
2020         echo "$as_me:2020: checking version of $CC" >&5
2021 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2022         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2023         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2024         echo "$as_me:2024: result: $GCC_VERSION" >&5
2025 echo "${ECHO_T}$GCC_VERSION" >&6
2026 fi
2027
2028 ac_ext=c
2029 ac_cpp='$CPP $CPPFLAGS'
2030 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2031 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2032 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2033 echo "$as_me:2033: checking how to run the C preprocessor" >&5
2034 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2035 # On Suns, sometimes $CPP names a directory.
2036 if test -n "$CPP" && test -d "$CPP"; then
2037   CPP=
2038 fi
2039 if test -z "$CPP"; then
2040   if test "${ac_cv_prog_CPP+set}" = set; then
2041   echo $ECHO_N "(cached) $ECHO_C" >&6
2042 else
2043       # Double quotes because CPP needs to be expanded
2044     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2045     do
2046       ac_preproc_ok=false
2047 for ac_c_preproc_warn_flag in '' yes
2048 do
2049   # Use a header file that comes with gcc, so configuring glibc
2050   # with a fresh cross-compiler works.
2051   # On the NeXT, cc -E runs the code through the compiler's parser,
2052   # not just through cpp. "Syntax error" is here to catch this case.
2053   cat >conftest.$ac_ext <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056 #include <assert.h>
2057                      Syntax error
2058 _ACEOF
2059 if { (eval echo "$as_me:2059: \"$ac_cpp conftest.$ac_ext\"") >&5
2060   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2061   ac_status=$?
2062   egrep -v '^ *\+' conftest.er1 >conftest.err
2063   rm -f conftest.er1
2064   cat conftest.err >&5
2065   echo "$as_me:2065: \$? = $ac_status" >&5
2066   (exit $ac_status); } >/dev/null; then
2067   if test -s conftest.err; then
2068     ac_cpp_err=$ac_c_preproc_warn_flag
2069   else
2070     ac_cpp_err=
2071   fi
2072 else
2073   ac_cpp_err=yes
2074 fi
2075 if test -z "$ac_cpp_err"; then
2076   :
2077 else
2078   echo "$as_me: failed program was:" >&5
2079   cat conftest.$ac_ext >&5
2080   # Broken: fails on valid input.
2081 continue
2082 fi
2083 rm -f conftest.err conftest.$ac_ext
2084
2085   # OK, works on sane cases.  Now check whether non-existent headers
2086   # can be detected and how.
2087   cat >conftest.$ac_ext <<_ACEOF
2088 #line 2088 "configure"
2089 #include "confdefs.h"
2090 #include <ac_nonexistent.h>
2091 _ACEOF
2092 if { (eval echo "$as_me:2092: \"$ac_cpp conftest.$ac_ext\"") >&5
2093   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2094   ac_status=$?
2095   egrep -v '^ *\+' conftest.er1 >conftest.err
2096   rm -f conftest.er1
2097   cat conftest.err >&5
2098   echo "$as_me:2098: \$? = $ac_status" >&5
2099   (exit $ac_status); } >/dev/null; then
2100   if test -s conftest.err; then
2101     ac_cpp_err=$ac_c_preproc_warn_flag
2102   else
2103     ac_cpp_err=
2104   fi
2105 else
2106   ac_cpp_err=yes
2107 fi
2108 if test -z "$ac_cpp_err"; then
2109   # Broken: success on invalid input.
2110 continue
2111 else
2112   echo "$as_me: failed program was:" >&5
2113   cat conftest.$ac_ext >&5
2114   # Passes both tests.
2115 ac_preproc_ok=:
2116 break
2117 fi
2118 rm -f conftest.err conftest.$ac_ext
2119
2120 done
2121 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2122 rm -f conftest.err conftest.$ac_ext
2123 if $ac_preproc_ok; then
2124   break
2125 fi
2126
2127     done
2128     ac_cv_prog_CPP=$CPP
2129
2130 fi
2131   CPP=$ac_cv_prog_CPP
2132 else
2133   ac_cv_prog_CPP=$CPP
2134 fi
2135 echo "$as_me:2135: result: $CPP" >&5
2136 echo "${ECHO_T}$CPP" >&6
2137 ac_preproc_ok=false
2138 for ac_c_preproc_warn_flag in '' yes
2139 do
2140   # Use a header file that comes with gcc, so configuring glibc
2141   # with a fresh cross-compiler works.
2142   # On the NeXT, cc -E runs the code through the compiler's parser,
2143   # not just through cpp. "Syntax error" is here to catch this case.
2144   cat >conftest.$ac_ext <<_ACEOF
2145 #line 2145 "configure"
2146 #include "confdefs.h"
2147 #include <assert.h>
2148                      Syntax error
2149 _ACEOF
2150 if { (eval echo "$as_me:2150: \"$ac_cpp conftest.$ac_ext\"") >&5
2151   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2152   ac_status=$?
2153   egrep -v '^ *\+' conftest.er1 >conftest.err
2154   rm -f conftest.er1
2155   cat conftest.err >&5
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); } >/dev/null; then
2158   if test -s conftest.err; then
2159     ac_cpp_err=$ac_c_preproc_warn_flag
2160   else
2161     ac_cpp_err=
2162   fi
2163 else
2164   ac_cpp_err=yes
2165 fi
2166 if test -z "$ac_cpp_err"; then
2167   :
2168 else
2169   echo "$as_me: failed program was:" >&5
2170   cat conftest.$ac_ext >&5
2171   # Broken: fails on valid input.
2172 continue
2173 fi
2174 rm -f conftest.err conftest.$ac_ext
2175
2176   # OK, works on sane cases.  Now check whether non-existent headers
2177   # can be detected and how.
2178   cat >conftest.$ac_ext <<_ACEOF
2179 #line 2179 "configure"
2180 #include "confdefs.h"
2181 #include <ac_nonexistent.h>
2182 _ACEOF
2183 if { (eval echo "$as_me:2183: \"$ac_cpp conftest.$ac_ext\"") >&5
2184   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2185   ac_status=$?
2186   egrep -v '^ *\+' conftest.er1 >conftest.err
2187   rm -f conftest.er1
2188   cat conftest.err >&5
2189   echo "$as_me:2189: \$? = $ac_status" >&5
2190   (exit $ac_status); } >/dev/null; then
2191   if test -s conftest.err; then
2192     ac_cpp_err=$ac_c_preproc_warn_flag
2193   else
2194     ac_cpp_err=
2195   fi
2196 else
2197   ac_cpp_err=yes
2198 fi
2199 if test -z "$ac_cpp_err"; then
2200   # Broken: success on invalid input.
2201 continue
2202 else
2203   echo "$as_me: failed program was:" >&5
2204   cat conftest.$ac_ext >&5
2205   # Passes both tests.
2206 ac_preproc_ok=:
2207 break
2208 fi
2209 rm -f conftest.err conftest.$ac_ext
2210
2211 done
2212 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2213 rm -f conftest.err conftest.$ac_ext
2214 if $ac_preproc_ok; then
2215   :
2216 else
2217   { { echo "$as_me:2217: error: C preprocessor \"$CPP\" fails sanity check" >&5
2218 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2219    { (exit 1); exit 1; }; }
2220 fi
2221
2222 ac_ext=c
2223 ac_cpp='$CPP $CPPFLAGS'
2224 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2225 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2226 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2227
2228 if test $ac_cv_c_compiler_gnu = yes; then
2229     echo "$as_me:2229: checking whether $CC needs -traditional" >&5
2230 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2231 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2232   echo $ECHO_N "(cached) $ECHO_C" >&6
2233 else
2234     ac_pattern="Autoconf.*'x'"
2235   cat >conftest.$ac_ext <<_ACEOF
2236 #line 2236 "configure"
2237 #include "confdefs.h"
2238 #include <sgtty.h>
2239 int Autoconf = TIOCGETP;
2240 _ACEOF
2241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2242   egrep "$ac_pattern" >/dev/null 2>&1; then
2243   ac_cv_prog_gcc_traditional=yes
2244 else
2245   ac_cv_prog_gcc_traditional=no
2246 fi
2247 rm -f conftest*
2248
2249   if test $ac_cv_prog_gcc_traditional = no; then
2250     cat >conftest.$ac_ext <<_ACEOF
2251 #line 2251 "configure"
2252 #include "confdefs.h"
2253 #include <termio.h>
2254 int Autoconf = TCGETA;
2255 _ACEOF
2256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2257   egrep "$ac_pattern" >/dev/null 2>&1; then
2258   ac_cv_prog_gcc_traditional=yes
2259 fi
2260 rm -f conftest*
2261
2262   fi
2263 fi
2264 echo "$as_me:2264: result: $ac_cv_prog_gcc_traditional" >&5
2265 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2266   if test $ac_cv_prog_gcc_traditional = yes; then
2267     CC="$CC -traditional"
2268   fi
2269 fi
2270
2271 echo "$as_me:2271: checking whether $CC understands -c and -o together" >&5
2272 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2273 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2274   echo $ECHO_N "(cached) $ECHO_C" >&6
2275 else
2276
2277 cat > conftest.$ac_ext <<CF_EOF
2278 #include <stdio.h>
2279 int main()
2280 {
2281         return 0;
2282 }
2283 CF_EOF
2284 # We do the test twice because some compilers refuse to overwrite an
2285 # existing .o file with -o, though they will create one.
2286 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2287 if { (eval echo "$as_me:2287: \"$ac_try\"") >&5
2288   (eval $ac_try) 2>&5
2289   ac_status=$?
2290   echo "$as_me:2290: \$? = $ac_status" >&5
2291   (exit $ac_status); } &&
2292   test -f conftest2.$ac_objext && { (eval echo "$as_me:2292: \"$ac_try\"") >&5
2293   (eval $ac_try) 2>&5
2294   ac_status=$?
2295   echo "$as_me:2295: \$? = $ac_status" >&5
2296   (exit $ac_status); };
2297 then
2298   eval cf_cv_prog_CC_c_o=yes
2299 else
2300   eval cf_cv_prog_CC_c_o=no
2301 fi
2302 rm -f conftest*
2303
2304 fi
2305 if test $cf_cv_prog_CC_c_o = yes; then
2306   echo "$as_me:2306: result: yes" >&5
2307 echo "${ECHO_T}yes" >&6
2308 else
2309   echo "$as_me:2309: result: no" >&5
2310 echo "${ECHO_T}no" >&6
2311 fi
2312
2313 echo "$as_me:2313: checking for POSIXized ISC" >&5
2314 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2315 if test -d /etc/conf/kconfig.d &&
2316    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2317 then
2318   echo "$as_me:2318: result: yes" >&5
2319 echo "${ECHO_T}yes" >&6
2320   ISC=yes # If later tests want to check for ISC.
2321
2322 cat >>confdefs.h <<\EOF
2323 #define _POSIX_SOURCE 1
2324 EOF
2325
2326   if test "$GCC" = yes; then
2327     CC="$CC -posix"
2328   else
2329     CC="$CC -Xp"
2330   fi
2331 else
2332   echo "$as_me:2332: result: no" >&5
2333 echo "${ECHO_T}no" >&6
2334   ISC=
2335 fi
2336
2337 echo "$as_me:2337: checking for ${CC-cc} option to accept ANSI C" >&5
2338 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2339 if test "${cf_cv_ansi_cc+set}" = set; then
2340   echo $ECHO_N "(cached) $ECHO_C" >&6
2341 else
2342
2343 cf_cv_ansi_cc=no
2344 cf_save_CFLAGS="$CFLAGS"
2345 cf_save_CPPFLAGS="$CPPFLAGS"
2346 # Don't try gcc -ansi; that turns off useful extensions and
2347 # breaks some systems' header files.
2348 # AIX                   -qlanglvl=ansi
2349 # Ultrix and OSF/1      -std1
2350 # HP-UX                 -Aa -D_HPUX_SOURCE
2351 # SVR4                  -Xc
2352 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2353 for cf_arg in "-DCC_HAS_PROTOS" \
2354         "" \
2355         -qlanglvl=ansi \
2356         -std1 \
2357         -Ae \
2358         "-Aa -D_HPUX_SOURCE" \
2359         -Xc
2360 do
2361
2362 cf_fix_cppflags=no
2363 cf_new_cflags=
2364 cf_new_cppflags=
2365 cf_new_extra_cppflags=
2366
2367 for cf_add_cflags in $cf_arg
2368 do
2369 case $cf_fix_cppflags in
2370 no)
2371         case $cf_add_cflags in #(vi
2372         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2373                 case $cf_add_cflags in
2374                 -D*)
2375                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2376
2377                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2378                         && test -z "${cf_tst_cflags}" \
2379                         && cf_fix_cppflags=yes
2380
2381                         if test $cf_fix_cppflags = yes ; then
2382                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2383                                 continue
2384                         elif test "${cf_tst_cflags}" = "\"'" ; then
2385                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2386                                 continue
2387                         fi
2388                         ;;
2389                 esac
2390                 case "$CPPFLAGS" in
2391                 *$cf_add_cflags) #(vi
2392                         ;;
2393                 *) #(vi
2394                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2395                         ;;
2396                 esac
2397                 ;;
2398         *)
2399                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2400                 ;;
2401         esac
2402         ;;
2403 yes)
2404         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2405
2406         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2407
2408         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2409         && test -z "${cf_tst_cflags}" \
2410         && cf_fix_cppflags=no
2411         ;;
2412 esac
2413 done
2414
2415 if test -n "$cf_new_cflags" ; then
2416
2417         CFLAGS="$CFLAGS $cf_new_cflags"
2418 fi
2419
2420 if test -n "$cf_new_cppflags" ; then
2421
2422         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2423 fi
2424
2425 if test -n "$cf_new_extra_cppflags" ; then
2426
2427         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2428 fi
2429
2430         cat >conftest.$ac_ext <<_ACEOF
2431 #line 2431 "configure"
2432 #include "confdefs.h"
2433
2434 #ifndef CC_HAS_PROTOS
2435 #if !defined(__STDC__) || (__STDC__ != 1)
2436 choke me
2437 #endif
2438 #endif
2439
2440 int
2441 main ()
2442 {
2443
2444         int test (int i, double x);
2445         struct s1 {int (*f) (int a);};
2446         struct s2 {int (*f) (double a);};
2447   ;
2448   return 0;
2449 }
2450 _ACEOF
2451 rm -f conftest.$ac_objext
2452 if { (eval echo "$as_me:2452: \"$ac_compile\"") >&5
2453   (eval $ac_compile) 2>&5
2454   ac_status=$?
2455   echo "$as_me:2455: \$? = $ac_status" >&5
2456   (exit $ac_status); } &&
2457          { ac_try='test -s conftest.$ac_objext'
2458   { (eval echo "$as_me:2458: \"$ac_try\"") >&5
2459   (eval $ac_try) 2>&5
2460   ac_status=$?
2461   echo "$as_me:2461: \$? = $ac_status" >&5
2462   (exit $ac_status); }; }; then
2463   cf_cv_ansi_cc="$cf_arg"; break
2464 else
2465   echo "$as_me: failed program was:" >&5
2466 cat conftest.$ac_ext >&5
2467 fi
2468 rm -f conftest.$ac_objext conftest.$ac_ext
2469 done
2470 CFLAGS="$cf_save_CFLAGS"
2471 CPPFLAGS="$cf_save_CPPFLAGS"
2472
2473 fi
2474 echo "$as_me:2474: result: $cf_cv_ansi_cc" >&5
2475 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2476
2477 if test "$cf_cv_ansi_cc" != "no"; then
2478 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2479
2480 cf_fix_cppflags=no
2481 cf_new_cflags=
2482 cf_new_cppflags=
2483 cf_new_extra_cppflags=
2484
2485 for cf_add_cflags in $cf_cv_ansi_cc
2486 do
2487 case $cf_fix_cppflags in
2488 no)
2489         case $cf_add_cflags in #(vi
2490         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2491                 case $cf_add_cflags in
2492                 -D*)
2493                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2494
2495                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2496                         && test -z "${cf_tst_cflags}" \
2497                         && cf_fix_cppflags=yes
2498
2499                         if test $cf_fix_cppflags = yes ; then
2500                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2501                                 continue
2502                         elif test "${cf_tst_cflags}" = "\"'" ; then
2503                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2504                                 continue
2505                         fi
2506                         ;;
2507                 esac
2508                 case "$CPPFLAGS" in
2509                 *$cf_add_cflags) #(vi
2510                         ;;
2511                 *) #(vi
2512                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2513                         ;;
2514                 esac
2515                 ;;
2516         *)
2517                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2518                 ;;
2519         esac
2520         ;;
2521 yes)
2522         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2523
2524         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2525
2526         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2527         && test -z "${cf_tst_cflags}" \
2528         && cf_fix_cppflags=no
2529         ;;
2530 esac
2531 done
2532
2533 if test -n "$cf_new_cflags" ; then
2534
2535         CFLAGS="$CFLAGS $cf_new_cflags"
2536 fi
2537
2538 if test -n "$cf_new_cppflags" ; then
2539
2540         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2541 fi
2542
2543 if test -n "$cf_new_extra_cppflags" ; then
2544
2545         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2546 fi
2547
2548 else
2549         cat >>confdefs.h <<\EOF
2550 #define CC_HAS_PROTOS 1
2551 EOF
2552
2553 fi
2554 fi
2555
2556 if test "$cf_cv_ansi_cc" = "no"; then
2557         { { echo "$as_me:2557: error: Your compiler does not appear to recognize prototypes.
2558 You have the following choices:
2559         a. adjust your compiler options
2560         b. get an up-to-date compiler
2561         c. use a wrapper such as unproto" >&5
2562 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2563 You have the following choices:
2564         a. adjust your compiler options
2565         b. get an up-to-date compiler
2566         c. use a wrapper such as unproto" >&2;}
2567    { (exit 1); exit 1; }; }
2568 fi
2569
2570 case $cf_cv_system_name in
2571 os2*)
2572     CFLAGS="$CFLAGS -Zmt"
2573     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2574     CXXFLAGS="$CXXFLAGS -Zmt"
2575     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2576     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2577     ac_cv_exeext=.exe
2578     ;;
2579 esac
2580
2581 PROG_EXT="$EXEEXT"
2582
2583 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2584 #define PROG_EXT "$PROG_EXT"
2585 EOF
2586
2587 if test "$cross_compiling" = yes ; then
2588   LDCONFIG=:
2589 else
2590 case "$cf_cv_system_name" in #(vi
2591 freebsd*) #(vi
2592   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2593   ;;
2594 *) LDPATH=$PATH:/sbin:/usr/sbin
2595   # Extract the first word of "ldconfig", so it can be a program name with args.
2596 set dummy ldconfig; ac_word=$2
2597 echo "$as_me:2597: checking for $ac_word" >&5
2598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2599 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   case $LDCONFIG in
2603   [\\/]* | ?:[\\/]*)
2604   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2605   ;;
2606   *)
2607   ac_save_IFS=$IFS; IFS=$ac_path_separator
2608 ac_dummy="$LDPATH"
2609 for ac_dir in $ac_dummy; do
2610   IFS=$ac_save_IFS
2611   test -z "$ac_dir" && ac_dir=.
2612   if $as_executable_p "$ac_dir/$ac_word"; then
2613    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2614    echo "$as_me:2614: found $ac_dir/$ac_word" >&5
2615    break
2616 fi
2617 done
2618
2619   ;;
2620 esac
2621 fi
2622 LDCONFIG=$ac_cv_path_LDCONFIG
2623
2624 if test -n "$LDCONFIG"; then
2625   echo "$as_me:2625: result: $LDCONFIG" >&5
2626 echo "${ECHO_T}$LDCONFIG" >&6
2627 else
2628   echo "$as_me:2628: result: no" >&5
2629 echo "${ECHO_T}no" >&6
2630 fi
2631
2632   ;;
2633 esac
2634 fi
2635
2636 echo "$as_me:2636: checking if you want to ensure bool is consistent with C++" >&5
2637 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2638
2639 # Check whether --with-cxx or --without-cxx was given.
2640 if test "${with_cxx+set}" = set; then
2641   withval="$with_cxx"
2642   cf_with_cxx=$withval
2643 else
2644   cf_with_cxx=yes
2645 fi;
2646 echo "$as_me:2646: result: $cf_with_cxx" >&5
2647 echo "${ECHO_T}$cf_with_cxx" >&6
2648 if test "X$cf_with_cxx" = Xno ; then
2649         CXX=""
2650         GXX=""
2651 else
2652         # with autoconf 2.13, we can change the error to a warning:
2653                 ac_ext=cc
2654 ac_cpp='$CXXCPP $CPPFLAGS'
2655 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2656 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2657 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2658 if test -n "$ac_tool_prefix"; then
2659   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2660   do
2661     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2662 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2663 echo "$as_me:2663: checking for $ac_word" >&5
2664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2665 if test "${ac_cv_prog_CXX+set}" = set; then
2666   echo $ECHO_N "(cached) $ECHO_C" >&6
2667 else
2668   if test -n "$CXX"; then
2669   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2670 else
2671   ac_save_IFS=$IFS; IFS=$ac_path_separator
2672 ac_dummy="$PATH"
2673 for ac_dir in $ac_dummy; do
2674   IFS=$ac_save_IFS
2675   test -z "$ac_dir" && ac_dir=.
2676   $as_executable_p "$ac_dir/$ac_word" || continue
2677 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2678 echo "$as_me:2678: found $ac_dir/$ac_word" >&5
2679 break
2680 done
2681
2682 fi
2683 fi
2684 CXX=$ac_cv_prog_CXX
2685 if test -n "$CXX"; then
2686   echo "$as_me:2686: result: $CXX" >&5
2687 echo "${ECHO_T}$CXX" >&6
2688 else
2689   echo "$as_me:2689: result: no" >&5
2690 echo "${ECHO_T}no" >&6
2691 fi
2692
2693     test -n "$CXX" && break
2694   done
2695 fi
2696 if test -z "$CXX"; then
2697   ac_ct_CXX=$CXX
2698   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2699 do
2700   # Extract the first word of "$ac_prog", so it can be a program name with args.
2701 set dummy $ac_prog; ac_word=$2
2702 echo "$as_me:2702: checking for $ac_word" >&5
2703 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2704 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2705   echo $ECHO_N "(cached) $ECHO_C" >&6
2706 else
2707   if test -n "$ac_ct_CXX"; then
2708   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2709 else
2710   ac_save_IFS=$IFS; IFS=$ac_path_separator
2711 ac_dummy="$PATH"
2712 for ac_dir in $ac_dummy; do
2713   IFS=$ac_save_IFS
2714   test -z "$ac_dir" && ac_dir=.
2715   $as_executable_p "$ac_dir/$ac_word" || continue
2716 ac_cv_prog_ac_ct_CXX="$ac_prog"
2717 echo "$as_me:2717: found $ac_dir/$ac_word" >&5
2718 break
2719 done
2720
2721 fi
2722 fi
2723 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2724 if test -n "$ac_ct_CXX"; then
2725   echo "$as_me:2725: result: $ac_ct_CXX" >&5
2726 echo "${ECHO_T}$ac_ct_CXX" >&6
2727 else
2728   echo "$as_me:2728: result: no" >&5
2729 echo "${ECHO_T}no" >&6
2730 fi
2731
2732   test -n "$ac_ct_CXX" && break
2733 done
2734 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2735
2736   CXX=$ac_ct_CXX
2737 fi
2738
2739 # Provide some information about the compiler.
2740 echo "$as_me:2740:" \
2741      "checking for C++ compiler version" >&5
2742 ac_compiler=`set X $ac_compile; echo $2`
2743 { (eval echo "$as_me:2743: \"$ac_compiler --version </dev/null >&5\"") >&5
2744   (eval $ac_compiler --version </dev/null >&5) 2>&5
2745   ac_status=$?
2746   echo "$as_me:2746: \$? = $ac_status" >&5
2747   (exit $ac_status); }
2748 { (eval echo "$as_me:2748: \"$ac_compiler -v </dev/null >&5\"") >&5
2749   (eval $ac_compiler -v </dev/null >&5) 2>&5
2750   ac_status=$?
2751   echo "$as_me:2751: \$? = $ac_status" >&5
2752   (exit $ac_status); }
2753 { (eval echo "$as_me:2753: \"$ac_compiler -V </dev/null >&5\"") >&5
2754   (eval $ac_compiler -V </dev/null >&5) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); }
2758
2759 echo "$as_me:2759: checking whether we are using the GNU C++ compiler" >&5
2760 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2761 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2762   echo $ECHO_N "(cached) $ECHO_C" >&6
2763 else
2764   cat >conftest.$ac_ext <<_ACEOF
2765 #line 2765 "configure"
2766 #include "confdefs.h"
2767
2768 int
2769 main ()
2770 {
2771 #ifndef __GNUC__
2772        choke me
2773 #endif
2774
2775   ;
2776   return 0;
2777 }
2778 _ACEOF
2779 rm -f conftest.$ac_objext
2780 if { (eval echo "$as_me:2780: \"$ac_compile\"") >&5
2781   (eval $ac_compile) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); } &&
2785          { ac_try='test -s conftest.$ac_objext'
2786   { (eval echo "$as_me:2786: \"$ac_try\"") >&5
2787   (eval $ac_try) 2>&5
2788   ac_status=$?
2789   echo "$as_me:2789: \$? = $ac_status" >&5
2790   (exit $ac_status); }; }; then
2791   ac_compiler_gnu=yes
2792 else
2793   echo "$as_me: failed program was:" >&5
2794 cat conftest.$ac_ext >&5
2795 ac_compiler_gnu=no
2796 fi
2797 rm -f conftest.$ac_objext conftest.$ac_ext
2798 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2799
2800 fi
2801 echo "$as_me:2801: result: $ac_cv_cxx_compiler_gnu" >&5
2802 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2803 GXX=`test $ac_compiler_gnu = yes && echo yes`
2804 ac_test_CXXFLAGS=${CXXFLAGS+set}
2805 ac_save_CXXFLAGS=$CXXFLAGS
2806 CXXFLAGS="-g"
2807 echo "$as_me:2807: checking whether $CXX accepts -g" >&5
2808 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2809 if test "${ac_cv_prog_cxx_g+set}" = set; then
2810   echo $ECHO_N "(cached) $ECHO_C" >&6
2811 else
2812   cat >conftest.$ac_ext <<_ACEOF
2813 #line 2813 "configure"
2814 #include "confdefs.h"
2815
2816 int
2817 main ()
2818 {
2819
2820   ;
2821   return 0;
2822 }
2823 _ACEOF
2824 rm -f conftest.$ac_objext
2825 if { (eval echo "$as_me:2825: \"$ac_compile\"") >&5
2826   (eval $ac_compile) 2>&5
2827   ac_status=$?
2828   echo "$as_me:2828: \$? = $ac_status" >&5
2829   (exit $ac_status); } &&
2830          { ac_try='test -s conftest.$ac_objext'
2831   { (eval echo "$as_me:2831: \"$ac_try\"") >&5
2832   (eval $ac_try) 2>&5
2833   ac_status=$?
2834   echo "$as_me:2834: \$? = $ac_status" >&5
2835   (exit $ac_status); }; }; then
2836   ac_cv_prog_cxx_g=yes
2837 else
2838   echo "$as_me: failed program was:" >&5
2839 cat conftest.$ac_ext >&5
2840 ac_cv_prog_cxx_g=no
2841 fi
2842 rm -f conftest.$ac_objext conftest.$ac_ext
2843 fi
2844 echo "$as_me:2844: result: $ac_cv_prog_cxx_g" >&5
2845 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2846 if test "$ac_test_CXXFLAGS" = set; then
2847   CXXFLAGS=$ac_save_CXXFLAGS
2848 elif test $ac_cv_prog_cxx_g = yes; then
2849   if test "$GXX" = yes; then
2850     CXXFLAGS="-g -O2"
2851   else
2852     CXXFLAGS="-g"
2853   fi
2854 else
2855   if test "$GXX" = yes; then
2856     CXXFLAGS="-O2"
2857   else
2858     CXXFLAGS=
2859   fi
2860 fi
2861 for ac_declaration in \
2862    ''\
2863    '#include <stdlib.h>' \
2864    'extern "C" void std::exit (int) throw (); using std::exit;' \
2865    'extern "C" void std::exit (int); using std::exit;' \
2866    'extern "C" void exit (int) throw ();' \
2867    'extern "C" void exit (int);' \
2868    'void exit (int);'
2869 do
2870   cat >conftest.$ac_ext <<_ACEOF
2871 #line 2871 "configure"
2872 #include "confdefs.h"
2873 #include <stdlib.h>
2874 $ac_declaration
2875 int
2876 main ()
2877 {
2878 exit (42);
2879   ;
2880   return 0;
2881 }
2882 _ACEOF
2883 rm -f conftest.$ac_objext
2884 if { (eval echo "$as_me:2884: \"$ac_compile\"") >&5
2885   (eval $ac_compile) 2>&5
2886   ac_status=$?
2887   echo "$as_me:2887: \$? = $ac_status" >&5
2888   (exit $ac_status); } &&
2889          { ac_try='test -s conftest.$ac_objext'
2890   { (eval echo "$as_me:2890: \"$ac_try\"") >&5
2891   (eval $ac_try) 2>&5
2892   ac_status=$?
2893   echo "$as_me:2893: \$? = $ac_status" >&5
2894   (exit $ac_status); }; }; then
2895   :
2896 else
2897   echo "$as_me: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2899 continue
2900 fi
2901 rm -f conftest.$ac_objext conftest.$ac_ext
2902   cat >conftest.$ac_ext <<_ACEOF
2903 #line 2903 "configure"
2904 #include "confdefs.h"
2905 $ac_declaration
2906 int
2907 main ()
2908 {
2909 exit (42);
2910   ;
2911   return 0;
2912 }
2913 _ACEOF
2914 rm -f conftest.$ac_objext
2915 if { (eval echo "$as_me:2915: \"$ac_compile\"") >&5
2916   (eval $ac_compile) 2>&5
2917   ac_status=$?
2918   echo "$as_me:2918: \$? = $ac_status" >&5
2919   (exit $ac_status); } &&
2920          { ac_try='test -s conftest.$ac_objext'
2921   { (eval echo "$as_me:2921: \"$ac_try\"") >&5
2922   (eval $ac_try) 2>&5
2923   ac_status=$?
2924   echo "$as_me:2924: \$? = $ac_status" >&5
2925   (exit $ac_status); }; }; then
2926   break
2927 else
2928   echo "$as_me: failed program was:" >&5
2929 cat conftest.$ac_ext >&5
2930 fi
2931 rm -f conftest.$ac_objext conftest.$ac_ext
2932 done
2933 rm -f conftest*
2934 if test -n "$ac_declaration"; then
2935   echo '#ifdef __cplusplus' >>confdefs.h
2936   echo $ac_declaration      >>confdefs.h
2937   echo '#endif'             >>confdefs.h
2938 fi
2939
2940 ac_ext=c
2941 ac_cpp='$CPP $CPPFLAGS'
2942 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2943 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2944 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2945
2946                 # autoconf 2.5x removed the error - by hardcoding it to g++.
2947         if test "$CXX" = "g++" ; then
2948                 # Extract the first word of "g++", so it can be a program name with args.
2949 set dummy g++; ac_word=$2
2950 echo "$as_me:2950: checking for $ac_word" >&5
2951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2952 if test "${ac_cv_path_CXX+set}" = set; then
2953   echo $ECHO_N "(cached) $ECHO_C" >&6
2954 else
2955   case $CXX in
2956   [\\/]* | ?:[\\/]*)
2957   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2958   ;;
2959   *)
2960   ac_save_IFS=$IFS; IFS=$ac_path_separator
2961 ac_dummy="$PATH"
2962 for ac_dir in $ac_dummy; do
2963   IFS=$ac_save_IFS
2964   test -z "$ac_dir" && ac_dir=.
2965   if $as_executable_p "$ac_dir/$ac_word"; then
2966    ac_cv_path_CXX="$ac_dir/$ac_word"
2967    echo "$as_me:2967: found $ac_dir/$ac_word" >&5
2968    break
2969 fi
2970 done
2971
2972   ;;
2973 esac
2974 fi
2975 CXX=$ac_cv_path_CXX
2976
2977 if test -n "$CXX"; then
2978   echo "$as_me:2978: result: $CXX" >&5
2979 echo "${ECHO_T}$CXX" >&6
2980 else
2981   echo "$as_me:2981: result: no" >&5
2982 echo "${ECHO_T}no" >&6
2983 fi
2984
2985         fi
2986         if test "$CXX" = "g++" ; then
2987                 { echo "$as_me:2987: WARNING: ignoring hardcoded g++" >&5
2988 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
2989                 cf_with_cxx=no; CXX=""; GXX="";
2990         fi
2991 fi
2992
2993 GXX_VERSION=none
2994 if test "$GXX" = yes; then
2995         echo "$as_me:2995: checking version of g++" >&5
2996 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
2997         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2998         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2999         echo "$as_me:2999: result: $GXX_VERSION" >&5
3000 echo "${ECHO_T}$GXX_VERSION" >&6
3001 fi
3002
3003 case $GXX_VERSION in
3004 1*|2.[0-6]*)
3005         GXX=""; CXX=""; ac_cv_cxx_compiler_gnu=no
3006         cf_cxx_library=no
3007         { echo "$as_me:3007: WARNING: templates do not work" >&5
3008 echo "$as_me: WARNING: templates do not work" >&2;}
3009         ;;
3010 esac
3011
3012 echo "$as_me:3012: checking if you want to build C++ binding and demo" >&5
3013 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3014
3015 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3016 if test "${with_cxx_binding+set}" = set; then
3017   withval="$with_cxx_binding"
3018   cf_with_cxx_binding=$withval
3019 else
3020   cf_with_cxx_binding=$cf_with_cxx
3021 fi;
3022 echo "$as_me:3022: result: $cf_with_cxx_binding" >&5
3023 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3024
3025 echo "$as_me:3025: checking if you want to build with Ada95" >&5
3026 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3027
3028 # Check whether --with-ada or --without-ada was given.
3029 if test "${with_ada+set}" = set; then
3030   withval="$with_ada"
3031   cf_with_ada=$withval
3032 else
3033   cf_with_ada=yes
3034 fi;
3035 echo "$as_me:3035: result: $cf_with_ada" >&5
3036 echo "${ECHO_T}$cf_with_ada" >&6
3037
3038 echo "$as_me:3038: checking if you want to build programs such as tic" >&5
3039 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3040
3041 # Check whether --with-progs or --without-progs was given.
3042 if test "${with_progs+set}" = set; then
3043   withval="$with_progs"
3044   cf_with_progs=$withval
3045 else
3046   cf_with_progs=yes
3047 fi;
3048 echo "$as_me:3048: result: $cf_with_progs" >&5
3049 echo "${ECHO_T}$cf_with_progs" >&6
3050
3051 echo "$as_me:3051: checking if you wish to install curses.h" >&5
3052 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3053
3054 # Check whether --with-curses-h or --without-curses-h was given.
3055 if test "${with_curses_h+set}" = set; then
3056   withval="$with_curses_h"
3057   with_curses_h=$withval
3058 else
3059   with_curses_h=yes
3060 fi;
3061 echo "$as_me:3061: result: $with_curses_h" >&5
3062 echo "${ECHO_T}$with_curses_h" >&6
3063
3064 modules_to_build="ncurses"
3065 if test "X$cf_with_progs" != Xno ; then
3066 modules_to_build="$modules_to_build progs tack"
3067 fi
3068 modules_to_build="$modules_to_build panel menu form"
3069
3070 test "$program_prefix" != NONE &&
3071   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3072 # Use a double $ so make ignores it.
3073 test "$program_suffix" != NONE &&
3074   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3075 # Double any \ or $.  echo might interpret backslashes.
3076 # By default was `s,x,x', remove it if useless.
3077 cat <<\_ACEOF >conftest.sed
3078 s/[\\$]/&&/g;s/;s,x,x,$//
3079 _ACEOF
3080 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3081 rm conftest.sed
3082
3083 for ac_prog in mawk gawk nawk awk
3084 do
3085   # Extract the first word of "$ac_prog", so it can be a program name with args.
3086 set dummy $ac_prog; ac_word=$2
3087 echo "$as_me:3087: checking for $ac_word" >&5
3088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3089 if test "${ac_cv_prog_AWK+set}" = set; then
3090   echo $ECHO_N "(cached) $ECHO_C" >&6
3091 else
3092   if test -n "$AWK"; then
3093   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3094 else
3095   ac_save_IFS=$IFS; IFS=$ac_path_separator
3096 ac_dummy="$PATH"
3097 for ac_dir in $ac_dummy; do
3098   IFS=$ac_save_IFS
3099   test -z "$ac_dir" && ac_dir=.
3100   $as_executable_p "$ac_dir/$ac_word" || continue
3101 ac_cv_prog_AWK="$ac_prog"
3102 echo "$as_me:3102: found $ac_dir/$ac_word" >&5
3103 break
3104 done
3105
3106 fi
3107 fi
3108 AWK=$ac_cv_prog_AWK
3109 if test -n "$AWK"; then
3110   echo "$as_me:3110: result: $AWK" >&5
3111 echo "${ECHO_T}$AWK" >&6
3112 else
3113   echo "$as_me:3113: result: no" >&5
3114 echo "${ECHO_T}no" >&6
3115 fi
3116
3117   test -n "$AWK" && break
3118 done
3119
3120 echo "$as_me:3120: checking whether ${MAKE-make} sets \${MAKE}" >&5
3121 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3122 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3123 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3124   echo $ECHO_N "(cached) $ECHO_C" >&6
3125 else
3126   cat >conftest.make <<\EOF
3127 all:
3128         @echo 'ac_maketemp="${MAKE}"'
3129 EOF
3130 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3131 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3132 if test -n "$ac_maketemp"; then
3133   eval ac_cv_prog_make_${ac_make}_set=yes
3134 else
3135   eval ac_cv_prog_make_${ac_make}_set=no
3136 fi
3137 rm -f conftest.make
3138 fi
3139 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3140   echo "$as_me:3140: result: yes" >&5
3141 echo "${ECHO_T}yes" >&6
3142   SET_MAKE=
3143 else
3144   echo "$as_me:3144: result: no" >&5
3145 echo "${ECHO_T}no" >&6
3146   SET_MAKE="MAKE=${MAKE-make}"
3147 fi
3148
3149 # Find a good install program.  We prefer a C program (faster),
3150 # so one script is as good as another.  But avoid the broken or
3151 # incompatible versions:
3152 # SysV /etc/install, /usr/sbin/install
3153 # SunOS /usr/etc/install
3154 # IRIX /sbin/install
3155 # AIX /bin/install
3156 # AmigaOS /C/install, which installs bootblocks on floppy discs
3157 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3158 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3159 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3160 # ./install, which can be erroneously created by make from ./install.sh.
3161 echo "$as_me:3161: checking for a BSD compatible install" >&5
3162 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3163 if test -z "$INSTALL"; then
3164 if test "${ac_cv_path_install+set}" = set; then
3165   echo $ECHO_N "(cached) $ECHO_C" >&6
3166 else
3167     ac_save_IFS=$IFS; IFS=$ac_path_separator
3168   for ac_dir in $PATH; do
3169     IFS=$ac_save_IFS
3170     # Account for people who put trailing slashes in PATH elements.
3171     case $ac_dir/ in
3172     / | ./ | .// | /cC/* \
3173     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3174     | /usr/ucb/* ) ;;
3175     *)
3176       # OSF1 and SCO ODT 3.0 have their own names for install.
3177       # Don't use installbsd from OSF since it installs stuff as root
3178       # by default.
3179       for ac_prog in ginstall scoinst install; do
3180         if $as_executable_p "$ac_dir/$ac_prog"; then
3181           if test $ac_prog = install &&
3182             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3183             # AIX install.  It has an incompatible calling convention.
3184             :
3185           elif test $ac_prog = install &&
3186             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3187             # program-specific install script used by HP pwplus--don't use.
3188             :
3189           else
3190             ac_cv_path_install="$ac_dir/$ac_prog -c"
3191             break 2
3192           fi
3193         fi
3194       done
3195       ;;
3196     esac
3197   done
3198
3199 fi
3200   if test "${ac_cv_path_install+set}" = set; then
3201     INSTALL=$ac_cv_path_install
3202   else
3203     # As a last resort, use the slow shell script.  We don't cache a
3204     # path for INSTALL within a source directory, because that will
3205     # break other packages using the cache if that directory is
3206     # removed, or if the path is relative.
3207     INSTALL=$ac_install_sh
3208   fi
3209 fi
3210 echo "$as_me:3210: result: $INSTALL" >&5
3211 echo "${ECHO_T}$INSTALL" >&6
3212
3213 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3214 # It thinks the first close brace ends the variable substitution.
3215 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3216
3217 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3218
3219 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3220
3221 case $INSTALL in
3222 /*)
3223   ;;
3224 *)
3225   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3226   test -z "$cf_dir" && cf_dir=.
3227   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3228   ;;
3229 esac
3230
3231 echo "$as_me:3231: checking for long file names" >&5
3232 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3233 if test "${ac_cv_sys_long_file_names+set}" = set; then
3234   echo $ECHO_N "(cached) $ECHO_C" >&6
3235 else
3236   ac_cv_sys_long_file_names=yes
3237 # Test for long file names in all the places we know might matter:
3238 #      .                the current directory, where building will happen
3239 #      $prefix/lib      where we will be installing things
3240 #      $exec_prefix/lib likewise
3241 # eval it to expand exec_prefix.
3242 #      $TMPDIR          if set, where it might want to write temporary files
3243 # if $TMPDIR is not set:
3244 #      /tmp             where it might want to write temporary files
3245 #      /var/tmp         likewise
3246 #      /usr/tmp         likewise
3247 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3248   ac_tmpdirs=$TMPDIR
3249 else
3250   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3251 fi
3252 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3253   test -d $ac_dir || continue
3254   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3255   ac_xdir=$ac_dir/cf$$
3256   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3257   ac_tf1=$ac_xdir/conftest9012345
3258   ac_tf2=$ac_xdir/conftest9012346
3259   (echo 1 >$ac_tf1) 2>/dev/null
3260   (echo 2 >$ac_tf2) 2>/dev/null
3261   ac_val=`cat $ac_tf1 2>/dev/null`
3262   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3263     ac_cv_sys_long_file_names=no
3264     rm -rf $ac_xdir 2>/dev/null
3265     break
3266   fi
3267   rm -rf $ac_xdir 2>/dev/null
3268 done
3269 fi
3270 echo "$as_me:3270: result: $ac_cv_sys_long_file_names" >&5
3271 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3272 if test $ac_cv_sys_long_file_names = yes; then
3273
3274 cat >>confdefs.h <<\EOF
3275 #define HAVE_LONG_FILE_NAMES 1
3276 EOF
3277
3278 fi
3279
3280 echo "$as_me:3280: checking if filesystem supports mixed-case filenames" >&5
3281 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3282 if test "${cf_cv_mixedcase+set}" = set; then
3283   echo $ECHO_N "(cached) $ECHO_C" >&6
3284 else
3285
3286 if test "$cross_compiling" = yes ; then
3287         case $target_alias in #(vi
3288         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3289                 cf_cv_mixedcase=no
3290                 ;;
3291         *)
3292                 cf_cv_mixedcase=yes
3293                 ;;
3294         esac
3295 else
3296         rm -f conftest CONFTEST
3297         echo test >conftest
3298         if test -f CONFTEST ; then
3299                 cf_cv_mixedcase=no
3300         else
3301                 cf_cv_mixedcase=yes
3302         fi
3303         rm -f conftest CONFTEST
3304 fi
3305
3306 fi
3307 echo "$as_me:3307: result: $cf_cv_mixedcase" >&5
3308 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3309 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3310 #define MIXEDCASE_FILENAMES 1
3311 EOF
3312
3313 echo "$as_me:3313: checking whether ln -s works" >&5
3314 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3315 LN_S=$as_ln_s
3316 if test "$LN_S" = "ln -s"; then
3317   echo "$as_me:3317: result: yes" >&5
3318 echo "${ECHO_T}yes" >&6
3319 else
3320   echo "$as_me:3320: result: no, using $LN_S" >&5
3321 echo "${ECHO_T}no, using $LN_S" >&6
3322 fi
3323
3324 # Extract the first word of "ctags", so it can be a program name with args.
3325 set dummy ctags; ac_word=$2
3326 echo "$as_me:3326: checking for $ac_word" >&5
3327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3328 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3329   echo $ECHO_N "(cached) $ECHO_C" >&6
3330 else
3331   if test -n "$MAKE_LOWER_TAGS"; then
3332   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3333 else
3334   ac_save_IFS=$IFS; IFS=$ac_path_separator
3335 ac_dummy="$PATH"
3336 for ac_dir in $ac_dummy; do
3337   IFS=$ac_save_IFS
3338   test -z "$ac_dir" && ac_dir=.
3339   $as_executable_p "$ac_dir/$ac_word" || continue
3340 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3341 echo "$as_me:3341: found $ac_dir/$ac_word" >&5
3342 break
3343 done
3344
3345   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3346 fi
3347 fi
3348 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3349 if test -n "$MAKE_LOWER_TAGS"; then
3350   echo "$as_me:3350: result: $MAKE_LOWER_TAGS" >&5
3351 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3352 else
3353   echo "$as_me:3353: result: no" >&5
3354 echo "${ECHO_T}no" >&6
3355 fi
3356
3357 if test "$cf_cv_mixedcase" = yes ; then
3358         # Extract the first word of "etags", so it can be a program name with args.
3359 set dummy etags; ac_word=$2
3360 echo "$as_me:3360: checking for $ac_word" >&5
3361 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3362 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3363   echo $ECHO_N "(cached) $ECHO_C" >&6
3364 else
3365   if test -n "$MAKE_UPPER_TAGS"; then
3366   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3367 else
3368   ac_save_IFS=$IFS; IFS=$ac_path_separator
3369 ac_dummy="$PATH"
3370 for ac_dir in $ac_dummy; do
3371   IFS=$ac_save_IFS
3372   test -z "$ac_dir" && ac_dir=.
3373   $as_executable_p "$ac_dir/$ac_word" || continue
3374 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3375 echo "$as_me:3375: found $ac_dir/$ac_word" >&5
3376 break
3377 done
3378
3379   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3380 fi
3381 fi
3382 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3383 if test -n "$MAKE_UPPER_TAGS"; then
3384   echo "$as_me:3384: result: $MAKE_UPPER_TAGS" >&5
3385 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3386 else
3387   echo "$as_me:3387: result: no" >&5
3388 echo "${ECHO_T}no" >&6
3389 fi
3390
3391 else
3392         MAKE_UPPER_TAGS=no
3393 fi
3394
3395 if test "$MAKE_UPPER_TAGS" = yes ; then
3396         MAKE_UPPER_TAGS=
3397 else
3398         MAKE_UPPER_TAGS="#"
3399 fi
3400
3401 if test "$MAKE_LOWER_TAGS" = yes ; then
3402         MAKE_LOWER_TAGS=
3403 else
3404         MAKE_LOWER_TAGS="#"
3405 fi
3406
3407 for ac_prog in tdlint lint alint
3408 do
3409   # Extract the first word of "$ac_prog", so it can be a program name with args.
3410 set dummy $ac_prog; ac_word=$2
3411 echo "$as_me:3411: checking for $ac_word" >&5
3412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3413 if test "${ac_cv_prog_LINT+set}" = set; then
3414   echo $ECHO_N "(cached) $ECHO_C" >&6
3415 else
3416   if test -n "$LINT"; then
3417   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3418 else
3419   ac_save_IFS=$IFS; IFS=$ac_path_separator
3420 ac_dummy="$PATH"
3421 for ac_dir in $ac_dummy; do
3422   IFS=$ac_save_IFS
3423   test -z "$ac_dir" && ac_dir=.
3424   $as_executable_p "$ac_dir/$ac_word" || continue
3425 ac_cv_prog_LINT="$ac_prog"
3426 echo "$as_me:3426: found $ac_dir/$ac_word" >&5
3427 break
3428 done
3429
3430 fi
3431 fi
3432 LINT=$ac_cv_prog_LINT
3433 if test -n "$LINT"; then
3434   echo "$as_me:3434: result: $LINT" >&5
3435 echo "${ECHO_T}$LINT" >&6
3436 else
3437   echo "$as_me:3437: result: no" >&5
3438 echo "${ECHO_T}no" >&6
3439 fi
3440
3441   test -n "$LINT" && break
3442 done
3443
3444 for ac_prog in man man_db
3445 do
3446   # Extract the first word of "$ac_prog", so it can be a program name with args.
3447 set dummy $ac_prog; ac_word=$2
3448 echo "$as_me:3448: checking for $ac_word" >&5
3449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3450 if test "${ac_cv_prog_MAN+set}" = set; then
3451   echo $ECHO_N "(cached) $ECHO_C" >&6
3452 else
3453   if test -n "$MAN"; then
3454   ac_cv_prog_MAN="$MAN" # Let the user override the test.
3455 else
3456   ac_save_IFS=$IFS; IFS=$ac_path_separator
3457 ac_dummy="$PATH"
3458 for ac_dir in $ac_dummy; do
3459   IFS=$ac_save_IFS
3460   test -z "$ac_dir" && ac_dir=.
3461   $as_executable_p "$ac_dir/$ac_word" || continue
3462 ac_cv_prog_MAN="$ac_prog"
3463 echo "$as_me:3463: found $ac_dir/$ac_word" >&5
3464 break
3465 done
3466
3467 fi
3468 fi
3469 MAN=$ac_cv_prog_MAN
3470 if test -n "$MAN"; then
3471   echo "$as_me:3471: result: $MAN" >&5
3472 echo "${ECHO_T}$MAN" >&6
3473 else
3474   echo "$as_me:3474: result: no" >&5
3475 echo "${ECHO_T}no" >&6
3476 fi
3477
3478   test -n "$MAN" && break
3479 done
3480
3481 if test -n "$ac_tool_prefix"; then
3482   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3483 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3484 echo "$as_me:3484: checking for $ac_word" >&5
3485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3486 if test "${ac_cv_prog_RANLIB+set}" = set; then
3487   echo $ECHO_N "(cached) $ECHO_C" >&6
3488 else
3489   if test -n "$RANLIB"; then
3490   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3491 else
3492   ac_save_IFS=$IFS; IFS=$ac_path_separator
3493 ac_dummy="$PATH"
3494 for ac_dir in $ac_dummy; do
3495   IFS=$ac_save_IFS
3496   test -z "$ac_dir" && ac_dir=.
3497   $as_executable_p "$ac_dir/$ac_word" || continue
3498 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3499 echo "$as_me:3499: found $ac_dir/$ac_word" >&5
3500 break
3501 done
3502
3503 fi
3504 fi
3505 RANLIB=$ac_cv_prog_RANLIB
3506 if test -n "$RANLIB"; then
3507   echo "$as_me:3507: result: $RANLIB" >&5
3508 echo "${ECHO_T}$RANLIB" >&6
3509 else
3510   echo "$as_me:3510: result: no" >&5
3511 echo "${ECHO_T}no" >&6
3512 fi
3513
3514 fi
3515 if test -z "$ac_cv_prog_RANLIB"; then
3516   ac_ct_RANLIB=$RANLIB
3517   # Extract the first word of "ranlib", so it can be a program name with args.
3518 set dummy ranlib; ac_word=$2
3519 echo "$as_me:3519: checking for $ac_word" >&5
3520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3521 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3522   echo $ECHO_N "(cached) $ECHO_C" >&6
3523 else
3524   if test -n "$ac_ct_RANLIB"; then
3525   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3526 else
3527   ac_save_IFS=$IFS; IFS=$ac_path_separator
3528 ac_dummy="$PATH"
3529 for ac_dir in $ac_dummy; do
3530   IFS=$ac_save_IFS
3531   test -z "$ac_dir" && ac_dir=.
3532   $as_executable_p "$ac_dir/$ac_word" || continue
3533 ac_cv_prog_ac_ct_RANLIB="ranlib"
3534 echo "$as_me:3534: found $ac_dir/$ac_word" >&5
3535 break
3536 done
3537
3538   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3539 fi
3540 fi
3541 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3542 if test -n "$ac_ct_RANLIB"; then
3543   echo "$as_me:3543: result: $ac_ct_RANLIB" >&5
3544 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3545 else
3546   echo "$as_me:3546: result: no" >&5
3547 echo "${ECHO_T}no" >&6
3548 fi
3549
3550   RANLIB=$ac_ct_RANLIB
3551 else
3552   RANLIB="$ac_cv_prog_RANLIB"
3553 fi
3554
3555 if test -n "$ac_tool_prefix"; then
3556   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3557 set dummy ${ac_tool_prefix}ld; ac_word=$2
3558 echo "$as_me:3558: checking for $ac_word" >&5
3559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3560 if test "${ac_cv_prog_LD+set}" = set; then
3561   echo $ECHO_N "(cached) $ECHO_C" >&6
3562 else
3563   if test -n "$LD"; then
3564   ac_cv_prog_LD="$LD" # Let the user override the test.
3565 else
3566   ac_save_IFS=$IFS; IFS=$ac_path_separator
3567 ac_dummy="$PATH"
3568 for ac_dir in $ac_dummy; do
3569   IFS=$ac_save_IFS
3570   test -z "$ac_dir" && ac_dir=.
3571   $as_executable_p "$ac_dir/$ac_word" || continue
3572 ac_cv_prog_LD="${ac_tool_prefix}ld"
3573 echo "$as_me:3573: found $ac_dir/$ac_word" >&5
3574 break
3575 done
3576
3577 fi
3578 fi
3579 LD=$ac_cv_prog_LD
3580 if test -n "$LD"; then
3581   echo "$as_me:3581: result: $LD" >&5
3582 echo "${ECHO_T}$LD" >&6
3583 else
3584   echo "$as_me:3584: result: no" >&5
3585 echo "${ECHO_T}no" >&6
3586 fi
3587
3588 fi
3589 if test -z "$ac_cv_prog_LD"; then
3590   ac_ct_LD=$LD
3591   # Extract the first word of "ld", so it can be a program name with args.
3592 set dummy ld; ac_word=$2
3593 echo "$as_me:3593: checking for $ac_word" >&5
3594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3595 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3596   echo $ECHO_N "(cached) $ECHO_C" >&6
3597 else
3598   if test -n "$ac_ct_LD"; then
3599   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3600 else
3601   ac_save_IFS=$IFS; IFS=$ac_path_separator
3602 ac_dummy="$PATH"
3603 for ac_dir in $ac_dummy; do
3604   IFS=$ac_save_IFS
3605   test -z "$ac_dir" && ac_dir=.
3606   $as_executable_p "$ac_dir/$ac_word" || continue
3607 ac_cv_prog_ac_ct_LD="ld"
3608 echo "$as_me:3608: found $ac_dir/$ac_word" >&5
3609 break
3610 done
3611
3612   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3613 fi
3614 fi
3615 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3616 if test -n "$ac_ct_LD"; then
3617   echo "$as_me:3617: result: $ac_ct_LD" >&5
3618 echo "${ECHO_T}$ac_ct_LD" >&6
3619 else
3620   echo "$as_me:3620: result: no" >&5
3621 echo "${ECHO_T}no" >&6
3622 fi
3623
3624   LD=$ac_ct_LD
3625 else
3626   LD="$ac_cv_prog_LD"
3627 fi
3628
3629 if test -n "$ac_tool_prefix"; then
3630   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3631 set dummy ${ac_tool_prefix}ar; ac_word=$2
3632 echo "$as_me:3632: checking for $ac_word" >&5
3633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3634 if test "${ac_cv_prog_AR+set}" = set; then
3635   echo $ECHO_N "(cached) $ECHO_C" >&6
3636 else
3637   if test -n "$AR"; then
3638   ac_cv_prog_AR="$AR" # Let the user override the test.
3639 else
3640   ac_save_IFS=$IFS; IFS=$ac_path_separator
3641 ac_dummy="$PATH"
3642 for ac_dir in $ac_dummy; do
3643   IFS=$ac_save_IFS
3644   test -z "$ac_dir" && ac_dir=.
3645   $as_executable_p "$ac_dir/$ac_word" || continue
3646 ac_cv_prog_AR="${ac_tool_prefix}ar"
3647 echo "$as_me:3647: found $ac_dir/$ac_word" >&5
3648 break
3649 done
3650
3651 fi
3652 fi
3653 AR=$ac_cv_prog_AR
3654 if test -n "$AR"; then
3655   echo "$as_me:3655: result: $AR" >&5
3656 echo "${ECHO_T}$AR" >&6
3657 else
3658   echo "$as_me:3658: result: no" >&5
3659 echo "${ECHO_T}no" >&6
3660 fi
3661
3662 fi
3663 if test -z "$ac_cv_prog_AR"; then
3664   ac_ct_AR=$AR
3665   # Extract the first word of "ar", so it can be a program name with args.
3666 set dummy ar; ac_word=$2
3667 echo "$as_me:3667: checking for $ac_word" >&5
3668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3669 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3670   echo $ECHO_N "(cached) $ECHO_C" >&6
3671 else
3672   if test -n "$ac_ct_AR"; then
3673   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3674 else
3675   ac_save_IFS=$IFS; IFS=$ac_path_separator
3676 ac_dummy="$PATH"
3677 for ac_dir in $ac_dummy; do
3678   IFS=$ac_save_IFS
3679   test -z "$ac_dir" && ac_dir=.
3680   $as_executable_p "$ac_dir/$ac_word" || continue
3681 ac_cv_prog_ac_ct_AR="ar"
3682 echo "$as_me:3682: found $ac_dir/$ac_word" >&5
3683 break
3684 done
3685
3686   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3687 fi
3688 fi
3689 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3690 if test -n "$ac_ct_AR"; then
3691   echo "$as_me:3691: result: $ac_ct_AR" >&5
3692 echo "${ECHO_T}$ac_ct_AR" >&6
3693 else
3694   echo "$as_me:3694: result: no" >&5
3695 echo "${ECHO_T}no" >&6
3696 fi
3697
3698   AR=$ac_ct_AR
3699 else
3700   AR="$ac_cv_prog_AR"
3701 fi
3702
3703 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3704   echo $ECHO_N "(cached) $ECHO_C" >&6
3705 else
3706
3707 echo "$as_me:3707: checking for archiver options (symbol AR_OPTS)" >&5
3708 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3709 test -z "$AR_OPTS" && AR_OPTS=rv
3710 echo "$as_me:3710: result: $AR_OPTS" >&5
3711 echo "${ECHO_T}$AR_OPTS" >&6
3712
3713 cf_cv_subst_AR_OPTS=$AR_OPTS
3714 fi
3715
3716 AR_OPTS=${cf_cv_subst_AR_OPTS}
3717
3718 echo "$as_me:3718: checking for makeflags variable" >&5
3719 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3720 if test "${cf_cv_makeflags+set}" = set; then
3721   echo $ECHO_N "(cached) $ECHO_C" >&6
3722 else
3723
3724         cf_cv_makeflags=''
3725         for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
3726         do
3727                 cat >cf_makeflags.tmp <<CF_EOF
3728 SHELL = /bin/sh
3729 all :
3730         @ echo '.$cf_option'
3731 CF_EOF
3732                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
3733                 case "$cf_result" in
3734                 .*k)
3735                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3736                         case "$cf_result" in
3737                         .*CC=*) cf_cv_makeflags=
3738                                 ;;
3739                         *)      cf_cv_makeflags=$cf_option
3740                                 ;;
3741                         esac
3742                         break
3743                         ;;
3744                 *)      echo no match "$cf_result"
3745                         ;;
3746                 esac
3747         done
3748         rm -f cf_makeflags.tmp
3749
3750 fi
3751 echo "$as_me:3751: result: $cf_cv_makeflags" >&5
3752 echo "${ECHO_T}$cf_cv_makeflags" >&6
3753
3754 echo "$as_me:3754: checking if you have specified an install-prefix" >&5
3755 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3756
3757 # Check whether --with-install-prefix or --without-install-prefix was given.
3758 if test "${with_install_prefix+set}" = set; then
3759   withval="$with_install_prefix"
3760   case "$withval" in #(vi
3761         yes|no) #(vi
3762                 ;;
3763         *)      DESTDIR="$withval"
3764                 ;;
3765         esac
3766 fi;
3767 echo "$as_me:3767: result: $DESTDIR" >&5
3768 echo "${ECHO_T}$DESTDIR" >&6
3769
3770 ###############################################################################
3771
3772 # If we're cross-compiling, allow the user to override the tools and their
3773 # options.  The configure script is oriented toward identifying the host
3774 # compiler, etc., but we need a build compiler to generate parts of the source.
3775
3776 if test "$cross_compiling" = yes ; then
3777
3778         # defaults that we might want to override
3779         : ${BUILD_CFLAGS:=''}
3780         : ${BUILD_CPPFLAGS:=''}
3781         : ${BUILD_LDFLAGS:=''}
3782         : ${BUILD_LIBS:=''}
3783         : ${BUILD_EXEEXT:='$x'}
3784         : ${BUILD_OBJEXT:='o'}
3785
3786 # Check whether --with-build-cc or --without-build-cc was given.
3787 if test "${with_build_cc+set}" = set; then
3788   withval="$with_build_cc"
3789   BUILD_CC="$withval"
3790 else
3791   for ac_prog in gcc cc cl
3792 do
3793   # Extract the first word of "$ac_prog", so it can be a program name with args.
3794 set dummy $ac_prog; ac_word=$2
3795 echo "$as_me:3795: checking for $ac_word" >&5
3796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3798   echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800   if test -n "$BUILD_CC"; then
3801   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3802 else
3803   ac_save_IFS=$IFS; IFS=$ac_path_separator
3804 ac_dummy="$PATH"
3805 for ac_dir in $ac_dummy; do
3806   IFS=$ac_save_IFS
3807   test -z "$ac_dir" && ac_dir=.
3808   $as_executable_p "$ac_dir/$ac_word" || continue
3809 ac_cv_prog_BUILD_CC="$ac_prog"
3810 echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811 break
3812 done
3813
3814 fi
3815 fi
3816 BUILD_CC=$ac_cv_prog_BUILD_CC
3817 if test -n "$BUILD_CC"; then
3818   echo "$as_me:3818: result: $BUILD_CC" >&5
3819 echo "${ECHO_T}$BUILD_CC" >&6
3820 else
3821   echo "$as_me:3821: result: no" >&5
3822 echo "${ECHO_T}no" >&6
3823 fi
3824
3825   test -n "$BUILD_CC" && break
3826 done
3827
3828 fi;
3829         echo "$as_me:3829: checking for native build C compiler" >&5
3830 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3831         echo "$as_me:3831: result: $BUILD_CC" >&5
3832 echo "${ECHO_T}$BUILD_CC" >&6
3833
3834         echo "$as_me:3834: checking for native build C preprocessor" >&5
3835 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3836
3837 # Check whether --with-build-cpp or --without-build-cpp was given.
3838 if test "${with_build_cpp+set}" = set; then
3839   withval="$with_build_cpp"
3840   BUILD_CPP="$withval"
3841 else
3842   BUILD_CPP='$(BUILD_CC) -E'
3843 fi;
3844         echo "$as_me:3844: result: $BUILD_CPP" >&5
3845 echo "${ECHO_T}$BUILD_CPP" >&6
3846
3847         echo "$as_me:3847: checking for native build C flags" >&5
3848 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3849
3850 # Check whether --with-build-cflags or --without-build-cflags was given.
3851 if test "${with_build_cflags+set}" = set; then
3852   withval="$with_build_cflags"
3853   BUILD_CFLAGS="$withval"
3854 fi;
3855         echo "$as_me:3855: result: $BUILD_CFLAGS" >&5
3856 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3857
3858         echo "$as_me:3858: checking for native build C preprocessor-flags" >&5
3859 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3860
3861 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3862 if test "${with_build_cppflags+set}" = set; then
3863   withval="$with_build_cppflags"
3864   BUILD_CPPFLAGS="$withval"
3865 fi;
3866         echo "$as_me:3866: result: $BUILD_CPPFLAGS" >&5
3867 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3868
3869         echo "$as_me:3869: checking for native build linker-flags" >&5
3870 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3871
3872 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3873 if test "${with_build_ldflags+set}" = set; then
3874   withval="$with_build_ldflags"
3875   BUILD_LDFLAGS="$withval"
3876 fi;
3877         echo "$as_me:3877: result: $BUILD_LDFLAGS" >&5
3878 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3879
3880         echo "$as_me:3880: checking for native build linker-libraries" >&5
3881 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3882
3883 # Check whether --with-build-libs or --without-build-libs was given.
3884 if test "${with_build_libs+set}" = set; then
3885   withval="$with_build_libs"
3886   BUILD_LIBS="$withval"
3887 fi;
3888         echo "$as_me:3888: result: $BUILD_LIBS" >&5
3889 echo "${ECHO_T}$BUILD_LIBS" >&6
3890
3891         # this assumes we're on Unix.
3892         BUILD_EXEEXT=
3893         BUILD_OBJEXT=o
3894
3895         : ${BUILD_CC:='$(CC)'}
3896
3897         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '$(CC)' ) ; then
3898                 { { echo "$as_me:3898: error: Cross-build requires two compilers.
3899 Use --with-build-cc to specify the native compiler." >&5
3900 echo "$as_me: error: Cross-build requires two compilers.
3901 Use --with-build-cc to specify the native compiler." >&2;}
3902    { (exit 1); exit 1; }; }
3903         fi
3904
3905 else
3906         : ${BUILD_CC:='$(CC)'}
3907         : ${BUILD_CPP:='$(CPP)'}
3908         : ${BUILD_CFLAGS:='$(CFLAGS)'}
3909         : ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}
3910         : ${BUILD_LDFLAGS:='$(LDFLAGS)'}
3911         : ${BUILD_LIBS:='$(LIBS)'}
3912         : ${BUILD_EXEEXT:='$x'}
3913         : ${BUILD_OBJEXT:='o'}
3914 fi
3915
3916 ###############################################################################
3917
3918 ### Options to allow the user to specify the set of libraries which are used.
3919 ### Use "--without-normal --with-shared" to allow the default model to be
3920 ### shared, for example.
3921 cf_list_models=""
3922
3923 LIBTOOL=
3924
3925 # common library maintenance symbols that are convenient for libtool scripts:
3926 LIB_CREATE='$(AR) -cr'
3927 LIB_OBJECT='$(OBJECTS)'
3928 LIB_SUFFIX=.a
3929 LIB_PREP="$RANLIB"
3930
3931 # symbols used to prop libtool up to enable it to determine what it should be
3932 # doing:
3933 LIB_CLEAN=
3934 LIB_COMPILE=
3935 LIB_LINK=
3936 LIB_INSTALL=
3937 LIB_UNINSTALL=
3938
3939 echo "$as_me:3939: checking if you want to build libraries with libtool" >&5
3940 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
3941
3942 # Check whether --with-libtool or --without-libtool was given.
3943 if test "${with_libtool+set}" = set; then
3944   withval="$with_libtool"
3945   with_libtool=$withval
3946 else
3947   with_libtool=no
3948 fi;
3949 echo "$as_me:3949: result: $with_libtool" >&5
3950 echo "${ECHO_T}$with_libtool" >&6
3951 if test "$with_libtool" != "no"; then
3952
3953         if test "$with_libtool" != "yes" ; then
3954
3955 case ".$with_libtool" in #(vi
3956 .\$\(*\)*|.\'*\'*) #(vi
3957   ;;
3958 ..|./*|.\\*) #(vi
3959   ;;
3960 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3961   ;;
3962 .\${*prefix}*) #(vi
3963   eval with_libtool="$with_libtool"
3964   case ".$with_libtool" in #(vi
3965   .NONE/*)
3966     with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
3967     ;;
3968   esac
3969   ;; #(vi
3970 .NONE/*)
3971   with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
3972   ;;
3973 *)
3974   { { echo "$as_me:3974: error: expected a pathname, not \"$with_libtool\"" >&5
3975 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
3976    { (exit 1); exit 1; }; }
3977   ;;
3978 esac
3979
3980                 LIBTOOL=$with_libtool
3981         else
3982                 # Extract the first word of "libtool", so it can be a program name with args.
3983 set dummy libtool; ac_word=$2
3984 echo "$as_me:3984: checking for $ac_word" >&5
3985 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3986 if test "${ac_cv_path_LIBTOOL+set}" = set; then
3987   echo $ECHO_N "(cached) $ECHO_C" >&6
3988 else
3989   case $LIBTOOL in
3990   [\\/]* | ?:[\\/]*)
3991   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
3992   ;;
3993   *)
3994   ac_save_IFS=$IFS; IFS=$ac_path_separator
3995 ac_dummy="$PATH"
3996 for ac_dir in $ac_dummy; do
3997   IFS=$ac_save_IFS
3998   test -z "$ac_dir" && ac_dir=.
3999   if $as_executable_p "$ac_dir/$ac_word"; then
4000    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4001    echo "$as_me:4001: found $ac_dir/$ac_word" >&5
4002    break
4003 fi
4004 done
4005
4006   ;;
4007 esac
4008 fi
4009 LIBTOOL=$ac_cv_path_LIBTOOL
4010
4011 if test -n "$LIBTOOL"; then
4012   echo "$as_me:4012: result: $LIBTOOL" >&5
4013 echo "${ECHO_T}$LIBTOOL" >&6
4014 else
4015   echo "$as_me:4015: result: no" >&5
4016 echo "${ECHO_T}no" >&6
4017 fi
4018
4019         fi
4020         if test -z "$LIBTOOL" ; then
4021                 { { echo "$as_me:4021: error: Cannot find libtool" >&5
4022 echo "$as_me: error: Cannot find libtool" >&2;}
4023    { (exit 1); exit 1; }; }
4024         fi
4025         LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o'
4026         LIB_OBJECT='$(OBJECTS:.o=.lo)'
4027         LIB_SUFFIX=.la
4028         LIB_CLEAN='$(LIBTOOL) --mode=clean'
4029         LIB_COMPILE='$(LIBTOOL) --mode=compile'
4030         LIB_LINK='$(LIBTOOL) --mode=link'
4031         LIB_INSTALL='$(LIBTOOL) --mode=install'
4032         LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall'
4033         LIB_PREP=:
4034
4035         # Show the version of libtool
4036         echo "$as_me:4036: checking version of libtool" >&5
4037 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4038
4039         # Save the version in a cache variable - this is not entirely a good
4040         # thing, but the version string from libtool is very ugly, and for
4041         # bug reports it might be useful to have the original string.
4042         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4043         echo "$as_me:4043: result: $cf_cv_libtool_version" >&5
4044 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4045         if test -z "$cf_cv_libtool_version" ; then
4046                 { { echo "$as_me:4046: error: This is not libtool" >&5
4047 echo "$as_me: error: This is not libtool" >&2;}
4048    { (exit 1); exit 1; }; }
4049         fi
4050
4051         # special hack to add --tag option for C++ compiler
4052         case $cf_cv_libtool_version in
4053         1.[5-9]*|[2-9]*)
4054                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4055                 ;;
4056         *)
4057                 LIBTOOL_CXX="$LIBTOOL"
4058                 ;;
4059         esac
4060 else
4061         LIBTOOL=""
4062         LIBTOOL_CXX=""
4063 fi
4064
4065 test -z "$LIBTOOL" && ECHO_LT=
4066
4067 if test "$with_libtool" != "no" ; then
4068
4069 cf_list_models="$cf_list_models libtool"
4070
4071 else
4072
4073 echo "$as_me:4073: checking if you want to build shared libraries" >&5
4074 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4075
4076 # Check whether --with-shared or --without-shared was given.
4077 if test "${with_shared+set}" = set; then
4078   withval="$with_shared"
4079   with_shared=$withval
4080 else
4081   with_shared=no
4082 fi;
4083 echo "$as_me:4083: result: $with_shared" >&5
4084 echo "${ECHO_T}$with_shared" >&6
4085 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4086
4087 echo "$as_me:4087: checking if you want to build static libraries" >&5
4088 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4089
4090 # Check whether --with-normal or --without-normal was given.
4091 if test "${with_normal+set}" = set; then
4092   withval="$with_normal"
4093   with_normal=$withval
4094 else
4095   with_normal=yes
4096 fi;
4097 echo "$as_me:4097: result: $with_normal" >&5
4098 echo "${ECHO_T}$with_normal" >&6
4099 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4100
4101 echo "$as_me:4101: checking if you want to build debug libraries" >&5
4102 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4103
4104 # Check whether --with-debug or --without-debug was given.
4105 if test "${with_debug+set}" = set; then
4106   withval="$with_debug"
4107   with_debug=$withval
4108 else
4109   with_debug=yes
4110 fi;
4111 echo "$as_me:4111: result: $with_debug" >&5
4112 echo "${ECHO_T}$with_debug" >&6
4113 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4114
4115 echo "$as_me:4115: checking if you want to build profiling libraries" >&5
4116 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4117
4118 # Check whether --with-profile or --without-profile was given.
4119 if test "${with_profile+set}" = set; then
4120   withval="$with_profile"
4121   with_profile=$withval
4122 else
4123   with_profile=no
4124 fi;
4125 echo "$as_me:4125: result: $with_profile" >&5
4126 echo "${ECHO_T}$with_profile" >&6
4127 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4128
4129 fi
4130
4131 ###############################################################################
4132
4133 echo "$as_me:4133: checking for specified models" >&5
4134 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4135 test -z "$cf_list_models" && cf_list_models=normal
4136 test "$with_libtool" != "no" && cf_list_models=libtool
4137 echo "$as_me:4137: result: $cf_list_models" >&5
4138 echo "${ECHO_T}$cf_list_models" >&6
4139
4140 ### Use the first model as the default, and save its suffix for use in building
4141 ### up test-applications.
4142 echo "$as_me:4142: checking for default model" >&5
4143 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4144 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4145 echo "$as_me:4145: result: $DFT_LWR_MODEL" >&5
4146 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4147
4148 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4149
4150 TINFO_NAME=tinfo
4151
4152 LIB_NAME=ncurses
4153
4154 LIB_DIR=../lib
4155 LIB_2ND=../../lib
4156
4157         case $cf_cv_system_name in
4158         OS/2*)  LIB_PREFIX=''     ;;
4159         os2*)   LIB_PREFIX=''     ;;
4160         *)      LIB_PREFIX='lib'  ;;
4161         esac
4162 cf_prefix=$LIB_PREFIX
4163
4164 LIB_PREFIX=$cf_prefix
4165
4166 LIB_SUFFIX=
4167
4168 ###############################################################################
4169
4170 echo "$as_me:4170: checking if you want to build a separate terminfo library" >&5
4171 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4172
4173 # Check whether --with-termlib or --without-termlib was given.
4174 if test "${with_termlib+set}" = set; then
4175   withval="$with_termlib"
4176   with_termlib=$withval
4177 else
4178   with_termlib=no
4179 fi;
4180 echo "$as_me:4180: result: $with_termlib" >&5
4181 echo "${ECHO_T}$with_termlib" >&6
4182
4183 ### Checks for special libraries, must be done up-front.
4184
4185 echo "$as_me:4185: checking if you want to link with dbmalloc for testing" >&5
4186 echo $ECHO_N "checking if you want to link with dbmalloc for testing... $ECHO_C" >&6
4187
4188 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4189 if test "${with_dbmalloc+set}" = set; then
4190   withval="$with_dbmalloc"
4191   with_dbmalloc=$withval
4192 else
4193   with_dbmalloc=no
4194 fi;
4195 echo "$as_me:4195: result: $with_dbmalloc" >&5
4196 echo "${ECHO_T}$with_dbmalloc" >&6
4197 if test "$with_dbmalloc" = yes ; then
4198         echo "$as_me:4198: checking for dbmalloc.h" >&5
4199 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4200 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4201   echo $ECHO_N "(cached) $ECHO_C" >&6
4202 else
4203   cat >conftest.$ac_ext <<_ACEOF
4204 #line 4204 "configure"
4205 #include "confdefs.h"
4206 #include <dbmalloc.h>
4207 _ACEOF
4208 if { (eval echo "$as_me:4208: \"$ac_cpp conftest.$ac_ext\"") >&5
4209   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4210   ac_status=$?
4211   egrep -v '^ *\+' conftest.er1 >conftest.err
4212   rm -f conftest.er1
4213   cat conftest.err >&5
4214   echo "$as_me:4214: \$? = $ac_status" >&5
4215   (exit $ac_status); } >/dev/null; then
4216   if test -s conftest.err; then
4217     ac_cpp_err=$ac_c_preproc_warn_flag
4218   else
4219     ac_cpp_err=
4220   fi
4221 else
4222   ac_cpp_err=yes
4223 fi
4224 if test -z "$ac_cpp_err"; then
4225   ac_cv_header_dbmalloc_h=yes
4226 else
4227   echo "$as_me: failed program was:" >&5
4228   cat conftest.$ac_ext >&5
4229   ac_cv_header_dbmalloc_h=no
4230 fi
4231 rm -f conftest.err conftest.$ac_ext
4232 fi
4233 echo "$as_me:4233: result: $ac_cv_header_dbmalloc_h" >&5
4234 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
4235 if test $ac_cv_header_dbmalloc_h = yes; then
4236
4237 echo "$as_me:4237: checking for debug_malloc in -ldbmalloc" >&5
4238 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4239 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4240   echo $ECHO_N "(cached) $ECHO_C" >&6
4241 else
4242   ac_check_lib_save_LIBS=$LIBS
4243 LIBS="-ldbmalloc  $LIBS"
4244 cat >conftest.$ac_ext <<_ACEOF
4245 #line 4245 "configure"
4246 #include "confdefs.h"
4247
4248 /* Override any gcc2 internal prototype to avoid an error.  */
4249 #ifdef __cplusplus
4250 extern "C"
4251 #endif
4252 /* We use char because int might match the return type of a gcc2
4253    builtin and then its argument prototype would still apply.  */
4254 char debug_malloc ();
4255 int
4256 main ()
4257 {
4258 debug_malloc ();
4259   ;
4260   return 0;
4261 }
4262 _ACEOF
4263 rm -f conftest.$ac_objext conftest$ac_exeext
4264 if { (eval echo "$as_me:4264: \"$ac_link\"") >&5
4265   (eval $ac_link) 2>&5
4266   ac_status=$?
4267   echo "$as_me:4267: \$? = $ac_status" >&5
4268   (exit $ac_status); } &&
4269          { ac_try='test -s conftest$ac_exeext'
4270   { (eval echo "$as_me:4270: \"$ac_try\"") >&5
4271   (eval $ac_try) 2>&5
4272   ac_status=$?
4273   echo "$as_me:4273: \$? = $ac_status" >&5
4274   (exit $ac_status); }; }; then
4275   ac_cv_lib_dbmalloc_debug_malloc=yes
4276 else
4277   echo "$as_me: failed program was:" >&5
4278 cat conftest.$ac_ext >&5
4279 ac_cv_lib_dbmalloc_debug_malloc=no
4280 fi
4281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4282 LIBS=$ac_check_lib_save_LIBS
4283 fi
4284 echo "$as_me:4284: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4285 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4286 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4287   cat >>confdefs.h <<EOF
4288 #define HAVE_LIBDBMALLOC 1
4289 EOF
4290
4291   LIBS="-ldbmalloc $LIBS"
4292
4293 fi
4294
4295 fi
4296
4297 fi
4298
4299 echo "$as_me:4299: checking if you want to link with dmalloc for testing" >&5
4300 echo $ECHO_N "checking if you want to link with dmalloc for testing... $ECHO_C" >&6
4301
4302 # Check whether --with-dmalloc or --without-dmalloc was given.
4303 if test "${with_dmalloc+set}" = set; then
4304   withval="$with_dmalloc"
4305   with_dmalloc=$withval
4306 else
4307   with_dmalloc=no
4308 fi;
4309 echo "$as_me:4309: result: $with_dmalloc" >&5
4310 echo "${ECHO_T}$with_dmalloc" >&6
4311 if test "$with_dmalloc" = yes ; then
4312         echo "$as_me:4312: checking for dmalloc.h" >&5
4313 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4314 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4315   echo $ECHO_N "(cached) $ECHO_C" >&6
4316 else
4317   cat >conftest.$ac_ext <<_ACEOF
4318 #line 4318 "configure"
4319 #include "confdefs.h"
4320 #include <dmalloc.h>
4321 _ACEOF
4322 if { (eval echo "$as_me:4322: \"$ac_cpp conftest.$ac_ext\"") >&5
4323   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4324   ac_status=$?
4325   egrep -v '^ *\+' conftest.er1 >conftest.err
4326   rm -f conftest.er1
4327   cat conftest.err >&5
4328   echo "$as_me:4328: \$? = $ac_status" >&5
4329   (exit $ac_status); } >/dev/null; then
4330   if test -s conftest.err; then
4331     ac_cpp_err=$ac_c_preproc_warn_flag
4332   else
4333     ac_cpp_err=
4334   fi
4335 else
4336   ac_cpp_err=yes
4337 fi
4338 if test -z "$ac_cpp_err"; then
4339   ac_cv_header_dmalloc_h=yes
4340 else
4341   echo "$as_me: failed program was:" >&5
4342   cat conftest.$ac_ext >&5
4343   ac_cv_header_dmalloc_h=no
4344 fi
4345 rm -f conftest.err conftest.$ac_ext
4346 fi
4347 echo "$as_me:4347: result: $ac_cv_header_dmalloc_h" >&5
4348 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4349 if test $ac_cv_header_dmalloc_h = yes; then
4350
4351 echo "$as_me:4351: checking for dmalloc_debug in -ldmalloc" >&5
4352 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4353 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4354   echo $ECHO_N "(cached) $ECHO_C" >&6
4355 else
4356   ac_check_lib_save_LIBS=$LIBS
4357 LIBS="-ldmalloc  $LIBS"
4358 cat >conftest.$ac_ext <<_ACEOF
4359 #line 4359 "configure"
4360 #include "confdefs.h"
4361
4362 /* Override any gcc2 internal prototype to avoid an error.  */
4363 #ifdef __cplusplus
4364 extern "C"
4365 #endif
4366 /* We use char because int might match the return type of a gcc2
4367    builtin and then its argument prototype would still apply.  */
4368 char dmalloc_debug ();
4369 int
4370 main ()
4371 {
4372 dmalloc_debug ();
4373   ;
4374   return 0;
4375 }
4376 _ACEOF
4377 rm -f conftest.$ac_objext conftest$ac_exeext
4378 if { (eval echo "$as_me:4378: \"$ac_link\"") >&5
4379   (eval $ac_link) 2>&5
4380   ac_status=$?
4381   echo "$as_me:4381: \$? = $ac_status" >&5
4382   (exit $ac_status); } &&
4383          { ac_try='test -s conftest$ac_exeext'
4384   { (eval echo "$as_me:4384: \"$ac_try\"") >&5
4385   (eval $ac_try) 2>&5
4386   ac_status=$?
4387   echo "$as_me:4387: \$? = $ac_status" >&5
4388   (exit $ac_status); }; }; then
4389   ac_cv_lib_dmalloc_dmalloc_debug=yes
4390 else
4391   echo "$as_me: failed program was:" >&5
4392 cat conftest.$ac_ext >&5
4393 ac_cv_lib_dmalloc_dmalloc_debug=no
4394 fi
4395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4396 LIBS=$ac_check_lib_save_LIBS
4397 fi
4398 echo "$as_me:4398: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4399 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4400 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4401   cat >>confdefs.h <<EOF
4402 #define HAVE_LIBDMALLOC 1
4403 EOF
4404
4405   LIBS="-ldmalloc $LIBS"
4406
4407 fi
4408
4409 fi
4410
4411 fi
4412
4413 SHLIB_LIST=""
4414
4415 echo "$as_me:4415: checking if you want to link with the GPM mouse library" >&5
4416 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4417
4418 # Check whether --with-gpm or --without-gpm was given.
4419 if test "${with_gpm+set}" = set; then
4420   withval="$with_gpm"
4421   with_gpm=$withval
4422 else
4423   with_gpm=maybe
4424 fi;
4425 echo "$as_me:4425: result: $with_gpm" >&5
4426 echo "${ECHO_T}$with_gpm" >&6
4427 if test "$with_gpm" != no ; then
4428         echo "$as_me:4428: checking for Gpm_Open in -lgpm" >&5
4429 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4430 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4431   echo $ECHO_N "(cached) $ECHO_C" >&6
4432 else
4433   ac_check_lib_save_LIBS=$LIBS
4434 LIBS="-lgpm  $LIBS"
4435 cat >conftest.$ac_ext <<_ACEOF
4436 #line 4436 "configure"
4437 #include "confdefs.h"
4438
4439 /* Override any gcc2 internal prototype to avoid an error.  */
4440 #ifdef __cplusplus
4441 extern "C"
4442 #endif
4443 /* We use char because int might match the return type of a gcc2
4444    builtin and then its argument prototype would still apply.  */
4445 char Gpm_Open ();
4446 int
4447 main ()
4448 {
4449 Gpm_Open ();
4450   ;
4451   return 0;
4452 }
4453 _ACEOF
4454 rm -f conftest.$ac_objext conftest$ac_exeext
4455 if { (eval echo "$as_me:4455: \"$ac_link\"") >&5
4456   (eval $ac_link) 2>&5
4457   ac_status=$?
4458   echo "$as_me:4458: \$? = $ac_status" >&5
4459   (exit $ac_status); } &&
4460          { ac_try='test -s conftest$ac_exeext'
4461   { (eval echo "$as_me:4461: \"$ac_try\"") >&5
4462   (eval $ac_try) 2>&5
4463   ac_status=$?
4464   echo "$as_me:4464: \$? = $ac_status" >&5
4465   (exit $ac_status); }; }; then
4466   ac_cv_lib_gpm_Gpm_Open=yes
4467 else
4468   echo "$as_me: failed program was:" >&5
4469 cat conftest.$ac_ext >&5
4470 ac_cv_lib_gpm_Gpm_Open=no
4471 fi
4472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4473 LIBS=$ac_check_lib_save_LIBS
4474 fi
4475 echo "$as_me:4475: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4476 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4477 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4478
4479                 echo "$as_me:4479: checking for gpm.h" >&5
4480 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4481 if test "${ac_cv_header_gpm_h+set}" = set; then
4482   echo $ECHO_N "(cached) $ECHO_C" >&6
4483 else
4484   cat >conftest.$ac_ext <<_ACEOF
4485 #line 4485 "configure"
4486 #include "confdefs.h"
4487 #include <gpm.h>
4488 _ACEOF
4489 if { (eval echo "$as_me:4489: \"$ac_cpp conftest.$ac_ext\"") >&5
4490   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4491   ac_status=$?
4492   egrep -v '^ *\+' conftest.er1 >conftest.err
4493   rm -f conftest.er1
4494   cat conftest.err >&5
4495   echo "$as_me:4495: \$? = $ac_status" >&5
4496   (exit $ac_status); } >/dev/null; then
4497   if test -s conftest.err; then
4498     ac_cpp_err=$ac_c_preproc_warn_flag
4499   else
4500     ac_cpp_err=
4501   fi
4502 else
4503   ac_cpp_err=yes
4504 fi
4505 if test -z "$ac_cpp_err"; then
4506   ac_cv_header_gpm_h=yes
4507 else
4508   echo "$as_me: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   ac_cv_header_gpm_h=no
4511 fi
4512 rm -f conftest.err conftest.$ac_ext
4513 fi
4514 echo "$as_me:4514: result: $ac_cv_header_gpm_h" >&5
4515 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4516 if test $ac_cv_header_gpm_h = yes; then
4517
4518                         cat >>confdefs.h <<\EOF
4519 #define HAVE_GPM_H 1
4520 EOF
4521
4522                         with_gpm=yes
4523
4524 else
4525
4526                         if test "$with_gpm" = yes ; then
4527                                 { { echo "$as_me:4527: error: Cannot find GPM header" >&5
4528 echo "$as_me: error: Cannot find GPM header" >&2;}
4529    { (exit 1); exit 1; }; }
4530                         fi
4531
4532 fi
4533
4534 else
4535
4536                 if test "$with_gpm" = yes ; then
4537                         { { echo "$as_me:4537: error: Cannot link with GPM library" >&5
4538 echo "$as_me: error: Cannot link with GPM library" >&2;}
4539    { (exit 1); exit 1; }; }
4540                 fi
4541                 with_gpm=no
4542
4543 fi
4544
4545 fi
4546
4547 if test "$with_gpm" = yes ; then
4548
4549 cf_have_dlsym=no
4550 echo "$as_me:4550: checking for dlsym" >&5
4551 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4552 if test "${ac_cv_func_dlsym+set}" = set; then
4553   echo $ECHO_N "(cached) $ECHO_C" >&6
4554 else
4555   cat >conftest.$ac_ext <<_ACEOF
4556 #line 4556 "configure"
4557 #include "confdefs.h"
4558 /* System header to define __stub macros and hopefully few prototypes,
4559     which can conflict with char dlsym (); below.  */
4560 #include <assert.h>
4561 /* Override any gcc2 internal prototype to avoid an error.  */
4562 #ifdef __cplusplus
4563 extern "C"
4564 #endif
4565 /* We use char because int might match the return type of a gcc2
4566    builtin and then its argument prototype would still apply.  */
4567 char dlsym ();
4568 char (*f) ();
4569
4570 int
4571 main ()
4572 {
4573 /* The GNU C library defines this for functions which it implements
4574     to always fail with ENOSYS.  Some functions are actually named
4575     something starting with __ and the normal name is an alias.  */
4576 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4577 choke me
4578 #else
4579 f = dlsym;
4580 #endif
4581
4582   ;
4583   return 0;
4584 }
4585 _ACEOF
4586 rm -f conftest.$ac_objext conftest$ac_exeext
4587 if { (eval echo "$as_me:4587: \"$ac_link\"") >&5
4588   (eval $ac_link) 2>&5
4589   ac_status=$?
4590   echo "$as_me:4590: \$? = $ac_status" >&5
4591   (exit $ac_status); } &&
4592          { ac_try='test -s conftest$ac_exeext'
4593   { (eval echo "$as_me:4593: \"$ac_try\"") >&5
4594   (eval $ac_try) 2>&5
4595   ac_status=$?
4596   echo "$as_me:4596: \$? = $ac_status" >&5
4597   (exit $ac_status); }; }; then
4598   ac_cv_func_dlsym=yes
4599 else
4600   echo "$as_me: failed program was:" >&5
4601 cat conftest.$ac_ext >&5
4602 ac_cv_func_dlsym=no
4603 fi
4604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4605 fi
4606 echo "$as_me:4606: result: $ac_cv_func_dlsym" >&5
4607 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4608 if test $ac_cv_func_dlsym = yes; then
4609   cf_have_dlsym=yes
4610 else
4611
4612 cf_have_libdl=no
4613 echo "$as_me:4613: checking for dlsym in -ldl" >&5
4614 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4615 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4616   echo $ECHO_N "(cached) $ECHO_C" >&6
4617 else
4618   ac_check_lib_save_LIBS=$LIBS
4619 LIBS="-ldl  $LIBS"
4620 cat >conftest.$ac_ext <<_ACEOF
4621 #line 4621 "configure"
4622 #include "confdefs.h"
4623
4624 /* Override any gcc2 internal prototype to avoid an error.  */
4625 #ifdef __cplusplus
4626 extern "C"
4627 #endif
4628 /* We use char because int might match the return type of a gcc2
4629    builtin and then its argument prototype would still apply.  */
4630 char dlsym ();
4631 int
4632 main ()
4633 {
4634 dlsym ();
4635   ;
4636   return 0;
4637 }
4638 _ACEOF
4639 rm -f conftest.$ac_objext conftest$ac_exeext
4640 if { (eval echo "$as_me:4640: \"$ac_link\"") >&5
4641   (eval $ac_link) 2>&5
4642   ac_status=$?
4643   echo "$as_me:4643: \$? = $ac_status" >&5
4644   (exit $ac_status); } &&
4645          { ac_try='test -s conftest$ac_exeext'
4646   { (eval echo "$as_me:4646: \"$ac_try\"") >&5
4647   (eval $ac_try) 2>&5
4648   ac_status=$?
4649   echo "$as_me:4649: \$? = $ac_status" >&5
4650   (exit $ac_status); }; }; then
4651   ac_cv_lib_dl_dlsym=yes
4652 else
4653   echo "$as_me: failed program was:" >&5
4654 cat conftest.$ac_ext >&5
4655 ac_cv_lib_dl_dlsym=no
4656 fi
4657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4658 LIBS=$ac_check_lib_save_LIBS
4659 fi
4660 echo "$as_me:4660: result: $ac_cv_lib_dl_dlsym" >&5
4661 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4662 if test $ac_cv_lib_dl_dlsym = yes; then
4663
4664         cf_have_dlsym=yes
4665         cf_have_libdl=yes
4666 fi
4667
4668 fi
4669
4670 if test "$cf_have_dlsym" = yes ; then
4671         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4672
4673         echo "$as_me:4673: checking whether able to link to dl*() functions" >&5
4674 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4675         cat >conftest.$ac_ext <<_ACEOF
4676 #line 4676 "configure"
4677 #include "confdefs.h"
4678 #include <dlfcn.h>
4679 int
4680 main ()
4681 {
4682
4683                 void *obj;
4684                 if ((obj = dlopen("filename", 0)) != 0) {
4685                         if (dlsym(obj, "symbolname") == 0) {
4686                         dlclose(obj);
4687                         }
4688                 }
4689   ;
4690   return 0;
4691 }
4692 _ACEOF
4693 rm -f conftest.$ac_objext conftest$ac_exeext
4694 if { (eval echo "$as_me:4694: \"$ac_link\"") >&5
4695   (eval $ac_link) 2>&5
4696   ac_status=$?
4697   echo "$as_me:4697: \$? = $ac_status" >&5
4698   (exit $ac_status); } &&
4699          { ac_try='test -s conftest$ac_exeext'
4700   { (eval echo "$as_me:4700: \"$ac_try\"") >&5
4701   (eval $ac_try) 2>&5
4702   ac_status=$?
4703   echo "$as_me:4703: \$? = $ac_status" >&5
4704   (exit $ac_status); }; }; then
4705
4706                 cat >>confdefs.h <<\EOF
4707 #define HAVE_LIBDL 1
4708 EOF
4709
4710 else
4711   echo "$as_me: failed program was:" >&5
4712 cat conftest.$ac_ext >&5
4713
4714                 { { echo "$as_me:4714: error: Cannot link test program for libdl" >&5
4715 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4716    { (exit 1); exit 1; }; }
4717 fi
4718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4719         echo "$as_me:4719: result: ok" >&5
4720 echo "${ECHO_T}ok" >&6
4721 else
4722         { { echo "$as_me:4722: error: Cannot find dlsym function" >&5
4723 echo "$as_me: error: Cannot find dlsym function" >&2;}
4724    { (exit 1); exit 1; }; }
4725 fi
4726
4727 echo "$as_me:4727: checking for soname of gpm library" >&5
4728 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4729 if test "${cf_cv_gpm_soname+set}" = set; then
4730   echo $ECHO_N "(cached) $ECHO_C" >&6
4731 else
4732
4733 cf_cv_gpm_soname=unknown
4734 if test "$cross_compiling" != yes ; then
4735 cat >conftest.$ac_ext <<CF_EOF
4736 #include <gpm.h>
4737 int main()
4738 {
4739 if (Gpm_Open(0,0)) Gpm_Close();
4740 return 0;
4741 }
4742 CF_EOF
4743 cf_save_LIBS="$LIBS"
4744         LIBS="-lgpm $LIBS"
4745         if { (eval echo "$as_me:4745: \"$ac_compile\"") >&5
4746   (eval $ac_compile) 2>&5
4747   ac_status=$?
4748   echo "$as_me:4748: \$? = $ac_status" >&5
4749   (exit $ac_status); } ; then
4750                 if { (eval echo "$as_me:4750: \"$ac_link\"") >&5
4751   (eval $ac_link) 2>&5
4752   ac_status=$?
4753   echo "$as_me:4753: \$? = $ac_status" >&5
4754   (exit $ac_status); } ; then
4755                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4756                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4757                 fi
4758         fi
4759 rm -f conftest*
4760 LIBS="$cf_save_LIBS"
4761 fi
4762
4763 fi
4764 echo "$as_me:4764: result: $cf_cv_gpm_soname" >&5
4765 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4766
4767         test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4768 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4769 EOF
4770
4771         SHLIB_LIST="-ldl $SHLIB_LIST"
4772         cat >>confdefs.h <<\EOF
4773 #define HAVE_LIBGPM 1
4774 EOF
4775
4776         echo "$as_me:4776: checking for Gpm_Wgetch in -lgpm" >&5
4777 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4778 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4779   echo $ECHO_N "(cached) $ECHO_C" >&6
4780 else
4781   ac_check_lib_save_LIBS=$LIBS
4782 LIBS="-lgpm  $LIBS"
4783 cat >conftest.$ac_ext <<_ACEOF
4784 #line 4784 "configure"
4785 #include "confdefs.h"
4786
4787 /* Override any gcc2 internal prototype to avoid an error.  */
4788 #ifdef __cplusplus
4789 extern "C"
4790 #endif
4791 /* We use char because int might match the return type of a gcc2
4792    builtin and then its argument prototype would still apply.  */
4793 char Gpm_Wgetch ();
4794 int
4795 main ()
4796 {
4797 Gpm_Wgetch ();
4798   ;
4799   return 0;
4800 }
4801 _ACEOF
4802 rm -f conftest.$ac_objext conftest$ac_exeext
4803 if { (eval echo "$as_me:4803: \"$ac_link\"") >&5
4804   (eval $ac_link) 2>&5
4805   ac_status=$?
4806   echo "$as_me:4806: \$? = $ac_status" >&5
4807   (exit $ac_status); } &&
4808          { ac_try='test -s conftest$ac_exeext'
4809   { (eval echo "$as_me:4809: \"$ac_try\"") >&5
4810   (eval $ac_try) 2>&5
4811   ac_status=$?
4812   echo "$as_me:4812: \$? = $ac_status" >&5
4813   (exit $ac_status); }; }; then
4814   ac_cv_lib_gpm_Gpm_Wgetch=yes
4815 else
4816   echo "$as_me: failed program was:" >&5
4817 cat conftest.$ac_ext >&5
4818 ac_cv_lib_gpm_Gpm_Wgetch=no
4819 fi
4820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4821 LIBS=$ac_check_lib_save_LIBS
4822 fi
4823 echo "$as_me:4823: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4824 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4825 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4826
4827                 { echo "$as_me:4827: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4828 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4829
4830 fi
4831
4832 fi
4833
4834 # not everyone has "test -c"
4835 if test -c /dev/sysmouse 2>/dev/null ; then
4836 echo "$as_me:4836: checking if you want to use sysmouse" >&5
4837 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4838
4839 # Check whether --with-sysmouse or --without-sysmouse was given.
4840 if test "${with_sysmouse+set}" = set; then
4841   withval="$with_sysmouse"
4842   cf_with_sysmouse=$withval
4843 else
4844   cf_with_sysmouse=maybe
4845 fi;
4846         if test "$cf_with_sysmouse" != no ; then
4847         cat >conftest.$ac_ext <<_ACEOF
4848 #line 4848 "configure"
4849 #include "confdefs.h"
4850
4851 #include <osreldate.h>
4852 #if (__FreeBSD_version >= 400017)
4853 #include <sys/consio.h>
4854 #include <sys/fbio.h>
4855 #else
4856 #include <machine/console.h>
4857 #endif
4858
4859 int
4860 main ()
4861 {
4862
4863         struct mouse_info the_mouse;
4864         ioctl(0, CONS_MOUSECTL, &the_mouse);
4865
4866   ;
4867   return 0;
4868 }
4869 _ACEOF
4870 rm -f conftest.$ac_objext
4871 if { (eval echo "$as_me:4871: \"$ac_compile\"") >&5
4872   (eval $ac_compile) 2>&5
4873   ac_status=$?
4874   echo "$as_me:4874: \$? = $ac_status" >&5
4875   (exit $ac_status); } &&
4876          { ac_try='test -s conftest.$ac_objext'
4877   { (eval echo "$as_me:4877: \"$ac_try\"") >&5
4878   (eval $ac_try) 2>&5
4879   ac_status=$?
4880   echo "$as_me:4880: \$? = $ac_status" >&5
4881   (exit $ac_status); }; }; then
4882   cf_with_sysmouse=yes
4883 else
4884   echo "$as_me: failed program was:" >&5
4885 cat conftest.$ac_ext >&5
4886 cf_with_sysmouse=no
4887 fi
4888 rm -f conftest.$ac_objext conftest.$ac_ext
4889         fi
4890 echo "$as_me:4890: result: $cf_with_sysmouse" >&5
4891 echo "${ECHO_T}$cf_with_sysmouse" >&6
4892 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4893 #define USE_SYSMOUSE 1
4894 EOF
4895
4896 fi
4897
4898 if test X"$CC_G_OPT" = X"" ; then
4899         CC_G_OPT='-g'
4900         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4901 fi
4902
4903 if test X"$CXX_G_OPT" = X"" ; then
4904         CXX_G_OPT='-g'
4905         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4906 fi
4907
4908 echo "$as_me:4908: checking for default loader flags" >&5
4909 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4910 case $DFT_LWR_MODEL in
4911 libtool) LD_MODEL=''   ;;
4912 normal)  LD_MODEL=''   ;;
4913 debug)   LD_MODEL=$CC_G_OPT ;;
4914 profile) LD_MODEL='-pg';;
4915 shared)  LD_MODEL=''   ;;
4916 esac
4917 echo "$as_me:4917: result: $LD_MODEL" >&5
4918 echo "${ECHO_T}$LD_MODEL" >&6
4919
4920 echo "$as_me:4920: checking if rpath option should be used" >&5
4921 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4922
4923 # Check whether --enable-rpath or --disable-rpath was given.
4924 if test "${enable_rpath+set}" = set; then
4925   enableval="$enable_rpath"
4926   cf_cv_ld_rpath=$enableval
4927 else
4928   cf_cv_ld_rpath=no
4929 fi;
4930 echo "$as_me:4930: result: $cf_cv_ld_rpath" >&5
4931 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4932
4933         LOCAL_LDFLAGS=
4934         LOCAL_LDFLAGS2=
4935         LD_SHARED_OPTS=
4936         INSTALL_LIB="-m 644"
4937
4938         cf_cv_do_symlinks=no
4939
4940         echo "$as_me:4940: checking if release/abi version should be used for shared libs" >&5
4941 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4942
4943 # Check whether --with-shlib-version or --without-shlib-version was given.
4944 if test "${with_shlib_version+set}" = set; then
4945   withval="$with_shlib_version"
4946   test -z "$withval" && withval=auto
4947         case $withval in #(vi
4948         yes) #(vi
4949                 cf_cv_shlib_version=auto
4950                 ;;
4951         rel|abi|auto|no) #(vi
4952                 cf_cv_shlib_version=$withval
4953                 ;;
4954         *)
4955                 { { echo "$as_me:4955: error: option value must be one of: rel, abi, auto or no" >&5
4956 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4957    { (exit 1); exit 1; }; }
4958                 ;;
4959         esac
4960
4961 else
4962   cf_cv_shlib_version=auto
4963 fi;
4964         echo "$as_me:4964: result: $cf_cv_shlib_version" >&5
4965 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4966
4967         cf_cv_rm_so_locs=no
4968
4969         # Some less-capable ports of gcc support only -fpic
4970         CC_SHARED_OPTS=
4971         if test "$GCC" = yes
4972         then
4973                 echo "$as_me:4973: checking which $CC option to use" >&5
4974 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4975                 cf_save_CFLAGS="$CFLAGS"
4976                 for CC_SHARED_OPTS in -fPIC -fpic ''
4977                 do
4978                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4979                         cat >conftest.$ac_ext <<_ACEOF
4980 #line 4980 "configure"
4981 #include "confdefs.h"
4982 #include <stdio.h>
4983 int
4984 main ()
4985 {
4986 int x = 1
4987   ;
4988   return 0;
4989 }
4990 _ACEOF
4991 rm -f conftest.$ac_objext
4992 if { (eval echo "$as_me:4992: \"$ac_compile\"") >&5
4993   (eval $ac_compile) 2>&5
4994   ac_status=$?
4995   echo "$as_me:4995: \$? = $ac_status" >&5
4996   (exit $ac_status); } &&
4997          { ac_try='test -s conftest.$ac_objext'
4998   { (eval echo "$as_me:4998: \"$ac_try\"") >&5
4999   (eval $ac_try) 2>&5
5000   ac_status=$?
5001   echo "$as_me:5001: \$? = $ac_status" >&5
5002   (exit $ac_status); }; }; then
5003   break
5004 else
5005   echo "$as_me: failed program was:" >&5
5006 cat conftest.$ac_ext >&5
5007 fi
5008 rm -f conftest.$ac_objext conftest.$ac_ext
5009                 done
5010                 echo "$as_me:5010: result: $CC_SHARED_OPTS" >&5
5011 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5012                 CFLAGS="$cf_save_CFLAGS"
5013         fi
5014
5015         cf_cv_shlib_version_infix=no
5016
5017         case $cf_cv_system_name in
5018         beos*)
5019                 MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5020                 ;;
5021         cygwin*)
5022                 CC_SHARED_OPTS=
5023                 MK_SHARED_LIB='$(CC) -shared -Wl,--out-implib=$(IMPORT_LIB) -Wl,--export-all-symbols -o $(SHARED_LIB)'
5024                 cf_cv_shlib_version=cygdll
5025                 cf_cv_shlib_version_infix=cygdll
5026                 ;;
5027         darwin*)
5028                 EXTRA_CFLAGS="-no-cpp-precomp"
5029                 CC_SHARED_OPTS="-dynamic"
5030                 MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
5031                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5032                 cf_cv_shlib_version_infix=yes
5033                 ;;
5034         hpux*)
5035                 # (tested with gcc 2.7.2 -- I don't have c89)
5036                 if test "$GCC" = yes; then
5037                         LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
5038                 else
5039                         CC_SHARED_OPTS='+Z'
5040                         LD_SHARED_OPTS='-Wl,+b,$(libdir)'
5041                 fi
5042                 MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@'
5043                 # HP-UX shared libraries must be executable, and should be
5044                 # readonly to exploit a quirk in the memory manager.
5045                 INSTALL_LIB="-m 555"
5046                 ;;
5047         irix*)
5048                 if test "$cf_cv_ld_rpath" = yes ; then
5049                         if test "$GCC" = yes; then
5050                                 cf_ld_rpath_opt="-Wl,-rpath,"
5051                                 EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
5052                         else
5053                                 cf_ld_rpath_opt="-rpath "
5054                                 EXTRA_LDFLAGS="-rpath \$(libdir) $EXTRA_LDFLAGS"
5055                         fi
5056                 fi
5057                 # tested with IRIX 5.2 and 'cc'.
5058                 if test "$GCC" != yes; then
5059                         CC_SHARED_OPTS='-KPIC'
5060                 fi
5061                 MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
5062                 cf_cv_rm_so_locs=yes
5063                 ;;
5064         linux*|gnu*|k*bsd*-gnu)
5065                 if test "$DFT_LWR_MODEL" = "shared" ; then
5066                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
5067                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5068                 fi
5069                 if test "$cf_cv_ld_rpath" = yes ; then
5070                         cf_ld_rpath_opt="-Wl,-rpath,"
5071                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5072                 fi
5073                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5074                 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
5075                 ;;
5076         openbsd2*)
5077                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5078                 MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
5079                 ;;
5080         freebsd[45]*)
5081                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5082                 MK_SHARED_LIB='$(LD) -Bshareable -soname=`basename $@` -o $@'
5083                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5084
5085 # This doesn't work - I keep getting spurious references to needing
5086 # libncurses.so.5.3 when ldd says it's resolved.  LOCAL_LDFLAGS2 seems to be
5087 # no longer used anyway.  And the rpath logic isn't relative - so I have to
5088 # add the local and install lib-directories:
5089 #
5090 #               if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5091 #                       LOCAL_LDFLAGS="-rpath `pwd`/lib"
5092 #                       LOCAL_LDFLAGS2="-rpath \$(libdir) $LOCAL_LDFLAGS"
5093 #                       cf_ld_rpath_opt="-rpath "
5094 #                       EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5095 #               fi
5096                 ;;
5097         openbsd*|freebsd*)
5098                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5099                 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
5100                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5101                 ;;
5102         netbsd*)
5103                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5104                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5105                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5106                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
5107                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5108                         EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
5109                         MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
5110                         if test "$cf_cv_shlib_version" = auto; then
5111                         if test ! -f /usr/libexec/ld.elf_so; then
5112                                 cf_cv_shlib_version=rel
5113                         fi
5114                         fi
5115                 else
5116                         MK_SHARED_LIB='$(LD) -Bshareable -o $@'
5117                 fi
5118                 ;;
5119         osf*|mls+*)
5120                 # tested with OSF/1 V3.2 and 'cc'
5121                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5122                 # link with shared libs).
5123                 MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
5124                 case $host_os in
5125                 osf4*)
5126                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5127                         ;;
5128                 esac
5129                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5130                 if test "$DFT_LWR_MODEL" = "shared" ; then
5131                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
5132                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5133                 fi
5134                 if test "$cf_cv_ld_rpath" = yes ; then
5135                         cf_ld_rpath_opt="-rpath"
5136                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5137                 fi
5138                 cf_cv_rm_so_locs=yes
5139                 ;;
5140         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5141                 # tested with osr5.0.5
5142                 if test "$GCC" != yes; then
5143                         CC_SHARED_OPTS='-belf -KPIC'
5144                 fi
5145                 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
5146                 if test "$cf_cv_ld_rpath" = yes ; then
5147                         # only way is to set LD_RUN_PATH but no switch for it
5148                         RUN_PATH=$libdir
5149                 fi
5150                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5151                 LINK_PROGS='LD_RUN_PATH=$(libdir)'
5152                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5153                 ;;
5154         sunos4*)
5155                 # tested with SunOS 4.1.1 and gcc 2.7.0
5156                 if test "$GCC" != yes; then
5157                         CC_SHARED_OPTS='-KPIC'
5158                 fi
5159                 MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
5160                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5161                 ;;
5162         solaris2*)
5163                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5164                 if test "$GCC" != yes; then
5165                         CC_SHARED_OPTS='-KPIC'
5166                 fi
5167                 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
5168                 if test "$DFT_LWR_MODEL" = "shared" ; then
5169                         LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
5170                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5171                 fi
5172                 if test "$cf_cv_ld_rpath" = yes ; then
5173                         cf_ld_rpath_opt="-R"
5174                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5175                 fi
5176                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5177                 ;;
5178         sysv5uw7*|unix_sv*)
5179                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5180                 if test "$GCC" != yes; then
5181                         CC_SHARED_OPTS='-KPIC'
5182                 fi
5183                 MK_SHARED_LIB='$(LD) -d y -G -o $@'
5184                 ;;
5185         *)
5186                 CC_SHARED_OPTS='unknown'
5187                 MK_SHARED_LIB='echo unknown'
5188                 ;;
5189         esac
5190
5191         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5192         case "$cf_cv_shlib_version" in #(vi
5193         rel|abi)
5194                 case "$MK_SHARED_LIB" in #(vi
5195                 *'-o $@')
5196                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5197                         ;;
5198                 *)
5199                         { echo "$as_me:5199: WARNING: ignored --with-shlib-version" >&5
5200 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5201                         ;;
5202                 esac
5203                 ;;
5204         esac
5205
5206         if test -n "$cf_ld_rpath_opt" ; then
5207                 echo "$as_me:5207: checking if we need a space after rpath option" >&5
5208 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5209                 cf_save_LIBS="$LIBS"
5210                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5211                 cat >conftest.$ac_ext <<_ACEOF
5212 #line 5212 "configure"
5213 #include "confdefs.h"
5214
5215 int
5216 main ()
5217 {
5218
5219   ;
5220   return 0;
5221 }
5222 _ACEOF
5223 rm -f conftest.$ac_objext conftest$ac_exeext
5224 if { (eval echo "$as_me:5224: \"$ac_link\"") >&5
5225   (eval $ac_link) 2>&5
5226   ac_status=$?
5227   echo "$as_me:5227: \$? = $ac_status" >&5
5228   (exit $ac_status); } &&
5229          { ac_try='test -s conftest$ac_exeext'
5230   { (eval echo "$as_me:5230: \"$ac_try\"") >&5
5231   (eval $ac_try) 2>&5
5232   ac_status=$?
5233   echo "$as_me:5233: \$? = $ac_status" >&5
5234   (exit $ac_status); }; }; then
5235   cf_rpath_space=no
5236 else
5237   echo "$as_me: failed program was:" >&5
5238 cat conftest.$ac_ext >&5
5239 cf_rpath_space=yes
5240 fi
5241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5242                 LIBS="$cf_save_LIBS"
5243                 echo "$as_me:5243: result: $cf_rpath_space" >&5
5244 echo "${ECHO_T}$cf_rpath_space" >&6
5245                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5246                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
5247         fi
5248
5249 if test "$CC_SHARED_OPTS" = "unknown"; then
5250         for model in $cf_list_models; do
5251                 if test "$model" = "shared"; then
5252                         { { echo "$as_me:5252: error: Shared libraries are not supported in this version" >&5
5253 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5254    { (exit 1); exit 1; }; }
5255                 fi
5256         done
5257 fi
5258
5259 ###############################################################################
5260
5261 ###     use option --disable-overwrite to leave out the link to -lcurses
5262 echo "$as_me:5262: checking if you wish to install ncurses overwriting curses" >&5
5263 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5264
5265 # Check whether --enable-overwrite or --disable-overwrite was given.
5266 if test "${enable_overwrite+set}" = set; then
5267   enableval="$enable_overwrite"
5268   with_overwrite=$enableval
5269 else
5270   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5271 fi;
5272 echo "$as_me:5272: result: $with_overwrite" >&5
5273 echo "${ECHO_T}$with_overwrite" >&6
5274
5275 echo "$as_me:5275: checking if external terminfo-database is used" >&5
5276 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5277
5278 # Check whether --enable-database or --disable-database was given.
5279 if test "${enable_database+set}" = set; then
5280   enableval="$enable_database"
5281   use_database=$enableval
5282 else
5283   use_database=yes
5284 fi;
5285 echo "$as_me:5285: result: $use_database" >&5
5286 echo "${ECHO_T}$use_database" >&6
5287
5288 case $host_os in #(vi
5289 os2*) #(vi
5290         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5291         ;;
5292 *) #(vi
5293         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5294         ;;
5295 esac
5296
5297         case $cf_cv_system_name in
5298         os2*)   PATHSEP=';'  ;;
5299         *)      PATHSEP=':'  ;;
5300         esac
5301
5302 if test "$use_database" != no ; then
5303         cat >>confdefs.h <<\EOF
5304 #define USE_DATABASE 1
5305 EOF
5306
5307         echo "$as_me:5307: checking which terminfo source-file will be installed" >&5
5308 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5309
5310 # Check whether --enable-database or --disable-database was given.
5311 if test "${enable_database+set}" = set; then
5312   enableval="$enable_database"
5313   TERMINFO_SRC=$withval
5314 fi;
5315         echo "$as_me:5315: result: $TERMINFO_SRC" >&5
5316 echo "${ECHO_T}$TERMINFO_SRC" >&6
5317 fi
5318
5319 echo "$as_me:5319: checking for list of fallback descriptions" >&5
5320 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5321
5322 # Check whether --with-fallbacks or --without-fallbacks was given.
5323 if test "${with_fallbacks+set}" = set; then
5324   withval="$with_fallbacks"
5325   with_fallback=$withval
5326 else
5327   with_fallback=
5328 fi;
5329 echo "$as_me:5329: result: $with_fallback" >&5
5330 echo "${ECHO_T}$with_fallback" >&6
5331 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5332
5333 echo "$as_me:5333: checking if you want modern xterm or antique" >&5
5334 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5335
5336 # Check whether --with-xterm-new or --without-xterm-new was given.
5337 if test "${with_xterm_new+set}" = set; then
5338   withval="$with_xterm_new"
5339   with_xterm_new=$withval
5340 else
5341   with_xterm_new=yes
5342 fi;
5343 case $with_xterm_new in
5344 no)     with_xterm_new=xterm-old;;
5345 *)      with_xterm_new=xterm-new;;
5346 esac
5347 echo "$as_me:5347: result: $with_xterm_new" >&5
5348 echo "${ECHO_T}$with_xterm_new" >&6
5349 WHICH_XTERM=$with_xterm_new
5350
5351 MAKE_TERMINFO=
5352 if test "$use_database" = no ; then
5353         TERMINFO="${datadir}/terminfo"
5354         MAKE_TERMINFO="#"
5355 else
5356
5357 echo "$as_me:5357: checking for list of terminfo directories" >&5
5358 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5359
5360 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5361 if test "${with_terminfo_dirs+set}" = set; then
5362   withval="$with_terminfo_dirs"
5363
5364 else
5365   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5366 fi;
5367 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5368 cf_dst_path=
5369 for cf_src_path in $withval
5370 do
5371
5372 case ".$cf_src_path" in #(vi
5373 .\$\(*\)*|.\'*\'*) #(vi
5374   ;;
5375 ..|./*|.\\*) #(vi
5376   ;;
5377 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5378   ;;
5379 .\${*prefix}*) #(vi
5380   eval cf_src_path="$cf_src_path"
5381   case ".$cf_src_path" in #(vi
5382   .NONE/*)
5383     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
5384     ;;
5385   esac
5386   ;; #(vi
5387 .NONE/*)
5388   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
5389   ;;
5390 *)
5391   { { echo "$as_me:5391: error: expected a pathname, not \"$cf_src_path\"" >&5
5392 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5393    { (exit 1); exit 1; }; }
5394   ;;
5395 esac
5396
5397   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5398   cf_dst_path="${cf_dst_path}${cf_src_path}"
5399 done
5400 IFS="$ac_save_ifs"
5401
5402 eval 'TERMINFO_DIRS="$cf_dst_path"'
5403
5404 echo "$as_me:5404: result: $TERMINFO_DIRS" >&5
5405 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5406 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5407 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5408 EOF
5409
5410 echo "$as_me:5410: checking for default terminfo directory" >&5
5411 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5412
5413 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5414 if test "${with_default_terminfo_dir+set}" = set; then
5415   withval="$with_default_terminfo_dir"
5416
5417 else
5418   withval="${TERMINFO-${datadir}/terminfo}"
5419 fi;
5420 case ".$withval" in #(vi
5421 .\$\(*\)*|.\'*\'*) #(vi
5422   ;;
5423 ..|./*|.\\*) #(vi
5424   ;;
5425 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5426   ;;
5427 .\${*prefix}*) #(vi
5428   eval withval="$withval"
5429   case ".$withval" in #(vi
5430   .NONE/*)
5431     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
5432     ;;
5433   esac
5434   ;; #(vi
5435 .NONE/*)
5436   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
5437   ;;
5438 *)
5439   { { echo "$as_me:5439: error: expected a pathname, not \"$withval\"" >&5
5440 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5441    { (exit 1); exit 1; }; }
5442   ;;
5443 esac
5444
5445 eval TERMINFO="$withval"
5446
5447 echo "$as_me:5447: result: $TERMINFO" >&5
5448 echo "${ECHO_T}$TERMINFO" >&6
5449 cat >>confdefs.h <<EOF
5450 #define TERMINFO "$TERMINFO"
5451 EOF
5452
5453 fi
5454
5455 ###     use option --disable-big-core to make tic run on small machines
5456 ###     We need 4Mb, check if we can allocate 50% more than that.
5457 echo "$as_me:5457: checking if big-core option selected" >&5
5458 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5459
5460 # Check whether --enable-big-core or --disable-big-core was given.
5461 if test "${enable_big_core+set}" = set; then
5462   enableval="$enable_big_core"
5463   with_big_core=$enableval
5464 else
5465   if test "$cross_compiling" = yes; then
5466   with_big_core=no
5467 else
5468   cat >conftest.$ac_ext <<_ACEOF
5469 #line 5469 "configure"
5470 #include "confdefs.h"
5471
5472 #include <stdlib.h>
5473 #include <string.h>
5474 int main() {
5475         unsigned long n = 6000000L;
5476         char *s = malloc(n);
5477         if (s != 0)
5478                 s[0] = s[n-1] = 0;
5479         exit(s == 0);
5480 }
5481 _ACEOF
5482 rm -f conftest$ac_exeext
5483 if { (eval echo "$as_me:5483: \"$ac_link\"") >&5
5484   (eval $ac_link) 2>&5
5485   ac_status=$?
5486   echo "$as_me:5486: \$? = $ac_status" >&5
5487   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5488   { (eval echo "$as_me:5488: \"$ac_try\"") >&5
5489   (eval $ac_try) 2>&5
5490   ac_status=$?
5491   echo "$as_me:5491: \$? = $ac_status" >&5
5492   (exit $ac_status); }; }; then
5493   with_big_core=yes
5494 else
5495   echo "$as_me: program exited with status $ac_status" >&5
5496 echo "$as_me: failed program was:" >&5
5497 cat conftest.$ac_ext >&5
5498 with_big_core=no
5499 fi
5500 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5501 fi
5502 fi;
5503 echo "$as_me:5503: result: $with_big_core" >&5
5504 echo "${ECHO_T}$with_big_core" >&6
5505 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5506 #define HAVE_BIG_CORE 1
5507 EOF
5508
5509 ###     use option --enable-termcap to compile in the termcap fallback support
5510 echo "$as_me:5510: checking if you want termcap-fallback support" >&5
5511 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5512
5513 # Check whether --enable-termcap or --disable-termcap was given.
5514 if test "${enable_termcap+set}" = set; then
5515   enableval="$enable_termcap"
5516   with_termcap=$enableval
5517 else
5518   with_termcap=no
5519 fi;
5520 echo "$as_me:5520: result: $with_termcap" >&5
5521 echo "${ECHO_T}$with_termcap" >&6
5522
5523 if test "$with_termcap" != "yes" ; then
5524         if test "$use_database" = no ; then
5525                 if test -z "$with_fallback" ; then
5526                         { { echo "$as_me:5526: error: You have disabled the database w/o specifying fallbacks" >&5
5527 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5528    { (exit 1); exit 1; }; }
5529                 fi
5530         fi
5531         cat >>confdefs.h <<\EOF
5532 #define PURE_TERMINFO 1
5533 EOF
5534
5535 else
5536
5537 cat >>confdefs.h <<\EOF
5538 #define USE_TERMCAP 1
5539 EOF
5540
5541 echo "$as_me:5541: checking for list of termcap files" >&5
5542 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5543
5544 # Check whether --with-termpath or --without-termpath was given.
5545 if test "${with_termpath+set}" = set; then
5546   withval="$with_termpath"
5547
5548 else
5549   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5550 fi;
5551 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5552 cf_dst_path=
5553 for cf_src_path in $withval
5554 do
5555
5556 case ".$cf_src_path" in #(vi
5557 .\$\(*\)*|.\'*\'*) #(vi
5558   ;;
5559 ..|./*|.\\*) #(vi
5560   ;;
5561 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5562   ;;
5563 .\${*prefix}*) #(vi
5564   eval cf_src_path="$cf_src_path"
5565   case ".$cf_src_path" in #(vi
5566   .NONE/*)
5567     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
5568     ;;
5569   esac
5570   ;; #(vi
5571 .NONE/*)
5572   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
5573   ;;
5574 *)
5575   { { echo "$as_me:5575: error: expected a pathname, not \"$cf_src_path\"" >&5
5576 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5577    { (exit 1); exit 1; }; }
5578   ;;
5579 esac
5580
5581   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5582   cf_dst_path="${cf_dst_path}${cf_src_path}"
5583 done
5584 IFS="$ac_save_ifs"
5585
5586 eval 'TERMPATH="$cf_dst_path"'
5587
5588 echo "$as_me:5588: result: $TERMPATH" >&5
5589 echo "${ECHO_T}$TERMPATH" >&6
5590 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5591 #define TERMPATH "$TERMPATH"
5592 EOF
5593
5594 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5595 echo "$as_me:5595: checking if fast termcap-loader is needed" >&5
5596 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5597
5598 # Check whether --enable-getcap or --disable-getcap was given.
5599 if test "${enable_getcap+set}" = set; then
5600   enableval="$enable_getcap"
5601   with_getcap=$enableval
5602 else
5603   with_getcap=no
5604 fi;
5605 echo "$as_me:5605: result: $with_getcap" >&5
5606 echo "${ECHO_T}$with_getcap" >&6
5607 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5608 #define USE_GETCAP 1
5609 EOF
5610
5611 echo "$as_me:5611: checking if translated termcaps will be cached in ~/.terminfo" >&5
5612 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5613
5614 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5615 if test "${enable_getcap_cache+set}" = set; then
5616   enableval="$enable_getcap_cache"
5617   with_getcap_cache=$enableval
5618 else
5619   with_getcap_cache=no
5620 fi;
5621 echo "$as_me:5621: result: $with_getcap_cache" >&5
5622 echo "${ECHO_T}$with_getcap_cache" >&6
5623 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5624 #define USE_GETCAP_CACHE 1
5625 EOF
5626
5627 fi
5628
5629 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5630 echo "$as_me:5630: checking if ~/.terminfo is wanted" >&5
5631 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5632
5633 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5634 if test "${enable_home_terminfo+set}" = set; then
5635   enableval="$enable_home_terminfo"
5636   with_home_terminfo=$enableval
5637 else
5638   with_home_terminfo=yes
5639 fi;
5640 echo "$as_me:5640: result: $with_home_terminfo" >&5
5641 echo "${ECHO_T}$with_home_terminfo" >&6
5642 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5643 #define USE_HOME_TERMINFO 1
5644 EOF
5645
5646 echo "$as_me:5646: checking if you want to use restrict environment when running as root" >&5
5647 echo $ECHO_N "checking if you want to use restrict environment when running as root... $ECHO_C" >&6
5648
5649 # Check whether --enable-root-environ or --disable-root-environ was given.
5650 if test "${enable_root_environ+set}" = set; then
5651   enableval="$enable_root_environ"
5652   with_root_environ=$enableval
5653 else
5654   with_root_environ=yes
5655 fi;
5656 echo "$as_me:5656: result: $with_root_environ" >&5
5657 echo "${ECHO_T}$with_root_environ" >&6
5658 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5659 #define USE_ROOT_ENVIRON 1
5660 EOF
5661
5662 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5663 ###   to reduce storage requirements for the terminfo database.
5664
5665 for ac_func in \
5666         remove \
5667         unlink
5668 do
5669 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5670 echo "$as_me:5670: checking for $ac_func" >&5
5671 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5672 if eval "test \"\${$as_ac_var+set}\" = set"; then
5673   echo $ECHO_N "(cached) $ECHO_C" >&6
5674 else
5675   cat >conftest.$ac_ext <<_ACEOF
5676 #line 5676 "configure"
5677 #include "confdefs.h"
5678 /* System header to define __stub macros and hopefully few prototypes,
5679     which can conflict with char $ac_func (); below.  */
5680 #include <assert.h>
5681 /* Override any gcc2 internal prototype to avoid an error.  */
5682 #ifdef __cplusplus
5683 extern "C"
5684 #endif
5685 /* We use char because int might match the return type of a gcc2
5686    builtin and then its argument prototype would still apply.  */
5687 char $ac_func ();
5688 char (*f) ();
5689
5690 int
5691 main ()
5692 {
5693 /* The GNU C library defines this for functions which it implements
5694     to always fail with ENOSYS.  Some functions are actually named
5695     something starting with __ and the normal name is an alias.  */
5696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5697 choke me
5698 #else
5699 f = $ac_func;
5700 #endif
5701
5702   ;
5703   return 0;
5704 }
5705 _ACEOF
5706 rm -f conftest.$ac_objext conftest$ac_exeext
5707 if { (eval echo "$as_me:5707: \"$ac_link\"") >&5
5708   (eval $ac_link) 2>&5
5709   ac_status=$?
5710   echo "$as_me:5710: \$? = $ac_status" >&5
5711   (exit $ac_status); } &&
5712          { ac_try='test -s conftest$ac_exeext'
5713   { (eval echo "$as_me:5713: \"$ac_try\"") >&5
5714   (eval $ac_try) 2>&5
5715   ac_status=$?
5716   echo "$as_me:5716: \$? = $ac_status" >&5
5717   (exit $ac_status); }; }; then
5718   eval "$as_ac_var=yes"
5719 else
5720   echo "$as_me: failed program was:" >&5
5721 cat conftest.$ac_ext >&5
5722 eval "$as_ac_var=no"
5723 fi
5724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5725 fi
5726 echo "$as_me:5726: result: `eval echo '${'$as_ac_var'}'`" >&5
5727 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5728 if test `eval echo '${'$as_ac_var'}'` = yes; then
5729   cat >>confdefs.h <<EOF
5730 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5731 EOF
5732
5733 fi
5734 done
5735
5736 if test "$cross_compiling" = yes ; then
5737
5738 for ac_func in \
5739                 link \
5740                 symlink
5741 do
5742 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5743 echo "$as_me:5743: checking for $ac_func" >&5
5744 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5745 if eval "test \"\${$as_ac_var+set}\" = set"; then
5746   echo $ECHO_N "(cached) $ECHO_C" >&6
5747 else
5748   cat >conftest.$ac_ext <<_ACEOF
5749 #line 5749 "configure"
5750 #include "confdefs.h"
5751 /* System header to define __stub macros and hopefully few prototypes,
5752     which can conflict with char $ac_func (); below.  */
5753 #include <assert.h>
5754 /* Override any gcc2 internal prototype to avoid an error.  */
5755 #ifdef __cplusplus
5756 extern "C"
5757 #endif
5758 /* We use char because int might match the return type of a gcc2
5759    builtin and then its argument prototype would still apply.  */
5760 char $ac_func ();
5761 char (*f) ();
5762
5763 int
5764 main ()
5765 {
5766 /* The GNU C library defines this for functions which it implements
5767     to always fail with ENOSYS.  Some functions are actually named
5768     something starting with __ and the normal name is an alias.  */
5769 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5770 choke me
5771 #else
5772 f = $ac_func;
5773 #endif
5774
5775   ;
5776   return 0;
5777 }
5778 _ACEOF
5779 rm -f conftest.$ac_objext conftest$ac_exeext
5780 if { (eval echo "$as_me:5780: \"$ac_link\"") >&5
5781   (eval $ac_link) 2>&5
5782   ac_status=$?
5783   echo "$as_me:5783: \$? = $ac_status" >&5
5784   (exit $ac_status); } &&
5785          { ac_try='test -s conftest$ac_exeext'
5786   { (eval echo "$as_me:5786: \"$ac_try\"") >&5
5787   (eval $ac_try) 2>&5
5788   ac_status=$?
5789   echo "$as_me:5789: \$? = $ac_status" >&5
5790   (exit $ac_status); }; }; then
5791   eval "$as_ac_var=yes"
5792 else
5793   echo "$as_me: failed program was:" >&5
5794 cat conftest.$ac_ext >&5
5795 eval "$as_ac_var=no"
5796 fi
5797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5798 fi
5799 echo "$as_me:5799: result: `eval echo '${'$as_ac_var'}'`" >&5
5800 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5801 if test `eval echo '${'$as_ac_var'}'` = yes; then
5802   cat >>confdefs.h <<EOF
5803 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5804 EOF
5805
5806 fi
5807 done
5808
5809 else
5810         echo "$as_me:5810: checking if link/symlink functions work" >&5
5811 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5812 if test "${cf_cv_link_funcs+set}" = set; then
5813   echo $ECHO_N "(cached) $ECHO_C" >&6
5814 else
5815
5816                 cf_cv_link_funcs=
5817                 for cf_func in link symlink ; do
5818                         if test "$cross_compiling" = yes; then
5819
5820                         eval 'ac_cv_func_'$cf_func'=error'
5821 else
5822   cat >conftest.$ac_ext <<_ACEOF
5823 #line 5823 "configure"
5824 #include "confdefs.h"
5825
5826 #include <sys/types.h>
5827 #include <sys/stat.h>
5828 #ifdef HAVE_UNISTD_H
5829 #include <unistd.h>
5830 #endif
5831 int main()
5832 {
5833         int fail = 0;
5834         char *src = "config.log";
5835         char *dst = "conftest.chk";
5836         struct stat src_sb;
5837         struct stat dst_sb;
5838
5839         stat(src, &src_sb);
5840         fail = ($cf_func("config.log", "conftest.chk") < 0)
5841             || (stat(dst, &dst_sb) < 0)
5842             || (dst_sb.st_mtime != src_sb.st_mtime);
5843 #ifdef HAVE_UNLINK
5844         unlink(dst);
5845 #else
5846         remove(dst);
5847 #endif
5848         exit (fail);
5849 }
5850
5851 _ACEOF
5852 rm -f conftest$ac_exeext
5853 if { (eval echo "$as_me:5853: \"$ac_link\"") >&5
5854   (eval $ac_link) 2>&5
5855   ac_status=$?
5856   echo "$as_me:5856: \$? = $ac_status" >&5
5857   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5858   { (eval echo "$as_me:5858: \"$ac_try\"") >&5
5859   (eval $ac_try) 2>&5
5860   ac_status=$?
5861   echo "$as_me:5861: \$? = $ac_status" >&5
5862   (exit $ac_status); }; }; then
5863
5864                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5865                         eval 'ac_cv_func_'$cf_func'=yes'
5866 else
5867   echo "$as_me: program exited with status $ac_status" >&5
5868 echo "$as_me: failed program was:" >&5
5869 cat conftest.$ac_ext >&5
5870
5871                         eval 'ac_cv_func_'$cf_func'=no'
5872 fi
5873 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5874 fi
5875                 done
5876                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5877
5878 fi
5879 echo "$as_me:5879: result: $cf_cv_link_funcs" >&5
5880 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5881         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5882 #define HAVE_LINK 1
5883 EOF
5884
5885         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5886 #define HAVE_SYMLINK 1
5887 EOF
5888
5889 fi
5890
5891 with_links=no
5892 with_symlinks=no
5893
5894 if test "$ac_cv_func_link" != yes ; then
5895     echo "$as_me:5895: checking if tic should use symbolic links" >&5
5896 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5897     if test "$ac_cv_func_symlink" = yes ; then
5898         with_symlinks=yes
5899     else
5900         with_symlinks=no
5901     fi
5902     echo "$as_me:5902: result: $with_symlinks" >&5
5903 echo "${ECHO_T}$with_symlinks" >&6
5904 elif test "$ac_cv_func_symlink" != yes ; then
5905     echo "$as_me:5905: checking if tic should use hard links" >&5
5906 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5907     if test "$ac_cv_func_link" = yes ; then
5908         with_links=yes
5909     else
5910         with_links=no
5911     fi
5912     echo "$as_me:5912: result: $with_links" >&5
5913 echo "${ECHO_T}$with_links" >&6
5914 else
5915     echo "$as_me:5915: checking if tic should use symbolic links" >&5
5916 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5917
5918 # Check whether --enable-symlinks or --disable-symlinks was given.
5919 if test "${enable_symlinks+set}" = set; then
5920   enableval="$enable_symlinks"
5921   with_symlinks=$enableval
5922 else
5923   with_symlinks=no
5924 fi;
5925     echo "$as_me:5925: result: $with_symlinks" >&5
5926 echo "${ECHO_T}$with_symlinks" >&6
5927 fi
5928
5929 test "$with_links" = yes && cat >>confdefs.h <<\EOF
5930 #define USE_LINKS 1
5931 EOF
5932
5933 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5934 #define USE_SYMLINKS 1
5935 EOF
5936
5937 ###   use option --enable-broken-linker to force on use of broken-linker support
5938 echo "$as_me:5938: checking if you want broken-linker support code" >&5
5939 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5940
5941 # Check whether --enable-broken_linker or --disable-broken_linker was given.
5942 if test "${enable_broken_linker+set}" = set; then
5943   enableval="$enable_broken_linker"
5944   with_broken_linker=$enableval
5945 else
5946   with_broken_linker=${BROKEN_LINKER-no}
5947 fi;
5948 echo "$as_me:5948: result: $with_broken_linker" >&5
5949 echo "${ECHO_T}$with_broken_linker" >&6
5950
5951 BROKEN_LINKER=0
5952 if test "$with_broken_linker" = yes ; then
5953         cat >>confdefs.h <<\EOF
5954 #define BROKEN_LINKER 1
5955 EOF
5956
5957         BROKEN_LINKER=1
5958 elif test "$DFT_LWR_MODEL" = shared ; then
5959         case $cf_cv_system_name in #(vi
5960         cygwin*)
5961                 cat >>confdefs.h <<\EOF
5962 #define BROKEN_LINKER 1
5963 EOF
5964
5965                 BROKEN_LINKER=1
5966                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
5967
5968                 ;;
5969         esac
5970 fi
5971
5972 ###   use option --enable-widec to turn on use of wide-character support
5973 NCURSES_CH_T=chtype
5974 NCURSES_LIBUTF8=0
5975
5976 NEED_WCHAR_H=0
5977 NCURSES_MBSTATE_T=0
5978 NCURSES_WCHAR_T=0
5979 NCURSES_WINT_T=0
5980
5981 # Check to define _XOPEN_SOURCE "automatically"
5982
5983 echo "$as_me:5983: checking if $CC -U and -D options work together" >&5
5984 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
5985 if test "${cf_cv_cc_u_d_options+set}" = set; then
5986   echo $ECHO_N "(cached) $ECHO_C" >&6
5987 else
5988
5989         cf_save_CPPFLAGS="$CPPFLAGS"
5990         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
5991         cat >conftest.$ac_ext <<_ACEOF
5992 #line 5992 "configure"
5993 #include "confdefs.h"
5994
5995 int
5996 main ()
5997 {
5998
5999 #ifndef U_D_OPTIONS
6000 make an undefined-error
6001 #endif
6002 #ifdef  D_U_OPTIONS
6003 make a defined-error
6004 #endif
6005
6006   ;
6007   return 0;
6008 }
6009 _ACEOF
6010 rm -f conftest.$ac_objext
6011 if { (eval echo "$as_me:6011: \"$ac_compile\"") >&5
6012   (eval $ac_compile) 2>&5
6013   ac_status=$?
6014   echo "$as_me:6014: \$? = $ac_status" >&5
6015   (exit $ac_status); } &&
6016          { ac_try='test -s conftest.$ac_objext'
6017   { (eval echo "$as_me:6017: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:6020: \$? = $ac_status" >&5
6021   (exit $ac_status); }; }; then
6022
6023         cf_cv_cc_u_d_options=yes
6024 else
6025   echo "$as_me: failed program was:" >&5
6026 cat conftest.$ac_ext >&5
6027
6028         cf_cv_cc_u_d_options=no
6029 fi
6030 rm -f conftest.$ac_objext conftest.$ac_ext
6031         CPPFLAGS="$cf_save_CPPFLAGS"
6032
6033 fi
6034 echo "$as_me:6034: result: $cf_cv_cc_u_d_options" >&5
6035 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6036
6037 cf_XOPEN_SOURCE=500
6038 cf_POSIX_C_SOURCE=199506L
6039
6040 case $host_os in #(vi
6041 aix[45]*) #(vi
6042         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6043         ;;
6044 darwin*) #(vi
6045         # setting _XOPEN_SOURCE breaks things on Darwin
6046         ;;
6047 freebsd*) #(vi
6048         # 5.x headers associate
6049         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6050         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6051         cf_POSIX_C_SOURCE=200112L
6052         cf_XOPEN_SOURCE=600
6053         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6054         ;;
6055 hpux*) #(vi
6056         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6057         ;;
6058 irix[56].*) #(vi
6059         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6060         ;;
6061 linux*|gnu*) #(vi
6062
6063 echo "$as_me:6063: checking if we must define _GNU_SOURCE" >&5
6064 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6065 if test "${cf_cv_gnu_source+set}" = set; then
6066   echo $ECHO_N "(cached) $ECHO_C" >&6
6067 else
6068
6069 cat >conftest.$ac_ext <<_ACEOF
6070 #line 6070 "configure"
6071 #include "confdefs.h"
6072 #include <sys/types.h>
6073 int
6074 main ()
6075 {
6076
6077 #ifndef _XOPEN_SOURCE
6078 make an error
6079 #endif
6080   ;
6081   return 0;
6082 }
6083 _ACEOF
6084 rm -f conftest.$ac_objext
6085 if { (eval echo "$as_me:6085: \"$ac_compile\"") >&5
6086   (eval $ac_compile) 2>&5
6087   ac_status=$?
6088   echo "$as_me:6088: \$? = $ac_status" >&5
6089   (exit $ac_status); } &&
6090          { ac_try='test -s conftest.$ac_objext'
6091   { (eval echo "$as_me:6091: \"$ac_try\"") >&5
6092   (eval $ac_try) 2>&5
6093   ac_status=$?
6094   echo "$as_me:6094: \$? = $ac_status" >&5
6095   (exit $ac_status); }; }; then
6096   cf_cv_gnu_source=no
6097 else
6098   echo "$as_me: failed program was:" >&5
6099 cat conftest.$ac_ext >&5
6100 cf_save="$CPPFLAGS"
6101          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6102          cat >conftest.$ac_ext <<_ACEOF
6103 #line 6103 "configure"
6104 #include "confdefs.h"
6105 #include <sys/types.h>
6106 int
6107 main ()
6108 {
6109
6110 #ifdef _XOPEN_SOURCE
6111 make an error
6112 #endif
6113   ;
6114   return 0;
6115 }
6116 _ACEOF
6117 rm -f conftest.$ac_objext
6118 if { (eval echo "$as_me:6118: \"$ac_compile\"") >&5
6119   (eval $ac_compile) 2>&5
6120   ac_status=$?
6121   echo "$as_me:6121: \$? = $ac_status" >&5
6122   (exit $ac_status); } &&
6123          { ac_try='test -s conftest.$ac_objext'
6124   { (eval echo "$as_me:6124: \"$ac_try\"") >&5
6125   (eval $ac_try) 2>&5
6126   ac_status=$?
6127   echo "$as_me:6127: \$? = $ac_status" >&5
6128   (exit $ac_status); }; }; then
6129   cf_cv_gnu_source=no
6130 else
6131   echo "$as_me: failed program was:" >&5
6132 cat conftest.$ac_ext >&5
6133 cf_cv_gnu_source=yes
6134 fi
6135 rm -f conftest.$ac_objext conftest.$ac_ext
6136         CPPFLAGS="$cf_save"
6137
6138 fi
6139 rm -f conftest.$ac_objext conftest.$ac_ext
6140
6141 fi
6142 echo "$as_me:6142: result: $cf_cv_gnu_source" >&5
6143 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6144 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6145
6146         ;;
6147 mirbsd*) #(vi
6148         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6149         ;;
6150 netbsd*) #(vi
6151         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6152         ;;
6153 openbsd*) #(vi
6154         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6155         ;;
6156 osf[45]*) #(vi
6157         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6158         ;;
6159 nto-qnx*) #(vi
6160         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6161         ;;
6162 sco*) #(vi
6163         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6164         ;;
6165 solaris*) #(vi
6166         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6167         ;;
6168 *)
6169         echo "$as_me:6169: checking if we should define _XOPEN_SOURCE" >&5
6170 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6171 if test "${cf_cv_xopen_source+set}" = set; then
6172   echo $ECHO_N "(cached) $ECHO_C" >&6
6173 else
6174
6175         cat >conftest.$ac_ext <<_ACEOF
6176 #line 6176 "configure"
6177 #include "confdefs.h"
6178 #include <sys/types.h>
6179 int
6180 main ()
6181 {
6182
6183 #ifndef _XOPEN_SOURCE
6184 make an error
6185 #endif
6186   ;
6187   return 0;
6188 }
6189 _ACEOF
6190 rm -f conftest.$ac_objext
6191 if { (eval echo "$as_me:6191: \"$ac_compile\"") >&5
6192   (eval $ac_compile) 2>&5
6193   ac_status=$?
6194   echo "$as_me:6194: \$? = $ac_status" >&5
6195   (exit $ac_status); } &&
6196          { ac_try='test -s conftest.$ac_objext'
6197   { (eval echo "$as_me:6197: \"$ac_try\"") >&5
6198   (eval $ac_try) 2>&5
6199   ac_status=$?
6200   echo "$as_me:6200: \$? = $ac_status" >&5
6201   (exit $ac_status); }; }; then
6202   cf_cv_xopen_source=no
6203 else
6204   echo "$as_me: failed program was:" >&5
6205 cat conftest.$ac_ext >&5
6206 cf_save="$CPPFLAGS"
6207          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6208          cat >conftest.$ac_ext <<_ACEOF
6209 #line 6209 "configure"
6210 #include "confdefs.h"
6211 #include <sys/types.h>
6212 int
6213 main ()
6214 {
6215
6216 #ifdef _XOPEN_SOURCE
6217 make an error
6218 #endif
6219   ;
6220   return 0;
6221 }
6222 _ACEOF
6223 rm -f conftest.$ac_objext
6224 if { (eval echo "$as_me:6224: \"$ac_compile\"") >&5
6225   (eval $ac_compile) 2>&5
6226   ac_status=$?
6227   echo "$as_me:6227: \$? = $ac_status" >&5
6228   (exit $ac_status); } &&
6229          { ac_try='test -s conftest.$ac_objext'
6230   { (eval echo "$as_me:6230: \"$ac_try\"") >&5
6231   (eval $ac_try) 2>&5
6232   ac_status=$?
6233   echo "$as_me:6233: \$? = $ac_status" >&5
6234   (exit $ac_status); }; }; then
6235   cf_cv_xopen_source=no
6236 else
6237   echo "$as_me: failed program was:" >&5
6238 cat conftest.$ac_ext >&5
6239 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6240 fi
6241 rm -f conftest.$ac_objext conftest.$ac_ext
6242         CPPFLAGS="$cf_save"
6243
6244 fi
6245 rm -f conftest.$ac_objext conftest.$ac_ext
6246
6247 fi
6248 echo "$as_me:6248: result: $cf_cv_xopen_source" >&5
6249 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6250         if test "$cf_cv_xopen_source" != no ; then
6251
6252 # remove _XOPEN_SOURCE symbol from $CFLAGS
6253 CFLAGS=`echo "$CFLAGS" | \
6254         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6255                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6256
6257 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6258 CPPFLAGS=`echo "$CPPFLAGS" | \
6259         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6260                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6261
6262                 test "$cf_cv_cc_u_d_options" = yes && \
6263                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6264                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6265         fi
6266
6267 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6268
6269 cf_save_CFLAGS="$CFLAGS"
6270 cf_save_CPPFLAGS="$CPPFLAGS"
6271
6272 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6273 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6274         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6275                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6276
6277 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6278 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6279         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6280                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6281
6282 echo "$as_me:6282: checking if we should define _POSIX_C_SOURCE" >&5
6283 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6284 if test "${cf_cv_posix_c_source+set}" = set; then
6285   echo $ECHO_N "(cached) $ECHO_C" >&6
6286 else
6287
6288 echo "(line 6288) testing if the symbol is already defined go no further ..." 1>&5
6289
6290         cat >conftest.$ac_ext <<_ACEOF
6291 #line 6291 "configure"
6292 #include "confdefs.h"
6293 #include <sys/types.h>
6294 int
6295 main ()
6296 {
6297
6298 #ifndef _POSIX_C_SOURCE
6299 make an error
6300 #endif
6301   ;
6302   return 0;
6303 }
6304 _ACEOF
6305 rm -f conftest.$ac_objext
6306 if { (eval echo "$as_me:6306: \"$ac_compile\"") >&5
6307   (eval $ac_compile) 2>&5
6308   ac_status=$?
6309   echo "$as_me:6309: \$? = $ac_status" >&5
6310   (exit $ac_status); } &&
6311          { ac_try='test -s conftest.$ac_objext'
6312   { (eval echo "$as_me:6312: \"$ac_try\"") >&5
6313   (eval $ac_try) 2>&5
6314   ac_status=$?
6315   echo "$as_me:6315: \$? = $ac_status" >&5
6316   (exit $ac_status); }; }; then
6317   cf_cv_posix_c_source=no
6318 else
6319   echo "$as_me: failed program was:" >&5
6320 cat conftest.$ac_ext >&5
6321 cf_want_posix_source=no
6322          case .$cf_POSIX_C_SOURCE in #(vi
6323          .[12]??*) #(vi
6324                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6325                 ;;
6326          .2) #(vi
6327                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6328                 cf_want_posix_source=yes
6329                 ;;
6330          .*)
6331                 cf_want_posix_source=yes
6332                 ;;
6333          esac
6334          if test "$cf_want_posix_source" = yes ; then
6335                 cat >conftest.$ac_ext <<_ACEOF
6336 #line 6336 "configure"
6337 #include "confdefs.h"
6338 #include <sys/types.h>
6339 int
6340 main ()
6341 {
6342
6343 #ifdef _POSIX_SOURCE
6344 make an error
6345 #endif
6346   ;
6347   return 0;
6348 }
6349 _ACEOF
6350 rm -f conftest.$ac_objext
6351 if { (eval echo "$as_me:6351: \"$ac_compile\"") >&5
6352   (eval $ac_compile) 2>&5
6353   ac_status=$?
6354   echo "$as_me:6354: \$? = $ac_status" >&5
6355   (exit $ac_status); } &&
6356          { ac_try='test -s conftest.$ac_objext'
6357   { (eval echo "$as_me:6357: \"$ac_try\"") >&5
6358   (eval $ac_try) 2>&5
6359   ac_status=$?
6360   echo "$as_me:6360: \$? = $ac_status" >&5
6361   (exit $ac_status); }; }; then
6362   :
6363 else
6364   echo "$as_me: failed program was:" >&5
6365 cat conftest.$ac_ext >&5
6366 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6367 fi
6368 rm -f conftest.$ac_objext conftest.$ac_ext
6369          fi
6370
6371 echo "(line 6371) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6372
6373          CFLAGS="$cf_trim_CFLAGS"
6374          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6375
6376 echo "(line 6376) testing if the second compile does not leave our definition intact error ..." 1>&5
6377
6378          cat >conftest.$ac_ext <<_ACEOF
6379 #line 6379 "configure"
6380 #include "confdefs.h"
6381 #include <sys/types.h>
6382 int
6383 main ()
6384 {
6385
6386 #ifndef _POSIX_C_SOURCE
6387 make an error
6388 #endif
6389   ;
6390   return 0;
6391 }
6392 _ACEOF
6393 rm -f conftest.$ac_objext
6394 if { (eval echo "$as_me:6394: \"$ac_compile\"") >&5
6395   (eval $ac_compile) 2>&5
6396   ac_status=$?
6397   echo "$as_me:6397: \$? = $ac_status" >&5
6398   (exit $ac_status); } &&
6399          { ac_try='test -s conftest.$ac_objext'
6400   { (eval echo "$as_me:6400: \"$ac_try\"") >&5
6401   (eval $ac_try) 2>&5
6402   ac_status=$?
6403   echo "$as_me:6403: \$? = $ac_status" >&5
6404   (exit $ac_status); }; }; then
6405   :
6406 else
6407   echo "$as_me: failed program was:" >&5
6408 cat conftest.$ac_ext >&5
6409 cf_cv_posix_c_source=no
6410 fi
6411 rm -f conftest.$ac_objext conftest.$ac_ext
6412          CFLAGS="$cf_save_CFLAGS"
6413          CPPFLAGS="$cf_save_CPPFLAGS"
6414
6415 fi
6416 rm -f conftest.$ac_objext conftest.$ac_ext
6417
6418 fi
6419 echo "$as_me:6419: result: $cf_cv_posix_c_source" >&5
6420 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6421
6422 if test "$cf_cv_posix_c_source" != no ; then
6423         CFLAGS="$cf_trim_CFLAGS"
6424         CPPFLAGS="$cf_trim_CPPFLAGS"
6425         if test "$cf_cv_cc_u_d_options" = yes ; then
6426                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6427                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6428                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6429         fi
6430         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6431 fi
6432
6433         ;;
6434 esac
6435
6436 # Checks for CODESET support.
6437
6438   echo "$as_me:6438: checking for nl_langinfo and CODESET" >&5
6439 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6440 if test "${am_cv_langinfo_codeset+set}" = set; then
6441   echo $ECHO_N "(cached) $ECHO_C" >&6
6442 else
6443   cat >conftest.$ac_ext <<_ACEOF
6444 #line 6444 "configure"
6445 #include "confdefs.h"
6446 #include <langinfo.h>
6447 int
6448 main ()
6449 {
6450 char* cs = nl_langinfo(CODESET);
6451   ;
6452   return 0;
6453 }
6454 _ACEOF
6455 rm -f conftest.$ac_objext conftest$ac_exeext
6456 if { (eval echo "$as_me:6456: \"$ac_link\"") >&5
6457   (eval $ac_link) 2>&5
6458   ac_status=$?
6459   echo "$as_me:6459: \$? = $ac_status" >&5
6460   (exit $ac_status); } &&
6461          { ac_try='test -s conftest$ac_exeext'
6462   { (eval echo "$as_me:6462: \"$ac_try\"") >&5
6463   (eval $ac_try) 2>&5
6464   ac_status=$?
6465   echo "$as_me:6465: \$? = $ac_status" >&5
6466   (exit $ac_status); }; }; then
6467   am_cv_langinfo_codeset=yes
6468 else
6469   echo "$as_me: failed program was:" >&5
6470 cat conftest.$ac_ext >&5
6471 am_cv_langinfo_codeset=no
6472 fi
6473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6474
6475 fi
6476 echo "$as_me:6476: result: $am_cv_langinfo_codeset" >&5
6477 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6478   if test $am_cv_langinfo_codeset = yes; then
6479
6480 cat >>confdefs.h <<\EOF
6481 #define HAVE_LANGINFO_CODESET 1
6482 EOF
6483
6484   fi
6485
6486 # use these variables to work around a defect in gcc's fixincludes.
6487 NCURSES_OK_WCHAR_T=
6488 NCURSES_OK_WINT_T=
6489
6490 echo "$as_me:6490: checking if you want wide-character code" >&5
6491 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6492
6493 # Check whether --enable-widec or --disable-widec was given.
6494 if test "${enable_widec+set}" = set; then
6495   enableval="$enable_widec"
6496   with_widec=$enableval
6497 else
6498   with_widec=no
6499 fi;
6500 echo "$as_me:6500: result: $with_widec" >&5
6501 echo "${ECHO_T}$with_widec" >&6
6502 if test "$with_widec" = yes ; then
6503         LIB_SUFFIX="w${LIB_SUFFIX}"
6504         cat >>confdefs.h <<\EOF
6505 #define USE_WIDEC_SUPPORT 1
6506 EOF
6507
6508 echo "$as_me:6508: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6509 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6510 cat >conftest.$ac_ext <<_ACEOF
6511 #line 6511 "configure"
6512 #include "confdefs.h"
6513 #include <sys/types.h>
6514
6515 int
6516 main ()
6517 {
6518
6519 #ifndef _XOPEN_SOURCE_EXTENDED
6520 make an error
6521 #endif
6522   ;
6523   return 0;
6524 }
6525 _ACEOF
6526 rm -f conftest.$ac_objext
6527 if { (eval echo "$as_me:6527: \"$ac_compile\"") >&5
6528   (eval $ac_compile) 2>&5
6529   ac_status=$?
6530   echo "$as_me:6530: \$? = $ac_status" >&5
6531   (exit $ac_status); } &&
6532          { ac_try='test -s conftest.$ac_objext'
6533   { (eval echo "$as_me:6533: \"$ac_try\"") >&5
6534   (eval $ac_try) 2>&5
6535   ac_status=$?
6536   echo "$as_me:6536: \$? = $ac_status" >&5
6537   (exit $ac_status); }; }; then
6538   cf_result=no
6539 else
6540   echo "$as_me: failed program was:" >&5
6541 cat conftest.$ac_ext >&5
6542 cf_result=yes
6543 fi
6544 rm -f conftest.$ac_objext conftest.$ac_ext
6545 echo "$as_me:6545: result: $cf_result" >&5
6546 echo "${ECHO_T}$cf_result" >&6
6547
6548 if test "$cf_result" = yes ; then
6549         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6550 elif test "x" != "x" ; then
6551         echo "$as_me:6551: checking checking for compatible value versus " >&5
6552 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6553         cat >conftest.$ac_ext <<_ACEOF
6554 #line 6554 "configure"
6555 #include "confdefs.h"
6556 #include <sys/types.h>
6557
6558 int
6559 main ()
6560 {
6561
6562 #if _XOPEN_SOURCE_EXTENDED- < 0
6563 make an error
6564 #endif
6565   ;
6566   return 0;
6567 }
6568 _ACEOF
6569 rm -f conftest.$ac_objext
6570 if { (eval echo "$as_me:6570: \"$ac_compile\"") >&5
6571   (eval $ac_compile) 2>&5
6572   ac_status=$?
6573   echo "$as_me:6573: \$? = $ac_status" >&5
6574   (exit $ac_status); } &&
6575          { ac_try='test -s conftest.$ac_objext'
6576   { (eval echo "$as_me:6576: \"$ac_try\"") >&5
6577   (eval $ac_try) 2>&5
6578   ac_status=$?
6579   echo "$as_me:6579: \$? = $ac_status" >&5
6580   (exit $ac_status); }; }; then
6581   cf_result=yes
6582 else
6583   echo "$as_me: failed program was:" >&5
6584 cat conftest.$ac_ext >&5
6585 cf_result=no
6586 fi
6587 rm -f conftest.$ac_objext conftest.$ac_ext
6588         echo "$as_me:6588: result: $cf_result" >&5
6589 echo "${ECHO_T}$cf_result" >&6
6590         if test "$cf_result" = no ; then
6591                 # perhaps we can override it - try...
6592                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6593         fi
6594 fi
6595
6596         # with_overwrite=no
6597         NCURSES_CH_T=cchar_t
6598
6599 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6600 do
6601 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6602 echo "$as_me:6602: checking for $ac_func" >&5
6603 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6604 if eval "test \"\${$as_ac_var+set}\" = set"; then
6605   echo $ECHO_N "(cached) $ECHO_C" >&6
6606 else
6607   cat >conftest.$ac_ext <<_ACEOF
6608 #line 6608 "configure"
6609 #include "confdefs.h"
6610 /* System header to define __stub macros and hopefully few prototypes,
6611     which can conflict with char $ac_func (); below.  */
6612 #include <assert.h>
6613 /* Override any gcc2 internal prototype to avoid an error.  */
6614 #ifdef __cplusplus
6615 extern "C"
6616 #endif
6617 /* We use char because int might match the return type of a gcc2
6618    builtin and then its argument prototype would still apply.  */
6619 char $ac_func ();
6620 char (*f) ();
6621
6622 int
6623 main ()
6624 {
6625 /* The GNU C library defines this for functions which it implements
6626     to always fail with ENOSYS.  Some functions are actually named
6627     something starting with __ and the normal name is an alias.  */
6628 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6629 choke me
6630 #else
6631 f = $ac_func;
6632 #endif
6633
6634   ;
6635   return 0;
6636 }
6637 _ACEOF
6638 rm -f conftest.$ac_objext conftest$ac_exeext
6639 if { (eval echo "$as_me:6639: \"$ac_link\"") >&5
6640   (eval $ac_link) 2>&5
6641   ac_status=$?
6642   echo "$as_me:6642: \$? = $ac_status" >&5
6643   (exit $ac_status); } &&
6644          { ac_try='test -s conftest$ac_exeext'
6645   { (eval echo "$as_me:6645: \"$ac_try\"") >&5
6646   (eval $ac_try) 2>&5
6647   ac_status=$?
6648   echo "$as_me:6648: \$? = $ac_status" >&5
6649   (exit $ac_status); }; }; then
6650   eval "$as_ac_var=yes"
6651 else
6652   echo "$as_me: failed program was:" >&5
6653 cat conftest.$ac_ext >&5
6654 eval "$as_ac_var=no"
6655 fi
6656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6657 fi
6658 echo "$as_me:6658: result: `eval echo '${'$as_ac_var'}'`" >&5
6659 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6660 if test `eval echo '${'$as_ac_var'}'` = yes; then
6661   cat >>confdefs.h <<EOF
6662 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6663 EOF
6664
6665 fi
6666 done
6667
6668         if test "$ac_cv_func_putwc" != yes ; then
6669
6670 echo "$as_me:6670: checking for putwc in libutf8" >&5
6671 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6672 if test "${cf_cv_libutf8+set}" = set; then
6673   echo $ECHO_N "(cached) $ECHO_C" >&6
6674 else
6675
6676         cf_save_LIBS="$LIBS"
6677         LIBS="-lutf8 $LIBS"
6678 cat >conftest.$ac_ext <<_ACEOF
6679 #line 6679 "configure"
6680 #include "confdefs.h"
6681
6682 #include <libutf8.h>
6683 int
6684 main ()
6685 {
6686 putwc(0,0);
6687   ;
6688   return 0;
6689 }
6690 _ACEOF
6691 rm -f conftest.$ac_objext conftest$ac_exeext
6692 if { (eval echo "$as_me:6692: \"$ac_link\"") >&5
6693   (eval $ac_link) 2>&5
6694   ac_status=$?
6695   echo "$as_me:6695: \$? = $ac_status" >&5
6696   (exit $ac_status); } &&
6697          { ac_try='test -s conftest$ac_exeext'
6698   { (eval echo "$as_me:6698: \"$ac_try\"") >&5
6699   (eval $ac_try) 2>&5
6700   ac_status=$?
6701   echo "$as_me:6701: \$? = $ac_status" >&5
6702   (exit $ac_status); }; }; then
6703   cf_cv_libutf8=yes
6704 else
6705   echo "$as_me: failed program was:" >&5
6706 cat conftest.$ac_ext >&5
6707 cf_cv_libutf8=no
6708 fi
6709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6710         LIBS="$cf_save_LIBS"
6711
6712 fi
6713 echo "$as_me:6713: result: $cf_cv_libutf8" >&5
6714 echo "${ECHO_T}$cf_cv_libutf8" >&6
6715
6716 if test "$cf_cv_libutf8" = yes ; then
6717         cat >>confdefs.h <<\EOF
6718 #define HAVE_LIBUTF8_H 1
6719 EOF
6720
6721         LIBS="-lutf8 $LIBS"
6722 fi
6723
6724                 if test "$cf_cv_libutf8" = yes ; then
6725                         NCURSES_LIBUTF8=1
6726                 fi
6727         fi
6728
6729 # This is needed on Tru64 5.0 to declare mbstate_t
6730 echo "$as_me:6730: checking if we must include wchar.h to declare mbstate_t" >&5
6731 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6732 if test "${cf_cv_mbstate_t+set}" = set; then
6733   echo $ECHO_N "(cached) $ECHO_C" >&6
6734 else
6735
6736 cat >conftest.$ac_ext <<_ACEOF
6737 #line 6737 "configure"
6738 #include "confdefs.h"
6739
6740 #include <stdlib.h>
6741 #include <stdarg.h>
6742 #include <stdio.h>
6743 #ifdef HAVE_LIBUTF8_H
6744 #include <libutf8.h>
6745 #endif
6746 int
6747 main ()
6748 {
6749 mbstate_t state
6750   ;
6751   return 0;
6752 }
6753 _ACEOF
6754 rm -f conftest.$ac_objext
6755 if { (eval echo "$as_me:6755: \"$ac_compile\"") >&5
6756   (eval $ac_compile) 2>&5
6757   ac_status=$?
6758   echo "$as_me:6758: \$? = $ac_status" >&5
6759   (exit $ac_status); } &&
6760          { ac_try='test -s conftest.$ac_objext'
6761   { (eval echo "$as_me:6761: \"$ac_try\"") >&5
6762   (eval $ac_try) 2>&5
6763   ac_status=$?
6764   echo "$as_me:6764: \$? = $ac_status" >&5
6765   (exit $ac_status); }; }; then
6766   cf_cv_mbstate_t=no
6767 else
6768   echo "$as_me: failed program was:" >&5
6769 cat conftest.$ac_ext >&5
6770 cat >conftest.$ac_ext <<_ACEOF
6771 #line 6771 "configure"
6772 #include "confdefs.h"
6773
6774 #include <stdlib.h>
6775 #include <stdarg.h>
6776 #include <stdio.h>
6777 #include <wchar.h>
6778 #ifdef HAVE_LIBUTF8_H
6779 #include <libutf8.h>
6780 #endif
6781 int
6782 main ()
6783 {
6784 mbstate_t value
6785   ;
6786   return 0;
6787 }
6788 _ACEOF
6789 rm -f conftest.$ac_objext
6790 if { (eval echo "$as_me:6790: \"$ac_compile\"") >&5
6791   (eval $ac_compile) 2>&5
6792   ac_status=$?
6793   echo "$as_me:6793: \$? = $ac_status" >&5
6794   (exit $ac_status); } &&
6795          { ac_try='test -s conftest.$ac_objext'
6796   { (eval echo "$as_me:6796: \"$ac_try\"") >&5
6797   (eval $ac_try) 2>&5
6798   ac_status=$?
6799   echo "$as_me:6799: \$? = $ac_status" >&5
6800   (exit $ac_status); }; }; then
6801   cf_cv_mbstate_t=yes
6802 else
6803   echo "$as_me: failed program was:" >&5
6804 cat conftest.$ac_ext >&5
6805 cf_cv_mbstate_t=unknown
6806 fi
6807 rm -f conftest.$ac_objext conftest.$ac_ext
6808 fi
6809 rm -f conftest.$ac_objext conftest.$ac_ext
6810 fi
6811 echo "$as_me:6811: result: $cf_cv_mbstate_t" >&5
6812 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
6813
6814 if test "$cf_cv_mbstate_t" = yes ; then
6815         cat >>confdefs.h <<\EOF
6816 #define NEED_WCHAR_H 1
6817 EOF
6818
6819         NEED_WCHAR_H=1
6820 fi
6821
6822 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
6823 if test "$cf_cv_mbstate_t" = unknown ; then
6824         NCURSES_MBSTATE_T=1
6825 fi
6826
6827 # This is needed on Tru64 5.0 to declare wchar_t
6828 echo "$as_me:6828: checking if we must include wchar.h to declare wchar_t" >&5
6829 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
6830 if test "${cf_cv_wchar_t+set}" = set; then
6831   echo $ECHO_N "(cached) $ECHO_C" >&6
6832 else
6833
6834 cat >conftest.$ac_ext <<_ACEOF
6835 #line 6835 "configure"
6836 #include "confdefs.h"
6837
6838 #include <stdlib.h>
6839 #include <stdarg.h>
6840 #include <stdio.h>
6841 #ifdef HAVE_LIBUTF8_H
6842 #include <libutf8.h>
6843 #endif
6844 int
6845 main ()
6846 {
6847 wchar_t state
6848   ;
6849   return 0;
6850 }
6851 _ACEOF
6852 rm -f conftest.$ac_objext
6853 if { (eval echo "$as_me:6853: \"$ac_compile\"") >&5
6854   (eval $ac_compile) 2>&5
6855   ac_status=$?
6856   echo "$as_me:6856: \$? = $ac_status" >&5
6857   (exit $ac_status); } &&
6858          { ac_try='test -s conftest.$ac_objext'
6859   { (eval echo "$as_me:6859: \"$ac_try\"") >&5
6860   (eval $ac_try) 2>&5
6861   ac_status=$?
6862   echo "$as_me:6862: \$? = $ac_status" >&5
6863   (exit $ac_status); }; }; then
6864   cf_cv_wchar_t=no
6865 else
6866   echo "$as_me: failed program was:" >&5
6867 cat conftest.$ac_ext >&5
6868 cat >conftest.$ac_ext <<_ACEOF
6869 #line 6869 "configure"
6870 #include "confdefs.h"
6871
6872 #include <stdlib.h>
6873 #include <stdarg.h>
6874 #include <stdio.h>
6875 #include <wchar.h>
6876 #ifdef HAVE_LIBUTF8_H
6877 #include <libutf8.h>
6878 #endif
6879 int
6880 main ()
6881 {
6882 wchar_t value
6883   ;
6884   return 0;
6885 }
6886 _ACEOF
6887 rm -f conftest.$ac_objext
6888 if { (eval echo "$as_me:6888: \"$ac_compile\"") >&5
6889   (eval $ac_compile) 2>&5
6890   ac_status=$?
6891   echo "$as_me:6891: \$? = $ac_status" >&5
6892   (exit $ac_status); } &&
6893          { ac_try='test -s conftest.$ac_objext'
6894   { (eval echo "$as_me:6894: \"$ac_try\"") >&5
6895   (eval $ac_try) 2>&5
6896   ac_status=$?
6897   echo "$as_me:6897: \$? = $ac_status" >&5
6898   (exit $ac_status); }; }; then
6899   cf_cv_wchar_t=yes
6900 else
6901   echo "$as_me: failed program was:" >&5
6902 cat conftest.$ac_ext >&5
6903 cf_cv_wchar_t=unknown
6904 fi
6905 rm -f conftest.$ac_objext conftest.$ac_ext
6906 fi
6907 rm -f conftest.$ac_objext conftest.$ac_ext
6908 fi
6909 echo "$as_me:6909: result: $cf_cv_wchar_t" >&5
6910 echo "${ECHO_T}$cf_cv_wchar_t" >&6
6911
6912 if test "$cf_cv_wchar_t" = yes ; then
6913         cat >>confdefs.h <<\EOF
6914 #define NEED_WCHAR_H 1
6915 EOF
6916
6917         NEED_WCHAR_H=1
6918 fi
6919
6920 # if we do not find wchar_t in either place, use substitution to provide a fallback.
6921 if test "$cf_cv_wchar_t" = unknown ; then
6922         NCURSES_WCHAR_T=1
6923 fi
6924
6925 # if we find wchar_t in either place, use substitution to provide a fallback.
6926 if test "$cf_cv_wchar_t" != unknown ; then
6927         NCURSES_OK_WCHAR_T=1
6928 fi
6929
6930 # This is needed on Tru64 5.0 to declare wint_t
6931 echo "$as_me:6931: checking if we must include wchar.h to declare wint_t" >&5
6932 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
6933 if test "${cf_cv_wint_t+set}" = set; then
6934   echo $ECHO_N "(cached) $ECHO_C" >&6
6935 else
6936
6937 cat >conftest.$ac_ext <<_ACEOF
6938 #line 6938 "configure"
6939 #include "confdefs.h"
6940
6941 #include <stdlib.h>
6942 #include <stdarg.h>
6943 #include <stdio.h>
6944 #ifdef HAVE_LIBUTF8_H
6945 #include <libutf8.h>
6946 #endif
6947 int
6948 main ()
6949 {
6950 wint_t state
6951   ;
6952   return 0;
6953 }
6954 _ACEOF
6955 rm -f conftest.$ac_objext
6956 if { (eval echo "$as_me:6956: \"$ac_compile\"") >&5
6957   (eval $ac_compile) 2>&5
6958   ac_status=$?
6959   echo "$as_me:6959: \$? = $ac_status" >&5
6960   (exit $ac_status); } &&
6961          { ac_try='test -s conftest.$ac_objext'
6962   { (eval echo "$as_me:6962: \"$ac_try\"") >&5
6963   (eval $ac_try) 2>&5
6964   ac_status=$?
6965   echo "$as_me:6965: \$? = $ac_status" >&5
6966   (exit $ac_status); }; }; then
6967   cf_cv_wint_t=no
6968 else
6969   echo "$as_me: failed program was:" >&5
6970 cat conftest.$ac_ext >&5
6971 cat >conftest.$ac_ext <<_ACEOF
6972 #line 6972 "configure"
6973 #include "confdefs.h"
6974
6975 #include <stdlib.h>
6976 #include <stdarg.h>
6977 #include <stdio.h>
6978 #include <wchar.h>
6979 #ifdef HAVE_LIBUTF8_H
6980 #include <libutf8.h>
6981 #endif
6982 int
6983 main ()
6984 {
6985 wint_t value
6986   ;
6987   return 0;
6988 }
6989 _ACEOF
6990 rm -f conftest.$ac_objext
6991 if { (eval echo "$as_me:6991: \"$ac_compile\"") >&5
6992   (eval $ac_compile) 2>&5
6993   ac_status=$?
6994   echo "$as_me:6994: \$? = $ac_status" >&5
6995   (exit $ac_status); } &&
6996          { ac_try='test -s conftest.$ac_objext'
6997   { (eval echo "$as_me:6997: \"$ac_try\"") >&5
6998   (eval $ac_try) 2>&5
6999   ac_status=$?
7000   echo "$as_me:7000: \$? = $ac_status" >&5
7001   (exit $ac_status); }; }; then
7002   cf_cv_wint_t=yes
7003 else
7004   echo "$as_me: failed program was:" >&5
7005 cat conftest.$ac_ext >&5
7006 cf_cv_wint_t=unknown
7007 fi
7008 rm -f conftest.$ac_objext conftest.$ac_ext
7009 fi
7010 rm -f conftest.$ac_objext conftest.$ac_ext
7011 fi
7012 echo "$as_me:7012: result: $cf_cv_wint_t" >&5
7013 echo "${ECHO_T}$cf_cv_wint_t" >&6
7014
7015 if test "$cf_cv_wint_t" = yes ; then
7016         cat >>confdefs.h <<\EOF
7017 #define NEED_WCHAR_H 1
7018 EOF
7019
7020         NEED_WCHAR_H=1
7021 fi
7022
7023 # if we do not find wint_t in either place, use substitution to provide a fallback.
7024 if test "$cf_cv_wint_t" = unknown ; then
7025         NCURSES_WINT_T=1
7026 fi
7027
7028 # if we find wint_t in either place, use substitution to provide a fallback.
7029 if test "$cf_cv_wint_t" != unknown ; then
7030         NCURSES_OK_WINT_T=1
7031 fi
7032
7033         if test "$NCURSES_MBSTATE_T" != 0; then
7034                 cat >>confdefs.h <<\EOF
7035 #define NEED_MBSTATE_T_DEF 1
7036 EOF
7037
7038         fi
7039 fi
7040
7041 ###   use option --disable-lp64 to allow long chtype
7042 case $cf_cv_abi_version in
7043 [345]*)
7044         default_with_lp64=no
7045         ;;
7046 *)
7047         default_with_lp64=yes
7048         ;;
7049 esac
7050
7051 echo "$as_me:7051: checking whether to enable _LP64 definition in curses.h" >&5
7052 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7053
7054 # Check whether --enable-lp64 or --disable-lp64 was given.
7055 if test "${enable_lp64+set}" = set; then
7056   enableval="$enable_lp64"
7057   with_lp64=$enableval
7058 else
7059   with_lp64=$default_with_lp64
7060 fi;
7061 echo "$as_me:7061: result: $with_lp64" >&5
7062 echo "${ECHO_T}$with_lp64" >&6
7063
7064 if test "$with_lp64" = yes ; then
7065         cf_cv_enable_lp64=1
7066 else
7067         cf_cv_enable_lp64=0
7068 fi
7069
7070         echo "$as_me:7070: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7071 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7072 if test "${ac_cv_sys_largefile_source+set}" = set; then
7073   echo $ECHO_N "(cached) $ECHO_C" >&6
7074 else
7075   while :; do
7076   ac_cv_sys_largefile_source=no
7077   cat >conftest.$ac_ext <<_ACEOF
7078 #line 7078 "configure"
7079 #include "confdefs.h"
7080 #include <stdio.h>
7081 int
7082 main ()
7083 {
7084 return !fseeko;
7085   ;
7086   return 0;
7087 }
7088 _ACEOF
7089 rm -f conftest.$ac_objext
7090 if { (eval echo "$as_me:7090: \"$ac_compile\"") >&5
7091   (eval $ac_compile) 2>&5
7092   ac_status=$?
7093   echo "$as_me:7093: \$? = $ac_status" >&5
7094   (exit $ac_status); } &&
7095          { ac_try='test -s conftest.$ac_objext'
7096   { (eval echo "$as_me:7096: \"$ac_try\"") >&5
7097   (eval $ac_try) 2>&5
7098   ac_status=$?
7099   echo "$as_me:7099: \$? = $ac_status" >&5
7100   (exit $ac_status); }; }; then
7101   break
7102 else
7103   echo "$as_me: failed program was:" >&5
7104 cat conftest.$ac_ext >&5
7105 fi
7106 rm -f conftest.$ac_objext conftest.$ac_ext
7107   cat >conftest.$ac_ext <<_ACEOF
7108 #line 7108 "configure"
7109 #include "confdefs.h"
7110 #define _LARGEFILE_SOURCE 1
7111 #include <stdio.h>
7112 int
7113 main ()
7114 {
7115 return !fseeko;
7116   ;
7117   return 0;
7118 }
7119 _ACEOF
7120 rm -f conftest.$ac_objext
7121 if { (eval echo "$as_me:7121: \"$ac_compile\"") >&5
7122   (eval $ac_compile) 2>&5
7123   ac_status=$?
7124   echo "$as_me:7124: \$? = $ac_status" >&5
7125   (exit $ac_status); } &&
7126          { ac_try='test -s conftest.$ac_objext'
7127   { (eval echo "$as_me:7127: \"$ac_try\"") >&5
7128   (eval $ac_try) 2>&5
7129   ac_status=$?
7130   echo "$as_me:7130: \$? = $ac_status" >&5
7131   (exit $ac_status); }; }; then
7132   ac_cv_sys_largefile_source=1; break
7133 else
7134   echo "$as_me: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
7136 fi
7137 rm -f conftest.$ac_objext conftest.$ac_ext
7138   break
7139 done
7140 fi
7141 echo "$as_me:7141: result: $ac_cv_sys_largefile_source" >&5
7142 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7143 if test "$ac_cv_sys_largefile_source" != no; then
7144
7145 cat >>confdefs.h <<EOF
7146 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7147 EOF
7148
7149 fi
7150 rm -f conftest*
7151
7152 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7153 # in glibc 2.1.3, but that breaks too many other things.
7154 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7155 echo "$as_me:7155: checking for fseeko" >&5
7156 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7157 if test "${ac_cv_func_fseeko+set}" = set; then
7158   echo $ECHO_N "(cached) $ECHO_C" >&6
7159 else
7160   cat >conftest.$ac_ext <<_ACEOF
7161 #line 7161 "configure"
7162 #include "confdefs.h"
7163 #include <stdio.h>
7164 int
7165 main ()
7166 {
7167 return fseeko && fseeko (stdin, 0, 0);
7168   ;
7169   return 0;
7170 }
7171 _ACEOF
7172 rm -f conftest.$ac_objext conftest$ac_exeext
7173 if { (eval echo "$as_me:7173: \"$ac_link\"") >&5
7174   (eval $ac_link) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); } &&
7178          { ac_try='test -s conftest$ac_exeext'
7179   { (eval echo "$as_me:7179: \"$ac_try\"") >&5
7180   (eval $ac_try) 2>&5
7181   ac_status=$?
7182   echo "$as_me:7182: \$? = $ac_status" >&5
7183   (exit $ac_status); }; }; then
7184   ac_cv_func_fseeko=yes
7185 else
7186   echo "$as_me: failed program was:" >&5
7187 cat conftest.$ac_ext >&5
7188 ac_cv_func_fseeko=no
7189 fi
7190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7191 fi
7192 echo "$as_me:7192: result: $ac_cv_func_fseeko" >&5
7193 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7194 if test $ac_cv_func_fseeko = yes; then
7195
7196 cat >>confdefs.h <<\EOF
7197 #define HAVE_FSEEKO 1
7198 EOF
7199
7200 fi
7201
7202 # Check whether --enable-largefile or --disable-largefile was given.
7203 if test "${enable_largefile+set}" = set; then
7204   enableval="$enable_largefile"
7205
7206 fi;
7207 if test "$enable_largefile" != no; then
7208
7209   echo "$as_me:7209: checking for special C compiler options needed for large files" >&5
7210 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7211 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7212   echo $ECHO_N "(cached) $ECHO_C" >&6
7213 else
7214   ac_cv_sys_largefile_CC=no
7215      if test "$GCC" != yes; then
7216        ac_save_CC=$CC
7217        while :; do
7218          # IRIX 6.2 and later do not support large files by default,
7219          # so use the C compiler's -n32 option if that helps.
7220          cat >conftest.$ac_ext <<_ACEOF
7221 #line 7221 "configure"
7222 #include "confdefs.h"
7223 #include <sys/types.h>
7224  /* Check that off_t can represent 2**63 - 1 correctly.
7225     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7226     since some C++ compilers masquerading as C compilers
7227     incorrectly reject 9223372036854775807.  */
7228 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7229   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7230                        && LARGE_OFF_T % 2147483647 == 1)
7231                       ? 1 : -1];
7232 int
7233 main ()
7234 {
7235
7236   ;
7237   return 0;
7238 }
7239 _ACEOF
7240          rm -f conftest.$ac_objext
7241 if { (eval echo "$as_me:7241: \"$ac_compile\"") >&5
7242   (eval $ac_compile) 2>&5
7243   ac_status=$?
7244   echo "$as_me:7244: \$? = $ac_status" >&5
7245   (exit $ac_status); } &&
7246          { ac_try='test -s conftest.$ac_objext'
7247   { (eval echo "$as_me:7247: \"$ac_try\"") >&5
7248   (eval $ac_try) 2>&5
7249   ac_status=$?
7250   echo "$as_me:7250: \$? = $ac_status" >&5
7251   (exit $ac_status); }; }; then
7252   break
7253 else
7254   echo "$as_me: failed program was:" >&5
7255 cat conftest.$ac_ext >&5
7256 fi
7257 rm -f conftest.$ac_objext
7258          CC="$CC -n32"
7259          rm -f conftest.$ac_objext
7260 if { (eval echo "$as_me:7260: \"$ac_compile\"") >&5
7261   (eval $ac_compile) 2>&5
7262   ac_status=$?
7263   echo "$as_me:7263: \$? = $ac_status" >&5
7264   (exit $ac_status); } &&
7265          { ac_try='test -s conftest.$ac_objext'
7266   { (eval echo "$as_me:7266: \"$ac_try\"") >&5
7267   (eval $ac_try) 2>&5
7268   ac_status=$?
7269   echo "$as_me:7269: \$? = $ac_status" >&5
7270   (exit $ac_status); }; }; then
7271   ac_cv_sys_largefile_CC=' -n32'; break
7272 else
7273   echo "$as_me: failed program was:" >&5
7274 cat conftest.$ac_ext >&5
7275 fi
7276 rm -f conftest.$ac_objext
7277          break
7278        done
7279        CC=$ac_save_CC
7280        rm -f conftest.$ac_ext
7281     fi
7282 fi
7283 echo "$as_me:7283: result: $ac_cv_sys_largefile_CC" >&5
7284 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7285   if test "$ac_cv_sys_largefile_CC" != no; then
7286     CC=$CC$ac_cv_sys_largefile_CC
7287   fi
7288
7289   echo "$as_me:7289: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7290 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7291 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7292   echo $ECHO_N "(cached) $ECHO_C" >&6
7293 else
7294   while :; do
7295   ac_cv_sys_file_offset_bits=no
7296   cat >conftest.$ac_ext <<_ACEOF
7297 #line 7297 "configure"
7298 #include "confdefs.h"
7299 #include <sys/types.h>
7300  /* Check that off_t can represent 2**63 - 1 correctly.
7301     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7302     since some C++ compilers masquerading as C compilers
7303     incorrectly reject 9223372036854775807.  */
7304 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7305   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7306                        && LARGE_OFF_T % 2147483647 == 1)
7307                       ? 1 : -1];
7308 int
7309 main ()
7310 {
7311
7312   ;
7313   return 0;
7314 }
7315 _ACEOF
7316 rm -f conftest.$ac_objext
7317 if { (eval echo "$as_me:7317: \"$ac_compile\"") >&5
7318   (eval $ac_compile) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); } &&
7322          { ac_try='test -s conftest.$ac_objext'
7323   { (eval echo "$as_me:7323: \"$ac_try\"") >&5
7324   (eval $ac_try) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); }; }; then
7328   break
7329 else
7330   echo "$as_me: failed program was:" >&5
7331 cat conftest.$ac_ext >&5
7332 fi
7333 rm -f conftest.$ac_objext conftest.$ac_ext
7334   cat >conftest.$ac_ext <<_ACEOF
7335 #line 7335 "configure"
7336 #include "confdefs.h"
7337 #define _FILE_OFFSET_BITS 64
7338 #include <sys/types.h>
7339  /* Check that off_t can represent 2**63 - 1 correctly.
7340     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7341     since some C++ compilers masquerading as C compilers
7342     incorrectly reject 9223372036854775807.  */
7343 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7344   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7345                        && LARGE_OFF_T % 2147483647 == 1)
7346                       ? 1 : -1];
7347 int
7348 main ()
7349 {
7350
7351   ;
7352   return 0;
7353 }
7354 _ACEOF
7355 rm -f conftest.$ac_objext
7356 if { (eval echo "$as_me:7356: \"$ac_compile\"") >&5
7357   (eval $ac_compile) 2>&5
7358   ac_status=$?
7359   echo "$as_me:7359: \$? = $ac_status" >&5
7360   (exit $ac_status); } &&
7361          { ac_try='test -s conftest.$ac_objext'
7362   { (eval echo "$as_me:7362: \"$ac_try\"") >&5
7363   (eval $ac_try) 2>&5
7364   ac_status=$?
7365   echo "$as_me:7365: \$? = $ac_status" >&5
7366   (exit $ac_status); }; }; then
7367   ac_cv_sys_file_offset_bits=64; break
7368 else
7369   echo "$as_me: failed program was:" >&5
7370 cat conftest.$ac_ext >&5
7371 fi
7372 rm -f conftest.$ac_objext conftest.$ac_ext
7373   break
7374 done
7375 fi
7376 echo "$as_me:7376: result: $ac_cv_sys_file_offset_bits" >&5
7377 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7378 if test "$ac_cv_sys_file_offset_bits" != no; then
7379
7380 cat >>confdefs.h <<EOF
7381 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7382 EOF
7383
7384 fi
7385 rm -f conftest*
7386   echo "$as_me:7386: checking for _LARGE_FILES value needed for large files" >&5
7387 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7388 if test "${ac_cv_sys_large_files+set}" = set; then
7389   echo $ECHO_N "(cached) $ECHO_C" >&6
7390 else
7391   while :; do
7392   ac_cv_sys_large_files=no
7393   cat >conftest.$ac_ext <<_ACEOF
7394 #line 7394 "configure"
7395 #include "confdefs.h"
7396 #include <sys/types.h>
7397  /* Check that off_t can represent 2**63 - 1 correctly.
7398     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7399     since some C++ compilers masquerading as C compilers
7400     incorrectly reject 9223372036854775807.  */
7401 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7402   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7403                        && LARGE_OFF_T % 2147483647 == 1)
7404                       ? 1 : -1];
7405 int
7406 main ()
7407 {
7408
7409   ;
7410   return 0;
7411 }
7412 _ACEOF
7413 rm -f conftest.$ac_objext
7414 if { (eval echo "$as_me:7414: \"$ac_compile\"") >&5
7415   (eval $ac_compile) 2>&5
7416   ac_status=$?
7417   echo "$as_me:7417: \$? = $ac_status" >&5
7418   (exit $ac_status); } &&
7419          { ac_try='test -s conftest.$ac_objext'
7420   { (eval echo "$as_me:7420: \"$ac_try\"") >&5
7421   (eval $ac_try) 2>&5
7422   ac_status=$?
7423   echo "$as_me:7423: \$? = $ac_status" >&5
7424   (exit $ac_status); }; }; then
7425   break
7426 else
7427   echo "$as_me: failed program was:" >&5
7428 cat conftest.$ac_ext >&5
7429 fi
7430 rm -f conftest.$ac_objext conftest.$ac_ext
7431   cat >conftest.$ac_ext <<_ACEOF
7432 #line 7432 "configure"
7433 #include "confdefs.h"
7434 #define _LARGE_FILES 1
7435 #include <sys/types.h>
7436  /* Check that off_t can represent 2**63 - 1 correctly.
7437     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7438     since some C++ compilers masquerading as C compilers
7439     incorrectly reject 9223372036854775807.  */
7440 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7441   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7442                        && LARGE_OFF_T % 2147483647 == 1)
7443                       ? 1 : -1];
7444 int
7445 main ()
7446 {
7447
7448   ;
7449   return 0;
7450 }
7451 _ACEOF
7452 rm -f conftest.$ac_objext
7453 if { (eval echo "$as_me:7453: \"$ac_compile\"") >&5
7454   (eval $ac_compile) 2>&5
7455   ac_status=$?
7456   echo "$as_me:7456: \$? = $ac_status" >&5
7457   (exit $ac_status); } &&
7458          { ac_try='test -s conftest.$ac_objext'
7459   { (eval echo "$as_me:7459: \"$ac_try\"") >&5
7460   (eval $ac_try) 2>&5
7461   ac_status=$?
7462   echo "$as_me:7462: \$? = $ac_status" >&5
7463   (exit $ac_status); }; }; then
7464   ac_cv_sys_large_files=1; break
7465 else
7466   echo "$as_me: failed program was:" >&5
7467 cat conftest.$ac_ext >&5
7468 fi
7469 rm -f conftest.$ac_objext conftest.$ac_ext
7470   break
7471 done
7472 fi
7473 echo "$as_me:7473: result: $ac_cv_sys_large_files" >&5
7474 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7475 if test "$ac_cv_sys_large_files" != no; then
7476
7477 cat >>confdefs.h <<EOF
7478 #define _LARGE_FILES $ac_cv_sys_large_files
7479 EOF
7480
7481 fi
7482 rm -f conftest*
7483 fi
7484
7485         # Normally we would collect these definitions in the config.h,
7486         # but (like _XOPEN_SOURCE), some environments rely on having these
7487         # defined before any of the system headers are included.  Another
7488         # case comes up with C++, e.g., on AIX the compiler compiles the
7489         # header files by themselves before looking at the body files it is
7490         # told to compile.  For ncurses, those header files do not include
7491         # the config.h
7492         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7493         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7494
7495         echo "$as_me:7495: checking whether to use struct dirent64" >&5
7496 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7497 if test "${cf_cv_struct_dirent64+set}" = set; then
7498   echo $ECHO_N "(cached) $ECHO_C" >&6
7499 else
7500
7501                 cat >conftest.$ac_ext <<_ACEOF
7502 #line 7502 "configure"
7503 #include "confdefs.h"
7504
7505 #include <sys/types.h>
7506 #include <dirent.h>
7507
7508 int
7509 main ()
7510 {
7511
7512                 /* if transitional largefile support is setup, this is true */
7513                 extern struct dirent64 * readdir(DIR *);
7514                 struct dirent64 *x = readdir((DIR *)0);
7515                 struct dirent *y = readdir((DIR *)0);
7516                 int z = x - y;
7517
7518   ;
7519   return 0;
7520 }
7521 _ACEOF
7522 rm -f conftest.$ac_objext
7523 if { (eval echo "$as_me:7523: \"$ac_compile\"") >&5
7524   (eval $ac_compile) 2>&5
7525   ac_status=$?
7526   echo "$as_me:7526: \$? = $ac_status" >&5
7527   (exit $ac_status); } &&
7528          { ac_try='test -s conftest.$ac_objext'
7529   { (eval echo "$as_me:7529: \"$ac_try\"") >&5
7530   (eval $ac_try) 2>&5
7531   ac_status=$?
7532   echo "$as_me:7532: \$? = $ac_status" >&5
7533   (exit $ac_status); }; }; then
7534   cf_cv_struct_dirent64=yes
7535 else
7536   echo "$as_me: failed program was:" >&5
7537 cat conftest.$ac_ext >&5
7538 cf_cv_struct_dirent64=no
7539 fi
7540 rm -f conftest.$ac_objext conftest.$ac_ext
7541
7542 fi
7543 echo "$as_me:7543: result: $cf_cv_struct_dirent64" >&5
7544 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7545         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7546 #define HAVE_STRUCT_DIRENT64 1
7547 EOF
7548
7549 ###   use option --with-bool to override bool's type
7550 echo "$as_me:7550: checking for type of bool" >&5
7551 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7552
7553 # Check whether --with-bool or --without-bool was given.
7554 if test "${with_bool+set}" = set; then
7555   withval="$with_bool"
7556   NCURSES_BOOL="$withval"
7557 else
7558   NCURSES_BOOL=auto
7559 fi;
7560 echo "$as_me:7560: result: $NCURSES_BOOL" >&5
7561 echo "${ECHO_T}$NCURSES_BOOL" >&6
7562
7563 echo "$as_me:7563: checking for alternate terminal capabilities file" >&5
7564 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7565
7566 # Check whether --with-caps or --without-caps was given.
7567 if test "${with_caps+set}" = set; then
7568   withval="$with_caps"
7569   TERMINFO_CAPS=Caps.$withval
7570 else
7571   TERMINFO_CAPS=Caps
7572 fi;
7573 test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
7574 echo "$as_me:7574: result: $TERMINFO_CAPS" >&5
7575 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7576
7577 ###   use option --with-chtype to override chtype's type
7578 echo "$as_me:7578: checking for type of chtype" >&5
7579 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7580
7581 # Check whether --with-chtype or --without-chtype was given.
7582 if test "${with_chtype+set}" = set; then
7583   withval="$with_chtype"
7584   NCURSES_CHTYPE="$withval"
7585 else
7586   NCURSES_CHTYPE=auto
7587 fi;
7588 echo "$as_me:7588: result: $NCURSES_CHTYPE" >&5
7589 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7590
7591 ###   use option --with-ospeed to override ospeed's type
7592 echo "$as_me:7592: checking for type of ospeed" >&5
7593 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7594
7595 # Check whether --with-ospeed or --without-ospeed was given.
7596 if test "${with_ospeed+set}" = set; then
7597   withval="$with_ospeed"
7598   NCURSES_OSPEED="$withval"
7599 else
7600   NCURSES_OSPEED=short
7601 fi;
7602 echo "$as_me:7602: result: $NCURSES_OSPEED" >&5
7603 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7604
7605 ###   use option --with-mmask-t to override mmask_t's type
7606 echo "$as_me:7606: checking for type of mmask_t" >&5
7607 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7608
7609 # Check whether --with-mmask-t or --without-mmask-t was given.
7610 if test "${with_mmask_t+set}" = set; then
7611   withval="$with_mmask_t"
7612   NCURSES_MMASK_T="$withval"
7613 else
7614   NCURSES_MMASK_T=auto
7615 fi;
7616 echo "$as_me:7616: result: $NCURSES_MMASK_T" >&5
7617 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7618
7619 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7620 echo "$as_me:7620: checking if tputs should process BSD-style prefix padding" >&5
7621 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7622
7623 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7624 if test "${enable_bsdpad+set}" = set; then
7625   enableval="$enable_bsdpad"
7626   with_bsdpad=$enableval
7627 else
7628   with_bsdpad=no
7629 fi;
7630 echo "$as_me:7630: result: $with_bsdpad" >&5
7631 echo "${ECHO_T}$with_bsdpad" >&6
7632 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7633 #define BSD_TPUTS 1
7634 EOF
7635
7636 ### Enable compiling-in rcs id's
7637 echo "$as_me:7637: checking if RCS identifiers should be compiled-in" >&5
7638 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7639
7640 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7641 if test "${with_rcs_ids+set}" = set; then
7642   withval="$with_rcs_ids"
7643   with_rcs_ids=$withval
7644 else
7645   with_rcs_ids=no
7646 fi;
7647 echo "$as_me:7647: result: $with_rcs_ids" >&5
7648 echo "${ECHO_T}$with_rcs_ids" >&6
7649 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7650 #define USE_RCS_IDS 1
7651 EOF
7652
7653 ###############################################################################
7654
7655 echo "$as_me:7655: checking format of man-pages" >&5
7656 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7657
7658 # Check whether --with-manpage-format or --without-manpage-format was given.
7659 if test "${with_manpage_format+set}" = set; then
7660   withval="$with_manpage_format"
7661   MANPAGE_FORMAT=$withval
7662 else
7663   MANPAGE_FORMAT=unknown
7664 fi;
7665
7666 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7667 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7668
7669 cf_unknown=
7670
7671 case $MANPAGE_FORMAT in
7672 unknown)
7673   if test -z "$MANPATH" ; then
7674     MANPATH="/usr/man:/usr/share/man"
7675   fi
7676
7677   # look for the 'date' man-page (it's most likely to be installed!)
7678   MANPAGE_FORMAT=
7679   cf_preform=no
7680   cf_catonly=yes
7681   cf_example=date
7682
7683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7684   for cf_dir in $MANPATH; do
7685     test -z "$cf_dir" && cf_dir=/usr/man
7686     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
7687     do
7688       cf_test=`echo $cf_name | sed -e 's/*//'`
7689       if test "x$cf_test" = "x$cf_name" ; then
7690
7691         case "$cf_name" in
7692         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7693         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7694         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7695         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7696         esac
7697
7698         case "$cf_name" in
7699         $cf_dir/man*)
7700           cf_catonly=no
7701           ;;
7702         $cf_dir/cat*)
7703           cf_preform=yes
7704           ;;
7705         esac
7706         break
7707       fi
7708
7709       # if we found a match in either man* or cat*, stop looking
7710       if test -n "$MANPAGE_FORMAT" ; then
7711         cf_found=no
7712         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7713         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7714         case "$cf_name" in
7715         $cf_dir/cat*)
7716           cf_found=yes
7717           ;;
7718         esac
7719         test $cf_found=yes && break
7720       fi
7721     done
7722     # only check the first directory in $MANPATH where we find manpages
7723     if test -n "$MANPAGE_FORMAT" ; then
7724        break
7725     fi
7726   done
7727   # if we did not find the example, just assume it is normal
7728   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7729   IFS="$ac_save_ifs"
7730   ;;
7731 *)
7732   for cf_option in $MANPAGE_FORMAT; do
7733      case $cf_option in #(vi
7734      gzip|compress|BSDI|normal|formatted|catonly)
7735        ;;
7736      *)
7737        cf_unknown="$cf_unknown $cf_option"
7738        ;;
7739      esac
7740   done
7741   ;;
7742 esac
7743
7744 echo "$as_me:7744: result: $MANPAGE_FORMAT" >&5
7745 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7746 if test -n "$cf_unknown" ; then
7747   { echo "$as_me:7747: WARNING: Unexpected manpage-format $cf_unknown" >&5
7748 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7749 fi
7750
7751 echo "$as_me:7751: checking for manpage renaming" >&5
7752 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7753
7754 # Check whether --with-manpage-renames or --without-manpage-renames was given.
7755 if test "${with_manpage_renames+set}" = set; then
7756   withval="$with_manpage_renames"
7757   MANPAGE_RENAMES=$withval
7758 else
7759   MANPAGE_RENAMES=yes
7760 fi;
7761
7762 case ".$MANPAGE_RENAMES" in #(vi
7763 .no) #(vi
7764   ;;
7765 .|.yes)
7766   # Debian 'man' program?
7767   if test -f /etc/debian_version ; then
7768     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7769   else
7770     MANPAGE_RENAMES=no
7771   fi
7772   ;;
7773 esac
7774
7775 if test "$MANPAGE_RENAMES" != no ; then
7776   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7777     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7778   elif test ! -f $MANPAGE_RENAMES ; then
7779     { { echo "$as_me:7779: error: not a filename: $MANPAGE_RENAMES" >&5
7780 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7781    { (exit 1); exit 1; }; }
7782   fi
7783
7784   test ! -d man && mkdir man
7785
7786   # Construct a sed-script to perform renaming within man-pages
7787   if test -n "$MANPAGE_RENAMES" ; then
7788     test ! -d man && mkdir man
7789     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
7790   fi
7791 fi
7792
7793 echo "$as_me:7793: result: $MANPAGE_RENAMES" >&5
7794 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
7795
7796 echo "$as_me:7796: checking if manpage aliases will be installed" >&5
7797 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
7798
7799 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
7800 if test "${with_manpage_aliases+set}" = set; then
7801   withval="$with_manpage_aliases"
7802   MANPAGE_ALIASES=$withval
7803 else
7804   MANPAGE_ALIASES=yes
7805 fi;
7806
7807 echo "$as_me:7807: result: $MANPAGE_ALIASES" >&5
7808 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
7809
7810 if test "$LN_S" = "ln -s"; then
7811         cf_use_symlinks=yes
7812 else
7813         cf_use_symlinks=no
7814 fi
7815
7816 MANPAGE_SYMLINKS=no
7817 if test "$MANPAGE_ALIASES" = yes ; then
7818 echo "$as_me:7818: checking if manpage symlinks should be used" >&5
7819 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
7820
7821 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
7822 if test "${with_manpage_symlinks+set}" = set; then
7823   withval="$with_manpage_symlinks"
7824   MANPAGE_SYMLINKS=$withval
7825 else
7826   MANPAGE_SYMLINKS=$cf_use_symlinks
7827 fi;
7828
7829 if test "$$cf_use_symlinks" = no; then
7830 if test "$MANPAGE_SYMLINKS" = yes ; then
7831         { echo "$as_me:7831: WARNING: cannot make symlinks" >&5
7832 echo "$as_me: WARNING: cannot make symlinks" >&2;}
7833         MANPAGE_SYMLINKS=no
7834 fi
7835 fi
7836
7837 echo "$as_me:7837: result: $MANPAGE_SYMLINKS" >&5
7838 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
7839 fi
7840
7841 echo "$as_me:7841: checking for manpage tbl" >&5
7842 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
7843
7844 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
7845 if test "${with_manpage_tbl+set}" = set; then
7846   withval="$with_manpage_tbl"
7847   MANPAGE_TBL=$withval
7848 else
7849   MANPAGE_TBL=no
7850 fi;
7851
7852 echo "$as_me:7852: result: $MANPAGE_TBL" >&5
7853 echo "${ECHO_T}$MANPAGE_TBL" >&6
7854
7855   if test "$prefix" = "NONE" ; then
7856      cf_prefix="$ac_default_prefix"
7857   else
7858      cf_prefix="$prefix"
7859   fi
7860
7861   case "$MANPAGE_FORMAT" in # (vi
7862   *catonly*) # (vi
7863     cf_format=yes
7864     cf_inboth=no
7865     ;;
7866   *formatted*) # (vi
7867     cf_format=yes
7868     cf_inboth=yes
7869     ;;
7870   *)
7871     cf_format=no
7872     cf_inboth=no
7873     ;;
7874   esac
7875
7876 test ! -d man && mkdir man
7877
7878 cf_so_strip=
7879 cf_compress=
7880 case "$MANPAGE_FORMAT" in #(vi
7881 *compress*) #(vi
7882         cf_so_strip="Z"
7883         cf_compress=compress
7884   ;;
7885 *gzip*) #(vi
7886         cf_so_strip="gz"
7887         cf_compress=gzip
7888   ;;
7889 esac
7890
7891 cf_edit_man=./edit_man.sh
7892
7893 cat >$cf_edit_man <<CF_EOF
7894 #! /bin/sh
7895 # this script is generated by the configure-script CF_MAN_PAGES macro.
7896 prefix="$cf_prefix"
7897 datadir="$datadir"
7898 NCURSES_OSPEED="$NCURSES_OSPEED"
7899 TERMINFO="$TERMINFO"
7900 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
7901 INSTALL="$INSTALL"
7902 INSTALL_DATA="$INSTALL_DATA"
7903 transform="$program_transform_name"
7904
7905 TMP=\${TMPDIR-/tmp}/man\$\$
7906 trap "rm -f \$TMP" 0 1 2 5 15
7907
7908 form=\$1
7909 shift || exit 1
7910
7911 verb=\$1
7912 shift || exit 1
7913
7914 mandir=\$1
7915 shift || exit 1
7916
7917 srcdir=\$1
7918 top_srcdir=\$srcdir/..
7919 shift || exit 1
7920
7921 if test "\$form" = normal ; then
7922         if test "$cf_format" = yes ; then
7923         if test "$cf_inboth" = no ; then
7924                 sh \$0 format \$verb \$mandir \$srcdir \$*
7925                 exit $?
7926         fi
7927         fi
7928         cf_subdir=\$mandir/man
7929         cf_tables=$MANPAGE_TBL
7930 else
7931         cf_subdir=\$mandir/cat
7932         cf_tables=yes
7933 fi
7934
7935 # process the list of source-files
7936 for i in \$* ; do
7937 case \$i in #(vi
7938 *.orig|*.rej) ;; #(vi
7939 *.[0-9]*)
7940         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
7941         if test \$verb = installing ; then
7942         if test ! -d \$cf_subdir\${section} ; then
7943                 \$MKDIRS \$cf_subdir\$section
7944         fi
7945         fi
7946         aliases=
7947         source=\`basename \$i\`
7948         inalias=\$source
7949         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
7950         if test ! -f \$inalias ; then
7951                 echo .. skipped \$source
7952                 continue
7953         fi
7954 CF_EOF
7955
7956 if test "$MANPAGE_ALIASES" != no ; then
7957 cat >>$cf_edit_man <<CF_EOF
7958         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias | sort -u\`
7959 CF_EOF
7960 fi
7961
7962 if test "$MANPAGE_RENAMES" = no ; then
7963 cat >>$cf_edit_man <<CF_EOF
7964         # perform program transformations for section 1 man pages
7965         if test \$section = 1 ; then
7966                 target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
7967         else
7968                 target=\$cf_subdir\${section}/\$source
7969         fi
7970 CF_EOF
7971 else
7972 cat >>$cf_edit_man <<CF_EOF
7973         target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
7974         if test -z "\$target" ; then
7975                 echo '? missing rename for '\$source
7976                 target="\$source"
7977         fi
7978         target="\$cf_subdir\${section}/\${target}"
7979 CF_EOF
7980 fi
7981
7982         # replace variables in man page
7983
7984         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
7985         do
7986 cat >>$cf_edit_man <<CF_EOF
7987         prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
7988 CF_EOF
7989         done
7990
7991 cat >>$cf_edit_man <<CF_EOF
7992         sed     -e "s,@DATADIR@,\$datadir," \\
7993                 -e "s,@TERMINFO@,\$TERMINFO," \\
7994                 -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
7995 CF_EOF
7996
7997         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
7998         do
7999                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8000 cat >>$cf_edit_man <<CF_EOF
8001                 -e "s,@$cf_NAME@,\$prog_$cf_name," \\
8002 CF_EOF
8003         done
8004
8005 if test -f $MANPAGE_RENAMES ; then
8006 cat >>$cf_edit_man <<CF_EOF
8007                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8008 CF_EOF
8009 else
8010 cat >>$cf_edit_man <<CF_EOF
8011                 < \$i >\$TMP
8012 CF_EOF
8013 fi
8014
8015 cat >>$cf_edit_man <<CF_EOF
8016 if test \$cf_tables = yes ; then
8017         tbl \$TMP >\$TMP.out
8018         mv \$TMP.out \$TMP
8019 fi
8020 CF_EOF
8021
8022 if test $with_curses_h != yes ; then
8023 cat >>$cf_edit_man <<CF_EOF
8024         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8025         mv \$TMP.out \$TMP
8026 CF_EOF
8027 fi
8028
8029 cat >>$cf_edit_man <<CF_EOF
8030         if test \$form = format ; then
8031                 nroff -man \$TMP >\$TMP.out
8032                 mv \$TMP.out \$TMP
8033         fi
8034 CF_EOF
8035
8036 if test -n "$cf_compress" ; then
8037 cat >>$cf_edit_man <<CF_EOF
8038         if test \$verb = installing ; then
8039         if ( $cf_compress -f \$TMP )
8040         then
8041                 mv \$TMP.$cf_so_strip \$TMP
8042         fi
8043         fi
8044         target="\$target.$cf_so_strip"
8045 CF_EOF
8046 fi
8047
8048 case "$MANPAGE_FORMAT" in #(vi
8049 *BSDI*)
8050 cat >>$cf_edit_man <<CF_EOF
8051         if test \$form = format ; then
8052                 # BSDI installs only .0 suffixes in the cat directories
8053                 target="\`echo \$target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8054         fi
8055 CF_EOF
8056   ;;
8057 esac
8058
8059 cat >>$cf_edit_man <<CF_EOF
8060         suffix=\`basename \$target | sed -e 's%^[^.]*%%'\`
8061         if test \$verb = installing ; then
8062                 echo \$verb \$target
8063                 \$INSTALL_DATA \$TMP \$target
8064                 test -n "\$aliases" && (
8065                         cd \$cf_subdir\${section} && (
8066                                 source=\`echo \$target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8067                                 test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
8068                                 target=\`basename \$target\`
8069                                 for cf_alias in \$aliases
8070                                 do
8071                                         if test \$section = 1 ; then
8072                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8073                                         fi
8074
8075                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8076                                                 if test -f \$cf_alias\${suffix} ; then
8077                                                         if ( cmp -s \$target \$cf_alias\${suffix} )
8078                                                         then
8079                                                                 continue
8080                                                         fi
8081                                                 fi
8082                                                 echo .. \$verb alias \$cf_alias\${suffix}
8083                                                 rm -f \$cf_alias\${suffix}
8084                                                 $LN_S \$target \$cf_alias\${suffix}
8085                                         elif test "\$target" != "\$cf_alias\${suffix}" ; then
8086                                                 echo ".so \$source" >\$TMP
8087 CF_EOF
8088 if test -n "$cf_compress" ; then
8089 cat >>$cf_edit_man <<CF_EOF
8090                                                 if test -n "$cf_so_strip" ; then
8091                                                         $cf_compress -f \$TMP
8092                                                         mv \$TMP.$cf_so_strip \$TMP
8093                                                 fi
8094 CF_EOF
8095 fi
8096 cat >>$cf_edit_man <<CF_EOF
8097                                                 echo .. \$verb alias \$cf_alias\${suffix}
8098                                                 rm -f \$cf_alias\${suffix}
8099                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8100                                         fi
8101                                 done
8102                         )
8103                 )
8104         elif test \$verb = removing ; then
8105                 echo \$verb \$target
8106                 rm -f \$target
8107                 test -n "\$aliases" && (
8108                         cd \$cf_subdir\${section} && (
8109                                 for cf_alias in \$aliases
8110                                 do
8111                                         if test \$section = 1 ; then
8112                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8113                                         fi
8114
8115                                         echo .. \$verb alias \$cf_alias\${suffix}
8116                                         rm -f \$cf_alias\${suffix}
8117                                 done
8118                         )
8119                 )
8120         else
8121 #               echo ".hy 0"
8122                 cat \$TMP
8123         fi
8124         ;;
8125 esac
8126 done
8127
8128 if test $cf_inboth = yes ; then
8129 if test \$form != format ; then
8130         sh \$0 format \$verb \$mandir \$srcdir \$*
8131 fi
8132 fi
8133
8134 exit 0
8135 CF_EOF
8136 chmod 755 $cf_edit_man
8137
8138 ###############################################################################
8139
8140 ### Note that some functions (such as const) are normally disabled anyway.
8141 echo "$as_me:8141: checking if you want to build with function extensions" >&5
8142 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8143
8144 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8145 if test "${enable_ext_funcs+set}" = set; then
8146   enableval="$enable_ext_funcs"
8147   with_ext_funcs=$enableval
8148 else
8149   with_ext_funcs=yes
8150 fi;
8151 echo "$as_me:8151: result: $with_ext_funcs" >&5
8152 echo "${ECHO_T}$with_ext_funcs" >&6
8153 if test "$with_ext_funcs" = yes ; then
8154         NCURSES_EXT_FUNCS=1
8155         cat >>confdefs.h <<\EOF
8156 #define HAVE_CURSES_VERSION 1
8157 EOF
8158
8159         cat >>confdefs.h <<\EOF
8160 #define HAVE_HAS_KEY 1
8161 EOF
8162
8163         cat >>confdefs.h <<\EOF
8164 #define HAVE_RESIZETERM 1
8165 EOF
8166
8167         cat >>confdefs.h <<\EOF
8168 #define HAVE_RESIZE_TERM 1
8169 EOF
8170
8171         cat >>confdefs.h <<\EOF
8172 #define HAVE_USE_DEFAULT_COLORS 1
8173 EOF
8174
8175         cat >>confdefs.h <<\EOF
8176 #define HAVE_WRESIZE 1
8177 EOF
8178
8179         cat >>confdefs.h <<\EOF
8180 #define NCURSES_EXT_FUNCS 1
8181 EOF
8182
8183 else
8184         NCURSES_EXT_FUNCS=0
8185 fi
8186
8187 ###   use option --enable-const to turn on use of const beyond that in XSI.
8188 echo "$as_me:8188: checking for extended use of const keyword" >&5
8189 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8190
8191 # Check whether --enable-const or --disable-const was given.
8192 if test "${enable_const+set}" = set; then
8193   enableval="$enable_const"
8194   with_ext_const=$enableval
8195 else
8196   with_ext_const=no
8197 fi;
8198 echo "$as_me:8198: result: $with_ext_const" >&5
8199 echo "${ECHO_T}$with_ext_const" >&6
8200 NCURSES_CONST='/*nothing*/'
8201 if test "$with_ext_const" = yes ; then
8202         NCURSES_CONST=const
8203 fi
8204
8205 echo "$as_me:8205: checking if you want \$NCURSES_NO_PADDING code" >&5
8206 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8207
8208 # Check whether --enable-no-padding or --disable-no-padding was given.
8209 if test "${enable_no_padding+set}" = set; then
8210   enableval="$enable_no_padding"
8211   with_no_padding=$enableval
8212 else
8213   with_no_padding=$with_ext_funcs
8214 fi;
8215 echo "$as_me:8215: result: $with_no_padding" >&5
8216 echo "${ECHO_T}$with_no_padding" >&6
8217 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8218 #define NCURSES_NO_PADDING 1
8219 EOF
8220
8221 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8222 echo "$as_me:8222: checking if you want SIGWINCH handler" >&5
8223 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8224
8225 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8226 if test "${enable_sigwinch+set}" = set; then
8227   enableval="$enable_sigwinch"
8228   with_sigwinch=$enableval
8229 else
8230   with_sigwinch=$with_ext_funcs
8231 fi;
8232 echo "$as_me:8232: result: $with_sigwinch" >&5
8233 echo "${ECHO_T}$with_sigwinch" >&6
8234 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8235 #define USE_SIGWINCH 1
8236 EOF
8237
8238 ###   use option --enable-tcap-names to allow user to define new capabilities
8239 echo "$as_me:8239: checking if you want user-definable terminal capabilities like termcap" >&5
8240 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8241
8242 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8243 if test "${enable_tcap_names+set}" = set; then
8244   enableval="$enable_tcap_names"
8245   with_tcap_names=$enableval
8246 else
8247   with_tcap_names=$with_ext_funcs
8248 fi;
8249 echo "$as_me:8249: result: $with_tcap_names" >&5
8250 echo "${ECHO_T}$with_tcap_names" >&6
8251 NCURSES_XNAMES=0
8252 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8253
8254 ###############################################################################
8255 # These options are relatively safe to experiment with.
8256
8257 echo "$as_me:8257: checking if you want all development code" >&5
8258 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8259
8260 # Check whether --with-develop or --without-develop was given.
8261 if test "${with_develop+set}" = set; then
8262   withval="$with_develop"
8263   with_develop=$withval
8264 else
8265   with_develop=no
8266 fi;
8267 echo "$as_me:8267: result: $with_develop" >&5
8268 echo "${ECHO_T}$with_develop" >&6
8269
8270 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8271 echo "$as_me:8271: checking if you want hard-tabs code" >&5
8272 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8273
8274 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8275 if test "${enable_hard_tabs+set}" = set; then
8276   enableval="$enable_hard_tabs"
8277   with_hardtabs=$enableval
8278 else
8279   with_hardtabs=$with_develop
8280 fi;
8281 echo "$as_me:8281: result: $with_hardtabs" >&5
8282 echo "${ECHO_T}$with_hardtabs" >&6
8283 test "$with_hardtabs" = yes && cat >>confdefs.h <<\EOF
8284 #define USE_HARD_TABS 1
8285 EOF
8286
8287 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8288 echo "$as_me:8288: checking if you want limited support for xmc" >&5
8289 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8290
8291 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8292 if test "${enable_xmc_glitch+set}" = set; then
8293   enableval="$enable_xmc_glitch"
8294   with_xmc_glitch=$enableval
8295 else
8296   with_xmc_glitch=$with_develop
8297 fi;
8298 echo "$as_me:8298: result: $with_xmc_glitch" >&5
8299 echo "${ECHO_T}$with_xmc_glitch" >&6
8300 test "$with_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8301 #define USE_XMC_SUPPORT 1
8302 EOF
8303
8304 ###############################################################################
8305 # These are just experimental, probably should not be in a package:
8306
8307 echo "$as_me:8307: checking if you do not want to assume colors are white-on-black" >&5
8308 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8309
8310 # Check whether --enable-assumed-color or --disable-assumed-color was given.
8311 if test "${enable_assumed_color+set}" = set; then
8312   enableval="$enable_assumed_color"
8313   with_assumed_color=$enableval
8314 else
8315   with_assumed_color=yes
8316 fi;
8317 echo "$as_me:8317: result: $with_assumed_color" >&5
8318 echo "${ECHO_T}$with_assumed_color" >&6
8319 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8320 #define USE_ASSUMED_COLOR 1
8321 EOF
8322
8323 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8324 echo "$as_me:8324: checking if you want hashmap scrolling-optimization code" >&5
8325 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8326
8327 # Check whether --enable-hashmap or --disable-hashmap was given.
8328 if test "${enable_hashmap+set}" = set; then
8329   enableval="$enable_hashmap"
8330   with_hashmap=$enableval
8331 else
8332   with_hashmap=yes
8333 fi;
8334 echo "$as_me:8334: result: $with_hashmap" >&5
8335 echo "${ECHO_T}$with_hashmap" >&6
8336 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
8337 #define USE_HASHMAP 1
8338 EOF
8339
8340 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
8341 echo "$as_me:8341: checking if you want colorfgbg code" >&5
8342 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
8343
8344 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
8345 if test "${enable_colorfgbg+set}" = set; then
8346   enableval="$enable_colorfgbg"
8347   with_colorfgbg=$enableval
8348 else
8349   with_colorfgbg=no
8350 fi;
8351 echo "$as_me:8351: result: $with_colorfgbg" >&5
8352 echo "${ECHO_T}$with_colorfgbg" >&6
8353 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
8354 #define USE_COLORFGBG 1
8355 EOF
8356
8357 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8358 echo "$as_me:8358: checking if you want to use experimental extended colors" >&5
8359 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
8360
8361 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8362 if test "${enable_ext_colors+set}" = set; then
8363   enableval="$enable_ext_colors"
8364   with_ext_colors=$enableval
8365 else
8366   with_ext_colors=no
8367 fi;
8368 echo "$as_me:8368: result: $with_ext_colors" >&5
8369 echo "${ECHO_T}$with_ext_colors" >&6
8370 NCURSES_EXT_COLORS=0
8371 if test "$with_ext_colors" = yes ; then
8372         if test "$with_widec" != yes ; then
8373                 { echo "$as_me:8373: WARNING: This option applies only to wide-character library" >&5
8374 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
8375         else
8376                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8377
8378 if test "${with_abi_version+set}" != set; then
8379         case $cf_cv_rel_version in
8380         5.*)
8381                 cf_cv_rel_version=6.0
8382                 cf_cv_abi_version=6
8383                 { echo "$as_me:8383: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8384 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8385                 ;;
8386         esac
8387 fi
8388
8389         fi
8390         NCURSES_EXT_COLORS=1
8391         cat >>confdefs.h <<\EOF
8392 #define NCURSES_EXT_COLORS 1
8393 EOF
8394
8395 fi
8396
8397 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
8398 echo "$as_me:8398: checking if you want to use experimental extended mouse encoding" >&5
8399 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
8400
8401 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
8402 if test "${enable_ext_mouse+set}" = set; then
8403   enableval="$enable_ext_mouse"
8404   with_ext_mouse=$enableval
8405 else
8406   with_ext_mouse=no
8407 fi;
8408 echo "$as_me:8408: result: $with_ext_mouse" >&5
8409 echo "${ECHO_T}$with_ext_mouse" >&6
8410 NCURSES_MOUSE_VERSION=1
8411 if test "$with_ext_mouse" = yes ; then
8412         NCURSES_MOUSE_VERSION=2
8413
8414 if test "${with_abi_version+set}" != set; then
8415         case $cf_cv_rel_version in
8416         5.*)
8417                 cf_cv_rel_version=6.0
8418                 cf_cv_abi_version=6
8419                 { echo "$as_me:8419: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8420 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8421                 ;;
8422         esac
8423 fi
8424
8425 fi
8426
8427 echo "$as_me:8427: checking if you want experimental safe-sprintf code" >&5
8428 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
8429
8430 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
8431 if test "${enable_safe_sprintf+set}" = set; then
8432   enableval="$enable_safe_sprintf"
8433   with_safe_sprintf=$enableval
8434 else
8435   with_safe_sprintf=no
8436 fi;
8437 echo "$as_me:8437: result: $with_safe_sprintf" >&5
8438 echo "${ECHO_T}$with_safe_sprintf" >&6
8439 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
8440 #define USE_SAFE_SPRINTF 1
8441 EOF
8442
8443 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
8444 # when hashmap is used scroll hints are useless
8445 if test "$with_hashmap" = no ; then
8446 echo "$as_me:8446: checking if you want to experiment without scrolling-hints code" >&5
8447 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
8448
8449 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
8450 if test "${enable_scroll_hints+set}" = set; then
8451   enableval="$enable_scroll_hints"
8452   with_scroll_hints=$enableval
8453 else
8454   with_scroll_hints=yes
8455 fi;
8456 echo "$as_me:8456: result: $with_scroll_hints" >&5
8457 echo "${ECHO_T}$with_scroll_hints" >&6
8458 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
8459 #define USE_SCROLL_HINTS 1
8460 EOF
8461
8462 fi
8463
8464 ###############################################################################
8465
8466 ###     use option --disable-echo to suppress full display compiling commands
8467 echo "$as_me:8467: checking if you want to display full commands during build" >&5
8468 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
8469
8470 # Check whether --enable-echo or --disable-echo was given.
8471 if test "${enable_echo+set}" = set; then
8472   enableval="$enable_echo"
8473   with_echo=$enableval
8474 else
8475   with_echo=yes
8476 fi;
8477 if test "$with_echo" = yes; then
8478         ECHO_LINK=
8479 else
8480         ECHO_LINK='@ echo linking $@ ... ;'
8481         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
8482 fi
8483 echo "$as_me:8483: result: $with_echo" >&5
8484 echo "${ECHO_T}$with_echo" >&6
8485
8486 ###     use option --enable-warnings to turn on all gcc warnings
8487 echo "$as_me:8487: checking if you want to see compiler warnings" >&5
8488 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
8489
8490 # Check whether --enable-warnings or --disable-warnings was given.
8491 if test "${enable_warnings+set}" = set; then
8492   enableval="$enable_warnings"
8493   with_warnings=$enableval
8494 fi;
8495 echo "$as_me:8495: result: $with_warnings" >&5
8496 echo "${ECHO_T}$with_warnings" >&6
8497
8498 if test -n "$with_warnings"; then
8499         ADAFLAGS="$ADAFLAGS -gnatg"
8500
8501 INTEL_COMPILER=no
8502
8503 if test "$GCC" = yes ; then
8504         case $host_os in
8505         linux*|gnu*)
8506                 echo "$as_me:8506: checking if this is really Intel C compiler" >&5
8507 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
8508                 cf_save_CFLAGS="$CFLAGS"
8509                 CFLAGS="$CFLAGS -no-gcc"
8510                 cat >conftest.$ac_ext <<_ACEOF
8511 #line 8511 "configure"
8512 #include "confdefs.h"
8513
8514 int
8515 main ()
8516 {
8517
8518 #ifdef __INTEL_COMPILER
8519 #else
8520 make an error
8521 #endif
8522
8523   ;
8524   return 0;
8525 }
8526 _ACEOF
8527 rm -f conftest.$ac_objext
8528 if { (eval echo "$as_me:8528: \"$ac_compile\"") >&5
8529   (eval $ac_compile) 2>&5
8530   ac_status=$?
8531   echo "$as_me:8531: \$? = $ac_status" >&5
8532   (exit $ac_status); } &&
8533          { ac_try='test -s conftest.$ac_objext'
8534   { (eval echo "$as_me:8534: \"$ac_try\"") >&5
8535   (eval $ac_try) 2>&5
8536   ac_status=$?
8537   echo "$as_me:8537: \$? = $ac_status" >&5
8538   (exit $ac_status); }; }; then
8539   INTEL_COMPILER=yes
8540 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
8541
8542 else
8543   echo "$as_me: failed program was:" >&5
8544 cat conftest.$ac_ext >&5
8545 fi
8546 rm -f conftest.$ac_objext conftest.$ac_ext
8547                 CFLAGS="$cf_save_CFLAGS"
8548                 echo "$as_me:8548: result: $INTEL_COMPILER" >&5
8549 echo "${ECHO_T}$INTEL_COMPILER" >&6
8550                 ;;
8551         esac
8552 fi
8553
8554 cat > conftest.$ac_ext <<EOF
8555 #line 8555 "configure"
8556 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
8557 EOF
8558
8559 if test "$INTEL_COMPILER" = yes
8560 then
8561 # The "-wdXXX" options suppress warnings:
8562 # remark #1419: external declaration in primary source file
8563 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8564 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8565 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
8566 # remark #193: zero used for undefined preprocessing identifier
8567 # remark #593: variable "curs_sb_left_arrow" was set but never used
8568 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
8569 # remark #869: parameter "tw" was never referenced
8570 # remark #981: operands are evaluated in unspecified order
8571 # warning #269: invalid format string conversion
8572
8573         { echo "$as_me:8573: checking for $CC warning options..." >&5
8574 echo "$as_me: checking for $CC warning options..." >&6;}
8575         cf_save_CFLAGS="$CFLAGS"
8576         EXTRA_CFLAGS="-Wall"
8577         for cf_opt in  \
8578                 wd1419 \
8579                 wd1682 \
8580                 wd1683 \
8581                 wd1684 \
8582                 wd193 \
8583                 wd279 \
8584                 wd593 \
8585                 wd810 \
8586                 wd869 \
8587                 wd981
8588         do
8589                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
8590                 if { (eval echo "$as_me:8590: \"$ac_compile\"") >&5
8591   (eval $ac_compile) 2>&5
8592   ac_status=$?
8593   echo "$as_me:8593: \$? = $ac_status" >&5
8594   (exit $ac_status); }; then
8595                         test -n "$verbose" && echo "$as_me:8595: result: ... -$cf_opt" >&5
8596 echo "${ECHO_T}... -$cf_opt" >&6
8597                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
8598                 fi
8599         done
8600         CFLAGS="$cf_save_CFLAGS"
8601
8602 elif test "$GCC" = yes
8603 then
8604         { echo "$as_me:8604: checking for $CC warning options..." >&5
8605 echo "$as_me: checking for $CC warning options..." >&6;}
8606         cf_save_CFLAGS="$CFLAGS"
8607         EXTRA_CFLAGS="-W -Wall"
8608         cf_warn_CONST=""
8609         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
8610         for cf_opt in \
8611                 Wbad-function-cast \
8612                 Wcast-align \
8613                 Wcast-qual \
8614                 Winline \
8615                 Wmissing-declarations \
8616                 Wmissing-prototypes \
8617                 Wnested-externs \
8618                 Wpointer-arith \
8619                 Wshadow \
8620                 Wstrict-prototypes \
8621                 Wundef $cf_warn_CONST
8622         do
8623                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
8624                 if { (eval echo "$as_me:8624: \"$ac_compile\"") >&5
8625   (eval $ac_compile) 2>&5
8626   ac_status=$?
8627   echo "$as_me:8627: \$? = $ac_status" >&5
8628   (exit $ac_status); }; then
8629                         test -n "$verbose" && echo "$as_me:8629: result: ... -$cf_opt" >&5
8630 echo "${ECHO_T}... -$cf_opt" >&6
8631                         case $cf_opt in #(vi
8632                         Wcast-qual) #(vi
8633                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
8634                                 ;;
8635                         Winline) #(vi
8636                                 case $GCC_VERSION in
8637                                 3.3*)
8638                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
8639
8640                                         continue;;
8641                                 esac
8642                                 ;;
8643                         esac
8644                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
8645                 fi
8646         done
8647         CFLAGS="$cf_save_CFLAGS"
8648 fi
8649 rm -f conftest*
8650
8651         if test "$cf_with_cxx" = yes ; then
8652
8653 INTEL_CPLUSPLUS=no
8654
8655 if test "$GCC" = yes ; then
8656         case $host_os in
8657         linux*|gnu*)
8658                 echo "$as_me:8658: checking if this is really Intel C++ compiler" >&5
8659 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
8660                 cf_save_CFLAGS="$CXXFLAGS"
8661                 CXXFLAGS="$CXXFLAGS -no-gcc"
8662                 cat >conftest.$ac_ext <<_ACEOF
8663 #line 8663 "configure"
8664 #include "confdefs.h"
8665
8666 int
8667 main ()
8668 {
8669
8670 #ifdef __INTEL_COMPILER
8671 #else
8672 make an error
8673 #endif
8674
8675   ;
8676   return 0;
8677 }
8678 _ACEOF
8679 rm -f conftest.$ac_objext
8680 if { (eval echo "$as_me:8680: \"$ac_compile\"") >&5
8681   (eval $ac_compile) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); } &&
8685          { ac_try='test -s conftest.$ac_objext'
8686   { (eval echo "$as_me:8686: \"$ac_try\"") >&5
8687   (eval $ac_try) 2>&5
8688   ac_status=$?
8689   echo "$as_me:8689: \$? = $ac_status" >&5
8690   (exit $ac_status); }; }; then
8691   INTEL_CPLUSPLUS=yes
8692 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
8693
8694 else
8695   echo "$as_me: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8697 fi
8698 rm -f conftest.$ac_objext conftest.$ac_ext
8699                 CXXFLAGS="$cf_save_CFLAGS"
8700                 echo "$as_me:8700: result: $INTEL_CPLUSPLUS" >&5
8701 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
8702                 ;;
8703         esac
8704 fi
8705
8706 ac_ext=cc
8707 ac_cpp='$CXXCPP $CPPFLAGS'
8708 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8709 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8710 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8711
8712 cat > conftest.$ac_ext <<EOF
8713 #line 8713 "configure"
8714 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
8715 EOF
8716
8717 if test "$INTEL_CPLUSPLUS" = yes
8718 then
8719 # The "-wdXXX" options suppress warnings:
8720 # remark #1419: external declaration in primary source file
8721 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8722 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8723 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
8724 # remark #193: zero used for undefined preprocessing identifier
8725 # remark #593: variable "curs_sb_left_arrow" was set but never used
8726 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
8727 # remark #869: parameter "tw" was never referenced
8728 # remark #981: operands are evaluated in unspecified order
8729 # warning #269: invalid format string conversion
8730
8731         { echo "$as_me:8731: checking for $CC warning options..." >&5
8732 echo "$as_me: checking for $CC warning options..." >&6;}
8733         cf_save_CXXFLAGS="$CXXFLAGS"
8734         EXTRA_CXXFLAGS="-Wall"
8735         for cf_opt in \
8736                 wd1419 \
8737                 wd1682 \
8738                 wd1683 \
8739                 wd1684 \
8740                 wd193 \
8741                 wd279 \
8742                 wd593 \
8743                 wd810 \
8744                 wd869 \
8745                 wd981
8746         do
8747                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
8748                 if { (eval echo "$as_me:8748: \"$ac_compile\"") >&5
8749   (eval $ac_compile) 2>&5
8750   ac_status=$?
8751   echo "$as_me:8751: \$? = $ac_status" >&5
8752   (exit $ac_status); }; then
8753                         test -n "$verbose" && echo "$as_me:8753: result: ... -$cf_opt" >&5
8754 echo "${ECHO_T}... -$cf_opt" >&6
8755                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
8756                 fi
8757         done
8758         CXXFLAGS="$cf_save_CXXFLAGS"
8759
8760 elif test "$GXX" = yes
8761 then
8762         { echo "$as_me:8762: checking for $CXX warning options..." >&5
8763 echo "$as_me: checking for $CXX warning options..." >&6;}
8764         cf_save_CXXFLAGS="$CXXFLAGS"
8765         EXTRA_CXXFLAGS="-W -Wall"
8766         cf_gxx_extra_warnings=""
8767         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
8768         case "$GCC_VERSION" in
8769         [1-2].*)
8770                 ;;
8771         *)
8772                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
8773                 ;;
8774         esac
8775         for cf_opt in \
8776                 Wabi \
8777                 fabi-version=0 \
8778                 Woverloaded-virtual \
8779                 Wsign-promo \
8780                 Wsynth \
8781                 Wold-style-cast \
8782                 Wcast-align \
8783                 Wcast-qual \
8784                 Wmissing-prototypes \
8785                 Wpointer-arith \
8786                 Wshadow \
8787                 Wstrict-prototypes \
8788                 Wundef $cf_gxx_extra_warnings Wno-unused
8789         do
8790                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
8791                 if { (eval echo "$as_me:8791: \"$ac_compile\"") >&5
8792   (eval $ac_compile) 2>&5
8793   ac_status=$?
8794   echo "$as_me:8794: \$? = $ac_status" >&5
8795   (exit $ac_status); }; then
8796                         test -n "$verbose" && echo "$as_me:8796: result: ... -$cf_opt" >&5
8797 echo "${ECHO_T}... -$cf_opt" >&6
8798                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
8799                 else
8800                         test -n "$verbose" && echo "$as_me:8800: result: ... no -$cf_opt" >&5
8801 echo "${ECHO_T}... no -$cf_opt" >&6
8802                 fi
8803         done
8804         CXXFLAGS="$cf_save_CXXFLAGS"
8805 fi
8806
8807 rm -f conftest*
8808 ac_ext=c
8809 ac_cpp='$CPP $CPPFLAGS'
8810 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8811 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8812 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8813
8814         fi
8815 fi
8816
8817 if test "$GCC" = yes
8818 then
8819 cat > conftest.i <<EOF
8820 #ifndef GCC_PRINTF
8821 #define GCC_PRINTF 0
8822 #endif
8823 #ifndef GCC_SCANF
8824 #define GCC_SCANF 0
8825 #endif
8826 #ifndef GCC_NORETURN
8827 #define GCC_NORETURN /* nothing */
8828 #endif
8829 #ifndef GCC_UNUSED
8830 #define GCC_UNUSED /* nothing */
8831 #endif
8832 EOF
8833 if test "$GCC" = yes
8834 then
8835         { echo "$as_me:8835: checking for $CC __attribute__ directives..." >&5
8836 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
8837 cat > conftest.$ac_ext <<EOF
8838 #line 8838 "configure"
8839 #include "confdefs.h"
8840 #include "conftest.h"
8841 #include "conftest.i"
8842 #if     GCC_PRINTF
8843 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
8844 #else
8845 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
8846 #endif
8847 #if     GCC_SCANF
8848 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
8849 #else
8850 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
8851 #endif
8852 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
8853 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
8854 extern void foo(void) GCC_NORETURN;
8855 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
8856 EOF
8857         for cf_attribute in scanf printf unused noreturn
8858         do
8859
8860 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8861
8862                 cf_directive="__attribute__(($cf_attribute))"
8863                 echo "checking for $CC $cf_directive" 1>&5
8864                 case $cf_attribute in
8865                 scanf|printf)
8866                 cat >conftest.h <<EOF
8867 #define GCC_$cf_ATTRIBUTE 1
8868 EOF
8869                         ;;
8870                 *)
8871                 cat >conftest.h <<EOF
8872 #define GCC_$cf_ATTRIBUTE $cf_directive
8873 EOF
8874                         ;;
8875                 esac
8876                 if { (eval echo "$as_me:8876: \"$ac_compile\"") >&5
8877   (eval $ac_compile) 2>&5
8878   ac_status=$?
8879   echo "$as_me:8879: \$? = $ac_status" >&5
8880   (exit $ac_status); }; then
8881                         test -n "$verbose" && echo "$as_me:8881: result: ... $cf_attribute" >&5
8882 echo "${ECHO_T}... $cf_attribute" >&6
8883                         cat conftest.h >>confdefs.h
8884                 fi
8885         done
8886 else
8887         fgrep define conftest.i >>confdefs.h
8888 fi
8889 rm -rf conftest*
8890 fi
8891
8892 ###     use option --enable-assertions to turn on generation of assertion code
8893 echo "$as_me:8893: checking if you want to enable runtime assertions" >&5
8894 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
8895
8896 # Check whether --enable-assertions or --disable-assertions was given.
8897 if test "${enable_assertions+set}" = set; then
8898   enableval="$enable_assertions"
8899   with_assertions=$enableval
8900 else
8901   with_assertions=no
8902 fi;
8903 echo "$as_me:8903: result: $with_assertions" >&5
8904 echo "${ECHO_T}$with_assertions" >&6
8905 if test -n "$GCC"
8906 then
8907         if test "$with_assertions" = no
8908         then
8909                 cat >>confdefs.h <<\EOF
8910 #define NDEBUG 1
8911 EOF
8912
8913                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
8914         else
8915                 ADAFLAGS="$ADAFLAGS -gnata"
8916         fi
8917 fi
8918
8919 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
8920
8921 # Check whether --enable-leaks or --disable-leaks was given.
8922 if test "${enable_leaks+set}" = set; then
8923   enableval="$enable_leaks"
8924   test "$enableval" = no && cat >>confdefs.h <<\EOF
8925 #define NO_LEAKS 1
8926 EOF
8927
8928 fi;
8929 cat >>confdefs.h <<\EOF
8930 #define HAVE_NC_ALLOC_H 1
8931 EOF
8932
8933 ###     use option --enable-expanded to generate certain macros as functions
8934
8935 # Check whether --enable-expanded or --disable-expanded was given.
8936 if test "${enable_expanded+set}" = set; then
8937   enableval="$enable_expanded"
8938   test "$enableval" = yes && cat >>confdefs.h <<\EOF
8939 #define NCURSES_EXPANDED 1
8940 EOF
8941
8942 fi;
8943
8944 ###     use option --disable-macros to suppress macros in favor of functions
8945
8946 # Check whether --enable-macros or --disable-macros was given.
8947 if test "${enable_macros+set}" = set; then
8948   enableval="$enable_macros"
8949   test "$enableval" = no && cat >>confdefs.h <<\EOF
8950 #define NCURSES_NOMACROS 1
8951 EOF
8952
8953 fi;
8954
8955 # Normally we only add trace() to the debug-library.  Allow this to be
8956 # extended to all models of the ncurses library:
8957 cf_all_traces=no
8958 case "$CFLAGS $CPPFLAGS" in
8959 *-DTRACE*)
8960         cf_all_traces=yes
8961         ;;
8962 esac
8963
8964 echo "$as_me:8964: checking whether to add trace feature to all models" >&5
8965 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
8966
8967 # Check whether --with-trace or --without-trace was given.
8968 if test "${with_trace+set}" = set; then
8969   withval="$with_trace"
8970   cf_with_trace=$withval
8971 else
8972   cf_with_trace=$cf_all_traces
8973 fi;
8974 echo "$as_me:8974: result: $cf_with_trace" >&5
8975 echo "${ECHO_T}$cf_with_trace" >&6
8976
8977 if test "$cf_with_trace" = yes ; then
8978         LIB_TRACING=all
8979         ADA_TRACE=TRUE
8980
8981 cf_fix_cppflags=no
8982 cf_new_cflags=
8983 cf_new_cppflags=
8984 cf_new_extra_cppflags=
8985
8986 for cf_add_cflags in -DTRACE
8987 do
8988 case $cf_fix_cppflags in
8989 no)
8990         case $cf_add_cflags in #(vi
8991         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8992                 case $cf_add_cflags in
8993                 -D*)
8994                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8995
8996                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8997                         && test -z "${cf_tst_cflags}" \
8998                         && cf_fix_cppflags=yes
8999
9000                         if test $cf_fix_cppflags = yes ; then
9001                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9002                                 continue
9003                         elif test "${cf_tst_cflags}" = "\"'" ; then
9004                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9005                                 continue
9006                         fi
9007                         ;;
9008                 esac
9009                 case "$CPPFLAGS" in
9010                 *$cf_add_cflags) #(vi
9011                         ;;
9012                 *) #(vi
9013                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9014                         ;;
9015                 esac
9016                 ;;
9017         *)
9018                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9019                 ;;
9020         esac
9021         ;;
9022 yes)
9023         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9024
9025         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9026
9027         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9028         && test -z "${cf_tst_cflags}" \
9029         && cf_fix_cppflags=no
9030         ;;
9031 esac
9032 done
9033
9034 if test -n "$cf_new_cflags" ; then
9035
9036         CFLAGS="$CFLAGS $cf_new_cflags"
9037 fi
9038
9039 if test -n "$cf_new_cppflags" ; then
9040
9041         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9042 fi
9043
9044 if test -n "$cf_new_extra_cppflags" ; then
9045
9046         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9047 fi
9048
9049 else
9050         LIB_TRACING=DEBUG
9051         ADA_TRACE=FALSE
9052 fi
9053
9054 ###     Checks for libraries.
9055 echo "$as_me:9055: checking for gettimeofday" >&5
9056 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9057 if test "${ac_cv_func_gettimeofday+set}" = set; then
9058   echo $ECHO_N "(cached) $ECHO_C" >&6
9059 else
9060   cat >conftest.$ac_ext <<_ACEOF
9061 #line 9061 "configure"
9062 #include "confdefs.h"
9063 /* System header to define __stub macros and hopefully few prototypes,
9064     which can conflict with char gettimeofday (); below.  */
9065 #include <assert.h>
9066 /* Override any gcc2 internal prototype to avoid an error.  */
9067 #ifdef __cplusplus
9068 extern "C"
9069 #endif
9070 /* We use char because int might match the return type of a gcc2
9071    builtin and then its argument prototype would still apply.  */
9072 char gettimeofday ();
9073 char (*f) ();
9074
9075 int
9076 main ()
9077 {
9078 /* The GNU C library defines this for functions which it implements
9079     to always fail with ENOSYS.  Some functions are actually named
9080     something starting with __ and the normal name is an alias.  */
9081 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9082 choke me
9083 #else
9084 f = gettimeofday;
9085 #endif
9086
9087   ;
9088   return 0;
9089 }
9090 _ACEOF
9091 rm -f conftest.$ac_objext conftest$ac_exeext
9092 if { (eval echo "$as_me:9092: \"$ac_link\"") >&5
9093   (eval $ac_link) 2>&5
9094   ac_status=$?
9095   echo "$as_me:9095: \$? = $ac_status" >&5
9096   (exit $ac_status); } &&
9097          { ac_try='test -s conftest$ac_exeext'
9098   { (eval echo "$as_me:9098: \"$ac_try\"") >&5
9099   (eval $ac_try) 2>&5
9100   ac_status=$?
9101   echo "$as_me:9101: \$? = $ac_status" >&5
9102   (exit $ac_status); }; }; then
9103   ac_cv_func_gettimeofday=yes
9104 else
9105   echo "$as_me: failed program was:" >&5
9106 cat conftest.$ac_ext >&5
9107 ac_cv_func_gettimeofday=no
9108 fi
9109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9110 fi
9111 echo "$as_me:9111: result: $ac_cv_func_gettimeofday" >&5
9112 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9113 if test $ac_cv_func_gettimeofday = yes; then
9114   cat >>confdefs.h <<\EOF
9115 #define HAVE_GETTIMEOFDAY 1
9116 EOF
9117
9118 else
9119
9120 echo "$as_me:9120: checking for gettimeofday in -lbsd" >&5
9121 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9122 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9123   echo $ECHO_N "(cached) $ECHO_C" >&6
9124 else
9125   ac_check_lib_save_LIBS=$LIBS
9126 LIBS="-lbsd  $LIBS"
9127 cat >conftest.$ac_ext <<_ACEOF
9128 #line 9128 "configure"
9129 #include "confdefs.h"
9130
9131 /* Override any gcc2 internal prototype to avoid an error.  */
9132 #ifdef __cplusplus
9133 extern "C"
9134 #endif
9135 /* We use char because int might match the return type of a gcc2
9136    builtin and then its argument prototype would still apply.  */
9137 char gettimeofday ();
9138 int
9139 main ()
9140 {
9141 gettimeofday ();
9142   ;
9143   return 0;
9144 }
9145 _ACEOF
9146 rm -f conftest.$ac_objext conftest$ac_exeext
9147 if { (eval echo "$as_me:9147: \"$ac_link\"") >&5
9148   (eval $ac_link) 2>&5
9149   ac_status=$?
9150   echo "$as_me:9150: \$? = $ac_status" >&5
9151   (exit $ac_status); } &&
9152          { ac_try='test -s conftest$ac_exeext'
9153   { (eval echo "$as_me:9153: \"$ac_try\"") >&5
9154   (eval $ac_try) 2>&5
9155   ac_status=$?
9156   echo "$as_me:9156: \$? = $ac_status" >&5
9157   (exit $ac_status); }; }; then
9158   ac_cv_lib_bsd_gettimeofday=yes
9159 else
9160   echo "$as_me: failed program was:" >&5
9161 cat conftest.$ac_ext >&5
9162 ac_cv_lib_bsd_gettimeofday=no
9163 fi
9164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9165 LIBS=$ac_check_lib_save_LIBS
9166 fi
9167 echo "$as_me:9167: result: $ac_cv_lib_bsd_gettimeofday" >&5
9168 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9169 if test $ac_cv_lib_bsd_gettimeofday = yes; then
9170   cat >>confdefs.h <<\EOF
9171 #define HAVE_GETTIMEOFDAY 1
9172 EOF
9173
9174         LIBS="$LIBS -lbsd"
9175 fi
9176
9177 fi
9178
9179 echo "$as_me:9179: checking if -lm needed for math functions" >&5
9180 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
9181 if test "${cf_cv_need_libm+set}" = set; then
9182   echo $ECHO_N "(cached) $ECHO_C" >&6
9183 else
9184
9185         cat >conftest.$ac_ext <<_ACEOF
9186 #line 9186 "configure"
9187 #include "confdefs.h"
9188
9189         #include <stdio.h>
9190         #include <math.h>
9191
9192 int
9193 main ()
9194 {
9195 double x = rand(); printf("result = %g\n", sin(x))
9196   ;
9197   return 0;
9198 }
9199 _ACEOF
9200 rm -f conftest.$ac_objext conftest$ac_exeext
9201 if { (eval echo "$as_me:9201: \"$ac_link\"") >&5
9202   (eval $ac_link) 2>&5
9203   ac_status=$?
9204   echo "$as_me:9204: \$? = $ac_status" >&5
9205   (exit $ac_status); } &&
9206          { ac_try='test -s conftest$ac_exeext'
9207   { (eval echo "$as_me:9207: \"$ac_try\"") >&5
9208   (eval $ac_try) 2>&5
9209   ac_status=$?
9210   echo "$as_me:9210: \$? = $ac_status" >&5
9211   (exit $ac_status); }; }; then
9212   cf_cv_need_libm=no
9213 else
9214   echo "$as_me: failed program was:" >&5
9215 cat conftest.$ac_ext >&5
9216 cf_cv_need_libm=yes
9217 fi
9218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9219 fi
9220 echo "$as_me:9220: result: $cf_cv_need_libm" >&5
9221 echo "${ECHO_T}$cf_cv_need_libm" >&6
9222 if test "$cf_cv_need_libm" = yes
9223 then
9224 MATH_LIB=-lm
9225 fi
9226
9227 ###     Checks for header files.
9228 echo "$as_me:9228: checking for ANSI C header files" >&5
9229 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9230 if test "${ac_cv_header_stdc+set}" = set; then
9231   echo $ECHO_N "(cached) $ECHO_C" >&6
9232 else
9233   cat >conftest.$ac_ext <<_ACEOF
9234 #line 9234 "configure"
9235 #include "confdefs.h"
9236 #include <stdlib.h>
9237 #include <stdarg.h>
9238 #include <string.h>
9239 #include <float.h>
9240
9241 _ACEOF
9242 if { (eval echo "$as_me:9242: \"$ac_cpp conftest.$ac_ext\"") >&5
9243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9244   ac_status=$?
9245   egrep -v '^ *\+' conftest.er1 >conftest.err
9246   rm -f conftest.er1
9247   cat conftest.err >&5
9248   echo "$as_me:9248: \$? = $ac_status" >&5
9249   (exit $ac_status); } >/dev/null; then
9250   if test -s conftest.err; then
9251     ac_cpp_err=$ac_c_preproc_warn_flag
9252   else
9253     ac_cpp_err=
9254   fi
9255 else
9256   ac_cpp_err=yes
9257 fi
9258 if test -z "$ac_cpp_err"; then
9259   ac_cv_header_stdc=yes
9260 else
9261   echo "$as_me: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   ac_cv_header_stdc=no
9264 fi
9265 rm -f conftest.err conftest.$ac_ext
9266
9267 if test $ac_cv_header_stdc = yes; then
9268   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9269   cat >conftest.$ac_ext <<_ACEOF
9270 #line 9270 "configure"
9271 #include "confdefs.h"
9272 #include <string.h>
9273
9274 _ACEOF
9275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9276   egrep "memchr" >/dev/null 2>&1; then
9277   :
9278 else
9279   ac_cv_header_stdc=no
9280 fi
9281 rm -f conftest*
9282
9283 fi
9284
9285 if test $ac_cv_header_stdc = yes; then
9286   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9287   cat >conftest.$ac_ext <<_ACEOF
9288 #line 9288 "configure"
9289 #include "confdefs.h"
9290 #include <stdlib.h>
9291
9292 _ACEOF
9293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9294   egrep "free" >/dev/null 2>&1; then
9295   :
9296 else
9297   ac_cv_header_stdc=no
9298 fi
9299 rm -f conftest*
9300
9301 fi
9302
9303 if test $ac_cv_header_stdc = yes; then
9304   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9305   if test "$cross_compiling" = yes; then
9306   :
9307 else
9308   cat >conftest.$ac_ext <<_ACEOF
9309 #line 9309 "configure"
9310 #include "confdefs.h"
9311 #include <ctype.h>
9312 #if ((' ' & 0x0FF) == 0x020)
9313 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9314 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9315 #else
9316 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9317                      || ('j' <= (c) && (c) <= 'r') \
9318                      || ('s' <= (c) && (c) <= 'z'))
9319 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9320 #endif
9321
9322 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9323 int
9324 main ()
9325 {
9326   int i;
9327   for (i = 0; i < 256; i++)
9328     if (XOR (islower (i), ISLOWER (i))
9329         || toupper (i) != TOUPPER (i))
9330       exit(2);
9331   exit (0);
9332 }
9333 _ACEOF
9334 rm -f conftest$ac_exeext
9335 if { (eval echo "$as_me:9335: \"$ac_link\"") >&5
9336   (eval $ac_link) 2>&5
9337   ac_status=$?
9338   echo "$as_me:9338: \$? = $ac_status" >&5
9339   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9340   { (eval echo "$as_me:9340: \"$ac_try\"") >&5
9341   (eval $ac_try) 2>&5
9342   ac_status=$?
9343   echo "$as_me:9343: \$? = $ac_status" >&5
9344   (exit $ac_status); }; }; then
9345   :
9346 else
9347   echo "$as_me: program exited with status $ac_status" >&5
9348 echo "$as_me: failed program was:" >&5
9349 cat conftest.$ac_ext >&5
9350 ac_cv_header_stdc=no
9351 fi
9352 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9353 fi
9354 fi
9355 fi
9356 echo "$as_me:9356: result: $ac_cv_header_stdc" >&5
9357 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9358 if test $ac_cv_header_stdc = yes; then
9359
9360 cat >>confdefs.h <<\EOF
9361 #define STDC_HEADERS 1
9362 EOF
9363
9364 fi
9365
9366 ac_header_dirent=no
9367 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9368   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9369 echo "$as_me:9369: checking for $ac_hdr that defines DIR" >&5
9370 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9371 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9372   echo $ECHO_N "(cached) $ECHO_C" >&6
9373 else
9374   cat >conftest.$ac_ext <<_ACEOF
9375 #line 9375 "configure"
9376 #include "confdefs.h"
9377 #include <sys/types.h>
9378 #include <$ac_hdr>
9379
9380 int
9381 main ()
9382 {
9383 if ((DIR *) 0)
9384 return 0;
9385   ;
9386   return 0;
9387 }
9388 _ACEOF
9389 rm -f conftest.$ac_objext
9390 if { (eval echo "$as_me:9390: \"$ac_compile\"") >&5
9391   (eval $ac_compile) 2>&5
9392   ac_status=$?
9393   echo "$as_me:9393: \$? = $ac_status" >&5
9394   (exit $ac_status); } &&
9395          { ac_try='test -s conftest.$ac_objext'
9396   { (eval echo "$as_me:9396: \"$ac_try\"") >&5
9397   (eval $ac_try) 2>&5
9398   ac_status=$?
9399   echo "$as_me:9399: \$? = $ac_status" >&5
9400   (exit $ac_status); }; }; then
9401   eval "$as_ac_Header=yes"
9402 else
9403   echo "$as_me: failed program was:" >&5
9404 cat conftest.$ac_ext >&5
9405 eval "$as_ac_Header=no"
9406 fi
9407 rm -f conftest.$ac_objext conftest.$ac_ext
9408 fi
9409 echo "$as_me:9409: result: `eval echo '${'$as_ac_Header'}'`" >&5
9410 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9411 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9412   cat >>confdefs.h <<EOF
9413 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9414 EOF
9415
9416 ac_header_dirent=$ac_hdr; break
9417 fi
9418
9419 done
9420 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9421 if test $ac_header_dirent = dirent.h; then
9422   echo "$as_me:9422: checking for opendir in -ldir" >&5
9423 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
9424 if test "${ac_cv_lib_dir_opendir+set}" = set; then
9425   echo $ECHO_N "(cached) $ECHO_C" >&6
9426 else
9427   ac_check_lib_save_LIBS=$LIBS
9428 LIBS="-ldir  $LIBS"
9429 cat >conftest.$ac_ext <<_ACEOF
9430 #line 9430 "configure"
9431 #include "confdefs.h"
9432
9433 /* Override any gcc2 internal prototype to avoid an error.  */
9434 #ifdef __cplusplus
9435 extern "C"
9436 #endif
9437 /* We use char because int might match the return type of a gcc2
9438    builtin and then its argument prototype would still apply.  */
9439 char opendir ();
9440 int
9441 main ()
9442 {
9443 opendir ();
9444   ;
9445   return 0;
9446 }
9447 _ACEOF
9448 rm -f conftest.$ac_objext conftest$ac_exeext
9449 if { (eval echo "$as_me:9449: \"$ac_link\"") >&5
9450   (eval $ac_link) 2>&5
9451   ac_status=$?
9452   echo "$as_me:9452: \$? = $ac_status" >&5
9453   (exit $ac_status); } &&
9454          { ac_try='test -s conftest$ac_exeext'
9455   { (eval echo "$as_me:9455: \"$ac_try\"") >&5
9456   (eval $ac_try) 2>&5
9457   ac_status=$?
9458   echo "$as_me:9458: \$? = $ac_status" >&5
9459   (exit $ac_status); }; }; then
9460   ac_cv_lib_dir_opendir=yes
9461 else
9462   echo "$as_me: failed program was:" >&5
9463 cat conftest.$ac_ext >&5
9464 ac_cv_lib_dir_opendir=no
9465 fi
9466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9467 LIBS=$ac_check_lib_save_LIBS
9468 fi
9469 echo "$as_me:9469: result: $ac_cv_lib_dir_opendir" >&5
9470 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
9471 if test $ac_cv_lib_dir_opendir = yes; then
9472   LIBS="$LIBS -ldir"
9473 fi
9474
9475 else
9476   echo "$as_me:9476: checking for opendir in -lx" >&5
9477 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
9478 if test "${ac_cv_lib_x_opendir+set}" = set; then
9479   echo $ECHO_N "(cached) $ECHO_C" >&6
9480 else
9481   ac_check_lib_save_LIBS=$LIBS
9482 LIBS="-lx  $LIBS"
9483 cat >conftest.$ac_ext <<_ACEOF
9484 #line 9484 "configure"
9485 #include "confdefs.h"
9486
9487 /* Override any gcc2 internal prototype to avoid an error.  */
9488 #ifdef __cplusplus
9489 extern "C"
9490 #endif
9491 /* We use char because int might match the return type of a gcc2
9492    builtin and then its argument prototype would still apply.  */
9493 char opendir ();
9494 int
9495 main ()
9496 {
9497 opendir ();
9498   ;
9499   return 0;
9500 }
9501 _ACEOF
9502 rm -f conftest.$ac_objext conftest$ac_exeext
9503 if { (eval echo "$as_me:9503: \"$ac_link\"") >&5
9504   (eval $ac_link) 2>&5
9505   ac_status=$?
9506   echo "$as_me:9506: \$? = $ac_status" >&5
9507   (exit $ac_status); } &&
9508          { ac_try='test -s conftest$ac_exeext'
9509   { (eval echo "$as_me:9509: \"$ac_try\"") >&5
9510   (eval $ac_try) 2>&5
9511   ac_status=$?
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit $ac_status); }; }; then
9514   ac_cv_lib_x_opendir=yes
9515 else
9516   echo "$as_me: failed program was:" >&5
9517 cat conftest.$ac_ext >&5
9518 ac_cv_lib_x_opendir=no
9519 fi
9520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9521 LIBS=$ac_check_lib_save_LIBS
9522 fi
9523 echo "$as_me:9523: result: $ac_cv_lib_x_opendir" >&5
9524 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
9525 if test $ac_cv_lib_x_opendir = yes; then
9526   LIBS="$LIBS -lx"
9527 fi
9528
9529 fi
9530
9531 echo "$as_me:9531: checking whether time.h and sys/time.h may both be included" >&5
9532 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
9533 if test "${ac_cv_header_time+set}" = set; then
9534   echo $ECHO_N "(cached) $ECHO_C" >&6
9535 else
9536   cat >conftest.$ac_ext <<_ACEOF
9537 #line 9537 "configure"
9538 #include "confdefs.h"
9539 #include <sys/types.h>
9540 #include <sys/time.h>
9541 #include <time.h>
9542
9543 int
9544 main ()
9545 {
9546 if ((struct tm *) 0)
9547 return 0;
9548   ;
9549   return 0;
9550 }
9551 _ACEOF
9552 rm -f conftest.$ac_objext
9553 if { (eval echo "$as_me:9553: \"$ac_compile\"") >&5
9554   (eval $ac_compile) 2>&5
9555   ac_status=$?
9556   echo "$as_me:9556: \$? = $ac_status" >&5
9557   (exit $ac_status); } &&
9558          { ac_try='test -s conftest.$ac_objext'
9559   { (eval echo "$as_me:9559: \"$ac_try\"") >&5
9560   (eval $ac_try) 2>&5
9561   ac_status=$?
9562   echo "$as_me:9562: \$? = $ac_status" >&5
9563   (exit $ac_status); }; }; then
9564   ac_cv_header_time=yes
9565 else
9566   echo "$as_me: failed program was:" >&5
9567 cat conftest.$ac_ext >&5
9568 ac_cv_header_time=no
9569 fi
9570 rm -f conftest.$ac_objext conftest.$ac_ext
9571 fi
9572 echo "$as_me:9572: result: $ac_cv_header_time" >&5
9573 echo "${ECHO_T}$ac_cv_header_time" >&6
9574 if test $ac_cv_header_time = yes; then
9575
9576 cat >>confdefs.h <<\EOF
9577 #define TIME_WITH_SYS_TIME 1
9578 EOF
9579
9580 fi
9581
9582 echo "$as_me:9582: checking for regular-expression headers" >&5
9583 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
9584 if test "${cf_cv_regex+set}" = set; then
9585   echo $ECHO_N "(cached) $ECHO_C" >&6
9586 else
9587
9588 cat >conftest.$ac_ext <<_ACEOF
9589 #line 9589 "configure"
9590 #include "confdefs.h"
9591 #include <sys/types.h>
9592 #include <regex.h>
9593 int
9594 main ()
9595 {
9596
9597         regex_t *p;
9598         int x = regcomp(p, "", 0);
9599         int y = regexec(p, "", 0, 0, 0);
9600         regfree(p);
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   cf_cv_regex="regex.h"
9619 else
9620   echo "$as_me: failed program was:" >&5
9621 cat conftest.$ac_ext >&5
9622
9623         cat >conftest.$ac_ext <<_ACEOF
9624 #line 9624 "configure"
9625 #include "confdefs.h"
9626 #include <regexp.h>
9627 int
9628 main ()
9629 {
9630
9631                 char *p = compile("", "", "", 0);
9632                 int x = step("", "");
9633
9634   ;
9635   return 0;
9636 }
9637 _ACEOF
9638 rm -f conftest.$ac_objext conftest$ac_exeext
9639 if { (eval echo "$as_me:9639: \"$ac_link\"") >&5
9640   (eval $ac_link) 2>&5
9641   ac_status=$?
9642   echo "$as_me:9642: \$? = $ac_status" >&5
9643   (exit $ac_status); } &&
9644          { ac_try='test -s conftest$ac_exeext'
9645   { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9646   (eval $ac_try) 2>&5
9647   ac_status=$?
9648   echo "$as_me:9648: \$? = $ac_status" >&5
9649   (exit $ac_status); }; }; then
9650   cf_cv_regex="regexp.h"
9651 else
9652   echo "$as_me: failed program was:" >&5
9653 cat conftest.$ac_ext >&5
9654
9655                 cf_save_LIBS="$LIBS"
9656                 LIBS="-lgen $LIBS"
9657                 cat >conftest.$ac_ext <<_ACEOF
9658 #line 9658 "configure"
9659 #include "confdefs.h"
9660 #include <regexpr.h>
9661 int
9662 main ()
9663 {
9664
9665                         char *p = compile("", "", "");
9666                         int x = step("", "");
9667
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672 rm -f conftest.$ac_objext conftest$ac_exeext
9673 if { (eval echo "$as_me:9673: \"$ac_link\"") >&5
9674   (eval $ac_link) 2>&5
9675   ac_status=$?
9676   echo "$as_me:9676: \$? = $ac_status" >&5
9677   (exit $ac_status); } &&
9678          { ac_try='test -s conftest$ac_exeext'
9679   { (eval echo "$as_me:9679: \"$ac_try\"") >&5
9680   (eval $ac_try) 2>&5
9681   ac_status=$?
9682   echo "$as_me:9682: \$? = $ac_status" >&5
9683   (exit $ac_status); }; }; then
9684   cf_cv_regex="regexpr.h"
9685 else
9686   echo "$as_me: failed program was:" >&5
9687 cat conftest.$ac_ext >&5
9688 LIBS="$cf_save_LIBS"
9689 fi
9690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9691 fi
9692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9693 fi
9694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9695
9696 fi
9697
9698 echo "$as_me:9698: result: $cf_cv_regex" >&5
9699 echo "${ECHO_T}$cf_cv_regex" >&6
9700 case $cf_cv_regex in
9701         regex.h)   cat >>confdefs.h <<\EOF
9702 #define HAVE_REGEX_H_FUNCS 1
9703 EOF
9704  ;;
9705         regexp.h)  cat >>confdefs.h <<\EOF
9706 #define HAVE_REGEXP_H_FUNCS 1
9707 EOF
9708  ;;
9709         regexpr.h) cat >>confdefs.h <<\EOF
9710 #define HAVE_REGEXPR_H_FUNCS 1
9711 EOF
9712  ;;
9713 esac
9714
9715 for ac_header in \
9716 fcntl.h \
9717 getopt.h \
9718 limits.h \
9719 locale.h \
9720 poll.h \
9721 sys/bsdtypes.h \
9722 sys/ioctl.h \
9723 sys/param.h \
9724 sys/poll.h \
9725 sys/select.h \
9726 sys/time.h \
9727 sys/times.h \
9728 ttyent.h \
9729 unistd.h \
9730 wctype.h \
9731
9732 do
9733 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9734 echo "$as_me:9734: checking for $ac_header" >&5
9735 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9736 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9737   echo $ECHO_N "(cached) $ECHO_C" >&6
9738 else
9739   cat >conftest.$ac_ext <<_ACEOF
9740 #line 9740 "configure"
9741 #include "confdefs.h"
9742 #include <$ac_header>
9743 _ACEOF
9744 if { (eval echo "$as_me:9744: \"$ac_cpp conftest.$ac_ext\"") >&5
9745   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9746   ac_status=$?
9747   egrep -v '^ *\+' conftest.er1 >conftest.err
9748   rm -f conftest.er1
9749   cat conftest.err >&5
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); } >/dev/null; then
9752   if test -s conftest.err; then
9753     ac_cpp_err=$ac_c_preproc_warn_flag
9754   else
9755     ac_cpp_err=
9756   fi
9757 else
9758   ac_cpp_err=yes
9759 fi
9760 if test -z "$ac_cpp_err"; then
9761   eval "$as_ac_Header=yes"
9762 else
9763   echo "$as_me: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   eval "$as_ac_Header=no"
9766 fi
9767 rm -f conftest.err conftest.$ac_ext
9768 fi
9769 echo "$as_me:9769: result: `eval echo '${'$as_ac_Header'}'`" >&5
9770 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9771 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9772   cat >>confdefs.h <<EOF
9773 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9774 EOF
9775
9776 fi
9777 done
9778
9779 # check for ISC (this may also define _POSIX_SOURCE)
9780 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
9781 if test "$ISC" = yes ; then
9782
9783 echo "$as_me:9783: checking for main in -lcposix" >&5
9784 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
9785 if test "${ac_cv_lib_cposix_main+set}" = set; then
9786   echo $ECHO_N "(cached) $ECHO_C" >&6
9787 else
9788   ac_check_lib_save_LIBS=$LIBS
9789 LIBS="-lcposix  $LIBS"
9790 cat >conftest.$ac_ext <<_ACEOF
9791 #line 9791 "configure"
9792 #include "confdefs.h"
9793
9794 int
9795 main ()
9796 {
9797 main ();
9798   ;
9799   return 0;
9800 }
9801 _ACEOF
9802 rm -f conftest.$ac_objext conftest$ac_exeext
9803 if { (eval echo "$as_me:9803: \"$ac_link\"") >&5
9804   (eval $ac_link) 2>&5
9805   ac_status=$?
9806   echo "$as_me:9806: \$? = $ac_status" >&5
9807   (exit $ac_status); } &&
9808          { ac_try='test -s conftest$ac_exeext'
9809   { (eval echo "$as_me:9809: \"$ac_try\"") >&5
9810   (eval $ac_try) 2>&5
9811   ac_status=$?
9812   echo "$as_me:9812: \$? = $ac_status" >&5
9813   (exit $ac_status); }; }; then
9814   ac_cv_lib_cposix_main=yes
9815 else
9816   echo "$as_me: failed program was:" >&5
9817 cat conftest.$ac_ext >&5
9818 ac_cv_lib_cposix_main=no
9819 fi
9820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9821 LIBS=$ac_check_lib_save_LIBS
9822 fi
9823 echo "$as_me:9823: result: $ac_cv_lib_cposix_main" >&5
9824 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
9825 if test $ac_cv_lib_cposix_main = yes; then
9826   cat >>confdefs.h <<EOF
9827 #define HAVE_LIBCPOSIX 1
9828 EOF
9829
9830   LIBS="-lcposix $LIBS"
9831
9832 fi
9833
9834         echo "$as_me:9834: checking for bzero in -linet" >&5
9835 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
9836 if test "${ac_cv_lib_inet_bzero+set}" = set; then
9837   echo $ECHO_N "(cached) $ECHO_C" >&6
9838 else
9839   ac_check_lib_save_LIBS=$LIBS
9840 LIBS="-linet  $LIBS"
9841 cat >conftest.$ac_ext <<_ACEOF
9842 #line 9842 "configure"
9843 #include "confdefs.h"
9844
9845 /* Override any gcc2 internal prototype to avoid an error.  */
9846 #ifdef __cplusplus
9847 extern "C"
9848 #endif
9849 /* We use char because int might match the return type of a gcc2
9850    builtin and then its argument prototype would still apply.  */
9851 char bzero ();
9852 int
9853 main ()
9854 {
9855 bzero ();
9856   ;
9857   return 0;
9858 }
9859 _ACEOF
9860 rm -f conftest.$ac_objext conftest$ac_exeext
9861 if { (eval echo "$as_me:9861: \"$ac_link\"") >&5
9862   (eval $ac_link) 2>&5
9863   ac_status=$?
9864   echo "$as_me:9864: \$? = $ac_status" >&5
9865   (exit $ac_status); } &&
9866          { ac_try='test -s conftest$ac_exeext'
9867   { (eval echo "$as_me:9867: \"$ac_try\"") >&5
9868   (eval $ac_try) 2>&5
9869   ac_status=$?
9870   echo "$as_me:9870: \$? = $ac_status" >&5
9871   (exit $ac_status); }; }; then
9872   ac_cv_lib_inet_bzero=yes
9873 else
9874   echo "$as_me: failed program was:" >&5
9875 cat conftest.$ac_ext >&5
9876 ac_cv_lib_inet_bzero=no
9877 fi
9878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9879 LIBS=$ac_check_lib_save_LIBS
9880 fi
9881 echo "$as_me:9881: result: $ac_cv_lib_inet_bzero" >&5
9882 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
9883 if test $ac_cv_lib_inet_bzero = yes; then
9884   LIBS="$LIBS -linet"
9885 fi
9886 fi
9887
9888 echo "$as_me:9888: checking if sys/time.h works with sys/select.h" >&5
9889 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
9890 if test "${cf_cv_sys_time_select+set}" = set; then
9891   echo $ECHO_N "(cached) $ECHO_C" >&6
9892 else
9893
9894 cat >conftest.$ac_ext <<_ACEOF
9895 #line 9895 "configure"
9896 #include "confdefs.h"
9897
9898 #include <sys/types.h>
9899 #ifdef HAVE_SYS_TIME_H
9900 #include <sys/time.h>
9901 #endif
9902 #ifdef HAVE_SYS_SELECT_H
9903 #include <sys/select.h>
9904 #endif
9905
9906 int
9907 main ()
9908 {
9909
9910   ;
9911   return 0;
9912 }
9913 _ACEOF
9914 rm -f conftest.$ac_objext
9915 if { (eval echo "$as_me:9915: \"$ac_compile\"") >&5
9916   (eval $ac_compile) 2>&5
9917   ac_status=$?
9918   echo "$as_me:9918: \$? = $ac_status" >&5
9919   (exit $ac_status); } &&
9920          { ac_try='test -s conftest.$ac_objext'
9921   { (eval echo "$as_me:9921: \"$ac_try\"") >&5
9922   (eval $ac_try) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit $ac_status); }; }; then
9926   cf_cv_sys_time_select=yes
9927 else
9928   echo "$as_me: failed program was:" >&5
9929 cat conftest.$ac_ext >&5
9930 cf_cv_sys_time_select=no
9931 fi
9932 rm -f conftest.$ac_objext conftest.$ac_ext
9933
9934 fi
9935
9936 echo "$as_me:9936: result: $cf_cv_sys_time_select" >&5
9937 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
9938 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
9939 #define HAVE_SYS_TIME_SELECT 1
9940 EOF
9941
9942 ###     checks for compiler characteristics
9943 ac_ext=c
9944 ac_cpp='$CPP $CPPFLAGS'
9945 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9946 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9947 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9948
9949 echo "$as_me:9949: checking for $CC option to accept ANSI C" >&5
9950 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
9951 if test "${ac_cv_prog_cc_stdc+set}" = set; then
9952   echo $ECHO_N "(cached) $ECHO_C" >&6
9953 else
9954   ac_cv_prog_cc_stdc=no
9955 ac_save_CC=$CC
9956 cat >conftest.$ac_ext <<_ACEOF
9957 #line 9957 "configure"
9958 #include "confdefs.h"
9959 #include <stdarg.h>
9960 #include <stdio.h>
9961 #include <sys/types.h>
9962 #include <sys/stat.h>
9963 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
9964 struct buf { int x; };
9965 FILE * (*rcsopen) (struct buf *, struct stat *, int);
9966 static char *e (p, i)
9967      char **p;
9968      int i;
9969 {
9970   return p[i];
9971 }
9972 static char *f (char * (*g) (char **, int), char **p, ...)
9973 {
9974   char *s;
9975   va_list v;
9976   va_start (v,p);
9977   s = g (p, va_arg (v,int));
9978   va_end (v);
9979   return s;
9980 }
9981 int test (int i, double x);
9982 struct s1 {int (*f) (int a);};
9983 struct s2 {int (*f) (double a);};
9984 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
9985 int argc;
9986 char **argv;
9987 int
9988 main ()
9989 {
9990 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
9991   ;
9992   return 0;
9993 }
9994 _ACEOF
9995 # Don't try gcc -ansi; that turns off useful extensions and
9996 # breaks some systems' header files.
9997 # AIX                   -qlanglvl=ansi
9998 # Ultrix and OSF/1      -std1
9999 # HP-UX 10.20 and later -Ae
10000 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10001 # SVR4                  -Xc -D__EXTENSIONS__
10002 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10003 do
10004   CC="$ac_save_CC $ac_arg"
10005   rm -f conftest.$ac_objext
10006 if { (eval echo "$as_me:10006: \"$ac_compile\"") >&5
10007   (eval $ac_compile) 2>&5
10008   ac_status=$?
10009   echo "$as_me:10009: \$? = $ac_status" >&5
10010   (exit $ac_status); } &&
10011          { ac_try='test -s conftest.$ac_objext'
10012   { (eval echo "$as_me:10012: \"$ac_try\"") >&5
10013   (eval $ac_try) 2>&5
10014   ac_status=$?
10015   echo "$as_me:10015: \$? = $ac_status" >&5
10016   (exit $ac_status); }; }; then
10017   ac_cv_prog_cc_stdc=$ac_arg
10018 break
10019 else
10020   echo "$as_me: failed program was:" >&5
10021 cat conftest.$ac_ext >&5
10022 fi
10023 rm -f conftest.$ac_objext
10024 done
10025 rm -f conftest.$ac_ext conftest.$ac_objext
10026 CC=$ac_save_CC
10027
10028 fi
10029
10030 case "x$ac_cv_prog_cc_stdc" in
10031   x|xno)
10032     echo "$as_me:10032: result: none needed" >&5
10033 echo "${ECHO_T}none needed" >&6 ;;
10034   *)
10035     echo "$as_me:10035: result: $ac_cv_prog_cc_stdc" >&5
10036 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10037     CC="$CC $ac_cv_prog_cc_stdc" ;;
10038 esac
10039
10040 echo "$as_me:10040: checking for an ANSI C-conforming const" >&5
10041 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10042 if test "${ac_cv_c_const+set}" = set; then
10043   echo $ECHO_N "(cached) $ECHO_C" >&6
10044 else
10045   cat >conftest.$ac_ext <<_ACEOF
10046 #line 10046 "configure"
10047 #include "confdefs.h"
10048
10049 int
10050 main ()
10051 {
10052 /* FIXME: Include the comments suggested by Paul. */
10053 #ifndef __cplusplus
10054   /* Ultrix mips cc rejects this.  */
10055   typedef int charset[2];
10056   const charset x;
10057   /* SunOS 4.1.1 cc rejects this.  */
10058   char const *const *ccp;
10059   char **p;
10060   /* NEC SVR4.0.2 mips cc rejects this.  */
10061   struct point {int x, y;};
10062   static struct point const zero = {0,0};
10063   /* AIX XL C 1.02.0.0 rejects this.
10064      It does not let you subtract one const X* pointer from another in
10065      an arm of an if-expression whose if-part is not a constant
10066      expression */
10067   const char *g = "string";
10068   ccp = &g + (g ? g-g : 0);
10069   /* HPUX 7.0 cc rejects these. */
10070   ++ccp;
10071   p = (char**) ccp;
10072   ccp = (char const *const *) p;
10073   { /* SCO 3.2v4 cc rejects this.  */
10074     char *t;
10075     char const *s = 0 ? (char *) 0 : (char const *) 0;
10076
10077     *t++ = 0;
10078   }
10079   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10080     int x[] = {25, 17};
10081     const int *foo = &x[0];
10082     ++foo;
10083   }
10084   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10085     typedef const int *iptr;
10086     iptr p = 0;
10087     ++p;
10088   }
10089   { /* AIX XL C 1.02.0.0 rejects this saying
10090        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10091     struct s { int j; const int *ap[3]; };
10092     struct s *b; b->j = 5;
10093   }
10094   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10095     const int foo = 10;
10096   }
10097 #endif
10098
10099   ;
10100   return 0;
10101 }
10102 _ACEOF
10103 rm -f conftest.$ac_objext
10104 if { (eval echo "$as_me:10104: \"$ac_compile\"") >&5
10105   (eval $ac_compile) 2>&5
10106   ac_status=$?
10107   echo "$as_me:10107: \$? = $ac_status" >&5
10108   (exit $ac_status); } &&
10109          { ac_try='test -s conftest.$ac_objext'
10110   { (eval echo "$as_me:10110: \"$ac_try\"") >&5
10111   (eval $ac_try) 2>&5
10112   ac_status=$?
10113   echo "$as_me:10113: \$? = $ac_status" >&5
10114   (exit $ac_status); }; }; then
10115   ac_cv_c_const=yes
10116 else
10117   echo "$as_me: failed program was:" >&5
10118 cat conftest.$ac_ext >&5
10119 ac_cv_c_const=no
10120 fi
10121 rm -f conftest.$ac_objext conftest.$ac_ext
10122 fi
10123 echo "$as_me:10123: result: $ac_cv_c_const" >&5
10124 echo "${ECHO_T}$ac_cv_c_const" >&6
10125 if test $ac_cv_c_const = no; then
10126
10127 cat >>confdefs.h <<\EOF
10128 #define const
10129 EOF
10130
10131 fi
10132
10133 echo "$as_me:10133: checking for inline" >&5
10134 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10135 if test "${ac_cv_c_inline+set}" = set; then
10136   echo $ECHO_N "(cached) $ECHO_C" >&6
10137 else
10138   ac_cv_c_inline=no
10139 for ac_kw in inline __inline__ __inline; do
10140   cat >conftest.$ac_ext <<_ACEOF
10141 #line 10141 "configure"
10142 #include "confdefs.h"
10143 #ifndef __cplusplus
10144 static $ac_kw int static_foo () {return 0; }
10145 $ac_kw int foo () {return 0; }
10146 #endif
10147
10148 _ACEOF
10149 rm -f conftest.$ac_objext
10150 if { (eval echo "$as_me:10150: \"$ac_compile\"") >&5
10151   (eval $ac_compile) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); } &&
10155          { ac_try='test -s conftest.$ac_objext'
10156   { (eval echo "$as_me:10156: \"$ac_try\"") >&5
10157   (eval $ac_try) 2>&5
10158   ac_status=$?
10159   echo "$as_me:10159: \$? = $ac_status" >&5
10160   (exit $ac_status); }; }; then
10161   ac_cv_c_inline=$ac_kw; break
10162 else
10163   echo "$as_me: failed program was:" >&5
10164 cat conftest.$ac_ext >&5
10165 fi
10166 rm -f conftest.$ac_objext conftest.$ac_ext
10167 done
10168
10169 fi
10170 echo "$as_me:10170: result: $ac_cv_c_inline" >&5
10171 echo "${ECHO_T}$ac_cv_c_inline" >&6
10172 case $ac_cv_c_inline in
10173   inline | yes) ;;
10174   no)
10175 cat >>confdefs.h <<\EOF
10176 #define inline
10177 EOF
10178  ;;
10179   *)  cat >>confdefs.h <<EOF
10180 #define inline $ac_cv_c_inline
10181 EOF
10182  ;;
10183 esac
10184
10185 test "$ac_cv_c_inline" != no && cat >>confdefs.h <<\EOF
10186 #define CC_HAS_INLINE_FUNCS 1
10187 EOF
10188
10189 if test $NCURSES_CHTYPE = auto ; then
10190
10191 echo "$as_me:10191: checking for type of chtype" >&5
10192 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10193 if test "${cf_cv_typeof_chtype+set}" = set; then
10194   echo $ECHO_N "(cached) $ECHO_C" >&6
10195 else
10196
10197                 if test "$cross_compiling" = yes; then
10198   cf_cv_typeof_chtype=long
10199 else
10200   cat >conftest.$ac_ext <<_ACEOF
10201 #line 10201 "configure"
10202 #include "confdefs.h"
10203
10204 #define WANT_BITS 31
10205 #include <stdio.h>
10206 int main()
10207 {
10208         FILE *fp = fopen("cf_test.out", "w");
10209         if (fp != 0) {
10210                 char *result = "long";
10211                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
10212                         int n;
10213                         unsigned int x, y;
10214                         for (n = 0; n < WANT_BITS; n++) {
10215                                 x = (1 << n);
10216                                 y = (x >> n);
10217                                 if (y != 1 || x == 0) {
10218                                         x = 0;
10219                                         break;
10220                                 }
10221                         }
10222                         /*
10223                          * If x is nonzero, an int is big enough for the bits
10224                          * that we want.
10225                          */
10226                         result = (x != 0) ? "int" : "long";
10227                 }
10228                 fputs(result, fp);
10229                 fclose(fp);
10230         }
10231         exit(0);
10232 }
10233
10234 _ACEOF
10235 rm -f conftest$ac_exeext
10236 if { (eval echo "$as_me:10236: \"$ac_link\"") >&5
10237   (eval $ac_link) 2>&5
10238   ac_status=$?
10239   echo "$as_me:10239: \$? = $ac_status" >&5
10240   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10241   { (eval echo "$as_me:10241: \"$ac_try\"") >&5
10242   (eval $ac_try) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); }; }; then
10246   cf_cv_typeof_chtype=`cat cf_test.out`
10247 else
10248   echo "$as_me: program exited with status $ac_status" >&5
10249 echo "$as_me: failed program was:" >&5
10250 cat conftest.$ac_ext >&5
10251 cf_cv_typeof_chtype=long
10252 fi
10253 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10254 fi
10255                 rm -f cf_test.out
10256
10257 fi
10258
10259 echo "$as_me:10259: result: $cf_cv_typeof_chtype" >&5
10260 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
10261
10262 cat >>confdefs.h <<EOF
10263 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
10264 EOF
10265
10266 else
10267         cf_cv_typeof_chtype=$NCURSES_CHTYPE
10268 fi
10269
10270 echo "$as_me:10270: checking if unsigned literals are legal" >&5
10271 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
10272 if test "${cf_cv_unsigned_literals+set}" = set; then
10273   echo $ECHO_N "(cached) $ECHO_C" >&6
10274 else
10275
10276         cat >conftest.$ac_ext <<_ACEOF
10277 #line 10277 "configure"
10278 #include "confdefs.h"
10279
10280 int
10281 main ()
10282 {
10283 long x = 1L + 1UL + 1U + 1
10284   ;
10285   return 0;
10286 }
10287 _ACEOF
10288 rm -f conftest.$ac_objext
10289 if { (eval echo "$as_me:10289: \"$ac_compile\"") >&5
10290   (eval $ac_compile) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit $ac_status); } &&
10294          { ac_try='test -s conftest.$ac_objext'
10295   { (eval echo "$as_me:10295: \"$ac_try\"") >&5
10296   (eval $ac_try) 2>&5
10297   ac_status=$?
10298   echo "$as_me:10298: \$? = $ac_status" >&5
10299   (exit $ac_status); }; }; then
10300   cf_cv_unsigned_literals=yes
10301 else
10302   echo "$as_me: failed program was:" >&5
10303 cat conftest.$ac_ext >&5
10304 cf_cv_unsigned_literals=no
10305 fi
10306 rm -f conftest.$ac_objext conftest.$ac_ext
10307
10308 fi
10309
10310 echo "$as_me:10310: result: $cf_cv_unsigned_literals" >&5
10311 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
10312
10313 cf_cv_1UL="1"
10314 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
10315 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
10316
10317 if test $NCURSES_MMASK_T = auto ; then
10318         cf_cv_typeof_mmask_t=long
10319 else
10320         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
10321 fi
10322
10323 ###     Checks for external-data
10324
10325 echo "$as_me:10325: checking if external errno is declared" >&5
10326 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
10327 if test "${cf_cv_dcl_errno+set}" = set; then
10328   echo $ECHO_N "(cached) $ECHO_C" >&6
10329 else
10330
10331     cat >conftest.$ac_ext <<_ACEOF
10332 #line 10332 "configure"
10333 #include "confdefs.h"
10334
10335 #ifdef HAVE_STDLIB_H
10336 #include <stdlib.h>
10337 #endif
10338 #include <stdio.h>
10339 #include <sys/types.h>
10340 #include <errno.h>
10341 int
10342 main ()
10343 {
10344 long x = (long) errno
10345   ;
10346   return 0;
10347 }
10348 _ACEOF
10349 rm -f conftest.$ac_objext
10350 if { (eval echo "$as_me:10350: \"$ac_compile\"") >&5
10351   (eval $ac_compile) 2>&5
10352   ac_status=$?
10353   echo "$as_me:10353: \$? = $ac_status" >&5
10354   (exit $ac_status); } &&
10355          { ac_try='test -s conftest.$ac_objext'
10356   { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357   (eval $ac_try) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit $ac_status); }; }; then
10361   cf_cv_dcl_errno=yes
10362 else
10363   echo "$as_me: failed program was:" >&5
10364 cat conftest.$ac_ext >&5
10365 cf_cv_dcl_errno=no
10366 fi
10367 rm -f conftest.$ac_objext conftest.$ac_ext
10368
10369 fi
10370 echo "$as_me:10370: result: $cf_cv_dcl_errno" >&5
10371 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
10372
10373 if test "$cf_cv_dcl_errno" = no ; then
10374
10375 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10376
10377     cat >>confdefs.h <<EOF
10378 #define $cf_result 1
10379 EOF
10380
10381 fi
10382
10383 # It's possible (for near-UNIX clones) that the data doesn't exist
10384
10385 echo "$as_me:10385: checking if external errno exists" >&5
10386 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
10387 if test "${cf_cv_have_errno+set}" = set; then
10388   echo $ECHO_N "(cached) $ECHO_C" >&6
10389 else
10390
10391     cat >conftest.$ac_ext <<_ACEOF
10392 #line 10392 "configure"
10393 #include "confdefs.h"
10394
10395 #undef errno
10396 extern int errno;
10397
10398 int
10399 main ()
10400 {
10401 errno = 2
10402   ;
10403   return 0;
10404 }
10405 _ACEOF
10406 rm -f conftest.$ac_objext conftest$ac_exeext
10407 if { (eval echo "$as_me:10407: \"$ac_link\"") >&5
10408   (eval $ac_link) 2>&5
10409   ac_status=$?
10410   echo "$as_me:10410: \$? = $ac_status" >&5
10411   (exit $ac_status); } &&
10412          { ac_try='test -s conftest$ac_exeext'
10413   { (eval echo "$as_me:10413: \"$ac_try\"") >&5
10414   (eval $ac_try) 2>&5
10415   ac_status=$?
10416   echo "$as_me:10416: \$? = $ac_status" >&5
10417   (exit $ac_status); }; }; then
10418   cf_cv_have_errno=yes
10419 else
10420   echo "$as_me: failed program was:" >&5
10421 cat conftest.$ac_ext >&5
10422 cf_cv_have_errno=no
10423 fi
10424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10425
10426 fi
10427 echo "$as_me:10427: result: $cf_cv_have_errno" >&5
10428 echo "${ECHO_T}$cf_cv_have_errno" >&6
10429
10430 if test "$cf_cv_have_errno" = yes ; then
10431
10432 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10433
10434     cat >>confdefs.h <<EOF
10435 #define $cf_result 1
10436 EOF
10437
10438 fi
10439
10440 echo "$as_me:10440: checking if data-only library module links" >&5
10441 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10442 if test "${cf_cv_link_dataonly+set}" = set; then
10443   echo $ECHO_N "(cached) $ECHO_C" >&6
10444 else
10445
10446         rm -f conftest.a
10447         cat >conftest.$ac_ext <<EOF
10448 #line 10448 "configure"
10449 int     testdata[3] = { 123, 456, 789 };
10450 EOF
10451         if { (eval echo "$as_me:10451: \"$ac_compile\"") >&5
10452   (eval $ac_compile) 2>&5
10453   ac_status=$?
10454   echo "$as_me:10454: \$? = $ac_status" >&5
10455   (exit $ac_status); } ; then
10456                 mv conftest.o data.o && \
10457                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
10458         fi
10459         rm -f conftest.$ac_ext data.o
10460         cat >conftest.$ac_ext <<EOF
10461 #line 10461 "configure"
10462 int     testfunc()
10463 {
10464 #if defined(NeXT)
10465         exit(1);        /* I'm told this linker is broken */
10466 #else
10467         extern int testdata[3];
10468         return testdata[0] == 123
10469            &&  testdata[1] == 456
10470            &&  testdata[2] == 789;
10471 #endif
10472 }
10473 EOF
10474         if { (eval echo "$as_me:10474: \"$ac_compile\"") >&5
10475   (eval $ac_compile) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); }; then
10479                 mv conftest.o func.o && \
10480                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
10481         fi
10482         rm -f conftest.$ac_ext func.o
10483         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10484         cf_saveLIBS="$LIBS"
10485         LIBS="conftest.a $LIBS"
10486         if test "$cross_compiling" = yes; then
10487   cf_cv_link_dataonly=unknown
10488 else
10489   cat >conftest.$ac_ext <<_ACEOF
10490 #line 10490 "configure"
10491 #include "confdefs.h"
10492
10493         int main()
10494         {
10495                 extern int testfunc();
10496                 exit (!testfunc());
10497         }
10498
10499 _ACEOF
10500 rm -f conftest$ac_exeext
10501 if { (eval echo "$as_me:10501: \"$ac_link\"") >&5
10502   (eval $ac_link) 2>&5
10503   ac_status=$?
10504   echo "$as_me:10504: \$? = $ac_status" >&5
10505   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10506   { (eval echo "$as_me:10506: \"$ac_try\"") >&5
10507   (eval $ac_try) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit $ac_status); }; }; then
10511   cf_cv_link_dataonly=yes
10512 else
10513   echo "$as_me: program exited with status $ac_status" >&5
10514 echo "$as_me: failed program was:" >&5
10515 cat conftest.$ac_ext >&5
10516 cf_cv_link_dataonly=no
10517 fi
10518 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10519 fi
10520         LIBS="$cf_saveLIBS"
10521
10522 fi
10523
10524 echo "$as_me:10524: result: $cf_cv_link_dataonly" >&5
10525 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10526
10527 if test "$cf_cv_link_dataonly" = no ; then
10528         cat >>confdefs.h <<\EOF
10529 #define BROKEN_LINKER 1
10530 EOF
10531
10532         BROKEN_LINKER=1
10533 fi
10534
10535 ###     Checks for library functions.
10536
10537 for ac_func in \
10538 getcwd \
10539 getegid \
10540 geteuid \
10541 getttynam \
10542 issetugid \
10543 poll \
10544 remove \
10545 select \
10546 setbuf \
10547 setbuffer \
10548 setvbuf \
10549 sigaction \
10550 sigvec \
10551 strdup \
10552 strstr \
10553 tcgetpgrp \
10554 times \
10555 vsnprintf \
10556
10557 do
10558 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10559 echo "$as_me:10559: checking for $ac_func" >&5
10560 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10561 if eval "test \"\${$as_ac_var+set}\" = set"; then
10562   echo $ECHO_N "(cached) $ECHO_C" >&6
10563 else
10564   cat >conftest.$ac_ext <<_ACEOF
10565 #line 10565 "configure"
10566 #include "confdefs.h"
10567 /* System header to define __stub macros and hopefully few prototypes,
10568     which can conflict with char $ac_func (); below.  */
10569 #include <assert.h>
10570 /* Override any gcc2 internal prototype to avoid an error.  */
10571 #ifdef __cplusplus
10572 extern "C"
10573 #endif
10574 /* We use char because int might match the return type of a gcc2
10575    builtin and then its argument prototype would still apply.  */
10576 char $ac_func ();
10577 char (*f) ();
10578
10579 int
10580 main ()
10581 {
10582 /* The GNU C library defines this for functions which it implements
10583     to always fail with ENOSYS.  Some functions are actually named
10584     something starting with __ and the normal name is an alias.  */
10585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10586 choke me
10587 #else
10588 f = $ac_func;
10589 #endif
10590
10591   ;
10592   return 0;
10593 }
10594 _ACEOF
10595 rm -f conftest.$ac_objext conftest$ac_exeext
10596 if { (eval echo "$as_me:10596: \"$ac_link\"") >&5
10597   (eval $ac_link) 2>&5
10598   ac_status=$?
10599   echo "$as_me:10599: \$? = $ac_status" >&5
10600   (exit $ac_status); } &&
10601          { ac_try='test -s conftest$ac_exeext'
10602   { (eval echo "$as_me:10602: \"$ac_try\"") >&5
10603   (eval $ac_try) 2>&5
10604   ac_status=$?
10605   echo "$as_me:10605: \$? = $ac_status" >&5
10606   (exit $ac_status); }; }; then
10607   eval "$as_ac_var=yes"
10608 else
10609   echo "$as_me: failed program was:" >&5
10610 cat conftest.$ac_ext >&5
10611 eval "$as_ac_var=no"
10612 fi
10613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10614 fi
10615 echo "$as_me:10615: result: `eval echo '${'$as_ac_var'}'`" >&5
10616 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10617 if test `eval echo '${'$as_ac_var'}'` = yes; then
10618   cat >>confdefs.h <<EOF
10619 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10620 EOF
10621
10622 fi
10623 done
10624
10625 if test "$with_getcap" = "yes" ; then
10626
10627 echo "$as_me:10627: checking for terminal-capability database functions" >&5
10628 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
10629 if test "${cf_cv_cgetent+set}" = set; then
10630   echo $ECHO_N "(cached) $ECHO_C" >&6
10631 else
10632
10633 cat >conftest.$ac_ext <<_ACEOF
10634 #line 10634 "configure"
10635 #include "confdefs.h"
10636
10637 #include <stdlib.h>
10638 int
10639 main ()
10640 {
10641
10642         char temp[128];
10643         char *buf = temp;
10644         char *db_array = temp;
10645         cgetent(&buf, /* int *, */ &db_array, "vt100");
10646         cgetcap(buf, "tc", '=');
10647         cgetmatch(buf, "tc");
10648
10649   ;
10650   return 0;
10651 }
10652 _ACEOF
10653 rm -f conftest.$ac_objext conftest$ac_exeext
10654 if { (eval echo "$as_me:10654: \"$ac_link\"") >&5
10655   (eval $ac_link) 2>&5
10656   ac_status=$?
10657   echo "$as_me:10657: \$? = $ac_status" >&5
10658   (exit $ac_status); } &&
10659          { ac_try='test -s conftest$ac_exeext'
10660   { (eval echo "$as_me:10660: \"$ac_try\"") >&5
10661   (eval $ac_try) 2>&5
10662   ac_status=$?
10663   echo "$as_me:10663: \$? = $ac_status" >&5
10664   (exit $ac_status); }; }; then
10665   cf_cv_cgetent=yes
10666 else
10667   echo "$as_me: failed program was:" >&5
10668 cat conftest.$ac_ext >&5
10669 cf_cv_cgetent=no
10670 fi
10671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10672
10673 fi
10674
10675 echo "$as_me:10675: result: $cf_cv_cgetent" >&5
10676 echo "${ECHO_T}$cf_cv_cgetent" >&6
10677 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
10678 #define HAVE_BSD_CGETENT 1
10679 EOF
10680
10681 fi
10682
10683 echo "$as_me:10683: checking for isascii" >&5
10684 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
10685 if test "${cf_cv_have_isascii+set}" = set; then
10686   echo $ECHO_N "(cached) $ECHO_C" >&6
10687 else
10688
10689         cat >conftest.$ac_ext <<_ACEOF
10690 #line 10690 "configure"
10691 #include "confdefs.h"
10692 #include <ctype.h>
10693 int
10694 main ()
10695 {
10696 int x = isascii(' ')
10697   ;
10698   return 0;
10699 }
10700 _ACEOF
10701 rm -f conftest.$ac_objext conftest$ac_exeext
10702 if { (eval echo "$as_me:10702: \"$ac_link\"") >&5
10703   (eval $ac_link) 2>&5
10704   ac_status=$?
10705   echo "$as_me:10705: \$? = $ac_status" >&5
10706   (exit $ac_status); } &&
10707          { ac_try='test -s conftest$ac_exeext'
10708   { (eval echo "$as_me:10708: \"$ac_try\"") >&5
10709   (eval $ac_try) 2>&5
10710   ac_status=$?
10711   echo "$as_me:10711: \$? = $ac_status" >&5
10712   (exit $ac_status); }; }; then
10713   cf_cv_have_isascii=yes
10714 else
10715   echo "$as_me: failed program was:" >&5
10716 cat conftest.$ac_ext >&5
10717 cf_cv_have_isascii=no
10718 fi
10719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10720
10721 fi
10722 echo "$as_me:10722: result: $cf_cv_have_isascii" >&5
10723 echo "${ECHO_T}$cf_cv_have_isascii" >&6
10724 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
10725 #define HAVE_ISASCII 1
10726 EOF
10727
10728 if test "$ac_cv_func_sigaction" = yes; then
10729 echo "$as_me:10729: checking whether sigaction needs _POSIX_SOURCE" >&5
10730 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
10731 cat >conftest.$ac_ext <<_ACEOF
10732 #line 10732 "configure"
10733 #include "confdefs.h"
10734
10735 #include <sys/types.h>
10736 #include <signal.h>
10737 int
10738 main ()
10739 {
10740 struct sigaction act
10741   ;
10742   return 0;
10743 }
10744 _ACEOF
10745 rm -f conftest.$ac_objext
10746 if { (eval echo "$as_me:10746: \"$ac_compile\"") >&5
10747   (eval $ac_compile) 2>&5
10748   ac_status=$?
10749   echo "$as_me:10749: \$? = $ac_status" >&5
10750   (exit $ac_status); } &&
10751          { ac_try='test -s conftest.$ac_objext'
10752   { (eval echo "$as_me:10752: \"$ac_try\"") >&5
10753   (eval $ac_try) 2>&5
10754   ac_status=$?
10755   echo "$as_me:10755: \$? = $ac_status" >&5
10756   (exit $ac_status); }; }; then
10757   sigact_bad=no
10758 else
10759   echo "$as_me: failed program was:" >&5
10760 cat conftest.$ac_ext >&5
10761
10762 cat >conftest.$ac_ext <<_ACEOF
10763 #line 10763 "configure"
10764 #include "confdefs.h"
10765
10766 #define _POSIX_SOURCE
10767 #include <sys/types.h>
10768 #include <signal.h>
10769 int
10770 main ()
10771 {
10772 struct sigaction act
10773   ;
10774   return 0;
10775 }
10776 _ACEOF
10777 rm -f conftest.$ac_objext
10778 if { (eval echo "$as_me:10778: \"$ac_compile\"") >&5
10779   (eval $ac_compile) 2>&5
10780   ac_status=$?
10781   echo "$as_me:10781: \$? = $ac_status" >&5
10782   (exit $ac_status); } &&
10783          { ac_try='test -s conftest.$ac_objext'
10784   { (eval echo "$as_me:10784: \"$ac_try\"") >&5
10785   (eval $ac_try) 2>&5
10786   ac_status=$?
10787   echo "$as_me:10787: \$? = $ac_status" >&5
10788   (exit $ac_status); }; }; then
10789   sigact_bad=yes
10790          cat >>confdefs.h <<\EOF
10791 #define SVR4_ACTION 1
10792 EOF
10793
10794 else
10795   echo "$as_me: failed program was:" >&5
10796 cat conftest.$ac_ext >&5
10797 sigact_bad=unknown
10798 fi
10799 rm -f conftest.$ac_objext conftest.$ac_ext
10800 fi
10801 rm -f conftest.$ac_objext conftest.$ac_ext
10802 echo "$as_me:10802: result: $sigact_bad" >&5
10803 echo "${ECHO_T}$sigact_bad" >&6
10804 fi
10805
10806 echo "$as_me:10806: checking if nanosleep really works" >&5
10807 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
10808 if test "${cf_cv_func_nanosleep+set}" = set; then
10809   echo $ECHO_N "(cached) $ECHO_C" >&6
10810 else
10811
10812 if test "$cross_compiling" = yes; then
10813   cf_cv_func_nanosleep=unknown
10814 else
10815   cat >conftest.$ac_ext <<_ACEOF
10816 #line 10816 "configure"
10817 #include "confdefs.h"
10818
10819 #include <stdio.h>
10820 #include <errno.h>
10821 #include <time.h>
10822
10823 #ifdef HAVE_SYS_TIME_H
10824 #include <sys/time.h>
10825 #endif
10826
10827 int main() {
10828         struct timespec ts1, ts2;
10829         int code;
10830         ts1.tv_sec  = 0;
10831         ts1.tv_nsec = 750000000;
10832         ts2.tv_sec  = 0;
10833         ts2.tv_nsec = 0;
10834         errno = 0;
10835         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
10836         exit(code != 0);
10837 }
10838
10839 _ACEOF
10840 rm -f conftest$ac_exeext
10841 if { (eval echo "$as_me:10841: \"$ac_link\"") >&5
10842   (eval $ac_link) 2>&5
10843   ac_status=$?
10844   echo "$as_me:10844: \$? = $ac_status" >&5
10845   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10846   { (eval echo "$as_me:10846: \"$ac_try\"") >&5
10847   (eval $ac_try) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit $ac_status); }; }; then
10851   cf_cv_func_nanosleep=yes
10852 else
10853   echo "$as_me: program exited with status $ac_status" >&5
10854 echo "$as_me: failed program was:" >&5
10855 cat conftest.$ac_ext >&5
10856 cf_cv_func_nanosleep=no
10857 fi
10858 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10859 fi
10860 fi
10861 echo "$as_me:10861: result: $cf_cv_func_nanosleep" >&5
10862 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
10863
10864 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
10865 #define HAVE_NANOSLEEP 1
10866 EOF
10867
10868 for ac_header in \
10869 termio.h \
10870 termios.h \
10871 unistd.h \
10872
10873 do
10874 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10875 echo "$as_me:10875: checking for $ac_header" >&5
10876 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10877 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10878   echo $ECHO_N "(cached) $ECHO_C" >&6
10879 else
10880   cat >conftest.$ac_ext <<_ACEOF
10881 #line 10881 "configure"
10882 #include "confdefs.h"
10883 #include <$ac_header>
10884 _ACEOF
10885 if { (eval echo "$as_me:10885: \"$ac_cpp conftest.$ac_ext\"") >&5
10886   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10887   ac_status=$?
10888   egrep -v '^ *\+' conftest.er1 >conftest.err
10889   rm -f conftest.er1
10890   cat conftest.err >&5
10891   echo "$as_me:10891: \$? = $ac_status" >&5
10892   (exit $ac_status); } >/dev/null; then
10893   if test -s conftest.err; then
10894     ac_cpp_err=$ac_c_preproc_warn_flag
10895   else
10896     ac_cpp_err=
10897   fi
10898 else
10899   ac_cpp_err=yes
10900 fi
10901 if test -z "$ac_cpp_err"; then
10902   eval "$as_ac_Header=yes"
10903 else
10904   echo "$as_me: failed program was:" >&5
10905   cat conftest.$ac_ext >&5
10906   eval "$as_ac_Header=no"
10907 fi
10908 rm -f conftest.err conftest.$ac_ext
10909 fi
10910 echo "$as_me:10910: result: `eval echo '${'$as_ac_Header'}'`" >&5
10911 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10912 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10913   cat >>confdefs.h <<EOF
10914 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10915 EOF
10916
10917 fi
10918 done
10919
10920 if test "$ISC" = yes ; then
10921
10922 for ac_header in sys/termio.h
10923 do
10924 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10925 echo "$as_me:10925: checking for $ac_header" >&5
10926 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10927 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10928   echo $ECHO_N "(cached) $ECHO_C" >&6
10929 else
10930   cat >conftest.$ac_ext <<_ACEOF
10931 #line 10931 "configure"
10932 #include "confdefs.h"
10933 #include <$ac_header>
10934 _ACEOF
10935 if { (eval echo "$as_me:10935: \"$ac_cpp conftest.$ac_ext\"") >&5
10936   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10937   ac_status=$?
10938   egrep -v '^ *\+' conftest.er1 >conftest.err
10939   rm -f conftest.er1
10940   cat conftest.err >&5
10941   echo "$as_me:10941: \$? = $ac_status" >&5
10942   (exit $ac_status); } >/dev/null; then
10943   if test -s conftest.err; then
10944     ac_cpp_err=$ac_c_preproc_warn_flag
10945   else
10946     ac_cpp_err=
10947   fi
10948 else
10949   ac_cpp_err=yes
10950 fi
10951 if test -z "$ac_cpp_err"; then
10952   eval "$as_ac_Header=yes"
10953 else
10954   echo "$as_me: failed program was:" >&5
10955   cat conftest.$ac_ext >&5
10956   eval "$as_ac_Header=no"
10957 fi
10958 rm -f conftest.err conftest.$ac_ext
10959 fi
10960 echo "$as_me:10960: result: `eval echo '${'$as_ac_Header'}'`" >&5
10961 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10962 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10963   cat >>confdefs.h <<EOF
10964 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10965 EOF
10966
10967 fi
10968 done
10969
10970 fi
10971 if test "$ac_cv_header_termios_h" = yes ; then
10972         case "$CFLAGS $CPPFLAGS" in
10973         *-D_POSIX_SOURCE*)
10974                 termios_bad=dunno ;;
10975         *)      termios_bad=maybe ;;
10976         esac
10977         if test "$termios_bad" = maybe ; then
10978         echo "$as_me:10978: checking whether termios.h needs _POSIX_SOURCE" >&5
10979 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
10980         cat >conftest.$ac_ext <<_ACEOF
10981 #line 10981 "configure"
10982 #include "confdefs.h"
10983 #include <termios.h>
10984 int
10985 main ()
10986 {
10987 struct termios foo; int x = foo.c_iflag
10988   ;
10989   return 0;
10990 }
10991 _ACEOF
10992 rm -f conftest.$ac_objext
10993 if { (eval echo "$as_me:10993: \"$ac_compile\"") >&5
10994   (eval $ac_compile) 2>&5
10995   ac_status=$?
10996   echo "$as_me:10996: \$? = $ac_status" >&5
10997   (exit $ac_status); } &&
10998          { ac_try='test -s conftest.$ac_objext'
10999   { (eval echo "$as_me:10999: \"$ac_try\"") >&5
11000   (eval $ac_try) 2>&5
11001   ac_status=$?
11002   echo "$as_me:11002: \$? = $ac_status" >&5
11003   (exit $ac_status); }; }; then
11004   termios_bad=no
11005 else
11006   echo "$as_me: failed program was:" >&5
11007 cat conftest.$ac_ext >&5
11008
11009                 cat >conftest.$ac_ext <<_ACEOF
11010 #line 11010 "configure"
11011 #include "confdefs.h"
11012
11013 #define _POSIX_SOURCE
11014 #include <termios.h>
11015 int
11016 main ()
11017 {
11018 struct termios foo; int x = foo.c_iflag
11019   ;
11020   return 0;
11021 }
11022 _ACEOF
11023 rm -f conftest.$ac_objext
11024 if { (eval echo "$as_me:11024: \"$ac_compile\"") >&5
11025   (eval $ac_compile) 2>&5
11026   ac_status=$?
11027   echo "$as_me:11027: \$? = $ac_status" >&5
11028   (exit $ac_status); } &&
11029          { ac_try='test -s conftest.$ac_objext'
11030   { (eval echo "$as_me:11030: \"$ac_try\"") >&5
11031   (eval $ac_try) 2>&5
11032   ac_status=$?
11033   echo "$as_me:11033: \$? = $ac_status" >&5
11034   (exit $ac_status); }; }; then
11035   termios_bad=unknown
11036 else
11037   echo "$as_me: failed program was:" >&5
11038 cat conftest.$ac_ext >&5
11039 termios_bad=yes cat >>confdefs.h <<\EOF
11040 #define SVR4_TERMIO 1
11041 EOF
11042
11043 fi
11044 rm -f conftest.$ac_objext conftest.$ac_ext
11045
11046 fi
11047 rm -f conftest.$ac_objext conftest.$ac_ext
11048         echo "$as_me:11048: result: $termios_bad" >&5
11049 echo "${ECHO_T}$termios_bad" >&6
11050         fi
11051 fi
11052
11053 echo "$as_me:11053: checking for tcgetattr" >&5
11054 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
11055 if test "${cf_cv_have_tcgetattr+set}" = set; then
11056   echo $ECHO_N "(cached) $ECHO_C" >&6
11057 else
11058
11059 cat >conftest.$ac_ext <<_ACEOF
11060 #line 11060 "configure"
11061 #include "confdefs.h"
11062
11063 #include <sys/types.h>
11064 #ifdef HAVE_UNISTD_H
11065 #include <unistd.h>
11066 #endif
11067 #ifdef HAVE_TERMIOS_H
11068 #include <termios.h>
11069 #define TTY struct termios
11070 #else
11071 #ifdef HAVE_TERMIO_H
11072 #include <termio.h>
11073 #define TTY struct termio
11074 #endif
11075 #endif
11076
11077 int
11078 main ()
11079 {
11080
11081 TTY foo;
11082 tcgetattr(1, &foo);
11083   ;
11084   return 0;
11085 }
11086 _ACEOF
11087 rm -f conftest.$ac_objext conftest$ac_exeext
11088 if { (eval echo "$as_me:11088: \"$ac_link\"") >&5
11089   (eval $ac_link) 2>&5
11090   ac_status=$?
11091   echo "$as_me:11091: \$? = $ac_status" >&5
11092   (exit $ac_status); } &&
11093          { ac_try='test -s conftest$ac_exeext'
11094   { (eval echo "$as_me:11094: \"$ac_try\"") >&5
11095   (eval $ac_try) 2>&5
11096   ac_status=$?
11097   echo "$as_me:11097: \$? = $ac_status" >&5
11098   (exit $ac_status); }; }; then
11099   cf_cv_have_tcgetattr=yes
11100 else
11101   echo "$as_me: failed program was:" >&5
11102 cat conftest.$ac_ext >&5
11103 cf_cv_have_tcgetattr=no
11104 fi
11105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11106 fi
11107 echo "$as_me:11107: result: $cf_cv_have_tcgetattr" >&5
11108 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
11109 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
11110 #define HAVE_TCGETATTR 1
11111 EOF
11112
11113 echo "$as_me:11113: checking for vsscanf function or workaround" >&5
11114 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
11115 if test "${cf_cv_func_vsscanf+set}" = set; then
11116   echo $ECHO_N "(cached) $ECHO_C" >&6
11117 else
11118
11119 cat >conftest.$ac_ext <<_ACEOF
11120 #line 11120 "configure"
11121 #include "confdefs.h"
11122
11123 #include <stdarg.h>
11124 #include <stdio.h>
11125 int
11126 main ()
11127 {
11128
11129         va_list ap;
11130         vsscanf("from", "%d", ap)
11131   ;
11132   return 0;
11133 }
11134 _ACEOF
11135 rm -f conftest.$ac_objext conftest$ac_exeext
11136 if { (eval echo "$as_me:11136: \"$ac_link\"") >&5
11137   (eval $ac_link) 2>&5
11138   ac_status=$?
11139   echo "$as_me:11139: \$? = $ac_status" >&5
11140   (exit $ac_status); } &&
11141          { ac_try='test -s conftest$ac_exeext'
11142   { (eval echo "$as_me:11142: \"$ac_try\"") >&5
11143   (eval $ac_try) 2>&5
11144   ac_status=$?
11145   echo "$as_me:11145: \$? = $ac_status" >&5
11146   (exit $ac_status); }; }; then
11147   cf_cv_func_vsscanf=vsscanf
11148 else
11149   echo "$as_me: failed program was:" >&5
11150 cat conftest.$ac_ext >&5
11151
11152 cat >conftest.$ac_ext <<_ACEOF
11153 #line 11153 "configure"
11154 #include "confdefs.h"
11155
11156 #include <stdarg.h>
11157 #include <stdio.h>
11158 int
11159 main ()
11160 {
11161
11162     FILE strbuf;
11163     char *str = "from";
11164
11165     strbuf._flag = _IOREAD;
11166     strbuf._ptr = strbuf._base = (unsigned char *) str;
11167     strbuf._cnt = strlen(str);
11168     strbuf._file = _NFILE;
11169     return (vfscanf(&strbuf, "%d", ap))
11170   ;
11171   return 0;
11172 }
11173 _ACEOF
11174 rm -f conftest.$ac_objext conftest$ac_exeext
11175 if { (eval echo "$as_me:11175: \"$ac_link\"") >&5
11176   (eval $ac_link) 2>&5
11177   ac_status=$?
11178   echo "$as_me:11178: \$? = $ac_status" >&5
11179   (exit $ac_status); } &&
11180          { ac_try='test -s conftest$ac_exeext'
11181   { (eval echo "$as_me:11181: \"$ac_try\"") >&5
11182   (eval $ac_try) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); }; }; then
11186   cf_cv_func_vsscanf=vfscanf
11187 else
11188   echo "$as_me: failed program was:" >&5
11189 cat conftest.$ac_ext >&5
11190
11191 cat >conftest.$ac_ext <<_ACEOF
11192 #line 11192 "configure"
11193 #include "confdefs.h"
11194
11195 #include <stdarg.h>
11196 #include <stdio.h>
11197 int
11198 main ()
11199 {
11200
11201     FILE strbuf;
11202     char *str = "from";
11203
11204     strbuf._flag = _IOREAD;
11205     strbuf._ptr = strbuf._base = (unsigned char *) str;
11206     strbuf._cnt = strlen(str);
11207     strbuf._file = _NFILE;
11208     return (_doscan(&strbuf, "%d", ap))
11209   ;
11210   return 0;
11211 }
11212 _ACEOF
11213 rm -f conftest.$ac_objext conftest$ac_exeext
11214 if { (eval echo "$as_me:11214: \"$ac_link\"") >&5
11215   (eval $ac_link) 2>&5
11216   ac_status=$?
11217   echo "$as_me:11217: \$? = $ac_status" >&5
11218   (exit $ac_status); } &&
11219          { ac_try='test -s conftest$ac_exeext'
11220   { (eval echo "$as_me:11220: \"$ac_try\"") >&5
11221   (eval $ac_try) 2>&5
11222   ac_status=$?
11223   echo "$as_me:11223: \$? = $ac_status" >&5
11224   (exit $ac_status); }; }; then
11225   cf_cv_func_vsscanf=_doscan
11226 else
11227   echo "$as_me: failed program was:" >&5
11228 cat conftest.$ac_ext >&5
11229
11230 cf_cv_func_vsscanf=no
11231 fi
11232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11233 fi
11234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11235 fi
11236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11237 fi
11238 echo "$as_me:11238: result: $cf_cv_func_vsscanf" >&5
11239 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
11240
11241 case $cf_cv_func_vsscanf in #(vi
11242 vsscanf) cat >>confdefs.h <<\EOF
11243 #define HAVE_VSSCANF 1
11244 EOF
11245 ;; #(vi
11246 vfscanf) cat >>confdefs.h <<\EOF
11247 #define HAVE_VFSCANF 1
11248 EOF
11249 ;; #(vi
11250 _doscan) cat >>confdefs.h <<\EOF
11251 #define HAVE__DOSCAN 1
11252 EOF
11253 ;;
11254 esac
11255
11256 echo "$as_me:11256: checking for working mkstemp" >&5
11257 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11258 if test "${cf_cv_func_mkstemp+set}" = set; then
11259   echo $ECHO_N "(cached) $ECHO_C" >&6
11260 else
11261
11262 rm -f conftest*
11263 if test "$cross_compiling" = yes; then
11264   echo "$as_me:11264: checking for mkstemp" >&5
11265 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11266 if test "${ac_cv_func_mkstemp+set}" = set; then
11267   echo $ECHO_N "(cached) $ECHO_C" >&6
11268 else
11269   cat >conftest.$ac_ext <<_ACEOF
11270 #line 11270 "configure"
11271 #include "confdefs.h"
11272 /* System header to define __stub macros and hopefully few prototypes,
11273     which can conflict with char mkstemp (); below.  */
11274 #include <assert.h>
11275 /* Override any gcc2 internal prototype to avoid an error.  */
11276 #ifdef __cplusplus
11277 extern "C"
11278 #endif
11279 /* We use char because int might match the return type of a gcc2
11280    builtin and then its argument prototype would still apply.  */
11281 char mkstemp ();
11282 char (*f) ();
11283
11284 int
11285 main ()
11286 {
11287 /* The GNU C library defines this for functions which it implements
11288     to always fail with ENOSYS.  Some functions are actually named
11289     something starting with __ and the normal name is an alias.  */
11290 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11291 choke me
11292 #else
11293 f = mkstemp;
11294 #endif
11295
11296   ;
11297   return 0;
11298 }
11299 _ACEOF
11300 rm -f conftest.$ac_objext conftest$ac_exeext
11301 if { (eval echo "$as_me:11301: \"$ac_link\"") >&5
11302   (eval $ac_link) 2>&5
11303   ac_status=$?
11304   echo "$as_me:11304: \$? = $ac_status" >&5
11305   (exit $ac_status); } &&
11306          { ac_try='test -s conftest$ac_exeext'
11307   { (eval echo "$as_me:11307: \"$ac_try\"") >&5
11308   (eval $ac_try) 2>&5
11309   ac_status=$?
11310   echo "$as_me:11310: \$? = $ac_status" >&5
11311   (exit $ac_status); }; }; then
11312   ac_cv_func_mkstemp=yes
11313 else
11314   echo "$as_me: failed program was:" >&5
11315 cat conftest.$ac_ext >&5
11316 ac_cv_func_mkstemp=no
11317 fi
11318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11319 fi
11320 echo "$as_me:11320: result: $ac_cv_func_mkstemp" >&5
11321 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11322
11323 else
11324   cat >conftest.$ac_ext <<_ACEOF
11325 #line 11325 "configure"
11326 #include "confdefs.h"
11327
11328 #include <sys/types.h>
11329 #include <stdlib.h>
11330 #include <stdio.h>
11331 #include <string.h>
11332 #include <sys/stat.h>
11333 int main()
11334 {
11335         char *tmpl = "conftestXXXXXX";
11336         char name[2][80];
11337         int n;
11338         int result = 0;
11339         int fd;
11340         struct stat sb;
11341
11342         umask(077);
11343         for (n = 0; n < 2; ++n) {
11344                 strcpy(name[n], tmpl);
11345                 if ((fd = mkstemp(name[n])) >= 0) {
11346                         if (!strcmp(name[n], tmpl)
11347                          || stat(name[n], &sb) != 0
11348                          || (sb.st_mode & S_IFMT) != S_IFREG
11349                          || (sb.st_mode & 077) != 0) {
11350                                 result = 1;
11351                         }
11352                         close(fd);
11353                 }
11354         }
11355         if (result == 0
11356          && !strcmp(name[0], name[1]))
11357                 result = 1;
11358         exit(result);
11359 }
11360
11361 _ACEOF
11362 rm -f conftest$ac_exeext
11363 if { (eval echo "$as_me:11363: \"$ac_link\"") >&5
11364   (eval $ac_link) 2>&5
11365   ac_status=$?
11366   echo "$as_me:11366: \$? = $ac_status" >&5
11367   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11368   { (eval echo "$as_me:11368: \"$ac_try\"") >&5
11369   (eval $ac_try) 2>&5
11370   ac_status=$?
11371   echo "$as_me:11371: \$? = $ac_status" >&5
11372   (exit $ac_status); }; }; then
11373   cf_cv_func_mkstemp=yes
11374
11375 else
11376   echo "$as_me: program exited with status $ac_status" >&5
11377 echo "$as_me: failed program was:" >&5
11378 cat conftest.$ac_ext >&5
11379 cf_cv_func_mkstemp=no
11380
11381 fi
11382 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11383 fi
11384
11385 fi
11386 echo "$as_me:11386: result: $cf_cv_func_mkstemp" >&5
11387 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11388 if test "$cf_cv_func_mkstemp" = yes ; then
11389         cat >>confdefs.h <<\EOF
11390 #define HAVE_MKSTEMP 1
11391 EOF
11392
11393 fi
11394
11395 # setup for prototype of fallback for vsscanf()
11396 if test "$cf_cv_func_vsscanf" = vsscanf ; then
11397         HAVE_VSSCANF=1
11398 else
11399         HAVE_VSSCANF=0
11400 fi
11401
11402 if test "$cross_compiling" = yes ; then
11403         { echo "$as_me:11403: WARNING: cross compiling: assume setvbuf params not reversed" >&5
11404 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
11405 else
11406         echo "$as_me:11406: checking whether setvbuf arguments are reversed" >&5
11407 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
11408 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
11409   echo $ECHO_N "(cached) $ECHO_C" >&6
11410 else
11411   if test "$cross_compiling" = yes; then
11412   { { echo "$as_me:11412: error: cannot run test program while cross compiling" >&5
11413 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11414    { (exit 1); exit 1; }; }
11415 else
11416   cat >conftest.$ac_ext <<_ACEOF
11417 #line 11417 "configure"
11418 #include "confdefs.h"
11419 #include <stdio.h>
11420 /* If setvbuf has the reversed format, exit 0. */
11421 int
11422 main ()
11423 {
11424   /* This call has the arguments reversed.
11425      A reversed system may check and see that the address of main
11426      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
11427   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
11428     exit(1);
11429   putc('\r', stdout);
11430   exit(0);                      /* Non-reversed systems segv here.  */
11431 }
11432 _ACEOF
11433 rm -f conftest$ac_exeext
11434 if { (eval echo "$as_me:11434: \"$ac_link\"") >&5
11435   (eval $ac_link) 2>&5
11436   ac_status=$?
11437   echo "$as_me:11437: \$? = $ac_status" >&5
11438   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11439   { (eval echo "$as_me:11439: \"$ac_try\"") >&5
11440   (eval $ac_try) 2>&5
11441   ac_status=$?
11442   echo "$as_me:11442: \$? = $ac_status" >&5
11443   (exit $ac_status); }; }; then
11444   ac_cv_func_setvbuf_reversed=yes
11445 else
11446   echo "$as_me: program exited with status $ac_status" >&5
11447 echo "$as_me: failed program was:" >&5
11448 cat conftest.$ac_ext >&5
11449 ac_cv_func_setvbuf_reversed=no
11450 fi
11451 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11452 fi
11453 rm -f core core.* *.core
11454 fi
11455 echo "$as_me:11455: result: $ac_cv_func_setvbuf_reversed" >&5
11456 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
11457 if test $ac_cv_func_setvbuf_reversed = yes; then
11458
11459 cat >>confdefs.h <<\EOF
11460 #define SETVBUF_REVERSED 1
11461 EOF
11462
11463 fi
11464
11465 fi
11466 echo "$as_me:11466: checking return type of signal handlers" >&5
11467 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11468 if test "${ac_cv_type_signal+set}" = set; then
11469   echo $ECHO_N "(cached) $ECHO_C" >&6
11470 else
11471   cat >conftest.$ac_ext <<_ACEOF
11472 #line 11472 "configure"
11473 #include "confdefs.h"
11474 #include <sys/types.h>
11475 #include <signal.h>
11476 #ifdef signal
11477 # undef signal
11478 #endif
11479 #ifdef __cplusplus
11480 extern "C" void (*signal (int, void (*)(int)))(int);
11481 #else
11482 void (*signal ()) ();
11483 #endif
11484
11485 int
11486 main ()
11487 {
11488 int i;
11489   ;
11490   return 0;
11491 }
11492 _ACEOF
11493 rm -f conftest.$ac_objext
11494 if { (eval echo "$as_me:11494: \"$ac_compile\"") >&5
11495   (eval $ac_compile) 2>&5
11496   ac_status=$?
11497   echo "$as_me:11497: \$? = $ac_status" >&5
11498   (exit $ac_status); } &&
11499          { ac_try='test -s conftest.$ac_objext'
11500   { (eval echo "$as_me:11500: \"$ac_try\"") >&5
11501   (eval $ac_try) 2>&5
11502   ac_status=$?
11503   echo "$as_me:11503: \$? = $ac_status" >&5
11504   (exit $ac_status); }; }; then
11505   ac_cv_type_signal=void
11506 else
11507   echo "$as_me: failed program was:" >&5
11508 cat conftest.$ac_ext >&5
11509 ac_cv_type_signal=int
11510 fi
11511 rm -f conftest.$ac_objext conftest.$ac_ext
11512 fi
11513 echo "$as_me:11513: result: $ac_cv_type_signal" >&5
11514 echo "${ECHO_T}$ac_cv_type_signal" >&6
11515
11516 cat >>confdefs.h <<EOF
11517 #define RETSIGTYPE $ac_cv_type_signal
11518 EOF
11519
11520 echo "$as_me:11520: checking for type sigaction_t" >&5
11521 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
11522 if test "${cf_cv_type_sigaction+set}" = set; then
11523   echo $ECHO_N "(cached) $ECHO_C" >&6
11524 else
11525
11526         cat >conftest.$ac_ext <<_ACEOF
11527 #line 11527 "configure"
11528 #include "confdefs.h"
11529
11530 #include <signal.h>
11531 int
11532 main ()
11533 {
11534 sigaction_t x
11535   ;
11536   return 0;
11537 }
11538 _ACEOF
11539 rm -f conftest.$ac_objext
11540 if { (eval echo "$as_me:11540: \"$ac_compile\"") >&5
11541   (eval $ac_compile) 2>&5
11542   ac_status=$?
11543   echo "$as_me:11543: \$? = $ac_status" >&5
11544   (exit $ac_status); } &&
11545          { ac_try='test -s conftest.$ac_objext'
11546   { (eval echo "$as_me:11546: \"$ac_try\"") >&5
11547   (eval $ac_try) 2>&5
11548   ac_status=$?
11549   echo "$as_me:11549: \$? = $ac_status" >&5
11550   (exit $ac_status); }; }; then
11551   cf_cv_type_sigaction=yes
11552 else
11553   echo "$as_me: failed program was:" >&5
11554 cat conftest.$ac_ext >&5
11555 cf_cv_type_sigaction=no
11556 fi
11557 rm -f conftest.$ac_objext conftest.$ac_ext
11558 fi
11559
11560 echo "$as_me:11560: result: $cf_cv_type_sigaction" >&5
11561 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
11562 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
11563 #define HAVE_TYPE_SIGACTION 1
11564 EOF
11565
11566 echo "$as_me:11566: checking declaration of size-change" >&5
11567 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
11568 if test "${cf_cv_sizechange+set}" = set; then
11569   echo $ECHO_N "(cached) $ECHO_C" >&6
11570 else
11571
11572     cf_cv_sizechange=unknown
11573     cf_save_CPPFLAGS="$CPPFLAGS"
11574
11575 for cf_opts in "" "NEED_PTEM_H"
11576 do
11577
11578     CPPFLAGS="$cf_save_CPPFLAGS"
11579     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
11580     cat >conftest.$ac_ext <<_ACEOF
11581 #line 11581 "configure"
11582 #include "confdefs.h"
11583 #include <sys/types.h>
11584 #ifdef HAVE_TERMIOS_H
11585 #include <termios.h>
11586 #else
11587 #ifdef HAVE_TERMIO_H
11588 #include <termio.h>
11589 #endif
11590 #endif
11591 #ifdef NEED_PTEM_H
11592 /* This is a workaround for SCO:  they neglected to define struct winsize in
11593  * termios.h -- it's only in termio.h and ptem.h
11594  */
11595 #include        <sys/stream.h>
11596 #include        <sys/ptem.h>
11597 #endif
11598 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
11599 #include <sys/ioctl.h>
11600 #endif
11601
11602 int
11603 main ()
11604 {
11605
11606 #ifdef TIOCGSIZE
11607         struct ttysize win;     /* FIXME: what system is this? */
11608         int y = win.ts_lines;
11609         int x = win.ts_cols;
11610 #else
11611 #ifdef TIOCGWINSZ
11612         struct winsize win;
11613         int y = win.ws_row;
11614         int x = win.ws_col;
11615 #else
11616         no TIOCGSIZE or TIOCGWINSZ
11617 #endif /* TIOCGWINSZ */
11618 #endif /* TIOCGSIZE */
11619
11620   ;
11621   return 0;
11622 }
11623 _ACEOF
11624 rm -f conftest.$ac_objext
11625 if { (eval echo "$as_me:11625: \"$ac_compile\"") >&5
11626   (eval $ac_compile) 2>&5
11627   ac_status=$?
11628   echo "$as_me:11628: \$? = $ac_status" >&5
11629   (exit $ac_status); } &&
11630          { ac_try='test -s conftest.$ac_objext'
11631   { (eval echo "$as_me:11631: \"$ac_try\"") >&5
11632   (eval $ac_try) 2>&5
11633   ac_status=$?
11634   echo "$as_me:11634: \$? = $ac_status" >&5
11635   (exit $ac_status); }; }; then
11636   cf_cv_sizechange=yes
11637 else
11638   echo "$as_me: failed program was:" >&5
11639 cat conftest.$ac_ext >&5
11640 cf_cv_sizechange=no
11641 fi
11642 rm -f conftest.$ac_objext conftest.$ac_ext
11643
11644         CPPFLAGS="$cf_save_CPPFLAGS"
11645         if test "$cf_cv_sizechange" = yes ; then
11646                 echo "size-change succeeded ($cf_opts)" >&5
11647                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
11648                 break
11649         fi
11650 done
11651
11652 fi
11653 echo "$as_me:11653: result: $cf_cv_sizechange" >&5
11654 echo "${ECHO_T}$cf_cv_sizechange" >&6
11655 if test "$cf_cv_sizechange" != no ; then
11656         cat >>confdefs.h <<\EOF
11657 #define HAVE_SIZECHANGE 1
11658 EOF
11659
11660         case $cf_cv_sizechange in #(vi
11661         NEED*)
11662                 cat >>confdefs.h <<EOF
11663 #define $cf_cv_sizechange  1
11664 EOF
11665
11666                 ;;
11667         esac
11668 fi
11669
11670 echo "$as_me:11670: checking for memmove" >&5
11671 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
11672 if test "${ac_cv_func_memmove+set}" = set; then
11673   echo $ECHO_N "(cached) $ECHO_C" >&6
11674 else
11675   cat >conftest.$ac_ext <<_ACEOF
11676 #line 11676 "configure"
11677 #include "confdefs.h"
11678 /* System header to define __stub macros and hopefully few prototypes,
11679     which can conflict with char memmove (); below.  */
11680 #include <assert.h>
11681 /* Override any gcc2 internal prototype to avoid an error.  */
11682 #ifdef __cplusplus
11683 extern "C"
11684 #endif
11685 /* We use char because int might match the return type of a gcc2
11686    builtin and then its argument prototype would still apply.  */
11687 char memmove ();
11688 char (*f) ();
11689
11690 int
11691 main ()
11692 {
11693 /* The GNU C library defines this for functions which it implements
11694     to always fail with ENOSYS.  Some functions are actually named
11695     something starting with __ and the normal name is an alias.  */
11696 #if defined (__stub_memmove) || defined (__stub___memmove)
11697 choke me
11698 #else
11699 f = memmove;
11700 #endif
11701
11702   ;
11703   return 0;
11704 }
11705 _ACEOF
11706 rm -f conftest.$ac_objext conftest$ac_exeext
11707 if { (eval echo "$as_me:11707: \"$ac_link\"") >&5
11708   (eval $ac_link) 2>&5
11709   ac_status=$?
11710   echo "$as_me:11710: \$? = $ac_status" >&5
11711   (exit $ac_status); } &&
11712          { ac_try='test -s conftest$ac_exeext'
11713   { (eval echo "$as_me:11713: \"$ac_try\"") >&5
11714   (eval $ac_try) 2>&5
11715   ac_status=$?
11716   echo "$as_me:11716: \$? = $ac_status" >&5
11717   (exit $ac_status); }; }; then
11718   ac_cv_func_memmove=yes
11719 else
11720   echo "$as_me: failed program was:" >&5
11721 cat conftest.$ac_ext >&5
11722 ac_cv_func_memmove=no
11723 fi
11724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11725 fi
11726 echo "$as_me:11726: result: $ac_cv_func_memmove" >&5
11727 echo "${ECHO_T}$ac_cv_func_memmove" >&6
11728 if test $ac_cv_func_memmove = yes; then
11729   :
11730 else
11731
11732 echo "$as_me:11732: checking for bcopy" >&5
11733 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
11734 if test "${ac_cv_func_bcopy+set}" = set; then
11735   echo $ECHO_N "(cached) $ECHO_C" >&6
11736 else
11737   cat >conftest.$ac_ext <<_ACEOF
11738 #line 11738 "configure"
11739 #include "confdefs.h"
11740 /* System header to define __stub macros and hopefully few prototypes,
11741     which can conflict with char bcopy (); below.  */
11742 #include <assert.h>
11743 /* Override any gcc2 internal prototype to avoid an error.  */
11744 #ifdef __cplusplus
11745 extern "C"
11746 #endif
11747 /* We use char because int might match the return type of a gcc2
11748    builtin and then its argument prototype would still apply.  */
11749 char bcopy ();
11750 char (*f) ();
11751
11752 int
11753 main ()
11754 {
11755 /* The GNU C library defines this for functions which it implements
11756     to always fail with ENOSYS.  Some functions are actually named
11757     something starting with __ and the normal name is an alias.  */
11758 #if defined (__stub_bcopy) || defined (__stub___bcopy)
11759 choke me
11760 #else
11761 f = bcopy;
11762 #endif
11763
11764   ;
11765   return 0;
11766 }
11767 _ACEOF
11768 rm -f conftest.$ac_objext conftest$ac_exeext
11769 if { (eval echo "$as_me:11769: \"$ac_link\"") >&5
11770   (eval $ac_link) 2>&5
11771   ac_status=$?
11772   echo "$as_me:11772: \$? = $ac_status" >&5
11773   (exit $ac_status); } &&
11774          { ac_try='test -s conftest$ac_exeext'
11775   { (eval echo "$as_me:11775: \"$ac_try\"") >&5
11776   (eval $ac_try) 2>&5
11777   ac_status=$?
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit $ac_status); }; }; then
11780   ac_cv_func_bcopy=yes
11781 else
11782   echo "$as_me: failed program was:" >&5
11783 cat conftest.$ac_ext >&5
11784 ac_cv_func_bcopy=no
11785 fi
11786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11787 fi
11788 echo "$as_me:11788: result: $ac_cv_func_bcopy" >&5
11789 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
11790 if test $ac_cv_func_bcopy = yes; then
11791
11792         echo "$as_me:11792: checking if bcopy does overlapping moves" >&5
11793 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
11794 if test "${cf_cv_good_bcopy+set}" = set; then
11795   echo $ECHO_N "(cached) $ECHO_C" >&6
11796 else
11797
11798                 if test "$cross_compiling" = yes; then
11799   cf_cv_good_bcopy=unknown
11800 else
11801   cat >conftest.$ac_ext <<_ACEOF
11802 #line 11802 "configure"
11803 #include "confdefs.h"
11804
11805 int main() {
11806         static char data[] = "abcdefghijklmnopqrstuwwxyz";
11807         char temp[40];
11808         bcopy(data, temp, sizeof(data));
11809         bcopy(temp+10, temp, 15);
11810         bcopy(temp+5, temp+15, 10);
11811         exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
11812 }
11813
11814 _ACEOF
11815 rm -f conftest$ac_exeext
11816 if { (eval echo "$as_me:11816: \"$ac_link\"") >&5
11817   (eval $ac_link) 2>&5
11818   ac_status=$?
11819   echo "$as_me:11819: \$? = $ac_status" >&5
11820   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11821   { (eval echo "$as_me:11821: \"$ac_try\"") >&5
11822   (eval $ac_try) 2>&5
11823   ac_status=$?
11824   echo "$as_me:11824: \$? = $ac_status" >&5
11825   (exit $ac_status); }; }; then
11826   cf_cv_good_bcopy=yes
11827 else
11828   echo "$as_me: program exited with status $ac_status" >&5
11829 echo "$as_me: failed program was:" >&5
11830 cat conftest.$ac_ext >&5
11831 cf_cv_good_bcopy=no
11832 fi
11833 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11834 fi
11835
11836 fi
11837 echo "$as_me:11837: result: $cf_cv_good_bcopy" >&5
11838 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
11839
11840 else
11841   cf_cv_good_bcopy=no
11842 fi
11843
11844         if test "$cf_cv_good_bcopy" = yes ; then
11845                 cat >>confdefs.h <<\EOF
11846 #define USE_OK_BCOPY 1
11847 EOF
11848
11849         else
11850                 cat >>confdefs.h <<\EOF
11851 #define USE_MY_MEMMOVE 1
11852 EOF
11853
11854         fi
11855
11856 fi
11857
11858 echo "$as_me:11858: checking if poll really works" >&5
11859 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
11860 if test "${cf_cv_working_poll+set}" = set; then
11861   echo $ECHO_N "(cached) $ECHO_C" >&6
11862 else
11863
11864 if test "$cross_compiling" = yes; then
11865   cf_cv_working_poll=unknown
11866 else
11867   cat >conftest.$ac_ext <<_ACEOF
11868 #line 11868 "configure"
11869 #include "confdefs.h"
11870
11871 #include <stdio.h>
11872 #ifdef HAVE_POLL_H
11873 #include <poll.h>
11874 #else
11875 #include <sys/poll.h>
11876 #endif
11877 int main() {
11878         struct pollfd myfds;
11879         int ret;
11880
11881         myfds.fd = 0;
11882         myfds.events = POLLIN;
11883
11884         ret = poll(&myfds, 1, 100);
11885         exit(ret != 0);
11886 }
11887 _ACEOF
11888 rm -f conftest$ac_exeext
11889 if { (eval echo "$as_me:11889: \"$ac_link\"") >&5
11890   (eval $ac_link) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11894   { (eval echo "$as_me:11894: \"$ac_try\"") >&5
11895   (eval $ac_try) 2>&5
11896   ac_status=$?
11897   echo "$as_me:11897: \$? = $ac_status" >&5
11898   (exit $ac_status); }; }; then
11899   cf_cv_working_poll=yes
11900 else
11901   echo "$as_me: program exited with status $ac_status" >&5
11902 echo "$as_me: failed program was:" >&5
11903 cat conftest.$ac_ext >&5
11904 cf_cv_working_poll=no
11905 fi
11906 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11907 fi
11908 fi
11909 echo "$as_me:11909: result: $cf_cv_working_poll" >&5
11910 echo "${ECHO_T}$cf_cv_working_poll" >&6
11911 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
11912 #define HAVE_WORKING_POLL 1
11913 EOF
11914
11915 if test -z "$cf_user_CFLAGS" ; then
11916         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11917         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11918 fi
11919
11920 # Just in case, check if the C compiler has a bool type.
11921
11922 echo "$as_me:11922: checking if we should include stdbool.h" >&5
11923 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
11924
11925 if test "${cf_cv_header_stdbool_h+set}" = set; then
11926   echo $ECHO_N "(cached) $ECHO_C" >&6
11927 else
11928
11929         cat >conftest.$ac_ext <<_ACEOF
11930 #line 11930 "configure"
11931 #include "confdefs.h"
11932
11933 int
11934 main ()
11935 {
11936 bool foo = false
11937   ;
11938   return 0;
11939 }
11940 _ACEOF
11941 rm -f conftest.$ac_objext
11942 if { (eval echo "$as_me:11942: \"$ac_compile\"") >&5
11943   (eval $ac_compile) 2>&5
11944   ac_status=$?
11945   echo "$as_me:11945: \$? = $ac_status" >&5
11946   (exit $ac_status); } &&
11947          { ac_try='test -s conftest.$ac_objext'
11948   { (eval echo "$as_me:11948: \"$ac_try\"") >&5
11949   (eval $ac_try) 2>&5
11950   ac_status=$?
11951   echo "$as_me:11951: \$? = $ac_status" >&5
11952   (exit $ac_status); }; }; then
11953   cf_cv_header_stdbool_h=0
11954 else
11955   echo "$as_me: failed program was:" >&5
11956 cat conftest.$ac_ext >&5
11957 cat >conftest.$ac_ext <<_ACEOF
11958 #line 11958 "configure"
11959 #include "confdefs.h"
11960
11961 #ifndef __BEOS__
11962 #include <stdbool.h>
11963 #endif
11964
11965 int
11966 main ()
11967 {
11968 bool foo = false
11969   ;
11970   return 0;
11971 }
11972 _ACEOF
11973 rm -f conftest.$ac_objext
11974 if { (eval echo "$as_me:11974: \"$ac_compile\"") >&5
11975   (eval $ac_compile) 2>&5
11976   ac_status=$?
11977   echo "$as_me:11977: \$? = $ac_status" >&5
11978   (exit $ac_status); } &&
11979          { ac_try='test -s conftest.$ac_objext'
11980   { (eval echo "$as_me:11980: \"$ac_try\"") >&5
11981   (eval $ac_try) 2>&5
11982   ac_status=$?
11983   echo "$as_me:11983: \$? = $ac_status" >&5
11984   (exit $ac_status); }; }; then
11985   cf_cv_header_stdbool_h=1
11986 else
11987   echo "$as_me: failed program was:" >&5
11988 cat conftest.$ac_ext >&5
11989 cf_cv_header_stdbool_h=0
11990 fi
11991 rm -f conftest.$ac_objext conftest.$ac_ext
11992 fi
11993 rm -f conftest.$ac_objext conftest.$ac_ext
11994 fi
11995
11996 if test "$cf_cv_header_stdbool_h" = 1
11997 then    echo "$as_me:11997: result: yes" >&5
11998 echo "${ECHO_T}yes" >&6
11999 else    echo "$as_me:11999: result: no" >&5
12000 echo "${ECHO_T}no" >&6
12001 fi
12002
12003 echo "$as_me:12003: checking for builtin bool type" >&5
12004 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
12005
12006 if test "${cf_cv_cc_bool_type+set}" = set; then
12007   echo $ECHO_N "(cached) $ECHO_C" >&6
12008 else
12009
12010         cat >conftest.$ac_ext <<_ACEOF
12011 #line 12011 "configure"
12012 #include "confdefs.h"
12013
12014 #include <stdio.h>
12015 #include <sys/types.h>
12016
12017 int
12018 main ()
12019 {
12020 bool x = false
12021   ;
12022   return 0;
12023 }
12024 _ACEOF
12025 rm -f conftest.$ac_objext
12026 if { (eval echo "$as_me:12026: \"$ac_compile\"") >&5
12027   (eval $ac_compile) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); } &&
12031          { ac_try='test -s conftest.$ac_objext'
12032   { (eval echo "$as_me:12032: \"$ac_try\"") >&5
12033   (eval $ac_try) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit $ac_status); }; }; then
12037   cf_cv_cc_bool_type=1
12038 else
12039   echo "$as_me: failed program was:" >&5
12040 cat conftest.$ac_ext >&5
12041 cf_cv_cc_bool_type=0
12042 fi
12043 rm -f conftest.$ac_objext conftest.$ac_ext
12044
12045 fi
12046
12047 if test "$cf_cv_cc_bool_type" = 1
12048 then    echo "$as_me:12048: result: yes" >&5
12049 echo "${ECHO_T}yes" >&6
12050 else    echo "$as_me:12050: result: no" >&5
12051 echo "${ECHO_T}no" >&6
12052 fi
12053
12054 # Check for C++ compiler characteristics (and ensure that it's there!)
12055 if test -n "$CXX" ; then
12056         ac_ext=cc
12057 ac_cpp='$CXXCPP $CPPFLAGS'
12058 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12059 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12060 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12061
12062 if test -n "$GXX" ; then
12063 case $cf_cv_system_name in #(vi
12064 os2*) #(vi
12065         cf_stdcpp_libname=stdcpp
12066         ;;
12067 *)
12068         cf_stdcpp_libname=stdc++
12069         ;;
12070 esac
12071 echo "$as_me:12071: checking for library $cf_stdcpp_libname" >&5
12072 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
12073 if test "${cf_cv_libstdcpp+set}" = set; then
12074   echo $ECHO_N "(cached) $ECHO_C" >&6
12075 else
12076
12077         cf_save="$LIBS"
12078         LIBS="$LIBS -l$cf_stdcpp_libname"
12079 cat >conftest.$ac_ext <<_ACEOF
12080 #line 12080 "configure"
12081 #include "confdefs.h"
12082
12083 #include <strstream.h>
12084 int
12085 main ()
12086 {
12087
12088 char buf[80];
12089 strstreambuf foo(buf, sizeof(buf))
12090
12091   ;
12092   return 0;
12093 }
12094 _ACEOF
12095 rm -f conftest.$ac_objext conftest$ac_exeext
12096 if { (eval echo "$as_me:12096: \"$ac_link\"") >&5
12097   (eval $ac_link) 2>&5
12098   ac_status=$?
12099   echo "$as_me:12099: \$? = $ac_status" >&5
12100   (exit $ac_status); } &&
12101          { ac_try='test -s conftest$ac_exeext'
12102   { (eval echo "$as_me:12102: \"$ac_try\"") >&5
12103   (eval $ac_try) 2>&5
12104   ac_status=$?
12105   echo "$as_me:12105: \$? = $ac_status" >&5
12106   (exit $ac_status); }; }; then
12107   cf_cv_libstdcpp=yes
12108 else
12109   echo "$as_me: failed program was:" >&5
12110 cat conftest.$ac_ext >&5
12111 cf_cv_libstdcpp=no
12112 fi
12113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12114         LIBS="$cf_save"
12115
12116 fi
12117 echo "$as_me:12117: result: $cf_cv_libstdcpp" >&5
12118 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
12119 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
12120 fi
12121
12122         echo "$as_me:12122: checking whether $CXX understands -c and -o together" >&5
12123 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
12124 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
12125   echo $ECHO_N "(cached) $ECHO_C" >&6
12126 else
12127
12128 cat > conftest.$ac_ext <<CF_EOF
12129 #include <stdio.h>
12130 int main()
12131 {
12132         return 0;
12133 }
12134 CF_EOF
12135 # We do the test twice because some compilers refuse to overwrite an
12136 # existing .o file with -o, though they will create one.
12137 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
12138 if { (eval echo "$as_me:12138: \"$ac_try\"") >&5
12139   (eval $ac_try) 2>&5
12140   ac_status=$?
12141   echo "$as_me:12141: \$? = $ac_status" >&5
12142   (exit $ac_status); } &&
12143   test -f conftest2.$ac_objext && { (eval echo "$as_me:12143: \"$ac_try\"") >&5
12144   (eval $ac_try) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit $ac_status); };
12148 then
12149   eval cf_cv_prog_CXX_c_o=yes
12150 else
12151   eval cf_cv_prog_CXX_c_o=no
12152 fi
12153 rm -f conftest*
12154
12155 fi
12156 if test $cf_cv_prog_CXX_c_o = yes; then
12157   echo "$as_me:12157: result: yes" >&5
12158 echo "${ECHO_T}yes" >&6
12159 else
12160   echo "$as_me:12160: result: no" >&5
12161 echo "${ECHO_T}no" >&6
12162 fi
12163
12164         case $GXX_VERSION in
12165         1*|2.0-6*)
12166                 cf_cxx_library=yes
12167                 ;;
12168         *-2.7*|2.7*)
12169
12170 cf_cxx_library=unknown
12171 case $cf_cv_system_name in #(vi
12172 os2*) #(vi
12173         cf_gpp_libname=gpp
12174         ;;
12175 *)
12176         cf_gpp_libname=g++
12177         ;;
12178 esac
12179 if test "$GXX" = yes; then
12180         echo "$as_me:12180: checking for lib$cf_gpp_libname" >&5
12181 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
12182         cf_save="$LIBS"
12183         LIBS="$LIBS -l$cf_gpp_libname"
12184         cat >conftest.$ac_ext <<_ACEOF
12185 #line 12185 "configure"
12186 #include "confdefs.h"
12187
12188 #include <$cf_gpp_libname/builtin.h>
12189
12190 int
12191 main ()
12192 {
12193 two_arg_error_handler_t foo2 = lib_error_handler
12194   ;
12195   return 0;
12196 }
12197 _ACEOF
12198 rm -f conftest.$ac_objext conftest$ac_exeext
12199 if { (eval echo "$as_me:12199: \"$ac_link\"") >&5
12200   (eval $ac_link) 2>&5
12201   ac_status=$?
12202   echo "$as_me:12202: \$? = $ac_status" >&5
12203   (exit $ac_status); } &&
12204          { ac_try='test -s conftest$ac_exeext'
12205   { (eval echo "$as_me:12205: \"$ac_try\"") >&5
12206   (eval $ac_try) 2>&5
12207   ac_status=$?
12208   echo "$as_me:12208: \$? = $ac_status" >&5
12209   (exit $ac_status); }; }; then
12210   cf_cxx_library=yes
12211          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
12212          if test "$cf_gpp_libname" = cpp ; then
12213             cat >>confdefs.h <<\EOF
12214 #define HAVE_GPP_BUILTIN_H 1
12215 EOF
12216
12217          else
12218             cat >>confdefs.h <<\EOF
12219 #define HAVE_GXX_BUILTIN_H 1
12220 EOF
12221
12222          fi
12223 else
12224   echo "$as_me: failed program was:" >&5
12225 cat conftest.$ac_ext >&5
12226 cat >conftest.$ac_ext <<_ACEOF
12227 #line 12227 "configure"
12228 #include "confdefs.h"
12229
12230 #include <builtin.h>
12231
12232 int
12233 main ()
12234 {
12235 two_arg_error_handler_t foo2 = lib_error_handler
12236   ;
12237   return 0;
12238 }
12239 _ACEOF
12240 rm -f conftest.$ac_objext conftest$ac_exeext
12241 if { (eval echo "$as_me:12241: \"$ac_link\"") >&5
12242   (eval $ac_link) 2>&5
12243   ac_status=$?
12244   echo "$as_me:12244: \$? = $ac_status" >&5
12245   (exit $ac_status); } &&
12246          { ac_try='test -s conftest$ac_exeext'
12247   { (eval echo "$as_me:12247: \"$ac_try\"") >&5
12248   (eval $ac_try) 2>&5
12249   ac_status=$?
12250   echo "$as_me:12250: \$? = $ac_status" >&5
12251   (exit $ac_status); }; }; then
12252   cf_cxx_library=yes
12253          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
12254          cat >>confdefs.h <<\EOF
12255 #define HAVE_BUILTIN_H 1
12256 EOF
12257
12258 else
12259   echo "$as_me: failed program was:" >&5
12260 cat conftest.$ac_ext >&5
12261 cf_cxx_library=no
12262 fi
12263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12264 fi
12265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12266         LIBS="$cf_save"
12267         echo "$as_me:12267: result: $cf_cxx_library" >&5
12268 echo "${ECHO_T}$cf_cxx_library" >&6
12269 fi
12270
12271                 ;;
12272         *)
12273                 cf_cxx_library=no
12274                 ;;
12275         esac
12276
12277         ac_ext=cc
12278 ac_cpp='$CXXCPP $CPPFLAGS'
12279 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12280 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12281 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12282 echo "$as_me:12282: checking how to run the C++ preprocessor" >&5
12283 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
12284 if test -z "$CXXCPP"; then
12285   if test "${ac_cv_prog_CXXCPP+set}" = set; then
12286   echo $ECHO_N "(cached) $ECHO_C" >&6
12287 else
12288       # Double quotes because CXXCPP needs to be expanded
12289     for CXXCPP in "$CXX -E" "/lib/cpp"
12290     do
12291       ac_preproc_ok=false
12292 for ac_cxx_preproc_warn_flag in '' yes
12293 do
12294   # Use a header file that comes with gcc, so configuring glibc
12295   # with a fresh cross-compiler works.
12296   # On the NeXT, cc -E runs the code through the compiler's parser,
12297   # not just through cpp. "Syntax error" is here to catch this case.
12298   cat >conftest.$ac_ext <<_ACEOF
12299 #line 12299 "configure"
12300 #include "confdefs.h"
12301 #include <assert.h>
12302                      Syntax error
12303 _ACEOF
12304 if { (eval echo "$as_me:12304: \"$ac_cpp conftest.$ac_ext\"") >&5
12305   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12306   ac_status=$?
12307   egrep -v '^ *\+' conftest.er1 >conftest.err
12308   rm -f conftest.er1
12309   cat conftest.err >&5
12310   echo "$as_me:12310: \$? = $ac_status" >&5
12311   (exit $ac_status); } >/dev/null; then
12312   if test -s conftest.err; then
12313     ac_cpp_err=$ac_cxx_preproc_warn_flag
12314   else
12315     ac_cpp_err=
12316   fi
12317 else
12318   ac_cpp_err=yes
12319 fi
12320 if test -z "$ac_cpp_err"; then
12321   :
12322 else
12323   echo "$as_me: failed program was:" >&5
12324   cat conftest.$ac_ext >&5
12325   # Broken: fails on valid input.
12326 continue
12327 fi
12328 rm -f conftest.err conftest.$ac_ext
12329
12330   # OK, works on sane cases.  Now check whether non-existent headers
12331   # can be detected and how.
12332   cat >conftest.$ac_ext <<_ACEOF
12333 #line 12333 "configure"
12334 #include "confdefs.h"
12335 #include <ac_nonexistent.h>
12336 _ACEOF
12337 if { (eval echo "$as_me:12337: \"$ac_cpp conftest.$ac_ext\"") >&5
12338   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12339   ac_status=$?
12340   egrep -v '^ *\+' conftest.er1 >conftest.err
12341   rm -f conftest.er1
12342   cat conftest.err >&5
12343   echo "$as_me:12343: \$? = $ac_status" >&5
12344   (exit $ac_status); } >/dev/null; then
12345   if test -s conftest.err; then
12346     ac_cpp_err=$ac_cxx_preproc_warn_flag
12347   else
12348     ac_cpp_err=
12349   fi
12350 else
12351   ac_cpp_err=yes
12352 fi
12353 if test -z "$ac_cpp_err"; then
12354   # Broken: success on invalid input.
12355 continue
12356 else
12357   echo "$as_me: failed program was:" >&5
12358   cat conftest.$ac_ext >&5
12359   # Passes both tests.
12360 ac_preproc_ok=:
12361 break
12362 fi
12363 rm -f conftest.err conftest.$ac_ext
12364
12365 done
12366 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12367 rm -f conftest.err conftest.$ac_ext
12368 if $ac_preproc_ok; then
12369   break
12370 fi
12371
12372     done
12373     ac_cv_prog_CXXCPP=$CXXCPP
12374
12375 fi
12376   CXXCPP=$ac_cv_prog_CXXCPP
12377 else
12378   ac_cv_prog_CXXCPP=$CXXCPP
12379 fi
12380 echo "$as_me:12380: result: $CXXCPP" >&5
12381 echo "${ECHO_T}$CXXCPP" >&6
12382 ac_preproc_ok=false
12383 for ac_cxx_preproc_warn_flag in '' yes
12384 do
12385   # Use a header file that comes with gcc, so configuring glibc
12386   # with a fresh cross-compiler works.
12387   # On the NeXT, cc -E runs the code through the compiler's parser,
12388   # not just through cpp. "Syntax error" is here to catch this case.
12389   cat >conftest.$ac_ext <<_ACEOF
12390 #line 12390 "configure"
12391 #include "confdefs.h"
12392 #include <assert.h>
12393                      Syntax error
12394 _ACEOF
12395 if { (eval echo "$as_me:12395: \"$ac_cpp conftest.$ac_ext\"") >&5
12396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12397   ac_status=$?
12398   egrep -v '^ *\+' conftest.er1 >conftest.err
12399   rm -f conftest.er1
12400   cat conftest.err >&5
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); } >/dev/null; then
12403   if test -s conftest.err; then
12404     ac_cpp_err=$ac_cxx_preproc_warn_flag
12405   else
12406     ac_cpp_err=
12407   fi
12408 else
12409   ac_cpp_err=yes
12410 fi
12411 if test -z "$ac_cpp_err"; then
12412   :
12413 else
12414   echo "$as_me: failed program was:" >&5
12415   cat conftest.$ac_ext >&5
12416   # Broken: fails on valid input.
12417 continue
12418 fi
12419 rm -f conftest.err conftest.$ac_ext
12420
12421   # OK, works on sane cases.  Now check whether non-existent headers
12422   # can be detected and how.
12423   cat >conftest.$ac_ext <<_ACEOF
12424 #line 12424 "configure"
12425 #include "confdefs.h"
12426 #include <ac_nonexistent.h>
12427 _ACEOF
12428 if { (eval echo "$as_me:12428: \"$ac_cpp conftest.$ac_ext\"") >&5
12429   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12430   ac_status=$?
12431   egrep -v '^ *\+' conftest.er1 >conftest.err
12432   rm -f conftest.er1
12433   cat conftest.err >&5
12434   echo "$as_me:12434: \$? = $ac_status" >&5
12435   (exit $ac_status); } >/dev/null; then
12436   if test -s conftest.err; then
12437     ac_cpp_err=$ac_cxx_preproc_warn_flag
12438   else
12439     ac_cpp_err=
12440   fi
12441 else
12442   ac_cpp_err=yes
12443 fi
12444 if test -z "$ac_cpp_err"; then
12445   # Broken: success on invalid input.
12446 continue
12447 else
12448   echo "$as_me: failed program was:" >&5
12449   cat conftest.$ac_ext >&5
12450   # Passes both tests.
12451 ac_preproc_ok=:
12452 break
12453 fi
12454 rm -f conftest.err conftest.$ac_ext
12455
12456 done
12457 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12458 rm -f conftest.err conftest.$ac_ext
12459 if $ac_preproc_ok; then
12460   :
12461 else
12462   { { echo "$as_me:12462: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
12463 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
12464    { (exit 1); exit 1; }; }
12465 fi
12466
12467 ac_ext=cc
12468 ac_cpp='$CXXCPP $CPPFLAGS'
12469 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12470 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12471 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12472
12473 for ac_header in typeinfo
12474 do
12475 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12476 echo "$as_me:12476: checking for $ac_header" >&5
12477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12479   echo $ECHO_N "(cached) $ECHO_C" >&6
12480 else
12481   cat >conftest.$ac_ext <<_ACEOF
12482 #line 12482 "configure"
12483 #include "confdefs.h"
12484 #include <$ac_header>
12485 _ACEOF
12486 if { (eval echo "$as_me:12486: \"$ac_cpp conftest.$ac_ext\"") >&5
12487   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12488   ac_status=$?
12489   egrep -v '^ *\+' conftest.er1 >conftest.err
12490   rm -f conftest.er1
12491   cat conftest.err >&5
12492   echo "$as_me:12492: \$? = $ac_status" >&5
12493   (exit $ac_status); } >/dev/null; then
12494   if test -s conftest.err; then
12495     ac_cpp_err=$ac_cxx_preproc_warn_flag
12496   else
12497     ac_cpp_err=
12498   fi
12499 else
12500   ac_cpp_err=yes
12501 fi
12502 if test -z "$ac_cpp_err"; then
12503   eval "$as_ac_Header=yes"
12504 else
12505   echo "$as_me: failed program was:" >&5
12506   cat conftest.$ac_ext >&5
12507   eval "$as_ac_Header=no"
12508 fi
12509 rm -f conftest.err conftest.$ac_ext
12510 fi
12511 echo "$as_me:12511: result: `eval echo '${'$as_ac_Header'}'`" >&5
12512 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12513 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12514   cat >>confdefs.h <<EOF
12515 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12516 EOF
12517
12518 fi
12519 done
12520
12521 echo "$as_me:12521: checking if we should include stdbool.h" >&5
12522 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
12523
12524 if test "${cf_cv_header_stdbool_h+set}" = set; then
12525   echo $ECHO_N "(cached) $ECHO_C" >&6
12526 else
12527
12528         cat >conftest.$ac_ext <<_ACEOF
12529 #line 12529 "configure"
12530 #include "confdefs.h"
12531
12532 int
12533 main ()
12534 {
12535 bool foo = false
12536   ;
12537   return 0;
12538 }
12539 _ACEOF
12540 rm -f conftest.$ac_objext
12541 if { (eval echo "$as_me:12541: \"$ac_compile\"") >&5
12542   (eval $ac_compile) 2>&5
12543   ac_status=$?
12544   echo "$as_me:12544: \$? = $ac_status" >&5
12545   (exit $ac_status); } &&
12546          { ac_try='test -s conftest.$ac_objext'
12547   { (eval echo "$as_me:12547: \"$ac_try\"") >&5
12548   (eval $ac_try) 2>&5
12549   ac_status=$?
12550   echo "$as_me:12550: \$? = $ac_status" >&5
12551   (exit $ac_status); }; }; then
12552   cf_cv_header_stdbool_h=0
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 cat conftest.$ac_ext >&5
12556 cat >conftest.$ac_ext <<_ACEOF
12557 #line 12557 "configure"
12558 #include "confdefs.h"
12559
12560 #ifndef __BEOS__
12561 #include <stdbool.h>
12562 #endif
12563
12564 int
12565 main ()
12566 {
12567 bool foo = false
12568   ;
12569   return 0;
12570 }
12571 _ACEOF
12572 rm -f conftest.$ac_objext
12573 if { (eval echo "$as_me:12573: \"$ac_compile\"") >&5
12574   (eval $ac_compile) 2>&5
12575   ac_status=$?
12576   echo "$as_me:12576: \$? = $ac_status" >&5
12577   (exit $ac_status); } &&
12578          { ac_try='test -s conftest.$ac_objext'
12579   { (eval echo "$as_me:12579: \"$ac_try\"") >&5
12580   (eval $ac_try) 2>&5
12581   ac_status=$?
12582   echo "$as_me:12582: \$? = $ac_status" >&5
12583   (exit $ac_status); }; }; then
12584   cf_cv_header_stdbool_h=1
12585 else
12586   echo "$as_me: failed program was:" >&5
12587 cat conftest.$ac_ext >&5
12588 cf_cv_header_stdbool_h=0
12589 fi
12590 rm -f conftest.$ac_objext conftest.$ac_ext
12591 fi
12592 rm -f conftest.$ac_objext conftest.$ac_ext
12593 fi
12594
12595 if test "$cf_cv_header_stdbool_h" = 1
12596 then    echo "$as_me:12596: result: yes" >&5
12597 echo "${ECHO_T}yes" >&6
12598 else    echo "$as_me:12598: result: no" >&5
12599 echo "${ECHO_T}no" >&6
12600 fi
12601
12602 echo "$as_me:12602: checking for builtin bool type" >&5
12603 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
12604
12605 if test "${cf_cv_builtin_bool+set}" = set; then
12606   echo $ECHO_N "(cached) $ECHO_C" >&6
12607 else
12608
12609         cat >conftest.$ac_ext <<_ACEOF
12610 #line 12610 "configure"
12611 #include "confdefs.h"
12612
12613 #include <stdio.h>
12614 #include <sys/types.h>
12615
12616 int
12617 main ()
12618 {
12619 bool x = false
12620   ;
12621   return 0;
12622 }
12623 _ACEOF
12624 rm -f conftest.$ac_objext
12625 if { (eval echo "$as_me:12625: \"$ac_compile\"") >&5
12626   (eval $ac_compile) 2>&5
12627   ac_status=$?
12628   echo "$as_me:12628: \$? = $ac_status" >&5
12629   (exit $ac_status); } &&
12630          { ac_try='test -s conftest.$ac_objext'
12631   { (eval echo "$as_me:12631: \"$ac_try\"") >&5
12632   (eval $ac_try) 2>&5
12633   ac_status=$?
12634   echo "$as_me:12634: \$? = $ac_status" >&5
12635   (exit $ac_status); }; }; then
12636   cf_cv_builtin_bool=1
12637 else
12638   echo "$as_me: failed program was:" >&5
12639 cat conftest.$ac_ext >&5
12640 cf_cv_builtin_bool=0
12641 fi
12642 rm -f conftest.$ac_objext conftest.$ac_ext
12643
12644 fi
12645
12646 if test "$cf_cv_builtin_bool" = 1
12647 then    echo "$as_me:12647: result: yes" >&5
12648 echo "${ECHO_T}yes" >&6
12649 else    echo "$as_me:12649: result: no" >&5
12650 echo "${ECHO_T}no" >&6
12651 fi
12652
12653 echo "$as_me:12653: checking for size of bool" >&5
12654 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
12655 if test "${cf_cv_type_of_bool+set}" = set; then
12656   echo $ECHO_N "(cached) $ECHO_C" >&6
12657 else
12658
12659         rm -f cf_test.out
12660         if test "$cross_compiling" = yes; then
12661   cf_cv_type_of_bool=unknown
12662 else
12663   cat >conftest.$ac_ext <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12666
12667 #include <stdlib.h>
12668 #include <stdio.h>
12669
12670 #if defined(__cplusplus)
12671
12672 #ifdef HAVE_GXX_BUILTIN_H
12673 #include <g++/builtin.h>
12674 #elif HAVE_GPP_BUILTIN_H
12675 #include <gpp/builtin.h>
12676 #elif HAVE_BUILTIN_H
12677 #include <builtin.h>
12678 #endif
12679
12680 #else
12681
12682 #if $cf_cv_header_stdbool_h
12683 #include <stdbool.h>
12684 #endif
12685
12686 #endif
12687
12688 main()
12689 {
12690         FILE *fp = fopen("cf_test.out", "w");
12691         if (fp != 0) {
12692                 bool x = true;
12693                 if ((bool)(-x) >= 0)
12694                         fputs("unsigned ", fp);
12695                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
12696                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
12697                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
12698                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
12699                 fclose(fp);
12700         }
12701         exit(0);
12702 }
12703
12704 _ACEOF
12705 rm -f conftest$ac_exeext
12706 if { (eval echo "$as_me:12706: \"$ac_link\"") >&5
12707   (eval $ac_link) 2>&5
12708   ac_status=$?
12709   echo "$as_me:12709: \$? = $ac_status" >&5
12710   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12711   { (eval echo "$as_me:12711: \"$ac_try\"") >&5
12712   (eval $ac_try) 2>&5
12713   ac_status=$?
12714   echo "$as_me:12714: \$? = $ac_status" >&5
12715   (exit $ac_status); }; }; then
12716   cf_cv_type_of_bool=`cat cf_test.out`
12717                  if test -z "$cf_cv_type_of_bool"; then
12718                    cf_cv_type_of_bool=unknown
12719                  fi
12720 else
12721   echo "$as_me: program exited with status $ac_status" >&5
12722 echo "$as_me: failed program was:" >&5
12723 cat conftest.$ac_ext >&5
12724 cf_cv_type_of_bool=unknown
12725 fi
12726 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12727 fi
12728
12729 fi
12730
12731         rm -f cf_test.out
12732 echo "$as_me:12732: result: $cf_cv_type_of_bool" >&5
12733 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
12734 if test "$cf_cv_type_of_bool" = unknown ; then
12735         case .$NCURSES_BOOL in #(vi
12736         .auto|.) NCURSES_BOOL=unsigned;;
12737         esac
12738         { echo "$as_me:12738: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
12739 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
12740         cf_cv_type_of_bool=$NCURSES_BOOL
12741 fi
12742
12743 echo "$as_me:12743: checking for special defines needed for etip.h" >&5
12744 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
12745 cf_save_CXXFLAGS="$CXXFLAGS"
12746 cf_result="none"
12747 for cf_math in "" MATH_H
12748 do
12749 for cf_excp in "" MATH_EXCEPTION
12750 do
12751         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
12752         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
12753         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
12754 cat >conftest.$ac_ext <<_ACEOF
12755 #line 12755 "configure"
12756 #include "confdefs.h"
12757
12758 #include <etip.h.in>
12759
12760 int
12761 main ()
12762 {
12763
12764   ;
12765   return 0;
12766 }
12767 _ACEOF
12768 rm -f conftest.$ac_objext
12769 if { (eval echo "$as_me:12769: \"$ac_compile\"") >&5
12770   (eval $ac_compile) 2>&5
12771   ac_status=$?
12772   echo "$as_me:12772: \$? = $ac_status" >&5
12773   (exit $ac_status); } &&
12774          { ac_try='test -s conftest.$ac_objext'
12775   { (eval echo "$as_me:12775: \"$ac_try\"") >&5
12776   (eval $ac_try) 2>&5
12777   ac_status=$?
12778   echo "$as_me:12778: \$? = $ac_status" >&5
12779   (exit $ac_status); }; }; then
12780
12781         test -n "$cf_math" && cat >>confdefs.h <<EOF
12782 #define ETIP_NEEDS_${cf_math} 1
12783 EOF
12784
12785         test -n "$cf_excp" && cat >>confdefs.h <<EOF
12786 #define ETIP_NEEDS_${cf_excp} 1
12787 EOF
12788
12789         cf_result="$cf_math $cf_excp"
12790         break
12791
12792 else
12793   echo "$as_me: failed program was:" >&5
12794 cat conftest.$ac_ext >&5
12795 fi
12796 rm -f conftest.$ac_objext conftest.$ac_ext
12797 done
12798 done
12799 echo "$as_me:12799: result: $cf_result" >&5
12800 echo "${ECHO_T}$cf_result" >&6
12801 CXXFLAGS="$cf_save_CXXFLAGS"
12802
12803 if test -n "$CXX"; then
12804 echo "$as_me:12804: checking if $CXX accepts parameter initialization" >&5
12805 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
12806 if test "${cf_cv_cpp_param_init+set}" = set; then
12807   echo $ECHO_N "(cached) $ECHO_C" >&6
12808 else
12809
12810         ac_ext=cc
12811 ac_cpp='$CXXCPP $CPPFLAGS'
12812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12815
12816         if test "$cross_compiling" = yes; then
12817   cf_cv_cpp_param_init=unknown
12818 else
12819   cat >conftest.$ac_ext <<_ACEOF
12820 #line 12820 "configure"
12821 #include "confdefs.h"
12822
12823 class TEST {
12824 private:
12825         int value;
12826 public:
12827         TEST(int x = 1);
12828         ~TEST();
12829 };
12830
12831 TEST::TEST(int x = 1)   // some compilers do not like second initializer
12832 {
12833         value = x;
12834 }
12835 void main() { }
12836
12837 _ACEOF
12838 rm -f conftest$ac_exeext
12839 if { (eval echo "$as_me:12839: \"$ac_link\"") >&5
12840   (eval $ac_link) 2>&5
12841   ac_status=$?
12842   echo "$as_me:12842: \$? = $ac_status" >&5
12843   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12844   { (eval echo "$as_me:12844: \"$ac_try\"") >&5
12845   (eval $ac_try) 2>&5
12846   ac_status=$?
12847   echo "$as_me:12847: \$? = $ac_status" >&5
12848   (exit $ac_status); }; }; then
12849   cf_cv_cpp_param_init=yes
12850 else
12851   echo "$as_me: program exited with status $ac_status" >&5
12852 echo "$as_me: failed program was:" >&5
12853 cat conftest.$ac_ext >&5
12854 cf_cv_cpp_param_init=no
12855 fi
12856 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12857 fi
12858         ac_ext=cc
12859 ac_cpp='$CXXCPP $CPPFLAGS'
12860 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12861 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12862 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12863
12864 fi
12865 echo "$as_me:12865: result: $cf_cv_cpp_param_init" >&5
12866 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
12867 fi
12868 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
12869 #define CPP_HAS_PARAM_INIT 1
12870 EOF
12871
12872 if test -n "$CXX"; then
12873
12874 echo "$as_me:12874: checking if $CXX accepts static_cast" >&5
12875 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
12876 if test "${cf_cv_cpp_static_cast+set}" = set; then
12877   echo $ECHO_N "(cached) $ECHO_C" >&6
12878 else
12879
12880         ac_ext=cc
12881 ac_cpp='$CXXCPP $CPPFLAGS'
12882 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12883 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12884 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12885
12886         cat >conftest.$ac_ext <<_ACEOF
12887 #line 12887 "configure"
12888 #include "confdefs.h"
12889
12890 class NCursesPanel
12891 {
12892 public:
12893   NCursesPanel(int nlines,
12894                int ncols,
12895                int begin_y = 0,
12896                int begin_x = 0)
12897   {
12898   }
12899
12900   ~NCursesPanel();
12901 };
12902
12903 template<class T> class NCursesUserPanel : public NCursesPanel
12904 {
12905 public:
12906   NCursesUserPanel (int nlines,
12907                     int ncols,
12908                     int begin_y = 0,
12909                     int begin_x = 0,
12910                     const T* p_UserData = static_cast<T*>(0))
12911     : NCursesPanel (nlines, ncols, begin_y, begin_x)
12912   {
12913   };
12914   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
12915   {
12916   };
12917
12918   virtual ~NCursesUserPanel() {};
12919 };
12920
12921 int
12922 main ()
12923 {
12924
12925         const char* p_UserData = static_cast<char*>(0)
12926   ;
12927   return 0;
12928 }
12929 _ACEOF
12930 rm -f conftest.$ac_objext
12931 if { (eval echo "$as_me:12931: \"$ac_compile\"") >&5
12932   (eval $ac_compile) 2>&5
12933   ac_status=$?
12934   echo "$as_me:12934: \$? = $ac_status" >&5
12935   (exit $ac_status); } &&
12936          { ac_try='test -s conftest.$ac_objext'
12937   { (eval echo "$as_me:12937: \"$ac_try\"") >&5
12938   (eval $ac_try) 2>&5
12939   ac_status=$?
12940   echo "$as_me:12940: \$? = $ac_status" >&5
12941   (exit $ac_status); }; }; then
12942   cf_cv_cpp_static_cast=yes
12943 else
12944   echo "$as_me: failed program was:" >&5
12945 cat conftest.$ac_ext >&5
12946 cf_cv_cpp_static_cast=no
12947 fi
12948 rm -f conftest.$ac_objext conftest.$ac_ext
12949
12950         ac_ext=cc
12951 ac_cpp='$CXXCPP $CPPFLAGS'
12952 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12953 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12954 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12955
12956 fi
12957 echo "$as_me:12957: result: $cf_cv_cpp_static_cast" >&5
12958 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
12959
12960 fi
12961
12962 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
12963 #define CPP_HAS_STATIC_CAST 1
12964 EOF
12965
12966 if test -n "$CXX"; then
12967
12968 ac_ext=cc
12969 ac_cpp='$CXXCPP $CPPFLAGS'
12970 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12971 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12972 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12973
12974 for ac_header in strstream.h
12975 do
12976 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12977 echo "$as_me:12977: checking for $ac_header" >&5
12978 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12979 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12980   echo $ECHO_N "(cached) $ECHO_C" >&6
12981 else
12982   cat >conftest.$ac_ext <<_ACEOF
12983 #line 12983 "configure"
12984 #include "confdefs.h"
12985 #include <$ac_header>
12986 _ACEOF
12987 if { (eval echo "$as_me:12987: \"$ac_cpp conftest.$ac_ext\"") >&5
12988   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12989   ac_status=$?
12990   egrep -v '^ *\+' conftest.er1 >conftest.err
12991   rm -f conftest.er1
12992   cat conftest.err >&5
12993   echo "$as_me:12993: \$? = $ac_status" >&5
12994   (exit $ac_status); } >/dev/null; then
12995   if test -s conftest.err; then
12996     ac_cpp_err=$ac_cxx_preproc_warn_flag
12997   else
12998     ac_cpp_err=
12999   fi
13000 else
13001   ac_cpp_err=yes
13002 fi
13003 if test -z "$ac_cpp_err"; then
13004   eval "$as_ac_Header=yes"
13005 else
13006   echo "$as_me: failed program was:" >&5
13007   cat conftest.$ac_ext >&5
13008   eval "$as_ac_Header=no"
13009 fi
13010 rm -f conftest.err conftest.$ac_ext
13011 fi
13012 echo "$as_me:13012: result: `eval echo '${'$as_ac_Header'}'`" >&5
13013 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13014 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13015   cat >>confdefs.h <<EOF
13016 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13017 EOF
13018
13019 fi
13020 done
13021
13022 echo "$as_me:13022: checking if $CXX supports vscan function" >&5
13023 echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
13024 if test "${cf_cv_cpp_vscan_func+set}" = set; then
13025   echo $ECHO_N "(cached) $ECHO_C" >&6
13026 else
13027
13028         for cf_vscan_func in strstream strstream_cast stdio
13029         do
13030         case $cf_vscan_func in #(vi
13031         stdio)          cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
13032         strstream)      cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
13033         strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
13034         esac
13035         cat >conftest.$ac_ext <<_ACEOF
13036 #line 13036 "configure"
13037 #include "confdefs.h"
13038
13039 #include <stdio.h>
13040 #include <stdarg.h>
13041 #define $cf_vscan_defs 1
13042 #if defined(USE_STDIO_VSCAN)
13043 #elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
13044 #include <strstream.h>
13045 #endif
13046
13047 int scanw(const char* fmt, ...)
13048 {
13049     int result = -1;
13050     char buf[BUFSIZ];
13051
13052     va_list args;
13053     va_start(args, fmt);
13054 #if defined(USE_STDIO_VSCAN)
13055     if (::vsscanf(buf, fmt, args) != -1)
13056         result = 0;
13057 #elif defined(USE_STRSTREAM_VSCAN)
13058     strstreambuf ss(buf, sizeof(buf));
13059     if (ss.vscan(fmt, args) != -1)
13060         result = 0;
13061 #elif defined(USE_STRSTREAM_VSCAN_CAST)
13062     strstreambuf ss(buf, sizeof(buf));
13063     if (ss.vscan(fmt, (_IO_va_list)args) != -1)
13064         result = 0;
13065 #else
13066 #error case $cf_vscan_func failed
13067 #endif
13068     va_end(args);
13069     return result;
13070 }
13071
13072 int
13073 main ()
13074 {
13075 int tmp, foo = scanw("%d", &tmp)
13076   ;
13077   return 0;
13078 }
13079 _ACEOF
13080 rm -f conftest.$ac_objext conftest$ac_exeext
13081 if { (eval echo "$as_me:13081: \"$ac_link\"") >&5
13082   (eval $ac_link) 2>&5
13083   ac_status=$?
13084   echo "$as_me:13084: \$? = $ac_status" >&5
13085   (exit $ac_status); } &&
13086          { ac_try='test -s conftest$ac_exeext'
13087   { (eval echo "$as_me:13087: \"$ac_try\"") >&5
13088   (eval $ac_try) 2>&5
13089   ac_status=$?
13090   echo "$as_me:13090: \$? = $ac_status" >&5
13091   (exit $ac_status); }; }; then
13092   cf_cv_cpp_vscan_func=$cf_vscan_func; break
13093 else
13094   echo "$as_me: failed program was:" >&5
13095 cat conftest.$ac_ext >&5
13096 cf_cv_cpp_vscan_func=no
13097 fi
13098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13099         test "$cf_cv_cpp_vscan_func" != no && break
13100         done
13101
13102 fi
13103 echo "$as_me:13103: result: $cf_cv_cpp_vscan_func" >&5
13104 echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
13105
13106 ac_ext=cc
13107 ac_cpp='$CXXCPP $CPPFLAGS'
13108 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13109 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13110 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13111
13112 fi
13113
13114 case $cf_cv_cpp_vscan_func in #(vi
13115 stdio) #(vi
13116         cat >>confdefs.h <<\EOF
13117 #define CPP_HAS_VSCAN_FUNC 1
13118 EOF
13119
13120         cat >>confdefs.h <<\EOF
13121 #define USE_STDIO_VSCAN 1
13122 EOF
13123
13124         ;;
13125 strstream)
13126         cat >>confdefs.h <<\EOF
13127 #define CPP_HAS_VSCAN_FUNC 1
13128 EOF
13129
13130         cat >>confdefs.h <<\EOF
13131 #define USE_STRSTREAM_VSCAN 1
13132 EOF
13133
13134         ;;
13135 strstream_cast)
13136         cat >>confdefs.h <<\EOF
13137 #define CPP_HAS_VSCAN_FUNC 1
13138 EOF
13139
13140         cat >>confdefs.h <<\EOF
13141 #define USE_STRSTREAM_VSCAN_CAST 1
13142 EOF
13143
13144         ;;
13145 esac
13146
13147         CXX_AR='$(AR)'
13148         CXX_AR_OPTS='$(AR_OPTS)'
13149         case $cf_cv_system_name in #(vi
13150         irix*) #(vi
13151             if test "$GXX" != yes ; then
13152                 CXX_AR='$(CXX)'
13153                 CXX_AR_OPTS='-ar -o'
13154             fi
13155             ;;
13156         sco3.2v5*) #(vi
13157             CXXLDFLAGS="-u main"
13158             ;;
13159         solaris2*)
13160             if test "$GXX" != yes ; then
13161                 CXX_AR='$(CXX)'
13162                 CXX_AR_OPTS='-xar -o'
13163             fi
13164             ;;
13165         esac
13166
13167 else
13168         cf_cxx_library=no
13169         cf_cv_builtin_bool=1
13170
13171         # Just because we are not configuring against C++ right now does not
13172         # mean that a user will not want to use C++.  Some distributors disable
13173         # the C++ portion of this configuration as a shortcut (or just to avoid
13174         # compiling the demo in the c++ directory).  So we need a reasonable
13175         # default for the 'bool' type.
13176         #
13177         # Caveat: since the storage of the bool type is not standardized, it
13178         # may change.
13179
13180         if test "$NCURSES_BOOL" != auto ; then
13181                 cf_cv_type_of_bool=$NCURSES_AUTO
13182         else
13183                 if test "$cf_cv_header_stdbool_h" = 1 ; then
13184
13185 echo "$as_me:13185: checking for size of bool" >&5
13186 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
13187 if test "${cf_cv_type_of_bool+set}" = set; then
13188   echo $ECHO_N "(cached) $ECHO_C" >&6
13189 else
13190
13191         rm -f cf_test.out
13192         if test "$cross_compiling" = yes; then
13193   cf_cv_type_of_bool=unknown
13194 else
13195   cat >conftest.$ac_ext <<_ACEOF
13196 #line 13196 "configure"
13197 #include "confdefs.h"
13198
13199 #include <stdlib.h>
13200 #include <stdio.h>
13201
13202 #if defined(__cplusplus)
13203
13204 #ifdef HAVE_GXX_BUILTIN_H
13205 #include <g++/builtin.h>
13206 #elif HAVE_GPP_BUILTIN_H
13207 #include <gpp/builtin.h>
13208 #elif HAVE_BUILTIN_H
13209 #include <builtin.h>
13210 #endif
13211
13212 #else
13213
13214 #if $cf_cv_header_stdbool_h
13215 #include <stdbool.h>
13216 #endif
13217
13218 #endif
13219
13220 main()
13221 {
13222         FILE *fp = fopen("cf_test.out", "w");
13223         if (fp != 0) {
13224                 bool x = true;
13225                 if ((bool)(-x) >= 0)
13226                         fputs("unsigned ", fp);
13227                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
13228                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
13229                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
13230                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
13231                 fclose(fp);
13232         }
13233         exit(0);
13234 }
13235
13236 _ACEOF
13237 rm -f conftest$ac_exeext
13238 if { (eval echo "$as_me:13238: \"$ac_link\"") >&5
13239   (eval $ac_link) 2>&5
13240   ac_status=$?
13241   echo "$as_me:13241: \$? = $ac_status" >&5
13242   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13243   { (eval echo "$as_me:13243: \"$ac_try\"") >&5
13244   (eval $ac_try) 2>&5
13245   ac_status=$?
13246   echo "$as_me:13246: \$? = $ac_status" >&5
13247   (exit $ac_status); }; }; then
13248   cf_cv_type_of_bool=`cat cf_test.out`
13249                  if test -z "$cf_cv_type_of_bool"; then
13250                    cf_cv_type_of_bool=unknown
13251                  fi
13252 else
13253   echo "$as_me: program exited with status $ac_status" >&5
13254 echo "$as_me: failed program was:" >&5
13255 cat conftest.$ac_ext >&5
13256 cf_cv_type_of_bool=unknown
13257 fi
13258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13259 fi
13260
13261 fi
13262
13263         rm -f cf_test.out
13264 echo "$as_me:13264: result: $cf_cv_type_of_bool" >&5
13265 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
13266 if test "$cf_cv_type_of_bool" = unknown ; then
13267         case .$NCURSES_BOOL in #(vi
13268         .auto|.) NCURSES_BOOL=unsigned;;
13269         esac
13270         { echo "$as_me:13270: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
13271 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
13272         cf_cv_type_of_bool=$NCURSES_BOOL
13273 fi
13274
13275                 else
13276                         echo "$as_me:13276: checking for fallback type of bool" >&5
13277 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
13278                         case "$host_cpu" in #(vi
13279                         i?86)   cf_cv_type_of_bool=char ;; #(vi
13280                         *)      cf_cv_type_of_bool=int  ;;
13281                         esac
13282                         echo "$as_me:13282: result: $cf_cv_type_of_bool" >&5
13283 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
13284                 fi
13285         fi
13286 fi
13287
13288 # If the C compiler did not declare bool, and we did not determine that the C++
13289 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
13290 # ncurses library use the same type as C++ bool.  Note that this allows one to
13291 # specify the type of bool in a configure-script option and postpone
13292 # integration with the C++ compiler provided that the types are compatible.
13293 USE_CXX_BOOL=1
13294 if test $cf_cv_cc_bool_type = 1
13295 then
13296         # oops: C has a bool.  Unlikely, but C++ could differ.
13297         USE_CXX_BOOL=0
13298 elif test $cf_cv_builtin_bool = 0
13299 then
13300         # C++ has no bool
13301         USE_CXX_BOOL=0
13302 else
13303         # this is the normal case
13304         USE_CXX_BOOL='defined(__cplusplus)'
13305 fi
13306
13307 if test "$cf_with_ada" != "no" ; then
13308 cf_ada_make=gnatmake
13309 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
13310 set dummy $cf_ada_make; ac_word=$2
13311 echo "$as_me:13311: checking for $ac_word" >&5
13312 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13313 if test "${ac_cv_prog_gnat_exists+set}" = set; then
13314   echo $ECHO_N "(cached) $ECHO_C" >&6
13315 else
13316   if test -n "$gnat_exists"; then
13317   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13318 else
13319   ac_save_IFS=$IFS; IFS=$ac_path_separator
13320 ac_dummy="$PATH"
13321 for ac_dir in $ac_dummy; do
13322   IFS=$ac_save_IFS
13323   test -z "$ac_dir" && ac_dir=.
13324   $as_executable_p "$ac_dir/$ac_word" || continue
13325 ac_cv_prog_gnat_exists="yes"
13326 echo "$as_me:13326: found $ac_dir/$ac_word" >&5
13327 break
13328 done
13329
13330   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13331 fi
13332 fi
13333 gnat_exists=$ac_cv_prog_gnat_exists
13334 if test -n "$gnat_exists"; then
13335   echo "$as_me:13335: result: $gnat_exists" >&5
13336 echo "${ECHO_T}$gnat_exists" >&6
13337 else
13338   echo "$as_me:13338: result: no" >&5
13339 echo "${ECHO_T}no" >&6
13340 fi
13341
13342 if test "$ac_cv_prog_gnat_exists" = no; then
13343    cf_ada_make=
13344 else
13345
13346 echo "$as_me:13346: checking for gnat version" >&5
13347 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13348 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
13349   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13350 echo "$as_me:13350: result: $cf_gnat_version" >&5
13351 echo "${ECHO_T}$cf_gnat_version" >&6
13352
13353 case $cf_gnat_version in
13354   3.1[1-9]*|3.[2-9]*|[4-9].*)
13355     cf_cv_prog_gnat_correct=yes
13356     ;;
13357   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
13358      cf_cv_prog_gnat_correct=no
13359      ;;
13360 esac
13361 case $cf_gnat_version in
13362   3.[1-9]*|[4-9].*)
13363       cf_compile_generics=generics
13364       cf_generic_objects="\$(GENOBJS)"
13365       ;;
13366   *)  cf_compile_generics=
13367       cf_generic_objects=
13368       ;;
13369 esac
13370
13371    # Extract the first word of "m4", so it can be a program name with args.
13372 set dummy m4; ac_word=$2
13373 echo "$as_me:13373: checking for $ac_word" >&5
13374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13375 if test "${ac_cv_prog_M4_exists+set}" = set; then
13376   echo $ECHO_N "(cached) $ECHO_C" >&6
13377 else
13378   if test -n "$M4_exists"; then
13379   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13380 else
13381   ac_save_IFS=$IFS; IFS=$ac_path_separator
13382 ac_dummy="$PATH"
13383 for ac_dir in $ac_dummy; do
13384   IFS=$ac_save_IFS
13385   test -z "$ac_dir" && ac_dir=.
13386   $as_executable_p "$ac_dir/$ac_word" || continue
13387 ac_cv_prog_M4_exists="yes"
13388 echo "$as_me:13388: found $ac_dir/$ac_word" >&5
13389 break
13390 done
13391
13392   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13393 fi
13394 fi
13395 M4_exists=$ac_cv_prog_M4_exists
13396 if test -n "$M4_exists"; then
13397   echo "$as_me:13397: result: $M4_exists" >&5
13398 echo "${ECHO_T}$M4_exists" >&6
13399 else
13400   echo "$as_me:13400: result: no" >&5
13401 echo "${ECHO_T}no" >&6
13402 fi
13403
13404    if test "$ac_cv_prog_M4_exists" = no; then
13405       cf_cv_prog_gnat_correct=no
13406       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13407    fi
13408    if test "$cf_cv_prog_gnat_correct" = yes; then
13409       echo "$as_me:13409: checking if GNAT works" >&5
13410 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13411
13412 rm -f conftest*
13413 cat >>conftest.ads <<CF_EOF
13414 procedure conftest;
13415 CF_EOF
13416 cat >>conftest.adb <<CF_EOF
13417 with Text_IO;
13418 with GNAT.OS_Lib;
13419 procedure conftest is
13420 begin
13421    Text_IO.Put ("Hello World");
13422    Text_IO.New_Line;
13423    GNAT.OS_Lib.OS_Exit (0);
13424 end conftest;
13425 CF_EOF
13426 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13427    if ( ./conftest 1>&5 2>&1 ) ; then
13428       cf_cv_prog_gnat_correct=yes
13429    else
13430       cf_cv_prog_gnat_correct=no
13431    fi
13432 else
13433    cf_cv_prog_gnat_correct=no
13434 fi
13435 rm -f conftest*
13436
13437       echo "$as_me:13437: result: $cf_cv_prog_gnat_correct" >&5
13438 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13439    fi
13440 fi
13441 if test "$cf_cv_prog_gnat_correct" = yes; then
13442    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
13443
13444    echo "$as_me:13444: checking if GNAT pragma Unreferenced works" >&5
13445 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
13446
13447 rm -f conftest*
13448 cat >>conftest.ads <<CF_EOF
13449 procedure conftest;
13450 CF_EOF
13451 cat >>conftest.adb <<CF_EOF
13452 with Text_IO;
13453 with GNAT.OS_Lib;
13454 procedure conftest is
13455    test : Integer;
13456    pragma Unreferenced (test);
13457 begin
13458    test := 1;
13459    Text_IO.Put ("Hello World");
13460    Text_IO.New_Line;
13461    GNAT.OS_Lib.OS_Exit (0);
13462 end conftest;
13463 CF_EOF
13464 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13465       cf_cv_pragma_unreferenced=yes
13466 else
13467    cf_cv_pragma_unreferenced=no
13468 fi
13469 rm -f conftest*
13470
13471    echo "$as_me:13471: result: $cf_cv_pragma_unreferenced" >&5
13472 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
13473
13474    # if the pragma is supported, use it (needed in the Trace code).
13475    if test $cf_cv_pragma_unreferenced = yes ; then
13476       PRAGMA_UNREF=TRUE
13477    else
13478       PRAGMA_UNREF=FALSE
13479    fi
13480
13481 # Check whether --with-ada-compiler or --without-ada-compiler was given.
13482 if test "${with_ada_compiler+set}" = set; then
13483   withval="$with_ada_compiler"
13484   cf_ada_compiler=$withval
13485 else
13486   cf_ada_compiler=gnatmake
13487 fi;
13488
13489    cf_ada_package=terminal_interface
13490
13491 # Check whether --with-ada-include or --without-ada-include was given.
13492 if test "${with_ada_include+set}" = set; then
13493   withval="$with_ada_include"
13494
13495 else
13496   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
13497 fi;
13498 case ".$withval" in #(vi
13499 .\$\(*\)*|.\'*\'*) #(vi
13500   ;;
13501 ..|./*|.\\*) #(vi
13502   ;;
13503 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
13504   ;;
13505 .\${*prefix}*) #(vi
13506   eval withval="$withval"
13507   case ".$withval" in #(vi
13508   .NONE/*)
13509     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
13510     ;;
13511   esac
13512   ;; #(vi
13513 .NONE/*)
13514   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
13515   ;;
13516 *)
13517   { { echo "$as_me:13517: error: expected a pathname, not \"$withval\"" >&5
13518 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13519    { (exit 1); exit 1; }; }
13520   ;;
13521 esac
13522
13523 eval ADA_INCLUDE="$withval"
13524
13525 # Check whether --with-ada-objects or --without-ada-objects was given.
13526 if test "${with_ada_objects+set}" = set; then
13527   withval="$with_ada_objects"
13528
13529 else
13530   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
13531 fi;
13532 case ".$withval" in #(vi
13533 .\$\(*\)*|.\'*\'*) #(vi
13534   ;;
13535 ..|./*|.\\*) #(vi
13536   ;;
13537 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
13538   ;;
13539 .\${*prefix}*) #(vi
13540   eval withval="$withval"
13541   case ".$withval" in #(vi
13542   .NONE/*)
13543     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
13544     ;;
13545   esac
13546   ;; #(vi
13547 .NONE/*)
13548   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
13549   ;;
13550 *)
13551   { { echo "$as_me:13551: error: expected a pathname, not \"$withval\"" >&5
13552 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13553    { (exit 1); exit 1; }; }
13554   ;;
13555 esac
13556
13557 eval ADA_OBJECTS="$withval"
13558
13559 fi
13560 fi
13561
13562 ### Construct the library-subsets, if any, from this set of keywords:
13563 ### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
13564 echo "$as_me:13564: checking for library subsets" >&5
13565 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
13566 if test "$with_termlib" != no ; then
13567         LIB_SUBSETS="termlib"
13568         test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
13569         LIB_SUBSETS="${LIB_SUBSETS} "
13570 else
13571         LIB_SUBSETS="termlib+"
13572         test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
13573 fi
13574 LIB_SUBSETS="${LIB_SUBSETS}base"
13575 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
13576 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
13577 echo "$as_me:13577: result: $LIB_SUBSETS" >&5
13578 echo "${ECHO_T}$LIB_SUBSETS" >&6
13579
13580 ### Construct the list of include-directories to be generated
13581
13582 CPPFLAGS="-I. -I../include $CPPFLAGS"
13583 if test "$srcdir" != "."; then
13584         CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
13585 fi
13586 if test "$GCC" != yes; then
13587         CPPFLAGS="$CPPFLAGS -I\$(includedir)"
13588 elif test "$includedir" != "/usr/include"; then
13589         if test "$includedir" = '${prefix}/include' ; then
13590                 if test $prefix != /usr ; then
13591                         CPPFLAGS="$CPPFLAGS -I\$(includedir)"
13592                 fi
13593         else
13594                 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
13595         fi
13596 fi
13597
13598 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
13599 if test "$srcdir" != "."; then
13600         ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS"
13601 fi
13602 if test "$GCC" != yes; then
13603         ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
13604 elif test "$includedir" != "/usr/include"; then
13605         if test "$includedir" = '${prefix}/include' ; then
13606                 if test $prefix != /usr ; then
13607                         ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
13608                 fi
13609         else
13610                 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
13611         fi
13612 fi
13613
13614 ### Build up pieces for makefile rules
13615 echo "$as_me:13615: checking default library suffix" >&5
13616 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
13617
13618         case $DFT_LWR_MODEL in
13619         libtool) DFT_ARG_SUFFIX=''   ;;
13620         normal)  DFT_ARG_SUFFIX=''   ;;
13621         debug)   DFT_ARG_SUFFIX='_g' ;;
13622         profile) DFT_ARG_SUFFIX='_p' ;;
13623         shared)  DFT_ARG_SUFFIX=''   ;;
13624         esac
13625         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
13626 echo "$as_me:13626: result: $DFT_ARG_SUFFIX" >&5
13627 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
13628
13629 echo "$as_me:13629: checking default library-dependency suffix" >&5
13630 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
13631
13632         case $DFT_LWR_MODEL in
13633         libtool) DFT_DEP_SUFFIX='.la'  ;;
13634         normal)  DFT_DEP_SUFFIX='.a'   ;;
13635         debug)   DFT_DEP_SUFFIX='_g.a' ;;
13636         profile) DFT_DEP_SUFFIX='_p.a' ;;
13637         shared)
13638                 case $cf_cv_system_name in
13639                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
13640                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
13641                 hpux*)
13642                         case $target in
13643                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
13644                         *)      DFT_DEP_SUFFIX='.sl' ;;
13645                         esac
13646                         ;;
13647                 *)      DFT_DEP_SUFFIX='.so'  ;;
13648                 esac
13649         esac
13650         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
13651 if test $DFT_LWR_MODEL = shared ; then
13652         case $cf_cv_system_name in #(vi
13653         cygwin*)
13654                 DFT_DEP_SUFFIX=".dll.a"
13655                 ;;
13656         esac
13657 fi
13658 echo "$as_me:13658: result: $DFT_DEP_SUFFIX" >&5
13659 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
13660
13661 echo "$as_me:13661: checking default object directory" >&5
13662 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
13663
13664         case $DFT_LWR_MODEL in
13665         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
13666         normal)  DFT_OBJ_SUBDIR='objects' ;;
13667         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
13668         profile) DFT_OBJ_SUBDIR='obj_p' ;;
13669         shared)
13670                 case $cf_cv_system_name in #(vi
13671                 cygwin) #(vi
13672                         DFT_OBJ_SUBDIR='objects' ;;
13673                 *)
13674                         DFT_OBJ_SUBDIR='obj_s' ;;
13675                 esac
13676         esac
13677 echo "$as_me:13677: result: $DFT_OBJ_SUBDIR" >&5
13678 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
13679
13680 # libtool thinks it can make c++ shared libraries (perhaps only g++)
13681 if test "$cf_with_cxx" = yes ; then
13682 echo "$as_me:13682: checking c++ library-dependency suffix" >&5
13683 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
13684 if test "$with_libtool" != "no"; then
13685         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
13686 else
13687
13688         case normal in
13689         libtool) CXX_LIB_SUFFIX='.la'  ;;
13690         normal)  CXX_LIB_SUFFIX='.a'   ;;
13691         debug)   CXX_LIB_SUFFIX='_g.a' ;;
13692         profile) CXX_LIB_SUFFIX='_p.a' ;;
13693         shared)
13694                 case $cf_cv_system_name in
13695                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
13696                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
13697                 hpux*)
13698                         case $target in
13699                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
13700                         *)      CXX_LIB_SUFFIX='.sl' ;;
13701                         esac
13702                         ;;
13703                 *)      CXX_LIB_SUFFIX='.so'  ;;
13704                 esac
13705         esac
13706         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
13707 fi
13708 echo "$as_me:13708: result: $CXX_LIB_SUFFIX" >&5
13709 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
13710
13711 fi
13712
13713 ### Set up low-level terminfo dependencies for makefiles.
13714 TINFO_LIST="$SHLIB_LIST"
13715 if test "$with_termlib" != no ; then
13716
13717         if test "$with_termlib" != yes ; then
13718                 TINFO_NAME=$with_termlib
13719                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
13720                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
13721                 TINFO_LIB_SUFFIX="${with_termlib}"
13722         else
13723                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
13724                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
13725                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
13726         fi
13727
13728         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
13729         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
13730         if test "$DFT_LWR_MODEL" = "libtool"; then
13731                 TEST_ARGS="${TEST_DEPS}"
13732                 TEST_ARG2="${TEST_DEP2}"
13733                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
13734         else
13735                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
13736                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
13737                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
13738                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
13739         fi
13740 else
13741         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
13742 fi
13743
13744 # needed for Ada95
13745 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
13746
13747 echo "$as_me:13747: checking where we will install curses.h" >&5
13748 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
13749 test "$with_overwrite" = no && \
13750 test "x$includedir" = 'x${prefix}/include' && \
13751         includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
13752 echo "$as_me:13752: result: $includedir" >&5
13753 echo "${ECHO_T}$includedir" >&6
13754
13755 ### Resolve a conflict between normal and wide-curses by forcing applications
13756 ### that will need libutf8 to add it to their configure script.
13757 if test "$with_overwrite" != no ; then
13758 if test "$NCURSES_LIBUTF8" = 1 ; then
13759         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
13760         { echo "$as_me:13760: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
13761 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
13762 fi
13763 fi
13764
13765 ### predefined stuff for the test programs
13766 cat >>confdefs.h <<\EOF
13767 #define HAVE_SLK_COLOR 1
13768 EOF
13769
13770 ### Construct the list of subdirectories for which we'll customize makefiles
13771 ### with the appropriate compile-rules.
13772
13773 echo "$as_me:13773: checking for src modules" >&5
13774 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
13775
13776 # dependencies and linker-arguments for test-programs
13777 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
13778 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
13779 if test "$DFT_LWR_MODEL" = "libtool"; then
13780         TEST_ARGS="${TEST_DEPS}"
13781         TEST_ARG2="${TEST_DEP2}"
13782 else
13783         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
13784         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
13785 fi
13786
13787 cf_cv_src_modules=
13788 for cf_dir in $modules_to_build
13789 do
13790         if test -f $srcdir/$cf_dir/modules; then
13791
13792                 # We may/may not have tack in the distribution, though the
13793                 # makefile is.
13794                 if test $cf_dir = tack ; then
13795                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
13796                                 continue
13797                         fi
13798                 fi
13799
13800                 if test -z "$cf_cv_src_modules"; then
13801                         cf_cv_src_modules=$cf_dir
13802                 else
13803                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
13804                 fi
13805
13806                 # Make the ncurses_cfg.h file record the library interface files as
13807                 # well.  These are header files that are the same name as their
13808                 # directory.  Ncurses is the only library that does not follow
13809                 # that pattern.
13810                 if test $cf_dir = tack ; then
13811                         continue
13812                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
13813
13814 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13815
13816                         cat >>confdefs.h <<EOF
13817 #define HAVE_${cf_have_include}_H 1
13818 EOF
13819
13820                         cat >>confdefs.h <<EOF
13821 #define HAVE_LIB${cf_have_include} 1
13822 EOF
13823
13824                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
13825                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
13826                         if test "$DFT_LWR_MODEL" = "libtool"; then
13827                                 TEST_ARGS="${TEST_DEPS}"
13828                                 TEST_ARG2="${TEST_DEP2}"
13829                         else
13830                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
13831                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
13832                         fi
13833                 fi
13834         fi
13835 done
13836 echo "$as_me:13836: result: $cf_cv_src_modules" >&5
13837 echo "${ECHO_T}$cf_cv_src_modules" >&6
13838
13839 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
13840 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
13841
13842 SRC_SUBDIRS="man include"
13843 for cf_dir in $cf_cv_src_modules
13844 do
13845         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
13846 done
13847 SRC_SUBDIRS="$SRC_SUBDIRS test"
13848 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
13849 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
13850
13851 ADA_SUBDIRS=
13852 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
13853    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
13854    ADA_SUBDIRS="gen src samples"
13855 fi
13856
13857 SUB_MAKEFILES=
13858 for cf_dir in $SRC_SUBDIRS
13859 do
13860         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
13861 done
13862
13863 if test -n "$ADA_SUBDIRS"; then
13864    for cf_dir in $ADA_SUBDIRS
13865    do
13866       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
13867    done
13868
13869 fi
13870
13871 DIRS_TO_MAKE="lib"
13872 for cf_item in $cf_list_models
13873 do
13874
13875         case $cf_item in
13876         libtool) cf_subdir='obj_lo'  ;;
13877         normal)  cf_subdir='objects' ;;
13878         debug)   cf_subdir='obj_g' ;;
13879         profile) cf_subdir='obj_p' ;;
13880         shared)
13881                 case $cf_cv_system_name in #(vi
13882                 cygwin) #(vi
13883                         cf_subdir='objects' ;;
13884                 *)
13885                         cf_subdir='obj_s' ;;
13886                 esac
13887         esac
13888
13889         for cf_item2 in $DIRS_TO_MAKE
13890         do
13891                 test $cf_item2 = $cf_subdir && break
13892         done
13893         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
13894 done
13895 for cf_dir in $DIRS_TO_MAKE
13896 do
13897         test ! -d $cf_dir && mkdir $cf_dir
13898 done
13899
13900 cat >>confdefs.h <<EOF
13901 #define NCURSES_PATHSEP '$PATHSEP'
13902 EOF
13903
13904 cat >>confdefs.h <<EOF
13905 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
13906 EOF
13907
13908 ### Now that we're done running tests, add the compiler-warnings, if any
13909
13910 cf_fix_cppflags=no
13911 cf_new_cflags=
13912 cf_new_cppflags=
13913 cf_new_extra_cppflags=
13914
13915 for cf_add_cflags in $EXTRA_CFLAGS
13916 do
13917 case $cf_fix_cppflags in
13918 no)
13919         case $cf_add_cflags in #(vi
13920         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13921                 case $cf_add_cflags in
13922                 -D*)
13923                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13924
13925                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13926                         && test -z "${cf_tst_cflags}" \
13927                         && cf_fix_cppflags=yes
13928
13929                         if test $cf_fix_cppflags = yes ; then
13930                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13931                                 continue
13932                         elif test "${cf_tst_cflags}" = "\"'" ; then
13933                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13934                                 continue
13935                         fi
13936                         ;;
13937                 esac
13938                 case "$CPPFLAGS" in
13939                 *$cf_add_cflags) #(vi
13940                         ;;
13941                 *) #(vi
13942                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13943                         ;;
13944                 esac
13945                 ;;
13946         *)
13947                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13948                 ;;
13949         esac
13950         ;;
13951 yes)
13952         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13953
13954         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13955
13956         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13957         && test -z "${cf_tst_cflags}" \
13958         && cf_fix_cppflags=no
13959         ;;
13960 esac
13961 done
13962
13963 if test -n "$cf_new_cflags" ; then
13964
13965         CFLAGS="$CFLAGS $cf_new_cflags"
13966 fi
13967
13968 if test -n "$cf_new_cppflags" ; then
13969
13970         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
13971 fi
13972
13973 if test -n "$cf_new_extra_cppflags" ; then
13974
13975         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13976 fi
13977
13978 ################################################################################
13979 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
13980 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"
13981 ac_config_commands="$ac_config_commands default"
13982 cat >confcache <<\_ACEOF
13983 # This file is a shell script that caches the results of configure
13984 # tests run on this system so they can be shared between configure
13985 # scripts and configure runs, see configure's option --config-cache.
13986 # It is not useful on other systems.  If it contains results you don't
13987 # want to keep, you may remove or edit it.
13988 #
13989 # config.status only pays attention to the cache file if you give it
13990 # the --recheck option to rerun configure.
13991 #
13992 # `ac_cv_env_foo' variables (set or unset) will be overriden when
13993 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13994 # following values.
13995
13996 _ACEOF
13997
13998 # The following way of writing the cache mishandles newlines in values,
13999 # but we know of no workaround that is simple, portable, and efficient.
14000 # So, don't put newlines in cache variables' values.
14001 # Ultrix sh set writes to stderr and can't be redirected directly,
14002 # and sets the high bit in the cache file unless we assign to the vars.
14003 {
14004   (set) 2>&1 |
14005     case `(ac_space=' '; set | grep ac_space) 2>&1` in
14006     *ac_space=\ *)
14007       # `set' does not quote correctly, so add quotes (double-quote
14008       # substitution turns \\\\ into \\, and sed turns \\ into \).
14009       sed -n \
14010         "s/'/'\\\\''/g;
14011           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14012       ;;
14013     *)
14014       # `set' quotes correctly as required by POSIX, so do not add quotes.
14015       sed -n \
14016         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14017       ;;
14018     esac;
14019 } |
14020   sed '
14021      t clear
14022      : clear
14023      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14024      t end
14025      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14026      : end' >>confcache
14027 if cmp -s $cache_file confcache; then :; else
14028   if test -w $cache_file; then
14029     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14030     cat confcache >$cache_file
14031   else
14032     echo "not updating unwritable cache $cache_file"
14033   fi
14034 fi
14035 rm -f confcache
14036
14037 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14038 # Let make expand exec_prefix.
14039 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14040
14041 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14042 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14043 # trailing colons and then remove the whole line if VPATH becomes empty
14044 # (actually we leave an empty line to preserve line numbers).
14045 if test "x$srcdir" = x.; then
14046   ac_vpsub='/^[         ]*VPATH[        ]*=/{
14047 s/:*\$(srcdir):*/:/;
14048 s/:*\${srcdir}:*/:/;
14049 s/:*@srcdir@:*/:/;
14050 s/^\([^=]*=[    ]*\):*/\1/;
14051 s/:*$//;
14052 s/^[^=]*=[      ]*$//;
14053 }'
14054 fi
14055
14056 DEFS=-DHAVE_CONFIG_H
14057
14058 : ${CONFIG_STATUS=./config.status}
14059 ac_clean_files_save=$ac_clean_files
14060 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14061 { echo "$as_me:14061: creating $CONFIG_STATUS" >&5
14062 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14063 cat >$CONFIG_STATUS <<_ACEOF
14064 #! $SHELL
14065 # Generated automatically by configure.
14066 # Run this file to recreate the current configuration.
14067 # Compiler output produced by configure, useful for debugging
14068 # configure, is in config.log if it exists.
14069
14070 debug=false
14071 SHELL=\${CONFIG_SHELL-$SHELL}
14072 ac_cs_invocation="\$0 \$@"
14073
14074 _ACEOF
14075
14076 cat >>$CONFIG_STATUS <<\_ACEOF
14077 # Be Bourne compatible
14078 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14079   emulate sh
14080   NULLCMD=:
14081 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14082   set -o posix
14083 fi
14084
14085 # Name of the executable.
14086 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14087
14088 if expr a : '\(a\)' >/dev/null 2>&1; then
14089   as_expr=expr
14090 else
14091   as_expr=false
14092 fi
14093
14094 rm -f conf$$ conf$$.exe conf$$.file
14095 echo >conf$$.file
14096 if ln -s conf$$.file conf$$ 2>/dev/null; then
14097   # We could just check for DJGPP; but this test a) works b) is more generic
14098   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14099   if test -f conf$$.exe; then
14100     # Don't use ln at all; we don't have any links
14101     as_ln_s='cp -p'
14102   else
14103     as_ln_s='ln -s'
14104   fi
14105 elif ln conf$$.file conf$$ 2>/dev/null; then
14106   as_ln_s=ln
14107 else
14108   as_ln_s='cp -p'
14109 fi
14110 rm -f conf$$ conf$$.exe conf$$.file
14111
14112 as_executable_p="test -f"
14113
14114 # Support unset when possible.
14115 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14116   as_unset=unset
14117 else
14118   as_unset=false
14119 fi
14120
14121 # NLS nuisances.
14122 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14123 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14124 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14125 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14126 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14127 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14128 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14129 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14130
14131 # IFS
14132 # We need space, tab and new line, in precisely that order.
14133 as_nl='
14134 '
14135 IFS="   $as_nl"
14136
14137 # CDPATH.
14138 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14139
14140 exec 6>&1
14141
14142 _ACEOF
14143
14144 # Files that config.status was made for.
14145 if test -n "$ac_config_files"; then
14146   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14147 fi
14148
14149 if test -n "$ac_config_headers"; then
14150   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14151 fi
14152
14153 if test -n "$ac_config_links"; then
14154   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14155 fi
14156
14157 if test -n "$ac_config_commands"; then
14158   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14159 fi
14160
14161 cat >>$CONFIG_STATUS <<\EOF
14162
14163 ac_cs_usage="\
14164 \`$as_me' instantiates files from templates according to the
14165 current configuration.
14166
14167 Usage: $0 [OPTIONS] [FILE]...
14168
14169   -h, --help       print this help, then exit
14170   -V, --version    print version number, then exit
14171   -d, --debug      don't remove temporary files
14172       --recheck    update $as_me by reconfiguring in the same conditions
14173   --file=FILE[:TEMPLATE]
14174                    instantiate the configuration file FILE
14175   --header=FILE[:TEMPLATE]
14176                    instantiate the configuration header FILE
14177
14178 Configuration files:
14179 $config_files
14180
14181 Configuration headers:
14182 $config_headers
14183
14184 Configuration commands:
14185 $config_commands
14186
14187 Report bugs to <bug-autoconf@gnu.org>."
14188 EOF
14189
14190 cat >>$CONFIG_STATUS <<EOF
14191 ac_cs_version="\\
14192 config.status
14193 configured by $0, generated by GNU Autoconf 2.52.20030208,
14194   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14195
14196 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14197 Free Software Foundation, Inc.
14198 This config.status script is free software; the Free Software Foundation
14199 gives unlimited permission to copy, distribute and modify it."
14200 srcdir=$srcdir
14201 INSTALL="$INSTALL"
14202 EOF
14203
14204 cat >>$CONFIG_STATUS <<\EOF
14205 # If no file are specified by the user, then we need to provide default
14206 # value.  By we need to know if files were specified by the user.
14207 ac_need_defaults=:
14208 while test $# != 0
14209 do
14210   case $1 in
14211   --*=*)
14212     ac_option=`expr "x$1" : 'x\([^=]*\)='`
14213     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14214     shift
14215     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14216     shift
14217     ;;
14218   -*);;
14219   *) # This is not an option, so the user has probably given explicit
14220      # arguments.
14221      ac_need_defaults=false;;
14222   esac
14223
14224   case $1 in
14225   # Handling of the options.
14226 EOF
14227 cat >>$CONFIG_STATUS <<EOF
14228   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14229     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14230     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14231 EOF
14232 cat >>$CONFIG_STATUS <<\EOF
14233   --version | --vers* | -V )
14234     echo "$ac_cs_version"; exit 0 ;;
14235   --he | --h)
14236     # Conflict between --help and --header
14237     { { echo "$as_me:14237: error: ambiguous option: $1
14238 Try \`$0 --help' for more information." >&5
14239 echo "$as_me: error: ambiguous option: $1
14240 Try \`$0 --help' for more information." >&2;}
14241    { (exit 1); exit 1; }; };;
14242   --help | --hel | -h )
14243     echo "$ac_cs_usage"; exit 0 ;;
14244   --debug | --d* | -d )
14245     debug=: ;;
14246   --file | --fil | --fi | --f )
14247     shift
14248     CONFIG_FILES="$CONFIG_FILES $1"
14249     ac_need_defaults=false;;
14250   --header | --heade | --head | --hea )
14251     shift
14252     CONFIG_HEADERS="$CONFIG_HEADERS $1"
14253     ac_need_defaults=false;;
14254
14255   # This is an error.
14256   -*) { { echo "$as_me:14256: error: unrecognized option: $1
14257 Try \`$0 --help' for more information." >&5
14258 echo "$as_me: error: unrecognized option: $1
14259 Try \`$0 --help' for more information." >&2;}
14260    { (exit 1); exit 1; }; } ;;
14261
14262   *) ac_config_targets="$ac_config_targets $1" ;;
14263
14264   esac
14265   shift
14266 done
14267
14268 exec 5>>config.log
14269 cat >&5 << _ACEOF
14270
14271 ## ----------------------- ##
14272 ## Running config.status.  ##
14273 ## ----------------------- ##
14274
14275 This file was extended by $as_me 2.52.20030208, executed with
14276   CONFIG_FILES    = $CONFIG_FILES
14277   CONFIG_HEADERS  = $CONFIG_HEADERS
14278   CONFIG_LINKS    = $CONFIG_LINKS
14279   CONFIG_COMMANDS = $CONFIG_COMMANDS
14280   > $ac_cs_invocation
14281 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14282
14283 _ACEOF
14284 EOF
14285
14286 cat >>$CONFIG_STATUS <<EOF
14287 #
14288 # INIT-COMMANDS section.
14289 #
14290
14291 ### Special initialization commands, used to pass information from the
14292 ### configuration-run into config.status
14293
14294 AWK="$AWK"
14295 CF_LIST_MODELS="$cf_list_models"
14296 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14297 DFT_LWR_MODEL="$DFT_LWR_MODEL"
14298 LDCONFIG="$LDCONFIG"
14299 LIB_NAME="$LIB_NAME"
14300 LIB_SUBSETS="$LIB_SUBSETS"
14301 LIB_SUFFIX="$LIB_SUFFIX"
14302 LIB_TRACING="$LIB_TRACING"
14303 MAKE_TERMINFO="$MAKE_TERMINFO"
14304 NCURSES_OSPEED="$NCURSES_OSPEED"
14305 SRC_SUBDIRS="$SRC_SUBDIRS"
14306 TERMINFO="$TERMINFO"
14307 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
14308 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
14309 TINFO_NAME="$TINFO_NAME"
14310 WITH_CURSES_H="$with_curses_h"
14311 WITH_ECHO="$with_echo"
14312 WITH_OVERWRITE="$with_overwrite"
14313 cf_cv_abi_version="$cf_cv_abi_version"
14314 cf_cv_do_symlinks="$cf_cv_do_symlinks"
14315 cf_cv_enable_lp64="$cf_cv_enable_lp64"
14316 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
14317 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
14318 cf_cv_rel_version="$cf_cv_rel_version"
14319 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14320 cf_cv_shlib_version="$cf_cv_shlib_version"
14321 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14322 cf_cv_system_name="$cf_cv_system_name"
14323 cf_with_cxx_binding="$cf_with_cxx_binding"
14324 host="$host"
14325 target="$target"
14326
14327 EOF
14328
14329 cat >>$CONFIG_STATUS <<\EOF
14330 for ac_config_target in $ac_config_targets
14331 do
14332   case "$ac_config_target" in
14333   # Handling of arguments.
14334   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
14335   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
14336   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
14337   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
14338   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14339   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14340   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14341   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14342   *) { { echo "$as_me:14342: error: invalid argument: $ac_config_target" >&5
14343 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14344    { (exit 1); exit 1; }; };;
14345   esac
14346 done
14347
14348 # If the user did not use the arguments to specify the items to instantiate,
14349 # then the envvar interface is used.  Set only those that are not.
14350 # We use the long form for the default assignment because of an extremely
14351 # bizarre bug on SunOS 4.1.3.
14352 if $ac_need_defaults; then
14353   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14354   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14355   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14356 fi
14357
14358 # Create a temporary directory, and hook for its removal unless debugging.
14359 $debug ||
14360 {
14361   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14362   trap '{ (exit 1); exit 1; }' 1 2 13 15
14363 }
14364
14365 # Create a (secure) tmp directory for tmp files.
14366 : ${TMPDIR=/tmp}
14367 {
14368   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14369   test -n "$tmp" && test -d "$tmp"
14370 }  ||
14371 {
14372   tmp=$TMPDIR/cs$$-$RANDOM
14373   (umask 077 && mkdir $tmp)
14374 } ||
14375 {
14376    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14377    { (exit 1); exit 1; }
14378 }
14379
14380 EOF
14381
14382 cat >>$CONFIG_STATUS <<EOF
14383
14384 #
14385 # CONFIG_FILES section.
14386 #
14387
14388 # No need to generate the scripts if there are no CONFIG_FILES.
14389 # This happens for instance when ./config.status config.h
14390 if test -n "\$CONFIG_FILES"; then
14391   # Protect against being on the right side of a sed subst in config.status.
14392   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14393    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14394 s,@SHELL@,$SHELL,;t t
14395 s,@exec_prefix@,$exec_prefix,;t t
14396 s,@prefix@,$prefix,;t t
14397 s,@program_transform_name@,$program_transform_name,;t t
14398 s,@bindir@,$bindir,;t t
14399 s,@sbindir@,$sbindir,;t t
14400 s,@libexecdir@,$libexecdir,;t t
14401 s,@datadir@,$datadir,;t t
14402 s,@sysconfdir@,$sysconfdir,;t t
14403 s,@sharedstatedir@,$sharedstatedir,;t t
14404 s,@localstatedir@,$localstatedir,;t t
14405 s,@libdir@,$libdir,;t t
14406 s,@includedir@,$includedir,;t t
14407 s,@oldincludedir@,$oldincludedir,;t t
14408 s,@infodir@,$infodir,;t t
14409 s,@mandir@,$mandir,;t t
14410 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14411 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14412 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14413 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14414 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14415 s,@build_alias@,$build_alias,;t t
14416 s,@host_alias@,$host_alias,;t t
14417 s,@target_alias@,$target_alias,;t t
14418 s,@ECHO_C@,$ECHO_C,;t t
14419 s,@ECHO_N@,$ECHO_N,;t t
14420 s,@ECHO_T@,$ECHO_T,;t t
14421 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14422 s,@DEFS@,$DEFS,;t t
14423 s,@LIBS@,$LIBS,;t t
14424 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
14425 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
14426 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
14427 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14428 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14429 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
14430 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
14431 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
14432 s,@build@,$build,;t t
14433 s,@build_cpu@,$build_cpu,;t t
14434 s,@build_vendor@,$build_vendor,;t t
14435 s,@build_os@,$build_os,;t t
14436 s,@host@,$host,;t t
14437 s,@host_cpu@,$host_cpu,;t t
14438 s,@host_vendor@,$host_vendor,;t t
14439 s,@host_os@,$host_os,;t t
14440 s,@target@,$target,;t t
14441 s,@target_cpu@,$target_cpu,;t t
14442 s,@target_vendor@,$target_vendor,;t t
14443 s,@target_os@,$target_os,;t t
14444 s,@CC@,$CC,;t t
14445 s,@CFLAGS@,$CFLAGS,;t t
14446 s,@LDFLAGS@,$LDFLAGS,;t t
14447 s,@CPPFLAGS@,$CPPFLAGS,;t t
14448 s,@ac_ct_CC@,$ac_ct_CC,;t t
14449 s,@EXEEXT@,$EXEEXT,;t t
14450 s,@OBJEXT@,$OBJEXT,;t t
14451 s,@CPP@,$CPP,;t t
14452 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14453 s,@PROG_EXT@,$PROG_EXT,;t t
14454 s,@LDCONFIG@,$LDCONFIG,;t t
14455 s,@CXX@,$CXX,;t t
14456 s,@CXXFLAGS@,$CXXFLAGS,;t t
14457 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
14458 s,@AWK@,$AWK,;t t
14459 s,@SET_MAKE@,$SET_MAKE,;t t
14460 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14461 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14462 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14463 s,@LN_S@,$LN_S,;t t
14464 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14465 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14466 s,@LINT@,$LINT,;t t
14467 s,@MAN@,$MAN,;t t
14468 s,@LINT_OPTS@,$LINT_OPTS,;t t
14469 s,@RANLIB@,$RANLIB,;t t
14470 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14471 s,@LD@,$LD,;t t
14472 s,@ac_ct_LD@,$ac_ct_LD,;t t
14473 s,@AR@,$AR,;t t
14474 s,@ac_ct_AR@,$ac_ct_AR,;t t
14475 s,@AR_OPTS@,$AR_OPTS,;t t
14476 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14477 s,@DESTDIR@,$DESTDIR,;t t
14478 s,@BUILD_CC@,$BUILD_CC,;t t
14479 s,@BUILD_CPP@,$BUILD_CPP,;t t
14480 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14481 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14482 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14483 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
14484 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
14485 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
14486 s,@cf_list_models@,$cf_list_models,;t t
14487 s,@LIBTOOL@,$LIBTOOL,;t t
14488 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
14489 s,@LIB_CREATE@,$LIB_CREATE,;t t
14490 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
14491 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14492 s,@LIB_PREP@,$LIB_PREP,;t t
14493 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
14494 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
14495 s,@LIB_LINK@,$LIB_LINK,;t t
14496 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
14497 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
14498 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
14499 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14500 s,@TINFO_NAME@,$TINFO_NAME,;t t
14501 s,@LIB_NAME@,$LIB_NAME,;t t
14502 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14503 s,@CC_G_OPT@,$CC_G_OPT,;t t
14504 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
14505 s,@LD_MODEL@,$LD_MODEL,;t t
14506 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14507 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14508 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
14509 s,@LINK_PROGS@,$LINK_PROGS,;t t
14510 s,@LINK_TESTS@,$LINK_TESTS,;t t
14511 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14512 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14513 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
14514 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
14515 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
14516 s,@PATHSEP@,$PATHSEP,;t t
14517 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
14518 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
14519 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
14520 s,@TERMINFO@,$TERMINFO,;t t
14521 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
14522 s,@TERMPATH@,$TERMPATH,;t t
14523 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
14524 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
14525 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
14526 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
14527 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
14528 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
14529 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
14530 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
14531 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
14532 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
14533 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
14534 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
14535 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
14536 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
14537 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
14538 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
14539 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
14540 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
14541 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
14542 s,@ECHO_LINK@,$ECHO_LINK,;t t
14543 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14544 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
14545 s,@ADA_TRACE@,$ADA_TRACE,;t t
14546 s,@MATH_LIB@,$MATH_LIB,;t t
14547 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
14548 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
14549 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
14550 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
14551 s,@CXXCPP@,$CXXCPP,;t t
14552 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
14553 s,@CXX_AR@,$CXX_AR,;t t
14554 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
14555 s,@CXXLIBS@,$CXXLIBS,;t t
14556 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
14557 s,@gnat_exists@,$gnat_exists,;t t
14558 s,@M4_exists@,$M4_exists,;t t
14559 s,@cf_ada_make@,$cf_ada_make,;t t
14560 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
14561 s,@cf_ada_package@,$cf_ada_package,;t t
14562 s,@ADAFLAGS@,$ADAFLAGS,;t t
14563 s,@cf_compile_generics@,$cf_compile_generics,;t t
14564 s,@cf_generic_objects@,$cf_generic_objects,;t t
14565 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
14566 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
14567 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
14568 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
14569 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
14570 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
14571 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
14572 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
14573 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
14574 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
14575 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
14576 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
14577 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
14578 s,@TINFO_LIST@,$TINFO_LIST,;t t
14579 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
14580 s,@TEST_ARGS@,$TEST_ARGS,;t t
14581 s,@TEST_DEPS@,$TEST_DEPS,;t t
14582 s,@TEST_ARG2@,$TEST_ARG2,;t t
14583 s,@TEST_DEP2@,$TEST_DEP2,;t t
14584 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
14585 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
14586 CEOF
14587
14588 EOF
14589
14590   cat >>$CONFIG_STATUS <<\EOF
14591   # Split the substitutions into bite-sized pieces for seds with
14592   # small command number limits, like on Digital OSF/1 and HP-UX.
14593   ac_max_sed_lines=48
14594   ac_sed_frag=1 # Number of current file.
14595   ac_beg=1 # First line for current file.
14596   ac_end=$ac_max_sed_lines # Line after last line for current file.
14597   ac_more_lines=:
14598   ac_sed_cmds=
14599   while $ac_more_lines; do
14600     if test $ac_beg -gt 1; then
14601       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14602     else
14603       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14604     fi
14605     if test ! -s $tmp/subs.frag; then
14606       ac_more_lines=false
14607     else
14608       # The purpose of the label and of the branching condition is to
14609       # speed up the sed processing (if there are no `@' at all, there
14610       # is no need to browse any of the substitutions).
14611       # These are the two extra sed commands mentioned above.
14612       (echo ':t
14613   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14614       if test -z "$ac_sed_cmds"; then
14615         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14616       else
14617         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14618       fi
14619       ac_sed_frag=`expr $ac_sed_frag + 1`
14620       ac_beg=$ac_end
14621       ac_end=`expr $ac_end + $ac_max_sed_lines`
14622     fi
14623   done
14624   if test -z "$ac_sed_cmds"; then
14625     ac_sed_cmds=cat
14626   fi
14627 fi # test -n "$CONFIG_FILES"
14628
14629 EOF
14630 cat >>$CONFIG_STATUS <<\EOF
14631 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14632   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14633   case $ac_file in
14634   - | *:- | *:-:* ) # input from stdin
14635         cat >$tmp/stdin
14636         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14637         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14638   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14639         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14640   * )   ac_file_in=$ac_file.in ;;
14641   esac
14642
14643   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14644   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14645          X"$ac_file" : 'X\(//\)[^/]' \| \
14646          X"$ac_file" : 'X\(//\)$' \| \
14647          X"$ac_file" : 'X\(/\)' \| \
14648          .     : '\(.\)' 2>/dev/null ||
14649 echo X"$ac_file" |
14650     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14651           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14652           /^X\(\/\/\)$/{ s//\1/; q; }
14653           /^X\(\/\).*/{ s//\1/; q; }
14654           s/.*/./; q'`
14655   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14656     { case "$ac_dir" in
14657   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14658   *)                      as_incr_dir=.;;
14659 esac
14660 as_dummy="$ac_dir"
14661 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14662   case $as_mkdir_dir in
14663     # Skip DOS drivespec
14664     ?:) as_incr_dir=$as_mkdir_dir ;;
14665     *)
14666       as_incr_dir=$as_incr_dir/$as_mkdir_dir
14667       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14668     ;;
14669   esac
14670 done; }
14671
14672     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14673     # A "../" for each directory in $ac_dir_suffix.
14674     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14675   else
14676     ac_dir_suffix= ac_dots=
14677   fi
14678
14679   case $srcdir in
14680   .)  ac_srcdir=.
14681       if test -z "$ac_dots"; then
14682          ac_top_srcdir=.
14683       else
14684          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14685       fi ;;
14686   [\\/]* | ?:[\\/]* )
14687       ac_srcdir=$srcdir$ac_dir_suffix;
14688       ac_top_srcdir=$srcdir ;;
14689   *) # Relative path.
14690     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14691     ac_top_srcdir=$ac_dots$srcdir ;;
14692   esac
14693
14694   case $INSTALL in
14695   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14696   *) ac_INSTALL=$ac_dots$INSTALL ;;
14697   esac
14698
14699   if test x"$ac_file" != x-; then
14700     { echo "$as_me:14700: creating $ac_file" >&5
14701 echo "$as_me: creating $ac_file" >&6;}
14702     rm -f "$ac_file"
14703   fi
14704   # Let's still pretend it is `configure' which instantiates (i.e., don't
14705   # use $as_me), people would be surprised to read:
14706   #    /* config.h.  Generated automatically by config.status.  */
14707   configure_input="Generated automatically from `echo $ac_file_in |
14708                                                  sed 's,.*/,,'` by configure."
14709
14710   # First look for the input files in the build tree, otherwise in the
14711   # src tree.
14712   ac_file_inputs=`IFS=:
14713     for f in $ac_file_in; do
14714       case $f in
14715       -) echo $tmp/stdin ;;
14716       [\\/$]*)
14717          # Absolute (can't be DOS-style, as IFS=:)
14718          test -f "$f" || { { echo "$as_me:14718: error: cannot find input file: $f" >&5
14719 echo "$as_me: error: cannot find input file: $f" >&2;}
14720    { (exit 1); exit 1; }; }
14721          echo $f;;
14722       *) # Relative
14723          if test -f "$f"; then
14724            # Build tree
14725            echo $f
14726          elif test -f "$srcdir/$f"; then
14727            # Source tree
14728            echo $srcdir/$f
14729          else
14730            # /dev/null tree
14731            { { echo "$as_me:14731: error: cannot find input file: $f" >&5
14732 echo "$as_me: error: cannot find input file: $f" >&2;}
14733    { (exit 1); exit 1; }; }
14734          fi;;
14735       esac
14736     done` || { (exit 1); exit 1; }
14737 EOF
14738 cat >>$CONFIG_STATUS <<EOF
14739   sed "$ac_vpsub
14740 $extrasub
14741 EOF
14742 cat >>$CONFIG_STATUS <<\EOF
14743 :t
14744 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14745 s,@configure_input@,$configure_input,;t t
14746 s,@srcdir@,$ac_srcdir,;t t
14747 s,@top_srcdir@,$ac_top_srcdir,;t t
14748 s,@INSTALL@,$ac_INSTALL,;t t
14749 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14750   rm -f $tmp/stdin
14751   if test x"$ac_file" != x-; then
14752     mv $tmp/out $ac_file
14753   else
14754     cat $tmp/out
14755     rm -f $tmp/out
14756   fi
14757
14758 done
14759 EOF
14760 cat >>$CONFIG_STATUS <<\EOF
14761
14762 #
14763 # CONFIG_HEADER section.
14764 #
14765
14766 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14767 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14768 #
14769 # ac_d sets the value in "#define NAME VALUE" lines.
14770 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14771 ac_dB='[        ].*$,\1#\2'
14772 ac_dC=' '
14773 ac_dD=',;t'
14774 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14775 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14776 ac_iB='\([      ]\),\1#\2define\3'
14777 ac_iC=' '
14778 ac_iD='\4,;t'
14779 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14780 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14781 ac_uB='$,\1#\2define\3'
14782 ac_uC=' '
14783 ac_uD=',;t'
14784
14785 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14786   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14787   case $ac_file in
14788   - | *:- | *:-:* ) # input from stdin
14789         cat >$tmp/stdin
14790         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14791         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14792   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14793         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14794   * )   ac_file_in=$ac_file.in ;;
14795   esac
14796
14797   test x"$ac_file" != x- && { echo "$as_me:14797: creating $ac_file" >&5
14798 echo "$as_me: creating $ac_file" >&6;}
14799
14800   # First look for the input files in the build tree, otherwise in the
14801   # src tree.
14802   ac_file_inputs=`IFS=:
14803     for f in $ac_file_in; do
14804       case $f in
14805       -) echo $tmp/stdin ;;
14806       [\\/$]*)
14807          # Absolute (can't be DOS-style, as IFS=:)
14808          test -f "$f" || { { echo "$as_me:14808: error: cannot find input file: $f" >&5
14809 echo "$as_me: error: cannot find input file: $f" >&2;}
14810    { (exit 1); exit 1; }; }
14811          echo $f;;
14812       *) # Relative
14813          if test -f "$f"; then
14814            # Build tree
14815            echo $f
14816          elif test -f "$srcdir/$f"; then
14817            # Source tree
14818            echo $srcdir/$f
14819          else
14820            # /dev/null tree
14821            { { echo "$as_me:14821: error: cannot find input file: $f" >&5
14822 echo "$as_me: error: cannot find input file: $f" >&2;}
14823    { (exit 1); exit 1; }; }
14824          fi;;
14825       esac
14826     done` || { (exit 1); exit 1; }
14827   # Remove the trailing spaces.
14828   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
14829
14830 EOF
14831
14832 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
14833 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
14834 # be either 'cat' or 'sort'.
14835 cat confdefs.h | uniq >conftest.vals
14836
14837 # Break up conftest.vals because some shells have a limit on
14838 # the size of here documents, and old seds have small limits too.
14839
14840 rm -f conftest.tail
14841 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
14842 while grep . conftest.vals >/dev/null
14843 do
14844   # Write chunks of a limited-size here document to conftest.frag.
14845   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14846   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14847   echo 'CEOF' >> $CONFIG_STATUS
14848   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14849   rm -f conftest.vals
14850   mv conftest.tail conftest.vals
14851 done
14852 rm -f conftest.vals
14853
14854 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
14855 # marker @DEFS@.
14856 echo '  cat >> conftest.edit <<CEOF
14857 /@DEFS@/r conftest.frag
14858 /@DEFS@/d
14859 CEOF
14860 sed -f conftest.edit $tmp/in > $tmp/out
14861 rm -f $tmp/in
14862 mv $tmp/out $tmp/in
14863 rm -f conftest.edit conftest.frag
14864 ' >> $CONFIG_STATUS
14865
14866 cat >>$CONFIG_STATUS <<\EOF
14867   # Let's still pretend it is `configure' which instantiates (i.e., don't
14868   # use $as_me), people would be surprised to read:
14869   #    /* config.h.  Generated automatically by config.status.  */
14870   if test x"$ac_file" = x-; then
14871     echo "/* Generated automatically by configure.  */" >$tmp/config.h
14872   else
14873     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
14874   fi
14875   cat $tmp/in >>$tmp/config.h
14876   rm -f $tmp/in
14877   if test x"$ac_file" != x-; then
14878     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14879       { echo "$as_me:14879: $ac_file is unchanged" >&5
14880 echo "$as_me: $ac_file is unchanged" >&6;}
14881     else
14882       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14883          X"$ac_file" : 'X\(//\)[^/]' \| \
14884          X"$ac_file" : 'X\(//\)$' \| \
14885          X"$ac_file" : 'X\(/\)' \| \
14886          .     : '\(.\)' 2>/dev/null ||
14887 echo X"$ac_file" |
14888     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14889           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14890           /^X\(\/\/\)$/{ s//\1/; q; }
14891           /^X\(\/\).*/{ s//\1/; q; }
14892           s/.*/./; q'`
14893       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14894         { case "$ac_dir" in
14895   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14896   *)                      as_incr_dir=.;;
14897 esac
14898 as_dummy="$ac_dir"
14899 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14900   case $as_mkdir_dir in
14901     # Skip DOS drivespec
14902     ?:) as_incr_dir=$as_mkdir_dir ;;
14903     *)
14904       as_incr_dir=$as_incr_dir/$as_mkdir_dir
14905       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14906     ;;
14907   esac
14908 done; }
14909
14910       fi
14911       rm -f $ac_file
14912       mv $tmp/config.h $ac_file
14913     fi
14914   else
14915     cat $tmp/config.h
14916     rm -f $tmp/config.h
14917   fi
14918 done
14919 EOF
14920 cat >>$CONFIG_STATUS <<\EOF
14921
14922 #
14923 # CONFIG_COMMANDS section.
14924 #
14925 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14926   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14927   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14928
14929   case $ac_dest in
14930     default )
14931
14932         case $cf_cv_system_name in
14933         OS/2*)  LIB_PREFIX=''     ;;
14934         os2*)   LIB_PREFIX=''     ;;
14935         *)      LIB_PREFIX='lib'  ;;
14936         esac
14937 cf_prefix=$LIB_PREFIX
14938
14939 for cf_dir in $SRC_SUBDIRS
14940 do
14941         if test -f $srcdir/$cf_dir/modules; then
14942
14943                 IMPORT_LIB=
14944                 SHARED_LIB=
14945                 LIBS_TO_MAKE=
14946                 for cf_item in $CF_LIST_MODELS
14947                 do
14948
14949         case $cf_item in
14950         libtool) cf_suffix='.la'  ;;
14951         normal)  cf_suffix='.a'   ;;
14952         debug)   cf_suffix='_g.a' ;;
14953         profile) cf_suffix='_p.a' ;;
14954         shared)
14955                 case $cf_cv_system_name in
14956                 cygwin*) cf_suffix='.dll' ;;
14957                 darwin*) cf_suffix='.dylib' ;;
14958                 hpux*)
14959                         case $target in
14960                         ia64*)  cf_suffix='.so' ;;
14961                         *)      cf_suffix='.sl' ;;
14962                         esac
14963                         ;;
14964                 *)      cf_suffix='.so'  ;;
14965                 esac
14966         esac
14967         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
14968
14969                         if test $cf_item = shared ; then
14970                         if test "$cf_cv_do_symlinks" = yes ; then
14971                                 case "$cf_cv_shlib_version" in #(vi
14972                                 rel) #(vi
14973                                         case "$cf_cv_system_name" in #(vi
14974                                         darwin*)
14975                                         case .${LIB_SUFFIX} in
14976                                         .w*)
14977                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
14978                                                 cf_suffix=w'.$(REL_VERSION)'"$cf_suffix"
14979                                                 ;;
14980                                         *)
14981                                                 cf_suffix='.$(REL_VERSION)'"$cf_suffix"
14982                                                 ;;
14983                                         esac
14984                                         ;; #(vi
14985                                         *) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
14986                                         esac
14987                                         ;;
14988                                 abi)
14989                                         case "$cf_cv_system_name" in #(vi
14990                                         darwin*)
14991                                         case .${LIB_SUFFIX} in
14992                                         .w*)
14993                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
14994                                                 cf_suffix=w'.$(ABI_VERSION)'"$cf_suffix"
14995                                                 ;;
14996                                         *)
14997                                                 cf_suffix='.$(ABI_VERSION)'"$cf_suffix"
14998                                                 ;;
14999                                         esac
15000                                         ;; #(vi
15001                                         *) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
15002                                         esac
15003                                         ;;
15004                                 esac
15005                         fi
15006                         # cygwin needs import library, and has unique naming convention
15007                         # use autodetected ${cf_prefix} for import lib and static lib, but
15008                         # use 'cyg' prefix for shared lib.
15009                         if test $cf_cv_shlib_version = cygdll ; then
15010                                 SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll"
15011                                 IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
15012                                 LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
15013                                 continue
15014                         fi
15015                         fi
15016                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
15017                 done
15018
15019                 if test $cf_dir = ncurses ; then
15020                         cf_subsets="$LIB_SUBSETS"
15021                         cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
15022                         if test "$cf_termlib" != "$cf_subsets" ; then
15023                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
15024                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
15025                         fi
15026                 else
15027                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
15028                 fi
15029
15030                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
15031                     -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
15032                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
15033                         $cf_dir/Makefile >$cf_dir/Makefile.out
15034                 mv $cf_dir/Makefile.out $cf_dir/Makefile
15035
15036                 $AWK -f $srcdir/mk-0th.awk \
15037                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
15038                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
15039
15040                 for cf_subset in $cf_subsets
15041                 do
15042                         cf_subdirs=
15043                         for cf_item in $CF_LIST_MODELS
15044                         do
15045                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
15046
15047 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15048
15049         case $cf_item in
15050         libtool) cf_suffix='.la'  ;;
15051         normal)  cf_suffix='.a'   ;;
15052         debug)   cf_suffix='_g.a' ;;
15053         profile) cf_suffix='_p.a' ;;
15054         shared)
15055                 case $cf_cv_system_name in
15056                 cygwin*) cf_suffix='.dll' ;;
15057                 darwin*) cf_suffix='.dylib' ;;
15058                 hpux*)
15059                         case $target in
15060                         ia64*)  cf_suffix='.so' ;;
15061                         *)      cf_suffix='.sl' ;;
15062                         esac
15063                         ;;
15064                 *)      cf_suffix='.so'  ;;
15065                 esac
15066         esac
15067         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
15068
15069         case $cf_item in
15070         libtool) cf_subdir='obj_lo'  ;;
15071         normal)  cf_subdir='objects' ;;
15072         debug)   cf_subdir='obj_g' ;;
15073         profile) cf_subdir='obj_p' ;;
15074         shared)
15075                 case $cf_cv_system_name in #(vi
15076                 cygwin) #(vi
15077                         cf_subdir='objects' ;;
15078                 *)
15079                         cf_subdir='obj_s' ;;
15080                 esac
15081         esac
15082
15083                         # Test for case where we build libtinfo with a different name.
15084                         cf_libname=$cf_dir
15085                         if test $cf_dir = ncurses ; then
15086                                 case $cf_subset in
15087                                 *base*)
15088                                         ;;
15089                                 termlib*)
15090                                         cf_libname=$TINFO_LIB_SUFFIX
15091                                         if test -n "${DFT_ARG_SUFFIX}" ; then
15092                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
15093                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
15094                                         fi
15095                                 ;;
15096                                 esac
15097                         fi
15098
15099                         # These dependencies really are for development, not
15100                         # builds, but they are useful in porting, too.
15101                         cf_depend="../include/ncurses_cfg.h"
15102                         if test "$srcdir" = "."; then
15103                                 cf_reldir="."
15104                         else
15105                                 cf_reldir="\$(srcdir)"
15106                         fi
15107
15108                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
15109                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
15110                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
15111                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
15112                         fi
15113
15114                         cf_dir_suffix=
15115                         old_cf_suffix="$cf_suffix"
15116                         if test "$cf_cv_shlib_version_infix" = yes ; then
15117                         if test -n "$LIB_SUFFIX" ; then
15118                                 case $LIB_SUFFIX in
15119                                 w*)
15120                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
15121                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
15122                                         cf_dir_suffix=w
15123                                         ;;
15124                                 esac
15125                         fi
15126                         fi
15127
15128                         $AWK -f $srcdir/mk-1st.awk \
15129                                 name=${cf_libname}${cf_dir_suffix} \
15130                                 traces=$LIB_TRACING \
15131                                 MODEL=$cf_ITEM \
15132                                 model=$cf_subdir \
15133                                 prefix=$cf_prefix \
15134                                 suffix=$cf_suffix \
15135                                 subset=$cf_subset \
15136                                 ShlibVer=$cf_cv_shlib_version \
15137                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
15138                                 DoLinks=$cf_cv_do_symlinks \
15139                                 rmSoLocs=$cf_cv_rm_so_locs \
15140                                 ldconfig="$LDCONFIG" \
15141                                 overwrite=$WITH_OVERWRITE \
15142                                 depend="$cf_depend" \
15143                                 host="$host" \
15144                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
15145
15146                         cf_suffix="$old_cf_suffix"
15147
15148                         for cf_subdir2 in $cf_subdirs lib
15149                         do
15150                                 test $cf_subdir = $cf_subdir2 && break
15151                         done
15152                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
15153                         $AWK -f $srcdir/mk-2nd.awk \
15154                                 name=$cf_dir \
15155                                 traces=$LIB_TRACING \
15156                                 MODEL=$cf_ITEM \
15157                                 model=$cf_subdir \
15158                                 subset=$cf_subset \
15159                                 srcdir=$srcdir \
15160                                 echo=$WITH_ECHO \
15161                                 crenames=$cf_cv_prog_CC_c_o \
15162                                 cxxrenames=$cf_cv_prog_CXX_c_o \
15163                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
15164                         cf_subdirs="$cf_subdirs $cf_subdir"
15165                         done
15166                 done
15167         fi
15168
15169         echo '  cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
15170 done
15171
15172 for cf_dir in $SRC_SUBDIRS
15173 do
15174         if test -f $cf_dir/Makefile ; then
15175                 case "$cf_dir" in
15176                 Ada95) #(vi
15177                         echo 'libs \' >> Makefile
15178                         echo 'install.libs \' >> Makefile
15179                         echo 'uninstall.libs ::' >> Makefile
15180                         echo '  cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile
15181                         ;;
15182                 esac
15183         fi
15184
15185         if test -f $srcdir/$cf_dir/modules; then
15186                 echo >> Makefile
15187                 if test -f $srcdir/$cf_dir/headers; then
15188 cat >> Makefile <<CF_EOF
15189 install.includes \\
15190 uninstall.includes \\
15191 CF_EOF
15192                 fi
15193 if test "$cf_dir" != "c++" ; then
15194 echo 'lint \' >> Makefile
15195 fi
15196 cat >> Makefile <<CF_EOF
15197 libs \\
15198 lintlib \\
15199 install.libs \\
15200 uninstall.libs \\
15201 install.$cf_dir \\
15202 uninstall.$cf_dir ::
15203         cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
15204 CF_EOF
15205         elif test -f $srcdir/$cf_dir/headers; then
15206 cat >> Makefile <<CF_EOF
15207
15208 libs \\
15209 install.libs \\
15210 uninstall.libs \\
15211 install.includes \\
15212 uninstall.includes ::
15213         cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
15214 CF_EOF
15215 fi
15216 done
15217
15218 cat >> Makefile <<CF_EOF
15219
15220 install.data \\
15221 uninstall.data ::
15222 $MAKE_TERMINFO  cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
15223
15224 install.man \\
15225 uninstall.man ::
15226         cd man && \$(MAKE) \$(CF_MFLAGS) \$@
15227
15228 distclean ::
15229         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
15230         rm -f headers.sh headers.sed
15231         rm -rf \$(DIRS_TO_MAKE)
15232 CF_EOF
15233
15234 # Special case: tack's manpage lives in its own directory.
15235 if test -d tack ; then
15236 if test -f $srcdir/$tack.h; then
15237 cat >> Makefile <<CF_EOF
15238
15239 install.man \\
15240 uninstall.man ::
15241         cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
15242 CF_EOF
15243 fi
15244 fi
15245
15246 rm -f headers.sed headers.sh
15247
15248 echo creating headers.sh
15249 cat >headers.sh <<CF_EOF
15250 #! /bin/sh
15251 # This shell script is generated by the 'configure' script.  It is invoked in a
15252 # subdirectory of the build tree.  It generates a sed-script in the parent
15253 # directory that is used to adjust includes for header files that reside in a
15254 # subdirectory of /usr/include, etc.
15255 PRG=""
15256 while test \$# != 3
15257 do
15258 PRG="\$PRG \$1"; shift
15259 done
15260 DST=\$1
15261 REF=\$2
15262 SRC=\$3
15263 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
15264 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
15265 echo installing \$SRC in \$DST
15266 CF_EOF
15267 if test $WITH_CURSES_H = yes; then
15268         cat >>headers.sh <<CF_EOF
15269 case \$DST in
15270 /*/include/*)
15271         END=\`basename \$DST\`
15272         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
15273         do
15274                 NAME=\`basename \$i\`
15275                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
15276         done
15277         ;;
15278 *)
15279         echo "" >> \$TMPSED
15280         ;;
15281 esac
15282 CF_EOF
15283 else
15284         cat >>headers.sh <<CF_EOF
15285 case \$DST in
15286 /*/include/*)
15287         END=\`basename \$DST\`
15288         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
15289         do
15290                 NAME=\`basename \$i\`
15291                 if test "\$NAME" = "curses.h"
15292                 then
15293                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
15294                         NAME=ncurses.h
15295                 fi
15296                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
15297         done
15298         ;;
15299 *)
15300         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
15301         ;;
15302 esac
15303 CF_EOF
15304 fi
15305 cat >>headers.sh <<CF_EOF
15306 rm -f \$TMPSRC
15307 sed -f \$TMPSED \$SRC > \$TMPSRC
15308 NAME=\`basename \$SRC\`
15309 CF_EOF
15310 if test $WITH_CURSES_H != yes; then
15311         cat >>headers.sh <<CF_EOF
15312 test "\$NAME" = "curses.h" && NAME=ncurses.h
15313 CF_EOF
15314 fi
15315 cat >>headers.sh <<CF_EOF
15316 # Just in case someone gzip'd manpages, remove the conflicting copy.
15317 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
15318
15319 eval \$PRG \$TMPSRC \$DST/\$NAME
15320 rm -f \$TMPSRC \$TMPSED
15321 CF_EOF
15322
15323 chmod 0755 headers.sh
15324
15325 for cf_dir in $SRC_SUBDIRS
15326 do
15327         if test -f $srcdir/$cf_dir/headers; then
15328         cat >>$cf_dir/Makefile <<CF_EOF
15329 \$(DESTDIR)\$(includedir) :
15330         sh \$(srcdir)/../mkinstalldirs \$@
15331
15332 install \\
15333 install.libs \\
15334 install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
15335 CF_EOF
15336                 j=""
15337                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
15338                 do
15339                         test -n "$j" && echo "          $j \\" >>$cf_dir/Makefile
15340                         j=$i
15341                 done
15342                 echo "          $j" >>$cf_dir/Makefile
15343                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
15344                 do
15345                         echo "  @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
15346                         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
15347                 done
15348
15349         cat >>$cf_dir/Makefile <<CF_EOF
15350
15351 uninstall \\
15352 uninstall.libs \\
15353 uninstall.includes ::
15354 CF_EOF
15355                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
15356                 do
15357                         i=`basename $i`
15358                         echo "  -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
15359                         test $i = curses.h && echo "    -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
15360                 done
15361         fi
15362
15363         if test -f $srcdir/$cf_dir/modules; then
15364                 if test "$cf_dir" != "c++" ; then
15365                         cat >>$cf_dir/Makefile <<"CF_EOF"
15366 depend : $(AUTO_SRC)
15367         makedepend -- $(CPPFLAGS) -- $(C_SRC)
15368
15369 # DO NOT DELETE THIS LINE -- make depend depends on it.
15370 CF_EOF
15371                 fi
15372         fi
15373 done
15374
15375  ;;
15376   esac
15377 done
15378 EOF
15379
15380 cat >>$CONFIG_STATUS <<\EOF
15381
15382 { (exit 0); exit 0; }
15383 EOF
15384 chmod +x $CONFIG_STATUS
15385 ac_clean_files=$ac_clean_files_save
15386
15387 # configure is writing to config.log, and then calls config.status.
15388 # config.status does its own redirection, appending to config.log.
15389 # Unfortunately, on DOS this fails, as config.log is still kept open
15390 # by configure, so config.status won't be able to write to it; its
15391 # output is simply discarded.  So we exec the FD to /dev/null,
15392 # effectively closing config.log, so it can be properly (re)opened and
15393 # appended to by config.status.  When coming back to configure, we
15394 # need to make the FD available again.
15395 if test "$no_create" != yes; then
15396   ac_cs_success=:
15397   exec 5>/dev/null
15398   $SHELL $CONFIG_STATUS || ac_cs_success=false
15399   exec 5>>config.log
15400   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15401   # would make configure fail if this is the last instruction.
15402   $ac_cs_success || { (exit 1); exit 1; }
15403 fi
15404 ${MAKE-make} preinstall