]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.3
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.274 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20011227.
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-system-type=XXX  test: override derived host system-type
659   --enable-add-ons=DIR... used to check if we are a glibc add-on.
660   --with-build-cc=XXX     if cross-compiling, the host C compiler (\$BUILD_CC)
661   --with-build-cflags=XXX if cross-compiling, the host C compiler-flags
662   --with-build-cppflags=XXX if cross-compiling, the host C preprocessor-flags
663   --with-build-ldflags=XXX if cross-compiling, the host linker-flags
664   --with-build-libs=XXX   if cross-compiling, the host libraries
665   --without-cxx           do not adjust ncurses bool to match C++
666   --without-cxx-binding   do not build C++ binding and demo
667   --without-ada           suppress check for Ada95, don't build demo
668   --without-progs         suppress build with programs (e.g., tic)
669   --without-curses-h      install curses.h as ncurses.h only
670   --with-install-prefix   prefixes actual install-location (\$DESTDIR)
671 Options to Specify the Libraries Built/Used:
672   --with-libtool          generate libraries with libtool
673   --with-shared           generate shared-libraries
674   --with-normal           generate normal-libraries (default)
675   --with-debug            generate debug-libraries (default)
676   --with-profile          generate profile-libraries
677   --with-termlib          generate separate terminfo library
678   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
679   --with-dmalloc          test: use Gray Watson's dmalloc library
680   --with-gpm              use Alessandro Rubini's GPM library
681   --enable-rpath          use rpath option when generating shared libraries
682   --with-shlib-version=X  Specify rel or abi version for shared libs
683 Fine-Tuning Your Configuration:
684   --disable-overwrite     leave out the link to -lcurses
685   --disable-database      do not use terminfo, only fallbacks/termcap
686   --with-database=XXX     specify terminfo source to install
687   --with-fallbacks=XXX    specify list of fallback terminal descriptions
688   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
689   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
690   --disable-big-core      assume machine has little memory
691   --enable-termcap        compile in termcap fallback support
692   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
693   --enable-getcap         fast termcap load, no xrefs to terminfo
694   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
695   --enable-symlinks       make tic use symbolic links not hard links
696   --enable-broken_linker  compile with broken-linker support code
697   --with-bool=TYPE        override fallback type of bool variable
698   --with-ospeed=TYPE      override type of ospeed variable
699   --enable-bsdpad         recognize BSD-style prefix padding
700   --with-rcs-ids          compile-in RCS identifiers
701 Options to Specify How Manpages are Installed:
702   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
703                           optionally formatted, e.g., gzip,formatted
704   --with-manpage-renames  specify manpage-renaming
705   --with-manpage-symlinks specify manpage-symlinks
706   --with-manpage-tbl      specify manpage processing with tbl
707 Extensions:
708   --disable-ext-funcs     disable function-extensions
709   --enable-const          compile with extra/non-standard const
710   --enable-no-padding     compile with \$NCURSES_NO_PADDING code
711   --enable-sigwinch       compile with SIGWINCH handler
712   --enable-tcap-names     compile with user-definable terminal capabilities
713 Development Code:
714   --with-develop          enable all development options
715   --enable-hard-tabs      compile with hard-tabs code
716   --disable-root-environ  limit environment when running as root
717   --enable-xmc-glitch     compile with limited support for xmc
718 Experimental Code:
719   --disable-assumed-color do not assume anything about default-colors
720   --disable-hashmap       compile without hashmap scrolling-optimization
721   --enable-colorfgbg      compile with \$COLORFGBG code
722   --enable-safe-sprintf   compile with experimental safe-sprintf code
723   --disable-scroll-hints  compile without scroll-hints code
724   --enable-widec          compile with experimental wide-char/UTF-8 code
725   --with-caps=alt         compile with experimental alternate Caps file
726 Testing/development Options:
727   --enable-echo           build: display "compiling" commands (default)
728   --enable-warnings       build: turn on GCC compiler warnings
729   --enable-assertions     test: turn on generation of assertion code
730   --disable-leaks         test: suppress permanent memory-leaks
731   --enable-expanded       test: generate functions for certain macros
732   --disable-macros        test: use functions rather than macros
733 Ada95 Binding Options:
734   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
735   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
736   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
737
738 Some influential environment variables:
739   CC          C compiler command
740   CFLAGS      C compiler flags
741   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
742               nonstandard directory <lib dir>
743   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
744               headers in a nonstandard directory <include dir>
745   CPP         C preprocessor
746   CXX         C++ compiler command
747   CXXFLAGS    C++ compiler flags
748   CXXCPP      C++ preprocessor
749
750 Use these variables to override the choices made by `configure' or to help
751 it to find libraries and programs with nonstandard names/locations.
752
753 EOF
754 fi
755
756 if test "$ac_init_help" = "recursive"; then
757   # If there are subdirs, report their specific --help.
758   ac_popdir=`pwd`
759   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
760     cd $ac_subdir
761     # A "../" for each directory in /$ac_subdir.
762     ac_dots=`echo $ac_subdir |
763              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
764
765     case $srcdir in
766     .) # No --srcdir option.  We are building in place.
767       ac_sub_srcdir=$srcdir ;;
768     [\\/]* | ?:[\\/]* ) # Absolute path.
769       ac_sub_srcdir=$srcdir/$ac_subdir ;;
770     *) # Relative path.
771       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
772     esac
773
774     # Check for guested configure; otherwise get Cygnus style configure.
775     if test -f $ac_sub_srcdir/configure.gnu; then
776       echo
777       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
778     elif test -f $ac_sub_srcdir/configure; then
779       echo
780       $SHELL $ac_sub_srcdir/configure  --help=recursive
781     elif test -f $ac_sub_srcdir/configure.ac ||
782            test -f $ac_sub_srcdir/configure.in; then
783       echo
784       $ac_configure --help
785     else
786       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
787     fi
788     cd $ac_popdir
789   done
790 fi
791
792 test -n "$ac_init_help" && exit 0
793 if $ac_init_version; then
794   cat <<\EOF
795
796 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
797 Free Software Foundation, Inc.
798 This configure script is free software; the Free Software Foundation
799 gives unlimited permission to copy, distribute and modify it.
800 EOF
801   exit 0
802 fi
803 exec 5>config.log
804 cat >&5 <<EOF
805 This file contains any messages produced by compilers while
806 running configure, to aid debugging if configure makes a mistake.
807
808 It was created by $as_me, which was
809 generated by GNU Autoconf 2.52.20011227.  Invocation command line was
810
811   $ $0 $@
812
813 EOF
814 {
815 cat <<_ASUNAME
816 ## ---------- ##
817 ## Platform.  ##
818 ## ---------- ##
819
820 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
821 uname -m = `(uname -m) 2>/dev/null || echo unknown`
822 uname -r = `(uname -r) 2>/dev/null || echo unknown`
823 uname -s = `(uname -s) 2>/dev/null || echo unknown`
824 uname -v = `(uname -v) 2>/dev/null || echo unknown`
825
826 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
827 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
828
829 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
830 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
831 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
832 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
833 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
834 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
835 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
836
837 PATH = $PATH
838
839 _ASUNAME
840 } >&5
841
842 cat >&5 <<EOF
843 ## ------------ ##
844 ## Core tests.  ##
845 ## ------------ ##
846
847 EOF
848
849 # Keep a trace of the command line.
850 # Strip out --no-create and --no-recursion so they do not pile up.
851 # Also quote any args containing shell meta-characters.
852 ac_configure_args=
853 ac_sep=
854 for ac_arg
855 do
856   case $ac_arg in
857   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
858   | --no-cr | --no-c) ;;
859   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
860   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
861   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
862     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
863     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
864     ac_sep=" " ;;
865   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
866      ac_sep=" " ;;
867   esac
868   # Get rid of the leading space.
869 done
870
871 # When interrupted or exit'd, cleanup temporary files, and complete
872 # config.log.  We remove comments because anyway the quotes in there
873 # would cause problems or look ugly.
874 trap 'exit_status=$?
875   # Save into config.log some information that might help in debugging.
876   echo >&5
877   echo "## ----------------- ##" >&5
878   echo "## Cache variables.  ##" >&5
879   echo "## ----------------- ##" >&5
880   echo >&5
881   # The following way of writing the cache mishandles newlines in values,
882 {
883   (set) 2>&1 |
884     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
885     *ac_space=\ *)
886       sed -n \
887         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
888           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
889       ;;
890     *)
891       sed -n \
892         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
893       ;;
894     esac;
895 } >&5
896   sed "/^$/d" confdefs.h >conftest.log
897   if test -s conftest.log; then
898     echo >&5
899     echo "## ------------ ##" >&5
900     echo "## confdefs.h.  ##" >&5
901     echo "## ------------ ##" >&5
902     echo >&5
903     cat conftest.log >&5
904   fi
905   (echo; echo) >&5
906   test "$ac_signal" != 0 &&
907     echo "$as_me: caught signal $ac_signal" >&5
908   echo "$as_me: exit $exit_status" >&5
909   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
910     exit $exit_status
911      ' 0
912 for ac_signal in 1 2 13 15; do
913   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
914 done
915 ac_signal=0
916
917 # confdefs.h avoids OS command line length limits that DEFS can exceed.
918 rm -rf conftest* confdefs.h
919 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
920 echo >confdefs.h
921
922 # Let the site file select an alternate cache file if it wants to.
923 # Prefer explicitly selected file to automatically selected ones.
924 if test -z "$CONFIG_SITE"; then
925   if test "x$prefix" != xNONE; then
926     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
927   else
928     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
929   fi
930 fi
931 for ac_site_file in $CONFIG_SITE; do
932   if test -r "$ac_site_file"; then
933     { echo "$as_me:933: loading site script $ac_site_file" >&5
934 echo "$as_me: loading site script $ac_site_file" >&6;}
935     cat "$ac_site_file" >&5
936     . "$ac_site_file"
937   fi
938 done
939
940 if test -r "$cache_file"; then
941   # Some versions of bash will fail to source /dev/null (special
942   # files actually), so we avoid doing that.
943   if test -f "$cache_file"; then
944     { echo "$as_me:944: loading cache $cache_file" >&5
945 echo "$as_me: loading cache $cache_file" >&6;}
946     case $cache_file in
947       [\\/]* | ?:[\\/]* ) . $cache_file;;
948       *)                      . ./$cache_file;;
949     esac
950   fi
951 else
952   { echo "$as_me:952: creating cache $cache_file" >&5
953 echo "$as_me: creating cache $cache_file" >&6;}
954   >$cache_file
955 fi
956
957 # Check that the precious variables saved in the cache have kept the same
958 # value.
959 ac_cache_corrupted=false
960 for ac_var in `(set) 2>&1 |
961                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
962   eval ac_old_set=\$ac_cv_env_${ac_var}_set
963   eval ac_new_set=\$ac_env_${ac_var}_set
964   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
965   eval ac_new_val="\$ac_env_${ac_var}_value"
966   case $ac_old_set,$ac_new_set in
967     set,)
968       { echo "$as_me:968: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
969 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
970       ac_cache_corrupted=: ;;
971     ,set)
972       { echo "$as_me:972: error: \`$ac_var' was not set in the previous run" >&5
973 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
974       ac_cache_corrupted=: ;;
975     ,);;
976     *)
977       if test "x$ac_old_val" != "x$ac_new_val"; then
978         { echo "$as_me:978: error: \`$ac_var' has changed since the previous run:" >&5
979 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
980         { echo "$as_me:980:   former value:  $ac_old_val" >&5
981 echo "$as_me:   former value:  $ac_old_val" >&2;}
982         { echo "$as_me:982:   current value: $ac_new_val" >&5
983 echo "$as_me:   current value: $ac_new_val" >&2;}
984         ac_cache_corrupted=:
985       fi;;
986   esac
987   # Pass precious variables to config.status.  It doesn't matter if
988   # we pass some twice (in addition to the command line arguments).
989   if test "$ac_new_set" = set; then
990     case $ac_new_val in
991     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
992       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
993       ac_configure_args="$ac_configure_args '$ac_arg'"
994       ;;
995     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
996        ;;
997     esac
998   fi
999 done
1000 if $ac_cache_corrupted; then
1001   { echo "$as_me:1001: error: changes in the environment can compromise the build" >&5
1002 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1003   { { echo "$as_me:1003: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1004 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1005    { (exit 1); exit 1; }; }
1006 fi
1007
1008 ac_ext=c
1009 ac_cpp='$CPP $CPPFLAGS'
1010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1013
1014 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1015   *c*,-n*) ECHO_N= ECHO_C='
1016 ' ECHO_T='      ' ;;
1017   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1018   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1019 esac
1020 echo "#! $SHELL" >conftest.sh
1021 echo  "exit 0"   >>conftest.sh
1022 chmod +x conftest.sh
1023 if { (echo "$as_me:1023: PATH=\".;.\"; conftest.sh") >&5
1024   (PATH=".;."; conftest.sh) 2>&5
1025   ac_status=$?
1026   echo "$as_me:1026: \$? = $ac_status" >&5
1027   (exit $ac_status); }; then
1028   ac_path_separator=';'
1029 else
1030   ac_path_separator=:
1031 fi
1032 PATH_SEPARATOR="$ac_path_separator"
1033 rm -f conftest.sh
1034
1035 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1036
1037 NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1038 NCURSES_MINOR="`egrep '^NCURSES_MINOR[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1039 NCURSES_PATCH="`egrep '^NCURSES_PATCH[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1040 cf_cv_abi_version=${NCURSES_MAJOR}
1041 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1042 cf_cv_timestamp=`date`
1043 echo "$as_me:1043: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1044 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1045
1046 ac_aux_dir=
1047 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1048   if test -f $ac_dir/install-sh; then
1049     ac_aux_dir=$ac_dir
1050     ac_install_sh="$ac_aux_dir/install-sh -c"
1051     break
1052   elif test -f $ac_dir/install.sh; then
1053     ac_aux_dir=$ac_dir
1054     ac_install_sh="$ac_aux_dir/install.sh -c"
1055     break
1056   elif test -f $ac_dir/shtool; then
1057     ac_aux_dir=$ac_dir
1058     ac_install_sh="$ac_aux_dir/shtool install -c"
1059     break
1060   fi
1061 done
1062 if test -z "$ac_aux_dir"; then
1063   { { echo "$as_me:1063: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1064 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1065    { (exit 1); exit 1; }; }
1066 fi
1067 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1068 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1069 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1070
1071 # Make sure we can run config.sub.
1072 $ac_config_sub sun4 >/dev/null 2>&1 ||
1073   { { echo "$as_me:1073: error: cannot run $ac_config_sub" >&5
1074 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1075    { (exit 1); exit 1; }; }
1076
1077 echo "$as_me:1077: checking build system type" >&5
1078 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1079 if test "${ac_cv_build+set}" = set; then
1080   echo $ECHO_N "(cached) $ECHO_C" >&6
1081 else
1082   ac_cv_build_alias=$build_alias
1083 test -z "$ac_cv_build_alias" &&
1084   ac_cv_build_alias=`$ac_config_guess`
1085 test -z "$ac_cv_build_alias" &&
1086   { { echo "$as_me:1086: error: cannot guess build type; you must specify one" >&5
1087 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1088    { (exit 1); exit 1; }; }
1089 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1090   { { echo "$as_me:1090: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1091 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1092    { (exit 1); exit 1; }; }
1093
1094 fi
1095 echo "$as_me:1095: result: $ac_cv_build" >&5
1096 echo "${ECHO_T}$ac_cv_build" >&6
1097 build=$ac_cv_build
1098 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1099 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1100 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1101
1102 echo "$as_me:1102: checking host system type" >&5
1103 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1104 if test "${ac_cv_host+set}" = set; then
1105   echo $ECHO_N "(cached) $ECHO_C" >&6
1106 else
1107   ac_cv_host_alias=$host_alias
1108 test -z "$ac_cv_host_alias" &&
1109   ac_cv_host_alias=$ac_cv_build_alias
1110 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1111   { { echo "$as_me:1111: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1112 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1113    { (exit 1); exit 1; }; }
1114
1115 fi
1116 echo "$as_me:1116: result: $ac_cv_host" >&5
1117 echo "${ECHO_T}$ac_cv_host" >&6
1118 host=$ac_cv_host
1119 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1120 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1121 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1122
1123 if test -f $srcdir/config.guess ; then
1124         echo "$as_me:1124: checking target system type" >&5
1125 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1126 if test "${ac_cv_target+set}" = set; then
1127   echo $ECHO_N "(cached) $ECHO_C" >&6
1128 else
1129   ac_cv_target_alias=$target_alias
1130 test "x$ac_cv_target_alias" = "x" &&
1131   ac_cv_target_alias=$ac_cv_host_alias
1132 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1133   { { echo "$as_me:1133: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1134 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1135    { (exit 1); exit 1; }; }
1136
1137 fi
1138 echo "$as_me:1138: result: $ac_cv_target" >&5
1139 echo "${ECHO_T}$ac_cv_target" >&6
1140 target=$ac_cv_target
1141 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1142 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1143 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1144
1145 # The aliases save the names the user supplied, while $host etc.
1146 # will get canonicalized.
1147 test -n "$target_alias" &&
1148   test "$program_prefix$program_suffix$program_transform_name" = \
1149     NONENONEs,x,x, &&
1150   program_prefix=${target_alias}-
1151         system_name="$host_os"
1152 else
1153         system_name="`(uname -s -r) 2>/dev/null`"
1154         if test -z "$system_name" ; then
1155                 system_name="`(hostname) 2>/dev/null`"
1156         fi
1157 fi
1158 test -n "$system_name" && cat >>confdefs.h <<EOF
1159 #define SYSTEM_NAME "$system_name"
1160 EOF
1161
1162 if test "${cf_cv_system_name+set}" = set; then
1163   echo $ECHO_N "(cached) $ECHO_C" >&6
1164 else
1165   cf_cv_system_name="$system_name"
1166 fi
1167
1168 test -z "$system_name" && system_name="$cf_cv_system_name"
1169 test -n "$cf_cv_system_name" && echo "$as_me:1169: result: Configuring for $cf_cv_system_name" >&5
1170 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1171
1172 if test ".$system_name" != ".$cf_cv_system_name" ; then
1173         echo "$as_me:1173: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1174 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1175         { { echo "$as_me:1175: error: \"Please remove config.cache and try again.\"" >&5
1176 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1177    { (exit 1); exit 1; }; }
1178 fi
1179
1180 # Check whether --with-system-type or --without-system-type was given.
1181 if test "${with_system_type+set}" = set; then
1182   withval="$with_system_type"
1183   { echo "$as_me:1183: WARNING: overriding system type to $withval" >&5
1184 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1185  cf_cv_system_name=$withval
1186 fi;
1187
1188 # We need a configure script only when compiling as part of GNU C library.
1189 # Here we have to generate one of the files we need while compiling.
1190 #
1191 # The only problem is that users of the package might think they have to
1192 # run configure themself and find it irritating when nothing happens.
1193 #
1194 # So we try here to find out whether we are called from the glibc configure
1195 # or by a user.
1196 #
1197
1198 # Check whether --enable-add-ons or --disable-add-ons was given.
1199 if test "${enable_add_ons+set}" = set; then
1200   enableval="$enable_add_ons"
1201   glibc_add_on=yes
1202 else
1203   glibc_add_on=
1204 fi;
1205
1206 if test x"$glibc_add_on" = "xyes" ; then
1207   rm -f $srcdir/Banner
1208   # We are in glibc.
1209   rm -f $srcdir/Makefile
1210   cp $srcdir/Makefile.glibc $srcdir/Makefile
1211   echo "ncurses `grep \"^[      ]*ncurses-version[      ]*=.*$\" \
1212                 $srcdir/Makefile | sed -e \
1213                 's/^[   ]*ncurses-version[      ]*=[    ]*\([^  ^ ]*\)[         ]*$/\1/'`" > $srcdir/Banner
1214   exit 0
1215 fi
1216
1217 ###     Save the given $CFLAGS to allow user-override.
1218 cf_user_CFLAGS="$CFLAGS"
1219
1220 ###     Default install-location
1221
1222 echo "$as_me:1222: checking for prefix" >&5
1223 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1224 if test "x$prefix" = "xNONE" ; then
1225         case "$cf_cv_system_name" in
1226                 # non-vendor systems don't have a conflict
1227         openbsd*|netbsd*|freebsd*|linux*|cygwin*)
1228                 prefix=/usr
1229                 ;;
1230         *)      prefix=$ac_default_prefix
1231                 ;;
1232         esac
1233 fi
1234 echo "$as_me:1234: result: $prefix" >&5
1235 echo "${ECHO_T}$prefix" >&6
1236
1237 if test "x$prefix" = "xNONE" ; then
1238 echo "$as_me:1238: checking for default include-directory" >&5
1239 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1240 test -n "$verbose" && echo 1>&6
1241 for cf_symbol in \
1242         $includedir \
1243         $includedir/ncurses \
1244         $prefix/include \
1245         $prefix/include/ncurses \
1246         /usr/local/include \
1247         /usr/local/include/ncurses \
1248         /usr/include \
1249         /usr/include/ncurses
1250 do
1251         cf_dir=`eval echo $cf_symbol`
1252         if test -f $cf_dir/curses.h ; then
1253         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1254                 includedir="$cf_symbol"
1255                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1256                 break
1257         fi
1258         fi
1259         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1260 done
1261 echo "$as_me:1261: result: $includedir" >&5
1262 echo "${ECHO_T}$includedir" >&6
1263 fi
1264
1265 ###     Checks for programs.
1266 ac_ext=c
1267 ac_cpp='$CPP $CPPFLAGS'
1268 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1269 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1270 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1271 if test -n "$ac_tool_prefix"; then
1272   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1273 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1274 echo "$as_me:1274: checking for $ac_word" >&5
1275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1276 if test "${ac_cv_prog_CC+set}" = set; then
1277   echo $ECHO_N "(cached) $ECHO_C" >&6
1278 else
1279   if test -n "$CC"; then
1280   ac_cv_prog_CC="$CC" # Let the user override the test.
1281 else
1282   ac_save_IFS=$IFS; IFS=$ac_path_separator
1283 ac_dummy="$PATH"
1284 for ac_dir in $ac_dummy; do
1285   IFS=$ac_save_IFS
1286   test -z "$ac_dir" && ac_dir=.
1287   $as_executable_p "$ac_dir/$ac_word" || continue
1288 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1289 echo "$as_me:1289: found $ac_dir/$ac_word" >&5
1290 break
1291 done
1292
1293 fi
1294 fi
1295 CC=$ac_cv_prog_CC
1296 if test -n "$CC"; then
1297   echo "$as_me:1297: result: $CC" >&5
1298 echo "${ECHO_T}$CC" >&6
1299 else
1300   echo "$as_me:1300: result: no" >&5
1301 echo "${ECHO_T}no" >&6
1302 fi
1303
1304 fi
1305 if test -z "$ac_cv_prog_CC"; then
1306   ac_ct_CC=$CC
1307   # Extract the first word of "gcc", so it can be a program name with args.
1308 set dummy gcc; ac_word=$2
1309 echo "$as_me:1309: checking for $ac_word" >&5
1310 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1311 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1312   echo $ECHO_N "(cached) $ECHO_C" >&6
1313 else
1314   if test -n "$ac_ct_CC"; then
1315   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1316 else
1317   ac_save_IFS=$IFS; IFS=$ac_path_separator
1318 ac_dummy="$PATH"
1319 for ac_dir in $ac_dummy; do
1320   IFS=$ac_save_IFS
1321   test -z "$ac_dir" && ac_dir=.
1322   $as_executable_p "$ac_dir/$ac_word" || continue
1323 ac_cv_prog_ac_ct_CC="gcc"
1324 echo "$as_me:1324: found $ac_dir/$ac_word" >&5
1325 break
1326 done
1327
1328 fi
1329 fi
1330 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1331 if test -n "$ac_ct_CC"; then
1332   echo "$as_me:1332: result: $ac_ct_CC" >&5
1333 echo "${ECHO_T}$ac_ct_CC" >&6
1334 else
1335   echo "$as_me:1335: result: no" >&5
1336 echo "${ECHO_T}no" >&6
1337 fi
1338
1339   CC=$ac_ct_CC
1340 else
1341   CC="$ac_cv_prog_CC"
1342 fi
1343
1344 if test -z "$CC"; then
1345   if test -n "$ac_tool_prefix"; then
1346   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1347 set dummy ${ac_tool_prefix}cc; ac_word=$2
1348 echo "$as_me:1348: checking for $ac_word" >&5
1349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1350 if test "${ac_cv_prog_CC+set}" = set; then
1351   echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353   if test -n "$CC"; then
1354   ac_cv_prog_CC="$CC" # Let the user override the test.
1355 else
1356   ac_save_IFS=$IFS; IFS=$ac_path_separator
1357 ac_dummy="$PATH"
1358 for ac_dir in $ac_dummy; do
1359   IFS=$ac_save_IFS
1360   test -z "$ac_dir" && ac_dir=.
1361   $as_executable_p "$ac_dir/$ac_word" || continue
1362 ac_cv_prog_CC="${ac_tool_prefix}cc"
1363 echo "$as_me:1363: found $ac_dir/$ac_word" >&5
1364 break
1365 done
1366
1367 fi
1368 fi
1369 CC=$ac_cv_prog_CC
1370 if test -n "$CC"; then
1371   echo "$as_me:1371: result: $CC" >&5
1372 echo "${ECHO_T}$CC" >&6
1373 else
1374   echo "$as_me:1374: result: no" >&5
1375 echo "${ECHO_T}no" >&6
1376 fi
1377
1378 fi
1379 if test -z "$ac_cv_prog_CC"; then
1380   ac_ct_CC=$CC
1381   # Extract the first word of "cc", so it can be a program name with args.
1382 set dummy cc; ac_word=$2
1383 echo "$as_me:1383: checking for $ac_word" >&5
1384 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1385 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1386   echo $ECHO_N "(cached) $ECHO_C" >&6
1387 else
1388   if test -n "$ac_ct_CC"; then
1389   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1390 else
1391   ac_save_IFS=$IFS; IFS=$ac_path_separator
1392 ac_dummy="$PATH"
1393 for ac_dir in $ac_dummy; do
1394   IFS=$ac_save_IFS
1395   test -z "$ac_dir" && ac_dir=.
1396   $as_executable_p "$ac_dir/$ac_word" || continue
1397 ac_cv_prog_ac_ct_CC="cc"
1398 echo "$as_me:1398: found $ac_dir/$ac_word" >&5
1399 break
1400 done
1401
1402 fi
1403 fi
1404 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1405 if test -n "$ac_ct_CC"; then
1406   echo "$as_me:1406: result: $ac_ct_CC" >&5
1407 echo "${ECHO_T}$ac_ct_CC" >&6
1408 else
1409   echo "$as_me:1409: result: no" >&5
1410 echo "${ECHO_T}no" >&6
1411 fi
1412
1413   CC=$ac_ct_CC
1414 else
1415   CC="$ac_cv_prog_CC"
1416 fi
1417
1418 fi
1419 if test -z "$CC"; then
1420   # Extract the first word of "cc", so it can be a program name with args.
1421 set dummy cc; ac_word=$2
1422 echo "$as_me:1422: checking for $ac_word" >&5
1423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1424 if test "${ac_cv_prog_CC+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   if test -n "$CC"; then
1428   ac_cv_prog_CC="$CC" # Let the user override the test.
1429 else
1430   ac_prog_rejected=no
1431   ac_save_IFS=$IFS; IFS=$ac_path_separator
1432 ac_dummy="$PATH"
1433 for ac_dir in $ac_dummy; do
1434   IFS=$ac_save_IFS
1435   test -z "$ac_dir" && ac_dir=.
1436   $as_executable_p "$ac_dir/$ac_word" || continue
1437 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1438   ac_prog_rejected=yes
1439   continue
1440 fi
1441 ac_cv_prog_CC="cc"
1442 echo "$as_me:1442: found $ac_dir/$ac_word" >&5
1443 break
1444 done
1445
1446 if test $ac_prog_rejected = yes; then
1447   # We found a bogon in the path, so make sure we never use it.
1448   set dummy $ac_cv_prog_CC
1449   shift
1450   if test $# != 0; then
1451     # We chose a different compiler from the bogus one.
1452     # However, it has the same basename, so the bogon will be chosen
1453     # first if we set CC to just the basename; use the full file name.
1454     shift
1455     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1456     shift
1457     ac_cv_prog_CC="$@"
1458   fi
1459 fi
1460 fi
1461 fi
1462 CC=$ac_cv_prog_CC
1463 if test -n "$CC"; then
1464   echo "$as_me:1464: result: $CC" >&5
1465 echo "${ECHO_T}$CC" >&6
1466 else
1467   echo "$as_me:1467: result: no" >&5
1468 echo "${ECHO_T}no" >&6
1469 fi
1470
1471 fi
1472 if test -z "$CC"; then
1473   if test -n "$ac_tool_prefix"; then
1474   for ac_prog in cl
1475   do
1476     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1477 set dummy $ac_tool_prefix$ac_prog; 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_save_IFS=$IFS; IFS=$ac_path_separator
1487 ac_dummy="$PATH"
1488 for ac_dir in $ac_dummy; do
1489   IFS=$ac_save_IFS
1490   test -z "$ac_dir" && ac_dir=.
1491   $as_executable_p "$ac_dir/$ac_word" || continue
1492 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1493 echo "$as_me:1493: found $ac_dir/$ac_word" >&5
1494 break
1495 done
1496
1497 fi
1498 fi
1499 CC=$ac_cv_prog_CC
1500 if test -n "$CC"; then
1501   echo "$as_me:1501: result: $CC" >&5
1502 echo "${ECHO_T}$CC" >&6
1503 else
1504   echo "$as_me:1504: result: no" >&5
1505 echo "${ECHO_T}no" >&6
1506 fi
1507
1508     test -n "$CC" && break
1509   done
1510 fi
1511 if test -z "$CC"; then
1512   ac_ct_CC=$CC
1513   for ac_prog in cl
1514 do
1515   # Extract the first word of "$ac_prog", so it can be a program name with args.
1516 set dummy $ac_prog; ac_word=$2
1517 echo "$as_me:1517: checking for $ac_word" >&5
1518 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1519 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1520   echo $ECHO_N "(cached) $ECHO_C" >&6
1521 else
1522   if test -n "$ac_ct_CC"; then
1523   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1524 else
1525   ac_save_IFS=$IFS; IFS=$ac_path_separator
1526 ac_dummy="$PATH"
1527 for ac_dir in $ac_dummy; do
1528   IFS=$ac_save_IFS
1529   test -z "$ac_dir" && ac_dir=.
1530   $as_executable_p "$ac_dir/$ac_word" || continue
1531 ac_cv_prog_ac_ct_CC="$ac_prog"
1532 echo "$as_me:1532: found $ac_dir/$ac_word" >&5
1533 break
1534 done
1535
1536 fi
1537 fi
1538 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1539 if test -n "$ac_ct_CC"; then
1540   echo "$as_me:1540: result: $ac_ct_CC" >&5
1541 echo "${ECHO_T}$ac_ct_CC" >&6
1542 else
1543   echo "$as_me:1543: result: no" >&5
1544 echo "${ECHO_T}no" >&6
1545 fi
1546
1547   test -n "$ac_ct_CC" && break
1548 done
1549
1550   CC=$ac_ct_CC
1551 fi
1552
1553 fi
1554
1555 test -z "$CC" && { { echo "$as_me:1555: error: no acceptable cc found in \$PATH" >&5
1556 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1557    { (exit 1); exit 1; }; }
1558
1559 # Provide some information about the compiler.
1560 echo "$as_me:1560:" \
1561      "checking for C compiler version" >&5
1562 ac_compiler=`set X $ac_compile; echo $2`
1563 { (eval echo "$as_me:1563: \"$ac_compiler --version </dev/null >&5\"") >&5
1564   (eval $ac_compiler --version </dev/null >&5) 2>&5
1565   ac_status=$?
1566   echo "$as_me:1566: \$? = $ac_status" >&5
1567   (exit $ac_status); }
1568 { (eval echo "$as_me:1568: \"$ac_compiler -v </dev/null >&5\"") >&5
1569   (eval $ac_compiler -v </dev/null >&5) 2>&5
1570   ac_status=$?
1571   echo "$as_me:1571: \$? = $ac_status" >&5
1572   (exit $ac_status); }
1573 { (eval echo "$as_me:1573: \"$ac_compiler -V </dev/null >&5\"") >&5
1574   (eval $ac_compiler -V </dev/null >&5) 2>&5
1575   ac_status=$?
1576   echo "$as_me:1576: \$? = $ac_status" >&5
1577   (exit $ac_status); }
1578
1579 cat >conftest.$ac_ext <<_ACEOF
1580 #line 1580 "configure"
1581 #include "confdefs.h"
1582
1583 int
1584 main ()
1585 {
1586
1587   ;
1588   return 0;
1589 }
1590 _ACEOF
1591 ac_clean_files_save=$ac_clean_files
1592 ac_clean_files="$ac_clean_files a.out a.exe"
1593 # Try to create an executable without -o first, disregard a.out.
1594 # It will help us diagnose broken compilers, and finding out an intuition
1595 # of exeext.
1596 echo "$as_me:1596: checking for C compiler default output" >&5
1597 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1598 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1599 if { (eval echo "$as_me:1599: \"$ac_link_default\"") >&5
1600   (eval $ac_link_default) 2>&5
1601   ac_status=$?
1602   echo "$as_me:1602: \$? = $ac_status" >&5
1603   (exit $ac_status); }; then
1604   # Find the output, starting from the most likely.  This scheme is
1605 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1606 # resort.
1607 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1608                 ls a.out conftest 2>/dev/null;
1609                 ls a.* conftest.* 2>/dev/null`; do
1610   case $ac_file in
1611     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1612     a.out ) # We found the default executable, but exeext='' is most
1613             # certainly right.
1614             break;;
1615     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1616           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1617           export ac_cv_exeext
1618           break;;
1619     * ) break;;
1620   esac
1621 done
1622 else
1623   echo "$as_me: failed program was:" >&5
1624 cat conftest.$ac_ext >&5
1625 { { echo "$as_me:1625: error: C compiler cannot create executables" >&5
1626 echo "$as_me: error: C compiler cannot create executables" >&2;}
1627    { (exit 77); exit 77; }; }
1628 fi
1629
1630 ac_exeext=$ac_cv_exeext
1631 echo "$as_me:1631: result: $ac_file" >&5
1632 echo "${ECHO_T}$ac_file" >&6
1633
1634 # Check the compiler produces executables we can run.  If not, either
1635 # the compiler is broken, or we cross compile.
1636 echo "$as_me:1636: checking whether the C compiler works" >&5
1637 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1638 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1639 # If not cross compiling, check that we can run a simple program.
1640 if test "$cross_compiling" != yes; then
1641   if { ac_try='./$ac_file'
1642   { (eval echo "$as_me:1642: \"$ac_try\"") >&5
1643   (eval $ac_try) 2>&5
1644   ac_status=$?
1645   echo "$as_me:1645: \$? = $ac_status" >&5
1646   (exit $ac_status); }; }; then
1647     cross_compiling=no
1648   else
1649     if test "$cross_compiling" = maybe; then
1650         cross_compiling=yes
1651     else
1652         { { echo "$as_me:1652: error: cannot run C compiled programs.
1653 If you meant to cross compile, use \`--host'." >&5
1654 echo "$as_me: error: cannot run C compiled programs.
1655 If you meant to cross compile, use \`--host'." >&2;}
1656    { (exit 1); exit 1; }; }
1657     fi
1658   fi
1659 fi
1660 echo "$as_me:1660: result: yes" >&5
1661 echo "${ECHO_T}yes" >&6
1662
1663 rm -f a.out a.exe conftest$ac_cv_exeext
1664 ac_clean_files=$ac_clean_files_save
1665 # Check the compiler produces executables we can run.  If not, either
1666 # the compiler is broken, or we cross compile.
1667 echo "$as_me:1667: checking whether we are cross compiling" >&5
1668 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1669 echo "$as_me:1669: result: $cross_compiling" >&5
1670 echo "${ECHO_T}$cross_compiling" >&6
1671
1672 echo "$as_me:1672: checking for executable suffix" >&5
1673 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1674 if { (eval echo "$as_me:1674: \"$ac_link\"") >&5
1675   (eval $ac_link) 2>&5
1676   ac_status=$?
1677   echo "$as_me:1677: \$? = $ac_status" >&5
1678   (exit $ac_status); }; then
1679   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1680 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1681 # work properly (i.e., refer to `conftest.exe'), while it won't with
1682 # `rm'.
1683 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1684   case $ac_file in
1685     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1686     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1687           export ac_cv_exeext
1688           break;;
1689     * ) break;;
1690   esac
1691 done
1692 else
1693   { { echo "$as_me:1693: error: cannot compute EXEEXT: cannot compile and link" >&5
1694 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1695    { (exit 1); exit 1; }; }
1696 fi
1697
1698 rm -f conftest$ac_cv_exeext
1699 echo "$as_me:1699: result: $ac_cv_exeext" >&5
1700 echo "${ECHO_T}$ac_cv_exeext" >&6
1701
1702 rm -f conftest.$ac_ext
1703 EXEEXT=$ac_cv_exeext
1704 ac_exeext=$EXEEXT
1705 echo "$as_me:1705: checking for object suffix" >&5
1706 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1707 if test "${ac_cv_objext+set}" = set; then
1708   echo $ECHO_N "(cached) $ECHO_C" >&6
1709 else
1710   cat >conftest.$ac_ext <<_ACEOF
1711 #line 1711 "configure"
1712 #include "confdefs.h"
1713
1714 int
1715 main ()
1716 {
1717
1718   ;
1719   return 0;
1720 }
1721 _ACEOF
1722 rm -f conftest.o conftest.obj
1723 if { (eval echo "$as_me:1723: \"$ac_compile\"") >&5
1724   (eval $ac_compile) 2>&5
1725   ac_status=$?
1726   echo "$as_me:1726: \$? = $ac_status" >&5
1727   (exit $ac_status); }; then
1728   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1729   case $ac_file in
1730     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1731     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1732        break;;
1733   esac
1734 done
1735 else
1736   echo "$as_me: failed program was:" >&5
1737 cat conftest.$ac_ext >&5
1738 { { echo "$as_me:1738: error: cannot compute OBJEXT: cannot compile" >&5
1739 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1740    { (exit 1); exit 1; }; }
1741 fi
1742
1743 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1744 fi
1745 echo "$as_me:1745: result: $ac_cv_objext" >&5
1746 echo "${ECHO_T}$ac_cv_objext" >&6
1747 OBJEXT=$ac_cv_objext
1748 ac_objext=$OBJEXT
1749 echo "$as_me:1749: checking whether we are using the GNU C compiler" >&5
1750 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1751 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1752   echo $ECHO_N "(cached) $ECHO_C" >&6
1753 else
1754   cat >conftest.$ac_ext <<_ACEOF
1755 #line 1755 "configure"
1756 #include "confdefs.h"
1757
1758 int
1759 main ()
1760 {
1761 #ifndef __GNUC__
1762        choke me
1763 #endif
1764
1765   ;
1766   return 0;
1767 }
1768 _ACEOF
1769 rm -f conftest.$ac_objext
1770 if { (eval echo "$as_me:1770: \"$ac_compile\"") >&5
1771   (eval $ac_compile) 2>&5
1772   ac_status=$?
1773   echo "$as_me:1773: \$? = $ac_status" >&5
1774   (exit $ac_status); } &&
1775          { ac_try='test -s conftest.$ac_objext'
1776   { (eval echo "$as_me:1776: \"$ac_try\"") >&5
1777   (eval $ac_try) 2>&5
1778   ac_status=$?
1779   echo "$as_me:1779: \$? = $ac_status" >&5
1780   (exit $ac_status); }; }; then
1781   ac_compiler_gnu=yes
1782 else
1783   echo "$as_me: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1785 ac_compiler_gnu=no
1786 fi
1787 rm -f conftest.$ac_objext conftest.$ac_ext
1788 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1789
1790 fi
1791 echo "$as_me:1791: result: $ac_cv_c_compiler_gnu" >&5
1792 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1793 GCC=`test $ac_compiler_gnu = yes && echo yes`
1794 ac_test_CFLAGS=${CFLAGS+set}
1795 ac_save_CFLAGS=$CFLAGS
1796 CFLAGS="-g"
1797 echo "$as_me:1797: checking whether $CC accepts -g" >&5
1798 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1799 if test "${ac_cv_prog_cc_g+set}" = set; then
1800   echo $ECHO_N "(cached) $ECHO_C" >&6
1801 else
1802   cat >conftest.$ac_ext <<_ACEOF
1803 #line 1803 "configure"
1804 #include "confdefs.h"
1805
1806 int
1807 main ()
1808 {
1809
1810   ;
1811   return 0;
1812 }
1813 _ACEOF
1814 rm -f conftest.$ac_objext
1815 if { (eval echo "$as_me:1815: \"$ac_compile\"") >&5
1816   (eval $ac_compile) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); } &&
1820          { ac_try='test -s conftest.$ac_objext'
1821   { (eval echo "$as_me:1821: \"$ac_try\"") >&5
1822   (eval $ac_try) 2>&5
1823   ac_status=$?
1824   echo "$as_me:1824: \$? = $ac_status" >&5
1825   (exit $ac_status); }; }; then
1826   ac_cv_prog_cc_g=yes
1827 else
1828   echo "$as_me: failed program was:" >&5
1829 cat conftest.$ac_ext >&5
1830 ac_cv_prog_cc_g=no
1831 fi
1832 rm -f conftest.$ac_objext conftest.$ac_ext
1833 fi
1834 echo "$as_me:1834: result: $ac_cv_prog_cc_g" >&5
1835 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1836 if test "$ac_test_CFLAGS" = set; then
1837   CFLAGS=$ac_save_CFLAGS
1838 elif test $ac_cv_prog_cc_g = yes; then
1839   if test "$GCC" = yes; then
1840     CFLAGS="-g -O2"
1841   else
1842     CFLAGS="-g"
1843   fi
1844 else
1845   if test "$GCC" = yes; then
1846     CFLAGS="-O2"
1847   else
1848     CFLAGS=
1849   fi
1850 fi
1851 # Some people use a C++ compiler to compile C.  Since we use `exit',
1852 # in C++ we need to declare it.  In case someone uses the same compiler
1853 # for both compiling C and C++ we need to have the C++ compiler decide
1854 # the declaration of exit, since it's the most demanding environment.
1855 cat >conftest.$ac_ext <<_ACEOF
1856 #ifndef __cplusplus
1857   choke me
1858 #endif
1859 _ACEOF
1860 rm -f conftest.$ac_objext
1861 if { (eval echo "$as_me:1861: \"$ac_compile\"") >&5
1862   (eval $ac_compile) 2>&5
1863   ac_status=$?
1864   echo "$as_me:1864: \$? = $ac_status" >&5
1865   (exit $ac_status); } &&
1866          { ac_try='test -s conftest.$ac_objext'
1867   { (eval echo "$as_me:1867: \"$ac_try\"") >&5
1868   (eval $ac_try) 2>&5
1869   ac_status=$?
1870   echo "$as_me:1870: \$? = $ac_status" >&5
1871   (exit $ac_status); }; }; then
1872   for ac_declaration in \
1873    ''\
1874    '#include <stdlib.h>' \
1875    'extern "C" void std::exit (int) throw (); using std::exit;' \
1876    'extern "C" void std::exit (int); using std::exit;' \
1877    'extern "C" void exit (int) throw ();' \
1878    'extern "C" void exit (int);' \
1879    'void exit (int);'
1880 do
1881   cat >conftest.$ac_ext <<_ACEOF
1882 #line 1882 "configure"
1883 #include "confdefs.h"
1884 #include <stdlib.h>
1885 $ac_declaration
1886 int
1887 main ()
1888 {
1889 exit (42);
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   :
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 continue
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913   cat >conftest.$ac_ext <<_ACEOF
1914 #line 1914 "configure"
1915 #include "confdefs.h"
1916 $ac_declaration
1917 int
1918 main ()
1919 {
1920 exit (42);
1921   ;
1922   return 0;
1923 }
1924 _ACEOF
1925 rm -f conftest.$ac_objext
1926 if { (eval echo "$as_me:1926: \"$ac_compile\"") >&5
1927   (eval $ac_compile) 2>&5
1928   ac_status=$?
1929   echo "$as_me:1929: \$? = $ac_status" >&5
1930   (exit $ac_status); } &&
1931          { ac_try='test -s conftest.$ac_objext'
1932   { (eval echo "$as_me:1932: \"$ac_try\"") >&5
1933   (eval $ac_try) 2>&5
1934   ac_status=$?
1935   echo "$as_me:1935: \$? = $ac_status" >&5
1936   (exit $ac_status); }; }; then
1937   break
1938 else
1939   echo "$as_me: failed program was:" >&5
1940 cat conftest.$ac_ext >&5
1941 fi
1942 rm -f conftest.$ac_objext conftest.$ac_ext
1943 done
1944 rm -f conftest*
1945 if test -n "$ac_declaration"; then
1946   echo '#ifdef __cplusplus' >>confdefs.h
1947   echo $ac_declaration      >>confdefs.h
1948   echo '#endif'             >>confdefs.h
1949 fi
1950
1951 else
1952   echo "$as_me: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1954 fi
1955 rm -f conftest.$ac_objext conftest.$ac_ext
1956 ac_ext=c
1957 ac_cpp='$CPP $CPPFLAGS'
1958 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1959 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1960 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1961
1962 GCC_VERSION=none
1963 if test "$GCC" = yes ; then
1964         echo "$as_me:1964: checking version of gcc" >&5
1965 echo $ECHO_N "checking version of gcc... $ECHO_C" >&6
1966         GCC_VERSION="`${CC} --version|head -1`"
1967         echo "$as_me:1967: result: $GCC_VERSION" >&5
1968 echo "${ECHO_T}$GCC_VERSION" >&6
1969 fi
1970
1971 # If we're cross-compiling, allow the user to override the tools and their
1972 # options.  The configure script is oriented toward identifying the target
1973 # compiler, etc., but we need a host compiler to generate parts of the source.
1974 BUILD_CC='$(CC)'
1975 BUILD_CFLAGS='$(CFLAGS)'
1976 BUILD_CPPFLAGS='$(CPPFLAGS)'
1977 BUILD_LDFLAGS='$(LDFLAGS)'
1978 BUILD_LIBS='$(LIBS)'
1979 if test "$host_alias" != "$target_alias" ; then
1980
1981 # Check whether --with-build-cc or --without-build-cc was given.
1982 if test "${with_build_cc+set}" = set; then
1983   withval="$with_build_cc"
1984   BUILD_CC="$withval"
1985 else
1986   for ac_prog in $CC gcc cc
1987 do
1988   # Extract the first word of "$ac_prog", so it can be a program name with args.
1989 set dummy $ac_prog; ac_word=$2
1990 echo "$as_me:1990: checking for $ac_word" >&5
1991 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1992 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
1993   echo $ECHO_N "(cached) $ECHO_C" >&6
1994 else
1995   if test -n "$BUILD_CC"; then
1996   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
1997 else
1998   ac_save_IFS=$IFS; IFS=$ac_path_separator
1999 ac_dummy="$PATH"
2000 for ac_dir in $ac_dummy; do
2001   IFS=$ac_save_IFS
2002   test -z "$ac_dir" && ac_dir=.
2003   $as_executable_p "$ac_dir/$ac_word" || continue
2004 ac_cv_prog_BUILD_CC="$ac_prog"
2005 echo "$as_me:2005: found $ac_dir/$ac_word" >&5
2006 break
2007 done
2008
2009 fi
2010 fi
2011 BUILD_CC=$ac_cv_prog_BUILD_CC
2012 if test -n "$BUILD_CC"; then
2013   echo "$as_me:2013: result: $BUILD_CC" >&5
2014 echo "${ECHO_T}$BUILD_CC" >&6
2015 else
2016   echo "$as_me:2016: result: no" >&5
2017 echo "${ECHO_T}no" >&6
2018 fi
2019
2020   test -n "$BUILD_CC" && break
2021 done
2022
2023 fi;
2024
2025 # Check whether --with-build-cflags or --without-build-cflags was given.
2026 if test "${with_build_cflags+set}" = set; then
2027   withval="$with_build_cflags"
2028   BUILD_CFLAGS="$withval"
2029 fi;
2030
2031 # Check whether --with-build-cppflags or --without-build-cppflags was given.
2032 if test "${with_build_cppflags+set}" = set; then
2033   withval="$with_build_cppflags"
2034   BUILD_CPPFLAGS="$withval"
2035 fi;
2036
2037 # Check whether --with-build-ldflags or --without-build-ldflags was given.
2038 if test "${with_build_ldflags+set}" = set; then
2039   withval="$with_build_ldflags"
2040   BUILD_LDFLAGS="$withval"
2041 fi;
2042
2043 # Check whether --with-build-libs or --without-build-libs was given.
2044 if test "${with_build_libs+set}" = set; then
2045   withval="$with_build_libs"
2046   BUILD_LIBS="$withval"
2047 fi;
2048 fi
2049
2050 ac_ext=c
2051 ac_cpp='$CPP $CPPFLAGS'
2052 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2053 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2054 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2055 echo "$as_me:2055: checking how to run the C preprocessor" >&5
2056 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2057 # On Suns, sometimes $CPP names a directory.
2058 if test -n "$CPP" && test -d "$CPP"; then
2059   CPP=
2060 fi
2061 if test -z "$CPP"; then
2062   if test "${ac_cv_prog_CPP+set}" = set; then
2063   echo $ECHO_N "(cached) $ECHO_C" >&6
2064 else
2065       # Double quotes because CPP needs to be expanded
2066     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2067     do
2068       ac_preproc_ok=false
2069 for ac_c_preproc_warn_flag in '' yes
2070 do
2071   # Use a header file that comes with gcc, so configuring glibc
2072   # with a fresh cross-compiler works.
2073   # On the NeXT, cc -E runs the code through the compiler's parser,
2074   # not just through cpp. "Syntax error" is here to catch this case.
2075   cat >conftest.$ac_ext <<_ACEOF
2076 #line 2076 "configure"
2077 #include "confdefs.h"
2078 #include <assert.h>
2079                      Syntax error
2080 _ACEOF
2081 if { (eval echo "$as_me:2081: \"$ac_cpp conftest.$ac_ext\"") >&5
2082   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2083   ac_status=$?
2084   egrep -v '^ *\+' conftest.er1 >conftest.err
2085   rm -f conftest.er1
2086   cat conftest.err >&5
2087   echo "$as_me:2087: \$? = $ac_status" >&5
2088   (exit $ac_status); } >/dev/null; then
2089   if test -s conftest.err; then
2090     ac_cpp_err=$ac_c_preproc_warn_flag
2091   else
2092     ac_cpp_err=
2093   fi
2094 else
2095   ac_cpp_err=yes
2096 fi
2097 if test -z "$ac_cpp_err"; then
2098   :
2099 else
2100   echo "$as_me: failed program was:" >&5
2101   cat conftest.$ac_ext >&5
2102   # Broken: fails on valid input.
2103 continue
2104 fi
2105 rm -f conftest.err conftest.$ac_ext
2106
2107   # OK, works on sane cases.  Now check whether non-existent headers
2108   # can be detected and how.
2109   cat >conftest.$ac_ext <<_ACEOF
2110 #line 2110 "configure"
2111 #include "confdefs.h"
2112 #include <ac_nonexistent.h>
2113 _ACEOF
2114 if { (eval echo "$as_me:2114: \"$ac_cpp conftest.$ac_ext\"") >&5
2115   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2116   ac_status=$?
2117   egrep -v '^ *\+' conftest.er1 >conftest.err
2118   rm -f conftest.er1
2119   cat conftest.err >&5
2120   echo "$as_me:2120: \$? = $ac_status" >&5
2121   (exit $ac_status); } >/dev/null; then
2122   if test -s conftest.err; then
2123     ac_cpp_err=$ac_c_preproc_warn_flag
2124   else
2125     ac_cpp_err=
2126   fi
2127 else
2128   ac_cpp_err=yes
2129 fi
2130 if test -z "$ac_cpp_err"; then
2131   # Broken: success on invalid input.
2132 continue
2133 else
2134   echo "$as_me: failed program was:" >&5
2135   cat conftest.$ac_ext >&5
2136   # Passes both tests.
2137 ac_preproc_ok=:
2138 break
2139 fi
2140 rm -f conftest.err conftest.$ac_ext
2141
2142 done
2143 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2144 rm -f conftest.err conftest.$ac_ext
2145 if $ac_preproc_ok; then
2146   break
2147 fi
2148
2149     done
2150     ac_cv_prog_CPP=$CPP
2151
2152 fi
2153   CPP=$ac_cv_prog_CPP
2154 else
2155   ac_cv_prog_CPP=$CPP
2156 fi
2157 echo "$as_me:2157: result: $CPP" >&5
2158 echo "${ECHO_T}$CPP" >&6
2159 ac_preproc_ok=false
2160 for ac_c_preproc_warn_flag in '' yes
2161 do
2162   # Use a header file that comes with gcc, so configuring glibc
2163   # with a fresh cross-compiler works.
2164   # On the NeXT, cc -E runs the code through the compiler's parser,
2165   # not just through cpp. "Syntax error" is here to catch this case.
2166   cat >conftest.$ac_ext <<_ACEOF
2167 #line 2167 "configure"
2168 #include "confdefs.h"
2169 #include <assert.h>
2170                      Syntax error
2171 _ACEOF
2172 if { (eval echo "$as_me:2172: \"$ac_cpp conftest.$ac_ext\"") >&5
2173   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2174   ac_status=$?
2175   egrep -v '^ *\+' conftest.er1 >conftest.err
2176   rm -f conftest.er1
2177   cat conftest.err >&5
2178   echo "$as_me:2178: \$? = $ac_status" >&5
2179   (exit $ac_status); } >/dev/null; then
2180   if test -s conftest.err; then
2181     ac_cpp_err=$ac_c_preproc_warn_flag
2182   else
2183     ac_cpp_err=
2184   fi
2185 else
2186   ac_cpp_err=yes
2187 fi
2188 if test -z "$ac_cpp_err"; then
2189   :
2190 else
2191   echo "$as_me: failed program was:" >&5
2192   cat conftest.$ac_ext >&5
2193   # Broken: fails on valid input.
2194 continue
2195 fi
2196 rm -f conftest.err conftest.$ac_ext
2197
2198   # OK, works on sane cases.  Now check whether non-existent headers
2199   # can be detected and how.
2200   cat >conftest.$ac_ext <<_ACEOF
2201 #line 2201 "configure"
2202 #include "confdefs.h"
2203 #include <ac_nonexistent.h>
2204 _ACEOF
2205 if { (eval echo "$as_me:2205: \"$ac_cpp conftest.$ac_ext\"") >&5
2206   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2207   ac_status=$?
2208   egrep -v '^ *\+' conftest.er1 >conftest.err
2209   rm -f conftest.er1
2210   cat conftest.err >&5
2211   echo "$as_me:2211: \$? = $ac_status" >&5
2212   (exit $ac_status); } >/dev/null; then
2213   if test -s conftest.err; then
2214     ac_cpp_err=$ac_c_preproc_warn_flag
2215   else
2216     ac_cpp_err=
2217   fi
2218 else
2219   ac_cpp_err=yes
2220 fi
2221 if test -z "$ac_cpp_err"; then
2222   # Broken: success on invalid input.
2223 continue
2224 else
2225   echo "$as_me: failed program was:" >&5
2226   cat conftest.$ac_ext >&5
2227   # Passes both tests.
2228 ac_preproc_ok=:
2229 break
2230 fi
2231 rm -f conftest.err conftest.$ac_ext
2232
2233 done
2234 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2235 rm -f conftest.err conftest.$ac_ext
2236 if $ac_preproc_ok; then
2237   :
2238 else
2239   { { echo "$as_me:2239: error: C preprocessor \"$CPP\" fails sanity check" >&5
2240 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2241    { (exit 1); exit 1; }; }
2242 fi
2243
2244 ac_ext=c
2245 ac_cpp='$CPP $CPPFLAGS'
2246 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2247 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2248 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2249
2250 if test $ac_cv_c_compiler_gnu = yes; then
2251     echo "$as_me:2251: checking whether $CC needs -traditional" >&5
2252 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2253 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2254   echo $ECHO_N "(cached) $ECHO_C" >&6
2255 else
2256     ac_pattern="Autoconf.*'x'"
2257   cat >conftest.$ac_ext <<_ACEOF
2258 #line 2258 "configure"
2259 #include "confdefs.h"
2260 #include <sgtty.h>
2261 Autoconf TIOCGETP
2262 _ACEOF
2263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2264   egrep "$ac_pattern" >/dev/null 2>&1; then
2265   ac_cv_prog_gcc_traditional=yes
2266 else
2267   ac_cv_prog_gcc_traditional=no
2268 fi
2269 rm -f conftest*
2270
2271   if test $ac_cv_prog_gcc_traditional = no; then
2272     cat >conftest.$ac_ext <<_ACEOF
2273 #line 2273 "configure"
2274 #include "confdefs.h"
2275 #include <termio.h>
2276 Autoconf TCGETA
2277 _ACEOF
2278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2279   egrep "$ac_pattern" >/dev/null 2>&1; then
2280   ac_cv_prog_gcc_traditional=yes
2281 fi
2282 rm -f conftest*
2283
2284   fi
2285 fi
2286 echo "$as_me:2286: result: $ac_cv_prog_gcc_traditional" >&5
2287 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2288   if test $ac_cv_prog_gcc_traditional = yes; then
2289     CC="$CC -traditional"
2290   fi
2291 fi
2292
2293 echo "$as_me:2293: checking for POSIXized ISC" >&5
2294 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2295 if test -d /etc/conf/kconfig.d &&
2296    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2297 then
2298   echo "$as_me:2298: result: yes" >&5
2299 echo "${ECHO_T}yes" >&6
2300   ISC=yes # If later tests want to check for ISC.
2301
2302 cat >>confdefs.h <<\EOF
2303 #define _POSIX_SOURCE 1
2304 EOF
2305
2306   if test "$GCC" = yes; then
2307     CC="$CC -posix"
2308   else
2309     CC="$CC -Xp"
2310   fi
2311 else
2312   echo "$as_me:2312: result: no" >&5
2313 echo "${ECHO_T}no" >&6
2314   ISC=
2315 fi
2316
2317 echo "$as_me:2317: checking for ${CC-cc} option to accept ANSI C" >&5
2318 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2319 if test "${cf_cv_ansi_cc+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322
2323 cf_cv_ansi_cc=no
2324 cf_save_CFLAGS="$CFLAGS"
2325 cf_save_CPPFLAGS="$CPPFLAGS"
2326 # Don't try gcc -ansi; that turns off useful extensions and
2327 # breaks some systems' header files.
2328 # AIX                   -qlanglvl=ansi
2329 # Ultrix and OSF/1      -std1
2330 # HP-UX                 -Aa -D_HPUX_SOURCE
2331 # SVR4                  -Xc
2332 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2333 for cf_arg in "-DCC_HAS_PROTOS" \
2334         "" \
2335         -qlanglvl=ansi \
2336         -std1 \
2337         -Ae \
2338         "-Aa -D_HPUX_SOURCE" \
2339         -Xc
2340 do
2341
2342 cf_new_cflags=
2343 cf_new_cppflags=
2344 for cf_add_cflags in $cf_arg
2345 do
2346         case $cf_add_cflags in #(vi
2347         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2348                 case "$CPPFLAGS" in
2349                 *$cf_add_cflags) #(vi
2350                         ;;
2351                 *) #(vi
2352                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2353                         ;;
2354                 esac
2355                 ;;
2356         *)
2357                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2358                 ;;
2359         esac
2360 done
2361
2362 if test -n "$cf_new_cflags" ; then
2363
2364         CFLAGS="$CFLAGS $cf_new_cflags"
2365 fi
2366
2367 if test -n "$cf_new_cppflags" ; then
2368
2369         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2370 fi
2371
2372         cat >conftest.$ac_ext <<_ACEOF
2373 #line 2373 "configure"
2374 #include "confdefs.h"
2375
2376 #ifndef CC_HAS_PROTOS
2377 #if !defined(__STDC__) || (__STDC__ != 1)
2378 choke me
2379 #endif
2380 #endif
2381
2382 int
2383 main ()
2384 {
2385
2386         int test (int i, double x);
2387         struct s1 {int (*f) (int a);};
2388         struct s2 {int (*f) (double a);};
2389   ;
2390   return 0;
2391 }
2392 _ACEOF
2393 rm -f conftest.$ac_objext
2394 if { (eval echo "$as_me:2394: \"$ac_compile\"") >&5
2395   (eval $ac_compile) 2>&5
2396   ac_status=$?
2397   echo "$as_me:2397: \$? = $ac_status" >&5
2398   (exit $ac_status); } &&
2399          { ac_try='test -s conftest.$ac_objext'
2400   { (eval echo "$as_me:2400: \"$ac_try\"") >&5
2401   (eval $ac_try) 2>&5
2402   ac_status=$?
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); }; }; then
2405   cf_cv_ansi_cc="$cf_arg"; break
2406 else
2407   echo "$as_me: failed program was:" >&5
2408 cat conftest.$ac_ext >&5
2409 fi
2410 rm -f conftest.$ac_objext conftest.$ac_ext
2411 done
2412 CFLAGS="$cf_save_CFLAGS"
2413 CPPFLAGS="$cf_save_CPPFLAGS"
2414
2415 fi
2416 echo "$as_me:2416: result: $cf_cv_ansi_cc" >&5
2417 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2418
2419 if test "$cf_cv_ansi_cc" != "no"; then
2420 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2421
2422 cf_new_cflags=
2423 cf_new_cppflags=
2424 for cf_add_cflags in $cf_cv_ansi_cc
2425 do
2426         case $cf_add_cflags in #(vi
2427         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2428                 case "$CPPFLAGS" in
2429                 *$cf_add_cflags) #(vi
2430                         ;;
2431                 *) #(vi
2432                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2433                         ;;
2434                 esac
2435                 ;;
2436         *)
2437                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2438                 ;;
2439         esac
2440 done
2441
2442 if test -n "$cf_new_cflags" ; then
2443
2444         CFLAGS="$CFLAGS $cf_new_cflags"
2445 fi
2446
2447 if test -n "$cf_new_cppflags" ; then
2448
2449         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2450 fi
2451
2452 else
2453         cat >>confdefs.h <<\EOF
2454 #define CC_HAS_PROTOS 1
2455 EOF
2456
2457 fi
2458 fi
2459
2460 if test "$cf_cv_ansi_cc" = "no"; then
2461         { { echo "$as_me:2461: error: Your compiler does not appear to recognize prototypes.
2462 You have the following choices:
2463         a. adjust your compiler options
2464         b. get an up-to-date compiler
2465         c. use a wrapper such as unproto" >&5
2466 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2467 You have the following choices:
2468         a. adjust your compiler options
2469         b. get an up-to-date compiler
2470         c. use a wrapper such as unproto" >&2;}
2471    { (exit 1); exit 1; }; }
2472 fi
2473
2474 PROG_EXT=
2475 case $cf_cv_system_name in
2476 os2*)
2477     # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
2478     CFLAGS="$CFLAGS -Zmt"
2479     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2480     CXXFLAGS="$CXXFLAGS -Zmt"
2481     LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
2482     PROG_EXT=".exe"
2483     ;;
2484 cygwin*)
2485     PROG_EXT=".exe"
2486     ;;
2487 esac
2488
2489 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2490 #define PROG_EXT "$PROG_EXT"
2491 EOF
2492
2493 case "$cf_cv_system_name" in
2494 freebsd*) #(vi
2495   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2496   ;;
2497 *) LDPATH=$PATH:/sbin:/usr/sbin
2498   # Extract the first word of "ldconfig", so it can be a program name with args.
2499 set dummy ldconfig; ac_word=$2
2500 echo "$as_me:2500: checking for $ac_word" >&5
2501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2502 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2503   echo $ECHO_N "(cached) $ECHO_C" >&6
2504 else
2505   case $LDCONFIG in
2506   [\\/]* | ?:[\\/]*)
2507   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2508   ;;
2509   *)
2510   ac_save_IFS=$IFS; IFS=$ac_path_separator
2511 ac_dummy="$LDPATH"
2512 for ac_dir in $ac_dummy; do
2513   IFS=$ac_save_IFS
2514   test -z "$ac_dir" && ac_dir=.
2515   if $as_executable_p "$ac_dir/$ac_word"; then
2516    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2517    echo "$as_me:2517: found $ac_dir/$ac_word" >&5
2518    break
2519 fi
2520 done
2521
2522   ;;
2523 esac
2524 fi
2525 LDCONFIG=$ac_cv_path_LDCONFIG
2526
2527 if test -n "$LDCONFIG"; then
2528   echo "$as_me:2528: result: $LDCONFIG" >&5
2529 echo "${ECHO_T}$LDCONFIG" >&6
2530 else
2531   echo "$as_me:2531: result: no" >&5
2532 echo "${ECHO_T}no" >&6
2533 fi
2534
2535   ;;
2536 esac
2537
2538 echo "$as_me:2538: checking if you want to ensure bool is consistent with C++" >&5
2539 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2540
2541 # Check whether --with-cxx or --without-cxx was given.
2542 if test "${with_cxx+set}" = set; then
2543   withval="$with_cxx"
2544   cf_with_cxx=$withval
2545 else
2546   cf_with_cxx=yes
2547 fi;
2548 echo "$as_me:2548: result: $cf_with_cxx" >&5
2549 echo "${ECHO_T}$cf_with_cxx" >&6
2550 if test "X$cf_with_cxx" = Xno ; then
2551         CXX=""
2552         GXX=""
2553 else
2554                 ac_ext=cc
2555 ac_cpp='$CXXCPP $CPPFLAGS'
2556 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2557 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2558 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2559 if test -n "$ac_tool_prefix"; then
2560   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2561   do
2562     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2563 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2564 echo "$as_me:2564: checking for $ac_word" >&5
2565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2566 if test "${ac_cv_prog_CXX+set}" = set; then
2567   echo $ECHO_N "(cached) $ECHO_C" >&6
2568 else
2569   if test -n "$CXX"; then
2570   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2571 else
2572   ac_save_IFS=$IFS; IFS=$ac_path_separator
2573 ac_dummy="$PATH"
2574 for ac_dir in $ac_dummy; do
2575   IFS=$ac_save_IFS
2576   test -z "$ac_dir" && ac_dir=.
2577   $as_executable_p "$ac_dir/$ac_word" || continue
2578 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2579 echo "$as_me:2579: found $ac_dir/$ac_word" >&5
2580 break
2581 done
2582
2583 fi
2584 fi
2585 CXX=$ac_cv_prog_CXX
2586 if test -n "$CXX"; then
2587   echo "$as_me:2587: result: $CXX" >&5
2588 echo "${ECHO_T}$CXX" >&6
2589 else
2590   echo "$as_me:2590: result: no" >&5
2591 echo "${ECHO_T}no" >&6
2592 fi
2593
2594     test -n "$CXX" && break
2595   done
2596 fi
2597 if test -z "$CXX"; then
2598   ac_ct_CXX=$CXX
2599   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2600 do
2601   # Extract the first word of "$ac_prog", so it can be a program name with args.
2602 set dummy $ac_prog; ac_word=$2
2603 echo "$as_me:2603: checking for $ac_word" >&5
2604 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2605 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2606   echo $ECHO_N "(cached) $ECHO_C" >&6
2607 else
2608   if test -n "$ac_ct_CXX"; then
2609   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2610 else
2611   ac_save_IFS=$IFS; IFS=$ac_path_separator
2612 ac_dummy="$PATH"
2613 for ac_dir in $ac_dummy; do
2614   IFS=$ac_save_IFS
2615   test -z "$ac_dir" && ac_dir=.
2616   $as_executable_p "$ac_dir/$ac_word" || continue
2617 ac_cv_prog_ac_ct_CXX="$ac_prog"
2618 echo "$as_me:2618: found $ac_dir/$ac_word" >&5
2619 break
2620 done
2621
2622 fi
2623 fi
2624 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2625 if test -n "$ac_ct_CXX"; then
2626   echo "$as_me:2626: result: $ac_ct_CXX" >&5
2627 echo "${ECHO_T}$ac_ct_CXX" >&6
2628 else
2629   echo "$as_me:2629: result: no" >&5
2630 echo "${ECHO_T}no" >&6
2631 fi
2632
2633   test -n "$ac_ct_CXX" && break
2634 done
2635 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2636
2637   CXX=$ac_ct_CXX
2638 fi
2639
2640 # Provide some information about the compiler.
2641 echo "$as_me:2641:" \
2642      "checking for C++ compiler version" >&5
2643 ac_compiler=`set X $ac_compile; echo $2`
2644 { (eval echo "$as_me:2644: \"$ac_compiler --version </dev/null >&5\"") >&5
2645   (eval $ac_compiler --version </dev/null >&5) 2>&5
2646   ac_status=$?
2647   echo "$as_me:2647: \$? = $ac_status" >&5
2648   (exit $ac_status); }
2649 { (eval echo "$as_me:2649: \"$ac_compiler -v </dev/null >&5\"") >&5
2650   (eval $ac_compiler -v </dev/null >&5) 2>&5
2651   ac_status=$?
2652   echo "$as_me:2652: \$? = $ac_status" >&5
2653   (exit $ac_status); }
2654 { (eval echo "$as_me:2654: \"$ac_compiler -V </dev/null >&5\"") >&5
2655   (eval $ac_compiler -V </dev/null >&5) 2>&5
2656   ac_status=$?
2657   echo "$as_me:2657: \$? = $ac_status" >&5
2658   (exit $ac_status); }
2659
2660 echo "$as_me:2660: checking whether we are using the GNU C++ compiler" >&5
2661 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2662 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2663   echo $ECHO_N "(cached) $ECHO_C" >&6
2664 else
2665   cat >conftest.$ac_ext <<_ACEOF
2666 #line 2666 "configure"
2667 #include "confdefs.h"
2668
2669 int
2670 main ()
2671 {
2672 #ifndef __GNUC__
2673        choke me
2674 #endif
2675
2676   ;
2677   return 0;
2678 }
2679 _ACEOF
2680 rm -f conftest.$ac_objext
2681 if { (eval echo "$as_me:2681: \"$ac_compile\"") >&5
2682   (eval $ac_compile) 2>&5
2683   ac_status=$?
2684   echo "$as_me:2684: \$? = $ac_status" >&5
2685   (exit $ac_status); } &&
2686          { ac_try='test -s conftest.$ac_objext'
2687   { (eval echo "$as_me:2687: \"$ac_try\"") >&5
2688   (eval $ac_try) 2>&5
2689   ac_status=$?
2690   echo "$as_me:2690: \$? = $ac_status" >&5
2691   (exit $ac_status); }; }; then
2692   ac_compiler_gnu=yes
2693 else
2694   echo "$as_me: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
2696 ac_compiler_gnu=no
2697 fi
2698 rm -f conftest.$ac_objext conftest.$ac_ext
2699 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2700
2701 fi
2702 echo "$as_me:2702: result: $ac_cv_cxx_compiler_gnu" >&5
2703 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2704 GXX=`test $ac_compiler_gnu = yes && echo yes`
2705 ac_test_CXXFLAGS=${CXXFLAGS+set}
2706 ac_save_CXXFLAGS=$CXXFLAGS
2707 CXXFLAGS="-g"
2708 echo "$as_me:2708: checking whether $CXX accepts -g" >&5
2709 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2710 if test "${ac_cv_prog_cxx_g+set}" = set; then
2711   echo $ECHO_N "(cached) $ECHO_C" >&6
2712 else
2713   cat >conftest.$ac_ext <<_ACEOF
2714 #line 2714 "configure"
2715 #include "confdefs.h"
2716
2717 int
2718 main ()
2719 {
2720
2721   ;
2722   return 0;
2723 }
2724 _ACEOF
2725 rm -f conftest.$ac_objext
2726 if { (eval echo "$as_me:2726: \"$ac_compile\"") >&5
2727   (eval $ac_compile) 2>&5
2728   ac_status=$?
2729   echo "$as_me:2729: \$? = $ac_status" >&5
2730   (exit $ac_status); } &&
2731          { ac_try='test -s conftest.$ac_objext'
2732   { (eval echo "$as_me:2732: \"$ac_try\"") >&5
2733   (eval $ac_try) 2>&5
2734   ac_status=$?
2735   echo "$as_me:2735: \$? = $ac_status" >&5
2736   (exit $ac_status); }; }; then
2737   ac_cv_prog_cxx_g=yes
2738 else
2739   echo "$as_me: failed program was:" >&5
2740 cat conftest.$ac_ext >&5
2741 ac_cv_prog_cxx_g=no
2742 fi
2743 rm -f conftest.$ac_objext conftest.$ac_ext
2744 fi
2745 echo "$as_me:2745: result: $ac_cv_prog_cxx_g" >&5
2746 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2747 if test "$ac_test_CXXFLAGS" = set; then
2748   CXXFLAGS=$ac_save_CXXFLAGS
2749 elif test $ac_cv_prog_cxx_g = yes; then
2750   if test "$GXX" = yes; then
2751     CXXFLAGS="-g -O2"
2752   else
2753     CXXFLAGS="-g"
2754   fi
2755 else
2756   if test "$GXX" = yes; then
2757     CXXFLAGS="-O2"
2758   else
2759     CXXFLAGS=
2760   fi
2761 fi
2762 for ac_declaration in \
2763    ''\
2764    '#include <stdlib.h>' \
2765    'extern "C" void std::exit (int) throw (); using std::exit;' \
2766    'extern "C" void std::exit (int); using std::exit;' \
2767    'extern "C" void exit (int) throw ();' \
2768    'extern "C" void exit (int);' \
2769    'void exit (int);'
2770 do
2771   cat >conftest.$ac_ext <<_ACEOF
2772 #line 2772 "configure"
2773 #include "confdefs.h"
2774 #include <stdlib.h>
2775 $ac_declaration
2776 int
2777 main ()
2778 {
2779 exit (42);
2780   ;
2781   return 0;
2782 }
2783 _ACEOF
2784 rm -f conftest.$ac_objext
2785 if { (eval echo "$as_me:2785: \"$ac_compile\"") >&5
2786   (eval $ac_compile) 2>&5
2787   ac_status=$?
2788   echo "$as_me:2788: \$? = $ac_status" >&5
2789   (exit $ac_status); } &&
2790          { ac_try='test -s conftest.$ac_objext'
2791   { (eval echo "$as_me:2791: \"$ac_try\"") >&5
2792   (eval $ac_try) 2>&5
2793   ac_status=$?
2794   echo "$as_me:2794: \$? = $ac_status" >&5
2795   (exit $ac_status); }; }; then
2796   :
2797 else
2798   echo "$as_me: failed program was:" >&5
2799 cat conftest.$ac_ext >&5
2800 continue
2801 fi
2802 rm -f conftest.$ac_objext conftest.$ac_ext
2803   cat >conftest.$ac_ext <<_ACEOF
2804 #line 2804 "configure"
2805 #include "confdefs.h"
2806 $ac_declaration
2807 int
2808 main ()
2809 {
2810 exit (42);
2811   ;
2812   return 0;
2813 }
2814 _ACEOF
2815 rm -f conftest.$ac_objext
2816 if { (eval echo "$as_me:2816: \"$ac_compile\"") >&5
2817   (eval $ac_compile) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); } &&
2821          { ac_try='test -s conftest.$ac_objext'
2822   { (eval echo "$as_me:2822: \"$ac_try\"") >&5
2823   (eval $ac_try) 2>&5
2824   ac_status=$?
2825   echo "$as_me:2825: \$? = $ac_status" >&5
2826   (exit $ac_status); }; }; then
2827   break
2828 else
2829   echo "$as_me: failed program was:" >&5
2830 cat conftest.$ac_ext >&5
2831 fi
2832 rm -f conftest.$ac_objext conftest.$ac_ext
2833 done
2834 rm -f conftest*
2835 if test -n "$ac_declaration"; then
2836   echo '#ifdef __cplusplus' >>confdefs.h
2837   echo $ac_declaration      >>confdefs.h
2838   echo '#endif'             >>confdefs.h
2839 fi
2840
2841 ac_ext=c
2842 ac_cpp='$CPP $CPPFLAGS'
2843 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2844 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2845 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2846
2847         fi
2848
2849 GXX_VERSION=none
2850 if test "$GXX" = yes; then
2851         echo "$as_me:2851: checking version of g++" >&5
2852 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
2853         GXX_VERSION="`${CXX-g++} --version|head -1`"
2854         echo "$as_me:2854: result: $GXX_VERSION" >&5
2855 echo "${ECHO_T}$GXX_VERSION" >&6
2856         case $GXX_VERSION in
2857         1*|2.[0-6]*)
2858                 GXX=""; CXX=""; ac_cv_cxx_compiler_gnu=no
2859                 cf_cxx_library=no
2860                 { echo "$as_me:2860: WARNING: templates do not work" >&5
2861 echo "$as_me: WARNING: templates do not work" >&2;}
2862                 ;;
2863         esac
2864 fi
2865
2866 echo "$as_me:2866: checking if you want to build C++ binding and demo" >&5
2867 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2868
2869 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2870 if test "${with_cxx_binding+set}" = set; then
2871   withval="$with_cxx_binding"
2872   cf_with_cxx_binding=$withval
2873 else
2874   cf_with_cxx_binding=$cf_with_cxx
2875 fi;
2876 echo "$as_me:2876: result: $cf_with_cxx_binding" >&5
2877 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2878
2879 echo "$as_me:2879: checking if you want to build with Ada95" >&5
2880 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2881
2882 # Check whether --with-ada or --without-ada was given.
2883 if test "${with_ada+set}" = set; then
2884   withval="$with_ada"
2885   cf_with_ada=$withval
2886 else
2887   cf_with_ada=yes
2888 fi;
2889 echo "$as_me:2889: result: $cf_with_ada" >&5
2890 echo "${ECHO_T}$cf_with_ada" >&6
2891
2892 echo "$as_me:2892: checking if you want to build programs such as tic" >&5
2893 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2894
2895 # Check whether --with-progs or --without-progs was given.
2896 if test "${with_progs+set}" = set; then
2897   withval="$with_progs"
2898   cf_with_progs=$withval
2899 else
2900   cf_with_progs=yes
2901 fi;
2902 echo "$as_me:2902: result: $cf_with_progs" >&5
2903 echo "${ECHO_T}$cf_with_progs" >&6
2904
2905 echo "$as_me:2905: checking if you wish to install curses.h" >&5
2906 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2907
2908 # Check whether --with-curses-h or --without-curses-h was given.
2909 if test "${with_curses_h+set}" = set; then
2910   withval="$with_curses_h"
2911   with_curses_h=$withval
2912 else
2913   with_curses_h=yes
2914 fi;
2915 echo "$as_me:2915: result: $with_curses_h" >&5
2916 echo "${ECHO_T}$with_curses_h" >&6
2917
2918 modules_to_build="ncurses"
2919 if test "X$cf_with_progs" != Xno ; then
2920 modules_to_build="$modules_to_build progs tack"
2921 fi
2922 modules_to_build="$modules_to_build panel menu form"
2923
2924 test "$program_prefix" != NONE &&
2925   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2926 # Use a double $ so make ignores it.
2927 test "$program_suffix" != NONE &&
2928   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2929 # Double any \ or $.  echo might interpret backslashes.
2930 # By default was `s,x,x', remove it if useless.
2931 cat <<\_ACEOF >conftest.sed
2932 s/[\\$]/&&/g;s/;s,x,x,$//
2933 _ACEOF
2934 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2935 rm conftest.sed
2936
2937 for ac_prog in mawk gawk nawk awk
2938 do
2939   # Extract the first word of "$ac_prog", so it can be a program name with args.
2940 set dummy $ac_prog; ac_word=$2
2941 echo "$as_me:2941: checking for $ac_word" >&5
2942 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2943 if test "${ac_cv_prog_AWK+set}" = set; then
2944   echo $ECHO_N "(cached) $ECHO_C" >&6
2945 else
2946   if test -n "$AWK"; then
2947   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2948 else
2949   ac_save_IFS=$IFS; IFS=$ac_path_separator
2950 ac_dummy="$PATH"
2951 for ac_dir in $ac_dummy; do
2952   IFS=$ac_save_IFS
2953   test -z "$ac_dir" && ac_dir=.
2954   $as_executable_p "$ac_dir/$ac_word" || continue
2955 ac_cv_prog_AWK="$ac_prog"
2956 echo "$as_me:2956: found $ac_dir/$ac_word" >&5
2957 break
2958 done
2959
2960 fi
2961 fi
2962 AWK=$ac_cv_prog_AWK
2963 if test -n "$AWK"; then
2964   echo "$as_me:2964: result: $AWK" >&5
2965 echo "${ECHO_T}$AWK" >&6
2966 else
2967   echo "$as_me:2967: result: no" >&5
2968 echo "${ECHO_T}no" >&6
2969 fi
2970
2971   test -n "$AWK" && break
2972 done
2973
2974 echo "$as_me:2974: checking whether ${MAKE-make} sets \${MAKE}" >&5
2975 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2976 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2977 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2978   echo $ECHO_N "(cached) $ECHO_C" >&6
2979 else
2980   cat >conftest.make <<\EOF
2981 all:
2982         @echo 'ac_maketemp="${MAKE}"'
2983 EOF
2984 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2985 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2986 if test -n "$ac_maketemp"; then
2987   eval ac_cv_prog_make_${ac_make}_set=yes
2988 else
2989   eval ac_cv_prog_make_${ac_make}_set=no
2990 fi
2991 rm -f conftest.make
2992 fi
2993 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2994   echo "$as_me:2994: result: yes" >&5
2995 echo "${ECHO_T}yes" >&6
2996   SET_MAKE=
2997 else
2998   echo "$as_me:2998: result: no" >&5
2999 echo "${ECHO_T}no" >&6
3000   SET_MAKE="MAKE=${MAKE-make}"
3001 fi
3002
3003 # Find a good install program.  We prefer a C program (faster),
3004 # so one script is as good as another.  But avoid the broken or
3005 # incompatible versions:
3006 # SysV /etc/install, /usr/sbin/install
3007 # SunOS /usr/etc/install
3008 # IRIX /sbin/install
3009 # AIX /bin/install
3010 # AmigaOS /C/install, which installs bootblocks on floppy discs
3011 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3012 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3013 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3014 # ./install, which can be erroneously created by make from ./install.sh.
3015 echo "$as_me:3015: checking for a BSD compatible install" >&5
3016 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3017 if test -z "$INSTALL"; then
3018 if test "${ac_cv_path_install+set}" = set; then
3019   echo $ECHO_N "(cached) $ECHO_C" >&6
3020 else
3021     ac_save_IFS=$IFS; IFS=$ac_path_separator
3022   for ac_dir in $PATH; do
3023     IFS=$ac_save_IFS
3024     # Account for people who put trailing slashes in PATH elements.
3025     case $ac_dir/ in
3026     / | ./ | .// | /cC/* \
3027     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3028     | /usr/ucb/* ) ;;
3029     *)
3030       # OSF1 and SCO ODT 3.0 have their own names for install.
3031       # Don't use installbsd from OSF since it installs stuff as root
3032       # by default.
3033       for ac_prog in ginstall scoinst install; do
3034         if $as_executable_p "$ac_dir/$ac_prog"; then
3035           if test $ac_prog = install &&
3036             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3037             # AIX install.  It has an incompatible calling convention.
3038             :
3039           elif test $ac_prog = install &&
3040             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3041             # program-specific install script used by HP pwplus--don't use.
3042             :
3043           else
3044             ac_cv_path_install="$ac_dir/$ac_prog -c"
3045             break 2
3046           fi
3047         fi
3048       done
3049       ;;
3050     esac
3051   done
3052
3053 fi
3054   if test "${ac_cv_path_install+set}" = set; then
3055     INSTALL=$ac_cv_path_install
3056   else
3057     # As a last resort, use the slow shell script.  We don't cache a
3058     # path for INSTALL within a source directory, because that will
3059     # break other packages using the cache if that directory is
3060     # removed, or if the path is relative.
3061     INSTALL=$ac_install_sh
3062   fi
3063 fi
3064 echo "$as_me:3064: result: $INSTALL" >&5
3065 echo "${ECHO_T}$INSTALL" >&6
3066
3067 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3068 # It thinks the first close brace ends the variable substitution.
3069 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3070
3071 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3072
3073 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3074
3075 case $INSTALL in
3076 /*)
3077   ;;
3078 *)
3079   cf_dir=`echo $INSTALL | sed -e 's:/[^/]*$::'`
3080   test -z "$cf_dir" && cf_dir=.
3081   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'`
3082   ;;
3083 esac
3084
3085 echo "$as_me:3085: checking for long file names" >&5
3086 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3087 if test "${ac_cv_sys_long_file_names+set}" = set; then
3088   echo $ECHO_N "(cached) $ECHO_C" >&6
3089 else
3090   ac_cv_sys_long_file_names=yes
3091 # Test for long file names in all the places we know might matter:
3092 #      .                the current directory, where building will happen
3093 #      $prefix/lib      where we will be installing things
3094 #      $exec_prefix/lib likewise
3095 # eval it to expand exec_prefix.
3096 #      $TMPDIR          if set, where it might want to write temporary files
3097 # if $TMPDIR is not set:
3098 #      /tmp             where it might want to write temporary files
3099 #      /var/tmp         likewise
3100 #      /usr/tmp         likewise
3101 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3102   ac_tmpdirs=$TMPDIR
3103 else
3104   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3105 fi
3106 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3107   test -d $ac_dir || continue
3108   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3109   ac_xdir=$ac_dir/cf$$
3110   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3111   ac_tf1=$ac_xdir/conftest9012345
3112   ac_tf2=$ac_xdir/conftest9012346
3113   (echo 1 >$ac_tf1) 2>/dev/null
3114   (echo 2 >$ac_tf2) 2>/dev/null
3115   ac_val=`cat $ac_tf1 2>/dev/null`
3116   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3117     ac_cv_sys_long_file_names=no
3118     rm -rf $ac_xdir 2>/dev/null
3119     break
3120   fi
3121   rm -rf $ac_xdir 2>/dev/null
3122 done
3123 fi
3124 echo "$as_me:3124: result: $ac_cv_sys_long_file_names" >&5
3125 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3126 if test $ac_cv_sys_long_file_names = yes; then
3127
3128 cat >>confdefs.h <<\EOF
3129 #define HAVE_LONG_FILE_NAMES 1
3130 EOF
3131
3132 fi
3133
3134 echo "$as_me:3134: checking if filesystem supports mixed-case filenames" >&5
3135 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3136 if test "${cf_cv_mixedcase+set}" = set; then
3137   echo $ECHO_N "(cached) $ECHO_C" >&6
3138 else
3139
3140         rm -f conftest CONFTEST
3141         echo test >conftest
3142         if test -f CONFTEST ; then
3143                 cf_cv_mixedcase=no
3144         else
3145                 cf_cv_mixedcase=yes
3146         fi
3147         rm -f conftest CONFTEST
3148
3149 fi
3150 echo "$as_me:3150: result: $cf_cv_mixedcase" >&5
3151 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3152 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3153 #define MIXEDCASE_FILENAMES 1
3154 EOF
3155
3156 echo "$as_me:3156: checking whether ln -s works" >&5
3157 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3158 LN_S=$as_ln_s
3159 if test "$LN_S" = "ln -s"; then
3160   echo "$as_me:3160: result: yes" >&5
3161 echo "${ECHO_T}yes" >&6
3162 else
3163   echo "$as_me:3163: result: no, using $LN_S" >&5
3164 echo "${ECHO_T}no, using $LN_S" >&6
3165 fi
3166
3167 if test -n "$ac_tool_prefix"; then
3168   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3169 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3170 echo "$as_me:3170: checking for $ac_word" >&5
3171 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3172 if test "${ac_cv_prog_RANLIB+set}" = set; then
3173   echo $ECHO_N "(cached) $ECHO_C" >&6
3174 else
3175   if test -n "$RANLIB"; then
3176   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3177 else
3178   ac_save_IFS=$IFS; IFS=$ac_path_separator
3179 ac_dummy="$PATH"
3180 for ac_dir in $ac_dummy; do
3181   IFS=$ac_save_IFS
3182   test -z "$ac_dir" && ac_dir=.
3183   $as_executable_p "$ac_dir/$ac_word" || continue
3184 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3185 echo "$as_me:3185: found $ac_dir/$ac_word" >&5
3186 break
3187 done
3188
3189 fi
3190 fi
3191 RANLIB=$ac_cv_prog_RANLIB
3192 if test -n "$RANLIB"; then
3193   echo "$as_me:3193: result: $RANLIB" >&5
3194 echo "${ECHO_T}$RANLIB" >&6
3195 else
3196   echo "$as_me:3196: result: no" >&5
3197 echo "${ECHO_T}no" >&6
3198 fi
3199
3200 fi
3201 if test -z "$ac_cv_prog_RANLIB"; then
3202   ac_ct_RANLIB=$RANLIB
3203   # Extract the first word of "ranlib", so it can be a program name with args.
3204 set dummy ranlib; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$ac_ct_RANLIB"; then
3211   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_ac_ct_RANLIB="ranlib"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3225 fi
3226 fi
3227 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3228 if test -n "$ac_ct_RANLIB"; then
3229   echo "$as_me:3229: result: $ac_ct_RANLIB" >&5
3230 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3231 else
3232   echo "$as_me:3232: result: no" >&5
3233 echo "${ECHO_T}no" >&6
3234 fi
3235
3236   RANLIB=$ac_ct_RANLIB
3237 else
3238   RANLIB="$ac_cv_prog_RANLIB"
3239 fi
3240
3241 # Extract the first word of "ctags", so it can be a program name with args.
3242 set dummy ctags; ac_word=$2
3243 echo "$as_me:3243: checking for $ac_word" >&5
3244 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3245 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3246   echo $ECHO_N "(cached) $ECHO_C" >&6
3247 else
3248   if test -n "$MAKE_LOWER_TAGS"; then
3249   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3250 else
3251   ac_save_IFS=$IFS; IFS=$ac_path_separator
3252 ac_dummy="$PATH"
3253 for ac_dir in $ac_dummy; do
3254   IFS=$ac_save_IFS
3255   test -z "$ac_dir" && ac_dir=.
3256   $as_executable_p "$ac_dir/$ac_word" || continue
3257 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3258 echo "$as_me:3258: found $ac_dir/$ac_word" >&5
3259 break
3260 done
3261
3262   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3263 fi
3264 fi
3265 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3266 if test -n "$MAKE_LOWER_TAGS"; then
3267   echo "$as_me:3267: result: $MAKE_LOWER_TAGS" >&5
3268 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3269 else
3270   echo "$as_me:3270: result: no" >&5
3271 echo "${ECHO_T}no" >&6
3272 fi
3273
3274 if test "$cf_cv_mixedcase" = yes ; then
3275         # Extract the first word of "etags", so it can be a program name with args.
3276 set dummy etags; ac_word=$2
3277 echo "$as_me:3277: checking for $ac_word" >&5
3278 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3279 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3280   echo $ECHO_N "(cached) $ECHO_C" >&6
3281 else
3282   if test -n "$MAKE_UPPER_TAGS"; then
3283   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3284 else
3285   ac_save_IFS=$IFS; IFS=$ac_path_separator
3286 ac_dummy="$PATH"
3287 for ac_dir in $ac_dummy; do
3288   IFS=$ac_save_IFS
3289   test -z "$ac_dir" && ac_dir=.
3290   $as_executable_p "$ac_dir/$ac_word" || continue
3291 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3292 echo "$as_me:3292: found $ac_dir/$ac_word" >&5
3293 break
3294 done
3295
3296   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3297 fi
3298 fi
3299 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3300 if test -n "$MAKE_UPPER_TAGS"; then
3301   echo "$as_me:3301: result: $MAKE_UPPER_TAGS" >&5
3302 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3303 else
3304   echo "$as_me:3304: result: no" >&5
3305 echo "${ECHO_T}no" >&6
3306 fi
3307
3308 else
3309         MAKE_UPPER_TAGS=no
3310 fi
3311
3312 if test "$MAKE_UPPER_TAGS" = yes ; then
3313         MAKE_UPPER_TAGS=
3314 else
3315         MAKE_UPPER_TAGS="#"
3316 fi
3317
3318 if test "$MAKE_LOWER_TAGS" = yes ; then
3319         MAKE_LOWER_TAGS=
3320 else
3321         MAKE_LOWER_TAGS="#"
3322 fi
3323
3324 for ac_prog in tdlint lint alint
3325 do
3326   # Extract the first word of "$ac_prog", so it can be a program name with args.
3327 set dummy $ac_prog; ac_word=$2
3328 echo "$as_me:3328: checking for $ac_word" >&5
3329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3330 if test "${ac_cv_prog_LINT+set}" = set; then
3331   echo $ECHO_N "(cached) $ECHO_C" >&6
3332 else
3333   if test -n "$LINT"; then
3334   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3335 else
3336   ac_save_IFS=$IFS; IFS=$ac_path_separator
3337 ac_dummy="$PATH"
3338 for ac_dir in $ac_dummy; do
3339   IFS=$ac_save_IFS
3340   test -z "$ac_dir" && ac_dir=.
3341   $as_executable_p "$ac_dir/$ac_word" || continue
3342 ac_cv_prog_LINT="$ac_prog"
3343 echo "$as_me:3343: found $ac_dir/$ac_word" >&5
3344 break
3345 done
3346
3347 fi
3348 fi
3349 LINT=$ac_cv_prog_LINT
3350 if test -n "$LINT"; then
3351   echo "$as_me:3351: result: $LINT" >&5
3352 echo "${ECHO_T}$LINT" >&6
3353 else
3354   echo "$as_me:3354: result: no" >&5
3355 echo "${ECHO_T}no" >&6
3356 fi
3357
3358   test -n "$LINT" && break
3359 done
3360
3361 for ac_prog in man man_db
3362 do
3363   # Extract the first word of "$ac_prog", so it can be a program name with args.
3364 set dummy $ac_prog; ac_word=$2
3365 echo "$as_me:3365: checking for $ac_word" >&5
3366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3367 if test "${ac_cv_prog_MAN+set}" = set; then
3368   echo $ECHO_N "(cached) $ECHO_C" >&6
3369 else
3370   if test -n "$MAN"; then
3371   ac_cv_prog_MAN="$MAN" # Let the user override the test.
3372 else
3373   ac_save_IFS=$IFS; IFS=$ac_path_separator
3374 ac_dummy="$PATH"
3375 for ac_dir in $ac_dummy; do
3376   IFS=$ac_save_IFS
3377   test -z "$ac_dir" && ac_dir=.
3378   $as_executable_p "$ac_dir/$ac_word" || continue
3379 ac_cv_prog_MAN="$ac_prog"
3380 echo "$as_me:3380: found $ac_dir/$ac_word" >&5
3381 break
3382 done
3383
3384 fi
3385 fi
3386 MAN=$ac_cv_prog_MAN
3387 if test -n "$MAN"; then
3388   echo "$as_me:3388: result: $MAN" >&5
3389 echo "${ECHO_T}$MAN" >&6
3390 else
3391   echo "$as_me:3391: result: no" >&5
3392 echo "${ECHO_T}no" >&6
3393 fi
3394
3395   test -n "$MAN" && break
3396 done
3397
3398 if test "${cf_cv_subst_LD+set}" = set; then
3399   echo $ECHO_N "(cached) $ECHO_C" >&6
3400 else
3401
3402 echo "$as_me:3402: checking for loader (symbol LD)" >&5
3403 echo $ECHO_N "checking for loader (symbol LD)... $ECHO_C" >&6
3404 test -z "$LD" && LD=ld
3405 echo "$as_me:3405: result: $LD" >&5
3406 echo "${ECHO_T}$LD" >&6
3407
3408 cf_cv_subst_LD=$LD
3409 fi
3410
3411 LD=${cf_cv_subst_LD}
3412
3413 if test "${cf_cv_subst_AR+set}" = set; then
3414   echo $ECHO_N "(cached) $ECHO_C" >&6
3415 else
3416
3417 echo "$as_me:3417: checking for archiver (symbol AR)" >&5
3418 echo $ECHO_N "checking for archiver (symbol AR)... $ECHO_C" >&6
3419 test -z "$AR" && AR=ar
3420 echo "$as_me:3420: result: $AR" >&5
3421 echo "${ECHO_T}$AR" >&6
3422
3423 cf_cv_subst_AR=$AR
3424 fi
3425
3426 AR=${cf_cv_subst_AR}
3427
3428 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3429   echo $ECHO_N "(cached) $ECHO_C" >&6
3430 else
3431
3432 echo "$as_me:3432: checking for archiver options (symbol AR_OPTS)" >&5
3433 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3434 test -z "$AR_OPTS" && AR_OPTS=rv
3435 echo "$as_me:3435: result: $AR_OPTS" >&5
3436 echo "${ECHO_T}$AR_OPTS" >&6
3437
3438 cf_cv_subst_AR_OPTS=$AR_OPTS
3439 fi
3440
3441 AR_OPTS=${cf_cv_subst_AR_OPTS}
3442
3443 echo "$as_me:3443: checking for makeflags variable" >&5
3444 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3445 if test "${cf_cv_makeflags+set}" = set; then
3446   echo $ECHO_N "(cached) $ECHO_C" >&6
3447 else
3448
3449         cf_cv_makeflags=''
3450         for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
3451         do
3452                 cat >cf_makeflags.tmp <<CF_EOF
3453 SHELL = /bin/sh
3454 all :
3455         @ echo '.$cf_option'
3456 CF_EOF
3457                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
3458                 case "$cf_result" in
3459                 .*k)
3460                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3461                         case "$cf_result" in
3462                         .*CC=*) cf_cv_makeflags=
3463                                 ;;
3464                         *)      cf_cv_makeflags=$cf_option
3465                                 ;;
3466                         esac
3467                         break
3468                         ;;
3469                 *)      echo no match "$cf_result"
3470                         ;;
3471                 esac
3472         done
3473         rm -f cf_makeflags.tmp
3474
3475 fi
3476 echo "$as_me:3476: result: $cf_cv_makeflags" >&5
3477 echo "${ECHO_T}$cf_cv_makeflags" >&6
3478
3479 echo "$as_me:3479: checking if you have specified an install-prefix" >&5
3480 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3481
3482 # Check whether --with-install-prefix or --without-install-prefix was given.
3483 if test "${with_install_prefix+set}" = set; then
3484   withval="$with_install_prefix"
3485   case "$withval" in #(vi
3486         yes|no) #(vi
3487                 ;;
3488         *)      DESTDIR="$withval"
3489                 ;;
3490         esac
3491 fi;
3492 echo "$as_me:3492: result: $DESTDIR" >&5
3493 echo "${ECHO_T}$DESTDIR" >&6
3494
3495 ###############################################################################
3496
3497 ### Options to allow the user to specify the set of libraries which are used.
3498 ### Use "--without-normal --with-shared" to allow the default model to be
3499 ### shared, for example.
3500 cf_list_models=""
3501
3502 echo "$as_me:3502: checking if you want to build libraries with libtool" >&5
3503 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
3504
3505 # Check whether --with-libtool or --without-libtool was given.
3506 if test "${with_libtool+set}" = set; then
3507   withval="$with_libtool"
3508   with_libtool=$withval
3509 else
3510   with_libtool=no
3511 fi;
3512 echo "$as_me:3512: result: $with_libtool" >&5
3513 echo "${ECHO_T}$with_libtool" >&6
3514 if test "$with_libtool" = "yes"; then
3515         cf_list_models="$cf_list_models libtool"
3516         test -z "$LIBTOOL" && LIBTOOL=libtool
3517 else
3518         LIBTOOL=""
3519 fi
3520
3521 echo "$as_me:3521: checking if you want to build shared libraries" >&5
3522 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
3523
3524 # Check whether --with-shared or --without-shared was given.
3525 if test "${with_shared+set}" = set; then
3526   withval="$with_shared"
3527   with_shared=$withval
3528 else
3529   with_shared=no
3530 fi;
3531 echo "$as_me:3531: result: $with_shared" >&5
3532 echo "${ECHO_T}$with_shared" >&6
3533 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3534
3535 echo "$as_me:3535: checking if you want to build static libraries" >&5
3536 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
3537
3538 # Check whether --with-normal or --without-normal was given.
3539 if test "${with_normal+set}" = set; then
3540   withval="$with_normal"
3541   with_normal=$withval
3542 else
3543   with_normal=yes
3544 fi;
3545 echo "$as_me:3545: result: $with_normal" >&5
3546 echo "${ECHO_T}$with_normal" >&6
3547 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
3548
3549 echo "$as_me:3549: checking if you want to build debug libraries" >&5
3550 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
3551
3552 # Check whether --with-debug or --without-debug was given.
3553 if test "${with_debug+set}" = set; then
3554   withval="$with_debug"
3555   with_debug=$withval
3556 else
3557   with_debug=yes
3558 fi;
3559 echo "$as_me:3559: result: $with_debug" >&5
3560 echo "${ECHO_T}$with_debug" >&6
3561 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
3562
3563 echo "$as_me:3563: checking if you want to build profiling libraries" >&5
3564 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
3565
3566 # Check whether --with-profile or --without-profile was given.
3567 if test "${with_profile+set}" = set; then
3568   withval="$with_profile"
3569   with_profile=$withval
3570 else
3571   with_profile=no
3572 fi;
3573 echo "$as_me:3573: result: $with_profile" >&5
3574 echo "${ECHO_T}$with_profile" >&6
3575 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
3576
3577 ###############################################################################
3578
3579 echo "$as_me:3579: checking for specified models" >&5
3580 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3581 test -z "$cf_list_models" && cf_list_models=normal
3582 test "$with_libtool" = "yes" && cf_list_models=libtool
3583 echo "$as_me:3583: result: $cf_list_models" >&5
3584 echo "${ECHO_T}$cf_list_models" >&6
3585
3586 ### Use the first model as the default, and save its suffix for use in building
3587 ### up test-applications.
3588 echo "$as_me:3588: checking for default model" >&5
3589 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3590 DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
3591 echo "$as_me:3591: result: $DFT_LWR_MODEL" >&5
3592 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3593
3594 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3595
3596 TINFO_NAME=tinfo
3597
3598 LIB_NAME=ncurses
3599
3600 LIB_DIR=../lib
3601
3602         case $cf_cv_system_name in
3603         OS/2*)  LIB_PREFIX=''     ;;
3604         os2*)   LIB_PREFIX=''     ;;
3605         *)      LIB_PREFIX='lib'  ;;
3606         esac
3607 cf_prefix=$LIB_PREFIX
3608
3609 LIB_PREFIX=$cf_prefix
3610
3611 LIB_SUFFIX=
3612
3613 ###############################################################################
3614
3615 echo "$as_me:3615: checking if you want to build a separate terminfo library" >&5
3616 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
3617
3618 # Check whether --with-termlib or --without-termlib was given.
3619 if test "${with_termlib+set}" = set; then
3620   withval="$with_termlib"
3621   with_termlib=$withval
3622 else
3623   with_termlib=no
3624 fi;
3625 echo "$as_me:3625: result: $with_termlib" >&5
3626 echo "${ECHO_T}$with_termlib" >&6
3627
3628 ### Checks for special libraries, must be done up-front.
3629 echo "$as_me:3629: checking if you want to link with dbmalloc for testing" >&5
3630 echo $ECHO_N "checking if you want to link with dbmalloc for testing... $ECHO_C" >&6
3631
3632 # Check whether --with-dbmalloc or --without-dbmalloc was given.
3633 if test "${with_dbmalloc+set}" = set; then
3634   withval="$with_dbmalloc"
3635   with_dbmalloc=$withval
3636 else
3637   with_dbmalloc=no
3638 fi;
3639 echo "$as_me:3639: result: $with_dbmalloc" >&5
3640 echo "${ECHO_T}$with_dbmalloc" >&6
3641 if test "$with_dbmalloc" = yes ; then
3642
3643 echo "$as_me:3643: checking for debug_malloc in -ldbmalloc" >&5
3644 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
3645 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
3646   echo $ECHO_N "(cached) $ECHO_C" >&6
3647 else
3648   ac_check_lib_save_LIBS=$LIBS
3649 LIBS="-ldbmalloc  $LIBS"
3650 cat >conftest.$ac_ext <<_ACEOF
3651 #line 3651 "configure"
3652 #include "confdefs.h"
3653
3654 /* Override any gcc2 internal prototype to avoid an error.  */
3655 #ifdef __cplusplus
3656 extern "C"
3657 #endif
3658 /* We use char because int might match the return type of a gcc2
3659    builtin and then its argument prototype would still apply.  */
3660 char debug_malloc ();
3661 int
3662 main ()
3663 {
3664 debug_malloc ();
3665   ;
3666   return 0;
3667 }
3668 _ACEOF
3669 rm -f conftest.$ac_objext conftest$ac_exeext
3670 if { (eval echo "$as_me:3670: \"$ac_link\"") >&5
3671   (eval $ac_link) 2>&5
3672   ac_status=$?
3673   echo "$as_me:3673: \$? = $ac_status" >&5
3674   (exit $ac_status); } &&
3675          { ac_try='test -s conftest$ac_exeext'
3676   { (eval echo "$as_me:3676: \"$ac_try\"") >&5
3677   (eval $ac_try) 2>&5
3678   ac_status=$?
3679   echo "$as_me:3679: \$? = $ac_status" >&5
3680   (exit $ac_status); }; }; then
3681   ac_cv_lib_dbmalloc_debug_malloc=yes
3682 else
3683   echo "$as_me: failed program was:" >&5
3684 cat conftest.$ac_ext >&5
3685 ac_cv_lib_dbmalloc_debug_malloc=no
3686 fi
3687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3688 LIBS=$ac_check_lib_save_LIBS
3689 fi
3690 echo "$as_me:3690: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
3691 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
3692 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
3693   cat >>confdefs.h <<EOF
3694 #define HAVE_LIBDBMALLOC 1
3695 EOF
3696
3697   LIBS="-ldbmalloc $LIBS"
3698
3699 fi
3700
3701 fi
3702
3703 echo "$as_me:3703: checking if you want to link with dmalloc for testing" >&5
3704 echo $ECHO_N "checking if you want to link with dmalloc for testing... $ECHO_C" >&6
3705
3706 # Check whether --with-dmalloc or --without-dmalloc was given.
3707 if test "${with_dmalloc+set}" = set; then
3708   withval="$with_dmalloc"
3709   with_dmalloc=$withval
3710 else
3711   with_dmalloc=no
3712 fi;
3713 echo "$as_me:3713: result: $with_dmalloc" >&5
3714 echo "${ECHO_T}$with_dmalloc" >&6
3715 if test "$with_dmalloc" = yes ; then
3716
3717 echo "$as_me:3717: checking for dmalloc_debug in -ldmalloc" >&5
3718 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
3719 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   ac_check_lib_save_LIBS=$LIBS
3723 LIBS="-ldmalloc  $LIBS"
3724 cat >conftest.$ac_ext <<_ACEOF
3725 #line 3725 "configure"
3726 #include "confdefs.h"
3727
3728 /* Override any gcc2 internal prototype to avoid an error.  */
3729 #ifdef __cplusplus
3730 extern "C"
3731 #endif
3732 /* We use char because int might match the return type of a gcc2
3733    builtin and then its argument prototype would still apply.  */
3734 char dmalloc_debug ();
3735 int
3736 main ()
3737 {
3738 dmalloc_debug ();
3739   ;
3740   return 0;
3741 }
3742 _ACEOF
3743 rm -f conftest.$ac_objext conftest$ac_exeext
3744 if { (eval echo "$as_me:3744: \"$ac_link\"") >&5
3745   (eval $ac_link) 2>&5
3746   ac_status=$?
3747   echo "$as_me:3747: \$? = $ac_status" >&5
3748   (exit $ac_status); } &&
3749          { ac_try='test -s conftest$ac_exeext'
3750   { (eval echo "$as_me:3750: \"$ac_try\"") >&5
3751   (eval $ac_try) 2>&5
3752   ac_status=$?
3753   echo "$as_me:3753: \$? = $ac_status" >&5
3754   (exit $ac_status); }; }; then
3755   ac_cv_lib_dmalloc_dmalloc_debug=yes
3756 else
3757   echo "$as_me: failed program was:" >&5
3758 cat conftest.$ac_ext >&5
3759 ac_cv_lib_dmalloc_dmalloc_debug=no
3760 fi
3761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3762 LIBS=$ac_check_lib_save_LIBS
3763 fi
3764 echo "$as_me:3764: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
3765 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
3766 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
3767   cat >>confdefs.h <<EOF
3768 #define HAVE_LIBDMALLOC 1
3769 EOF
3770
3771   LIBS="-ldmalloc $LIBS"
3772
3773 fi
3774
3775 fi
3776
3777 SHLIB_LIST=""
3778 echo "$as_me:3778: checking if you want to link with the gpm mouse library" >&5
3779 echo $ECHO_N "checking if you want to link with the gpm mouse library... $ECHO_C" >&6
3780
3781 # Check whether --with-gpm or --without-gpm was given.
3782 if test "${with_gpm+set}" = set; then
3783   withval="$with_gpm"
3784   with_gpm=$withval
3785 else
3786   with_gpm=no
3787 fi;
3788 echo "$as_me:3788: result: $with_gpm" >&5
3789 echo "${ECHO_T}$with_gpm" >&6
3790 if test "$with_gpm" = yes ; then
3791         echo "$as_me:3791: checking for Gpm_Open in -lgpm" >&5
3792 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
3793 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796   ac_check_lib_save_LIBS=$LIBS
3797 LIBS="-lgpm  $LIBS"
3798 cat >conftest.$ac_ext <<_ACEOF
3799 #line 3799 "configure"
3800 #include "confdefs.h"
3801
3802 /* Override any gcc2 internal prototype to avoid an error.  */
3803 #ifdef __cplusplus
3804 extern "C"
3805 #endif
3806 /* We use char because int might match the return type of a gcc2
3807    builtin and then its argument prototype would still apply.  */
3808 char Gpm_Open ();
3809 int
3810 main ()
3811 {
3812 Gpm_Open ();
3813   ;
3814   return 0;
3815 }
3816 _ACEOF
3817 rm -f conftest.$ac_objext conftest$ac_exeext
3818 if { (eval echo "$as_me:3818: \"$ac_link\"") >&5
3819   (eval $ac_link) 2>&5
3820   ac_status=$?
3821   echo "$as_me:3821: \$? = $ac_status" >&5
3822   (exit $ac_status); } &&
3823          { ac_try='test -s conftest$ac_exeext'
3824   { (eval echo "$as_me:3824: \"$ac_try\"") >&5
3825   (eval $ac_try) 2>&5
3826   ac_status=$?
3827   echo "$as_me:3827: \$? = $ac_status" >&5
3828   (exit $ac_status); }; }; then
3829   ac_cv_lib_gpm_Gpm_Open=yes
3830 else
3831   echo "$as_me: failed program was:" >&5
3832 cat conftest.$ac_ext >&5
3833 ac_cv_lib_gpm_Gpm_Open=no
3834 fi
3835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3836 LIBS=$ac_check_lib_save_LIBS
3837 fi
3838 echo "$as_me:3838: result: $ac_cv_lib_gpm_Gpm_Open" >&5
3839 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
3840 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
3841
3842                 EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
3843                 SHLIB_LIST="-lgpm $SHLIB_LIST"
3844                 cat >>confdefs.h <<\EOF
3845 #define HAVE_LIBGPM 1
3846 EOF
3847
3848 for ac_header in gpm.h
3849 do
3850 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3851 echo "$as_me:3851: checking for $ac_header" >&5
3852 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3853 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3854   echo $ECHO_N "(cached) $ECHO_C" >&6
3855 else
3856   cat >conftest.$ac_ext <<_ACEOF
3857 #line 3857 "configure"
3858 #include "confdefs.h"
3859 #include <$ac_header>
3860 _ACEOF
3861 if { (eval echo "$as_me:3861: \"$ac_cpp conftest.$ac_ext\"") >&5
3862   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3863   ac_status=$?
3864   egrep -v '^ *\+' conftest.er1 >conftest.err
3865   rm -f conftest.er1
3866   cat conftest.err >&5
3867   echo "$as_me:3867: \$? = $ac_status" >&5
3868   (exit $ac_status); } >/dev/null; then
3869   if test -s conftest.err; then
3870     ac_cpp_err=$ac_c_preproc_warn_flag
3871   else
3872     ac_cpp_err=
3873   fi
3874 else
3875   ac_cpp_err=yes
3876 fi
3877 if test -z "$ac_cpp_err"; then
3878   eval "$as_ac_Header=yes"
3879 else
3880   echo "$as_me: failed program was:" >&5
3881   cat conftest.$ac_ext >&5
3882   eval "$as_ac_Header=no"
3883 fi
3884 rm -f conftest.err conftest.$ac_ext
3885 fi
3886 echo "$as_me:3886: result: `eval echo '${'$as_ac_Header'}'`" >&5
3887 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3888 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3889   cat >>confdefs.h <<EOF
3890 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3891 EOF
3892
3893 fi
3894 done
3895
3896 else
3897   { echo "$as_me:3897: WARNING: Cannot link with gpm library - read the FAQ" >&5
3898 echo "$as_me: WARNING: Cannot link with gpm library - read the FAQ" >&2;}
3899 fi
3900
3901 fi
3902
3903 if test X"$CC_G_OPT" = X"" ; then
3904         CC_G_OPT='-g'
3905         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
3906 fi
3907
3908 if test X"$CXX_G_OPT" = X"" ; then
3909         CXX_G_OPT='-g'
3910         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
3911 fi
3912
3913 echo "$as_me:3913: checking for default loader flags" >&5
3914 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
3915 case $DFT_LWR_MODEL in
3916 libtool) LD_MODEL=''   ;;
3917 normal)  LD_MODEL=''   ;;
3918 debug)   LD_MODEL=$CC_G_OPT ;;
3919 profile) LD_MODEL='-pg';;
3920 shared)  LD_MODEL=''   ;;
3921 esac
3922 echo "$as_me:3922: result: $LD_MODEL" >&5
3923 echo "${ECHO_T}$LD_MODEL" >&6
3924
3925 echo "$as_me:3925: checking if rpath option should be used" >&5
3926 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
3927
3928 # Check whether --enable-rpath or --disable-rpath was given.
3929 if test "${enable_rpath+set}" = set; then
3930   enableval="$enable_rpath"
3931   cf_cv_ld_rpath=$enableval
3932 else
3933   cf_cv_ld_rpath=no
3934 fi;
3935 echo "$as_me:3935: result: $cf_cv_ld_rpath" >&5
3936 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
3937
3938         LOCAL_LDFLAGS=
3939         LOCAL_LDFLAGS2=
3940         LD_SHARED_OPTS=
3941         INSTALL_LIB="-m 644"
3942
3943         cf_cv_do_symlinks=no
3944
3945         echo "$as_me:3945: checking if release/abi version should be used for shared libs" >&5
3946 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
3947
3948 # Check whether --with-shlib-version or --without-shlib-version was given.
3949 if test "${with_shlib_version+set}" = set; then
3950   withval="$with_shlib_version"
3951   test -z "$withval" && withval=auto
3952         case $withval in #(vi
3953         yes) #(vi
3954                 cf_cv_shlib_version=auto
3955                 ;;
3956         rel|abi|auto|no) #(vi
3957                 cf_cv_shlib_version=$withval
3958                 ;;
3959         *)
3960                 { { echo "$as_me:3960: error: option value must be one of: rel, abi, auto or no" >&5
3961 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
3962    { (exit 1); exit 1; }; }
3963                 ;;
3964         esac
3965
3966 else
3967   cf_cv_shlib_version=auto
3968 fi;
3969         echo "$as_me:3969: result: $cf_cv_shlib_version" >&5
3970 echo "${ECHO_T}$cf_cv_shlib_version" >&6
3971
3972         cf_cv_rm_so_locs=no
3973
3974         # Some less-capable ports of gcc support only -fpic
3975         CC_SHARED_OPTS=
3976         if test "$GCC" = yes
3977         then
3978                 echo "$as_me:3978: checking which $CC option to use" >&5
3979 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
3980                 cf_save_CFLAGS="$CFLAGS"
3981                 for CC_SHARED_OPTS in -fPIC -fpic ''
3982                 do
3983                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
3984                         cat >conftest.$ac_ext <<_ACEOF
3985 #line 3985 "configure"
3986 #include "confdefs.h"
3987 #include <stdio.h>
3988 int
3989 main ()
3990 {
3991 int x = 1
3992   ;
3993   return 0;
3994 }
3995 _ACEOF
3996 rm -f conftest.$ac_objext
3997 if { (eval echo "$as_me:3997: \"$ac_compile\"") >&5
3998   (eval $ac_compile) 2>&5
3999   ac_status=$?
4000   echo "$as_me:4000: \$? = $ac_status" >&5
4001   (exit $ac_status); } &&
4002          { ac_try='test -s conftest.$ac_objext'
4003   { (eval echo "$as_me:4003: \"$ac_try\"") >&5
4004   (eval $ac_try) 2>&5
4005   ac_status=$?
4006   echo "$as_me:4006: \$? = $ac_status" >&5
4007   (exit $ac_status); }; }; then
4008   break
4009 else
4010   echo "$as_me: failed program was:" >&5
4011 cat conftest.$ac_ext >&5
4012 fi
4013 rm -f conftest.$ac_objext conftest.$ac_ext
4014                 done
4015                 echo "$as_me:4015: result: $CC_SHARED_OPTS" >&5
4016 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4017                 CFLAGS="$cf_save_CFLAGS"
4018         fi
4019
4020         cf_cv_shlib_version_infix=no
4021
4022         case $cf_cv_system_name in
4023         beos*)
4024                 MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4025                 ;;
4026         cygwin*)
4027                 CC_SHARED_OPTS=
4028                 MK_SHARED_LIB='$(CC) -shared -Wl,--out-implib=$(IMPORT_LIB) -Wl,--export-all-symbols -o $(SHARED_LIB)'
4029                 cf_cv_shlib_version=cygdll
4030                 cf_cv_shlib_version_infix=cygdll
4031                 ;;
4032         darwin*)
4033                 EXTRA_CFLAGS="-no-cpp-precomp"
4034                 CC_SHARED_OPTS="-dynamic"
4035                 MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
4036                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4037                 cf_cv_shlib_version_infix=yes
4038                 ;;
4039         hpux*)
4040                 # (tested with gcc 2.7.2 -- I don't have c89)
4041                 if test "$GCC" = yes; then
4042                         LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
4043                 else
4044                         CC_SHARED_OPTS='+Z'
4045                         LD_SHARED_OPTS='-Wl,+b,$(libdir)'
4046                 fi
4047                 MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@'
4048                 # HP-UX shared libraries must be executable, and should be
4049                 # readonly to exploit a quirk in the memory manager.
4050                 INSTALL_LIB="-m 555"
4051                 ;;
4052         irix*)
4053                 if test "$cf_cv_ld_rpath" = yes ; then
4054                         cf_ld_rpath_opt="-Wl,-rpath,"
4055                         EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
4056                 fi
4057                 # tested with IRIX 5.2 and 'cc'.
4058                 if test "$GCC" != yes; then
4059                         CC_SHARED_OPTS='-KPIC'
4060                 fi
4061                 MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
4062                 cf_cv_rm_so_locs=yes
4063                 ;;
4064         linux*|gnu*)
4065                 if test "$DFT_LWR_MODEL" = "shared" ; then
4066                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
4067                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
4068                 fi
4069                 if test "$cf_cv_ld_rpath" = yes ; then
4070                         cf_ld_rpath_opt="-Wl,-rpath,"
4071                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
4072                 fi
4073                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4074                 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
4075                 ;;
4076         openbsd2*)
4077                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4078                 MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
4079                 ;;
4080         openbsd*|freebsd*)
4081                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4082                 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
4083                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4084                 ;;
4085         netbsd*)
4086                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
4087                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
4088                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
4089                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
4090                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
4091                         EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
4092                         MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
4093                         if test "$cf_cv_shlib_version" = auto; then
4094                         if test ! -f /usr/libexec/ld.elf_so; then
4095                                 cf_cv_shlib_version=rel
4096                         fi
4097                         fi
4098                 else
4099                         MK_SHARED_LIB='$(LD) -Bshareable -o $@'
4100                 fi
4101                 ;;
4102         osf*|mls+*)
4103                 # tested with OSF/1 V3.2 and 'cc'
4104                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
4105                 # link with shared libs).
4106                 MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
4107                 case $host_os in
4108                 osf4*)
4109                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
4110                         ;;
4111                 esac
4112                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
4113                 if test "$DFT_LWR_MODEL" = "shared" ; then
4114                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
4115                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
4116                 fi
4117                 if test "$cf_cv_ld_rpath" = yes ; then
4118                         cf_ld_rpath_opt="-rpath"
4119                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
4120                 fi
4121                 cf_cv_rm_so_locs=yes
4122                 ;;
4123         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
4124                 # tested with osr5.0.5
4125                 if test "$ac_cv_c_compiler_gnu" != yes; then
4126                         CC_SHARED_OPTS='-belf -KPIC'
4127                 fi
4128                 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
4129                 if test "$cf_cv_ld_rpath" = yes ; then
4130                         # only way is to set LD_RUN_PATH but no switch for it
4131                         RUN_PATH=$libdir
4132                 fi
4133                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4134                 LINK_PROGS='LD_RUN_PATH=$(libdir)'
4135                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
4136                 ;;
4137         sunos4*)
4138                 # tested with SunOS 4.1.1 and gcc 2.7.0
4139                 if test "$ac_cv_c_compiler_gnu" != yes; then
4140                         CC_SHARED_OPTS='-KPIC'
4141                 fi
4142                 MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
4143                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4144                 ;;
4145         solaris2*)
4146                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
4147                 if test "$ac_cv_c_compiler_gnu" != yes; then
4148                         CC_SHARED_OPTS='-KPIC'
4149                 fi
4150                 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
4151                 if test "$DFT_LWR_MODEL" = "shared" ; then
4152                         LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
4153                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
4154                 fi
4155                 if test "$cf_cv_ld_rpath" = yes ; then
4156                         cf_ld_rpath_opt="-R"
4157                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
4158                 fi
4159                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
4160                 ;;
4161         sysv5uw7*|unix_sv*)
4162                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
4163                 if test "$ac_cv_c_compiler_gnu" != yes; then
4164                         CC_SHARED_OPTS='-KPIC'
4165                 fi
4166                 MK_SHARED_LIB='$(LD) -d y -G -o $@'
4167                 ;;
4168         *)
4169                 CC_SHARED_OPTS='unknown'
4170                 MK_SHARED_LIB='echo unknown'
4171                 ;;
4172         esac
4173
4174         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
4175         case "$cf_cv_shlib_version" in #(vi
4176         rel|abi)
4177                 case "$MK_SHARED_LIB" in #(vi
4178                 *'-o $@')
4179                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
4180                         ;;
4181                 *)
4182                         { echo "$as_me:4182: WARNING: ignored --with-shlib-version" >&5
4183 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
4184                         ;;
4185                 esac
4186                 ;;
4187         esac
4188
4189         if test -n "$cf_ld_rpath_opt" ; then
4190                 echo "$as_me:4190: checking if we need a space after rpath option" >&5
4191 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
4192                 cf_save_LIBS="$LIBS"
4193                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
4194                 cat >conftest.$ac_ext <<_ACEOF
4195 #line 4195 "configure"
4196 #include "confdefs.h"
4197
4198 int
4199 main ()
4200 {
4201
4202   ;
4203   return 0;
4204 }
4205 _ACEOF
4206 rm -f conftest.$ac_objext conftest$ac_exeext
4207 if { (eval echo "$as_me:4207: \"$ac_link\"") >&5
4208   (eval $ac_link) 2>&5
4209   ac_status=$?
4210   echo "$as_me:4210: \$? = $ac_status" >&5
4211   (exit $ac_status); } &&
4212          { ac_try='test -s conftest$ac_exeext'
4213   { (eval echo "$as_me:4213: \"$ac_try\"") >&5
4214   (eval $ac_try) 2>&5
4215   ac_status=$?
4216   echo "$as_me:4216: \$? = $ac_status" >&5
4217   (exit $ac_status); }; }; then
4218   cf_rpath_space=no
4219 else
4220   echo "$as_me: failed program was:" >&5
4221 cat conftest.$ac_ext >&5
4222 cf_rpath_space=yes
4223 fi
4224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4225                 LIBS="$cf_save_LIBS"
4226                 echo "$as_me:4226: result: $cf_rpath_space" >&5
4227 echo "${ECHO_T}$cf_rpath_space" >&6
4228                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
4229                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
4230         fi
4231
4232 if test "$CC_SHARED_OPTS" = "unknown"; then
4233         for model in $cf_list_models; do
4234                 if test "$model" = "shared"; then
4235                         { { echo "$as_me:4235: error: Shared libraries are not supported in this version" >&5
4236 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
4237    { (exit 1); exit 1; }; }
4238                 fi
4239         done
4240 fi
4241
4242 ###############################################################################
4243
4244 ###     use option --disable-overwrite to leave out the link to -lcurses
4245 echo "$as_me:4245: checking if you wish to install ncurses overwriting curses" >&5
4246 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
4247
4248 # Check whether --enable-overwrite or --disable-overwrite was given.
4249 if test "${enable_overwrite+set}" = set; then
4250   enableval="$enable_overwrite"
4251   with_overwrite=$enableval
4252 else
4253   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
4254 fi;
4255 echo "$as_me:4255: result: $with_overwrite" >&5
4256 echo "${ECHO_T}$with_overwrite" >&6
4257
4258 echo "$as_me:4258: checking if external terminfo-database is used" >&5
4259 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
4260
4261 # Check whether --enable-database or --disable-database was given.
4262 if test "${enable_database+set}" = set; then
4263   enableval="$enable_database"
4264   use_database=$enableval
4265 else
4266   use_database=yes
4267 fi;
4268 echo "$as_me:4268: result: $use_database" >&5
4269 echo "${ECHO_T}$use_database" >&6
4270
4271 case $host_os in #(vi
4272 os2*) #(vi
4273         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
4274         ;;
4275 *) #(vi
4276         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
4277         ;;
4278 esac
4279
4280         case $cf_cv_system_name in
4281         os2*)   PATHSEP=';'  ;;
4282         *)      PATHSEP=':'  ;;
4283         esac
4284
4285 if test "$use_database" != no ; then
4286         cat >>confdefs.h <<\EOF
4287 #define USE_DATABASE 1
4288 EOF
4289
4290         echo "$as_me:4290: checking which terminfo source-file will be installed" >&5
4291 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
4292
4293 # Check whether --enable-database or --disable-database was given.
4294 if test "${enable_database+set}" = set; then
4295   enableval="$enable_database"
4296   TERMINFO_SRC=$withval
4297 fi;
4298         echo "$as_me:4298: result: $TERMINFO_SRC" >&5
4299 echo "${ECHO_T}$TERMINFO_SRC" >&6
4300 fi
4301
4302 echo "$as_me:4302: checking for list of fallback descriptions" >&5
4303 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
4304
4305 # Check whether --with-fallbacks or --without-fallbacks was given.
4306 if test "${with_fallbacks+set}" = set; then
4307   withval="$with_fallbacks"
4308   with_fallback=$withval
4309 else
4310   with_fallback=
4311 fi;
4312 echo "$as_me:4312: result: $with_fallback" >&5
4313 echo "${ECHO_T}$with_fallback" >&6
4314 FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'`
4315
4316 MAKE_TERMINFO=
4317 if test "$use_database" = no ; then
4318         TERMINFO="${datadir}/terminfo"
4319         MAKE_TERMINFO="#"
4320 else
4321
4322 echo "$as_me:4322: checking for list of terminfo directories" >&5
4323 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
4324
4325 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
4326 if test "${with_terminfo_dirs+set}" = set; then
4327   withval="$with_terminfo_dirs"
4328
4329 else
4330   withval=${TERMINFO_DIRS-${datadir}/terminfo}
4331 fi;
4332 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
4333 cf_dst_path=
4334 for cf_src_path in $withval
4335 do
4336
4337 case ".$cf_src_path" in #(vi
4338 .\$\(*\)*|.\'*\'*) #(vi
4339   ;;
4340 ..|./*|.\\*) #(vi
4341   ;;
4342 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4343   ;;
4344 .\${*prefix}*) #(vi
4345   eval cf_src_path="$cf_src_path"
4346   case ".$cf_src_path" in #(vi
4347   .NONE/*)
4348     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
4349     ;;
4350   esac
4351   ;; #(vi
4352 .NONE/*)
4353   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
4354   ;;
4355 *)
4356   { { echo "$as_me:4356: error: expected a pathname, not \"$cf_src_path\"" >&5
4357 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
4358    { (exit 1); exit 1; }; }
4359   ;;
4360 esac
4361
4362   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
4363   cf_dst_path="${cf_dst_path}${cf_src_path}"
4364 done
4365 IFS="$ac_save_ifs"
4366
4367 eval 'TERMINFO_DIRS="$cf_dst_path"'
4368
4369 echo "$as_me:4369: result: $TERMINFO_DIRS" >&5
4370 echo "${ECHO_T}$TERMINFO_DIRS" >&6
4371 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
4372 #define TERMINFO_DIRS "$TERMINFO_DIRS"
4373 EOF
4374
4375 echo "$as_me:4375: checking for default terminfo directory" >&5
4376 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
4377
4378 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
4379 if test "${with_default_terminfo_dir+set}" = set; then
4380   withval="$with_default_terminfo_dir"
4381
4382 else
4383   withval="${TERMINFO-${datadir}/terminfo}"
4384 fi;
4385 case ".$withval" in #(vi
4386 .\$\(*\)*|.\'*\'*) #(vi
4387   ;;
4388 ..|./*|.\\*) #(vi
4389   ;;
4390 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4391   ;;
4392 .\${*prefix}*) #(vi
4393   eval withval="$withval"
4394   case ".$withval" in #(vi
4395   .NONE/*)
4396     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
4397     ;;
4398   esac
4399   ;; #(vi
4400 .NONE/*)
4401   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
4402   ;;
4403 *)
4404   { { echo "$as_me:4404: error: expected a pathname, not \"$withval\"" >&5
4405 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4406    { (exit 1); exit 1; }; }
4407   ;;
4408 esac
4409
4410 eval TERMINFO="$withval"
4411
4412 echo "$as_me:4412: result: $TERMINFO" >&5
4413 echo "${ECHO_T}$TERMINFO" >&6
4414 cat >>confdefs.h <<EOF
4415 #define TERMINFO "$TERMINFO"
4416 EOF
4417
4418 fi
4419
4420 ###     use option --disable-big-core to make tic run on small machines
4421 ###     We need 4Mb, check if we can allocate 50% more than that.
4422 echo "$as_me:4422: checking if big-core option selected" >&5
4423 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
4424
4425 # Check whether --enable-big-core or --disable-big-core was given.
4426 if test "${enable_big_core+set}" = set; then
4427   enableval="$enable_big_core"
4428   with_big_core=$enableval
4429 else
4430   if test "$cross_compiling" = yes; then
4431   with_big_core=no
4432 else
4433   cat >conftest.$ac_ext <<_ACEOF
4434 #line 4434 "configure"
4435 #include "confdefs.h"
4436
4437 #include <stdlib.h>
4438 #include <string.h>
4439 int main() {
4440         unsigned long n = 6000000L;
4441         char *s = malloc(n);
4442         if (s != 0)
4443                 s[0] = s[n-1] = 0;
4444         exit(s == 0);
4445 }
4446 _ACEOF
4447 rm -f conftest$ac_exeext
4448 if { (eval echo "$as_me:4448: \"$ac_link\"") >&5
4449   (eval $ac_link) 2>&5
4450   ac_status=$?
4451   echo "$as_me:4451: \$? = $ac_status" >&5
4452   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4453   { (eval echo "$as_me:4453: \"$ac_try\"") >&5
4454   (eval $ac_try) 2>&5
4455   ac_status=$?
4456   echo "$as_me:4456: \$? = $ac_status" >&5
4457   (exit $ac_status); }; }; then
4458   with_big_core=yes
4459 else
4460   echo "$as_me: program exited with status $ac_status" >&5
4461 echo "$as_me: failed program was:" >&5
4462 cat conftest.$ac_ext >&5
4463 with_big_core=no
4464 fi
4465 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4466 fi
4467 fi;
4468 echo "$as_me:4468: result: $with_big_core" >&5
4469 echo "${ECHO_T}$with_big_core" >&6
4470 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
4471 #define HAVE_BIG_CORE 1
4472 EOF
4473
4474 ###     use option --enable-termcap to compile in the termcap fallback support
4475 echo "$as_me:4475: checking if you want termcap-fallback support" >&5
4476 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
4477
4478 # Check whether --enable-termcap or --disable-termcap was given.
4479 if test "${enable_termcap+set}" = set; then
4480   enableval="$enable_termcap"
4481   with_termcap=$enableval
4482 else
4483   with_termcap=no
4484 fi;
4485 echo "$as_me:4485: result: $with_termcap" >&5
4486 echo "${ECHO_T}$with_termcap" >&6
4487
4488 if test "$with_termcap" != "yes" ; then
4489         if test "$use_database" = no ; then
4490                 if test -z $with_fallback ; then
4491                         { { echo "$as_me:4491: error: You have disabled the database w/o specifying fallbacks" >&5
4492 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
4493    { (exit 1); exit 1; }; }
4494                 fi
4495         fi
4496         cat >>confdefs.h <<\EOF
4497 #define PURE_TERMINFO 1
4498 EOF
4499
4500 else
4501
4502 cat >>confdefs.h <<\EOF
4503 #define USE_TERMCAP 1
4504 EOF
4505
4506 echo "$as_me:4506: checking for list of termcap files" >&5
4507 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
4508
4509 # Check whether --with-termpath or --without-termpath was given.
4510 if test "${with_termpath+set}" = set; then
4511   withval="$with_termpath"
4512
4513 else
4514   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
4515 fi;
4516 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
4517 cf_dst_path=
4518 for cf_src_path in $withval
4519 do
4520
4521 case ".$cf_src_path" in #(vi
4522 .\$\(*\)*|.\'*\'*) #(vi
4523   ;;
4524 ..|./*|.\\*) #(vi
4525   ;;
4526 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4527   ;;
4528 .\${*prefix}*) #(vi
4529   eval cf_src_path="$cf_src_path"
4530   case ".$cf_src_path" in #(vi
4531   .NONE/*)
4532     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
4533     ;;
4534   esac
4535   ;; #(vi
4536 .NONE/*)
4537   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
4538   ;;
4539 *)
4540   { { echo "$as_me:4540: error: expected a pathname, not \"$cf_src_path\"" >&5
4541 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
4542    { (exit 1); exit 1; }; }
4543   ;;
4544 esac
4545
4546   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
4547   cf_dst_path="${cf_dst_path}${cf_src_path}"
4548 done
4549 IFS="$ac_save_ifs"
4550
4551 eval 'TERMPATH="$cf_dst_path"'
4552
4553 echo "$as_me:4553: result: $TERMPATH" >&5
4554 echo "${ECHO_T}$TERMPATH" >&6
4555 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
4556 #define TERMPATH "$TERMPATH"
4557 EOF
4558
4559 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
4560 echo "$as_me:4560: checking if fast termcap-loader is needed" >&5
4561 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
4562
4563 # Check whether --enable-getcap or --disable-getcap was given.
4564 if test "${enable_getcap+set}" = set; then
4565   enableval="$enable_getcap"
4566   with_getcap=$enableval
4567 else
4568   with_getcap=no
4569 fi;
4570 echo "$as_me:4570: result: $with_getcap" >&5
4571 echo "${ECHO_T}$with_getcap" >&6
4572 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
4573 #define USE_GETCAP 1
4574 EOF
4575
4576 echo "$as_me:4576: checking if translated termcaps will be cached in ~/.terminfo" >&5
4577 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
4578
4579 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
4580 if test "${enable_getcap_cache+set}" = set; then
4581   enableval="$enable_getcap_cache"
4582   with_getcap_cache=$enableval
4583 else
4584   with_getcap_cache=no
4585 fi;
4586 echo "$as_me:4586: result: $with_getcap_cache" >&5
4587 echo "${ECHO_T}$with_getcap_cache" >&6
4588 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
4589 #define USE_GETCAP_CACHE 1
4590 EOF
4591
4592 fi
4593
4594 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
4595 ###   to reduce storage requirements for the terminfo database.
4596
4597 for ac_func in \
4598         remove \
4599         unlink
4600 do
4601 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4602 echo "$as_me:4602: checking for $ac_func" >&5
4603 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4604 if eval "test \"\${$as_ac_var+set}\" = set"; then
4605   echo $ECHO_N "(cached) $ECHO_C" >&6
4606 else
4607   cat >conftest.$ac_ext <<_ACEOF
4608 #line 4608 "configure"
4609 #include "confdefs.h"
4610 /* System header to define __stub macros and hopefully few prototypes,
4611     which can conflict with char $ac_func (); below.  */
4612 #include <assert.h>
4613 /* Override any gcc2 internal prototype to avoid an error.  */
4614 #ifdef __cplusplus
4615 extern "C"
4616 #endif
4617 /* We use char because int might match the return type of a gcc2
4618    builtin and then its argument prototype would still apply.  */
4619 char $ac_func ();
4620 char (*f) ();
4621
4622 int
4623 main ()
4624 {
4625 /* The GNU C library defines this for functions which it implements
4626     to always fail with ENOSYS.  Some functions are actually named
4627     something starting with __ and the normal name is an alias.  */
4628 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4629 choke me
4630 #else
4631 f = $ac_func;
4632 #endif
4633
4634   ;
4635   return 0;
4636 }
4637 _ACEOF
4638 rm -f conftest.$ac_objext conftest$ac_exeext
4639 if { (eval echo "$as_me:4639: \"$ac_link\"") >&5
4640   (eval $ac_link) 2>&5
4641   ac_status=$?
4642   echo "$as_me:4642: \$? = $ac_status" >&5
4643   (exit $ac_status); } &&
4644          { ac_try='test -s conftest$ac_exeext'
4645   { (eval echo "$as_me:4645: \"$ac_try\"") >&5
4646   (eval $ac_try) 2>&5
4647   ac_status=$?
4648   echo "$as_me:4648: \$? = $ac_status" >&5
4649   (exit $ac_status); }; }; then
4650   eval "$as_ac_var=yes"
4651 else
4652   echo "$as_me: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4654 eval "$as_ac_var=no"
4655 fi
4656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4657 fi
4658 echo "$as_me:4658: result: `eval echo '${'$as_ac_var'}'`" >&5
4659 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4660 if test `eval echo '${'$as_ac_var'}'` = yes; then
4661   cat >>confdefs.h <<EOF
4662 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4663 EOF
4664
4665 fi
4666 done
4667
4668 if test "$ac_cv_prog_cc_cross" = yes ; then
4669
4670 for ac_func in \
4671                 link \
4672                 symlink
4673 do
4674 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4675 echo "$as_me:4675: checking for $ac_func" >&5
4676 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4677 if eval "test \"\${$as_ac_var+set}\" = set"; then
4678   echo $ECHO_N "(cached) $ECHO_C" >&6
4679 else
4680   cat >conftest.$ac_ext <<_ACEOF
4681 #line 4681 "configure"
4682 #include "confdefs.h"
4683 /* System header to define __stub macros and hopefully few prototypes,
4684     which can conflict with char $ac_func (); below.  */
4685 #include <assert.h>
4686 /* Override any gcc2 internal prototype to avoid an error.  */
4687 #ifdef __cplusplus
4688 extern "C"
4689 #endif
4690 /* We use char because int might match the return type of a gcc2
4691    builtin and then its argument prototype would still apply.  */
4692 char $ac_func ();
4693 char (*f) ();
4694
4695 int
4696 main ()
4697 {
4698 /* The GNU C library defines this for functions which it implements
4699     to always fail with ENOSYS.  Some functions are actually named
4700     something starting with __ and the normal name is an alias.  */
4701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4702 choke me
4703 #else
4704 f = $ac_func;
4705 #endif
4706
4707   ;
4708   return 0;
4709 }
4710 _ACEOF
4711 rm -f conftest.$ac_objext conftest$ac_exeext
4712 if { (eval echo "$as_me:4712: \"$ac_link\"") >&5
4713   (eval $ac_link) 2>&5
4714   ac_status=$?
4715   echo "$as_me:4715: \$? = $ac_status" >&5
4716   (exit $ac_status); } &&
4717          { ac_try='test -s conftest$ac_exeext'
4718   { (eval echo "$as_me:4718: \"$ac_try\"") >&5
4719   (eval $ac_try) 2>&5
4720   ac_status=$?
4721   echo "$as_me:4721: \$? = $ac_status" >&5
4722   (exit $ac_status); }; }; then
4723   eval "$as_ac_var=yes"
4724 else
4725   echo "$as_me: failed program was:" >&5
4726 cat conftest.$ac_ext >&5
4727 eval "$as_ac_var=no"
4728 fi
4729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4730 fi
4731 echo "$as_me:4731: result: `eval echo '${'$as_ac_var'}'`" >&5
4732 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4733 if test `eval echo '${'$as_ac_var'}'` = yes; then
4734   cat >>confdefs.h <<EOF
4735 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4736 EOF
4737
4738 fi
4739 done
4740
4741 else
4742         echo "$as_me:4742: checking if link/symlink functions work" >&5
4743 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
4744 if test "${cf_cv_link_funcs+set}" = set; then
4745   echo $ECHO_N "(cached) $ECHO_C" >&6
4746 else
4747
4748                 cf_cv_link_funcs=
4749                 for cf_func in link symlink ; do
4750                         if test "$cross_compiling" = yes; then
4751
4752                         eval 'ac_cv_func_'$cf_func'=error'
4753 else
4754   cat >conftest.$ac_ext <<_ACEOF
4755 #line 4755 "configure"
4756 #include "confdefs.h"
4757
4758 #include <sys/types.h>
4759 #include <sys/stat.h>
4760 #ifdef HAVE_UNISTD_H
4761 #include <unistd.h>
4762 #endif
4763 int main()
4764 {
4765         int fail = 0;
4766         char *src = "config.log";
4767         char *dst = "conftest.chk";
4768         struct stat src_sb;
4769         struct stat dst_sb;
4770
4771         stat(src, &src_sb);
4772         fail = ($cf_func("config.log", "conftest.chk") < 0)
4773             || (stat(dst, &dst_sb) < 0)
4774             || (dst_sb.st_mtime != src_sb.st_mtime);
4775 #ifdef HAVE_UNLINK
4776         unlink(dst);
4777 #else
4778         remove(dst);
4779 #endif
4780         exit (fail);
4781 }
4782
4783 _ACEOF
4784 rm -f conftest$ac_exeext
4785 if { (eval echo "$as_me:4785: \"$ac_link\"") >&5
4786   (eval $ac_link) 2>&5
4787   ac_status=$?
4788   echo "$as_me:4788: \$? = $ac_status" >&5
4789   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4790   { (eval echo "$as_me:4790: \"$ac_try\"") >&5
4791   (eval $ac_try) 2>&5
4792   ac_status=$?
4793   echo "$as_me:4793: \$? = $ac_status" >&5
4794   (exit $ac_status); }; }; then
4795
4796                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
4797                         eval 'ac_cv_func_'$cf_func'=yes'
4798 else
4799   echo "$as_me: program exited with status $ac_status" >&5
4800 echo "$as_me: failed program was:" >&5
4801 cat conftest.$ac_ext >&5
4802
4803                         eval 'ac_cv_func_'$cf_func'=no'
4804 fi
4805 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4806 fi
4807                 done
4808                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
4809
4810 fi
4811 echo "$as_me:4811: result: $cf_cv_link_funcs" >&5
4812 echo "${ECHO_T}$cf_cv_link_funcs" >&6
4813         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
4814 #define HAVE_LINK 1
4815 EOF
4816
4817         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
4818 #define HAVE_SYMLINK 1
4819 EOF
4820
4821 fi
4822
4823 with_links=no
4824 with_symlinks=no
4825
4826 if test "$ac_cv_func_link" != yes ; then
4827     echo "$as_me:4827: checking if tic should use symbolic links" >&5
4828 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
4829     if test "$ac_cv_func_symlink" = yes ; then
4830         with_symlinks=yes
4831     else
4832         with_symlinks=no
4833     fi
4834     echo "$as_me:4834: result: $with_symlinks" >&5
4835 echo "${ECHO_T}$with_symlinks" >&6
4836 elif test "$ac_cv_func_symlink" != yes ; then
4837     echo "$as_me:4837: checking if tic should use hard links" >&5
4838 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
4839     if test "$ac_cv_func_link" = yes ; then
4840         with_links=yes
4841     else
4842         with_links=no
4843     fi
4844     echo "$as_me:4844: result: $with_links" >&5
4845 echo "${ECHO_T}$with_links" >&6
4846 else
4847     echo "$as_me:4847: checking if tic should use symbolic links" >&5
4848 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
4849
4850 # Check whether --enable-symlinks or --disable-symlinks was given.
4851 if test "${enable_symlinks+set}" = set; then
4852   enableval="$enable_symlinks"
4853   with_symlinks=$enableval
4854 else
4855   with_symlinks=no
4856 fi;
4857     echo "$as_me:4857: result: $with_symlinks" >&5
4858 echo "${ECHO_T}$with_symlinks" >&6
4859 fi
4860
4861 test "$with_links" = yes && cat >>confdefs.h <<\EOF
4862 #define USE_LINKS 1
4863 EOF
4864
4865 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
4866 #define USE_SYMLINKS 1
4867 EOF
4868
4869 ###   use option --enable-broken-linker to force on use of broken-linker support
4870 echo "$as_me:4870: checking if you want broken-linker support code" >&5
4871 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
4872
4873 # Check whether --enable-broken_linker or --disable-broken_linker was given.
4874 if test "${enable_broken_linker+set}" = set; then
4875   enableval="$enable_broken_linker"
4876   with_broken_linker=$enableval
4877 else
4878   with_broken_linker=$BROKEN_LINKER
4879 fi;
4880 echo "$as_me:4880: result: $with_broken_linker" >&5
4881 echo "${ECHO_T}$with_broken_linker" >&6
4882
4883 BROKEN_LINKER=0
4884 if test "$with_broken_linker" = yes ; then
4885         cat >>confdefs.h <<\EOF
4886 #define BROKEN_LINKER 1
4887 EOF
4888
4889         BROKEN_LINKER=1
4890 elif test $DFT_LWR_MODEL = shared ; then
4891         case $cf_cv_system_name in #(vi
4892         cygwin*)
4893                 cat >>confdefs.h <<\EOF
4894 #define BROKEN_LINKER 1
4895 EOF
4896
4897                 BROKEN_LINKER=1
4898                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
4899
4900                 ;;
4901         esac
4902 fi
4903
4904 ###   use option --with-bool to override bool's type
4905 echo "$as_me:4905: checking for type of bool" >&5
4906 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
4907
4908 # Check whether --with-bool or --without-bool was given.
4909 if test "${with_bool+set}" = set; then
4910   withval="$with_bool"
4911   NCURSES_BOOL="$withval"
4912 else
4913   NCURSES_BOOL=auto
4914 fi;
4915 echo "$as_me:4915: result: $NCURSES_BOOL" >&5
4916 echo "${ECHO_T}$NCURSES_BOOL" >&6
4917
4918 ###   use option --with-ospeed to override ospeed's type
4919 echo "$as_me:4919: checking for type of ospeed" >&5
4920 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
4921
4922 # Check whether --with-ospeed or --without-ospeed was given.
4923 if test "${with_ospeed+set}" = set; then
4924   withval="$with_ospeed"
4925   NCURSES_OSPEED="$withval"
4926 else
4927   NCURSES_OSPEED=short
4928 fi;
4929 echo "$as_me:4929: result: $NCURSES_OSPEED" >&5
4930 echo "${ECHO_T}$NCURSES_OSPEED" >&6
4931
4932 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
4933 echo "$as_me:4933: checking if tputs should process BSD-style prefix padding" >&5
4934 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
4935
4936 # Check whether --enable-bsdpad or --disable-bsdpad was given.
4937 if test "${enable_bsdpad+set}" = set; then
4938   enableval="$enable_bsdpad"
4939   with_bsdpad=$enableval
4940 else
4941   with_bsdpad=no
4942 fi;
4943 echo "$as_me:4943: result: $with_bsdpad" >&5
4944 echo "${ECHO_T}$with_bsdpad" >&6
4945 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
4946 #define BSD_TPUTS 1
4947 EOF
4948
4949 ### Enable compiling-in rcs id's
4950 echo "$as_me:4950: checking if RCS identifiers should be compiled-in" >&5
4951 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
4952
4953 # Check whether --with-rcs-ids or --without-rcs-ids was given.
4954 if test "${with_rcs_ids+set}" = set; then
4955   withval="$with_rcs_ids"
4956   with_rcs_ids=$withval
4957 else
4958   with_rcs_ids=no
4959 fi;
4960 echo "$as_me:4960: result: $with_rcs_ids" >&5
4961 echo "${ECHO_T}$with_rcs_ids" >&6
4962 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
4963 #define USE_RCS_IDS 1
4964 EOF
4965
4966 ###############################################################################
4967
4968 echo "$as_me:4968: checking format of man-pages" >&5
4969 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
4970
4971 # Check whether --with-manpage-format or --without-manpage-format was given.
4972 if test "${with_manpage_format+set}" = set; then
4973   withval="$with_manpage_format"
4974   MANPAGE_FORMAT=$withval
4975 else
4976   MANPAGE_FORMAT=unknown
4977 fi;
4978
4979 case ".$MANPAGE_FORMAT" in
4980 .gzip|.compress|.BSDI|.normal|.formatted) # (vi
4981   ;;
4982 .unknown|.) # (vi
4983   if test -z "$MANPATH" ; then
4984     MANPATH="/usr/man:/usr/share/man"
4985   fi
4986   # look for the 'date' man-page (it's most likely to be installed!)
4987   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
4988   MANPAGE_FORMAT=unknown
4989   for cf_dir in $MANPATH; do
4990     test -z "$cf_dir" && cf_dir=/usr/man
4991     for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
4992     do
4993        cf_test=`echo $cf_name | sed -e 's/*//'`
4994        if test "x$cf_test" = "x$cf_name" ; then
4995           case "$cf_name" in
4996           *.gz) MANPAGE_FORMAT=gzip;;
4997           *.Z)  MANPAGE_FORMAT=compress;;
4998           *.0)  MANPAGE_FORMAT=BSDI,formatted;;
4999           *)    MANPAGE_FORMAT=normal;;
5000           esac
5001           break
5002        fi
5003     done
5004     if test "$MANPAGE_FORMAT" != "unknown" ; then
5005        break
5006     fi
5007   done
5008   IFS="$ac_save_ifs"
5009   ;;
5010 .*) # (vi
5011   { echo "$as_me:5011: WARNING: Unexpected manpage-format" >&5
5012 echo "$as_me: WARNING: Unexpected manpage-format" >&2;}
5013   ;;
5014 esac
5015
5016 echo "$as_me:5016: result: $MANPAGE_FORMAT" >&5
5017 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
5018
5019 echo "$as_me:5019: checking for manpage renaming" >&5
5020 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
5021
5022 # Check whether --with-manpage-renames or --without-manpage-renames was given.
5023 if test "${with_manpage_renames+set}" = set; then
5024   withval="$with_manpage_renames"
5025   MANPAGE_RENAMES=$withval
5026 else
5027   MANPAGE_RENAMES=yes
5028 fi;
5029
5030 case ".$MANPAGE_RENAMES" in #(vi
5031 .no) #(vi
5032   ;;
5033 .|.yes)
5034   # Debian 'man' program?
5035   if test -f /etc/debian_version ; then
5036     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
5037   else
5038     MANPAGE_RENAMES=no
5039   fi
5040   ;;
5041 esac
5042
5043 if test "$MANPAGE_RENAMES" != no ; then
5044   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
5045     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
5046   elif test ! -f $MANPAGE_RENAMES ; then
5047     { { echo "$as_me:5047: error: not a filename: $MANPAGE_RENAMES" >&5
5048 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
5049    { (exit 1); exit 1; }; }
5050   fi
5051
5052   test ! -d man && mkdir man
5053
5054   # Construct a sed-script to perform renaming within man-pages
5055   if test -n "$MANPAGE_RENAMES" ; then
5056     test ! -d man && mkdir man
5057     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >man/edit_man.sed
5058   fi
5059 fi
5060
5061 echo "$as_me:5061: result: $MANPAGE_RENAMES" >&5
5062 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
5063
5064 echo "$as_me:5064: checking for manpage symlinks" >&5
5065 echo $ECHO_N "checking for manpage symlinks... $ECHO_C" >&6
5066
5067 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
5068 if test "${with_manpage_symlinks+set}" = set; then
5069   withval="$with_manpage_symlinks"
5070   MANPAGE_SYMLINKS=$withval
5071 else
5072   MANPAGE_SYMLINKS=yes
5073 fi;
5074
5075 echo "$as_me:5075: result: $MANPAGE_SYMLINKS" >&5
5076 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
5077
5078 echo "$as_me:5078: checking for manpage tbl" >&5
5079 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
5080
5081 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
5082 if test "${with_manpage_tbl+set}" = set; then
5083   withval="$with_manpage_tbl"
5084   MANPAGE_TBL=$withval
5085 else
5086   MANPAGE_TBL=no
5087 fi;
5088
5089 echo "$as_me:5089: result: $MANPAGE_TBL" >&5
5090 echo "${ECHO_T}$MANPAGE_TBL" >&6
5091
5092   if test "$prefix" = "NONE" ; then
5093      cf_prefix="$ac_default_prefix"
5094   else
5095      cf_prefix="$prefix"
5096   fi
5097
5098   case "$MANPAGE_FORMAT" in # (vi
5099   *formatted*) # (vi
5100     cf_subdir='$mandir/cat'
5101     cf_format=yes
5102     ;;
5103   *)
5104     cf_subdir='$mandir/man'
5105     cf_format=no
5106     ;;
5107   esac
5108
5109 test ! -d man && mkdir man
5110 cat >man/edit_man.sh <<CF_EOF
5111 #! /bin/sh
5112 # this script is generated by the configure-script
5113 prefix="$cf_prefix"
5114 datadir="$datadir"
5115 NCURSES_OSPEED="$NCURSES_OSPEED"
5116 TERMINFO="$TERMINFO"
5117 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
5118 INSTALL="$INSTALL"
5119 INSTALL_DATA="$INSTALL_DATA"
5120 transform="$program_transform_name"
5121
5122 TMP=\${TMPDIR-/tmp}/man\$\$
5123 trap "rm -f \$TMP" 0 1 2 5 15
5124
5125 verb=\$1
5126 shift
5127
5128 mandir=\$1
5129 shift
5130
5131 srcdir=\$1
5132 shift
5133
5134 for i in \$* ; do
5135 case \$i in #(vi
5136 *.orig|*.rej) ;; #(vi
5137 *.[0-9]*)
5138         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
5139         if test \$verb = installing ; then
5140         if test ! -d $cf_subdir\${section} ; then
5141                 \$MKDIRS $cf_subdir\$section
5142         fi
5143         fi
5144         aliases=
5145         source=\`basename \$i\`
5146         inalias=\$source
5147         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
5148         if test ! -f \$inalias ; then
5149                 echo .. skipped \$source
5150                 continue
5151         fi
5152 CF_EOF
5153 if test "$MANPAGE_SYMLINKS" = yes ; then
5154 cat >>man/edit_man.sh <<CF_EOF
5155         aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
5156 CF_EOF
5157 fi
5158
5159 if test "$MANPAGE_RENAMES" = no ; then
5160 cat >>man/edit_man.sh <<CF_EOF
5161         # perform program transformations for section 1 man pages
5162         if test \$section = 1 ; then
5163                 target=$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
5164         else
5165                 target=$cf_subdir\${section}/\$source
5166         fi
5167 CF_EOF
5168 else
5169 cat >>man/edit_man.sh <<CF_EOF
5170         target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
5171         if test -z "\$target" ; then
5172                 echo '? missing rename for '\$source
5173                 target="\$source"
5174         fi
5175         target="$cf_subdir\${section}/\${target}"
5176 CF_EOF
5177 fi
5178
5179         # replace variables in man page
5180
5181         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
5182         do
5183 cat >>man/edit_man.sh <<CF_EOF
5184         prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
5185 CF_EOF
5186         done
5187
5188 cat >>man/edit_man.sh <<CF_EOF
5189         sed     -e "s,@DATADIR@,\$datadir," \\
5190                 -e "s,@TERMINFO@,\$TERMINFO," \\
5191                 -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
5192 CF_EOF
5193
5194         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
5195         do
5196                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5197 cat >>man/edit_man.sh <<CF_EOF
5198                 -e "s,@$cf_NAME@,\$prog_$cf_name," \\
5199 CF_EOF
5200         done
5201
5202 if test -f $MANPAGE_RENAMES ; then
5203 cat >>man/edit_man.sh <<CF_EOF
5204                 < \$i | sed -f edit_man.sed >\$TMP
5205 CF_EOF
5206 else
5207 cat >>man/edit_man.sh <<CF_EOF
5208                 < \$i >\$TMP
5209 CF_EOF
5210 fi
5211 if test $MANPAGE_TBL = yes ; then
5212 cat >>man/edit_man.sh <<CF_EOF
5213         tbl \$TMP >\$TMP.out
5214         mv \$TMP.out \$TMP
5215 CF_EOF
5216 fi
5217 if test $with_curses_h != yes ; then
5218 cat >>man/edit_man.sh <<CF_EOF
5219         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
5220         mv \$TMP.out \$TMP
5221 CF_EOF
5222 fi
5223 if test $cf_format = yes ; then
5224 cat >>man/edit_man.sh <<CF_EOF
5225         nroff -man \$TMP >\$TMP.out
5226         mv \$TMP.out \$TMP
5227 CF_EOF
5228 fi
5229 case "$MANPAGE_FORMAT" in #(vi
5230 *compress*) #(vi
5231 cat >>man/edit_man.sh <<CF_EOF
5232         if test \$verb = installing ; then
5233         if ( compress -f \$TMP )
5234         then
5235                 mv \$TMP.Z \$TMP
5236         fi
5237         fi
5238         target="\$target.Z"
5239 CF_EOF
5240   ;;
5241 *gzip*) #(vi
5242 cat >>man/edit_man.sh <<CF_EOF
5243         if test \$verb = installing ; then
5244         if ( gzip -f \$TMP )
5245         then
5246                 mv \$TMP.gz \$TMP
5247         fi
5248         fi
5249         target="\$target.gz"
5250 CF_EOF
5251   ;;
5252 *BSDI*)
5253 cat >>man/edit_man.sh <<CF_EOF
5254         # BSDI installs only .0 suffixes in the cat directories
5255         target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
5256 CF_EOF
5257   ;;
5258 esac
5259 cat >>man/edit_man.sh <<CF_EOF
5260         suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
5261         if test \$verb = installing ; then
5262                 echo \$verb \$target
5263                 \$INSTALL_DATA \$TMP \$target
5264                 test -n "\$aliases" && (
5265                         cd $cf_subdir\${section} && (
5266                                 target=\`basename \$target\`
5267                                 for cf_alias in \$aliases
5268                                 do
5269                                         if test \$section = 1 ; then
5270                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
5271                                         fi
5272
5273                                         if test -f \$cf_alias\${suffix} ; then
5274                                                 if ( cmp -s \$target \$cf_alias\${suffix} )
5275                                                 then
5276                                                         :
5277                                                 else
5278                                                         echo .. \$verb alias \$cf_alias\${suffix}
5279                                                         rm -f \$cf_alias\${suffix}
5280                                                         $LN_S \$target \$cf_alias\${suffix}
5281                                                 fi
5282                                         else
5283                                                 echo .. \$verb alias \$cf_alias\${suffix}
5284                                                 rm -f \$cf_alias\${suffix}
5285                                                 $LN_S \$target \$cf_alias\${suffix}
5286                                         fi
5287                                 done
5288                         )
5289                 )
5290         elif test \$verb = removing ; then
5291                 echo \$verb \$target
5292                 rm -f \$target
5293                 test -n "\$aliases" && (
5294                         cd $cf_subdir\${section} && (
5295                                 for cf_alias in \$aliases
5296                                 do
5297                                         if test \$section = 1 ; then
5298                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
5299                                         fi
5300
5301                                         echo .. \$verb alias \$cf_alias\${suffix}
5302                                         rm -f \$cf_alias\${suffix}
5303                                 done
5304                         )
5305                 )
5306         else
5307 #               echo ".hy 0"
5308                 cat \$TMP
5309         fi
5310         ;;
5311 esac
5312 done
5313 exit 0
5314 CF_EOF
5315 chmod 755 man/edit_man.sh
5316
5317 ###############################################################################
5318
5319 ### Note that some functions (such as const) are normally disabled anyway.
5320 echo "$as_me:5320: checking if you want to build with function extensions" >&5
5321 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
5322
5323 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
5324 if test "${enable_ext_funcs+set}" = set; then
5325   enableval="$enable_ext_funcs"
5326   with_ext_funcs=$enableval
5327 else
5328   with_ext_funcs=yes
5329 fi;
5330 echo "$as_me:5330: result: $with_ext_funcs" >&5
5331 echo "${ECHO_T}$with_ext_funcs" >&6
5332 if test "$with_ext_funcs" = yes ; then
5333         NCURSES_EXT_FUNCS=1
5334         cat >>confdefs.h <<\EOF
5335 #define HAVE_CURSES_VERSION 1
5336 EOF
5337
5338         cat >>confdefs.h <<\EOF
5339 #define HAVE_HAS_KEY 1
5340 EOF
5341
5342         cat >>confdefs.h <<\EOF
5343 #define HAVE_RESIZETERM 1
5344 EOF
5345
5346         cat >>confdefs.h <<\EOF
5347 #define HAVE_USE_DEFAULT_COLORS 1
5348 EOF
5349
5350         cat >>confdefs.h <<\EOF
5351 #define HAVE_WRESIZE 1
5352 EOF
5353
5354         cat >>confdefs.h <<\EOF
5355 #define NCURSES_EXT_FUNCS 1
5356 EOF
5357
5358 else
5359         NCURSES_EXT_FUNCS=0
5360 fi
5361
5362 ###   use option --enable-const to turn on use of const beyond that in XSI.
5363 echo "$as_me:5363: checking for extended use of const keyword" >&5
5364 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
5365
5366 # Check whether --enable-const or --disable-const was given.
5367 if test "${enable_const+set}" = set; then
5368   enableval="$enable_const"
5369   with_ext_const=$enableval
5370 else
5371   with_ext_const=no
5372 fi;
5373 echo "$as_me:5373: result: $with_ext_const" >&5
5374 echo "${ECHO_T}$with_ext_const" >&6
5375 NCURSES_CONST='/*nothing*/'
5376 if test "$with_ext_const" = yes ; then
5377         NCURSES_CONST=const
5378 fi
5379
5380 echo "$as_me:5380: checking if you want \$NCURSES_NO_PADDING code" >&5
5381 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
5382
5383 # Check whether --enable-no-padding or --disable-no-padding was given.
5384 if test "${enable_no_padding+set}" = set; then
5385   enableval="$enable_no_padding"
5386   with_no_padding=$enableval
5387 else
5388   with_no_padding=$with_ext_funcs
5389 fi;
5390 echo "$as_me:5390: result: $with_no_padding" >&5
5391 echo "${ECHO_T}$with_no_padding" >&6
5392 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
5393 #define NCURSES_NO_PADDING 1
5394 EOF
5395
5396 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
5397 echo "$as_me:5397: checking if you want SIGWINCH handler" >&5
5398 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
5399
5400 # Check whether --enable-sigwinch or --disable-sigwinch was given.
5401 if test "${enable_sigwinch+set}" = set; then
5402   enableval="$enable_sigwinch"
5403   with_sigwinch=$enableval
5404 else
5405   with_sigwinch=$with_ext_funcs
5406 fi;
5407 echo "$as_me:5407: result: $with_sigwinch" >&5
5408 echo "${ECHO_T}$with_sigwinch" >&6
5409 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
5410 #define USE_SIGWINCH 1
5411 EOF
5412
5413 ###   use option --enable-tcap-names to allow user to define new capabilities
5414 echo "$as_me:5414: checking if you want user-definable terminal capabilities like termcap" >&5
5415 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
5416
5417 # Check whether --enable-tcap-names or --disable-tcap-names was given.
5418 if test "${enable_tcap_names+set}" = set; then
5419   enableval="$enable_tcap_names"
5420   with_tcap_names=$enableval
5421 else
5422   with_tcap_names=$with_ext_funcs
5423 fi;
5424 echo "$as_me:5424: result: $with_tcap_names" >&5
5425 echo "${ECHO_T}$with_tcap_names" >&6
5426 NCURSES_XNAMES=0
5427 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
5428
5429 ###############################################################################
5430 # These options are relatively safe to experiment with.
5431
5432 echo "$as_me:5432: checking if you want all development code" >&5
5433 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
5434
5435 # Check whether --with-develop or --without-develop was given.
5436 if test "${with_develop+set}" = set; then
5437   withval="$with_develop"
5438   with_develop=$withval
5439 else
5440   with_develop=no
5441 fi;
5442 echo "$as_me:5442: result: $with_develop" >&5
5443 echo "${ECHO_T}$with_develop" >&6
5444
5445 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
5446 echo "$as_me:5446: checking if you want hard-tabs code" >&5
5447 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
5448
5449 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
5450 if test "${enable_hard_tabs+set}" = set; then
5451   enableval="$enable_hard_tabs"
5452   with_hardtabs=$enableval
5453 else
5454   with_hardtabs=$with_develop
5455 fi;
5456 echo "$as_me:5456: result: $with_hardtabs" >&5
5457 echo "${ECHO_T}$with_hardtabs" >&6
5458 test "$with_hardtabs" = yes && cat >>confdefs.h <<\EOF
5459 #define USE_HARD_TABS 1
5460 EOF
5461
5462 echo "$as_me:5462: checking if you want to use restrict environment when running as root" >&5
5463 echo $ECHO_N "checking if you want to use restrict environment when running as root... $ECHO_C" >&6
5464
5465 # Check whether --enable-root-environ or --disable-root-environ was given.
5466 if test "${enable_root_environ+set}" = set; then
5467   enableval="$enable_root_environ"
5468   with_root_environ=$enableval
5469 else
5470   with_root_environ=yes
5471 fi;
5472 echo "$as_me:5472: result: $with_root_environ" >&5
5473 echo "${ECHO_T}$with_root_environ" >&6
5474 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5475 #define USE_ROOT_ENVIRON 1
5476 EOF
5477
5478 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
5479 echo "$as_me:5479: checking if you want limited support for xmc" >&5
5480 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
5481
5482 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
5483 if test "${enable_xmc_glitch+set}" = set; then
5484   enableval="$enable_xmc_glitch"
5485   with_xmc_glitch=$enableval
5486 else
5487   with_xmc_glitch=$with_develop
5488 fi;
5489 echo "$as_me:5489: result: $with_xmc_glitch" >&5
5490 echo "${ECHO_T}$with_xmc_glitch" >&6
5491 test "$with_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
5492 #define USE_XMC_SUPPORT 1
5493 EOF
5494
5495 ###############################################################################
5496 # These are just experimental, probably should not be in a package:
5497
5498 echo "$as_me:5498: checking if you do not want to assume colors are white-on-black" >&5
5499 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
5500
5501 # Check whether --enable-assumed-color or --disable-assumed-color was given.
5502 if test "${enable_assumed_color+set}" = set; then
5503   enableval="$enable_assumed_color"
5504   with_assumed_color=$enableval
5505 else
5506   with_assumed_color=yes
5507 fi;
5508 echo "$as_me:5508: result: $with_assumed_color" >&5
5509 echo "${ECHO_T}$with_assumed_color" >&6
5510 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
5511 #define USE_ASSUMED_COLOR 1
5512 EOF
5513
5514 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
5515 echo "$as_me:5515: checking if you want hashmap scrolling-optimization code" >&5
5516 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
5517
5518 # Check whether --enable-hashmap or --disable-hashmap was given.
5519 if test "${enable_hashmap+set}" = set; then
5520   enableval="$enable_hashmap"
5521   with_hashmap=$enableval
5522 else
5523   with_hashmap=yes
5524 fi;
5525 echo "$as_me:5525: result: $with_hashmap" >&5
5526 echo "${ECHO_T}$with_hashmap" >&6
5527 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
5528 #define USE_HASHMAP 1
5529 EOF
5530
5531 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
5532 echo "$as_me:5532: checking if you want colorfgbg code" >&5
5533 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
5534
5535 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
5536 if test "${enable_colorfgbg+set}" = set; then
5537   enableval="$enable_colorfgbg"
5538   with_colorfgbg=$enableval
5539 else
5540   with_colorfgbg=no
5541 fi;
5542 echo "$as_me:5542: result: $with_colorfgbg" >&5
5543 echo "${ECHO_T}$with_colorfgbg" >&6
5544 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
5545 #define USE_COLORFGBG 1
5546 EOF
5547
5548 echo "$as_me:5548: checking if you want experimental safe-sprintf code" >&5
5549 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
5550
5551 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
5552 if test "${enable_safe_sprintf+set}" = set; then
5553   enableval="$enable_safe_sprintf"
5554   with_safe_sprintf=$enableval
5555 else
5556   with_safe_sprintf=no
5557 fi;
5558 echo "$as_me:5558: result: $with_safe_sprintf" >&5
5559 echo "${ECHO_T}$with_safe_sprintf" >&6
5560 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
5561 #define USE_SAFE_SPRINTF 1
5562 EOF
5563
5564 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
5565 # when hashmap is used scroll hints are useless
5566 if test "$with_hashmap" = no ; then
5567 echo "$as_me:5567: checking if you want to experiment without scrolling-hints code" >&5
5568 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
5569
5570 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
5571 if test "${enable_scroll_hints+set}" = set; then
5572   enableval="$enable_scroll_hints"
5573   with_scroll_hints=$enableval
5574 else
5575   with_scroll_hints=yes
5576 fi;
5577 echo "$as_me:5577: result: $with_scroll_hints" >&5
5578 echo "${ECHO_T}$with_scroll_hints" >&6
5579 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
5580 #define USE_SCROLL_HINTS 1
5581 EOF
5582
5583 fi
5584
5585 ###   use option --enable-widec to turn on use of wide-character support
5586 NCURSES_CH_T=chtype
5587 NCURSES_LIBUTF8=0
5588 NCURSES_MBSTATE_T=0
5589 echo "$as_me:5589: checking if you want experimental wide-character code" >&5
5590 echo $ECHO_N "checking if you want experimental wide-character code... $ECHO_C" >&6
5591
5592 # Check whether --enable-widec or --disable-widec was given.
5593 if test "${enable_widec+set}" = set; then
5594   enableval="$enable_widec"
5595   with_widec=$enableval
5596 else
5597   with_widec=no
5598 fi;
5599 echo "$as_me:5599: result: $with_widec" >&5
5600 echo "${ECHO_T}$with_widec" >&6
5601 if test "$with_widec" = yes ; then
5602         LIB_SUFFIX="w${LIB_SUFFIX}"
5603         cat >>confdefs.h <<\EOF
5604 #define USE_WIDEC_SUPPORT 1
5605 EOF
5606
5607         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
5608         # with_overwrite=no
5609         NCURSES_CH_T=cchar_t
5610         echo "$as_me:5610: checking for putwc" >&5
5611 echo $ECHO_N "checking for putwc... $ECHO_C" >&6
5612 if test "${ac_cv_func_putwc+set}" = set; then
5613   echo $ECHO_N "(cached) $ECHO_C" >&6
5614 else
5615   cat >conftest.$ac_ext <<_ACEOF
5616 #line 5616 "configure"
5617 #include "confdefs.h"
5618 /* System header to define __stub macros and hopefully few prototypes,
5619     which can conflict with char putwc (); below.  */
5620 #include <assert.h>
5621 /* Override any gcc2 internal prototype to avoid an error.  */
5622 #ifdef __cplusplus
5623 extern "C"
5624 #endif
5625 /* We use char because int might match the return type of a gcc2
5626    builtin and then its argument prototype would still apply.  */
5627 char putwc ();
5628 char (*f) ();
5629
5630 int
5631 main ()
5632 {
5633 /* The GNU C library defines this for functions which it implements
5634     to always fail with ENOSYS.  Some functions are actually named
5635     something starting with __ and the normal name is an alias.  */
5636 #if defined (__stub_putwc) || defined (__stub___putwc)
5637 choke me
5638 #else
5639 f = putwc;
5640 #endif
5641
5642   ;
5643   return 0;
5644 }
5645 _ACEOF
5646 rm -f conftest.$ac_objext conftest$ac_exeext
5647 if { (eval echo "$as_me:5647: \"$ac_link\"") >&5
5648   (eval $ac_link) 2>&5
5649   ac_status=$?
5650   echo "$as_me:5650: \$? = $ac_status" >&5
5651   (exit $ac_status); } &&
5652          { ac_try='test -s conftest$ac_exeext'
5653   { (eval echo "$as_me:5653: \"$ac_try\"") >&5
5654   (eval $ac_try) 2>&5
5655   ac_status=$?
5656   echo "$as_me:5656: \$? = $ac_status" >&5
5657   (exit $ac_status); }; }; then
5658   ac_cv_func_putwc=yes
5659 else
5660   echo "$as_me: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5662 ac_cv_func_putwc=no
5663 fi
5664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5665 fi
5666 echo "$as_me:5666: result: $ac_cv_func_putwc" >&5
5667 echo "${ECHO_T}$ac_cv_func_putwc" >&6
5668
5669 if test "$ac_cv_func_putwc" != yes ; then
5670
5671 echo "$as_me:5671: checking for putwc in libutf8" >&5
5672 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
5673 if test "${cf_cv_libutf8+set}" = set; then
5674   echo $ECHO_N "(cached) $ECHO_C" >&6
5675 else
5676
5677         cf_save_LIBS="$LIBS"
5678         LIBS="-lutf8 $LIBS"
5679 cat >conftest.$ac_ext <<_ACEOF
5680 #line 5680 "configure"
5681 #include "confdefs.h"
5682
5683 #include <libutf8.h>
5684 int
5685 main ()
5686 {
5687 putwc(0,0);
5688   ;
5689   return 0;
5690 }
5691 _ACEOF
5692 rm -f conftest.$ac_objext conftest$ac_exeext
5693 if { (eval echo "$as_me:5693: \"$ac_link\"") >&5
5694   (eval $ac_link) 2>&5
5695   ac_status=$?
5696   echo "$as_me:5696: \$? = $ac_status" >&5
5697   (exit $ac_status); } &&
5698          { ac_try='test -s conftest$ac_exeext'
5699   { (eval echo "$as_me:5699: \"$ac_try\"") >&5
5700   (eval $ac_try) 2>&5
5701   ac_status=$?
5702   echo "$as_me:5702: \$? = $ac_status" >&5
5703   (exit $ac_status); }; }; then
5704   cf_cv_libutf8=yes
5705 else
5706   echo "$as_me: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 cf_cv_libutf8=no
5709 fi
5710 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5711         LIBS="$cf_save_LIBS"
5712
5713 fi
5714 echo "$as_me:5714: result: $cf_cv_libutf8" >&5
5715 echo "${ECHO_T}$cf_cv_libutf8" >&6
5716
5717 if test "$cf_cv_libutf8" = yes ; then
5718         cat >>confdefs.h <<\EOF
5719 #define HAVE_LIBUTF8_H 1
5720 EOF
5721
5722         LIBS="-lutf8 $LIBS"
5723 fi
5724
5725         if test "$cf_cv_libutf8" = yes ; then
5726                 NCURSES_LIBUTF8=1
5727         fi
5728 fi
5729
5730 # This is needed on Tru64 5.0 to declare mbstate_t
5731 echo "$as_me:5731: checking if we must include wchar.h to declare mbstate_t" >&5
5732 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
5733 if test "${cf_cv_mbstate_t+set}" = set; then
5734   echo $ECHO_N "(cached) $ECHO_C" >&6
5735 else
5736
5737 cat >conftest.$ac_ext <<_ACEOF
5738 #line 5738 "configure"
5739 #include "confdefs.h"
5740
5741 #include <stdlib.h>
5742 #ifdef HAVE_LIBUTF8_H
5743 #include <libutf8.h>
5744 #endif
5745 int
5746 main ()
5747 {
5748 mbstate_t state
5749   ;
5750   return 0;
5751 }
5752 _ACEOF
5753 rm -f conftest.$ac_objext
5754 if { (eval echo "$as_me:5754: \"$ac_compile\"") >&5
5755   (eval $ac_compile) 2>&5
5756   ac_status=$?
5757   echo "$as_me:5757: \$? = $ac_status" >&5
5758   (exit $ac_status); } &&
5759          { ac_try='test -s conftest.$ac_objext'
5760   { (eval echo "$as_me:5760: \"$ac_try\"") >&5
5761   (eval $ac_try) 2>&5
5762   ac_status=$?
5763   echo "$as_me:5763: \$? = $ac_status" >&5
5764   (exit $ac_status); }; }; then
5765   cf_cv_mbstate_t=no
5766 else
5767   echo "$as_me: failed program was:" >&5
5768 cat conftest.$ac_ext >&5
5769 cat >conftest.$ac_ext <<_ACEOF
5770 #line 5770 "configure"
5771 #include "confdefs.h"
5772
5773 #include <stdlib.h>
5774 #include <wchar.h>
5775 #ifdef HAVE_LIBUTF8_H
5776 #include <libutf8.h>
5777 #endif
5778 int
5779 main ()
5780 {
5781 mbstate_t value
5782   ;
5783   return 0;
5784 }
5785 _ACEOF
5786 rm -f conftest.$ac_objext
5787 if { (eval echo "$as_me:5787: \"$ac_compile\"") >&5
5788   (eval $ac_compile) 2>&5
5789   ac_status=$?
5790   echo "$as_me:5790: \$? = $ac_status" >&5
5791   (exit $ac_status); } &&
5792          { ac_try='test -s conftest.$ac_objext'
5793   { (eval echo "$as_me:5793: \"$ac_try\"") >&5
5794   (eval $ac_try) 2>&5
5795   ac_status=$?
5796   echo "$as_me:5796: \$? = $ac_status" >&5
5797   (exit $ac_status); }; }; then
5798   cf_cv_mbstate_t=yes
5799 else
5800   echo "$as_me: failed program was:" >&5
5801 cat conftest.$ac_ext >&5
5802 cf_cv_mbstate_t=unknown
5803 fi
5804 rm -f conftest.$ac_objext conftest.$ac_ext
5805 fi
5806 rm -f conftest.$ac_objext conftest.$ac_ext
5807 fi
5808 echo "$as_me:5808: result: $cf_cv_mbstate_t" >&5
5809 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
5810
5811 if test "$cf_cv_mbstate_t" = yes ; then
5812         cat >>confdefs.h <<\EOF
5813 #define NEED_WCHAR_H 1
5814 EOF
5815
5816 fi
5817
5818 if test "$cf_cv_mbstate_t" != unknown ; then
5819         cat >>confdefs.h <<\EOF
5820 #define HAVE_MBSTATE_T 1
5821 EOF
5822
5823 fi
5824
5825         if test $cf_cv_mbstate_t = yes ; then
5826                 NCURSES_MBSTATE_T=1
5827         fi
5828 fi
5829
5830 echo "$as_me:5830: checking for terminal capabilities file" >&5
5831 echo $ECHO_N "checking for terminal capabilities file... $ECHO_C" >&6
5832
5833 # Check whether --with-caps or --without-caps was given.
5834 if test "${with_caps+set}" = set; then
5835   withval="$with_caps"
5836   TERMINFO_CAPS=Caps.$withval
5837 else
5838   TERMINFO_CAPS=Caps
5839 fi;
5840 test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
5841 echo "$as_me:5841: result: $TERMINFO_CAPS" >&5
5842 echo "${ECHO_T}$TERMINFO_CAPS" >&6
5843
5844 ###############################################################################
5845
5846 ###     use option --disable-echo to suppress full display compiling commands
5847 echo "$as_me:5847: checking if you want to display full commands during build" >&5
5848 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
5849
5850 # Check whether --enable-echo or --disable-echo was given.
5851 if test "${enable_echo+set}" = set; then
5852   enableval="$enable_echo"
5853   with_echo=$enableval
5854 else
5855   with_echo=yes
5856 fi;
5857 if test "$with_echo" = yes; then
5858         ECHO_LINK=
5859 else
5860         ECHO_LINK='@ echo linking $@ ... ;'
5861         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
5862 fi
5863 echo "$as_me:5863: result: $with_echo" >&5
5864 echo "${ECHO_T}$with_echo" >&6
5865
5866 ###     use option --enable-warnings to turn on all gcc warnings
5867 echo "$as_me:5867: checking if you want to see compiler warnings" >&5
5868 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
5869
5870 # Check whether --enable-warnings or --disable-warnings was given.
5871 if test "${enable_warnings+set}" = set; then
5872   enableval="$enable_warnings"
5873   with_warnings=$enableval
5874 fi;
5875 echo "$as_me:5875: result: $with_warnings" >&5
5876 echo "${ECHO_T}$with_warnings" >&6
5877
5878 if test -n "$with_warnings"; then
5879         ADAFLAGS="$ADAFLAGS -gnatg"
5880
5881 if test "$GCC" = yes
5882 then
5883         cat > conftest.$ac_ext <<EOF
5884 #line 5884 "configure"
5885 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
5886 EOF
5887         { echo "$as_me:5887: checking for $CC warning options..." >&5
5888 echo "$as_me: checking for $CC warning options..." >&6;}
5889         cf_save_CFLAGS="$CFLAGS"
5890         EXTRA_CFLAGS="-W -Wall"
5891         cf_warn_CONST=""
5892         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
5893         for cf_opt in \
5894                 Wbad-function-cast \
5895                 Wcast-align \
5896                 Wcast-qual \
5897                 Winline \
5898                 Wmissing-declarations \
5899                 Wmissing-prototypes \
5900                 Wnested-externs \
5901                 Wpointer-arith \
5902                 Wshadow \
5903                 Wstrict-prototypes \
5904                 Wundef $cf_warn_CONST
5905         do
5906                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5907                 if { (eval echo "$as_me:5907: \"$ac_compile\"") >&5
5908   (eval $ac_compile) 2>&5
5909   ac_status=$?
5910   echo "$as_me:5910: \$? = $ac_status" >&5
5911   (exit $ac_status); }; then
5912                         test -n "$verbose" && echo "$as_me:5912: result: ... -$cf_opt" >&5
5913 echo "${ECHO_T}... -$cf_opt" >&6
5914                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5915                         test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
5916                 fi
5917         done
5918         rm -f conftest*
5919         CFLAGS="$cf_save_CFLAGS"
5920 fi
5921
5922 fi
5923
5924 if test "$GCC" = yes
5925 then
5926 cat > conftest.i <<EOF
5927 #ifndef GCC_PRINTF
5928 #define GCC_PRINTF 0
5929 #endif
5930 #ifndef GCC_SCANF
5931 #define GCC_SCANF 0
5932 #endif
5933 #ifndef GCC_NORETURN
5934 #define GCC_NORETURN /* nothing */
5935 #endif
5936 #ifndef GCC_UNUSED
5937 #define GCC_UNUSED /* nothing */
5938 #endif
5939 EOF
5940 if test "$GCC" = yes
5941 then
5942         { echo "$as_me:5942: checking for $CC __attribute__ directives..." >&5
5943 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
5944 cat > conftest.$ac_ext <<EOF
5945 #line 5945 "configure"
5946 #include "confdefs.h"
5947 #include "conftest.h"
5948 #include "conftest.i"
5949 #if     GCC_PRINTF
5950 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
5951 #else
5952 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
5953 #endif
5954 #if     GCC_SCANF
5955 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
5956 #else
5957 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
5958 #endif
5959 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
5960 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
5961 extern void foo(void) GCC_NORETURN;
5962 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
5963 EOF
5964         for cf_attribute in scanf printf unused noreturn
5965         do
5966
5967 CF_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5968
5969                 cf_directive="__attribute__(($cf_attribute))"
5970                 echo "checking for $CC $cf_directive" 1>&5
5971                 case $cf_attribute in
5972                 scanf|printf)
5973                 cat >conftest.h <<EOF
5974 #define GCC_$CF_ATTRIBUTE 1
5975 EOF
5976                         ;;
5977                 *)
5978                 cat >conftest.h <<EOF
5979 #define GCC_$CF_ATTRIBUTE $cf_directive
5980 EOF
5981                         ;;
5982                 esac
5983                 if { (eval echo "$as_me:5983: \"$ac_compile\"") >&5
5984   (eval $ac_compile) 2>&5
5985   ac_status=$?
5986   echo "$as_me:5986: \$? = $ac_status" >&5
5987   (exit $ac_status); }; then
5988                         test -n "$verbose" && echo "$as_me:5988: result: ... $cf_attribute" >&5
5989 echo "${ECHO_T}... $cf_attribute" >&6
5990                         cat conftest.h >>confdefs.h
5991 #               else
5992 #                       sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h
5993                 fi
5994         done
5995 else
5996         fgrep define conftest.i >>confdefs.h
5997 fi
5998 rm -rf conftest*
5999 fi
6000
6001 ###     use option --enable-assertions to turn on generation of assertion code
6002 echo "$as_me:6002: checking if you want to enable runtime assertions" >&5
6003 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
6004
6005 # Check whether --enable-assertions or --disable-assertions was given.
6006 if test "${enable_assertions+set}" = set; then
6007   enableval="$enable_assertions"
6008   with_assertions=$enableval
6009 else
6010   with_assertions=no
6011 fi;
6012 echo "$as_me:6012: result: $with_assertions" >&5
6013 echo "${ECHO_T}$with_assertions" >&6
6014 if test -n "$GCC"
6015 then
6016         if test "$with_assertions" = no
6017         then
6018                 cat >>confdefs.h <<\EOF
6019 #define NDEBUG 1
6020 EOF
6021
6022                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
6023         else
6024                 ADAFLAGS="$ADAFLAGS -gnata"
6025         fi
6026 fi
6027
6028 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
6029
6030 # Check whether --enable-leaks or --disable-leaks was given.
6031 if test "${enable_leaks+set}" = set; then
6032   enableval="$enable_leaks"
6033   test "$enableval" = no && cat >>confdefs.h <<\EOF
6034 #define NO_LEAKS 1
6035 EOF
6036
6037 fi;
6038 cat >>confdefs.h <<\EOF
6039 #define HAVE_NC_ALLOC_H 1
6040 EOF
6041
6042 ###     use option --enable-expanded to generate certain macros as functions
6043
6044 # Check whether --enable-expanded or --disable-expanded was given.
6045 if test "${enable_expanded+set}" = set; then
6046   enableval="$enable_expanded"
6047   test "$enableval" = yes && cat >>confdefs.h <<\EOF
6048 #define NCURSES_EXPANDED 1
6049 EOF
6050
6051 fi;
6052
6053 ###     use option --disable-macros to suppress macros in favor of functions
6054
6055 # Check whether --enable-macros or --disable-macros was given.
6056 if test "${enable_macros+set}" = set; then
6057   enableval="$enable_macros"
6058   test "$enableval" = no && cat >>confdefs.h <<\EOF
6059 #define NCURSES_NOMACROS 1
6060 EOF
6061
6062 fi;
6063
6064 ###     Checks for libraries.
6065 echo "$as_me:6065: checking for gettimeofday" >&5
6066 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
6067 if test "${ac_cv_func_gettimeofday+set}" = set; then
6068   echo $ECHO_N "(cached) $ECHO_C" >&6
6069 else
6070   cat >conftest.$ac_ext <<_ACEOF
6071 #line 6071 "configure"
6072 #include "confdefs.h"
6073 /* System header to define __stub macros and hopefully few prototypes,
6074     which can conflict with char gettimeofday (); below.  */
6075 #include <assert.h>
6076 /* Override any gcc2 internal prototype to avoid an error.  */
6077 #ifdef __cplusplus
6078 extern "C"
6079 #endif
6080 /* We use char because int might match the return type of a gcc2
6081    builtin and then its argument prototype would still apply.  */
6082 char gettimeofday ();
6083 char (*f) ();
6084
6085 int
6086 main ()
6087 {
6088 /* The GNU C library defines this for functions which it implements
6089     to always fail with ENOSYS.  Some functions are actually named
6090     something starting with __ and the normal name is an alias.  */
6091 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
6092 choke me
6093 #else
6094 f = gettimeofday;
6095 #endif
6096
6097   ;
6098   return 0;
6099 }
6100 _ACEOF
6101 rm -f conftest.$ac_objext conftest$ac_exeext
6102 if { (eval echo "$as_me:6102: \"$ac_link\"") >&5
6103   (eval $ac_link) 2>&5
6104   ac_status=$?
6105   echo "$as_me:6105: \$? = $ac_status" >&5
6106   (exit $ac_status); } &&
6107          { ac_try='test -s conftest$ac_exeext'
6108   { (eval echo "$as_me:6108: \"$ac_try\"") >&5
6109   (eval $ac_try) 2>&5
6110   ac_status=$?
6111   echo "$as_me:6111: \$? = $ac_status" >&5
6112   (exit $ac_status); }; }; then
6113   ac_cv_func_gettimeofday=yes
6114 else
6115   echo "$as_me: failed program was:" >&5
6116 cat conftest.$ac_ext >&5
6117 ac_cv_func_gettimeofday=no
6118 fi
6119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6120 fi
6121 echo "$as_me:6121: result: $ac_cv_func_gettimeofday" >&5
6122 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
6123 if test $ac_cv_func_gettimeofday = yes; then
6124   cat >>confdefs.h <<\EOF
6125 #define HAVE_GETTIMEOFDAY 1
6126 EOF
6127
6128 else
6129
6130 echo "$as_me:6130: checking for gettimeofday in -lbsd" >&5
6131 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
6132 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
6133   echo $ECHO_N "(cached) $ECHO_C" >&6
6134 else
6135   ac_check_lib_save_LIBS=$LIBS
6136 LIBS="-lbsd  $LIBS"
6137 cat >conftest.$ac_ext <<_ACEOF
6138 #line 6138 "configure"
6139 #include "confdefs.h"
6140
6141 /* Override any gcc2 internal prototype to avoid an error.  */
6142 #ifdef __cplusplus
6143 extern "C"
6144 #endif
6145 /* We use char because int might match the return type of a gcc2
6146    builtin and then its argument prototype would still apply.  */
6147 char gettimeofday ();
6148 int
6149 main ()
6150 {
6151 gettimeofday ();
6152   ;
6153   return 0;
6154 }
6155 _ACEOF
6156 rm -f conftest.$ac_objext conftest$ac_exeext
6157 if { (eval echo "$as_me:6157: \"$ac_link\"") >&5
6158   (eval $ac_link) 2>&5
6159   ac_status=$?
6160   echo "$as_me:6160: \$? = $ac_status" >&5
6161   (exit $ac_status); } &&
6162          { ac_try='test -s conftest$ac_exeext'
6163   { (eval echo "$as_me:6163: \"$ac_try\"") >&5
6164   (eval $ac_try) 2>&5
6165   ac_status=$?
6166   echo "$as_me:6166: \$? = $ac_status" >&5
6167   (exit $ac_status); }; }; then
6168   ac_cv_lib_bsd_gettimeofday=yes
6169 else
6170   echo "$as_me: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6172 ac_cv_lib_bsd_gettimeofday=no
6173 fi
6174 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6175 LIBS=$ac_check_lib_save_LIBS
6176 fi
6177 echo "$as_me:6177: result: $ac_cv_lib_bsd_gettimeofday" >&5
6178 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
6179 if test $ac_cv_lib_bsd_gettimeofday = yes; then
6180   cat >>confdefs.h <<\EOF
6181 #define HAVE_GETTIMEOFDAY 1
6182 EOF
6183
6184         LIBS="$LIBS -lbsd"
6185 fi
6186
6187 fi
6188
6189 echo "$as_me:6189: checking if -lm needed for math functions" >&5
6190 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
6191 if test "${cf_cv_need_libm+set}" = set; then
6192   echo $ECHO_N "(cached) $ECHO_C" >&6
6193 else
6194
6195         cat >conftest.$ac_ext <<_ACEOF
6196 #line 6196 "configure"
6197 #include "confdefs.h"
6198
6199         #include <stdio.h>
6200         #include <math.h>
6201
6202 int
6203 main ()
6204 {
6205 double x = rand(); printf("result = %g\n", sin(x))
6206   ;
6207   return 0;
6208 }
6209 _ACEOF
6210 rm -f conftest.$ac_objext conftest$ac_exeext
6211 if { (eval echo "$as_me:6211: \"$ac_link\"") >&5
6212   (eval $ac_link) 2>&5
6213   ac_status=$?
6214   echo "$as_me:6214: \$? = $ac_status" >&5
6215   (exit $ac_status); } &&
6216          { ac_try='test -s conftest$ac_exeext'
6217   { (eval echo "$as_me:6217: \"$ac_try\"") >&5
6218   (eval $ac_try) 2>&5
6219   ac_status=$?
6220   echo "$as_me:6220: \$? = $ac_status" >&5
6221   (exit $ac_status); }; }; then
6222   cf_cv_need_libm=no
6223 else
6224   echo "$as_me: failed program was:" >&5
6225 cat conftest.$ac_ext >&5
6226 cf_cv_need_libm=yes
6227 fi
6228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6229 fi
6230 echo "$as_me:6230: result: $cf_cv_need_libm" >&5
6231 echo "${ECHO_T}$cf_cv_need_libm" >&6
6232 if test "$cf_cv_need_libm" = yes
6233 then
6234 MATH_LIB=-lm
6235 fi
6236
6237 ###     Checks for header files.
6238
6239 echo "$as_me:6239: checking if we must define _GNU_SOURCE" >&5
6240 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6241 if test "${cf_cv_gnu_source+set}" = set; then
6242   echo $ECHO_N "(cached) $ECHO_C" >&6
6243 else
6244
6245 cat >conftest.$ac_ext <<_ACEOF
6246 #line 6246 "configure"
6247 #include "confdefs.h"
6248 #include <sys/types.h>
6249 int
6250 main ()
6251 {
6252
6253 #ifndef _XOPEN_SOURCE
6254 make an error
6255 #endif
6256   ;
6257   return 0;
6258 }
6259 _ACEOF
6260 rm -f conftest.$ac_objext
6261 if { (eval echo "$as_me:6261: \"$ac_compile\"") >&5
6262   (eval $ac_compile) 2>&5
6263   ac_status=$?
6264   echo "$as_me:6264: \$? = $ac_status" >&5
6265   (exit $ac_status); } &&
6266          { ac_try='test -s conftest.$ac_objext'
6267   { (eval echo "$as_me:6267: \"$ac_try\"") >&5
6268   (eval $ac_try) 2>&5
6269   ac_status=$?
6270   echo "$as_me:6270: \$? = $ac_status" >&5
6271   (exit $ac_status); }; }; then
6272   cf_cv_gnu_source=no
6273 else
6274   echo "$as_me: failed program was:" >&5
6275 cat conftest.$ac_ext >&5
6276 cf_save="$CPPFLAGS"
6277          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6278          cat >conftest.$ac_ext <<_ACEOF
6279 #line 6279 "configure"
6280 #include "confdefs.h"
6281 #include <sys/types.h>
6282 int
6283 main ()
6284 {
6285
6286 #ifdef _XOPEN_SOURCE
6287 make an error
6288 #endif
6289   ;
6290   return 0;
6291 }
6292 _ACEOF
6293 rm -f conftest.$ac_objext
6294 if { (eval echo "$as_me:6294: \"$ac_compile\"") >&5
6295   (eval $ac_compile) 2>&5
6296   ac_status=$?
6297   echo "$as_me:6297: \$? = $ac_status" >&5
6298   (exit $ac_status); } &&
6299          { ac_try='test -s conftest.$ac_objext'
6300   { (eval echo "$as_me:6300: \"$ac_try\"") >&5
6301   (eval $ac_try) 2>&5
6302   ac_status=$?
6303   echo "$as_me:6303: \$? = $ac_status" >&5
6304   (exit $ac_status); }; }; then
6305   cf_cv_gnu_source=no
6306 else
6307   echo "$as_me: failed program was:" >&5
6308 cat conftest.$ac_ext >&5
6309 cf_cv_gnu_source=yes
6310 fi
6311 rm -f conftest.$ac_objext conftest.$ac_ext
6312         CPPFLAGS="$cf_save"
6313
6314 fi
6315 rm -f conftest.$ac_objext conftest.$ac_ext
6316
6317 fi
6318 echo "$as_me:6318: result: $cf_cv_gnu_source" >&5
6319 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6320 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6321
6322 echo "$as_me:6322: checking for ANSI C header files" >&5
6323 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6324 if test "${ac_cv_header_stdc+set}" = set; then
6325   echo $ECHO_N "(cached) $ECHO_C" >&6
6326 else
6327   cat >conftest.$ac_ext <<_ACEOF
6328 #line 6328 "configure"
6329 #include "confdefs.h"
6330 #include <stdlib.h>
6331 #include <stdarg.h>
6332 #include <string.h>
6333 #include <float.h>
6334
6335 _ACEOF
6336 if { (eval echo "$as_me:6336: \"$ac_cpp conftest.$ac_ext\"") >&5
6337   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6338   ac_status=$?
6339   egrep -v '^ *\+' conftest.er1 >conftest.err
6340   rm -f conftest.er1
6341   cat conftest.err >&5
6342   echo "$as_me:6342: \$? = $ac_status" >&5
6343   (exit $ac_status); } >/dev/null; then
6344   if test -s conftest.err; then
6345     ac_cpp_err=$ac_c_preproc_warn_flag
6346   else
6347     ac_cpp_err=
6348   fi
6349 else
6350   ac_cpp_err=yes
6351 fi
6352 if test -z "$ac_cpp_err"; then
6353   ac_cv_header_stdc=yes
6354 else
6355   echo "$as_me: failed program was:" >&5
6356   cat conftest.$ac_ext >&5
6357   ac_cv_header_stdc=no
6358 fi
6359 rm -f conftest.err conftest.$ac_ext
6360
6361 if test $ac_cv_header_stdc = yes; then
6362   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6363   cat >conftest.$ac_ext <<_ACEOF
6364 #line 6364 "configure"
6365 #include "confdefs.h"
6366 #include <string.h>
6367
6368 _ACEOF
6369 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6370   egrep "memchr" >/dev/null 2>&1; then
6371   :
6372 else
6373   ac_cv_header_stdc=no
6374 fi
6375 rm -f conftest*
6376
6377 fi
6378
6379 if test $ac_cv_header_stdc = yes; then
6380   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6381   cat >conftest.$ac_ext <<_ACEOF
6382 #line 6382 "configure"
6383 #include "confdefs.h"
6384 #include <stdlib.h>
6385
6386 _ACEOF
6387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6388   egrep "free" >/dev/null 2>&1; then
6389   :
6390 else
6391   ac_cv_header_stdc=no
6392 fi
6393 rm -f conftest*
6394
6395 fi
6396
6397 if test $ac_cv_header_stdc = yes; then
6398   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6399   if test "$cross_compiling" = yes; then
6400   :
6401 else
6402   cat >conftest.$ac_ext <<_ACEOF
6403 #line 6403 "configure"
6404 #include "confdefs.h"
6405 #include <ctype.h>
6406 #if ((' ' & 0x0FF) == 0x020)
6407 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6408 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6409 #else
6410 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6411                      || ('j' <= (c) && (c) <= 'r') \
6412                      || ('s' <= (c) && (c) <= 'z'))
6413 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6414 #endif
6415
6416 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6417 int
6418 main ()
6419 {
6420   int i;
6421   for (i = 0; i < 256; i++)
6422     if (XOR (islower (i), ISLOWER (i))
6423         || toupper (i) != TOUPPER (i))
6424       exit(2);
6425   exit (0);
6426 }
6427 _ACEOF
6428 rm -f conftest$ac_exeext
6429 if { (eval echo "$as_me:6429: \"$ac_link\"") >&5
6430   (eval $ac_link) 2>&5
6431   ac_status=$?
6432   echo "$as_me:6432: \$? = $ac_status" >&5
6433   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6434   { (eval echo "$as_me:6434: \"$ac_try\"") >&5
6435   (eval $ac_try) 2>&5
6436   ac_status=$?
6437   echo "$as_me:6437: \$? = $ac_status" >&5
6438   (exit $ac_status); }; }; then
6439   :
6440 else
6441   echo "$as_me: program exited with status $ac_status" >&5
6442 echo "$as_me: failed program was:" >&5
6443 cat conftest.$ac_ext >&5
6444 ac_cv_header_stdc=no
6445 fi
6446 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6447 fi
6448 fi
6449 fi
6450 echo "$as_me:6450: result: $ac_cv_header_stdc" >&5
6451 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6452 if test $ac_cv_header_stdc = yes; then
6453
6454 cat >>confdefs.h <<\EOF
6455 #define STDC_HEADERS 1
6456 EOF
6457
6458 fi
6459
6460 ac_header_dirent=no
6461 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6462   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6463 echo "$as_me:6463: checking for $ac_hdr that defines DIR" >&5
6464 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6465 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6466   echo $ECHO_N "(cached) $ECHO_C" >&6
6467 else
6468   cat >conftest.$ac_ext <<_ACEOF
6469 #line 6469 "configure"
6470 #include "confdefs.h"
6471 #include <sys/types.h>
6472 #include <$ac_hdr>
6473
6474 int
6475 main ()
6476 {
6477 if ((DIR *) 0)
6478 return 0;
6479   ;
6480   return 0;
6481 }
6482 _ACEOF
6483 rm -f conftest.$ac_objext
6484 if { (eval echo "$as_me:6484: \"$ac_compile\"") >&5
6485   (eval $ac_compile) 2>&5
6486   ac_status=$?
6487   echo "$as_me:6487: \$? = $ac_status" >&5
6488   (exit $ac_status); } &&
6489          { ac_try='test -s conftest.$ac_objext'
6490   { (eval echo "$as_me:6490: \"$ac_try\"") >&5
6491   (eval $ac_try) 2>&5
6492   ac_status=$?
6493   echo "$as_me:6493: \$? = $ac_status" >&5
6494   (exit $ac_status); }; }; then
6495   eval "$as_ac_Header=yes"
6496 else
6497   echo "$as_me: failed program was:" >&5
6498 cat conftest.$ac_ext >&5
6499 eval "$as_ac_Header=no"
6500 fi
6501 rm -f conftest.$ac_objext conftest.$ac_ext
6502 fi
6503 echo "$as_me:6503: result: `eval echo '${'$as_ac_Header'}'`" >&5
6504 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6505 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6506   cat >>confdefs.h <<EOF
6507 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6508 EOF
6509
6510 ac_header_dirent=$ac_hdr; break
6511 fi
6512
6513 done
6514 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6515 if test $ac_header_dirent = dirent.h; then
6516   echo "$as_me:6516: checking for opendir in -ldir" >&5
6517 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6518 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6519   echo $ECHO_N "(cached) $ECHO_C" >&6
6520 else
6521   ac_check_lib_save_LIBS=$LIBS
6522 LIBS="-ldir  $LIBS"
6523 cat >conftest.$ac_ext <<_ACEOF
6524 #line 6524 "configure"
6525 #include "confdefs.h"
6526
6527 /* Override any gcc2 internal prototype to avoid an error.  */
6528 #ifdef __cplusplus
6529 extern "C"
6530 #endif
6531 /* We use char because int might match the return type of a gcc2
6532    builtin and then its argument prototype would still apply.  */
6533 char opendir ();
6534 int
6535 main ()
6536 {
6537 opendir ();
6538   ;
6539   return 0;
6540 }
6541 _ACEOF
6542 rm -f conftest.$ac_objext conftest$ac_exeext
6543 if { (eval echo "$as_me:6543: \"$ac_link\"") >&5
6544   (eval $ac_link) 2>&5
6545   ac_status=$?
6546   echo "$as_me:6546: \$? = $ac_status" >&5
6547   (exit $ac_status); } &&
6548          { ac_try='test -s conftest$ac_exeext'
6549   { (eval echo "$as_me:6549: \"$ac_try\"") >&5
6550   (eval $ac_try) 2>&5
6551   ac_status=$?
6552   echo "$as_me:6552: \$? = $ac_status" >&5
6553   (exit $ac_status); }; }; then
6554   ac_cv_lib_dir_opendir=yes
6555 else
6556   echo "$as_me: failed program was:" >&5
6557 cat conftest.$ac_ext >&5
6558 ac_cv_lib_dir_opendir=no
6559 fi
6560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6561 LIBS=$ac_check_lib_save_LIBS
6562 fi
6563 echo "$as_me:6563: result: $ac_cv_lib_dir_opendir" >&5
6564 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6565 if test $ac_cv_lib_dir_opendir = yes; then
6566   LIBS="$LIBS -ldir"
6567 fi
6568
6569 else
6570   echo "$as_me:6570: checking for opendir in -lx" >&5
6571 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6572 if test "${ac_cv_lib_x_opendir+set}" = set; then
6573   echo $ECHO_N "(cached) $ECHO_C" >&6
6574 else
6575   ac_check_lib_save_LIBS=$LIBS
6576 LIBS="-lx  $LIBS"
6577 cat >conftest.$ac_ext <<_ACEOF
6578 #line 6578 "configure"
6579 #include "confdefs.h"
6580
6581 /* Override any gcc2 internal prototype to avoid an error.  */
6582 #ifdef __cplusplus
6583 extern "C"
6584 #endif
6585 /* We use char because int might match the return type of a gcc2
6586    builtin and then its argument prototype would still apply.  */
6587 char opendir ();
6588 int
6589 main ()
6590 {
6591 opendir ();
6592   ;
6593   return 0;
6594 }
6595 _ACEOF
6596 rm -f conftest.$ac_objext conftest$ac_exeext
6597 if { (eval echo "$as_me:6597: \"$ac_link\"") >&5
6598   (eval $ac_link) 2>&5
6599   ac_status=$?
6600   echo "$as_me:6600: \$? = $ac_status" >&5
6601   (exit $ac_status); } &&
6602          { ac_try='test -s conftest$ac_exeext'
6603   { (eval echo "$as_me:6603: \"$ac_try\"") >&5
6604   (eval $ac_try) 2>&5
6605   ac_status=$?
6606   echo "$as_me:6606: \$? = $ac_status" >&5
6607   (exit $ac_status); }; }; then
6608   ac_cv_lib_x_opendir=yes
6609 else
6610   echo "$as_me: failed program was:" >&5
6611 cat conftest.$ac_ext >&5
6612 ac_cv_lib_x_opendir=no
6613 fi
6614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6615 LIBS=$ac_check_lib_save_LIBS
6616 fi
6617 echo "$as_me:6617: result: $ac_cv_lib_x_opendir" >&5
6618 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6619 if test $ac_cv_lib_x_opendir = yes; then
6620   LIBS="$LIBS -lx"
6621 fi
6622
6623 fi
6624
6625 echo "$as_me:6625: checking whether time.h and sys/time.h may both be included" >&5
6626 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
6627 if test "${ac_cv_header_time+set}" = set; then
6628   echo $ECHO_N "(cached) $ECHO_C" >&6
6629 else
6630   cat >conftest.$ac_ext <<_ACEOF
6631 #line 6631 "configure"
6632 #include "confdefs.h"
6633 #include <sys/types.h>
6634 #include <sys/time.h>
6635 #include <time.h>
6636
6637 int
6638 main ()
6639 {
6640 if ((struct tm *) 0)
6641 return 0;
6642   ;
6643   return 0;
6644 }
6645 _ACEOF
6646 rm -f conftest.$ac_objext
6647 if { (eval echo "$as_me:6647: \"$ac_compile\"") >&5
6648   (eval $ac_compile) 2>&5
6649   ac_status=$?
6650   echo "$as_me:6650: \$? = $ac_status" >&5
6651   (exit $ac_status); } &&
6652          { ac_try='test -s conftest.$ac_objext'
6653   { (eval echo "$as_me:6653: \"$ac_try\"") >&5
6654   (eval $ac_try) 2>&5
6655   ac_status=$?
6656   echo "$as_me:6656: \$? = $ac_status" >&5
6657   (exit $ac_status); }; }; then
6658   ac_cv_header_time=yes
6659 else
6660   echo "$as_me: failed program was:" >&5
6661 cat conftest.$ac_ext >&5
6662 ac_cv_header_time=no
6663 fi
6664 rm -f conftest.$ac_objext conftest.$ac_ext
6665 fi
6666 echo "$as_me:6666: result: $ac_cv_header_time" >&5
6667 echo "${ECHO_T}$ac_cv_header_time" >&6
6668 if test $ac_cv_header_time = yes; then
6669
6670 cat >>confdefs.h <<\EOF
6671 #define TIME_WITH_SYS_TIME 1
6672 EOF
6673
6674 fi
6675
6676 echo "$as_me:6676: checking for regular-expression headers" >&5
6677 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
6678 if test "${cf_cv_regex+set}" = set; then
6679   echo $ECHO_N "(cached) $ECHO_C" >&6
6680 else
6681
6682 cat >conftest.$ac_ext <<_ACEOF
6683 #line 6683 "configure"
6684 #include "confdefs.h"
6685 #include <sys/types.h>
6686 #include <regex.h>
6687 int
6688 main ()
6689 {
6690
6691         regex_t *p;
6692         int x = regcomp(p, "", 0);
6693         int y = regexec(p, "", 0, 0, 0);
6694         regfree(p);
6695
6696   ;
6697   return 0;
6698 }
6699 _ACEOF
6700 rm -f conftest.$ac_objext conftest$ac_exeext
6701 if { (eval echo "$as_me:6701: \"$ac_link\"") >&5
6702   (eval $ac_link) 2>&5
6703   ac_status=$?
6704   echo "$as_me:6704: \$? = $ac_status" >&5
6705   (exit $ac_status); } &&
6706          { ac_try='test -s conftest$ac_exeext'
6707   { (eval echo "$as_me:6707: \"$ac_try\"") >&5
6708   (eval $ac_try) 2>&5
6709   ac_status=$?
6710   echo "$as_me:6710: \$? = $ac_status" >&5
6711   (exit $ac_status); }; }; then
6712   cf_cv_regex="regex.h"
6713 else
6714   echo "$as_me: failed program was:" >&5
6715 cat conftest.$ac_ext >&5
6716
6717         cat >conftest.$ac_ext <<_ACEOF
6718 #line 6718 "configure"
6719 #include "confdefs.h"
6720 #include <regexp.h>
6721 int
6722 main ()
6723 {
6724
6725                 char *p = compile("", "", "", 0);
6726                 int x = step("", "");
6727
6728   ;
6729   return 0;
6730 }
6731 _ACEOF
6732 rm -f conftest.$ac_objext conftest$ac_exeext
6733 if { (eval echo "$as_me:6733: \"$ac_link\"") >&5
6734   (eval $ac_link) 2>&5
6735   ac_status=$?
6736   echo "$as_me:6736: \$? = $ac_status" >&5
6737   (exit $ac_status); } &&
6738          { ac_try='test -s conftest$ac_exeext'
6739   { (eval echo "$as_me:6739: \"$ac_try\"") >&5
6740   (eval $ac_try) 2>&5
6741   ac_status=$?
6742   echo "$as_me:6742: \$? = $ac_status" >&5
6743   (exit $ac_status); }; }; then
6744   cf_cv_regex="regexp.h"
6745 else
6746   echo "$as_me: failed program was:" >&5
6747 cat conftest.$ac_ext >&5
6748
6749                 cf_save_LIBS="$LIBS"
6750                 LIBS="-lgen $LIBS"
6751                 cat >conftest.$ac_ext <<_ACEOF
6752 #line 6752 "configure"
6753 #include "confdefs.h"
6754 #include <regexpr.h>
6755 int
6756 main ()
6757 {
6758
6759                         char *p = compile("", "", "");
6760                         int x = step("", "");
6761
6762   ;
6763   return 0;
6764 }
6765 _ACEOF
6766 rm -f conftest.$ac_objext conftest$ac_exeext
6767 if { (eval echo "$as_me:6767: \"$ac_link\"") >&5
6768   (eval $ac_link) 2>&5
6769   ac_status=$?
6770   echo "$as_me:6770: \$? = $ac_status" >&5
6771   (exit $ac_status); } &&
6772          { ac_try='test -s conftest$ac_exeext'
6773   { (eval echo "$as_me:6773: \"$ac_try\"") >&5
6774   (eval $ac_try) 2>&5
6775   ac_status=$?
6776   echo "$as_me:6776: \$? = $ac_status" >&5
6777   (exit $ac_status); }; }; then
6778   cf_cv_regex="regexpr.h"
6779 else
6780   echo "$as_me: failed program was:" >&5
6781 cat conftest.$ac_ext >&5
6782 LIBS="$cf_save_LIBS"
6783 fi
6784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6785 fi
6786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6787 fi
6788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6789
6790 fi
6791
6792 echo "$as_me:6792: result: $cf_cv_regex" >&5
6793 echo "${ECHO_T}$cf_cv_regex" >&6
6794 case $cf_cv_regex in
6795         regex.h)   cat >>confdefs.h <<\EOF
6796 #define HAVE_REGEX_H_FUNCS 1
6797 EOF
6798  ;;
6799         regexp.h)  cat >>confdefs.h <<\EOF
6800 #define HAVE_REGEXP_H_FUNCS 1
6801 EOF
6802  ;;
6803         regexpr.h) cat >>confdefs.h <<\EOF
6804 #define HAVE_REGEXPR_H_FUNCS 1
6805 EOF
6806  ;;
6807 esac
6808
6809 for ac_header in \
6810 fcntl.h \
6811 getopt.h \
6812 libc.h \
6813 limits.h \
6814 locale.h \
6815 poll.h \
6816 sys/bsdtypes.h \
6817 sys/ioctl.h \
6818 sys/param.h \
6819 sys/poll.h \
6820 sys/select.h \
6821 sys/time.h \
6822 sys/times.h \
6823 ttyent.h \
6824 unistd.h \
6825
6826 do
6827 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6828 echo "$as_me:6828: checking for $ac_header" >&5
6829 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6830 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6831   echo $ECHO_N "(cached) $ECHO_C" >&6
6832 else
6833   cat >conftest.$ac_ext <<_ACEOF
6834 #line 6834 "configure"
6835 #include "confdefs.h"
6836 #include <$ac_header>
6837 _ACEOF
6838 if { (eval echo "$as_me:6838: \"$ac_cpp conftest.$ac_ext\"") >&5
6839   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6840   ac_status=$?
6841   egrep -v '^ *\+' conftest.er1 >conftest.err
6842   rm -f conftest.er1
6843   cat conftest.err >&5
6844   echo "$as_me:6844: \$? = $ac_status" >&5
6845   (exit $ac_status); } >/dev/null; then
6846   if test -s conftest.err; then
6847     ac_cpp_err=$ac_c_preproc_warn_flag
6848   else
6849     ac_cpp_err=
6850   fi
6851 else
6852   ac_cpp_err=yes
6853 fi
6854 if test -z "$ac_cpp_err"; then
6855   eval "$as_ac_Header=yes"
6856 else
6857   echo "$as_me: failed program was:" >&5
6858   cat conftest.$ac_ext >&5
6859   eval "$as_ac_Header=no"
6860 fi
6861 rm -f conftest.err conftest.$ac_ext
6862 fi
6863 echo "$as_me:6863: result: `eval echo '${'$as_ac_Header'}'`" >&5
6864 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6865 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6866   cat >>confdefs.h <<EOF
6867 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6868 EOF
6869
6870 fi
6871 done
6872
6873 # check for ISC (this may also define _POSIX_SOURCE)
6874 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
6875 if test "$ISC" = yes ; then
6876
6877 echo "$as_me:6877: checking for main in -lcposix" >&5
6878 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
6879 if test "${ac_cv_lib_cposix_main+set}" = set; then
6880   echo $ECHO_N "(cached) $ECHO_C" >&6
6881 else
6882   ac_check_lib_save_LIBS=$LIBS
6883 LIBS="-lcposix  $LIBS"
6884 cat >conftest.$ac_ext <<_ACEOF
6885 #line 6885 "configure"
6886 #include "confdefs.h"
6887
6888 int
6889 main ()
6890 {
6891 main ();
6892   ;
6893   return 0;
6894 }
6895 _ACEOF
6896 rm -f conftest.$ac_objext conftest$ac_exeext
6897 if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
6898   (eval $ac_link) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit $ac_status); } &&
6902          { ac_try='test -s conftest$ac_exeext'
6903   { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904   (eval $ac_try) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit $ac_status); }; }; then
6908   ac_cv_lib_cposix_main=yes
6909 else
6910   echo "$as_me: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6912 ac_cv_lib_cposix_main=no
6913 fi
6914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6915 LIBS=$ac_check_lib_save_LIBS
6916 fi
6917 echo "$as_me:6917: result: $ac_cv_lib_cposix_main" >&5
6918 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
6919 if test $ac_cv_lib_cposix_main = yes; then
6920   cat >>confdefs.h <<EOF
6921 #define HAVE_LIBCPOSIX 1
6922 EOF
6923
6924   LIBS="-lcposix $LIBS"
6925
6926 fi
6927
6928         echo "$as_me:6928: checking for bzero in -linet" >&5
6929 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
6930 if test "${ac_cv_lib_inet_bzero+set}" = set; then
6931   echo $ECHO_N "(cached) $ECHO_C" >&6
6932 else
6933   ac_check_lib_save_LIBS=$LIBS
6934 LIBS="-linet  $LIBS"
6935 cat >conftest.$ac_ext <<_ACEOF
6936 #line 6936 "configure"
6937 #include "confdefs.h"
6938
6939 /* Override any gcc2 internal prototype to avoid an error.  */
6940 #ifdef __cplusplus
6941 extern "C"
6942 #endif
6943 /* We use char because int might match the return type of a gcc2
6944    builtin and then its argument prototype would still apply.  */
6945 char bzero ();
6946 int
6947 main ()
6948 {
6949 bzero ();
6950   ;
6951   return 0;
6952 }
6953 _ACEOF
6954 rm -f conftest.$ac_objext conftest$ac_exeext
6955 if { (eval echo "$as_me:6955: \"$ac_link\"") >&5
6956   (eval $ac_link) 2>&5
6957   ac_status=$?
6958   echo "$as_me:6958: \$? = $ac_status" >&5
6959   (exit $ac_status); } &&
6960          { ac_try='test -s conftest$ac_exeext'
6961   { (eval echo "$as_me:6961: \"$ac_try\"") >&5
6962   (eval $ac_try) 2>&5
6963   ac_status=$?
6964   echo "$as_me:6964: \$? = $ac_status" >&5
6965   (exit $ac_status); }; }; then
6966   ac_cv_lib_inet_bzero=yes
6967 else
6968   echo "$as_me: failed program was:" >&5
6969 cat conftest.$ac_ext >&5
6970 ac_cv_lib_inet_bzero=no
6971 fi
6972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6973 LIBS=$ac_check_lib_save_LIBS
6974 fi
6975 echo "$as_me:6975: result: $ac_cv_lib_inet_bzero" >&5
6976 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
6977 if test $ac_cv_lib_inet_bzero = yes; then
6978   LIBS="$LIBS -linet"
6979 fi
6980 fi
6981
6982 echo "$as_me:6982: checking if sys/time.h works with sys/select.h" >&5
6983 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
6984 if test "${cf_cv_sys_time_select+set}" = set; then
6985   echo $ECHO_N "(cached) $ECHO_C" >&6
6986 else
6987
6988 cat >conftest.$ac_ext <<_ACEOF
6989 #line 6989 "configure"
6990 #include "confdefs.h"
6991
6992 #include <sys/types.h>
6993 #ifdef HAVE_SYS_TIME_H
6994 #include <sys/time.h>
6995 #endif
6996 #ifdef HAVE_SYS_SELECT_H
6997 #include <sys/select.h>
6998 #endif
6999
7000 int
7001 main ()
7002 {
7003
7004   ;
7005   return 0;
7006 }
7007 _ACEOF
7008 rm -f conftest.$ac_objext
7009 if { (eval echo "$as_me:7009: \"$ac_compile\"") >&5
7010   (eval $ac_compile) 2>&5
7011   ac_status=$?
7012   echo "$as_me:7012: \$? = $ac_status" >&5
7013   (exit $ac_status); } &&
7014          { ac_try='test -s conftest.$ac_objext'
7015   { (eval echo "$as_me:7015: \"$ac_try\"") >&5
7016   (eval $ac_try) 2>&5
7017   ac_status=$?
7018   echo "$as_me:7018: \$? = $ac_status" >&5
7019   (exit $ac_status); }; }; then
7020   cf_cv_sys_time_select=yes
7021 else
7022   echo "$as_me: failed program was:" >&5
7023 cat conftest.$ac_ext >&5
7024 cf_cv_sys_time_select=no
7025 fi
7026 rm -f conftest.$ac_objext conftest.$ac_ext
7027
7028 fi
7029
7030 echo "$as_me:7030: result: $cf_cv_sys_time_select" >&5
7031 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
7032 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
7033 #define HAVE_SYS_TIME_SELECT 1
7034 EOF
7035
7036 ###     checks for compiler characteristics
7037 ac_ext=c
7038 ac_cpp='$CPP $CPPFLAGS'
7039 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7040 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7041 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7042
7043 echo "$as_me:7043: checking for $CC option to accept ANSI C" >&5
7044 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
7045 if test "${ac_cv_prog_cc_stdc+set}" = set; then
7046   echo $ECHO_N "(cached) $ECHO_C" >&6
7047 else
7048   ac_cv_prog_cc_stdc=no
7049 ac_save_CC=$CC
7050 cat >conftest.$ac_ext <<_ACEOF
7051 #line 7051 "configure"
7052 #include "confdefs.h"
7053 #include <stdarg.h>
7054 #include <stdio.h>
7055 #include <sys/types.h>
7056 #include <sys/stat.h>
7057 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7058 struct buf { int x; };
7059 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7060 static char *e (p, i)
7061      char **p;
7062      int i;
7063 {
7064   return p[i];
7065 }
7066 static char *f (char * (*g) (char **, int), char **p, ...)
7067 {
7068   char *s;
7069   va_list v;
7070   va_start (v,p);
7071   s = g (p, va_arg (v,int));
7072   va_end (v);
7073   return s;
7074 }
7075 int test (int i, double x);
7076 struct s1 {int (*f) (int a);};
7077 struct s2 {int (*f) (double a);};
7078 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7079 int argc;
7080 char **argv;
7081 int
7082 main ()
7083 {
7084 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7085   ;
7086   return 0;
7087 }
7088 _ACEOF
7089 # Don't try gcc -ansi; that turns off useful extensions and
7090 # breaks some systems' header files.
7091 # AIX                   -qlanglvl=ansi
7092 # Ultrix and OSF/1      -std1
7093 # HP-UX 10.20 and later -Ae
7094 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7095 # SVR4                  -Xc -D__EXTENSIONS__
7096 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7097 do
7098   CC="$ac_save_CC $ac_arg"
7099   rm -f conftest.$ac_objext
7100 if { (eval echo "$as_me:7100: \"$ac_compile\"") >&5
7101   (eval $ac_compile) 2>&5
7102   ac_status=$?
7103   echo "$as_me:7103: \$? = $ac_status" >&5
7104   (exit $ac_status); } &&
7105          { ac_try='test -s conftest.$ac_objext'
7106   { (eval echo "$as_me:7106: \"$ac_try\"") >&5
7107   (eval $ac_try) 2>&5
7108   ac_status=$?
7109   echo "$as_me:7109: \$? = $ac_status" >&5
7110   (exit $ac_status); }; }; then
7111   ac_cv_prog_cc_stdc=$ac_arg
7112 break
7113 else
7114   echo "$as_me: failed program was:" >&5
7115 cat conftest.$ac_ext >&5
7116 fi
7117 rm -f conftest.$ac_objext
7118 done
7119 rm -f conftest.$ac_ext conftest.$ac_objext
7120 CC=$ac_save_CC
7121
7122 fi
7123
7124 case "x$ac_cv_prog_cc_stdc" in
7125   x|xno)
7126     echo "$as_me:7126: result: none needed" >&5
7127 echo "${ECHO_T}none needed" >&6 ;;
7128   *)
7129     echo "$as_me:7129: result: $ac_cv_prog_cc_stdc" >&5
7130 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
7131     CC="$CC $ac_cv_prog_cc_stdc" ;;
7132 esac
7133
7134 echo "$as_me:7134: checking for an ANSI C-conforming const" >&5
7135 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
7136 if test "${ac_cv_c_const+set}" = set; then
7137   echo $ECHO_N "(cached) $ECHO_C" >&6
7138 else
7139   cat >conftest.$ac_ext <<_ACEOF
7140 #line 7140 "configure"
7141 #include "confdefs.h"
7142
7143 int
7144 main ()
7145 {
7146 /* FIXME: Include the comments suggested by Paul. */
7147 #ifndef __cplusplus
7148   /* Ultrix mips cc rejects this.  */
7149   typedef int charset[2];
7150   const charset x;
7151   /* SunOS 4.1.1 cc rejects this.  */
7152   char const *const *ccp;
7153   char **p;
7154   /* NEC SVR4.0.2 mips cc rejects this.  */
7155   struct point {int x, y;};
7156   static struct point const zero = {0,0};
7157   /* AIX XL C 1.02.0.0 rejects this.
7158      It does not let you subtract one const X* pointer from another in
7159      an arm of an if-expression whose if-part is not a constant
7160      expression */
7161   const char *g = "string";
7162   ccp = &g + (g ? g-g : 0);
7163   /* HPUX 7.0 cc rejects these. */
7164   ++ccp;
7165   p = (char**) ccp;
7166   ccp = (char const *const *) p;
7167   { /* SCO 3.2v4 cc rejects this.  */
7168     char *t;
7169     char const *s = 0 ? (char *) 0 : (char const *) 0;
7170
7171     *t++ = 0;
7172   }
7173   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7174     int x[] = {25, 17};
7175     const int *foo = &x[0];
7176     ++foo;
7177   }
7178   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7179     typedef const int *iptr;
7180     iptr p = 0;
7181     ++p;
7182   }
7183   { /* AIX XL C 1.02.0.0 rejects this saying
7184        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7185     struct s { int j; const int *ap[3]; };
7186     struct s *b; b->j = 5;
7187   }
7188   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7189     const int foo = 10;
7190   }
7191 #endif
7192
7193   ;
7194   return 0;
7195 }
7196 _ACEOF
7197 rm -f conftest.$ac_objext
7198 if { (eval echo "$as_me:7198: \"$ac_compile\"") >&5
7199   (eval $ac_compile) 2>&5
7200   ac_status=$?
7201   echo "$as_me:7201: \$? = $ac_status" >&5
7202   (exit $ac_status); } &&
7203          { ac_try='test -s conftest.$ac_objext'
7204   { (eval echo "$as_me:7204: \"$ac_try\"") >&5
7205   (eval $ac_try) 2>&5
7206   ac_status=$?
7207   echo "$as_me:7207: \$? = $ac_status" >&5
7208   (exit $ac_status); }; }; then
7209   ac_cv_c_const=yes
7210 else
7211   echo "$as_me: failed program was:" >&5
7212 cat conftest.$ac_ext >&5
7213 ac_cv_c_const=no
7214 fi
7215 rm -f conftest.$ac_objext conftest.$ac_ext
7216 fi
7217 echo "$as_me:7217: result: $ac_cv_c_const" >&5
7218 echo "${ECHO_T}$ac_cv_c_const" >&6
7219 if test $ac_cv_c_const = no; then
7220
7221 cat >>confdefs.h <<\EOF
7222 #define const
7223 EOF
7224
7225 fi
7226
7227 echo "$as_me:7227: checking for inline" >&5
7228 echo $ECHO_N "checking for inline... $ECHO_C" >&6
7229 if test "${ac_cv_c_inline+set}" = set; then
7230   echo $ECHO_N "(cached) $ECHO_C" >&6
7231 else
7232   ac_cv_c_inline=no
7233 for ac_kw in inline __inline__ __inline; do
7234   cat >conftest.$ac_ext <<_ACEOF
7235 #line 7235 "configure"
7236 #include "confdefs.h"
7237 #ifndef __cplusplus
7238 static $ac_kw int static_foo () {return 0; }
7239 $ac_kw int foo () {return 0; }
7240 #endif
7241
7242 _ACEOF
7243 rm -f conftest.$ac_objext
7244 if { (eval echo "$as_me:7244: \"$ac_compile\"") >&5
7245   (eval $ac_compile) 2>&5
7246   ac_status=$?
7247   echo "$as_me:7247: \$? = $ac_status" >&5
7248   (exit $ac_status); } &&
7249          { ac_try='test -s conftest.$ac_objext'
7250   { (eval echo "$as_me:7250: \"$ac_try\"") >&5
7251   (eval $ac_try) 2>&5
7252   ac_status=$?
7253   echo "$as_me:7253: \$? = $ac_status" >&5
7254   (exit $ac_status); }; }; then
7255   ac_cv_c_inline=$ac_kw; break
7256 else
7257   echo "$as_me: failed program was:" >&5
7258 cat conftest.$ac_ext >&5
7259 fi
7260 rm -f conftest.$ac_objext conftest.$ac_ext
7261 done
7262
7263 fi
7264 echo "$as_me:7264: result: $ac_cv_c_inline" >&5
7265 echo "${ECHO_T}$ac_cv_c_inline" >&6
7266 case $ac_cv_c_inline in
7267   inline | yes) ;;
7268   no)
7269 cat >>confdefs.h <<\EOF
7270 #define inline
7271 EOF
7272  ;;
7273   *)  cat >>confdefs.h <<EOF
7274 #define inline $ac_cv_c_inline
7275 EOF
7276  ;;
7277 esac
7278
7279 test "$ac_cv_c_inline" != no && cat >>confdefs.h <<\EOF
7280 #define CC_HAS_INLINE_FUNCS 1
7281 EOF
7282
7283 echo "$as_me:7283: checking if unsigned literals are legal" >&5
7284 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
7285 if test "${cf_cv_unsigned_literals+set}" = set; then
7286   echo $ECHO_N "(cached) $ECHO_C" >&6
7287 else
7288
7289         cat >conftest.$ac_ext <<_ACEOF
7290 #line 7290 "configure"
7291 #include "confdefs.h"
7292
7293 int
7294 main ()
7295 {
7296 long x = 1L + 1UL + 1U + 1
7297   ;
7298   return 0;
7299 }
7300 _ACEOF
7301 rm -f conftest.$ac_objext
7302 if { (eval echo "$as_me:7302: \"$ac_compile\"") >&5
7303   (eval $ac_compile) 2>&5
7304   ac_status=$?
7305   echo "$as_me:7305: \$? = $ac_status" >&5
7306   (exit $ac_status); } &&
7307          { ac_try='test -s conftest.$ac_objext'
7308   { (eval echo "$as_me:7308: \"$ac_try\"") >&5
7309   (eval $ac_try) 2>&5
7310   ac_status=$?
7311   echo "$as_me:7311: \$? = $ac_status" >&5
7312   (exit $ac_status); }; }; then
7313   cf_cv_unsigned_literals=yes
7314 else
7315   echo "$as_me: failed program was:" >&5
7316 cat conftest.$ac_ext >&5
7317 cf_cv_unsigned_literals=no
7318 fi
7319 rm -f conftest.$ac_objext conftest.$ac_ext
7320
7321 fi
7322
7323 echo "$as_me:7323: result: $cf_cv_unsigned_literals" >&5
7324 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
7325
7326 echo "$as_me:7326: checking for type of chtype" >&5
7327 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7328 if test "${cf_cv_typeof_chtype+set}" = set; then
7329   echo $ECHO_N "(cached) $ECHO_C" >&6
7330 else
7331
7332                 if test "$cross_compiling" = yes; then
7333   cf_cv_typeof_chtype=long
7334 else
7335   cat >conftest.$ac_ext <<_ACEOF
7336 #line 7336 "configure"
7337 #include "confdefs.h"
7338
7339 #ifdef USE_WIDEC_SUPPORT
7340 #include <stddef.h>     /* we want wchar_t */
7341 #define WANT_BITS 39
7342 #else
7343 #define WANT_BITS 31
7344 #endif
7345 #include <stdio.h>
7346 int main()
7347 {
7348         FILE *fp = fopen("cf_test.out", "w");
7349         if (fp != 0) {
7350                 char *result = "long";
7351 #ifdef USE_WIDEC_SUPPORT
7352                 /*
7353                  * If wchar_t is smaller than a long, it must be an int or a
7354                  * short.  We prefer not to use a short anyway.
7355                  */
7356                 if (sizeof(unsigned long) > sizeof(wchar_t))
7357                         result = "int";
7358 #endif
7359                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
7360                         int n;
7361                         unsigned int x;
7362                         for (n = 0; n < WANT_BITS; n++) {
7363                                 unsigned int y = (x >> n);
7364                                 if (y != 1 || x == 0) {
7365                                         x = 0;
7366                                         break;
7367                                 }
7368                         }
7369                         /*
7370                          * If x is nonzero, an int is big enough for the bits
7371                          * that we want.
7372                          */
7373                         result = (x != 0) ? "int" : "long";
7374                 }
7375                 fputs(result, fp);
7376                 fclose(fp);
7377         }
7378         exit(0);
7379 }
7380
7381 _ACEOF
7382 rm -f conftest$ac_exeext
7383 if { (eval echo "$as_me:7383: \"$ac_link\"") >&5
7384   (eval $ac_link) 2>&5
7385   ac_status=$?
7386   echo "$as_me:7386: \$? = $ac_status" >&5
7387   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7388   { (eval echo "$as_me:7388: \"$ac_try\"") >&5
7389   (eval $ac_try) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); }; }; then
7393   cf_cv_typeof_chtype=`cat cf_test.out`
7394 else
7395   echo "$as_me: program exited with status $ac_status" >&5
7396 echo "$as_me: failed program was:" >&5
7397 cat conftest.$ac_ext >&5
7398 cf_cv_typeof_chtype=long
7399 fi
7400 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7401 fi
7402                 rm -f cf_test.out
7403
7404 fi
7405
7406 echo "$as_me:7406: result: $cf_cv_typeof_chtype" >&5
7407 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
7408
7409 cat >>confdefs.h <<EOF
7410 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
7411 EOF
7412
7413 cf_cv_1UL="1"
7414 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
7415 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
7416
7417 ###     Checks for external-data
7418
7419 echo "$as_me:7419: checking if external errno is declared" >&5
7420 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
7421 if test "${cf_cv_dcl_errno+set}" = set; then
7422   echo $ECHO_N "(cached) $ECHO_C" >&6
7423 else
7424
7425     cat >conftest.$ac_ext <<_ACEOF
7426 #line 7426 "configure"
7427 #include "confdefs.h"
7428
7429 #ifdef HAVE_STDLIB_H
7430 #include <stdlib.h>
7431 #endif
7432 #include <stdio.h>
7433 #include <sys/types.h>
7434 #include <errno.h>
7435 int
7436 main ()
7437 {
7438 long x = (long) errno
7439   ;
7440   return 0;
7441 }
7442 _ACEOF
7443 rm -f conftest.$ac_objext
7444 if { (eval echo "$as_me:7444: \"$ac_compile\"") >&5
7445   (eval $ac_compile) 2>&5
7446   ac_status=$?
7447   echo "$as_me:7447: \$? = $ac_status" >&5
7448   (exit $ac_status); } &&
7449          { ac_try='test -s conftest.$ac_objext'
7450   { (eval echo "$as_me:7450: \"$ac_try\"") >&5
7451   (eval $ac_try) 2>&5
7452   ac_status=$?
7453   echo "$as_me:7453: \$? = $ac_status" >&5
7454   (exit $ac_status); }; }; then
7455   cf_cv_dcl_errno=yes
7456 else
7457   echo "$as_me: failed program was:" >&5
7458 cat conftest.$ac_ext >&5
7459 cf_cv_dcl_errno=no
7460 fi
7461 rm -f conftest.$ac_objext conftest.$ac_ext
7462
7463 fi
7464 echo "$as_me:7464: result: $cf_cv_dcl_errno" >&5
7465 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
7466
7467 if test "$cf_cv_dcl_errno" = no ; then
7468
7469 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7470
7471     cat >>confdefs.h <<EOF
7472 #define $cf_result 1
7473 EOF
7474
7475 fi
7476
7477 # It's possible (for near-UNIX clones) that the data doesn't exist
7478
7479 echo "$as_me:7479: checking if external errno exists" >&5
7480 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
7481 if test "${cf_cv_have_errno+set}" = set; then
7482   echo $ECHO_N "(cached) $ECHO_C" >&6
7483 else
7484
7485     cat >conftest.$ac_ext <<_ACEOF
7486 #line 7486 "configure"
7487 #include "confdefs.h"
7488
7489 #undef errno
7490 extern int errno;
7491
7492 int
7493 main ()
7494 {
7495 errno = 2
7496   ;
7497   return 0;
7498 }
7499 _ACEOF
7500 rm -f conftest.$ac_objext conftest$ac_exeext
7501 if { (eval echo "$as_me:7501: \"$ac_link\"") >&5
7502   (eval $ac_link) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); } &&
7506          { ac_try='test -s conftest$ac_exeext'
7507   { (eval echo "$as_me:7507: \"$ac_try\"") >&5
7508   (eval $ac_try) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); }; }; then
7512   cf_cv_have_errno=yes
7513 else
7514   echo "$as_me: failed program was:" >&5
7515 cat conftest.$ac_ext >&5
7516 cf_cv_have_errno=no
7517 fi
7518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7519
7520 fi
7521 echo "$as_me:7521: result: $cf_cv_have_errno" >&5
7522 echo "${ECHO_T}$cf_cv_have_errno" >&6
7523
7524 if test "$cf_cv_have_errno" = yes ; then
7525
7526 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7527
7528     cat >>confdefs.h <<EOF
7529 #define $cf_result 1
7530 EOF
7531
7532 fi
7533
7534 echo "$as_me:7534: checking if data-only library module links" >&5
7535 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
7536 if test "${cf_cv_link_dataonly+set}" = set; then
7537   echo $ECHO_N "(cached) $ECHO_C" >&6
7538 else
7539
7540         rm -f conftest.a
7541         cat >conftest.$ac_ext <<EOF
7542 #line 7542 "configure"
7543 int     testdata[3] = { 123, 456, 789 };
7544 EOF
7545         if { (eval echo "$as_me:7545: \"$ac_compile\"") >&5
7546   (eval $ac_compile) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit $ac_status); } ; then
7550                 mv conftest.o data.o && \
7551                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
7552         fi
7553         rm -f conftest.$ac_ext data.o
7554         cat >conftest.$ac_ext <<EOF
7555 #line 7555 "configure"
7556 int     testfunc()
7557 {
7558 #if defined(NeXT)
7559         exit(1);        /* I'm told this linker is broken */
7560 #else
7561         extern int testdata[3];
7562         return testdata[0] == 123
7563            &&  testdata[1] == 456
7564            &&  testdata[2] == 789;
7565 #endif
7566 }
7567 EOF
7568         if { (eval echo "$as_me:7568: \"$ac_compile\"") >&5
7569   (eval $ac_compile) 2>&5
7570   ac_status=$?
7571   echo "$as_me:7571: \$? = $ac_status" >&5
7572   (exit $ac_status); }; then
7573                 mv conftest.o func.o && \
7574                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
7575         fi
7576         rm -f conftest.$ac_ext func.o
7577         ( eval $ac_cv_prog_RANLIB conftest.a ) 2>&5 >/dev/null
7578         cf_saveLIBS="$LIBS"
7579         LIBS="conftest.a $LIBS"
7580         if test "$cross_compiling" = yes; then
7581   cf_cv_link_dataonly=unknown
7582 else
7583   cat >conftest.$ac_ext <<_ACEOF
7584 #line 7584 "configure"
7585 #include "confdefs.h"
7586
7587         int main()
7588         {
7589                 extern int testfunc();
7590                 exit (!testfunc());
7591         }
7592
7593 _ACEOF
7594 rm -f conftest$ac_exeext
7595 if { (eval echo "$as_me:7595: \"$ac_link\"") >&5
7596   (eval $ac_link) 2>&5
7597   ac_status=$?
7598   echo "$as_me:7598: \$? = $ac_status" >&5
7599   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7600   { (eval echo "$as_me:7600: \"$ac_try\"") >&5
7601   (eval $ac_try) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); }; }; then
7605   cf_cv_link_dataonly=yes
7606 else
7607   echo "$as_me: program exited with status $ac_status" >&5
7608 echo "$as_me: failed program was:" >&5
7609 cat conftest.$ac_ext >&5
7610 cf_cv_link_dataonly=no
7611 fi
7612 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7613 fi
7614         LIBS="$cf_saveLIBS"
7615
7616 fi
7617
7618 echo "$as_me:7618: result: $cf_cv_link_dataonly" >&5
7619 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
7620
7621 if test "$cf_cv_link_dataonly" = no ; then
7622         cat >>confdefs.h <<\EOF
7623 #define BROKEN_LINKER 1
7624 EOF
7625
7626         BROKEN_LINKER=1
7627 fi
7628
7629 ###     Checks for library functions.
7630
7631 for ac_func in \
7632 getcwd \
7633 getegid \
7634 geteuid \
7635 getttynam \
7636 issetugid \
7637 memccpy \
7638 nanosleep \
7639 poll \
7640 remove \
7641 select \
7642 setbuf \
7643 setbuffer \
7644 setvbuf \
7645 sigaction \
7646 sigvec \
7647 strdup \
7648 strstr \
7649 tcgetpgrp \
7650 times \
7651 vsnprintf \
7652
7653 do
7654 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7655 echo "$as_me:7655: checking for $ac_func" >&5
7656 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7657 if eval "test \"\${$as_ac_var+set}\" = set"; then
7658   echo $ECHO_N "(cached) $ECHO_C" >&6
7659 else
7660   cat >conftest.$ac_ext <<_ACEOF
7661 #line 7661 "configure"
7662 #include "confdefs.h"
7663 /* System header to define __stub macros and hopefully few prototypes,
7664     which can conflict with char $ac_func (); below.  */
7665 #include <assert.h>
7666 /* Override any gcc2 internal prototype to avoid an error.  */
7667 #ifdef __cplusplus
7668 extern "C"
7669 #endif
7670 /* We use char because int might match the return type of a gcc2
7671    builtin and then its argument prototype would still apply.  */
7672 char $ac_func ();
7673 char (*f) ();
7674
7675 int
7676 main ()
7677 {
7678 /* The GNU C library defines this for functions which it implements
7679     to always fail with ENOSYS.  Some functions are actually named
7680     something starting with __ and the normal name is an alias.  */
7681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7682 choke me
7683 #else
7684 f = $ac_func;
7685 #endif
7686
7687   ;
7688   return 0;
7689 }
7690 _ACEOF
7691 rm -f conftest.$ac_objext conftest$ac_exeext
7692 if { (eval echo "$as_me:7692: \"$ac_link\"") >&5
7693   (eval $ac_link) 2>&5
7694   ac_status=$?
7695   echo "$as_me:7695: \$? = $ac_status" >&5
7696   (exit $ac_status); } &&
7697          { ac_try='test -s conftest$ac_exeext'
7698   { (eval echo "$as_me:7698: \"$ac_try\"") >&5
7699   (eval $ac_try) 2>&5
7700   ac_status=$?
7701   echo "$as_me:7701: \$? = $ac_status" >&5
7702   (exit $ac_status); }; }; then
7703   eval "$as_ac_var=yes"
7704 else
7705   echo "$as_me: failed program was:" >&5
7706 cat conftest.$ac_ext >&5
7707 eval "$as_ac_var=no"
7708 fi
7709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7710 fi
7711 echo "$as_me:7711: result: `eval echo '${'$as_ac_var'}'`" >&5
7712 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7713 if test `eval echo '${'$as_ac_var'}'` = yes; then
7714   cat >>confdefs.h <<EOF
7715 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7716 EOF
7717
7718 fi
7719 done
7720
7721 if test "$with_getcap" = "yes" ; then
7722
7723 echo "$as_me:7723: checking for terminal-capability database functions" >&5
7724 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
7725 if test "${cf_cv_cgetent+set}" = set; then
7726   echo $ECHO_N "(cached) $ECHO_C" >&6
7727 else
7728
7729 cat >conftest.$ac_ext <<_ACEOF
7730 #line 7730 "configure"
7731 #include "confdefs.h"
7732
7733 #include <stdlib.h>
7734 int
7735 main ()
7736 {
7737
7738         char temp[128];
7739         char *buf = temp;
7740         char *db_array = temp;
7741         cgetent(&buf, /* int *, */ &db_array, "vt100");
7742         cgetcap(buf, "tc", '=');
7743         cgetmatch(buf, "tc");
7744
7745   ;
7746   return 0;
7747 }
7748 _ACEOF
7749 rm -f conftest.$ac_objext conftest$ac_exeext
7750 if { (eval echo "$as_me:7750: \"$ac_link\"") >&5
7751   (eval $ac_link) 2>&5
7752   ac_status=$?
7753   echo "$as_me:7753: \$? = $ac_status" >&5
7754   (exit $ac_status); } &&
7755          { ac_try='test -s conftest$ac_exeext'
7756   { (eval echo "$as_me:7756: \"$ac_try\"") >&5
7757   (eval $ac_try) 2>&5
7758   ac_status=$?
7759   echo "$as_me:7759: \$? = $ac_status" >&5
7760   (exit $ac_status); }; }; then
7761   cf_cv_cgetent=yes
7762 else
7763   echo "$as_me: failed program was:" >&5
7764 cat conftest.$ac_ext >&5
7765 cf_cv_cgetent=no
7766 fi
7767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7768
7769 fi
7770
7771 echo "$as_me:7771: result: $cf_cv_cgetent" >&5
7772 echo "${ECHO_T}$cf_cv_cgetent" >&6
7773 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
7774 #define HAVE_BSD_CGETENT 1
7775 EOF
7776
7777 fi
7778
7779 echo "$as_me:7779: checking for isascii" >&5
7780 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
7781 if test "${cf_cv_have_isascii+set}" = set; then
7782   echo $ECHO_N "(cached) $ECHO_C" >&6
7783 else
7784
7785         cat >conftest.$ac_ext <<_ACEOF
7786 #line 7786 "configure"
7787 #include "confdefs.h"
7788 #include <ctype.h>
7789 int
7790 main ()
7791 {
7792 int x = isascii(' ')
7793   ;
7794   return 0;
7795 }
7796 _ACEOF
7797 rm -f conftest.$ac_objext conftest$ac_exeext
7798 if { (eval echo "$as_me:7798: \"$ac_link\"") >&5
7799   (eval $ac_link) 2>&5
7800   ac_status=$?
7801   echo "$as_me:7801: \$? = $ac_status" >&5
7802   (exit $ac_status); } &&
7803          { ac_try='test -s conftest$ac_exeext'
7804   { (eval echo "$as_me:7804: \"$ac_try\"") >&5
7805   (eval $ac_try) 2>&5
7806   ac_status=$?
7807   echo "$as_me:7807: \$? = $ac_status" >&5
7808   (exit $ac_status); }; }; then
7809   cf_cv_have_isascii=yes
7810 else
7811   echo "$as_me: failed program was:" >&5
7812 cat conftest.$ac_ext >&5
7813 cf_cv_have_isascii=no
7814 fi
7815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7816
7817 fi
7818 echo "$as_me:7818: result: $cf_cv_have_isascii" >&5
7819 echo "${ECHO_T}$cf_cv_have_isascii" >&6
7820 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
7821 #define HAVE_ISASCII 1
7822 EOF
7823
7824 if test "$ac_cv_func_sigaction" = yes; then
7825 echo "$as_me:7825: checking whether sigaction needs _POSIX_SOURCE" >&5
7826 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
7827 cat >conftest.$ac_ext <<_ACEOF
7828 #line 7828 "configure"
7829 #include "confdefs.h"
7830
7831 #include <sys/types.h>
7832 #include <signal.h>
7833 int
7834 main ()
7835 {
7836 struct sigaction act
7837   ;
7838   return 0;
7839 }
7840 _ACEOF
7841 rm -f conftest.$ac_objext
7842 if { (eval echo "$as_me:7842: \"$ac_compile\"") >&5
7843   (eval $ac_compile) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit $ac_status); } &&
7847          { ac_try='test -s conftest.$ac_objext'
7848   { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7849   (eval $ac_try) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit $ac_status); }; }; then
7853   sigact_bad=no
7854 else
7855   echo "$as_me: failed program was:" >&5
7856 cat conftest.$ac_ext >&5
7857
7858 cat >conftest.$ac_ext <<_ACEOF
7859 #line 7859 "configure"
7860 #include "confdefs.h"
7861
7862 #define _POSIX_SOURCE
7863 #include <sys/types.h>
7864 #include <signal.h>
7865 int
7866 main ()
7867 {
7868 struct sigaction act
7869   ;
7870   return 0;
7871 }
7872 _ACEOF
7873 rm -f conftest.$ac_objext
7874 if { (eval echo "$as_me:7874: \"$ac_compile\"") >&5
7875   (eval $ac_compile) 2>&5
7876   ac_status=$?
7877   echo "$as_me:7877: \$? = $ac_status" >&5
7878   (exit $ac_status); } &&
7879          { ac_try='test -s conftest.$ac_objext'
7880   { (eval echo "$as_me:7880: \"$ac_try\"") >&5
7881   (eval $ac_try) 2>&5
7882   ac_status=$?
7883   echo "$as_me:7883: \$? = $ac_status" >&5
7884   (exit $ac_status); }; }; then
7885   sigact_bad=yes
7886          cat >>confdefs.h <<\EOF
7887 #define SVR4_ACTION 1
7888 EOF
7889
7890 else
7891   echo "$as_me: failed program was:" >&5
7892 cat conftest.$ac_ext >&5
7893 sigact_bad=unknown
7894 fi
7895 rm -f conftest.$ac_objext conftest.$ac_ext
7896 fi
7897 rm -f conftest.$ac_objext conftest.$ac_ext
7898 echo "$as_me:7898: result: $sigact_bad" >&5
7899 echo "${ECHO_T}$sigact_bad" >&6
7900 fi
7901
7902 for ac_header in \
7903 termio.h \
7904 termios.h \
7905 unistd.h \
7906
7907 do
7908 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7909 echo "$as_me:7909: checking for $ac_header" >&5
7910 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7911 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7912   echo $ECHO_N "(cached) $ECHO_C" >&6
7913 else
7914   cat >conftest.$ac_ext <<_ACEOF
7915 #line 7915 "configure"
7916 #include "confdefs.h"
7917 #include <$ac_header>
7918 _ACEOF
7919 if { (eval echo "$as_me:7919: \"$ac_cpp conftest.$ac_ext\"") >&5
7920   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7921   ac_status=$?
7922   egrep -v '^ *\+' conftest.er1 >conftest.err
7923   rm -f conftest.er1
7924   cat conftest.err >&5
7925   echo "$as_me:7925: \$? = $ac_status" >&5
7926   (exit $ac_status); } >/dev/null; then
7927   if test -s conftest.err; then
7928     ac_cpp_err=$ac_c_preproc_warn_flag
7929   else
7930     ac_cpp_err=
7931   fi
7932 else
7933   ac_cpp_err=yes
7934 fi
7935 if test -z "$ac_cpp_err"; then
7936   eval "$as_ac_Header=yes"
7937 else
7938   echo "$as_me: failed program was:" >&5
7939   cat conftest.$ac_ext >&5
7940   eval "$as_ac_Header=no"
7941 fi
7942 rm -f conftest.err conftest.$ac_ext
7943 fi
7944 echo "$as_me:7944: result: `eval echo '${'$as_ac_Header'}'`" >&5
7945 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7946 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7947   cat >>confdefs.h <<EOF
7948 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7949 EOF
7950
7951 fi
7952 done
7953
7954 if test "$ISC" = yes ; then
7955
7956 for ac_header in sys/termio.h
7957 do
7958 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7959 echo "$as_me:7959: checking for $ac_header" >&5
7960 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7961 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7962   echo $ECHO_N "(cached) $ECHO_C" >&6
7963 else
7964   cat >conftest.$ac_ext <<_ACEOF
7965 #line 7965 "configure"
7966 #include "confdefs.h"
7967 #include <$ac_header>
7968 _ACEOF
7969 if { (eval echo "$as_me:7969: \"$ac_cpp conftest.$ac_ext\"") >&5
7970   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7971   ac_status=$?
7972   egrep -v '^ *\+' conftest.er1 >conftest.err
7973   rm -f conftest.er1
7974   cat conftest.err >&5
7975   echo "$as_me:7975: \$? = $ac_status" >&5
7976   (exit $ac_status); } >/dev/null; then
7977   if test -s conftest.err; then
7978     ac_cpp_err=$ac_c_preproc_warn_flag
7979   else
7980     ac_cpp_err=
7981   fi
7982 else
7983   ac_cpp_err=yes
7984 fi
7985 if test -z "$ac_cpp_err"; then
7986   eval "$as_ac_Header=yes"
7987 else
7988   echo "$as_me: failed program was:" >&5
7989   cat conftest.$ac_ext >&5
7990   eval "$as_ac_Header=no"
7991 fi
7992 rm -f conftest.err conftest.$ac_ext
7993 fi
7994 echo "$as_me:7994: result: `eval echo '${'$as_ac_Header'}'`" >&5
7995 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7996 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7997   cat >>confdefs.h <<EOF
7998 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7999 EOF
8000
8001 fi
8002 done
8003
8004 fi
8005 if test "$ac_cv_header_termios_h" = yes ; then
8006         case "$CFLAGS $CPPFLAGS" in
8007         *-D_POSIX_SOURCE*)
8008                 termios_bad=dunno ;;
8009         *)      termios_bad=maybe ;;
8010         esac
8011         if test "$termios_bad" = maybe ; then
8012         echo "$as_me:8012: checking whether termios.h needs _POSIX_SOURCE" >&5
8013 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
8014         cat >conftest.$ac_ext <<_ACEOF
8015 #line 8015 "configure"
8016 #include "confdefs.h"
8017 #include <termios.h>
8018 int
8019 main ()
8020 {
8021 struct termios foo; int x = foo.c_iflag
8022   ;
8023   return 0;
8024 }
8025 _ACEOF
8026 rm -f conftest.$ac_objext
8027 if { (eval echo "$as_me:8027: \"$ac_compile\"") >&5
8028   (eval $ac_compile) 2>&5
8029   ac_status=$?
8030   echo "$as_me:8030: \$? = $ac_status" >&5
8031   (exit $ac_status); } &&
8032          { ac_try='test -s conftest.$ac_objext'
8033   { (eval echo "$as_me:8033: \"$ac_try\"") >&5
8034   (eval $ac_try) 2>&5
8035   ac_status=$?
8036   echo "$as_me:8036: \$? = $ac_status" >&5
8037   (exit $ac_status); }; }; then
8038   termios_bad=no
8039 else
8040   echo "$as_me: failed program was:" >&5
8041 cat conftest.$ac_ext >&5
8042
8043                 cat >conftest.$ac_ext <<_ACEOF
8044 #line 8044 "configure"
8045 #include "confdefs.h"
8046
8047 #define _POSIX_SOURCE
8048 #include <termios.h>
8049 int
8050 main ()
8051 {
8052 struct termios foo; int x = foo.c_iflag
8053   ;
8054   return 0;
8055 }
8056 _ACEOF
8057 rm -f conftest.$ac_objext
8058 if { (eval echo "$as_me:8058: \"$ac_compile\"") >&5
8059   (eval $ac_compile) 2>&5
8060   ac_status=$?
8061   echo "$as_me:8061: \$? = $ac_status" >&5
8062   (exit $ac_status); } &&
8063          { ac_try='test -s conftest.$ac_objext'
8064   { (eval echo "$as_me:8064: \"$ac_try\"") >&5
8065   (eval $ac_try) 2>&5
8066   ac_status=$?
8067   echo "$as_me:8067: \$? = $ac_status" >&5
8068   (exit $ac_status); }; }; then
8069   termios_bad=unknown
8070 else
8071   echo "$as_me: failed program was:" >&5
8072 cat conftest.$ac_ext >&5
8073 termios_bad=yes cat >>confdefs.h <<\EOF
8074 #define SVR4_TERMIO 1
8075 EOF
8076
8077 fi
8078 rm -f conftest.$ac_objext conftest.$ac_ext
8079
8080 fi
8081 rm -f conftest.$ac_objext conftest.$ac_ext
8082         echo "$as_me:8082: result: $termios_bad" >&5
8083 echo "${ECHO_T}$termios_bad" >&6
8084         fi
8085 fi
8086
8087 echo "$as_me:8087: checking for tcgetattr" >&5
8088 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
8089 if test "${cf_cv_have_tcgetattr+set}" = set; then
8090   echo $ECHO_N "(cached) $ECHO_C" >&6
8091 else
8092
8093 cat >conftest.$ac_ext <<_ACEOF
8094 #line 8094 "configure"
8095 #include "confdefs.h"
8096
8097 #include <sys/types.h>
8098 #ifdef HAVE_UNISTD_H
8099 #include <unistd.h>
8100 #endif
8101 #ifdef HAVE_TERMIOS_H
8102 #include <termios.h>
8103 #define TTY struct termios
8104 #else
8105 #ifdef HAVE_TERMIO_H
8106 #include <termio.h>
8107 #define TTY struct termio
8108 #endif
8109 #endif
8110
8111 int
8112 main ()
8113 {
8114
8115 TTY foo;
8116 tcgetattr(1, &foo);
8117   ;
8118   return 0;
8119 }
8120 _ACEOF
8121 rm -f conftest.$ac_objext conftest$ac_exeext
8122 if { (eval echo "$as_me:8122: \"$ac_link\"") >&5
8123   (eval $ac_link) 2>&5
8124   ac_status=$?
8125   echo "$as_me:8125: \$? = $ac_status" >&5
8126   (exit $ac_status); } &&
8127          { ac_try='test -s conftest$ac_exeext'
8128   { (eval echo "$as_me:8128: \"$ac_try\"") >&5
8129   (eval $ac_try) 2>&5
8130   ac_status=$?
8131   echo "$as_me:8131: \$? = $ac_status" >&5
8132   (exit $ac_status); }; }; then
8133   cf_cv_have_tcgetattr=yes
8134 else
8135   echo "$as_me: failed program was:" >&5
8136 cat conftest.$ac_ext >&5
8137 cf_cv_have_tcgetattr=no
8138 fi
8139 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8140 fi
8141 echo "$as_me:8141: result: $cf_cv_have_tcgetattr" >&5
8142 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
8143 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
8144 #define HAVE_TCGETATTR 1
8145 EOF
8146
8147 echo "$as_me:8147: checking for vsscanf function or workaround" >&5
8148 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
8149 if test "${cf_cv_func_vsscanf+set}" = set; then
8150   echo $ECHO_N "(cached) $ECHO_C" >&6
8151 else
8152
8153 cat >conftest.$ac_ext <<_ACEOF
8154 #line 8154 "configure"
8155 #include "confdefs.h"
8156
8157 #include <stdarg.h>
8158 #include <stdio.h>
8159 int
8160 main ()
8161 {
8162
8163         va_list ap;
8164         vsscanf("from", "%d", ap)
8165   ;
8166   return 0;
8167 }
8168 _ACEOF
8169 rm -f conftest.$ac_objext conftest$ac_exeext
8170 if { (eval echo "$as_me:8170: \"$ac_link\"") >&5
8171   (eval $ac_link) 2>&5
8172   ac_status=$?
8173   echo "$as_me:8173: \$? = $ac_status" >&5
8174   (exit $ac_status); } &&
8175          { ac_try='test -s conftest$ac_exeext'
8176   { (eval echo "$as_me:8176: \"$ac_try\"") >&5
8177   (eval $ac_try) 2>&5
8178   ac_status=$?
8179   echo "$as_me:8179: \$? = $ac_status" >&5
8180   (exit $ac_status); }; }; then
8181   cf_cv_func_vsscanf=vsscanf
8182 else
8183   echo "$as_me: failed program was:" >&5
8184 cat conftest.$ac_ext >&5
8185
8186 cat >conftest.$ac_ext <<_ACEOF
8187 #line 8187 "configure"
8188 #include "confdefs.h"
8189
8190 #include <stdarg.h>
8191 #include <stdio.h>
8192 int
8193 main ()
8194 {
8195
8196     FILE strbuf;
8197     char *str = "from";
8198
8199     strbuf._flag = _IOREAD;
8200     strbuf._ptr = strbuf._base = (unsigned char *) str;
8201     strbuf._cnt = strlen(str);
8202     strbuf._file = _NFILE;
8203     return (vfscanf(&strbuf, "%d", ap))
8204   ;
8205   return 0;
8206 }
8207 _ACEOF
8208 rm -f conftest.$ac_objext conftest$ac_exeext
8209 if { (eval echo "$as_me:8209: \"$ac_link\"") >&5
8210   (eval $ac_link) 2>&5
8211   ac_status=$?
8212   echo "$as_me:8212: \$? = $ac_status" >&5
8213   (exit $ac_status); } &&
8214          { ac_try='test -s conftest$ac_exeext'
8215   { (eval echo "$as_me:8215: \"$ac_try\"") >&5
8216   (eval $ac_try) 2>&5
8217   ac_status=$?
8218   echo "$as_me:8218: \$? = $ac_status" >&5
8219   (exit $ac_status); }; }; then
8220   cf_cv_func_vsscanf=vfscanf
8221 else
8222   echo "$as_me: failed program was:" >&5
8223 cat conftest.$ac_ext >&5
8224
8225 cat >conftest.$ac_ext <<_ACEOF
8226 #line 8226 "configure"
8227 #include "confdefs.h"
8228
8229 #include <stdarg.h>
8230 #include <stdio.h>
8231 int
8232 main ()
8233 {
8234
8235     FILE strbuf;
8236     char *str = "from";
8237
8238     strbuf._flag = _IOREAD;
8239     strbuf._ptr = strbuf._base = (unsigned char *) str;
8240     strbuf._cnt = strlen(str);
8241     strbuf._file = _NFILE;
8242     return (_doscan(&strbuf, "%d", ap))
8243   ;
8244   return 0;
8245 }
8246 _ACEOF
8247 rm -f conftest.$ac_objext conftest$ac_exeext
8248 if { (eval echo "$as_me:8248: \"$ac_link\"") >&5
8249   (eval $ac_link) 2>&5
8250   ac_status=$?
8251   echo "$as_me:8251: \$? = $ac_status" >&5
8252   (exit $ac_status); } &&
8253          { ac_try='test -s conftest$ac_exeext'
8254   { (eval echo "$as_me:8254: \"$ac_try\"") >&5
8255   (eval $ac_try) 2>&5
8256   ac_status=$?
8257   echo "$as_me:8257: \$? = $ac_status" >&5
8258   (exit $ac_status); }; }; then
8259   cf_cv_func_vsscanf=_doscan
8260 else
8261   echo "$as_me: failed program was:" >&5
8262 cat conftest.$ac_ext >&5
8263
8264 cf_cv_func_vsscanf=no
8265 fi
8266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8267 fi
8268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8269 fi
8270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8271 fi
8272 echo "$as_me:8272: result: $cf_cv_func_vsscanf" >&5
8273 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
8274
8275 case $cf_cv_func_vsscanf in #(vi
8276 vsscanf) cat >>confdefs.h <<\EOF
8277 #define HAVE_VSSCANF 1
8278 EOF
8279 ;; #(vi
8280 vfscanf) cat >>confdefs.h <<\EOF
8281 #define HAVE_VFSCANF 1
8282 EOF
8283 ;; #(vi
8284 _doscan) cat >>confdefs.h <<\EOF
8285 #define HAVE__DOSCAN 1
8286 EOF
8287 ;;
8288 esac
8289
8290 echo "$as_me:8290: checking for working mkstemp" >&5
8291 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
8292 if test "${cf_cv_func_mkstemp+set}" = set; then
8293   echo $ECHO_N "(cached) $ECHO_C" >&6
8294 else
8295
8296 rm -f conftest*
8297 if test "$cross_compiling" = yes; then
8298   echo "$as_me:8298: checking for mkstemp" >&5
8299 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
8300 if test "${ac_cv_func_mkstemp+set}" = set; then
8301   echo $ECHO_N "(cached) $ECHO_C" >&6
8302 else
8303   cat >conftest.$ac_ext <<_ACEOF
8304 #line 8304 "configure"
8305 #include "confdefs.h"
8306 /* System header to define __stub macros and hopefully few prototypes,
8307     which can conflict with char mkstemp (); below.  */
8308 #include <assert.h>
8309 /* Override any gcc2 internal prototype to avoid an error.  */
8310 #ifdef __cplusplus
8311 extern "C"
8312 #endif
8313 /* We use char because int might match the return type of a gcc2
8314    builtin and then its argument prototype would still apply.  */
8315 char mkstemp ();
8316 char (*f) ();
8317
8318 int
8319 main ()
8320 {
8321 /* The GNU C library defines this for functions which it implements
8322     to always fail with ENOSYS.  Some functions are actually named
8323     something starting with __ and the normal name is an alias.  */
8324 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
8325 choke me
8326 #else
8327 f = mkstemp;
8328 #endif
8329
8330   ;
8331   return 0;
8332 }
8333 _ACEOF
8334 rm -f conftest.$ac_objext conftest$ac_exeext
8335 if { (eval echo "$as_me:8335: \"$ac_link\"") >&5
8336   (eval $ac_link) 2>&5
8337   ac_status=$?
8338   echo "$as_me:8338: \$? = $ac_status" >&5
8339   (exit $ac_status); } &&
8340          { ac_try='test -s conftest$ac_exeext'
8341   { (eval echo "$as_me:8341: \"$ac_try\"") >&5
8342   (eval $ac_try) 2>&5
8343   ac_status=$?
8344   echo "$as_me:8344: \$? = $ac_status" >&5
8345   (exit $ac_status); }; }; then
8346   ac_cv_func_mkstemp=yes
8347 else
8348   echo "$as_me: failed program was:" >&5
8349 cat conftest.$ac_ext >&5
8350 ac_cv_func_mkstemp=no
8351 fi
8352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8353 fi
8354 echo "$as_me:8354: result: $ac_cv_func_mkstemp" >&5
8355 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
8356
8357 else
8358   cat >conftest.$ac_ext <<_ACEOF
8359 #line 8359 "configure"
8360 #include "confdefs.h"
8361
8362 #include <sys/types.h>
8363 #include <stdlib.h>
8364 #include <stdio.h>
8365 #include <string.h>
8366 #include <sys/stat.h>
8367 int main()
8368 {
8369         char *tmpl = "conftestXXXXXX";
8370         char name[2][80];
8371         int n;
8372         int result = 0;
8373         int fd;
8374         struct stat sb;
8375
8376         umask(077);
8377         for (n = 0; n < 2; ++n) {
8378                 strcpy(name[n], tmpl);
8379                 if ((fd = mkstemp(name[n])) >= 0) {
8380                         if (!strcmp(name[n], tmpl)
8381                          || stat(name[n], &sb) != 0
8382                          || (sb.st_mode & S_IFMT) != S_IFREG
8383                          || (sb.st_mode & 077) != 0) {
8384                                 result = 1;
8385                         }
8386                         close(fd);
8387                 }
8388         }
8389         if (result == 0
8390          && !strcmp(name[0], name[1]))
8391                 result = 1;
8392         exit(result);
8393 }
8394
8395 _ACEOF
8396 rm -f conftest$ac_exeext
8397 if { (eval echo "$as_me:8397: \"$ac_link\"") >&5
8398   (eval $ac_link) 2>&5
8399   ac_status=$?
8400   echo "$as_me:8400: \$? = $ac_status" >&5
8401   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8402   { (eval echo "$as_me:8402: \"$ac_try\"") >&5
8403   (eval $ac_try) 2>&5
8404   ac_status=$?
8405   echo "$as_me:8405: \$? = $ac_status" >&5
8406   (exit $ac_status); }; }; then
8407   cf_cv_func_mkstemp=yes
8408
8409 else
8410   echo "$as_me: program exited with status $ac_status" >&5
8411 echo "$as_me: failed program was:" >&5
8412 cat conftest.$ac_ext >&5
8413 cf_cv_func_mkstemp=no
8414
8415 fi
8416 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8417 fi
8418
8419 fi
8420 echo "$as_me:8420: result: $cf_cv_func_mkstemp" >&5
8421 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
8422 if test "$cf_cv_func_mkstemp" = yes ; then
8423         cat >>confdefs.h <<\EOF
8424 #define HAVE_MKSTEMP 1
8425 EOF
8426
8427 fi
8428
8429 # setup for prototype of fallback for vsscanf()
8430 if test "$cf_cv_func_vsscanf" = vsscanf ; then
8431         HAVE_VSSCANF=1
8432 else
8433         HAVE_VSSCANF=0
8434 fi
8435
8436 if test "$cross_compiling" = yes ; then
8437         { echo "$as_me:8437: WARNING: cross compiling: assume setvbuf params not reversed" >&5
8438 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
8439 else
8440         echo "$as_me:8440: checking whether setvbuf arguments are reversed" >&5
8441 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
8442 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
8443   echo $ECHO_N "(cached) $ECHO_C" >&6
8444 else
8445   if test "$cross_compiling" = yes; then
8446   { { echo "$as_me:8446: error: cannot run test program while cross compiling" >&5
8447 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8448    { (exit 1); exit 1; }; }
8449 else
8450   cat >conftest.$ac_ext <<_ACEOF
8451 #line 8451 "configure"
8452 #include "confdefs.h"
8453 #include <stdio.h>
8454 /* If setvbuf has the reversed format, exit 0. */
8455 int
8456 main ()
8457 {
8458   /* This call has the arguments reversed.
8459      A reversed system may check and see that the address of main
8460      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
8461   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
8462     exit(1);
8463   putc('\r', stdout);
8464   exit(0);                      /* Non-reversed systems segv here.  */
8465 }
8466 _ACEOF
8467 rm -f conftest$ac_exeext
8468 if { (eval echo "$as_me:8468: \"$ac_link\"") >&5
8469   (eval $ac_link) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8473   { (eval echo "$as_me:8473: \"$ac_try\"") >&5
8474   (eval $ac_try) 2>&5
8475   ac_status=$?
8476   echo "$as_me:8476: \$? = $ac_status" >&5
8477   (exit $ac_status); }; }; then
8478   ac_cv_func_setvbuf_reversed=yes
8479 else
8480   echo "$as_me: program exited with status $ac_status" >&5
8481 echo "$as_me: failed program was:" >&5
8482 cat conftest.$ac_ext >&5
8483 ac_cv_func_setvbuf_reversed=no
8484 fi
8485 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8486 fi
8487 rm -f core core.* *.core
8488 fi
8489 echo "$as_me:8489: result: $ac_cv_func_setvbuf_reversed" >&5
8490 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
8491 if test $ac_cv_func_setvbuf_reversed = yes; then
8492
8493 cat >>confdefs.h <<\EOF
8494 #define SETVBUF_REVERSED 1
8495 EOF
8496
8497 fi
8498
8499 fi
8500 echo "$as_me:8500: checking return type of signal handlers" >&5
8501 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
8502 if test "${ac_cv_type_signal+set}" = set; then
8503   echo $ECHO_N "(cached) $ECHO_C" >&6
8504 else
8505   cat >conftest.$ac_ext <<_ACEOF
8506 #line 8506 "configure"
8507 #include "confdefs.h"
8508 #include <sys/types.h>
8509 #include <signal.h>
8510 #ifdef signal
8511 # undef signal
8512 #endif
8513 #ifdef __cplusplus
8514 extern "C" void (*signal (int, void (*)(int)))(int);
8515 #else
8516 void (*signal ()) ();
8517 #endif
8518
8519 int
8520 main ()
8521 {
8522 int i;
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   ac_cv_type_signal=void
8540 else
8541   echo "$as_me: failed program was:" >&5
8542 cat conftest.$ac_ext >&5
8543 ac_cv_type_signal=int
8544 fi
8545 rm -f conftest.$ac_objext conftest.$ac_ext
8546 fi
8547 echo "$as_me:8547: result: $ac_cv_type_signal" >&5
8548 echo "${ECHO_T}$ac_cv_type_signal" >&6
8549
8550 cat >>confdefs.h <<EOF
8551 #define RETSIGTYPE $ac_cv_type_signal
8552 EOF
8553
8554 echo "$as_me:8554: checking for type sigaction_t" >&5
8555 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
8556 if test "${cf_cv_type_sigaction+set}" = set; then
8557   echo $ECHO_N "(cached) $ECHO_C" >&6
8558 else
8559
8560         cat >conftest.$ac_ext <<_ACEOF
8561 #line 8561 "configure"
8562 #include "confdefs.h"
8563
8564 #include <signal.h>
8565 int
8566 main ()
8567 {
8568 sigaction_t x
8569   ;
8570   return 0;
8571 }
8572 _ACEOF
8573 rm -f conftest.$ac_objext
8574 if { (eval echo "$as_me:8574: \"$ac_compile\"") >&5
8575   (eval $ac_compile) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); } &&
8579          { ac_try='test -s conftest.$ac_objext'
8580   { (eval echo "$as_me:8580: \"$ac_try\"") >&5
8581   (eval $ac_try) 2>&5
8582   ac_status=$?
8583   echo "$as_me:8583: \$? = $ac_status" >&5
8584   (exit $ac_status); }; }; then
8585   cf_cv_type_sigaction=yes
8586 else
8587   echo "$as_me: failed program was:" >&5
8588 cat conftest.$ac_ext >&5
8589 cf_cv_type_sigaction=no
8590 fi
8591 rm -f conftest.$ac_objext conftest.$ac_ext
8592 fi
8593
8594 echo "$as_me:8594: result: $cf_cv_type_sigaction" >&5
8595 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
8596 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
8597 #define HAVE_TYPE_SIGACTION 1
8598 EOF
8599
8600 echo "$as_me:8600: checking declaration of size-change" >&5
8601 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
8602 if test "${cf_cv_sizechange+set}" = set; then
8603   echo $ECHO_N "(cached) $ECHO_C" >&6
8604 else
8605
8606     cf_cv_sizechange=unknown
8607     cf_save_CPPFLAGS="$CPPFLAGS"
8608
8609 for cf_opts in "" "NEED_PTEM_H"
8610 do
8611
8612     CPPFLAGS="$cf_save_CPPFLAGS"
8613     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
8614     cat >conftest.$ac_ext <<_ACEOF
8615 #line 8615 "configure"
8616 #include "confdefs.h"
8617 #include <sys/types.h>
8618 #ifdef HAVE_TERMIOS_H
8619 #include <termios.h>
8620 #else
8621 #ifdef HAVE_TERMIO_H
8622 #include <termio.h>
8623 #endif
8624 #endif
8625 #ifdef NEED_PTEM_H
8626 /* This is a workaround for SCO:  they neglected to define struct winsize in
8627  * termios.h -- it's only in termio.h and ptem.h
8628  */
8629 #include        <sys/stream.h>
8630 #include        <sys/ptem.h>
8631 #endif
8632 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
8633 #include <sys/ioctl.h>
8634 #endif
8635
8636 int
8637 main ()
8638 {
8639
8640 #ifdef TIOCGSIZE
8641         struct ttysize win;     /* FIXME: what system is this? */
8642         int y = win.ts_lines;
8643         int x = win.ts_cols;
8644 #else
8645 #ifdef TIOCGWINSZ
8646         struct winsize win;
8647         int y = win.ws_row;
8648         int x = win.ws_col;
8649 #else
8650         no TIOCGSIZE or TIOCGWINSZ
8651 #endif /* TIOCGWINSZ */
8652 #endif /* TIOCGSIZE */
8653
8654   ;
8655   return 0;
8656 }
8657 _ACEOF
8658 rm -f conftest.$ac_objext
8659 if { (eval echo "$as_me:8659: \"$ac_compile\"") >&5
8660   (eval $ac_compile) 2>&5
8661   ac_status=$?
8662   echo "$as_me:8662: \$? = $ac_status" >&5
8663   (exit $ac_status); } &&
8664          { ac_try='test -s conftest.$ac_objext'
8665   { (eval echo "$as_me:8665: \"$ac_try\"") >&5
8666   (eval $ac_try) 2>&5
8667   ac_status=$?
8668   echo "$as_me:8668: \$? = $ac_status" >&5
8669   (exit $ac_status); }; }; then
8670   cf_cv_sizechange=yes
8671 else
8672   echo "$as_me: failed program was:" >&5
8673 cat conftest.$ac_ext >&5
8674 cf_cv_sizechange=no
8675 fi
8676 rm -f conftest.$ac_objext conftest.$ac_ext
8677
8678         CPPFLAGS="$cf_save_CPPFLAGS"
8679         if test "$cf_cv_sizechange" = yes ; then
8680                 echo "size-change succeeded ($cf_opts)" >&5
8681                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
8682                 break
8683         fi
8684 done
8685
8686 fi
8687 echo "$as_me:8687: result: $cf_cv_sizechange" >&5
8688 echo "${ECHO_T}$cf_cv_sizechange" >&6
8689 if test "$cf_cv_sizechange" != no ; then
8690         cat >>confdefs.h <<\EOF
8691 #define HAVE_SIZECHANGE 1
8692 EOF
8693
8694         case $cf_cv_sizechange in #(vi
8695         NEED*)
8696                 cat >>confdefs.h <<EOF
8697 #define $cf_cv_sizechange  1
8698 EOF
8699
8700                 ;;
8701         esac
8702 fi
8703
8704 echo "$as_me:8704: checking for memmove" >&5
8705 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
8706 if test "${ac_cv_func_memmove+set}" = set; then
8707   echo $ECHO_N "(cached) $ECHO_C" >&6
8708 else
8709   cat >conftest.$ac_ext <<_ACEOF
8710 #line 8710 "configure"
8711 #include "confdefs.h"
8712 /* System header to define __stub macros and hopefully few prototypes,
8713     which can conflict with char memmove (); below.  */
8714 #include <assert.h>
8715 /* Override any gcc2 internal prototype to avoid an error.  */
8716 #ifdef __cplusplus
8717 extern "C"
8718 #endif
8719 /* We use char because int might match the return type of a gcc2
8720    builtin and then its argument prototype would still apply.  */
8721 char memmove ();
8722 char (*f) ();
8723
8724 int
8725 main ()
8726 {
8727 /* The GNU C library defines this for functions which it implements
8728     to always fail with ENOSYS.  Some functions are actually named
8729     something starting with __ and the normal name is an alias.  */
8730 #if defined (__stub_memmove) || defined (__stub___memmove)
8731 choke me
8732 #else
8733 f = memmove;
8734 #endif
8735
8736   ;
8737   return 0;
8738 }
8739 _ACEOF
8740 rm -f conftest.$ac_objext conftest$ac_exeext
8741 if { (eval echo "$as_me:8741: \"$ac_link\"") >&5
8742   (eval $ac_link) 2>&5
8743   ac_status=$?
8744   echo "$as_me:8744: \$? = $ac_status" >&5
8745   (exit $ac_status); } &&
8746          { ac_try='test -s conftest$ac_exeext'
8747   { (eval echo "$as_me:8747: \"$ac_try\"") >&5
8748   (eval $ac_try) 2>&5
8749   ac_status=$?
8750   echo "$as_me:8750: \$? = $ac_status" >&5
8751   (exit $ac_status); }; }; then
8752   ac_cv_func_memmove=yes
8753 else
8754   echo "$as_me: failed program was:" >&5
8755 cat conftest.$ac_ext >&5
8756 ac_cv_func_memmove=no
8757 fi
8758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8759 fi
8760 echo "$as_me:8760: result: $ac_cv_func_memmove" >&5
8761 echo "${ECHO_T}$ac_cv_func_memmove" >&6
8762 if test $ac_cv_func_memmove = yes; then
8763   :
8764 else
8765
8766 echo "$as_me:8766: checking for bcopy" >&5
8767 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
8768 if test "${ac_cv_func_bcopy+set}" = set; then
8769   echo $ECHO_N "(cached) $ECHO_C" >&6
8770 else
8771   cat >conftest.$ac_ext <<_ACEOF
8772 #line 8772 "configure"
8773 #include "confdefs.h"
8774 /* System header to define __stub macros and hopefully few prototypes,
8775     which can conflict with char bcopy (); below.  */
8776 #include <assert.h>
8777 /* Override any gcc2 internal prototype to avoid an error.  */
8778 #ifdef __cplusplus
8779 extern "C"
8780 #endif
8781 /* We use char because int might match the return type of a gcc2
8782    builtin and then its argument prototype would still apply.  */
8783 char bcopy ();
8784 char (*f) ();
8785
8786 int
8787 main ()
8788 {
8789 /* The GNU C library defines this for functions which it implements
8790     to always fail with ENOSYS.  Some functions are actually named
8791     something starting with __ and the normal name is an alias.  */
8792 #if defined (__stub_bcopy) || defined (__stub___bcopy)
8793 choke me
8794 #else
8795 f = bcopy;
8796 #endif
8797
8798   ;
8799   return 0;
8800 }
8801 _ACEOF
8802 rm -f conftest.$ac_objext conftest$ac_exeext
8803 if { (eval echo "$as_me:8803: \"$ac_link\"") >&5
8804   (eval $ac_link) 2>&5
8805   ac_status=$?
8806   echo "$as_me:8806: \$? = $ac_status" >&5
8807   (exit $ac_status); } &&
8808          { ac_try='test -s conftest$ac_exeext'
8809   { (eval echo "$as_me:8809: \"$ac_try\"") >&5
8810   (eval $ac_try) 2>&5
8811   ac_status=$?
8812   echo "$as_me:8812: \$? = $ac_status" >&5
8813   (exit $ac_status); }; }; then
8814   ac_cv_func_bcopy=yes
8815 else
8816   echo "$as_me: failed program was:" >&5
8817 cat conftest.$ac_ext >&5
8818 ac_cv_func_bcopy=no
8819 fi
8820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8821 fi
8822 echo "$as_me:8822: result: $ac_cv_func_bcopy" >&5
8823 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
8824 if test $ac_cv_func_bcopy = yes; then
8825
8826         echo "$as_me:8826: checking if bcopy does overlapping moves" >&5
8827 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
8828 if test "${cf_cv_good_bcopy+set}" = set; then
8829   echo $ECHO_N "(cached) $ECHO_C" >&6
8830 else
8831
8832                 if test "$cross_compiling" = yes; then
8833   cf_cv_good_bcopy=unknown
8834 else
8835   cat >conftest.$ac_ext <<_ACEOF
8836 #line 8836 "configure"
8837 #include "confdefs.h"
8838
8839 int main() {
8840         static char data[] = "abcdefghijklmnopqrstuwwxyz";
8841         char temp[40];
8842         bcopy(data, temp, sizeof(data));
8843         bcopy(temp+10, temp, 15);
8844         bcopy(temp+5, temp+15, 10);
8845         exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
8846 }
8847
8848 _ACEOF
8849 rm -f conftest$ac_exeext
8850 if { (eval echo "$as_me:8850: \"$ac_link\"") >&5
8851   (eval $ac_link) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8855   { (eval echo "$as_me:8855: \"$ac_try\"") >&5
8856   (eval $ac_try) 2>&5
8857   ac_status=$?
8858   echo "$as_me:8858: \$? = $ac_status" >&5
8859   (exit $ac_status); }; }; then
8860   cf_cv_good_bcopy=yes
8861 else
8862   echo "$as_me: program exited with status $ac_status" >&5
8863 echo "$as_me: failed program was:" >&5
8864 cat conftest.$ac_ext >&5
8865 cf_cv_good_bcopy=no
8866 fi
8867 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8868 fi
8869
8870 fi
8871 echo "$as_me:8871: result: $cf_cv_good_bcopy" >&5
8872 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
8873
8874 else
8875   cf_cv_good_bcopy=no
8876 fi
8877
8878         if test "$cf_cv_good_bcopy" = yes ; then
8879                 cat >>confdefs.h <<\EOF
8880 #define USE_OK_BCOPY 1
8881 EOF
8882
8883         else
8884                 cat >>confdefs.h <<\EOF
8885 #define USE_MY_MEMMOVE 1
8886 EOF
8887
8888         fi
8889
8890 fi
8891
8892 echo "$as_me:8892: checking if poll really works" >&5
8893 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
8894 if test "${cf_cv_working_poll+set}" = set; then
8895   echo $ECHO_N "(cached) $ECHO_C" >&6
8896 else
8897
8898 if test "$cross_compiling" = yes; then
8899   cf_cv_working_poll=unknown
8900 else
8901   cat >conftest.$ac_ext <<_ACEOF
8902 #line 8902 "configure"
8903 #include "confdefs.h"
8904
8905 #include <stdio.h>
8906 #ifdef HAVE_POLL_H
8907 #include <poll.h>
8908 #else
8909 #include <sys/poll.h>
8910 #endif
8911 int main() {
8912         struct pollfd myfds;
8913         int ret;
8914
8915         myfds.fd = 0;
8916         myfds.events = POLLIN;
8917
8918         ret = poll(&myfds, 1, 100);
8919         exit(ret != 0);
8920 }
8921 _ACEOF
8922 rm -f conftest$ac_exeext
8923 if { (eval echo "$as_me:8923: \"$ac_link\"") >&5
8924   (eval $ac_link) 2>&5
8925   ac_status=$?
8926   echo "$as_me:8926: \$? = $ac_status" >&5
8927   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8928   { (eval echo "$as_me:8928: \"$ac_try\"") >&5
8929   (eval $ac_try) 2>&5
8930   ac_status=$?
8931   echo "$as_me:8931: \$? = $ac_status" >&5
8932   (exit $ac_status); }; }; then
8933   cf_cv_working_poll=yes
8934 else
8935   echo "$as_me: program exited with status $ac_status" >&5
8936 echo "$as_me: failed program was:" >&5
8937 cat conftest.$ac_ext >&5
8938 cf_cv_working_poll=no
8939 fi
8940 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8941 fi
8942 fi
8943 echo "$as_me:8943: result: $cf_cv_working_poll" >&5
8944 echo "${ECHO_T}$cf_cv_working_poll" >&6
8945 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
8946 #define HAVE_WORKING_POLL 1
8947 EOF
8948
8949 if test -z "$cf_user_CFLAGS" ; then
8950         CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
8951         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
8952 fi
8953
8954 echo "$as_me:8954: checking for stdbool.h" >&5
8955 echo $ECHO_N "checking for stdbool.h... $ECHO_C" >&6
8956 if test "${ac_cv_header_stdbool_h+set}" = set; then
8957   echo $ECHO_N "(cached) $ECHO_C" >&6
8958 else
8959   cat >conftest.$ac_ext <<_ACEOF
8960 #line 8960 "configure"
8961 #include "confdefs.h"
8962 #include <stdbool.h>
8963 _ACEOF
8964 if { (eval echo "$as_me:8964: \"$ac_cpp conftest.$ac_ext\"") >&5
8965   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8966   ac_status=$?
8967   egrep -v '^ *\+' conftest.er1 >conftest.err
8968   rm -f conftest.er1
8969   cat conftest.err >&5
8970   echo "$as_me:8970: \$? = $ac_status" >&5
8971   (exit $ac_status); } >/dev/null; then
8972   if test -s conftest.err; then
8973     ac_cpp_err=$ac_c_preproc_warn_flag
8974   else
8975     ac_cpp_err=
8976   fi
8977 else
8978   ac_cpp_err=yes
8979 fi
8980 if test -z "$ac_cpp_err"; then
8981   ac_cv_header_stdbool_h=yes
8982 else
8983   echo "$as_me: failed program was:" >&5
8984   cat conftest.$ac_ext >&5
8985   ac_cv_header_stdbool_h=no
8986 fi
8987 rm -f conftest.err conftest.$ac_ext
8988 fi
8989 echo "$as_me:8989: result: $ac_cv_header_stdbool_h" >&5
8990 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
8991 if test $ac_cv_header_stdbool_h = yes; then
8992   cf_cv_header_stdbool_h=1
8993 else
8994   cf_cv_header_stdbool_h=0
8995 fi
8996
8997 echo "$as_me:8997: checking for builtin bool type" >&5
8998 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
8999 if test "${cf_cv_cc_bool_type+set}" = set; then
9000   echo $ECHO_N "(cached) $ECHO_C" >&6
9001 else
9002
9003         cat >conftest.$ac_ext <<_ACEOF
9004 #line 9004 "configure"
9005 #include "confdefs.h"
9006
9007 #include <stdio.h>
9008 #include <sys/types.h>
9009
9010 int
9011 main ()
9012 {
9013 bool x = false
9014   ;
9015   return 0;
9016 }
9017 _ACEOF
9018 rm -f conftest.$ac_objext
9019 if { (eval echo "$as_me:9019: \"$ac_compile\"") >&5
9020   (eval $ac_compile) 2>&5
9021   ac_status=$?
9022   echo "$as_me:9022: \$? = $ac_status" >&5
9023   (exit $ac_status); } &&
9024          { ac_try='test -s conftest.$ac_objext'
9025   { (eval echo "$as_me:9025: \"$ac_try\"") >&5
9026   (eval $ac_try) 2>&5
9027   ac_status=$?
9028   echo "$as_me:9028: \$? = $ac_status" >&5
9029   (exit $ac_status); }; }; then
9030   cf_cv_cc_bool_type=1
9031 else
9032   echo "$as_me: failed program was:" >&5
9033 cat conftest.$ac_ext >&5
9034 cf_cv_cc_bool_type=0
9035 fi
9036 rm -f conftest.$ac_objext conftest.$ac_ext
9037
9038 fi
9039
9040 if test "$cf_cv_cc_bool_type" = 1
9041 then    echo "$as_me:9041: result: yes" >&5
9042 echo "${ECHO_T}yes" >&6
9043 else    echo "$as_me:9043: result: no" >&5
9044 echo "${ECHO_T}no" >&6
9045 fi
9046
9047 if test -n "$CXX" ; then
9048         ac_ext=cc
9049 ac_cpp='$CXXCPP $CPPFLAGS'
9050 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9051 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9052 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9053
9054 if test -n "$GXX" ; then
9055 case $cf_cv_system_name in #(vi
9056 os2*) #(vi
9057         cf_stdcpp_libname=stdcpp
9058         ;;
9059 *)
9060         cf_stdcpp_libname=stdc++
9061         ;;
9062 esac
9063 echo "$as_me:9063: checking for library $cf_stdcpp_libname" >&5
9064 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
9065 if test "${cf_cv_libstdcpp+set}" = set; then
9066   echo $ECHO_N "(cached) $ECHO_C" >&6
9067 else
9068
9069         cf_save="$LIBS"
9070         LIBS="$LIBS -l$cf_stdcpp_libname"
9071 cat >conftest.$ac_ext <<_ACEOF
9072 #line 9072 "configure"
9073 #include "confdefs.h"
9074
9075 #include <strstream.h>
9076 int
9077 main ()
9078 {
9079
9080 char buf[80];
9081 strstreambuf foo(buf, sizeof(buf))
9082
9083   ;
9084   return 0;
9085 }
9086 _ACEOF
9087 rm -f conftest.$ac_objext conftest$ac_exeext
9088 if { (eval echo "$as_me:9088: \"$ac_link\"") >&5
9089   (eval $ac_link) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); } &&
9093          { ac_try='test -s conftest$ac_exeext'
9094   { (eval echo "$as_me:9094: \"$ac_try\"") >&5
9095   (eval $ac_try) 2>&5
9096   ac_status=$?
9097   echo "$as_me:9097: \$? = $ac_status" >&5
9098   (exit $ac_status); }; }; then
9099   cf_cv_libstdcpp=yes
9100 else
9101   echo "$as_me: failed program was:" >&5
9102 cat conftest.$ac_ext >&5
9103 cf_cv_libstdcpp=no
9104 fi
9105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9106         LIBS="$cf_save"
9107
9108 fi
9109 echo "$as_me:9109: result: $cf_cv_libstdcpp" >&5
9110 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
9111 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
9112 fi
9113
9114         case $GXX_VERSION in
9115         1*|2.0-6*)
9116                 cf_cxx_library=yes
9117                 ;;
9118         *-2.7*|2.7*)
9119
9120 cf_cxx_library=unknown
9121 case $cf_cv_system_name in #(vi
9122 os2*) #(vi
9123         cf_gpp_libname=gpp
9124         ;;
9125 *)
9126         cf_gpp_libname=g++
9127         ;;
9128 esac
9129 if test "$ac_cv_cxx_compiler_gnu" = yes; then
9130         echo "$as_me:9130: checking for lib$cf_gpp_libname" >&5
9131 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
9132         cf_save="$LIBS"
9133         LIBS="$LIBS -l$cf_gpp_libname"
9134         cat >conftest.$ac_ext <<_ACEOF
9135 #line 9135 "configure"
9136 #include "confdefs.h"
9137
9138 #include <$cf_gpp_libname/builtin.h>
9139
9140 int
9141 main ()
9142 {
9143 two_arg_error_handler_t foo2 = lib_error_handler
9144   ;
9145   return 0;
9146 }
9147 _ACEOF
9148 rm -f conftest.$ac_objext conftest$ac_exeext
9149 if { (eval echo "$as_me:9149: \"$ac_link\"") >&5
9150   (eval $ac_link) 2>&5
9151   ac_status=$?
9152   echo "$as_me:9152: \$? = $ac_status" >&5
9153   (exit $ac_status); } &&
9154          { ac_try='test -s conftest$ac_exeext'
9155   { (eval echo "$as_me:9155: \"$ac_try\"") >&5
9156   (eval $ac_try) 2>&5
9157   ac_status=$?
9158   echo "$as_me:9158: \$? = $ac_status" >&5
9159   (exit $ac_status); }; }; then
9160   cf_cxx_library=yes
9161          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
9162          if test "$cf_gpp_libname" = cpp ; then
9163             cat >>confdefs.h <<\EOF
9164 #define HAVE_GPP_BUILTIN_H 1
9165 EOF
9166
9167          else
9168             cat >>confdefs.h <<\EOF
9169 #define HAVE_GXX_BUILTIN_H 1
9170 EOF
9171
9172          fi
9173 else
9174   echo "$as_me: failed program was:" >&5
9175 cat conftest.$ac_ext >&5
9176 cat >conftest.$ac_ext <<_ACEOF
9177 #line 9177 "configure"
9178 #include "confdefs.h"
9179
9180 #include <builtin.h>
9181
9182 int
9183 main ()
9184 {
9185 two_arg_error_handler_t foo2 = lib_error_handler
9186   ;
9187   return 0;
9188 }
9189 _ACEOF
9190 rm -f conftest.$ac_objext conftest$ac_exeext
9191 if { (eval echo "$as_me:9191: \"$ac_link\"") >&5
9192   (eval $ac_link) 2>&5
9193   ac_status=$?
9194   echo "$as_me:9194: \$? = $ac_status" >&5
9195   (exit $ac_status); } &&
9196          { ac_try='test -s conftest$ac_exeext'
9197   { (eval echo "$as_me:9197: \"$ac_try\"") >&5
9198   (eval $ac_try) 2>&5
9199   ac_status=$?
9200   echo "$as_me:9200: \$? = $ac_status" >&5
9201   (exit $ac_status); }; }; then
9202   cf_cxx_library=yes
9203          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
9204          cat >>confdefs.h <<\EOF
9205 #define HAVE_BUILTIN_H 1
9206 EOF
9207
9208 else
9209   echo "$as_me: failed program was:" >&5
9210 cat conftest.$ac_ext >&5
9211 cf_cxx_library=no
9212 fi
9213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9214 fi
9215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9216         LIBS="$cf_save"
9217         echo "$as_me:9217: result: $cf_cxx_library" >&5
9218 echo "${ECHO_T}$cf_cxx_library" >&6
9219 fi
9220
9221                 ;;
9222         *)
9223                 cf_cxx_library=no
9224                 ;;
9225         esac
9226
9227         ac_ext=cc
9228 ac_cpp='$CXXCPP $CPPFLAGS'
9229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9230 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9232 echo "$as_me:9232: checking how to run the C++ preprocessor" >&5
9233 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
9234 if test -z "$CXXCPP"; then
9235   if test "${ac_cv_prog_CXXCPP+set}" = set; then
9236   echo $ECHO_N "(cached) $ECHO_C" >&6
9237 else
9238       # Double quotes because CXXCPP needs to be expanded
9239     for CXXCPP in "$CXX -E" "/lib/cpp"
9240     do
9241       ac_preproc_ok=false
9242 for ac_cxx_preproc_warn_flag in '' yes
9243 do
9244   # Use a header file that comes with gcc, so configuring glibc
9245   # with a fresh cross-compiler works.
9246   # On the NeXT, cc -E runs the code through the compiler's parser,
9247   # not just through cpp. "Syntax error" is here to catch this case.
9248   cat >conftest.$ac_ext <<_ACEOF
9249 #line 9249 "configure"
9250 #include "confdefs.h"
9251 #include <assert.h>
9252                      Syntax error
9253 _ACEOF
9254 if { (eval echo "$as_me:9254: \"$ac_cpp conftest.$ac_ext\"") >&5
9255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9256   ac_status=$?
9257   egrep -v '^ *\+' conftest.er1 >conftest.err
9258   rm -f conftest.er1
9259   cat conftest.err >&5
9260   echo "$as_me:9260: \$? = $ac_status" >&5
9261   (exit $ac_status); } >/dev/null; then
9262   if test -s conftest.err; then
9263     ac_cpp_err=$ac_cxx_preproc_warn_flag
9264   else
9265     ac_cpp_err=
9266   fi
9267 else
9268   ac_cpp_err=yes
9269 fi
9270 if test -z "$ac_cpp_err"; then
9271   :
9272 else
9273   echo "$as_me: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   # Broken: fails on valid input.
9276 continue
9277 fi
9278 rm -f conftest.err conftest.$ac_ext
9279
9280   # OK, works on sane cases.  Now check whether non-existent headers
9281   # can be detected and how.
9282   cat >conftest.$ac_ext <<_ACEOF
9283 #line 9283 "configure"
9284 #include "confdefs.h"
9285 #include <ac_nonexistent.h>
9286 _ACEOF
9287 if { (eval echo "$as_me:9287: \"$ac_cpp conftest.$ac_ext\"") >&5
9288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9289   ac_status=$?
9290   egrep -v '^ *\+' conftest.er1 >conftest.err
9291   rm -f conftest.er1
9292   cat conftest.err >&5
9293   echo "$as_me:9293: \$? = $ac_status" >&5
9294   (exit $ac_status); } >/dev/null; then
9295   if test -s conftest.err; then
9296     ac_cpp_err=$ac_cxx_preproc_warn_flag
9297   else
9298     ac_cpp_err=
9299   fi
9300 else
9301   ac_cpp_err=yes
9302 fi
9303 if test -z "$ac_cpp_err"; then
9304   # Broken: success on invalid input.
9305 continue
9306 else
9307   echo "$as_me: failed program was:" >&5
9308   cat conftest.$ac_ext >&5
9309   # Passes both tests.
9310 ac_preproc_ok=:
9311 break
9312 fi
9313 rm -f conftest.err conftest.$ac_ext
9314
9315 done
9316 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9317 rm -f conftest.err conftest.$ac_ext
9318 if $ac_preproc_ok; then
9319   break
9320 fi
9321
9322     done
9323     ac_cv_prog_CXXCPP=$CXXCPP
9324
9325 fi
9326   CXXCPP=$ac_cv_prog_CXXCPP
9327 else
9328   ac_cv_prog_CXXCPP=$CXXCPP
9329 fi
9330 echo "$as_me:9330: result: $CXXCPP" >&5
9331 echo "${ECHO_T}$CXXCPP" >&6
9332 ac_preproc_ok=false
9333 for ac_cxx_preproc_warn_flag in '' yes
9334 do
9335   # Use a header file that comes with gcc, so configuring glibc
9336   # with a fresh cross-compiler works.
9337   # On the NeXT, cc -E runs the code through the compiler's parser,
9338   # not just through cpp. "Syntax error" is here to catch this case.
9339   cat >conftest.$ac_ext <<_ACEOF
9340 #line 9340 "configure"
9341 #include "confdefs.h"
9342 #include <assert.h>
9343                      Syntax error
9344 _ACEOF
9345 if { (eval echo "$as_me:9345: \"$ac_cpp conftest.$ac_ext\"") >&5
9346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9347   ac_status=$?
9348   egrep -v '^ *\+' conftest.er1 >conftest.err
9349   rm -f conftest.er1
9350   cat conftest.err >&5
9351   echo "$as_me:9351: \$? = $ac_status" >&5
9352   (exit $ac_status); } >/dev/null; then
9353   if test -s conftest.err; then
9354     ac_cpp_err=$ac_cxx_preproc_warn_flag
9355   else
9356     ac_cpp_err=
9357   fi
9358 else
9359   ac_cpp_err=yes
9360 fi
9361 if test -z "$ac_cpp_err"; then
9362   :
9363 else
9364   echo "$as_me: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   # Broken: fails on valid input.
9367 continue
9368 fi
9369 rm -f conftest.err conftest.$ac_ext
9370
9371   # OK, works on sane cases.  Now check whether non-existent headers
9372   # can be detected and how.
9373   cat >conftest.$ac_ext <<_ACEOF
9374 #line 9374 "configure"
9375 #include "confdefs.h"
9376 #include <ac_nonexistent.h>
9377 _ACEOF
9378 if { (eval echo "$as_me:9378: \"$ac_cpp conftest.$ac_ext\"") >&5
9379   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9380   ac_status=$?
9381   egrep -v '^ *\+' conftest.er1 >conftest.err
9382   rm -f conftest.er1
9383   cat conftest.err >&5
9384   echo "$as_me:9384: \$? = $ac_status" >&5
9385   (exit $ac_status); } >/dev/null; then
9386   if test -s conftest.err; then
9387     ac_cpp_err=$ac_cxx_preproc_warn_flag
9388   else
9389     ac_cpp_err=
9390   fi
9391 else
9392   ac_cpp_err=yes
9393 fi
9394 if test -z "$ac_cpp_err"; then
9395   # Broken: success on invalid input.
9396 continue
9397 else
9398   echo "$as_me: failed program was:" >&5
9399   cat conftest.$ac_ext >&5
9400   # Passes both tests.
9401 ac_preproc_ok=:
9402 break
9403 fi
9404 rm -f conftest.err conftest.$ac_ext
9405
9406 done
9407 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9408 rm -f conftest.err conftest.$ac_ext
9409 if $ac_preproc_ok; then
9410   :
9411 else
9412   { { echo "$as_me:9412: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
9413 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
9414    { (exit 1); exit 1; }; }
9415 fi
9416
9417 ac_ext=cc
9418 ac_cpp='$CXXCPP $CPPFLAGS'
9419 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9420 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9421 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9422
9423 for ac_header in typeinfo
9424 do
9425 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9426 echo "$as_me:9426: checking for $ac_header" >&5
9427 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9428 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9429   echo $ECHO_N "(cached) $ECHO_C" >&6
9430 else
9431   cat >conftest.$ac_ext <<_ACEOF
9432 #line 9432 "configure"
9433 #include "confdefs.h"
9434 #include <$ac_header>
9435 _ACEOF
9436 if { (eval echo "$as_me:9436: \"$ac_cpp conftest.$ac_ext\"") >&5
9437   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9438   ac_status=$?
9439   egrep -v '^ *\+' conftest.er1 >conftest.err
9440   rm -f conftest.er1
9441   cat conftest.err >&5
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); } >/dev/null; then
9444   if test -s conftest.err; then
9445     ac_cpp_err=$ac_cxx_preproc_warn_flag
9446   else
9447     ac_cpp_err=
9448   fi
9449 else
9450   ac_cpp_err=yes
9451 fi
9452 if test -z "$ac_cpp_err"; then
9453   eval "$as_ac_Header=yes"
9454 else
9455   echo "$as_me: failed program was:" >&5
9456   cat conftest.$ac_ext >&5
9457   eval "$as_ac_Header=no"
9458 fi
9459 rm -f conftest.err conftest.$ac_ext
9460 fi
9461 echo "$as_me:9461: result: `eval echo '${'$as_ac_Header'}'`" >&5
9462 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9463 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9464   cat >>confdefs.h <<EOF
9465 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9466 EOF
9467
9468 fi
9469 done
9470
9471 echo "$as_me:9471: checking for stdbool.h" >&5
9472 echo $ECHO_N "checking for stdbool.h... $ECHO_C" >&6
9473 if test "${ac_cv_header_stdbool_h+set}" = set; then
9474   echo $ECHO_N "(cached) $ECHO_C" >&6
9475 else
9476   cat >conftest.$ac_ext <<_ACEOF
9477 #line 9477 "configure"
9478 #include "confdefs.h"
9479 #include <stdbool.h>
9480 _ACEOF
9481 if { (eval echo "$as_me:9481: \"$ac_cpp conftest.$ac_ext\"") >&5
9482   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9483   ac_status=$?
9484   egrep -v '^ *\+' conftest.er1 >conftest.err
9485   rm -f conftest.er1
9486   cat conftest.err >&5
9487   echo "$as_me:9487: \$? = $ac_status" >&5
9488   (exit $ac_status); } >/dev/null; then
9489   if test -s conftest.err; then
9490     ac_cpp_err=$ac_cxx_preproc_warn_flag
9491   else
9492     ac_cpp_err=
9493   fi
9494 else
9495   ac_cpp_err=yes
9496 fi
9497 if test -z "$ac_cpp_err"; then
9498   ac_cv_header_stdbool_h=yes
9499 else
9500   echo "$as_me: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   ac_cv_header_stdbool_h=no
9503 fi
9504 rm -f conftest.err conftest.$ac_ext
9505 fi
9506 echo "$as_me:9506: result: $ac_cv_header_stdbool_h" >&5
9507 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
9508 if test $ac_cv_header_stdbool_h = yes; then
9509   cf_cv_header_stdbool_h=1
9510 else
9511   cf_cv_header_stdbool_h=0
9512 fi
9513
9514 echo "$as_me:9514: checking for builtin bool type" >&5
9515 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
9516 if test "${cf_cv_builtin_bool+set}" = set; then
9517   echo $ECHO_N "(cached) $ECHO_C" >&6
9518 else
9519
9520         cat >conftest.$ac_ext <<_ACEOF
9521 #line 9521 "configure"
9522 #include "confdefs.h"
9523
9524 #include <stdio.h>
9525 #include <sys/types.h>
9526
9527 int
9528 main ()
9529 {
9530 bool x = false
9531   ;
9532   return 0;
9533 }
9534 _ACEOF
9535 rm -f conftest.$ac_objext
9536 if { (eval echo "$as_me:9536: \"$ac_compile\"") >&5
9537   (eval $ac_compile) 2>&5
9538   ac_status=$?
9539   echo "$as_me:9539: \$? = $ac_status" >&5
9540   (exit $ac_status); } &&
9541          { ac_try='test -s conftest.$ac_objext'
9542   { (eval echo "$as_me:9542: \"$ac_try\"") >&5
9543   (eval $ac_try) 2>&5
9544   ac_status=$?
9545   echo "$as_me:9545: \$? = $ac_status" >&5
9546   (exit $ac_status); }; }; then
9547   cf_cv_builtin_bool=1
9548 else
9549   echo "$as_me: failed program was:" >&5
9550 cat conftest.$ac_ext >&5
9551 cf_cv_builtin_bool=0
9552 fi
9553 rm -f conftest.$ac_objext conftest.$ac_ext
9554
9555 fi
9556
9557 if test "$cf_cv_builtin_bool" = 1
9558 then    echo "$as_me:9558: result: yes" >&5
9559 echo "${ECHO_T}yes" >&6
9560 else    echo "$as_me:9560: result: no" >&5
9561 echo "${ECHO_T}no" >&6
9562 fi
9563
9564 echo "$as_me:9564: checking for size of bool" >&5
9565 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
9566 if test "${cf_cv_type_of_bool+set}" = set; then
9567   echo $ECHO_N "(cached) $ECHO_C" >&6
9568 else
9569
9570         rm -f cf_test.out
9571         if test "$cross_compiling" = yes; then
9572   cf_cv_type_of_bool=unknown
9573 else
9574   cat >conftest.$ac_ext <<_ACEOF
9575 #line 9575 "configure"
9576 #include "confdefs.h"
9577
9578 #include <stdlib.h>
9579 #include <stdio.h>
9580
9581 #if defined(__cplusplus)
9582
9583 #ifdef HAVE_GXX_BUILTIN_H
9584 #include <g++/builtin.h>
9585 #elif HAVE_GPP_BUILTIN_H
9586 #include <gpp/builtin.h>
9587 #elif HAVE_BUILTIN_H
9588 #include <builtin.h>
9589 #endif
9590
9591 #else
9592
9593 #if $cf_cv_header_stdbool_h
9594 #include <stdbool.h>
9595 #endif
9596
9597 #endif
9598
9599 main()
9600 {
9601         FILE *fp = fopen("cf_test.out", "w");
9602         if (fp != 0) {
9603                 bool x = true;
9604                 if ((bool)(-x) >= 0)
9605                         fputs("unsigned ", fp);
9606                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
9607                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
9608                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
9609                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
9610                 fclose(fp);
9611         }
9612         exit(0);
9613 }
9614
9615 _ACEOF
9616 rm -f conftest$ac_exeext
9617 if { (eval echo "$as_me:9617: \"$ac_link\"") >&5
9618   (eval $ac_link) 2>&5
9619   ac_status=$?
9620   echo "$as_me:9620: \$? = $ac_status" >&5
9621   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9622   { (eval echo "$as_me:9622: \"$ac_try\"") >&5
9623   (eval $ac_try) 2>&5
9624   ac_status=$?
9625   echo "$as_me:9625: \$? = $ac_status" >&5
9626   (exit $ac_status); }; }; then
9627   cf_cv_type_of_bool=`cat cf_test.out`
9628                  if test -z "$cf_cv_type_of_bool"; then
9629                    cf_cv_type_of_bool=unknown
9630                  fi
9631 else
9632   echo "$as_me: program exited with status $ac_status" >&5
9633 echo "$as_me: failed program was:" >&5
9634 cat conftest.$ac_ext >&5
9635 cf_cv_type_of_bool=unknown
9636 fi
9637 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9638 fi
9639
9640 fi
9641
9642         rm -f cf_test.out
9643 echo "$as_me:9643: result: $cf_cv_type_of_bool" >&5
9644 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
9645 if test "$cf_cv_type_of_bool" = unknown ; then
9646         case .$NCURSES_BOOL in #(vi
9647         .auto|.) NCURSES_BOOL=unsigned;;
9648         esac
9649         { echo "$as_me:9649: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
9650 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
9651         cf_cv_type_of_bool=$NCURSES_BOOL
9652 fi
9653
9654 echo "$as_me:9654: checking for special defines needed for etip.h" >&5
9655 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
9656 cf_save_CXXFLAGS="$CXXFLAGS"
9657 cf_result="none"
9658 for cf_math in "" MATH_H
9659 do
9660 for cf_excp in "" MATH_EXCEPTION
9661 do
9662         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu"
9663         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
9664         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
9665 cat >conftest.$ac_ext <<_ACEOF
9666 #line 9666 "configure"
9667 #include "confdefs.h"
9668
9669 #include <etip.h.in>
9670
9671 int
9672 main ()
9673 {
9674
9675   ;
9676   return 0;
9677 }
9678 _ACEOF
9679 rm -f conftest.$ac_objext
9680 if { (eval echo "$as_me:9680: \"$ac_compile\"") >&5
9681   (eval $ac_compile) 2>&5
9682   ac_status=$?
9683   echo "$as_me:9683: \$? = $ac_status" >&5
9684   (exit $ac_status); } &&
9685          { ac_try='test -s conftest.$ac_objext'
9686   { (eval echo "$as_me:9686: \"$ac_try\"") >&5
9687   (eval $ac_try) 2>&5
9688   ac_status=$?
9689   echo "$as_me:9689: \$? = $ac_status" >&5
9690   (exit $ac_status); }; }; then
9691
9692         test -n "$cf_math" && cat >>confdefs.h <<EOF
9693 #define ETIP_NEEDS_${cf_math} 1
9694 EOF
9695
9696         test -n "$cf_excp" && cat >>confdefs.h <<EOF
9697 #define ETIP_NEEDS_${cf_excp} 1
9698 EOF
9699
9700         cf_result="$cf_math $cf_excp"
9701         break
9702
9703 else
9704   echo "$as_me: failed program was:" >&5
9705 cat conftest.$ac_ext >&5
9706 fi
9707 rm -f conftest.$ac_objext conftest.$ac_ext
9708 done
9709 done
9710 echo "$as_me:9710: result: $cf_result" >&5
9711 echo "${ECHO_T}$cf_result" >&6
9712 CXXFLAGS="$cf_save_CXXFLAGS"
9713
9714 if test -n "$CXX"; then
9715 echo "$as_me:9715: checking if $CXX accepts parameter initialization" >&5
9716 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
9717 if test "${cf_cv_cpp_param_init+set}" = set; then
9718   echo $ECHO_N "(cached) $ECHO_C" >&6
9719 else
9720
9721         ac_ext=cc
9722 ac_cpp='$CXXCPP $CPPFLAGS'
9723 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9724 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9725 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9726
9727         if test "$cross_compiling" = yes; then
9728   cf_cv_cpp_param_init=unknown
9729 else
9730   cat >conftest.$ac_ext <<_ACEOF
9731 #line 9731 "configure"
9732 #include "confdefs.h"
9733
9734 class TEST {
9735 private:
9736         int value;
9737 public:
9738         TEST(int x = 1);
9739         ~TEST();
9740 };
9741
9742 TEST::TEST(int x = 1)   // some compilers do not like second initializer
9743 {
9744         value = x;
9745 }
9746 void main() { }
9747
9748 _ACEOF
9749 rm -f conftest$ac_exeext
9750 if { (eval echo "$as_me:9750: \"$ac_link\"") >&5
9751   (eval $ac_link) 2>&5
9752   ac_status=$?
9753   echo "$as_me:9753: \$? = $ac_status" >&5
9754   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9755   { (eval echo "$as_me:9755: \"$ac_try\"") >&5
9756   (eval $ac_try) 2>&5
9757   ac_status=$?
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); }; }; then
9760   cf_cv_cpp_param_init=yes
9761 else
9762   echo "$as_me: program exited with status $ac_status" >&5
9763 echo "$as_me: failed program was:" >&5
9764 cat conftest.$ac_ext >&5
9765 cf_cv_cpp_param_init=no
9766 fi
9767 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9768 fi
9769         ac_ext=cc
9770 ac_cpp='$CXXCPP $CPPFLAGS'
9771 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9772 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9773 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9774
9775 fi
9776 echo "$as_me:9776: result: $cf_cv_cpp_param_init" >&5
9777 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
9778 fi
9779 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
9780 #define CPP_HAS_PARAM_INIT 1
9781 EOF
9782
9783 if test -n "$CXX"; then
9784
9785 ac_ext=cc
9786 ac_cpp='$CXXCPP $CPPFLAGS'
9787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9790
9791 for ac_header in strstream.h
9792 do
9793 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9794 echo "$as_me:9794: checking for $ac_header" >&5
9795 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9796 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9797   echo $ECHO_N "(cached) $ECHO_C" >&6
9798 else
9799   cat >conftest.$ac_ext <<_ACEOF
9800 #line 9800 "configure"
9801 #include "confdefs.h"
9802 #include <$ac_header>
9803 _ACEOF
9804 if { (eval echo "$as_me:9804: \"$ac_cpp conftest.$ac_ext\"") >&5
9805   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9806   ac_status=$?
9807   egrep -v '^ *\+' conftest.er1 >conftest.err
9808   rm -f conftest.er1
9809   cat conftest.err >&5
9810   echo "$as_me:9810: \$? = $ac_status" >&5
9811   (exit $ac_status); } >/dev/null; then
9812   if test -s conftest.err; then
9813     ac_cpp_err=$ac_cxx_preproc_warn_flag
9814   else
9815     ac_cpp_err=
9816   fi
9817 else
9818   ac_cpp_err=yes
9819 fi
9820 if test -z "$ac_cpp_err"; then
9821   eval "$as_ac_Header=yes"
9822 else
9823   echo "$as_me: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   eval "$as_ac_Header=no"
9826 fi
9827 rm -f conftest.err conftest.$ac_ext
9828 fi
9829 echo "$as_me:9829: result: `eval echo '${'$as_ac_Header'}'`" >&5
9830 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9831 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9832   cat >>confdefs.h <<EOF
9833 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9834 EOF
9835
9836 fi
9837 done
9838
9839 echo "$as_me:9839: checking if $CXX supports vscan function" >&5
9840 echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
9841 if test "${cf_cv_cpp_vscan_func+set}" = set; then
9842   echo $ECHO_N "(cached) $ECHO_C" >&6
9843 else
9844
9845         for cf_vscan_func in strstream strstream_cast stdio
9846         do
9847         case $cf_vscan_func in #(vi
9848         stdio)          cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
9849         strstream)      cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
9850         strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
9851         esac
9852         cat >conftest.$ac_ext <<_ACEOF
9853 #line 9853 "configure"
9854 #include "confdefs.h"
9855
9856 #include <stdio.h>
9857 #include <stdarg.h>
9858 #define $cf_vscan_defs 1
9859 #if defined(USE_STDIO_VSCAN)
9860 #elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
9861 #include <strstream.h>
9862 #endif
9863
9864 int scanw(const char* fmt, ...)
9865 {
9866     int result = -1;
9867     char buf[BUFSIZ];
9868
9869     va_list args;
9870     va_start(args, fmt);
9871 #if defined(USE_STDIO_VSCAN)
9872     if (::vsscanf(buf, fmt, args) != -1)
9873         result = 0;
9874 #elif defined(USE_STRSTREAM_VSCAN)
9875     strstreambuf ss(buf, sizeof(buf));
9876     if (ss.vscan(fmt, args) != -1)
9877         result = 0;
9878 #elif defined(USE_STRSTREAM_VSCAN_CAST)
9879     strstreambuf ss(buf, sizeof(buf));
9880     if (ss.vscan(fmt, (_IO_va_list)args) != -1)
9881         result = 0;
9882 #else
9883 #error case $cf_vscan_func failed
9884 #endif
9885     va_end(args);
9886     return result;
9887 }
9888
9889 int
9890 main ()
9891 {
9892 int tmp, foo = scanw("%d", &tmp)
9893   ;
9894   return 0;
9895 }
9896 _ACEOF
9897 rm -f conftest.$ac_objext conftest$ac_exeext
9898 if { (eval echo "$as_me:9898: \"$ac_link\"") >&5
9899   (eval $ac_link) 2>&5
9900   ac_status=$?
9901   echo "$as_me:9901: \$? = $ac_status" >&5
9902   (exit $ac_status); } &&
9903          { ac_try='test -s conftest$ac_exeext'
9904   { (eval echo "$as_me:9904: \"$ac_try\"") >&5
9905   (eval $ac_try) 2>&5
9906   ac_status=$?
9907   echo "$as_me:9907: \$? = $ac_status" >&5
9908   (exit $ac_status); }; }; then
9909   cf_cv_cpp_vscan_func=$cf_vscan_func; break
9910 else
9911   echo "$as_me: failed program was:" >&5
9912 cat conftest.$ac_ext >&5
9913 cf_cv_cpp_vscan_func=no
9914 fi
9915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9916         test "$cf_cv_cpp_vscan_func" != no && break
9917         done
9918
9919 fi
9920 echo "$as_me:9920: result: $cf_cv_cpp_vscan_func" >&5
9921 echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
9922
9923 ac_ext=cc
9924 ac_cpp='$CXXCPP $CPPFLAGS'
9925 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9926 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9927 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9928
9929 fi
9930
9931 case $cf_cv_cpp_vscan_func in #(vi
9932 stdio) #(vi
9933         cat >>confdefs.h <<\EOF
9934 #define CPP_HAS_VSCAN_FUNC 1
9935 EOF
9936
9937         cat >>confdefs.h <<\EOF
9938 #define USE_STDIO_VSCAN 1
9939 EOF
9940
9941         ;;
9942 strstream)
9943         cat >>confdefs.h <<\EOF
9944 #define CPP_HAS_VSCAN_FUNC 1
9945 EOF
9946
9947         cat >>confdefs.h <<\EOF
9948 #define USE_STRSTREAM_VSCAN 1
9949 EOF
9950
9951         ;;
9952 strstream_cast)
9953         cat >>confdefs.h <<\EOF
9954 #define CPP_HAS_VSCAN_FUNC 1
9955 EOF
9956
9957         cat >>confdefs.h <<\EOF
9958 #define USE_STRSTREAM_VSCAN_CAST 1
9959 EOF
9960
9961         ;;
9962 esac
9963
9964         CXX_AR='$(AR)'
9965         CXX_AR_OPTS='$(AR_OPTS)'
9966         case $cf_cv_system_name in #(vi
9967         irix*) #(vi
9968             if test "$GXX" != yes ; then
9969                 CXX_AR='$(CXX)'
9970                 CXX_AR_OPTS='-ar -o'
9971             fi
9972             ;;
9973         sco3.2v5*) #(vi
9974             CXXLDFLAGS="-u main"
9975             ;;
9976         solaris2*)
9977             if test "$GXX" != yes ; then
9978                 CXX_AR='$(CXX)'
9979                 CXX_AR_OPTS='-xar -o'
9980             fi
9981             ;;
9982         esac
9983
9984 else
9985         cf_cxx_library=no
9986         cf_cv_builtin_bool=1
9987
9988         # Just because we are not configuring against C++ right now does not
9989         # mean that a user will not want to use C++.  Some distributors disable
9990         # the C++ portion of this configuration as a shortcut (or just to avoid
9991         # compiling the demo in the c++ directory).  So we need a reasonable
9992         # default for the 'bool' type.
9993         #
9994         # Caveat: since the storage of the bool type is not standardized, it
9995         # may change.
9996
9997         if test "$NCURSES_BOOL" != auto ; then
9998                 cf_cv_type_of_bool=$NCURSES_AUTO
9999         else
10000                 if test "$cf_cv_header_stdbool_h" = 1 ; then
10001
10002 echo "$as_me:10002: checking for size of bool" >&5
10003 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
10004 if test "${cf_cv_type_of_bool+set}" = set; then
10005   echo $ECHO_N "(cached) $ECHO_C" >&6
10006 else
10007
10008         rm -f cf_test.out
10009         if test "$cross_compiling" = yes; then
10010   cf_cv_type_of_bool=unknown
10011 else
10012   cat >conftest.$ac_ext <<_ACEOF
10013 #line 10013 "configure"
10014 #include "confdefs.h"
10015
10016 #include <stdlib.h>
10017 #include <stdio.h>
10018
10019 #if defined(__cplusplus)
10020
10021 #ifdef HAVE_GXX_BUILTIN_H
10022 #include <g++/builtin.h>
10023 #elif HAVE_GPP_BUILTIN_H
10024 #include <gpp/builtin.h>
10025 #elif HAVE_BUILTIN_H
10026 #include <builtin.h>
10027 #endif
10028
10029 #else
10030
10031 #if $cf_cv_header_stdbool_h
10032 #include <stdbool.h>
10033 #endif
10034
10035 #endif
10036
10037 main()
10038 {
10039         FILE *fp = fopen("cf_test.out", "w");
10040         if (fp != 0) {
10041                 bool x = true;
10042                 if ((bool)(-x) >= 0)
10043                         fputs("unsigned ", fp);
10044                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
10045                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
10046                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
10047                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
10048                 fclose(fp);
10049         }
10050         exit(0);
10051 }
10052
10053 _ACEOF
10054 rm -f conftest$ac_exeext
10055 if { (eval echo "$as_me:10055: \"$ac_link\"") >&5
10056   (eval $ac_link) 2>&5
10057   ac_status=$?
10058   echo "$as_me:10058: \$? = $ac_status" >&5
10059   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10060   { (eval echo "$as_me:10060: \"$ac_try\"") >&5
10061   (eval $ac_try) 2>&5
10062   ac_status=$?
10063   echo "$as_me:10063: \$? = $ac_status" >&5
10064   (exit $ac_status); }; }; then
10065   cf_cv_type_of_bool=`cat cf_test.out`
10066                  if test -z "$cf_cv_type_of_bool"; then
10067                    cf_cv_type_of_bool=unknown
10068                  fi
10069 else
10070   echo "$as_me: program exited with status $ac_status" >&5
10071 echo "$as_me: failed program was:" >&5
10072 cat conftest.$ac_ext >&5
10073 cf_cv_type_of_bool=unknown
10074 fi
10075 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10076 fi
10077
10078 fi
10079
10080         rm -f cf_test.out
10081 echo "$as_me:10081: result: $cf_cv_type_of_bool" >&5
10082 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
10083 if test "$cf_cv_type_of_bool" = unknown ; then
10084         case .$NCURSES_BOOL in #(vi
10085         .auto|.) NCURSES_BOOL=unsigned;;
10086         esac
10087         { echo "$as_me:10087: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
10088 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
10089         cf_cv_type_of_bool=$NCURSES_BOOL
10090 fi
10091
10092                 else
10093                         echo "$as_me:10093: checking for fallback type of bool" >&5
10094 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
10095                         case "$host_cpu" in #(vi
10096                         i?86)   cf_cv_type_of_bool=char ;; #(vi
10097                         *)      cf_cv_type_of_bool=int  ;;
10098                         esac
10099                         echo "$as_me:10099: result: $cf_cv_type_of_bool" >&5
10100 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
10101                 fi
10102         fi
10103 fi
10104
10105 if test "$cf_with_ada" != "no" ; then
10106 cf_ada_make=gnatmake
10107 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10108 set dummy $cf_ada_make; ac_word=$2
10109 echo "$as_me:10109: checking for $ac_word" >&5
10110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10111 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10112   echo $ECHO_N "(cached) $ECHO_C" >&6
10113 else
10114   if test -n "$gnat_exists"; then
10115   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10116 else
10117   ac_save_IFS=$IFS; IFS=$ac_path_separator
10118 ac_dummy="$PATH"
10119 for ac_dir in $ac_dummy; do
10120   IFS=$ac_save_IFS
10121   test -z "$ac_dir" && ac_dir=.
10122   $as_executable_p "$ac_dir/$ac_word" || continue
10123 ac_cv_prog_gnat_exists="yes"
10124 echo "$as_me:10124: found $ac_dir/$ac_word" >&5
10125 break
10126 done
10127
10128   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10129 fi
10130 fi
10131 gnat_exists=$ac_cv_prog_gnat_exists
10132 if test -n "$gnat_exists"; then
10133   echo "$as_me:10133: result: $gnat_exists" >&5
10134 echo "${ECHO_T}$gnat_exists" >&6
10135 else
10136   echo "$as_me:10136: result: no" >&5
10137 echo "${ECHO_T}no" >&6
10138 fi
10139
10140 if test "$ac_cv_prog_gnat_exists" = no; then
10141    cf_ada_make=
10142 else
10143
10144 cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
10145   sed -e 's/[^0-9 \.]//g' | $AWK '{print $1;}'`
10146 case $cf_cv_gnat_version in
10147   3.1[1-9]*|3.[2-9]*|[4-9].*)
10148     cf_cv_prog_gnat_correct=yes
10149     ;;
10150   *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
10151      cf_cv_prog_gnat_correct=no
10152      ;;
10153 esac
10154 case $cf_cv_gnat_version in
10155   3.1*|[4-9].*)
10156       cf_compile_generics=generics
10157       cf_generic_objects="\$(GENOBJS)"
10158       ;;
10159   *)  cf_compile_generics=
10160       cf_generic_objects=
10161       ;;
10162 esac
10163
10164    # Extract the first word of "m4", so it can be a program name with args.
10165 set dummy m4; ac_word=$2
10166 echo "$as_me:10166: checking for $ac_word" >&5
10167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10168 if test "${ac_cv_prog_M4_exists+set}" = set; then
10169   echo $ECHO_N "(cached) $ECHO_C" >&6
10170 else
10171   if test -n "$M4_exists"; then
10172   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10173 else
10174   ac_save_IFS=$IFS; IFS=$ac_path_separator
10175 ac_dummy="$PATH"
10176 for ac_dir in $ac_dummy; do
10177   IFS=$ac_save_IFS
10178   test -z "$ac_dir" && ac_dir=.
10179   $as_executable_p "$ac_dir/$ac_word" || continue
10180 ac_cv_prog_M4_exists="yes"
10181 echo "$as_me:10181: found $ac_dir/$ac_word" >&5
10182 break
10183 done
10184
10185   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
10186 fi
10187 fi
10188 M4_exists=$ac_cv_prog_M4_exists
10189 if test -n "$M4_exists"; then
10190   echo "$as_me:10190: result: $M4_exists" >&5
10191 echo "${ECHO_T}$M4_exists" >&6
10192 else
10193   echo "$as_me:10193: result: no" >&5
10194 echo "${ECHO_T}no" >&6
10195 fi
10196
10197    if test "$ac_cv_prog_M4_exists" = no; then
10198       cf_cv_prog_gnat_correct=no
10199       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
10200    fi
10201    if test "$cf_cv_prog_gnat_correct" = yes; then
10202       echo "$as_me:10202: checking if GNAT works" >&5
10203 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
10204
10205 rm -f conftest*
10206 cat >>conftest.ads <<CF_EOF
10207 procedure conftest;
10208 CF_EOF
10209 cat >>conftest.adb <<CF_EOF
10210 with Text_IO;
10211 with GNAT.OS_Lib;
10212 procedure conftest is
10213 begin
10214    Text_IO.Put ("Hello World");
10215    Text_IO.New_Line;
10216    GNAT.OS_Lib.OS_Exit (0);
10217 end conftest;
10218 CF_EOF
10219 if ( $cf_ada_make conftest 1>&5 2>&1 ) ; then
10220    if ( ./conftest 1>&5 2>&1 ) ; then
10221       cf_cv_prog_gnat_correct=yes
10222    else
10223       cf_cv_prog_gnat_correct=no
10224    fi
10225 else
10226    cf_cv_prog_gnat_correct=no
10227 fi
10228 rm -f conftest*
10229
10230       echo "$as_me:10230: result: $cf_cv_prog_gnat_correct" >&5
10231 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
10232    fi
10233 fi
10234 if test "$cf_cv_prog_gnat_correct" = yes; then
10235    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
10236
10237 # Check whether --with-ada-compiler or --without-ada-compiler was given.
10238 if test "${with_ada_compiler+set}" = set; then
10239   withval="$with_ada_compiler"
10240   cf_ada_compiler=$withval
10241 else
10242   cf_ada_compiler=gnatmake
10243 fi;
10244
10245    cf_ada_package=terminal_interface
10246
10247 # Check whether --with-ada-include or --without-ada-include was given.
10248 if test "${with_ada_include+set}" = set; then
10249   withval="$with_ada_include"
10250
10251 else
10252   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
10253 fi;
10254 case ".$withval" in #(vi
10255 .\$\(*\)*|.\'*\'*) #(vi
10256   ;;
10257 ..|./*|.\\*) #(vi
10258   ;;
10259 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10260   ;;
10261 .\${*prefix}*) #(vi
10262   eval withval="$withval"
10263   case ".$withval" in #(vi
10264   .NONE/*)
10265     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
10266     ;;
10267   esac
10268   ;; #(vi
10269 .NONE/*)
10270   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
10271   ;;
10272 *)
10273   { { echo "$as_me:10273: error: expected a pathname, not \"$withval\"" >&5
10274 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10275    { (exit 1); exit 1; }; }
10276   ;;
10277 esac
10278
10279 eval ADA_INCLUDE="$withval"
10280
10281 # Check whether --with-ada-objects or --without-ada-objects was given.
10282 if test "${with_ada_objects+set}" = set; then
10283   withval="$with_ada_objects"
10284
10285 else
10286   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
10287 fi;
10288 case ".$withval" in #(vi
10289 .\$\(*\)*|.\'*\'*) #(vi
10290   ;;
10291 ..|./*|.\\*) #(vi
10292   ;;
10293 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10294   ;;
10295 .\${*prefix}*) #(vi
10296   eval withval="$withval"
10297   case ".$withval" in #(vi
10298   .NONE/*)
10299     withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
10300     ;;
10301   esac
10302   ;; #(vi
10303 .NONE/*)
10304   withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
10305   ;;
10306 *)
10307   { { echo "$as_me:10307: error: expected a pathname, not \"$withval\"" >&5
10308 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10309    { (exit 1); exit 1; }; }
10310   ;;
10311 esac
10312
10313 eval ADA_OBJECTS="$withval"
10314
10315 fi
10316 fi
10317
10318 ### It's not possible to appease gcc 2.6.3's conversion-warnings if we're
10319 ### using a 'char' for bools.  gcc 2.7.0's conversion-warnings are broken too
10320 ### badly to consider using for development purposes, but 2.5.8 is okay.
10321 if test -n "$with_warnings"; then
10322         case $GCC_VERSION in
10323         2.6.3)
10324                 if test "$cf_cv_type_of_bool" != "char"; then
10325                         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
10326                 fi
10327                 ;;
10328         2.5*)
10329                 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
10330                 ;;
10331         esac
10332 fi
10333
10334 ### Construct the library-subsets, if any, from this set of keywords:
10335 ### none, base, ext_funcs, termlib.
10336 echo "$as_me:10336: checking for library subsets" >&5
10337 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
10338 if test "$with_termlib" = yes ; then
10339         LIB_SUBSETS="termlib "
10340 else
10341         LIB_SUBSETS="termlib+"
10342 fi
10343 LIB_SUBSETS="${LIB_SUBSETS}base"
10344 test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
10345 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
10346 echo "$as_me:10346: result: $LIB_SUBSETS" >&5
10347 echo "${ECHO_T}$LIB_SUBSETS" >&6
10348
10349 LIB_TRACING=DEBUG
10350 ADA_TRACE=FALSE
10351 case "$CFLAGS $CPPFLAGS" in
10352 *-DTRACE*)
10353         LIB_TRACING=all
10354         ADA_TRACE=TRUE
10355         ;;
10356 esac
10357
10358 ### Construct the list of include-directories to be generated
10359
10360 CPPFLAGS="$CPPFLAGS -I. -I../include"
10361 if test "$srcdir" != "."; then
10362         CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include"
10363 fi
10364 if test "$GCC" != yes; then
10365         CPPFLAGS="$CPPFLAGS -I\$(includedir)"
10366 elif test "$includedir" != "/usr/include"; then
10367         if test "$includedir" = '${prefix}/include' ; then
10368                 if test $prefix != /usr ; then
10369                         CPPFLAGS="$CPPFLAGS -I\$(includedir)"
10370                 fi
10371         else
10372                 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
10373         fi
10374 fi
10375
10376 ACPPFLAGS="$ACPPFLAGS -I. -I../../include"
10377 if test "$srcdir" != "."; then
10378         ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include"
10379 fi
10380 if test "$GCC" != yes; then
10381         ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
10382 elif test "$includedir" != "/usr/include"; then
10383         if test "$includedir" = '${prefix}/include' ; then
10384                 if test $prefix != /usr ; then
10385                         ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
10386                 fi
10387         else
10388                 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
10389         fi
10390 fi
10391
10392 ### Build up pieces for makefile rules
10393 echo "$as_me:10393: checking default library suffix" >&5
10394 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
10395
10396         case $DFT_LWR_MODEL in
10397         libtool) DFT_ARG_SUFFIX=''   ;;
10398         normal)  DFT_ARG_SUFFIX=''   ;;
10399         debug)   DFT_ARG_SUFFIX='_g' ;;
10400         profile) DFT_ARG_SUFFIX='_p' ;;
10401         shared)  DFT_ARG_SUFFIX=''   ;;
10402         esac
10403         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
10404 echo "$as_me:10404: result: $DFT_ARG_SUFFIX" >&5
10405 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
10406
10407 echo "$as_me:10407: checking default library-dependency suffix" >&5
10408 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
10409
10410         case $DFT_LWR_MODEL in
10411         libtool) DFT_DEP_SUFFIX='.la'  ;;
10412         normal)  DFT_DEP_SUFFIX='.a'   ;;
10413         debug)   DFT_DEP_SUFFIX='_g.a' ;;
10414         profile) DFT_DEP_SUFFIX='_p.a' ;;
10415         shared)
10416                 case $cf_cv_system_name in
10417                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
10418                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
10419                 hpux*)  DFT_DEP_SUFFIX='.sl'  ;;
10420                 *)      DFT_DEP_SUFFIX='.so'  ;;
10421                 esac
10422         esac
10423         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
10424 if test $DFT_LWR_MODEL = shared ; then
10425         case $cf_cv_system_name in #(vi
10426         cygwin*)
10427                 DFT_DEP_SUFFIX=".dll.a"
10428                 ;;
10429         esac
10430 fi
10431 echo "$as_me:10431: result: $DFT_DEP_SUFFIX" >&5
10432 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
10433
10434 echo "$as_me:10434: checking default object directory" >&5
10435 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
10436
10437         case $DFT_LWR_MODEL in
10438         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
10439         normal)  DFT_OBJ_SUBDIR='objects' ;;
10440         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
10441         profile) DFT_OBJ_SUBDIR='obj_p' ;;
10442         shared)
10443                 case $cf_cv_system_name in #(vi
10444                 cygwin) #(vi
10445                         DFT_OBJ_SUBDIR='objects' ;;
10446                 *)
10447                         DFT_OBJ_SUBDIR='obj_s' ;;
10448                 esac
10449         esac
10450 echo "$as_me:10450: result: $DFT_OBJ_SUBDIR" >&5
10451 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
10452
10453 # libtool thinks it can make c++ shared libraries (perhaps only g++)
10454 echo "$as_me:10454: checking c++ library-dependency suffix" >&5
10455 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
10456 if test "$with_libtool" = "yes"; then
10457         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
10458 else
10459
10460         case normal in
10461         libtool) CXX_LIB_SUFFIX='.la'  ;;
10462         normal)  CXX_LIB_SUFFIX='.a'   ;;
10463         debug)   CXX_LIB_SUFFIX='_g.a' ;;
10464         profile) CXX_LIB_SUFFIX='_p.a' ;;
10465         shared)
10466                 case $cf_cv_system_name in
10467                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
10468                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
10469                 hpux*)  CXX_LIB_SUFFIX='.sl'  ;;
10470                 *)      CXX_LIB_SUFFIX='.so'  ;;
10471                 esac
10472         esac
10473         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
10474 fi
10475 echo "$as_me:10475: result: $CXX_LIB_SUFFIX" >&5
10476 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
10477
10478 TINFO_LIST="$SHLIB_LIST"
10479 test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
10480
10481 echo "$as_me:10481: checking where we will install curses.h" >&5
10482 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
10483 test "$with_overwrite" = no && \
10484 test "x$includedir" = 'x${prefix}/include' && \
10485         includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
10486 echo "$as_me:10486: result: $includedir" >&5
10487 echo "${ECHO_T}$includedir" >&6
10488
10489 ### Resolve a conflict between normal and wide-curses by forcing applications
10490 ### that will need libutf8 to add it to their configure script.
10491 if test "$with_overwrite" != no ; then
10492 if test "$NCURSES_LIBUTF8" = 1 ; then
10493         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
10494         { echo "$as_me:10494: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
10495 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
10496 fi
10497 fi
10498
10499 ### Set up low-level terminfo dependencies for makefiles.  Note that we
10500 ### could override this.
10501 if test "$with_termlib" = yes ; then
10502         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
10503         if test "$DFT_LWR_MODEL" = "libtool"; then
10504                 TEST_ARGS="${TEST_DEPS}"
10505         else
10506                 TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
10507         fi
10508 fi
10509 PROG_DEPS="$TEST_DEPS"
10510 PROG_ARGS="$TEST_ARGS"
10511
10512 ### Construct the list of subdirectories for which we'll customize makefiles
10513 ### with the appropriate compile-rules.
10514
10515 echo "$as_me:10515: checking for src modules" >&5
10516 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
10517
10518 # dependencies and linker-arguments for test-programs
10519 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
10520 if test "$DFT_LWR_MODEL" = "libtool"; then
10521         TEST_ARGS="${TEST_DEPS}"
10522 else
10523         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
10524 fi
10525
10526 # dependencies and linker-arguments for utility-programs
10527 PROG_ARGS="$TEST_ARGS"
10528
10529 cf_cv_src_modules=
10530 for cf_dir in $modules_to_build
10531 do
10532         if test -f $srcdir/$cf_dir/modules; then
10533
10534                 # We may/may not have tack in the distribution, though the
10535                 # makefile is.
10536                 if test $cf_dir = tack ; then
10537                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
10538                                 continue
10539                         fi
10540                 fi
10541
10542                 if test -z "$cf_cv_src_modules"; then
10543                         cf_cv_src_modules=$cf_dir
10544                 else
10545                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
10546                 fi
10547
10548                 # Make the ncurses_cfg.h file record the library interface files as
10549                 # well.  These are header files that are the same name as their
10550                 # directory.  Ncurses is the only library that does not follow
10551                 # that pattern.
10552                 if test $cf_dir = tack ; then
10553                         continue
10554                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
10555
10556 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10557
10558                         cat >>confdefs.h <<EOF
10559 #define HAVE_${cf_have_include}_H 1
10560 EOF
10561
10562                         cat >>confdefs.h <<EOF
10563 #define HAVE_LIB${cf_have_include} 1
10564 EOF
10565
10566                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
10567                         if test "$DFT_LWR_MODEL" = "libtool"; then
10568                                 TEST_ARGS="${TEST_DEPS}"
10569                         else
10570                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
10571                         fi
10572                 fi
10573         fi
10574 done
10575 echo "$as_me:10575: result: $cf_cv_src_modules" >&5
10576 echo "${ECHO_T}$cf_cv_src_modules" >&6
10577 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
10578
10579 PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
10580
10581 SRC_SUBDIRS="man include"
10582 for cf_dir in $cf_cv_src_modules
10583 do
10584         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
10585 done
10586 SRC_SUBDIRS="$SRC_SUBDIRS test"
10587 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
10588 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
10589
10590 ADA_SUBDIRS=
10591 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
10592    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
10593    ADA_SUBDIRS="gen src samples"
10594 fi
10595
10596 SUB_MAKEFILES=
10597 for cf_dir in $SRC_SUBDIRS
10598 do
10599         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
10600 done
10601
10602 if test -n "$ADA_SUBDIRS"; then
10603    for cf_dir in $ADA_SUBDIRS
10604    do
10605       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
10606    done
10607
10608 fi
10609
10610 DIRS_TO_MAKE="lib"
10611 for cf_item in $cf_list_models
10612 do
10613
10614         case $cf_item in
10615         libtool) cf_subdir='obj_lo'  ;;
10616         normal)  cf_subdir='objects' ;;
10617         debug)   cf_subdir='obj_g' ;;
10618         profile) cf_subdir='obj_p' ;;
10619         shared)
10620                 case $cf_cv_system_name in #(vi
10621                 cygwin) #(vi
10622                         cf_subdir='objects' ;;
10623                 *)
10624                         cf_subdir='obj_s' ;;
10625                 esac
10626         esac
10627
10628         for cf_item2 in $DIRS_TO_MAKE
10629         do
10630                 test $cf_item2 = $cf_subdir && break
10631         done
10632         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
10633 done
10634 for cf_dir in $DIRS_TO_MAKE
10635 do
10636         test ! -d $cf_dir && mkdir $cf_dir
10637 done
10638
10639 cat >>confdefs.h <<EOF
10640 #define NCURSES_PATHSEP '$PATHSEP'
10641 EOF
10642
10643 ### Now that we're done running tests, add the compiler-warnings, if any
10644 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
10645
10646 ################################################################################
10647 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h misc/run_tic.sh:misc/run_tic.in $SUB_MAKEFILES Makefile"
10648 ac_config_commands="$ac_config_commands default"
10649 cat >confcache <<\_ACEOF
10650 # This file is a shell script that caches the results of configure
10651 # tests run on this system so they can be shared between configure
10652 # scripts and configure runs, see configure's option --config-cache.
10653 # It is not useful on other systems.  If it contains results you don't
10654 # want to keep, you may remove or edit it.
10655 #
10656 # config.status only pays attention to the cache file if you give it
10657 # the --recheck option to rerun configure.
10658 #
10659 # `ac_cv_env_foo' variables (set or unset) will be overriden when
10660 # loading this file, other *unset* `ac_cv_foo' will be assigned the
10661 # following values.
10662
10663 _ACEOF
10664
10665 # The following way of writing the cache mishandles newlines in values,
10666 # but we know of no workaround that is simple, portable, and efficient.
10667 # So, don't put newlines in cache variables' values.
10668 # Ultrix sh set writes to stderr and can't be redirected directly,
10669 # and sets the high bit in the cache file unless we assign to the vars.
10670 {
10671   (set) 2>&1 |
10672     case `(ac_space=' '; set | grep ac_space) 2>&1` in
10673     *ac_space=\ *)
10674       # `set' does not quote correctly, so add quotes (double-quote
10675       # substitution turns \\\\ into \\, and sed turns \\ into \).
10676       sed -n \
10677         "s/'/'\\\\''/g;
10678           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10679       ;;
10680     *)
10681       # `set' quotes correctly as required by POSIX, so do not add quotes.
10682       sed -n \
10683         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
10684       ;;
10685     esac;
10686 } |
10687   sed '
10688      t clear
10689      : clear
10690      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10691      t end
10692      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10693      : end' >>confcache
10694 if cmp -s $cache_file confcache; then :; else
10695   if test -w $cache_file; then
10696     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
10697     cat confcache >$cache_file
10698   else
10699     echo "not updating unwritable cache $cache_file"
10700   fi
10701 fi
10702 rm -f confcache
10703
10704 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10705 # Let make expand exec_prefix.
10706 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10707
10708 # VPATH may cause trouble with some makes, so we remove $(srcdir),
10709 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
10710 # trailing colons and then remove the whole line if VPATH becomes empty
10711 # (actually we leave an empty line to preserve line numbers).
10712 if test "x$srcdir" = x.; then
10713   ac_vpsub='/^[         ]*VPATH[        ]*=/{
10714 s/:*\$(srcdir):*/:/;
10715 s/:*\${srcdir}:*/:/;
10716 s/:*@srcdir@:*/:/;
10717 s/^\([^=]*=[    ]*\):*/\1/;
10718 s/:*$//;
10719 s/^[^=]*=[      ]*$//;
10720 }'
10721 fi
10722
10723 DEFS=-DHAVE_CONFIG_H
10724
10725 : ${CONFIG_STATUS=./config.status}
10726 ac_clean_files_save=$ac_clean_files
10727 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10728 { echo "$as_me:10728: creating $CONFIG_STATUS" >&5
10729 echo "$as_me: creating $CONFIG_STATUS" >&6;}
10730 cat >$CONFIG_STATUS <<_ACEOF
10731 #! $SHELL
10732 # Generated automatically by configure.
10733 # Run this file to recreate the current configuration.
10734 # Compiler output produced by configure, useful for debugging
10735 # configure, is in config.log if it exists.
10736
10737 debug=false
10738 SHELL=\${CONFIG_SHELL-$SHELL}
10739 ac_cs_invocation="\$0 \$@"
10740
10741 _ACEOF
10742
10743 cat >>$CONFIG_STATUS <<\_ACEOF
10744 # Be Bourne compatible
10745 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
10746   emulate sh
10747   NULLCMD=:
10748 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
10749   set -o posix
10750 fi
10751
10752 # Name of the executable.
10753 as_me=`echo "$0" |sed 's,.*[\\/],,'`
10754
10755 if expr a : '\(a\)' >/dev/null 2>&1; then
10756   as_expr=expr
10757 else
10758   as_expr=false
10759 fi
10760
10761 rm -f conf$$ conf$$.exe conf$$.file
10762 echo >conf$$.file
10763 if ln -s conf$$.file conf$$ 2>/dev/null; then
10764   # We could just check for DJGPP; but this test a) works b) is more generic
10765   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
10766   if test -f conf$$.exe; then
10767     # Don't use ln at all; we don't have any links
10768     as_ln_s='cp -p'
10769   else
10770     as_ln_s='ln -s'
10771   fi
10772 elif ln conf$$.file conf$$ 2>/dev/null; then
10773   as_ln_s=ln
10774 else
10775   as_ln_s='cp -p'
10776 fi
10777 rm -f conf$$ conf$$.exe conf$$.file
10778
10779 as_executable_p="test -f"
10780
10781 # Support unset when possible.
10782 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
10783   as_unset=unset
10784 else
10785   as_unset=false
10786 fi
10787
10788 # NLS nuisances.
10789 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
10790 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
10791 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
10792 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
10793 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
10794 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
10795 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
10796 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
10797
10798 # IFS
10799 # We need space, tab and new line, in precisely that order.
10800 as_nl='
10801 '
10802 IFS="   $as_nl"
10803
10804 # CDPATH.
10805 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
10806
10807 exec 6>&1
10808
10809 _ACEOF
10810
10811 # Files that config.status was made for.
10812 if test -n "$ac_config_files"; then
10813   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
10814 fi
10815
10816 if test -n "$ac_config_headers"; then
10817   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
10818 fi
10819
10820 if test -n "$ac_config_links"; then
10821   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
10822 fi
10823
10824 if test -n "$ac_config_commands"; then
10825   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
10826 fi
10827
10828 cat >>$CONFIG_STATUS <<\EOF
10829
10830 ac_cs_usage="\
10831 \`$as_me' instantiates files from templates according to the
10832 current configuration.
10833
10834 Usage: $0 [OPTIONS] [FILE]...
10835
10836   -h, --help       print this help, then exit
10837   -V, --version    print version number, then exit
10838   -d, --debug      don't remove temporary files
10839       --recheck    update $as_me by reconfiguring in the same conditions
10840   --file=FILE[:TEMPLATE]
10841                    instantiate the configuration file FILE
10842   --header=FILE[:TEMPLATE]
10843                    instantiate the configuration header FILE
10844
10845 Configuration files:
10846 $config_files
10847
10848 Configuration headers:
10849 $config_headers
10850
10851 Configuration commands:
10852 $config_commands
10853
10854 Report bugs to <bug-autoconf@gnu.org>."
10855 EOF
10856
10857 cat >>$CONFIG_STATUS <<EOF
10858 ac_cs_version="\\
10859 config.status
10860 configured by $0, generated by GNU Autoconf 2.52.20011227,
10861   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
10862
10863 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
10864 Free Software Foundation, Inc.
10865 This config.status script is free software; the Free Software Foundation
10866 gives unlimited permission to copy, distribute and modify it."
10867 srcdir=$srcdir
10868 INSTALL="$INSTALL"
10869 EOF
10870
10871 cat >>$CONFIG_STATUS <<\EOF
10872 # If no file are specified by the user, then we need to provide default
10873 # value.  By we need to know if files were specified by the user.
10874 ac_need_defaults=:
10875 while test $# != 0
10876 do
10877   case $1 in
10878   --*=*)
10879     ac_option=`expr "x$1" : 'x\([^=]*\)='`
10880     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
10881     shift
10882     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
10883     shift
10884     ;;
10885   -*);;
10886   *) # This is not an option, so the user has probably given explicit
10887      # arguments.
10888      ac_need_defaults=false;;
10889   esac
10890
10891   case $1 in
10892   # Handling of the options.
10893 EOF
10894 cat >>$CONFIG_STATUS <<EOF
10895   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10896     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
10897     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
10898 EOF
10899 cat >>$CONFIG_STATUS <<\EOF
10900   --version | --vers* | -V )
10901     echo "$ac_cs_version"; exit 0 ;;
10902   --he | --h)
10903     # Conflict between --help and --header
10904     { { echo "$as_me:10904: error: ambiguous option: $1
10905 Try \`$0 --help' for more information." >&5
10906 echo "$as_me: error: ambiguous option: $1
10907 Try \`$0 --help' for more information." >&2;}
10908    { (exit 1); exit 1; }; };;
10909   --help | --hel | -h )
10910     echo "$ac_cs_usage"; exit 0 ;;
10911   --debug | --d* | -d )
10912     debug=: ;;
10913   --file | --fil | --fi | --f )
10914     shift
10915     CONFIG_FILES="$CONFIG_FILES $1"
10916     ac_need_defaults=false;;
10917   --header | --heade | --head | --hea )
10918     shift
10919     CONFIG_HEADERS="$CONFIG_HEADERS $1"
10920     ac_need_defaults=false;;
10921
10922   # This is an error.
10923   -*) { { echo "$as_me:10923: error: unrecognized option: $1
10924 Try \`$0 --help' for more information." >&5
10925 echo "$as_me: error: unrecognized option: $1
10926 Try \`$0 --help' for more information." >&2;}
10927    { (exit 1); exit 1; }; } ;;
10928
10929   *) ac_config_targets="$ac_config_targets $1" ;;
10930
10931   esac
10932   shift
10933 done
10934
10935 exec 5>>config.log
10936 cat >&5 << _ACEOF
10937
10938 ## ----------------------- ##
10939 ## Running config.status.  ##
10940 ## ----------------------- ##
10941
10942 This file was extended by $as_me 2.52.20011227, executed with
10943   CONFIG_FILES    = $CONFIG_FILES
10944   CONFIG_HEADERS  = $CONFIG_HEADERS
10945   CONFIG_LINKS    = $CONFIG_LINKS
10946   CONFIG_COMMANDS = $CONFIG_COMMANDS
10947   > $ac_cs_invocation
10948 on `(hostname || uname -n) 2>/dev/null | sed 1q`
10949
10950 _ACEOF
10951 EOF
10952
10953 cat >>$CONFIG_STATUS <<EOF
10954 #
10955 # INIT-COMMANDS section.
10956 #
10957
10958 ### Special initialization commands, used to pass information from the
10959 ### configuration-run into config.status
10960
10961 AWK="$AWK"
10962 CF_LIST_MODELS="$cf_list_models"
10963 DFT_LWR_MODEL="$DFT_LWR_MODEL"
10964 LDCONFIG="$LDCONFIG"
10965 LIB_NAME="$LIB_NAME"
10966 LIB_SUBSETS="$LIB_SUBSETS"
10967 LIB_SUFFIX="$LIB_SUFFIX"
10968 LIB_TRACING="$LIB_TRACING"
10969 MAKE_TERMINFO="$MAKE_TERMINFO"
10970 NCURSES_OSPEED="$NCURSES_OSPEED"
10971 SRC_SUBDIRS="$SRC_SUBDIRS"
10972 TERMINFO="$TERMINFO"
10973 TINFO_NAME="$TINFO_NAME"
10974 WITH_CURSES_H="$with_curses_h"
10975 WITH_ECHO="$with_echo"
10976 WITH_OVERWRITE="$with_overwrite"
10977 cf_cv_abi_version="$cf_cv_abi_version"
10978 cf_cv_do_symlinks="$cf_cv_do_symlinks"
10979 cf_cv_rel_version="$cf_cv_rel_version"
10980 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
10981 cf_cv_shlib_version="$cf_cv_shlib_version"
10982 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
10983 cf_cv_system_name="$cf_cv_system_name"
10984 cf_with_cxx_binding="$cf_with_cxx_binding"
10985 target="$target"
10986
10987 EOF
10988
10989 cat >>$CONFIG_STATUS <<\EOF
10990 for ac_config_target in $ac_config_targets
10991 do
10992   case "$ac_config_target" in
10993   # Handling of arguments.
10994   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
10995   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
10996   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
10997   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
10998   "misc/run_tic.sh" ) CONFIG_FILES="$CONFIG_FILES misc/run_tic.sh:misc/run_tic.in" ;;
10999   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
11000   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11001   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11002   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
11003   *) { { echo "$as_me:11003: error: invalid argument: $ac_config_target" >&5
11004 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11005    { (exit 1); exit 1; }; };;
11006   esac
11007 done
11008
11009 # If the user did not use the arguments to specify the items to instantiate,
11010 # then the envvar interface is used.  Set only those that are not.
11011 # We use the long form for the default assignment because of an extremely
11012 # bizarre bug on SunOS 4.1.3.
11013 if $ac_need_defaults; then
11014   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11015   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11016   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11017 fi
11018
11019 # Create a temporary directory, and hook for its removal unless debugging.
11020 $debug ||
11021 {
11022   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11023   trap '{ (exit 1); exit 1; }' 1 2 13 15
11024 }
11025
11026 # Create a (secure) tmp directory for tmp files.
11027 : ${TMPDIR=/tmp}
11028 {
11029   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11030   test -n "$tmp" && test -d "$tmp"
11031 }  ||
11032 {
11033   tmp=$TMPDIR/cs$$-$RANDOM
11034   (umask 077 && mkdir $tmp)
11035 } ||
11036 {
11037    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11038    { (exit 1); exit 1; }
11039 }
11040
11041 EOF
11042
11043 cat >>$CONFIG_STATUS <<EOF
11044
11045 #
11046 # CONFIG_FILES section.
11047 #
11048
11049 # No need to generate the scripts if there are no CONFIG_FILES.
11050 # This happens for instance when ./config.status config.h
11051 if test -n "\$CONFIG_FILES"; then
11052   # Protect against being on the right side of a sed subst in config.status.
11053   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11054    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11055 s,@SHELL@,$SHELL,;t t
11056 s,@exec_prefix@,$exec_prefix,;t t
11057 s,@prefix@,$prefix,;t t
11058 s,@program_transform_name@,$program_transform_name,;t t
11059 s,@bindir@,$bindir,;t t
11060 s,@sbindir@,$sbindir,;t t
11061 s,@libexecdir@,$libexecdir,;t t
11062 s,@datadir@,$datadir,;t t
11063 s,@sysconfdir@,$sysconfdir,;t t
11064 s,@sharedstatedir@,$sharedstatedir,;t t
11065 s,@localstatedir@,$localstatedir,;t t
11066 s,@libdir@,$libdir,;t t
11067 s,@includedir@,$includedir,;t t
11068 s,@oldincludedir@,$oldincludedir,;t t
11069 s,@infodir@,$infodir,;t t
11070 s,@mandir@,$mandir,;t t
11071 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11072 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11073 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11074 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11075 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11076 s,@build_alias@,$build_alias,;t t
11077 s,@host_alias@,$host_alias,;t t
11078 s,@target_alias@,$target_alias,;t t
11079 s,@ECHO_C@,$ECHO_C,;t t
11080 s,@ECHO_N@,$ECHO_N,;t t
11081 s,@ECHO_T@,$ECHO_T,;t t
11082 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
11083 s,@DEFS@,$DEFS,;t t
11084 s,@LIBS@,$LIBS,;t t
11085 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
11086 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
11087 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
11088 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
11089 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
11090 s,@cf_cv_cc_bool_type@,$cf_cv_cc_bool_type,;t t
11091 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
11092 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
11093 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
11094 s,@build@,$build,;t t
11095 s,@build_cpu@,$build_cpu,;t t
11096 s,@build_vendor@,$build_vendor,;t t
11097 s,@build_os@,$build_os,;t t
11098 s,@host@,$host,;t t
11099 s,@host_cpu@,$host_cpu,;t t
11100 s,@host_vendor@,$host_vendor,;t t
11101 s,@host_os@,$host_os,;t t
11102 s,@target@,$target,;t t
11103 s,@target_cpu@,$target_cpu,;t t
11104 s,@target_vendor@,$target_vendor,;t t
11105 s,@target_os@,$target_os,;t t
11106 s,@CC@,$CC,;t t
11107 s,@CFLAGS@,$CFLAGS,;t t
11108 s,@LDFLAGS@,$LDFLAGS,;t t
11109 s,@CPPFLAGS@,$CPPFLAGS,;t t
11110 s,@ac_ct_CC@,$ac_ct_CC,;t t
11111 s,@EXEEXT@,$EXEEXT,;t t
11112 s,@OBJEXT@,$OBJEXT,;t t
11113 s,@BUILD_CC@,$BUILD_CC,;t t
11114 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
11115 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
11116 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
11117 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
11118 s,@CPP@,$CPP,;t t
11119 s,@PROG_EXT@,$PROG_EXT,;t t
11120 s,@LDCONFIG@,$LDCONFIG,;t t
11121 s,@CXX@,$CXX,;t t
11122 s,@CXXFLAGS@,$CXXFLAGS,;t t
11123 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
11124 s,@AWK@,$AWK,;t t
11125 s,@SET_MAKE@,$SET_MAKE,;t t
11126 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
11127 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
11128 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
11129 s,@LN_S@,$LN_S,;t t
11130 s,@RANLIB@,$RANLIB,;t t
11131 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
11132 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
11133 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
11134 s,@LINT@,$LINT,;t t
11135 s,@MAN@,$MAN,;t t
11136 s,@LINT_OPTS@,$LINT_OPTS,;t t
11137 s,@LD@,$LD,;t t
11138 s,@AR@,$AR,;t t
11139 s,@AR_OPTS@,$AR_OPTS,;t t
11140 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
11141 s,@DESTDIR@,$DESTDIR,;t t
11142 s,@cf_list_models@,$cf_list_models,;t t
11143 s,@LIBTOOL@,$LIBTOOL,;t t
11144 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
11145 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
11146 s,@TINFO_NAME@,$TINFO_NAME,;t t
11147 s,@LIB_NAME@,$LIB_NAME,;t t
11148 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
11149 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
11150 s,@CC_G_OPT@,$CC_G_OPT,;t t
11151 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
11152 s,@LD_MODEL@,$LD_MODEL,;t t
11153 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
11154 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
11155 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
11156 s,@LINK_PROGS@,$LINK_PROGS,;t t
11157 s,@LINK_TESTS@,$LINK_TESTS,;t t
11158 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
11159 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
11160 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
11161 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
11162 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
11163 s,@PATHSEP@,$PATHSEP,;t t
11164 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
11165 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
11166 s,@TERMINFO@,$TERMINFO,;t t
11167 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
11168 s,@TERMPATH@,$TERMPATH,;t t
11169 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
11170 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
11171 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
11172 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
11173 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
11174 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
11175 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
11176 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
11177 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
11178 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
11179 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
11180 s,@ECHO_LINK@,$ECHO_LINK,;t t
11181 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
11182 s,@MATH_LIB@,$MATH_LIB,;t t
11183 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
11184 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
11185 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
11186 s,@CXXCPP@,$CXXCPP,;t t
11187 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
11188 s,@CXX_AR@,$CXX_AR,;t t
11189 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
11190 s,@CXXLIBS@,$CXXLIBS,;t t
11191 s,@gnat_exists@,$gnat_exists,;t t
11192 s,@M4_exists@,$M4_exists,;t t
11193 s,@cf_ada_make@,$cf_ada_make,;t t
11194 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
11195 s,@cf_ada_package@,$cf_ada_package,;t t
11196 s,@ADAFLAGS@,$ADAFLAGS,;t t
11197 s,@cf_compile_generics@,$cf_compile_generics,;t t
11198 s,@cf_generic_objects@,$cf_generic_objects,;t t
11199 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
11200 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
11201 s,@ADA_TRACE@,$ADA_TRACE,;t t
11202 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
11203 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
11204 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
11205 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
11206 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
11207 s,@EXTRA_LIBS@,$EXTRA_LIBS,;t t
11208 s,@TINFO_LIST@,$TINFO_LIST,;t t
11209 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
11210 s,@TEST_DEPS@,$TEST_DEPS,;t t
11211 s,@TEST_ARGS@,$TEST_ARGS,;t t
11212 s,@PROG_ARGS@,$PROG_ARGS,;t t
11213 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
11214 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
11215 CEOF
11216
11217 EOF
11218
11219   cat >>$CONFIG_STATUS <<\EOF
11220   # Split the substitutions into bite-sized pieces for seds with
11221   # small command number limits, like on Digital OSF/1 and HP-UX.
11222   ac_max_sed_lines=48
11223   ac_sed_frag=1 # Number of current file.
11224   ac_beg=1 # First line for current file.
11225   ac_end=$ac_max_sed_lines # Line after last line for current file.
11226   ac_more_lines=:
11227   ac_sed_cmds=
11228   while $ac_more_lines; do
11229     if test $ac_beg -gt 1; then
11230       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11231     else
11232       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11233     fi
11234     if test ! -s $tmp/subs.frag; then
11235       ac_more_lines=false
11236     else
11237       # The purpose of the label and of the branching condition is to
11238       # speed up the sed processing (if there are no `@' at all, there
11239       # is no need to browse any of the substitutions).
11240       # These are the two extra sed commands mentioned above.
11241       (echo ':t
11242   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
11243       if test -z "$ac_sed_cmds"; then
11244         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
11245       else
11246         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
11247       fi
11248       ac_sed_frag=`expr $ac_sed_frag + 1`
11249       ac_beg=$ac_end
11250       ac_end=`expr $ac_end + $ac_max_sed_lines`
11251     fi
11252   done
11253   if test -z "$ac_sed_cmds"; then
11254     ac_sed_cmds=cat
11255   fi
11256 fi # test -n "$CONFIG_FILES"
11257
11258 EOF
11259 cat >>$CONFIG_STATUS <<\EOF
11260 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
11261   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11262   case $ac_file in
11263   - | *:- | *:-:* ) # input from stdin
11264         cat >$tmp/stdin
11265         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11266         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11267   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11268         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11269   * )   ac_file_in=$ac_file.in ;;
11270   esac
11271
11272   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
11273   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11274          X"$ac_file" : 'X\(//\)[^/]' \| \
11275          X"$ac_file" : 'X\(//\)$' \| \
11276          X"$ac_file" : 'X\(/\)' \| \
11277          .     : '\(.\)' 2>/dev/null ||
11278 echo X"$ac_file" |
11279     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11280           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11281           /^X\(\/\/\)$/{ s//\1/; q; }
11282           /^X\(\/\).*/{ s//\1/; q; }
11283           s/.*/./; q'`
11284   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11285     { case "$ac_dir" in
11286   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11287   *)                      as_incr_dir=.;;
11288 esac
11289 as_dummy="$ac_dir"
11290 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11291   case $as_mkdir_dir in
11292     # Skip DOS drivespec
11293     ?:) as_incr_dir=$as_mkdir_dir ;;
11294     *)
11295       as_incr_dir=$as_incr_dir/$as_mkdir_dir
11296       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11297     ;;
11298   esac
11299 done; }
11300
11301     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
11302     # A "../" for each directory in $ac_dir_suffix.
11303     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
11304   else
11305     ac_dir_suffix= ac_dots=
11306   fi
11307
11308   case $srcdir in
11309   .)  ac_srcdir=.
11310       if test -z "$ac_dots"; then
11311          ac_top_srcdir=.
11312       else
11313          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
11314       fi ;;
11315   [\\/]* | ?:[\\/]* )
11316       ac_srcdir=$srcdir$ac_dir_suffix;
11317       ac_top_srcdir=$srcdir ;;
11318   *) # Relative path.
11319     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
11320     ac_top_srcdir=$ac_dots$srcdir ;;
11321   esac
11322
11323   case $INSTALL in
11324   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11325   *) ac_INSTALL=$ac_dots$INSTALL ;;
11326   esac
11327
11328   if test x"$ac_file" != x-; then
11329     { echo "$as_me:11329: creating $ac_file" >&5
11330 echo "$as_me: creating $ac_file" >&6;}
11331     rm -f "$ac_file"
11332   fi
11333   # Let's still pretend it is `configure' which instantiates (i.e., don't
11334   # use $as_me), people would be surprised to read:
11335   #    /* config.h.  Generated automatically by config.status.  */
11336   configure_input="Generated automatically from `echo $ac_file_in |
11337                                                  sed 's,.*/,,'` by configure."
11338
11339   # First look for the input files in the build tree, otherwise in the
11340   # src tree.
11341   ac_file_inputs=`IFS=:
11342     for f in $ac_file_in; do
11343       case $f in
11344       -) echo $tmp/stdin ;;
11345       [\\/$]*)
11346          # Absolute (can't be DOS-style, as IFS=:)
11347          test -f "$f" || { { echo "$as_me:11347: error: cannot find input file: $f" >&5
11348 echo "$as_me: error: cannot find input file: $f" >&2;}
11349    { (exit 1); exit 1; }; }
11350          echo $f;;
11351       *) # Relative
11352          if test -f "$f"; then
11353            # Build tree
11354            echo $f
11355          elif test -f "$srcdir/$f"; then
11356            # Source tree
11357            echo $srcdir/$f
11358          else
11359            # /dev/null tree
11360            { { echo "$as_me:11360: error: cannot find input file: $f" >&5
11361 echo "$as_me: error: cannot find input file: $f" >&2;}
11362    { (exit 1); exit 1; }; }
11363          fi;;
11364       esac
11365     done` || { (exit 1); exit 1; }
11366 EOF
11367 cat >>$CONFIG_STATUS <<EOF
11368   sed "$ac_vpsub
11369 $extrasub
11370 EOF
11371 cat >>$CONFIG_STATUS <<\EOF
11372 :t
11373 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11374 s,@configure_input@,$configure_input,;t t
11375 s,@srcdir@,$ac_srcdir,;t t
11376 s,@top_srcdir@,$ac_top_srcdir,;t t
11377 s,@INSTALL@,$ac_INSTALL,;t t
11378 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
11379   rm -f $tmp/stdin
11380   if test x"$ac_file" != x-; then
11381     mv $tmp/out $ac_file
11382   else
11383     cat $tmp/out
11384     rm -f $tmp/out
11385   fi
11386
11387 done
11388 EOF
11389 cat >>$CONFIG_STATUS <<\EOF
11390
11391 #
11392 # CONFIG_HEADER section.
11393 #
11394
11395 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11396 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11397 #
11398 # ac_d sets the value in "#define NAME VALUE" lines.
11399 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11400 ac_dB='[        ].*$,\1#\2'
11401 ac_dC=' '
11402 ac_dD=',;t'
11403 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11404 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11405 ac_iB='\([      ]\),\1#\2define\3'
11406 ac_iC=' '
11407 ac_iD='\4,;t'
11408 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11409 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11410 ac_uB='$,\1#\2define\3'
11411 ac_uC=' '
11412 ac_uD=',;t'
11413
11414 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
11415   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11416   case $ac_file in
11417   - | *:- | *:-:* ) # input from stdin
11418         cat >$tmp/stdin
11419         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11420         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11421   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11422         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11423   * )   ac_file_in=$ac_file.in ;;
11424   esac
11425
11426   test x"$ac_file" != x- && { echo "$as_me:11426: creating $ac_file" >&5
11427 echo "$as_me: creating $ac_file" >&6;}
11428
11429   # First look for the input files in the build tree, otherwise in the
11430   # src tree.
11431   ac_file_inputs=`IFS=:
11432     for f in $ac_file_in; do
11433       case $f in
11434       -) echo $tmp/stdin ;;
11435       [\\/$]*)
11436          # Absolute (can't be DOS-style, as IFS=:)
11437          test -f "$f" || { { echo "$as_me:11437: error: cannot find input file: $f" >&5
11438 echo "$as_me: error: cannot find input file: $f" >&2;}
11439    { (exit 1); exit 1; }; }
11440          echo $f;;
11441       *) # Relative
11442          if test -f "$f"; then
11443            # Build tree
11444            echo $f
11445          elif test -f "$srcdir/$f"; then
11446            # Source tree
11447            echo $srcdir/$f
11448          else
11449            # /dev/null tree
11450            { { echo "$as_me:11450: error: cannot find input file: $f" >&5
11451 echo "$as_me: error: cannot find input file: $f" >&2;}
11452    { (exit 1); exit 1; }; }
11453          fi;;
11454       esac
11455     done` || { (exit 1); exit 1; }
11456   # Remove the trailing spaces.
11457   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
11458
11459 EOF
11460
11461 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
11462 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
11463 # be either 'cat' or 'sort'.
11464 cat confdefs.h | uniq >conftest.vals
11465
11466 # Break up conftest.vals because some shells have a limit on
11467 # the size of here documents, and old seds have small limits too.
11468
11469 rm -f conftest.tail
11470 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
11471 while grep . conftest.vals >/dev/null
11472 do
11473   # Write chunks of a limited-size here document to conftest.frag.
11474   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
11475   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11476   echo 'CEOF' >> $CONFIG_STATUS
11477   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11478   rm -f conftest.vals
11479   mv conftest.tail conftest.vals
11480 done
11481 rm -f conftest.vals
11482
11483 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
11484 # marker @DEFS@.
11485 echo '  cat >> conftest.edit <<CEOF
11486 /@DEFS@/r conftest.frag
11487 /@DEFS@/d
11488 CEOF
11489 sed -f conftest.edit $tmp/in > $tmp/out
11490 rm -f $tmp/in
11491 mv $tmp/out $tmp/in
11492 rm -f conftest.edit conftest.frag
11493 ' >> $CONFIG_STATUS
11494
11495 cat >>$CONFIG_STATUS <<\EOF
11496   # Let's still pretend it is `configure' which instantiates (i.e., don't
11497   # use $as_me), people would be surprised to read:
11498   #    /* config.h.  Generated automatically by config.status.  */
11499   if test x"$ac_file" = x-; then
11500     echo "/* Generated automatically by configure.  */" >$tmp/config.h
11501   else
11502     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
11503   fi
11504   cat $tmp/in >>$tmp/config.h
11505   rm -f $tmp/in
11506   if test x"$ac_file" != x-; then
11507     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
11508       { echo "$as_me:11508: $ac_file is unchanged" >&5
11509 echo "$as_me: $ac_file is unchanged" >&6;}
11510     else
11511       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11512          X"$ac_file" : 'X\(//\)[^/]' \| \
11513          X"$ac_file" : 'X\(//\)$' \| \
11514          X"$ac_file" : 'X\(/\)' \| \
11515          .     : '\(.\)' 2>/dev/null ||
11516 echo X"$ac_file" |
11517     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11518           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11519           /^X\(\/\/\)$/{ s//\1/; q; }
11520           /^X\(\/\).*/{ s//\1/; q; }
11521           s/.*/./; q'`
11522       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11523         { case "$ac_dir" in
11524   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11525   *)                      as_incr_dir=.;;
11526 esac
11527 as_dummy="$ac_dir"
11528 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11529   case $as_mkdir_dir in
11530     # Skip DOS drivespec
11531     ?:) as_incr_dir=$as_mkdir_dir ;;
11532     *)
11533       as_incr_dir=$as_incr_dir/$as_mkdir_dir
11534       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11535     ;;
11536   esac
11537 done; }
11538
11539       fi
11540       rm -f $ac_file
11541       mv $tmp/config.h $ac_file
11542     fi
11543   else
11544     cat $tmp/config.h
11545     rm -f $tmp/config.h
11546   fi
11547 done
11548 EOF
11549 cat >>$CONFIG_STATUS <<\EOF
11550
11551 #
11552 # CONFIG_COMMANDS section.
11553 #
11554 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
11555   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
11556   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
11557
11558   case $ac_dest in
11559     default )
11560
11561         case $cf_cv_system_name in
11562         OS/2*)  LIB_PREFIX=''     ;;
11563         os2*)   LIB_PREFIX=''     ;;
11564         *)      LIB_PREFIX='lib'  ;;
11565         esac
11566 cf_prefix=$LIB_PREFIX
11567
11568 for cf_dir in $SRC_SUBDIRS
11569 do
11570         if test -f $srcdir/$cf_dir/modules; then
11571
11572                 IMPORT_LIB=
11573                 SHARED_LIB=
11574                 LIBS_TO_MAKE=
11575                 for cf_item in $CF_LIST_MODELS
11576                 do
11577
11578         case $cf_item in
11579         libtool) cf_suffix='.la'  ;;
11580         normal)  cf_suffix='.a'   ;;
11581         debug)   cf_suffix='_g.a' ;;
11582         profile) cf_suffix='_p.a' ;;
11583         shared)
11584                 case $cf_cv_system_name in
11585                 cygwin*) cf_suffix='.dll' ;;
11586                 darwin*) cf_suffix='.dylib' ;;
11587                 hpux*)  cf_suffix='.sl'  ;;
11588                 *)      cf_suffix='.so'  ;;
11589                 esac
11590         esac
11591         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
11592
11593                         if test $cf_item = shared ; then
11594                         if test "$cf_cv_do_symlinks" = yes ; then
11595                                 case "$cf_cv_shlib_version" in #(vi
11596                                 rel) #(vi
11597                                         case "$cf_cv_system_name" in #(vi
11598                                         darwin*) cf_suffix='.$(REL_VERSION)'"$cf_suffix" ;; #(vi
11599                                         *) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
11600                                         esac
11601                                         ;;
11602                                 abi)
11603                                         case "$cf_cv_system_name" in #(vi
11604                                         darwin*) cf_suffix='.$(ABI_VERSION)'"$cf_suffix" ;; #(vi
11605                                         *) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
11606                                         esac
11607                                         ;;
11608                                 esac
11609                         fi
11610                         # cygwin needs import library, and has unique naming convention
11611                         if test $cf_cv_shlib_version = cygdll ; then
11612                                 SHARED_LIB="../lib/${cf_prefix}${cf_dir}\$(ABI_VERSION).dll"
11613                                 IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
11614                                 LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
11615                                 continue
11616                         fi
11617                         fi
11618                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
11619                 done
11620
11621                 if test $cf_dir = ncurses ; then
11622                         cf_subsets="$LIB_SUBSETS"
11623                         case "$LIB_SUBSETS" in #(vi
11624                         termlib+*) #(vi
11625                                 ;;
11626                         *) #(vi
11627                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s/$LIB_NAME/$TINFO_NAME/g`
11628                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
11629                                 ;;
11630                         esac
11631                 else
11632                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib //'`
11633                 fi
11634
11635                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
11636                     -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
11637                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
11638                         $cf_dir/Makefile >$cf_dir/Makefile.out
11639                 mv $cf_dir/Makefile.out $cf_dir/Makefile
11640
11641                 $AWK -f $srcdir/mk-0th.awk \
11642                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
11643                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
11644
11645                 for cf_subset in $cf_subsets
11646                 do
11647                         cf_subdirs=
11648                         for cf_item in $CF_LIST_MODELS
11649                         do
11650                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
11651
11652 CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11653
11654         case $cf_item in
11655         libtool) cf_suffix='.la'  ;;
11656         normal)  cf_suffix='.a'   ;;
11657         debug)   cf_suffix='_g.a' ;;
11658         profile) cf_suffix='_p.a' ;;
11659         shared)
11660                 case $cf_cv_system_name in
11661                 cygwin*) cf_suffix='.dll' ;;
11662                 darwin*) cf_suffix='.dylib' ;;
11663                 hpux*)  cf_suffix='.sl'  ;;
11664                 *)      cf_suffix='.so'  ;;
11665                 esac
11666         esac
11667         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
11668
11669         case $cf_item in
11670         libtool) cf_subdir='obj_lo'  ;;
11671         normal)  cf_subdir='objects' ;;
11672         debug)   cf_subdir='obj_g' ;;
11673         profile) cf_subdir='obj_p' ;;
11674         shared)
11675                 case $cf_cv_system_name in #(vi
11676                 cygwin) #(vi
11677                         cf_subdir='objects' ;;
11678                 *)
11679                         cf_subdir='obj_s' ;;
11680                 esac
11681         esac
11682
11683                         # These dependencies really are for development, not
11684                         # builds, but they are useful in porting, too.
11685                         cf_depend="../include/ncurses_cfg.h"
11686                         if test "$srcdir" = "."; then
11687                                 cf_reldir="."
11688                         else
11689                                 cf_reldir="\$(srcdir)"
11690                         fi
11691
11692                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
11693                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
11694                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
11695                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
11696                         fi
11697
11698                         $AWK -f $srcdir/mk-1st.awk \
11699                                 name=$cf_dir \
11700                                 traces=$LIB_TRACING \
11701                                 MODEL=$CF_ITEM \
11702                                 model=$cf_subdir \
11703                                 prefix=$cf_prefix \
11704                                 suffix=$cf_suffix \
11705                                 subset=$cf_subset \
11706                                 ShlibVer=$cf_cv_shlib_version \
11707                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
11708                                 DoLinks=$cf_cv_do_symlinks \
11709                                 rmSoLocs=$cf_cv_rm_so_locs \
11710                                 ldconfig="$LDCONFIG" \
11711                                 overwrite=$WITH_OVERWRITE \
11712                                 depend="$cf_depend" \
11713                                 target="$target" \
11714                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
11715                         for cf_subdir2 in $cf_subdirs lib
11716                         do
11717                                 test $cf_subdir = $cf_subdir2 && break
11718                         done
11719                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
11720                         $AWK -f $srcdir/mk-2nd.awk \
11721                                 name=$cf_dir \
11722                                 traces=$LIB_TRACING \
11723                                 MODEL=$CF_ITEM \
11724                                 model=$cf_subdir \
11725                                 subset=$cf_subset \
11726                                 srcdir=$srcdir \
11727                                 echo=$WITH_ECHO \
11728                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
11729                         cf_subdirs="$cf_subdirs $cf_subdir"
11730                         done
11731                 done
11732         fi
11733
11734         echo '  cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
11735 done
11736
11737 for cf_dir in $SRC_SUBDIRS
11738 do
11739         if test -f $cf_dir/Makefile ; then
11740                 case "$cf_dir" in
11741                 Ada95) #(vi
11742                         echo 'libs \' >> Makefile
11743                         echo 'install.libs \' >> Makefile
11744                         echo 'uninstall.libs ::' >> Makefile
11745                         echo '  cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile
11746                         ;;
11747                 esac
11748         fi
11749
11750         if test -f $srcdir/$cf_dir/modules; then
11751                 echo >> Makefile
11752                 if test -f $srcdir/$cf_dir/headers; then
11753 cat >> Makefile <<CF_EOF
11754 install.includes \\
11755 uninstall.includes \\
11756 CF_EOF
11757                 fi
11758 if test "$cf_dir" != "c++" ; then
11759 echo 'lint \' >> Makefile
11760 fi
11761 cat >> Makefile <<CF_EOF
11762 libs \\
11763 lintlib \\
11764 install.libs \\
11765 uninstall.libs \\
11766 install.$cf_dir \\
11767 uninstall.$cf_dir ::
11768         cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
11769 CF_EOF
11770         elif test -f $srcdir/$cf_dir/headers; then
11771 cat >> Makefile <<CF_EOF
11772
11773 libs \\
11774 install.libs \\
11775 uninstall.libs \\
11776 install.includes \\
11777 uninstall.includes ::
11778         cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
11779 CF_EOF
11780 fi
11781 done
11782
11783 cat >> Makefile <<CF_EOF
11784
11785 install.data \\
11786 uninstall.data ::
11787 $MAKE_TERMINFO  cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
11788
11789 install.man \\
11790 uninstall.man ::
11791         cd man && \$(MAKE) \$(CF_MFLAGS) \$@
11792
11793 distclean ::
11794         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
11795         rm -f headers.sh headers.sed
11796         rm -rf \$(DIRS_TO_MAKE)
11797 CF_EOF
11798
11799 # Special case: tack's manpage lives in its own directory.
11800 if test -d tack ; then
11801 if test -f $srcdir/$tack.h; then
11802 cat >> Makefile <<CF_EOF
11803
11804 install.man \\
11805 uninstall.man ::
11806         cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
11807 CF_EOF
11808 fi
11809 fi
11810
11811 rm -f headers.sed headers.sh
11812
11813 echo creating headers.sh
11814 cat >headers.sh <<CF_EOF
11815 #! /bin/sh
11816 # This shell script is generated by the 'configure' script.  It is invoked in a
11817 # subdirectory of the build tree.  It generates a sed-script in the parent
11818 # directory that is used to adjust includes for header files that reside in a
11819 # subdirectory of /usr/include, etc.
11820 PRG=""
11821 while test \$# != 3
11822 do
11823 PRG="\$PRG \$1"; shift
11824 done
11825 DST=\$1
11826 REF=\$2
11827 SRC=\$3
11828 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
11829 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
11830 echo installing \$SRC in \$DST
11831 CF_EOF
11832 if test $WITH_CURSES_H = yes; then
11833         cat >>headers.sh <<CF_EOF
11834 case \$DST in
11835 /*/include/*)
11836         END=\`basename \$DST\`
11837         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
11838         do
11839                 NAME=\`basename \$i\`
11840                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
11841         done
11842         ;;
11843 *)
11844         echo "" >> \$TMPSED
11845         ;;
11846 esac
11847 CF_EOF
11848 else
11849         cat >>headers.sh <<CF_EOF
11850 case \$DST in
11851 /*/include/*)
11852         END=\`basename \$DST\`
11853         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
11854         do
11855                 NAME=\`basename \$i\`
11856                 if test "\$NAME" = "curses.h"
11857                 then
11858                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
11859                         NAME=ncurses.h
11860                 fi
11861                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
11862         done
11863         ;;
11864 *)
11865         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
11866         ;;
11867 esac
11868 CF_EOF
11869 fi
11870 cat >>headers.sh <<CF_EOF
11871 rm -f \$TMPSRC
11872 sed -f \$TMPSED \$SRC > \$TMPSRC
11873 NAME=\`basename \$SRC\`
11874 CF_EOF
11875 if test $WITH_CURSES_H != yes; then
11876         cat >>headers.sh <<CF_EOF
11877 test "\$NAME" = "curses.h" && NAME=ncurses.h
11878 CF_EOF
11879 fi
11880 cat >>headers.sh <<CF_EOF
11881 # Just in case someone gzip'd manpages, remove the conflicting copy.
11882 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
11883
11884 eval \$PRG \$TMPSRC \$DST/\$NAME
11885 rm -f \$TMPSRC \$TMPSED
11886 CF_EOF
11887
11888 chmod 0755 headers.sh
11889
11890 for cf_dir in $SRC_SUBDIRS
11891 do
11892         if test -f $srcdir/$cf_dir/headers; then
11893         cat >>$cf_dir/Makefile <<CF_EOF
11894 \$(DESTDIR)\$(includedir) :
11895         sh \$(srcdir)/../mkinstalldirs \$@
11896
11897 install \\
11898 install.libs \\
11899 install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
11900 CF_EOF
11901                 j=""
11902                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
11903                 do
11904                         test -n "$j" && echo "          $j \\" >>$cf_dir/Makefile
11905                         j=$i
11906                 done
11907                 echo "          $j" >>$cf_dir/Makefile
11908                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
11909                 do
11910                         echo "  @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
11911                         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
11912                 done
11913
11914         cat >>$cf_dir/Makefile <<CF_EOF
11915
11916 uninstall \\
11917 uninstall.libs \\
11918 uninstall.includes ::
11919 CF_EOF
11920                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
11921                 do
11922                         i=`basename $i`
11923                         echo "  -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
11924                         test $i = curses.h && echo "    -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
11925                 done
11926         fi
11927
11928         if test -f $srcdir/$cf_dir/modules; then
11929                 if test "$cf_dir" != "c++" ; then
11930                         cat >>$cf_dir/Makefile <<"CF_EOF"
11931 depend : $(AUTO_SRC)
11932         makedepend -- $(CPPFLAGS) -- $(C_SRC)
11933
11934 # DO NOT DELETE THIS LINE -- make depend depends on it.
11935 CF_EOF
11936                 fi
11937         fi
11938 done
11939
11940  ;;
11941   esac
11942 done
11943 EOF
11944
11945 cat >>$CONFIG_STATUS <<\EOF
11946
11947 { (exit 0); exit 0; }
11948 EOF
11949 chmod +x $CONFIG_STATUS
11950 ac_clean_files=$ac_clean_files_save
11951
11952 # configure is writing to config.log, and then calls config.status.
11953 # config.status does its own redirection, appending to config.log.
11954 # Unfortunately, on DOS this fails, as config.log is still kept open
11955 # by configure, so config.status won't be able to write to it; its
11956 # output is simply discarded.  So we exec the FD to /dev/null,
11957 # effectively closing config.log, so it can be properly (re)opened and
11958 # appended to by config.status.  When coming back to configure, we
11959 # need to make the FD available again.
11960 if test "$no_create" != yes; then
11961   ac_cs_success=:
11962   exec 5>/dev/null
11963   $SHELL $CONFIG_STATUS || ac_cs_success=false
11964   exec 5>>config.log
11965   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11966   # would make configure fail if this is the last instruction.
11967   $ac_cs_success || { (exit 1); exit 1; }
11968 fi
11969 ${MAKE-make} preinstall