]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20120225
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.545 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --with-pkg-config-libdir=XXX use given directory for installing pc-files
706   --enable-pc-files       generate and install .pc files for pkg-config
707   --enable-mixed-case     tic should assume mixed-case filenames
708   --with-install-prefix   prefixes actual install-location ($DESTDIR)
709 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
710   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
711   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
712   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
713   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
714   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
715   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
716 Options to Specify the Libraries Built/Used:
717   --disable-libtool-version  enable to use libtool's incompatible naming scheme
718   --with-libtool          generate libraries with libtool
719   --with-shared           generate shared-libraries
720   --with-normal           generate normal-libraries (default)
721   --with-debug            generate debug-libraries (default)
722   --with-profile          generate profile-libraries
723   --with-lib-prefix       override library-prefix
724   --with-termlib          generate separate terminfo library
725   --with-ticlib           generate separate tic library
726   --with-gpm              use Alessandro Rubini's GPM library
727   --without-dlsym         do not use dlsym() to load GPM dynamically
728   --with-sysmouse         use sysmouse (FreeBSD console)
729   --enable-rpath          use rpath option when generating shared libraries
730   --disable-relink        relink shared libraries during install
731   --with-shlib-version=X  Specify rel or abi version for shared libs
732   --disable-rpath-hack    don't add rpath options for additional libraries
733 Fine-Tuning Your Configuration:
734   --disable-overwrite     leave out the link to -lcurses
735   --disable-database      do not use terminfo, only fallbacks/termcap
736   --with-database=XXX     specify terminfo source to install
737   --with-hashed-db        specify hashed-database library
738   --with-fallbacks=XXX    specify list of fallback terminal descriptions
739   --without-xterm-new     specify if xterm terminfo should be old version
740   --with-xterm-kbs=XXX     specify if xterm backspace sends BS or DEL
741   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
742   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
743   --disable-big-core      assume machine has little memory
744   --disable-big-strings   assume compiler has only standard-size strings
745   --enable-termcap        compile in termcap fallback support
746   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
747   --enable-getcap         fast termcap load, no xrefs to terminfo
748   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
749   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
750   --disable-root-environ  restrict environment when running as root
751   --enable-symlinks       make tic use symbolic links not hard links
752   --enable-broken_linker  compile with broken-linker support code
753   --enable-bsdpad         recognize BSD-style prefix padding
754   --enable-widec          compile with wide-char/UTF-8 code
755   --disable-lp64          allow chtype to be long (ignore _LP64)
756   --disable-largefile     omit support for large files
757   --disable-tparm-varargs compile tparm() without varargs interface
758   --disable-tic-depends   link tic library without explicit dependency on ncurses library
759   --with-bool=TYPE        override fallback type of bool variable
760   --with-caps=alt         compile with alternate Caps file
761   --with-chtype=TYPE      override type of chtype
762   --with-ospeed=TYPE      override type of ospeed variable
763   --with-mmask-t=TYPE     override type of mmask_t
764   --with-ccharw-max=XXX   override size CCHARW_MAX
765   --with-tparm-arg=TYPE   override parameter type of tparm
766   --with-rcs-ids          compile-in RCS identifiers
767 Options to Specify How Manpages are Installed:
768   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
769                           optionally formatted/catonly, e.g., gzip,formatted
770   --with-manpage-renames  specify manpage-renaming
771   --with-manpage-aliases  specify manpage-aliases using .so
772   --with-manpage-symlinks specify manpage-aliases using symlinks
773   --with-manpage-tbl      specify manpage processing with tbl
774 Extensions:
775   --disable-ext-funcs     disable function-extensions
776   --enable-sp-funcs       enable experimental SCREEN-extensions
777   --enable-term-driver    enable experimental terminal-driver
778   --enable-const          compile with extra/non-standard const
779   --enable-ext-colors     compile for 256-color support
780   --enable-ext-mouse      compile for extended mouse-encoding
781   --enable-no-padding     compile with $NCURSES_NO_PADDING code
782   --enable-signed-char    compile using signed Boolean's in term.h
783   --enable-sigwinch       compile with SIGWINCH handler
784   --enable-tcap-names     compile with user-definable terminal capabilities
785 Development Code:
786   --without-develop       disable development options
787   --enable-hard-tabs      compile with hard-tabs code
788   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
789 Experimental Code:
790   --disable-assumed-color do not assume anything about default-colors
791   --disable-hashmap       compile without hashmap scrolling-optimization
792   --enable-colorfgbg      compile-in experimental $COLORFGBG code
793   --enable-interop        compile-in experimental interop bindings
794   --with-pthread          use POSIX thread library
795   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
796   --enable-weak-symbols   enable weak-symbols for pthreads
797   --enable-reentrant      compile with experimental reentrant code
798   --with-wrap-prefix=XXX  override prefix used for public variables
799   --enable-safe-sprintf   compile with experimental safe-sprintf code
800   --disable-scroll-hints  compile without scroll-hints code
801   --enable-wgetch-events  compile with experimental wgetch-events code
802 Testing/development Options:
803   --enable-echo           build: display "compiling" commands (default)
804   --enable-warnings       build: turn on GCC compiler warnings
805   --enable-string-hacks  work around bogus compiler/loader warnings
806   --enable-assertions     test: turn on generation of assertion code
807   --with-dmalloc          test: use Gray Watson's dmalloc library
808   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
809   --with-valgrind         test: use valgrind
810   --disable-leaks         test: free permanent memory, analyze leaks
811   --enable-expanded       test: generate functions for certain macros
812   --disable-macros        test: use functions rather than macros
813   --with-trace            test: add trace() function to all models of ncurses
814 Ada95 Binding Options:
815   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
816   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
817   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
818   --with-ada-sharedlib=XX build Ada95 shared-library
819
820 Some influential environment variables:
821   CC          C compiler command
822   CFLAGS      C compiler flags
823   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
824               nonstandard directory <lib dir>
825   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
826               headers in a nonstandard directory <include dir>
827   CPP         C preprocessor
828   CXX         C++ compiler command
829   CXXFLAGS    C++ compiler flags
830   CXXCPP      C++ preprocessor
831
832 Use these variables to override the choices made by `configure' or to help
833 it to find libraries and programs with nonstandard names/locations.
834
835 EOF
836 fi
837
838 if test "$ac_init_help" = "recursive"; then
839   # If there are subdirs, report their specific --help.
840   ac_popdir=`pwd`
841   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
842     cd $ac_subdir
843     # A "../" for each directory in /$ac_subdir.
844     ac_dots=`echo $ac_subdir |
845              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
846
847     case $srcdir in
848     .) # No --srcdir option.  We are building in place.
849       ac_sub_srcdir=$srcdir ;;
850     [\\/]* | ?:[\\/]* ) # Absolute path.
851       ac_sub_srcdir=$srcdir/$ac_subdir ;;
852     *) # Relative path.
853       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
854     esac
855
856     # Check for guested configure; otherwise get Cygnus style configure.
857     if test -f $ac_sub_srcdir/configure.gnu; then
858       echo
859       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
860     elif test -f $ac_sub_srcdir/configure; then
861       echo
862       $SHELL $ac_sub_srcdir/configure  --help=recursive
863     elif test -f $ac_sub_srcdir/configure.ac ||
864            test -f $ac_sub_srcdir/configure.in; then
865       echo
866       $ac_configure --help
867     else
868       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
869     fi
870     cd $ac_popdir
871   done
872 fi
873
874 test -n "$ac_init_help" && exit 0
875 if $ac_init_version; then
876   cat <<\EOF
877
878 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
879 Free Software Foundation, Inc.
880 This configure script is free software; the Free Software Foundation
881 gives unlimited permission to copy, distribute and modify it.
882 EOF
883   exit 0
884 fi
885 exec 5>config.log
886 cat >&5 <<EOF
887 This file contains any messages produced by compilers while
888 running configure, to aid debugging if configure makes a mistake.
889
890 It was created by $as_me, which was
891 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
892
893   $ $0 $@
894
895 EOF
896 {
897 cat <<_ASUNAME
898 ## ---------- ##
899 ## Platform.  ##
900 ## ---------- ##
901
902 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
903 uname -m = `(uname -m) 2>/dev/null || echo unknown`
904 uname -r = `(uname -r) 2>/dev/null || echo unknown`
905 uname -s = `(uname -s) 2>/dev/null || echo unknown`
906 uname -v = `(uname -v) 2>/dev/null || echo unknown`
907
908 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
909 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
910
911 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
912 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
913 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
914 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
915 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
916 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
917 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
918
919 PATH = $PATH
920
921 _ASUNAME
922 } >&5
923
924 cat >&5 <<EOF
925 ## ------------ ##
926 ## Core tests.  ##
927 ## ------------ ##
928
929 EOF
930
931 # Keep a trace of the command line.
932 # Strip out --no-create and --no-recursion so they do not pile up.
933 # Also quote any args containing shell meta-characters.
934 ac_configure_args=
935 ac_sep=
936 for ac_arg
937 do
938   case $ac_arg in
939   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
940   | --no-cr | --no-c) ;;
941   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
942   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
943   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
944     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
945     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
946     ac_sep=" " ;;
947   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
948      ac_sep=" " ;;
949   esac
950   # Get rid of the leading space.
951 done
952
953 # When interrupted or exit'd, cleanup temporary files, and complete
954 # config.log.  We remove comments because anyway the quotes in there
955 # would cause problems or look ugly.
956 trap 'exit_status=$?
957   # Save into config.log some information that might help in debugging.
958   echo >&5
959   echo "## ----------------- ##" >&5
960   echo "## Cache variables.  ##" >&5
961   echo "## ----------------- ##" >&5
962   echo >&5
963   # The following way of writing the cache mishandles newlines in values,
964 {
965   (set) 2>&1 |
966     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
967     *ac_space=\ *)
968       sed -n \
969         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
970           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
971       ;;
972     *)
973       sed -n \
974         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
975       ;;
976     esac;
977 } >&5
978   sed "/^$/d" confdefs.h >conftest.log
979   if test -s conftest.log; then
980     echo >&5
981     echo "## ------------ ##" >&5
982     echo "## confdefs.h.  ##" >&5
983     echo "## ------------ ##" >&5
984     echo >&5
985     cat conftest.log >&5
986   fi
987   (echo; echo) >&5
988   test "$ac_signal" != 0 &&
989     echo "$as_me: caught signal $ac_signal" >&5
990   echo "$as_me: exit $exit_status" >&5
991   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
992     exit $exit_status
993      ' 0
994 for ac_signal in 1 2 13 15; do
995   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
996 done
997 ac_signal=0
998
999 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1000 rm -rf conftest* confdefs.h
1001 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1002 echo >confdefs.h
1003
1004 # Let the site file select an alternate cache file if it wants to.
1005 # Prefer explicitly selected file to automatically selected ones.
1006 if test -z "$CONFIG_SITE"; then
1007   if test "x$prefix" != xNONE; then
1008     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1009   else
1010     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1011   fi
1012 fi
1013 for ac_site_file in $CONFIG_SITE; do
1014   if test -r "$ac_site_file"; then
1015     { echo "$as_me:1015: loading site script $ac_site_file" >&5
1016 echo "$as_me: loading site script $ac_site_file" >&6;}
1017     cat "$ac_site_file" >&5
1018     . "$ac_site_file"
1019   fi
1020 done
1021
1022 if test -r "$cache_file"; then
1023   # Some versions of bash will fail to source /dev/null (special
1024   # files actually), so we avoid doing that.
1025   if test -f "$cache_file"; then
1026     { echo "$as_me:1026: loading cache $cache_file" >&5
1027 echo "$as_me: loading cache $cache_file" >&6;}
1028     case $cache_file in
1029       [\\/]* | ?:[\\/]* ) . $cache_file;;
1030       *)                      . ./$cache_file;;
1031     esac
1032   fi
1033 else
1034   { echo "$as_me:1034: creating cache $cache_file" >&5
1035 echo "$as_me: creating cache $cache_file" >&6;}
1036   >$cache_file
1037 fi
1038
1039 # Check that the precious variables saved in the cache have kept the same
1040 # value.
1041 ac_cache_corrupted=false
1042 for ac_var in `(set) 2>&1 |
1043                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1044   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1045   eval ac_new_set=\$ac_env_${ac_var}_set
1046   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1047   eval ac_new_val="\$ac_env_${ac_var}_value"
1048   case $ac_old_set,$ac_new_set in
1049     set,)
1050       { echo "$as_me:1050: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1051 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1052       ac_cache_corrupted=: ;;
1053     ,set)
1054       { echo "$as_me:1054: error: \`$ac_var' was not set in the previous run" >&5
1055 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1056       ac_cache_corrupted=: ;;
1057     ,);;
1058     *)
1059       if test "x$ac_old_val" != "x$ac_new_val"; then
1060         { echo "$as_me:1060: error: \`$ac_var' has changed since the previous run:" >&5
1061 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1062         { echo "$as_me:1062:   former value:  $ac_old_val" >&5
1063 echo "$as_me:   former value:  $ac_old_val" >&2;}
1064         { echo "$as_me:1064:   current value: $ac_new_val" >&5
1065 echo "$as_me:   current value: $ac_new_val" >&2;}
1066         ac_cache_corrupted=:
1067       fi;;
1068   esac
1069   # Pass precious variables to config.status.  It doesn't matter if
1070   # we pass some twice (in addition to the command line arguments).
1071   if test "$ac_new_set" = set; then
1072     case $ac_new_val in
1073     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1075       ac_configure_args="$ac_configure_args '$ac_arg'"
1076       ;;
1077     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1078        ;;
1079     esac
1080   fi
1081 done
1082 if $ac_cache_corrupted; then
1083   { echo "$as_me:1083: error: changes in the environment can compromise the build" >&5
1084 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1085   { { echo "$as_me:1085: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1086 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1087    { (exit 1); exit 1; }; }
1088 fi
1089
1090 ac_ext=c
1091 ac_cpp='$CPP $CPPFLAGS'
1092 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1093 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1094 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1095 ac_main_return=return
1096
1097 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1098   *c*,-n*) ECHO_N= ECHO_C='
1099 ' ECHO_T='      ' ;;
1100   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1101   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1102 esac
1103 echo "#! $SHELL" >conftest.sh
1104 echo  "exit 0"   >>conftest.sh
1105 chmod +x conftest.sh
1106 if { (echo "$as_me:1106: PATH=\".;.\"; conftest.sh") >&5
1107   (PATH=".;."; conftest.sh) 2>&5
1108   ac_status=$?
1109   echo "$as_me:1109: \$? = $ac_status" >&5
1110   (exit $ac_status); }; then
1111   ac_path_separator=';'
1112 else
1113   ac_path_separator=:
1114 fi
1115 PATH_SEPARATOR="$ac_path_separator"
1116 rm -f conftest.sh
1117
1118 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1119
1120 top_builddir=`pwd`
1121
1122 echo "$as_me:1122: checking for egrep" >&5
1123 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1124 if test "${ac_cv_prog_egrep+set}" = set; then
1125   echo $ECHO_N "(cached) $ECHO_C" >&6
1126 else
1127   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1128     then ac_cv_prog_egrep='grep -E'
1129     else ac_cv_prog_egrep='egrep'
1130     fi
1131 fi
1132 echo "$as_me:1132: result: $ac_cv_prog_egrep" >&5
1133 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1134  EGREP=$ac_cv_prog_egrep
1135
1136 test -z "$EGREP" && { { echo "$as_me:1136: error: No egrep program found" >&5
1137 echo "$as_me: error: No egrep program found" >&2;}
1138    { (exit 1); exit 1; }; }
1139
1140 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1141 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1142 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1143 cf_cv_abi_version=${NCURSES_MAJOR}
1144 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1145 cf_cv_timestamp=`date`
1146 echo "$as_me:1146: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1147 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1148
1149 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1150
1151 # Check whether --with-rel-version or --without-rel-version was given.
1152 if test "${with_rel_version+set}" = set; then
1153   withval="$with_rel_version"
1154   { echo "$as_me:1154: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1155 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1156  cf_cv_rel_version=$withval
1157 fi;
1158
1159  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1160  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1161
1162 if test -n "$NCURSES_MAJOR" ; then
1163   case $NCURSES_MAJOR in #(vi
1164   [0-9]*) #(vi
1165         ;;
1166   *)
1167         { { echo "$as_me:1167: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1168 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1169    { (exit 1); exit 1; }; }
1170         ;;
1171   esac
1172 else
1173   { { echo "$as_me:1173: error: Release major-version value is empty" >&5
1174 echo "$as_me: error: Release major-version value is empty" >&2;}
1175    { (exit 1); exit 1; }; }
1176 fi
1177
1178 if test -n "$NCURSES_MINOR" ; then
1179   case $NCURSES_MINOR in #(vi
1180   [0-9]*) #(vi
1181         ;;
1182   *)
1183         { { echo "$as_me:1183: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1184 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1185    { (exit 1); exit 1; }; }
1186         ;;
1187   esac
1188 else
1189   { { echo "$as_me:1189: error: Release minor-version value is empty" >&5
1190 echo "$as_me: error: Release minor-version value is empty" >&2;}
1191    { (exit 1); exit 1; }; }
1192 fi
1193
1194 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1195
1196 # Check whether --with-abi-version or --without-abi-version was given.
1197 if test "${with_abi_version+set}" = set; then
1198   withval="$with_abi_version"
1199   { echo "$as_me:1199: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1200 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1201  cf_cv_abi_version=$withval
1202 fi;
1203
1204 if test -n "$cf_cv_abi_version" ; then
1205   case $cf_cv_abi_version in #(vi
1206   [0-9]*) #(vi
1207         ;;
1208   *)
1209         { { echo "$as_me:1209: error: ABI version is not a number: $cf_cv_abi_version" >&5
1210 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1211    { (exit 1); exit 1; }; }
1212         ;;
1213   esac
1214 else
1215   { { echo "$as_me:1215: error: ABI version value is empty" >&5
1216 echo "$as_me: error: ABI version value is empty" >&2;}
1217    { (exit 1); exit 1; }; }
1218 fi
1219
1220 ac_aux_dir=
1221 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1222   if test -f $ac_dir/install-sh; then
1223     ac_aux_dir=$ac_dir
1224     ac_install_sh="$ac_aux_dir/install-sh -c"
1225     break
1226   elif test -f $ac_dir/install.sh; then
1227     ac_aux_dir=$ac_dir
1228     ac_install_sh="$ac_aux_dir/install.sh -c"
1229     break
1230   elif test -f $ac_dir/shtool; then
1231     ac_aux_dir=$ac_dir
1232     ac_install_sh="$ac_aux_dir/shtool install -c"
1233     break
1234   fi
1235 done
1236 if test -z "$ac_aux_dir"; then
1237   { { echo "$as_me:1237: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1238 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1239    { (exit 1); exit 1; }; }
1240 fi
1241 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1242 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1243 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1244
1245 # Make sure we can run config.sub.
1246 $ac_config_sub sun4 >/dev/null 2>&1 ||
1247   { { echo "$as_me:1247: error: cannot run $ac_config_sub" >&5
1248 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1249    { (exit 1); exit 1; }; }
1250
1251 echo "$as_me:1251: checking build system type" >&5
1252 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1253 if test "${ac_cv_build+set}" = set; then
1254   echo $ECHO_N "(cached) $ECHO_C" >&6
1255 else
1256   ac_cv_build_alias=$build_alias
1257 test -z "$ac_cv_build_alias" &&
1258   ac_cv_build_alias=`$ac_config_guess`
1259 test -z "$ac_cv_build_alias" &&
1260   { { echo "$as_me:1260: error: cannot guess build type; you must specify one" >&5
1261 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1262    { (exit 1); exit 1; }; }
1263 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1264   { { echo "$as_me:1264: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1265 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1266    { (exit 1); exit 1; }; }
1267
1268 fi
1269 echo "$as_me:1269: result: $ac_cv_build" >&5
1270 echo "${ECHO_T}$ac_cv_build" >&6
1271 build=$ac_cv_build
1272 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1273 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1274 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1275
1276 echo "$as_me:1276: checking host system type" >&5
1277 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1278 if test "${ac_cv_host+set}" = set; then
1279   echo $ECHO_N "(cached) $ECHO_C" >&6
1280 else
1281   ac_cv_host_alias=$host_alias
1282 test -z "$ac_cv_host_alias" &&
1283   ac_cv_host_alias=$ac_cv_build_alias
1284 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1285   { { echo "$as_me:1285: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1286 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1287    { (exit 1); exit 1; }; }
1288
1289 fi
1290 echo "$as_me:1290: result: $ac_cv_host" >&5
1291 echo "${ECHO_T}$ac_cv_host" >&6
1292 host=$ac_cv_host
1293 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1294 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1295 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1296
1297 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1298         echo "$as_me:1298: checking target system type" >&5
1299 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1300 if test "${ac_cv_target+set}" = set; then
1301   echo $ECHO_N "(cached) $ECHO_C" >&6
1302 else
1303   ac_cv_target_alias=$target_alias
1304 test "x$ac_cv_target_alias" = "x" &&
1305   ac_cv_target_alias=$ac_cv_host_alias
1306 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1307   { { echo "$as_me:1307: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1308 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1309    { (exit 1); exit 1; }; }
1310
1311 fi
1312 echo "$as_me:1312: result: $ac_cv_target" >&5
1313 echo "${ECHO_T}$ac_cv_target" >&6
1314 target=$ac_cv_target
1315 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1316 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1317 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1318
1319 # The aliases save the names the user supplied, while $host etc.
1320 # will get canonicalized.
1321 test -n "$target_alias" &&
1322   test "$program_prefix$program_suffix$program_transform_name" = \
1323     NONENONEs,x,x, &&
1324   program_prefix=${target_alias}-
1325         system_name="$host_os"
1326 else
1327         system_name="`(uname -s -r) 2>/dev/null`"
1328         if test -z "$system_name" ; then
1329                 system_name="`(hostname) 2>/dev/null`"
1330         fi
1331 fi
1332 test -n "$system_name" && cat >>confdefs.h <<EOF
1333 #define SYSTEM_NAME "$system_name"
1334 EOF
1335
1336 if test "${cf_cv_system_name+set}" = set; then
1337   echo $ECHO_N "(cached) $ECHO_C" >&6
1338 else
1339   cf_cv_system_name="$system_name"
1340 fi
1341
1342 test -z "$system_name" && system_name="$cf_cv_system_name"
1343 test -n "$cf_cv_system_name" && echo "$as_me:1343: result: Configuring for $cf_cv_system_name" >&5
1344 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1345
1346 if test ".$system_name" != ".$cf_cv_system_name" ; then
1347         echo "$as_me:1347: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1348 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1349         { { echo "$as_me:1349: error: \"Please remove config.cache and try again.\"" >&5
1350 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1351    { (exit 1); exit 1; }; }
1352 fi
1353
1354 # Check whether --with-system-type or --without-system-type was given.
1355 if test "${with_system_type+set}" = set; then
1356   withval="$with_system_type"
1357   { echo "$as_me:1357: WARNING: overriding system type to $withval" >&5
1358 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1359  cf_cv_system_name=$withval
1360 fi;
1361
1362 ###     Save the given $CFLAGS to allow user-override.
1363 cf_user_CFLAGS="$CFLAGS"
1364
1365 ###     Default install-location
1366
1367 echo "$as_me:1367: checking for prefix" >&5
1368 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1369 if test "x$prefix" = "xNONE" ; then
1370         case "$cf_cv_system_name" in
1371                 # non-vendor systems don't have a conflict
1372         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1373                 prefix=/usr
1374                 ;;
1375         *)      prefix=$ac_default_prefix
1376                 ;;
1377         esac
1378 fi
1379 echo "$as_me:1379: result: $prefix" >&5
1380 echo "${ECHO_T}$prefix" >&6
1381
1382 if test "x$prefix" = "xNONE" ; then
1383 echo "$as_me:1383: checking for default include-directory" >&5
1384 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1385 test -n "$verbose" && echo 1>&6
1386 for cf_symbol in \
1387         $includedir \
1388         $includedir/ncurses \
1389         $prefix/include \
1390         $prefix/include/ncurses \
1391         /usr/local/include \
1392         /usr/local/include/ncurses \
1393         /usr/include \
1394         /usr/include/ncurses
1395 do
1396         cf_dir=`eval echo $cf_symbol`
1397         if test -f $cf_dir/curses.h ; then
1398         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1399                 includedir="$cf_symbol"
1400                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1401                 break
1402         fi
1403         fi
1404         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1405 done
1406 echo "$as_me:1406: result: $includedir" >&5
1407 echo "${ECHO_T}$includedir" >&6
1408 fi
1409
1410 ###     Checks for programs.
1411 ac_ext=c
1412 ac_cpp='$CPP $CPPFLAGS'
1413 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1414 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1415 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1416 ac_main_return=return
1417 if test -n "$ac_tool_prefix"; then
1418   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1419 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1420 echo "$as_me:1420: checking for $ac_word" >&5
1421 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1422 if test "${ac_cv_prog_CC+set}" = set; then
1423   echo $ECHO_N "(cached) $ECHO_C" >&6
1424 else
1425   if test -n "$CC"; then
1426   ac_cv_prog_CC="$CC" # Let the user override the test.
1427 else
1428   ac_save_IFS=$IFS; IFS=$ac_path_separator
1429 ac_dummy="$PATH"
1430 for ac_dir in $ac_dummy; do
1431   IFS=$ac_save_IFS
1432   test -z "$ac_dir" && ac_dir=.
1433   $as_executable_p "$ac_dir/$ac_word" || continue
1434 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1435 echo "$as_me:1435: found $ac_dir/$ac_word" >&5
1436 break
1437 done
1438
1439 fi
1440 fi
1441 CC=$ac_cv_prog_CC
1442 if test -n "$CC"; then
1443   echo "$as_me:1443: result: $CC" >&5
1444 echo "${ECHO_T}$CC" >&6
1445 else
1446   echo "$as_me:1446: result: no" >&5
1447 echo "${ECHO_T}no" >&6
1448 fi
1449
1450 fi
1451 if test -z "$ac_cv_prog_CC"; then
1452   ac_ct_CC=$CC
1453   # Extract the first word of "gcc", so it can be a program name with args.
1454 set dummy gcc; ac_word=$2
1455 echo "$as_me:1455: checking for $ac_word" >&5
1456 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1457 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1458   echo $ECHO_N "(cached) $ECHO_C" >&6
1459 else
1460   if test -n "$ac_ct_CC"; then
1461   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1462 else
1463   ac_save_IFS=$IFS; IFS=$ac_path_separator
1464 ac_dummy="$PATH"
1465 for ac_dir in $ac_dummy; do
1466   IFS=$ac_save_IFS
1467   test -z "$ac_dir" && ac_dir=.
1468   $as_executable_p "$ac_dir/$ac_word" || continue
1469 ac_cv_prog_ac_ct_CC="gcc"
1470 echo "$as_me:1470: found $ac_dir/$ac_word" >&5
1471 break
1472 done
1473
1474 fi
1475 fi
1476 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1477 if test -n "$ac_ct_CC"; then
1478   echo "$as_me:1478: result: $ac_ct_CC" >&5
1479 echo "${ECHO_T}$ac_ct_CC" >&6
1480 else
1481   echo "$as_me:1481: result: no" >&5
1482 echo "${ECHO_T}no" >&6
1483 fi
1484
1485   CC=$ac_ct_CC
1486 else
1487   CC="$ac_cv_prog_CC"
1488 fi
1489
1490 if test -z "$CC"; then
1491   if test -n "$ac_tool_prefix"; then
1492   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1493 set dummy ${ac_tool_prefix}cc; ac_word=$2
1494 echo "$as_me:1494: checking for $ac_word" >&5
1495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1496 if test "${ac_cv_prog_CC+set}" = set; then
1497   echo $ECHO_N "(cached) $ECHO_C" >&6
1498 else
1499   if test -n "$CC"; then
1500   ac_cv_prog_CC="$CC" # Let the user override the test.
1501 else
1502   ac_save_IFS=$IFS; IFS=$ac_path_separator
1503 ac_dummy="$PATH"
1504 for ac_dir in $ac_dummy; do
1505   IFS=$ac_save_IFS
1506   test -z "$ac_dir" && ac_dir=.
1507   $as_executable_p "$ac_dir/$ac_word" || continue
1508 ac_cv_prog_CC="${ac_tool_prefix}cc"
1509 echo "$as_me:1509: found $ac_dir/$ac_word" >&5
1510 break
1511 done
1512
1513 fi
1514 fi
1515 CC=$ac_cv_prog_CC
1516 if test -n "$CC"; then
1517   echo "$as_me:1517: result: $CC" >&5
1518 echo "${ECHO_T}$CC" >&6
1519 else
1520   echo "$as_me:1520: result: no" >&5
1521 echo "${ECHO_T}no" >&6
1522 fi
1523
1524 fi
1525 if test -z "$ac_cv_prog_CC"; then
1526   ac_ct_CC=$CC
1527   # Extract the first word of "cc", so it can be a program name with args.
1528 set dummy cc; ac_word=$2
1529 echo "$as_me:1529: checking for $ac_word" >&5
1530 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1531 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1532   echo $ECHO_N "(cached) $ECHO_C" >&6
1533 else
1534   if test -n "$ac_ct_CC"; then
1535   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1536 else
1537   ac_save_IFS=$IFS; IFS=$ac_path_separator
1538 ac_dummy="$PATH"
1539 for ac_dir in $ac_dummy; do
1540   IFS=$ac_save_IFS
1541   test -z "$ac_dir" && ac_dir=.
1542   $as_executable_p "$ac_dir/$ac_word" || continue
1543 ac_cv_prog_ac_ct_CC="cc"
1544 echo "$as_me:1544: found $ac_dir/$ac_word" >&5
1545 break
1546 done
1547
1548 fi
1549 fi
1550 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1551 if test -n "$ac_ct_CC"; then
1552   echo "$as_me:1552: result: $ac_ct_CC" >&5
1553 echo "${ECHO_T}$ac_ct_CC" >&6
1554 else
1555   echo "$as_me:1555: result: no" >&5
1556 echo "${ECHO_T}no" >&6
1557 fi
1558
1559   CC=$ac_ct_CC
1560 else
1561   CC="$ac_cv_prog_CC"
1562 fi
1563
1564 fi
1565 if test -z "$CC"; then
1566   # Extract the first word of "cc", so it can be a program name with args.
1567 set dummy cc; ac_word=$2
1568 echo "$as_me:1568: checking for $ac_word" >&5
1569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1570 if test "${ac_cv_prog_CC+set}" = set; then
1571   echo $ECHO_N "(cached) $ECHO_C" >&6
1572 else
1573   if test -n "$CC"; then
1574   ac_cv_prog_CC="$CC" # Let the user override the test.
1575 else
1576   ac_prog_rejected=no
1577   ac_save_IFS=$IFS; IFS=$ac_path_separator
1578 ac_dummy="$PATH"
1579 for ac_dir in $ac_dummy; do
1580   IFS=$ac_save_IFS
1581   test -z "$ac_dir" && ac_dir=.
1582   $as_executable_p "$ac_dir/$ac_word" || continue
1583 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1584   ac_prog_rejected=yes
1585   continue
1586 fi
1587 ac_cv_prog_CC="cc"
1588 echo "$as_me:1588: found $ac_dir/$ac_word" >&5
1589 break
1590 done
1591
1592 if test $ac_prog_rejected = yes; then
1593   # We found a bogon in the path, so make sure we never use it.
1594   set dummy $ac_cv_prog_CC
1595   shift
1596   if test $# != 0; then
1597     # We chose a different compiler from the bogus one.
1598     # However, it has the same basename, so the bogon will be chosen
1599     # first if we set CC to just the basename; use the full file name.
1600     shift
1601     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1602     shift
1603     ac_cv_prog_CC="$@"
1604   fi
1605 fi
1606 fi
1607 fi
1608 CC=$ac_cv_prog_CC
1609 if test -n "$CC"; then
1610   echo "$as_me:1610: result: $CC" >&5
1611 echo "${ECHO_T}$CC" >&6
1612 else
1613   echo "$as_me:1613: result: no" >&5
1614 echo "${ECHO_T}no" >&6
1615 fi
1616
1617 fi
1618 if test -z "$CC"; then
1619   if test -n "$ac_tool_prefix"; then
1620   for ac_prog in cl
1621   do
1622     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1623 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1624 echo "$as_me:1624: checking for $ac_word" >&5
1625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1626 if test "${ac_cv_prog_CC+set}" = set; then
1627   echo $ECHO_N "(cached) $ECHO_C" >&6
1628 else
1629   if test -n "$CC"; then
1630   ac_cv_prog_CC="$CC" # Let the user override the test.
1631 else
1632   ac_save_IFS=$IFS; IFS=$ac_path_separator
1633 ac_dummy="$PATH"
1634 for ac_dir in $ac_dummy; do
1635   IFS=$ac_save_IFS
1636   test -z "$ac_dir" && ac_dir=.
1637   $as_executable_p "$ac_dir/$ac_word" || continue
1638 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1639 echo "$as_me:1639: found $ac_dir/$ac_word" >&5
1640 break
1641 done
1642
1643 fi
1644 fi
1645 CC=$ac_cv_prog_CC
1646 if test -n "$CC"; then
1647   echo "$as_me:1647: result: $CC" >&5
1648 echo "${ECHO_T}$CC" >&6
1649 else
1650   echo "$as_me:1650: result: no" >&5
1651 echo "${ECHO_T}no" >&6
1652 fi
1653
1654     test -n "$CC" && break
1655   done
1656 fi
1657 if test -z "$CC"; then
1658   ac_ct_CC=$CC
1659   for ac_prog in cl
1660 do
1661   # Extract the first word of "$ac_prog", so it can be a program name with args.
1662 set dummy $ac_prog; ac_word=$2
1663 echo "$as_me:1663: checking for $ac_word" >&5
1664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1665 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1666   echo $ECHO_N "(cached) $ECHO_C" >&6
1667 else
1668   if test -n "$ac_ct_CC"; then
1669   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1670 else
1671   ac_save_IFS=$IFS; IFS=$ac_path_separator
1672 ac_dummy="$PATH"
1673 for ac_dir in $ac_dummy; do
1674   IFS=$ac_save_IFS
1675   test -z "$ac_dir" && ac_dir=.
1676   $as_executable_p "$ac_dir/$ac_word" || continue
1677 ac_cv_prog_ac_ct_CC="$ac_prog"
1678 echo "$as_me:1678: found $ac_dir/$ac_word" >&5
1679 break
1680 done
1681
1682 fi
1683 fi
1684 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1685 if test -n "$ac_ct_CC"; then
1686   echo "$as_me:1686: result: $ac_ct_CC" >&5
1687 echo "${ECHO_T}$ac_ct_CC" >&6
1688 else
1689   echo "$as_me:1689: result: no" >&5
1690 echo "${ECHO_T}no" >&6
1691 fi
1692
1693   test -n "$ac_ct_CC" && break
1694 done
1695
1696   CC=$ac_ct_CC
1697 fi
1698
1699 fi
1700
1701 test -z "$CC" && { { echo "$as_me:1701: error: no acceptable cc found in \$PATH" >&5
1702 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1703    { (exit 1); exit 1; }; }
1704
1705 # Provide some information about the compiler.
1706 echo "$as_me:1706:" \
1707      "checking for C compiler version" >&5
1708 ac_compiler=`set X $ac_compile; echo $2`
1709 { (eval echo "$as_me:1709: \"$ac_compiler --version </dev/null >&5\"") >&5
1710   (eval $ac_compiler --version </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -v </dev/null >&5\"") >&5
1715   (eval $ac_compiler -v </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719 { (eval echo "$as_me:1719: \"$ac_compiler -V </dev/null >&5\"") >&5
1720   (eval $ac_compiler -V </dev/null >&5) 2>&5
1721   ac_status=$?
1722   echo "$as_me:1722: \$? = $ac_status" >&5
1723   (exit $ac_status); }
1724
1725 cat >conftest.$ac_ext <<_ACEOF
1726 #line 1726 "configure"
1727 #include "confdefs.h"
1728
1729 int
1730 main ()
1731 {
1732
1733   ;
1734   return 0;
1735 }
1736 _ACEOF
1737 ac_clean_files_save=$ac_clean_files
1738 ac_clean_files="$ac_clean_files a.out a.exe"
1739 # Try to create an executable without -o first, disregard a.out.
1740 # It will help us diagnose broken compilers, and finding out an intuition
1741 # of exeext.
1742 echo "$as_me:1742: checking for C compiler default output" >&5
1743 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1744 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1745 if { (eval echo "$as_me:1745: \"$ac_link_default\"") >&5
1746   (eval $ac_link_default) 2>&5
1747   ac_status=$?
1748   echo "$as_me:1748: \$? = $ac_status" >&5
1749   (exit $ac_status); }; then
1750   # Find the output, starting from the most likely.  This scheme is
1751 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1752 # resort.
1753 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1754                 ls a.out conftest 2>/dev/null;
1755                 ls a.* conftest.* 2>/dev/null`; do
1756   case $ac_file in
1757     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1758     a.out ) # We found the default executable, but exeext='' is most
1759             # certainly right.
1760             break;;
1761     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1762           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1763           export ac_cv_exeext
1764           break;;
1765     * ) break;;
1766   esac
1767 done
1768 else
1769   echo "$as_me: failed program was:" >&5
1770 cat conftest.$ac_ext >&5
1771 { { echo "$as_me:1771: error: C compiler cannot create executables" >&5
1772 echo "$as_me: error: C compiler cannot create executables" >&2;}
1773    { (exit 77); exit 77; }; }
1774 fi
1775
1776 ac_exeext=$ac_cv_exeext
1777 echo "$as_me:1777: result: $ac_file" >&5
1778 echo "${ECHO_T}$ac_file" >&6
1779
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether the C compiler works" >&5
1783 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1784 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1785 # If not cross compiling, check that we can run a simple program.
1786 if test "$cross_compiling" != yes; then
1787   if { ac_try='./$ac_file'
1788   { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1789   (eval $ac_try) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); }; }; then
1793     cross_compiling=no
1794   else
1795     if test "$cross_compiling" = maybe; then
1796         cross_compiling=yes
1797     else
1798         { { echo "$as_me:1798: error: cannot run C compiled programs.
1799 If you meant to cross compile, use \`--host'." >&5
1800 echo "$as_me: error: cannot run C compiled programs.
1801 If you meant to cross compile, use \`--host'." >&2;}
1802    { (exit 1); exit 1; }; }
1803     fi
1804   fi
1805 fi
1806 echo "$as_me:1806: result: yes" >&5
1807 echo "${ECHO_T}yes" >&6
1808
1809 rm -f a.out a.exe conftest$ac_cv_exeext
1810 ac_clean_files=$ac_clean_files_save
1811 # Check the compiler produces executables we can run.  If not, either
1812 # the compiler is broken, or we cross compile.
1813 echo "$as_me:1813: checking whether we are cross compiling" >&5
1814 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1815 echo "$as_me:1815: result: $cross_compiling" >&5
1816 echo "${ECHO_T}$cross_compiling" >&6
1817
1818 echo "$as_me:1818: checking for executable suffix" >&5
1819 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1820 if { (eval echo "$as_me:1820: \"$ac_link\"") >&5
1821   (eval $ac_link) 2>&5
1822   ac_status=$?
1823   echo "$as_me:1823: \$? = $ac_status" >&5
1824   (exit $ac_status); }; then
1825   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1826 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1827 # work properly (i.e., refer to `conftest.exe'), while it won't with
1828 # `rm'.
1829 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1830   case $ac_file in
1831     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1832     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1833           export ac_cv_exeext
1834           break;;
1835     * ) break;;
1836   esac
1837 done
1838 else
1839   { { echo "$as_me:1839: error: cannot compute EXEEXT: cannot compile and link" >&5
1840 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1841    { (exit 1); exit 1; }; }
1842 fi
1843
1844 rm -f conftest$ac_cv_exeext
1845 echo "$as_me:1845: result: $ac_cv_exeext" >&5
1846 echo "${ECHO_T}$ac_cv_exeext" >&6
1847
1848 rm -f conftest.$ac_ext
1849 EXEEXT=$ac_cv_exeext
1850 ac_exeext=$EXEEXT
1851 echo "$as_me:1851: checking for object suffix" >&5
1852 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1853 if test "${ac_cv_objext+set}" = set; then
1854   echo $ECHO_N "(cached) $ECHO_C" >&6
1855 else
1856   cat >conftest.$ac_ext <<_ACEOF
1857 #line 1857 "configure"
1858 #include "confdefs.h"
1859
1860 int
1861 main ()
1862 {
1863
1864   ;
1865   return 0;
1866 }
1867 _ACEOF
1868 rm -f conftest.o conftest.obj
1869 if { (eval echo "$as_me:1869: \"$ac_compile\"") >&5
1870   (eval $ac_compile) 2>&5
1871   ac_status=$?
1872   echo "$as_me:1872: \$? = $ac_status" >&5
1873   (exit $ac_status); }; then
1874   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1875   case $ac_file in
1876     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1877     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1878        break;;
1879   esac
1880 done
1881 else
1882   echo "$as_me: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 { { echo "$as_me:1884: error: cannot compute OBJEXT: cannot compile" >&5
1885 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1886    { (exit 1); exit 1; }; }
1887 fi
1888
1889 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1890 fi
1891 echo "$as_me:1891: result: $ac_cv_objext" >&5
1892 echo "${ECHO_T}$ac_cv_objext" >&6
1893 OBJEXT=$ac_cv_objext
1894 ac_objext=$OBJEXT
1895 echo "$as_me:1895: checking whether we are using the GNU C compiler" >&5
1896 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1897 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1898   echo $ECHO_N "(cached) $ECHO_C" >&6
1899 else
1900   cat >conftest.$ac_ext <<_ACEOF
1901 #line 1901 "configure"
1902 #include "confdefs.h"
1903
1904 int
1905 main ()
1906 {
1907 #ifndef __GNUC__
1908        choke me
1909 #endif
1910
1911   ;
1912   return 0;
1913 }
1914 _ACEOF
1915 rm -f conftest.$ac_objext
1916 if { (eval echo "$as_me:1916: \"$ac_compile\"") >&5
1917   (eval $ac_compile) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit $ac_status); } &&
1921          { ac_try='test -s conftest.$ac_objext'
1922   { (eval echo "$as_me:1922: \"$ac_try\"") >&5
1923   (eval $ac_try) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit $ac_status); }; }; then
1927   ac_compiler_gnu=yes
1928 else
1929   echo "$as_me: failed program was:" >&5
1930 cat conftest.$ac_ext >&5
1931 ac_compiler_gnu=no
1932 fi
1933 rm -f conftest.$ac_objext conftest.$ac_ext
1934 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1935
1936 fi
1937 echo "$as_me:1937: result: $ac_cv_c_compiler_gnu" >&5
1938 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1939 GCC=`test $ac_compiler_gnu = yes && echo yes`
1940 ac_test_CFLAGS=${CFLAGS+set}
1941 ac_save_CFLAGS=$CFLAGS
1942 CFLAGS="-g"
1943 echo "$as_me:1943: checking whether $CC accepts -g" >&5
1944 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1945 if test "${ac_cv_prog_cc_g+set}" = set; then
1946   echo $ECHO_N "(cached) $ECHO_C" >&6
1947 else
1948   cat >conftest.$ac_ext <<_ACEOF
1949 #line 1949 "configure"
1950 #include "confdefs.h"
1951
1952 int
1953 main ()
1954 {
1955
1956   ;
1957   return 0;
1958 }
1959 _ACEOF
1960 rm -f conftest.$ac_objext
1961 if { (eval echo "$as_me:1961: \"$ac_compile\"") >&5
1962   (eval $ac_compile) 2>&5
1963   ac_status=$?
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); } &&
1966          { ac_try='test -s conftest.$ac_objext'
1967   { (eval echo "$as_me:1967: \"$ac_try\"") >&5
1968   (eval $ac_try) 2>&5
1969   ac_status=$?
1970   echo "$as_me:1970: \$? = $ac_status" >&5
1971   (exit $ac_status); }; }; then
1972   ac_cv_prog_cc_g=yes
1973 else
1974   echo "$as_me: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 ac_cv_prog_cc_g=no
1977 fi
1978 rm -f conftest.$ac_objext conftest.$ac_ext
1979 fi
1980 echo "$as_me:1980: result: $ac_cv_prog_cc_g" >&5
1981 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1982 if test "$ac_test_CFLAGS" = set; then
1983   CFLAGS=$ac_save_CFLAGS
1984 elif test $ac_cv_prog_cc_g = yes; then
1985   if test "$GCC" = yes; then
1986     CFLAGS="-g -O2"
1987   else
1988     CFLAGS="-g"
1989   fi
1990 else
1991   if test "$GCC" = yes; then
1992     CFLAGS="-O2"
1993   else
1994     CFLAGS=
1995   fi
1996 fi
1997 # Some people use a C++ compiler to compile C.  Since we use `exit',
1998 # in C++ we need to declare it.  In case someone uses the same compiler
1999 # for both compiling C and C++ we need to have the C++ compiler decide
2000 # the declaration of exit, since it's the most demanding environment.
2001 cat >conftest.$ac_ext <<_ACEOF
2002 #ifndef __cplusplus
2003   choke me
2004 #endif
2005 _ACEOF
2006 rm -f conftest.$ac_objext
2007 if { (eval echo "$as_me:2007: \"$ac_compile\"") >&5
2008   (eval $ac_compile) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); } &&
2012          { ac_try='test -s conftest.$ac_objext'
2013   { (eval echo "$as_me:2013: \"$ac_try\"") >&5
2014   (eval $ac_try) 2>&5
2015   ac_status=$?
2016   echo "$as_me:2016: \$? = $ac_status" >&5
2017   (exit $ac_status); }; }; then
2018   for ac_declaration in \
2019    ''\
2020    '#include <stdlib.h>' \
2021    'extern "C" void std::exit (int) throw (); using std::exit;' \
2022    'extern "C" void std::exit (int); using std::exit;' \
2023    'extern "C" void exit (int) throw ();' \
2024    'extern "C" void exit (int);' \
2025    'void exit (int);'
2026 do
2027   cat >conftest.$ac_ext <<_ACEOF
2028 #line 2028 "configure"
2029 #include "confdefs.h"
2030 #include <stdlib.h>
2031 $ac_declaration
2032 int
2033 main ()
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   :
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 continue
2057 fi
2058 rm -f conftest.$ac_objext conftest.$ac_ext
2059   cat >conftest.$ac_ext <<_ACEOF
2060 #line 2060 "configure"
2061 #include "confdefs.h"
2062 $ac_declaration
2063 int
2064 main ()
2065 {
2066 exit (42);
2067   ;
2068   return 0;
2069 }
2070 _ACEOF
2071 rm -f conftest.$ac_objext
2072 if { (eval echo "$as_me:2072: \"$ac_compile\"") >&5
2073   (eval $ac_compile) 2>&5
2074   ac_status=$?
2075   echo "$as_me:2075: \$? = $ac_status" >&5
2076   (exit $ac_status); } &&
2077          { ac_try='test -s conftest.$ac_objext'
2078   { (eval echo "$as_me:2078: \"$ac_try\"") >&5
2079   (eval $ac_try) 2>&5
2080   ac_status=$?
2081   echo "$as_me:2081: \$? = $ac_status" >&5
2082   (exit $ac_status); }; }; then
2083   break
2084 else
2085   echo "$as_me: failed program was:" >&5
2086 cat conftest.$ac_ext >&5
2087 fi
2088 rm -f conftest.$ac_objext conftest.$ac_ext
2089 done
2090 rm -rf conftest*
2091 if test -n "$ac_declaration"; then
2092   echo '#ifdef __cplusplus' >>confdefs.h
2093   echo $ac_declaration      >>confdefs.h
2094   echo '#endif'             >>confdefs.h
2095 fi
2096
2097 else
2098   echo "$as_me: failed program was:" >&5
2099 cat conftest.$ac_ext >&5
2100 fi
2101 rm -f conftest.$ac_objext conftest.$ac_ext
2102 ac_ext=c
2103 ac_cpp='$CPP $CPPFLAGS'
2104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2107 ac_main_return=return
2108
2109 GCC_VERSION=none
2110 if test "$GCC" = yes ; then
2111         echo "$as_me:2111: checking version of $CC" >&5
2112 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2113         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2114         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2115         echo "$as_me:2115: result: $GCC_VERSION" >&5
2116 echo "${ECHO_T}$GCC_VERSION" >&6
2117 fi
2118
2119 ac_ext=c
2120 ac_cpp='$CPP $CPPFLAGS'
2121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2124 ac_main_return=return
2125 echo "$as_me:2125: checking how to run the C preprocessor" >&5
2126 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2127 # On Suns, sometimes $CPP names a directory.
2128 if test -n "$CPP" && test -d "$CPP"; then
2129   CPP=
2130 fi
2131 if test -z "$CPP"; then
2132   if test "${ac_cv_prog_CPP+set}" = set; then
2133   echo $ECHO_N "(cached) $ECHO_C" >&6
2134 else
2135       # Double quotes because CPP needs to be expanded
2136     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2137     do
2138       ac_preproc_ok=false
2139 for ac_c_preproc_warn_flag in '' yes
2140 do
2141   # Use a header file that comes with gcc, so configuring glibc
2142   # with a fresh cross-compiler works.
2143   # On the NeXT, cc -E runs the code through the compiler's parser,
2144   # not just through cpp. "Syntax error" is here to catch this case.
2145   cat >conftest.$ac_ext <<_ACEOF
2146 #line 2146 "configure"
2147 #include "confdefs.h"
2148 #include <assert.h>
2149                      Syntax error
2150 _ACEOF
2151 if { (eval echo "$as_me:2151: \"$ac_cpp conftest.$ac_ext\"") >&5
2152   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2153   ac_status=$?
2154   egrep -v '^ *\+' conftest.er1 >conftest.err
2155   rm -f conftest.er1
2156   cat conftest.err >&5
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); } >/dev/null; then
2159   if test -s conftest.err; then
2160     ac_cpp_err=$ac_c_preproc_warn_flag
2161   else
2162     ac_cpp_err=
2163   fi
2164 else
2165   ac_cpp_err=yes
2166 fi
2167 if test -z "$ac_cpp_err"; then
2168   :
2169 else
2170   echo "$as_me: failed program was:" >&5
2171   cat conftest.$ac_ext >&5
2172   # Broken: fails on valid input.
2173 continue
2174 fi
2175 rm -f conftest.err conftest.$ac_ext
2176
2177   # OK, works on sane cases.  Now check whether non-existent headers
2178   # can be detected and how.
2179   cat >conftest.$ac_ext <<_ACEOF
2180 #line 2180 "configure"
2181 #include "confdefs.h"
2182 #include <ac_nonexistent.h>
2183 _ACEOF
2184 if { (eval echo "$as_me:2184: \"$ac_cpp conftest.$ac_ext\"") >&5
2185   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2186   ac_status=$?
2187   egrep -v '^ *\+' conftest.er1 >conftest.err
2188   rm -f conftest.er1
2189   cat conftest.err >&5
2190   echo "$as_me:2190: \$? = $ac_status" >&5
2191   (exit $ac_status); } >/dev/null; then
2192   if test -s conftest.err; then
2193     ac_cpp_err=$ac_c_preproc_warn_flag
2194   else
2195     ac_cpp_err=
2196   fi
2197 else
2198   ac_cpp_err=yes
2199 fi
2200 if test -z "$ac_cpp_err"; then
2201   # Broken: success on invalid input.
2202 continue
2203 else
2204   echo "$as_me: failed program was:" >&5
2205   cat conftest.$ac_ext >&5
2206   # Passes both tests.
2207 ac_preproc_ok=:
2208 break
2209 fi
2210 rm -f conftest.err conftest.$ac_ext
2211
2212 done
2213 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2214 rm -f conftest.err conftest.$ac_ext
2215 if $ac_preproc_ok; then
2216   break
2217 fi
2218
2219     done
2220     ac_cv_prog_CPP=$CPP
2221
2222 fi
2223   CPP=$ac_cv_prog_CPP
2224 else
2225   ac_cv_prog_CPP=$CPP
2226 fi
2227 echo "$as_me:2227: result: $CPP" >&5
2228 echo "${ECHO_T}$CPP" >&6
2229 ac_preproc_ok=false
2230 for ac_c_preproc_warn_flag in '' yes
2231 do
2232   # Use a header file that comes with gcc, so configuring glibc
2233   # with a fresh cross-compiler works.
2234   # On the NeXT, cc -E runs the code through the compiler's parser,
2235   # not just through cpp. "Syntax error" is here to catch this case.
2236   cat >conftest.$ac_ext <<_ACEOF
2237 #line 2237 "configure"
2238 #include "confdefs.h"
2239 #include <assert.h>
2240                      Syntax error
2241 _ACEOF
2242 if { (eval echo "$as_me:2242: \"$ac_cpp conftest.$ac_ext\"") >&5
2243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2244   ac_status=$?
2245   egrep -v '^ *\+' conftest.er1 >conftest.err
2246   rm -f conftest.er1
2247   cat conftest.err >&5
2248   echo "$as_me:2248: \$? = $ac_status" >&5
2249   (exit $ac_status); } >/dev/null; then
2250   if test -s conftest.err; then
2251     ac_cpp_err=$ac_c_preproc_warn_flag
2252   else
2253     ac_cpp_err=
2254   fi
2255 else
2256   ac_cpp_err=yes
2257 fi
2258 if test -z "$ac_cpp_err"; then
2259   :
2260 else
2261   echo "$as_me: failed program was:" >&5
2262   cat conftest.$ac_ext >&5
2263   # Broken: fails on valid input.
2264 continue
2265 fi
2266 rm -f conftest.err conftest.$ac_ext
2267
2268   # OK, works on sane cases.  Now check whether non-existent headers
2269   # can be detected and how.
2270   cat >conftest.$ac_ext <<_ACEOF
2271 #line 2271 "configure"
2272 #include "confdefs.h"
2273 #include <ac_nonexistent.h>
2274 _ACEOF
2275 if { (eval echo "$as_me:2275: \"$ac_cpp conftest.$ac_ext\"") >&5
2276   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2277   ac_status=$?
2278   egrep -v '^ *\+' conftest.er1 >conftest.err
2279   rm -f conftest.er1
2280   cat conftest.err >&5
2281   echo "$as_me:2281: \$? = $ac_status" >&5
2282   (exit $ac_status); } >/dev/null; then
2283   if test -s conftest.err; then
2284     ac_cpp_err=$ac_c_preproc_warn_flag
2285   else
2286     ac_cpp_err=
2287   fi
2288 else
2289   ac_cpp_err=yes
2290 fi
2291 if test -z "$ac_cpp_err"; then
2292   # Broken: success on invalid input.
2293 continue
2294 else
2295   echo "$as_me: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   # Passes both tests.
2298 ac_preproc_ok=:
2299 break
2300 fi
2301 rm -f conftest.err conftest.$ac_ext
2302
2303 done
2304 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2305 rm -f conftest.err conftest.$ac_ext
2306 if $ac_preproc_ok; then
2307   :
2308 else
2309   { { echo "$as_me:2309: error: C preprocessor \"$CPP\" fails sanity check" >&5
2310 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2311    { (exit 1); exit 1; }; }
2312 fi
2313
2314 ac_ext=c
2315 ac_cpp='$CPP $CPPFLAGS'
2316 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2317 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2318 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2319 ac_main_return=return
2320
2321 if test $ac_cv_c_compiler_gnu = yes; then
2322     echo "$as_me:2322: checking whether $CC needs -traditional" >&5
2323 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2324 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2325   echo $ECHO_N "(cached) $ECHO_C" >&6
2326 else
2327     ac_pattern="Autoconf.*'x'"
2328   cat >conftest.$ac_ext <<_ACEOF
2329 #line 2329 "configure"
2330 #include "confdefs.h"
2331 #include <sgtty.h>
2332 int Autoconf = TIOCGETP;
2333 _ACEOF
2334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2335   egrep "$ac_pattern" >/dev/null 2>&1; then
2336   ac_cv_prog_gcc_traditional=yes
2337 else
2338   ac_cv_prog_gcc_traditional=no
2339 fi
2340 rm -rf conftest*
2341
2342   if test $ac_cv_prog_gcc_traditional = no; then
2343     cat >conftest.$ac_ext <<_ACEOF
2344 #line 2344 "configure"
2345 #include "confdefs.h"
2346 #include <termio.h>
2347 int Autoconf = TCGETA;
2348 _ACEOF
2349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2350   egrep "$ac_pattern" >/dev/null 2>&1; then
2351   ac_cv_prog_gcc_traditional=yes
2352 fi
2353 rm -rf conftest*
2354
2355   fi
2356 fi
2357 echo "$as_me:2357: result: $ac_cv_prog_gcc_traditional" >&5
2358 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2359   if test $ac_cv_prog_gcc_traditional = yes; then
2360     CC="$CC -traditional"
2361   fi
2362 fi
2363
2364 echo "$as_me:2364: checking whether $CC understands -c and -o together" >&5
2365 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2366 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2367   echo $ECHO_N "(cached) $ECHO_C" >&6
2368 else
2369
2370 cat > conftest.$ac_ext <<CF_EOF
2371 #include <stdio.h>
2372 int main()
2373 {
2374         ${cf_cv_main_return:-return}(0);
2375 }
2376 CF_EOF
2377 # We do the test twice because some compilers refuse to overwrite an
2378 # existing .o file with -o, though they will create one.
2379 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2380 if { (eval echo "$as_me:2380: \"$ac_try\"") >&5
2381   (eval $ac_try) 2>&5
2382   ac_status=$?
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); } &&
2385   test -f conftest2.$ac_objext && { (eval echo "$as_me:2385: \"$ac_try\"") >&5
2386   (eval $ac_try) 2>&5
2387   ac_status=$?
2388   echo "$as_me:2388: \$? = $ac_status" >&5
2389   (exit $ac_status); };
2390 then
2391   eval cf_cv_prog_CC_c_o=yes
2392 else
2393   eval cf_cv_prog_CC_c_o=no
2394 fi
2395 rm -rf conftest*
2396
2397 fi
2398 if test $cf_cv_prog_CC_c_o = yes; then
2399   echo "$as_me:2399: result: yes" >&5
2400 echo "${ECHO_T}yes" >&6
2401 else
2402   echo "$as_me:2402: result: no" >&5
2403 echo "${ECHO_T}no" >&6
2404 fi
2405
2406 echo "$as_me:2406: checking for POSIXized ISC" >&5
2407 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2408 if test -d /etc/conf/kconfig.d &&
2409    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2410 then
2411   echo "$as_me:2411: result: yes" >&5
2412 echo "${ECHO_T}yes" >&6
2413   ISC=yes # If later tests want to check for ISC.
2414
2415 cat >>confdefs.h <<\EOF
2416 #define _POSIX_SOURCE 1
2417 EOF
2418
2419   if test "$GCC" = yes; then
2420     CC="$CC -posix"
2421   else
2422     CC="$CC -Xp"
2423   fi
2424 else
2425   echo "$as_me:2425: result: no" >&5
2426 echo "${ECHO_T}no" >&6
2427   ISC=
2428 fi
2429
2430 # This should have been defined by AC_PROG_CC
2431 : ${CC:=cc}
2432
2433 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2434 # into CC.  This will not help with broken scripts that wrap the compiler with
2435 # options, but eliminates a more common category of user confusion.
2436 echo "$as_me:2436: checking \$CC variable" >&5
2437 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2438 case "$CC" in #(vi
2439 *[\ \   ]-[IUD]*)
2440         echo "$as_me:2440: result: broken" >&5
2441 echo "${ECHO_T}broken" >&6
2442         { echo "$as_me:2442: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2443 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2444         # humor him...
2445         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2446         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2447
2448 cf_fix_cppflags=no
2449 cf_new_cflags=
2450 cf_new_cppflags=
2451 cf_new_extra_cppflags=
2452
2453 for cf_add_cflags in $cf_flags
2454 do
2455 case $cf_fix_cppflags in
2456 no)
2457         case $cf_add_cflags in #(vi
2458         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2459                 case $cf_add_cflags in
2460                 -D*)
2461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2462
2463                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2464                                 && test -z "${cf_tst_cflags}" \
2465                                 && cf_fix_cppflags=yes
2466
2467                         if test $cf_fix_cppflags = yes ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         elif test "${cf_tst_cflags}" = "\"'" ; then
2471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2472                                 continue
2473                         fi
2474                         ;;
2475                 esac
2476                 case "$CPPFLAGS" in
2477                 *$cf_add_cflags) #(vi
2478                         ;;
2479                 *) #(vi
2480                         case $cf_add_cflags in #(vi
2481                         -D*)
2482                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2483
2484 CPPFLAGS=`echo "$CPPFLAGS" | \
2485         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2486                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2487
2488                                 ;;
2489                         esac
2490                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2491                         ;;
2492                 esac
2493                 ;;
2494         *)
2495                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2496                 ;;
2497         esac
2498         ;;
2499 yes)
2500         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2501
2502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2503
2504         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2505                 && test -z "${cf_tst_cflags}" \
2506                 && cf_fix_cppflags=no
2507         ;;
2508 esac
2509 done
2510
2511 if test -n "$cf_new_cflags" ; then
2512
2513         CFLAGS="$CFLAGS $cf_new_cflags"
2514 fi
2515
2516 if test -n "$cf_new_cppflags" ; then
2517
2518         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2519 fi
2520
2521 if test -n "$cf_new_extra_cppflags" ; then
2522
2523         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2524 fi
2525
2526         ;;
2527 *)
2528         echo "$as_me:2528: result: ok" >&5
2529 echo "${ECHO_T}ok" >&6
2530         ;;
2531 esac
2532
2533 echo "$as_me:2533: checking for ${CC:-cc} option to accept ANSI C" >&5
2534 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2535 if test "${cf_cv_ansi_cc+set}" = set; then
2536   echo $ECHO_N "(cached) $ECHO_C" >&6
2537 else
2538
2539 cf_cv_ansi_cc=no
2540 cf_save_CFLAGS="$CFLAGS"
2541 cf_save_CPPFLAGS="$CPPFLAGS"
2542 # Don't try gcc -ansi; that turns off useful extensions and
2543 # breaks some systems' header files.
2544 # AIX                   -qlanglvl=ansi
2545 # Ultrix and OSF/1      -std1
2546 # HP-UX                 -Aa -D_HPUX_SOURCE
2547 # SVR4                  -Xc
2548 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2549 for cf_arg in "-DCC_HAS_PROTOS" \
2550         "" \
2551         -qlanglvl=ansi \
2552         -std1 \
2553         -Ae \
2554         "-Aa -D_HPUX_SOURCE" \
2555         -Xc
2556 do
2557
2558 cf_fix_cppflags=no
2559 cf_new_cflags=
2560 cf_new_cppflags=
2561 cf_new_extra_cppflags=
2562
2563 for cf_add_cflags in $cf_arg
2564 do
2565 case $cf_fix_cppflags in
2566 no)
2567         case $cf_add_cflags in #(vi
2568         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2569                 case $cf_add_cflags in
2570                 -D*)
2571                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2572
2573                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2574                                 && test -z "${cf_tst_cflags}" \
2575                                 && cf_fix_cppflags=yes
2576
2577                         if test $cf_fix_cppflags = yes ; then
2578                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2579                                 continue
2580                         elif test "${cf_tst_cflags}" = "\"'" ; then
2581                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2582                                 continue
2583                         fi
2584                         ;;
2585                 esac
2586                 case "$CPPFLAGS" in
2587                 *$cf_add_cflags) #(vi
2588                         ;;
2589                 *) #(vi
2590                         case $cf_add_cflags in #(vi
2591                         -D*)
2592                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2593
2594 CPPFLAGS=`echo "$CPPFLAGS" | \
2595         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2596                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2597
2598                                 ;;
2599                         esac
2600                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2601                         ;;
2602                 esac
2603                 ;;
2604         *)
2605                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2606                 ;;
2607         esac
2608         ;;
2609 yes)
2610         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2611
2612         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2613
2614         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2615                 && test -z "${cf_tst_cflags}" \
2616                 && cf_fix_cppflags=no
2617         ;;
2618 esac
2619 done
2620
2621 if test -n "$cf_new_cflags" ; then
2622
2623         CFLAGS="$CFLAGS $cf_new_cflags"
2624 fi
2625
2626 if test -n "$cf_new_cppflags" ; then
2627
2628         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2629 fi
2630
2631 if test -n "$cf_new_extra_cppflags" ; then
2632
2633         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2634 fi
2635
2636         cat >conftest.$ac_ext <<_ACEOF
2637 #line 2637 "configure"
2638 #include "confdefs.h"
2639
2640 #ifndef CC_HAS_PROTOS
2641 #if !defined(__STDC__) || (__STDC__ != 1)
2642 choke me
2643 #endif
2644 #endif
2645
2646 int
2647 main ()
2648 {
2649
2650         int test (int i, double x);
2651         struct s1 {int (*f) (int a);};
2652         struct s2 {int (*f) (double a);};
2653   ;
2654   return 0;
2655 }
2656 _ACEOF
2657 rm -f conftest.$ac_objext
2658 if { (eval echo "$as_me:2658: \"$ac_compile\"") >&5
2659   (eval $ac_compile) 2>&5
2660   ac_status=$?
2661   echo "$as_me:2661: \$? = $ac_status" >&5
2662   (exit $ac_status); } &&
2663          { ac_try='test -s conftest.$ac_objext'
2664   { (eval echo "$as_me:2664: \"$ac_try\"") >&5
2665   (eval $ac_try) 2>&5
2666   ac_status=$?
2667   echo "$as_me:2667: \$? = $ac_status" >&5
2668   (exit $ac_status); }; }; then
2669   cf_cv_ansi_cc="$cf_arg"; break
2670 else
2671   echo "$as_me: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
2673 fi
2674 rm -f conftest.$ac_objext conftest.$ac_ext
2675 done
2676 CFLAGS="$cf_save_CFLAGS"
2677 CPPFLAGS="$cf_save_CPPFLAGS"
2678
2679 fi
2680 echo "$as_me:2680: result: $cf_cv_ansi_cc" >&5
2681 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2682
2683 if test "$cf_cv_ansi_cc" != "no"; then
2684 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2685
2686 cf_fix_cppflags=no
2687 cf_new_cflags=
2688 cf_new_cppflags=
2689 cf_new_extra_cppflags=
2690
2691 for cf_add_cflags in $cf_cv_ansi_cc
2692 do
2693 case $cf_fix_cppflags in
2694 no)
2695         case $cf_add_cflags in #(vi
2696         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2697                 case $cf_add_cflags in
2698                 -D*)
2699                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2700
2701                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2702                                 && test -z "${cf_tst_cflags}" \
2703                                 && cf_fix_cppflags=yes
2704
2705                         if test $cf_fix_cppflags = yes ; then
2706                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2707                                 continue
2708                         elif test "${cf_tst_cflags}" = "\"'" ; then
2709                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2710                                 continue
2711                         fi
2712                         ;;
2713                 esac
2714                 case "$CPPFLAGS" in
2715                 *$cf_add_cflags) #(vi
2716                         ;;
2717                 *) #(vi
2718                         case $cf_add_cflags in #(vi
2719                         -D*)
2720                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2721
2722 CPPFLAGS=`echo "$CPPFLAGS" | \
2723         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2724                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2725
2726                                 ;;
2727                         esac
2728                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2729                         ;;
2730                 esac
2731                 ;;
2732         *)
2733                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2734                 ;;
2735         esac
2736         ;;
2737 yes)
2738         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2739
2740         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2741
2742         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2743                 && test -z "${cf_tst_cflags}" \
2744                 && cf_fix_cppflags=no
2745         ;;
2746 esac
2747 done
2748
2749 if test -n "$cf_new_cflags" ; then
2750
2751         CFLAGS="$CFLAGS $cf_new_cflags"
2752 fi
2753
2754 if test -n "$cf_new_cppflags" ; then
2755
2756         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2757 fi
2758
2759 if test -n "$cf_new_extra_cppflags" ; then
2760
2761         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2762 fi
2763
2764 else
2765         cat >>confdefs.h <<\EOF
2766 #define CC_HAS_PROTOS 1
2767 EOF
2768
2769 fi
2770 fi
2771
2772 if test "$cf_cv_ansi_cc" = "no"; then
2773         { { echo "$as_me:2773: error: Your compiler does not appear to recognize prototypes.
2774 You have the following choices:
2775         a. adjust your compiler options
2776         b. get an up-to-date compiler
2777         c. use a wrapper such as unproto" >&5
2778 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2779 You have the following choices:
2780         a. adjust your compiler options
2781         b. get an up-to-date compiler
2782         c. use a wrapper such as unproto" >&2;}
2783    { (exit 1); exit 1; }; }
2784 fi
2785
2786 case $cf_cv_system_name in
2787 os2*)
2788     CFLAGS="$CFLAGS -Zmt"
2789     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2790     CXXFLAGS="$CXXFLAGS -Zmt"
2791     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2792     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2793     ac_cv_exeext=.exe
2794     ;;
2795 esac
2796
2797 PROG_EXT="$EXEEXT"
2798
2799 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2800 #define PROG_EXT "$PROG_EXT"
2801 EOF
2802
2803 if test "$cross_compiling" = yes ; then
2804   LDCONFIG=:
2805 else
2806 case "$cf_cv_system_name" in #(vi
2807 dragonfly*|mirbsd*|freebsd*) #(vi
2808   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2809   ;;
2810 *) LDPATH=$PATH:/sbin:/usr/sbin
2811   # Extract the first word of "ldconfig", so it can be a program name with args.
2812 set dummy ldconfig; ac_word=$2
2813 echo "$as_me:2813: checking for $ac_word" >&5
2814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2815 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2816   echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818   case $LDCONFIG in
2819   [\\/]* | ?:[\\/]*)
2820   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2821   ;;
2822   *)
2823   ac_save_IFS=$IFS; IFS=$ac_path_separator
2824 ac_dummy="$LDPATH"
2825 for ac_dir in $ac_dummy; do
2826   IFS=$ac_save_IFS
2827   test -z "$ac_dir" && ac_dir=.
2828   if $as_executable_p "$ac_dir/$ac_word"; then
2829    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2830    echo "$as_me:2830: found $ac_dir/$ac_word" >&5
2831    break
2832 fi
2833 done
2834
2835   ;;
2836 esac
2837 fi
2838 LDCONFIG=$ac_cv_path_LDCONFIG
2839
2840 if test -n "$LDCONFIG"; then
2841   echo "$as_me:2841: result: $LDCONFIG" >&5
2842 echo "${ECHO_T}$LDCONFIG" >&6
2843 else
2844   echo "$as_me:2844: result: no" >&5
2845 echo "${ECHO_T}no" >&6
2846 fi
2847
2848   ;;
2849 esac
2850 fi
2851
2852 echo "$as_me:2852: checking if you want to ensure bool is consistent with C++" >&5
2853 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2854
2855 # Check whether --with-cxx or --without-cxx was given.
2856 if test "${with_cxx+set}" = set; then
2857   withval="$with_cxx"
2858   cf_with_cxx=$withval
2859 else
2860   cf_with_cxx=yes
2861 fi;
2862 echo "$as_me:2862: result: $cf_with_cxx" >&5
2863 echo "${ECHO_T}$cf_with_cxx" >&6
2864 if test "X$cf_with_cxx" = Xno ; then
2865         CXX=""
2866         GXX=""
2867 else
2868         # with autoconf 2.13, we can change the error to a warning:
2869                 ac_ext=cc
2870 ac_cpp='$CXXCPP $CPPFLAGS'
2871 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2872 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2873 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2874 ac_main_return=return
2875 if test -n "$ac_tool_prefix"; then
2876   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2877   do
2878     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2879 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2880 echo "$as_me:2880: checking for $ac_word" >&5
2881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2882 if test "${ac_cv_prog_CXX+set}" = set; then
2883   echo $ECHO_N "(cached) $ECHO_C" >&6
2884 else
2885   if test -n "$CXX"; then
2886   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2887 else
2888   ac_save_IFS=$IFS; IFS=$ac_path_separator
2889 ac_dummy="$PATH"
2890 for ac_dir in $ac_dummy; do
2891   IFS=$ac_save_IFS
2892   test -z "$ac_dir" && ac_dir=.
2893   $as_executable_p "$ac_dir/$ac_word" || continue
2894 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2895 echo "$as_me:2895: found $ac_dir/$ac_word" >&5
2896 break
2897 done
2898
2899 fi
2900 fi
2901 CXX=$ac_cv_prog_CXX
2902 if test -n "$CXX"; then
2903   echo "$as_me:2903: result: $CXX" >&5
2904 echo "${ECHO_T}$CXX" >&6
2905 else
2906   echo "$as_me:2906: result: no" >&5
2907 echo "${ECHO_T}no" >&6
2908 fi
2909
2910     test -n "$CXX" && break
2911   done
2912 fi
2913 if test -z "$CXX"; then
2914   ac_ct_CXX=$CXX
2915   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2916 do
2917   # Extract the first word of "$ac_prog", so it can be a program name with args.
2918 set dummy $ac_prog; ac_word=$2
2919 echo "$as_me:2919: checking for $ac_word" >&5
2920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2921 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2922   echo $ECHO_N "(cached) $ECHO_C" >&6
2923 else
2924   if test -n "$ac_ct_CXX"; then
2925   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2926 else
2927   ac_save_IFS=$IFS; IFS=$ac_path_separator
2928 ac_dummy="$PATH"
2929 for ac_dir in $ac_dummy; do
2930   IFS=$ac_save_IFS
2931   test -z "$ac_dir" && ac_dir=.
2932   $as_executable_p "$ac_dir/$ac_word" || continue
2933 ac_cv_prog_ac_ct_CXX="$ac_prog"
2934 echo "$as_me:2934: found $ac_dir/$ac_word" >&5
2935 break
2936 done
2937
2938 fi
2939 fi
2940 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2941 if test -n "$ac_ct_CXX"; then
2942   echo "$as_me:2942: result: $ac_ct_CXX" >&5
2943 echo "${ECHO_T}$ac_ct_CXX" >&6
2944 else
2945   echo "$as_me:2945: result: no" >&5
2946 echo "${ECHO_T}no" >&6
2947 fi
2948
2949   test -n "$ac_ct_CXX" && break
2950 done
2951 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2952
2953   CXX=$ac_ct_CXX
2954 fi
2955
2956 # Provide some information about the compiler.
2957 echo "$as_me:2957:" \
2958      "checking for C++ compiler version" >&5
2959 ac_compiler=`set X $ac_compile; echo $2`
2960 { (eval echo "$as_me:2960: \"$ac_compiler --version </dev/null >&5\"") >&5
2961   (eval $ac_compiler --version </dev/null >&5) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); }
2965 { (eval echo "$as_me:2965: \"$ac_compiler -v </dev/null >&5\"") >&5
2966   (eval $ac_compiler -v </dev/null >&5) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); }
2970 { (eval echo "$as_me:2970: \"$ac_compiler -V </dev/null >&5\"") >&5
2971   (eval $ac_compiler -V </dev/null >&5) 2>&5
2972   ac_status=$?
2973   echo "$as_me:2973: \$? = $ac_status" >&5
2974   (exit $ac_status); }
2975
2976 echo "$as_me:2976: checking whether we are using the GNU C++ compiler" >&5
2977 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2978 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2979   echo $ECHO_N "(cached) $ECHO_C" >&6
2980 else
2981   cat >conftest.$ac_ext <<_ACEOF
2982 #line 2982 "configure"
2983 #include "confdefs.h"
2984
2985 int
2986 main ()
2987 {
2988 #ifndef __GNUC__
2989        choke me
2990 #endif
2991
2992   ;
2993   return 0;
2994 }
2995 _ACEOF
2996 rm -f conftest.$ac_objext
2997 if { (eval echo "$as_me:2997: \"$ac_compile\"") >&5
2998   (eval $ac_compile) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); } &&
3002          { ac_try='test -s conftest.$ac_objext'
3003   { (eval echo "$as_me:3003: \"$ac_try\"") >&5
3004   (eval $ac_try) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); }; }; then
3008   ac_compiler_gnu=yes
3009 else
3010   echo "$as_me: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3012 ac_compiler_gnu=no
3013 fi
3014 rm -f conftest.$ac_objext conftest.$ac_ext
3015 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3016
3017 fi
3018 echo "$as_me:3018: result: $ac_cv_cxx_compiler_gnu" >&5
3019 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3020 GXX=`test $ac_compiler_gnu = yes && echo yes`
3021 ac_test_CXXFLAGS=${CXXFLAGS+set}
3022 ac_save_CXXFLAGS=$CXXFLAGS
3023 CXXFLAGS="-g"
3024 echo "$as_me:3024: checking whether $CXX accepts -g" >&5
3025 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3026 if test "${ac_cv_prog_cxx_g+set}" = set; then
3027   echo $ECHO_N "(cached) $ECHO_C" >&6
3028 else
3029   cat >conftest.$ac_ext <<_ACEOF
3030 #line 3030 "configure"
3031 #include "confdefs.h"
3032
3033 int
3034 main ()
3035 {
3036
3037   ;
3038   return 0;
3039 }
3040 _ACEOF
3041 rm -f conftest.$ac_objext
3042 if { (eval echo "$as_me:3042: \"$ac_compile\"") >&5
3043   (eval $ac_compile) 2>&5
3044   ac_status=$?
3045   echo "$as_me:3045: \$? = $ac_status" >&5
3046   (exit $ac_status); } &&
3047          { ac_try='test -s conftest.$ac_objext'
3048   { (eval echo "$as_me:3048: \"$ac_try\"") >&5
3049   (eval $ac_try) 2>&5
3050   ac_status=$?
3051   echo "$as_me:3051: \$? = $ac_status" >&5
3052   (exit $ac_status); }; }; then
3053   ac_cv_prog_cxx_g=yes
3054 else
3055   echo "$as_me: failed program was:" >&5
3056 cat conftest.$ac_ext >&5
3057 ac_cv_prog_cxx_g=no
3058 fi
3059 rm -f conftest.$ac_objext conftest.$ac_ext
3060 fi
3061 echo "$as_me:3061: result: $ac_cv_prog_cxx_g" >&5
3062 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3063 if test "$ac_test_CXXFLAGS" = set; then
3064   CXXFLAGS=$ac_save_CXXFLAGS
3065 elif test $ac_cv_prog_cxx_g = yes; then
3066   if test "$GXX" = yes; then
3067     CXXFLAGS="-g -O2"
3068   else
3069     CXXFLAGS="-g"
3070   fi
3071 else
3072   if test "$GXX" = yes; then
3073     CXXFLAGS="-O2"
3074   else
3075     CXXFLAGS=
3076   fi
3077 fi
3078 for ac_declaration in \
3079    ''\
3080    '#include <stdlib.h>' \
3081    'extern "C" void std::exit (int) throw (); using std::exit;' \
3082    'extern "C" void std::exit (int); using std::exit;' \
3083    'extern "C" void exit (int) throw ();' \
3084    'extern "C" void exit (int);' \
3085    'void exit (int);'
3086 do
3087   cat >conftest.$ac_ext <<_ACEOF
3088 #line 3088 "configure"
3089 #include "confdefs.h"
3090 #include <stdlib.h>
3091 $ac_declaration
3092 int
3093 main ()
3094 {
3095 exit (42);
3096   ;
3097   return 0;
3098 }
3099 _ACEOF
3100 rm -f conftest.$ac_objext
3101 if { (eval echo "$as_me:3101: \"$ac_compile\"") >&5
3102   (eval $ac_compile) 2>&5
3103   ac_status=$?
3104   echo "$as_me:3104: \$? = $ac_status" >&5
3105   (exit $ac_status); } &&
3106          { ac_try='test -s conftest.$ac_objext'
3107   { (eval echo "$as_me:3107: \"$ac_try\"") >&5
3108   (eval $ac_try) 2>&5
3109   ac_status=$?
3110   echo "$as_me:3110: \$? = $ac_status" >&5
3111   (exit $ac_status); }; }; then
3112   :
3113 else
3114   echo "$as_me: failed program was:" >&5
3115 cat conftest.$ac_ext >&5
3116 continue
3117 fi
3118 rm -f conftest.$ac_objext conftest.$ac_ext
3119   cat >conftest.$ac_ext <<_ACEOF
3120 #line 3120 "configure"
3121 #include "confdefs.h"
3122 $ac_declaration
3123 int
3124 main ()
3125 {
3126 exit (42);
3127   ;
3128   return 0;
3129 }
3130 _ACEOF
3131 rm -f conftest.$ac_objext
3132 if { (eval echo "$as_me:3132: \"$ac_compile\"") >&5
3133   (eval $ac_compile) 2>&5
3134   ac_status=$?
3135   echo "$as_me:3135: \$? = $ac_status" >&5
3136   (exit $ac_status); } &&
3137          { ac_try='test -s conftest.$ac_objext'
3138   { (eval echo "$as_me:3138: \"$ac_try\"") >&5
3139   (eval $ac_try) 2>&5
3140   ac_status=$?
3141   echo "$as_me:3141: \$? = $ac_status" >&5
3142   (exit $ac_status); }; }; then
3143   break
3144 else
3145   echo "$as_me: failed program was:" >&5
3146 cat conftest.$ac_ext >&5
3147 fi
3148 rm -f conftest.$ac_objext conftest.$ac_ext
3149 done
3150 rm -rf conftest*
3151 if test -n "$ac_declaration"; then
3152   echo '#ifdef __cplusplus' >>confdefs.h
3153   echo $ac_declaration      >>confdefs.h
3154   echo '#endif'             >>confdefs.h
3155 fi
3156
3157 ac_ext=c
3158 ac_cpp='$CPP $CPPFLAGS'
3159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3162 ac_main_return=return
3163
3164                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3165         if test "$CXX" = "g++" ; then
3166                 # Extract the first word of "g++", so it can be a program name with args.
3167 set dummy g++; ac_word=$2
3168 echo "$as_me:3168: checking for $ac_word" >&5
3169 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3170 if test "${ac_cv_path_CXX+set}" = set; then
3171   echo $ECHO_N "(cached) $ECHO_C" >&6
3172 else
3173   case $CXX in
3174   [\\/]* | ?:[\\/]*)
3175   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3176   ;;
3177   *)
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   if $as_executable_p "$ac_dir/$ac_word"; then
3184    ac_cv_path_CXX="$ac_dir/$ac_word"
3185    echo "$as_me:3185: found $ac_dir/$ac_word" >&5
3186    break
3187 fi
3188 done
3189
3190   ;;
3191 esac
3192 fi
3193 CXX=$ac_cv_path_CXX
3194
3195 if test -n "$CXX"; then
3196   echo "$as_me:3196: result: $CXX" >&5
3197 echo "${ECHO_T}$CXX" >&6
3198 else
3199   echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3201 fi
3202
3203         fi
3204         if test "$CXX" = "g++" ; then
3205                 { echo "$as_me:3205: WARNING: ignoring hardcoded g++" >&5
3206 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3207                 cf_with_cxx=no; CXX=""; GXX="";
3208         fi
3209 fi
3210
3211 GXX_VERSION=none
3212 if test "$GXX" = yes; then
3213         echo "$as_me:3213: checking version of g++" >&5
3214 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3215         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3216         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3217         echo "$as_me:3217: result: $GXX_VERSION" >&5
3218 echo "${ECHO_T}$GXX_VERSION" >&6
3219 fi
3220
3221 case $GXX_VERSION in
3222 1*|2.[0-6]*)
3223         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3224         # cf_cxx_library=no
3225         { echo "$as_me:3225: WARNING: templates do not work" >&5
3226 echo "$as_me: WARNING: templates do not work" >&2;}
3227         ;;
3228 esac
3229
3230 echo "$as_me:3230: checking if you want to build C++ binding and demo" >&5
3231 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3232
3233 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3234 if test "${with_cxx_binding+set}" = set; then
3235   withval="$with_cxx_binding"
3236   cf_with_cxx_binding=$withval
3237 else
3238   cf_with_cxx_binding=$cf_with_cxx
3239 fi;
3240 echo "$as_me:3240: result: $cf_with_cxx_binding" >&5
3241 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3242
3243 echo "$as_me:3243: checking if you want to build with Ada95" >&5
3244 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3245
3246 # Check whether --with-ada or --without-ada was given.
3247 if test "${with_ada+set}" = set; then
3248   withval="$with_ada"
3249   cf_with_ada=$withval
3250 else
3251   cf_with_ada=yes
3252 fi;
3253 echo "$as_me:3253: result: $cf_with_ada" >&5
3254 echo "${ECHO_T}$cf_with_ada" >&6
3255
3256 echo "$as_me:3256: checking if you want to install manpages" >&5
3257 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3258
3259 # Check whether --with-manpages or --without-manpages was given.
3260 if test "${with_manpages+set}" = set; then
3261   withval="$with_manpages"
3262   cf_with_manpages=$withval
3263 else
3264   cf_with_manpages=yes
3265 fi;
3266 echo "$as_me:3266: result: $cf_with_manpages" >&5
3267 echo "${ECHO_T}$cf_with_manpages" >&6
3268
3269 echo "$as_me:3269: checking if you want to build programs such as tic" >&5
3270 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3271
3272 # Check whether --with-progs or --without-progs was given.
3273 if test "${with_progs+set}" = set; then
3274   withval="$with_progs"
3275   cf_with_progs=$withval
3276 else
3277   cf_with_progs=yes
3278 fi;
3279 echo "$as_me:3279: result: $cf_with_progs" >&5
3280 echo "${ECHO_T}$cf_with_progs" >&6
3281
3282 echo "$as_me:3282: checking if you want to build test-programs" >&5
3283 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3284
3285 # Check whether --with-tests or --without-tests was given.
3286 if test "${with_tests+set}" = set; then
3287   withval="$with_tests"
3288   cf_with_tests=$withval
3289 else
3290   cf_with_tests=yes
3291 fi;
3292 echo "$as_me:3292: result: $cf_with_tests" >&5
3293 echo "${ECHO_T}$cf_with_tests" >&6
3294
3295 echo "$as_me:3295: checking if you wish to install curses.h" >&5
3296 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3297
3298 # Check whether --with-curses-h or --without-curses-h was given.
3299 if test "${with_curses_h+set}" = set; then
3300   withval="$with_curses_h"
3301   with_curses_h=$withval
3302 else
3303   with_curses_h=yes
3304 fi;
3305 echo "$as_me:3305: result: $with_curses_h" >&5
3306 echo "${ECHO_T}$with_curses_h" >&6
3307
3308 modules_to_build="ncurses"
3309 if test "X$cf_with_progs" != Xno ; then
3310 modules_to_build="$modules_to_build progs tack"
3311 fi
3312 modules_to_build="$modules_to_build panel menu form"
3313
3314 test "$program_prefix" != NONE &&
3315   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3316 # Use a double $ so make ignores it.
3317 test "$program_suffix" != NONE &&
3318   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3319 # Double any \ or $.  echo might interpret backslashes.
3320 # By default was `s,x,x', remove it if useless.
3321 cat <<\_ACEOF >conftest.sed
3322 s/[\\$]/&&/g;s/;s,x,x,$//
3323 _ACEOF
3324 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3325 rm conftest.sed
3326
3327 for ac_prog in mawk gawk nawk awk
3328 do
3329   # Extract the first word of "$ac_prog", so it can be a program name with args.
3330 set dummy $ac_prog; ac_word=$2
3331 echo "$as_me:3331: checking for $ac_word" >&5
3332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3333 if test "${ac_cv_prog_AWK+set}" = set; then
3334   echo $ECHO_N "(cached) $ECHO_C" >&6
3335 else
3336   if test -n "$AWK"; then
3337   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3338 else
3339   ac_save_IFS=$IFS; IFS=$ac_path_separator
3340 ac_dummy="$PATH"
3341 for ac_dir in $ac_dummy; do
3342   IFS=$ac_save_IFS
3343   test -z "$ac_dir" && ac_dir=.
3344   $as_executable_p "$ac_dir/$ac_word" || continue
3345 ac_cv_prog_AWK="$ac_prog"
3346 echo "$as_me:3346: found $ac_dir/$ac_word" >&5
3347 break
3348 done
3349
3350 fi
3351 fi
3352 AWK=$ac_cv_prog_AWK
3353 if test -n "$AWK"; then
3354   echo "$as_me:3354: result: $AWK" >&5
3355 echo "${ECHO_T}$AWK" >&6
3356 else
3357   echo "$as_me:3357: result: no" >&5
3358 echo "${ECHO_T}no" >&6
3359 fi
3360
3361   test -n "$AWK" && break
3362 done
3363
3364 test -z "$AWK" && { { echo "$as_me:3364: error: No awk program found" >&5
3365 echo "$as_me: error: No awk program found" >&2;}
3366    { (exit 1); exit 1; }; }
3367
3368 echo "$as_me:3368: checking for egrep" >&5
3369 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3370 if test "${ac_cv_prog_egrep+set}" = set; then
3371   echo $ECHO_N "(cached) $ECHO_C" >&6
3372 else
3373   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3374     then ac_cv_prog_egrep='grep -E'
3375     else ac_cv_prog_egrep='egrep'
3376     fi
3377 fi
3378 echo "$as_me:3378: result: $ac_cv_prog_egrep" >&5
3379 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3380  EGREP=$ac_cv_prog_egrep
3381
3382 test -z "$EGREP" && { { echo "$as_me:3382: error: No egrep program found" >&5
3383 echo "$as_me: error: No egrep program found" >&2;}
3384    { (exit 1); exit 1; }; }
3385
3386 # Find a good install program.  We prefer a C program (faster),
3387 # so one script is as good as another.  But avoid the broken or
3388 # incompatible versions:
3389 # SysV /etc/install, /usr/sbin/install
3390 # SunOS /usr/etc/install
3391 # IRIX /sbin/install
3392 # AIX /bin/install
3393 # AmigaOS /C/install, which installs bootblocks on floppy discs
3394 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3395 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3396 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3397 # ./install, which can be erroneously created by make from ./install.sh.
3398 echo "$as_me:3398: checking for a BSD compatible install" >&5
3399 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3400 if test -z "$INSTALL"; then
3401 if test "${ac_cv_path_install+set}" = set; then
3402   echo $ECHO_N "(cached) $ECHO_C" >&6
3403 else
3404     ac_save_IFS=$IFS; IFS=$ac_path_separator
3405   for ac_dir in $PATH; do
3406     IFS=$ac_save_IFS
3407     # Account for people who put trailing slashes in PATH elements.
3408     case $ac_dir/ in
3409     / | ./ | .// | /cC/* \
3410     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3411     | /usr/ucb/* ) ;;
3412     *)
3413       # OSF1 and SCO ODT 3.0 have their own names for install.
3414       # Don't use installbsd from OSF since it installs stuff as root
3415       # by default.
3416       for ac_prog in ginstall scoinst install; do
3417         if $as_executable_p "$ac_dir/$ac_prog"; then
3418           if test $ac_prog = install &&
3419             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3420             # AIX install.  It has an incompatible calling convention.
3421             :
3422           elif test $ac_prog = install &&
3423             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3424             # program-specific install script used by HP pwplus--don't use.
3425             :
3426           else
3427             ac_cv_path_install="$ac_dir/$ac_prog -c"
3428             break 2
3429           fi
3430         fi
3431       done
3432       ;;
3433     esac
3434   done
3435
3436 fi
3437   if test "${ac_cv_path_install+set}" = set; then
3438     INSTALL=$ac_cv_path_install
3439   else
3440     # As a last resort, use the slow shell script.  We don't cache a
3441     # path for INSTALL within a source directory, because that will
3442     # break other packages using the cache if that directory is
3443     # removed, or if the path is relative.
3444     INSTALL=$ac_install_sh
3445   fi
3446 fi
3447 echo "$as_me:3447: result: $INSTALL" >&5
3448 echo "${ECHO_T}$INSTALL" >&6
3449
3450 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3451 # It thinks the first close brace ends the variable substitution.
3452 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3453
3454 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3455
3456 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3457
3458 case $INSTALL in
3459 /*)
3460   ;;
3461 *)
3462   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3463   test -z "$cf_dir" && cf_dir=.
3464   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3465   ;;
3466 esac
3467
3468 for ac_prog in tdlint lint alint splint lclint
3469 do
3470   # Extract the first word of "$ac_prog", so it can be a program name with args.
3471 set dummy $ac_prog; ac_word=$2
3472 echo "$as_me:3472: checking for $ac_word" >&5
3473 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3474 if test "${ac_cv_prog_LINT+set}" = set; then
3475   echo $ECHO_N "(cached) $ECHO_C" >&6
3476 else
3477   if test -n "$LINT"; then
3478   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3479 else
3480   ac_save_IFS=$IFS; IFS=$ac_path_separator
3481 ac_dummy="$PATH"
3482 for ac_dir in $ac_dummy; do
3483   IFS=$ac_save_IFS
3484   test -z "$ac_dir" && ac_dir=.
3485   $as_executable_p "$ac_dir/$ac_word" || continue
3486 ac_cv_prog_LINT="$ac_prog"
3487 echo "$as_me:3487: found $ac_dir/$ac_word" >&5
3488 break
3489 done
3490
3491 fi
3492 fi
3493 LINT=$ac_cv_prog_LINT
3494 if test -n "$LINT"; then
3495   echo "$as_me:3495: result: $LINT" >&5
3496 echo "${ECHO_T}$LINT" >&6
3497 else
3498   echo "$as_me:3498: result: no" >&5
3499 echo "${ECHO_T}no" >&6
3500 fi
3501
3502   test -n "$LINT" && break
3503 done
3504
3505 echo "$as_me:3505: checking whether ln -s works" >&5
3506 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3507 LN_S=$as_ln_s
3508 if test "$LN_S" = "ln -s"; then
3509   echo "$as_me:3509: result: yes" >&5
3510 echo "${ECHO_T}yes" >&6
3511 else
3512   echo "$as_me:3512: result: no, using $LN_S" >&5
3513 echo "${ECHO_T}no, using $LN_S" >&6
3514 fi
3515
3516 echo "$as_me:3516: checking if $LN_S -f options work" >&5
3517 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3518
3519 rm -f conf$$.src conf$$dst
3520 echo >conf$$.dst
3521 echo first >conf$$.src
3522 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3523         cf_prog_ln_sf=yes
3524 else
3525         cf_prog_ln_sf=no
3526 fi
3527 rm -f conf$$.dst conf$$src
3528 echo "$as_me:3528: result: $cf_prog_ln_sf" >&5
3529 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3530
3531 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3532
3533 echo "$as_me:3533: checking for long file names" >&5
3534 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3535 if test "${ac_cv_sys_long_file_names+set}" = set; then
3536   echo $ECHO_N "(cached) $ECHO_C" >&6
3537 else
3538   ac_cv_sys_long_file_names=yes
3539 # Test for long file names in all the places we know might matter:
3540 #      .                the current directory, where building will happen
3541 #      $prefix/lib      where we will be installing things
3542 #      $exec_prefix/lib likewise
3543 # eval it to expand exec_prefix.
3544 #      $TMPDIR          if set, where it might want to write temporary files
3545 # if $TMPDIR is not set:
3546 #      /tmp             where it might want to write temporary files
3547 #      /var/tmp         likewise
3548 #      /usr/tmp         likewise
3549 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3550   ac_tmpdirs=$TMPDIR
3551 else
3552   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3553 fi
3554 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3555   test -d $ac_dir || continue
3556   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3557   ac_xdir=$ac_dir/cf$$
3558   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3559   ac_tf1=$ac_xdir/conftest9012345
3560   ac_tf2=$ac_xdir/conftest9012346
3561   (echo 1 >$ac_tf1) 2>/dev/null
3562   (echo 2 >$ac_tf2) 2>/dev/null
3563   ac_val=`cat $ac_tf1 2>/dev/null`
3564   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3565     ac_cv_sys_long_file_names=no
3566     rm -rf $ac_xdir 2>/dev/null
3567     break
3568   fi
3569   rm -rf $ac_xdir 2>/dev/null
3570 done
3571 fi
3572 echo "$as_me:3572: result: $ac_cv_sys_long_file_names" >&5
3573 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3574 if test $ac_cv_sys_long_file_names = yes; then
3575
3576 cat >>confdefs.h <<\EOF
3577 #define HAVE_LONG_FILE_NAMES 1
3578 EOF
3579
3580 fi
3581
3582 # if we find pkg-config, check if we should install the ".pc" files.
3583
3584 echo "$as_me:3584: checking if you want to use pkg-config" >&5
3585 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3586
3587 # Check whether --with-pkg-config or --without-pkg-config was given.
3588 if test "${with_pkg_config+set}" = set; then
3589   withval="$with_pkg_config"
3590   cf_pkg_config=$withval
3591 else
3592   cf_pkg_config=yes
3593 fi;
3594 echo "$as_me:3594: result: $cf_pkg_config" >&5
3595 echo "${ECHO_T}$cf_pkg_config" >&6
3596
3597 case $cf_pkg_config in #(vi
3598 no) #(vi
3599         PKG_CONFIG=none
3600         ;;
3601 yes) #(vi
3602
3603 if test -n "$ac_tool_prefix"; then
3604   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3605 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3606 echo "$as_me:3606: checking for $ac_word" >&5
3607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3608 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3609   echo $ECHO_N "(cached) $ECHO_C" >&6
3610 else
3611   case $PKG_CONFIG in
3612   [\\/]* | ?:[\\/]*)
3613   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3614   ;;
3615   *)
3616   ac_save_IFS=$IFS; IFS=$ac_path_separator
3617 ac_dummy="$PATH"
3618 for ac_dir in $ac_dummy; do
3619   IFS=$ac_save_IFS
3620   test -z "$ac_dir" && ac_dir=.
3621   if $as_executable_p "$ac_dir/$ac_word"; then
3622    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3623    echo "$as_me:3623: found $ac_dir/$ac_word" >&5
3624    break
3625 fi
3626 done
3627
3628   ;;
3629 esac
3630 fi
3631 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3632
3633 if test -n "$PKG_CONFIG"; then
3634   echo "$as_me:3634: result: $PKG_CONFIG" >&5
3635 echo "${ECHO_T}$PKG_CONFIG" >&6
3636 else
3637   echo "$as_me:3637: result: no" >&5
3638 echo "${ECHO_T}no" >&6
3639 fi
3640
3641 fi
3642 if test -z "$ac_cv_path_PKG_CONFIG"; then
3643   ac_pt_PKG_CONFIG=$PKG_CONFIG
3644   # Extract the first word of "pkg-config", so it can be a program name with args.
3645 set dummy pkg-config; ac_word=$2
3646 echo "$as_me:3646: checking for $ac_word" >&5
3647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3648 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3649   echo $ECHO_N "(cached) $ECHO_C" >&6
3650 else
3651   case $ac_pt_PKG_CONFIG in
3652   [\\/]* | ?:[\\/]*)
3653   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3654   ;;
3655   *)
3656   ac_save_IFS=$IFS; IFS=$ac_path_separator
3657 ac_dummy="$PATH"
3658 for ac_dir in $ac_dummy; do
3659   IFS=$ac_save_IFS
3660   test -z "$ac_dir" && ac_dir=.
3661   if $as_executable_p "$ac_dir/$ac_word"; then
3662    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3663    echo "$as_me:3663: found $ac_dir/$ac_word" >&5
3664    break
3665 fi
3666 done
3667
3668   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3669   ;;
3670 esac
3671 fi
3672 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3673
3674 if test -n "$ac_pt_PKG_CONFIG"; then
3675   echo "$as_me:3675: result: $ac_pt_PKG_CONFIG" >&5
3676 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3677 else
3678   echo "$as_me:3678: result: no" >&5
3679 echo "${ECHO_T}no" >&6
3680 fi
3681
3682   PKG_CONFIG=$ac_pt_PKG_CONFIG
3683 else
3684   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3685 fi
3686
3687         ;;
3688 *)
3689         PKG_CONFIG=$withval
3690         ;;
3691 esac
3692
3693 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3694 if test "$PKG_CONFIG" != none ; then
3695
3696 if test "x$prefix" != xNONE; then
3697   cf_path_syntax="$prefix"
3698 else
3699   cf_path_syntax="$ac_default_prefix"
3700 fi
3701
3702 case ".$PKG_CONFIG" in #(vi
3703 .\$\(*\)*|.\'*\'*) #(vi
3704   ;;
3705 ..|./*|.\\*) #(vi
3706   ;;
3707 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3708   ;;
3709 .\${*prefix}*) #(vi
3710   eval PKG_CONFIG="$PKG_CONFIG"
3711   case ".$PKG_CONFIG" in #(vi
3712   .NONE/*)
3713     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3714     ;;
3715   esac
3716   ;; #(vi
3717 .no|.NONE/*)
3718   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3719   ;;
3720 *)
3721   { { echo "$as_me:3721: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3722 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3723    { (exit 1); exit 1; }; }
3724   ;;
3725 esac
3726
3727 fi
3728
3729 if test "$PKG_CONFIG" != none ; then
3730         echo "$as_me:3730: checking for $PKG_CONFIG library directory" >&5
3731 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3732
3733 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3734 if test "${with_pkg_config_libdir+set}" = set; then
3735   withval="$with_pkg_config_libdir"
3736   PKG_CONFIG_LIBDIR=$withval
3737 else
3738   PKG_CONFIG_LIBDIR=yes
3739 fi;
3740
3741         case x$PKG_CONFIG_LIBDIR in #(vi
3742         x/*) #(vi
3743                 ;;
3744         xyes) #(vi
3745                 # look for the library directory using the same prefix as the executable
3746                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3747                 case x`(arch) 2>/dev/null` in #(vi
3748                 *64) #(vi
3749                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3750                         do
3751                                 if test -d $cf_config/pkgconfig
3752                                 then
3753                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3754                                         break
3755                                 fi
3756                         done
3757                         ;;
3758                 *)
3759                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3760                         ;;
3761                 esac
3762                 ;;
3763         *)
3764                 ;;
3765         esac
3766
3767         echo "$as_me:3767: result: $PKG_CONFIG_LIBDIR" >&5
3768 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3769 fi
3770
3771 if test "$PKG_CONFIG" != none ; then
3772         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3773                 echo "$as_me:3773: checking if we should install .pc files for $PKG_CONFIG" >&5
3774 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3775
3776 # Check whether --enable-pc-files or --disable-pc-files was given.
3777 if test "${enable_pc_files+set}" = set; then
3778   enableval="$enable_pc_files"
3779   enable_pc_files=$enableval
3780 else
3781   enable_pc_files=no
3782 fi;
3783                 echo "$as_me:3783: result: $enable_pc_files" >&5
3784 echo "${ECHO_T}$enable_pc_files" >&6
3785         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3786                 enable_pc_files=no
3787                 { echo "$as_me:3787: WARNING: did not find $PKG_CONFIG library" >&5
3788 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3789         fi
3790 else
3791         enable_pc_files=no
3792 fi
3793
3794 echo "$as_me:3794: checking if we should assume mixed-case filenames" >&5
3795 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3796
3797 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3798 if test "${enable_mixed_case+set}" = set; then
3799   enableval="$enable_mixed_case"
3800   enable_mixedcase=$enableval
3801 else
3802   enable_mixedcase=auto
3803 fi;
3804 echo "$as_me:3804: result: $enable_mixedcase" >&5
3805 echo "${ECHO_T}$enable_mixedcase" >&6
3806 if test "$enable_mixedcase" = "auto" ; then
3807
3808 echo "$as_me:3808: checking if filesystem supports mixed-case filenames" >&5
3809 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3810 if test "${cf_cv_mixedcase+set}" = set; then
3811   echo $ECHO_N "(cached) $ECHO_C" >&6
3812 else
3813
3814 if test "$cross_compiling" = yes ; then
3815         case $target_alias in #(vi
3816         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3817                 cf_cv_mixedcase=no
3818                 ;;
3819         *)
3820                 cf_cv_mixedcase=yes
3821                 ;;
3822         esac
3823 else
3824         rm -f conftest CONFTEST
3825         echo test >conftest
3826         if test -f CONFTEST ; then
3827                 cf_cv_mixedcase=no
3828         else
3829                 cf_cv_mixedcase=yes
3830         fi
3831         rm -f conftest CONFTEST
3832 fi
3833
3834 fi
3835 echo "$as_me:3835: result: $cf_cv_mixedcase" >&5
3836 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3837 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3838 #define MIXEDCASE_FILENAMES 1
3839 EOF
3840
3841 else
3842     cf_cv_mixedcase=$enable_mixedcase
3843     if test "$enable_mixedcase" = "yes" ; then
3844         cat >>confdefs.h <<\EOF
3845 #define MIXEDCASE_FILENAMES 1
3846 EOF
3847
3848     fi
3849 fi
3850
3851 # do this after mixed-case option (tags/TAGS is not as important as tic).
3852 echo "$as_me:3852: checking whether ${MAKE-make} sets \${MAKE}" >&5
3853 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3854 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3855 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3856   echo $ECHO_N "(cached) $ECHO_C" >&6
3857 else
3858   cat >conftest.make <<\EOF
3859 all:
3860         @echo 'ac_maketemp="${MAKE}"'
3861 EOF
3862 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3863 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3864 if test -n "$ac_maketemp"; then
3865   eval ac_cv_prog_make_${ac_make}_set=yes
3866 else
3867   eval ac_cv_prog_make_${ac_make}_set=no
3868 fi
3869 rm -f conftest.make
3870 fi
3871 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3872   echo "$as_me:3872: result: yes" >&5
3873 echo "${ECHO_T}yes" >&6
3874   SET_MAKE=
3875 else
3876   echo "$as_me:3876: result: no" >&5
3877 echo "${ECHO_T}no" >&6
3878   SET_MAKE="MAKE=${MAKE-make}"
3879 fi
3880
3881 for ac_prog in exctags ctags
3882 do
3883   # Extract the first word of "$ac_prog", so it can be a program name with args.
3884 set dummy $ac_prog; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_CTAGS+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$CTAGS"; then
3891   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_CTAGS="$ac_prog"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904 fi
3905 fi
3906 CTAGS=$ac_cv_prog_CTAGS
3907 if test -n "$CTAGS"; then
3908   echo "$as_me:3908: result: $CTAGS" >&5
3909 echo "${ECHO_T}$CTAGS" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915   test -n "$CTAGS" && break
3916 done
3917
3918 for ac_prog in exetags etags
3919 do
3920   # Extract the first word of "$ac_prog", so it can be a program name with args.
3921 set dummy $ac_prog; ac_word=$2
3922 echo "$as_me:3922: checking for $ac_word" >&5
3923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3924 if test "${ac_cv_prog_ETAGS+set}" = set; then
3925   echo $ECHO_N "(cached) $ECHO_C" >&6
3926 else
3927   if test -n "$ETAGS"; then
3928   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3929 else
3930   ac_save_IFS=$IFS; IFS=$ac_path_separator
3931 ac_dummy="$PATH"
3932 for ac_dir in $ac_dummy; do
3933   IFS=$ac_save_IFS
3934   test -z "$ac_dir" && ac_dir=.
3935   $as_executable_p "$ac_dir/$ac_word" || continue
3936 ac_cv_prog_ETAGS="$ac_prog"
3937 echo "$as_me:3937: found $ac_dir/$ac_word" >&5
3938 break
3939 done
3940
3941 fi
3942 fi
3943 ETAGS=$ac_cv_prog_ETAGS
3944 if test -n "$ETAGS"; then
3945   echo "$as_me:3945: result: $ETAGS" >&5
3946 echo "${ECHO_T}$ETAGS" >&6
3947 else
3948   echo "$as_me:3948: result: no" >&5
3949 echo "${ECHO_T}no" >&6
3950 fi
3951
3952   test -n "$ETAGS" && break
3953 done
3954
3955 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3956 set dummy ${CTAGS:-ctags}; ac_word=$2
3957 echo "$as_me:3957: checking for $ac_word" >&5
3958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3959 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3960   echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962   if test -n "$MAKE_LOWER_TAGS"; then
3963   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3964 else
3965   ac_save_IFS=$IFS; IFS=$ac_path_separator
3966 ac_dummy="$PATH"
3967 for ac_dir in $ac_dummy; do
3968   IFS=$ac_save_IFS
3969   test -z "$ac_dir" && ac_dir=.
3970   $as_executable_p "$ac_dir/$ac_word" || continue
3971 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3972 echo "$as_me:3972: found $ac_dir/$ac_word" >&5
3973 break
3974 done
3975
3976   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3977 fi
3978 fi
3979 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3980 if test -n "$MAKE_LOWER_TAGS"; then
3981   echo "$as_me:3981: result: $MAKE_LOWER_TAGS" >&5
3982 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3983 else
3984   echo "$as_me:3984: result: no" >&5
3985 echo "${ECHO_T}no" >&6
3986 fi
3987
3988 if test "$cf_cv_mixedcase" = yes ; then
3989         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3990 set dummy ${ETAGS:-etags}; ac_word=$2
3991 echo "$as_me:3991: checking for $ac_word" >&5
3992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3993 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3994   echo $ECHO_N "(cached) $ECHO_C" >&6
3995 else
3996   if test -n "$MAKE_UPPER_TAGS"; then
3997   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3998 else
3999   ac_save_IFS=$IFS; IFS=$ac_path_separator
4000 ac_dummy="$PATH"
4001 for ac_dir in $ac_dummy; do
4002   IFS=$ac_save_IFS
4003   test -z "$ac_dir" && ac_dir=.
4004   $as_executable_p "$ac_dir/$ac_word" || continue
4005 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4006 echo "$as_me:4006: found $ac_dir/$ac_word" >&5
4007 break
4008 done
4009
4010   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4011 fi
4012 fi
4013 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4014 if test -n "$MAKE_UPPER_TAGS"; then
4015   echo "$as_me:4015: result: $MAKE_UPPER_TAGS" >&5
4016 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4017 else
4018   echo "$as_me:4018: result: no" >&5
4019 echo "${ECHO_T}no" >&6
4020 fi
4021
4022 else
4023         MAKE_UPPER_TAGS=no
4024 fi
4025
4026 if test "$MAKE_UPPER_TAGS" = yes ; then
4027         MAKE_UPPER_TAGS=
4028 else
4029         MAKE_UPPER_TAGS="#"
4030 fi
4031
4032 if test "$MAKE_LOWER_TAGS" = yes ; then
4033         MAKE_LOWER_TAGS=
4034 else
4035         MAKE_LOWER_TAGS="#"
4036 fi
4037
4038 echo "$as_me:4038: checking for makeflags variable" >&5
4039 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4040 if test "${cf_cv_makeflags+set}" = set; then
4041   echo $ECHO_N "(cached) $ECHO_C" >&6
4042 else
4043
4044         cf_cv_makeflags=''
4045         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4046         do
4047                 cat >cf_makeflags.tmp <<CF_EOF
4048 SHELL = /bin/sh
4049 all :
4050         @ echo '.$cf_option'
4051 CF_EOF
4052                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4053                 case "$cf_result" in
4054                 .*k)
4055                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4056                         case "$cf_result" in
4057                         .*CC=*) cf_cv_makeflags=
4058                                 ;;
4059                         *)      cf_cv_makeflags=$cf_option
4060                                 ;;
4061                         esac
4062                         break
4063                         ;;
4064                 .-)     ;;
4065                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4066                         ;;
4067                 esac
4068         done
4069         rm -f cf_makeflags.tmp
4070
4071 fi
4072 echo "$as_me:4072: result: $cf_cv_makeflags" >&5
4073 echo "${ECHO_T}$cf_cv_makeflags" >&6
4074
4075 if test -n "$ac_tool_prefix"; then
4076   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4077 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4078 echo "$as_me:4078: checking for $ac_word" >&5
4079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4080 if test "${ac_cv_prog_RANLIB+set}" = set; then
4081   echo $ECHO_N "(cached) $ECHO_C" >&6
4082 else
4083   if test -n "$RANLIB"; then
4084   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4085 else
4086   ac_save_IFS=$IFS; IFS=$ac_path_separator
4087 ac_dummy="$PATH"
4088 for ac_dir in $ac_dummy; do
4089   IFS=$ac_save_IFS
4090   test -z "$ac_dir" && ac_dir=.
4091   $as_executable_p "$ac_dir/$ac_word" || continue
4092 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4093 echo "$as_me:4093: found $ac_dir/$ac_word" >&5
4094 break
4095 done
4096
4097 fi
4098 fi
4099 RANLIB=$ac_cv_prog_RANLIB
4100 if test -n "$RANLIB"; then
4101   echo "$as_me:4101: result: $RANLIB" >&5
4102 echo "${ECHO_T}$RANLIB" >&6
4103 else
4104   echo "$as_me:4104: result: no" >&5
4105 echo "${ECHO_T}no" >&6
4106 fi
4107
4108 fi
4109 if test -z "$ac_cv_prog_RANLIB"; then
4110   ac_ct_RANLIB=$RANLIB
4111   # Extract the first word of "ranlib", so it can be a program name with args.
4112 set dummy ranlib; ac_word=$2
4113 echo "$as_me:4113: checking for $ac_word" >&5
4114 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4115 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4116   echo $ECHO_N "(cached) $ECHO_C" >&6
4117 else
4118   if test -n "$ac_ct_RANLIB"; then
4119   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4120 else
4121   ac_save_IFS=$IFS; IFS=$ac_path_separator
4122 ac_dummy="$PATH"
4123 for ac_dir in $ac_dummy; do
4124   IFS=$ac_save_IFS
4125   test -z "$ac_dir" && ac_dir=.
4126   $as_executable_p "$ac_dir/$ac_word" || continue
4127 ac_cv_prog_ac_ct_RANLIB="ranlib"
4128 echo "$as_me:4128: found $ac_dir/$ac_word" >&5
4129 break
4130 done
4131
4132   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4133 fi
4134 fi
4135 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4136 if test -n "$ac_ct_RANLIB"; then
4137   echo "$as_me:4137: result: $ac_ct_RANLIB" >&5
4138 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4139 else
4140   echo "$as_me:4140: result: no" >&5
4141 echo "${ECHO_T}no" >&6
4142 fi
4143
4144   RANLIB=$ac_ct_RANLIB
4145 else
4146   RANLIB="$ac_cv_prog_RANLIB"
4147 fi
4148
4149 if test -n "$ac_tool_prefix"; then
4150   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4151 set dummy ${ac_tool_prefix}ld; ac_word=$2
4152 echo "$as_me:4152: checking for $ac_word" >&5
4153 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4154 if test "${ac_cv_prog_LD+set}" = set; then
4155   echo $ECHO_N "(cached) $ECHO_C" >&6
4156 else
4157   if test -n "$LD"; then
4158   ac_cv_prog_LD="$LD" # Let the user override the test.
4159 else
4160   ac_save_IFS=$IFS; IFS=$ac_path_separator
4161 ac_dummy="$PATH"
4162 for ac_dir in $ac_dummy; do
4163   IFS=$ac_save_IFS
4164   test -z "$ac_dir" && ac_dir=.
4165   $as_executable_p "$ac_dir/$ac_word" || continue
4166 ac_cv_prog_LD="${ac_tool_prefix}ld"
4167 echo "$as_me:4167: found $ac_dir/$ac_word" >&5
4168 break
4169 done
4170
4171 fi
4172 fi
4173 LD=$ac_cv_prog_LD
4174 if test -n "$LD"; then
4175   echo "$as_me:4175: result: $LD" >&5
4176 echo "${ECHO_T}$LD" >&6
4177 else
4178   echo "$as_me:4178: result: no" >&5
4179 echo "${ECHO_T}no" >&6
4180 fi
4181
4182 fi
4183 if test -z "$ac_cv_prog_LD"; then
4184   ac_ct_LD=$LD
4185   # Extract the first word of "ld", so it can be a program name with args.
4186 set dummy ld; ac_word=$2
4187 echo "$as_me:4187: checking for $ac_word" >&5
4188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4189 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4190   echo $ECHO_N "(cached) $ECHO_C" >&6
4191 else
4192   if test -n "$ac_ct_LD"; then
4193   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4194 else
4195   ac_save_IFS=$IFS; IFS=$ac_path_separator
4196 ac_dummy="$PATH"
4197 for ac_dir in $ac_dummy; do
4198   IFS=$ac_save_IFS
4199   test -z "$ac_dir" && ac_dir=.
4200   $as_executable_p "$ac_dir/$ac_word" || continue
4201 ac_cv_prog_ac_ct_LD="ld"
4202 echo "$as_me:4202: found $ac_dir/$ac_word" >&5
4203 break
4204 done
4205
4206   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4207 fi
4208 fi
4209 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4210 if test -n "$ac_ct_LD"; then
4211   echo "$as_me:4211: result: $ac_ct_LD" >&5
4212 echo "${ECHO_T}$ac_ct_LD" >&6
4213 else
4214   echo "$as_me:4214: result: no" >&5
4215 echo "${ECHO_T}no" >&6
4216 fi
4217
4218   LD=$ac_ct_LD
4219 else
4220   LD="$ac_cv_prog_LD"
4221 fi
4222
4223 if test -n "$ac_tool_prefix"; then
4224   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4225 set dummy ${ac_tool_prefix}ar; ac_word=$2
4226 echo "$as_me:4226: checking for $ac_word" >&5
4227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4228 if test "${ac_cv_prog_AR+set}" = set; then
4229   echo $ECHO_N "(cached) $ECHO_C" >&6
4230 else
4231   if test -n "$AR"; then
4232   ac_cv_prog_AR="$AR" # Let the user override the test.
4233 else
4234   ac_save_IFS=$IFS; IFS=$ac_path_separator
4235 ac_dummy="$PATH"
4236 for ac_dir in $ac_dummy; do
4237   IFS=$ac_save_IFS
4238   test -z "$ac_dir" && ac_dir=.
4239   $as_executable_p "$ac_dir/$ac_word" || continue
4240 ac_cv_prog_AR="${ac_tool_prefix}ar"
4241 echo "$as_me:4241: found $ac_dir/$ac_word" >&5
4242 break
4243 done
4244
4245 fi
4246 fi
4247 AR=$ac_cv_prog_AR
4248 if test -n "$AR"; then
4249   echo "$as_me:4249: result: $AR" >&5
4250 echo "${ECHO_T}$AR" >&6
4251 else
4252   echo "$as_me:4252: result: no" >&5
4253 echo "${ECHO_T}no" >&6
4254 fi
4255
4256 fi
4257 if test -z "$ac_cv_prog_AR"; then
4258   ac_ct_AR=$AR
4259   # Extract the first word of "ar", so it can be a program name with args.
4260 set dummy ar; ac_word=$2
4261 echo "$as_me:4261: checking for $ac_word" >&5
4262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4263 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4264   echo $ECHO_N "(cached) $ECHO_C" >&6
4265 else
4266   if test -n "$ac_ct_AR"; then
4267   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4268 else
4269   ac_save_IFS=$IFS; IFS=$ac_path_separator
4270 ac_dummy="$PATH"
4271 for ac_dir in $ac_dummy; do
4272   IFS=$ac_save_IFS
4273   test -z "$ac_dir" && ac_dir=.
4274   $as_executable_p "$ac_dir/$ac_word" || continue
4275 ac_cv_prog_ac_ct_AR="ar"
4276 echo "$as_me:4276: found $ac_dir/$ac_word" >&5
4277 break
4278 done
4279
4280   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4281 fi
4282 fi
4283 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4284 if test -n "$ac_ct_AR"; then
4285   echo "$as_me:4285: result: $ac_ct_AR" >&5
4286 echo "${ECHO_T}$ac_ct_AR" >&6
4287 else
4288   echo "$as_me:4288: result: no" >&5
4289 echo "${ECHO_T}no" >&6
4290 fi
4291
4292   AR=$ac_ct_AR
4293 else
4294   AR="$ac_cv_prog_AR"
4295 fi
4296
4297 if test -n "$ac_tool_prefix"; then
4298   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4299 set dummy ${ac_tool_prefix}ar; ac_word=$2
4300 echo "$as_me:4300: checking for $ac_word" >&5
4301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4302 if test "${ac_cv_prog_AR+set}" = set; then
4303   echo $ECHO_N "(cached) $ECHO_C" >&6
4304 else
4305   if test -n "$AR"; then
4306   ac_cv_prog_AR="$AR" # Let the user override the test.
4307 else
4308   ac_save_IFS=$IFS; IFS=$ac_path_separator
4309 ac_dummy="$PATH"
4310 for ac_dir in $ac_dummy; do
4311   IFS=$ac_save_IFS
4312   test -z "$ac_dir" && ac_dir=.
4313   $as_executable_p "$ac_dir/$ac_word" || continue
4314 ac_cv_prog_AR="${ac_tool_prefix}ar"
4315 echo "$as_me:4315: found $ac_dir/$ac_word" >&5
4316 break
4317 done
4318
4319 fi
4320 fi
4321 AR=$ac_cv_prog_AR
4322 if test -n "$AR"; then
4323   echo "$as_me:4323: result: $AR" >&5
4324 echo "${ECHO_T}$AR" >&6
4325 else
4326   echo "$as_me:4326: result: no" >&5
4327 echo "${ECHO_T}no" >&6
4328 fi
4329
4330 fi
4331 if test -z "$ac_cv_prog_AR"; then
4332   ac_ct_AR=$AR
4333   # Extract the first word of "ar", so it can be a program name with args.
4334 set dummy ar; ac_word=$2
4335 echo "$as_me:4335: checking for $ac_word" >&5
4336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4337 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4338   echo $ECHO_N "(cached) $ECHO_C" >&6
4339 else
4340   if test -n "$ac_ct_AR"; then
4341   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4342 else
4343   ac_save_IFS=$IFS; IFS=$ac_path_separator
4344 ac_dummy="$PATH"
4345 for ac_dir in $ac_dummy; do
4346   IFS=$ac_save_IFS
4347   test -z "$ac_dir" && ac_dir=.
4348   $as_executable_p "$ac_dir/$ac_word" || continue
4349 ac_cv_prog_ac_ct_AR="ar"
4350 echo "$as_me:4350: found $ac_dir/$ac_word" >&5
4351 break
4352 done
4353
4354   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4355 fi
4356 fi
4357 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4358 if test -n "$ac_ct_AR"; then
4359   echo "$as_me:4359: result: $ac_ct_AR" >&5
4360 echo "${ECHO_T}$ac_ct_AR" >&6
4361 else
4362   echo "$as_me:4362: result: no" >&5
4363 echo "${ECHO_T}no" >&6
4364 fi
4365
4366   AR=$ac_ct_AR
4367 else
4368   AR="$ac_cv_prog_AR"
4369 fi
4370
4371 echo "$as_me:4371: checking for options to update archives" >&5
4372 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4373 if test "${cf_cv_ar_flags+set}" = set; then
4374   echo $ECHO_N "(cached) $ECHO_C" >&6
4375 else
4376
4377         cf_cv_ar_flags=unknown
4378         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4379         do
4380
4381                 # check if $ARFLAGS already contains this choice
4382                 if test "x$ARFLAGS" != "x" ; then
4383                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4384                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4385                                 cf_cv_ar_flags=
4386                                 break
4387                         fi
4388                 fi
4389
4390                 rm -f conftest.$ac_cv_objext
4391                 rm -f conftest.a
4392
4393                 cat >conftest.$ac_ext <<EOF
4394 #line 4394 "configure"
4395 int     testdata[3] = { 123, 456, 789 };
4396 EOF
4397                 if { (eval echo "$as_me:4397: \"$ac_compile\"") >&5
4398   (eval $ac_compile) 2>&5
4399   ac_status=$?
4400   echo "$as_me:4400: \$? = $ac_status" >&5
4401   (exit $ac_status); } ; then
4402                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4403                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4404                         if test -f conftest.a ; then
4405                                 cf_cv_ar_flags=$cf_ar_flags
4406                                 break
4407                         fi
4408                 else
4409                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4410
4411 echo "${as_me:-configure}:4411: testing cannot compile test-program ..." 1>&5
4412
4413                         break
4414                 fi
4415         done
4416         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4417
4418 fi
4419 echo "$as_me:4419: result: $cf_cv_ar_flags" >&5
4420 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4421
4422 if test -n "$ARFLAGS" ; then
4423         if test -n "$cf_cv_ar_flags" ; then
4424                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4425         fi
4426 else
4427         ARFLAGS=$cf_cv_ar_flags
4428 fi
4429
4430 echo "$as_me:4430: checking if you have specified an install-prefix" >&5
4431 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4432
4433 # Check whether --with-install-prefix or --without-install-prefix was given.
4434 if test "${with_install_prefix+set}" = set; then
4435   withval="$with_install_prefix"
4436   case "$withval" in #(vi
4437         yes|no) #(vi
4438                 ;;
4439         *)      DESTDIR="$withval"
4440                 ;;
4441         esac
4442 fi;
4443 echo "$as_me:4443: result: $DESTDIR" >&5
4444 echo "${ECHO_T}$DESTDIR" >&6
4445
4446 ###############################################################################
4447
4448 # If we're cross-compiling, allow the user to override the tools and their
4449 # options.  The configure script is oriented toward identifying the host
4450 # compiler, etc., but we need a build compiler to generate parts of the source.
4451
4452 if test "$cross_compiling" = yes ; then
4453
4454         # defaults that we might want to override
4455         : ${BUILD_CFLAGS:=''}
4456         : ${BUILD_CPPFLAGS:=''}
4457         : ${BUILD_LDFLAGS:=''}
4458         : ${BUILD_LIBS:=''}
4459         : ${BUILD_EXEEXT:='$x'}
4460         : ${BUILD_OBJEXT:='o'}
4461
4462 # Check whether --with-build-cc or --without-build-cc was given.
4463 if test "${with_build_cc+set}" = set; then
4464   withval="$with_build_cc"
4465   BUILD_CC="$withval"
4466 else
4467   for ac_prog in gcc cc cl
4468 do
4469   # Extract the first word of "$ac_prog", so it can be a program name with args.
4470 set dummy $ac_prog; ac_word=$2
4471 echo "$as_me:4471: checking for $ac_word" >&5
4472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4473 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4474   echo $ECHO_N "(cached) $ECHO_C" >&6
4475 else
4476   if test -n "$BUILD_CC"; then
4477   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4478 else
4479   ac_save_IFS=$IFS; IFS=$ac_path_separator
4480 ac_dummy="$PATH"
4481 for ac_dir in $ac_dummy; do
4482   IFS=$ac_save_IFS
4483   test -z "$ac_dir" && ac_dir=.
4484   $as_executable_p "$ac_dir/$ac_word" || continue
4485 ac_cv_prog_BUILD_CC="$ac_prog"
4486 echo "$as_me:4486: found $ac_dir/$ac_word" >&5
4487 break
4488 done
4489
4490 fi
4491 fi
4492 BUILD_CC=$ac_cv_prog_BUILD_CC
4493 if test -n "$BUILD_CC"; then
4494   echo "$as_me:4494: result: $BUILD_CC" >&5
4495 echo "${ECHO_T}$BUILD_CC" >&6
4496 else
4497   echo "$as_me:4497: result: no" >&5
4498 echo "${ECHO_T}no" >&6
4499 fi
4500
4501   test -n "$BUILD_CC" && break
4502 done
4503
4504 fi;
4505         echo "$as_me:4505: checking for native build C compiler" >&5
4506 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4507         echo "$as_me:4507: result: $BUILD_CC" >&5
4508 echo "${ECHO_T}$BUILD_CC" >&6
4509
4510         echo "$as_me:4510: checking for native build C preprocessor" >&5
4511 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4512
4513 # Check whether --with-build-cpp or --without-build-cpp was given.
4514 if test "${with_build_cpp+set}" = set; then
4515   withval="$with_build_cpp"
4516   BUILD_CPP="$withval"
4517 else
4518   BUILD_CPP='${BUILD_CC} -E'
4519 fi;
4520         echo "$as_me:4520: result: $BUILD_CPP" >&5
4521 echo "${ECHO_T}$BUILD_CPP" >&6
4522
4523         echo "$as_me:4523: checking for native build C flags" >&5
4524 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4525
4526 # Check whether --with-build-cflags or --without-build-cflags was given.
4527 if test "${with_build_cflags+set}" = set; then
4528   withval="$with_build_cflags"
4529   BUILD_CFLAGS="$withval"
4530 fi;
4531         echo "$as_me:4531: result: $BUILD_CFLAGS" >&5
4532 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4533
4534         echo "$as_me:4534: checking for native build C preprocessor-flags" >&5
4535 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4536
4537 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4538 if test "${with_build_cppflags+set}" = set; then
4539   withval="$with_build_cppflags"
4540   BUILD_CPPFLAGS="$withval"
4541 fi;
4542         echo "$as_me:4542: result: $BUILD_CPPFLAGS" >&5
4543 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4544
4545         echo "$as_me:4545: checking for native build linker-flags" >&5
4546 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4547
4548 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4549 if test "${with_build_ldflags+set}" = set; then
4550   withval="$with_build_ldflags"
4551   BUILD_LDFLAGS="$withval"
4552 fi;
4553         echo "$as_me:4553: result: $BUILD_LDFLAGS" >&5
4554 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4555
4556         echo "$as_me:4556: checking for native build linker-libraries" >&5
4557 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4558
4559 # Check whether --with-build-libs or --without-build-libs was given.
4560 if test "${with_build_libs+set}" = set; then
4561   withval="$with_build_libs"
4562   BUILD_LIBS="$withval"
4563 fi;
4564         echo "$as_me:4564: result: $BUILD_LIBS" >&5
4565 echo "${ECHO_T}$BUILD_LIBS" >&6
4566
4567         # this assumes we're on Unix.
4568         BUILD_EXEEXT=
4569         BUILD_OBJEXT=o
4570
4571         : ${BUILD_CC:='${CC}'}
4572
4573         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4574                 { { echo "$as_me:4574: error: Cross-build requires two compilers.
4575 Use --with-build-cc to specify the native compiler." >&5
4576 echo "$as_me: error: Cross-build requires two compilers.
4577 Use --with-build-cc to specify the native compiler." >&2;}
4578    { (exit 1); exit 1; }; }
4579         fi
4580
4581 else
4582         : ${BUILD_CC:='${CC}'}
4583         : ${BUILD_CPP:='${CPP}'}
4584         : ${BUILD_CFLAGS:='${CFLAGS}'}
4585         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4586         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4587         : ${BUILD_LIBS:='${LIBS}'}
4588         : ${BUILD_EXEEXT:='$x'}
4589         : ${BUILD_OBJEXT:='o'}
4590 fi
4591
4592 ###############################################################################
4593
4594 ### Options to allow the user to specify the set of libraries which are used.
4595 ### Use "--without-normal --with-shared" to allow the default model to be
4596 ### shared, for example.
4597 cf_list_models=""
4598
4599 echo "$as_me:4599: checking if libtool -version-number should be used" >&5
4600 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4601
4602 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4603 if test "${enable_libtool_version+set}" = set; then
4604   enableval="$enable_libtool_version"
4605   test "$enableval" != no && enableval=yes
4606   if test "$enableval" != "yes" ; then
4607     cf_libtool_version=no
4608   else
4609     cf_libtool_version=yes
4610   fi
4611 else
4612   enableval=yes
4613   cf_libtool_version=yes
4614
4615 fi;
4616 echo "$as_me:4616: result: $cf_libtool_version" >&5
4617 echo "${ECHO_T}$cf_libtool_version" >&6
4618
4619 if test "$cf_libtool_version" = yes ; then
4620         LIBTOOL_VERSION="-version-number"
4621 else
4622         LIBTOOL_VERSION="-version-info"
4623 fi
4624
4625 LIBTOOL=
4626
4627 # common library maintenance symbols that are convenient for libtool scripts:
4628 LIB_CREATE='${AR} -cr'
4629 LIB_OBJECT='${OBJECTS}'
4630 LIB_SUFFIX=.a
4631 LIB_PREP="$RANLIB"
4632
4633 # symbols used to prop libtool up to enable it to determine what it should be
4634 # doing:
4635 LIB_CLEAN=
4636 LIB_COMPILE=
4637 LIB_LINK='${CC}'
4638 LIB_INSTALL=
4639 LIB_UNINSTALL=
4640
4641 echo "$as_me:4641: checking if you want to build libraries with libtool" >&5
4642 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4643
4644 # Check whether --with-libtool or --without-libtool was given.
4645 if test "${with_libtool+set}" = set; then
4646   withval="$with_libtool"
4647   with_libtool=$withval
4648 else
4649   with_libtool=no
4650 fi;
4651 echo "$as_me:4651: result: $with_libtool" >&5
4652 echo "${ECHO_T}$with_libtool" >&6
4653 if test "$with_libtool" != "no"; then
4654
4655         if test "$with_libtool" != "yes" ; then
4656
4657 if test "x$prefix" != xNONE; then
4658   cf_path_syntax="$prefix"
4659 else
4660   cf_path_syntax="$ac_default_prefix"
4661 fi
4662
4663 case ".$with_libtool" in #(vi
4664 .\$\(*\)*|.\'*\'*) #(vi
4665   ;;
4666 ..|./*|.\\*) #(vi
4667   ;;
4668 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4669   ;;
4670 .\${*prefix}*) #(vi
4671   eval with_libtool="$with_libtool"
4672   case ".$with_libtool" in #(vi
4673   .NONE/*)
4674     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4675     ;;
4676   esac
4677   ;; #(vi
4678 .no|.NONE/*)
4679   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4680   ;;
4681 *)
4682   { { echo "$as_me:4682: error: expected a pathname, not \"$with_libtool\"" >&5
4683 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4684    { (exit 1); exit 1; }; }
4685   ;;
4686 esac
4687
4688                 LIBTOOL=$with_libtool
4689         else
4690                 # Extract the first word of "libtool", so it can be a program name with args.
4691 set dummy libtool; ac_word=$2
4692 echo "$as_me:4692: checking for $ac_word" >&5
4693 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4694 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4695   echo $ECHO_N "(cached) $ECHO_C" >&6
4696 else
4697   case $LIBTOOL in
4698   [\\/]* | ?:[\\/]*)
4699   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4700   ;;
4701   *)
4702   ac_save_IFS=$IFS; IFS=$ac_path_separator
4703 ac_dummy="$PATH"
4704 for ac_dir in $ac_dummy; do
4705   IFS=$ac_save_IFS
4706   test -z "$ac_dir" && ac_dir=.
4707   if $as_executable_p "$ac_dir/$ac_word"; then
4708    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4709    echo "$as_me:4709: found $ac_dir/$ac_word" >&5
4710    break
4711 fi
4712 done
4713
4714   ;;
4715 esac
4716 fi
4717 LIBTOOL=$ac_cv_path_LIBTOOL
4718
4719 if test -n "$LIBTOOL"; then
4720   echo "$as_me:4720: result: $LIBTOOL" >&5
4721 echo "${ECHO_T}$LIBTOOL" >&6
4722 else
4723   echo "$as_me:4723: result: no" >&5
4724 echo "${ECHO_T}no" >&6
4725 fi
4726
4727         fi
4728         if test -z "$LIBTOOL" ; then
4729                 { { echo "$as_me:4729: error: Cannot find libtool" >&5
4730 echo "$as_me: error: Cannot find libtool" >&2;}
4731    { (exit 1); exit 1; }; }
4732         fi
4733         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4734         LIB_OBJECT='${OBJECTS:.o=.lo}'
4735         LIB_SUFFIX=.la
4736         LIB_CLEAN='${LIBTOOL} --mode=clean'
4737         LIB_COMPILE='${LIBTOOL} --mode=compile'
4738         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4739         LIB_INSTALL='${LIBTOOL} --mode=install'
4740         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4741         LIB_PREP=:
4742
4743         # Show the version of libtool
4744         echo "$as_me:4744: checking version of libtool" >&5
4745 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4746
4747         # Save the version in a cache variable - this is not entirely a good
4748         # thing, but the version string from libtool is very ugly, and for
4749         # bug reports it might be useful to have the original string. "("
4750         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4751         echo "$as_me:4751: result: $cf_cv_libtool_version" >&5
4752 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4753         if test -z "$cf_cv_libtool_version" ; then
4754                 { { echo "$as_me:4754: error: This is not GNU libtool" >&5
4755 echo "$as_me: error: This is not GNU libtool" >&2;}
4756    { (exit 1); exit 1; }; }
4757         fi
4758
4759         # special hack to add -no-undefined (which libtool should do for itself)
4760         LT_UNDEF=
4761         case "$cf_cv_system_name" in #(vi
4762         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4763                 LT_UNDEF=-no-undefined
4764                 ;;
4765         esac
4766
4767         # special hack to add --tag option for C++ compiler
4768         case $cf_cv_libtool_version in #(vi
4769         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4770                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4771                 LIBTOOL="$LIBTOOL --tag=CC"
4772                 ;;
4773         *)
4774                 LIBTOOL_CXX="$LIBTOOL"
4775                 ;;
4776         esac
4777 else
4778         LIBTOOL=""
4779         LIBTOOL_CXX=""
4780 fi
4781
4782 test -z "$LIBTOOL" && ECHO_LT=
4783
4784 if test "$with_libtool" != "no" ; then
4785
4786 cf_list_models="$cf_list_models libtool"
4787
4788 else
4789
4790 echo "$as_me:4790: checking if you want to build shared libraries" >&5
4791 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4792
4793 # Check whether --with-shared or --without-shared was given.
4794 if test "${with_shared+set}" = set; then
4795   withval="$with_shared"
4796   with_shared=$withval
4797 else
4798   with_shared=no
4799 fi;
4800 echo "$as_me:4800: result: $with_shared" >&5
4801 echo "${ECHO_T}$with_shared" >&6
4802 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4803
4804 echo "$as_me:4804: checking if you want to build static libraries" >&5
4805 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4806
4807 # Check whether --with-normal or --without-normal was given.
4808 if test "${with_normal+set}" = set; then
4809   withval="$with_normal"
4810   with_normal=$withval
4811 else
4812   with_normal=yes
4813 fi;
4814 echo "$as_me:4814: result: $with_normal" >&5
4815 echo "${ECHO_T}$with_normal" >&6
4816 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4817
4818 echo "$as_me:4818: checking if you want to build debug libraries" >&5
4819 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4820
4821 # Check whether --with-debug or --without-debug was given.
4822 if test "${with_debug+set}" = set; then
4823   withval="$with_debug"
4824   with_debug=$withval
4825 else
4826   with_debug=yes
4827 fi;
4828 echo "$as_me:4828: result: $with_debug" >&5
4829 echo "${ECHO_T}$with_debug" >&6
4830 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4831
4832 echo "$as_me:4832: checking if you want to build profiling libraries" >&5
4833 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4834
4835 # Check whether --with-profile or --without-profile was given.
4836 if test "${with_profile+set}" = set; then
4837   withval="$with_profile"
4838   with_profile=$withval
4839 else
4840   with_profile=no
4841 fi;
4842 echo "$as_me:4842: result: $with_profile" >&5
4843 echo "${ECHO_T}$with_profile" >&6
4844 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4845
4846 fi
4847
4848 ###############################################################################
4849
4850 echo "$as_me:4850: checking for specified models" >&5
4851 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4852 test -z "$cf_list_models" && cf_list_models=normal
4853 test "$with_libtool" != "no" && cf_list_models=libtool
4854 echo "$as_me:4854: result: $cf_list_models" >&5
4855 echo "${ECHO_T}$cf_list_models" >&6
4856
4857 ### Use the first model as the default, and save its suffix for use in building
4858 ### up test-applications.
4859 echo "$as_me:4859: checking for default model" >&5
4860 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4861 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4862 echo "$as_me:4862: result: $DFT_LWR_MODEL" >&5
4863 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4864
4865 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4866
4867 TICS_NAME=tic
4868
4869 TINFO_NAME=tinfo
4870
4871 LIB_NAME=ncurses
4872
4873 LIB_DIR=../lib
4874 LIB_2ND=../../lib
4875
4876 echo "$as_me:4876: checking if you want to have a library-prefix" >&5
4877 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4878
4879 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4880 if test "${with_lib_prefix+set}" = set; then
4881   withval="$with_lib_prefix"
4882   with_lib_prefix=$withval
4883 else
4884   with_lib_prefix=auto
4885 fi;
4886 echo "$as_me:4886: result: $with_lib_prefix" >&5
4887 echo "${ECHO_T}$with_lib_prefix" >&6
4888
4889 if test $with_lib_prefix = auto
4890 then
4891
4892         case $cf_cv_system_name in #(vi
4893         OS/2*|os2*) #(vi
4894         LIB_PREFIX=''
4895         ;;
4896         *)      LIB_PREFIX='lib'
4897         ;;
4898         esac
4899 cf_prefix=$LIB_PREFIX
4900
4901 elif test $with_lib_prefix = no
4902 then
4903         LIB_PREFIX=
4904 else
4905         LIB_PREFIX=$with_lib_prefix
4906 fi
4907
4908 LIB_SUFFIX=
4909
4910 ###############################################################################
4911
4912 echo "$as_me:4912: checking if you want to build a separate terminfo library" >&5
4913 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4914
4915 # Check whether --with-termlib or --without-termlib was given.
4916 if test "${with_termlib+set}" = set; then
4917   withval="$with_termlib"
4918   with_termlib=$withval
4919 else
4920   with_termlib=no
4921 fi;
4922 echo "$as_me:4922: result: $with_termlib" >&5
4923 echo "${ECHO_T}$with_termlib" >&6
4924
4925 echo "$as_me:4925: checking if you want to build a separate tic library" >&5
4926 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4927
4928 # Check whether --with-ticlib or --without-ticlib was given.
4929 if test "${with_ticlib+set}" = set; then
4930   withval="$with_ticlib"
4931   with_ticlib=$withval
4932 else
4933   with_ticlib=no
4934 fi;
4935 echo "$as_me:4935: result: $with_ticlib" >&5
4936 echo "${ECHO_T}$with_ticlib" >&6
4937
4938 ### Checks for special libraries, must be done up-front.
4939 SHLIB_LIST=""
4940
4941 echo "$as_me:4941: checking if you want to link with the GPM mouse library" >&5
4942 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4943
4944 # Check whether --with-gpm or --without-gpm was given.
4945 if test "${with_gpm+set}" = set; then
4946   withval="$with_gpm"
4947   with_gpm=$withval
4948 else
4949   with_gpm=maybe
4950 fi;
4951 echo "$as_me:4951: result: $with_gpm" >&5
4952 echo "${ECHO_T}$with_gpm" >&6
4953
4954 if test "$with_gpm" != no ; then
4955         echo "$as_me:4955: checking for gpm.h" >&5
4956 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4957 if test "${ac_cv_header_gpm_h+set}" = set; then
4958   echo $ECHO_N "(cached) $ECHO_C" >&6
4959 else
4960   cat >conftest.$ac_ext <<_ACEOF
4961 #line 4961 "configure"
4962 #include "confdefs.h"
4963 #include <gpm.h>
4964 _ACEOF
4965 if { (eval echo "$as_me:4965: \"$ac_cpp conftest.$ac_ext\"") >&5
4966   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4967   ac_status=$?
4968   egrep -v '^ *\+' conftest.er1 >conftest.err
4969   rm -f conftest.er1
4970   cat conftest.err >&5
4971   echo "$as_me:4971: \$? = $ac_status" >&5
4972   (exit $ac_status); } >/dev/null; then
4973   if test -s conftest.err; then
4974     ac_cpp_err=$ac_c_preproc_warn_flag
4975   else
4976     ac_cpp_err=
4977   fi
4978 else
4979   ac_cpp_err=yes
4980 fi
4981 if test -z "$ac_cpp_err"; then
4982   ac_cv_header_gpm_h=yes
4983 else
4984   echo "$as_me: failed program was:" >&5
4985   cat conftest.$ac_ext >&5
4986   ac_cv_header_gpm_h=no
4987 fi
4988 rm -f conftest.err conftest.$ac_ext
4989 fi
4990 echo "$as_me:4990: result: $ac_cv_header_gpm_h" >&5
4991 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4992 if test $ac_cv_header_gpm_h = yes; then
4993
4994                 cat >>confdefs.h <<\EOF
4995 #define HAVE_GPM_H 1
4996 EOF
4997
4998                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4999                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5000
5001 echo "${as_me:-configure}:5001: testing assuming we really have GPM library ..." 1>&5
5002
5003                         cat >>confdefs.h <<\EOF
5004 #define HAVE_LIBGPM 1
5005 EOF
5006
5007                 else
5008                         echo "$as_me:5008: checking for Gpm_Open in -lgpm" >&5
5009 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5010 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5011   echo $ECHO_N "(cached) $ECHO_C" >&6
5012 else
5013   ac_check_lib_save_LIBS=$LIBS
5014 LIBS="-lgpm  $LIBS"
5015 cat >conftest.$ac_ext <<_ACEOF
5016 #line 5016 "configure"
5017 #include "confdefs.h"
5018
5019 /* Override any gcc2 internal prototype to avoid an error.  */
5020 #ifdef __cplusplus
5021 extern "C"
5022 #endif
5023 /* We use char because int might match the return type of a gcc2
5024    builtin and then its argument prototype would still apply.  */
5025 char Gpm_Open ();
5026 int
5027 main ()
5028 {
5029 Gpm_Open ();
5030   ;
5031   return 0;
5032 }
5033 _ACEOF
5034 rm -f conftest.$ac_objext conftest$ac_exeext
5035 if { (eval echo "$as_me:5035: \"$ac_link\"") >&5
5036   (eval $ac_link) 2>&5
5037   ac_status=$?
5038   echo "$as_me:5038: \$? = $ac_status" >&5
5039   (exit $ac_status); } &&
5040          { ac_try='test -s conftest$ac_exeext'
5041   { (eval echo "$as_me:5041: \"$ac_try\"") >&5
5042   (eval $ac_try) 2>&5
5043   ac_status=$?
5044   echo "$as_me:5044: \$? = $ac_status" >&5
5045   (exit $ac_status); }; }; then
5046   ac_cv_lib_gpm_Gpm_Open=yes
5047 else
5048   echo "$as_me: failed program was:" >&5
5049 cat conftest.$ac_ext >&5
5050 ac_cv_lib_gpm_Gpm_Open=no
5051 fi
5052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5053 LIBS=$ac_check_lib_save_LIBS
5054 fi
5055 echo "$as_me:5055: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5056 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5057 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5058   :
5059 else
5060
5061                                 { { echo "$as_me:5061: error: Cannot link with GPM library" >&5
5062 echo "$as_me: error: Cannot link with GPM library" >&2;}
5063    { (exit 1); exit 1; }; }
5064                 fi
5065                 with_gpm=yes
5066
5067 fi
5068
5069 else
5070
5071                 test "$with_gpm" != maybe && { echo "$as_me:5071: WARNING: Cannot find GPM header" >&5
5072 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5073                 with_gpm=no
5074
5075 fi
5076
5077 fi
5078
5079 if test "$with_gpm" != no ; then
5080         echo "$as_me:5080: checking if you want to load GPM dynamically" >&5
5081 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5082
5083 # Check whether --with-dlsym or --without-dlsym was given.
5084 if test "${with_dlsym+set}" = set; then
5085   withval="$with_dlsym"
5086   with_dlsym=$withval
5087 else
5088   with_dlsym=yes
5089 fi;
5090         echo "$as_me:5090: result: $with_dlsym" >&5
5091 echo "${ECHO_T}$with_dlsym" >&6
5092         if test "$with_dlsym" = yes ; then
5093
5094 cf_have_dlsym=no
5095 echo "$as_me:5095: checking for dlsym" >&5
5096 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5097 if test "${ac_cv_func_dlsym+set}" = set; then
5098   echo $ECHO_N "(cached) $ECHO_C" >&6
5099 else
5100   cat >conftest.$ac_ext <<_ACEOF
5101 #line 5101 "configure"
5102 #include "confdefs.h"
5103 /* System header to define __stub macros and hopefully few prototypes,
5104     which can conflict with char dlsym (); below.  */
5105 #include <assert.h>
5106 /* Override any gcc2 internal prototype to avoid an error.  */
5107 #ifdef __cplusplus
5108 extern "C"
5109 #endif
5110 /* We use char because int might match the return type of a gcc2
5111    builtin and then its argument prototype would still apply.  */
5112 char dlsym ();
5113 char (*f) ();
5114
5115 int
5116 main ()
5117 {
5118 /* The GNU C library defines this for functions which it implements
5119     to always fail with ENOSYS.  Some functions are actually named
5120     something starting with __ and the normal name is an alias.  */
5121 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5122 choke me
5123 #else
5124 f = dlsym;
5125 #endif
5126
5127   ;
5128   return 0;
5129 }
5130 _ACEOF
5131 rm -f conftest.$ac_objext conftest$ac_exeext
5132 if { (eval echo "$as_me:5132: \"$ac_link\"") >&5
5133   (eval $ac_link) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } &&
5137          { ac_try='test -s conftest$ac_exeext'
5138   { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5139   (eval $ac_try) 2>&5
5140   ac_status=$?
5141   echo "$as_me:5141: \$? = $ac_status" >&5
5142   (exit $ac_status); }; }; then
5143   ac_cv_func_dlsym=yes
5144 else
5145   echo "$as_me: failed program was:" >&5
5146 cat conftest.$ac_ext >&5
5147 ac_cv_func_dlsym=no
5148 fi
5149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5150 fi
5151 echo "$as_me:5151: result: $ac_cv_func_dlsym" >&5
5152 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5153 if test $ac_cv_func_dlsym = yes; then
5154   cf_have_dlsym=yes
5155 else
5156
5157 cf_have_libdl=no
5158 echo "$as_me:5158: checking for dlsym in -ldl" >&5
5159 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5160 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5161   echo $ECHO_N "(cached) $ECHO_C" >&6
5162 else
5163   ac_check_lib_save_LIBS=$LIBS
5164 LIBS="-ldl  $LIBS"
5165 cat >conftest.$ac_ext <<_ACEOF
5166 #line 5166 "configure"
5167 #include "confdefs.h"
5168
5169 /* Override any gcc2 internal prototype to avoid an error.  */
5170 #ifdef __cplusplus
5171 extern "C"
5172 #endif
5173 /* We use char because int might match the return type of a gcc2
5174    builtin and then its argument prototype would still apply.  */
5175 char dlsym ();
5176 int
5177 main ()
5178 {
5179 dlsym ();
5180   ;
5181   return 0;
5182 }
5183 _ACEOF
5184 rm -f conftest.$ac_objext conftest$ac_exeext
5185 if { (eval echo "$as_me:5185: \"$ac_link\"") >&5
5186   (eval $ac_link) 2>&5
5187   ac_status=$?
5188   echo "$as_me:5188: \$? = $ac_status" >&5
5189   (exit $ac_status); } &&
5190          { ac_try='test -s conftest$ac_exeext'
5191   { (eval echo "$as_me:5191: \"$ac_try\"") >&5
5192   (eval $ac_try) 2>&5
5193   ac_status=$?
5194   echo "$as_me:5194: \$? = $ac_status" >&5
5195   (exit $ac_status); }; }; then
5196   ac_cv_lib_dl_dlsym=yes
5197 else
5198   echo "$as_me: failed program was:" >&5
5199 cat conftest.$ac_ext >&5
5200 ac_cv_lib_dl_dlsym=no
5201 fi
5202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5203 LIBS=$ac_check_lib_save_LIBS
5204 fi
5205 echo "$as_me:5205: result: $ac_cv_lib_dl_dlsym" >&5
5206 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5207 if test $ac_cv_lib_dl_dlsym = yes; then
5208
5209         cf_have_dlsym=yes
5210         cf_have_libdl=yes
5211 fi
5212
5213 fi
5214
5215 if test "$cf_have_dlsym" = yes ; then
5216         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5217
5218         echo "$as_me:5218: checking whether able to link to dl*() functions" >&5
5219 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5220         cat >conftest.$ac_ext <<_ACEOF
5221 #line 5221 "configure"
5222 #include "confdefs.h"
5223 #include <dlfcn.h>
5224 int
5225 main ()
5226 {
5227
5228                 void *obj;
5229                 if ((obj = dlopen("filename", 0)) != 0) {
5230                         if (dlsym(obj, "symbolname") == 0) {
5231                         dlclose(obj);
5232                         }
5233                 }
5234   ;
5235   return 0;
5236 }
5237 _ACEOF
5238 rm -f conftest.$ac_objext conftest$ac_exeext
5239 if { (eval echo "$as_me:5239: \"$ac_link\"") >&5
5240   (eval $ac_link) 2>&5
5241   ac_status=$?
5242   echo "$as_me:5242: \$? = $ac_status" >&5
5243   (exit $ac_status); } &&
5244          { ac_try='test -s conftest$ac_exeext'
5245   { (eval echo "$as_me:5245: \"$ac_try\"") >&5
5246   (eval $ac_try) 2>&5
5247   ac_status=$?
5248   echo "$as_me:5248: \$? = $ac_status" >&5
5249   (exit $ac_status); }; }; then
5250
5251                 cat >>confdefs.h <<\EOF
5252 #define HAVE_LIBDL 1
5253 EOF
5254
5255 else
5256   echo "$as_me: failed program was:" >&5
5257 cat conftest.$ac_ext >&5
5258
5259                 { { echo "$as_me:5259: error: Cannot link test program for libdl" >&5
5260 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5261    { (exit 1); exit 1; }; }
5262 fi
5263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5264         echo "$as_me:5264: result: ok" >&5
5265 echo "${ECHO_T}ok" >&6
5266 else
5267         { { echo "$as_me:5267: error: Cannot find dlsym function" >&5
5268 echo "$as_me: error: Cannot find dlsym function" >&2;}
5269    { (exit 1); exit 1; }; }
5270 fi
5271
5272                 if test "$with_gpm" != yes ; then
5273                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5274
5275 echo "${as_me:-configure}:5275: testing assuming soname for gpm is $with_gpm ..." 1>&5
5276
5277                         cf_cv_gpm_soname="$with_gpm"
5278                 else
5279
5280 echo "$as_me:5280: checking for soname of gpm library" >&5
5281 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5282 if test "${cf_cv_gpm_soname+set}" = set; then
5283   echo $ECHO_N "(cached) $ECHO_C" >&6
5284 else
5285
5286 cf_cv_gpm_soname=unknown
5287 if test "$cross_compiling" != yes ; then
5288 cat >conftest.$ac_ext <<CF_EOF
5289 #include <gpm.h>
5290 int main()
5291 {
5292 if (Gpm_Open(0,0)) Gpm_Close();
5293         ${cf_cv_main_return:-return}(0);
5294 }
5295 CF_EOF
5296 cf_save_LIBS="$LIBS"
5297         LIBS="-lgpm $LIBS"
5298         if { (eval echo "$as_me:5298: \"$ac_compile\"") >&5
5299   (eval $ac_compile) 2>&5
5300   ac_status=$?
5301   echo "$as_me:5301: \$? = $ac_status" >&5
5302   (exit $ac_status); } ; then
5303                 if { (eval echo "$as_me:5303: \"$ac_link\"") >&5
5304   (eval $ac_link) 2>&5
5305   ac_status=$?
5306   echo "$as_me:5306: \$? = $ac_status" >&5
5307   (exit $ac_status); } ; then
5308                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5309                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5310                 fi
5311         fi
5312 rm -rf conftest*
5313 LIBS="$cf_save_LIBS"
5314 fi
5315
5316 fi
5317 echo "$as_me:5317: result: $cf_cv_gpm_soname" >&5
5318 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5319
5320                 fi
5321                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5322 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5323 EOF
5324
5325                 SHLIB_LIST="-ldl $SHLIB_LIST"
5326         else
5327                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5328                 TEST_LIBS="-lgpm $TEST_LIBS"
5329         fi
5330         cat >>confdefs.h <<\EOF
5331 #define HAVE_LIBGPM 1
5332 EOF
5333
5334 echo "$as_me:5334: checking for Gpm_Wgetch in -lgpm" >&5
5335 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5336 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5337   echo $ECHO_N "(cached) $ECHO_C" >&6
5338 else
5339   ac_check_lib_save_LIBS=$LIBS
5340 LIBS="-lgpm  $LIBS"
5341 cat >conftest.$ac_ext <<_ACEOF
5342 #line 5342 "configure"
5343 #include "confdefs.h"
5344
5345 /* Override any gcc2 internal prototype to avoid an error.  */
5346 #ifdef __cplusplus
5347 extern "C"
5348 #endif
5349 /* We use char because int might match the return type of a gcc2
5350    builtin and then its argument prototype would still apply.  */
5351 char Gpm_Wgetch ();
5352 int
5353 main ()
5354 {
5355 Gpm_Wgetch ();
5356   ;
5357   return 0;
5358 }
5359 _ACEOF
5360 rm -f conftest.$ac_objext conftest$ac_exeext
5361 if { (eval echo "$as_me:5361: \"$ac_link\"") >&5
5362   (eval $ac_link) 2>&5
5363   ac_status=$?
5364   echo "$as_me:5364: \$? = $ac_status" >&5
5365   (exit $ac_status); } &&
5366          { ac_try='test -s conftest$ac_exeext'
5367   { (eval echo "$as_me:5367: \"$ac_try\"") >&5
5368   (eval $ac_try) 2>&5
5369   ac_status=$?
5370   echo "$as_me:5370: \$? = $ac_status" >&5
5371   (exit $ac_status); }; }; then
5372   ac_cv_lib_gpm_Gpm_Wgetch=yes
5373 else
5374   echo "$as_me: failed program was:" >&5
5375 cat conftest.$ac_ext >&5
5376 ac_cv_lib_gpm_Gpm_Wgetch=no
5377 fi
5378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5379 LIBS=$ac_check_lib_save_LIBS
5380 fi
5381 echo "$as_me:5381: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5382 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5383 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5384
5385 echo "$as_me:5385: checking if GPM is weakly bound to curses library" >&5
5386 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5387 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5388   echo $ECHO_N "(cached) $ECHO_C" >&6
5389 else
5390
5391 cf_cv_check_gpm_wgetch=unknown
5392 if test "$cross_compiling" != yes ; then
5393
5394 cat >conftest.$ac_ext <<CF_EOF
5395 #include <gpm.h>
5396 int main()
5397 {
5398         Gpm_Wgetch();
5399         ${cf_cv_main_return:-return}(0);
5400 }
5401 CF_EOF
5402
5403         cf_save_LIBS="$LIBS"
5404         # This only works if we can look at the symbol table.  If a shared
5405         # library is stripped for install, we cannot use that.  So we're forced
5406         # to rely on the static library, noting that some packagers may not
5407         # include it.
5408         LIBS="-static -lgpm -dynamic $LIBS"
5409         if { (eval echo "$as_me:5409: \"$ac_compile\"") >&5
5410   (eval $ac_compile) 2>&5
5411   ac_status=$?
5412   echo "$as_me:5412: \$? = $ac_status" >&5
5413   (exit $ac_status); } ; then
5414                 if { (eval echo "$as_me:5414: \"$ac_link\"") >&5
5415   (eval $ac_link) 2>&5
5416   ac_status=$?
5417   echo "$as_me:5417: \$? = $ac_status" >&5
5418   (exit $ac_status); } ; then
5419                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5420                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5421                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5422                 fi
5423         fi
5424         rm -rf conftest*
5425         LIBS="$cf_save_LIBS"
5426 fi
5427
5428 fi
5429 echo "$as_me:5429: result: $cf_cv_check_gpm_wgetch" >&5
5430 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5431
5432 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5433         { echo "$as_me:5433: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5434 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5435 fi
5436
5437 fi
5438
5439 fi
5440
5441 # not everyone has "test -c"
5442 if test -c /dev/sysmouse 2>/dev/null ; then
5443 echo "$as_me:5443: checking if you want to use sysmouse" >&5
5444 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5445
5446 # Check whether --with-sysmouse or --without-sysmouse was given.
5447 if test "${with_sysmouse+set}" = set; then
5448   withval="$with_sysmouse"
5449   cf_with_sysmouse=$withval
5450 else
5451   cf_with_sysmouse=maybe
5452 fi;
5453         if test "$cf_with_sysmouse" != no ; then
5454         cat >conftest.$ac_ext <<_ACEOF
5455 #line 5455 "configure"
5456 #include "confdefs.h"
5457
5458 #include <osreldate.h>
5459 #if (__FreeBSD_version >= 400017)
5460 #include <sys/consio.h>
5461 #include <sys/fbio.h>
5462 #else
5463 #include <machine/console.h>
5464 #endif
5465
5466 int
5467 main ()
5468 {
5469
5470         struct mouse_info the_mouse;
5471         ioctl(0, CONS_MOUSECTL, &the_mouse);
5472
5473   ;
5474   return 0;
5475 }
5476 _ACEOF
5477 rm -f conftest.$ac_objext
5478 if { (eval echo "$as_me:5478: \"$ac_compile\"") >&5
5479   (eval $ac_compile) 2>&5
5480   ac_status=$?
5481   echo "$as_me:5481: \$? = $ac_status" >&5
5482   (exit $ac_status); } &&
5483          { ac_try='test -s conftest.$ac_objext'
5484   { (eval echo "$as_me:5484: \"$ac_try\"") >&5
5485   (eval $ac_try) 2>&5
5486   ac_status=$?
5487   echo "$as_me:5487: \$? = $ac_status" >&5
5488   (exit $ac_status); }; }; then
5489   cf_with_sysmouse=yes
5490 else
5491   echo "$as_me: failed program was:" >&5
5492 cat conftest.$ac_ext >&5
5493 cf_with_sysmouse=no
5494 fi
5495 rm -f conftest.$ac_objext conftest.$ac_ext
5496         fi
5497 echo "$as_me:5497: result: $cf_with_sysmouse" >&5
5498 echo "${ECHO_T}$cf_with_sysmouse" >&6
5499 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5500 #define USE_SYSMOUSE 1
5501 EOF
5502
5503 fi
5504
5505 if test X"$CC_G_OPT" = X"" ; then
5506         CC_G_OPT='-g'
5507         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5508 fi
5509
5510 if test X"$CXX_G_OPT" = X"" ; then
5511         CXX_G_OPT='-g'
5512         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5513 fi
5514
5515 echo "$as_me:5515: checking for default loader flags" >&5
5516 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5517 case $DFT_LWR_MODEL in
5518 libtool) LD_MODEL=''   ;;
5519 normal)  LD_MODEL=''   ;;
5520 debug)   LD_MODEL=$CC_G_OPT ;;
5521 profile) LD_MODEL='-pg';;
5522 shared)  LD_MODEL=''   ;;
5523 esac
5524 echo "$as_me:5524: result: $LD_MODEL" >&5
5525 echo "${ECHO_T}$LD_MODEL" >&6
5526
5527 case $DFT_LWR_MODEL in
5528 shared)
5529
5530 echo "$as_me:5530: checking if rpath option should be used" >&5
5531 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5532
5533 # Check whether --enable-rpath or --disable-rpath was given.
5534 if test "${enable_rpath+set}" = set; then
5535   enableval="$enable_rpath"
5536   cf_cv_enable_rpath=$enableval
5537 else
5538   cf_cv_enable_rpath=no
5539 fi;
5540 echo "$as_me:5540: result: $cf_cv_enable_rpath" >&5
5541 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5542
5543 echo "$as_me:5543: checking if shared libraries should be relinked during install" >&5
5544 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5545
5546 # Check whether --enable-relink or --disable-relink was given.
5547 if test "${enable_relink+set}" = set; then
5548   enableval="$enable_relink"
5549   cf_cv_do_relink=$enableval
5550 else
5551   cf_cv_do_relink=yes
5552 fi;
5553 echo "$as_me:5553: result: $cf_cv_do_relink" >&5
5554 echo "${ECHO_T}$cf_cv_do_relink" >&6
5555         ;;
5556 esac
5557
5558 LD_RPATH_OPT=
5559 echo "$as_me:5559: checking for an rpath option" >&5
5560 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5561 case $cf_cv_system_name in #(vi
5562 irix*) #(vi
5563         if test "$GCC" = yes; then
5564                 LD_RPATH_OPT="-Wl,-rpath,"
5565         else
5566                 LD_RPATH_OPT="-rpath "
5567         fi
5568         ;;
5569 linux*|gnu*|k*bsd*-gnu) #(vi
5570         LD_RPATH_OPT="-Wl,-rpath,"
5571         ;;
5572 openbsd[2-9].*|mirbsd*) #(vi
5573         LD_RPATH_OPT="-Wl,-rpath,"
5574         ;;
5575 dragonfly*|freebsd*) #(vi
5576         LD_RPATH_OPT="-rpath "
5577         ;;
5578 netbsd*) #(vi
5579         LD_RPATH_OPT="-Wl,-rpath,"
5580         ;;
5581 osf*|mls+*) #(vi
5582         LD_RPATH_OPT="-rpath "
5583         ;;
5584 solaris2*) #(vi
5585         LD_RPATH_OPT="-R"
5586         ;;
5587 *)
5588         ;;
5589 esac
5590 echo "$as_me:5590: result: $LD_RPATH_OPT" >&5
5591 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5592
5593 case "x$LD_RPATH_OPT" in #(vi
5594 x-R*)
5595         echo "$as_me:5595: checking if we need a space after rpath option" >&5
5596 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5597         cf_save_LIBS="$LIBS"
5598         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5599         cat >conftest.$ac_ext <<_ACEOF
5600 #line 5600 "configure"
5601 #include "confdefs.h"
5602
5603 int
5604 main ()
5605 {
5606
5607   ;
5608   return 0;
5609 }
5610 _ACEOF
5611 rm -f conftest.$ac_objext conftest$ac_exeext
5612 if { (eval echo "$as_me:5612: \"$ac_link\"") >&5
5613   (eval $ac_link) 2>&5
5614   ac_status=$?
5615   echo "$as_me:5615: \$? = $ac_status" >&5
5616   (exit $ac_status); } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:5618: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:5621: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   cf_rpath_space=no
5624 else
5625   echo "$as_me: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5627 cf_rpath_space=yes
5628 fi
5629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5630         LIBS="$cf_save_LIBS"
5631         echo "$as_me:5631: result: $cf_rpath_space" >&5
5632 echo "${ECHO_T}$cf_rpath_space" >&6
5633         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5634         ;;
5635 esac
5636
5637         LOCAL_LDFLAGS=
5638         LOCAL_LDFLAGS2=
5639         LD_SHARED_OPTS=
5640         INSTALL_LIB="-m 644"
5641
5642         cf_cv_do_symlinks=no
5643         cf_ld_rpath_opt=
5644         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5645
5646         echo "$as_me:5646: checking if release/abi version should be used for shared libs" >&5
5647 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5648
5649 # Check whether --with-shlib-version or --without-shlib-version was given.
5650 if test "${with_shlib_version+set}" = set; then
5651   withval="$with_shlib_version"
5652   test -z "$withval" && withval=auto
5653         case $withval in #(vi
5654         yes) #(vi
5655                 cf_cv_shlib_version=auto
5656                 ;;
5657         rel|abi|auto|no) #(vi
5658                 cf_cv_shlib_version=$withval
5659                 ;;
5660         *)
5661                 { { echo "$as_me:5661: error: option value must be one of: rel, abi, auto or no" >&5
5662 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5663    { (exit 1); exit 1; }; }
5664                 ;;
5665         esac
5666
5667 else
5668   cf_cv_shlib_version=auto
5669 fi;
5670         echo "$as_me:5670: result: $cf_cv_shlib_version" >&5
5671 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5672
5673         cf_cv_rm_so_locs=no
5674
5675         # Some less-capable ports of gcc support only -fpic
5676         CC_SHARED_OPTS=
5677         if test "$GCC" = yes
5678         then
5679                 echo "$as_me:5679: checking which $CC option to use" >&5
5680 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5681                 cf_save_CFLAGS="$CFLAGS"
5682                 for CC_SHARED_OPTS in -fPIC -fpic ''
5683                 do
5684                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5685                         cat >conftest.$ac_ext <<_ACEOF
5686 #line 5686 "configure"
5687 #include "confdefs.h"
5688 #include <stdio.h>
5689 int
5690 main ()
5691 {
5692 int x = 1
5693   ;
5694   return 0;
5695 }
5696 _ACEOF
5697 rm -f conftest.$ac_objext
5698 if { (eval echo "$as_me:5698: \"$ac_compile\"") >&5
5699   (eval $ac_compile) 2>&5
5700   ac_status=$?
5701   echo "$as_me:5701: \$? = $ac_status" >&5
5702   (exit $ac_status); } &&
5703          { ac_try='test -s conftest.$ac_objext'
5704   { (eval echo "$as_me:5704: \"$ac_try\"") >&5
5705   (eval $ac_try) 2>&5
5706   ac_status=$?
5707   echo "$as_me:5707: \$? = $ac_status" >&5
5708   (exit $ac_status); }; }; then
5709   break
5710 else
5711   echo "$as_me: failed program was:" >&5
5712 cat conftest.$ac_ext >&5
5713 fi
5714 rm -f conftest.$ac_objext conftest.$ac_ext
5715                 done
5716                 echo "$as_me:5716: result: $CC_SHARED_OPTS" >&5
5717 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5718                 CFLAGS="$cf_save_CFLAGS"
5719         fi
5720
5721         cf_cv_shlib_version_infix=no
5722
5723         case $cf_cv_system_name in #(vi
5724         aix4.3-9*|aix[5-7]*) #(vi
5725                 if test "$GCC" = yes; then
5726                         CC_SHARED_OPTS=
5727                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5728                 else
5729                         # CC_SHARED_OPTS='-qpic=large -G'
5730                         # perhaps "-bM:SRE -bnoentry -bexpall"
5731                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5732                 fi
5733                 ;;
5734         beos*) #(vi
5735                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5736                 ;;
5737         cygwin*) #(vi
5738                 CC_SHARED_OPTS=
5739                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5740                 cf_cv_shlib_version=cygdll
5741                 cf_cv_shlib_version_infix=cygdll
5742                 cat >mk_shared_lib.sh <<-CF_EOF
5743                 #!/bin/sh
5744                 SHARED_LIB=\$1
5745                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5746                 shift
5747                 cat <<-EOF
5748                 Linking shared library
5749                 ** SHARED_LIB \$SHARED_LIB
5750                 ** IMPORT_LIB \$IMPORT_LIB
5751 EOF
5752                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5753 CF_EOF
5754                 chmod +x mk_shared_lib.sh
5755                 ;;
5756         darwin*) #(vi
5757                 EXTRA_CFLAGS="-no-cpp-precomp"
5758                 CC_SHARED_OPTS="-dynamic"
5759                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5760                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5761                 cf_cv_shlib_version_infix=yes
5762                 echo "$as_me:5762: checking if ld -search_paths_first works" >&5
5763 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5764 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5765   echo $ECHO_N "(cached) $ECHO_C" >&6
5766 else
5767
5768                         cf_save_LDFLAGS=$LDFLAGS
5769                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5770                         cat >conftest.$ac_ext <<_ACEOF
5771 #line 5771 "configure"
5772 #include "confdefs.h"
5773
5774 int
5775 main ()
5776 {
5777 int i;
5778   ;
5779   return 0;
5780 }
5781 _ACEOF
5782 rm -f conftest.$ac_objext conftest$ac_exeext
5783 if { (eval echo "$as_me:5783: \"$ac_link\"") >&5
5784   (eval $ac_link) 2>&5
5785   ac_status=$?
5786   echo "$as_me:5786: \$? = $ac_status" >&5
5787   (exit $ac_status); } &&
5788          { ac_try='test -s conftest$ac_exeext'
5789   { (eval echo "$as_me:5789: \"$ac_try\"") >&5
5790   (eval $ac_try) 2>&5
5791   ac_status=$?
5792   echo "$as_me:5792: \$? = $ac_status" >&5
5793   (exit $ac_status); }; }; then
5794   cf_cv_ldflags_search_paths_first=yes
5795 else
5796   echo "$as_me: failed program was:" >&5
5797 cat conftest.$ac_ext >&5
5798 cf_cv_ldflags_search_paths_first=no
5799 fi
5800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5801                                 LDFLAGS=$cf_save_LDFLAGS
5802 fi
5803 echo "$as_me:5803: result: $cf_cv_ldflags_search_paths_first" >&5
5804 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5805                 if test $cf_cv_ldflags_search_paths_first = yes; then
5806                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5807                 fi
5808                 ;;
5809         hpux*) #(vi
5810                 # (tested with gcc 2.7.2 -- I don't have c89)
5811                 if test "$GCC" = yes; then
5812                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5813                 else
5814                         CC_SHARED_OPTS='+Z'
5815                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5816                 fi
5817                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5818                 # HP-UX shared libraries must be executable, and should be
5819                 # readonly to exploit a quirk in the memory manager.
5820                 INSTALL_LIB="-m 555"
5821                 ;;
5822         interix*)
5823                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5824                 if test "$cf_cv_shlib_version" = rel; then
5825                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5826                 else
5827                         cf_shared_soname='`basename `'
5828                 fi
5829                 CC_SHARED_OPTS=
5830                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5831                 ;;
5832         irix*) #(vi
5833                 if test "$cf_cv_enable_rpath" = yes ; then
5834                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5835                 fi
5836                 # tested with IRIX 5.2 and 'cc'.
5837                 if test "$GCC" != yes; then
5838                         CC_SHARED_OPTS='-KPIC'
5839                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5840                 else
5841                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5842                 fi
5843                 cf_cv_rm_so_locs=yes
5844                 ;;
5845         linux*|gnu*|k*bsd*-gnu) #(vi
5846                 if test "$DFT_LWR_MODEL" = "shared" ; then
5847                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5848                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5849                 fi
5850                 if test "$cf_cv_enable_rpath" = yes ; then
5851                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5852                 fi
5853
5854         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5855         if test "$cf_cv_shlib_version" = rel; then
5856                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5857         else
5858                 cf_cv_shared_soname='`basename $@`'
5859         fi
5860
5861                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5862                 ;;
5863         mingw*) #(vi
5864                 cf_cv_shlib_version=mingw
5865                 cf_cv_shlib_version_infix=mingw
5866                 CC_SHARED_OPTS=
5867                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5868                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5869                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5870                 cat >mk_shared_lib.sh <<-CF_EOF
5871                 #!/bin/sh
5872                 SHARED_LIB=\$1
5873                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5874                 shift
5875                 cat <<-EOF
5876                 Linking shared library
5877                 ** SHARED_LIB \$SHARED_LIB
5878                 ** IMPORT_LIB \$IMPORT_LIB
5879 EOF
5880                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5881 CF_EOF
5882                 chmod +x mk_shared_lib.sh
5883                 ;;
5884         openbsd[2-9].*|mirbsd*) #(vi
5885                 if test "$DFT_LWR_MODEL" = "shared" ; then
5886                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5887                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5888                 fi
5889                 if test "$cf_cv_enable_rpath" = yes ; then
5890                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5891                 fi
5892                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5893
5894         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5895         if test "$cf_cv_shlib_version" = rel; then
5896                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5897         else
5898                 cf_cv_shared_soname='`basename $@`'
5899         fi
5900
5901                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5902                 ;;
5903         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5904                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5905                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5906                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5907                 ;;
5908         dragonfly*|freebsd*) #(vi
5909                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5910                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5911                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5912                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5913                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5914                 fi
5915
5916         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5917         if test "$cf_cv_shlib_version" = rel; then
5918                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5919         else
5920                 cf_cv_shared_soname='`basename $@`'
5921         fi
5922
5923                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5924                 ;;
5925         netbsd*) #(vi
5926                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5927                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5928                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5929                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5930                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5931                         if test "$cf_cv_shlib_version" = auto; then
5932                         if test -f /usr/libexec/ld.elf_so; then
5933                                 cf_cv_shlib_version=abi
5934                         else
5935                                 cf_cv_shlib_version=rel
5936                         fi
5937                         fi
5938
5939         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5940         if test "$cf_cv_shlib_version" = rel; then
5941                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5942         else
5943                 cf_cv_shared_soname='`basename $@`'
5944         fi
5945
5946                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5947                 else
5948                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5949                 fi
5950                 ;;
5951         osf*|mls+*) #(vi
5952                 # tested with OSF/1 V3.2 and 'cc'
5953                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5954                 # link with shared libs).
5955                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5956                 case $host_os in #(vi
5957                 osf4*)
5958                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5959                         ;;
5960                 esac
5961                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5962                 if test "$DFT_LWR_MODEL" = "shared" ; then
5963                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5964                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5965                 fi
5966                 cf_cv_rm_so_locs=yes
5967                 ;;
5968         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5969                 # tested with osr5.0.5
5970                 if test "$GCC" != yes; then
5971                         CC_SHARED_OPTS='-belf -KPIC'
5972                 fi
5973                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5974                 if test "$cf_cv_enable_rpath" = yes ; then
5975                         # only way is to set LD_RUN_PATH but no switch for it
5976                         RUN_PATH=$libdir
5977                 fi
5978                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5979                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5980                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5981                 ;;
5982         sunos4*) #(vi
5983                 # tested with SunOS 4.1.1 and gcc 2.7.0
5984                 if test "$GCC" != yes; then
5985                         CC_SHARED_OPTS='-KPIC'
5986                 fi
5987                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5988                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5989                 ;;
5990         solaris2*) #(vi
5991                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5992                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5993                 if test "$DFT_LWR_MODEL" = "shared" ; then
5994                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5995                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5996                 fi
5997                 if test "$cf_cv_enable_rpath" = yes ; then
5998                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5999                 fi
6000
6001         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6002         if test "$cf_cv_shlib_version" = rel; then
6003                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6004         else
6005                 cf_cv_shared_soname='`basename $@`'
6006         fi
6007
6008                 if test "$GCC" != yes; then
6009                         cf_save_CFLAGS="$CFLAGS"
6010                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6011                         do
6012                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6013                                 cat >conftest.$ac_ext <<_ACEOF
6014 #line 6014 "configure"
6015 #include "confdefs.h"
6016 #include <stdio.h>
6017 int
6018 main ()
6019 {
6020 printf("Hello\n");
6021   ;
6022   return 0;
6023 }
6024 _ACEOF
6025 rm -f conftest.$ac_objext
6026 if { (eval echo "$as_me:6026: \"$ac_compile\"") >&5
6027   (eval $ac_compile) 2>&5
6028   ac_status=$?
6029   echo "$as_me:6029: \$? = $ac_status" >&5
6030   (exit $ac_status); } &&
6031          { ac_try='test -s conftest.$ac_objext'
6032   { (eval echo "$as_me:6032: \"$ac_try\"") >&5
6033   (eval $ac_try) 2>&5
6034   ac_status=$?
6035   echo "$as_me:6035: \$? = $ac_status" >&5
6036   (exit $ac_status); }; }; then
6037   break
6038 else
6039   echo "$as_me: failed program was:" >&5
6040 cat conftest.$ac_ext >&5
6041 fi
6042 rm -f conftest.$ac_objext conftest.$ac_ext
6043                         done
6044                         CFLAGS="$cf_save_CFLAGS"
6045                         CC_SHARED_OPTS=$cf_shared_opts
6046                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6047                 else
6048                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6049                 fi
6050                 ;;
6051         sysv5uw7*|unix_sv*) #(vi
6052                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6053                 if test "$GCC" != yes; then
6054                         CC_SHARED_OPTS='-KPIC'
6055                 fi
6056                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6057                 ;;
6058         *)
6059                 CC_SHARED_OPTS='unknown'
6060                 MK_SHARED_LIB='echo unknown'
6061                 ;;
6062         esac
6063
6064         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6065         case "$cf_cv_shlib_version" in #(vi
6066         rel|abi)
6067                 case "$MK_SHARED_LIB" in #(vi
6068                 *'-o $@') #(vi
6069                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6070                         ;;
6071                 *)
6072                         { echo "$as_me:6072: WARNING: ignored --with-shlib-version" >&5
6073 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6074                         ;;
6075                 esac
6076                 ;;
6077         esac
6078
6079         # RPATH_LIST is a colon-separated list of directories
6080         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6081         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6082
6083         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6084
6085 echo "${as_me:-configure}:6085: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6086
6087         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6088
6089 echo "${as_me:-configure}:6089: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6090
6091 if test "$CC_SHARED_OPTS" = "unknown"; then
6092         for model in $cf_list_models; do
6093                 if test "$model" = "shared"; then
6094                         { { echo "$as_me:6094: error: Shared libraries are not supported in this version" >&5
6095 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6096    { (exit 1); exit 1; }; }
6097                 fi
6098         done
6099 fi
6100
6101 ### If we're building with rpath, try to link non-standard libs that way too.
6102 if test "$DFT_LWR_MODEL" = "shared"; then
6103
6104 echo "$as_me:6104: checking if rpath-hack should be disabled" >&5
6105 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6106
6107 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6108 if test "${enable_rpath_hack+set}" = set; then
6109   enableval="$enable_rpath_hack"
6110   test "$enableval" != no && enableval=yes
6111   if test "$enableval" != "yes" ; then
6112     cf_disable_rpath_hack=yes
6113   else
6114     cf_disable_rpath_hack=no
6115   fi
6116 else
6117   enableval=yes
6118   cf_disable_rpath_hack=no
6119
6120 fi;
6121 echo "$as_me:6121: result: $cf_disable_rpath_hack" >&5
6122 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6123 if test "$cf_disable_rpath_hack" = no ; then
6124
6125 echo "$as_me:6125: checking for updated LDFLAGS" >&5
6126 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6127 if test -n "$LD_RPATH_OPT" ; then
6128         echo "$as_me:6128: result: maybe" >&5
6129 echo "${ECHO_T}maybe" >&6
6130
6131         for ac_prog in ldd
6132 do
6133   # Extract the first word of "$ac_prog", so it can be a program name with args.
6134 set dummy $ac_prog; ac_word=$2
6135 echo "$as_me:6135: checking for $ac_word" >&5
6136 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6137 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6138   echo $ECHO_N "(cached) $ECHO_C" >&6
6139 else
6140   if test -n "$cf_ldd_prog"; then
6141   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6142 else
6143   ac_save_IFS=$IFS; IFS=$ac_path_separator
6144 ac_dummy="$PATH"
6145 for ac_dir in $ac_dummy; do
6146   IFS=$ac_save_IFS
6147   test -z "$ac_dir" && ac_dir=.
6148   $as_executable_p "$ac_dir/$ac_word" || continue
6149 ac_cv_prog_cf_ldd_prog="$ac_prog"
6150 echo "$as_me:6150: found $ac_dir/$ac_word" >&5
6151 break
6152 done
6153
6154 fi
6155 fi
6156 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6157 if test -n "$cf_ldd_prog"; then
6158   echo "$as_me:6158: result: $cf_ldd_prog" >&5
6159 echo "${ECHO_T}$cf_ldd_prog" >&6
6160 else
6161   echo "$as_me:6161: result: no" >&5
6162 echo "${ECHO_T}no" >&6
6163 fi
6164
6165   test -n "$cf_ldd_prog" && break
6166 done
6167 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6168
6169         cf_rpath_list="/usr/lib /lib"
6170         if test "$cf_ldd_prog" != no
6171         then
6172                 cf_rpath_oops=
6173
6174 cat >conftest.$ac_ext <<_ACEOF
6175 #line 6175 "configure"
6176 #include "confdefs.h"
6177 #include <stdio.h>
6178 int
6179 main ()
6180 {
6181 printf("Hello");
6182   ;
6183   return 0;
6184 }
6185 _ACEOF
6186 rm -f conftest.$ac_objext conftest$ac_exeext
6187 if { (eval echo "$as_me:6187: \"$ac_link\"") >&5
6188   (eval $ac_link) 2>&5
6189   ac_status=$?
6190   echo "$as_me:6190: \$? = $ac_status" >&5
6191   (exit $ac_status); } &&
6192          { ac_try='test -s conftest$ac_exeext'
6193   { (eval echo "$as_me:6193: \"$ac_try\"") >&5
6194   (eval $ac_try) 2>&5
6195   ac_status=$?
6196   echo "$as_me:6196: \$? = $ac_status" >&5
6197   (exit $ac_status); }; }; then
6198   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6199                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6200 else
6201   echo "$as_me: failed program was:" >&5
6202 cat conftest.$ac_ext >&5
6203 fi
6204 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6205
6206                 # If we passed the link-test, but get a "not found" on a given library,
6207                 # this could be due to inept reconfiguration of gcc to make it only
6208                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6209                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6210                 # /usr/local libraries.
6211                 if test -n "$cf_rpath_oops"
6212                 then
6213                         for cf_rpath_src in $cf_rpath_oops
6214                         do
6215                                 for cf_rpath_dir in \
6216                                         /usr/local \
6217                                         /usr/pkg \
6218                                         /opt/sfw
6219                                 do
6220                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6221                                         then
6222                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6223
6224 echo "${as_me:-configure}:6224: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6225
6226                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6227                                                 break
6228                                         fi
6229                                 done
6230                         done
6231                 fi
6232         fi
6233
6234         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6235
6236 echo "${as_me:-configure}:6236: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6237
6238 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6239
6240 echo "${as_me:-configure}:6240: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6241
6242 cf_rpath_dst=
6243 for cf_rpath_src in $LDFLAGS
6244 do
6245         case $cf_rpath_src in #(vi
6246         -L*) #(vi
6247
6248                 # check if this refers to a directory which we will ignore
6249                 cf_rpath_skip=no
6250                 if test -n "$cf_rpath_list"
6251                 then
6252                         for cf_rpath_item in $cf_rpath_list
6253                         do
6254                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6255                                 then
6256                                         cf_rpath_skip=yes
6257                                         break
6258                                 fi
6259                         done
6260                 fi
6261
6262                 if test "$cf_rpath_skip" = no
6263                 then
6264                         # transform the option
6265                         if test "$LD_RPATH_OPT" = "-R " ; then
6266                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6267                         else
6268                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6269                         fi
6270
6271                         # if we have not already added this, add it now
6272                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6273                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6274                         then
6275                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6276
6277 echo "${as_me:-configure}:6277: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6278
6279                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6280                         fi
6281                 fi
6282                 ;;
6283         esac
6284         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6285 done
6286 LDFLAGS=$cf_rpath_dst
6287
6288 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6289
6290 echo "${as_me:-configure}:6290: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6291
6292 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing ...checking LIBS $LIBS ..." 1>&5
6295
6296 cf_rpath_dst=
6297 for cf_rpath_src in $LIBS
6298 do
6299         case $cf_rpath_src in #(vi
6300         -L*) #(vi
6301
6302                 # check if this refers to a directory which we will ignore
6303                 cf_rpath_skip=no
6304                 if test -n "$cf_rpath_list"
6305                 then
6306                         for cf_rpath_item in $cf_rpath_list
6307                         do
6308                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6309                                 then
6310                                         cf_rpath_skip=yes
6311                                         break
6312                                 fi
6313                         done
6314                 fi
6315
6316                 if test "$cf_rpath_skip" = no
6317                 then
6318                         # transform the option
6319                         if test "$LD_RPATH_OPT" = "-R " ; then
6320                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6321                         else
6322                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6323                         fi
6324
6325                         # if we have not already added this, add it now
6326                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6327                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6328                         then
6329                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6330
6331 echo "${as_me:-configure}:6331: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6332
6333                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6334                         fi
6335                 fi
6336                 ;;
6337         esac
6338         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6339 done
6340 LIBS=$cf_rpath_dst
6341
6342 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6343
6344 echo "${as_me:-configure}:6344: testing ...checked LIBS $LIBS ..." 1>&5
6345
6346         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6347
6348 echo "${as_me:-configure}:6348: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6349
6350 fi
6351
6352 fi
6353
6354 fi
6355
6356 ###############################################################################
6357
6358 ###     use option --disable-overwrite to leave out the link to -lcurses
6359 echo "$as_me:6359: checking if you wish to install ncurses overwriting curses" >&5
6360 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6361
6362 # Check whether --enable-overwrite or --disable-overwrite was given.
6363 if test "${enable_overwrite+set}" = set; then
6364   enableval="$enable_overwrite"
6365   with_overwrite=$enableval
6366 else
6367   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6368 fi;
6369 echo "$as_me:6369: result: $with_overwrite" >&5
6370 echo "${ECHO_T}$with_overwrite" >&6
6371
6372 echo "$as_me:6372: checking if external terminfo-database is used" >&5
6373 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6374
6375 # Check whether --enable-database or --disable-database was given.
6376 if test "${enable_database+set}" = set; then
6377   enableval="$enable_database"
6378   use_database=$enableval
6379 else
6380   use_database=yes
6381 fi;
6382 echo "$as_me:6382: result: $use_database" >&5
6383 echo "${ECHO_T}$use_database" >&6
6384
6385 case $host_os in #(vi
6386 os2*) #(vi
6387         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6388         ;;
6389 *) #(vi
6390         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6391         ;;
6392 esac
6393
6394 if test "$use_database" != no ; then
6395         cat >>confdefs.h <<\EOF
6396 #define USE_DATABASE 1
6397 EOF
6398
6399         echo "$as_me:6399: checking which terminfo source-file will be installed" >&5
6400 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6401
6402 # Check whether --with-database or --without-database was given.
6403 if test "${with_database+set}" = set; then
6404   withval="$with_database"
6405   TERMINFO_SRC=$withval
6406 fi;
6407         echo "$as_me:6407: result: $TERMINFO_SRC" >&5
6408 echo "${ECHO_T}$TERMINFO_SRC" >&6
6409
6410         echo "$as_me:6410: checking whether to use hashed database instead of directory/tree" >&5
6411 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6412
6413 # Check whether --with-hashed-db or --without-hashed-db was given.
6414 if test "${with_hashed_db+set}" = set; then
6415   withval="$with_hashed_db"
6416
6417 else
6418   with_hashed_db=no
6419 fi;
6420         echo "$as_me:6420: result: $with_hashed_db" >&5
6421 echo "${ECHO_T}$with_hashed_db" >&6
6422 else
6423         with_hashed_db=no
6424 fi
6425
6426 echo "$as_me:6426: checking for list of fallback descriptions" >&5
6427 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6428
6429 # Check whether --with-fallbacks or --without-fallbacks was given.
6430 if test "${with_fallbacks+set}" = set; then
6431   withval="$with_fallbacks"
6432   with_fallback=$withval
6433 else
6434   with_fallback=
6435 fi;
6436 echo "$as_me:6436: result: $with_fallback" >&5
6437 echo "${ECHO_T}$with_fallback" >&6
6438 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6439
6440 echo "$as_me:6440: checking if you want modern xterm or antique" >&5
6441 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6442
6443 # Check whether --with-xterm-new or --without-xterm-new was given.
6444 if test "${with_xterm_new+set}" = set; then
6445   withval="$with_xterm_new"
6446   with_xterm_new=$withval
6447 else
6448   with_xterm_new=yes
6449 fi;
6450 case $with_xterm_new in
6451 no)     with_xterm_new=xterm-old;;
6452 *)      with_xterm_new=xterm-new;;
6453 esac
6454 echo "$as_me:6454: result: $with_xterm_new" >&5
6455 echo "${ECHO_T}$with_xterm_new" >&6
6456 WHICH_XTERM=$with_xterm_new
6457
6458 echo "$as_me:6458: checking if xterm backspace sends BS or DEL" >&5
6459 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6460
6461 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6462 if test "${with_xterm_kbs+set}" = set; then
6463   withval="$with_xterm_kbs"
6464   with_xterm_kbs=$withval
6465 else
6466   with_xterm_kbs=BS
6467 fi;
6468 case x$with_xterm_kbs in
6469 xyes|xno|xBS|xbs|x8)
6470         with_xterm_kbs=BS
6471         ;;
6472 xDEL|xdel|x127)
6473         with_xterm_kbs=DEL
6474         ;;
6475 *)
6476         with_xterm_kbs=$withval
6477         ;;
6478 esac
6479 echo "$as_me:6479: result: $with_xterm_kbs" >&5
6480 echo "${ECHO_T}$with_xterm_kbs" >&6
6481 XTERM_KBS=$with_xterm_kbs
6482
6483 MAKE_TERMINFO=
6484 if test "$use_database" = no ; then
6485         TERMINFO="${datadir}/terminfo"
6486         MAKE_TERMINFO="#"
6487 else
6488
6489 echo "$as_me:6489: checking for list of terminfo directories" >&5
6490 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6491
6492         case $cf_cv_system_name in
6493         os2*)   PATH_SEPARATOR=';'  ;;
6494         *)      PATH_SEPARATOR=':'  ;;
6495         esac
6496
6497 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6498 if test "${with_terminfo_dirs+set}" = set; then
6499   withval="$with_terminfo_dirs"
6500
6501 else
6502   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6503 fi;
6504 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6505 cf_dst_path=
6506 for cf_src_path in $withval
6507 do
6508
6509 if test "x$prefix" != xNONE; then
6510   cf_path_syntax="$prefix"
6511 else
6512   cf_path_syntax="$ac_default_prefix"
6513 fi
6514
6515 case ".$cf_src_path" in #(vi
6516 .\$\(*\)*|.\'*\'*) #(vi
6517   ;;
6518 ..|./*|.\\*) #(vi
6519   ;;
6520 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6521   ;;
6522 .\${*prefix}*) #(vi
6523   eval cf_src_path="$cf_src_path"
6524   case ".$cf_src_path" in #(vi
6525   .NONE/*)
6526     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6527     ;;
6528   esac
6529   ;; #(vi
6530 .no|.NONE/*)
6531   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6532   ;;
6533 *)
6534   { { echo "$as_me:6534: error: expected a pathname, not \"$cf_src_path\"" >&5
6535 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6536    { (exit 1); exit 1; }; }
6537   ;;
6538 esac
6539
6540   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6541   cf_dst_path="${cf_dst_path}${cf_src_path}"
6542 done
6543 IFS="$ac_save_ifs"
6544
6545 eval 'TERMINFO_DIRS="$cf_dst_path"'
6546
6547 echo "$as_me:6547: result: $TERMINFO_DIRS" >&5
6548 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6549 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6550 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6551 EOF
6552
6553 echo "$as_me:6553: checking for default terminfo directory" >&5
6554 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6555
6556 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6557 if test "${with_default_terminfo_dir+set}" = set; then
6558   withval="$with_default_terminfo_dir"
6559
6560 else
6561   withval="${TERMINFO:-${datadir}/terminfo}"
6562 fi; if test -n "${datadir}/terminfo" ; then
6563
6564 if test "x$prefix" != xNONE; then
6565   cf_path_syntax="$prefix"
6566 else
6567   cf_path_syntax="$ac_default_prefix"
6568 fi
6569
6570 case ".$withval" in #(vi
6571 .\$\(*\)*|.\'*\'*) #(vi
6572   ;;
6573 ..|./*|.\\*) #(vi
6574   ;;
6575 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6576   ;;
6577 .\${*prefix}*) #(vi
6578   eval withval="$withval"
6579   case ".$withval" in #(vi
6580   .NONE/*)
6581     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6582     ;;
6583   esac
6584   ;; #(vi
6585 .no|.NONE/*)
6586   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6587   ;;
6588 *)
6589   { { echo "$as_me:6589: error: expected a pathname, not \"$withval\"" >&5
6590 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6591    { (exit 1); exit 1; }; }
6592   ;;
6593 esac
6594
6595 fi
6596 TERMINFO="$withval"
6597
6598 echo "$as_me:6598: result: $TERMINFO" >&5
6599 echo "${ECHO_T}$TERMINFO" >&6
6600 cat >>confdefs.h <<EOF
6601 #define TERMINFO "$TERMINFO"
6602 EOF
6603
6604 fi
6605
6606 ###     use option --disable-big-core to make tic run on small machines
6607 ###     We need 4Mb, check if we can allocate 50% more than that.
6608 echo "$as_me:6608: checking if big-core option selected" >&5
6609 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6610
6611 # Check whether --enable-big-core or --disable-big-core was given.
6612 if test "${enable_big_core+set}" = set; then
6613   enableval="$enable_big_core"
6614   with_big_core=$enableval
6615 else
6616   if test "$cross_compiling" = yes; then
6617   with_big_core=no
6618 else
6619   cat >conftest.$ac_ext <<_ACEOF
6620 #line 6620 "configure"
6621 #include "confdefs.h"
6622
6623 #include <stdlib.h>
6624 #include <string.h>
6625 int main() {
6626         unsigned long n = 6000000L;
6627         char *s = malloc(n);
6628         if (s != 0)
6629                 s[0] = s[n-1] = 0;
6630         ${cf_cv_main_return:-return}(s == 0);
6631 }
6632 _ACEOF
6633 rm -f conftest$ac_exeext
6634 if { (eval echo "$as_me:6634: \"$ac_link\"") >&5
6635   (eval $ac_link) 2>&5
6636   ac_status=$?
6637   echo "$as_me:6637: \$? = $ac_status" >&5
6638   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6639   { (eval echo "$as_me:6639: \"$ac_try\"") >&5
6640   (eval $ac_try) 2>&5
6641   ac_status=$?
6642   echo "$as_me:6642: \$? = $ac_status" >&5
6643   (exit $ac_status); }; }; then
6644   with_big_core=yes
6645 else
6646   echo "$as_me: program exited with status $ac_status" >&5
6647 echo "$as_me: failed program was:" >&5
6648 cat conftest.$ac_ext >&5
6649 with_big_core=no
6650 fi
6651 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6652 fi
6653 fi;
6654 echo "$as_me:6654: result: $with_big_core" >&5
6655 echo "${ECHO_T}$with_big_core" >&6
6656 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6657 #define HAVE_BIG_CORE 1
6658 EOF
6659
6660 ### ISO C only guarantees 512-char strings, we have tables which load faster
6661 ### when constructed using "big" strings.  More than the C compiler, the awk
6662 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6663 echo "$as_me:6663: checking if big-strings option selected" >&5
6664 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6665
6666 # Check whether --enable-big-strings or --disable-big-strings was given.
6667 if test "${enable_big_strings+set}" = set; then
6668   enableval="$enable_big_strings"
6669   with_big_strings=$enableval
6670 else
6671
6672         case x$AWK in #(vi
6673         x)
6674                 eval with_big_strings=no
6675                 ;;
6676         *) #(vi
6677                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6678                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6679                         eval with_big_strings=yes
6680                 else
6681                         eval with_big_strings=no
6682                 fi
6683                 ;;
6684         esac
6685
6686 fi;
6687 echo "$as_me:6687: result: $with_big_strings" >&5
6688 echo "${ECHO_T}$with_big_strings" >&6
6689
6690 USE_BIG_STRINGS=0
6691 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6692
6693 ###     use option --enable-termcap to compile in the termcap fallback support
6694 echo "$as_me:6694: checking if you want termcap-fallback support" >&5
6695 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6696
6697 # Check whether --enable-termcap or --disable-termcap was given.
6698 if test "${enable_termcap+set}" = set; then
6699   enableval="$enable_termcap"
6700   with_termcap=$enableval
6701 else
6702   with_termcap=no
6703 fi;
6704 echo "$as_me:6704: result: $with_termcap" >&5
6705 echo "${ECHO_T}$with_termcap" >&6
6706
6707 if test "$with_termcap" != "yes" ; then
6708         if test "$use_database" = no ; then
6709                 if test -z "$with_fallback" ; then
6710                         { { echo "$as_me:6710: error: You have disabled the database w/o specifying fallbacks" >&5
6711 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6712    { (exit 1); exit 1; }; }
6713                 fi
6714         fi
6715         cat >>confdefs.h <<\EOF
6716 #define PURE_TERMINFO 1
6717 EOF
6718
6719 else
6720
6721 if test "$with_ticlib" != no ; then
6722         { { echo "$as_me:6722: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6723 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6724    { (exit 1); exit 1; }; }
6725 fi
6726
6727 cat >>confdefs.h <<\EOF
6728 #define USE_TERMCAP 1
6729 EOF
6730
6731 echo "$as_me:6731: checking for list of termcap files" >&5
6732 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6733
6734 # Check whether --with-termpath or --without-termpath was given.
6735 if test "${with_termpath+set}" = set; then
6736   withval="$with_termpath"
6737
6738 else
6739   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6740 fi;
6741 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6742 cf_dst_path=
6743 for cf_src_path in $withval
6744 do
6745
6746 if test "x$prefix" != xNONE; then
6747   cf_path_syntax="$prefix"
6748 else
6749   cf_path_syntax="$ac_default_prefix"
6750 fi
6751
6752 case ".$cf_src_path" in #(vi
6753 .\$\(*\)*|.\'*\'*) #(vi
6754   ;;
6755 ..|./*|.\\*) #(vi
6756   ;;
6757 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6758   ;;
6759 .\${*prefix}*) #(vi
6760   eval cf_src_path="$cf_src_path"
6761   case ".$cf_src_path" in #(vi
6762   .NONE/*)
6763     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6764     ;;
6765   esac
6766   ;; #(vi
6767 .no|.NONE/*)
6768   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6769   ;;
6770 *)
6771   { { echo "$as_me:6771: error: expected a pathname, not \"$cf_src_path\"" >&5
6772 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6773    { (exit 1); exit 1; }; }
6774   ;;
6775 esac
6776
6777   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6778   cf_dst_path="${cf_dst_path}${cf_src_path}"
6779 done
6780 IFS="$ac_save_ifs"
6781
6782 eval 'TERMPATH="$cf_dst_path"'
6783
6784 echo "$as_me:6784: result: $TERMPATH" >&5
6785 echo "${ECHO_T}$TERMPATH" >&6
6786 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6787 #define TERMPATH "$TERMPATH"
6788 EOF
6789
6790 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6791 echo "$as_me:6791: checking if fast termcap-loader is needed" >&5
6792 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6793
6794 # Check whether --enable-getcap or --disable-getcap was given.
6795 if test "${enable_getcap+set}" = set; then
6796   enableval="$enable_getcap"
6797   with_getcap=$enableval
6798 else
6799   with_getcap=no
6800 fi;
6801 echo "$as_me:6801: result: $with_getcap" >&5
6802 echo "${ECHO_T}$with_getcap" >&6
6803 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6804 #define USE_GETCAP 1
6805 EOF
6806
6807 echo "$as_me:6807: checking if translated termcaps will be cached in ~/.terminfo" >&5
6808 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6809
6810 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6811 if test "${enable_getcap_cache+set}" = set; then
6812   enableval="$enable_getcap_cache"
6813   with_getcap_cache=$enableval
6814 else
6815   with_getcap_cache=no
6816 fi;
6817 echo "$as_me:6817: result: $with_getcap_cache" >&5
6818 echo "${ECHO_T}$with_getcap_cache" >&6
6819 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6820 #define USE_GETCAP_CACHE 1
6821 EOF
6822
6823 fi
6824
6825 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6826 echo "$as_me:6826: checking if ~/.terminfo is wanted" >&5
6827 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6828
6829 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6830 if test "${enable_home_terminfo+set}" = set; then
6831   enableval="$enable_home_terminfo"
6832   with_home_terminfo=$enableval
6833 else
6834   with_home_terminfo=yes
6835 fi;
6836 echo "$as_me:6836: result: $with_home_terminfo" >&5
6837 echo "${ECHO_T}$with_home_terminfo" >&6
6838 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6839 #define USE_HOME_TERMINFO 1
6840 EOF
6841
6842 echo "$as_me:6842: checking if you want to use restricted environment when running as root" >&5
6843 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6844
6845 # Check whether --enable-root-environ or --disable-root-environ was given.
6846 if test "${enable_root_environ+set}" = set; then
6847   enableval="$enable_root_environ"
6848   with_root_environ=$enableval
6849 else
6850   with_root_environ=yes
6851 fi;
6852 echo "$as_me:6852: result: $with_root_environ" >&5
6853 echo "${ECHO_T}$with_root_environ" >&6
6854 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6855 #define USE_ROOT_ENVIRON 1
6856 EOF
6857
6858 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6859 ###   to reduce storage requirements for the terminfo database.
6860
6861 for ac_func in \
6862         remove \
6863         unlink
6864 do
6865 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6866 echo "$as_me:6866: checking for $ac_func" >&5
6867 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6868 if eval "test \"\${$as_ac_var+set}\" = set"; then
6869   echo $ECHO_N "(cached) $ECHO_C" >&6
6870 else
6871   cat >conftest.$ac_ext <<_ACEOF
6872 #line 6872 "configure"
6873 #include "confdefs.h"
6874 /* System header to define __stub macros and hopefully few prototypes,
6875     which can conflict with char $ac_func (); below.  */
6876 #include <assert.h>
6877 /* Override any gcc2 internal prototype to avoid an error.  */
6878 #ifdef __cplusplus
6879 extern "C"
6880 #endif
6881 /* We use char because int might match the return type of a gcc2
6882    builtin and then its argument prototype would still apply.  */
6883 char $ac_func ();
6884 char (*f) ();
6885
6886 int
6887 main ()
6888 {
6889 /* The GNU C library defines this for functions which it implements
6890     to always fail with ENOSYS.  Some functions are actually named
6891     something starting with __ and the normal name is an alias.  */
6892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6893 choke me
6894 #else
6895 f = $ac_func;
6896 #endif
6897
6898   ;
6899   return 0;
6900 }
6901 _ACEOF
6902 rm -f conftest.$ac_objext conftest$ac_exeext
6903 if { (eval echo "$as_me:6903: \"$ac_link\"") >&5
6904   (eval $ac_link) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit $ac_status); } &&
6908          { ac_try='test -s conftest$ac_exeext'
6909   { (eval echo "$as_me:6909: \"$ac_try\"") >&5
6910   (eval $ac_try) 2>&5
6911   ac_status=$?
6912   echo "$as_me:6912: \$? = $ac_status" >&5
6913   (exit $ac_status); }; }; then
6914   eval "$as_ac_var=yes"
6915 else
6916   echo "$as_me: failed program was:" >&5
6917 cat conftest.$ac_ext >&5
6918 eval "$as_ac_var=no"
6919 fi
6920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6921 fi
6922 echo "$as_me:6922: result: `eval echo '${'$as_ac_var'}'`" >&5
6923 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6924 if test `eval echo '${'$as_ac_var'}'` = yes; then
6925   cat >>confdefs.h <<EOF
6926 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6927 EOF
6928
6929 fi
6930 done
6931
6932 if test "$cross_compiling" = yes ; then
6933
6934 for ac_func in \
6935                 link \
6936                 symlink
6937 do
6938 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6939 echo "$as_me:6939: checking for $ac_func" >&5
6940 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6941 if eval "test \"\${$as_ac_var+set}\" = set"; then
6942   echo $ECHO_N "(cached) $ECHO_C" >&6
6943 else
6944   cat >conftest.$ac_ext <<_ACEOF
6945 #line 6945 "configure"
6946 #include "confdefs.h"
6947 /* System header to define __stub macros and hopefully few prototypes,
6948     which can conflict with char $ac_func (); below.  */
6949 #include <assert.h>
6950 /* Override any gcc2 internal prototype to avoid an error.  */
6951 #ifdef __cplusplus
6952 extern "C"
6953 #endif
6954 /* We use char because int might match the return type of a gcc2
6955    builtin and then its argument prototype would still apply.  */
6956 char $ac_func ();
6957 char (*f) ();
6958
6959 int
6960 main ()
6961 {
6962 /* The GNU C library defines this for functions which it implements
6963     to always fail with ENOSYS.  Some functions are actually named
6964     something starting with __ and the normal name is an alias.  */
6965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6966 choke me
6967 #else
6968 f = $ac_func;
6969 #endif
6970
6971   ;
6972   return 0;
6973 }
6974 _ACEOF
6975 rm -f conftest.$ac_objext conftest$ac_exeext
6976 if { (eval echo "$as_me:6976: \"$ac_link\"") >&5
6977   (eval $ac_link) 2>&5
6978   ac_status=$?
6979   echo "$as_me:6979: \$? = $ac_status" >&5
6980   (exit $ac_status); } &&
6981          { ac_try='test -s conftest$ac_exeext'
6982   { (eval echo "$as_me:6982: \"$ac_try\"") >&5
6983   (eval $ac_try) 2>&5
6984   ac_status=$?
6985   echo "$as_me:6985: \$? = $ac_status" >&5
6986   (exit $ac_status); }; }; then
6987   eval "$as_ac_var=yes"
6988 else
6989   echo "$as_me: failed program was:" >&5
6990 cat conftest.$ac_ext >&5
6991 eval "$as_ac_var=no"
6992 fi
6993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6994 fi
6995 echo "$as_me:6995: result: `eval echo '${'$as_ac_var'}'`" >&5
6996 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6997 if test `eval echo '${'$as_ac_var'}'` = yes; then
6998   cat >>confdefs.h <<EOF
6999 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7000 EOF
7001
7002 fi
7003 done
7004
7005 else
7006         echo "$as_me:7006: checking if link/symlink functions work" >&5
7007 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7008 if test "${cf_cv_link_funcs+set}" = set; then
7009   echo $ECHO_N "(cached) $ECHO_C" >&6
7010 else
7011
7012                 cf_cv_link_funcs=
7013                 for cf_func in link symlink ; do
7014                         if test "$cross_compiling" = yes; then
7015
7016                         eval 'ac_cv_func_'$cf_func'=error'
7017 else
7018   cat >conftest.$ac_ext <<_ACEOF
7019 #line 7019 "configure"
7020 #include "confdefs.h"
7021
7022 #include <sys/types.h>
7023 #include <sys/stat.h>
7024 #ifdef HAVE_UNISTD_H
7025 #include <unistd.h>
7026 #endif
7027 int main()
7028 {
7029         int fail = 0;
7030         char *src = "config.log";
7031         char *dst = "conftest.chk";
7032         struct stat src_sb;
7033         struct stat dst_sb;
7034
7035         stat(src, &src_sb);
7036         fail = ($cf_func("config.log", "conftest.chk") < 0)
7037             || (stat(dst, &dst_sb) < 0)
7038             || (dst_sb.st_mtime != src_sb.st_mtime);
7039 #ifdef HAVE_UNLINK
7040         unlink(dst);
7041 #else
7042         remove(dst);
7043 #endif
7044         ${cf_cv_main_return:-return} (fail);
7045 }
7046
7047 _ACEOF
7048 rm -f conftest$ac_exeext
7049 if { (eval echo "$as_me:7049: \"$ac_link\"") >&5
7050   (eval $ac_link) 2>&5
7051   ac_status=$?
7052   echo "$as_me:7052: \$? = $ac_status" >&5
7053   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7054   { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055   (eval $ac_try) 2>&5
7056   ac_status=$?
7057   echo "$as_me:7057: \$? = $ac_status" >&5
7058   (exit $ac_status); }; }; then
7059
7060                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7061                         eval 'ac_cv_func_'$cf_func'=yes'
7062 else
7063   echo "$as_me: program exited with status $ac_status" >&5
7064 echo "$as_me: failed program was:" >&5
7065 cat conftest.$ac_ext >&5
7066
7067                         eval 'ac_cv_func_'$cf_func'=no'
7068 fi
7069 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7070 fi
7071                 done
7072                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7073
7074 fi
7075 echo "$as_me:7075: result: $cf_cv_link_funcs" >&5
7076 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7077         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
7078 #define HAVE_LINK 1
7079 EOF
7080
7081         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
7082 #define HAVE_SYMLINK 1
7083 EOF
7084
7085 fi
7086
7087 with_links=no
7088 with_symlinks=no
7089
7090 # soft links (symbolic links) are useful for some systems where hard links do
7091 # not work, or to make it simpler to copy terminfo trees around.
7092 if test "$ac_cv_func_symlink" = yes ; then
7093     echo "$as_me:7093: checking if tic should use symbolic links" >&5
7094 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7095
7096 # Check whether --enable-symlinks or --disable-symlinks was given.
7097 if test "${enable_symlinks+set}" = set; then
7098   enableval="$enable_symlinks"
7099   with_symlinks=$enableval
7100 else
7101   with_symlinks=no
7102 fi;
7103     echo "$as_me:7103: result: $with_symlinks" >&5
7104 echo "${ECHO_T}$with_symlinks" >&6
7105 fi
7106
7107 # If we have hard links and did not choose to use soft links instead, there is
7108 # no reason to make this choice optional - use the hard links.
7109 if test "$with_symlinks" = no ; then
7110     echo "$as_me:7110: checking if tic should use hard links" >&5
7111 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7112     if test "$ac_cv_func_link" = yes ; then
7113         with_links=yes
7114     else
7115         with_links=no
7116     fi
7117     echo "$as_me:7117: result: $with_links" >&5
7118 echo "${ECHO_T}$with_links" >&6
7119 fi
7120
7121 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7122 #define USE_LINKS 1
7123 EOF
7124
7125 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7126 #define USE_SYMLINKS 1
7127 EOF
7128
7129 ###   use option --enable-broken-linker to force on use of broken-linker support
7130 echo "$as_me:7130: checking if you want broken-linker support code" >&5
7131 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7132
7133 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7134 if test "${enable_broken_linker+set}" = set; then
7135   enableval="$enable_broken_linker"
7136   with_broken_linker=$enableval
7137 else
7138   with_broken_linker=${BROKEN_LINKER:-no}
7139 fi;
7140 echo "$as_me:7140: result: $with_broken_linker" >&5
7141 echo "${ECHO_T}$with_broken_linker" >&6
7142
7143 BROKEN_LINKER=0
7144 if test "$with_broken_linker" = yes ; then
7145         cat >>confdefs.h <<\EOF
7146 #define BROKEN_LINKER 1
7147 EOF
7148
7149         BROKEN_LINKER=1
7150 elif test "$DFT_LWR_MODEL" = shared ; then
7151         case $cf_cv_system_name in #(vi
7152         cygwin*)
7153                 cat >>confdefs.h <<\EOF
7154 #define BROKEN_LINKER 1
7155 EOF
7156
7157                 BROKEN_LINKER=1
7158                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7159
7160 echo "${as_me:-configure}:7160: testing cygwin linker is broken anyway ..." 1>&5
7161
7162                 ;;
7163         esac
7164 fi
7165
7166 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7167 echo "$as_me:7167: checking if tputs should process BSD-style prefix padding" >&5
7168 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7169
7170 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7171 if test "${enable_bsdpad+set}" = set; then
7172   enableval="$enable_bsdpad"
7173   with_bsdpad=$enableval
7174 else
7175   with_bsdpad=no
7176 fi;
7177 echo "$as_me:7177: result: $with_bsdpad" >&5
7178 echo "${ECHO_T}$with_bsdpad" >&6
7179 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7180 #define BSD_TPUTS 1
7181 EOF
7182
7183 ###   use option --enable-widec to turn on use of wide-character support
7184 NCURSES_CH_T=chtype
7185 NCURSES_LIBUTF8=0
7186
7187 NEED_WCHAR_H=0
7188 NCURSES_MBSTATE_T=0
7189 NCURSES_WCHAR_T=0
7190 NCURSES_WINT_T=0
7191
7192 # Check to define _XOPEN_SOURCE "automatically"
7193
7194 cf_XOPEN_SOURCE=500
7195 cf_POSIX_C_SOURCE=199506L
7196 cf_xopen_source=
7197
7198 case $host_os in #(vi
7199 aix[4-7]*) #(vi
7200         cf_xopen_source="-D_ALL_SOURCE"
7201         ;;
7202 cygwin) #(vi
7203         cf_XOPEN_SOURCE=600
7204         ;;
7205 darwin[0-8].*) #(vi
7206         cf_xopen_source="-D_APPLE_C_SOURCE"
7207         ;;
7208 darwin*) #(vi
7209         cf_xopen_source="-D_DARWIN_C_SOURCE"
7210         cf_XOPEN_SOURCE=
7211         ;;
7212 freebsd*|dragonfly*) #(vi
7213         # 5.x headers associate
7214         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7215         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7216         cf_POSIX_C_SOURCE=200112L
7217         cf_XOPEN_SOURCE=600
7218         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7219         ;;
7220 hpux11*) #(vi
7221         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7222         ;;
7223 hpux*) #(vi
7224         cf_xopen_source="-D_HPUX_SOURCE"
7225         ;;
7226 irix[56].*) #(vi
7227         cf_xopen_source="-D_SGI_SOURCE"
7228         cf_XOPEN_SOURCE=
7229         ;;
7230 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7231
7232 echo "$as_me:7232: checking if we must define _GNU_SOURCE" >&5
7233 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7234 if test "${cf_cv_gnu_source+set}" = set; then
7235   echo $ECHO_N "(cached) $ECHO_C" >&6
7236 else
7237
7238 cat >conftest.$ac_ext <<_ACEOF
7239 #line 7239 "configure"
7240 #include "confdefs.h"
7241 #include <sys/types.h>
7242 int
7243 main ()
7244 {
7245
7246 #ifndef _XOPEN_SOURCE
7247 make an error
7248 #endif
7249   ;
7250   return 0;
7251 }
7252 _ACEOF
7253 rm -f conftest.$ac_objext
7254 if { (eval echo "$as_me:7254: \"$ac_compile\"") >&5
7255   (eval $ac_compile) 2>&5
7256   ac_status=$?
7257   echo "$as_me:7257: \$? = $ac_status" >&5
7258   (exit $ac_status); } &&
7259          { ac_try='test -s conftest.$ac_objext'
7260   { (eval echo "$as_me:7260: \"$ac_try\"") >&5
7261   (eval $ac_try) 2>&5
7262   ac_status=$?
7263   echo "$as_me:7263: \$? = $ac_status" >&5
7264   (exit $ac_status); }; }; then
7265   cf_cv_gnu_source=no
7266 else
7267   echo "$as_me: failed program was:" >&5
7268 cat conftest.$ac_ext >&5
7269 cf_save="$CPPFLAGS"
7270          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7271          cat >conftest.$ac_ext <<_ACEOF
7272 #line 7272 "configure"
7273 #include "confdefs.h"
7274 #include <sys/types.h>
7275 int
7276 main ()
7277 {
7278
7279 #ifdef _XOPEN_SOURCE
7280 make an error
7281 #endif
7282   ;
7283   return 0;
7284 }
7285 _ACEOF
7286 rm -f conftest.$ac_objext
7287 if { (eval echo "$as_me:7287: \"$ac_compile\"") >&5
7288   (eval $ac_compile) 2>&5
7289   ac_status=$?
7290   echo "$as_me:7290: \$? = $ac_status" >&5
7291   (exit $ac_status); } &&
7292          { ac_try='test -s conftest.$ac_objext'
7293   { (eval echo "$as_me:7293: \"$ac_try\"") >&5
7294   (eval $ac_try) 2>&5
7295   ac_status=$?
7296   echo "$as_me:7296: \$? = $ac_status" >&5
7297   (exit $ac_status); }; }; then
7298   cf_cv_gnu_source=no
7299 else
7300   echo "$as_me: failed program was:" >&5
7301 cat conftest.$ac_ext >&5
7302 cf_cv_gnu_source=yes
7303 fi
7304 rm -f conftest.$ac_objext conftest.$ac_ext
7305         CPPFLAGS="$cf_save"
7306
7307 fi
7308 rm -f conftest.$ac_objext conftest.$ac_ext
7309
7310 fi
7311 echo "$as_me:7311: result: $cf_cv_gnu_source" >&5
7312 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7313 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7314
7315         ;;
7316 mirbsd*) #(vi
7317         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7318         cf_XOPEN_SOURCE=
7319
7320 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7321
7322 cf_save_CFLAGS="$CFLAGS"
7323 cf_save_CPPFLAGS="$CPPFLAGS"
7324
7325 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7326         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7327                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7328
7329 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7330         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7331                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7332
7333 echo "$as_me:7333: checking if we should define _POSIX_C_SOURCE" >&5
7334 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7335 if test "${cf_cv_posix_c_source+set}" = set; then
7336   echo $ECHO_N "(cached) $ECHO_C" >&6
7337 else
7338
7339 echo "${as_me:-configure}:7339: testing if the symbol is already defined go no further ..." 1>&5
7340
7341         cat >conftest.$ac_ext <<_ACEOF
7342 #line 7342 "configure"
7343 #include "confdefs.h"
7344 #include <sys/types.h>
7345 int
7346 main ()
7347 {
7348
7349 #ifndef _POSIX_C_SOURCE
7350 make an error
7351 #endif
7352   ;
7353   return 0;
7354 }
7355 _ACEOF
7356 rm -f conftest.$ac_objext
7357 if { (eval echo "$as_me:7357: \"$ac_compile\"") >&5
7358   (eval $ac_compile) 2>&5
7359   ac_status=$?
7360   echo "$as_me:7360: \$? = $ac_status" >&5
7361   (exit $ac_status); } &&
7362          { ac_try='test -s conftest.$ac_objext'
7363   { (eval echo "$as_me:7363: \"$ac_try\"") >&5
7364   (eval $ac_try) 2>&5
7365   ac_status=$?
7366   echo "$as_me:7366: \$? = $ac_status" >&5
7367   (exit $ac_status); }; }; then
7368   cf_cv_posix_c_source=no
7369 else
7370   echo "$as_me: failed program was:" >&5
7371 cat conftest.$ac_ext >&5
7372 cf_want_posix_source=no
7373          case .$cf_POSIX_C_SOURCE in #(vi
7374          .[12]??*) #(vi
7375                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7376                 ;;
7377          .2) #(vi
7378                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7379                 cf_want_posix_source=yes
7380                 ;;
7381          .*)
7382                 cf_want_posix_source=yes
7383                 ;;
7384          esac
7385          if test "$cf_want_posix_source" = yes ; then
7386                 cat >conftest.$ac_ext <<_ACEOF
7387 #line 7387 "configure"
7388 #include "confdefs.h"
7389 #include <sys/types.h>
7390 int
7391 main ()
7392 {
7393
7394 #ifdef _POSIX_SOURCE
7395 make an error
7396 #endif
7397   ;
7398   return 0;
7399 }
7400 _ACEOF
7401 rm -f conftest.$ac_objext
7402 if { (eval echo "$as_me:7402: \"$ac_compile\"") >&5
7403   (eval $ac_compile) 2>&5
7404   ac_status=$?
7405   echo "$as_me:7405: \$? = $ac_status" >&5
7406   (exit $ac_status); } &&
7407          { ac_try='test -s conftest.$ac_objext'
7408   { (eval echo "$as_me:7408: \"$ac_try\"") >&5
7409   (eval $ac_try) 2>&5
7410   ac_status=$?
7411   echo "$as_me:7411: \$? = $ac_status" >&5
7412   (exit $ac_status); }; }; then
7413   :
7414 else
7415   echo "$as_me: failed program was:" >&5
7416 cat conftest.$ac_ext >&5
7417 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7418 fi
7419 rm -f conftest.$ac_objext conftest.$ac_ext
7420          fi
7421
7422 echo "${as_me:-configure}:7422: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7423
7424          CFLAGS="$cf_trim_CFLAGS"
7425          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7426
7427 echo "${as_me:-configure}:7427: testing if the second compile does not leave our definition intact error ..." 1>&5
7428
7429          cat >conftest.$ac_ext <<_ACEOF
7430 #line 7430 "configure"
7431 #include "confdefs.h"
7432 #include <sys/types.h>
7433 int
7434 main ()
7435 {
7436
7437 #ifndef _POSIX_C_SOURCE
7438 make an error
7439 #endif
7440   ;
7441   return 0;
7442 }
7443 _ACEOF
7444 rm -f conftest.$ac_objext
7445 if { (eval echo "$as_me:7445: \"$ac_compile\"") >&5
7446   (eval $ac_compile) 2>&5
7447   ac_status=$?
7448   echo "$as_me:7448: \$? = $ac_status" >&5
7449   (exit $ac_status); } &&
7450          { ac_try='test -s conftest.$ac_objext'
7451   { (eval echo "$as_me:7451: \"$ac_try\"") >&5
7452   (eval $ac_try) 2>&5
7453   ac_status=$?
7454   echo "$as_me:7454: \$? = $ac_status" >&5
7455   (exit $ac_status); }; }; then
7456   :
7457 else
7458   echo "$as_me: failed program was:" >&5
7459 cat conftest.$ac_ext >&5
7460 cf_cv_posix_c_source=no
7461 fi
7462 rm -f conftest.$ac_objext conftest.$ac_ext
7463          CFLAGS="$cf_save_CFLAGS"
7464          CPPFLAGS="$cf_save_CPPFLAGS"
7465
7466 fi
7467 rm -f conftest.$ac_objext conftest.$ac_ext
7468
7469 fi
7470 echo "$as_me:7470: result: $cf_cv_posix_c_source" >&5
7471 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7472
7473 if test "$cf_cv_posix_c_source" != no ; then
7474         CFLAGS="$cf_trim_CFLAGS"
7475         CPPFLAGS="$cf_trim_CPPFLAGS"
7476
7477 cf_fix_cppflags=no
7478 cf_new_cflags=
7479 cf_new_cppflags=
7480 cf_new_extra_cppflags=
7481
7482 for cf_add_cflags in $cf_cv_posix_c_source
7483 do
7484 case $cf_fix_cppflags in
7485 no)
7486         case $cf_add_cflags in #(vi
7487         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7488                 case $cf_add_cflags in
7489                 -D*)
7490                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7491
7492                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7493                                 && test -z "${cf_tst_cflags}" \
7494                                 && cf_fix_cppflags=yes
7495
7496                         if test $cf_fix_cppflags = yes ; then
7497                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7498                                 continue
7499                         elif test "${cf_tst_cflags}" = "\"'" ; then
7500                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7501                                 continue
7502                         fi
7503                         ;;
7504                 esac
7505                 case "$CPPFLAGS" in
7506                 *$cf_add_cflags) #(vi
7507                         ;;
7508                 *) #(vi
7509                         case $cf_add_cflags in #(vi
7510                         -D*)
7511                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7512
7513 CPPFLAGS=`echo "$CPPFLAGS" | \
7514         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7515                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7516
7517                                 ;;
7518                         esac
7519                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7520                         ;;
7521                 esac
7522                 ;;
7523         *)
7524                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7525                 ;;
7526         esac
7527         ;;
7528 yes)
7529         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7530
7531         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7532
7533         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7534                 && test -z "${cf_tst_cflags}" \
7535                 && cf_fix_cppflags=no
7536         ;;
7537 esac
7538 done
7539
7540 if test -n "$cf_new_cflags" ; then
7541
7542         CFLAGS="$CFLAGS $cf_new_cflags"
7543 fi
7544
7545 if test -n "$cf_new_cppflags" ; then
7546
7547         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7548 fi
7549
7550 if test -n "$cf_new_extra_cppflags" ; then
7551
7552         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7553 fi
7554
7555 fi
7556
7557         ;;
7558 netbsd*) #(vi
7559         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7560         ;;
7561 openbsd[4-9]*) #(vi
7562         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7563         cf_xopen_source="-D_BSD_SOURCE"
7564         cf_XOPEN_SOURCE=600
7565         ;;
7566 openbsd*) #(vi
7567         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7568         ;;
7569 osf[45]*) #(vi
7570         cf_xopen_source="-D_OSF_SOURCE"
7571         ;;
7572 nto-qnx*) #(vi
7573         cf_xopen_source="-D_QNX_SOURCE"
7574         ;;
7575 sco*) #(vi
7576         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7577         ;;
7578 solaris2.*) #(vi
7579         cf_xopen_source="-D__EXTENSIONS__"
7580         ;;
7581 *)
7582
7583 echo "$as_me:7583: checking if we should define _XOPEN_SOURCE" >&5
7584 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7585 if test "${cf_cv_xopen_source+set}" = set; then
7586   echo $ECHO_N "(cached) $ECHO_C" >&6
7587 else
7588
7589         cat >conftest.$ac_ext <<_ACEOF
7590 #line 7590 "configure"
7591 #include "confdefs.h"
7592
7593 #include <stdlib.h>
7594 #include <string.h>
7595 #include <sys/types.h>
7596
7597 int
7598 main ()
7599 {
7600
7601 #ifndef _XOPEN_SOURCE
7602 make an error
7603 #endif
7604   ;
7605   return 0;
7606 }
7607 _ACEOF
7608 rm -f conftest.$ac_objext
7609 if { (eval echo "$as_me:7609: \"$ac_compile\"") >&5
7610   (eval $ac_compile) 2>&5
7611   ac_status=$?
7612   echo "$as_me:7612: \$? = $ac_status" >&5
7613   (exit $ac_status); } &&
7614          { ac_try='test -s conftest.$ac_objext'
7615   { (eval echo "$as_me:7615: \"$ac_try\"") >&5
7616   (eval $ac_try) 2>&5
7617   ac_status=$?
7618   echo "$as_me:7618: \$? = $ac_status" >&5
7619   (exit $ac_status); }; }; then
7620   cf_cv_xopen_source=no
7621 else
7622   echo "$as_me: failed program was:" >&5
7623 cat conftest.$ac_ext >&5
7624 cf_save="$CPPFLAGS"
7625          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7626          cat >conftest.$ac_ext <<_ACEOF
7627 #line 7627 "configure"
7628 #include "confdefs.h"
7629
7630 #include <stdlib.h>
7631 #include <string.h>
7632 #include <sys/types.h>
7633
7634 int
7635 main ()
7636 {
7637
7638 #ifdef _XOPEN_SOURCE
7639 make an error
7640 #endif
7641   ;
7642   return 0;
7643 }
7644 _ACEOF
7645 rm -f conftest.$ac_objext
7646 if { (eval echo "$as_me:7646: \"$ac_compile\"") >&5
7647   (eval $ac_compile) 2>&5
7648   ac_status=$?
7649   echo "$as_me:7649: \$? = $ac_status" >&5
7650   (exit $ac_status); } &&
7651          { ac_try='test -s conftest.$ac_objext'
7652   { (eval echo "$as_me:7652: \"$ac_try\"") >&5
7653   (eval $ac_try) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit $ac_status); }; }; then
7657   cf_cv_xopen_source=no
7658 else
7659   echo "$as_me: failed program was:" >&5
7660 cat conftest.$ac_ext >&5
7661 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7662 fi
7663 rm -f conftest.$ac_objext conftest.$ac_ext
7664         CPPFLAGS="$cf_save"
7665
7666 fi
7667 rm -f conftest.$ac_objext conftest.$ac_ext
7668
7669 fi
7670 echo "$as_me:7670: result: $cf_cv_xopen_source" >&5
7671 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7672
7673 if test "$cf_cv_xopen_source" != no ; then
7674
7675 CFLAGS=`echo "$CFLAGS" | \
7676         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7677                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7678
7679 CPPFLAGS=`echo "$CPPFLAGS" | \
7680         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7681                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7682
7683         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7684
7685 cf_fix_cppflags=no
7686 cf_new_cflags=
7687 cf_new_cppflags=
7688 cf_new_extra_cppflags=
7689
7690 for cf_add_cflags in $cf_temp_xopen_source
7691 do
7692 case $cf_fix_cppflags in
7693 no)
7694         case $cf_add_cflags in #(vi
7695         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7696                 case $cf_add_cflags in
7697                 -D*)
7698                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7699
7700                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7701                                 && test -z "${cf_tst_cflags}" \
7702                                 && cf_fix_cppflags=yes
7703
7704                         if test $cf_fix_cppflags = yes ; then
7705                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7706                                 continue
7707                         elif test "${cf_tst_cflags}" = "\"'" ; then
7708                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7709                                 continue
7710                         fi
7711                         ;;
7712                 esac
7713                 case "$CPPFLAGS" in
7714                 *$cf_add_cflags) #(vi
7715                         ;;
7716                 *) #(vi
7717                         case $cf_add_cflags in #(vi
7718                         -D*)
7719                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7720
7721 CPPFLAGS=`echo "$CPPFLAGS" | \
7722         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7723                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7724
7725                                 ;;
7726                         esac
7727                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7728                         ;;
7729                 esac
7730                 ;;
7731         *)
7732                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7733                 ;;
7734         esac
7735         ;;
7736 yes)
7737         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7738
7739         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7740
7741         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7742                 && test -z "${cf_tst_cflags}" \
7743                 && cf_fix_cppflags=no
7744         ;;
7745 esac
7746 done
7747
7748 if test -n "$cf_new_cflags" ; then
7749
7750         CFLAGS="$CFLAGS $cf_new_cflags"
7751 fi
7752
7753 if test -n "$cf_new_cppflags" ; then
7754
7755         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7756 fi
7757
7758 if test -n "$cf_new_extra_cppflags" ; then
7759
7760         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7761 fi
7762
7763 fi
7764
7765 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7766
7767 cf_save_CFLAGS="$CFLAGS"
7768 cf_save_CPPFLAGS="$CPPFLAGS"
7769
7770 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7771         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7772                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7773
7774 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7775         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7776                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7777
7778 echo "$as_me:7778: checking if we should define _POSIX_C_SOURCE" >&5
7779 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7780 if test "${cf_cv_posix_c_source+set}" = set; then
7781   echo $ECHO_N "(cached) $ECHO_C" >&6
7782 else
7783
7784 echo "${as_me:-configure}:7784: testing if the symbol is already defined go no further ..." 1>&5
7785
7786         cat >conftest.$ac_ext <<_ACEOF
7787 #line 7787 "configure"
7788 #include "confdefs.h"
7789 #include <sys/types.h>
7790 int
7791 main ()
7792 {
7793
7794 #ifndef _POSIX_C_SOURCE
7795 make an error
7796 #endif
7797   ;
7798   return 0;
7799 }
7800 _ACEOF
7801 rm -f conftest.$ac_objext
7802 if { (eval echo "$as_me:7802: \"$ac_compile\"") >&5
7803   (eval $ac_compile) 2>&5
7804   ac_status=$?
7805   echo "$as_me:7805: \$? = $ac_status" >&5
7806   (exit $ac_status); } &&
7807          { ac_try='test -s conftest.$ac_objext'
7808   { (eval echo "$as_me:7808: \"$ac_try\"") >&5
7809   (eval $ac_try) 2>&5
7810   ac_status=$?
7811   echo "$as_me:7811: \$? = $ac_status" >&5
7812   (exit $ac_status); }; }; then
7813   cf_cv_posix_c_source=no
7814 else
7815   echo "$as_me: failed program was:" >&5
7816 cat conftest.$ac_ext >&5
7817 cf_want_posix_source=no
7818          case .$cf_POSIX_C_SOURCE in #(vi
7819          .[12]??*) #(vi
7820                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7821                 ;;
7822          .2) #(vi
7823                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7824                 cf_want_posix_source=yes
7825                 ;;
7826          .*)
7827                 cf_want_posix_source=yes
7828                 ;;
7829          esac
7830          if test "$cf_want_posix_source" = yes ; then
7831                 cat >conftest.$ac_ext <<_ACEOF
7832 #line 7832 "configure"
7833 #include "confdefs.h"
7834 #include <sys/types.h>
7835 int
7836 main ()
7837 {
7838
7839 #ifdef _POSIX_SOURCE
7840 make an error
7841 #endif
7842   ;
7843   return 0;
7844 }
7845 _ACEOF
7846 rm -f conftest.$ac_objext
7847 if { (eval echo "$as_me:7847: \"$ac_compile\"") >&5
7848   (eval $ac_compile) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit $ac_status); } &&
7852          { ac_try='test -s conftest.$ac_objext'
7853   { (eval echo "$as_me:7853: \"$ac_try\"") >&5
7854   (eval $ac_try) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit $ac_status); }; }; then
7858   :
7859 else
7860   echo "$as_me: failed program was:" >&5
7861 cat conftest.$ac_ext >&5
7862 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7863 fi
7864 rm -f conftest.$ac_objext conftest.$ac_ext
7865          fi
7866
7867 echo "${as_me:-configure}:7867: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7868
7869          CFLAGS="$cf_trim_CFLAGS"
7870          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7871
7872 echo "${as_me:-configure}:7872: testing if the second compile does not leave our definition intact error ..." 1>&5
7873
7874          cat >conftest.$ac_ext <<_ACEOF
7875 #line 7875 "configure"
7876 #include "confdefs.h"
7877 #include <sys/types.h>
7878 int
7879 main ()
7880 {
7881
7882 #ifndef _POSIX_C_SOURCE
7883 make an error
7884 #endif
7885   ;
7886   return 0;
7887 }
7888 _ACEOF
7889 rm -f conftest.$ac_objext
7890 if { (eval echo "$as_me:7890: \"$ac_compile\"") >&5
7891   (eval $ac_compile) 2>&5
7892   ac_status=$?
7893   echo "$as_me:7893: \$? = $ac_status" >&5
7894   (exit $ac_status); } &&
7895          { ac_try='test -s conftest.$ac_objext'
7896   { (eval echo "$as_me:7896: \"$ac_try\"") >&5
7897   (eval $ac_try) 2>&5
7898   ac_status=$?
7899   echo "$as_me:7899: \$? = $ac_status" >&5
7900   (exit $ac_status); }; }; then
7901   :
7902 else
7903   echo "$as_me: failed program was:" >&5
7904 cat conftest.$ac_ext >&5
7905 cf_cv_posix_c_source=no
7906 fi
7907 rm -f conftest.$ac_objext conftest.$ac_ext
7908          CFLAGS="$cf_save_CFLAGS"
7909          CPPFLAGS="$cf_save_CPPFLAGS"
7910
7911 fi
7912 rm -f conftest.$ac_objext conftest.$ac_ext
7913
7914 fi
7915 echo "$as_me:7915: result: $cf_cv_posix_c_source" >&5
7916 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7917
7918 if test "$cf_cv_posix_c_source" != no ; then
7919         CFLAGS="$cf_trim_CFLAGS"
7920         CPPFLAGS="$cf_trim_CPPFLAGS"
7921
7922 cf_fix_cppflags=no
7923 cf_new_cflags=
7924 cf_new_cppflags=
7925 cf_new_extra_cppflags=
7926
7927 for cf_add_cflags in $cf_cv_posix_c_source
7928 do
7929 case $cf_fix_cppflags in
7930 no)
7931         case $cf_add_cflags in #(vi
7932         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7933                 case $cf_add_cflags in
7934                 -D*)
7935                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7936
7937                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7938                                 && test -z "${cf_tst_cflags}" \
7939                                 && cf_fix_cppflags=yes
7940
7941                         if test $cf_fix_cppflags = yes ; then
7942                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7943                                 continue
7944                         elif test "${cf_tst_cflags}" = "\"'" ; then
7945                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7946                                 continue
7947                         fi
7948                         ;;
7949                 esac
7950                 case "$CPPFLAGS" in
7951                 *$cf_add_cflags) #(vi
7952                         ;;
7953                 *) #(vi
7954                         case $cf_add_cflags in #(vi
7955                         -D*)
7956                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7957
7958 CPPFLAGS=`echo "$CPPFLAGS" | \
7959         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7960                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7961
7962                                 ;;
7963                         esac
7964                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7965                         ;;
7966                 esac
7967                 ;;
7968         *)
7969                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7970                 ;;
7971         esac
7972         ;;
7973 yes)
7974         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7975
7976         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7977
7978         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7979                 && test -z "${cf_tst_cflags}" \
7980                 && cf_fix_cppflags=no
7981         ;;
7982 esac
7983 done
7984
7985 if test -n "$cf_new_cflags" ; then
7986
7987         CFLAGS="$CFLAGS $cf_new_cflags"
7988 fi
7989
7990 if test -n "$cf_new_cppflags" ; then
7991
7992         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7993 fi
7994
7995 if test -n "$cf_new_extra_cppflags" ; then
7996
7997         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7998 fi
7999
8000 fi
8001
8002         ;;
8003 esac
8004
8005 if test -n "$cf_xopen_source" ; then
8006
8007 cf_fix_cppflags=no
8008 cf_new_cflags=
8009 cf_new_cppflags=
8010 cf_new_extra_cppflags=
8011
8012 for cf_add_cflags in $cf_xopen_source
8013 do
8014 case $cf_fix_cppflags in
8015 no)
8016         case $cf_add_cflags in #(vi
8017         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8018                 case $cf_add_cflags in
8019                 -D*)
8020                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8021
8022                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8023                                 && test -z "${cf_tst_cflags}" \
8024                                 && cf_fix_cppflags=yes
8025
8026                         if test $cf_fix_cppflags = yes ; then
8027                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8028                                 continue
8029                         elif test "${cf_tst_cflags}" = "\"'" ; then
8030                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8031                                 continue
8032                         fi
8033                         ;;
8034                 esac
8035                 case "$CPPFLAGS" in
8036                 *$cf_add_cflags) #(vi
8037                         ;;
8038                 *) #(vi
8039                         case $cf_add_cflags in #(vi
8040                         -D*)
8041                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8042
8043 CPPFLAGS=`echo "$CPPFLAGS" | \
8044         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8045                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8046
8047                                 ;;
8048                         esac
8049                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8050                         ;;
8051                 esac
8052                 ;;
8053         *)
8054                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8055                 ;;
8056         esac
8057         ;;
8058 yes)
8059         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8060
8061         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8062
8063         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8064                 && test -z "${cf_tst_cflags}" \
8065                 && cf_fix_cppflags=no
8066         ;;
8067 esac
8068 done
8069
8070 if test -n "$cf_new_cflags" ; then
8071
8072         CFLAGS="$CFLAGS $cf_new_cflags"
8073 fi
8074
8075 if test -n "$cf_new_cppflags" ; then
8076
8077         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8078 fi
8079
8080 if test -n "$cf_new_extra_cppflags" ; then
8081
8082         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8083 fi
8084
8085 fi
8086
8087 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8088         echo "$as_me:8088: checking if _XOPEN_SOURCE really is set" >&5
8089 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8090         cat >conftest.$ac_ext <<_ACEOF
8091 #line 8091 "configure"
8092 #include "confdefs.h"
8093 #include <stdlib.h>
8094 int
8095 main ()
8096 {
8097
8098 #ifndef _XOPEN_SOURCE
8099 make an error
8100 #endif
8101   ;
8102   return 0;
8103 }
8104 _ACEOF
8105 rm -f conftest.$ac_objext
8106 if { (eval echo "$as_me:8106: \"$ac_compile\"") >&5
8107   (eval $ac_compile) 2>&5
8108   ac_status=$?
8109   echo "$as_me:8109: \$? = $ac_status" >&5
8110   (exit $ac_status); } &&
8111          { ac_try='test -s conftest.$ac_objext'
8112   { (eval echo "$as_me:8112: \"$ac_try\"") >&5
8113   (eval $ac_try) 2>&5
8114   ac_status=$?
8115   echo "$as_me:8115: \$? = $ac_status" >&5
8116   (exit $ac_status); }; }; then
8117   cf_XOPEN_SOURCE_set=yes
8118 else
8119   echo "$as_me: failed program was:" >&5
8120 cat conftest.$ac_ext >&5
8121 cf_XOPEN_SOURCE_set=no
8122 fi
8123 rm -f conftest.$ac_objext conftest.$ac_ext
8124         echo "$as_me:8124: result: $cf_XOPEN_SOURCE_set" >&5
8125 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8126         if test $cf_XOPEN_SOURCE_set = yes
8127         then
8128                 cat >conftest.$ac_ext <<_ACEOF
8129 #line 8129 "configure"
8130 #include "confdefs.h"
8131 #include <stdlib.h>
8132 int
8133 main ()
8134 {
8135
8136 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8137 make an error
8138 #endif
8139   ;
8140   return 0;
8141 }
8142 _ACEOF
8143 rm -f conftest.$ac_objext
8144 if { (eval echo "$as_me:8144: \"$ac_compile\"") >&5
8145   (eval $ac_compile) 2>&5
8146   ac_status=$?
8147   echo "$as_me:8147: \$? = $ac_status" >&5
8148   (exit $ac_status); } &&
8149          { ac_try='test -s conftest.$ac_objext'
8150   { (eval echo "$as_me:8150: \"$ac_try\"") >&5
8151   (eval $ac_try) 2>&5
8152   ac_status=$?
8153   echo "$as_me:8153: \$? = $ac_status" >&5
8154   (exit $ac_status); }; }; then
8155   cf_XOPEN_SOURCE_set_ok=yes
8156 else
8157   echo "$as_me: failed program was:" >&5
8158 cat conftest.$ac_ext >&5
8159 cf_XOPEN_SOURCE_set_ok=no
8160 fi
8161 rm -f conftest.$ac_objext conftest.$ac_ext
8162                 if test $cf_XOPEN_SOURCE_set_ok = no
8163                 then
8164                         { echo "$as_me:8164: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8165 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8166                 fi
8167         else
8168
8169 echo "$as_me:8169: checking if we should define _XOPEN_SOURCE" >&5
8170 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8171 if test "${cf_cv_xopen_source+set}" = set; then
8172   echo $ECHO_N "(cached) $ECHO_C" >&6
8173 else
8174
8175         cat >conftest.$ac_ext <<_ACEOF
8176 #line 8176 "configure"
8177 #include "confdefs.h"
8178
8179 #include <stdlib.h>
8180 #include <string.h>
8181 #include <sys/types.h>
8182
8183 int
8184 main ()
8185 {
8186
8187 #ifndef _XOPEN_SOURCE
8188 make an error
8189 #endif
8190   ;
8191   return 0;
8192 }
8193 _ACEOF
8194 rm -f conftest.$ac_objext
8195 if { (eval echo "$as_me:8195: \"$ac_compile\"") >&5
8196   (eval $ac_compile) 2>&5
8197   ac_status=$?
8198   echo "$as_me:8198: \$? = $ac_status" >&5
8199   (exit $ac_status); } &&
8200          { ac_try='test -s conftest.$ac_objext'
8201   { (eval echo "$as_me:8201: \"$ac_try\"") >&5
8202   (eval $ac_try) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); }; }; then
8206   cf_cv_xopen_source=no
8207 else
8208   echo "$as_me: failed program was:" >&5
8209 cat conftest.$ac_ext >&5
8210 cf_save="$CPPFLAGS"
8211          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8212          cat >conftest.$ac_ext <<_ACEOF
8213 #line 8213 "configure"
8214 #include "confdefs.h"
8215
8216 #include <stdlib.h>
8217 #include <string.h>
8218 #include <sys/types.h>
8219
8220 int
8221 main ()
8222 {
8223
8224 #ifdef _XOPEN_SOURCE
8225 make an error
8226 #endif
8227   ;
8228   return 0;
8229 }
8230 _ACEOF
8231 rm -f conftest.$ac_objext
8232 if { (eval echo "$as_me:8232: \"$ac_compile\"") >&5
8233   (eval $ac_compile) 2>&5
8234   ac_status=$?
8235   echo "$as_me:8235: \$? = $ac_status" >&5
8236   (exit $ac_status); } &&
8237          { ac_try='test -s conftest.$ac_objext'
8238   { (eval echo "$as_me:8238: \"$ac_try\"") >&5
8239   (eval $ac_try) 2>&5
8240   ac_status=$?
8241   echo "$as_me:8241: \$? = $ac_status" >&5
8242   (exit $ac_status); }; }; then
8243   cf_cv_xopen_source=no
8244 else
8245   echo "$as_me: failed program was:" >&5
8246 cat conftest.$ac_ext >&5
8247 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8248 fi
8249 rm -f conftest.$ac_objext conftest.$ac_ext
8250         CPPFLAGS="$cf_save"
8251
8252 fi
8253 rm -f conftest.$ac_objext conftest.$ac_ext
8254
8255 fi
8256 echo "$as_me:8256: result: $cf_cv_xopen_source" >&5
8257 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8258
8259 if test "$cf_cv_xopen_source" != no ; then
8260
8261 CFLAGS=`echo "$CFLAGS" | \
8262         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8263                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8264
8265 CPPFLAGS=`echo "$CPPFLAGS" | \
8266         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8267                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8268
8269         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8270
8271 cf_fix_cppflags=no
8272 cf_new_cflags=
8273 cf_new_cppflags=
8274 cf_new_extra_cppflags=
8275
8276 for cf_add_cflags in $cf_temp_xopen_source
8277 do
8278 case $cf_fix_cppflags in
8279 no)
8280         case $cf_add_cflags in #(vi
8281         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8282                 case $cf_add_cflags in
8283                 -D*)
8284                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8285
8286                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8287                                 && test -z "${cf_tst_cflags}" \
8288                                 && cf_fix_cppflags=yes
8289
8290                         if test $cf_fix_cppflags = yes ; then
8291                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8292                                 continue
8293                         elif test "${cf_tst_cflags}" = "\"'" ; then
8294                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8295                                 continue
8296                         fi
8297                         ;;
8298                 esac
8299                 case "$CPPFLAGS" in
8300                 *$cf_add_cflags) #(vi
8301                         ;;
8302                 *) #(vi
8303                         case $cf_add_cflags in #(vi
8304                         -D*)
8305                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8306
8307 CPPFLAGS=`echo "$CPPFLAGS" | \
8308         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8309                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8310
8311                                 ;;
8312                         esac
8313                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8314                         ;;
8315                 esac
8316                 ;;
8317         *)
8318                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8319                 ;;
8320         esac
8321         ;;
8322 yes)
8323         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8324
8325         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8326
8327         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8328                 && test -z "${cf_tst_cflags}" \
8329                 && cf_fix_cppflags=no
8330         ;;
8331 esac
8332 done
8333
8334 if test -n "$cf_new_cflags" ; then
8335
8336         CFLAGS="$CFLAGS $cf_new_cflags"
8337 fi
8338
8339 if test -n "$cf_new_cppflags" ; then
8340
8341         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8342 fi
8343
8344 if test -n "$cf_new_extra_cppflags" ; then
8345
8346         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8347 fi
8348
8349 fi
8350
8351         fi
8352 fi
8353
8354 # Work around breakage on OS X
8355
8356 echo "$as_me:8356: checking if SIGWINCH is defined" >&5
8357 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8358 if test "${cf_cv_define_sigwinch+set}" = set; then
8359   echo $ECHO_N "(cached) $ECHO_C" >&6
8360 else
8361
8362         cat >conftest.$ac_ext <<_ACEOF
8363 #line 8363 "configure"
8364 #include "confdefs.h"
8365
8366 #include <sys/types.h>
8367 #include <sys/signal.h>
8368
8369 int
8370 main ()
8371 {
8372 int x = SIGWINCH
8373   ;
8374   return 0;
8375 }
8376 _ACEOF
8377 rm -f conftest.$ac_objext
8378 if { (eval echo "$as_me:8378: \"$ac_compile\"") >&5
8379   (eval $ac_compile) 2>&5
8380   ac_status=$?
8381   echo "$as_me:8381: \$? = $ac_status" >&5
8382   (exit $ac_status); } &&
8383          { ac_try='test -s conftest.$ac_objext'
8384   { (eval echo "$as_me:8384: \"$ac_try\"") >&5
8385   (eval $ac_try) 2>&5
8386   ac_status=$?
8387   echo "$as_me:8387: \$? = $ac_status" >&5
8388   (exit $ac_status); }; }; then
8389   cf_cv_define_sigwinch=yes
8390 else
8391   echo "$as_me: failed program was:" >&5
8392 cat conftest.$ac_ext >&5
8393 cat >conftest.$ac_ext <<_ACEOF
8394 #line 8394 "configure"
8395 #include "confdefs.h"
8396
8397 #undef _XOPEN_SOURCE
8398 #undef _POSIX_SOURCE
8399 #undef _POSIX_C_SOURCE
8400 #include <sys/types.h>
8401 #include <sys/signal.h>
8402
8403 int
8404 main ()
8405 {
8406 int x = SIGWINCH
8407   ;
8408   return 0;
8409 }
8410 _ACEOF
8411 rm -f conftest.$ac_objext
8412 if { (eval echo "$as_me:8412: \"$ac_compile\"") >&5
8413   (eval $ac_compile) 2>&5
8414   ac_status=$?
8415   echo "$as_me:8415: \$? = $ac_status" >&5
8416   (exit $ac_status); } &&
8417          { ac_try='test -s conftest.$ac_objext'
8418   { (eval echo "$as_me:8418: \"$ac_try\"") >&5
8419   (eval $ac_try) 2>&5
8420   ac_status=$?
8421   echo "$as_me:8421: \$? = $ac_status" >&5
8422   (exit $ac_status); }; }; then
8423   cf_cv_define_sigwinch=maybe
8424 else
8425   echo "$as_me: failed program was:" >&5
8426 cat conftest.$ac_ext >&5
8427 cf_cv_define_sigwinch=no
8428 fi
8429 rm -f conftest.$ac_objext conftest.$ac_ext
8430
8431 fi
8432 rm -f conftest.$ac_objext conftest.$ac_ext
8433
8434 fi
8435 echo "$as_me:8435: result: $cf_cv_define_sigwinch" >&5
8436 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8437
8438 if test "$cf_cv_define_sigwinch" = maybe ; then
8439 echo "$as_me:8439: checking for actual SIGWINCH definition" >&5
8440 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8441 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8442   echo $ECHO_N "(cached) $ECHO_C" >&6
8443 else
8444
8445 cf_cv_fixup_sigwinch=unknown
8446 cf_sigwinch=32
8447 while test $cf_sigwinch != 1
8448 do
8449         cat >conftest.$ac_ext <<_ACEOF
8450 #line 8450 "configure"
8451 #include "confdefs.h"
8452
8453 #undef _XOPEN_SOURCE
8454 #undef _POSIX_SOURCE
8455 #undef _POSIX_C_SOURCE
8456 #include <sys/types.h>
8457 #include <sys/signal.h>
8458
8459 int
8460 main ()
8461 {
8462
8463 #if SIGWINCH != $cf_sigwinch
8464 make an error
8465 #endif
8466 int x = SIGWINCH
8467   ;
8468   return 0;
8469 }
8470 _ACEOF
8471 rm -f conftest.$ac_objext
8472 if { (eval echo "$as_me:8472: \"$ac_compile\"") >&5
8473   (eval $ac_compile) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); } &&
8477          { ac_try='test -s conftest.$ac_objext'
8478   { (eval echo "$as_me:8478: \"$ac_try\"") >&5
8479   (eval $ac_try) 2>&5
8480   ac_status=$?
8481   echo "$as_me:8481: \$? = $ac_status" >&5
8482   (exit $ac_status); }; }; then
8483   cf_cv_fixup_sigwinch=$cf_sigwinch
8484          break
8485 else
8486   echo "$as_me: failed program was:" >&5
8487 cat conftest.$ac_ext >&5
8488 fi
8489 rm -f conftest.$ac_objext conftest.$ac_ext
8490
8491 cf_sigwinch=`expr $cf_sigwinch - 1`
8492 done
8493
8494 fi
8495 echo "$as_me:8495: result: $cf_cv_fixup_sigwinch" >&5
8496 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8497
8498         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8499                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8500         fi
8501 fi
8502
8503 # Checks for CODESET support.
8504
8505   echo "$as_me:8505: checking for nl_langinfo and CODESET" >&5
8506 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8507 if test "${am_cv_langinfo_codeset+set}" = set; then
8508   echo $ECHO_N "(cached) $ECHO_C" >&6
8509 else
8510   cat >conftest.$ac_ext <<_ACEOF
8511 #line 8511 "configure"
8512 #include "confdefs.h"
8513 #include <langinfo.h>
8514 int
8515 main ()
8516 {
8517 char* cs = nl_langinfo(CODESET);
8518   ;
8519   return 0;
8520 }
8521 _ACEOF
8522 rm -f conftest.$ac_objext conftest$ac_exeext
8523 if { (eval echo "$as_me:8523: \"$ac_link\"") >&5
8524   (eval $ac_link) 2>&5
8525   ac_status=$?
8526   echo "$as_me:8526: \$? = $ac_status" >&5
8527   (exit $ac_status); } &&
8528          { ac_try='test -s conftest$ac_exeext'
8529   { (eval echo "$as_me:8529: \"$ac_try\"") >&5
8530   (eval $ac_try) 2>&5
8531   ac_status=$?
8532   echo "$as_me:8532: \$? = $ac_status" >&5
8533   (exit $ac_status); }; }; then
8534   am_cv_langinfo_codeset=yes
8535 else
8536   echo "$as_me: failed program was:" >&5
8537 cat conftest.$ac_ext >&5
8538 am_cv_langinfo_codeset=no
8539 fi
8540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8541
8542 fi
8543 echo "$as_me:8543: result: $am_cv_langinfo_codeset" >&5
8544 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8545   if test $am_cv_langinfo_codeset = yes; then
8546
8547 cat >>confdefs.h <<\EOF
8548 #define HAVE_LANGINFO_CODESET 1
8549 EOF
8550
8551   fi
8552
8553 # use these variables to work around a defect in gcc's fixincludes.
8554 NCURSES_OK_WCHAR_T=
8555 NCURSES_OK_WINT_T=
8556
8557 echo "$as_me:8557: checking if you want wide-character code" >&5
8558 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8559
8560 # Check whether --enable-widec or --disable-widec was given.
8561 if test "${enable_widec+set}" = set; then
8562   enableval="$enable_widec"
8563   with_widec=$enableval
8564 else
8565   with_widec=no
8566 fi;
8567 echo "$as_me:8567: result: $with_widec" >&5
8568 echo "${ECHO_T}$with_widec" >&6
8569 if test "$with_widec" = yes ; then
8570         LIB_SUFFIX="w${LIB_SUFFIX}"
8571         cat >>confdefs.h <<\EOF
8572 #define USE_WIDEC_SUPPORT 1
8573 EOF
8574
8575         cat >>confdefs.h <<\EOF
8576 #define NCURSES_WIDECHAR 1
8577 EOF
8578
8579 echo "$as_me:8579: checking if wchar.h can be used as is" >&5
8580 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8581 if test "${cf_cv_wchar_h_okay+set}" = set; then
8582   echo $ECHO_N "(cached) $ECHO_C" >&6
8583 else
8584
8585 cat >conftest.$ac_ext <<_ACEOF
8586 #line 8586 "configure"
8587 #include "confdefs.h"
8588
8589 #include <stdlib.h>
8590 #include <wchar.h>
8591
8592 int
8593 main ()
8594 {
8595
8596         wint_t foo = 0;
8597         int bar = iswpunct(foo)
8598   ;
8599   return 0;
8600 }
8601 _ACEOF
8602 rm -f conftest.$ac_objext
8603 if { (eval echo "$as_me:8603: \"$ac_compile\"") >&5
8604   (eval $ac_compile) 2>&5
8605   ac_status=$?
8606   echo "$as_me:8606: \$? = $ac_status" >&5
8607   (exit $ac_status); } &&
8608          { ac_try='test -s conftest.$ac_objext'
8609   { (eval echo "$as_me:8609: \"$ac_try\"") >&5
8610   (eval $ac_try) 2>&5
8611   ac_status=$?
8612   echo "$as_me:8612: \$? = $ac_status" >&5
8613   (exit $ac_status); }; }; then
8614   cf_cv_wchar_h_okay=yes
8615 else
8616   echo "$as_me: failed program was:" >&5
8617 cat conftest.$ac_ext >&5
8618 cf_cv_wchar_h_okay=no
8619 fi
8620 rm -f conftest.$ac_objext conftest.$ac_ext
8621 fi
8622 echo "$as_me:8622: result: $cf_cv_wchar_h_okay" >&5
8623 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8624
8625 if test $cf_cv_wchar_h_okay = no
8626 then
8627
8628 echo "$as_me:8628: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8629 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8630 cat >conftest.$ac_ext <<_ACEOF
8631 #line 8631 "configure"
8632 #include "confdefs.h"
8633 #include <sys/types.h>
8634
8635 int
8636 main ()
8637 {
8638
8639 #ifndef _XOPEN_SOURCE_EXTENDED
8640 make an error
8641 #endif
8642   ;
8643   return 0;
8644 }
8645 _ACEOF
8646 rm -f conftest.$ac_objext
8647 if { (eval echo "$as_me:8647: \"$ac_compile\"") >&5
8648   (eval $ac_compile) 2>&5
8649   ac_status=$?
8650   echo "$as_me:8650: \$? = $ac_status" >&5
8651   (exit $ac_status); } &&
8652          { ac_try='test -s conftest.$ac_objext'
8653   { (eval echo "$as_me:8653: \"$ac_try\"") >&5
8654   (eval $ac_try) 2>&5
8655   ac_status=$?
8656   echo "$as_me:8656: \$? = $ac_status" >&5
8657   (exit $ac_status); }; }; then
8658   cf_result=no
8659 else
8660   echo "$as_me: failed program was:" >&5
8661 cat conftest.$ac_ext >&5
8662 cf_result=yes
8663 fi
8664 rm -f conftest.$ac_objext conftest.$ac_ext
8665 echo "$as_me:8665: result: $cf_result" >&5
8666 echo "${ECHO_T}$cf_result" >&6
8667
8668 if test "$cf_result" = yes ; then
8669         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8670 elif test "x" != "x" ; then
8671         echo "$as_me:8671: checking checking for compatible value versus " >&5
8672 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8673         cat >conftest.$ac_ext <<_ACEOF
8674 #line 8674 "configure"
8675 #include "confdefs.h"
8676 #include <sys/types.h>
8677
8678 int
8679 main ()
8680 {
8681
8682 #if _XOPEN_SOURCE_EXTENDED- < 0
8683 make an error
8684 #endif
8685   ;
8686   return 0;
8687 }
8688 _ACEOF
8689 rm -f conftest.$ac_objext
8690 if { (eval echo "$as_me:8690: \"$ac_compile\"") >&5
8691   (eval $ac_compile) 2>&5
8692   ac_status=$?
8693   echo "$as_me:8693: \$? = $ac_status" >&5
8694   (exit $ac_status); } &&
8695          { ac_try='test -s conftest.$ac_objext'
8696   { (eval echo "$as_me:8696: \"$ac_try\"") >&5
8697   (eval $ac_try) 2>&5
8698   ac_status=$?
8699   echo "$as_me:8699: \$? = $ac_status" >&5
8700   (exit $ac_status); }; }; then
8701   cf_result=yes
8702 else
8703   echo "$as_me: failed program was:" >&5
8704 cat conftest.$ac_ext >&5
8705 cf_result=no
8706 fi
8707 rm -f conftest.$ac_objext conftest.$ac_ext
8708         echo "$as_me:8708: result: $cf_result" >&5
8709 echo "${ECHO_T}$cf_result" >&6
8710         if test "$cf_result" = no ; then
8711                 # perhaps we can override it - try...
8712                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8713         fi
8714 fi
8715
8716 fi
8717
8718         # with_overwrite=no
8719         NCURSES_CH_T=cchar_t
8720
8721 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8722 do
8723 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8724 echo "$as_me:8724: checking for $ac_func" >&5
8725 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8726 if eval "test \"\${$as_ac_var+set}\" = set"; then
8727   echo $ECHO_N "(cached) $ECHO_C" >&6
8728 else
8729   cat >conftest.$ac_ext <<_ACEOF
8730 #line 8730 "configure"
8731 #include "confdefs.h"
8732 /* System header to define __stub macros and hopefully few prototypes,
8733     which can conflict with char $ac_func (); below.  */
8734 #include <assert.h>
8735 /* Override any gcc2 internal prototype to avoid an error.  */
8736 #ifdef __cplusplus
8737 extern "C"
8738 #endif
8739 /* We use char because int might match the return type of a gcc2
8740    builtin and then its argument prototype would still apply.  */
8741 char $ac_func ();
8742 char (*f) ();
8743
8744 int
8745 main ()
8746 {
8747 /* The GNU C library defines this for functions which it implements
8748     to always fail with ENOSYS.  Some functions are actually named
8749     something starting with __ and the normal name is an alias.  */
8750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8751 choke me
8752 #else
8753 f = $ac_func;
8754 #endif
8755
8756   ;
8757   return 0;
8758 }
8759 _ACEOF
8760 rm -f conftest.$ac_objext conftest$ac_exeext
8761 if { (eval echo "$as_me:8761: \"$ac_link\"") >&5
8762   (eval $ac_link) 2>&5
8763   ac_status=$?
8764   echo "$as_me:8764: \$? = $ac_status" >&5
8765   (exit $ac_status); } &&
8766          { ac_try='test -s conftest$ac_exeext'
8767   { (eval echo "$as_me:8767: \"$ac_try\"") >&5
8768   (eval $ac_try) 2>&5
8769   ac_status=$?
8770   echo "$as_me:8770: \$? = $ac_status" >&5
8771   (exit $ac_status); }; }; then
8772   eval "$as_ac_var=yes"
8773 else
8774   echo "$as_me: failed program was:" >&5
8775 cat conftest.$ac_ext >&5
8776 eval "$as_ac_var=no"
8777 fi
8778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8779 fi
8780 echo "$as_me:8780: result: `eval echo '${'$as_ac_var'}'`" >&5
8781 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8782 if test `eval echo '${'$as_ac_var'}'` = yes; then
8783   cat >>confdefs.h <<EOF
8784 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8785 EOF
8786
8787 fi
8788 done
8789
8790         if test "$ac_cv_func_putwc" != yes ; then
8791
8792 echo "$as_me:8792: checking for multibyte character support" >&5
8793 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8794 if test "${cf_cv_utf8_lib+set}" = set; then
8795   echo $ECHO_N "(cached) $ECHO_C" >&6
8796 else
8797
8798         cf_save_LIBS="$LIBS"
8799         cat >conftest.$ac_ext <<_ACEOF
8800 #line 8800 "configure"
8801 #include "confdefs.h"
8802
8803 #include <stdlib.h>
8804 int
8805 main ()
8806 {
8807 putwc(0,0);
8808   ;
8809   return 0;
8810 }
8811 _ACEOF
8812 rm -f conftest.$ac_objext conftest$ac_exeext
8813 if { (eval echo "$as_me:8813: \"$ac_link\"") >&5
8814   (eval $ac_link) 2>&5
8815   ac_status=$?
8816   echo "$as_me:8816: \$? = $ac_status" >&5
8817   (exit $ac_status); } &&
8818          { ac_try='test -s conftest$ac_exeext'
8819   { (eval echo "$as_me:8819: \"$ac_try\"") >&5
8820   (eval $ac_try) 2>&5
8821   ac_status=$?
8822   echo "$as_me:8822: \$? = $ac_status" >&5
8823   (exit $ac_status); }; }; then
8824   cf_cv_utf8_lib=yes
8825 else
8826   echo "$as_me: failed program was:" >&5
8827 cat conftest.$ac_ext >&5
8828
8829 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8830 # will be set on completion of the AC_TRY_LINK below.
8831 cf_cv_header_path_utf8=
8832 cf_cv_library_path_utf8=
8833
8834 echo "${as_me:-configure}:8834: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8835
8836 cf_save_LIBS="$LIBS"
8837
8838 cat >conftest.$ac_ext <<_ACEOF
8839 #line 8839 "configure"
8840 #include "confdefs.h"
8841
8842 #include <libutf8.h>
8843 int
8844 main ()
8845 {
8846 putwc(0,0);
8847   ;
8848   return 0;
8849 }
8850 _ACEOF
8851 rm -f conftest.$ac_objext conftest$ac_exeext
8852 if { (eval echo "$as_me:8852: \"$ac_link\"") >&5
8853   (eval $ac_link) 2>&5
8854   ac_status=$?
8855   echo "$as_me:8855: \$? = $ac_status" >&5
8856   (exit $ac_status); } &&
8857          { ac_try='test -s conftest$ac_exeext'
8858   { (eval echo "$as_me:8858: \"$ac_try\"") >&5
8859   (eval $ac_try) 2>&5
8860   ac_status=$?
8861   echo "$as_me:8861: \$? = $ac_status" >&5
8862   (exit $ac_status); }; }; then
8863
8864         cf_cv_find_linkage_utf8=yes
8865         cf_cv_header_path_utf8=/usr/include
8866         cf_cv_library_path_utf8=/usr/lib
8867
8868 else
8869   echo "$as_me: failed program was:" >&5
8870 cat conftest.$ac_ext >&5
8871
8872 LIBS="-lutf8  $cf_save_LIBS"
8873
8874 cat >conftest.$ac_ext <<_ACEOF
8875 #line 8875 "configure"
8876 #include "confdefs.h"
8877
8878 #include <libutf8.h>
8879 int
8880 main ()
8881 {
8882 putwc(0,0);
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 rm -f conftest.$ac_objext conftest$ac_exeext
8888 if { (eval echo "$as_me:8888: \"$ac_link\"") >&5
8889   (eval $ac_link) 2>&5
8890   ac_status=$?
8891   echo "$as_me:8891: \$? = $ac_status" >&5
8892   (exit $ac_status); } &&
8893          { ac_try='test -s conftest$ac_exeext'
8894   { (eval echo "$as_me:8894: \"$ac_try\"") >&5
8895   (eval $ac_try) 2>&5
8896   ac_status=$?
8897   echo "$as_me:8897: \$? = $ac_status" >&5
8898   (exit $ac_status); }; }; then
8899
8900         cf_cv_find_linkage_utf8=yes
8901         cf_cv_header_path_utf8=/usr/include
8902         cf_cv_library_path_utf8=/usr/lib
8903         cf_cv_library_file_utf8="-lutf8"
8904
8905 else
8906   echo "$as_me: failed program was:" >&5
8907 cat conftest.$ac_ext >&5
8908
8909         cf_cv_find_linkage_utf8=no
8910         LIBS="$cf_save_LIBS"
8911
8912     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8913
8914 echo "${as_me:-configure}:8914: testing find linkage for utf8 library ..." 1>&5
8915
8916 echo "${as_me:-configure}:8916: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8917
8918     cf_save_CPPFLAGS="$CPPFLAGS"
8919     cf_test_CPPFLAGS="$CPPFLAGS"
8920
8921 cf_search=
8922
8923 # collect the current set of include-directories from compiler flags
8924 cf_header_path_list=""
8925 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8926         for cf_header_path in $CPPFLAGS $CFLAGS
8927         do
8928                 case $cf_header_path in #(vi
8929                 -I*)
8930                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8931
8932 test "$cf_header_path" != "NONE" && \
8933 test -d "$cf_header_path" && \
8934  {
8935         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8936         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8937         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8938         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8939         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8940         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8941 }
8942
8943                         cf_header_path_list="$cf_header_path_list $cf_search"
8944                         ;;
8945                 esac
8946         done
8947 fi
8948
8949 # add the variations for the package we are looking for
8950
8951 cf_search=
8952
8953 test "/usr" != "$prefix" && \
8954 test -d "/usr" && \
8955 (test $prefix = NONE || test "/usr" != "$prefix") && {
8956         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8957         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8958         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8959         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8960         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8961         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8962 }
8963
8964 test "$prefix" != "NONE" && \
8965 test -d "$prefix" && \
8966  {
8967         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8968         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8969         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8970         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8971         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8972         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8973 }
8974
8975 test "/usr/local" != "$prefix" && \
8976 test -d "/usr/local" && \
8977 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8978         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8979         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8980         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8981         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8982         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8983         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8984 }
8985
8986 test "/opt" != "$prefix" && \
8987 test -d "/opt" && \
8988 (test $prefix = NONE || test "/opt" != "$prefix") && {
8989         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8990         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8991         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8992         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8993         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8994         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8995 }
8996
8997 test "$HOME" != "$prefix" && \
8998 test -d "$HOME" && \
8999 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9000         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9001         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9002         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9003         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9004         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9005         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9006 }
9007
9008 test "$includedir" != NONE && \
9009 test "$includedir" != "/usr/include" && \
9010 test -d "$includedir" && {
9011         test -d $includedir &&    cf_search="$cf_search $includedir"
9012         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9013 }
9014
9015 test "$oldincludedir" != NONE && \
9016 test "$oldincludedir" != "/usr/include" && \
9017 test -d "$oldincludedir" && {
9018         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9019         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9020 }
9021
9022 cf_search="$cf_search $cf_header_path_list"
9023
9024     for cf_cv_header_path_utf8 in $cf_search
9025     do
9026       if test -d $cf_cv_header_path_utf8 ; then
9027         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9028
9029 echo "${as_me:-configure}:9029: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9030
9031         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9032         cat >conftest.$ac_ext <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9035
9036 #include <libutf8.h>
9037 int
9038 main ()
9039 {
9040 putwc(0,0);
9041   ;
9042   return 0;
9043 }
9044 _ACEOF
9045 rm -f conftest.$ac_objext
9046 if { (eval echo "$as_me:9046: \"$ac_compile\"") >&5
9047   (eval $ac_compile) 2>&5
9048   ac_status=$?
9049   echo "$as_me:9049: \$? = $ac_status" >&5
9050   (exit $ac_status); } &&
9051          { ac_try='test -s conftest.$ac_objext'
9052   { (eval echo "$as_me:9052: \"$ac_try\"") >&5
9053   (eval $ac_try) 2>&5
9054   ac_status=$?
9055   echo "$as_me:9055: \$? = $ac_status" >&5
9056   (exit $ac_status); }; }; then
9057
9058             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9059
9060 echo "${as_me:-configure}:9060: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9061
9062             cf_cv_find_linkage_utf8=maybe
9063             cf_test_CPPFLAGS="$CPPFLAGS"
9064             break
9065 else
9066   echo "$as_me: failed program was:" >&5
9067 cat conftest.$ac_ext >&5
9068
9069             CPPFLAGS="$cf_save_CPPFLAGS"
9070
9071 fi
9072 rm -f conftest.$ac_objext conftest.$ac_ext
9073       fi
9074     done
9075
9076     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9077
9078 echo "${as_me:-configure}:9078: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9079
9080       cf_save_LIBS="$LIBS"
9081       cf_save_LDFLAGS="$LDFLAGS"
9082
9083       if test "$cf_cv_find_linkage_utf8" != yes ; then
9084
9085 cf_search=
9086 cf_library_path_list=""
9087 if test -n "${LDFLAGS}${LIBS}" ; then
9088         for cf_library_path in $LDFLAGS $LIBS
9089         do
9090                 case $cf_library_path in #(vi
9091                 -L*)
9092                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9093
9094 test "$cf_library_path" != "NONE" && \
9095 test -d "$cf_library_path" && \
9096  {
9097         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9098         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9099         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9100         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9101         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9102         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9103 }
9104
9105                         cf_library_path_list="$cf_library_path_list $cf_search"
9106                         ;;
9107                 esac
9108         done
9109 fi
9110
9111 cf_search=
9112
9113 test "/usr" != "$prefix" && \
9114 test -d "/usr" && \
9115 (test $prefix = NONE || test "/usr" != "$prefix") && {
9116         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9117         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9118         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9119         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9120         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9121         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9122 }
9123
9124 test "$prefix" != "NONE" && \
9125 test -d "$prefix" && \
9126  {
9127         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9128         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9129         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9130         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9131         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9132         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9133 }
9134
9135 test "/usr/local" != "$prefix" && \
9136 test -d "/usr/local" && \
9137 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9138         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9139         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9140         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9141         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9142         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9143         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9144 }
9145
9146 test "/opt" != "$prefix" && \
9147 test -d "/opt" && \
9148 (test $prefix = NONE || test "/opt" != "$prefix") && {
9149         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9150         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9151         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9152         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9153         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9154         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9155 }
9156
9157 test "$HOME" != "$prefix" && \
9158 test -d "$HOME" && \
9159 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9160         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9161         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9162         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9163         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9164         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9165         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9166 }
9167
9168 cf_search="$cf_library_path_list $cf_search"
9169
9170         for cf_cv_library_path_utf8 in $cf_search
9171         do
9172           if test -d $cf_cv_library_path_utf8 ; then
9173             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9174
9175 echo "${as_me:-configure}:9175: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9176
9177             CPPFLAGS="$cf_test_CPPFLAGS"
9178             LIBS="-lutf8  $cf_save_LIBS"
9179             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9180             cat >conftest.$ac_ext <<_ACEOF
9181 #line 9181 "configure"
9182 #include "confdefs.h"
9183
9184 #include <libutf8.h>
9185 int
9186 main ()
9187 {
9188 putwc(0,0);
9189   ;
9190   return 0;
9191 }
9192 _ACEOF
9193 rm -f conftest.$ac_objext conftest$ac_exeext
9194 if { (eval echo "$as_me:9194: \"$ac_link\"") >&5
9195   (eval $ac_link) 2>&5
9196   ac_status=$?
9197   echo "$as_me:9197: \$? = $ac_status" >&5
9198   (exit $ac_status); } &&
9199          { ac_try='test -s conftest$ac_exeext'
9200   { (eval echo "$as_me:9200: \"$ac_try\"") >&5
9201   (eval $ac_try) 2>&5
9202   ac_status=$?
9203   echo "$as_me:9203: \$? = $ac_status" >&5
9204   (exit $ac_status); }; }; then
9205
9206                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9207
9208 echo "${as_me:-configure}:9208: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9209
9210                 cf_cv_find_linkage_utf8=yes
9211                 cf_cv_library_file_utf8="-lutf8"
9212                 break
9213 else
9214   echo "$as_me: failed program was:" >&5
9215 cat conftest.$ac_ext >&5
9216
9217                 CPPFLAGS="$cf_save_CPPFLAGS"
9218                 LIBS="$cf_save_LIBS"
9219                 LDFLAGS="$cf_save_LDFLAGS"
9220
9221 fi
9222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9223           fi
9224         done
9225         CPPFLAGS="$cf_save_CPPFLAGS"
9226         LDFLAGS="$cf_save_LDFLAGS"
9227       fi
9228
9229     else
9230       cf_cv_find_linkage_utf8=no
9231     fi
9232
9233 fi
9234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9235
9236 fi
9237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9238
9239 LIBS="$cf_save_LIBS"
9240
9241 if test "$cf_cv_find_linkage_utf8" = yes ; then
9242 cf_cv_utf8_lib=add-on
9243 else
9244 cf_cv_utf8_lib=no
9245 fi
9246
9247 fi
9248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9249 fi
9250 echo "$as_me:9250: result: $cf_cv_utf8_lib" >&5
9251 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9252
9253 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9254 # ncurses/ncursesw:
9255 if test "$cf_cv_utf8_lib" = "add-on" ; then
9256         cat >>confdefs.h <<\EOF
9257 #define HAVE_LIBUTF8_H 1
9258 EOF
9259
9260 if test -n "$cf_cv_header_path_utf8" ; then
9261   for cf_add_incdir in $cf_cv_header_path_utf8
9262   do
9263         while test $cf_add_incdir != /usr/include
9264         do
9265           if test -d $cf_add_incdir
9266           then
9267                 cf_have_incdir=no
9268                 if test -n "$CFLAGS$CPPFLAGS" ; then
9269                   # a loop is needed to ensure we can add subdirs of existing dirs
9270                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9271                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9272                           cf_have_incdir=yes; break
9273                         fi
9274                   done
9275                 fi
9276
9277                 if test "$cf_have_incdir" = no ; then
9278                   if test "$cf_add_incdir" = /usr/local/include ; then
9279                         if test "$GCC" = yes
9280                         then
9281                           cf_save_CPPFLAGS=$CPPFLAGS
9282                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9283                           cat >conftest.$ac_ext <<_ACEOF
9284 #line 9284 "configure"
9285 #include "confdefs.h"
9286 #include <stdio.h>
9287 int
9288 main ()
9289 {
9290 printf("Hello")
9291   ;
9292   return 0;
9293 }
9294 _ACEOF
9295 rm -f conftest.$ac_objext
9296 if { (eval echo "$as_me:9296: \"$ac_compile\"") >&5
9297   (eval $ac_compile) 2>&5
9298   ac_status=$?
9299   echo "$as_me:9299: \$? = $ac_status" >&5
9300   (exit $ac_status); } &&
9301          { ac_try='test -s conftest.$ac_objext'
9302   { (eval echo "$as_me:9302: \"$ac_try\"") >&5
9303   (eval $ac_try) 2>&5
9304   ac_status=$?
9305   echo "$as_me:9305: \$? = $ac_status" >&5
9306   (exit $ac_status); }; }; then
9307   :
9308 else
9309   echo "$as_me: failed program was:" >&5
9310 cat conftest.$ac_ext >&5
9311 cf_have_incdir=yes
9312 fi
9313 rm -f conftest.$ac_objext conftest.$ac_ext
9314                           CPPFLAGS=$cf_save_CPPFLAGS
9315                         fi
9316                   fi
9317                 fi
9318
9319                 if test "$cf_have_incdir" = no ; then
9320                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9321
9322 echo "${as_me:-configure}:9322: testing adding $cf_add_incdir to include-path ..." 1>&5
9323
9324                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9325
9326                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9327                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9328                   cf_add_incdir="$cf_top_incdir"
9329                 else
9330                   break
9331                 fi
9332           fi
9333         done
9334   done
9335 fi
9336
9337 if test -n "$cf_cv_library_path_utf8" ; then
9338   for cf_add_libdir in $cf_cv_library_path_utf8
9339   do
9340     if test $cf_add_libdir = /usr/lib ; then
9341       :
9342     elif test -d $cf_add_libdir
9343     then
9344       cf_have_libdir=no
9345       if test -n "$LDFLAGS$LIBS" ; then
9346         # a loop is needed to ensure we can add subdirs of existing dirs
9347         for cf_test_libdir in $LDFLAGS $LIBS ; do
9348           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9349             cf_have_libdir=yes; break
9350           fi
9351         done
9352       fi
9353       if test "$cf_have_libdir" = no ; then
9354         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9355
9356 echo "${as_me:-configure}:9356: testing adding $cf_add_libdir to library-path ..." 1>&5
9357
9358         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9359       fi
9360     fi
9361   done
9362 fi
9363
9364         LIBS="$cf_cv_library_file_utf8 $LIBS"
9365 fi
9366
9367                 if test "$cf_cv_utf8_lib" != no ; then
9368                         NCURSES_LIBUTF8=1
9369                 fi
9370         fi
9371
9372 # This is needed on Tru64 5.0 to declare mbstate_t
9373 echo "$as_me:9373: checking if we must include wchar.h to declare mbstate_t" >&5
9374 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9375 if test "${cf_cv_mbstate_t+set}" = set; then
9376   echo $ECHO_N "(cached) $ECHO_C" >&6
9377 else
9378
9379 cat >conftest.$ac_ext <<_ACEOF
9380 #line 9380 "configure"
9381 #include "confdefs.h"
9382
9383 #include <stdlib.h>
9384 #include <stdarg.h>
9385 #include <stdio.h>
9386 #ifdef HAVE_LIBUTF8_H
9387 #include <libutf8.h>
9388 #endif
9389 int
9390 main ()
9391 {
9392 mbstate_t state
9393   ;
9394   return 0;
9395 }
9396 _ACEOF
9397 rm -f conftest.$ac_objext
9398 if { (eval echo "$as_me:9398: \"$ac_compile\"") >&5
9399   (eval $ac_compile) 2>&5
9400   ac_status=$?
9401   echo "$as_me:9401: \$? = $ac_status" >&5
9402   (exit $ac_status); } &&
9403          { ac_try='test -s conftest.$ac_objext'
9404   { (eval echo "$as_me:9404: \"$ac_try\"") >&5
9405   (eval $ac_try) 2>&5
9406   ac_status=$?
9407   echo "$as_me:9407: \$? = $ac_status" >&5
9408   (exit $ac_status); }; }; then
9409   cf_cv_mbstate_t=no
9410 else
9411   echo "$as_me: failed program was:" >&5
9412 cat conftest.$ac_ext >&5
9413 cat >conftest.$ac_ext <<_ACEOF
9414 #line 9414 "configure"
9415 #include "confdefs.h"
9416
9417 #include <stdlib.h>
9418 #include <stdarg.h>
9419 #include <stdio.h>
9420 #include <wchar.h>
9421 #ifdef HAVE_LIBUTF8_H
9422 #include <libutf8.h>
9423 #endif
9424 int
9425 main ()
9426 {
9427 mbstate_t value
9428   ;
9429   return 0;
9430 }
9431 _ACEOF
9432 rm -f conftest.$ac_objext
9433 if { (eval echo "$as_me:9433: \"$ac_compile\"") >&5
9434   (eval $ac_compile) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); } &&
9438          { ac_try='test -s conftest.$ac_objext'
9439   { (eval echo "$as_me:9439: \"$ac_try\"") >&5
9440   (eval $ac_try) 2>&5
9441   ac_status=$?
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); }; }; then
9444   cf_cv_mbstate_t=yes
9445 else
9446   echo "$as_me: failed program was:" >&5
9447 cat conftest.$ac_ext >&5
9448 cf_cv_mbstate_t=unknown
9449 fi
9450 rm -f conftest.$ac_objext conftest.$ac_ext
9451 fi
9452 rm -f conftest.$ac_objext conftest.$ac_ext
9453 fi
9454 echo "$as_me:9454: result: $cf_cv_mbstate_t" >&5
9455 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9456
9457 if test "$cf_cv_mbstate_t" = yes ; then
9458         cat >>confdefs.h <<\EOF
9459 #define NEED_WCHAR_H 1
9460 EOF
9461
9462         NEED_WCHAR_H=1
9463 fi
9464
9465 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9466 if test "$cf_cv_mbstate_t" = unknown ; then
9467         NCURSES_MBSTATE_T=1
9468 fi
9469
9470 # This is needed on Tru64 5.0 to declare wchar_t
9471 echo "$as_me:9471: checking if we must include wchar.h to declare wchar_t" >&5
9472 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9473 if test "${cf_cv_wchar_t+set}" = set; then
9474   echo $ECHO_N "(cached) $ECHO_C" >&6
9475 else
9476
9477 cat >conftest.$ac_ext <<_ACEOF
9478 #line 9478 "configure"
9479 #include "confdefs.h"
9480
9481 #include <stdlib.h>
9482 #include <stdarg.h>
9483 #include <stdio.h>
9484 #ifdef HAVE_LIBUTF8_H
9485 #include <libutf8.h>
9486 #endif
9487 int
9488 main ()
9489 {
9490 wchar_t state
9491   ;
9492   return 0;
9493 }
9494 _ACEOF
9495 rm -f conftest.$ac_objext
9496 if { (eval echo "$as_me:9496: \"$ac_compile\"") >&5
9497   (eval $ac_compile) 2>&5
9498   ac_status=$?
9499   echo "$as_me:9499: \$? = $ac_status" >&5
9500   (exit $ac_status); } &&
9501          { ac_try='test -s conftest.$ac_objext'
9502   { (eval echo "$as_me:9502: \"$ac_try\"") >&5
9503   (eval $ac_try) 2>&5
9504   ac_status=$?
9505   echo "$as_me:9505: \$? = $ac_status" >&5
9506   (exit $ac_status); }; }; then
9507   cf_cv_wchar_t=no
9508 else
9509   echo "$as_me: failed program was:" >&5
9510 cat conftest.$ac_ext >&5
9511 cat >conftest.$ac_ext <<_ACEOF
9512 #line 9512 "configure"
9513 #include "confdefs.h"
9514
9515 #include <stdlib.h>
9516 #include <stdarg.h>
9517 #include <stdio.h>
9518 #include <wchar.h>
9519 #ifdef HAVE_LIBUTF8_H
9520 #include <libutf8.h>
9521 #endif
9522 int
9523 main ()
9524 {
9525 wchar_t value
9526   ;
9527   return 0;
9528 }
9529 _ACEOF
9530 rm -f conftest.$ac_objext
9531 if { (eval echo "$as_me:9531: \"$ac_compile\"") >&5
9532   (eval $ac_compile) 2>&5
9533   ac_status=$?
9534   echo "$as_me:9534: \$? = $ac_status" >&5
9535   (exit $ac_status); } &&
9536          { ac_try='test -s conftest.$ac_objext'
9537   { (eval echo "$as_me:9537: \"$ac_try\"") >&5
9538   (eval $ac_try) 2>&5
9539   ac_status=$?
9540   echo "$as_me:9540: \$? = $ac_status" >&5
9541   (exit $ac_status); }; }; then
9542   cf_cv_wchar_t=yes
9543 else
9544   echo "$as_me: failed program was:" >&5
9545 cat conftest.$ac_ext >&5
9546 cf_cv_wchar_t=unknown
9547 fi
9548 rm -f conftest.$ac_objext conftest.$ac_ext
9549 fi
9550 rm -f conftest.$ac_objext conftest.$ac_ext
9551 fi
9552 echo "$as_me:9552: result: $cf_cv_wchar_t" >&5
9553 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9554
9555 if test "$cf_cv_wchar_t" = yes ; then
9556         cat >>confdefs.h <<\EOF
9557 #define NEED_WCHAR_H 1
9558 EOF
9559
9560         NEED_WCHAR_H=1
9561 fi
9562
9563 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9564 if test "$cf_cv_wchar_t" = unknown ; then
9565         NCURSES_WCHAR_T=1
9566 fi
9567
9568 # if we find wchar_t in either place, use substitution to provide a fallback.
9569 if test "$cf_cv_wchar_t" != unknown ; then
9570         NCURSES_OK_WCHAR_T=1
9571 fi
9572
9573 # This is needed on Tru64 5.0 to declare wint_t
9574 echo "$as_me:9574: checking if we must include wchar.h to declare wint_t" >&5
9575 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9576 if test "${cf_cv_wint_t+set}" = set; then
9577   echo $ECHO_N "(cached) $ECHO_C" >&6
9578 else
9579
9580 cat >conftest.$ac_ext <<_ACEOF
9581 #line 9581 "configure"
9582 #include "confdefs.h"
9583
9584 #include <stdlib.h>
9585 #include <stdarg.h>
9586 #include <stdio.h>
9587 #ifdef HAVE_LIBUTF8_H
9588 #include <libutf8.h>
9589 #endif
9590 int
9591 main ()
9592 {
9593 wint_t state
9594   ;
9595   return 0;
9596 }
9597 _ACEOF
9598 rm -f conftest.$ac_objext
9599 if { (eval echo "$as_me:9599: \"$ac_compile\"") >&5
9600   (eval $ac_compile) 2>&5
9601   ac_status=$?
9602   echo "$as_me:9602: \$? = $ac_status" >&5
9603   (exit $ac_status); } &&
9604          { ac_try='test -s conftest.$ac_objext'
9605   { (eval echo "$as_me:9605: \"$ac_try\"") >&5
9606   (eval $ac_try) 2>&5
9607   ac_status=$?
9608   echo "$as_me:9608: \$? = $ac_status" >&5
9609   (exit $ac_status); }; }; then
9610   cf_cv_wint_t=no
9611 else
9612   echo "$as_me: failed program was:" >&5
9613 cat conftest.$ac_ext >&5
9614 cat >conftest.$ac_ext <<_ACEOF
9615 #line 9615 "configure"
9616 #include "confdefs.h"
9617
9618 #include <stdlib.h>
9619 #include <stdarg.h>
9620 #include <stdio.h>
9621 #include <wchar.h>
9622 #ifdef HAVE_LIBUTF8_H
9623 #include <libutf8.h>
9624 #endif
9625 int
9626 main ()
9627 {
9628 wint_t value
9629   ;
9630   return 0;
9631 }
9632 _ACEOF
9633 rm -f conftest.$ac_objext
9634 if { (eval echo "$as_me:9634: \"$ac_compile\"") >&5
9635   (eval $ac_compile) 2>&5
9636   ac_status=$?
9637   echo "$as_me:9637: \$? = $ac_status" >&5
9638   (exit $ac_status); } &&
9639          { ac_try='test -s conftest.$ac_objext'
9640   { (eval echo "$as_me:9640: \"$ac_try\"") >&5
9641   (eval $ac_try) 2>&5
9642   ac_status=$?
9643   echo "$as_me:9643: \$? = $ac_status" >&5
9644   (exit $ac_status); }; }; then
9645   cf_cv_wint_t=yes
9646 else
9647   echo "$as_me: failed program was:" >&5
9648 cat conftest.$ac_ext >&5
9649 cf_cv_wint_t=unknown
9650 fi
9651 rm -f conftest.$ac_objext conftest.$ac_ext
9652 fi
9653 rm -f conftest.$ac_objext conftest.$ac_ext
9654 fi
9655 echo "$as_me:9655: result: $cf_cv_wint_t" >&5
9656 echo "${ECHO_T}$cf_cv_wint_t" >&6
9657
9658 if test "$cf_cv_wint_t" = yes ; then
9659         cat >>confdefs.h <<\EOF
9660 #define NEED_WCHAR_H 1
9661 EOF
9662
9663         NEED_WCHAR_H=1
9664 fi
9665
9666 # if we do not find wint_t in either place, use substitution to provide a fallback.
9667 if test "$cf_cv_wint_t" = unknown ; then
9668         NCURSES_WINT_T=1
9669 fi
9670
9671 # if we find wint_t in either place, use substitution to provide a fallback.
9672 if test "$cf_cv_wint_t" != unknown ; then
9673         NCURSES_OK_WINT_T=1
9674 fi
9675
9676         if test "$NCURSES_MBSTATE_T" != 0; then
9677                 cat >>confdefs.h <<\EOF
9678 #define NEED_MBSTATE_T_DEF 1
9679 EOF
9680
9681         fi
9682 fi
9683
9684 ###   use option --disable-lp64 to allow long chtype
9685 case $cf_cv_abi_version in
9686 [345]*)
9687         default_with_lp64=no
9688         ;;
9689 *)
9690         default_with_lp64=yes
9691         ;;
9692 esac
9693
9694 echo "$as_me:9694: checking whether to enable _LP64 definition in curses.h" >&5
9695 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9696
9697 # Check whether --enable-lp64 or --disable-lp64 was given.
9698 if test "${enable_lp64+set}" = set; then
9699   enableval="$enable_lp64"
9700   with_lp64=$enableval
9701 else
9702   with_lp64=$default_with_lp64
9703 fi;
9704 echo "$as_me:9704: result: $with_lp64" >&5
9705 echo "${ECHO_T}$with_lp64" >&6
9706
9707 if test "$with_lp64" = yes ; then
9708         cf_cv_enable_lp64=1
9709 else
9710         cf_cv_enable_lp64=0
9711 fi
9712
9713 # Check whether --enable-largefile or --disable-largefile was given.
9714 if test "${enable_largefile+set}" = set; then
9715   enableval="$enable_largefile"
9716
9717 fi;
9718 if test "$enable_largefile" != no; then
9719
9720   echo "$as_me:9720: checking for special C compiler options needed for large files" >&5
9721 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9722 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9723   echo $ECHO_N "(cached) $ECHO_C" >&6
9724 else
9725   ac_cv_sys_largefile_CC=no
9726      if test "$GCC" != yes; then
9727        ac_save_CC=$CC
9728        while :; do
9729          # IRIX 6.2 and later do not support large files by default,
9730          # so use the C compiler's -n32 option if that helps.
9731          cat >conftest.$ac_ext <<_ACEOF
9732 #line 9732 "configure"
9733 #include "confdefs.h"
9734 #include <sys/types.h>
9735  /* Check that off_t can represent 2**63 - 1 correctly.
9736     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9737     since some C++ compilers masquerading as C compilers
9738     incorrectly reject 9223372036854775807.  */
9739 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9740   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9741                        && LARGE_OFF_T % 2147483647 == 1)
9742                       ? 1 : -1];
9743 int
9744 main ()
9745 {
9746
9747   ;
9748   return 0;
9749 }
9750 _ACEOF
9751          rm -f conftest.$ac_objext
9752 if { (eval echo "$as_me:9752: \"$ac_compile\"") >&5
9753   (eval $ac_compile) 2>&5
9754   ac_status=$?
9755   echo "$as_me:9755: \$? = $ac_status" >&5
9756   (exit $ac_status); } &&
9757          { ac_try='test -s conftest.$ac_objext'
9758   { (eval echo "$as_me:9758: \"$ac_try\"") >&5
9759   (eval $ac_try) 2>&5
9760   ac_status=$?
9761   echo "$as_me:9761: \$? = $ac_status" >&5
9762   (exit $ac_status); }; }; then
9763   break
9764 else
9765   echo "$as_me: failed program was:" >&5
9766 cat conftest.$ac_ext >&5
9767 fi
9768 rm -f conftest.$ac_objext
9769          CC="$CC -n32"
9770          rm -f conftest.$ac_objext
9771 if { (eval echo "$as_me:9771: \"$ac_compile\"") >&5
9772   (eval $ac_compile) 2>&5
9773   ac_status=$?
9774   echo "$as_me:9774: \$? = $ac_status" >&5
9775   (exit $ac_status); } &&
9776          { ac_try='test -s conftest.$ac_objext'
9777   { (eval echo "$as_me:9777: \"$ac_try\"") >&5
9778   (eval $ac_try) 2>&5
9779   ac_status=$?
9780   echo "$as_me:9780: \$? = $ac_status" >&5
9781   (exit $ac_status); }; }; then
9782   ac_cv_sys_largefile_CC=' -n32'; break
9783 else
9784   echo "$as_me: failed program was:" >&5
9785 cat conftest.$ac_ext >&5
9786 fi
9787 rm -f conftest.$ac_objext
9788          break
9789        done
9790        CC=$ac_save_CC
9791        rm -f conftest.$ac_ext
9792     fi
9793 fi
9794 echo "$as_me:9794: result: $ac_cv_sys_largefile_CC" >&5
9795 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9796   if test "$ac_cv_sys_largefile_CC" != no; then
9797     CC=$CC$ac_cv_sys_largefile_CC
9798   fi
9799
9800   echo "$as_me:9800: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9801 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9802 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9803   echo $ECHO_N "(cached) $ECHO_C" >&6
9804 else
9805   while :; do
9806   ac_cv_sys_file_offset_bits=no
9807   cat >conftest.$ac_ext <<_ACEOF
9808 #line 9808 "configure"
9809 #include "confdefs.h"
9810 #include <sys/types.h>
9811  /* Check that off_t can represent 2**63 - 1 correctly.
9812     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9813     since some C++ compilers masquerading as C compilers
9814     incorrectly reject 9223372036854775807.  */
9815 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9816   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9817                        && LARGE_OFF_T % 2147483647 == 1)
9818                       ? 1 : -1];
9819 int
9820 main ()
9821 {
9822
9823   ;
9824   return 0;
9825 }
9826 _ACEOF
9827 rm -f conftest.$ac_objext
9828 if { (eval echo "$as_me:9828: \"$ac_compile\"") >&5
9829   (eval $ac_compile) 2>&5
9830   ac_status=$?
9831   echo "$as_me:9831: \$? = $ac_status" >&5
9832   (exit $ac_status); } &&
9833          { ac_try='test -s conftest.$ac_objext'
9834   { (eval echo "$as_me:9834: \"$ac_try\"") >&5
9835   (eval $ac_try) 2>&5
9836   ac_status=$?
9837   echo "$as_me:9837: \$? = $ac_status" >&5
9838   (exit $ac_status); }; }; then
9839   break
9840 else
9841   echo "$as_me: failed program was:" >&5
9842 cat conftest.$ac_ext >&5
9843 fi
9844 rm -f conftest.$ac_objext conftest.$ac_ext
9845   cat >conftest.$ac_ext <<_ACEOF
9846 #line 9846 "configure"
9847 #include "confdefs.h"
9848 #define _FILE_OFFSET_BITS 64
9849 #include <sys/types.h>
9850  /* Check that off_t can represent 2**63 - 1 correctly.
9851     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9852     since some C++ compilers masquerading as C compilers
9853     incorrectly reject 9223372036854775807.  */
9854 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9855   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9856                        && LARGE_OFF_T % 2147483647 == 1)
9857                       ? 1 : -1];
9858 int
9859 main ()
9860 {
9861
9862   ;
9863   return 0;
9864 }
9865 _ACEOF
9866 rm -f conftest.$ac_objext
9867 if { (eval echo "$as_me:9867: \"$ac_compile\"") >&5
9868   (eval $ac_compile) 2>&5
9869   ac_status=$?
9870   echo "$as_me:9870: \$? = $ac_status" >&5
9871   (exit $ac_status); } &&
9872          { ac_try='test -s conftest.$ac_objext'
9873   { (eval echo "$as_me:9873: \"$ac_try\"") >&5
9874   (eval $ac_try) 2>&5
9875   ac_status=$?
9876   echo "$as_me:9876: \$? = $ac_status" >&5
9877   (exit $ac_status); }; }; then
9878   ac_cv_sys_file_offset_bits=64; break
9879 else
9880   echo "$as_me: failed program was:" >&5
9881 cat conftest.$ac_ext >&5
9882 fi
9883 rm -f conftest.$ac_objext conftest.$ac_ext
9884   break
9885 done
9886 fi
9887 echo "$as_me:9887: result: $ac_cv_sys_file_offset_bits" >&5
9888 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9889 if test "$ac_cv_sys_file_offset_bits" != no; then
9890
9891 cat >>confdefs.h <<EOF
9892 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9893 EOF
9894
9895 fi
9896 rm -rf conftest*
9897   echo "$as_me:9897: checking for _LARGE_FILES value needed for large files" >&5
9898 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9899 if test "${ac_cv_sys_large_files+set}" = set; then
9900   echo $ECHO_N "(cached) $ECHO_C" >&6
9901 else
9902   while :; do
9903   ac_cv_sys_large_files=no
9904   cat >conftest.$ac_ext <<_ACEOF
9905 #line 9905 "configure"
9906 #include "confdefs.h"
9907 #include <sys/types.h>
9908  /* Check that off_t can represent 2**63 - 1 correctly.
9909     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9910     since some C++ compilers masquerading as C compilers
9911     incorrectly reject 9223372036854775807.  */
9912 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9913   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9914                        && LARGE_OFF_T % 2147483647 == 1)
9915                       ? 1 : -1];
9916 int
9917 main ()
9918 {
9919
9920   ;
9921   return 0;
9922 }
9923 _ACEOF
9924 rm -f conftest.$ac_objext
9925 if { (eval echo "$as_me:9925: \"$ac_compile\"") >&5
9926   (eval $ac_compile) 2>&5
9927   ac_status=$?
9928   echo "$as_me:9928: \$? = $ac_status" >&5
9929   (exit $ac_status); } &&
9930          { ac_try='test -s conftest.$ac_objext'
9931   { (eval echo "$as_me:9931: \"$ac_try\"") >&5
9932   (eval $ac_try) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); }; }; then
9936   break
9937 else
9938   echo "$as_me: failed program was:" >&5
9939 cat conftest.$ac_ext >&5
9940 fi
9941 rm -f conftest.$ac_objext conftest.$ac_ext
9942   cat >conftest.$ac_ext <<_ACEOF
9943 #line 9943 "configure"
9944 #include "confdefs.h"
9945 #define _LARGE_FILES 1
9946 #include <sys/types.h>
9947  /* Check that off_t can represent 2**63 - 1 correctly.
9948     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9949     since some C++ compilers masquerading as C compilers
9950     incorrectly reject 9223372036854775807.  */
9951 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9952   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9953                        && LARGE_OFF_T % 2147483647 == 1)
9954                       ? 1 : -1];
9955 int
9956 main ()
9957 {
9958
9959   ;
9960   return 0;
9961 }
9962 _ACEOF
9963 rm -f conftest.$ac_objext
9964 if { (eval echo "$as_me:9964: \"$ac_compile\"") >&5
9965   (eval $ac_compile) 2>&5
9966   ac_status=$?
9967   echo "$as_me:9967: \$? = $ac_status" >&5
9968   (exit $ac_status); } &&
9969          { ac_try='test -s conftest.$ac_objext'
9970   { (eval echo "$as_me:9970: \"$ac_try\"") >&5
9971   (eval $ac_try) 2>&5
9972   ac_status=$?
9973   echo "$as_me:9973: \$? = $ac_status" >&5
9974   (exit $ac_status); }; }; then
9975   ac_cv_sys_large_files=1; break
9976 else
9977   echo "$as_me: failed program was:" >&5
9978 cat conftest.$ac_ext >&5
9979 fi
9980 rm -f conftest.$ac_objext conftest.$ac_ext
9981   break
9982 done
9983 fi
9984 echo "$as_me:9984: result: $ac_cv_sys_large_files" >&5
9985 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9986 if test "$ac_cv_sys_large_files" != no; then
9987
9988 cat >>confdefs.h <<EOF
9989 #define _LARGE_FILES $ac_cv_sys_large_files
9990 EOF
9991
9992 fi
9993 rm -rf conftest*
9994 fi
9995
9996     if test "$enable_largefile" != no ; then
9997         echo "$as_me:9997: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9998 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9999 if test "${ac_cv_sys_largefile_source+set}" = set; then
10000   echo $ECHO_N "(cached) $ECHO_C" >&6
10001 else
10002   while :; do
10003   ac_cv_sys_largefile_source=no
10004   cat >conftest.$ac_ext <<_ACEOF
10005 #line 10005 "configure"
10006 #include "confdefs.h"
10007 #include <stdio.h>
10008 int
10009 main ()
10010 {
10011 return !fseeko;
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f conftest.$ac_objext
10017 if { (eval echo "$as_me:10017: \"$ac_compile\"") >&5
10018   (eval $ac_compile) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); } &&
10022          { ac_try='test -s conftest.$ac_objext'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); }; }; then
10028   break
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10032 fi
10033 rm -f conftest.$ac_objext conftest.$ac_ext
10034   cat >conftest.$ac_ext <<_ACEOF
10035 #line 10035 "configure"
10036 #include "confdefs.h"
10037 #define _LARGEFILE_SOURCE 1
10038 #include <stdio.h>
10039 int
10040 main ()
10041 {
10042 return !fseeko;
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f conftest.$ac_objext
10048 if { (eval echo "$as_me:10048: \"$ac_compile\"") >&5
10049   (eval $ac_compile) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit $ac_status); } &&
10053          { ac_try='test -s conftest.$ac_objext'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit $ac_status); }; }; then
10059   ac_cv_sys_largefile_source=1; break
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat conftest.$ac_ext >&5
10063 fi
10064 rm -f conftest.$ac_objext conftest.$ac_ext
10065   break
10066 done
10067 fi
10068 echo "$as_me:10068: result: $ac_cv_sys_largefile_source" >&5
10069 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10070 if test "$ac_cv_sys_largefile_source" != no; then
10071
10072 cat >>confdefs.h <<EOF
10073 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10074 EOF
10075
10076 fi
10077 rm -rf conftest*
10078
10079 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10080 # in glibc 2.1.3, but that breaks too many other things.
10081 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10082 echo "$as_me:10082: checking for fseeko" >&5
10083 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10084 if test "${ac_cv_func_fseeko+set}" = set; then
10085   echo $ECHO_N "(cached) $ECHO_C" >&6
10086 else
10087   cat >conftest.$ac_ext <<_ACEOF
10088 #line 10088 "configure"
10089 #include "confdefs.h"
10090 #include <stdio.h>
10091 int
10092 main ()
10093 {
10094 return fseeko && fseeko (stdin, 0, 0);
10095   ;
10096   return 0;
10097 }
10098 _ACEOF
10099 rm -f conftest.$ac_objext conftest$ac_exeext
10100 if { (eval echo "$as_me:10100: \"$ac_link\"") >&5
10101   (eval $ac_link) 2>&5
10102   ac_status=$?
10103   echo "$as_me:10103: \$? = $ac_status" >&5
10104   (exit $ac_status); } &&
10105          { ac_try='test -s conftest$ac_exeext'
10106   { (eval echo "$as_me:10106: \"$ac_try\"") >&5
10107   (eval $ac_try) 2>&5
10108   ac_status=$?
10109   echo "$as_me:10109: \$? = $ac_status" >&5
10110   (exit $ac_status); }; }; then
10111   ac_cv_func_fseeko=yes
10112 else
10113   echo "$as_me: failed program was:" >&5
10114 cat conftest.$ac_ext >&5
10115 ac_cv_func_fseeko=no
10116 fi
10117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10118 fi
10119 echo "$as_me:10119: result: $ac_cv_func_fseeko" >&5
10120 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10121 if test $ac_cv_func_fseeko = yes; then
10122
10123 cat >>confdefs.h <<\EOF
10124 #define HAVE_FSEEKO 1
10125 EOF
10126
10127 fi
10128
10129         # Normally we would collect these definitions in the config.h,
10130         # but (like _XOPEN_SOURCE), some environments rely on having these
10131         # defined before any of the system headers are included.  Another
10132         # case comes up with C++, e.g., on AIX the compiler compiles the
10133         # header files by themselves before looking at the body files it is
10134         # told to compile.  For ncurses, those header files do not include
10135         # the config.h
10136         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10137         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10138         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10139
10140         echo "$as_me:10140: checking whether to use struct dirent64" >&5
10141 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10142 if test "${cf_cv_struct_dirent64+set}" = set; then
10143   echo $ECHO_N "(cached) $ECHO_C" >&6
10144 else
10145
10146                 cat >conftest.$ac_ext <<_ACEOF
10147 #line 10147 "configure"
10148 #include "confdefs.h"
10149
10150 #include <sys/types.h>
10151 #include <dirent.h>
10152
10153 int
10154 main ()
10155 {
10156
10157                 /* if transitional largefile support is setup, this is true */
10158                 extern struct dirent64 * readdir(DIR *);
10159                 struct dirent64 *x = readdir((DIR *)0);
10160                 struct dirent *y = readdir((DIR *)0);
10161                 int z = x - y;
10162
10163   ;
10164   return 0;
10165 }
10166 _ACEOF
10167 rm -f conftest.$ac_objext
10168 if { (eval echo "$as_me:10168: \"$ac_compile\"") >&5
10169   (eval $ac_compile) 2>&5
10170   ac_status=$?
10171   echo "$as_me:10171: \$? = $ac_status" >&5
10172   (exit $ac_status); } &&
10173          { ac_try='test -s conftest.$ac_objext'
10174   { (eval echo "$as_me:10174: \"$ac_try\"") >&5
10175   (eval $ac_try) 2>&5
10176   ac_status=$?
10177   echo "$as_me:10177: \$? = $ac_status" >&5
10178   (exit $ac_status); }; }; then
10179   cf_cv_struct_dirent64=yes
10180 else
10181   echo "$as_me: failed program was:" >&5
10182 cat conftest.$ac_ext >&5
10183 cf_cv_struct_dirent64=no
10184 fi
10185 rm -f conftest.$ac_objext conftest.$ac_ext
10186
10187 fi
10188 echo "$as_me:10188: result: $cf_cv_struct_dirent64" >&5
10189 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10190         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10191 #define HAVE_STRUCT_DIRENT64 1
10192 EOF
10193
10194     fi
10195
10196 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10197 echo "$as_me:10197: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10198 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10199
10200 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10201 if test "${enable_tparm_varargs+set}" = set; then
10202   enableval="$enable_tparm_varargs"
10203   with_tparm_varargs=$enableval
10204 else
10205   with_tparm_varargs=yes
10206 fi;
10207 echo "$as_me:10207: result: $with_tparm_varargs" >&5
10208 echo "${ECHO_T}$with_tparm_varargs" >&6
10209 NCURSES_TPARM_VARARGS=0
10210 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10211
10212 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10213 if test "$with_ticlib" != no ; then
10214 echo "$as_me:10214: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10215 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10216
10217 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10218 if test "${enable_tic_depends+set}" = set; then
10219   enableval="$enable_tic_depends"
10220   with_tic_depends=$enableval
10221 else
10222   with_tic_depends=yes
10223 fi;
10224 echo "$as_me:10224: result: $with_tic_depends" >&5
10225 echo "${ECHO_T}$with_tic_depends" >&6
10226 else
10227         with_tic_depends=no
10228 fi
10229
10230 ###   use option --with-bool to override bool's type
10231 echo "$as_me:10231: checking for type of bool" >&5
10232 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10233
10234 # Check whether --with-bool or --without-bool was given.
10235 if test "${with_bool+set}" = set; then
10236   withval="$with_bool"
10237   NCURSES_BOOL="$withval"
10238 else
10239   NCURSES_BOOL=auto
10240 fi;
10241 echo "$as_me:10241: result: $NCURSES_BOOL" >&5
10242 echo "${ECHO_T}$NCURSES_BOOL" >&6
10243
10244 echo "$as_me:10244: checking for alternate terminal capabilities file" >&5
10245 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10246
10247 # Check whether --with-caps or --without-caps was given.
10248 if test "${with_caps+set}" = set; then
10249   withval="$with_caps"
10250   TERMINFO_CAPS=Caps.$withval
10251 else
10252   TERMINFO_CAPS=Caps
10253 fi;
10254 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10255 echo "$as_me:10255: result: $TERMINFO_CAPS" >&5
10256 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10257
10258 ###   use option --with-chtype to override chtype's type
10259 echo "$as_me:10259: checking for type of chtype" >&5
10260 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10261
10262 # Check whether --with-chtype or --without-chtype was given.
10263 if test "${with_chtype+set}" = set; then
10264   withval="$with_chtype"
10265   NCURSES_CHTYPE="$withval"
10266 else
10267   NCURSES_CHTYPE=auto
10268 fi;
10269 echo "$as_me:10269: result: $NCURSES_CHTYPE" >&5
10270 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10271
10272 ###   use option --with-ospeed to override ospeed's type
10273 echo "$as_me:10273: checking for type of ospeed" >&5
10274 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10275
10276 # Check whether --with-ospeed or --without-ospeed was given.
10277 if test "${with_ospeed+set}" = set; then
10278   withval="$with_ospeed"
10279   NCURSES_OSPEED="$withval"
10280 else
10281   NCURSES_OSPEED=short
10282 fi;
10283 echo "$as_me:10283: result: $NCURSES_OSPEED" >&5
10284 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10285
10286 ###   use option --with-mmask-t to override mmask_t's type
10287 echo "$as_me:10287: checking for type of mmask_t" >&5
10288 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10289
10290 # Check whether --with-mmask-t or --without-mmask-t was given.
10291 if test "${with_mmask_t+set}" = set; then
10292   withval="$with_mmask_t"
10293   NCURSES_MMASK_T="$withval"
10294 else
10295   NCURSES_MMASK_T=auto
10296 fi;
10297 echo "$as_me:10297: result: $NCURSES_MMASK_T" >&5
10298 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10299
10300 ###   use option --with-ccharw-max to override CCHARW_MAX size
10301 echo "$as_me:10301: checking for size CCHARW_MAX" >&5
10302 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10303
10304 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10305 if test "${with_ccharw_max+set}" = set; then
10306   withval="$with_ccharw_max"
10307   NCURSES_CCHARW_MAX="$withval"
10308 else
10309   NCURSES_CCHARW_MAX=5
10310 fi;
10311 echo "$as_me:10311: result: $NCURSES_CCHARW_MAX" >&5
10312 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10313
10314 ###   use option --with-tparm-arg to override tparm's argument type
10315 echo "$as_me:10315: checking for type of tparm args" >&5
10316 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10317
10318 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10319 if test "${with_tparm_arg+set}" = set; then
10320   withval="$with_tparm_arg"
10321   NCURSES_TPARM_ARG="$withval"
10322 else
10323   NCURSES_TPARM_ARG=long
10324 fi;
10325 echo "$as_me:10325: result: $NCURSES_TPARM_ARG" >&5
10326 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10327
10328 ### Enable compiling-in rcs id's
10329 echo "$as_me:10329: checking if RCS identifiers should be compiled-in" >&5
10330 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10331
10332 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10333 if test "${with_rcs_ids+set}" = set; then
10334   withval="$with_rcs_ids"
10335   with_rcs_ids=$withval
10336 else
10337   with_rcs_ids=no
10338 fi;
10339 echo "$as_me:10339: result: $with_rcs_ids" >&5
10340 echo "${ECHO_T}$with_rcs_ids" >&6
10341 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10342 #define USE_RCS_IDS 1
10343 EOF
10344
10345 ###############################################################################
10346
10347 echo "$as_me:10347: checking format of man-pages" >&5
10348 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10349
10350 # Check whether --with-manpage-format or --without-manpage-format was given.
10351 if test "${with_manpage_format+set}" = set; then
10352   withval="$with_manpage_format"
10353   MANPAGE_FORMAT=$withval
10354 else
10355   MANPAGE_FORMAT=unknown
10356 fi;
10357
10358 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10359 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10360
10361 cf_unknown=
10362
10363 case $MANPAGE_FORMAT in
10364 unknown)
10365   if test -z "$MANPATH" ; then
10366     MANPATH="/usr/man:/usr/share/man"
10367   fi
10368
10369   # look for the 'date' man-page (it's most likely to be installed!)
10370   MANPAGE_FORMAT=
10371   cf_preform=no
10372   cf_catonly=yes
10373   cf_example=date
10374
10375   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10376   for cf_dir in $MANPATH; do
10377     test -z "$cf_dir" && cf_dir=/usr/man
10378     for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
10379     do
10380       cf_test=`echo $cf_name | sed -e 's/*//'`
10381       if test "x$cf_test" = "x$cf_name" ; then
10382
10383         case "$cf_name" in
10384         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10385         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10386         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10387         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10388         esac
10389
10390         case "$cf_name" in
10391         $cf_dir/man*)
10392           cf_catonly=no
10393           ;;
10394         $cf_dir/cat*)
10395           cf_preform=yes
10396           ;;
10397         esac
10398         break
10399       fi
10400
10401       # if we found a match in either man* or cat*, stop looking
10402       if test -n "$MANPAGE_FORMAT" ; then
10403         cf_found=no
10404         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10405         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10406         case "$cf_name" in
10407         $cf_dir/cat*)
10408           cf_found=yes
10409           ;;
10410         esac
10411         test $cf_found=yes && break
10412       fi
10413     done
10414     # only check the first directory in $MANPATH where we find manpages
10415     if test -n "$MANPAGE_FORMAT" ; then
10416        break
10417     fi
10418   done
10419   # if we did not find the example, just assume it is normal
10420   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10421   IFS="$ac_save_ifs"
10422   ;;
10423 *)
10424   for cf_option in $MANPAGE_FORMAT; do
10425      case $cf_option in #(vi
10426      gzip|compress|BSDI|normal|formatted|catonly)
10427        ;;
10428      *)
10429        cf_unknown="$cf_unknown $cf_option"
10430        ;;
10431      esac
10432   done
10433   ;;
10434 esac
10435
10436 echo "$as_me:10436: result: $MANPAGE_FORMAT" >&5
10437 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10438 if test -n "$cf_unknown" ; then
10439   { echo "$as_me:10439: WARNING: Unexpected manpage-format $cf_unknown" >&5
10440 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10441 fi
10442
10443 echo "$as_me:10443: checking for manpage renaming" >&5
10444 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10445
10446 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10447 if test "${with_manpage_renames+set}" = set; then
10448   withval="$with_manpage_renames"
10449   MANPAGE_RENAMES=$withval
10450 else
10451   MANPAGE_RENAMES=yes
10452 fi;
10453
10454 case ".$MANPAGE_RENAMES" in #(vi
10455 .no) #(vi
10456   ;;
10457 .|.yes)
10458   # Debian 'man' program?
10459   if test -f /etc/debian_version ; then
10460     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10461   else
10462     MANPAGE_RENAMES=no
10463   fi
10464   ;;
10465 esac
10466
10467 if test "$MANPAGE_RENAMES" != no ; then
10468   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10469     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10470   elif test ! -f $MANPAGE_RENAMES ; then
10471     { { echo "$as_me:10471: error: not a filename: $MANPAGE_RENAMES" >&5
10472 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10473    { (exit 1); exit 1; }; }
10474   fi
10475
10476   test ! -d man && mkdir man
10477
10478   # Construct a sed-script to perform renaming within man-pages
10479   if test -n "$MANPAGE_RENAMES" ; then
10480     test ! -d man && mkdir man
10481     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10482   fi
10483 fi
10484
10485 echo "$as_me:10485: result: $MANPAGE_RENAMES" >&5
10486 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10487
10488 echo "$as_me:10488: checking if manpage aliases will be installed" >&5
10489 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10490
10491 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10492 if test "${with_manpage_aliases+set}" = set; then
10493   withval="$with_manpage_aliases"
10494   MANPAGE_ALIASES=$withval
10495 else
10496   MANPAGE_ALIASES=yes
10497 fi;
10498
10499 echo "$as_me:10499: result: $MANPAGE_ALIASES" >&5
10500 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10501
10502 case "x$LN_S" in #(vi
10503 xln*) #(vi
10504         cf_use_symlinks=yes
10505         ;;
10506 *)
10507         cf_use_symlinks=no
10508         ;;
10509 esac
10510
10511 MANPAGE_SYMLINKS=no
10512 if test "$MANPAGE_ALIASES" = yes ; then
10513 echo "$as_me:10513: checking if manpage symlinks should be used" >&5
10514 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10515
10516 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10517 if test "${with_manpage_symlinks+set}" = set; then
10518   withval="$with_manpage_symlinks"
10519   MANPAGE_SYMLINKS=$withval
10520 else
10521   MANPAGE_SYMLINKS=$cf_use_symlinks
10522 fi;
10523
10524 if test "$$cf_use_symlinks" = no; then
10525 if test "$MANPAGE_SYMLINKS" = yes ; then
10526         { echo "$as_me:10526: WARNING: cannot make symlinks" >&5
10527 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10528         MANPAGE_SYMLINKS=no
10529 fi
10530 fi
10531
10532 echo "$as_me:10532: result: $MANPAGE_SYMLINKS" >&5
10533 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10534 fi
10535
10536 echo "$as_me:10536: checking for manpage tbl" >&5
10537 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10538
10539 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10540 if test "${with_manpage_tbl+set}" = set; then
10541   withval="$with_manpage_tbl"
10542   MANPAGE_TBL=$withval
10543 else
10544   MANPAGE_TBL=no
10545 fi;
10546
10547 echo "$as_me:10547: result: $MANPAGE_TBL" >&5
10548 echo "${ECHO_T}$MANPAGE_TBL" >&6
10549
10550   if test "$prefix" = "NONE" ; then
10551      cf_prefix="$ac_default_prefix"
10552   else
10553      cf_prefix="$prefix"
10554   fi
10555
10556   case "$MANPAGE_FORMAT" in # (vi
10557   *catonly*) # (vi
10558     cf_format=yes
10559     cf_inboth=no
10560     ;;
10561   *formatted*) # (vi
10562     cf_format=yes
10563     cf_inboth=yes
10564     ;;
10565   *)
10566     cf_format=no
10567     cf_inboth=no
10568     ;;
10569   esac
10570
10571 test ! -d man && mkdir man
10572
10573 cf_so_strip=
10574 cf_compress=
10575 case "$MANPAGE_FORMAT" in #(vi
10576 *compress*) #(vi
10577         cf_so_strip="Z"
10578         cf_compress=compress
10579   ;;
10580 *gzip*)
10581         cf_so_strip="gz"
10582         cf_compress=gzip
10583   ;;
10584 esac
10585
10586 cf_edit_man=./edit_man.sh
10587 cf_man_alias=`pwd`/man_alias.sed
10588
10589 cat >$cf_edit_man <<CF_EOF
10590 #! /bin/sh
10591 # this script is generated by the configure-script CF_MAN_PAGES macro.
10592
10593 prefix="$cf_prefix"
10594 datadir="$datadir"
10595
10596 NCURSES_MAJOR="$NCURSES_MAJOR"
10597 NCURSES_MINOR="$NCURSES_MINOR"
10598 NCURSES_PATCH="$NCURSES_PATCH"
10599
10600 NCURSES_OSPEED="$NCURSES_OSPEED"
10601 TERMINFO="$TERMINFO"
10602
10603 INSTALL="$INSTALL"
10604 INSTALL_DATA="$INSTALL_DATA"
10605
10606 transform="$program_transform_name"
10607
10608 TMP=\${TMPDIR:=/tmp}/man\$\$
10609 trap "rm -f \$TMP" 0 1 2 5 15
10610
10611 form=\$1
10612 shift || exit 1
10613
10614 verb=\$1
10615 shift || exit 1
10616
10617 mandir=\$1
10618 shift || exit 1
10619
10620 srcdir=\$1
10621 top_srcdir=\$srcdir/..
10622 shift || exit 1
10623
10624 if test "\$form" = normal ; then
10625         if test "$cf_format" = yes ; then
10626         if test "$cf_inboth" = no ; then
10627                 sh \$0 format \$verb \$mandir \$srcdir \$*
10628                 exit $?
10629         fi
10630         fi
10631         cf_subdir=\$mandir/man
10632         cf_tables=$MANPAGE_TBL
10633 else
10634         cf_subdir=\$mandir/cat
10635         cf_tables=yes
10636 fi
10637
10638 # process the list of source-files
10639 for i in \$* ; do
10640 case \$i in #(vi
10641 *.orig|*.rej) ;; #(vi
10642 *.[0-9]*)
10643         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10644         if test \$verb = installing ; then
10645         if test ! -d \$cf_subdir\${section} ; then
10646                 mkdir -p \$cf_subdir\$section
10647         fi
10648         fi
10649
10650         # replace variables in man page
10651         if test ! -f $cf_man_alias ; then
10652 cat >>$cf_man_alias <<-CF_EOF2
10653                 s,@DATADIR@,\$datadir,g
10654                 s,@TERMINFO@,\$TERMINFO,g
10655                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10656                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10657                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10658                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10659 CF_EOF
10660
10661         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10662         do
10663                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10664                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10665 cat >>$cf_edit_man <<-CF_EOF
10666                 s,@$cf_NAME@,$cf_name,g
10667 CF_EOF
10668         done
10669
10670 cat >>$cf_edit_man <<CF_EOF
10671 CF_EOF2
10672                 echo "...made $cf_man_alias"
10673         fi
10674
10675         aliases=
10676         cf_source=\`basename \$i\`
10677         inalias=\$cf_source
10678         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10679         if test ! -f \$inalias ; then
10680                 echo .. skipped \$cf_source
10681                 continue
10682         fi
10683 CF_EOF
10684
10685 if test "$MANPAGE_ALIASES" != no ; then
10686 cat >>$cf_edit_man <<CF_EOF
10687         nCurses=ignore.3x
10688         test $with_curses_h = yes && nCurses=ncurses.3x
10689         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10690 CF_EOF
10691 fi
10692
10693 if test "$MANPAGE_RENAMES" = no ; then
10694 cat >>$cf_edit_man <<CF_EOF
10695         # perform program transformations for section 1 man pages
10696         if test \$section = 1 ; then
10697                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10698         else
10699                 cf_target=\$cf_subdir\${section}/\$cf_source
10700         fi
10701 CF_EOF
10702 else
10703 cat >>$cf_edit_man <<CF_EOF
10704         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10705         if test -z "\$cf_target" ; then
10706                 echo '? missing rename for '\$cf_source
10707                 cf_target="\$cf_source"
10708         fi
10709         cf_target="\$cf_subdir\${section}/\${cf_target}"
10710
10711 CF_EOF
10712 fi
10713
10714 cat >>$cf_edit_man <<CF_EOF
10715         sed     -f $cf_man_alias \\
10716 CF_EOF
10717
10718 if test -f $MANPAGE_RENAMES ; then
10719 cat >>$cf_edit_man <<CF_EOF
10720                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10721 CF_EOF
10722 else
10723 cat >>$cf_edit_man <<CF_EOF
10724                 < \$i >\$TMP
10725 CF_EOF
10726 fi
10727
10728 cat >>$cf_edit_man <<CF_EOF
10729 if test \$cf_tables = yes ; then
10730         tbl \$TMP >\$TMP.out
10731         mv \$TMP.out \$TMP
10732 fi
10733 CF_EOF
10734
10735 if test $with_overwrite != yes ; then
10736 cat >>$cf_edit_man <<CF_EOF
10737         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10738         mv \$TMP.out \$TMP
10739 CF_EOF
10740 fi
10741
10742 if test $with_curses_h != yes ; then
10743 cat >>$cf_edit_man <<CF_EOF
10744         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10745         mv \$TMP.out \$TMP
10746 CF_EOF
10747 fi
10748
10749 cat >>$cf_edit_man <<CF_EOF
10750         if test \$form = format ; then
10751                 nroff -man \$TMP >\$TMP.out
10752                 mv \$TMP.out \$TMP
10753         fi
10754 CF_EOF
10755
10756 if test -n "$cf_compress" ; then
10757 cat >>$cf_edit_man <<CF_EOF
10758         if test \$verb = installing ; then
10759         if ( $cf_compress -f \$TMP )
10760         then
10761                 mv \$TMP.$cf_so_strip \$TMP
10762         fi
10763         fi
10764         cf_target="\$cf_target.$cf_so_strip"
10765 CF_EOF
10766 fi
10767
10768 case "$MANPAGE_FORMAT" in #(vi
10769 *BSDI*)
10770 cat >>$cf_edit_man <<CF_EOF
10771         if test \$form = format ; then
10772                 # BSDI installs only .0 suffixes in the cat directories
10773                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10774         fi
10775 CF_EOF
10776   ;;
10777 esac
10778
10779 cat >>$cf_edit_man <<CF_EOF
10780         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10781         if test \$verb = installing ; then
10782                 echo \$verb \$cf_target
10783                 \$INSTALL_DATA \$TMP \$cf_target
10784                 test -d \$cf_subdir\${section} &&
10785                 test -n "\$aliases" && (
10786                         cd \$cf_subdir\${section} && (
10787                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10788                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10789                                 cf_target=\`basename \$cf_target\`
10790                                 for cf_alias in \$aliases
10791                                 do
10792                                         if test \$section = 1 ; then
10793                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10794                                         fi
10795
10796                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10797                                                 if test -f \$cf_alias\${suffix} ; then
10798                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10799                                                         then
10800                                                                 continue
10801                                                         fi
10802                                                 fi
10803                                                 echo .. \$verb alias \$cf_alias\${suffix}
10804 CF_EOF
10805 case "x$LN_S" in #(vi
10806 *-f) #(vi
10807 cat >>$cf_edit_man <<CF_EOF
10808                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10809 CF_EOF
10810         ;;
10811 *)
10812 cat >>$cf_edit_man <<CF_EOF
10813                                                 rm -f \$cf_alias\${suffix}
10814                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10815 CF_EOF
10816         ;;
10817 esac
10818 cat >>$cf_edit_man <<CF_EOF
10819                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10820                                                 echo ".so \$cf_source" >\$TMP
10821 CF_EOF
10822 if test -n "$cf_compress" ; then
10823 cat >>$cf_edit_man <<CF_EOF
10824                                                 if test -n "$cf_so_strip" ; then
10825                                                         $cf_compress -f \$TMP
10826                                                         mv \$TMP.$cf_so_strip \$TMP
10827                                                 fi
10828 CF_EOF
10829 fi
10830 cat >>$cf_edit_man <<CF_EOF
10831                                                 echo .. \$verb alias \$cf_alias\${suffix}
10832                                                 rm -f \$cf_alias\${suffix}
10833                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10834                                         fi
10835                                 done
10836                         )
10837                 )
10838         elif test \$verb = removing ; then
10839                 test -f \$cf_target && (
10840                         echo \$verb \$cf_target
10841                         rm -f \$cf_target
10842                 )
10843                 test -d \$cf_subdir\${section} &&
10844                 test -n "\$aliases" && (
10845                         cd \$cf_subdir\${section} && (
10846                                 for cf_alias in \$aliases
10847                                 do
10848                                         if test \$section = 1 ; then
10849                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10850                                         fi
10851
10852                                         echo .. \$verb alias \$cf_alias\${suffix}
10853                                         rm -f \$cf_alias\${suffix}
10854                                 done
10855                         )
10856                 )
10857         else
10858 #               echo ".hy 0"
10859                 cat \$TMP
10860         fi
10861         ;;
10862 esac
10863 done
10864
10865 if test $cf_inboth = yes ; then
10866 if test \$form != format ; then
10867         sh \$0 format \$verb \$mandir \$srcdir \$*
10868 fi
10869 fi
10870
10871 exit 0
10872 CF_EOF
10873 chmod 755 $cf_edit_man
10874
10875 ###############################################################################
10876
10877 ### Note that some functions (such as const) are normally disabled anyway.
10878 echo "$as_me:10878: checking if you want to build with function extensions" >&5
10879 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10880
10881 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10882 if test "${enable_ext_funcs+set}" = set; then
10883   enableval="$enable_ext_funcs"
10884   with_ext_funcs=$enableval
10885 else
10886   with_ext_funcs=yes
10887 fi;
10888 echo "$as_me:10888: result: $with_ext_funcs" >&5
10889 echo "${ECHO_T}$with_ext_funcs" >&6
10890 if test "$with_ext_funcs" = yes ; then
10891         NCURSES_EXT_FUNCS=1
10892         cat >>confdefs.h <<\EOF
10893 #define HAVE_ASSUME_DEFAULT_COLORS 1
10894 EOF
10895
10896         cat >>confdefs.h <<\EOF
10897 #define HAVE_CURSES_VERSION 1
10898 EOF
10899
10900         cat >>confdefs.h <<\EOF
10901 #define HAVE_HAS_KEY 1
10902 EOF
10903
10904         cat >>confdefs.h <<\EOF
10905 #define HAVE_RESIZETERM 1
10906 EOF
10907
10908         cat >>confdefs.h <<\EOF
10909 #define HAVE_RESIZE_TERM 1
10910 EOF
10911
10912         cat >>confdefs.h <<\EOF
10913 #define HAVE_TERM_ENTRY_H 1
10914 EOF
10915
10916         cat >>confdefs.h <<\EOF
10917 #define HAVE_USE_DEFAULT_COLORS 1
10918 EOF
10919
10920         cat >>confdefs.h <<\EOF
10921 #define HAVE_USE_SCREEN 1
10922 EOF
10923
10924         cat >>confdefs.h <<\EOF
10925 #define HAVE_USE_WINDOW 1
10926 EOF
10927
10928         cat >>confdefs.h <<\EOF
10929 #define HAVE_WRESIZE 1
10930 EOF
10931
10932         cat >>confdefs.h <<\EOF
10933 #define NCURSES_EXT_FUNCS 1
10934 EOF
10935
10936         GENERATED_EXT_FUNCS=generated
10937 else
10938         NCURSES_EXT_FUNCS=0
10939         GENERATED_EXT_FUNCS=
10940 fi
10941
10942 echo "$as_me:10942: checking if you want to build with experimental SCREEN extensions" >&5
10943 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10944
10945 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10946 if test "${enable_sp_funcs+set}" = set; then
10947   enableval="$enable_sp_funcs"
10948   with_sp_funcs=$enableval
10949 else
10950   with_sp_funcs=no
10951 fi;
10952 echo "$as_me:10952: result: $with_sp_funcs" >&5
10953 echo "${ECHO_T}$with_sp_funcs" >&6
10954 if test "$with_sp_funcs" = yes ; then
10955         NCURSES_SP_FUNCS=1
10956         cat >>confdefs.h <<\EOF
10957 #define NCURSES_SP_FUNCS 1
10958 EOF
10959
10960         GENERATED_SP_FUNCS=generated
10961 else
10962         NCURSES_SP_FUNCS=0
10963         GENERATED_SP_FUNCS=
10964 fi
10965
10966 echo "$as_me:10966: checking if you want to build with experimental terminal-driver" >&5
10967 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10968
10969 # Check whether --enable-term-driver or --disable-term-driver was given.
10970 if test "${enable_term_driver+set}" = set; then
10971   enableval="$enable_term_driver"
10972   with_term_driver=$enableval
10973 else
10974   with_term_driver=no
10975 fi;
10976 echo "$as_me:10976: result: $with_term_driver" >&5
10977 echo "${ECHO_T}$with_term_driver" >&6
10978 if test "$with_term_driver" = yes ; then
10979         cat >>confdefs.h <<\EOF
10980 #define USE_TERM_DRIVER 1
10981 EOF
10982
10983         if test "$with_sp_funcs" != yes ; then
10984                 { { echo "$as_me:10984: error: The term-driver option relies upon sp-funcs" >&5
10985 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10986    { (exit 1); exit 1; }; }
10987         fi
10988 fi
10989
10990 ###   use option --enable-const to turn on use of const beyond that in XSI.
10991 echo "$as_me:10991: checking for extended use of const keyword" >&5
10992 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10993
10994 # Check whether --enable-const or --disable-const was given.
10995 if test "${enable_const+set}" = set; then
10996   enableval="$enable_const"
10997   with_ext_const=$enableval
10998 else
10999   with_ext_const=no
11000 fi;
11001 echo "$as_me:11001: result: $with_ext_const" >&5
11002 echo "${ECHO_T}$with_ext_const" >&6
11003 NCURSES_CONST='/*nothing*/'
11004 if test "$with_ext_const" = yes ; then
11005         NCURSES_CONST=const
11006 fi
11007
11008 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11009 echo "$as_me:11009: checking if you want to use extended colors" >&5
11010 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11011
11012 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11013 if test "${enable_ext_colors+set}" = set; then
11014   enableval="$enable_ext_colors"
11015   with_ext_colors=$enableval
11016 else
11017   with_ext_colors=no
11018 fi;
11019 echo "$as_me:11019: result: $with_ext_colors" >&5
11020 echo "${ECHO_T}$with_ext_colors" >&6
11021 NCURSES_EXT_COLORS=0
11022 if test "$with_ext_colors" = yes ; then
11023         if test "$with_widec" != yes ; then
11024                 { { echo "$as_me:11024: error: This option applies only to wide-character library" >&5
11025 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11026    { (exit 1); exit 1; }; }
11027         else
11028                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11029
11030 if test "${with_abi_version+set}" != set; then
11031         case $cf_cv_rel_version in
11032         5.*)
11033                 cf_cv_rel_version=6.0
11034                 cf_cv_abi_version=6
11035                 { echo "$as_me:11035: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11036 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11037                 ;;
11038         esac
11039 fi
11040
11041         fi
11042         NCURSES_EXT_COLORS=1
11043         cat >>confdefs.h <<\EOF
11044 #define NCURSES_EXT_COLORS 1
11045 EOF
11046
11047 fi
11048
11049 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11050 echo "$as_me:11050: checking if you want to use extended mouse encoding" >&5
11051 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11052
11053 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11054 if test "${enable_ext_mouse+set}" = set; then
11055   enableval="$enable_ext_mouse"
11056   with_ext_mouse=$enableval
11057 else
11058   with_ext_mouse=no
11059 fi;
11060 echo "$as_me:11060: result: $with_ext_mouse" >&5
11061 echo "${ECHO_T}$with_ext_mouse" >&6
11062 NCURSES_MOUSE_VERSION=1
11063 if test "$with_ext_mouse" = yes ; then
11064         NCURSES_MOUSE_VERSION=2
11065
11066 if test "${with_abi_version+set}" != set; then
11067         case $cf_cv_rel_version in
11068         5.*)
11069                 cf_cv_rel_version=6.0
11070                 cf_cv_abi_version=6
11071                 { echo "$as_me:11071: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11072 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11073                 ;;
11074         esac
11075 fi
11076
11077 fi
11078
11079 echo "$as_me:11079: checking if you want \$NCURSES_NO_PADDING code" >&5
11080 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11081
11082 # Check whether --enable-no-padding or --disable-no-padding was given.
11083 if test "${enable_no_padding+set}" = set; then
11084   enableval="$enable_no_padding"
11085   with_no_padding=$enableval
11086 else
11087   with_no_padding=$with_ext_funcs
11088 fi;
11089 echo "$as_me:11089: result: $with_no_padding" >&5
11090 echo "${ECHO_T}$with_no_padding" >&6
11091 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
11092 #define NCURSES_NO_PADDING 1
11093 EOF
11094
11095 echo "$as_me:11095: checking for ANSI C header files" >&5
11096 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11097 if test "${ac_cv_header_stdc+set}" = set; then
11098   echo $ECHO_N "(cached) $ECHO_C" >&6
11099 else
11100   cat >conftest.$ac_ext <<_ACEOF
11101 #line 11101 "configure"
11102 #include "confdefs.h"
11103 #include <stdlib.h>
11104 #include <stdarg.h>
11105 #include <string.h>
11106 #include <float.h>
11107
11108 _ACEOF
11109 if { (eval echo "$as_me:11109: \"$ac_cpp conftest.$ac_ext\"") >&5
11110   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11111   ac_status=$?
11112   egrep -v '^ *\+' conftest.er1 >conftest.err
11113   rm -f conftest.er1
11114   cat conftest.err >&5
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); } >/dev/null; then
11117   if test -s conftest.err; then
11118     ac_cpp_err=$ac_c_preproc_warn_flag
11119   else
11120     ac_cpp_err=
11121   fi
11122 else
11123   ac_cpp_err=yes
11124 fi
11125 if test -z "$ac_cpp_err"; then
11126   ac_cv_header_stdc=yes
11127 else
11128   echo "$as_me: failed program was:" >&5
11129   cat conftest.$ac_ext >&5
11130   ac_cv_header_stdc=no
11131 fi
11132 rm -f conftest.err conftest.$ac_ext
11133
11134 if test $ac_cv_header_stdc = yes; then
11135   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11136   cat >conftest.$ac_ext <<_ACEOF
11137 #line 11137 "configure"
11138 #include "confdefs.h"
11139 #include <string.h>
11140
11141 _ACEOF
11142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11143   egrep "memchr" >/dev/null 2>&1; then
11144   :
11145 else
11146   ac_cv_header_stdc=no
11147 fi
11148 rm -rf conftest*
11149
11150 fi
11151
11152 if test $ac_cv_header_stdc = yes; then
11153   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11154   cat >conftest.$ac_ext <<_ACEOF
11155 #line 11155 "configure"
11156 #include "confdefs.h"
11157 #include <stdlib.h>
11158
11159 _ACEOF
11160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11161   egrep "free" >/dev/null 2>&1; then
11162   :
11163 else
11164   ac_cv_header_stdc=no
11165 fi
11166 rm -rf conftest*
11167
11168 fi
11169
11170 if test $ac_cv_header_stdc = yes; then
11171   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11172   if test "$cross_compiling" = yes; then
11173   :
11174 else
11175   cat >conftest.$ac_ext <<_ACEOF
11176 #line 11176 "configure"
11177 #include "confdefs.h"
11178 #include <ctype.h>
11179 #if ((' ' & 0x0FF) == 0x020)
11180 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11181 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11182 #else
11183 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11184                      || ('j' <= (c) && (c) <= 'r') \
11185                      || ('s' <= (c) && (c) <= 'z'))
11186 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11187 #endif
11188
11189 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11190 int
11191 main ()
11192 {
11193   int i;
11194   for (i = 0; i < 256; i++)
11195     if (XOR (islower (i), ISLOWER (i))
11196         || toupper (i) != TOUPPER (i))
11197       $ac_main_return(2);
11198   $ac_main_return (0);
11199 }
11200 _ACEOF
11201 rm -f conftest$ac_exeext
11202 if { (eval echo "$as_me:11202: \"$ac_link\"") >&5
11203   (eval $ac_link) 2>&5
11204   ac_status=$?
11205   echo "$as_me:11205: \$? = $ac_status" >&5
11206   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11207   { (eval echo "$as_me:11207: \"$ac_try\"") >&5
11208   (eval $ac_try) 2>&5
11209   ac_status=$?
11210   echo "$as_me:11210: \$? = $ac_status" >&5
11211   (exit $ac_status); }; }; then
11212   :
11213 else
11214   echo "$as_me: program exited with status $ac_status" >&5
11215 echo "$as_me: failed program was:" >&5
11216 cat conftest.$ac_ext >&5
11217 ac_cv_header_stdc=no
11218 fi
11219 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11220 fi
11221 fi
11222 fi
11223 echo "$as_me:11223: result: $ac_cv_header_stdc" >&5
11224 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11225 if test $ac_cv_header_stdc = yes; then
11226
11227 cat >>confdefs.h <<\EOF
11228 #define STDC_HEADERS 1
11229 EOF
11230
11231 fi
11232
11233 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11234
11235 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11236                   inttypes.h stdint.h unistd.h
11237 do
11238 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11239 echo "$as_me:11239: checking for $ac_header" >&5
11240 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11241 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11242   echo $ECHO_N "(cached) $ECHO_C" >&6
11243 else
11244   cat >conftest.$ac_ext <<_ACEOF
11245 #line 11245 "configure"
11246 #include "confdefs.h"
11247 $ac_includes_default
11248 #include <$ac_header>
11249 _ACEOF
11250 rm -f conftest.$ac_objext
11251 if { (eval echo "$as_me:11251: \"$ac_compile\"") >&5
11252   (eval $ac_compile) 2>&5
11253   ac_status=$?
11254   echo "$as_me:11254: \$? = $ac_status" >&5
11255   (exit $ac_status); } &&
11256          { ac_try='test -s conftest.$ac_objext'
11257   { (eval echo "$as_me:11257: \"$ac_try\"") >&5
11258   (eval $ac_try) 2>&5
11259   ac_status=$?
11260   echo "$as_me:11260: \$? = $ac_status" >&5
11261   (exit $ac_status); }; }; then
11262   eval "$as_ac_Header=yes"
11263 else
11264   echo "$as_me: failed program was:" >&5
11265 cat conftest.$ac_ext >&5
11266 eval "$as_ac_Header=no"
11267 fi
11268 rm -f conftest.$ac_objext conftest.$ac_ext
11269 fi
11270 echo "$as_me:11270: result: `eval echo '${'$as_ac_Header'}'`" >&5
11271 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11272 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11273   cat >>confdefs.h <<EOF
11274 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11275 EOF
11276
11277 fi
11278 done
11279
11280 echo "$as_me:11280: checking for signed char" >&5
11281 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11282 if test "${ac_cv_type_signed_char+set}" = set; then
11283   echo $ECHO_N "(cached) $ECHO_C" >&6
11284 else
11285   cat >conftest.$ac_ext <<_ACEOF
11286 #line 11286 "configure"
11287 #include "confdefs.h"
11288 $ac_includes_default
11289 int
11290 main ()
11291 {
11292 if ((signed char *) 0)
11293   return 0;
11294 if (sizeof (signed char))
11295   return 0;
11296   ;
11297   return 0;
11298 }
11299 _ACEOF
11300 rm -f conftest.$ac_objext
11301 if { (eval echo "$as_me:11301: \"$ac_compile\"") >&5
11302   (eval $ac_compile) 2>&5
11303   ac_status=$?
11304   echo "$as_me:11304: \$? = $ac_status" >&5
11305   (exit $ac_status); } &&
11306          { ac_try='test -s conftest.$ac_objext'
11307   { (eval echo "$as_me:11307: \"$ac_try\"") >&5
11308   (eval $ac_try) 2>&5
11309   ac_status=$?
11310   echo "$as_me:11310: \$? = $ac_status" >&5
11311   (exit $ac_status); }; }; then
11312   ac_cv_type_signed_char=yes
11313 else
11314   echo "$as_me: failed program was:" >&5
11315 cat conftest.$ac_ext >&5
11316 ac_cv_type_signed_char=no
11317 fi
11318 rm -f conftest.$ac_objext conftest.$ac_ext
11319 fi
11320 echo "$as_me:11320: result: $ac_cv_type_signed_char" >&5
11321 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11322
11323 echo "$as_me:11323: checking size of signed char" >&5
11324 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11325 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11326   echo $ECHO_N "(cached) $ECHO_C" >&6
11327 else
11328   if test "$ac_cv_type_signed_char" = yes; then
11329   if test "$cross_compiling" = yes; then
11330   # Depending upon the size, compute the lo and hi bounds.
11331 cat >conftest.$ac_ext <<_ACEOF
11332 #line 11332 "configure"
11333 #include "confdefs.h"
11334 $ac_includes_default
11335 int
11336 main ()
11337 {
11338 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11339   ;
11340   return 0;
11341 }
11342 _ACEOF
11343 rm -f conftest.$ac_objext
11344 if { (eval echo "$as_me:11344: \"$ac_compile\"") >&5
11345   (eval $ac_compile) 2>&5
11346   ac_status=$?
11347   echo "$as_me:11347: \$? = $ac_status" >&5
11348   (exit $ac_status); } &&
11349          { ac_try='test -s conftest.$ac_objext'
11350   { (eval echo "$as_me:11350: \"$ac_try\"") >&5
11351   (eval $ac_try) 2>&5
11352   ac_status=$?
11353   echo "$as_me:11353: \$? = $ac_status" >&5
11354   (exit $ac_status); }; }; then
11355   ac_lo=0 ac_mid=0
11356   while :; do
11357     cat >conftest.$ac_ext <<_ACEOF
11358 #line 11358 "configure"
11359 #include "confdefs.h"
11360 $ac_includes_default
11361 int
11362 main ()
11363 {
11364 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11365   ;
11366   return 0;
11367 }
11368 _ACEOF
11369 rm -f conftest.$ac_objext
11370 if { (eval echo "$as_me:11370: \"$ac_compile\"") >&5
11371   (eval $ac_compile) 2>&5
11372   ac_status=$?
11373   echo "$as_me:11373: \$? = $ac_status" >&5
11374   (exit $ac_status); } &&
11375          { ac_try='test -s conftest.$ac_objext'
11376   { (eval echo "$as_me:11376: \"$ac_try\"") >&5
11377   (eval $ac_try) 2>&5
11378   ac_status=$?
11379   echo "$as_me:11379: \$? = $ac_status" >&5
11380   (exit $ac_status); }; }; then
11381   ac_hi=$ac_mid; break
11382 else
11383   echo "$as_me: failed program was:" >&5
11384 cat conftest.$ac_ext >&5
11385 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11386 fi
11387 rm -f conftest.$ac_objext conftest.$ac_ext
11388   done
11389 else
11390   echo "$as_me: failed program was:" >&5
11391 cat conftest.$ac_ext >&5
11392 ac_hi=-1 ac_mid=-1
11393   while :; do
11394     cat >conftest.$ac_ext <<_ACEOF
11395 #line 11395 "configure"
11396 #include "confdefs.h"
11397 $ac_includes_default
11398 int
11399 main ()
11400 {
11401 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11402   ;
11403   return 0;
11404 }
11405 _ACEOF
11406 rm -f conftest.$ac_objext
11407 if { (eval echo "$as_me:11407: \"$ac_compile\"") >&5
11408   (eval $ac_compile) 2>&5
11409   ac_status=$?
11410   echo "$as_me:11410: \$? = $ac_status" >&5
11411   (exit $ac_status); } &&
11412          { ac_try='test -s conftest.$ac_objext'
11413   { (eval echo "$as_me:11413: \"$ac_try\"") >&5
11414   (eval $ac_try) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); }; }; then
11418   ac_lo=$ac_mid; break
11419 else
11420   echo "$as_me: failed program was:" >&5
11421 cat conftest.$ac_ext >&5
11422 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11423 fi
11424 rm -f conftest.$ac_objext conftest.$ac_ext
11425   done
11426 fi
11427 rm -f conftest.$ac_objext conftest.$ac_ext
11428 # Binary search between lo and hi bounds.
11429 while test "x$ac_lo" != "x$ac_hi"; do
11430   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11431   cat >conftest.$ac_ext <<_ACEOF
11432 #line 11432 "configure"
11433 #include "confdefs.h"
11434 $ac_includes_default
11435 int
11436 main ()
11437 {
11438 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11439   ;
11440   return 0;
11441 }
11442 _ACEOF
11443 rm -f conftest.$ac_objext
11444 if { (eval echo "$as_me:11444: \"$ac_compile\"") >&5
11445   (eval $ac_compile) 2>&5
11446   ac_status=$?
11447   echo "$as_me:11447: \$? = $ac_status" >&5
11448   (exit $ac_status); } &&
11449          { ac_try='test -s conftest.$ac_objext'
11450   { (eval echo "$as_me:11450: \"$ac_try\"") >&5
11451   (eval $ac_try) 2>&5
11452   ac_status=$?
11453   echo "$as_me:11453: \$? = $ac_status" >&5
11454   (exit $ac_status); }; }; then
11455   ac_hi=$ac_mid
11456 else
11457   echo "$as_me: failed program was:" >&5
11458 cat conftest.$ac_ext >&5
11459 ac_lo=`expr $ac_mid + 1`
11460 fi
11461 rm -f conftest.$ac_objext conftest.$ac_ext
11462 done
11463 ac_cv_sizeof_signed_char=$ac_lo
11464 else
11465   if test "$cross_compiling" = yes; then
11466   { { echo "$as_me:11466: error: cannot run test program while cross compiling" >&5
11467 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11468    { (exit 1); exit 1; }; }
11469 else
11470   cat >conftest.$ac_ext <<_ACEOF
11471 #line 11471 "configure"
11472 #include "confdefs.h"
11473 $ac_includes_default
11474 int
11475 main ()
11476 {
11477 FILE *f = fopen ("conftest.val", "w");
11478 if (!f)
11479   $ac_main_return (1);
11480 fprintf (f, "%d", (sizeof (signed char)));
11481 fclose (f);
11482   ;
11483   return 0;
11484 }
11485 _ACEOF
11486 rm -f conftest$ac_exeext
11487 if { (eval echo "$as_me:11487: \"$ac_link\"") >&5
11488   (eval $ac_link) 2>&5
11489   ac_status=$?
11490   echo "$as_me:11490: \$? = $ac_status" >&5
11491   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11492   { (eval echo "$as_me:11492: \"$ac_try\"") >&5
11493   (eval $ac_try) 2>&5
11494   ac_status=$?
11495   echo "$as_me:11495: \$? = $ac_status" >&5
11496   (exit $ac_status); }; }; then
11497   ac_cv_sizeof_signed_char=`cat conftest.val`
11498 else
11499   echo "$as_me: program exited with status $ac_status" >&5
11500 echo "$as_me: failed program was:" >&5
11501 cat conftest.$ac_ext >&5
11502 fi
11503 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11504 fi
11505 fi
11506 rm -f conftest.val
11507 else
11508   ac_cv_sizeof_signed_char=0
11509 fi
11510 fi
11511 echo "$as_me:11511: result: $ac_cv_sizeof_signed_char" >&5
11512 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11513 cat >>confdefs.h <<EOF
11514 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11515 EOF
11516
11517 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11518         NCURSES_SBOOL="signed char"
11519 else
11520         NCURSES_SBOOL="char"
11521 fi
11522 echo "$as_me:11522: checking if you want to use signed Boolean array in term.h" >&5
11523 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11524
11525 # Check whether --enable-signed-char or --disable-signed-char was given.
11526 if test "${enable_signed_char+set}" = set; then
11527   enableval="$enable_signed_char"
11528   with_signed_char=$enableval
11529 else
11530   with_signed_char=no
11531 fi;
11532 echo "$as_me:11532: result: $with_signed_char" >&5
11533 echo "${ECHO_T}$with_signed_char" >&6
11534 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11535
11536 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11537 echo "$as_me:11537: checking if you want SIGWINCH handler" >&5
11538 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11539
11540 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11541 if test "${enable_sigwinch+set}" = set; then
11542   enableval="$enable_sigwinch"
11543   with_sigwinch=$enableval
11544 else
11545   with_sigwinch=$with_ext_funcs
11546 fi;
11547 echo "$as_me:11547: result: $with_sigwinch" >&5
11548 echo "${ECHO_T}$with_sigwinch" >&6
11549 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11550 #define USE_SIGWINCH 1
11551 EOF
11552
11553 ###   use option --enable-tcap-names to allow user to define new capabilities
11554 echo "$as_me:11554: checking if you want user-definable terminal capabilities like termcap" >&5
11555 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11556
11557 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11558 if test "${enable_tcap_names+set}" = set; then
11559   enableval="$enable_tcap_names"
11560   with_tcap_names=$enableval
11561 else
11562   with_tcap_names=$with_ext_funcs
11563 fi;
11564 echo "$as_me:11564: result: $with_tcap_names" >&5
11565 echo "${ECHO_T}$with_tcap_names" >&6
11566 NCURSES_XNAMES=0
11567 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11568
11569 ###############################################################################
11570 # These options are relatively safe to experiment with.
11571
11572 echo "$as_me:11572: checking if you want all development code" >&5
11573 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11574
11575 # Check whether --with-develop or --without-develop was given.
11576 if test "${with_develop+set}" = set; then
11577   withval="$with_develop"
11578   with_develop=$withval
11579 else
11580   with_develop=no
11581 fi;
11582 echo "$as_me:11582: result: $with_develop" >&5
11583 echo "${ECHO_T}$with_develop" >&6
11584
11585 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11586 echo "$as_me:11586: checking if you want hard-tabs code" >&5
11587 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11588
11589 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11590 if test "${enable_hard_tabs+set}" = set; then
11591   enableval="$enable_hard_tabs"
11592
11593 else
11594   enable_hard_tabs=$with_develop
11595 fi;
11596 echo "$as_me:11596: result: $enable_hard_tabs" >&5
11597 echo "${ECHO_T}$enable_hard_tabs" >&6
11598 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11599 #define USE_HARD_TABS 1
11600 EOF
11601
11602 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11603 echo "$as_me:11603: checking if you want limited support for xmc" >&5
11604 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11605
11606 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11607 if test "${enable_xmc_glitch+set}" = set; then
11608   enableval="$enable_xmc_glitch"
11609
11610 else
11611   enable_xmc_glitch=$with_develop
11612 fi;
11613 echo "$as_me:11613: result: $enable_xmc_glitch" >&5
11614 echo "${ECHO_T}$enable_xmc_glitch" >&6
11615 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11616 #define USE_XMC_SUPPORT 1
11617 EOF
11618
11619 ###############################################################################
11620 # These are just experimental, probably should not be in a package:
11621
11622 echo "$as_me:11622: checking if you do not want to assume colors are white-on-black" >&5
11623 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11624
11625 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11626 if test "${enable_assumed_color+set}" = set; then
11627   enableval="$enable_assumed_color"
11628   with_assumed_color=$enableval
11629 else
11630   with_assumed_color=yes
11631 fi;
11632 echo "$as_me:11632: result: $with_assumed_color" >&5
11633 echo "${ECHO_T}$with_assumed_color" >&6
11634 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11635 #define USE_ASSUMED_COLOR 1
11636 EOF
11637
11638 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11639 echo "$as_me:11639: checking if you want hashmap scrolling-optimization code" >&5
11640 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11641
11642 # Check whether --enable-hashmap or --disable-hashmap was given.
11643 if test "${enable_hashmap+set}" = set; then
11644   enableval="$enable_hashmap"
11645   with_hashmap=$enableval
11646 else
11647   with_hashmap=yes
11648 fi;
11649 echo "$as_me:11649: result: $with_hashmap" >&5
11650 echo "${ECHO_T}$with_hashmap" >&6
11651 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11652 #define USE_HASHMAP 1
11653 EOF
11654
11655 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11656 echo "$as_me:11656: checking if you want colorfgbg code" >&5
11657 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11658
11659 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11660 if test "${enable_colorfgbg+set}" = set; then
11661   enableval="$enable_colorfgbg"
11662   with_colorfgbg=$enableval
11663 else
11664   with_colorfgbg=no
11665 fi;
11666 echo "$as_me:11666: result: $with_colorfgbg" >&5
11667 echo "${ECHO_T}$with_colorfgbg" >&6
11668 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11669 #define USE_COLORFGBG 1
11670 EOF
11671
11672 ###   use option --enable-interop to turn on use of bindings used for interop
11673 echo "$as_me:11673: checking if you want interop bindings" >&5
11674 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11675
11676 # Check whether --enable-interop or --disable-interop was given.
11677 if test "${enable_interop+set}" = set; then
11678   enableval="$enable_interop"
11679   with_exp_interop=$enableval
11680 else
11681   with_exp_interop=no
11682 fi;
11683 echo "$as_me:11683: result: $with_exp_interop" >&5
11684 echo "${ECHO_T}$with_exp_interop" >&6
11685
11686 NCURSES_INTEROP_FUNCS=0
11687 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11688
11689 # This is still experimental (20080329), but should ultimately be moved to
11690 # the script-block --with-normal, etc.
11691
11692 echo "$as_me:11692: checking if you want to link with the pthread library" >&5
11693 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11694
11695 # Check whether --with-pthread or --without-pthread was given.
11696 if test "${with_pthread+set}" = set; then
11697   withval="$with_pthread"
11698   with_pthread=$withval
11699 else
11700   with_pthread=no
11701 fi;
11702 echo "$as_me:11702: result: $with_pthread" >&5
11703 echo "${ECHO_T}$with_pthread" >&6
11704
11705 if test "$with_pthread" != no ; then
11706     echo "$as_me:11706: checking for pthread.h" >&5
11707 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11708 if test "${ac_cv_header_pthread_h+set}" = set; then
11709   echo $ECHO_N "(cached) $ECHO_C" >&6
11710 else
11711   cat >conftest.$ac_ext <<_ACEOF
11712 #line 11712 "configure"
11713 #include "confdefs.h"
11714 #include <pthread.h>
11715 _ACEOF
11716 if { (eval echo "$as_me:11716: \"$ac_cpp conftest.$ac_ext\"") >&5
11717   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11718   ac_status=$?
11719   egrep -v '^ *\+' conftest.er1 >conftest.err
11720   rm -f conftest.er1
11721   cat conftest.err >&5
11722   echo "$as_me:11722: \$? = $ac_status" >&5
11723   (exit $ac_status); } >/dev/null; then
11724   if test -s conftest.err; then
11725     ac_cpp_err=$ac_c_preproc_warn_flag
11726   else
11727     ac_cpp_err=
11728   fi
11729 else
11730   ac_cpp_err=yes
11731 fi
11732 if test -z "$ac_cpp_err"; then
11733   ac_cv_header_pthread_h=yes
11734 else
11735   echo "$as_me: failed program was:" >&5
11736   cat conftest.$ac_ext >&5
11737   ac_cv_header_pthread_h=no
11738 fi
11739 rm -f conftest.err conftest.$ac_ext
11740 fi
11741 echo "$as_me:11741: result: $ac_cv_header_pthread_h" >&5
11742 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11743 if test $ac_cv_header_pthread_h = yes; then
11744
11745         cat >>confdefs.h <<\EOF
11746 #define HAVE_PTHREADS_H 1
11747 EOF
11748
11749         for cf_lib_pthread in pthread c_r
11750         do
11751             echo "$as_me:11751: checking if we can link with the $cf_lib_pthread library" >&5
11752 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11753             cf_save_LIBS="$LIBS"
11754             LIBS="-l$cf_lib_pthread $LIBS"
11755             cat >conftest.$ac_ext <<_ACEOF
11756 #line 11756 "configure"
11757 #include "confdefs.h"
11758
11759 #include <pthread.h>
11760
11761 int
11762 main ()
11763 {
11764
11765                 int rc = pthread_create(0,0,0,0);
11766                 int r2 = pthread_mutexattr_settype(0, 0);
11767
11768   ;
11769   return 0;
11770 }
11771 _ACEOF
11772 rm -f conftest.$ac_objext conftest$ac_exeext
11773 if { (eval echo "$as_me:11773: \"$ac_link\"") >&5
11774   (eval $ac_link) 2>&5
11775   ac_status=$?
11776   echo "$as_me:11776: \$? = $ac_status" >&5
11777   (exit $ac_status); } &&
11778          { ac_try='test -s conftest$ac_exeext'
11779   { (eval echo "$as_me:11779: \"$ac_try\"") >&5
11780   (eval $ac_try) 2>&5
11781   ac_status=$?
11782   echo "$as_me:11782: \$? = $ac_status" >&5
11783   (exit $ac_status); }; }; then
11784   with_pthread=yes
11785 else
11786   echo "$as_me: failed program was:" >&5
11787 cat conftest.$ac_ext >&5
11788 with_pthread=no
11789 fi
11790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11791             LIBS="$cf_save_LIBS"
11792             echo "$as_me:11792: result: $with_pthread" >&5
11793 echo "${ECHO_T}$with_pthread" >&6
11794             test "$with_pthread" = yes && break
11795         done
11796
11797         if test "$with_pthread" = yes ; then
11798             LIBS="-l$cf_lib_pthread $LIBS"
11799             cat >>confdefs.h <<\EOF
11800 #define HAVE_LIBPTHREADS 1
11801 EOF
11802
11803         else
11804             { { echo "$as_me:11804: error: Cannot link with pthread library" >&5
11805 echo "$as_me: error: Cannot link with pthread library" >&2;}
11806    { (exit 1); exit 1; }; }
11807         fi
11808
11809 fi
11810
11811 fi
11812
11813 if test "x$with_pthread" != xno; then
11814         echo "$as_me:11814: checking for pthread_kill" >&5
11815 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11816 if test "${ac_cv_func_pthread_kill+set}" = set; then
11817   echo $ECHO_N "(cached) $ECHO_C" >&6
11818 else
11819   cat >conftest.$ac_ext <<_ACEOF
11820 #line 11820 "configure"
11821 #include "confdefs.h"
11822 /* System header to define __stub macros and hopefully few prototypes,
11823     which can conflict with char pthread_kill (); below.  */
11824 #include <assert.h>
11825 /* Override any gcc2 internal prototype to avoid an error.  */
11826 #ifdef __cplusplus
11827 extern "C"
11828 #endif
11829 /* We use char because int might match the return type of a gcc2
11830    builtin and then its argument prototype would still apply.  */
11831 char pthread_kill ();
11832 char (*f) ();
11833
11834 int
11835 main ()
11836 {
11837 /* The GNU C library defines this for functions which it implements
11838     to always fail with ENOSYS.  Some functions are actually named
11839     something starting with __ and the normal name is an alias.  */
11840 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11841 choke me
11842 #else
11843 f = pthread_kill;
11844 #endif
11845
11846   ;
11847   return 0;
11848 }
11849 _ACEOF
11850 rm -f conftest.$ac_objext conftest$ac_exeext
11851 if { (eval echo "$as_me:11851: \"$ac_link\"") >&5
11852   (eval $ac_link) 2>&5
11853   ac_status=$?
11854   echo "$as_me:11854: \$? = $ac_status" >&5
11855   (exit $ac_status); } &&
11856          { ac_try='test -s conftest$ac_exeext'
11857   { (eval echo "$as_me:11857: \"$ac_try\"") >&5
11858   (eval $ac_try) 2>&5
11859   ac_status=$?
11860   echo "$as_me:11860: \$? = $ac_status" >&5
11861   (exit $ac_status); }; }; then
11862   ac_cv_func_pthread_kill=yes
11863 else
11864   echo "$as_me: failed program was:" >&5
11865 cat conftest.$ac_ext >&5
11866 ac_cv_func_pthread_kill=no
11867 fi
11868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11869 fi
11870 echo "$as_me:11870: result: $ac_cv_func_pthread_kill" >&5
11871 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11872 if test $ac_cv_func_pthread_kill = yes; then
11873
11874                 echo "$as_me:11874: checking if you want to allow EINTR in wgetch with pthreads" >&5
11875 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11876
11877 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11878 if test "${enable_pthreads_eintr+set}" = set; then
11879   enableval="$enable_pthreads_eintr"
11880   use_pthreads_eintr=$enableval
11881 else
11882   use_pthreads_eintr=no
11883 fi;
11884                 echo "$as_me:11884: result: $use_pthreads_eintr" >&5
11885 echo "${ECHO_T}$use_pthreads_eintr" >&6
11886                 if test $use_pthreads_eintr = yes ; then
11887                         cat >>confdefs.h <<\EOF
11888 #define USE_PTHREADS_EINTR 1
11889 EOF
11890
11891                 fi
11892 fi
11893
11894         echo "$as_me:11894: checking if you want to use weak-symbols for pthreads" >&5
11895 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11896
11897 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11898 if test "${enable_weak_symbols+set}" = set; then
11899   enableval="$enable_weak_symbols"
11900   use_weak_symbols=$enableval
11901 else
11902   use_weak_symbols=no
11903 fi;
11904         echo "$as_me:11904: result: $use_weak_symbols" >&5
11905 echo "${ECHO_T}$use_weak_symbols" >&6
11906         if test "$use_weak_symbols" = yes ; then
11907
11908 echo "$as_me:11908: checking if $CC supports weak symbols" >&5
11909 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11910 if test "${cf_cv_weak_symbols+set}" = set; then
11911   echo $ECHO_N "(cached) $ECHO_C" >&6
11912 else
11913
11914 cat >conftest.$ac_ext <<_ACEOF
11915 #line 11915 "configure"
11916 #include "confdefs.h"
11917
11918 #include <stdio.h>
11919 int
11920 main ()
11921 {
11922
11923 #if defined(__GNUC__)
11924 #  if defined __USE_ISOC99
11925 #    define _cat_pragma(exp)    _Pragma(#exp)
11926 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11927 #  else
11928 #    define _weak_pragma(exp)
11929 #  endif
11930 #  define _declare(name)        __extension__ extern __typeof__(name) name
11931 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11932 #endif
11933
11934 weak_symbol(fopen);
11935
11936   ;
11937   return 0;
11938 }
11939 _ACEOF
11940 rm -f conftest.$ac_objext
11941 if { (eval echo "$as_me:11941: \"$ac_compile\"") >&5
11942   (eval $ac_compile) 2>&5
11943   ac_status=$?
11944   echo "$as_me:11944: \$? = $ac_status" >&5
11945   (exit $ac_status); } &&
11946          { ac_try='test -s conftest.$ac_objext'
11947   { (eval echo "$as_me:11947: \"$ac_try\"") >&5
11948   (eval $ac_try) 2>&5
11949   ac_status=$?
11950   echo "$as_me:11950: \$? = $ac_status" >&5
11951   (exit $ac_status); }; }; then
11952   cf_cv_weak_symbols=yes
11953 else
11954   echo "$as_me: failed program was:" >&5
11955 cat conftest.$ac_ext >&5
11956 cf_cv_weak_symbols=no
11957 fi
11958 rm -f conftest.$ac_objext conftest.$ac_ext
11959
11960 fi
11961 echo "$as_me:11961: result: $cf_cv_weak_symbols" >&5
11962 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11963
11964         else
11965                 cf_cv_weak_symbols=no
11966         fi
11967
11968         if test $cf_cv_weak_symbols = yes ; then
11969                 cat >>confdefs.h <<\EOF
11970 #define USE_WEAK_SYMBOLS 1
11971 EOF
11972
11973         fi
11974 fi
11975
11976 PTHREAD=
11977 if test "$with_pthread" = "yes" ; then
11978     cat >>confdefs.h <<\EOF
11979 #define USE_PTHREADS 1
11980 EOF
11981
11982     enable_reentrant=yes
11983     if test $cf_cv_weak_symbols = yes ; then
11984         PTHREAD=-lpthread
11985     fi
11986 fi
11987
11988 # Reentrant code has to be opaque; there's little advantage to making ncurses
11989 # opaque outside of that, so there is no --enable-opaque option.  We can use
11990 # this option without --with-pthreads, but this will be always set for
11991 # pthreads.
11992 echo "$as_me:11992: checking if you want experimental reentrant code" >&5
11993 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11994
11995 # Check whether --enable-reentrant or --disable-reentrant was given.
11996 if test "${enable_reentrant+set}" = set; then
11997   enableval="$enable_reentrant"
11998   with_reentrant=$enableval
11999 else
12000   with_reentrant=no
12001 fi;
12002 echo "$as_me:12002: result: $with_reentrant" >&5
12003 echo "${ECHO_T}$with_reentrant" >&6
12004 if test "$with_reentrant" = yes ; then
12005         cf_cv_enable_reentrant=1
12006         cf_cv_enable_opaque="NCURSES_INTERNALS"
12007         NCURSES_OPAQUE=1
12008         NCURSES_SIZE_T=int
12009         if test $cf_cv_weak_symbols = yes ; then
12010
12011 # remove pthread library from $LIBS
12012 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12013
12014                 TEST_LIBS="-lpthread $TEST_LIBS"
12015                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12016         else
12017                 LIB_SUFFIX="t${LIB_SUFFIX}"
12018         fi
12019         cat >>confdefs.h <<\EOF
12020 #define USE_REENTRANT 1
12021 EOF
12022
12023 if test "${with_abi_version+set}" != set; then
12024         case $cf_cv_rel_version in
12025         5.*)
12026                 cf_cv_rel_version=6.0
12027                 cf_cv_abi_version=6
12028                 { echo "$as_me:12028: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12029 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12030                 ;;
12031         esac
12032 fi
12033
12034 else
12035         cf_cv_enable_reentrant=0
12036         cf_cv_enable_opaque="NCURSES_OPAQUE"
12037         NCURSES_OPAQUE=0
12038         NCURSES_SIZE_T=short
12039 fi
12040
12041 ### Allow using a different wrap-prefix
12042 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12043         echo "$as_me:12043: checking for prefix used to wrap public variables" >&5
12044 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12045
12046 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12047 if test "${with_wrap_prefix+set}" = set; then
12048   withval="$with_wrap_prefix"
12049   NCURSES_WRAP_PREFIX=$withval
12050 else
12051   NCURSES_WRAP_PREFIX=_nc_
12052 fi;
12053         echo "$as_me:12053: result: $NCURSES_WRAP_PREFIX" >&5
12054 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12055 else
12056         NCURSES_WRAP_PREFIX=_nc_
12057 fi
12058
12059 cat >>confdefs.h <<EOF
12060 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12061 EOF
12062
12063 echo "$as_me:12063: checking if you want experimental safe-sprintf code" >&5
12064 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12065
12066 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12067 if test "${enable_safe_sprintf+set}" = set; then
12068   enableval="$enable_safe_sprintf"
12069   with_safe_sprintf=$enableval
12070 else
12071   with_safe_sprintf=no
12072 fi;
12073 echo "$as_me:12073: result: $with_safe_sprintf" >&5
12074 echo "${ECHO_T}$with_safe_sprintf" >&6
12075 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
12076 #define USE_SAFE_SPRINTF 1
12077 EOF
12078
12079 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12080 # when hashmap is used scroll hints are useless
12081 if test "$with_hashmap" = no ; then
12082 echo "$as_me:12082: checking if you want to experiment without scrolling-hints code" >&5
12083 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12084
12085 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12086 if test "${enable_scroll_hints+set}" = set; then
12087   enableval="$enable_scroll_hints"
12088   with_scroll_hints=$enableval
12089 else
12090   with_scroll_hints=yes
12091 fi;
12092 echo "$as_me:12092: result: $with_scroll_hints" >&5
12093 echo "${ECHO_T}$with_scroll_hints" >&6
12094 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
12095 #define USE_SCROLL_HINTS 1
12096 EOF
12097
12098 fi
12099
12100 echo "$as_me:12100: checking if you want experimental wgetch-events code" >&5
12101 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12102
12103 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12104 if test "${enable_wgetch_events+set}" = set; then
12105   enableval="$enable_wgetch_events"
12106   with_wgetch_events=$enableval
12107 else
12108   with_wgetch_events=no
12109 fi;
12110 echo "$as_me:12110: result: $with_wgetch_events" >&5
12111 echo "${ECHO_T}$with_wgetch_events" >&6
12112 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
12113 #define NCURSES_WGETCH_EVENTS 1
12114 EOF
12115
12116 ###############################################################################
12117
12118 ###     use option --disable-echo to suppress full display compiling commands
12119 echo "$as_me:12119: checking if you want to display full commands during build" >&5
12120 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
12121
12122 # Check whether --enable-echo or --disable-echo was given.
12123 if test "${enable_echo+set}" = set; then
12124   enableval="$enable_echo"
12125   with_echo=$enableval
12126 else
12127   with_echo=yes
12128 fi;
12129 if test "$with_echo" = yes; then
12130         ECHO_LINK=
12131 else
12132         ECHO_LINK='@ echo linking $@ ... ;'
12133         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12134         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12135 fi
12136 echo "$as_me:12136: result: $with_echo" >&5
12137 echo "${ECHO_T}$with_echo" >&6
12138
12139 ###     use option --enable-warnings to turn on all gcc warnings
12140 echo "$as_me:12140: checking if you want to see compiler warnings" >&5
12141 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12142
12143 # Check whether --enable-warnings or --disable-warnings was given.
12144 if test "${enable_warnings+set}" = set; then
12145   enableval="$enable_warnings"
12146   with_warnings=$enableval
12147 fi;
12148 echo "$as_me:12148: result: $with_warnings" >&5
12149 echo "${ECHO_T}$with_warnings" >&6
12150
12151 if test "x$with_warnings" = "xyes"; then
12152
12153         ADAFLAGS="$ADAFLAGS -gnatg"
12154
12155 INTEL_COMPILER=no
12156
12157 if test "$GCC" = yes ; then
12158         case $host_os in
12159         linux*|gnu*)
12160                 echo "$as_me:12160: checking if this is really Intel C compiler" >&5
12161 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12162                 cf_save_CFLAGS="$CFLAGS"
12163                 CFLAGS="$CFLAGS -no-gcc"
12164                 cat >conftest.$ac_ext <<_ACEOF
12165 #line 12165 "configure"
12166 #include "confdefs.h"
12167
12168 int
12169 main ()
12170 {
12171
12172 #ifdef __INTEL_COMPILER
12173 #else
12174 make an error
12175 #endif
12176
12177   ;
12178   return 0;
12179 }
12180 _ACEOF
12181 rm -f conftest.$ac_objext
12182 if { (eval echo "$as_me:12182: \"$ac_compile\"") >&5
12183   (eval $ac_compile) 2>&5
12184   ac_status=$?
12185   echo "$as_me:12185: \$? = $ac_status" >&5
12186   (exit $ac_status); } &&
12187          { ac_try='test -s conftest.$ac_objext'
12188   { (eval echo "$as_me:12188: \"$ac_try\"") >&5
12189   (eval $ac_try) 2>&5
12190   ac_status=$?
12191   echo "$as_me:12191: \$? = $ac_status" >&5
12192   (exit $ac_status); }; }; then
12193   INTEL_COMPILER=yes
12194 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12195
12196 else
12197   echo "$as_me: failed program was:" >&5
12198 cat conftest.$ac_ext >&5
12199 fi
12200 rm -f conftest.$ac_objext conftest.$ac_ext
12201                 CFLAGS="$cf_save_CFLAGS"
12202                 echo "$as_me:12202: result: $INTEL_COMPILER" >&5
12203 echo "${ECHO_T}$INTEL_COMPILER" >&6
12204                 ;;
12205         esac
12206 fi
12207
12208 cat > conftest.$ac_ext <<EOF
12209 #line 12209 "${as_me:-configure}"
12210 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12211 EOF
12212
12213 if test "$INTEL_COMPILER" = yes
12214 then
12215 # The "-wdXXX" options suppress warnings:
12216 # remark #1419: external declaration in primary source file
12217 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12218 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12219 # remark #193: zero used for undefined preprocessing identifier
12220 # remark #593: variable "curs_sb_left_arrow" was set but never used
12221 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12222 # remark #869: parameter "tw" was never referenced
12223 # remark #981: operands are evaluated in unspecified order
12224 # warning #279: controlling expression is constant
12225
12226         { echo "$as_me:12226: checking for $CC warning options..." >&5
12227 echo "$as_me: checking for $CC warning options..." >&6;}
12228         cf_save_CFLAGS="$CFLAGS"
12229         EXTRA_CFLAGS="-Wall"
12230         for cf_opt in \
12231                 wd1419 \
12232                 wd1683 \
12233                 wd1684 \
12234                 wd193 \
12235                 wd593 \
12236                 wd279 \
12237                 wd810 \
12238                 wd869 \
12239                 wd981
12240         do
12241                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12242                 if { (eval echo "$as_me:12242: \"$ac_compile\"") >&5
12243   (eval $ac_compile) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); }; then
12247                         test -n "$verbose" && echo "$as_me:12247: result: ... -$cf_opt" >&5
12248 echo "${ECHO_T}... -$cf_opt" >&6
12249                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12250                 fi
12251         done
12252         CFLAGS="$cf_save_CFLAGS"
12253
12254 elif test "$GCC" = yes
12255 then
12256         { echo "$as_me:12256: checking for $CC warning options..." >&5
12257 echo "$as_me: checking for $CC warning options..." >&6;}
12258         cf_save_CFLAGS="$CFLAGS"
12259         EXTRA_CFLAGS=
12260         cf_warn_CONST=""
12261         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12262         for cf_opt in W Wall \
12263                 Wbad-function-cast \
12264                 Wcast-align \
12265                 Wcast-qual \
12266                 Winline \
12267                 Wmissing-declarations \
12268                 Wmissing-prototypes \
12269                 Wnested-externs \
12270                 Wpointer-arith \
12271                 Wshadow \
12272                 Wstrict-prototypes \
12273                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12274         do
12275                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12276                 if { (eval echo "$as_me:12276: \"$ac_compile\"") >&5
12277   (eval $ac_compile) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit $ac_status); }; then
12281                         test -n "$verbose" && echo "$as_me:12281: result: ... -$cf_opt" >&5
12282 echo "${ECHO_T}... -$cf_opt" >&6
12283                         case $cf_opt in #(vi
12284                         Wcast-qual) #(vi
12285                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12286                                 ;;
12287                         Winline) #(vi
12288                                 case $GCC_VERSION in
12289                                 [34].*)
12290                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12291
12292 echo "${as_me:-configure}:12292: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12293
12294                                         continue;;
12295                                 esac
12296                                 ;;
12297                         esac
12298                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12299                 fi
12300         done
12301         CFLAGS="$cf_save_CFLAGS"
12302 fi
12303 rm -rf conftest*
12304
12305         if test "$cf_with_cxx" = yes ; then
12306
12307 INTEL_CPLUSPLUS=no
12308
12309 if test "$GCC" = yes ; then
12310         case $host_os in
12311         linux*|gnu*)
12312                 echo "$as_me:12312: checking if this is really Intel C++ compiler" >&5
12313 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12314                 cf_save_CFLAGS="$CXXFLAGS"
12315                 CXXFLAGS="$CXXFLAGS -no-gcc"
12316                 cat >conftest.$ac_ext <<_ACEOF
12317 #line 12317 "configure"
12318 #include "confdefs.h"
12319
12320 int
12321 main ()
12322 {
12323
12324 #ifdef __INTEL_COMPILER
12325 #else
12326 make an error
12327 #endif
12328
12329   ;
12330   return 0;
12331 }
12332 _ACEOF
12333 rm -f conftest.$ac_objext
12334 if { (eval echo "$as_me:12334: \"$ac_compile\"") >&5
12335   (eval $ac_compile) 2>&5
12336   ac_status=$?
12337   echo "$as_me:12337: \$? = $ac_status" >&5
12338   (exit $ac_status); } &&
12339          { ac_try='test -s conftest.$ac_objext'
12340   { (eval echo "$as_me:12340: \"$ac_try\"") >&5
12341   (eval $ac_try) 2>&5
12342   ac_status=$?
12343   echo "$as_me:12343: \$? = $ac_status" >&5
12344   (exit $ac_status); }; }; then
12345   INTEL_CPLUSPLUS=yes
12346 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12347
12348 else
12349   echo "$as_me: failed program was:" >&5
12350 cat conftest.$ac_ext >&5
12351 fi
12352 rm -f conftest.$ac_objext conftest.$ac_ext
12353                 CXXFLAGS="$cf_save_CFLAGS"
12354                 echo "$as_me:12354: result: $INTEL_CPLUSPLUS" >&5
12355 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12356                 ;;
12357         esac
12358 fi
12359
12360 ac_ext=cc
12361 ac_cpp='$CXXCPP $CPPFLAGS'
12362 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12363 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12364 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12365 ac_main_return=return
12366
12367 cat > conftest.$ac_ext <<EOF
12368 #line 12368 "configure"
12369 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12370 EOF
12371
12372 if test "$INTEL_CPLUSPLUS" = yes
12373 then
12374 # The "-wdXXX" options suppress warnings:
12375 # remark #1419: external declaration in primary source file
12376 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12377 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12378 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12379 # remark #193: zero used for undefined preprocessing identifier
12380 # remark #593: variable "curs_sb_left_arrow" was set but never used
12381 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12382 # remark #869: parameter "tw" was never referenced
12383 # remark #981: operands are evaluated in unspecified order
12384 # warning #269: invalid format string conversion
12385
12386         { echo "$as_me:12386: checking for $CC warning options..." >&5
12387 echo "$as_me: checking for $CC warning options..." >&6;}
12388         cf_save_CXXFLAGS="$CXXFLAGS"
12389         EXTRA_CXXFLAGS="-Wall"
12390         for cf_opt in \
12391                 wd1419 \
12392                 wd1682 \
12393                 wd1683 \
12394                 wd1684 \
12395                 wd193 \
12396                 wd279 \
12397                 wd593 \
12398                 wd810 \
12399                 wd869 \
12400                 wd981
12401         do
12402                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12403                 if { (eval echo "$as_me:12403: \"$ac_compile\"") >&5
12404   (eval $ac_compile) 2>&5
12405   ac_status=$?
12406   echo "$as_me:12406: \$? = $ac_status" >&5
12407   (exit $ac_status); }; then
12408                         test -n "$verbose" && echo "$as_me:12408: result: ... -$cf_opt" >&5
12409 echo "${ECHO_T}... -$cf_opt" >&6
12410                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12411                 fi
12412         done
12413         CXXFLAGS="$cf_save_CXXFLAGS"
12414
12415 elif test "$GXX" = yes
12416 then
12417         { echo "$as_me:12417: checking for $CXX warning options..." >&5
12418 echo "$as_me: checking for $CXX warning options..." >&6;}
12419         cf_save_CXXFLAGS="$CXXFLAGS"
12420         EXTRA_CXXFLAGS="-W -Wall"
12421         cf_gxx_extra_warnings=""
12422         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12423         case "$GCC_VERSION" in
12424         [1-2].*)
12425                 ;;
12426         *)
12427                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12428                 ;;
12429         esac
12430         for cf_opt in \
12431                 Wabi \
12432                 fabi-version=0 \
12433                 Woverloaded-virtual \
12434                 Wsign-promo \
12435                 Wsynth \
12436                 Wold-style-cast \
12437                 Wcast-align \
12438                 Wcast-qual \
12439                 Wmissing-prototypes \
12440                 Wpointer-arith \
12441                 Wshadow \
12442                 Wstrict-prototypes \
12443                 Wundef $cf_gxx_extra_warnings Wno-unused
12444         do
12445                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12446                 if { (eval echo "$as_me:12446: \"$ac_compile\"") >&5
12447   (eval $ac_compile) 2>&5
12448   ac_status=$?
12449   echo "$as_me:12449: \$? = $ac_status" >&5
12450   (exit $ac_status); }; then
12451                         test -n "$verbose" && echo "$as_me:12451: result: ... -$cf_opt" >&5
12452 echo "${ECHO_T}... -$cf_opt" >&6
12453                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12454                 else
12455                         test -n "$verbose" && echo "$as_me:12455: result: ... no -$cf_opt" >&5
12456 echo "${ECHO_T}... no -$cf_opt" >&6
12457                 fi
12458         done
12459         CXXFLAGS="$cf_save_CXXFLAGS"
12460 fi
12461
12462 rm -rf conftest*
12463 ac_ext=c
12464 ac_cpp='$CPP $CPPFLAGS'
12465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12468 ac_main_return=return
12469
12470         fi
12471 fi
12472
12473 if test "$GCC" = yes
12474 then
12475 cat > conftest.i <<EOF
12476 #ifndef GCC_PRINTF
12477 #define GCC_PRINTF 0
12478 #endif
12479 #ifndef GCC_SCANF
12480 #define GCC_SCANF 0
12481 #endif
12482 #ifndef GCC_NORETURN
12483 #define GCC_NORETURN /* nothing */
12484 #endif
12485 #ifndef GCC_UNUSED
12486 #define GCC_UNUSED /* nothing */
12487 #endif
12488 EOF
12489 if test "$GCC" = yes
12490 then
12491         { echo "$as_me:12491: checking for $CC __attribute__ directives..." >&5
12492 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12493 cat > conftest.$ac_ext <<EOF
12494 #line 12494 "${as_me:-configure}"
12495 #include "confdefs.h"
12496 #include "conftest.h"
12497 #include "conftest.i"
12498 #if     GCC_PRINTF
12499 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12500 #else
12501 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12502 #endif
12503 #if     GCC_SCANF
12504 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12505 #else
12506 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12507 #endif
12508 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12509 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12510 extern void foo(void) GCC_NORETURN;
12511 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12512 EOF
12513         cf_printf_attribute=no
12514         cf_scanf_attribute=no
12515         for cf_attribute in scanf printf unused noreturn
12516         do
12517
12518 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12519
12520                 cf_directive="__attribute__(($cf_attribute))"
12521                 echo "checking for $CC $cf_directive" 1>&5
12522
12523                 case $cf_attribute in #(vi
12524                 printf) #(vi
12525                         cf_printf_attribute=yes
12526                         cat >conftest.h <<EOF
12527 #define GCC_$cf_ATTRIBUTE 1
12528 EOF
12529                         ;;
12530                 scanf) #(vi
12531                         cf_scanf_attribute=yes
12532                         cat >conftest.h <<EOF
12533 #define GCC_$cf_ATTRIBUTE 1
12534 EOF
12535                         ;;
12536                 *) #(vi
12537                         cat >conftest.h <<EOF
12538 #define GCC_$cf_ATTRIBUTE $cf_directive
12539 EOF
12540                         ;;
12541                 esac
12542
12543                 if { (eval echo "$as_me:12543: \"$ac_compile\"") >&5
12544   (eval $ac_compile) 2>&5
12545   ac_status=$?
12546   echo "$as_me:12546: \$? = $ac_status" >&5
12547   (exit $ac_status); }; then
12548                         test -n "$verbose" && echo "$as_me:12548: result: ... $cf_attribute" >&5
12549 echo "${ECHO_T}... $cf_attribute" >&6
12550                         cat conftest.h >>confdefs.h
12551                         case $cf_attribute in #(vi
12552                         printf) #(vi
12553                                 if test "$cf_printf_attribute" = no ; then
12554                                         cat >>confdefs.h <<EOF
12555 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12556 EOF
12557                                 else
12558                                         cat >>confdefs.h <<EOF
12559 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12560 EOF
12561                                 fi
12562                                 ;;
12563                         scanf) #(vi
12564                                 if test "$cf_scanf_attribute" = no ; then
12565                                         cat >>confdefs.h <<EOF
12566 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12567 EOF
12568                                 else
12569                                         cat >>confdefs.h <<EOF
12570 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12571 EOF
12572                                 fi
12573                                 ;;
12574                         esac
12575                 fi
12576         done
12577 else
12578         fgrep define conftest.i >>confdefs.h
12579 fi
12580 rm -rf conftest*
12581 fi
12582
12583 echo "$as_me:12583: checking if you want to work around bogus compiler/loader warnings" >&5
12584 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12585
12586 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12587 if test "${enable_string_hacks+set}" = set; then
12588   enableval="$enable_string_hacks"
12589   with_string_hacks=$enableval
12590 else
12591   with_string_hacks=no
12592 fi;
12593 echo "$as_me:12593: result: $with_string_hacks" >&5
12594 echo "${ECHO_T}$with_string_hacks" >&6
12595
12596 if test "x$with_string_hacks" = "xyes"; then
12597         cat >>confdefs.h <<\EOF
12598 #define USE_STRING_HACKS 1
12599 EOF
12600
12601         { echo "$as_me:12601: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12602 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12603
12604 for ac_func in strlcat strlcpy snprintf
12605 do
12606 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12607 echo "$as_me:12607: checking for $ac_func" >&5
12608 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12609 if eval "test \"\${$as_ac_var+set}\" = set"; then
12610   echo $ECHO_N "(cached) $ECHO_C" >&6
12611 else
12612   cat >conftest.$ac_ext <<_ACEOF
12613 #line 12613 "configure"
12614 #include "confdefs.h"
12615 /* System header to define __stub macros and hopefully few prototypes,
12616     which can conflict with char $ac_func (); below.  */
12617 #include <assert.h>
12618 /* Override any gcc2 internal prototype to avoid an error.  */
12619 #ifdef __cplusplus
12620 extern "C"
12621 #endif
12622 /* We use char because int might match the return type of a gcc2
12623    builtin and then its argument prototype would still apply.  */
12624 char $ac_func ();
12625 char (*f) ();
12626
12627 int
12628 main ()
12629 {
12630 /* The GNU C library defines this for functions which it implements
12631     to always fail with ENOSYS.  Some functions are actually named
12632     something starting with __ and the normal name is an alias.  */
12633 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12634 choke me
12635 #else
12636 f = $ac_func;
12637 #endif
12638
12639   ;
12640   return 0;
12641 }
12642 _ACEOF
12643 rm -f conftest.$ac_objext conftest$ac_exeext
12644 if { (eval echo "$as_me:12644: \"$ac_link\"") >&5
12645   (eval $ac_link) 2>&5
12646   ac_status=$?
12647   echo "$as_me:12647: \$? = $ac_status" >&5
12648   (exit $ac_status); } &&
12649          { ac_try='test -s conftest$ac_exeext'
12650   { (eval echo "$as_me:12650: \"$ac_try\"") >&5
12651   (eval $ac_try) 2>&5
12652   ac_status=$?
12653   echo "$as_me:12653: \$? = $ac_status" >&5
12654   (exit $ac_status); }; }; then
12655   eval "$as_ac_var=yes"
12656 else
12657   echo "$as_me: failed program was:" >&5
12658 cat conftest.$ac_ext >&5
12659 eval "$as_ac_var=no"
12660 fi
12661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12662 fi
12663 echo "$as_me:12663: result: `eval echo '${'$as_ac_var'}'`" >&5
12664 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12665 if test `eval echo '${'$as_ac_var'}'` = yes; then
12666   cat >>confdefs.h <<EOF
12667 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12668 EOF
12669
12670 fi
12671 done
12672
12673 fi
12674
12675 ###     use option --enable-assertions to turn on generation of assertion code
12676 echo "$as_me:12676: checking if you want to enable runtime assertions" >&5
12677 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12678
12679 # Check whether --enable-assertions or --disable-assertions was given.
12680 if test "${enable_assertions+set}" = set; then
12681   enableval="$enable_assertions"
12682   with_assertions=$enableval
12683 else
12684   with_assertions=no
12685 fi;
12686 echo "$as_me:12686: result: $with_assertions" >&5
12687 echo "${ECHO_T}$with_assertions" >&6
12688 if test -n "$GCC"
12689 then
12690         if test "$with_assertions" = no
12691         then
12692                 cat >>confdefs.h <<\EOF
12693 #define NDEBUG 1
12694 EOF
12695
12696                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12697         else
12698
12699         ADAFLAGS="$ADAFLAGS -gnata"
12700
12701         fi
12702 fi
12703
12704 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12705
12706 echo "$as_me:12706: checking if you want to use dmalloc for testing" >&5
12707 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12708
12709 # Check whether --with-dmalloc or --without-dmalloc was given.
12710 if test "${with_dmalloc+set}" = set; then
12711   withval="$with_dmalloc"
12712   cat >>confdefs.h <<\EOF
12713 #define USE_DMALLOC 1
12714 EOF
12715
12716         : ${with_cflags:=-g}
12717         : ${with_no_leaks:=yes}
12718          with_dmalloc=yes
12719 else
12720   with_dmalloc=
12721 fi;
12722 echo "$as_me:12722: result: ${with_dmalloc:-no}" >&5
12723 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12724
12725 case .$with_cflags in #(vi
12726 .*-g*)
12727         case .$CFLAGS in #(vi
12728         .*-g*) #(vi
12729                 ;;
12730         *)
12731
12732 cf_fix_cppflags=no
12733 cf_new_cflags=
12734 cf_new_cppflags=
12735 cf_new_extra_cppflags=
12736
12737 for cf_add_cflags in -g
12738 do
12739 case $cf_fix_cppflags in
12740 no)
12741         case $cf_add_cflags in #(vi
12742         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12743                 case $cf_add_cflags in
12744                 -D*)
12745                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12746
12747                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12748                                 && test -z "${cf_tst_cflags}" \
12749                                 && cf_fix_cppflags=yes
12750
12751                         if test $cf_fix_cppflags = yes ; then
12752                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12753                                 continue
12754                         elif test "${cf_tst_cflags}" = "\"'" ; then
12755                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12756                                 continue
12757                         fi
12758                         ;;
12759                 esac
12760                 case "$CPPFLAGS" in
12761                 *$cf_add_cflags) #(vi
12762                         ;;
12763                 *) #(vi
12764                         case $cf_add_cflags in #(vi
12765                         -D*)
12766                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12767
12768 CPPFLAGS=`echo "$CPPFLAGS" | \
12769         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12770                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12771
12772                                 ;;
12773                         esac
12774                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12775                         ;;
12776                 esac
12777                 ;;
12778         *)
12779                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12780                 ;;
12781         esac
12782         ;;
12783 yes)
12784         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12785
12786         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12787
12788         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12789                 && test -z "${cf_tst_cflags}" \
12790                 && cf_fix_cppflags=no
12791         ;;
12792 esac
12793 done
12794
12795 if test -n "$cf_new_cflags" ; then
12796
12797         CFLAGS="$CFLAGS $cf_new_cflags"
12798 fi
12799
12800 if test -n "$cf_new_cppflags" ; then
12801
12802         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12803 fi
12804
12805 if test -n "$cf_new_extra_cppflags" ; then
12806
12807         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12808 fi
12809
12810                 ;;
12811         esac
12812         ;;
12813 esac
12814
12815 if test "$with_dmalloc" = yes ; then
12816         echo "$as_me:12816: checking for dmalloc.h" >&5
12817 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12818 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12819   echo $ECHO_N "(cached) $ECHO_C" >&6
12820 else
12821   cat >conftest.$ac_ext <<_ACEOF
12822 #line 12822 "configure"
12823 #include "confdefs.h"
12824 #include <dmalloc.h>
12825 _ACEOF
12826 if { (eval echo "$as_me:12826: \"$ac_cpp conftest.$ac_ext\"") >&5
12827   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12828   ac_status=$?
12829   egrep -v '^ *\+' conftest.er1 >conftest.err
12830   rm -f conftest.er1
12831   cat conftest.err >&5
12832   echo "$as_me:12832: \$? = $ac_status" >&5
12833   (exit $ac_status); } >/dev/null; then
12834   if test -s conftest.err; then
12835     ac_cpp_err=$ac_c_preproc_warn_flag
12836   else
12837     ac_cpp_err=
12838   fi
12839 else
12840   ac_cpp_err=yes
12841 fi
12842 if test -z "$ac_cpp_err"; then
12843   ac_cv_header_dmalloc_h=yes
12844 else
12845   echo "$as_me: failed program was:" >&5
12846   cat conftest.$ac_ext >&5
12847   ac_cv_header_dmalloc_h=no
12848 fi
12849 rm -f conftest.err conftest.$ac_ext
12850 fi
12851 echo "$as_me:12851: result: $ac_cv_header_dmalloc_h" >&5
12852 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12853 if test $ac_cv_header_dmalloc_h = yes; then
12854
12855 echo "$as_me:12855: checking for dmalloc_debug in -ldmalloc" >&5
12856 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12857 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12858   echo $ECHO_N "(cached) $ECHO_C" >&6
12859 else
12860   ac_check_lib_save_LIBS=$LIBS
12861 LIBS="-ldmalloc  $LIBS"
12862 cat >conftest.$ac_ext <<_ACEOF
12863 #line 12863 "configure"
12864 #include "confdefs.h"
12865
12866 /* Override any gcc2 internal prototype to avoid an error.  */
12867 #ifdef __cplusplus
12868 extern "C"
12869 #endif
12870 /* We use char because int might match the return type of a gcc2
12871    builtin and then its argument prototype would still apply.  */
12872 char dmalloc_debug ();
12873 int
12874 main ()
12875 {
12876 dmalloc_debug ();
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 rm -f conftest.$ac_objext conftest$ac_exeext
12882 if { (eval echo "$as_me:12882: \"$ac_link\"") >&5
12883   (eval $ac_link) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); } &&
12887          { ac_try='test -s conftest$ac_exeext'
12888   { (eval echo "$as_me:12888: \"$ac_try\"") >&5
12889   (eval $ac_try) 2>&5
12890   ac_status=$?
12891   echo "$as_me:12891: \$? = $ac_status" >&5
12892   (exit $ac_status); }; }; then
12893   ac_cv_lib_dmalloc_dmalloc_debug=yes
12894 else
12895   echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 ac_cv_lib_dmalloc_dmalloc_debug=no
12898 fi
12899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12900 LIBS=$ac_check_lib_save_LIBS
12901 fi
12902 echo "$as_me:12902: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12903 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12904 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12905   cat >>confdefs.h <<EOF
12906 #define HAVE_LIBDMALLOC 1
12907 EOF
12908
12909   LIBS="-ldmalloc $LIBS"
12910
12911 fi
12912
12913 fi
12914
12915 fi
12916
12917 echo "$as_me:12917: checking if you want to use dbmalloc for testing" >&5
12918 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12919
12920 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12921 if test "${with_dbmalloc+set}" = set; then
12922   withval="$with_dbmalloc"
12923   cat >>confdefs.h <<\EOF
12924 #define USE_DBMALLOC 1
12925 EOF
12926
12927         : ${with_cflags:=-g}
12928         : ${with_no_leaks:=yes}
12929          with_dbmalloc=yes
12930 else
12931   with_dbmalloc=
12932 fi;
12933 echo "$as_me:12933: result: ${with_dbmalloc:-no}" >&5
12934 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12935
12936 case .$with_cflags in #(vi
12937 .*-g*)
12938         case .$CFLAGS in #(vi
12939         .*-g*) #(vi
12940                 ;;
12941         *)
12942
12943 cf_fix_cppflags=no
12944 cf_new_cflags=
12945 cf_new_cppflags=
12946 cf_new_extra_cppflags=
12947
12948 for cf_add_cflags in -g
12949 do
12950 case $cf_fix_cppflags in
12951 no)
12952         case $cf_add_cflags in #(vi
12953         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12954                 case $cf_add_cflags in
12955                 -D*)
12956                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12957
12958                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12959                                 && test -z "${cf_tst_cflags}" \
12960                                 && cf_fix_cppflags=yes
12961
12962                         if test $cf_fix_cppflags = yes ; then
12963                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12964                                 continue
12965                         elif test "${cf_tst_cflags}" = "\"'" ; then
12966                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12967                                 continue
12968                         fi
12969                         ;;
12970                 esac
12971                 case "$CPPFLAGS" in
12972                 *$cf_add_cflags) #(vi
12973                         ;;
12974                 *) #(vi
12975                         case $cf_add_cflags in #(vi
12976                         -D*)
12977                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12978
12979 CPPFLAGS=`echo "$CPPFLAGS" | \
12980         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12981                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12982
12983                                 ;;
12984                         esac
12985                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12986                         ;;
12987                 esac
12988                 ;;
12989         *)
12990                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12991                 ;;
12992         esac
12993         ;;
12994 yes)
12995         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12996
12997         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12998
12999         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13000                 && test -z "${cf_tst_cflags}" \
13001                 && cf_fix_cppflags=no
13002         ;;
13003 esac
13004 done
13005
13006 if test -n "$cf_new_cflags" ; then
13007
13008         CFLAGS="$CFLAGS $cf_new_cflags"
13009 fi
13010
13011 if test -n "$cf_new_cppflags" ; then
13012
13013         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13014 fi
13015
13016 if test -n "$cf_new_extra_cppflags" ; then
13017
13018         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13019 fi
13020
13021                 ;;
13022         esac
13023         ;;
13024 esac
13025
13026 if test "$with_dbmalloc" = yes ; then
13027         echo "$as_me:13027: checking for dbmalloc.h" >&5
13028 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13029 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13030   echo $ECHO_N "(cached) $ECHO_C" >&6
13031 else
13032   cat >conftest.$ac_ext <<_ACEOF
13033 #line 13033 "configure"
13034 #include "confdefs.h"
13035 #include <dbmalloc.h>
13036 _ACEOF
13037 if { (eval echo "$as_me:13037: \"$ac_cpp conftest.$ac_ext\"") >&5
13038   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13039   ac_status=$?
13040   egrep -v '^ *\+' conftest.er1 >conftest.err
13041   rm -f conftest.er1
13042   cat conftest.err >&5
13043   echo "$as_me:13043: \$? = $ac_status" >&5
13044   (exit $ac_status); } >/dev/null; then
13045   if test -s conftest.err; then
13046     ac_cpp_err=$ac_c_preproc_warn_flag
13047   else
13048     ac_cpp_err=
13049   fi
13050 else
13051   ac_cpp_err=yes
13052 fi
13053 if test -z "$ac_cpp_err"; then
13054   ac_cv_header_dbmalloc_h=yes
13055 else
13056   echo "$as_me: failed program was:" >&5
13057   cat conftest.$ac_ext >&5
13058   ac_cv_header_dbmalloc_h=no
13059 fi
13060 rm -f conftest.err conftest.$ac_ext
13061 fi
13062 echo "$as_me:13062: result: $ac_cv_header_dbmalloc_h" >&5
13063 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13064 if test $ac_cv_header_dbmalloc_h = yes; then
13065
13066 echo "$as_me:13066: checking for debug_malloc in -ldbmalloc" >&5
13067 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13068 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13069   echo $ECHO_N "(cached) $ECHO_C" >&6
13070 else
13071   ac_check_lib_save_LIBS=$LIBS
13072 LIBS="-ldbmalloc  $LIBS"
13073 cat >conftest.$ac_ext <<_ACEOF
13074 #line 13074 "configure"
13075 #include "confdefs.h"
13076
13077 /* Override any gcc2 internal prototype to avoid an error.  */
13078 #ifdef __cplusplus
13079 extern "C"
13080 #endif
13081 /* We use char because int might match the return type of a gcc2
13082    builtin and then its argument prototype would still apply.  */
13083 char debug_malloc ();
13084 int
13085 main ()
13086 {
13087 debug_malloc ();
13088   ;
13089   return 0;
13090 }
13091 _ACEOF
13092 rm -f conftest.$ac_objext conftest$ac_exeext
13093 if { (eval echo "$as_me:13093: \"$ac_link\"") >&5
13094   (eval $ac_link) 2>&5
13095   ac_status=$?
13096   echo "$as_me:13096: \$? = $ac_status" >&5
13097   (exit $ac_status); } &&
13098          { ac_try='test -s conftest$ac_exeext'
13099   { (eval echo "$as_me:13099: \"$ac_try\"") >&5
13100   (eval $ac_try) 2>&5
13101   ac_status=$?
13102   echo "$as_me:13102: \$? = $ac_status" >&5
13103   (exit $ac_status); }; }; then
13104   ac_cv_lib_dbmalloc_debug_malloc=yes
13105 else
13106   echo "$as_me: failed program was:" >&5
13107 cat conftest.$ac_ext >&5
13108 ac_cv_lib_dbmalloc_debug_malloc=no
13109 fi
13110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13111 LIBS=$ac_check_lib_save_LIBS
13112 fi
13113 echo "$as_me:13113: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13114 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13115 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13116   cat >>confdefs.h <<EOF
13117 #define HAVE_LIBDBMALLOC 1
13118 EOF
13119
13120   LIBS="-ldbmalloc $LIBS"
13121
13122 fi
13123
13124 fi
13125
13126 fi
13127
13128 echo "$as_me:13128: checking if you want to use valgrind for testing" >&5
13129 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13130
13131 # Check whether --with-valgrind or --without-valgrind was given.
13132 if test "${with_valgrind+set}" = set; then
13133   withval="$with_valgrind"
13134   cat >>confdefs.h <<\EOF
13135 #define USE_VALGRIND 1
13136 EOF
13137
13138         : ${with_cflags:=-g}
13139         : ${with_no_leaks:=yes}
13140          with_valgrind=yes
13141 else
13142   with_valgrind=
13143 fi;
13144 echo "$as_me:13144: result: ${with_valgrind:-no}" >&5
13145 echo "${ECHO_T}${with_valgrind:-no}" >&6
13146
13147 case .$with_cflags in #(vi
13148 .*-g*)
13149         case .$CFLAGS in #(vi
13150         .*-g*) #(vi
13151                 ;;
13152         *)
13153
13154 cf_fix_cppflags=no
13155 cf_new_cflags=
13156 cf_new_cppflags=
13157 cf_new_extra_cppflags=
13158
13159 for cf_add_cflags in -g
13160 do
13161 case $cf_fix_cppflags in
13162 no)
13163         case $cf_add_cflags in #(vi
13164         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13165                 case $cf_add_cflags in
13166                 -D*)
13167                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13168
13169                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13170                                 && test -z "${cf_tst_cflags}" \
13171                                 && cf_fix_cppflags=yes
13172
13173                         if test $cf_fix_cppflags = yes ; then
13174                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13175                                 continue
13176                         elif test "${cf_tst_cflags}" = "\"'" ; then
13177                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13178                                 continue
13179                         fi
13180                         ;;
13181                 esac
13182                 case "$CPPFLAGS" in
13183                 *$cf_add_cflags) #(vi
13184                         ;;
13185                 *) #(vi
13186                         case $cf_add_cflags in #(vi
13187                         -D*)
13188                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13189
13190 CPPFLAGS=`echo "$CPPFLAGS" | \
13191         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13192                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13193
13194                                 ;;
13195                         esac
13196                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13197                         ;;
13198                 esac
13199                 ;;
13200         *)
13201                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13202                 ;;
13203         esac
13204         ;;
13205 yes)
13206         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13207
13208         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13209
13210         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13211                 && test -z "${cf_tst_cflags}" \
13212                 && cf_fix_cppflags=no
13213         ;;
13214 esac
13215 done
13216
13217 if test -n "$cf_new_cflags" ; then
13218
13219         CFLAGS="$CFLAGS $cf_new_cflags"
13220 fi
13221
13222 if test -n "$cf_new_cppflags" ; then
13223
13224         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13225 fi
13226
13227 if test -n "$cf_new_extra_cppflags" ; then
13228
13229         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13230 fi
13231
13232                 ;;
13233         esac
13234         ;;
13235 esac
13236
13237 echo "$as_me:13237: checking if you want to perform memory-leak testing" >&5
13238 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13239
13240 # Check whether --enable-leaks or --disable-leaks was given.
13241 if test "${enable_leaks+set}" = set; then
13242   enableval="$enable_leaks"
13243   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13244 else
13245   : ${with_no_leaks:=no}
13246 fi;
13247 echo "$as_me:13247: result: $with_no_leaks" >&5
13248 echo "${ECHO_T}$with_no_leaks" >&6
13249
13250 if test "$with_no_leaks" = yes ; then
13251         cat >>confdefs.h <<\EOF
13252 #define NO_LEAKS 1
13253 EOF
13254
13255         cat >>confdefs.h <<\EOF
13256 #define YY_NO_LEAKS 1
13257 EOF
13258
13259 fi
13260
13261 cat >>confdefs.h <<\EOF
13262 #define HAVE_NC_ALLOC_H 1
13263 EOF
13264
13265 ###     use option --enable-expanded to generate certain macros as functions
13266
13267 # Check whether --enable-expanded or --disable-expanded was given.
13268 if test "${enable_expanded+set}" = set; then
13269   enableval="$enable_expanded"
13270   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13271 #define NCURSES_EXPANDED 1
13272 EOF
13273
13274 fi;
13275
13276 ###     use option --disable-macros to suppress macros in favor of functions
13277
13278 # Check whether --enable-macros or --disable-macros was given.
13279 if test "${enable_macros+set}" = set; then
13280   enableval="$enable_macros"
13281   test "$enableval" = no && cat >>confdefs.h <<\EOF
13282 #define NCURSES_NOMACROS 1
13283 EOF
13284
13285 fi;
13286
13287 # Normally we only add trace() to the debug-library.  Allow this to be
13288 # extended to all models of the ncurses library:
13289 cf_all_traces=no
13290 case "$CFLAGS $CPPFLAGS" in
13291 *-DTRACE*)
13292         cf_all_traces=yes
13293         ;;
13294 esac
13295
13296 echo "$as_me:13296: checking whether to add trace feature to all models" >&5
13297 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13298
13299 # Check whether --with-trace or --without-trace was given.
13300 if test "${with_trace+set}" = set; then
13301   withval="$with_trace"
13302   cf_with_trace=$withval
13303 else
13304   cf_with_trace=$cf_all_traces
13305 fi;
13306 echo "$as_me:13306: result: $cf_with_trace" >&5
13307 echo "${ECHO_T}$cf_with_trace" >&6
13308
13309 if test "$cf_with_trace" = yes ; then
13310         LIB_TRACING=all
13311         ADA_TRACE=TRUE
13312
13313 cf_fix_cppflags=no
13314 cf_new_cflags=
13315 cf_new_cppflags=
13316 cf_new_extra_cppflags=
13317
13318 for cf_add_cflags in -DTRACE
13319 do
13320 case $cf_fix_cppflags in
13321 no)
13322         case $cf_add_cflags in #(vi
13323         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13324                 case $cf_add_cflags in
13325                 -D*)
13326                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13327
13328                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13329                                 && test -z "${cf_tst_cflags}" \
13330                                 && cf_fix_cppflags=yes
13331
13332                         if test $cf_fix_cppflags = yes ; then
13333                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13334                                 continue
13335                         elif test "${cf_tst_cflags}" = "\"'" ; then
13336                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13337                                 continue
13338                         fi
13339                         ;;
13340                 esac
13341                 case "$CPPFLAGS" in
13342                 *$cf_add_cflags) #(vi
13343                         ;;
13344                 *) #(vi
13345                         case $cf_add_cflags in #(vi
13346                         -D*)
13347                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13348
13349 CPPFLAGS=`echo "$CPPFLAGS" | \
13350         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13351                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13352
13353                                 ;;
13354                         esac
13355                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13356                         ;;
13357                 esac
13358                 ;;
13359         *)
13360                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13361                 ;;
13362         esac
13363         ;;
13364 yes)
13365         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13366
13367         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13368
13369         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13370                 && test -z "${cf_tst_cflags}" \
13371                 && cf_fix_cppflags=no
13372         ;;
13373 esac
13374 done
13375
13376 if test -n "$cf_new_cflags" ; then
13377
13378         CFLAGS="$CFLAGS $cf_new_cflags"
13379 fi
13380
13381 if test -n "$cf_new_cppflags" ; then
13382
13383         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13384 fi
13385
13386 if test -n "$cf_new_extra_cppflags" ; then
13387
13388         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13389 fi
13390
13391 else
13392         LIB_TRACING=DEBUG
13393         ADA_TRACE=FALSE
13394 fi
13395
13396 ###     Checks for libraries.
13397 case $cf_cv_system_name in #(vi
13398 *mingw32*) #(vi
13399         ;;
13400 *)
13401 echo "$as_me:13401: checking for gettimeofday" >&5
13402 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13403 if test "${ac_cv_func_gettimeofday+set}" = set; then
13404   echo $ECHO_N "(cached) $ECHO_C" >&6
13405 else
13406   cat >conftest.$ac_ext <<_ACEOF
13407 #line 13407 "configure"
13408 #include "confdefs.h"
13409 /* System header to define __stub macros and hopefully few prototypes,
13410     which can conflict with char gettimeofday (); below.  */
13411 #include <assert.h>
13412 /* Override any gcc2 internal prototype to avoid an error.  */
13413 #ifdef __cplusplus
13414 extern "C"
13415 #endif
13416 /* We use char because int might match the return type of a gcc2
13417    builtin and then its argument prototype would still apply.  */
13418 char gettimeofday ();
13419 char (*f) ();
13420
13421 int
13422 main ()
13423 {
13424 /* The GNU C library defines this for functions which it implements
13425     to always fail with ENOSYS.  Some functions are actually named
13426     something starting with __ and the normal name is an alias.  */
13427 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13428 choke me
13429 #else
13430 f = gettimeofday;
13431 #endif
13432
13433   ;
13434   return 0;
13435 }
13436 _ACEOF
13437 rm -f conftest.$ac_objext conftest$ac_exeext
13438 if { (eval echo "$as_me:13438: \"$ac_link\"") >&5
13439   (eval $ac_link) 2>&5
13440   ac_status=$?
13441   echo "$as_me:13441: \$? = $ac_status" >&5
13442   (exit $ac_status); } &&
13443          { ac_try='test -s conftest$ac_exeext'
13444   { (eval echo "$as_me:13444: \"$ac_try\"") >&5
13445   (eval $ac_try) 2>&5
13446   ac_status=$?
13447   echo "$as_me:13447: \$? = $ac_status" >&5
13448   (exit $ac_status); }; }; then
13449   ac_cv_func_gettimeofday=yes
13450 else
13451   echo "$as_me: failed program was:" >&5
13452 cat conftest.$ac_ext >&5
13453 ac_cv_func_gettimeofday=no
13454 fi
13455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13456 fi
13457 echo "$as_me:13457: result: $ac_cv_func_gettimeofday" >&5
13458 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13459 if test $ac_cv_func_gettimeofday = yes; then
13460   cat >>confdefs.h <<\EOF
13461 #define HAVE_GETTIMEOFDAY 1
13462 EOF
13463
13464 else
13465
13466 echo "$as_me:13466: checking for gettimeofday in -lbsd" >&5
13467 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13468 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13469   echo $ECHO_N "(cached) $ECHO_C" >&6
13470 else
13471   ac_check_lib_save_LIBS=$LIBS
13472 LIBS="-lbsd  $LIBS"
13473 cat >conftest.$ac_ext <<_ACEOF
13474 #line 13474 "configure"
13475 #include "confdefs.h"
13476
13477 /* Override any gcc2 internal prototype to avoid an error.  */
13478 #ifdef __cplusplus
13479 extern "C"
13480 #endif
13481 /* We use char because int might match the return type of a gcc2
13482    builtin and then its argument prototype would still apply.  */
13483 char gettimeofday ();
13484 int
13485 main ()
13486 {
13487 gettimeofday ();
13488   ;
13489   return 0;
13490 }
13491 _ACEOF
13492 rm -f conftest.$ac_objext conftest$ac_exeext
13493 if { (eval echo "$as_me:13493: \"$ac_link\"") >&5
13494   (eval $ac_link) 2>&5
13495   ac_status=$?
13496   echo "$as_me:13496: \$? = $ac_status" >&5
13497   (exit $ac_status); } &&
13498          { ac_try='test -s conftest$ac_exeext'
13499   { (eval echo "$as_me:13499: \"$ac_try\"") >&5
13500   (eval $ac_try) 2>&5
13501   ac_status=$?
13502   echo "$as_me:13502: \$? = $ac_status" >&5
13503   (exit $ac_status); }; }; then
13504   ac_cv_lib_bsd_gettimeofday=yes
13505 else
13506   echo "$as_me: failed program was:" >&5
13507 cat conftest.$ac_ext >&5
13508 ac_cv_lib_bsd_gettimeofday=no
13509 fi
13510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13511 LIBS=$ac_check_lib_save_LIBS
13512 fi
13513 echo "$as_me:13513: result: $ac_cv_lib_bsd_gettimeofday" >&5
13514 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13515 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13516   cat >>confdefs.h <<\EOF
13517 #define HAVE_GETTIMEOFDAY 1
13518 EOF
13519
13520         LIBS="-lbsd $LIBS"
13521 fi
13522
13523 fi
13524         ;;
13525 esac
13526
13527 echo "$as_me:13527: checking if -lm needed for math functions" >&5
13528 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13529 if test "${cf_cv_need_libm+set}" = set; then
13530   echo $ECHO_N "(cached) $ECHO_C" >&6
13531 else
13532
13533         cat >conftest.$ac_ext <<_ACEOF
13534 #line 13534 "configure"
13535 #include "confdefs.h"
13536
13537         #include <stdio.h>
13538         #include <math.h>
13539
13540 int
13541 main ()
13542 {
13543 double x = rand(); printf("result = %g\n", sin(x))
13544   ;
13545   return 0;
13546 }
13547 _ACEOF
13548 rm -f conftest.$ac_objext conftest$ac_exeext
13549 if { (eval echo "$as_me:13549: \"$ac_link\"") >&5
13550   (eval $ac_link) 2>&5
13551   ac_status=$?
13552   echo "$as_me:13552: \$? = $ac_status" >&5
13553   (exit $ac_status); } &&
13554          { ac_try='test -s conftest$ac_exeext'
13555   { (eval echo "$as_me:13555: \"$ac_try\"") >&5
13556   (eval $ac_try) 2>&5
13557   ac_status=$?
13558   echo "$as_me:13558: \$? = $ac_status" >&5
13559   (exit $ac_status); }; }; then
13560   cf_cv_need_libm=no
13561 else
13562   echo "$as_me: failed program was:" >&5
13563 cat conftest.$ac_ext >&5
13564 cf_cv_need_libm=yes
13565 fi
13566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13567 fi
13568 echo "$as_me:13568: result: $cf_cv_need_libm" >&5
13569 echo "${ECHO_T}$cf_cv_need_libm" >&6
13570 if test "$cf_cv_need_libm" = yes
13571 then
13572 MATH_LIB=-lm
13573 fi
13574
13575 ###     Checks for header files.
13576 echo "$as_me:13576: checking for ANSI C header files" >&5
13577 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13578 if test "${ac_cv_header_stdc+set}" = set; then
13579   echo $ECHO_N "(cached) $ECHO_C" >&6
13580 else
13581   cat >conftest.$ac_ext <<_ACEOF
13582 #line 13582 "configure"
13583 #include "confdefs.h"
13584 #include <stdlib.h>
13585 #include <stdarg.h>
13586 #include <string.h>
13587 #include <float.h>
13588
13589 _ACEOF
13590 if { (eval echo "$as_me:13590: \"$ac_cpp conftest.$ac_ext\"") >&5
13591   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13592   ac_status=$?
13593   egrep -v '^ *\+' conftest.er1 >conftest.err
13594   rm -f conftest.er1
13595   cat conftest.err >&5
13596   echo "$as_me:13596: \$? = $ac_status" >&5
13597   (exit $ac_status); } >/dev/null; then
13598   if test -s conftest.err; then
13599     ac_cpp_err=$ac_c_preproc_warn_flag
13600   else
13601     ac_cpp_err=
13602   fi
13603 else
13604   ac_cpp_err=yes
13605 fi
13606 if test -z "$ac_cpp_err"; then
13607   ac_cv_header_stdc=yes
13608 else
13609   echo "$as_me: failed program was:" >&5
13610   cat conftest.$ac_ext >&5
13611   ac_cv_header_stdc=no
13612 fi
13613 rm -f conftest.err conftest.$ac_ext
13614
13615 if test $ac_cv_header_stdc = yes; then
13616   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13617   cat >conftest.$ac_ext <<_ACEOF
13618 #line 13618 "configure"
13619 #include "confdefs.h"
13620 #include <string.h>
13621
13622 _ACEOF
13623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13624   egrep "memchr" >/dev/null 2>&1; then
13625   :
13626 else
13627   ac_cv_header_stdc=no
13628 fi
13629 rm -rf conftest*
13630
13631 fi
13632
13633 if test $ac_cv_header_stdc = yes; then
13634   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13635   cat >conftest.$ac_ext <<_ACEOF
13636 #line 13636 "configure"
13637 #include "confdefs.h"
13638 #include <stdlib.h>
13639
13640 _ACEOF
13641 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13642   egrep "free" >/dev/null 2>&1; then
13643   :
13644 else
13645   ac_cv_header_stdc=no
13646 fi
13647 rm -rf conftest*
13648
13649 fi
13650
13651 if test $ac_cv_header_stdc = yes; then
13652   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13653   if test "$cross_compiling" = yes; then
13654   :
13655 else
13656   cat >conftest.$ac_ext <<_ACEOF
13657 #line 13657 "configure"
13658 #include "confdefs.h"
13659 #include <ctype.h>
13660 #if ((' ' & 0x0FF) == 0x020)
13661 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13662 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13663 #else
13664 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13665                      || ('j' <= (c) && (c) <= 'r') \
13666                      || ('s' <= (c) && (c) <= 'z'))
13667 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13668 #endif
13669
13670 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13671 int
13672 main ()
13673 {
13674   int i;
13675   for (i = 0; i < 256; i++)
13676     if (XOR (islower (i), ISLOWER (i))
13677         || toupper (i) != TOUPPER (i))
13678       $ac_main_return(2);
13679   $ac_main_return (0);
13680 }
13681 _ACEOF
13682 rm -f conftest$ac_exeext
13683 if { (eval echo "$as_me:13683: \"$ac_link\"") >&5
13684   (eval $ac_link) 2>&5
13685   ac_status=$?
13686   echo "$as_me:13686: \$? = $ac_status" >&5
13687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13688   { (eval echo "$as_me:13688: \"$ac_try\"") >&5
13689   (eval $ac_try) 2>&5
13690   ac_status=$?
13691   echo "$as_me:13691: \$? = $ac_status" >&5
13692   (exit $ac_status); }; }; then
13693   :
13694 else
13695   echo "$as_me: program exited with status $ac_status" >&5
13696 echo "$as_me: failed program was:" >&5
13697 cat conftest.$ac_ext >&5
13698 ac_cv_header_stdc=no
13699 fi
13700 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13701 fi
13702 fi
13703 fi
13704 echo "$as_me:13704: result: $ac_cv_header_stdc" >&5
13705 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13706 if test $ac_cv_header_stdc = yes; then
13707
13708 cat >>confdefs.h <<\EOF
13709 #define STDC_HEADERS 1
13710 EOF
13711
13712 fi
13713
13714 ac_header_dirent=no
13715 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13716   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13717 echo "$as_me:13717: checking for $ac_hdr that defines DIR" >&5
13718 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13719 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13720   echo $ECHO_N "(cached) $ECHO_C" >&6
13721 else
13722   cat >conftest.$ac_ext <<_ACEOF
13723 #line 13723 "configure"
13724 #include "confdefs.h"
13725 #include <sys/types.h>
13726 #include <$ac_hdr>
13727
13728 int
13729 main ()
13730 {
13731 if ((DIR *) 0)
13732 return 0;
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 rm -f conftest.$ac_objext
13738 if { (eval echo "$as_me:13738: \"$ac_compile\"") >&5
13739   (eval $ac_compile) 2>&5
13740   ac_status=$?
13741   echo "$as_me:13741: \$? = $ac_status" >&5
13742   (exit $ac_status); } &&
13743          { ac_try='test -s conftest.$ac_objext'
13744   { (eval echo "$as_me:13744: \"$ac_try\"") >&5
13745   (eval $ac_try) 2>&5
13746   ac_status=$?
13747   echo "$as_me:13747: \$? = $ac_status" >&5
13748   (exit $ac_status); }; }; then
13749   eval "$as_ac_Header=yes"
13750 else
13751   echo "$as_me: failed program was:" >&5
13752 cat conftest.$ac_ext >&5
13753 eval "$as_ac_Header=no"
13754 fi
13755 rm -f conftest.$ac_objext conftest.$ac_ext
13756 fi
13757 echo "$as_me:13757: result: `eval echo '${'$as_ac_Header'}'`" >&5
13758 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13759 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13760   cat >>confdefs.h <<EOF
13761 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13762 EOF
13763
13764 ac_header_dirent=$ac_hdr; break
13765 fi
13766
13767 done
13768 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13769 if test $ac_header_dirent = dirent.h; then
13770   echo "$as_me:13770: checking for opendir in -ldir" >&5
13771 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13772 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13773   echo $ECHO_N "(cached) $ECHO_C" >&6
13774 else
13775   ac_check_lib_save_LIBS=$LIBS
13776 LIBS="-ldir  $LIBS"
13777 cat >conftest.$ac_ext <<_ACEOF
13778 #line 13778 "configure"
13779 #include "confdefs.h"
13780
13781 /* Override any gcc2 internal prototype to avoid an error.  */
13782 #ifdef __cplusplus
13783 extern "C"
13784 #endif
13785 /* We use char because int might match the return type of a gcc2
13786    builtin and then its argument prototype would still apply.  */
13787 char opendir ();
13788 int
13789 main ()
13790 {
13791 opendir ();
13792   ;
13793   return 0;
13794 }
13795 _ACEOF
13796 rm -f conftest.$ac_objext conftest$ac_exeext
13797 if { (eval echo "$as_me:13797: \"$ac_link\"") >&5
13798   (eval $ac_link) 2>&5
13799   ac_status=$?
13800   echo "$as_me:13800: \$? = $ac_status" >&5
13801   (exit $ac_status); } &&
13802          { ac_try='test -s conftest$ac_exeext'
13803   { (eval echo "$as_me:13803: \"$ac_try\"") >&5
13804   (eval $ac_try) 2>&5
13805   ac_status=$?
13806   echo "$as_me:13806: \$? = $ac_status" >&5
13807   (exit $ac_status); }; }; then
13808   ac_cv_lib_dir_opendir=yes
13809 else
13810   echo "$as_me: failed program was:" >&5
13811 cat conftest.$ac_ext >&5
13812 ac_cv_lib_dir_opendir=no
13813 fi
13814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13815 LIBS=$ac_check_lib_save_LIBS
13816 fi
13817 echo "$as_me:13817: result: $ac_cv_lib_dir_opendir" >&5
13818 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13819 if test $ac_cv_lib_dir_opendir = yes; then
13820   LIBS="$LIBS -ldir"
13821 fi
13822
13823 else
13824   echo "$as_me:13824: checking for opendir in -lx" >&5
13825 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13826 if test "${ac_cv_lib_x_opendir+set}" = set; then
13827   echo $ECHO_N "(cached) $ECHO_C" >&6
13828 else
13829   ac_check_lib_save_LIBS=$LIBS
13830 LIBS="-lx  $LIBS"
13831 cat >conftest.$ac_ext <<_ACEOF
13832 #line 13832 "configure"
13833 #include "confdefs.h"
13834
13835 /* Override any gcc2 internal prototype to avoid an error.  */
13836 #ifdef __cplusplus
13837 extern "C"
13838 #endif
13839 /* We use char because int might match the return type of a gcc2
13840    builtin and then its argument prototype would still apply.  */
13841 char opendir ();
13842 int
13843 main ()
13844 {
13845 opendir ();
13846   ;
13847   return 0;
13848 }
13849 _ACEOF
13850 rm -f conftest.$ac_objext conftest$ac_exeext
13851 if { (eval echo "$as_me:13851: \"$ac_link\"") >&5
13852   (eval $ac_link) 2>&5
13853   ac_status=$?
13854   echo "$as_me:13854: \$? = $ac_status" >&5
13855   (exit $ac_status); } &&
13856          { ac_try='test -s conftest$ac_exeext'
13857   { (eval echo "$as_me:13857: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:13860: \$? = $ac_status" >&5
13861   (exit $ac_status); }; }; then
13862   ac_cv_lib_x_opendir=yes
13863 else
13864   echo "$as_me: failed program was:" >&5
13865 cat conftest.$ac_ext >&5
13866 ac_cv_lib_x_opendir=no
13867 fi
13868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13869 LIBS=$ac_check_lib_save_LIBS
13870 fi
13871 echo "$as_me:13871: result: $ac_cv_lib_x_opendir" >&5
13872 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13873 if test $ac_cv_lib_x_opendir = yes; then
13874   LIBS="$LIBS -lx"
13875 fi
13876
13877 fi
13878
13879 echo "$as_me:13879: checking whether time.h and sys/time.h may both be included" >&5
13880 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13881 if test "${ac_cv_header_time+set}" = set; then
13882   echo $ECHO_N "(cached) $ECHO_C" >&6
13883 else
13884   cat >conftest.$ac_ext <<_ACEOF
13885 #line 13885 "configure"
13886 #include "confdefs.h"
13887 #include <sys/types.h>
13888 #include <sys/time.h>
13889 #include <time.h>
13890
13891 int
13892 main ()
13893 {
13894 if ((struct tm *) 0)
13895 return 0;
13896   ;
13897   return 0;
13898 }
13899 _ACEOF
13900 rm -f conftest.$ac_objext
13901 if { (eval echo "$as_me:13901: \"$ac_compile\"") >&5
13902   (eval $ac_compile) 2>&5
13903   ac_status=$?
13904   echo "$as_me:13904: \$? = $ac_status" >&5
13905   (exit $ac_status); } &&
13906          { ac_try='test -s conftest.$ac_objext'
13907   { (eval echo "$as_me:13907: \"$ac_try\"") >&5
13908   (eval $ac_try) 2>&5
13909   ac_status=$?
13910   echo "$as_me:13910: \$? = $ac_status" >&5
13911   (exit $ac_status); }; }; then
13912   ac_cv_header_time=yes
13913 else
13914   echo "$as_me: failed program was:" >&5
13915 cat conftest.$ac_ext >&5
13916 ac_cv_header_time=no
13917 fi
13918 rm -f conftest.$ac_objext conftest.$ac_ext
13919 fi
13920 echo "$as_me:13920: result: $ac_cv_header_time" >&5
13921 echo "${ECHO_T}$ac_cv_header_time" >&6
13922 if test $ac_cv_header_time = yes; then
13923
13924 cat >>confdefs.h <<\EOF
13925 #define TIME_WITH_SYS_TIME 1
13926 EOF
13927
13928 fi
13929
13930 cf_regex_func=no
13931
13932 cf_regex_libs="regex re"
13933 case $host_os in #(vi
13934 mingw*)
13935         cf_regex_libs="gnurx $cf_regex_libs"
13936         ;;
13937 esac
13938
13939 echo "$as_me:13939: checking for regcomp" >&5
13940 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13941 if test "${ac_cv_func_regcomp+set}" = set; then
13942   echo $ECHO_N "(cached) $ECHO_C" >&6
13943 else
13944   cat >conftest.$ac_ext <<_ACEOF
13945 #line 13945 "configure"
13946 #include "confdefs.h"
13947 /* System header to define __stub macros and hopefully few prototypes,
13948     which can conflict with char regcomp (); below.  */
13949 #include <assert.h>
13950 /* Override any gcc2 internal prototype to avoid an error.  */
13951 #ifdef __cplusplus
13952 extern "C"
13953 #endif
13954 /* We use char because int might match the return type of a gcc2
13955    builtin and then its argument prototype would still apply.  */
13956 char regcomp ();
13957 char (*f) ();
13958
13959 int
13960 main ()
13961 {
13962 /* The GNU C library defines this for functions which it implements
13963     to always fail with ENOSYS.  Some functions are actually named
13964     something starting with __ and the normal name is an alias.  */
13965 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13966 choke me
13967 #else
13968 f = regcomp;
13969 #endif
13970
13971   ;
13972   return 0;
13973 }
13974 _ACEOF
13975 rm -f conftest.$ac_objext conftest$ac_exeext
13976 if { (eval echo "$as_me:13976: \"$ac_link\"") >&5
13977   (eval $ac_link) 2>&5
13978   ac_status=$?
13979   echo "$as_me:13979: \$? = $ac_status" >&5
13980   (exit $ac_status); } &&
13981          { ac_try='test -s conftest$ac_exeext'
13982   { (eval echo "$as_me:13982: \"$ac_try\"") >&5
13983   (eval $ac_try) 2>&5
13984   ac_status=$?
13985   echo "$as_me:13985: \$? = $ac_status" >&5
13986   (exit $ac_status); }; }; then
13987   ac_cv_func_regcomp=yes
13988 else
13989   echo "$as_me: failed program was:" >&5
13990 cat conftest.$ac_ext >&5
13991 ac_cv_func_regcomp=no
13992 fi
13993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13994 fi
13995 echo "$as_me:13995: result: $ac_cv_func_regcomp" >&5
13996 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13997 if test $ac_cv_func_regcomp = yes; then
13998   cf_regex_func=regcomp
13999 else
14000
14001         for cf_regex_lib in $cf_regex_libs
14002         do
14003                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14004 echo "$as_me:14004: checking for regcomp in -l$cf_regex_lib" >&5
14005 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14006 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14007   echo $ECHO_N "(cached) $ECHO_C" >&6
14008 else
14009   ac_check_lib_save_LIBS=$LIBS
14010 LIBS="-l$cf_regex_lib  $LIBS"
14011 cat >conftest.$ac_ext <<_ACEOF
14012 #line 14012 "configure"
14013 #include "confdefs.h"
14014
14015 /* Override any gcc2 internal prototype to avoid an error.  */
14016 #ifdef __cplusplus
14017 extern "C"
14018 #endif
14019 /* We use char because int might match the return type of a gcc2
14020    builtin and then its argument prototype would still apply.  */
14021 char regcomp ();
14022 int
14023 main ()
14024 {
14025 regcomp ();
14026   ;
14027   return 0;
14028 }
14029 _ACEOF
14030 rm -f conftest.$ac_objext conftest$ac_exeext
14031 if { (eval echo "$as_me:14031: \"$ac_link\"") >&5
14032   (eval $ac_link) 2>&5
14033   ac_status=$?
14034   echo "$as_me:14034: \$? = $ac_status" >&5
14035   (exit $ac_status); } &&
14036          { ac_try='test -s conftest$ac_exeext'
14037   { (eval echo "$as_me:14037: \"$ac_try\"") >&5
14038   (eval $ac_try) 2>&5
14039   ac_status=$?
14040   echo "$as_me:14040: \$? = $ac_status" >&5
14041   (exit $ac_status); }; }; then
14042   eval "$as_ac_Lib=yes"
14043 else
14044   echo "$as_me: failed program was:" >&5
14045 cat conftest.$ac_ext >&5
14046 eval "$as_ac_Lib=no"
14047 fi
14048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14049 LIBS=$ac_check_lib_save_LIBS
14050 fi
14051 echo "$as_me:14051: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14052 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14053 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14054
14055                                 LIBS="-l$cf_regex_lib $LIBS"
14056                                 cf_regex_func=regcomp
14057                                 break
14058 fi
14059
14060         done
14061
14062 fi
14063
14064 if test "$cf_regex_func" = no ; then
14065         echo "$as_me:14065: checking for compile" >&5
14066 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14067 if test "${ac_cv_func_compile+set}" = set; then
14068   echo $ECHO_N "(cached) $ECHO_C" >&6
14069 else
14070   cat >conftest.$ac_ext <<_ACEOF
14071 #line 14071 "configure"
14072 #include "confdefs.h"
14073 /* System header to define __stub macros and hopefully few prototypes,
14074     which can conflict with char compile (); below.  */
14075 #include <assert.h>
14076 /* Override any gcc2 internal prototype to avoid an error.  */
14077 #ifdef __cplusplus
14078 extern "C"
14079 #endif
14080 /* We use char because int might match the return type of a gcc2
14081    builtin and then its argument prototype would still apply.  */
14082 char compile ();
14083 char (*f) ();
14084
14085 int
14086 main ()
14087 {
14088 /* The GNU C library defines this for functions which it implements
14089     to always fail with ENOSYS.  Some functions are actually named
14090     something starting with __ and the normal name is an alias.  */
14091 #if defined (__stub_compile) || defined (__stub___compile)
14092 choke me
14093 #else
14094 f = compile;
14095 #endif
14096
14097   ;
14098   return 0;
14099 }
14100 _ACEOF
14101 rm -f conftest.$ac_objext conftest$ac_exeext
14102 if { (eval echo "$as_me:14102: \"$ac_link\"") >&5
14103   (eval $ac_link) 2>&5
14104   ac_status=$?
14105   echo "$as_me:14105: \$? = $ac_status" >&5
14106   (exit $ac_status); } &&
14107          { ac_try='test -s conftest$ac_exeext'
14108   { (eval echo "$as_me:14108: \"$ac_try\"") >&5
14109   (eval $ac_try) 2>&5
14110   ac_status=$?
14111   echo "$as_me:14111: \$? = $ac_status" >&5
14112   (exit $ac_status); }; }; then
14113   ac_cv_func_compile=yes
14114 else
14115   echo "$as_me: failed program was:" >&5
14116 cat conftest.$ac_ext >&5
14117 ac_cv_func_compile=no
14118 fi
14119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14120 fi
14121 echo "$as_me:14121: result: $ac_cv_func_compile" >&5
14122 echo "${ECHO_T}$ac_cv_func_compile" >&6
14123 if test $ac_cv_func_compile = yes; then
14124   cf_regex_func=compile
14125 else
14126
14127                 echo "$as_me:14127: checking for compile in -lgen" >&5
14128 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14129 if test "${ac_cv_lib_gen_compile+set}" = set; then
14130   echo $ECHO_N "(cached) $ECHO_C" >&6
14131 else
14132   ac_check_lib_save_LIBS=$LIBS
14133 LIBS="-lgen  $LIBS"
14134 cat >conftest.$ac_ext <<_ACEOF
14135 #line 14135 "configure"
14136 #include "confdefs.h"
14137
14138 /* Override any gcc2 internal prototype to avoid an error.  */
14139 #ifdef __cplusplus
14140 extern "C"
14141 #endif
14142 /* We use char because int might match the return type of a gcc2
14143    builtin and then its argument prototype would still apply.  */
14144 char compile ();
14145 int
14146 main ()
14147 {
14148 compile ();
14149   ;
14150   return 0;
14151 }
14152 _ACEOF
14153 rm -f conftest.$ac_objext conftest$ac_exeext
14154 if { (eval echo "$as_me:14154: \"$ac_link\"") >&5
14155   (eval $ac_link) 2>&5
14156   ac_status=$?
14157   echo "$as_me:14157: \$? = $ac_status" >&5
14158   (exit $ac_status); } &&
14159          { ac_try='test -s conftest$ac_exeext'
14160   { (eval echo "$as_me:14160: \"$ac_try\"") >&5
14161   (eval $ac_try) 2>&5
14162   ac_status=$?
14163   echo "$as_me:14163: \$? = $ac_status" >&5
14164   (exit $ac_status); }; }; then
14165   ac_cv_lib_gen_compile=yes
14166 else
14167   echo "$as_me: failed program was:" >&5
14168 cat conftest.$ac_ext >&5
14169 ac_cv_lib_gen_compile=no
14170 fi
14171 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14172 LIBS=$ac_check_lib_save_LIBS
14173 fi
14174 echo "$as_me:14174: result: $ac_cv_lib_gen_compile" >&5
14175 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14176 if test $ac_cv_lib_gen_compile = yes; then
14177
14178                                 LIBS="-lgen $LIBS"
14179                                 cf_regex_func=compile
14180 fi
14181
14182 fi
14183
14184 fi
14185
14186 if test "$cf_regex_func" = no ; then
14187         { echo "$as_me:14187: WARNING: cannot find regular expression library" >&5
14188 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14189 fi
14190
14191 echo "$as_me:14191: checking for regular-expression headers" >&5
14192 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14193 if test "${cf_cv_regex_hdrs+set}" = set; then
14194   echo $ECHO_N "(cached) $ECHO_C" >&6
14195 else
14196
14197 cf_cv_regex_hdrs=no
14198 case $cf_regex_func in #(vi
14199 compile) #(vi
14200         for cf_regex_hdr in regexp.h regexpr.h
14201         do
14202                 cat >conftest.$ac_ext <<_ACEOF
14203 #line 14203 "configure"
14204 #include "confdefs.h"
14205 #include <$cf_regex_hdr>
14206 int
14207 main ()
14208 {
14209
14210                         char *p = compile("", "", "", 0);
14211                         int x = step("", "");
14212
14213   ;
14214   return 0;
14215 }
14216 _ACEOF
14217 rm -f conftest.$ac_objext conftest$ac_exeext
14218 if { (eval echo "$as_me:14218: \"$ac_link\"") >&5
14219   (eval $ac_link) 2>&5
14220   ac_status=$?
14221   echo "$as_me:14221: \$? = $ac_status" >&5
14222   (exit $ac_status); } &&
14223          { ac_try='test -s conftest$ac_exeext'
14224   { (eval echo "$as_me:14224: \"$ac_try\"") >&5
14225   (eval $ac_try) 2>&5
14226   ac_status=$?
14227   echo "$as_me:14227: \$? = $ac_status" >&5
14228   (exit $ac_status); }; }; then
14229
14230                         cf_cv_regex_hdrs=$cf_regex_hdr
14231                         break
14232
14233 else
14234   echo "$as_me: failed program was:" >&5
14235 cat conftest.$ac_ext >&5
14236 fi
14237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14238         done
14239         ;;
14240 *)
14241         for cf_regex_hdr in regex.h
14242         do
14243                 cat >conftest.$ac_ext <<_ACEOF
14244 #line 14244 "configure"
14245 #include "confdefs.h"
14246 #include <sys/types.h>
14247 #include <$cf_regex_hdr>
14248 int
14249 main ()
14250 {
14251
14252                         regex_t *p;
14253                         int x = regcomp(p, "", 0);
14254                         int y = regexec(p, "", 0, 0, 0);
14255                         regfree(p);
14256
14257   ;
14258   return 0;
14259 }
14260 _ACEOF
14261 rm -f conftest.$ac_objext conftest$ac_exeext
14262 if { (eval echo "$as_me:14262: \"$ac_link\"") >&5
14263   (eval $ac_link) 2>&5
14264   ac_status=$?
14265   echo "$as_me:14265: \$? = $ac_status" >&5
14266   (exit $ac_status); } &&
14267          { ac_try='test -s conftest$ac_exeext'
14268   { (eval echo "$as_me:14268: \"$ac_try\"") >&5
14269   (eval $ac_try) 2>&5
14270   ac_status=$?
14271   echo "$as_me:14271: \$? = $ac_status" >&5
14272   (exit $ac_status); }; }; then
14273
14274                         cf_cv_regex_hdrs=$cf_regex_hdr
14275                         break
14276
14277 else
14278   echo "$as_me: failed program was:" >&5
14279 cat conftest.$ac_ext >&5
14280 fi
14281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14282         done
14283         ;;
14284 esac
14285
14286 fi
14287 echo "$as_me:14287: result: $cf_cv_regex_hdrs" >&5
14288 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14289
14290 case $cf_cv_regex_hdrs in #(vi
14291     no)        { echo "$as_me:14291: WARNING: no regular expression header found" >&5
14292 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14293     regex.h)   cat >>confdefs.h <<\EOF
14294 #define HAVE_REGEX_H_FUNCS 1
14295 EOF
14296  ;; #(vi
14297     regexp.h)  cat >>confdefs.h <<\EOF
14298 #define HAVE_REGEXP_H_FUNCS 1
14299 EOF
14300  ;; #(vi
14301     regexpr.h) cat >>confdefs.h <<\EOF
14302 #define HAVE_REGEXPR_H_FUNCS 1
14303 EOF
14304  ;;
14305 esac
14306
14307 for ac_header in \
14308 fcntl.h \
14309 getopt.h \
14310 limits.h \
14311 locale.h \
14312 math.h \
14313 poll.h \
14314 sys/bsdtypes.h \
14315 sys/ioctl.h \
14316 sys/param.h \
14317 sys/poll.h \
14318 sys/select.h \
14319 sys/time.h \
14320 sys/times.h \
14321 ttyent.h \
14322 unistd.h \
14323 wctype.h \
14324
14325 do
14326 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14327 echo "$as_me:14327: checking for $ac_header" >&5
14328 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14329 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14330   echo $ECHO_N "(cached) $ECHO_C" >&6
14331 else
14332   cat >conftest.$ac_ext <<_ACEOF
14333 #line 14333 "configure"
14334 #include "confdefs.h"
14335 #include <$ac_header>
14336 _ACEOF
14337 if { (eval echo "$as_me:14337: \"$ac_cpp conftest.$ac_ext\"") >&5
14338   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14339   ac_status=$?
14340   egrep -v '^ *\+' conftest.er1 >conftest.err
14341   rm -f conftest.er1
14342   cat conftest.err >&5
14343   echo "$as_me:14343: \$? = $ac_status" >&5
14344   (exit $ac_status); } >/dev/null; then
14345   if test -s conftest.err; then
14346     ac_cpp_err=$ac_c_preproc_warn_flag
14347   else
14348     ac_cpp_err=
14349   fi
14350 else
14351   ac_cpp_err=yes
14352 fi
14353 if test -z "$ac_cpp_err"; then
14354   eval "$as_ac_Header=yes"
14355 else
14356   echo "$as_me: failed program was:" >&5
14357   cat conftest.$ac_ext >&5
14358   eval "$as_ac_Header=no"
14359 fi
14360 rm -f conftest.err conftest.$ac_ext
14361 fi
14362 echo "$as_me:14362: result: `eval echo '${'$as_ac_Header'}'`" >&5
14363 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14364 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14365   cat >>confdefs.h <<EOF
14366 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14367 EOF
14368
14369 fi
14370 done
14371
14372 for ac_header in unistd.h getopt.h
14373 do
14374 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14375 echo "$as_me:14375: checking for $ac_header" >&5
14376 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14377 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14378   echo $ECHO_N "(cached) $ECHO_C" >&6
14379 else
14380   cat >conftest.$ac_ext <<_ACEOF
14381 #line 14381 "configure"
14382 #include "confdefs.h"
14383 #include <$ac_header>
14384 _ACEOF
14385 if { (eval echo "$as_me:14385: \"$ac_cpp conftest.$ac_ext\"") >&5
14386   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14387   ac_status=$?
14388   egrep -v '^ *\+' conftest.er1 >conftest.err
14389   rm -f conftest.er1
14390   cat conftest.err >&5
14391   echo "$as_me:14391: \$? = $ac_status" >&5
14392   (exit $ac_status); } >/dev/null; then
14393   if test -s conftest.err; then
14394     ac_cpp_err=$ac_c_preproc_warn_flag
14395   else
14396     ac_cpp_err=
14397   fi
14398 else
14399   ac_cpp_err=yes
14400 fi
14401 if test -z "$ac_cpp_err"; then
14402   eval "$as_ac_Header=yes"
14403 else
14404   echo "$as_me: failed program was:" >&5
14405   cat conftest.$ac_ext >&5
14406   eval "$as_ac_Header=no"
14407 fi
14408 rm -f conftest.err conftest.$ac_ext
14409 fi
14410 echo "$as_me:14410: result: `eval echo '${'$as_ac_Header'}'`" >&5
14411 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14412 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14413   cat >>confdefs.h <<EOF
14414 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14415 EOF
14416
14417 fi
14418 done
14419
14420 echo "$as_me:14420: checking for header declaring getopt variables" >&5
14421 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14422 if test "${cf_cv_getopt_header+set}" = set; then
14423   echo $ECHO_N "(cached) $ECHO_C" >&6
14424 else
14425
14426 cf_cv_getopt_header=none
14427 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14428 do
14429 cat >conftest.$ac_ext <<_ACEOF
14430 #line 14430 "configure"
14431 #include "confdefs.h"
14432
14433 #include <$cf_header>
14434 int
14435 main ()
14436 {
14437 int x = optind; char *y = optarg
14438   ;
14439   return 0;
14440 }
14441 _ACEOF
14442 rm -f conftest.$ac_objext
14443 if { (eval echo "$as_me:14443: \"$ac_compile\"") >&5
14444   (eval $ac_compile) 2>&5
14445   ac_status=$?
14446   echo "$as_me:14446: \$? = $ac_status" >&5
14447   (exit $ac_status); } &&
14448          { ac_try='test -s conftest.$ac_objext'
14449   { (eval echo "$as_me:14449: \"$ac_try\"") >&5
14450   (eval $ac_try) 2>&5
14451   ac_status=$?
14452   echo "$as_me:14452: \$? = $ac_status" >&5
14453   (exit $ac_status); }; }; then
14454   cf_cv_getopt_header=$cf_header
14455  break
14456 else
14457   echo "$as_me: failed program was:" >&5
14458 cat conftest.$ac_ext >&5
14459 fi
14460 rm -f conftest.$ac_objext conftest.$ac_ext
14461 done
14462
14463 fi
14464 echo "$as_me:14464: result: $cf_cv_getopt_header" >&5
14465 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14466 if test $cf_cv_getopt_header != none ; then
14467         cat >>confdefs.h <<\EOF
14468 #define HAVE_GETOPT_HEADER 1
14469 EOF
14470
14471 fi
14472
14473 # check for ISC (this may also define _POSIX_SOURCE)
14474 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14475 if test "$ISC" = yes ; then
14476
14477 echo "$as_me:14477: checking for main in -lcposix" >&5
14478 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14479 if test "${ac_cv_lib_cposix_main+set}" = set; then
14480   echo $ECHO_N "(cached) $ECHO_C" >&6
14481 else
14482   ac_check_lib_save_LIBS=$LIBS
14483 LIBS="-lcposix  $LIBS"
14484 cat >conftest.$ac_ext <<_ACEOF
14485 #line 14485 "configure"
14486 #include "confdefs.h"
14487
14488 int
14489 main ()
14490 {
14491 main ();
14492   ;
14493   return 0;
14494 }
14495 _ACEOF
14496 rm -f conftest.$ac_objext conftest$ac_exeext
14497 if { (eval echo "$as_me:14497: \"$ac_link\"") >&5
14498   (eval $ac_link) 2>&5
14499   ac_status=$?
14500   echo "$as_me:14500: \$? = $ac_status" >&5
14501   (exit $ac_status); } &&
14502          { ac_try='test -s conftest$ac_exeext'
14503   { (eval echo "$as_me:14503: \"$ac_try\"") >&5
14504   (eval $ac_try) 2>&5
14505   ac_status=$?
14506   echo "$as_me:14506: \$? = $ac_status" >&5
14507   (exit $ac_status); }; }; then
14508   ac_cv_lib_cposix_main=yes
14509 else
14510   echo "$as_me: failed program was:" >&5
14511 cat conftest.$ac_ext >&5
14512 ac_cv_lib_cposix_main=no
14513 fi
14514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14515 LIBS=$ac_check_lib_save_LIBS
14516 fi
14517 echo "$as_me:14517: result: $ac_cv_lib_cposix_main" >&5
14518 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14519 if test $ac_cv_lib_cposix_main = yes; then
14520   cat >>confdefs.h <<EOF
14521 #define HAVE_LIBCPOSIX 1
14522 EOF
14523
14524   LIBS="-lcposix $LIBS"
14525
14526 fi
14527
14528         echo "$as_me:14528: checking for bzero in -linet" >&5
14529 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14530 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14531   echo $ECHO_N "(cached) $ECHO_C" >&6
14532 else
14533   ac_check_lib_save_LIBS=$LIBS
14534 LIBS="-linet  $LIBS"
14535 cat >conftest.$ac_ext <<_ACEOF
14536 #line 14536 "configure"
14537 #include "confdefs.h"
14538
14539 /* Override any gcc2 internal prototype to avoid an error.  */
14540 #ifdef __cplusplus
14541 extern "C"
14542 #endif
14543 /* We use char because int might match the return type of a gcc2
14544    builtin and then its argument prototype would still apply.  */
14545 char bzero ();
14546 int
14547 main ()
14548 {
14549 bzero ();
14550   ;
14551   return 0;
14552 }
14553 _ACEOF
14554 rm -f conftest.$ac_objext conftest$ac_exeext
14555 if { (eval echo "$as_me:14555: \"$ac_link\"") >&5
14556   (eval $ac_link) 2>&5
14557   ac_status=$?
14558   echo "$as_me:14558: \$? = $ac_status" >&5
14559   (exit $ac_status); } &&
14560          { ac_try='test -s conftest$ac_exeext'
14561   { (eval echo "$as_me:14561: \"$ac_try\"") >&5
14562   (eval $ac_try) 2>&5
14563   ac_status=$?
14564   echo "$as_me:14564: \$? = $ac_status" >&5
14565   (exit $ac_status); }; }; then
14566   ac_cv_lib_inet_bzero=yes
14567 else
14568   echo "$as_me: failed program was:" >&5
14569 cat conftest.$ac_ext >&5
14570 ac_cv_lib_inet_bzero=no
14571 fi
14572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14573 LIBS=$ac_check_lib_save_LIBS
14574 fi
14575 echo "$as_me:14575: result: $ac_cv_lib_inet_bzero" >&5
14576 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14577 if test $ac_cv_lib_inet_bzero = yes; then
14578   LIBS="-linet $LIBS"
14579 fi
14580 fi
14581
14582 echo "$as_me:14582: checking if sys/time.h works with sys/select.h" >&5
14583 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14584 if test "${cf_cv_sys_time_select+set}" = set; then
14585   echo $ECHO_N "(cached) $ECHO_C" >&6
14586 else
14587
14588 cat >conftest.$ac_ext <<_ACEOF
14589 #line 14589 "configure"
14590 #include "confdefs.h"
14591
14592 #include <sys/types.h>
14593 #ifdef HAVE_SYS_TIME_H
14594 #include <sys/time.h>
14595 #endif
14596 #ifdef HAVE_SYS_SELECT_H
14597 #include <sys/select.h>
14598 #endif
14599
14600 int
14601 main ()
14602 {
14603
14604   ;
14605   return 0;
14606 }
14607 _ACEOF
14608 rm -f conftest.$ac_objext
14609 if { (eval echo "$as_me:14609: \"$ac_compile\"") >&5
14610   (eval $ac_compile) 2>&5
14611   ac_status=$?
14612   echo "$as_me:14612: \$? = $ac_status" >&5
14613   (exit $ac_status); } &&
14614          { ac_try='test -s conftest.$ac_objext'
14615   { (eval echo "$as_me:14615: \"$ac_try\"") >&5
14616   (eval $ac_try) 2>&5
14617   ac_status=$?
14618   echo "$as_me:14618: \$? = $ac_status" >&5
14619   (exit $ac_status); }; }; then
14620   cf_cv_sys_time_select=yes
14621 else
14622   echo "$as_me: failed program was:" >&5
14623 cat conftest.$ac_ext >&5
14624 cf_cv_sys_time_select=no
14625 fi
14626 rm -f conftest.$ac_objext conftest.$ac_ext
14627
14628 fi
14629
14630 echo "$as_me:14630: result: $cf_cv_sys_time_select" >&5
14631 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14632 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14633 #define HAVE_SYS_TIME_SELECT 1
14634 EOF
14635
14636 ###     checks for compiler characteristics
14637 ac_ext=c
14638 ac_cpp='$CPP $CPPFLAGS'
14639 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14640 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14641 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14642 ac_main_return=return
14643
14644 echo "$as_me:14644: checking for $CC option to accept ANSI C" >&5
14645 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14646 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14647   echo $ECHO_N "(cached) $ECHO_C" >&6
14648 else
14649   ac_cv_prog_cc_stdc=no
14650 ac_save_CC=$CC
14651 cat >conftest.$ac_ext <<_ACEOF
14652 #line 14652 "configure"
14653 #include "confdefs.h"
14654 #include <stdarg.h>
14655 #include <stdio.h>
14656 #include <sys/types.h>
14657 #include <sys/stat.h>
14658 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14659 struct buf { int x; };
14660 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14661 static char *e (p, i)
14662      char **p;
14663      int i;
14664 {
14665   return p[i];
14666 }
14667 static char *f (char * (*g) (char **, int), char **p, ...)
14668 {
14669   char *s;
14670   va_list v;
14671   va_start (v,p);
14672   s = g (p, va_arg (v,int));
14673   va_end (v);
14674   return s;
14675 }
14676 int test (int i, double x);
14677 struct s1 {int (*f) (int a);};
14678 struct s2 {int (*f) (double a);};
14679 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14680 int argc;
14681 char **argv;
14682 int
14683 main ()
14684 {
14685 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14686   ;
14687   return 0;
14688 }
14689 _ACEOF
14690 # Don't try gcc -ansi; that turns off useful extensions and
14691 # breaks some systems' header files.
14692 # AIX                   -qlanglvl=ansi
14693 # Ultrix and OSF/1      -std1
14694 # HP-UX 10.20 and later -Ae
14695 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14696 # SVR4                  -Xc -D__EXTENSIONS__
14697 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14698 do
14699   CC="$ac_save_CC $ac_arg"
14700   rm -f conftest.$ac_objext
14701 if { (eval echo "$as_me:14701: \"$ac_compile\"") >&5
14702   (eval $ac_compile) 2>&5
14703   ac_status=$?
14704   echo "$as_me:14704: \$? = $ac_status" >&5
14705   (exit $ac_status); } &&
14706          { ac_try='test -s conftest.$ac_objext'
14707   { (eval echo "$as_me:14707: \"$ac_try\"") >&5
14708   (eval $ac_try) 2>&5
14709   ac_status=$?
14710   echo "$as_me:14710: \$? = $ac_status" >&5
14711   (exit $ac_status); }; }; then
14712   ac_cv_prog_cc_stdc=$ac_arg
14713 break
14714 else
14715   echo "$as_me: failed program was:" >&5
14716 cat conftest.$ac_ext >&5
14717 fi
14718 rm -f conftest.$ac_objext
14719 done
14720 rm -f conftest.$ac_ext conftest.$ac_objext
14721 CC=$ac_save_CC
14722
14723 fi
14724
14725 case "x$ac_cv_prog_cc_stdc" in
14726   x|xno)
14727     echo "$as_me:14727: result: none needed" >&5
14728 echo "${ECHO_T}none needed" >&6 ;;
14729   *)
14730     echo "$as_me:14730: result: $ac_cv_prog_cc_stdc" >&5
14731 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14732     CC="$CC $ac_cv_prog_cc_stdc" ;;
14733 esac
14734
14735 echo "$as_me:14735: checking for an ANSI C-conforming const" >&5
14736 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14737 if test "${ac_cv_c_const+set}" = set; then
14738   echo $ECHO_N "(cached) $ECHO_C" >&6
14739 else
14740   cat >conftest.$ac_ext <<_ACEOF
14741 #line 14741 "configure"
14742 #include "confdefs.h"
14743
14744 int
14745 main ()
14746 {
14747 /* FIXME: Include the comments suggested by Paul. */
14748 #ifndef __cplusplus
14749   /* Ultrix mips cc rejects this.  */
14750   typedef int charset[2];
14751   const charset x;
14752   /* SunOS 4.1.1 cc rejects this.  */
14753   char const *const *ccp;
14754   char **p;
14755   /* NEC SVR4.0.2 mips cc rejects this.  */
14756   struct point {int x, y;};
14757   static struct point const zero = {0,0};
14758   /* AIX XL C 1.02.0.0 rejects this.
14759      It does not let you subtract one const X* pointer from another in
14760      an arm of an if-expression whose if-part is not a constant
14761      expression */
14762   const char *g = "string";
14763   ccp = &g + (g ? g-g : 0);
14764   /* HPUX 7.0 cc rejects these. */
14765   ++ccp;
14766   p = (char**) ccp;
14767   ccp = (char const *const *) p;
14768   { /* SCO 3.2v4 cc rejects this.  */
14769     char *t;
14770     char const *s = 0 ? (char *) 0 : (char const *) 0;
14771
14772     *t++ = 0;
14773   }
14774   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14775     int x[] = {25, 17};
14776     const int *foo = &x[0];
14777     ++foo;
14778   }
14779   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14780     typedef const int *iptr;
14781     iptr p = 0;
14782     ++p;
14783   }
14784   { /* AIX XL C 1.02.0.0 rejects this saying
14785        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14786     struct s { int j; const int *ap[3]; };
14787     struct s *b; b->j = 5;
14788   }
14789   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14790     const int foo = 10;
14791   }
14792 #endif
14793
14794   ;
14795   return 0;
14796 }
14797 _ACEOF
14798 rm -f conftest.$ac_objext
14799 if { (eval echo "$as_me:14799: \"$ac_compile\"") >&5
14800   (eval $ac_compile) 2>&5
14801   ac_status=$?
14802   echo "$as_me:14802: \$? = $ac_status" >&5
14803   (exit $ac_status); } &&
14804          { ac_try='test -s conftest.$ac_objext'
14805   { (eval echo "$as_me:14805: \"$ac_try\"") >&5
14806   (eval $ac_try) 2>&5
14807   ac_status=$?
14808   echo "$as_me:14808: \$? = $ac_status" >&5
14809   (exit $ac_status); }; }; then
14810   ac_cv_c_const=yes
14811 else
14812   echo "$as_me: failed program was:" >&5
14813 cat conftest.$ac_ext >&5
14814 ac_cv_c_const=no
14815 fi
14816 rm -f conftest.$ac_objext conftest.$ac_ext
14817 fi
14818 echo "$as_me:14818: result: $ac_cv_c_const" >&5
14819 echo "${ECHO_T}$ac_cv_c_const" >&6
14820 if test $ac_cv_c_const = no; then
14821
14822 cat >>confdefs.h <<\EOF
14823 #define const
14824 EOF
14825
14826 fi
14827
14828 echo "$as_me:14828: checking for inline" >&5
14829 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14830 if test "${ac_cv_c_inline+set}" = set; then
14831   echo $ECHO_N "(cached) $ECHO_C" >&6
14832 else
14833   ac_cv_c_inline=no
14834 for ac_kw in inline __inline__ __inline; do
14835   cat >conftest.$ac_ext <<_ACEOF
14836 #line 14836 "configure"
14837 #include "confdefs.h"
14838 #ifndef __cplusplus
14839 static $ac_kw int static_foo () {return 0; }
14840 $ac_kw int foo () {return 0; }
14841 #endif
14842
14843 _ACEOF
14844 rm -f conftest.$ac_objext
14845 if { (eval echo "$as_me:14845: \"$ac_compile\"") >&5
14846   (eval $ac_compile) 2>&5
14847   ac_status=$?
14848   echo "$as_me:14848: \$? = $ac_status" >&5
14849   (exit $ac_status); } &&
14850          { ac_try='test -s conftest.$ac_objext'
14851   { (eval echo "$as_me:14851: \"$ac_try\"") >&5
14852   (eval $ac_try) 2>&5
14853   ac_status=$?
14854   echo "$as_me:14854: \$? = $ac_status" >&5
14855   (exit $ac_status); }; }; then
14856   ac_cv_c_inline=$ac_kw; break
14857 else
14858   echo "$as_me: failed program was:" >&5
14859 cat conftest.$ac_ext >&5
14860 fi
14861 rm -f conftest.$ac_objext conftest.$ac_ext
14862 done
14863
14864 fi
14865 echo "$as_me:14865: result: $ac_cv_c_inline" >&5
14866 echo "${ECHO_T}$ac_cv_c_inline" >&6
14867 case $ac_cv_c_inline in
14868   inline | yes) ;;
14869   no)
14870 cat >>confdefs.h <<\EOF
14871 #define inline
14872 EOF
14873  ;;
14874   *)  cat >>confdefs.h <<EOF
14875 #define inline $ac_cv_c_inline
14876 EOF
14877  ;;
14878 esac
14879
14880 NCURSES_INLINE=
14881 if test "$ac_cv_c_inline" != no ; then
14882   NCURSES_INLINE=inline
14883   if test "$INTEL_COMPILER" = yes
14884   then
14885     :
14886   elif test "$GCC" = yes
14887   then
14888     echo "$as_me:14888: checking if $CC supports options to tune inlining" >&5
14889 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14890 if test "${cf_cv_gcc_inline+set}" = set; then
14891   echo $ECHO_N "(cached) $ECHO_C" >&6
14892 else
14893
14894       cf_save_CFLAGS=$CFLAGS
14895       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14896       cat >conftest.$ac_ext <<_ACEOF
14897 #line 14897 "configure"
14898 #include "confdefs.h"
14899 inline int foo(void) { return 1; }
14900 int
14901 main ()
14902 {
14903 ${cf_cv_main_return:-return} foo()
14904   ;
14905   return 0;
14906 }
14907 _ACEOF
14908 rm -f conftest.$ac_objext
14909 if { (eval echo "$as_me:14909: \"$ac_compile\"") >&5
14910   (eval $ac_compile) 2>&5
14911   ac_status=$?
14912   echo "$as_me:14912: \$? = $ac_status" >&5
14913   (exit $ac_status); } &&
14914          { ac_try='test -s conftest.$ac_objext'
14915   { (eval echo "$as_me:14915: \"$ac_try\"") >&5
14916   (eval $ac_try) 2>&5
14917   ac_status=$?
14918   echo "$as_me:14918: \$? = $ac_status" >&5
14919   (exit $ac_status); }; }; then
14920   cf_cv_gcc_inline=yes
14921 else
14922   echo "$as_me: failed program was:" >&5
14923 cat conftest.$ac_ext >&5
14924 cf_cv_gcc_inline=no
14925 fi
14926 rm -f conftest.$ac_objext conftest.$ac_ext
14927       CFLAGS=$cf_save_CFLAGS
14928
14929 fi
14930 echo "$as_me:14930: result: $cf_cv_gcc_inline" >&5
14931 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14932     if test "$cf_cv_gcc_inline" = yes ; then
14933
14934 cf_fix_cppflags=no
14935 cf_new_cflags=
14936 cf_new_cppflags=
14937 cf_new_extra_cppflags=
14938
14939 for cf_add_cflags in --param max-inline-insns-single=1200
14940 do
14941 case $cf_fix_cppflags in
14942 no)
14943         case $cf_add_cflags in #(vi
14944         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14945                 case $cf_add_cflags in
14946                 -D*)
14947                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14948
14949                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14950                                 && test -z "${cf_tst_cflags}" \
14951                                 && cf_fix_cppflags=yes
14952
14953                         if test $cf_fix_cppflags = yes ; then
14954                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14955                                 continue
14956                         elif test "${cf_tst_cflags}" = "\"'" ; then
14957                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14958                                 continue
14959                         fi
14960                         ;;
14961                 esac
14962                 case "$CPPFLAGS" in
14963                 *$cf_add_cflags) #(vi
14964                         ;;
14965                 *) #(vi
14966                         case $cf_add_cflags in #(vi
14967                         -D*)
14968                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14969
14970 CPPFLAGS=`echo "$CPPFLAGS" | \
14971         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14972                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14973
14974                                 ;;
14975                         esac
14976                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14977                         ;;
14978                 esac
14979                 ;;
14980         *)
14981                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14982                 ;;
14983         esac
14984         ;;
14985 yes)
14986         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14987
14988         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14989
14990         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14991                 && test -z "${cf_tst_cflags}" \
14992                 && cf_fix_cppflags=no
14993         ;;
14994 esac
14995 done
14996
14997 if test -n "$cf_new_cflags" ; then
14998
14999         CFLAGS="$CFLAGS $cf_new_cflags"
15000 fi
15001
15002 if test -n "$cf_new_cppflags" ; then
15003
15004         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15005 fi
15006
15007 if test -n "$cf_new_extra_cppflags" ; then
15008
15009         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15010 fi
15011
15012     fi
15013   fi
15014 fi
15015
15016 echo "$as_me:15016: checking for signal global datatype" >&5
15017 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15018 if test "${cf_cv_sig_atomic_t+set}" = set; then
15019   echo $ECHO_N "(cached) $ECHO_C" >&6
15020 else
15021
15022         for cf_type in \
15023                 "volatile sig_atomic_t" \
15024                 "sig_atomic_t" \
15025                 "int"
15026         do
15027         cat >conftest.$ac_ext <<_ACEOF
15028 #line 15028 "configure"
15029 #include "confdefs.h"
15030
15031 #include <sys/types.h>
15032 #include <signal.h>
15033 #include <stdio.h>
15034
15035 extern $cf_type x;
15036 $cf_type x;
15037 static void handler(int sig)
15038 {
15039         x = 5;
15040 }
15041 int
15042 main ()
15043 {
15044 signal(SIGINT, handler);
15045                  x = 1
15046   ;
15047   return 0;
15048 }
15049 _ACEOF
15050 rm -f conftest.$ac_objext
15051 if { (eval echo "$as_me:15051: \"$ac_compile\"") >&5
15052   (eval $ac_compile) 2>&5
15053   ac_status=$?
15054   echo "$as_me:15054: \$? = $ac_status" >&5
15055   (exit $ac_status); } &&
15056          { ac_try='test -s conftest.$ac_objext'
15057   { (eval echo "$as_me:15057: \"$ac_try\"") >&5
15058   (eval $ac_try) 2>&5
15059   ac_status=$?
15060   echo "$as_me:15060: \$? = $ac_status" >&5
15061   (exit $ac_status); }; }; then
15062   cf_cv_sig_atomic_t=$cf_type
15063 else
15064   echo "$as_me: failed program was:" >&5
15065 cat conftest.$ac_ext >&5
15066 cf_cv_sig_atomic_t=no
15067 fi
15068 rm -f conftest.$ac_objext conftest.$ac_ext
15069                 test "$cf_cv_sig_atomic_t" != no && break
15070         done
15071
15072 fi
15073
15074 echo "$as_me:15074: result: $cf_cv_sig_atomic_t" >&5
15075 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15076 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
15077 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15078 EOF
15079
15080 if test $NCURSES_CHTYPE = auto ; then
15081
15082 echo "$as_me:15082: checking for type of chtype" >&5
15083 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15084 if test "${cf_cv_typeof_chtype+set}" = set; then
15085   echo $ECHO_N "(cached) $ECHO_C" >&6
15086 else
15087
15088                 if test "$cross_compiling" = yes; then
15089   cf_cv_typeof_chtype=long
15090 else
15091   cat >conftest.$ac_ext <<_ACEOF
15092 #line 15092 "configure"
15093 #include "confdefs.h"
15094
15095 #define WANT_BITS 31
15096 #include <stdio.h>
15097 int main()
15098 {
15099         FILE *fp = fopen("cf_test.out", "w");
15100         if (fp != 0) {
15101                 char *result = "long";
15102                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15103                         int n;
15104                         unsigned int x, y;
15105                         for (n = 0; n < WANT_BITS; n++) {
15106                                 x = (1 << n);
15107                                 y = (x >> n);
15108                                 if (y != 1 || x == 0) {
15109                                         x = 0;
15110                                         break;
15111                                 }
15112                         }
15113                         /*
15114                          * If x is nonzero, an int is big enough for the bits
15115                          * that we want.
15116                          */
15117                         result = (x != 0) ? "int" : "long";
15118                 }
15119                 fputs(result, fp);
15120                 fclose(fp);
15121         }
15122         ${cf_cv_main_return:-return}(0);
15123 }
15124
15125 _ACEOF
15126 rm -f conftest$ac_exeext
15127 if { (eval echo "$as_me:15127: \"$ac_link\"") >&5
15128   (eval $ac_link) 2>&5
15129   ac_status=$?
15130   echo "$as_me:15130: \$? = $ac_status" >&5
15131   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15132   { (eval echo "$as_me:15132: \"$ac_try\"") >&5
15133   (eval $ac_try) 2>&5
15134   ac_status=$?
15135   echo "$as_me:15135: \$? = $ac_status" >&5
15136   (exit $ac_status); }; }; then
15137   cf_cv_typeof_chtype=`cat cf_test.out`
15138 else
15139   echo "$as_me: program exited with status $ac_status" >&5
15140 echo "$as_me: failed program was:" >&5
15141 cat conftest.$ac_ext >&5
15142 cf_cv_typeof_chtype=long
15143 fi
15144 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15145 fi
15146                 rm -f cf_test.out
15147
15148 fi
15149
15150 echo "$as_me:15150: result: $cf_cv_typeof_chtype" >&5
15151 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15152
15153 cat >>confdefs.h <<EOF
15154 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15155 EOF
15156
15157 else
15158         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15159 fi
15160 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15161
15162 echo "$as_me:15162: checking if unsigned literals are legal" >&5
15163 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15164 if test "${cf_cv_unsigned_literals+set}" = set; then
15165   echo $ECHO_N "(cached) $ECHO_C" >&6
15166 else
15167
15168         cat >conftest.$ac_ext <<_ACEOF
15169 #line 15169 "configure"
15170 #include "confdefs.h"
15171
15172 int
15173 main ()
15174 {
15175 long x = 1L + 1UL + 1U + 1
15176   ;
15177   return 0;
15178 }
15179 _ACEOF
15180 rm -f conftest.$ac_objext
15181 if { (eval echo "$as_me:15181: \"$ac_compile\"") >&5
15182   (eval $ac_compile) 2>&5
15183   ac_status=$?
15184   echo "$as_me:15184: \$? = $ac_status" >&5
15185   (exit $ac_status); } &&
15186          { ac_try='test -s conftest.$ac_objext'
15187   { (eval echo "$as_me:15187: \"$ac_try\"") >&5
15188   (eval $ac_try) 2>&5
15189   ac_status=$?
15190   echo "$as_me:15190: \$? = $ac_status" >&5
15191   (exit $ac_status); }; }; then
15192   cf_cv_unsigned_literals=yes
15193 else
15194   echo "$as_me: failed program was:" >&5
15195 cat conftest.$ac_ext >&5
15196 cf_cv_unsigned_literals=no
15197 fi
15198 rm -f conftest.$ac_objext conftest.$ac_ext
15199
15200 fi
15201
15202 echo "$as_me:15202: result: $cf_cv_unsigned_literals" >&5
15203 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15204
15205 cf_cv_1UL="1"
15206 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15207 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15208
15209 if test $NCURSES_MMASK_T = auto ; then
15210         cf_cv_typeof_mmask_t=long
15211 else
15212         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15213 fi
15214 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15215
15216 ###     Checks for external-data
15217
15218 echo "$as_me:15218: checking if external errno is declared" >&5
15219 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15220 if test "${cf_cv_dcl_errno+set}" = set; then
15221   echo $ECHO_N "(cached) $ECHO_C" >&6
15222 else
15223
15224     cat >conftest.$ac_ext <<_ACEOF
15225 #line 15225 "configure"
15226 #include "confdefs.h"
15227
15228 #ifdef HAVE_STDLIB_H
15229 #include <stdlib.h>
15230 #endif
15231 #include <stdio.h>
15232 #include <sys/types.h>
15233 #include <errno.h>
15234 int
15235 main ()
15236 {
15237 int x = (int) errno
15238   ;
15239   return 0;
15240 }
15241 _ACEOF
15242 rm -f conftest.$ac_objext
15243 if { (eval echo "$as_me:15243: \"$ac_compile\"") >&5
15244   (eval $ac_compile) 2>&5
15245   ac_status=$?
15246   echo "$as_me:15246: \$? = $ac_status" >&5
15247   (exit $ac_status); } &&
15248          { ac_try='test -s conftest.$ac_objext'
15249   { (eval echo "$as_me:15249: \"$ac_try\"") >&5
15250   (eval $ac_try) 2>&5
15251   ac_status=$?
15252   echo "$as_me:15252: \$? = $ac_status" >&5
15253   (exit $ac_status); }; }; then
15254   cf_cv_dcl_errno=yes
15255 else
15256   echo "$as_me: failed program was:" >&5
15257 cat conftest.$ac_ext >&5
15258 cf_cv_dcl_errno=no
15259 fi
15260 rm -f conftest.$ac_objext conftest.$ac_ext
15261
15262 fi
15263 echo "$as_me:15263: result: $cf_cv_dcl_errno" >&5
15264 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15265
15266 if test "$cf_cv_dcl_errno" = no ; then
15267
15268 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15269
15270     cat >>confdefs.h <<EOF
15271 #define $cf_result 1
15272 EOF
15273
15274 fi
15275
15276 # It's possible (for near-UNIX clones) that the data doesn't exist
15277
15278 echo "$as_me:15278: checking if external errno exists" >&5
15279 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15280 if test "${cf_cv_have_errno+set}" = set; then
15281   echo $ECHO_N "(cached) $ECHO_C" >&6
15282 else
15283
15284     cat >conftest.$ac_ext <<_ACEOF
15285 #line 15285 "configure"
15286 #include "confdefs.h"
15287
15288 #undef errno
15289 extern int errno;
15290
15291 int
15292 main ()
15293 {
15294 errno = 2
15295   ;
15296   return 0;
15297 }
15298 _ACEOF
15299 rm -f conftest.$ac_objext conftest$ac_exeext
15300 if { (eval echo "$as_me:15300: \"$ac_link\"") >&5
15301   (eval $ac_link) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); } &&
15305          { ac_try='test -s conftest$ac_exeext'
15306   { (eval echo "$as_me:15306: \"$ac_try\"") >&5
15307   (eval $ac_try) 2>&5
15308   ac_status=$?
15309   echo "$as_me:15309: \$? = $ac_status" >&5
15310   (exit $ac_status); }; }; then
15311   cf_cv_have_errno=yes
15312 else
15313   echo "$as_me: failed program was:" >&5
15314 cat conftest.$ac_ext >&5
15315 cf_cv_have_errno=no
15316 fi
15317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15318
15319 fi
15320 echo "$as_me:15320: result: $cf_cv_have_errno" >&5
15321 echo "${ECHO_T}$cf_cv_have_errno" >&6
15322
15323 if test "$cf_cv_have_errno" = yes ; then
15324
15325 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15326
15327     cat >>confdefs.h <<EOF
15328 #define $cf_result 1
15329 EOF
15330
15331 fi
15332
15333 echo "$as_me:15333: checking if data-only library module links" >&5
15334 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15335 if test "${cf_cv_link_dataonly+set}" = set; then
15336   echo $ECHO_N "(cached) $ECHO_C" >&6
15337 else
15338
15339         rm -f conftest.a
15340         cat >conftest.$ac_ext <<EOF
15341 #line 15341 "configure"
15342 int     testdata[3] = { 123, 456, 789 };
15343 EOF
15344         if { (eval echo "$as_me:15344: \"$ac_compile\"") >&5
15345   (eval $ac_compile) 2>&5
15346   ac_status=$?
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); } ; then
15349                 mv conftest.o data.o && \
15350                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15351         fi
15352         rm -f conftest.$ac_ext data.o
15353         cat >conftest.$ac_ext <<EOF
15354 #line 15354 "configure"
15355 int     testfunc()
15356 {
15357 #if defined(NeXT)
15358         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15359 #else
15360         extern int testdata[3];
15361         return testdata[0] == 123
15362            &&  testdata[1] == 456
15363            &&  testdata[2] == 789;
15364 #endif
15365 }
15366 EOF
15367         if { (eval echo "$as_me:15367: \"$ac_compile\"") >&5
15368   (eval $ac_compile) 2>&5
15369   ac_status=$?
15370   echo "$as_me:15370: \$? = $ac_status" >&5
15371   (exit $ac_status); }; then
15372                 mv conftest.o func.o && \
15373                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15374         fi
15375         rm -f conftest.$ac_ext func.o
15376         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15377         cf_saveLIBS="$LIBS"
15378         LIBS="conftest.a $LIBS"
15379         if test "$cross_compiling" = yes; then
15380   cf_cv_link_dataonly=unknown
15381 else
15382   cat >conftest.$ac_ext <<_ACEOF
15383 #line 15383 "configure"
15384 #include "confdefs.h"
15385
15386         int main()
15387         {
15388                 extern int testfunc();
15389                 ${cf_cv_main_return:-return} (!testfunc());
15390         }
15391
15392 _ACEOF
15393 rm -f conftest$ac_exeext
15394 if { (eval echo "$as_me:15394: \"$ac_link\"") >&5
15395   (eval $ac_link) 2>&5
15396   ac_status=$?
15397   echo "$as_me:15397: \$? = $ac_status" >&5
15398   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15399   { (eval echo "$as_me:15399: \"$ac_try\"") >&5
15400   (eval $ac_try) 2>&5
15401   ac_status=$?
15402   echo "$as_me:15402: \$? = $ac_status" >&5
15403   (exit $ac_status); }; }; then
15404   cf_cv_link_dataonly=yes
15405 else
15406   echo "$as_me: program exited with status $ac_status" >&5
15407 echo "$as_me: failed program was:" >&5
15408 cat conftest.$ac_ext >&5
15409 cf_cv_link_dataonly=no
15410 fi
15411 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15412 fi
15413         LIBS="$cf_saveLIBS"
15414
15415 fi
15416
15417 echo "$as_me:15417: result: $cf_cv_link_dataonly" >&5
15418 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15419
15420 if test "$cf_cv_link_dataonly" = no ; then
15421         cat >>confdefs.h <<\EOF
15422 #define BROKEN_LINKER 1
15423 EOF
15424
15425         BROKEN_LINKER=1
15426 fi
15427
15428 ###     Checks for library functions.
15429
15430 for ac_func in \
15431 getcwd \
15432 getegid \
15433 geteuid \
15434 getttynam \
15435 issetugid \
15436 poll \
15437 remove \
15438 select \
15439 setbuf \
15440 setbuffer \
15441 setvbuf \
15442 sigaction \
15443 sigvec \
15444 strdup \
15445 strstr \
15446 tcgetpgrp \
15447 times \
15448 vsnprintf \
15449
15450 do
15451 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15452 echo "$as_me:15452: checking for $ac_func" >&5
15453 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15454 if eval "test \"\${$as_ac_var+set}\" = set"; then
15455   echo $ECHO_N "(cached) $ECHO_C" >&6
15456 else
15457   cat >conftest.$ac_ext <<_ACEOF
15458 #line 15458 "configure"
15459 #include "confdefs.h"
15460 /* System header to define __stub macros and hopefully few prototypes,
15461     which can conflict with char $ac_func (); below.  */
15462 #include <assert.h>
15463 /* Override any gcc2 internal prototype to avoid an error.  */
15464 #ifdef __cplusplus
15465 extern "C"
15466 #endif
15467 /* We use char because int might match the return type of a gcc2
15468    builtin and then its argument prototype would still apply.  */
15469 char $ac_func ();
15470 char (*f) ();
15471
15472 int
15473 main ()
15474 {
15475 /* The GNU C library defines this for functions which it implements
15476     to always fail with ENOSYS.  Some functions are actually named
15477     something starting with __ and the normal name is an alias.  */
15478 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15479 choke me
15480 #else
15481 f = $ac_func;
15482 #endif
15483
15484   ;
15485   return 0;
15486 }
15487 _ACEOF
15488 rm -f conftest.$ac_objext conftest$ac_exeext
15489 if { (eval echo "$as_me:15489: \"$ac_link\"") >&5
15490   (eval $ac_link) 2>&5
15491   ac_status=$?
15492   echo "$as_me:15492: \$? = $ac_status" >&5
15493   (exit $ac_status); } &&
15494          { ac_try='test -s conftest$ac_exeext'
15495   { (eval echo "$as_me:15495: \"$ac_try\"") >&5
15496   (eval $ac_try) 2>&5
15497   ac_status=$?
15498   echo "$as_me:15498: \$? = $ac_status" >&5
15499   (exit $ac_status); }; }; then
15500   eval "$as_ac_var=yes"
15501 else
15502   echo "$as_me: failed program was:" >&5
15503 cat conftest.$ac_ext >&5
15504 eval "$as_ac_var=no"
15505 fi
15506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15507 fi
15508 echo "$as_me:15508: result: `eval echo '${'$as_ac_var'}'`" >&5
15509 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15510 if test `eval echo '${'$as_ac_var'}'` = yes; then
15511   cat >>confdefs.h <<EOF
15512 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15513 EOF
15514
15515 fi
15516 done
15517
15518 if test "$with_getcap" = "yes" ; then
15519
15520 echo "$as_me:15520: checking for terminal-capability database functions" >&5
15521 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15522 if test "${cf_cv_cgetent+set}" = set; then
15523   echo $ECHO_N "(cached) $ECHO_C" >&6
15524 else
15525
15526 cat >conftest.$ac_ext <<_ACEOF
15527 #line 15527 "configure"
15528 #include "confdefs.h"
15529
15530 #include <stdlib.h>
15531 int
15532 main ()
15533 {
15534
15535         char temp[128];
15536         char *buf = temp;
15537         char *db_array = temp;
15538         cgetent(&buf, &db_array, "vt100");
15539         cgetcap(buf, "tc", '=');
15540         cgetmatch(buf, "tc");
15541
15542   ;
15543   return 0;
15544 }
15545 _ACEOF
15546 rm -f conftest.$ac_objext conftest$ac_exeext
15547 if { (eval echo "$as_me:15547: \"$ac_link\"") >&5
15548   (eval $ac_link) 2>&5
15549   ac_status=$?
15550   echo "$as_me:15550: \$? = $ac_status" >&5
15551   (exit $ac_status); } &&
15552          { ac_try='test -s conftest$ac_exeext'
15553   { (eval echo "$as_me:15553: \"$ac_try\"") >&5
15554   (eval $ac_try) 2>&5
15555   ac_status=$?
15556   echo "$as_me:15556: \$? = $ac_status" >&5
15557   (exit $ac_status); }; }; then
15558   cf_cv_cgetent=yes
15559 else
15560   echo "$as_me: failed program was:" >&5
15561 cat conftest.$ac_ext >&5
15562 cf_cv_cgetent=no
15563 fi
15564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15565
15566 fi
15567 echo "$as_me:15567: result: $cf_cv_cgetent" >&5
15568 echo "${ECHO_T}$cf_cv_cgetent" >&6
15569
15570 if test "$cf_cv_cgetent" = yes
15571 then
15572         cat >>confdefs.h <<\EOF
15573 #define HAVE_BSD_CGETENT 1
15574 EOF
15575
15576 echo "$as_me:15576: checking if cgetent uses const parameter" >&5
15577 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15578 if test "${cf_cv_cgetent_const+set}" = set; then
15579   echo $ECHO_N "(cached) $ECHO_C" >&6
15580 else
15581
15582 cat >conftest.$ac_ext <<_ACEOF
15583 #line 15583 "configure"
15584 #include "confdefs.h"
15585
15586 #include <stdlib.h>
15587 int
15588 main ()
15589 {
15590
15591         char temp[128];
15592         char *buf = temp;
15593 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15594         const char *db_array = temp;
15595         cgetent(&buf, &db_array, "vt100");
15596 #endif
15597         cgetcap(buf, "tc", '=');
15598         cgetmatch(buf, "tc");
15599
15600   ;
15601   return 0;
15602 }
15603 _ACEOF
15604 rm -f conftest.$ac_objext conftest$ac_exeext
15605 if { (eval echo "$as_me:15605: \"$ac_link\"") >&5
15606   (eval $ac_link) 2>&5
15607   ac_status=$?
15608   echo "$as_me:15608: \$? = $ac_status" >&5
15609   (exit $ac_status); } &&
15610          { ac_try='test -s conftest$ac_exeext'
15611   { (eval echo "$as_me:15611: \"$ac_try\"") >&5
15612   (eval $ac_try) 2>&5
15613   ac_status=$?
15614   echo "$as_me:15614: \$? = $ac_status" >&5
15615   (exit $ac_status); }; }; then
15616   cf_cv_cgetent_const=yes
15617 else
15618   echo "$as_me: failed program was:" >&5
15619 cat conftest.$ac_ext >&5
15620 cf_cv_cgetent_const=no
15621 fi
15622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15623
15624 fi
15625 echo "$as_me:15625: result: $cf_cv_cgetent_const" >&5
15626 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15627         if test "$cf_cv_cgetent_const" = yes
15628         then
15629                 cat >>confdefs.h <<EOF
15630 #define CGETENT_CONST const
15631 EOF
15632
15633         fi
15634 fi
15635
15636 fi
15637
15638 echo "$as_me:15638: checking for isascii" >&5
15639 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15640 if test "${cf_cv_have_isascii+set}" = set; then
15641   echo $ECHO_N "(cached) $ECHO_C" >&6
15642 else
15643
15644         cat >conftest.$ac_ext <<_ACEOF
15645 #line 15645 "configure"
15646 #include "confdefs.h"
15647 #include <ctype.h>
15648 int
15649 main ()
15650 {
15651 int x = isascii(' ')
15652   ;
15653   return 0;
15654 }
15655 _ACEOF
15656 rm -f conftest.$ac_objext conftest$ac_exeext
15657 if { (eval echo "$as_me:15657: \"$ac_link\"") >&5
15658   (eval $ac_link) 2>&5
15659   ac_status=$?
15660   echo "$as_me:15660: \$? = $ac_status" >&5
15661   (exit $ac_status); } &&
15662          { ac_try='test -s conftest$ac_exeext'
15663   { (eval echo "$as_me:15663: \"$ac_try\"") >&5
15664   (eval $ac_try) 2>&5
15665   ac_status=$?
15666   echo "$as_me:15666: \$? = $ac_status" >&5
15667   (exit $ac_status); }; }; then
15668   cf_cv_have_isascii=yes
15669 else
15670   echo "$as_me: failed program was:" >&5
15671 cat conftest.$ac_ext >&5
15672 cf_cv_have_isascii=no
15673 fi
15674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15675
15676 fi
15677 echo "$as_me:15677: result: $cf_cv_have_isascii" >&5
15678 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15679 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15680 #define HAVE_ISASCII 1
15681 EOF
15682
15683 if test "$ac_cv_func_sigaction" = yes; then
15684 echo "$as_me:15684: checking whether sigaction needs _POSIX_SOURCE" >&5
15685 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15686 cat >conftest.$ac_ext <<_ACEOF
15687 #line 15687 "configure"
15688 #include "confdefs.h"
15689
15690 #include <sys/types.h>
15691 #include <signal.h>
15692 int
15693 main ()
15694 {
15695 struct sigaction act
15696   ;
15697   return 0;
15698 }
15699 _ACEOF
15700 rm -f conftest.$ac_objext
15701 if { (eval echo "$as_me:15701: \"$ac_compile\"") >&5
15702   (eval $ac_compile) 2>&5
15703   ac_status=$?
15704   echo "$as_me:15704: \$? = $ac_status" >&5
15705   (exit $ac_status); } &&
15706          { ac_try='test -s conftest.$ac_objext'
15707   { (eval echo "$as_me:15707: \"$ac_try\"") >&5
15708   (eval $ac_try) 2>&5
15709   ac_status=$?
15710   echo "$as_me:15710: \$? = $ac_status" >&5
15711   (exit $ac_status); }; }; then
15712   sigact_bad=no
15713 else
15714   echo "$as_me: failed program was:" >&5
15715 cat conftest.$ac_ext >&5
15716
15717 cat >conftest.$ac_ext <<_ACEOF
15718 #line 15718 "configure"
15719 #include "confdefs.h"
15720
15721 #define _POSIX_SOURCE
15722 #include <sys/types.h>
15723 #include <signal.h>
15724 int
15725 main ()
15726 {
15727 struct sigaction act
15728   ;
15729   return 0;
15730 }
15731 _ACEOF
15732 rm -f conftest.$ac_objext
15733 if { (eval echo "$as_me:15733: \"$ac_compile\"") >&5
15734   (eval $ac_compile) 2>&5
15735   ac_status=$?
15736   echo "$as_me:15736: \$? = $ac_status" >&5
15737   (exit $ac_status); } &&
15738          { ac_try='test -s conftest.$ac_objext'
15739   { (eval echo "$as_me:15739: \"$ac_try\"") >&5
15740   (eval $ac_try) 2>&5
15741   ac_status=$?
15742   echo "$as_me:15742: \$? = $ac_status" >&5
15743   (exit $ac_status); }; }; then
15744   sigact_bad=yes
15745          cat >>confdefs.h <<\EOF
15746 #define _POSIX_SOURCE 1
15747 EOF
15748
15749 else
15750   echo "$as_me: failed program was:" >&5
15751 cat conftest.$ac_ext >&5
15752 sigact_bad=unknown
15753 fi
15754 rm -f conftest.$ac_objext conftest.$ac_ext
15755 fi
15756 rm -f conftest.$ac_objext conftest.$ac_ext
15757 echo "$as_me:15757: result: $sigact_bad" >&5
15758 echo "${ECHO_T}$sigact_bad" >&6
15759 fi
15760
15761 echo "$as_me:15761: checking if nanosleep really works" >&5
15762 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15763 if test "${cf_cv_func_nanosleep+set}" = set; then
15764   echo $ECHO_N "(cached) $ECHO_C" >&6
15765 else
15766
15767 if test "$cross_compiling" = yes; then
15768   cf_cv_func_nanosleep=unknown
15769 else
15770   cat >conftest.$ac_ext <<_ACEOF
15771 #line 15771 "configure"
15772 #include "confdefs.h"
15773
15774 #include <stdio.h>
15775 #include <errno.h>
15776 #include <time.h>
15777
15778 #ifdef HAVE_SYS_TIME_H
15779 #include <sys/time.h>
15780 #endif
15781
15782 int main() {
15783         struct timespec ts1, ts2;
15784         int code;
15785         ts1.tv_sec  = 0;
15786         ts1.tv_nsec = 750000000;
15787         ts2.tv_sec  = 0;
15788         ts2.tv_nsec = 0;
15789         errno = 0;
15790         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15791         ${cf_cv_main_return:-return}(code != 0);
15792 }
15793
15794 _ACEOF
15795 rm -f conftest$ac_exeext
15796 if { (eval echo "$as_me:15796: \"$ac_link\"") >&5
15797   (eval $ac_link) 2>&5
15798   ac_status=$?
15799   echo "$as_me:15799: \$? = $ac_status" >&5
15800   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15801   { (eval echo "$as_me:15801: \"$ac_try\"") >&5
15802   (eval $ac_try) 2>&5
15803   ac_status=$?
15804   echo "$as_me:15804: \$? = $ac_status" >&5
15805   (exit $ac_status); }; }; then
15806   cf_cv_func_nanosleep=yes
15807 else
15808   echo "$as_me: program exited with status $ac_status" >&5
15809 echo "$as_me: failed program was:" >&5
15810 cat conftest.$ac_ext >&5
15811 cf_cv_func_nanosleep=no
15812 fi
15813 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15814 fi
15815 fi
15816 echo "$as_me:15816: result: $cf_cv_func_nanosleep" >&5
15817 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15818
15819 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15820 #define HAVE_NANOSLEEP 1
15821 EOF
15822
15823 for ac_header in \
15824 termio.h \
15825 termios.h \
15826 unistd.h \
15827
15828 do
15829 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15830 echo "$as_me:15830: checking for $ac_header" >&5
15831 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15832 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15833   echo $ECHO_N "(cached) $ECHO_C" >&6
15834 else
15835   cat >conftest.$ac_ext <<_ACEOF
15836 #line 15836 "configure"
15837 #include "confdefs.h"
15838 #include <$ac_header>
15839 _ACEOF
15840 if { (eval echo "$as_me:15840: \"$ac_cpp conftest.$ac_ext\"") >&5
15841   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15842   ac_status=$?
15843   egrep -v '^ *\+' conftest.er1 >conftest.err
15844   rm -f conftest.er1
15845   cat conftest.err >&5
15846   echo "$as_me:15846: \$? = $ac_status" >&5
15847   (exit $ac_status); } >/dev/null; then
15848   if test -s conftest.err; then
15849     ac_cpp_err=$ac_c_preproc_warn_flag
15850   else
15851     ac_cpp_err=
15852   fi
15853 else
15854   ac_cpp_err=yes
15855 fi
15856 if test -z "$ac_cpp_err"; then
15857   eval "$as_ac_Header=yes"
15858 else
15859   echo "$as_me: failed program was:" >&5
15860   cat conftest.$ac_ext >&5
15861   eval "$as_ac_Header=no"
15862 fi
15863 rm -f conftest.err conftest.$ac_ext
15864 fi
15865 echo "$as_me:15865: result: `eval echo '${'$as_ac_Header'}'`" >&5
15866 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15867 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15868   cat >>confdefs.h <<EOF
15869 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15870 EOF
15871
15872 fi
15873 done
15874
15875 if test "$ISC" = yes ; then
15876
15877 for ac_header in sys/termio.h
15878 do
15879 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15880 echo "$as_me:15880: checking for $ac_header" >&5
15881 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15882 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15883   echo $ECHO_N "(cached) $ECHO_C" >&6
15884 else
15885   cat >conftest.$ac_ext <<_ACEOF
15886 #line 15886 "configure"
15887 #include "confdefs.h"
15888 #include <$ac_header>
15889 _ACEOF
15890 if { (eval echo "$as_me:15890: \"$ac_cpp conftest.$ac_ext\"") >&5
15891   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15892   ac_status=$?
15893   egrep -v '^ *\+' conftest.er1 >conftest.err
15894   rm -f conftest.er1
15895   cat conftest.err >&5
15896   echo "$as_me:15896: \$? = $ac_status" >&5
15897   (exit $ac_status); } >/dev/null; then
15898   if test -s conftest.err; then
15899     ac_cpp_err=$ac_c_preproc_warn_flag
15900   else
15901     ac_cpp_err=
15902   fi
15903 else
15904   ac_cpp_err=yes
15905 fi
15906 if test -z "$ac_cpp_err"; then
15907   eval "$as_ac_Header=yes"
15908 else
15909   echo "$as_me: failed program was:" >&5
15910   cat conftest.$ac_ext >&5
15911   eval "$as_ac_Header=no"
15912 fi
15913 rm -f conftest.err conftest.$ac_ext
15914 fi
15915 echo "$as_me:15915: result: `eval echo '${'$as_ac_Header'}'`" >&5
15916 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15917 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15918   cat >>confdefs.h <<EOF
15919 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15920 EOF
15921
15922 fi
15923 done
15924
15925 fi
15926 if test "$ac_cv_header_termios_h" = yes ; then
15927         case "$CFLAGS $CPPFLAGS" in
15928         *-D_POSIX_SOURCE*)
15929                 termios_bad=dunno ;;
15930         *)      termios_bad=maybe ;;
15931         esac
15932         if test "$termios_bad" = maybe ; then
15933         echo "$as_me:15933: checking whether termios.h needs _POSIX_SOURCE" >&5
15934 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15935         cat >conftest.$ac_ext <<_ACEOF
15936 #line 15936 "configure"
15937 #include "confdefs.h"
15938 #include <termios.h>
15939 int
15940 main ()
15941 {
15942 struct termios foo; int x = foo.c_iflag
15943   ;
15944   return 0;
15945 }
15946 _ACEOF
15947 rm -f conftest.$ac_objext
15948 if { (eval echo "$as_me:15948: \"$ac_compile\"") >&5
15949   (eval $ac_compile) 2>&5
15950   ac_status=$?
15951   echo "$as_me:15951: \$? = $ac_status" >&5
15952   (exit $ac_status); } &&
15953          { ac_try='test -s conftest.$ac_objext'
15954   { (eval echo "$as_me:15954: \"$ac_try\"") >&5
15955   (eval $ac_try) 2>&5
15956   ac_status=$?
15957   echo "$as_me:15957: \$? = $ac_status" >&5
15958   (exit $ac_status); }; }; then
15959   termios_bad=no
15960 else
15961   echo "$as_me: failed program was:" >&5
15962 cat conftest.$ac_ext >&5
15963
15964                 cat >conftest.$ac_ext <<_ACEOF
15965 #line 15965 "configure"
15966 #include "confdefs.h"
15967
15968 #define _POSIX_SOURCE
15969 #include <termios.h>
15970 int
15971 main ()
15972 {
15973 struct termios foo; int x = foo.c_iflag
15974   ;
15975   return 0;
15976 }
15977 _ACEOF
15978 rm -f conftest.$ac_objext
15979 if { (eval echo "$as_me:15979: \"$ac_compile\"") >&5
15980   (eval $ac_compile) 2>&5
15981   ac_status=$?
15982   echo "$as_me:15982: \$? = $ac_status" >&5
15983   (exit $ac_status); } &&
15984          { ac_try='test -s conftest.$ac_objext'
15985   { (eval echo "$as_me:15985: \"$ac_try\"") >&5
15986   (eval $ac_try) 2>&5
15987   ac_status=$?
15988   echo "$as_me:15988: \$? = $ac_status" >&5
15989   (exit $ac_status); }; }; then
15990   termios_bad=unknown
15991 else
15992   echo "$as_me: failed program was:" >&5
15993 cat conftest.$ac_ext >&5
15994 termios_bad=yes cat >>confdefs.h <<\EOF
15995 #define _POSIX_SOURCE 1
15996 EOF
15997
15998 fi
15999 rm -f conftest.$ac_objext conftest.$ac_ext
16000
16001 fi
16002 rm -f conftest.$ac_objext conftest.$ac_ext
16003         echo "$as_me:16003: result: $termios_bad" >&5
16004 echo "${ECHO_T}$termios_bad" >&6
16005         fi
16006 fi
16007
16008 echo "$as_me:16008: checking for tcgetattr" >&5
16009 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16010 if test "${cf_cv_have_tcgetattr+set}" = set; then
16011   echo $ECHO_N "(cached) $ECHO_C" >&6
16012 else
16013
16014 cat >conftest.$ac_ext <<_ACEOF
16015 #line 16015 "configure"
16016 #include "confdefs.h"
16017
16018 #include <sys/types.h>
16019 #ifdef HAVE_UNISTD_H
16020 #include <unistd.h>
16021 #endif
16022 #ifdef HAVE_TERMIOS_H
16023 #include <termios.h>
16024 #define TTY struct termios
16025 #else
16026 #ifdef HAVE_TERMIO_H
16027 #include <termio.h>
16028 #define TTY struct termio
16029 #endif
16030 #endif
16031
16032 int
16033 main ()
16034 {
16035
16036 TTY foo;
16037 tcgetattr(1, &foo);
16038   ;
16039   return 0;
16040 }
16041 _ACEOF
16042 rm -f conftest.$ac_objext conftest$ac_exeext
16043 if { (eval echo "$as_me:16043: \"$ac_link\"") >&5
16044   (eval $ac_link) 2>&5
16045   ac_status=$?
16046   echo "$as_me:16046: \$? = $ac_status" >&5
16047   (exit $ac_status); } &&
16048          { ac_try='test -s conftest$ac_exeext'
16049   { (eval echo "$as_me:16049: \"$ac_try\"") >&5
16050   (eval $ac_try) 2>&5
16051   ac_status=$?
16052   echo "$as_me:16052: \$? = $ac_status" >&5
16053   (exit $ac_status); }; }; then
16054   cf_cv_have_tcgetattr=yes
16055 else
16056   echo "$as_me: failed program was:" >&5
16057 cat conftest.$ac_ext >&5
16058 cf_cv_have_tcgetattr=no
16059 fi
16060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16061 fi
16062 echo "$as_me:16062: result: $cf_cv_have_tcgetattr" >&5
16063 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16064 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
16065 #define HAVE_TCGETATTR 1
16066 EOF
16067
16068 echo "$as_me:16068: checking for vsscanf function or workaround" >&5
16069 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16070 if test "${cf_cv_func_vsscanf+set}" = set; then
16071   echo $ECHO_N "(cached) $ECHO_C" >&6
16072 else
16073
16074 cat >conftest.$ac_ext <<_ACEOF
16075 #line 16075 "configure"
16076 #include "confdefs.h"
16077
16078 #include <stdarg.h>
16079 #include <stdio.h>
16080 int
16081 main ()
16082 {
16083
16084         va_list ap;
16085         vsscanf("from", "%d", ap)
16086   ;
16087   return 0;
16088 }
16089 _ACEOF
16090 rm -f conftest.$ac_objext conftest$ac_exeext
16091 if { (eval echo "$as_me:16091: \"$ac_link\"") >&5
16092   (eval $ac_link) 2>&5
16093   ac_status=$?
16094   echo "$as_me:16094: \$? = $ac_status" >&5
16095   (exit $ac_status); } &&
16096          { ac_try='test -s conftest$ac_exeext'
16097   { (eval echo "$as_me:16097: \"$ac_try\"") >&5
16098   (eval $ac_try) 2>&5
16099   ac_status=$?
16100   echo "$as_me:16100: \$? = $ac_status" >&5
16101   (exit $ac_status); }; }; then
16102   cf_cv_func_vsscanf=vsscanf
16103 else
16104   echo "$as_me: failed program was:" >&5
16105 cat conftest.$ac_ext >&5
16106
16107 cat >conftest.$ac_ext <<_ACEOF
16108 #line 16108 "configure"
16109 #include "confdefs.h"
16110
16111 #include <stdarg.h>
16112 #include <stdio.h>
16113 int
16114 main ()
16115 {
16116
16117     FILE strbuf;
16118     char *str = "from";
16119
16120     strbuf._flag = _IOREAD;
16121     strbuf._ptr = strbuf._base = (unsigned char *) str;
16122     strbuf._cnt = strlen(str);
16123     strbuf._file = _NFILE;
16124     return (vfscanf(&strbuf, "%d", ap))
16125   ;
16126   return 0;
16127 }
16128 _ACEOF
16129 rm -f conftest.$ac_objext conftest$ac_exeext
16130 if { (eval echo "$as_me:16130: \"$ac_link\"") >&5
16131   (eval $ac_link) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); } &&
16135          { ac_try='test -s conftest$ac_exeext'
16136   { (eval echo "$as_me:16136: \"$ac_try\"") >&5
16137   (eval $ac_try) 2>&5
16138   ac_status=$?
16139   echo "$as_me:16139: \$? = $ac_status" >&5
16140   (exit $ac_status); }; }; then
16141   cf_cv_func_vsscanf=vfscanf
16142 else
16143   echo "$as_me: failed program was:" >&5
16144 cat conftest.$ac_ext >&5
16145
16146 cat >conftest.$ac_ext <<_ACEOF
16147 #line 16147 "configure"
16148 #include "confdefs.h"
16149
16150 #include <stdarg.h>
16151 #include <stdio.h>
16152 int
16153 main ()
16154 {
16155
16156     FILE strbuf;
16157     char *str = "from";
16158
16159     strbuf._flag = _IOREAD;
16160     strbuf._ptr = strbuf._base = (unsigned char *) str;
16161     strbuf._cnt = strlen(str);
16162     strbuf._file = _NFILE;
16163     return (_doscan(&strbuf, "%d", ap))
16164   ;
16165   return 0;
16166 }
16167 _ACEOF
16168 rm -f conftest.$ac_objext conftest$ac_exeext
16169 if { (eval echo "$as_me:16169: \"$ac_link\"") >&5
16170   (eval $ac_link) 2>&5
16171   ac_status=$?
16172   echo "$as_me:16172: \$? = $ac_status" >&5
16173   (exit $ac_status); } &&
16174          { ac_try='test -s conftest$ac_exeext'
16175   { (eval echo "$as_me:16175: \"$ac_try\"") >&5
16176   (eval $ac_try) 2>&5
16177   ac_status=$?
16178   echo "$as_me:16178: \$? = $ac_status" >&5
16179   (exit $ac_status); }; }; then
16180   cf_cv_func_vsscanf=_doscan
16181 else
16182   echo "$as_me: failed program was:" >&5
16183 cat conftest.$ac_ext >&5
16184
16185 cf_cv_func_vsscanf=no
16186 fi
16187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16188 fi
16189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16190 fi
16191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16192 fi
16193 echo "$as_me:16193: result: $cf_cv_func_vsscanf" >&5
16194 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16195
16196 case $cf_cv_func_vsscanf in #(vi
16197 vsscanf) cat >>confdefs.h <<\EOF
16198 #define HAVE_VSSCANF 1
16199 EOF
16200 ;; #(vi
16201 vfscanf) cat >>confdefs.h <<\EOF
16202 #define HAVE_VFSCANF 1
16203 EOF
16204 ;; #(vi
16205 _doscan) cat >>confdefs.h <<\EOF
16206 #define HAVE__DOSCAN 1
16207 EOF
16208 ;;
16209 esac
16210
16211 echo "$as_me:16211: checking for working mkstemp" >&5
16212 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16213 if test "${cf_cv_func_mkstemp+set}" = set; then
16214   echo $ECHO_N "(cached) $ECHO_C" >&6
16215 else
16216
16217 rm -rf conftest*
16218 if test "$cross_compiling" = yes; then
16219   cf_cv_func_mkstemp=maybe
16220 else
16221   cat >conftest.$ac_ext <<_ACEOF
16222 #line 16222 "configure"
16223 #include "confdefs.h"
16224
16225 #include <sys/types.h>
16226 #include <stdlib.h>
16227 #include <stdio.h>
16228 #include <string.h>
16229 #include <sys/stat.h>
16230 int main()
16231 {
16232         char *tmpl = "conftestXXXXXX";
16233         char name[2][80];
16234         int n;
16235         int result = 0;
16236         int fd;
16237         struct stat sb;
16238
16239         umask(077);
16240         for (n = 0; n < 2; ++n) {
16241                 strcpy(name[n], tmpl);
16242                 if ((fd = mkstemp(name[n])) >= 0) {
16243                         if (!strcmp(name[n], tmpl)
16244                          || stat(name[n], &sb) != 0
16245                          || (sb.st_mode & S_IFMT) != S_IFREG
16246                          || (sb.st_mode & 077) != 0) {
16247                                 result = 1;
16248                         }
16249                         close(fd);
16250                 }
16251         }
16252         if (result == 0
16253          && !strcmp(name[0], name[1]))
16254                 result = 1;
16255         ${cf_cv_main_return:-return}(result);
16256 }
16257
16258 _ACEOF
16259 rm -f conftest$ac_exeext
16260 if { (eval echo "$as_me:16260: \"$ac_link\"") >&5
16261   (eval $ac_link) 2>&5
16262   ac_status=$?
16263   echo "$as_me:16263: \$? = $ac_status" >&5
16264   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16265   { (eval echo "$as_me:16265: \"$ac_try\"") >&5
16266   (eval $ac_try) 2>&5
16267   ac_status=$?
16268   echo "$as_me:16268: \$? = $ac_status" >&5
16269   (exit $ac_status); }; }; then
16270   cf_cv_func_mkstemp=yes
16271
16272 else
16273   echo "$as_me: program exited with status $ac_status" >&5
16274 echo "$as_me: failed program was:" >&5
16275 cat conftest.$ac_ext >&5
16276 cf_cv_func_mkstemp=no
16277
16278 fi
16279 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16280 fi
16281
16282 fi
16283 echo "$as_me:16283: result: $cf_cv_func_mkstemp" >&5
16284 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16285 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16286         echo "$as_me:16286: checking for mkstemp" >&5
16287 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16288 if test "${ac_cv_func_mkstemp+set}" = set; then
16289   echo $ECHO_N "(cached) $ECHO_C" >&6
16290 else
16291   cat >conftest.$ac_ext <<_ACEOF
16292 #line 16292 "configure"
16293 #include "confdefs.h"
16294 /* System header to define __stub macros and hopefully few prototypes,
16295     which can conflict with char mkstemp (); below.  */
16296 #include <assert.h>
16297 /* Override any gcc2 internal prototype to avoid an error.  */
16298 #ifdef __cplusplus
16299 extern "C"
16300 #endif
16301 /* We use char because int might match the return type of a gcc2
16302    builtin and then its argument prototype would still apply.  */
16303 char mkstemp ();
16304 char (*f) ();
16305
16306 int
16307 main ()
16308 {
16309 /* The GNU C library defines this for functions which it implements
16310     to always fail with ENOSYS.  Some functions are actually named
16311     something starting with __ and the normal name is an alias.  */
16312 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16313 choke me
16314 #else
16315 f = mkstemp;
16316 #endif
16317
16318   ;
16319   return 0;
16320 }
16321 _ACEOF
16322 rm -f conftest.$ac_objext conftest$ac_exeext
16323 if { (eval echo "$as_me:16323: \"$ac_link\"") >&5
16324   (eval $ac_link) 2>&5
16325   ac_status=$?
16326   echo "$as_me:16326: \$? = $ac_status" >&5
16327   (exit $ac_status); } &&
16328          { ac_try='test -s conftest$ac_exeext'
16329   { (eval echo "$as_me:16329: \"$ac_try\"") >&5
16330   (eval $ac_try) 2>&5
16331   ac_status=$?
16332   echo "$as_me:16332: \$? = $ac_status" >&5
16333   (exit $ac_status); }; }; then
16334   ac_cv_func_mkstemp=yes
16335 else
16336   echo "$as_me: failed program was:" >&5
16337 cat conftest.$ac_ext >&5
16338 ac_cv_func_mkstemp=no
16339 fi
16340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16341 fi
16342 echo "$as_me:16342: result: $ac_cv_func_mkstemp" >&5
16343 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16344
16345 fi
16346 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16347         cat >>confdefs.h <<\EOF
16348 #define HAVE_MKSTEMP 1
16349 EOF
16350
16351 fi
16352
16353 # setup for prototype of fallback for vsscanf()
16354
16355 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16356         HAVE_VSSCANF=1
16357 else
16358         HAVE_VSSCANF=0
16359 fi
16360
16361 if test "$cross_compiling" = yes ; then
16362         { echo "$as_me:16362: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16363 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16364 else
16365         echo "$as_me:16365: checking whether setvbuf arguments are reversed" >&5
16366 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16367 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16368   echo $ECHO_N "(cached) $ECHO_C" >&6
16369 else
16370   if test "$cross_compiling" = yes; then
16371   { { echo "$as_me:16371: error: cannot run test program while cross compiling" >&5
16372 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16373    { (exit 1); exit 1; }; }
16374 else
16375   cat >conftest.$ac_ext <<_ACEOF
16376 #line 16376 "configure"
16377 #include "confdefs.h"
16378 #include <stdio.h>
16379 /* If setvbuf has the reversed format, exit 0. */
16380 int
16381 main ()
16382 {
16383   /* This call has the arguments reversed.
16384      A reversed system may check and see that the address of main
16385      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16386   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16387     $ac_main_return(1);
16388   putc('\r', stdout);
16389   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16390 }
16391 _ACEOF
16392 rm -f conftest$ac_exeext
16393 if { (eval echo "$as_me:16393: \"$ac_link\"") >&5
16394   (eval $ac_link) 2>&5
16395   ac_status=$?
16396   echo "$as_me:16396: \$? = $ac_status" >&5
16397   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16398   { (eval echo "$as_me:16398: \"$ac_try\"") >&5
16399   (eval $ac_try) 2>&5
16400   ac_status=$?
16401   echo "$as_me:16401: \$? = $ac_status" >&5
16402   (exit $ac_status); }; }; then
16403   ac_cv_func_setvbuf_reversed=yes
16404 else
16405   echo "$as_me: program exited with status $ac_status" >&5
16406 echo "$as_me: failed program was:" >&5
16407 cat conftest.$ac_ext >&5
16408 ac_cv_func_setvbuf_reversed=no
16409 fi
16410 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16411 fi
16412 rm -f core core.* *.core
16413 fi
16414 echo "$as_me:16414: result: $ac_cv_func_setvbuf_reversed" >&5
16415 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16416 if test $ac_cv_func_setvbuf_reversed = yes; then
16417
16418 cat >>confdefs.h <<\EOF
16419 #define SETVBUF_REVERSED 1
16420 EOF
16421
16422 fi
16423
16424 fi
16425 echo "$as_me:16425: checking return type of signal handlers" >&5
16426 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16427 if test "${ac_cv_type_signal+set}" = set; then
16428   echo $ECHO_N "(cached) $ECHO_C" >&6
16429 else
16430   cat >conftest.$ac_ext <<_ACEOF
16431 #line 16431 "configure"
16432 #include "confdefs.h"
16433 #include <sys/types.h>
16434 #include <signal.h>
16435 #ifdef signal
16436 # undef signal
16437 #endif
16438 #ifdef __cplusplus
16439 extern "C" void (*signal (int, void (*)(int)))(int);
16440 #else
16441 void (*signal ()) ();
16442 #endif
16443
16444 int
16445 main ()
16446 {
16447 int i;
16448   ;
16449   return 0;
16450 }
16451 _ACEOF
16452 rm -f conftest.$ac_objext
16453 if { (eval echo "$as_me:16453: \"$ac_compile\"") >&5
16454   (eval $ac_compile) 2>&5
16455   ac_status=$?
16456   echo "$as_me:16456: \$? = $ac_status" >&5
16457   (exit $ac_status); } &&
16458          { ac_try='test -s conftest.$ac_objext'
16459   { (eval echo "$as_me:16459: \"$ac_try\"") >&5
16460   (eval $ac_try) 2>&5
16461   ac_status=$?
16462   echo "$as_me:16462: \$? = $ac_status" >&5
16463   (exit $ac_status); }; }; then
16464   ac_cv_type_signal=void
16465 else
16466   echo "$as_me: failed program was:" >&5
16467 cat conftest.$ac_ext >&5
16468 ac_cv_type_signal=int
16469 fi
16470 rm -f conftest.$ac_objext conftest.$ac_ext
16471 fi
16472 echo "$as_me:16472: result: $ac_cv_type_signal" >&5
16473 echo "${ECHO_T}$ac_cv_type_signal" >&6
16474
16475 cat >>confdefs.h <<EOF
16476 #define RETSIGTYPE $ac_cv_type_signal
16477 EOF
16478
16479 echo "$as_me:16479: checking for intptr_t" >&5
16480 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16481 if test "${ac_cv_type_intptr_t+set}" = set; then
16482   echo $ECHO_N "(cached) $ECHO_C" >&6
16483 else
16484   cat >conftest.$ac_ext <<_ACEOF
16485 #line 16485 "configure"
16486 #include "confdefs.h"
16487 $ac_includes_default
16488 int
16489 main ()
16490 {
16491 if ((intptr_t *) 0)
16492   return 0;
16493 if (sizeof (intptr_t))
16494   return 0;
16495   ;
16496   return 0;
16497 }
16498 _ACEOF
16499 rm -f conftest.$ac_objext
16500 if { (eval echo "$as_me:16500: \"$ac_compile\"") >&5
16501   (eval $ac_compile) 2>&5
16502   ac_status=$?
16503   echo "$as_me:16503: \$? = $ac_status" >&5
16504   (exit $ac_status); } &&
16505          { ac_try='test -s conftest.$ac_objext'
16506   { (eval echo "$as_me:16506: \"$ac_try\"") >&5
16507   (eval $ac_try) 2>&5
16508   ac_status=$?
16509   echo "$as_me:16509: \$? = $ac_status" >&5
16510   (exit $ac_status); }; }; then
16511   ac_cv_type_intptr_t=yes
16512 else
16513   echo "$as_me: failed program was:" >&5
16514 cat conftest.$ac_ext >&5
16515 ac_cv_type_intptr_t=no
16516 fi
16517 rm -f conftest.$ac_objext conftest.$ac_ext
16518 fi
16519 echo "$as_me:16519: result: $ac_cv_type_intptr_t" >&5
16520 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16521 if test $ac_cv_type_intptr_t = yes; then
16522   :
16523 else
16524
16525 cat >>confdefs.h <<EOF
16526 #define intptr_t long
16527 EOF
16528
16529 fi
16530
16531 echo "$as_me:16531: checking for type sigaction_t" >&5
16532 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16533 if test "${cf_cv_type_sigaction+set}" = set; then
16534   echo $ECHO_N "(cached) $ECHO_C" >&6
16535 else
16536
16537         cat >conftest.$ac_ext <<_ACEOF
16538 #line 16538 "configure"
16539 #include "confdefs.h"
16540
16541 #include <signal.h>
16542 int
16543 main ()
16544 {
16545 sigaction_t x
16546   ;
16547   return 0;
16548 }
16549 _ACEOF
16550 rm -f conftest.$ac_objext
16551 if { (eval echo "$as_me:16551: \"$ac_compile\"") >&5
16552   (eval $ac_compile) 2>&5
16553   ac_status=$?
16554   echo "$as_me:16554: \$? = $ac_status" >&5
16555   (exit $ac_status); } &&
16556          { ac_try='test -s conftest.$ac_objext'
16557   { (eval echo "$as_me:16557: \"$ac_try\"") >&5
16558   (eval $ac_try) 2>&5
16559   ac_status=$?
16560   echo "$as_me:16560: \$? = $ac_status" >&5
16561   (exit $ac_status); }; }; then
16562   cf_cv_type_sigaction=yes
16563 else
16564   echo "$as_me: failed program was:" >&5
16565 cat conftest.$ac_ext >&5
16566 cf_cv_type_sigaction=no
16567 fi
16568 rm -f conftest.$ac_objext conftest.$ac_ext
16569 fi
16570
16571 echo "$as_me:16571: result: $cf_cv_type_sigaction" >&5
16572 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16573 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16574 #define HAVE_TYPE_SIGACTION 1
16575 EOF
16576
16577 echo "$as_me:16577: checking declaration of size-change" >&5
16578 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16579 if test "${cf_cv_sizechange+set}" = set; then
16580   echo $ECHO_N "(cached) $ECHO_C" >&6
16581 else
16582
16583     cf_cv_sizechange=unknown
16584     cf_save_CPPFLAGS="$CPPFLAGS"
16585
16586 for cf_opts in "" "NEED_PTEM_H"
16587 do
16588
16589     CPPFLAGS="$cf_save_CPPFLAGS"
16590     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16591     cat >conftest.$ac_ext <<_ACEOF
16592 #line 16592 "configure"
16593 #include "confdefs.h"
16594 #include <sys/types.h>
16595 #ifdef HAVE_TERMIOS_H
16596 #include <termios.h>
16597 #else
16598 #ifdef HAVE_TERMIO_H
16599 #include <termio.h>
16600 #endif
16601 #endif
16602 #ifdef NEED_PTEM_H
16603 /* This is a workaround for SCO:  they neglected to define struct winsize in
16604  * termios.h -- it's only in termio.h and ptem.h
16605  */
16606 #include        <sys/stream.h>
16607 #include        <sys/ptem.h>
16608 #endif
16609 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16610 #include <sys/ioctl.h>
16611 #endif
16612
16613 int
16614 main ()
16615 {
16616
16617 #ifdef TIOCGSIZE
16618         struct ttysize win;     /* FIXME: what system is this? */
16619         int y = win.ts_lines;
16620         int x = win.ts_cols;
16621 #else
16622 #ifdef TIOCGWINSZ
16623         struct winsize win;
16624         int y = win.ws_row;
16625         int x = win.ws_col;
16626 #else
16627         no TIOCGSIZE or TIOCGWINSZ
16628 #endif /* TIOCGWINSZ */
16629 #endif /* TIOCGSIZE */
16630
16631   ;
16632   return 0;
16633 }
16634 _ACEOF
16635 rm -f conftest.$ac_objext
16636 if { (eval echo "$as_me:16636: \"$ac_compile\"") >&5
16637   (eval $ac_compile) 2>&5
16638   ac_status=$?
16639   echo "$as_me:16639: \$? = $ac_status" >&5
16640   (exit $ac_status); } &&
16641          { ac_try='test -s conftest.$ac_objext'
16642   { (eval echo "$as_me:16642: \"$ac_try\"") >&5
16643   (eval $ac_try) 2>&5
16644   ac_status=$?
16645   echo "$as_me:16645: \$? = $ac_status" >&5
16646   (exit $ac_status); }; }; then
16647   cf_cv_sizechange=yes
16648 else
16649   echo "$as_me: failed program was:" >&5
16650 cat conftest.$ac_ext >&5
16651 cf_cv_sizechange=no
16652 fi
16653 rm -f conftest.$ac_objext conftest.$ac_ext
16654
16655         CPPFLAGS="$cf_save_CPPFLAGS"
16656         if test "$cf_cv_sizechange" = yes ; then
16657                 echo "size-change succeeded ($cf_opts)" >&5
16658                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16659                 break
16660         fi
16661 done
16662
16663 fi
16664 echo "$as_me:16664: result: $cf_cv_sizechange" >&5
16665 echo "${ECHO_T}$cf_cv_sizechange" >&6
16666 if test "$cf_cv_sizechange" != no ; then
16667         cat >>confdefs.h <<\EOF
16668 #define HAVE_SIZECHANGE 1
16669 EOF
16670
16671         case $cf_cv_sizechange in #(vi
16672         NEED*)
16673                 cat >>confdefs.h <<EOF
16674 #define $cf_cv_sizechange  1
16675 EOF
16676
16677                 ;;
16678         esac
16679 fi
16680
16681 echo "$as_me:16681: checking for memmove" >&5
16682 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16683 if test "${ac_cv_func_memmove+set}" = set; then
16684   echo $ECHO_N "(cached) $ECHO_C" >&6
16685 else
16686   cat >conftest.$ac_ext <<_ACEOF
16687 #line 16687 "configure"
16688 #include "confdefs.h"
16689 /* System header to define __stub macros and hopefully few prototypes,
16690     which can conflict with char memmove (); below.  */
16691 #include <assert.h>
16692 /* Override any gcc2 internal prototype to avoid an error.  */
16693 #ifdef __cplusplus
16694 extern "C"
16695 #endif
16696 /* We use char because int might match the return type of a gcc2
16697    builtin and then its argument prototype would still apply.  */
16698 char memmove ();
16699 char (*f) ();
16700
16701 int
16702 main ()
16703 {
16704 /* The GNU C library defines this for functions which it implements
16705     to always fail with ENOSYS.  Some functions are actually named
16706     something starting with __ and the normal name is an alias.  */
16707 #if defined (__stub_memmove) || defined (__stub___memmove)
16708 choke me
16709 #else
16710 f = memmove;
16711 #endif
16712
16713   ;
16714   return 0;
16715 }
16716 _ACEOF
16717 rm -f conftest.$ac_objext conftest$ac_exeext
16718 if { (eval echo "$as_me:16718: \"$ac_link\"") >&5
16719   (eval $ac_link) 2>&5
16720   ac_status=$?
16721   echo "$as_me:16721: \$? = $ac_status" >&5
16722   (exit $ac_status); } &&
16723          { ac_try='test -s conftest$ac_exeext'
16724   { (eval echo "$as_me:16724: \"$ac_try\"") >&5
16725   (eval $ac_try) 2>&5
16726   ac_status=$?
16727   echo "$as_me:16727: \$? = $ac_status" >&5
16728   (exit $ac_status); }; }; then
16729   ac_cv_func_memmove=yes
16730 else
16731   echo "$as_me: failed program was:" >&5
16732 cat conftest.$ac_ext >&5
16733 ac_cv_func_memmove=no
16734 fi
16735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16736 fi
16737 echo "$as_me:16737: result: $ac_cv_func_memmove" >&5
16738 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16739 if test $ac_cv_func_memmove = yes; then
16740   :
16741 else
16742
16743 echo "$as_me:16743: checking for bcopy" >&5
16744 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16745 if test "${ac_cv_func_bcopy+set}" = set; then
16746   echo $ECHO_N "(cached) $ECHO_C" >&6
16747 else
16748   cat >conftest.$ac_ext <<_ACEOF
16749 #line 16749 "configure"
16750 #include "confdefs.h"
16751 /* System header to define __stub macros and hopefully few prototypes,
16752     which can conflict with char bcopy (); below.  */
16753 #include <assert.h>
16754 /* Override any gcc2 internal prototype to avoid an error.  */
16755 #ifdef __cplusplus
16756 extern "C"
16757 #endif
16758 /* We use char because int might match the return type of a gcc2
16759    builtin and then its argument prototype would still apply.  */
16760 char bcopy ();
16761 char (*f) ();
16762
16763 int
16764 main ()
16765 {
16766 /* The GNU C library defines this for functions which it implements
16767     to always fail with ENOSYS.  Some functions are actually named
16768     something starting with __ and the normal name is an alias.  */
16769 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16770 choke me
16771 #else
16772 f = bcopy;
16773 #endif
16774
16775   ;
16776   return 0;
16777 }
16778 _ACEOF
16779 rm -f conftest.$ac_objext conftest$ac_exeext
16780 if { (eval echo "$as_me:16780: \"$ac_link\"") >&5
16781   (eval $ac_link) 2>&5
16782   ac_status=$?
16783   echo "$as_me:16783: \$? = $ac_status" >&5
16784   (exit $ac_status); } &&
16785          { ac_try='test -s conftest$ac_exeext'
16786   { (eval echo "$as_me:16786: \"$ac_try\"") >&5
16787   (eval $ac_try) 2>&5
16788   ac_status=$?
16789   echo "$as_me:16789: \$? = $ac_status" >&5
16790   (exit $ac_status); }; }; then
16791   ac_cv_func_bcopy=yes
16792 else
16793   echo "$as_me: failed program was:" >&5
16794 cat conftest.$ac_ext >&5
16795 ac_cv_func_bcopy=no
16796 fi
16797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16798 fi
16799 echo "$as_me:16799: result: $ac_cv_func_bcopy" >&5
16800 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16801 if test $ac_cv_func_bcopy = yes; then
16802
16803         echo "$as_me:16803: checking if bcopy does overlapping moves" >&5
16804 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16805 if test "${cf_cv_good_bcopy+set}" = set; then
16806   echo $ECHO_N "(cached) $ECHO_C" >&6
16807 else
16808
16809                 if test "$cross_compiling" = yes; then
16810   cf_cv_good_bcopy=unknown
16811 else
16812   cat >conftest.$ac_ext <<_ACEOF
16813 #line 16813 "configure"
16814 #include "confdefs.h"
16815
16816 int main() {
16817         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16818         char temp[40];
16819         bcopy(data, temp, sizeof(data));
16820         bcopy(temp+10, temp, 15);
16821         bcopy(temp+5, temp+15, 10);
16822         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16823 }
16824
16825 _ACEOF
16826 rm -f conftest$ac_exeext
16827 if { (eval echo "$as_me:16827: \"$ac_link\"") >&5
16828   (eval $ac_link) 2>&5
16829   ac_status=$?
16830   echo "$as_me:16830: \$? = $ac_status" >&5
16831   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16832   { (eval echo "$as_me:16832: \"$ac_try\"") >&5
16833   (eval $ac_try) 2>&5
16834   ac_status=$?
16835   echo "$as_me:16835: \$? = $ac_status" >&5
16836   (exit $ac_status); }; }; then
16837   cf_cv_good_bcopy=yes
16838 else
16839   echo "$as_me: program exited with status $ac_status" >&5
16840 echo "$as_me: failed program was:" >&5
16841 cat conftest.$ac_ext >&5
16842 cf_cv_good_bcopy=no
16843 fi
16844 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16845 fi
16846
16847 fi
16848 echo "$as_me:16848: result: $cf_cv_good_bcopy" >&5
16849 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16850
16851 else
16852   cf_cv_good_bcopy=no
16853 fi
16854
16855         if test "$cf_cv_good_bcopy" = yes ; then
16856                 cat >>confdefs.h <<\EOF
16857 #define USE_OK_BCOPY 1
16858 EOF
16859
16860         else
16861                 cat >>confdefs.h <<\EOF
16862 #define USE_MY_MEMMOVE 1
16863 EOF
16864
16865         fi
16866
16867 fi
16868
16869 echo "$as_me:16869: checking if poll really works" >&5
16870 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16871 if test "${cf_cv_working_poll+set}" = set; then
16872   echo $ECHO_N "(cached) $ECHO_C" >&6
16873 else
16874
16875 if test "$cross_compiling" = yes; then
16876   cf_cv_working_poll=unknown
16877 else
16878   cat >conftest.$ac_ext <<_ACEOF
16879 #line 16879 "configure"
16880 #include "confdefs.h"
16881
16882 #include <stdio.h>
16883 #ifdef HAVE_POLL_H
16884 #include <poll.h>
16885 #else
16886 #include <sys/poll.h>
16887 #endif
16888 int main() {
16889         struct pollfd myfds;
16890         int ret;
16891
16892         /* check for Darwin bug with respect to "devices" */
16893         myfds.fd = open("/dev/null", 1);
16894         if (myfds.fd < 0)
16895                 myfds.fd = 0;
16896         myfds.events = POLLIN;
16897         myfds.revents = 0;
16898
16899         ret = poll(&myfds, 1, 100);
16900
16901         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16902                 ret = -1;
16903         } else {
16904
16905                 /* also check with standard input */
16906                 myfds.fd = 0;
16907                 myfds.events = POLLIN;
16908                 myfds.revents = 0;
16909
16910                 ret = poll(&myfds, 1, 100);
16911                 if (ret < 0) {
16912                         ret = 0;
16913                 }
16914         }
16915         ${cf_cv_main_return:-return}(ret != 0);
16916 }
16917 _ACEOF
16918 rm -f conftest$ac_exeext
16919 if { (eval echo "$as_me:16919: \"$ac_link\"") >&5
16920   (eval $ac_link) 2>&5
16921   ac_status=$?
16922   echo "$as_me:16922: \$? = $ac_status" >&5
16923   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16924   { (eval echo "$as_me:16924: \"$ac_try\"") >&5
16925   (eval $ac_try) 2>&5
16926   ac_status=$?
16927   echo "$as_me:16927: \$? = $ac_status" >&5
16928   (exit $ac_status); }; }; then
16929   cf_cv_working_poll=yes
16930 else
16931   echo "$as_me: program exited with status $ac_status" >&5
16932 echo "$as_me: failed program was:" >&5
16933 cat conftest.$ac_ext >&5
16934 cf_cv_working_poll=no
16935 fi
16936 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16937 fi
16938 fi
16939 echo "$as_me:16939: result: $cf_cv_working_poll" >&5
16940 echo "${ECHO_T}$cf_cv_working_poll" >&6
16941 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16942 #define HAVE_WORKING_POLL 1
16943 EOF
16944
16945 echo "$as_me:16945: checking for va_copy" >&5
16946 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16947 if test "${cf_cv_have_va_copy+set}" = set; then
16948   echo $ECHO_N "(cached) $ECHO_C" >&6
16949 else
16950
16951 cat >conftest.$ac_ext <<_ACEOF
16952 #line 16952 "configure"
16953 #include "confdefs.h"
16954
16955 #include <stdarg.h>
16956
16957 int
16958 main ()
16959 {
16960
16961         static va_list dst;
16962         static va_list src;
16963         va_copy(dst, src)
16964   ;
16965   return 0;
16966 }
16967 _ACEOF
16968 rm -f conftest.$ac_objext conftest$ac_exeext
16969 if { (eval echo "$as_me:16969: \"$ac_link\"") >&5
16970   (eval $ac_link) 2>&5
16971   ac_status=$?
16972   echo "$as_me:16972: \$? = $ac_status" >&5
16973   (exit $ac_status); } &&
16974          { ac_try='test -s conftest$ac_exeext'
16975   { (eval echo "$as_me:16975: \"$ac_try\"") >&5
16976   (eval $ac_try) 2>&5
16977   ac_status=$?
16978   echo "$as_me:16978: \$? = $ac_status" >&5
16979   (exit $ac_status); }; }; then
16980   cf_cv_have_va_copy=yes
16981 else
16982   echo "$as_me: failed program was:" >&5
16983 cat conftest.$ac_ext >&5
16984 cf_cv_have_va_copy=no
16985 fi
16986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16987 fi
16988 echo "$as_me:16988: result: $cf_cv_have_va_copy" >&5
16989 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16990
16991 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16992 #define HAVE_VA_COPY 1
16993 EOF
16994
16995 echo "$as_me:16995: checking for __va_copy" >&5
16996 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16997 if test "${cf_cv_have___va_copy+set}" = set; then
16998   echo $ECHO_N "(cached) $ECHO_C" >&6
16999 else
17000
17001 cat >conftest.$ac_ext <<_ACEOF
17002 #line 17002 "configure"
17003 #include "confdefs.h"
17004
17005 #include <stdarg.h>
17006
17007 int
17008 main ()
17009 {
17010
17011         static va_list dst;
17012         static va_list src;
17013         __va_copy(dst, src)
17014   ;
17015   return 0;
17016 }
17017 _ACEOF
17018 rm -f conftest.$ac_objext conftest$ac_exeext
17019 if { (eval echo "$as_me:17019: \"$ac_link\"") >&5
17020   (eval $ac_link) 2>&5
17021   ac_status=$?
17022   echo "$as_me:17022: \$? = $ac_status" >&5
17023   (exit $ac_status); } &&
17024          { ac_try='test -s conftest$ac_exeext'
17025   { (eval echo "$as_me:17025: \"$ac_try\"") >&5
17026   (eval $ac_try) 2>&5
17027   ac_status=$?
17028   echo "$as_me:17028: \$? = $ac_status" >&5
17029   (exit $ac_status); }; }; then
17030   cf_cv_have___va_copy=yes
17031 else
17032   echo "$as_me: failed program was:" >&5
17033 cat conftest.$ac_ext >&5
17034 cf_cv_have___va_copy=no
17035 fi
17036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17037 fi
17038 echo "$as_me:17038: result: $cf_cv_have___va_copy" >&5
17039 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17040
17041 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
17042 #define HAVE___VA_COPY 1
17043 EOF
17044
17045 echo "$as_me:17045: checking for pid_t" >&5
17046 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17047 if test "${ac_cv_type_pid_t+set}" = set; then
17048   echo $ECHO_N "(cached) $ECHO_C" >&6
17049 else
17050   cat >conftest.$ac_ext <<_ACEOF
17051 #line 17051 "configure"
17052 #include "confdefs.h"
17053 $ac_includes_default
17054 int
17055 main ()
17056 {
17057 if ((pid_t *) 0)
17058   return 0;
17059 if (sizeof (pid_t))
17060   return 0;
17061   ;
17062   return 0;
17063 }
17064 _ACEOF
17065 rm -f conftest.$ac_objext
17066 if { (eval echo "$as_me:17066: \"$ac_compile\"") >&5
17067   (eval $ac_compile) 2>&5
17068   ac_status=$?
17069   echo "$as_me:17069: \$? = $ac_status" >&5
17070   (exit $ac_status); } &&
17071          { ac_try='test -s conftest.$ac_objext'
17072   { (eval echo "$as_me:17072: \"$ac_try\"") >&5
17073   (eval $ac_try) 2>&5
17074   ac_status=$?
17075   echo "$as_me:17075: \$? = $ac_status" >&5
17076   (exit $ac_status); }; }; then
17077   ac_cv_type_pid_t=yes
17078 else
17079   echo "$as_me: failed program was:" >&5
17080 cat conftest.$ac_ext >&5
17081 ac_cv_type_pid_t=no
17082 fi
17083 rm -f conftest.$ac_objext conftest.$ac_ext
17084 fi
17085 echo "$as_me:17085: result: $ac_cv_type_pid_t" >&5
17086 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17087 if test $ac_cv_type_pid_t = yes; then
17088   :
17089 else
17090
17091 cat >>confdefs.h <<EOF
17092 #define pid_t int
17093 EOF
17094
17095 fi
17096
17097 for ac_header in unistd.h vfork.h
17098 do
17099 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17100 echo "$as_me:17100: checking for $ac_header" >&5
17101 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17102 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17103   echo $ECHO_N "(cached) $ECHO_C" >&6
17104 else
17105   cat >conftest.$ac_ext <<_ACEOF
17106 #line 17106 "configure"
17107 #include "confdefs.h"
17108 #include <$ac_header>
17109 _ACEOF
17110 if { (eval echo "$as_me:17110: \"$ac_cpp conftest.$ac_ext\"") >&5
17111   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17112   ac_status=$?
17113   egrep -v '^ *\+' conftest.er1 >conftest.err
17114   rm -f conftest.er1
17115   cat conftest.err >&5
17116   echo "$as_me:17116: \$? = $ac_status" >&5
17117   (exit $ac_status); } >/dev/null; then
17118   if test -s conftest.err; then
17119     ac_cpp_err=$ac_c_preproc_warn_flag
17120   else
17121     ac_cpp_err=
17122   fi
17123 else
17124   ac_cpp_err=yes
17125 fi
17126 if test -z "$ac_cpp_err"; then
17127   eval "$as_ac_Header=yes"
17128 else
17129   echo "$as_me: failed program was:" >&5
17130   cat conftest.$ac_ext >&5
17131   eval "$as_ac_Header=no"
17132 fi
17133 rm -f conftest.err conftest.$ac_ext
17134 fi
17135 echo "$as_me:17135: result: `eval echo '${'$as_ac_Header'}'`" >&5
17136 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17137 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17138   cat >>confdefs.h <<EOF
17139 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17140 EOF
17141
17142 fi
17143 done
17144
17145 for ac_func in fork vfork
17146 do
17147 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17148 echo "$as_me:17148: checking for $ac_func" >&5
17149 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17150 if eval "test \"\${$as_ac_var+set}\" = set"; then
17151   echo $ECHO_N "(cached) $ECHO_C" >&6
17152 else
17153   cat >conftest.$ac_ext <<_ACEOF
17154 #line 17154 "configure"
17155 #include "confdefs.h"
17156 /* System header to define __stub macros and hopefully few prototypes,
17157     which can conflict with char $ac_func (); below.  */
17158 #include <assert.h>
17159 /* Override any gcc2 internal prototype to avoid an error.  */
17160 #ifdef __cplusplus
17161 extern "C"
17162 #endif
17163 /* We use char because int might match the return type of a gcc2
17164    builtin and then its argument prototype would still apply.  */
17165 char $ac_func ();
17166 char (*f) ();
17167
17168 int
17169 main ()
17170 {
17171 /* The GNU C library defines this for functions which it implements
17172     to always fail with ENOSYS.  Some functions are actually named
17173     something starting with __ and the normal name is an alias.  */
17174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17175 choke me
17176 #else
17177 f = $ac_func;
17178 #endif
17179
17180   ;
17181   return 0;
17182 }
17183 _ACEOF
17184 rm -f conftest.$ac_objext conftest$ac_exeext
17185 if { (eval echo "$as_me:17185: \"$ac_link\"") >&5
17186   (eval $ac_link) 2>&5
17187   ac_status=$?
17188   echo "$as_me:17188: \$? = $ac_status" >&5
17189   (exit $ac_status); } &&
17190          { ac_try='test -s conftest$ac_exeext'
17191   { (eval echo "$as_me:17191: \"$ac_try\"") >&5
17192   (eval $ac_try) 2>&5
17193   ac_status=$?
17194   echo "$as_me:17194: \$? = $ac_status" >&5
17195   (exit $ac_status); }; }; then
17196   eval "$as_ac_var=yes"
17197 else
17198   echo "$as_me: failed program was:" >&5
17199 cat conftest.$ac_ext >&5
17200 eval "$as_ac_var=no"
17201 fi
17202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17203 fi
17204 echo "$as_me:17204: result: `eval echo '${'$as_ac_var'}'`" >&5
17205 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17206 if test `eval echo '${'$as_ac_var'}'` = yes; then
17207   cat >>confdefs.h <<EOF
17208 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17209 EOF
17210
17211 fi
17212 done
17213
17214 ac_cv_func_fork_works=$ac_cv_func_fork
17215 if test "x$ac_cv_func_fork" = xyes; then
17216   echo "$as_me:17216: checking for working fork" >&5
17217 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17218 if test "${ac_cv_func_fork_works+set}" = set; then
17219   echo $ECHO_N "(cached) $ECHO_C" >&6
17220 else
17221   if test "$cross_compiling" = yes; then
17222   ac_cv_func_fork_works=cross
17223 else
17224   cat >conftest.$ac_ext <<_ACEOF
17225 /* By Rüdiger Kuhlmann. */
17226       #include <sys/types.h>
17227       #if HAVE_UNISTD_H
17228       # include <unistd.h>
17229       #endif
17230       /* Some systems only have a dummy stub for fork() */
17231       int main ()
17232       {
17233         if (fork() < 0)
17234           $ac_main_return (1);
17235         $ac_main_return (0);
17236       }
17237 _ACEOF
17238 rm -f conftest$ac_exeext
17239 if { (eval echo "$as_me:17239: \"$ac_link\"") >&5
17240   (eval $ac_link) 2>&5
17241   ac_status=$?
17242   echo "$as_me:17242: \$? = $ac_status" >&5
17243   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17244   { (eval echo "$as_me:17244: \"$ac_try\"") >&5
17245   (eval $ac_try) 2>&5
17246   ac_status=$?
17247   echo "$as_me:17247: \$? = $ac_status" >&5
17248   (exit $ac_status); }; }; then
17249   ac_cv_func_fork_works=yes
17250 else
17251   echo "$as_me: program exited with status $ac_status" >&5
17252 echo "$as_me: failed program was:" >&5
17253 cat conftest.$ac_ext >&5
17254 ac_cv_func_fork_works=no
17255 fi
17256 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17257 fi
17258 fi
17259 echo "$as_me:17259: result: $ac_cv_func_fork_works" >&5
17260 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17261
17262 fi
17263 if test "x$ac_cv_func_fork_works" = xcross; then
17264   case $host in
17265     *-*-amigaos* | *-*-msdosdjgpp*)
17266       # Override, as these systems have only a dummy fork() stub
17267       ac_cv_func_fork_works=no
17268       ;;
17269     *)
17270       ac_cv_func_fork_works=yes
17271       ;;
17272   esac
17273   { echo "$as_me:17273: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17274 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17275 fi
17276 ac_cv_func_vfork_works=$ac_cv_func_vfork
17277 if test "x$ac_cv_func_vfork" = xyes; then
17278   echo "$as_me:17278: checking for working vfork" >&5
17279 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17280 if test "${ac_cv_func_vfork_works+set}" = set; then
17281   echo $ECHO_N "(cached) $ECHO_C" >&6
17282 else
17283   if test "$cross_compiling" = yes; then
17284   ac_cv_func_vfork_works=cross
17285 else
17286   cat >conftest.$ac_ext <<_ACEOF
17287 #line 17287 "configure"
17288 #include "confdefs.h"
17289 /* Thanks to Paul Eggert for this test.  */
17290 #include <stdio.h>
17291 #include <sys/types.h>
17292 #include <sys/stat.h>
17293 #if HAVE_UNISTD_H
17294 # include <unistd.h>
17295 #endif
17296 #if HAVE_VFORK_H
17297 # include <vfork.h>
17298 #endif
17299 /* On some sparc systems, changes by the child to local and incoming
17300    argument registers are propagated back to the parent.  The compiler
17301    is told about this with #include <vfork.h>, but some compilers
17302    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17303    static variable whose address is put into a register that is
17304    clobbered by the vfork.  */
17305 static
17306 #ifdef __cplusplus
17307 sparc_address_test (int arg)
17308 # else
17309 sparc_address_test (arg) int arg;
17310 #endif
17311 {
17312   static pid_t child;
17313   if (!child) {
17314     child = vfork ();
17315     if (child < 0) {
17316       perror ("vfork");
17317       _exit(2);
17318     }
17319     if (!child) {
17320       arg = getpid();
17321       write(-1, "", 0);
17322       _exit (arg);
17323     }
17324   }
17325 }
17326
17327 int
17328 main ()
17329 {
17330   pid_t parent = getpid ();
17331   pid_t child;
17332
17333   sparc_address_test ();
17334
17335   child = vfork ();
17336
17337   if (child == 0) {
17338     /* Here is another test for sparc vfork register problems.  This
17339        test uses lots of local variables, at least as many local
17340        variables as main has allocated so far including compiler
17341        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17342        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17343        reuse the register of parent for one of the local variables,
17344        since it will think that parent can't possibly be used any more
17345        in this routine.  Assigning to the local variable will thus
17346        munge parent in the parent process.  */
17347     pid_t
17348       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17349       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17350     /* Convince the compiler that p..p7 are live; otherwise, it might
17351        use the same hardware register for all 8 local variables.  */
17352     if (p != p1 || p != p2 || p != p3 || p != p4
17353         || p != p5 || p != p6 || p != p7)
17354       _exit(1);
17355
17356     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17357        from child file descriptors.  If the child closes a descriptor
17358        before it execs or exits, this munges the parent's descriptor
17359        as well.  Test for this by closing stdout in the child.  */
17360     _exit(close(fileno(stdout)) != 0);
17361   } else {
17362     int status;
17363     struct stat st;
17364
17365     while (wait(&status) != child)
17366       ;
17367     $ac_main_return(
17368          /* Was there some problem with vforking?  */
17369          child < 0
17370
17371          /* Did the child fail?  (This shouldn't happen.)  */
17372          || status
17373
17374          /* Did the vfork/compiler bug occur?  */
17375          || parent != getpid()
17376
17377          /* Did the file descriptor bug occur?  */
17378          || fstat(fileno(stdout), &st) != 0
17379          );
17380   }
17381 }
17382 _ACEOF
17383 rm -f conftest$ac_exeext
17384 if { (eval echo "$as_me:17384: \"$ac_link\"") >&5
17385   (eval $ac_link) 2>&5
17386   ac_status=$?
17387   echo "$as_me:17387: \$? = $ac_status" >&5
17388   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17389   { (eval echo "$as_me:17389: \"$ac_try\"") >&5
17390   (eval $ac_try) 2>&5
17391   ac_status=$?
17392   echo "$as_me:17392: \$? = $ac_status" >&5
17393   (exit $ac_status); }; }; then
17394   ac_cv_func_vfork_works=yes
17395 else
17396   echo "$as_me: program exited with status $ac_status" >&5
17397 echo "$as_me: failed program was:" >&5
17398 cat conftest.$ac_ext >&5
17399 ac_cv_func_vfork_works=no
17400 fi
17401 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17402 fi
17403 fi
17404 echo "$as_me:17404: result: $ac_cv_func_vfork_works" >&5
17405 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17406
17407 fi;
17408 if test "x$ac_cv_func_fork_works" = xcross; then
17409   ac_cv_func_vfork_works=ac_cv_func_vfork
17410   { echo "$as_me:17410: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17411 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17412 fi
17413
17414 if test "x$ac_cv_func_vfork_works" = xyes; then
17415
17416 cat >>confdefs.h <<\EOF
17417 #define HAVE_WORKING_VFORK 1
17418 EOF
17419
17420 else
17421
17422 cat >>confdefs.h <<\EOF
17423 #define vfork fork
17424 EOF
17425
17426 fi
17427 if test "x$ac_cv_func_fork_works" = xyes; then
17428
17429 cat >>confdefs.h <<\EOF
17430 #define HAVE_WORKING_FORK 1
17431 EOF
17432
17433 fi
17434
17435 # special check for test/ditto.c
17436
17437 echo "$as_me:17437: checking for openpty in -lutil" >&5
17438 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17439 if test "${ac_cv_lib_util_openpty+set}" = set; then
17440   echo $ECHO_N "(cached) $ECHO_C" >&6
17441 else
17442   ac_check_lib_save_LIBS=$LIBS
17443 LIBS="-lutil  $LIBS"
17444 cat >conftest.$ac_ext <<_ACEOF
17445 #line 17445 "configure"
17446 #include "confdefs.h"
17447
17448 /* Override any gcc2 internal prototype to avoid an error.  */
17449 #ifdef __cplusplus
17450 extern "C"
17451 #endif
17452 /* We use char because int might match the return type of a gcc2
17453    builtin and then its argument prototype would still apply.  */
17454 char openpty ();
17455 int
17456 main ()
17457 {
17458 openpty ();
17459   ;
17460   return 0;
17461 }
17462 _ACEOF
17463 rm -f conftest.$ac_objext conftest$ac_exeext
17464 if { (eval echo "$as_me:17464: \"$ac_link\"") >&5
17465   (eval $ac_link) 2>&5
17466   ac_status=$?
17467   echo "$as_me:17467: \$? = $ac_status" >&5
17468   (exit $ac_status); } &&
17469          { ac_try='test -s conftest$ac_exeext'
17470   { (eval echo "$as_me:17470: \"$ac_try\"") >&5
17471   (eval $ac_try) 2>&5
17472   ac_status=$?
17473   echo "$as_me:17473: \$? = $ac_status" >&5
17474   (exit $ac_status); }; }; then
17475   ac_cv_lib_util_openpty=yes
17476 else
17477   echo "$as_me: failed program was:" >&5
17478 cat conftest.$ac_ext >&5
17479 ac_cv_lib_util_openpty=no
17480 fi
17481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17482 LIBS=$ac_check_lib_save_LIBS
17483 fi
17484 echo "$as_me:17484: result: $ac_cv_lib_util_openpty" >&5
17485 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17486 if test $ac_cv_lib_util_openpty = yes; then
17487   cf_cv_lib_util=yes
17488 else
17489   cf_cv_lib_util=no
17490 fi
17491
17492 echo "$as_me:17492: checking for openpty header" >&5
17493 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17494 if test "${cf_cv_func_openpty+set}" = set; then
17495   echo $ECHO_N "(cached) $ECHO_C" >&6
17496 else
17497
17498     cf_save_LIBS="$LIBS"
17499     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17500     for cf_header in pty.h libutil.h util.h
17501     do
17502     cat >conftest.$ac_ext <<_ACEOF
17503 #line 17503 "configure"
17504 #include "confdefs.h"
17505
17506 #include <$cf_header>
17507
17508 int
17509 main ()
17510 {
17511
17512     int x = openpty((int *)0, (int *)0, (char *)0,
17513                    (struct termios *)0, (struct winsize *)0);
17514
17515   ;
17516   return 0;
17517 }
17518 _ACEOF
17519 rm -f conftest.$ac_objext conftest$ac_exeext
17520 if { (eval echo "$as_me:17520: \"$ac_link\"") >&5
17521   (eval $ac_link) 2>&5
17522   ac_status=$?
17523   echo "$as_me:17523: \$? = $ac_status" >&5
17524   (exit $ac_status); } &&
17525          { ac_try='test -s conftest$ac_exeext'
17526   { (eval echo "$as_me:17526: \"$ac_try\"") >&5
17527   (eval $ac_try) 2>&5
17528   ac_status=$?
17529   echo "$as_me:17529: \$? = $ac_status" >&5
17530   (exit $ac_status); }; }; then
17531
17532         cf_cv_func_openpty=$cf_header
17533         break
17534
17535 else
17536   echo "$as_me: failed program was:" >&5
17537 cat conftest.$ac_ext >&5
17538
17539         cf_cv_func_openpty=no
17540
17541 fi
17542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17543     done
17544     LIBS="$cf_save_LIBS"
17545
17546 fi
17547 echo "$as_me:17547: result: $cf_cv_func_openpty" >&5
17548 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17549
17550 if test "$cf_cv_func_openpty" != no ; then
17551     cat >>confdefs.h <<EOF
17552 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17553 EOF
17554
17555     cat >>confdefs.h <<\EOF
17556 #define USE_XTERM_PTY 1
17557 EOF
17558
17559     if test "$cf_cv_lib_util" = yes ; then
17560         TEST_LIBS="-lutil $TEST_LIBS"
17561     fi
17562 fi
17563
17564 if test "$with_hashed_db" != no ; then
17565         cat >>confdefs.h <<\EOF
17566 #define USE_HASHED_DB 1
17567 EOF
17568
17569 case $with_hashed_db in #(vi
17570 yes|*able*) #(vi
17571     ;;
17572 *)
17573     if test -d "$with_hashed_db" ; then
17574
17575 if test -n "$with_hashed_db/include" ; then
17576   for cf_add_incdir in $with_hashed_db/include
17577   do
17578         while test $cf_add_incdir != /usr/include
17579         do
17580           if test -d $cf_add_incdir
17581           then
17582                 cf_have_incdir=no
17583                 if test -n "$CFLAGS$CPPFLAGS" ; then
17584                   # a loop is needed to ensure we can add subdirs of existing dirs
17585                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17586                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17587                           cf_have_incdir=yes; break
17588                         fi
17589                   done
17590                 fi
17591
17592                 if test "$cf_have_incdir" = no ; then
17593                   if test "$cf_add_incdir" = /usr/local/include ; then
17594                         if test "$GCC" = yes
17595                         then
17596                           cf_save_CPPFLAGS=$CPPFLAGS
17597                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17598                           cat >conftest.$ac_ext <<_ACEOF
17599 #line 17599 "configure"
17600 #include "confdefs.h"
17601 #include <stdio.h>
17602 int
17603 main ()
17604 {
17605 printf("Hello")
17606   ;
17607   return 0;
17608 }
17609 _ACEOF
17610 rm -f conftest.$ac_objext
17611 if { (eval echo "$as_me:17611: \"$ac_compile\"") >&5
17612   (eval $ac_compile) 2>&5
17613   ac_status=$?
17614   echo "$as_me:17614: \$? = $ac_status" >&5
17615   (exit $ac_status); } &&
17616          { ac_try='test -s conftest.$ac_objext'
17617   { (eval echo "$as_me:17617: \"$ac_try\"") >&5
17618   (eval $ac_try) 2>&5
17619   ac_status=$?
17620   echo "$as_me:17620: \$? = $ac_status" >&5
17621   (exit $ac_status); }; }; then
17622   :
17623 else
17624   echo "$as_me: failed program was:" >&5
17625 cat conftest.$ac_ext >&5
17626 cf_have_incdir=yes
17627 fi
17628 rm -f conftest.$ac_objext conftest.$ac_ext
17629                           CPPFLAGS=$cf_save_CPPFLAGS
17630                         fi
17631                   fi
17632                 fi
17633
17634                 if test "$cf_have_incdir" = no ; then
17635                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17636
17637 echo "${as_me:-configure}:17637: testing adding $cf_add_incdir to include-path ..." 1>&5
17638
17639                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17640
17641                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17642                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17643                   cf_add_incdir="$cf_top_incdir"
17644                 else
17645                   break
17646                 fi
17647           fi
17648         done
17649   done
17650 fi
17651
17652 if test -n "$with_hashed_db/lib" ; then
17653   for cf_add_libdir in $with_hashed_db/lib
17654   do
17655     if test $cf_add_libdir = /usr/lib ; then
17656       :
17657     elif test -d $cf_add_libdir
17658     then
17659       cf_have_libdir=no
17660       if test -n "$LDFLAGS$LIBS" ; then
17661         # a loop is needed to ensure we can add subdirs of existing dirs
17662         for cf_test_libdir in $LDFLAGS $LIBS ; do
17663           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17664             cf_have_libdir=yes; break
17665           fi
17666         done
17667       fi
17668       if test "$cf_have_libdir" = no ; then
17669         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17670
17671 echo "${as_me:-configure}:17671: testing adding $cf_add_libdir to library-path ..." 1>&5
17672
17673         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17674       fi
17675     fi
17676   done
17677 fi
17678
17679     fi
17680 esac
17681
17682 echo "$as_me:17682: checking for db.h" >&5
17683 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17684 if test "${ac_cv_header_db_h+set}" = set; then
17685   echo $ECHO_N "(cached) $ECHO_C" >&6
17686 else
17687   cat >conftest.$ac_ext <<_ACEOF
17688 #line 17688 "configure"
17689 #include "confdefs.h"
17690 #include <db.h>
17691 _ACEOF
17692 if { (eval echo "$as_me:17692: \"$ac_cpp conftest.$ac_ext\"") >&5
17693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17694   ac_status=$?
17695   egrep -v '^ *\+' conftest.er1 >conftest.err
17696   rm -f conftest.er1
17697   cat conftest.err >&5
17698   echo "$as_me:17698: \$? = $ac_status" >&5
17699   (exit $ac_status); } >/dev/null; then
17700   if test -s conftest.err; then
17701     ac_cpp_err=$ac_c_preproc_warn_flag
17702   else
17703     ac_cpp_err=
17704   fi
17705 else
17706   ac_cpp_err=yes
17707 fi
17708 if test -z "$ac_cpp_err"; then
17709   ac_cv_header_db_h=yes
17710 else
17711   echo "$as_me: failed program was:" >&5
17712   cat conftest.$ac_ext >&5
17713   ac_cv_header_db_h=no
17714 fi
17715 rm -f conftest.err conftest.$ac_ext
17716 fi
17717 echo "$as_me:17717: result: $ac_cv_header_db_h" >&5
17718 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17719 if test $ac_cv_header_db_h = yes; then
17720
17721 echo "$as_me:17721: checking for version of db" >&5
17722 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17723 if test "${cf_cv_hashed_db_version+set}" = set; then
17724   echo $ECHO_N "(cached) $ECHO_C" >&6
17725 else
17726
17727 cf_cv_hashed_db_version=unknown
17728
17729 for cf_db_version in 1 2 3 4 5
17730 do
17731
17732 echo "${as_me:-configure}:17732: testing checking for db version $cf_db_version ..." 1>&5
17733
17734         cat >conftest.$ac_ext <<_ACEOF
17735 #line 17735 "configure"
17736 #include "confdefs.h"
17737
17738 $ac_includes_default
17739 #include <db.h>
17740
17741 #ifdef DB_VERSION_MAJOR
17742         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17743 #if $cf_db_version == DB_VERSION_MAJOR
17744         /* ok */
17745 #else
17746         make an error
17747 #endif
17748 #else
17749 #if $cf_db_version == 1
17750         /* ok: assuming this is DB 1.8.5 */
17751 #else
17752         make an error
17753 #endif
17754 #endif
17755
17756 int
17757 main ()
17758 {
17759 DBT *foo = 0
17760   ;
17761   return 0;
17762 }
17763 _ACEOF
17764 rm -f conftest.$ac_objext
17765 if { (eval echo "$as_me:17765: \"$ac_compile\"") >&5
17766   (eval $ac_compile) 2>&5
17767   ac_status=$?
17768   echo "$as_me:17768: \$? = $ac_status" >&5
17769   (exit $ac_status); } &&
17770          { ac_try='test -s conftest.$ac_objext'
17771   { (eval echo "$as_me:17771: \"$ac_try\"") >&5
17772   (eval $ac_try) 2>&5
17773   ac_status=$?
17774   echo "$as_me:17774: \$? = $ac_status" >&5
17775   (exit $ac_status); }; }; then
17776
17777         cf_cv_hashed_db_version=$cf_db_version
17778         break
17779
17780 else
17781   echo "$as_me: failed program was:" >&5
17782 cat conftest.$ac_ext >&5
17783 fi
17784 rm -f conftest.$ac_objext conftest.$ac_ext
17785 done
17786
17787 fi
17788 echo "$as_me:17788: result: $cf_cv_hashed_db_version" >&5
17789 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17790
17791 if test "$cf_cv_hashed_db_version" = unknown ; then
17792         { { echo "$as_me:17792: error: Cannot determine version of db" >&5
17793 echo "$as_me: error: Cannot determine version of db" >&2;}
17794    { (exit 1); exit 1; }; }
17795 else
17796
17797 echo "$as_me:17797: checking for db libraries" >&5
17798 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17799 if test "${cf_cv_hashed_db_libs+set}" = set; then
17800   echo $ECHO_N "(cached) $ECHO_C" >&6
17801 else
17802
17803 cf_cv_hashed_db_libs=unknown
17804 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17805 do
17806         cf_save_libs="$LIBS"
17807         if test -n "$cf_db_libs"; then
17808                 LIBS="-l$cf_db_libs $LIBS"
17809         fi
17810
17811 echo "${as_me:-configure}:17811: testing checking for library "$cf_db_libs" ..." 1>&5
17812
17813         cat >conftest.$ac_ext <<_ACEOF
17814 #line 17814 "configure"
17815 #include "confdefs.h"
17816
17817 $ac_includes_default
17818 #include <db.h>
17819
17820 int
17821 main ()
17822 {
17823
17824         char *path = "/tmp/foo";
17825 #ifdef DB_VERSION_MAJOR
17826 #if DB_VERSION_MAJOR >= 4
17827         DB *result = 0;
17828         db_create(&result, NULL, 0);
17829         result->open(result,
17830                 NULL,
17831                 path,
17832                 path,
17833                 DB_HASH,
17834                 DB_CREATE,
17835                 0644);
17836 #elif DB_VERSION_MAJOR >= 3
17837         DB *result = 0;
17838         db_create(&result, NULL, 0);
17839         result->open(result,
17840                 path,
17841                 path,
17842                 DB_HASH,
17843                 DB_CREATE,
17844                 0644);
17845 #elif DB_VERSION_MAJOR >= 2
17846         DB *result = 0;
17847         db_open(path,
17848                 DB_HASH,
17849                 DB_CREATE,
17850                 0644,
17851                 (DB_ENV *) 0,
17852                 (DB_INFO *) 0,
17853                 &result);
17854 #endif /* DB_VERSION_MAJOR */
17855 #else
17856         DB *result = dbopen(path,
17857                      2,
17858                      0644,
17859                      DB_HASH,
17860                      0);
17861 #endif
17862         ${cf_cv_main_return:-return}(result != 0)
17863
17864   ;
17865   return 0;
17866 }
17867 _ACEOF
17868 rm -f conftest.$ac_objext conftest$ac_exeext
17869 if { (eval echo "$as_me:17869: \"$ac_link\"") >&5
17870   (eval $ac_link) 2>&5
17871   ac_status=$?
17872   echo "$as_me:17872: \$? = $ac_status" >&5
17873   (exit $ac_status); } &&
17874          { ac_try='test -s conftest$ac_exeext'
17875   { (eval echo "$as_me:17875: \"$ac_try\"") >&5
17876   (eval $ac_try) 2>&5
17877   ac_status=$?
17878   echo "$as_me:17878: \$? = $ac_status" >&5
17879   (exit $ac_status); }; }; then
17880
17881         if test -n "$cf_db_libs" ; then
17882                 cf_cv_hashed_db_libs=$cf_db_libs
17883         else
17884                 cf_cv_hashed_db_libs=default
17885         fi
17886         LIBS="$cf_save_libs"
17887         break
17888
17889 else
17890   echo "$as_me: failed program was:" >&5
17891 cat conftest.$ac_ext >&5
17892 fi
17893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17894         LIBS="$cf_save_libs"
17895 done
17896
17897 fi
17898 echo "$as_me:17898: result: $cf_cv_hashed_db_libs" >&5
17899 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17900
17901         if test "$cf_cv_hashed_db_libs" = unknown ; then
17902                 { { echo "$as_me:17902: error: Cannot determine library for db" >&5
17903 echo "$as_me: error: Cannot determine library for db" >&2;}
17904    { (exit 1); exit 1; }; }
17905         elif test "$cf_cv_hashed_db_libs" != default ; then
17906                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17907         fi
17908 fi
17909
17910 else
17911
17912         { { echo "$as_me:17912: error: Cannot find db.h" >&5
17913 echo "$as_me: error: Cannot find db.h" >&2;}
17914    { (exit 1); exit 1; }; }
17915
17916 fi
17917
17918 fi
17919
17920 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17921         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17922         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17923 fi
17924
17925 # Just in case, check if the C compiler has a bool type.
17926
17927 echo "$as_me:17927: checking if we should include stdbool.h" >&5
17928 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17929
17930 if test "${cf_cv_header_stdbool_h+set}" = set; then
17931   echo $ECHO_N "(cached) $ECHO_C" >&6
17932 else
17933
17934         cat >conftest.$ac_ext <<_ACEOF
17935 #line 17935 "configure"
17936 #include "confdefs.h"
17937
17938 int
17939 main ()
17940 {
17941 bool foo = false
17942   ;
17943   return 0;
17944 }
17945 _ACEOF
17946 rm -f conftest.$ac_objext
17947 if { (eval echo "$as_me:17947: \"$ac_compile\"") >&5
17948   (eval $ac_compile) 2>&5
17949   ac_status=$?
17950   echo "$as_me:17950: \$? = $ac_status" >&5
17951   (exit $ac_status); } &&
17952          { ac_try='test -s conftest.$ac_objext'
17953   { (eval echo "$as_me:17953: \"$ac_try\"") >&5
17954   (eval $ac_try) 2>&5
17955   ac_status=$?
17956   echo "$as_me:17956: \$? = $ac_status" >&5
17957   (exit $ac_status); }; }; then
17958   cf_cv_header_stdbool_h=0
17959 else
17960   echo "$as_me: failed program was:" >&5
17961 cat conftest.$ac_ext >&5
17962 cat >conftest.$ac_ext <<_ACEOF
17963 #line 17963 "configure"
17964 #include "confdefs.h"
17965
17966 #ifndef __BEOS__
17967 #include <stdbool.h>
17968 #endif
17969
17970 int
17971 main ()
17972 {
17973 bool foo = false
17974   ;
17975   return 0;
17976 }
17977 _ACEOF
17978 rm -f conftest.$ac_objext
17979 if { (eval echo "$as_me:17979: \"$ac_compile\"") >&5
17980   (eval $ac_compile) 2>&5
17981   ac_status=$?
17982   echo "$as_me:17982: \$? = $ac_status" >&5
17983   (exit $ac_status); } &&
17984          { ac_try='test -s conftest.$ac_objext'
17985   { (eval echo "$as_me:17985: \"$ac_try\"") >&5
17986   (eval $ac_try) 2>&5
17987   ac_status=$?
17988   echo "$as_me:17988: \$? = $ac_status" >&5
17989   (exit $ac_status); }; }; then
17990   cf_cv_header_stdbool_h=1
17991 else
17992   echo "$as_me: failed program was:" >&5
17993 cat conftest.$ac_ext >&5
17994 cf_cv_header_stdbool_h=0
17995 fi
17996 rm -f conftest.$ac_objext conftest.$ac_ext
17997 fi
17998 rm -f conftest.$ac_objext conftest.$ac_ext
17999 fi
18000
18001 if test "$cf_cv_header_stdbool_h" = 1
18002 then    echo "$as_me:18002: result: yes" >&5
18003 echo "${ECHO_T}yes" >&6
18004 else    echo "$as_me:18004: result: no" >&5
18005 echo "${ECHO_T}no" >&6
18006 fi
18007
18008 echo "$as_me:18008: checking for builtin bool type" >&5
18009 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18010
18011 if test "${cf_cv_cc_bool_type+set}" = set; then
18012   echo $ECHO_N "(cached) $ECHO_C" >&6
18013 else
18014
18015         cat >conftest.$ac_ext <<_ACEOF
18016 #line 18016 "configure"
18017 #include "confdefs.h"
18018
18019 #include <stdio.h>
18020 #include <sys/types.h>
18021
18022 int
18023 main ()
18024 {
18025 bool x = false
18026   ;
18027   return 0;
18028 }
18029 _ACEOF
18030 rm -f conftest.$ac_objext
18031 if { (eval echo "$as_me:18031: \"$ac_compile\"") >&5
18032   (eval $ac_compile) 2>&5
18033   ac_status=$?
18034   echo "$as_me:18034: \$? = $ac_status" >&5
18035   (exit $ac_status); } &&
18036          { ac_try='test -s conftest.$ac_objext'
18037   { (eval echo "$as_me:18037: \"$ac_try\"") >&5
18038   (eval $ac_try) 2>&5
18039   ac_status=$?
18040   echo "$as_me:18040: \$? = $ac_status" >&5
18041   (exit $ac_status); }; }; then
18042   cf_cv_cc_bool_type=1
18043 else
18044   echo "$as_me: failed program was:" >&5
18045 cat conftest.$ac_ext >&5
18046 cf_cv_cc_bool_type=0
18047 fi
18048 rm -f conftest.$ac_objext conftest.$ac_ext
18049
18050 fi
18051
18052 if test "$cf_cv_cc_bool_type" = 1
18053 then    echo "$as_me:18053: result: yes" >&5
18054 echo "${ECHO_T}yes" >&6
18055 else    echo "$as_me:18055: result: no" >&5
18056 echo "${ECHO_T}no" >&6
18057 fi
18058
18059 # Check for C++ compiler characteristics (and ensure that it's there!)
18060 if test -n "$CXX" ; then
18061         ac_ext=cc
18062 ac_cpp='$CXXCPP $CPPFLAGS'
18063 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18064 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18065 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18066 ac_main_return=return
18067
18068 if test -n "$GXX" ; then
18069 case $cf_cv_system_name in #(vi
18070 os2*) #(vi
18071         cf_stdcpp_libname=stdcpp
18072         ;;
18073 *)
18074         cf_stdcpp_libname=stdc++
18075         ;;
18076 esac
18077 echo "$as_me:18077: checking for library $cf_stdcpp_libname" >&5
18078 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18079 if test "${cf_cv_libstdcpp+set}" = set; then
18080   echo $ECHO_N "(cached) $ECHO_C" >&6
18081 else
18082
18083         cf_save="$LIBS"
18084         LIBS="-l$cf_stdcpp_libname $LIBS"
18085 cat >conftest.$ac_ext <<_ACEOF
18086 #line 18086 "configure"
18087 #include "confdefs.h"
18088
18089 #include <strstream.h>
18090 int
18091 main ()
18092 {
18093
18094 char buf[80];
18095 strstreambuf foo(buf, sizeof(buf))
18096
18097   ;
18098   return 0;
18099 }
18100 _ACEOF
18101 rm -f conftest.$ac_objext conftest$ac_exeext
18102 if { (eval echo "$as_me:18102: \"$ac_link\"") >&5
18103   (eval $ac_link) 2>&5
18104   ac_status=$?
18105   echo "$as_me:18105: \$? = $ac_status" >&5
18106   (exit $ac_status); } &&
18107          { ac_try='test -s conftest$ac_exeext'
18108   { (eval echo "$as_me:18108: \"$ac_try\"") >&5
18109   (eval $ac_try) 2>&5
18110   ac_status=$?
18111   echo "$as_me:18111: \$? = $ac_status" >&5
18112   (exit $ac_status); }; }; then
18113   cf_cv_libstdcpp=yes
18114 else
18115   echo "$as_me: failed program was:" >&5
18116 cat conftest.$ac_ext >&5
18117 cf_cv_libstdcpp=no
18118 fi
18119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18120         LIBS="$cf_save"
18121
18122 fi
18123 echo "$as_me:18123: result: $cf_cv_libstdcpp" >&5
18124 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18125 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18126 fi
18127
18128         echo "$as_me:18128: checking whether $CXX understands -c and -o together" >&5
18129 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18130 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18131   echo $ECHO_N "(cached) $ECHO_C" >&6
18132 else
18133
18134 cat > conftest.$ac_ext <<CF_EOF
18135 #include <stdio.h>
18136 int main()
18137 {
18138         ${cf_cv_main_return:-return}(0);
18139 }
18140 CF_EOF
18141 # We do the test twice because some compilers refuse to overwrite an
18142 # existing .o file with -o, though they will create one.
18143 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18144 if { (eval echo "$as_me:18144: \"$ac_try\"") >&5
18145   (eval $ac_try) 2>&5
18146   ac_status=$?
18147   echo "$as_me:18147: \$? = $ac_status" >&5
18148   (exit $ac_status); } &&
18149   test -f conftest2.$ac_objext && { (eval echo "$as_me:18149: \"$ac_try\"") >&5
18150   (eval $ac_try) 2>&5
18151   ac_status=$?
18152   echo "$as_me:18152: \$? = $ac_status" >&5
18153   (exit $ac_status); };
18154 then
18155   eval cf_cv_prog_CXX_c_o=yes
18156 else
18157   eval cf_cv_prog_CXX_c_o=no
18158 fi
18159 rm -rf conftest*
18160
18161 fi
18162 if test $cf_cv_prog_CXX_c_o = yes; then
18163   echo "$as_me:18163: result: yes" >&5
18164 echo "${ECHO_T}yes" >&6
18165 else
18166   echo "$as_me:18166: result: no" >&5
18167 echo "${ECHO_T}no" >&6
18168 fi
18169
18170         case $GXX_VERSION in
18171         1*|2.0-6*)
18172                 cf_cxx_library=yes
18173                 ;;
18174         *-2.7*|2.7*)
18175
18176 cf_cxx_library=unknown
18177 case $cf_cv_system_name in #(vi
18178 os2*) #(vi
18179         cf_gpp_libname=gpp
18180         ;;
18181 *)
18182         cf_gpp_libname=g++
18183         ;;
18184 esac
18185 if test "$GXX" = yes; then
18186         echo "$as_me:18186: checking for lib$cf_gpp_libname" >&5
18187 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18188         cf_save="$LIBS"
18189         LIBS="-l$cf_gpp_libname $LIBS"
18190         cat >conftest.$ac_ext <<_ACEOF
18191 #line 18191 "configure"
18192 #include "confdefs.h"
18193
18194 #include <$cf_gpp_libname/builtin.h>
18195
18196 int
18197 main ()
18198 {
18199 two_arg_error_handler_t foo2 = lib_error_handler
18200   ;
18201   return 0;
18202 }
18203 _ACEOF
18204 rm -f conftest.$ac_objext conftest$ac_exeext
18205 if { (eval echo "$as_me:18205: \"$ac_link\"") >&5
18206   (eval $ac_link) 2>&5
18207   ac_status=$?
18208   echo "$as_me:18208: \$? = $ac_status" >&5
18209   (exit $ac_status); } &&
18210          { ac_try='test -s conftest$ac_exeext'
18211   { (eval echo "$as_me:18211: \"$ac_try\"") >&5
18212   (eval $ac_try) 2>&5
18213   ac_status=$?
18214   echo "$as_me:18214: \$? = $ac_status" >&5
18215   (exit $ac_status); }; }; then
18216   cf_cxx_library=yes
18217          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18218          if test "$cf_gpp_libname" = cpp ; then
18219             cat >>confdefs.h <<\EOF
18220 #define HAVE_GPP_BUILTIN_H 1
18221 EOF
18222
18223          else
18224             cat >>confdefs.h <<\EOF
18225 #define HAVE_GXX_BUILTIN_H 1
18226 EOF
18227
18228          fi
18229 else
18230   echo "$as_me: failed program was:" >&5
18231 cat conftest.$ac_ext >&5
18232 cat >conftest.$ac_ext <<_ACEOF
18233 #line 18233 "configure"
18234 #include "confdefs.h"
18235
18236 #include <builtin.h>
18237
18238 int
18239 main ()
18240 {
18241 two_arg_error_handler_t foo2 = lib_error_handler
18242   ;
18243   return 0;
18244 }
18245 _ACEOF
18246 rm -f conftest.$ac_objext conftest$ac_exeext
18247 if { (eval echo "$as_me:18247: \"$ac_link\"") >&5
18248   (eval $ac_link) 2>&5
18249   ac_status=$?
18250   echo "$as_me:18250: \$? = $ac_status" >&5
18251   (exit $ac_status); } &&
18252          { ac_try='test -s conftest$ac_exeext'
18253   { (eval echo "$as_me:18253: \"$ac_try\"") >&5
18254   (eval $ac_try) 2>&5
18255   ac_status=$?
18256   echo "$as_me:18256: \$? = $ac_status" >&5
18257   (exit $ac_status); }; }; then
18258   cf_cxx_library=yes
18259          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18260          cat >>confdefs.h <<\EOF
18261 #define HAVE_BUILTIN_H 1
18262 EOF
18263
18264 else
18265   echo "$as_me: failed program was:" >&5
18266 cat conftest.$ac_ext >&5
18267 cf_cxx_library=no
18268 fi
18269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18270 fi
18271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18272         LIBS="$cf_save"
18273         echo "$as_me:18273: result: $cf_cxx_library" >&5
18274 echo "${ECHO_T}$cf_cxx_library" >&6
18275 fi
18276
18277                 ;;
18278         *)
18279                 cf_cxx_library=no
18280                 ;;
18281         esac
18282
18283         ac_ext=cc
18284 ac_cpp='$CXXCPP $CPPFLAGS'
18285 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18286 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18287 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18288 ac_main_return=return
18289 echo "$as_me:18289: checking how to run the C++ preprocessor" >&5
18290 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18291 if test -z "$CXXCPP"; then
18292   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18293   echo $ECHO_N "(cached) $ECHO_C" >&6
18294 else
18295       # Double quotes because CXXCPP needs to be expanded
18296     for CXXCPP in "$CXX -E" "/lib/cpp"
18297     do
18298       ac_preproc_ok=false
18299 for ac_cxx_preproc_warn_flag in '' yes
18300 do
18301   # Use a header file that comes with gcc, so configuring glibc
18302   # with a fresh cross-compiler works.
18303   # On the NeXT, cc -E runs the code through the compiler's parser,
18304   # not just through cpp. "Syntax error" is here to catch this case.
18305   cat >conftest.$ac_ext <<_ACEOF
18306 #line 18306 "configure"
18307 #include "confdefs.h"
18308 #include <assert.h>
18309                      Syntax error
18310 _ACEOF
18311 if { (eval echo "$as_me:18311: \"$ac_cpp conftest.$ac_ext\"") >&5
18312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18313   ac_status=$?
18314   egrep -v '^ *\+' conftest.er1 >conftest.err
18315   rm -f conftest.er1
18316   cat conftest.err >&5
18317   echo "$as_me:18317: \$? = $ac_status" >&5
18318   (exit $ac_status); } >/dev/null; then
18319   if test -s conftest.err; then
18320     ac_cpp_err=$ac_cxx_preproc_warn_flag
18321   else
18322     ac_cpp_err=
18323   fi
18324 else
18325   ac_cpp_err=yes
18326 fi
18327 if test -z "$ac_cpp_err"; then
18328   :
18329 else
18330   echo "$as_me: failed program was:" >&5
18331   cat conftest.$ac_ext >&5
18332   # Broken: fails on valid input.
18333 continue
18334 fi
18335 rm -f conftest.err conftest.$ac_ext
18336
18337   # OK, works on sane cases.  Now check whether non-existent headers
18338   # can be detected and how.
18339   cat >conftest.$ac_ext <<_ACEOF
18340 #line 18340 "configure"
18341 #include "confdefs.h"
18342 #include <ac_nonexistent.h>
18343 _ACEOF
18344 if { (eval echo "$as_me:18344: \"$ac_cpp conftest.$ac_ext\"") >&5
18345   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18346   ac_status=$?
18347   egrep -v '^ *\+' conftest.er1 >conftest.err
18348   rm -f conftest.er1
18349   cat conftest.err >&5
18350   echo "$as_me:18350: \$? = $ac_status" >&5
18351   (exit $ac_status); } >/dev/null; then
18352   if test -s conftest.err; then
18353     ac_cpp_err=$ac_cxx_preproc_warn_flag
18354   else
18355     ac_cpp_err=
18356   fi
18357 else
18358   ac_cpp_err=yes
18359 fi
18360 if test -z "$ac_cpp_err"; then
18361   # Broken: success on invalid input.
18362 continue
18363 else
18364   echo "$as_me: failed program was:" >&5
18365   cat conftest.$ac_ext >&5
18366   # Passes both tests.
18367 ac_preproc_ok=:
18368 break
18369 fi
18370 rm -f conftest.err conftest.$ac_ext
18371
18372 done
18373 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18374 rm -f conftest.err conftest.$ac_ext
18375 if $ac_preproc_ok; then
18376   break
18377 fi
18378
18379     done
18380     ac_cv_prog_CXXCPP=$CXXCPP
18381
18382 fi
18383   CXXCPP=$ac_cv_prog_CXXCPP
18384 else
18385   ac_cv_prog_CXXCPP=$CXXCPP
18386 fi
18387 echo "$as_me:18387: result: $CXXCPP" >&5
18388 echo "${ECHO_T}$CXXCPP" >&6
18389 ac_preproc_ok=false
18390 for ac_cxx_preproc_warn_flag in '' yes
18391 do
18392   # Use a header file that comes with gcc, so configuring glibc
18393   # with a fresh cross-compiler works.
18394   # On the NeXT, cc -E runs the code through the compiler's parser,
18395   # not just through cpp. "Syntax error" is here to catch this case.
18396   cat >conftest.$ac_ext <<_ACEOF
18397 #line 18397 "configure"
18398 #include "confdefs.h"
18399 #include <assert.h>
18400                      Syntax error
18401 _ACEOF
18402 if { (eval echo "$as_me:18402: \"$ac_cpp conftest.$ac_ext\"") >&5
18403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18404   ac_status=$?
18405   egrep -v '^ *\+' conftest.er1 >conftest.err
18406   rm -f conftest.er1
18407   cat conftest.err >&5
18408   echo "$as_me:18408: \$? = $ac_status" >&5
18409   (exit $ac_status); } >/dev/null; then
18410   if test -s conftest.err; then
18411     ac_cpp_err=$ac_cxx_preproc_warn_flag
18412   else
18413     ac_cpp_err=
18414   fi
18415 else
18416   ac_cpp_err=yes
18417 fi
18418 if test -z "$ac_cpp_err"; then
18419   :
18420 else
18421   echo "$as_me: failed program was:" >&5
18422   cat conftest.$ac_ext >&5
18423   # Broken: fails on valid input.
18424 continue
18425 fi
18426 rm -f conftest.err conftest.$ac_ext
18427
18428   # OK, works on sane cases.  Now check whether non-existent headers
18429   # can be detected and how.
18430   cat >conftest.$ac_ext <<_ACEOF
18431 #line 18431 "configure"
18432 #include "confdefs.h"
18433 #include <ac_nonexistent.h>
18434 _ACEOF
18435 if { (eval echo "$as_me:18435: \"$ac_cpp conftest.$ac_ext\"") >&5
18436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18437   ac_status=$?
18438   egrep -v '^ *\+' conftest.er1 >conftest.err
18439   rm -f conftest.er1
18440   cat conftest.err >&5
18441   echo "$as_me:18441: \$? = $ac_status" >&5
18442   (exit $ac_status); } >/dev/null; then
18443   if test -s conftest.err; then
18444     ac_cpp_err=$ac_cxx_preproc_warn_flag
18445   else
18446     ac_cpp_err=
18447   fi
18448 else
18449   ac_cpp_err=yes
18450 fi
18451 if test -z "$ac_cpp_err"; then
18452   # Broken: success on invalid input.
18453 continue
18454 else
18455   echo "$as_me: failed program was:" >&5
18456   cat conftest.$ac_ext >&5
18457   # Passes both tests.
18458 ac_preproc_ok=:
18459 break
18460 fi
18461 rm -f conftest.err conftest.$ac_ext
18462
18463 done
18464 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18465 rm -f conftest.err conftest.$ac_ext
18466 if $ac_preproc_ok; then
18467   :
18468 else
18469   { { echo "$as_me:18469: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18470 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18471    { (exit 1); exit 1; }; }
18472 fi
18473
18474 ac_ext=cc
18475 ac_cpp='$CXXCPP $CPPFLAGS'
18476 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18477 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18478 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18479 ac_main_return=return
18480
18481 for ac_header in typeinfo
18482 do
18483 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18484 echo "$as_me:18484: checking for $ac_header" >&5
18485 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18486 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18487   echo $ECHO_N "(cached) $ECHO_C" >&6
18488 else
18489   cat >conftest.$ac_ext <<_ACEOF
18490 #line 18490 "configure"
18491 #include "confdefs.h"
18492 #include <$ac_header>
18493 _ACEOF
18494 if { (eval echo "$as_me:18494: \"$ac_cpp conftest.$ac_ext\"") >&5
18495   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18496   ac_status=$?
18497   egrep -v '^ *\+' conftest.er1 >conftest.err
18498   rm -f conftest.er1
18499   cat conftest.err >&5
18500   echo "$as_me:18500: \$? = $ac_status" >&5
18501   (exit $ac_status); } >/dev/null; then
18502   if test -s conftest.err; then
18503     ac_cpp_err=$ac_cxx_preproc_warn_flag
18504   else
18505     ac_cpp_err=
18506   fi
18507 else
18508   ac_cpp_err=yes
18509 fi
18510 if test -z "$ac_cpp_err"; then
18511   eval "$as_ac_Header=yes"
18512 else
18513   echo "$as_me: failed program was:" >&5
18514   cat conftest.$ac_ext >&5
18515   eval "$as_ac_Header=no"
18516 fi
18517 rm -f conftest.err conftest.$ac_ext
18518 fi
18519 echo "$as_me:18519: result: `eval echo '${'$as_ac_Header'}'`" >&5
18520 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18521 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18522   cat >>confdefs.h <<EOF
18523 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18524 EOF
18525
18526 fi
18527 done
18528
18529 for ac_header in iostream
18530 do
18531 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18532 echo "$as_me:18532: checking for $ac_header" >&5
18533 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18534 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18535   echo $ECHO_N "(cached) $ECHO_C" >&6
18536 else
18537   cat >conftest.$ac_ext <<_ACEOF
18538 #line 18538 "configure"
18539 #include "confdefs.h"
18540 #include <$ac_header>
18541 _ACEOF
18542 if { (eval echo "$as_me:18542: \"$ac_cpp conftest.$ac_ext\"") >&5
18543   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18544   ac_status=$?
18545   egrep -v '^ *\+' conftest.er1 >conftest.err
18546   rm -f conftest.er1
18547   cat conftest.err >&5
18548   echo "$as_me:18548: \$? = $ac_status" >&5
18549   (exit $ac_status); } >/dev/null; then
18550   if test -s conftest.err; then
18551     ac_cpp_err=$ac_cxx_preproc_warn_flag
18552   else
18553     ac_cpp_err=
18554   fi
18555 else
18556   ac_cpp_err=yes
18557 fi
18558 if test -z "$ac_cpp_err"; then
18559   eval "$as_ac_Header=yes"
18560 else
18561   echo "$as_me: failed program was:" >&5
18562   cat conftest.$ac_ext >&5
18563   eval "$as_ac_Header=no"
18564 fi
18565 rm -f conftest.err conftest.$ac_ext
18566 fi
18567 echo "$as_me:18567: result: `eval echo '${'$as_ac_Header'}'`" >&5
18568 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18569 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18570   cat >>confdefs.h <<EOF
18571 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18572 EOF
18573
18574 fi
18575 done
18576
18577 if test x"$ac_cv_header_iostream" = xyes ; then
18578         echo "$as_me:18578: checking if iostream uses std-namespace" >&5
18579 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18580         cat >conftest.$ac_ext <<_ACEOF
18581 #line 18581 "configure"
18582 #include "confdefs.h"
18583
18584 #include <iostream>
18585 using std::endl;
18586 using std::cerr;
18587 int
18588 main ()
18589 {
18590
18591 cerr << "testing" << endl;
18592
18593   ;
18594   return 0;
18595 }
18596 _ACEOF
18597 rm -f conftest.$ac_objext
18598 if { (eval echo "$as_me:18598: \"$ac_compile\"") >&5
18599   (eval $ac_compile) 2>&5
18600   ac_status=$?
18601   echo "$as_me:18601: \$? = $ac_status" >&5
18602   (exit $ac_status); } &&
18603          { ac_try='test -s conftest.$ac_objext'
18604   { (eval echo "$as_me:18604: \"$ac_try\"") >&5
18605   (eval $ac_try) 2>&5
18606   ac_status=$?
18607   echo "$as_me:18607: \$? = $ac_status" >&5
18608   (exit $ac_status); }; }; then
18609   cf_iostream_namespace=yes
18610 else
18611   echo "$as_me: failed program was:" >&5
18612 cat conftest.$ac_ext >&5
18613 cf_iostream_namespace=no
18614 fi
18615 rm -f conftest.$ac_objext conftest.$ac_ext
18616         echo "$as_me:18616: result: $cf_iostream_namespace" >&5
18617 echo "${ECHO_T}$cf_iostream_namespace" >&6
18618         if test "$cf_iostream_namespace" = yes ; then
18619                 cat >>confdefs.h <<\EOF
18620 #define IOSTREAM_NAMESPACE 1
18621 EOF
18622
18623         fi
18624 fi
18625
18626 echo "$as_me:18626: checking if we should include stdbool.h" >&5
18627 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18628
18629 if test "${cf_cv_header_stdbool_h+set}" = set; then
18630   echo $ECHO_N "(cached) $ECHO_C" >&6
18631 else
18632
18633         cat >conftest.$ac_ext <<_ACEOF
18634 #line 18634 "configure"
18635 #include "confdefs.h"
18636
18637 int
18638 main ()
18639 {
18640 bool foo = false
18641   ;
18642   return 0;
18643 }
18644 _ACEOF
18645 rm -f conftest.$ac_objext
18646 if { (eval echo "$as_me:18646: \"$ac_compile\"") >&5
18647   (eval $ac_compile) 2>&5
18648   ac_status=$?
18649   echo "$as_me:18649: \$? = $ac_status" >&5
18650   (exit $ac_status); } &&
18651          { ac_try='test -s conftest.$ac_objext'
18652   { (eval echo "$as_me:18652: \"$ac_try\"") >&5
18653   (eval $ac_try) 2>&5
18654   ac_status=$?
18655   echo "$as_me:18655: \$? = $ac_status" >&5
18656   (exit $ac_status); }; }; then
18657   cf_cv_header_stdbool_h=0
18658 else
18659   echo "$as_me: failed program was:" >&5
18660 cat conftest.$ac_ext >&5
18661 cat >conftest.$ac_ext <<_ACEOF
18662 #line 18662 "configure"
18663 #include "confdefs.h"
18664
18665 #ifndef __BEOS__
18666 #include <stdbool.h>
18667 #endif
18668
18669 int
18670 main ()
18671 {
18672 bool foo = false
18673   ;
18674   return 0;
18675 }
18676 _ACEOF
18677 rm -f conftest.$ac_objext
18678 if { (eval echo "$as_me:18678: \"$ac_compile\"") >&5
18679   (eval $ac_compile) 2>&5
18680   ac_status=$?
18681   echo "$as_me:18681: \$? = $ac_status" >&5
18682   (exit $ac_status); } &&
18683          { ac_try='test -s conftest.$ac_objext'
18684   { (eval echo "$as_me:18684: \"$ac_try\"") >&5
18685   (eval $ac_try) 2>&5
18686   ac_status=$?
18687   echo "$as_me:18687: \$? = $ac_status" >&5
18688   (exit $ac_status); }; }; then
18689   cf_cv_header_stdbool_h=1
18690 else
18691   echo "$as_me: failed program was:" >&5
18692 cat conftest.$ac_ext >&5
18693 cf_cv_header_stdbool_h=0
18694 fi
18695 rm -f conftest.$ac_objext conftest.$ac_ext
18696 fi
18697 rm -f conftest.$ac_objext conftest.$ac_ext
18698 fi
18699
18700 if test "$cf_cv_header_stdbool_h" = 1
18701 then    echo "$as_me:18701: result: yes" >&5
18702 echo "${ECHO_T}yes" >&6
18703 else    echo "$as_me:18703: result: no" >&5
18704 echo "${ECHO_T}no" >&6
18705 fi
18706
18707 echo "$as_me:18707: checking for builtin bool type" >&5
18708 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18709
18710 if test "${cf_cv_builtin_bool+set}" = set; then
18711   echo $ECHO_N "(cached) $ECHO_C" >&6
18712 else
18713
18714         cat >conftest.$ac_ext <<_ACEOF
18715 #line 18715 "configure"
18716 #include "confdefs.h"
18717
18718 #include <stdio.h>
18719 #include <sys/types.h>
18720
18721 int
18722 main ()
18723 {
18724 bool x = false
18725   ;
18726   return 0;
18727 }
18728 _ACEOF
18729 rm -f conftest.$ac_objext
18730 if { (eval echo "$as_me:18730: \"$ac_compile\"") >&5
18731   (eval $ac_compile) 2>&5
18732   ac_status=$?
18733   echo "$as_me:18733: \$? = $ac_status" >&5
18734   (exit $ac_status); } &&
18735          { ac_try='test -s conftest.$ac_objext'
18736   { (eval echo "$as_me:18736: \"$ac_try\"") >&5
18737   (eval $ac_try) 2>&5
18738   ac_status=$?
18739   echo "$as_me:18739: \$? = $ac_status" >&5
18740   (exit $ac_status); }; }; then
18741   cf_cv_builtin_bool=1
18742 else
18743   echo "$as_me: failed program was:" >&5
18744 cat conftest.$ac_ext >&5
18745 cf_cv_builtin_bool=0
18746 fi
18747 rm -f conftest.$ac_objext conftest.$ac_ext
18748
18749 fi
18750
18751 if test "$cf_cv_builtin_bool" = 1
18752 then    echo "$as_me:18752: result: yes" >&5
18753 echo "${ECHO_T}yes" >&6
18754 else    echo "$as_me:18754: result: no" >&5
18755 echo "${ECHO_T}no" >&6
18756 fi
18757
18758 echo "$as_me:18758: checking for size of bool" >&5
18759 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18760 if test "${cf_cv_type_of_bool+set}" = set; then
18761   echo $ECHO_N "(cached) $ECHO_C" >&6
18762 else
18763
18764         rm -f cf_test.out
18765         if test "$cross_compiling" = yes; then
18766   cf_cv_type_of_bool=unknown
18767 else
18768   cat >conftest.$ac_ext <<_ACEOF
18769 #line 18769 "configure"
18770 #include "confdefs.h"
18771
18772 #include <stdlib.h>
18773 #include <stdio.h>
18774
18775 #if defined(__cplusplus)
18776
18777 #ifdef HAVE_GXX_BUILTIN_H
18778 #include <g++/builtin.h>
18779 #elif HAVE_GPP_BUILTIN_H
18780 #include <gpp/builtin.h>
18781 #elif HAVE_BUILTIN_H
18782 #include <builtin.h>
18783 #endif
18784
18785 #else
18786
18787 #if $cf_cv_header_stdbool_h
18788 #include <stdbool.h>
18789 #endif
18790
18791 #endif
18792
18793 main()
18794 {
18795         FILE *fp = fopen("cf_test.out", "w");
18796         if (fp != 0) {
18797                 bool x = true;
18798                 if ((bool)(-x) >= 0)
18799                         fputs("unsigned ", fp);
18800                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18801                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18802                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18803                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18804                 fclose(fp);
18805         }
18806         ${cf_cv_main_return:-return}(0);
18807 }
18808
18809 _ACEOF
18810 rm -f conftest$ac_exeext
18811 if { (eval echo "$as_me:18811: \"$ac_link\"") >&5
18812   (eval $ac_link) 2>&5
18813   ac_status=$?
18814   echo "$as_me:18814: \$? = $ac_status" >&5
18815   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18816   { (eval echo "$as_me:18816: \"$ac_try\"") >&5
18817   (eval $ac_try) 2>&5
18818   ac_status=$?
18819   echo "$as_me:18819: \$? = $ac_status" >&5
18820   (exit $ac_status); }; }; then
18821   cf_cv_type_of_bool=`cat cf_test.out`
18822                  if test -z "$cf_cv_type_of_bool"; then
18823                    cf_cv_type_of_bool=unknown
18824                  fi
18825 else
18826   echo "$as_me: program exited with status $ac_status" >&5
18827 echo "$as_me: failed program was:" >&5
18828 cat conftest.$ac_ext >&5
18829 cf_cv_type_of_bool=unknown
18830 fi
18831 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18832 fi
18833
18834 fi
18835
18836         rm -f cf_test.out
18837 echo "$as_me:18837: result: $cf_cv_type_of_bool" >&5
18838 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18839 if test "$cf_cv_type_of_bool" = unknown ; then
18840         case .$NCURSES_BOOL in #(vi
18841         .auto|.) NCURSES_BOOL=unsigned;;
18842         esac
18843         { echo "$as_me:18843: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18844 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18845         cf_cv_type_of_bool=$NCURSES_BOOL
18846 fi
18847
18848 echo "$as_me:18848: checking for special defines needed for etip.h" >&5
18849 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18850 cf_save_CXXFLAGS="$CXXFLAGS"
18851 cf_result="none"
18852
18853 # etip.h includes ncurses.h which includes ncurses_dll.h
18854 # But ncurses_dll.h is generated - fix here.
18855 test -d include || mkdir include
18856 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' ${srcdir}/include/ncurses_dll.h.in >include/ncurses_dll.h
18857
18858 for cf_math in "" MATH_H
18859 do
18860 for cf_excp in "" MATH_EXCEPTION
18861 do
18862         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18863         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18864         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18865 cat >conftest.$ac_ext <<_ACEOF
18866 #line 18866 "configure"
18867 #include "confdefs.h"
18868
18869 #include <etip.h.in>
18870
18871 int
18872 main ()
18873 {
18874
18875   ;
18876   return 0;
18877 }
18878 _ACEOF
18879 rm -f conftest.$ac_objext
18880 if { (eval echo "$as_me:18880: \"$ac_compile\"") >&5
18881   (eval $ac_compile) 2>&5
18882   ac_status=$?
18883   echo "$as_me:18883: \$? = $ac_status" >&5
18884   (exit $ac_status); } &&
18885          { ac_try='test -s conftest.$ac_objext'
18886   { (eval echo "$as_me:18886: \"$ac_try\"") >&5
18887   (eval $ac_try) 2>&5
18888   ac_status=$?
18889   echo "$as_me:18889: \$? = $ac_status" >&5
18890   (exit $ac_status); }; }; then
18891
18892         test -n "$cf_math" && cat >>confdefs.h <<EOF
18893 #define ETIP_NEEDS_${cf_math} 1
18894 EOF
18895
18896         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18897 #define ETIP_NEEDS_${cf_excp} 1
18898 EOF
18899
18900         cf_result="$cf_math $cf_excp"
18901         break 2
18902
18903 else
18904   echo "$as_me: failed program was:" >&5
18905 cat conftest.$ac_ext >&5
18906 fi
18907 rm -f conftest.$ac_objext conftest.$ac_ext
18908 done
18909 done
18910 echo "$as_me:18910: result: $cf_result" >&5
18911 echo "${ECHO_T}$cf_result" >&6
18912 CXXFLAGS="$cf_save_CXXFLAGS"
18913
18914 if test -n "$CXX"; then
18915 echo "$as_me:18915: checking if $CXX accepts parameter initialization" >&5
18916 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18917 if test "${cf_cv_cpp_param_init+set}" = set; then
18918   echo $ECHO_N "(cached) $ECHO_C" >&6
18919 else
18920
18921         ac_ext=cc
18922 ac_cpp='$CXXCPP $CPPFLAGS'
18923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18926 ac_main_return=return
18927
18928         if test "$cross_compiling" = yes; then
18929   cf_cv_cpp_param_init=unknown
18930 else
18931   cat >conftest.$ac_ext <<_ACEOF
18932 #line 18932 "configure"
18933 #include "confdefs.h"
18934
18935 class TEST {
18936 private:
18937         int value;
18938 public:
18939         TEST(int x = 1);
18940         ~TEST();
18941 };
18942
18943 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18944 {
18945         value = x;
18946 }
18947 int main() { }
18948
18949 _ACEOF
18950 rm -f conftest$ac_exeext
18951 if { (eval echo "$as_me:18951: \"$ac_link\"") >&5
18952   (eval $ac_link) 2>&5
18953   ac_status=$?
18954   echo "$as_me:18954: \$? = $ac_status" >&5
18955   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18956   { (eval echo "$as_me:18956: \"$ac_try\"") >&5
18957   (eval $ac_try) 2>&5
18958   ac_status=$?
18959   echo "$as_me:18959: \$? = $ac_status" >&5
18960   (exit $ac_status); }; }; then
18961   cf_cv_cpp_param_init=yes
18962 else
18963   echo "$as_me: program exited with status $ac_status" >&5
18964 echo "$as_me: failed program was:" >&5
18965 cat conftest.$ac_ext >&5
18966 cf_cv_cpp_param_init=no
18967 fi
18968 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18969 fi
18970         ac_ext=cc
18971 ac_cpp='$CXXCPP $CPPFLAGS'
18972 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18973 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18974 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18975 ac_main_return=return
18976
18977 fi
18978 echo "$as_me:18978: result: $cf_cv_cpp_param_init" >&5
18979 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18980 fi
18981 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18982 #define CPP_HAS_PARAM_INIT 1
18983 EOF
18984
18985 if test -n "$CXX"; then
18986
18987 echo "$as_me:18987: checking if $CXX accepts static_cast" >&5
18988 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18989 if test "${cf_cv_cpp_static_cast+set}" = set; then
18990   echo $ECHO_N "(cached) $ECHO_C" >&6
18991 else
18992
18993         ac_ext=cc
18994 ac_cpp='$CXXCPP $CPPFLAGS'
18995 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18996 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18997 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18998 ac_main_return=return
18999
19000         cat >conftest.$ac_ext <<_ACEOF
19001 #line 19001 "configure"
19002 #include "confdefs.h"
19003
19004 class NCursesPanel
19005 {
19006 public:
19007   NCursesPanel(int nlines,
19008                int ncols,
19009                int begin_y = 0,
19010                int begin_x = 0)
19011   {
19012   }
19013
19014   ~NCursesPanel();
19015 };
19016
19017 template<class T> class NCursesUserPanel : public NCursesPanel
19018 {
19019 public:
19020   NCursesUserPanel (int nlines,
19021                     int ncols,
19022                     int begin_y = 0,
19023                     int begin_x = 0,
19024                     const T* p_UserData = static_cast<T*>(0))
19025     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19026   {
19027   };
19028   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19029   {
19030   };
19031
19032   virtual ~NCursesUserPanel() {};
19033 };
19034
19035 int
19036 main ()
19037 {
19038
19039         const char* p_UserData = static_cast<char*>(0)
19040   ;
19041   return 0;
19042 }
19043 _ACEOF
19044 rm -f conftest.$ac_objext
19045 if { (eval echo "$as_me:19045: \"$ac_compile\"") >&5
19046   (eval $ac_compile) 2>&5
19047   ac_status=$?
19048   echo "$as_me:19048: \$? = $ac_status" >&5
19049   (exit $ac_status); } &&
19050          { ac_try='test -s conftest.$ac_objext'
19051   { (eval echo "$as_me:19051: \"$ac_try\"") >&5
19052   (eval $ac_try) 2>&5
19053   ac_status=$?
19054   echo "$as_me:19054: \$? = $ac_status" >&5
19055   (exit $ac_status); }; }; then
19056   cf_cv_cpp_static_cast=yes
19057 else
19058   echo "$as_me: failed program was:" >&5
19059 cat conftest.$ac_ext >&5
19060 cf_cv_cpp_static_cast=no
19061 fi
19062 rm -f conftest.$ac_objext conftest.$ac_ext
19063
19064         ac_ext=cc
19065 ac_cpp='$CXXCPP $CPPFLAGS'
19066 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19067 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19068 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19069 ac_main_return=return
19070
19071 fi
19072 echo "$as_me:19072: result: $cf_cv_cpp_static_cast" >&5
19073 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19074
19075 fi
19076
19077 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
19078 #define CPP_HAS_STATIC_CAST 1
19079 EOF
19080
19081         CXX_AR='$(AR)'
19082         CXX_ARFLAGS='$(ARFLAGS)'
19083         case $cf_cv_system_name in #(vi
19084         irix*) #(vi
19085             if test "$GXX" != yes ; then
19086                 CXX_AR='$(CXX)'
19087                 CXX_ARFLAGS='-ar -o'
19088             fi
19089             ;;
19090         sco3.2v5*) #(vi
19091             CXXLDFLAGS="-u main"
19092             ;;
19093         solaris2*)
19094             if test "$GXX" != yes ; then
19095                 CXX_AR='$(CXX)'
19096                 CXX_ARFLAGS='-xar -o'
19097             fi
19098             ;;
19099         esac
19100
19101 else
19102         cf_cxx_library=no
19103         cf_cv_builtin_bool=1
19104
19105         # Just because we are not configuring against C++ right now does not
19106         # mean that a user will not want to use C++.  Some distributors disable
19107         # the C++ portion of this configuration as a shortcut (or just to avoid
19108         # compiling the demo in the c++ directory).  So we need a reasonable
19109         # default for the 'bool' type.
19110         #
19111         # Caveat: since the storage of the bool type is not standardized, it
19112         # may change.
19113
19114         if test "$NCURSES_BOOL" != auto ; then
19115                 cf_cv_type_of_bool=$NCURSES_BOOL
19116                 cf_cv_header_stdbool_h=0
19117         else
19118                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19119
19120 echo "$as_me:19120: checking for size of bool" >&5
19121 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19122 if test "${cf_cv_type_of_bool+set}" = set; then
19123   echo $ECHO_N "(cached) $ECHO_C" >&6
19124 else
19125
19126         rm -f cf_test.out
19127         if test "$cross_compiling" = yes; then
19128   cf_cv_type_of_bool=unknown
19129 else
19130   cat >conftest.$ac_ext <<_ACEOF
19131 #line 19131 "configure"
19132 #include "confdefs.h"
19133
19134 #include <stdlib.h>
19135 #include <stdio.h>
19136
19137 #if defined(__cplusplus)
19138
19139 #ifdef HAVE_GXX_BUILTIN_H
19140 #include <g++/builtin.h>
19141 #elif HAVE_GPP_BUILTIN_H
19142 #include <gpp/builtin.h>
19143 #elif HAVE_BUILTIN_H
19144 #include <builtin.h>
19145 #endif
19146
19147 #else
19148
19149 #if $cf_cv_header_stdbool_h
19150 #include <stdbool.h>
19151 #endif
19152
19153 #endif
19154
19155 main()
19156 {
19157         FILE *fp = fopen("cf_test.out", "w");
19158         if (fp != 0) {
19159                 bool x = true;
19160                 if ((bool)(-x) >= 0)
19161                         fputs("unsigned ", fp);
19162                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19163                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19164                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19165                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19166                 fclose(fp);
19167         }
19168         ${cf_cv_main_return:-return}(0);
19169 }
19170
19171 _ACEOF
19172 rm -f conftest$ac_exeext
19173 if { (eval echo "$as_me:19173: \"$ac_link\"") >&5
19174   (eval $ac_link) 2>&5
19175   ac_status=$?
19176   echo "$as_me:19176: \$? = $ac_status" >&5
19177   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19178   { (eval echo "$as_me:19178: \"$ac_try\"") >&5
19179   (eval $ac_try) 2>&5
19180   ac_status=$?
19181   echo "$as_me:19181: \$? = $ac_status" >&5
19182   (exit $ac_status); }; }; then
19183   cf_cv_type_of_bool=`cat cf_test.out`
19184                  if test -z "$cf_cv_type_of_bool"; then
19185                    cf_cv_type_of_bool=unknown
19186                  fi
19187 else
19188   echo "$as_me: program exited with status $ac_status" >&5
19189 echo "$as_me: failed program was:" >&5
19190 cat conftest.$ac_ext >&5
19191 cf_cv_type_of_bool=unknown
19192 fi
19193 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19194 fi
19195
19196 fi
19197
19198         rm -f cf_test.out
19199 echo "$as_me:19199: result: $cf_cv_type_of_bool" >&5
19200 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19201 if test "$cf_cv_type_of_bool" = unknown ; then
19202         case .$NCURSES_BOOL in #(vi
19203         .auto|.) NCURSES_BOOL=unsigned;;
19204         esac
19205         { echo "$as_me:19205: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19206 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19207         cf_cv_type_of_bool=$NCURSES_BOOL
19208 fi
19209
19210                 else
19211                         echo "$as_me:19211: checking for fallback type of bool" >&5
19212 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19213                         case "$host_cpu" in #(vi
19214                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19215                         *)      cf_cv_type_of_bool=int  ;;
19216                         esac
19217                         echo "$as_me:19217: result: $cf_cv_type_of_bool" >&5
19218 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19219                 fi
19220         fi
19221 fi
19222
19223 # If the C compiler did not declare bool, and we did not determine that the C++
19224 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19225 # ncurses library use the same type as C++ bool.  Note that this allows one to
19226 # specify the type of bool in a configure-script option and postpone
19227 # integration with the C++ compiler provided that the types are compatible.
19228 USE_CXX_BOOL=1
19229 if test $cf_cv_cc_bool_type = 1
19230 then
19231         # oops: C has a bool.  Unlikely, but C++ could differ.
19232         USE_CXX_BOOL=0
19233 elif test $cf_cv_builtin_bool = 0
19234 then
19235         # C++ has no bool
19236         USE_CXX_BOOL=0
19237 else
19238         # this is the normal case
19239         USE_CXX_BOOL='defined(__cplusplus)'
19240 fi
19241
19242 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19243
19244         if test "$cf_with_ada" != "no" ; then
19245                 if test "$with_libtool" != "no"; then
19246                         { echo "$as_me:19246: WARNING: libtool does not support Ada - disabling feature" >&5
19247 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19248                         cf_with_ada=no
19249                 fi
19250         fi
19251
19252         if test "$cf_with_ada" != "no" ; then
19253
19254 cf_ada_make=gnatmake
19255 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19256 set dummy $cf_ada_make; ac_word=$2
19257 echo "$as_me:19257: checking for $ac_word" >&5
19258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19259 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19260   echo $ECHO_N "(cached) $ECHO_C" >&6
19261 else
19262   if test -n "$gnat_exists"; then
19263   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19264 else
19265   ac_save_IFS=$IFS; IFS=$ac_path_separator
19266 ac_dummy="$PATH"
19267 for ac_dir in $ac_dummy; do
19268   IFS=$ac_save_IFS
19269   test -z "$ac_dir" && ac_dir=.
19270   $as_executable_p "$ac_dir/$ac_word" || continue
19271 ac_cv_prog_gnat_exists="yes"
19272 echo "$as_me:19272: found $ac_dir/$ac_word" >&5
19273 break
19274 done
19275
19276   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19277 fi
19278 fi
19279 gnat_exists=$ac_cv_prog_gnat_exists
19280 if test -n "$gnat_exists"; then
19281   echo "$as_me:19281: result: $gnat_exists" >&5
19282 echo "${ECHO_T}$gnat_exists" >&6
19283 else
19284   echo "$as_me:19284: result: no" >&5
19285 echo "${ECHO_T}no" >&6
19286 fi
19287
19288 if test "$ac_cv_prog_gnat_exists" = no; then
19289    cf_ada_make=
19290    cf_cv_prog_gnat_correct=no
19291 else
19292
19293 echo "$as_me:19293: checking for gnat version" >&5
19294 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19295 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19296         grep '[0-9].[0-9][0-9]*' |\
19297     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19298 echo "$as_me:19298: result: $cf_gnat_version" >&5
19299 echo "${ECHO_T}$cf_gnat_version" >&6
19300
19301 case $cf_gnat_version in #(vi
19302 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19303         cf_cv_prog_gnat_correct=yes
19304         ;;
19305 *)
19306         { echo "$as_me:19306: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19307 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19308         cf_cv_prog_gnat_correct=no
19309         ;;
19310 esac
19311
19312    # Extract the first word of "m4", so it can be a program name with args.
19313 set dummy m4; ac_word=$2
19314 echo "$as_me:19314: checking for $ac_word" >&5
19315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19316 if test "${ac_cv_prog_M4_exists+set}" = set; then
19317   echo $ECHO_N "(cached) $ECHO_C" >&6
19318 else
19319   if test -n "$M4_exists"; then
19320   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19321 else
19322   ac_save_IFS=$IFS; IFS=$ac_path_separator
19323 ac_dummy="$PATH"
19324 for ac_dir in $ac_dummy; do
19325   IFS=$ac_save_IFS
19326   test -z "$ac_dir" && ac_dir=.
19327   $as_executable_p "$ac_dir/$ac_word" || continue
19328 ac_cv_prog_M4_exists="yes"
19329 echo "$as_me:19329: found $ac_dir/$ac_word" >&5
19330 break
19331 done
19332
19333   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19334 fi
19335 fi
19336 M4_exists=$ac_cv_prog_M4_exists
19337 if test -n "$M4_exists"; then
19338   echo "$as_me:19338: result: $M4_exists" >&5
19339 echo "${ECHO_T}$M4_exists" >&6
19340 else
19341   echo "$as_me:19341: result: no" >&5
19342 echo "${ECHO_T}no" >&6
19343 fi
19344
19345    if test "$ac_cv_prog_M4_exists" = no; then
19346       cf_cv_prog_gnat_correct=no
19347       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19348    fi
19349    if test "$cf_cv_prog_gnat_correct" = yes; then
19350       echo "$as_me:19350: checking if GNAT works" >&5
19351 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19352
19353 rm -rf conftest* *~conftest*
19354 cat >>conftest.ads <<CF_EOF
19355 procedure conftest;
19356 CF_EOF
19357 cat >>conftest.adb <<CF_EOF
19358 with Text_IO;
19359 with GNAT.OS_Lib;
19360 procedure conftest is
19361 begin
19362    Text_IO.Put ("Hello World");
19363    Text_IO.New_Line;
19364    GNAT.OS_Lib.OS_Exit (0);
19365 end conftest;
19366 CF_EOF
19367 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19368    if ( ./conftest 1>&5 2>&1 ) ; then
19369       cf_cv_prog_gnat_correct=yes
19370    else
19371       cf_cv_prog_gnat_correct=no
19372    fi
19373 else
19374    cf_cv_prog_gnat_correct=no
19375 fi
19376 rm -rf conftest* *~conftest*
19377
19378       echo "$as_me:19378: result: $cf_cv_prog_gnat_correct" >&5
19379 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19380    fi
19381 fi
19382
19383                 if test "$cf_cv_prog_gnat_correct" = yes; then
19384
19385         ADAFLAGS="$ADAFLAGS -gnatpn"
19386
19387                         # make ADAFLAGS consistent with CFLAGS
19388                         case "$CFLAGS" in
19389                         *-g*)
19390
19391         ADAFLAGS="$ADAFLAGS -g"
19392
19393                                 ;;
19394                         esac
19395                         case "$CFLAGS" in
19396                         *-O*)
19397
19398         ADAFLAGS="$ADAFLAGS -O3"
19399
19400                                 ;;
19401                         esac
19402
19403 echo "$as_me:19403: checking if GNAT supports generics" >&5
19404 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19405 case $cf_gnat_version in #(vi
19406 3.[1-9]*|[4-9].*) #(vi
19407         cf_gnat_generics=yes
19408         ;;
19409 *)
19410         cf_gnat_generics=no
19411         ;;
19412 esac
19413 echo "$as_me:19413: result: $cf_gnat_generics" >&5
19414 echo "${ECHO_T}$cf_gnat_generics" >&6
19415
19416 if test "$cf_gnat_generics" = yes
19417 then
19418         cf_compile_generics=generics
19419         cf_generic_objects="\${GENOBJS}"
19420 else
19421         cf_compile_generics=
19422         cf_generic_objects=
19423 fi
19424
19425 echo "$as_me:19425: checking if GNAT supports SIGINT" >&5
19426 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19427 if test "${cf_cv_gnat_sigint+set}" = set; then
19428   echo $ECHO_N "(cached) $ECHO_C" >&6
19429 else
19430
19431 rm -rf conftest* *~conftest*
19432 cat >>conftest.ads <<CF_EOF
19433 with Ada.Interrupts.Names;
19434
19435 package ConfTest is
19436
19437    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19438    pragma Unreserve_All_Interrupts;
19439    pragma Warnings (On);
19440
19441    protected Process is
19442       procedure Stop;
19443       function Continue return Boolean;
19444       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19445    private
19446       Done : Boolean := False;
19447    end Process;
19448
19449 end ConfTest;
19450 CF_EOF
19451 cat >>conftest.adb <<CF_EOF
19452 package body ConfTest is
19453    protected body Process is
19454       procedure Stop is
19455       begin
19456          Done := True;
19457       end Stop;
19458       function Continue return Boolean is
19459       begin
19460          return not Done;
19461       end Continue;
19462    end Process;
19463 end ConfTest;
19464 CF_EOF
19465 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19466       cf_cv_gnat_sigint=yes
19467 else
19468    cf_cv_gnat_sigint=no
19469 fi
19470 rm -rf conftest* *~conftest*
19471
19472 fi
19473 echo "$as_me:19473: result: $cf_cv_gnat_sigint" >&5
19474 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19475
19476 if test $cf_cv_gnat_sigint = yes ; then
19477         USE_GNAT_SIGINT=""
19478 else
19479         USE_GNAT_SIGINT="#"
19480 fi
19481
19482 echo "$as_me:19482: checking if GNAT pragma Unreferenced works" >&5
19483 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19484 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19485   echo $ECHO_N "(cached) $ECHO_C" >&6
19486 else
19487
19488 rm -rf conftest* *~conftest*
19489 cat >>conftest.ads <<CF_EOF
19490 procedure conftest;
19491 CF_EOF
19492 cat >>conftest.adb <<CF_EOF
19493 with Text_IO;
19494 with GNAT.OS_Lib;
19495 procedure conftest is
19496    test : Integer;
19497    pragma Unreferenced (test);
19498 begin
19499    test := 1;
19500    Text_IO.Put ("Hello World");
19501    Text_IO.New_Line;
19502    GNAT.OS_Lib.OS_Exit (0);
19503 end conftest;
19504 CF_EOF
19505 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19506       cf_cv_pragma_unreferenced=yes
19507 else
19508    cf_cv_pragma_unreferenced=no
19509 fi
19510 rm -rf conftest* *~conftest*
19511
19512 fi
19513 echo "$as_me:19513: result: $cf_cv_pragma_unreferenced" >&5
19514 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19515
19516 # if the pragma is supported, use it (needed in the Trace code).
19517 if test $cf_cv_pragma_unreferenced = yes ; then
19518         PRAGMA_UNREF=TRUE
19519 else
19520         PRAGMA_UNREF=FALSE
19521 fi
19522
19523 cf_gnat_libraries=no
19524 cf_gnat_projects=no
19525
19526 echo "$as_me:19526: checking if GNAT supports project files" >&5
19527 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19528 case $cf_gnat_version in #(vi
19529 3.[0-9]*) #(vi
19530         ;;
19531 *)
19532         case $cf_cv_system_name in #(vi
19533         cygwin*) #(vi
19534                 ;;
19535         *)
19536                 mkdir conftest.src conftest.bin conftest.lib
19537                 cd conftest.src
19538                 rm -rf conftest* *~conftest*
19539                 cat >>library.gpr <<CF_EOF
19540 project Library is
19541   Kind := External ("LIB_KIND");
19542   for Library_Name use "ConfTest";
19543   for Object_Dir use ".";
19544   for Library_ALI_Dir use External("LIBRARY_DIR");
19545   for Library_Version use External ("SONAME");
19546   for Library_Kind use Kind;
19547   for Library_Dir use External("BUILD_DIR");
19548   Source_Dir := External ("SOURCE_DIR");
19549   for Source_Dirs use (Source_Dir);
19550   package Compiler is
19551      for Default_Switches ("Ada") use
19552        ("-g",
19553         "-O2",
19554         "-gnatafno",
19555         "-gnatVa",   -- All validity checks
19556         "-gnatwa");  -- Activate all optional errors
19557   end Compiler;
19558 end Library;
19559 CF_EOF
19560                 cat >>confpackage.ads <<CF_EOF
19561 package ConfPackage is
19562    procedure conftest;
19563 end ConfPackage;
19564 CF_EOF
19565                 cat >>confpackage.adb <<CF_EOF
19566 with Text_IO;
19567 package body ConfPackage is
19568    procedure conftest is
19569    begin
19570       Text_IO.Put ("Hello World");
19571       Text_IO.New_Line;
19572    end conftest;
19573 end ConfPackage;
19574 CF_EOF
19575                 if ( $cf_ada_make $ADAFLAGS \
19576                                 -Plibrary.gpr \
19577                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19578                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19579                                 -XSOURCE_DIR=`pwd` \
19580                                 -XSONAME=libConfTest.so.1 \
19581                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19582                         cf_gnat_projects=yes
19583                 fi
19584                 cd ..
19585                 if test -f conftest.lib/confpackage.ali
19586                 then
19587                         cf_gnat_libraries=yes
19588                 fi
19589                 rm -rf conftest* *~conftest*
19590                 ;;
19591         esac
19592         ;;
19593 esac
19594 echo "$as_me:19594: result: $cf_gnat_projects" >&5
19595 echo "${ECHO_T}$cf_gnat_projects" >&6
19596
19597 if test $cf_gnat_projects = yes
19598 then
19599         echo "$as_me:19599: checking if GNAT supports libraries" >&5
19600 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19601         echo "$as_me:19601: result: $cf_gnat_libraries" >&5
19602 echo "${ECHO_T}$cf_gnat_libraries" >&6
19603 fi
19604
19605 if test "$cf_gnat_projects" = yes
19606 then
19607         USE_OLD_MAKERULES="#"
19608         USE_GNAT_PROJECTS=""
19609 else
19610         USE_OLD_MAKERULES=""
19611         USE_GNAT_PROJECTS="#"
19612 fi
19613
19614 if test "$cf_gnat_libraries" = yes
19615 then
19616         USE_GNAT_LIBRARIES=""
19617 else
19618         USE_GNAT_LIBRARIES="#"
19619 fi
19620
19621 echo "$as_me:19621: checking for ada-compiler" >&5
19622 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19623
19624 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19625 if test "${with_ada_compiler+set}" = set; then
19626   withval="$with_ada_compiler"
19627   cf_ada_compiler=$withval
19628 else
19629   cf_ada_compiler=gnatmake
19630 fi;
19631
19632 echo "$as_me:19632: result: $cf_ada_compiler" >&5
19633 echo "${ECHO_T}$cf_ada_compiler" >&6
19634
19635                         cf_ada_package=terminal_interface
19636
19637 echo "$as_me:19637: checking for ada-include" >&5
19638 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19639
19640 # Check whether --with-ada-include or --without-ada-include was given.
19641 if test "${with_ada_include+set}" = set; then
19642   withval="$with_ada_include"
19643
19644 else
19645   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19646 fi; if test -n "$prefix/share/ada/adainclude" ; then
19647
19648 if test "x$prefix" != xNONE; then
19649   cf_path_syntax="$prefix"
19650 else
19651   cf_path_syntax="$ac_default_prefix"
19652 fi
19653
19654 case ".$withval" in #(vi
19655 .\$\(*\)*|.\'*\'*) #(vi
19656   ;;
19657 ..|./*|.\\*) #(vi
19658   ;;
19659 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19660   ;;
19661 .\${*prefix}*) #(vi
19662   eval withval="$withval"
19663   case ".$withval" in #(vi
19664   .NONE/*)
19665     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19666     ;;
19667   esac
19668   ;; #(vi
19669 .no|.NONE/*)
19670   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19671   ;;
19672 *)
19673   { { echo "$as_me:19673: error: expected a pathname, not \"$withval\"" >&5
19674 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19675    { (exit 1); exit 1; }; }
19676   ;;
19677 esac
19678
19679 fi
19680 ADA_INCLUDE="$withval"
19681
19682 echo "$as_me:19682: result: $ADA_INCLUDE" >&5
19683 echo "${ECHO_T}$ADA_INCLUDE" >&6
19684
19685 echo "$as_me:19685: checking for ada-objects" >&5
19686 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19687
19688 # Check whether --with-ada-objects or --without-ada-objects was given.
19689 if test "${with_ada_objects+set}" = set; then
19690   withval="$with_ada_objects"
19691
19692 else
19693   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19694 fi; if test -n "$prefix/lib/ada/adalib" ; then
19695
19696 if test "x$prefix" != xNONE; then
19697   cf_path_syntax="$prefix"
19698 else
19699   cf_path_syntax="$ac_default_prefix"
19700 fi
19701
19702 case ".$withval" in #(vi
19703 .\$\(*\)*|.\'*\'*) #(vi
19704   ;;
19705 ..|./*|.\\*) #(vi
19706   ;;
19707 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19708   ;;
19709 .\${*prefix}*) #(vi
19710   eval withval="$withval"
19711   case ".$withval" in #(vi
19712   .NONE/*)
19713     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19714     ;;
19715   esac
19716   ;; #(vi
19717 .no|.NONE/*)
19718   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19719   ;;
19720 *)
19721   { { echo "$as_me:19721: error: expected a pathname, not \"$withval\"" >&5
19722 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19723    { (exit 1); exit 1; }; }
19724   ;;
19725 esac
19726
19727 fi
19728 ADA_OBJECTS="$withval"
19729
19730 echo "$as_me:19730: result: $ADA_OBJECTS" >&5
19731 echo "${ECHO_T}$ADA_OBJECTS" >&6
19732
19733 echo "$as_me:19733: checking if an Ada95 shared-library should be built" >&5
19734 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19735
19736 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19737 if test "${with_ada_sharedlib+set}" = set; then
19738   withval="$with_ada_sharedlib"
19739   with_ada_sharedlib=$withval
19740 else
19741   with_ada_sharedlib=no
19742 fi;
19743 echo "$as_me:19743: result: $with_ada_sharedlib" >&5
19744 echo "${ECHO_T}$with_ada_sharedlib" >&6
19745
19746 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19747 MAKE_ADA_SHAREDLIB="#"
19748
19749 if test "x$with_ada_sharedlib" != xno
19750 then
19751         MAKE_ADA_SHAREDLIB=
19752         if test "x$with_ada_sharedlib" != xyes
19753         then
19754                 ADA_SHAREDLIB="$with_ada_sharedlib"
19755         fi
19756 fi
19757
19758                 fi
19759         fi
19760 else
19761         cf_with_ada=no
19762 fi
19763
19764 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19765 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19766 ###
19767 ### ticlib modules may be a separate library, otherwise contained in termlib.
19768 ### termlib modules may be a separate library, otherwise contained in ncurses.
19769 ###
19770 ### The of "+" or " " between the tokens controls the way the script
19771 ### chooses to split module lists into libraries.
19772 ###
19773 ### (see CF_LIB_RULES).
19774 echo "$as_me:19774: checking for library subsets" >&5
19775 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19776 LIB_SUBSETS=
19777
19778 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19779         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19780         if test "$with_ticlib" != no ; then
19781                 LIB_SUBSETS="${LIB_SUBSETS} "
19782         else
19783                 LIB_SUBSETS="${LIB_SUBSETS}+"
19784         fi
19785 fi
19786
19787 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19788 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19789
19790 if test "$with_termlib" != no ; then
19791         LIB_SUBSETS="${LIB_SUBSETS} "
19792 else
19793         LIB_SUBSETS="${LIB_SUBSETS}+"
19794 fi
19795
19796 LIB_SUBSETS="${LIB_SUBSETS}base"
19797
19798 # Most term-driver calls are to tinfo, but some like init_pair are to the
19799 # base library (so it resides in base).
19800 if test "$with_term_driver" != no ; then
19801         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19802         case $cf_cv_system_name in #(vi
19803         *mingw32*) #(vi
19804                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19805                 ;;
19806         *) #(vi
19807                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19808                 ;;
19809         esac
19810 fi
19811
19812 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19813 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19814
19815 echo "$as_me:19815: result: $LIB_SUBSETS" >&5
19816 echo "${ECHO_T}$LIB_SUBSETS" >&6
19817
19818 ### Construct the list of include-directories to be generated
19819
19820 CPPFLAGS="$CPPFLAGS -I. -I../include"
19821 if test "$srcdir" != "."; then
19822         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19823 fi
19824 if test "$GCC" != yes; then
19825         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19826 elif test "$includedir" != "/usr/include"; then
19827         if test "$includedir" = '${prefix}/include' ; then
19828                 if test $prefix != /usr ; then
19829                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19830                 fi
19831         else
19832                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19833         fi
19834 fi
19835
19836 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19837 if test "$srcdir" != "."; then
19838         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19839 fi
19840 if test "$GCC" != yes; then
19841         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19842 elif test "$includedir" != "/usr/include"; then
19843         if test "$includedir" = '${prefix}/include' ; then
19844                 if test $prefix != /usr ; then
19845                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19846                 fi
19847         else
19848                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19849         fi
19850 fi
19851
19852 ### Build up pieces for makefile rules
19853 echo "$as_me:19853: checking default library suffix" >&5
19854 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19855
19856         case $DFT_LWR_MODEL in
19857         libtool) DFT_ARG_SUFFIX=''   ;;
19858         normal)  DFT_ARG_SUFFIX=''   ;;
19859         debug)   DFT_ARG_SUFFIX='_g' ;;
19860         profile) DFT_ARG_SUFFIX='_p' ;;
19861         shared)  DFT_ARG_SUFFIX=''   ;;
19862         esac
19863         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19864 echo "$as_me:19864: result: $DFT_ARG_SUFFIX" >&5
19865 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19866
19867 echo "$as_me:19867: checking default library-dependency suffix" >&5
19868 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19869
19870         case $DFT_LWR_MODEL in #(vi
19871         libtool) #(vi
19872                 DFT_LIB_SUFFIX='.la'
19873                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19874                 ;;
19875         normal) #(vi
19876                 DFT_LIB_SUFFIX='.a'
19877                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19878                 ;;
19879         debug) #(vi
19880                 DFT_LIB_SUFFIX='_g.a'
19881                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19882                 ;;
19883         profile) #(vi
19884                 DFT_LIB_SUFFIX='_p.a'
19885                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19886                 ;;
19887         shared) #(vi
19888                 case $cf_cv_system_name in
19889                 aix[5-7]*) #(vi
19890                         DFT_LIB_SUFFIX='.a'
19891                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19892                         ;;
19893                 cygwin*|mingw*) #(vi
19894                         DFT_LIB_SUFFIX='.dll'
19895                         DFT_DEP_SUFFIX='.dll.a'
19896                         ;;
19897                 darwin*) #(vi
19898                         DFT_LIB_SUFFIX='.dylib'
19899                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19900                         ;;
19901                 hpux*) #(vi
19902                         case $target in
19903                         ia64*) #(vi
19904                                 DFT_LIB_SUFFIX='.so'
19905                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19906                                 ;;
19907                         *) #(vi
19908                                 DFT_LIB_SUFFIX='.sl'
19909                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19910                                 ;;
19911                         esac
19912                         ;;
19913                 *)      DFT_LIB_SUFFIX='.so'
19914                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19915                         ;;
19916                 esac
19917         esac
19918         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19919         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19920 echo "$as_me:19920: result: $DFT_DEP_SUFFIX" >&5
19921 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19922
19923 echo "$as_me:19923: checking default object directory" >&5
19924 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19925
19926         case $DFT_LWR_MODEL in
19927         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19928         normal)  DFT_OBJ_SUBDIR='objects' ;;
19929         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19930         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19931         shared)
19932                 case $cf_cv_system_name in #(vi
19933                 cygwin) #(vi
19934                         DFT_OBJ_SUBDIR='objects' ;;
19935                 *)
19936                         DFT_OBJ_SUBDIR='obj_s' ;;
19937                 esac
19938         esac
19939 echo "$as_me:19939: result: $DFT_OBJ_SUBDIR" >&5
19940 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19941
19942 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19943 if test "$cf_with_cxx" = yes ; then
19944 echo "$as_me:19944: checking c++ library-dependency suffix" >&5
19945 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19946 if test "$with_libtool" != "no"; then
19947         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19948 else
19949
19950         case normal in #(vi
19951         libtool) #(vi
19952                 CXX_LIB_SUFFIX='.la'
19953                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19954                 ;;
19955         normal) #(vi
19956                 CXX_LIB_SUFFIX='.a'
19957                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19958                 ;;
19959         debug) #(vi
19960                 CXX_LIB_SUFFIX='_g.a'
19961                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19962                 ;;
19963         profile) #(vi
19964                 CXX_LIB_SUFFIX='_p.a'
19965                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19966                 ;;
19967         shared) #(vi
19968                 case $cf_cv_system_name in
19969                 aix[5-7]*) #(vi
19970                         CXX_LIB_SUFFIX='.a'
19971                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19972                         ;;
19973                 cygwin*|mingw*) #(vi
19974                         CXX_LIB_SUFFIX='.dll'
19975                         CXX_DEP_SUFFIX='.dll.a'
19976                         ;;
19977                 darwin*) #(vi
19978                         CXX_LIB_SUFFIX='.dylib'
19979                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19980                         ;;
19981                 hpux*) #(vi
19982                         case $target in
19983                         ia64*) #(vi
19984                                 CXX_LIB_SUFFIX='.so'
19985                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19986                                 ;;
19987                         *) #(vi
19988                                 CXX_LIB_SUFFIX='.sl'
19989                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19990                                 ;;
19991                         esac
19992                         ;;
19993                 *)      CXX_LIB_SUFFIX='.so'
19994                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19995                         ;;
19996                 esac
19997         esac
19998         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19999         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20000 fi
20001 echo "$as_me:20001: result: $CXX_LIB_SUFFIX" >&5
20002 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20003
20004 fi
20005
20006 # do not want -ldl in build except as needed for -lncurses dependency
20007 if test "$with_dlsym" = yes ; then
20008 if test $DFT_LWR_MODEL = shared || \
20009    test $DFT_LWR_MODEL = libtool ; then
20010
20011 # remove dl library from $LIBS
20012 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20013
20014 fi
20015 fi
20016 ### Set up low-level terminfo dependencies for makefiles.
20017
20018 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20019 # do not need libdl
20020 TICS_LIST=
20021 if test "$with_dlsym" = yes ; then
20022
20023 # remove dl library from $SHLIB_LIST
20024 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20025
20026 fi
20027
20028 if test "$with_ticlib" != no ; then
20029
20030         if test "$with_ticlib" != yes ; then
20031                 TICS_NAME=$with_ticlib
20032                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20033                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20034                 TICS_LIB_SUFFIX="${with_ticlib}"
20035         else
20036                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20037                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20038                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20039         fi
20040         TICS_LDFLAGS="-L${LIB_DIR}"
20041         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20042 else
20043         TICS_LDFLAGS="-L${LIB_DIR}"
20044         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20045 fi
20046
20047 if test "$with_termlib" != no ; then
20048
20049         if test "$with_termlib" != yes ; then
20050                 TINFO_NAME=$with_termlib
20051                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20052                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20053                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20054                 TINFO_LIB_SUFFIX="${with_termlib}"
20055         else
20056                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20057                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20058                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20059                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20060         fi
20061
20062         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20063         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20064         if test "$DFT_LWR_MODEL" = "libtool"; then
20065                 TEST_ARGS="${TEST_DEPS}"
20066                 TEST_ARG2="${TEST_DEP2}"
20067                 TINFO_LDFLAGS="-L${LIB_DIR}"
20068                 TINFO_LIBS="$TEST_ARGS"
20069                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20070                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20071         else
20072                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20073                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20074                 if test "x$with_term_driver" != xno ; then
20075                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20076                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20077                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20078                 else
20079                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20080                         TINFO_LIBS="$TEST_ARGS"
20081                 fi
20082                 TINFO_LDFLAGS="-L${LIB_DIR}"
20083                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20084         fi
20085 else
20086         # the next lines are needed for linking libtic over libncurses
20087         TINFO_NAME=${LIB_NAME}
20088         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20089         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20090         if test "$with_tic_depends" = yes ; then
20091                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20092         else
20093                 TICS_LIST="$SHLIB_LIST"
20094         fi
20095
20096         TINFO_LDFLAGS="-L${LIB_DIR}"
20097         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20098 fi
20099
20100 if test "$DFT_LWR_MODEL" = shared ; then
20101         case $cf_cv_system_name in #(vi
20102         cygwin*)
20103                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20104                 TINFO_SUFFIX=.dll
20105                 ;;
20106         esac
20107 fi
20108
20109 if test "$with_dlsym" = yes ; then
20110
20111 # remove dl library from $TICS_LIST
20112 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20113
20114 fi
20115
20116 if test "$DFT_LWR_MODEL" = "libtool"; then
20117     OBJEXT=lo
20118 fi
20119
20120 # needed for Ada95
20121 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20122
20123 case $DFT_LWR_MODEL in
20124 normal|debug|profile)
20125
20126 if test "$GCC" = yes ; then
20127         case $cf_cv_system_name in #(
20128         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20129                 LDFLAGS_STATIC=
20130                 LDFLAGS_SHARED=
20131                 ;;
20132     *)  #( normally, except when broken
20133         LDFLAGS_STATIC=-static
20134         LDFLAGS_SHARED=-dynamic
20135         ;;
20136     esac
20137 else
20138         case $cf_cv_system_name in #(
20139         aix[4-7]*)      #( from ld manpage
20140                 LDFLAGS_STATIC=-bstatic
20141                 LDFLAGS_SHARED=-bdynamic
20142                 ;;
20143         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20144                 # We could also use just "archive" and "shared".
20145                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20146                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20147                 ;;
20148         irix*)          #( from ld manpage IRIX64
20149                 LDFLAGS_STATIC=-Bstatic
20150                 LDFLAGS_SHARED=-Bdynamic
20151                 ;;
20152         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20153                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20154                 LDFLAGS_STATIC=-noso
20155                 LDFLAGS_SHARED=-so_archive
20156                 ;;
20157         solaris2*)
20158                 LDFLAGS_STATIC=-Bstatic
20159                 LDFLAGS_SHARED=-Bdynamic
20160                 ;;
20161         esac
20162 fi
20163
20164 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20165 then
20166         echo "$as_me:20166: checking if linker supports switching between static/dynamic" >&5
20167 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20168
20169         rm -f libconftest.a
20170         cat >conftest.$ac_ext <<EOF
20171 #line 20171 "configure"
20172 #include <stdio.h>
20173 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20174 EOF
20175         if { (eval echo "$as_me:20175: \"$ac_compile\"") >&5
20176   (eval $ac_compile) 2>&5
20177   ac_status=$?
20178   echo "$as_me:20178: \$? = $ac_status" >&5
20179   (exit $ac_status); } ; then
20180                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20181                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20182         fi
20183         rm -f conftest.*
20184
20185         cf_save_LIBS="$LIBS"
20186
20187         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20188         cat >conftest.$ac_ext <<_ACEOF
20189 #line 20189 "configure"
20190 #include "confdefs.h"
20191
20192 #line 20192 "configure"
20193 #include <stdio.h>
20194 int cf_ldflags_static(FILE *fp);
20195
20196 int
20197 main ()
20198 {
20199
20200         return cf_ldflags_static(stdin);
20201
20202   ;
20203   return 0;
20204 }
20205 _ACEOF
20206 rm -f conftest.$ac_objext conftest$ac_exeext
20207 if { (eval echo "$as_me:20207: \"$ac_link\"") >&5
20208   (eval $ac_link) 2>&5
20209   ac_status=$?
20210   echo "$as_me:20210: \$? = $ac_status" >&5
20211   (exit $ac_status); } &&
20212          { ac_try='test -s conftest$ac_exeext'
20213   { (eval echo "$as_me:20213: \"$ac_try\"") >&5
20214   (eval $ac_try) 2>&5
20215   ac_status=$?
20216   echo "$as_me:20216: \$? = $ac_status" >&5
20217   (exit $ac_status); }; }; then
20218
20219         # some linkers simply ignore the -dynamic
20220         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20221         *static*) # (vi
20222                 cf_ldflags_static=no
20223                 ;;
20224         *)
20225                 cf_ldflags_static=yes
20226                 ;;
20227         esac
20228
20229 else
20230   echo "$as_me: failed program was:" >&5
20231 cat conftest.$ac_ext >&5
20232 cf_ldflags_static=no
20233 fi
20234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20235
20236         rm -f libconftest.*
20237         LIBS="$cf_save_LIBS"
20238
20239         echo "$as_me:20239: result: $cf_ldflags_static" >&5
20240 echo "${ECHO_T}$cf_ldflags_static" >&6
20241
20242         if test $cf_ldflags_static != yes
20243         then
20244                 LDFLAGS_STATIC=
20245                 LDFLAGS_SHARED=
20246         fi
20247 else
20248         LDFLAGS_STATIC=
20249         LDFLAGS_SHARED=
20250 fi
20251
20252         ;;
20253 esac
20254
20255 echo "$as_me:20255: checking where we will install curses.h" >&5
20256 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20257 test "$with_overwrite" = no && \
20258 test "x$includedir" = 'x${prefix}/include' && \
20259         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20260 echo "$as_me:20260: result: $includedir" >&5
20261 echo "${ECHO_T}$includedir" >&6
20262
20263 ### Resolve a conflict between normal and wide-curses by forcing applications
20264 ### that will need libutf8 to add it to their configure script.
20265 if test "$with_overwrite" != no ; then
20266 if test "$NCURSES_LIBUTF8" = 1 ; then
20267         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20268         { echo "$as_me:20268: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20269 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20270 fi
20271 fi
20272 WITH_OVERWRITE=$with_overwrite
20273
20274 # used to separate tack out of the tree
20275 NCURSES_TREE=
20276
20277 ### predefined stuff for the test programs
20278 cat >>confdefs.h <<\EOF
20279 #define HAVE_SLK_COLOR 1
20280 EOF
20281
20282 ### Construct the list of subdirectories for which we'll customize makefiles
20283 ### with the appropriate compile-rules.
20284
20285 echo "$as_me:20285: checking for src modules" >&5
20286 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20287
20288 # dependencies and linker-arguments for test-programs
20289 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20290 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20291 if test "$DFT_LWR_MODEL" = "libtool"; then
20292         TEST_ARGS="${TEST_DEPS}"
20293         TEST_ARG2="${TEST_DEP2}"
20294 else
20295         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20296         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20297 fi
20298
20299 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20300 cf_cv_src_modules=
20301 for cf_dir in $modules_to_build
20302 do
20303         if test -f $srcdir/$cf_dir/modules; then
20304
20305                 # We may/may not have tack in the distribution, though the
20306                 # makefile is.
20307                 if test $cf_dir = tack ; then
20308                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20309                                 continue
20310                         fi
20311                 fi
20312
20313                 if test -z "$cf_cv_src_modules"; then
20314                         cf_cv_src_modules=$cf_dir
20315                 else
20316                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20317                 fi
20318
20319                 # Make the ncurses_cfg.h file record the library interface files as
20320                 # well.  These are header files that are the same name as their
20321                 # directory.  Ncurses is the only library that does not follow
20322                 # that pattern.
20323                 if test $cf_dir = tack ; then
20324                         continue
20325                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20326
20327 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20328
20329                         cat >>confdefs.h <<EOF
20330 #define HAVE_${cf_have_include}_H 1
20331 EOF
20332
20333                         cat >>confdefs.h <<EOF
20334 #define HAVE_LIB${cf_have_include} 1
20335 EOF
20336
20337                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20338                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20339                         if test "$DFT_LWR_MODEL" = "libtool"; then
20340                                 TEST_ARGS="${TEST_DEPS}"
20341                                 TEST_ARG2="${TEST_DEP2}"
20342                         else
20343                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20344                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20345                         fi
20346                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20347                 fi
20348         fi
20349 done
20350 echo "$as_me:20350: result: $cf_cv_src_modules" >&5
20351 echo "${ECHO_T}$cf_cv_src_modules" >&6
20352
20353 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20354 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20355
20356 SRC_SUBDIRS=
20357 if test "x$cf_with_manpages" != xno ; then
20358         SRC_SUBDIRS="$SRC_SUBDIRS man"
20359 fi
20360 SRC_SUBDIRS="$SRC_SUBDIRS include"
20361 for cf_dir in $cf_cv_src_modules
20362 do
20363         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20364 done
20365 if test "x$cf_with_tests" != "xno" ; then
20366         SRC_SUBDIRS="$SRC_SUBDIRS test"
20367 fi
20368 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20369 if test "$cf_with_cxx_binding" != no; then
20370         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20371         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20372 fi
20373
20374 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20375 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20376
20377 ADA_SUBDIRS=
20378 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20379         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20380         ADA_SUBDIRS="gen src"
20381         if test "x$cf_with_tests" != "xno" ; then
20382                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20383         fi
20384 fi
20385
20386 SUB_MAKEFILES=
20387 for cf_dir in $SRC_SUBDIRS
20388 do
20389         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20390 done
20391
20392 if test -n "$ADA_SUBDIRS"; then
20393         for cf_dir in $ADA_SUBDIRS
20394         do
20395                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20396         done
20397
20398 fi
20399
20400 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20401    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20402    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20403 fi
20404
20405 DIRS_TO_MAKE="lib"
20406 for cf_item in $cf_list_models
20407 do
20408
20409         case $cf_item in
20410         libtool) cf_subdir='obj_lo'  ;;
20411         normal)  cf_subdir='objects' ;;
20412         debug)   cf_subdir='obj_g' ;;
20413         profile) cf_subdir='obj_p' ;;
20414         shared)
20415                 case $cf_cv_system_name in #(vi
20416                 cygwin) #(vi
20417                         cf_subdir='objects' ;;
20418                 *)
20419                         cf_subdir='obj_s' ;;
20420                 esac
20421         esac
20422
20423         for cf_item2 in $DIRS_TO_MAKE
20424         do
20425                 test $cf_item2 = $cf_subdir && break
20426         done
20427         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20428 done
20429 for cf_dir in $DIRS_TO_MAKE
20430 do
20431         test ! -d $cf_dir && mkdir $cf_dir
20432 done
20433
20434 # symbols that differ when compiling Ada95 by itself.
20435 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20436
20437 # values to use as strings
20438 cat >>confdefs.h <<EOF
20439 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20440 EOF
20441
20442 cat >>confdefs.h <<EOF
20443 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20444 EOF
20445
20446 ### Now that we're done running tests, add the compiler-warnings, if any
20447
20448 cf_fix_cppflags=no
20449 cf_new_cflags=
20450 cf_new_cppflags=
20451 cf_new_extra_cppflags=
20452
20453 for cf_add_cflags in $EXTRA_CFLAGS
20454 do
20455 case $cf_fix_cppflags in
20456 no)
20457         case $cf_add_cflags in #(vi
20458         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20459                 case $cf_add_cflags in
20460                 -D*)
20461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20462
20463                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20464                                 && test -z "${cf_tst_cflags}" \
20465                                 && cf_fix_cppflags=yes
20466
20467                         if test $cf_fix_cppflags = yes ; then
20468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20469                                 continue
20470                         elif test "${cf_tst_cflags}" = "\"'" ; then
20471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20472                                 continue
20473                         fi
20474                         ;;
20475                 esac
20476                 case "$CPPFLAGS" in
20477                 *$cf_add_cflags) #(vi
20478                         ;;
20479                 *) #(vi
20480                         case $cf_add_cflags in #(vi
20481                         -D*)
20482                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20483
20484 CPPFLAGS=`echo "$CPPFLAGS" | \
20485         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20486                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20487
20488                                 ;;
20489                         esac
20490                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20491                         ;;
20492                 esac
20493                 ;;
20494         *)
20495                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20496                 ;;
20497         esac
20498         ;;
20499 yes)
20500         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20501
20502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20503
20504         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20505                 && test -z "${cf_tst_cflags}" \
20506                 && cf_fix_cppflags=no
20507         ;;
20508 esac
20509 done
20510
20511 if test -n "$cf_new_cflags" ; then
20512
20513         CFLAGS="$CFLAGS $cf_new_cflags"
20514 fi
20515
20516 if test -n "$cf_new_cppflags" ; then
20517
20518         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20519 fi
20520
20521 if test -n "$cf_new_extra_cppflags" ; then
20522
20523         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20524 fi
20525
20526 ### Define substitutions for header files to avoid name-pollution
20527
20528 if test "$cf_cv_have_tcgetattr" = yes ; then
20529         HAVE_TCGETATTR=1
20530 else
20531         HAVE_TCGETATTR=0
20532 fi
20533
20534 if test "$ac_cv_header_termio_h" = yes ; then
20535         HAVE_TERMIO_H=1
20536 else
20537         HAVE_TERMIO_H=0
20538 fi
20539
20540 if test "$ac_cv_header_termios_h" = yes ; then
20541         HAVE_TERMIOS_H=1
20542 else
20543         HAVE_TERMIOS_H=0
20544 fi
20545
20546 ################################################################################
20547 test "$use_database" = yes && \
20548 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20549
20550 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20551 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20552
20553 if test x"$enable_pc_files" = xyes ; then \
20554 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20555 MAKE_PC_FILES=
20556 else
20557 MAKE_PC_FILES="#"
20558 fi
20559
20560 # Extract the first word of "tic", so it can be a program name with args.
20561 set dummy tic; ac_word=$2
20562 echo "$as_me:20562: checking for $ac_word" >&5
20563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20564 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20565   echo $ECHO_N "(cached) $ECHO_C" >&6
20566 else
20567   case $TIC_PATH in
20568   [\\/]* | ?:[\\/]*)
20569   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20570   ;;
20571   *)
20572   ac_save_IFS=$IFS; IFS=$ac_path_separator
20573 ac_dummy="$PATH:/usr/local/ncurses/bin"
20574 for ac_dir in $ac_dummy; do
20575   IFS=$ac_save_IFS
20576   test -z "$ac_dir" && ac_dir=.
20577   if $as_executable_p "$ac_dir/$ac_word"; then
20578    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20579    echo "$as_me:20579: found $ac_dir/$ac_word" >&5
20580    break
20581 fi
20582 done
20583
20584   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20585   ;;
20586 esac
20587 fi
20588 TIC_PATH=$ac_cv_path_TIC_PATH
20589
20590 if test -n "$TIC_PATH"; then
20591   echo "$as_me:20591: result: $TIC_PATH" >&5
20592 echo "${ECHO_T}$TIC_PATH" >&6
20593 else
20594   echo "$as_me:20594: result: no" >&5
20595 echo "${ECHO_T}no" >&6
20596 fi
20597
20598 if test -n "$FALLBACK_LIST"
20599 then
20600         if test "$TIC_PATH" = unknown
20601         then
20602                 { echo "$as_me:20602: WARNING: no tic program found for fallbacks" >&5
20603 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20604         fi
20605 fi
20606
20607 if test "x$cf_with_tests" != xno ; then
20608         MAKE_TESTS=
20609 else
20610         MAKE_TESTS="#"
20611 fi
20612
20613 ADAHTML_DIR=../../doc/html/ada
20614
20615 SUB_SCRIPTS=
20616
20617 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
20618 ac_config_commands="$ac_config_commands default"
20619 cat >confcache <<\_ACEOF
20620 # This file is a shell script that caches the results of configure
20621 # tests run on this system so they can be shared between configure
20622 # scripts and configure runs, see configure's option --config-cache.
20623 # It is not useful on other systems.  If it contains results you don't
20624 # want to keep, you may remove or edit it.
20625 #
20626 # config.status only pays attention to the cache file if you give it
20627 # the --recheck option to rerun configure.
20628 #
20629 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20630 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20631 # following values.
20632
20633 _ACEOF
20634
20635 # The following way of writing the cache mishandles newlines in values,
20636 # but we know of no workaround that is simple, portable, and efficient.
20637 # So, don't put newlines in cache variables' values.
20638 # Ultrix sh set writes to stderr and can't be redirected directly,
20639 # and sets the high bit in the cache file unless we assign to the vars.
20640 {
20641   (set) 2>&1 |
20642     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20643     *ac_space=\ *)
20644       # `set' does not quote correctly, so add quotes (double-quote
20645       # substitution turns \\\\ into \\, and sed turns \\ into \).
20646       sed -n \
20647         "s/'/'\\\\''/g;
20648           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20649       ;;
20650     *)
20651       # `set' quotes correctly as required by POSIX, so do not add quotes.
20652       sed -n \
20653         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20654       ;;
20655     esac;
20656 } |
20657   sed '
20658      t clear
20659      : clear
20660      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20661      t end
20662      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20663      : end' >>confcache
20664 if cmp -s $cache_file confcache; then :; else
20665   if test -w $cache_file; then
20666     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20667     cat confcache >$cache_file
20668   else
20669     echo "not updating unwritable cache $cache_file"
20670   fi
20671 fi
20672 rm -f confcache
20673
20674 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20675 # Let make expand exec_prefix.
20676 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20677
20678 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20679 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20680 # trailing colons and then remove the whole line if VPATH becomes empty
20681 # (actually we leave an empty line to preserve line numbers).
20682 if test "x$srcdir" = x.; then
20683   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20684 s/:*\$(srcdir):*/:/;
20685 s/:*\${srcdir}:*/:/;
20686 s/:*@srcdir@:*/:/;
20687 s/^\([^=]*=[    ]*\):*/\1/;
20688 s/:*$//;
20689 s/^[^=]*=[      ]*$//;
20690 }'
20691 fi
20692
20693 DEFS=-DHAVE_CONFIG_H
20694
20695 : ${CONFIG_STATUS=./config.status}
20696 ac_clean_files_save=$ac_clean_files
20697 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20698 { echo "$as_me:20698: creating $CONFIG_STATUS" >&5
20699 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20700 cat >$CONFIG_STATUS <<_ACEOF
20701 #! $SHELL
20702 # Generated automatically by configure.
20703 # Run this file to recreate the current configuration.
20704 # Compiler output produced by configure, useful for debugging
20705 # configure, is in config.log if it exists.
20706
20707 debug=false
20708 SHELL=\${CONFIG_SHELL-$SHELL}
20709 ac_cs_invocation="\$0 \$@"
20710
20711 _ACEOF
20712
20713 cat >>$CONFIG_STATUS <<\_ACEOF
20714 # Be Bourne compatible
20715 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20716   emulate sh
20717   NULLCMD=:
20718 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20719   set -o posix
20720 fi
20721
20722 # Name of the executable.
20723 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20724
20725 if expr a : '\(a\)' >/dev/null 2>&1; then
20726   as_expr=expr
20727 else
20728   as_expr=false
20729 fi
20730
20731 rm -f conf$$ conf$$.exe conf$$.file
20732 echo >conf$$.file
20733 if ln -s conf$$.file conf$$ 2>/dev/null; then
20734   # We could just check for DJGPP; but this test a) works b) is more generic
20735   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20736   if test -f conf$$.exe; then
20737     # Don't use ln at all; we don't have any links
20738     as_ln_s='cp -p'
20739   else
20740     as_ln_s='ln -s'
20741   fi
20742 elif ln conf$$.file conf$$ 2>/dev/null; then
20743   as_ln_s=ln
20744 else
20745   as_ln_s='cp -p'
20746 fi
20747 rm -f conf$$ conf$$.exe conf$$.file
20748
20749 as_executable_p="test -f"
20750
20751 # Support unset when possible.
20752 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20753   as_unset=unset
20754 else
20755   as_unset=false
20756 fi
20757
20758 # NLS nuisances.
20759 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20760 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20761 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20762 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20763 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20764 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20765 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20766 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20767
20768 # IFS
20769 # We need space, tab and new line, in precisely that order.
20770 as_nl='
20771 '
20772 IFS="   $as_nl"
20773
20774 # CDPATH.
20775 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20776
20777 exec 6>&1
20778
20779 _ACEOF
20780
20781 # Files that config.status was made for.
20782 if test -n "$ac_config_files"; then
20783   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20784 fi
20785
20786 if test -n "$ac_config_headers"; then
20787   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20788 fi
20789
20790 if test -n "$ac_config_links"; then
20791   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20792 fi
20793
20794 if test -n "$ac_config_commands"; then
20795   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20796 fi
20797
20798 cat >>$CONFIG_STATUS <<\EOF
20799
20800 ac_cs_usage="\
20801 \`$as_me' instantiates files from templates according to the
20802 current configuration.
20803
20804 Usage: $0 [OPTIONS] [FILE]...
20805
20806   -h, --help       print this help, then exit
20807   -V, --version    print version number, then exit
20808   -d, --debug      don't remove temporary files
20809       --recheck    update $as_me by reconfiguring in the same conditions
20810   --file=FILE[:TEMPLATE]
20811                    instantiate the configuration file FILE
20812   --header=FILE[:TEMPLATE]
20813                    instantiate the configuration header FILE
20814
20815 Configuration files:
20816 $config_files
20817
20818 Configuration headers:
20819 $config_headers
20820
20821 Configuration commands:
20822 $config_commands
20823
20824 Report bugs to <dickey@invisible-island.net>."
20825 EOF
20826
20827 cat >>$CONFIG_STATUS <<EOF
20828 ac_cs_version="\\
20829 config.status
20830 configured by $0, generated by GNU Autoconf 2.52.20101002,
20831   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20832
20833 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20834 Free Software Foundation, Inc.
20835 This config.status script is free software; the Free Software Foundation
20836 gives unlimited permission to copy, distribute and modify it."
20837 srcdir=$srcdir
20838 INSTALL="$INSTALL"
20839 EOF
20840
20841 cat >>$CONFIG_STATUS <<\EOF
20842 # If no file are specified by the user, then we need to provide default
20843 # value.  By we need to know if files were specified by the user.
20844 ac_need_defaults=:
20845 while test $# != 0
20846 do
20847   case $1 in
20848   --*=*)
20849     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20850     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20851     shift
20852     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20853     shift
20854     ;;
20855   -*);;
20856   *) # This is not an option, so the user has probably given explicit
20857      # arguments.
20858      ac_need_defaults=false;;
20859   esac
20860
20861   case $1 in
20862   # Handling of the options.
20863 EOF
20864 cat >>$CONFIG_STATUS <<EOF
20865   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20866     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20867     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20868 EOF
20869 cat >>$CONFIG_STATUS <<\EOF
20870   --version | --vers* | -V )
20871     echo "$ac_cs_version"; exit 0 ;;
20872   --he | --h)
20873     # Conflict between --help and --header
20874     { { echo "$as_me:20874: error: ambiguous option: $1
20875 Try \`$0 --help' for more information." >&5
20876 echo "$as_me: error: ambiguous option: $1
20877 Try \`$0 --help' for more information." >&2;}
20878    { (exit 1); exit 1; }; };;
20879   --help | --hel | -h )
20880     echo "$ac_cs_usage"; exit 0 ;;
20881   --debug | --d* | -d )
20882     debug=: ;;
20883   --file | --fil | --fi | --f )
20884     shift
20885     CONFIG_FILES="$CONFIG_FILES $1"
20886     ac_need_defaults=false;;
20887   --header | --heade | --head | --hea )
20888     shift
20889     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20890     ac_need_defaults=false;;
20891
20892   # This is an error.
20893   -*) { { echo "$as_me:20893: error: unrecognized option: $1
20894 Try \`$0 --help' for more information." >&5
20895 echo "$as_me: error: unrecognized option: $1
20896 Try \`$0 --help' for more information." >&2;}
20897    { (exit 1); exit 1; }; } ;;
20898
20899   *) ac_config_targets="$ac_config_targets $1" ;;
20900
20901   esac
20902   shift
20903 done
20904
20905 exec 5>>config.log
20906 cat >&5 << _ACEOF
20907
20908 ## ----------------------- ##
20909 ## Running config.status.  ##
20910 ## ----------------------- ##
20911
20912 This file was extended by $as_me 2.52.20101002, executed with
20913   CONFIG_FILES    = $CONFIG_FILES
20914   CONFIG_HEADERS  = $CONFIG_HEADERS
20915   CONFIG_LINKS    = $CONFIG_LINKS
20916   CONFIG_COMMANDS = $CONFIG_COMMANDS
20917   > $ac_cs_invocation
20918 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20919
20920 _ACEOF
20921 EOF
20922
20923 cat >>$CONFIG_STATUS <<EOF
20924 #
20925 # INIT-COMMANDS section.
20926 #
20927
20928 ### Special initialization commands, used to pass information from the
20929 ### configuration-run into config.status
20930
20931 AWK="$AWK"
20932 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20933 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20934 ECHO_LINK="$ECHO_LINK"
20935 LDCONFIG="$LDCONFIG"
20936 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20937 LIB_NAME="$LIB_NAME"
20938 LIB_PREFIX="$LIB_PREFIX"
20939 LIB_SUBSETS="$LIB_SUBSETS"
20940 LIB_SUFFIX="$LIB_SUFFIX"
20941 LIB_TRACING="$LIB_TRACING"
20942 LN_S="$LN_S"
20943 MAKE_TERMINFO="$MAKE_TERMINFO"
20944 NCURSES_MAJOR="$NCURSES_MAJOR"
20945 NCURSES_MINOR="$NCURSES_MINOR"
20946 NCURSES_OSPEED="$NCURSES_OSPEED"
20947 NCURSES_PATCH="$NCURSES_PATCH"
20948 SRC_SUBDIRS="$SRC_SUBDIRS"
20949 TERMINFO="$TERMINFO"
20950 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20951 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20952 TICS_NAME="$TICS_NAME"
20953 TIC_PATH="$TIC_PATH"
20954 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20955 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20956 TINFO_NAME="$TINFO_NAME"
20957 TINFO_SUFFIX="$TINFO_SUFFIX"
20958 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20959 WITH_CURSES_H="$with_curses_h"
20960 WITH_ECHO="$with_echo"
20961 WITH_OVERWRITE="$with_overwrite"
20962 cf_LIST_MODELS="$cf_list_models"
20963 cf_cv_abi_version="$cf_cv_abi_version"
20964 cf_cv_do_relink="$cf_cv_do_relink"
20965 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20966 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20967 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20968 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20969 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20970 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20971 cf_cv_rel_version="$cf_cv_rel_version"
20972 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20973 cf_cv_shared_soname='$cf_cv_shared_soname'
20974 cf_cv_shlib_version="$cf_cv_shlib_version"
20975 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20976 cf_cv_system_name="$cf_cv_system_name"
20977 cf_cv_term_driver="$with_term_driver"
20978 cf_with_ada="$cf_with_ada"
20979 cf_with_cxx_binding="$cf_with_cxx_binding"
20980 cf_with_manpages="$cf_with_manpages"
20981 cf_with_tests="$cf_with_tests"
20982 host="$host"
20983 target="$target"
20984
20985 EOF
20986
20987 cat >>$CONFIG_STATUS <<\EOF
20988 for ac_config_target in $ac_config_targets
20989 do
20990   case "$ac_config_target" in
20991   # Handling of arguments.
20992   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20993   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20994   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20995   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20996   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20997   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20998   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20999   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21000   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21001   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21002   *) { { echo "$as_me:21002: error: invalid argument: $ac_config_target" >&5
21003 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21004    { (exit 1); exit 1; }; };;
21005   esac
21006 done
21007
21008 # If the user did not use the arguments to specify the items to instantiate,
21009 # then the envvar interface is used.  Set only those that are not.
21010 # We use the long form for the default assignment because of an extremely
21011 # bizarre bug on SunOS 4.1.3.
21012 if $ac_need_defaults; then
21013   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21014   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21015   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21016 fi
21017
21018 # Create a temporary directory, and hook for its removal unless debugging.
21019 $debug ||
21020 {
21021   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21022   trap '{ (exit 1); exit 1; }' 1 2 13 15
21023 }
21024
21025 # Create a (secure) tmp directory for tmp files.
21026 : ${TMPDIR=/tmp}
21027 {
21028   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21029   test -n "$tmp" && test -d "$tmp"
21030 }  ||
21031 {
21032   tmp=$TMPDIR/cs$$-$RANDOM
21033   (umask 077 && mkdir $tmp)
21034 } ||
21035 {
21036    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21037    { (exit 1); exit 1; }
21038 }
21039
21040 EOF
21041
21042 cat >>$CONFIG_STATUS <<EOF
21043
21044 #
21045 # CONFIG_FILES section.
21046 #
21047
21048 # No need to generate the scripts if there are no CONFIG_FILES.
21049 # This happens for instance when ./config.status config.h
21050 if test -n "\$CONFIG_FILES"; then
21051   # Protect against being on the right side of a sed subst in config.status.
21052   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21053    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21054 s,@SHELL@,$SHELL,;t t
21055 s,@exec_prefix@,$exec_prefix,;t t
21056 s,@prefix@,$prefix,;t t
21057 s,@program_transform_name@,$program_transform_name,;t t
21058 s,@bindir@,$bindir,;t t
21059 s,@sbindir@,$sbindir,;t t
21060 s,@libexecdir@,$libexecdir,;t t
21061 s,@datadir@,$datadir,;t t
21062 s,@sysconfdir@,$sysconfdir,;t t
21063 s,@sharedstatedir@,$sharedstatedir,;t t
21064 s,@localstatedir@,$localstatedir,;t t
21065 s,@libdir@,$libdir,;t t
21066 s,@includedir@,$includedir,;t t
21067 s,@oldincludedir@,$oldincludedir,;t t
21068 s,@infodir@,$infodir,;t t
21069 s,@mandir@,$mandir,;t t
21070 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21071 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21072 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21073 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21074 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21075 s,@build_alias@,$build_alias,;t t
21076 s,@host_alias@,$host_alias,;t t
21077 s,@target_alias@,$target_alias,;t t
21078 s,@ECHO_C@,$ECHO_C,;t t
21079 s,@ECHO_N@,$ECHO_N,;t t
21080 s,@ECHO_T@,$ECHO_T,;t t
21081 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21082 s,@DEFS@,$DEFS,;t t
21083 s,@LIBS@,$LIBS,;t t
21084 s,@top_builddir@,$top_builddir,;t t
21085 s,@EGREP@,$EGREP,;t t
21086 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21087 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21088 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21089 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21090 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21091 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21092 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21093 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21094 s,@build@,$build,;t t
21095 s,@build_cpu@,$build_cpu,;t t
21096 s,@build_vendor@,$build_vendor,;t t
21097 s,@build_os@,$build_os,;t t
21098 s,@host@,$host,;t t
21099 s,@host_cpu@,$host_cpu,;t t
21100 s,@host_vendor@,$host_vendor,;t t
21101 s,@host_os@,$host_os,;t t
21102 s,@target@,$target,;t t
21103 s,@target_cpu@,$target_cpu,;t t
21104 s,@target_vendor@,$target_vendor,;t t
21105 s,@target_os@,$target_os,;t t
21106 s,@CC@,$CC,;t t
21107 s,@CFLAGS@,$CFLAGS,;t t
21108 s,@LDFLAGS@,$LDFLAGS,;t t
21109 s,@CPPFLAGS@,$CPPFLAGS,;t t
21110 s,@ac_ct_CC@,$ac_ct_CC,;t t
21111 s,@EXEEXT@,$EXEEXT,;t t
21112 s,@OBJEXT@,$OBJEXT,;t t
21113 s,@CPP@,$CPP,;t t
21114 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21115 s,@PROG_EXT@,$PROG_EXT,;t t
21116 s,@LDCONFIG@,$LDCONFIG,;t t
21117 s,@CXX@,$CXX,;t t
21118 s,@CXXFLAGS@,$CXXFLAGS,;t t
21119 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21120 s,@AWK@,$AWK,;t t
21121 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21122 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21123 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21124 s,@LINT@,$LINT,;t t
21125 s,@LINT_OPTS@,$LINT_OPTS,;t t
21126 s,@LN_S@,$LN_S,;t t
21127 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21128 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21129 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21130 s,@SET_MAKE@,$SET_MAKE,;t t
21131 s,@CTAGS@,$CTAGS,;t t
21132 s,@ETAGS@,$ETAGS,;t t
21133 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21134 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21135 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21136 s,@RANLIB@,$RANLIB,;t t
21137 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21138 s,@LD@,$LD,;t t
21139 s,@ac_ct_LD@,$ac_ct_LD,;t t
21140 s,@AR@,$AR,;t t
21141 s,@ac_ct_AR@,$ac_ct_AR,;t t
21142 s,@ARFLAGS@,$ARFLAGS,;t t
21143 s,@DESTDIR@,$DESTDIR,;t t
21144 s,@BUILD_CC@,$BUILD_CC,;t t
21145 s,@BUILD_CPP@,$BUILD_CPP,;t t
21146 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21147 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21148 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21149 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21150 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21151 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21152 s,@cf_list_models@,$cf_list_models,;t t
21153 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21154 s,@LIBTOOL@,$LIBTOOL,;t t
21155 s,@LT_UNDEF@,$LT_UNDEF,;t t
21156 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21157 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21158 s,@LIB_CREATE@,$LIB_CREATE,;t t
21159 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21160 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21161 s,@LIB_PREP@,$LIB_PREP,;t t
21162 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21163 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21164 s,@LIB_LINK@,$LIB_LINK,;t t
21165 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21166 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21167 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21168 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21169 s,@TICS_NAME@,$TICS_NAME,;t t
21170 s,@TINFO_NAME@,$TINFO_NAME,;t t
21171 s,@LIB_NAME@,$LIB_NAME,;t t
21172 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21173 s,@CC_G_OPT@,$CC_G_OPT,;t t
21174 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21175 s,@LD_MODEL@,$LD_MODEL,;t t
21176 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21177 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21178 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21179 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21180 s,@LINK_PROGS@,$LINK_PROGS,;t t
21181 s,@LINK_TESTS@,$LINK_TESTS,;t t
21182 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21183 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21184 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21185 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21186 s,@RPATH_LIST@,$RPATH_LIST,;t t
21187 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21188 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21189 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21190 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21191 s,@XTERM_KBS@,$XTERM_KBS,;t t
21192 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21193 s,@TERMINFO@,$TERMINFO,;t t
21194 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21195 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21196 s,@TERMPATH@,$TERMPATH,;t t
21197 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21198 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21199 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21200 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21201 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21202 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21203 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21204 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21205 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21206 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21207 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21208 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21209 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21210 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21211 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21212 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21213 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21214 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21215 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21216 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21217 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21218 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21219 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21220 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21221 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21222 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21223 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21224 s,@PTHREAD@,$PTHREAD,;t t
21225 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21226 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21227 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21228 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21229 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21230 s,@ECHO_LINK@,$ECHO_LINK,;t t
21231 s,@ADAFLAGS@,$ADAFLAGS,;t t
21232 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21233 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21234 s,@ADA_TRACE@,$ADA_TRACE,;t t
21235 s,@MATH_LIB@,$MATH_LIB,;t t
21236 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21237 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21238 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21239 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21240 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21241 s,@TEST_LIBS@,$TEST_LIBS,;t t
21242 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21243 s,@CXXCPP@,$CXXCPP,;t t
21244 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21245 s,@CXX_AR@,$CXX_AR,;t t
21246 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21247 s,@CXXLIBS@,$CXXLIBS,;t t
21248 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21249 s,@gnat_exists@,$gnat_exists,;t t
21250 s,@M4_exists@,$M4_exists,;t t
21251 s,@cf_ada_make@,$cf_ada_make,;t t
21252 s,@cf_compile_generics@,$cf_compile_generics,;t t
21253 s,@cf_generic_objects@,$cf_generic_objects,;t t
21254 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21255 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21256 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21257 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21258 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21259 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21260 s,@cf_ada_package@,$cf_ada_package,;t t
21261 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21262 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21263 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21264 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21265 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21266 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21267 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21268 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21269 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21270 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21271 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21272 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21273 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21274 s,@TICS_LIBS@,$TICS_LIBS,;t t
21275 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21276 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21277 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21278 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21279 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21280 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21281 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21282 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21283 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21284 s,@TICS_LIST@,$TICS_LIST,;t t
21285 s,@TINFO_LIST@,$TINFO_LIST,;t t
21286 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21287 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21288 s,@TEST_ARGS@,$TEST_ARGS,;t t
21289 s,@TEST_DEPS@,$TEST_DEPS,;t t
21290 s,@TEST_ARG2@,$TEST_ARG2,;t t
21291 s,@TEST_DEP2@,$TEST_DEP2,;t t
21292 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21293 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21294 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21295 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21296 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21297 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21298 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21299 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21300 s,@cross_compiling@,$cross_compiling,;t t
21301 s,@TIC_PATH@,$TIC_PATH,;t t
21302 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21303 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21304 CEOF
21305
21306 EOF
21307
21308   cat >>$CONFIG_STATUS <<\EOF
21309   # Split the substitutions into bite-sized pieces for seds with
21310   # small command number limits, like on Digital OSF/1 and HP-UX.
21311   ac_max_sed_lines=48
21312   ac_sed_frag=1 # Number of current file.
21313   ac_beg=1 # First line for current file.
21314   ac_end=$ac_max_sed_lines # Line after last line for current file.
21315   ac_more_lines=:
21316   ac_sed_cmds=
21317   while $ac_more_lines; do
21318     if test $ac_beg -gt 1; then
21319       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21320     else
21321       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21322     fi
21323     if test ! -s $tmp/subs.frag; then
21324       ac_more_lines=false
21325     else
21326       # The purpose of the label and of the branching condition is to
21327       # speed up the sed processing (if there are no `@' at all, there
21328       # is no need to browse any of the substitutions).
21329       # These are the two extra sed commands mentioned above.
21330       (echo ':t
21331   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21332       if test -z "$ac_sed_cmds"; then
21333         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21334       else
21335         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21336       fi
21337       ac_sed_frag=`expr $ac_sed_frag + 1`
21338       ac_beg=$ac_end
21339       ac_end=`expr $ac_end + $ac_max_sed_lines`
21340     fi
21341   done
21342   if test -z "$ac_sed_cmds"; then
21343     ac_sed_cmds=cat
21344   fi
21345 fi # test -n "$CONFIG_FILES"
21346
21347 EOF
21348 cat >>$CONFIG_STATUS <<\EOF
21349 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21350   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21351   case $ac_file in
21352   - | *:- | *:-:* ) # input from stdin
21353         cat >$tmp/stdin
21354         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21355         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21356   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21357         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21358   * )   ac_file_in=$ac_file.in ;;
21359   esac
21360
21361   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21362   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21363          X"$ac_file" : 'X\(//\)[^/]' \| \
21364          X"$ac_file" : 'X\(//\)$' \| \
21365          X"$ac_file" : 'X\(/\)' \| \
21366          .     : '\(.\)' 2>/dev/null ||
21367 echo X"$ac_file" |
21368     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21369           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21370           /^X\(\/\/\)$/{ s//\1/; q; }
21371           /^X\(\/\).*/{ s//\1/; q; }
21372           s/.*/./; q'`
21373   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21374     { case "$ac_dir" in
21375   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21376   *)                      as_incr_dir=.;;
21377 esac
21378 as_dummy="$ac_dir"
21379 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21380   case $as_mkdir_dir in
21381     # Skip DOS drivespec
21382     ?:) as_incr_dir=$as_mkdir_dir ;;
21383     *)
21384       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21385       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21386     ;;
21387   esac
21388 done; }
21389
21390     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21391     # A "../" for each directory in $ac_dir_suffix.
21392     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21393   else
21394     ac_dir_suffix= ac_dots=
21395   fi
21396
21397   case $srcdir in
21398   .)  ac_srcdir=.
21399       if test -z "$ac_dots"; then
21400          ac_top_srcdir=.
21401       else
21402          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21403       fi ;;
21404   [\\/]* | ?:[\\/]* )
21405       ac_srcdir=$srcdir$ac_dir_suffix;
21406       ac_top_srcdir=$srcdir ;;
21407   *) # Relative path.
21408     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21409     ac_top_srcdir=$ac_dots$srcdir ;;
21410   esac
21411
21412   case $INSTALL in
21413   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21414   *) ac_INSTALL=$ac_dots$INSTALL ;;
21415   esac
21416
21417   if test x"$ac_file" != x-; then
21418     { echo "$as_me:21418: creating $ac_file" >&5
21419 echo "$as_me: creating $ac_file" >&6;}
21420     rm -f "$ac_file"
21421   fi
21422   # Let's still pretend it is `configure' which instantiates (i.e., don't
21423   # use $as_me), people would be surprised to read:
21424   #    /* config.h.  Generated automatically by config.status.  */
21425   configure_input="Generated automatically from `echo $ac_file_in |
21426                                                  sed 's,.*/,,'` by configure."
21427
21428   # First look for the input files in the build tree, otherwise in the
21429   # src tree.
21430   ac_file_inputs=`IFS=:
21431     for f in $ac_file_in; do
21432       case $f in
21433       -) echo $tmp/stdin ;;
21434       [\\/$]*)
21435          # Absolute (can't be DOS-style, as IFS=:)
21436          test -f "$f" || { { echo "$as_me:21436: error: cannot find input file: $f" >&5
21437 echo "$as_me: error: cannot find input file: $f" >&2;}
21438    { (exit 1); exit 1; }; }
21439          echo $f;;
21440       *) # Relative
21441          if test -f "$f"; then
21442            # Build tree
21443            echo $f
21444          elif test -f "$srcdir/$f"; then
21445            # Source tree
21446            echo $srcdir/$f
21447          else
21448            # /dev/null tree
21449            { { echo "$as_me:21449: error: cannot find input file: $f" >&5
21450 echo "$as_me: error: cannot find input file: $f" >&2;}
21451    { (exit 1); exit 1; }; }
21452          fi;;
21453       esac
21454     done` || { (exit 1); exit 1; }
21455 EOF
21456 cat >>$CONFIG_STATUS <<EOF
21457   sed "$ac_vpsub
21458 $extrasub
21459 EOF
21460 cat >>$CONFIG_STATUS <<\EOF
21461 :t
21462 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21463 s,@configure_input@,$configure_input,;t t
21464 s,@srcdir@,$ac_srcdir,;t t
21465 s,@top_srcdir@,$ac_top_srcdir,;t t
21466 s,@INSTALL@,$ac_INSTALL,;t t
21467 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21468   rm -f $tmp/stdin
21469   if test x"$ac_file" != x-; then
21470     mv $tmp/out $ac_file
21471   else
21472     cat $tmp/out
21473     rm -f $tmp/out
21474   fi
21475
21476 done
21477 EOF
21478 cat >>$CONFIG_STATUS <<\EOF
21479
21480 #
21481 # CONFIG_HEADER section.
21482 #
21483
21484 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21485 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21486 #
21487 # ac_d sets the value in "#define NAME VALUE" lines.
21488 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21489 ac_dB='[        ].*$,\1#\2'
21490 ac_dC=' '
21491 ac_dD=',;t'
21492 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21493 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21494 ac_iB='\([      ]\),\1#\2define\3'
21495 ac_iC=' '
21496 ac_iD='\4,;t'
21497 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21498 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21499 ac_uB='$,\1#\2define\3'
21500 ac_uC=' '
21501 ac_uD=',;t'
21502
21503 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21504   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21505   case $ac_file in
21506   - | *:- | *:-:* ) # input from stdin
21507         cat >$tmp/stdin
21508         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21509         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21510   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21511         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21512   * )   ac_file_in=$ac_file.in ;;
21513   esac
21514
21515   test x"$ac_file" != x- && { echo "$as_me:21515: creating $ac_file" >&5
21516 echo "$as_me: creating $ac_file" >&6;}
21517
21518   # First look for the input files in the build tree, otherwise in the
21519   # src tree.
21520   ac_file_inputs=`IFS=:
21521     for f in $ac_file_in; do
21522       case $f in
21523       -) echo $tmp/stdin ;;
21524       [\\/$]*)
21525          # Absolute (can't be DOS-style, as IFS=:)
21526          test -f "$f" || { { echo "$as_me:21526: error: cannot find input file: $f" >&5
21527 echo "$as_me: error: cannot find input file: $f" >&2;}
21528    { (exit 1); exit 1; }; }
21529          echo $f;;
21530       *) # Relative
21531          if test -f "$f"; then
21532            # Build tree
21533            echo $f
21534          elif test -f "$srcdir/$f"; then
21535            # Source tree
21536            echo $srcdir/$f
21537          else
21538            # /dev/null tree
21539            { { echo "$as_me:21539: error: cannot find input file: $f" >&5
21540 echo "$as_me: error: cannot find input file: $f" >&2;}
21541    { (exit 1); exit 1; }; }
21542          fi;;
21543       esac
21544     done` || { (exit 1); exit 1; }
21545   # Remove the trailing spaces.
21546   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21547
21548 EOF
21549
21550 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21551 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21552 # be either 'cat' or 'sort'.
21553 cat confdefs.h | uniq >conftest.vals
21554
21555 # Break up conftest.vals because some shells have a limit on
21556 # the size of here documents, and old seds have small limits too.
21557
21558 rm -f conftest.tail
21559 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21560 while grep . conftest.vals >/dev/null
21561 do
21562   # Write chunks of a limited-size here document to conftest.frag.
21563   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21564   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21565   echo 'CEOF' >> $CONFIG_STATUS
21566   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21567   rm -f conftest.vals
21568   mv conftest.tail conftest.vals
21569 done
21570 rm -f conftest.vals
21571
21572 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21573 # marker @DEFS@.
21574 echo '  cat >> conftest.edit <<CEOF
21575 /@DEFS@/r conftest.frag
21576 /@DEFS@/d
21577 CEOF
21578 sed -f conftest.edit $tmp/in > $tmp/out
21579 rm -f $tmp/in
21580 mv $tmp/out $tmp/in
21581 rm -f conftest.edit conftest.frag
21582 ' >> $CONFIG_STATUS
21583
21584 cat >>$CONFIG_STATUS <<\EOF
21585   # Let's still pretend it is `configure' which instantiates (i.e., don't
21586   # use $as_me), people would be surprised to read:
21587   #    /* config.h.  Generated automatically by config.status.  */
21588   if test x"$ac_file" = x-; then
21589     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21590   else
21591     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21592   fi
21593   cat $tmp/in >>$tmp/config.h
21594   rm -f $tmp/in
21595   if test x"$ac_file" != x-; then
21596     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21597       { echo "$as_me:21597: $ac_file is unchanged" >&5
21598 echo "$as_me: $ac_file is unchanged" >&6;}
21599     else
21600       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21601          X"$ac_file" : 'X\(//\)[^/]' \| \
21602          X"$ac_file" : 'X\(//\)$' \| \
21603          X"$ac_file" : 'X\(/\)' \| \
21604          .     : '\(.\)' 2>/dev/null ||
21605 echo X"$ac_file" |
21606     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21607           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21608           /^X\(\/\/\)$/{ s//\1/; q; }
21609           /^X\(\/\).*/{ s//\1/; q; }
21610           s/.*/./; q'`
21611       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21612         { case "$ac_dir" in
21613   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21614   *)                      as_incr_dir=.;;
21615 esac
21616 as_dummy="$ac_dir"
21617 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21618   case $as_mkdir_dir in
21619     # Skip DOS drivespec
21620     ?:) as_incr_dir=$as_mkdir_dir ;;
21621     *)
21622       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21623       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21624     ;;
21625   esac
21626 done; }
21627
21628       fi
21629       rm -f $ac_file
21630       mv $tmp/config.h $ac_file
21631     fi
21632   else
21633     cat $tmp/config.h
21634     rm -f $tmp/config.h
21635   fi
21636 done
21637 EOF
21638 cat >>$CONFIG_STATUS <<\EOF
21639 #
21640 # CONFIG_COMMANDS section.
21641 #
21642 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21643   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21644   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21645
21646   case $ac_dest in
21647     default )
21648 if test "x$cf_with_tests" != xno ; then
21649
21650 for cf_dir in test
21651 do
21652         if test ! -d $srcdir/$cf_dir; then
21653                 continue
21654         elif test -f $srcdir/$cf_dir/programs; then
21655                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21656         fi
21657 done
21658
21659 fi
21660
21661 cf_prefix=$LIB_PREFIX
21662
21663 case $cf_cv_shlib_version in #(vi
21664 cygdll|mingw)
21665         TINFO_NAME=$TINFO_ARG_SUFFIX
21666         TINFO_SUFFIX=.dll
21667         ;;
21668 esac
21669
21670 if test -n "$TINFO_SUFFIX" ; then
21671         case $TINFO_SUFFIX in
21672         tw*)
21673                 TINFO_NAME="${TINFO_NAME}tw"
21674                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21675                 ;;
21676         t*)
21677                 TINFO_NAME="${TINFO_NAME}t"
21678                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21679                 ;;
21680         w*)
21681                 TINFO_NAME="${TINFO_NAME}w"
21682                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21683                 ;;
21684         esac
21685 fi
21686
21687 for cf_dir in $SRC_SUBDIRS
21688 do
21689         if test ! -d $srcdir/$cf_dir ; then
21690                 continue
21691         elif test -f $srcdir/$cf_dir/modules; then
21692
21693                 SHARED_LIB=
21694                 LIBS_TO_MAKE=
21695                 for cf_item in $cf_LIST_MODELS
21696                 do
21697
21698         case $cf_item in #(vi
21699         libtool) #(vi
21700                 cf_suffix='.la'
21701                 cf_depsuf=$cf_suffix
21702                 ;;
21703         normal) #(vi
21704                 cf_suffix='.a'
21705                 cf_depsuf=$cf_suffix
21706                 ;;
21707         debug) #(vi
21708                 cf_suffix='_g.a'
21709                 cf_depsuf=$cf_suffix
21710                 ;;
21711         profile) #(vi
21712                 cf_suffix='_p.a'
21713                 cf_depsuf=$cf_suffix
21714                 ;;
21715         shared) #(vi
21716                 case $cf_cv_system_name in
21717                 aix[5-7]*) #(vi
21718                         cf_suffix='.a'
21719                         cf_depsuf=$cf_suffix
21720                         ;;
21721                 cygwin*|mingw*) #(vi
21722                         cf_suffix='.dll'
21723                         cf_depsuf='.dll.a'
21724                         ;;
21725                 darwin*) #(vi
21726                         cf_suffix='.dylib'
21727                         cf_depsuf=$cf_suffix
21728                         ;;
21729                 hpux*) #(vi
21730                         case $target in
21731                         ia64*) #(vi
21732                                 cf_suffix='.so'
21733                                 cf_depsuf=$cf_suffix
21734                                 ;;
21735                         *) #(vi
21736                                 cf_suffix='.sl'
21737                                 cf_depsuf=$cf_suffix
21738                                 ;;
21739                         esac
21740                         ;;
21741                 *)      cf_suffix='.so'
21742                         cf_depsuf=$cf_suffix
21743                         ;;
21744                 esac
21745         esac
21746         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21747         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21748
21749                         if test $cf_item = shared ; then
21750                         if test "$cf_cv_do_symlinks" = yes ; then
21751                                 case "$cf_cv_shlib_version" in #(vi
21752                                 rel) #(vi
21753                                         case "$cf_cv_system_name" in #(vi
21754                                         darwin*)
21755                                         case .${LIB_SUFFIX} in
21756                                         .tw*)
21757                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21758                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21759                                                 ;;
21760                                         .t*)
21761                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21762                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21763                                                 ;;
21764                                         .w*)
21765                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21766                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21767                                                 ;;
21768                                         *)
21769                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21770                                                 ;;
21771                                         esac
21772                                         ;; #(vi
21773                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21774                                         esac
21775                                         ;;
21776                                 abi)
21777                                         case "$cf_cv_system_name" in #(vi
21778                                         darwin*)
21779                                         case .${LIB_SUFFIX} in
21780                                         .tw*)
21781                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21782                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21783                                                 ;;
21784                                         .t*)
21785                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21786                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21787                                                 ;;
21788                                         .w*)
21789                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21790                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21791                                                 ;;
21792                                         *)
21793                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21794                                                 ;;
21795                                         esac
21796                                         ;; #(vi
21797                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21798                                         esac
21799                                         ;;
21800                                 esac
21801                         fi
21802                         # cygwin needs import library, and has unique naming convention
21803                         # use autodetected ${cf_prefix} for import lib and static lib, but
21804                         # use 'cyg' prefix for shared lib.
21805                         case $cf_cv_shlib_version in #(vi
21806                         cygdll) #(vi
21807                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21808                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21809                                 continue
21810                                 ;;
21811                         mingw)
21812                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21813                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/lib${cf_dir}${cf_cygsuf}"
21814                                 continue
21815                                 ;;
21816                         esac
21817                         fi
21818                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21819                 done
21820
21821                 if test $cf_dir = ncurses ; then
21822                         cf_subsets="$LIB_SUBSETS"
21823                         cf_r_parts="$cf_subsets"
21824                         cf_liblist="$LIBS_TO_MAKE"
21825
21826                         while test -n "$cf_r_parts"
21827                         do
21828                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21829                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21830                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21831                                         cf_item=
21832                                         case $cf_l_parts in #(vi
21833                                         *termlib*) #(vi
21834                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21835                                                 ;;
21836                                         *ticlib*)
21837                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21838                                                 ;;
21839                                         *)
21840                                                 break
21841                                                 ;;
21842                                         esac
21843                                         if test -n "$cf_item"; then
21844                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21845                                         fi
21846                                 else
21847                                         break
21848                                 fi
21849                         done
21850                 else
21851                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21852                 fi
21853
21854                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21855                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21856                         $cf_dir/Makefile >$cf_dir/Makefile.out
21857                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21858
21859                 $AWK -f $srcdir/mk-0th.awk \
21860                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
21861                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21862
21863                 for cf_subset in $cf_subsets
21864                 do
21865                         cf_subdirs=
21866                         for cf_item in $cf_LIST_MODELS
21867                         do
21868                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21869
21870 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21871
21872         case $cf_item in #(vi
21873         libtool) #(vi
21874                 cf_suffix='.la'
21875                 cf_depsuf=$cf_suffix
21876                 ;;
21877         normal) #(vi
21878                 cf_suffix='.a'
21879                 cf_depsuf=$cf_suffix
21880                 ;;
21881         debug) #(vi
21882                 cf_suffix='_g.a'
21883                 cf_depsuf=$cf_suffix
21884                 ;;
21885         profile) #(vi
21886                 cf_suffix='_p.a'
21887                 cf_depsuf=$cf_suffix
21888                 ;;
21889         shared) #(vi
21890                 case $cf_cv_system_name in
21891                 aix[5-7]*) #(vi
21892                         cf_suffix='.a'
21893                         cf_depsuf=$cf_suffix
21894                         ;;
21895                 cygwin*|mingw*) #(vi
21896                         cf_suffix='.dll'
21897                         cf_depsuf='.dll.a'
21898                         ;;
21899                 darwin*) #(vi
21900                         cf_suffix='.dylib'
21901                         cf_depsuf=$cf_suffix
21902                         ;;
21903                 hpux*) #(vi
21904                         case $target in
21905                         ia64*) #(vi
21906                                 cf_suffix='.so'
21907                                 cf_depsuf=$cf_suffix
21908                                 ;;
21909                         *) #(vi
21910                                 cf_suffix='.sl'
21911                                 cf_depsuf=$cf_suffix
21912                                 ;;
21913                         esac
21914                         ;;
21915                 *)      cf_suffix='.so'
21916                         cf_depsuf=$cf_suffix
21917                         ;;
21918                 esac
21919         esac
21920         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21921         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21922
21923         case $cf_item in
21924         libtool) cf_subdir='obj_lo'  ;;
21925         normal)  cf_subdir='objects' ;;
21926         debug)   cf_subdir='obj_g' ;;
21927         profile) cf_subdir='obj_p' ;;
21928         shared)
21929                 case $cf_cv_system_name in #(vi
21930                 cygwin) #(vi
21931                         cf_subdir='objects' ;;
21932                 *)
21933                         cf_subdir='obj_s' ;;
21934                 esac
21935         esac
21936
21937                         # Test for case where we build libtinfo with a different name.
21938                         cf_libname=$cf_dir
21939                         if test $cf_dir = ncurses ; then
21940                                 case $cf_subset in
21941                                 *base*)
21942                                         cf_libname=${cf_libname}$LIB_SUFFIX
21943                                         ;;
21944                                 *termlib*)
21945                                         cf_libname=$TINFO_LIB_SUFFIX
21946                                         ;;
21947                                 ticlib*)
21948                                         cf_libname=$TICS_LIB_SUFFIX
21949                                         ;;
21950                                 esac
21951                         else
21952                                 cf_libname=${cf_libname}$LIB_SUFFIX
21953                         fi
21954                         if test -n "${DFT_ARG_SUFFIX}" ; then
21955                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21956                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21957                         fi
21958
21959                         # These dependencies really are for development, not
21960                         # builds, but they are useful in porting, too.
21961                         cf_depend="../include/ncurses_cfg.h"
21962                         if test "$srcdir" = "."; then
21963                                 cf_reldir="."
21964                         else
21965                                 cf_reldir="\${srcdir}"
21966                         fi
21967
21968                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21969                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21970                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21971                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21972                         fi
21973
21974                         cf_dir_suffix=
21975                         old_cf_suffix="$cf_suffix"
21976                         if test "$cf_cv_shlib_version_infix" = yes ; then
21977                         if test -n "$LIB_SUFFIX" ; then
21978                                 case $LIB_SUFFIX in
21979                                 tw*)
21980                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21981                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21982                                         cf_dir_suffix=tw
21983                                         ;;
21984                                 t*)
21985                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21986                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21987                                         cf_dir_suffix=t
21988                                         ;;
21989                                 w*)
21990                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21991                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21992                                         cf_dir_suffix=w
21993                                         ;;
21994                                 esac
21995                         fi
21996                         fi
21997
21998                         $AWK -f $srcdir/mk-1st.awk \
21999                                 name=${cf_libname}${cf_dir_suffix} \
22000                                 traces=$LIB_TRACING \
22001                                 MODEL=$cf_ITEM \
22002                                 model=$cf_subdir \
22003                                 prefix=$cf_prefix \
22004                                 suffix=$cf_suffix \
22005                                 subset=$cf_subset \
22006                                 driver=$cf_cv_term_driver \
22007                                 SymLink="$LN_S" \
22008                                 TermlibRoot=$TINFO_NAME \
22009                                 TermlibSuffix=$TINFO_SUFFIX \
22010                                 ShlibVer=$cf_cv_shlib_version \
22011                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22012                                 ReLink=${cf_cv_do_relink:-no} \
22013                                 DoLinks=$cf_cv_do_symlinks \
22014                                 rmSoLocs=$cf_cv_rm_so_locs \
22015                                 ldconfig="$LDCONFIG" \
22016                                 overwrite=$WITH_OVERWRITE \
22017                                 depend="$cf_depend" \
22018                                 host="$host" \
22019                                 libtool_version="$LIBTOOL_VERSION" \
22020                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22021
22022                         cf_suffix="$old_cf_suffix"
22023
22024                         for cf_subdir2 in $cf_subdirs lib
22025                         do
22026                                 test $cf_subdir = $cf_subdir2 && break
22027                         done
22028                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22029                         $AWK -f $srcdir/mk-2nd.awk \
22030                                 name=$cf_dir \
22031                                 traces=$LIB_TRACING \
22032                                 MODEL=$cf_ITEM \
22033                                 model=$cf_subdir \
22034                                 subset=$cf_subset \
22035                                 srcdir=$srcdir \
22036                                 echo=$WITH_ECHO \
22037                                 crenames=$cf_cv_prog_CC_c_o \
22038                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22039                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22040                         cf_subdirs="$cf_subdirs $cf_subdir"
22041                         done
22042                 done
22043         fi
22044
22045         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
22046 done
22047
22048 for cf_dir in $SRC_SUBDIRS
22049 do
22050         if test ! -d $srcdir/$cf_dir ; then
22051                 continue
22052         fi
22053
22054         if test -f $cf_dir/Makefile ; then
22055                 case "$cf_dir" in
22056                 Ada95) #(vi
22057                         echo 'libs \' >> Makefile
22058                         echo 'install.libs \' >> Makefile
22059                         echo 'uninstall.libs ::' >> Makefile
22060                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
22061                         ;;
22062                 esac
22063         fi
22064
22065         if test -f $srcdir/$cf_dir/modules; then
22066                 echo >> Makefile
22067                 if test -f $srcdir/$cf_dir/headers; then
22068 cat >> Makefile <<CF_EOF
22069 install.includes \\
22070 uninstall.includes \\
22071 CF_EOF
22072                 fi
22073 if test "$cf_dir" != "c++" ; then
22074 echo 'lint \' >> Makefile
22075 fi
22076 cat >> Makefile <<CF_EOF
22077 libs \\
22078 lintlib \\
22079 install.libs \\
22080 uninstall.libs \\
22081 install.$cf_dir \\
22082 uninstall.$cf_dir ::
22083         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22084 CF_EOF
22085         elif test -f $srcdir/$cf_dir/headers; then
22086 cat >> Makefile <<CF_EOF
22087
22088 libs \\
22089 install.libs \\
22090 uninstall.libs \\
22091 install.includes \\
22092 uninstall.includes ::
22093         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22094 CF_EOF
22095 fi
22096 done
22097
22098 cat >> Makefile <<CF_EOF
22099
22100 install.libs uninstall.libs \\
22101 install.data uninstall.data ::
22102 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
22103 CF_EOF
22104
22105 if test "x$cf_with_manpages" = xyes; then
22106 cat >> Makefile <<CF_EOF
22107
22108 install.man \\
22109 uninstall.man ::
22110         cd man && \${MAKE} \${CF_MFLAGS} \$@
22111 CF_EOF
22112 fi
22113
22114 cat >> Makefile <<CF_EOF
22115
22116 distclean ::
22117         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22118         rm -f headers.sh headers.sed mk_shared_lib.sh
22119         rm -f edit_man.* man_alias.*
22120         rm -rf \${DIRS_TO_MAKE}
22121 CF_EOF
22122
22123 # Special case: tack's manpage lives in its own directory.
22124 if test "x$cf_with_manpages" = xyes; then
22125 if test -d tack ; then
22126 if test -f $srcdir/$tack.h; then
22127 cat >> Makefile <<CF_EOF
22128
22129 install.man \\
22130 uninstall.man ::
22131         cd tack && \${MAKE} \${CF_MFLAGS} \$@
22132 CF_EOF
22133 fi
22134 fi
22135 fi
22136
22137 rm -f headers.sed headers.sh
22138
22139 echo creating headers.sh
22140 cat >headers.sh <<CF_EOF
22141 #! /bin/sh
22142 # This shell script is generated by the 'configure' script.  It is invoked in a
22143 # subdirectory of the build tree.  It generates a sed-script in the parent
22144 # directory that is used to adjust includes for header files that reside in a
22145 # subdirectory of /usr/include, etc.
22146 PRG=""
22147 while test \$# != 3
22148 do
22149 PRG="\$PRG \$1"; shift
22150 done
22151 DST=\$1
22152 REF=\$2
22153 SRC=\$3
22154 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22155 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22156 echo installing \$SRC in \$DST
22157 CF_EOF
22158
22159 if test $WITH_CURSES_H = yes; then
22160         cat >>headers.sh <<CF_EOF
22161 case \$DST in
22162 /*/include/*)
22163         END=\`basename \$DST\`
22164         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22165         do
22166                 NAME=\`basename \$i\`
22167                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22168         done
22169         ;;
22170 *)
22171         echo "" >> \$TMPSED
22172         ;;
22173 esac
22174 CF_EOF
22175
22176 else
22177         cat >>headers.sh <<CF_EOF
22178 case \$DST in
22179 /*/include/*)
22180         END=\`basename \$DST\`
22181         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22182         do
22183                 NAME=\`basename \$i\`
22184                 if test "\$NAME" = "curses.h"
22185                 then
22186                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22187                         NAME=ncurses.h
22188                 fi
22189                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22190         done
22191         ;;
22192 *)
22193         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22194         ;;
22195 esac
22196 CF_EOF
22197 fi
22198 cat >>headers.sh <<CF_EOF
22199 rm -f \$TMPSRC
22200 sed -f \$TMPSED \$SRC > \$TMPSRC
22201 NAME=\`basename \$SRC\`
22202 CF_EOF
22203 if test $WITH_CURSES_H != yes; then
22204         cat >>headers.sh <<CF_EOF
22205 test "\$NAME" = "curses.h" && NAME=ncurses.h
22206 CF_EOF
22207 fi
22208 cat >>headers.sh <<CF_EOF
22209 # Just in case someone gzip'd manpages, remove the conflicting copy.
22210 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22211
22212 eval \$PRG \$TMPSRC \$DST/\$NAME
22213 rm -f \$TMPSRC \$TMPSED
22214 CF_EOF
22215
22216 chmod 0755 headers.sh
22217
22218 for cf_dir in $SRC_SUBDIRS
22219 do
22220         if test ! -d $srcdir/$cf_dir ; then
22221                 continue
22222         fi
22223
22224         if test -f $srcdir/$cf_dir/headers; then
22225                 $AWK -f $srcdir/mk-hdr.awk \
22226                         subset="$LIB_SUBSETS" \
22227                         compat="$WITH_CURSES_H" \
22228                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22229         fi
22230
22231         if test -f $srcdir/$cf_dir/modules; then
22232                 if test "$cf_dir" != "c++" ; then
22233                         cat >>$cf_dir/Makefile <<"CF_EOF"
22234 depend : ${AUTO_SRC}
22235         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22236
22237 # DO NOT DELETE THIS LINE -- make depend depends on it.
22238 CF_EOF
22239                 fi
22240         fi
22241 done
22242
22243 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22244 if test -z "$USE_OLD_MAKERULES" ; then
22245         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22246 fi
22247 fi
22248  ;;
22249   esac
22250 done
22251 EOF
22252
22253 cat >>$CONFIG_STATUS <<\EOF
22254
22255 { (exit 0); exit 0; }
22256 EOF
22257 chmod +x $CONFIG_STATUS
22258 ac_clean_files=$ac_clean_files_save
22259
22260 # configure is writing to config.log, and then calls config.status.
22261 # config.status does its own redirection, appending to config.log.
22262 # Unfortunately, on DOS this fails, as config.log is still kept open
22263 # by configure, so config.status won't be able to write to it; its
22264 # output is simply discarded.  So we exec the FD to /dev/null,
22265 # effectively closing config.log, so it can be properly (re)opened and
22266 # appended to by config.status.  When coming back to configure, we
22267 # need to make the FD available again.
22268 if test "$no_create" != yes; then
22269   ac_cs_success=:
22270   exec 5>/dev/null
22271   $SHELL $CONFIG_STATUS || ac_cs_success=false
22272   exec 5>>config.log
22273   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22274   # would make configure fail if this is the last instruction.
22275   $ac_cs_success || { (exit 1); exit 1; }
22276 fi
22277 ${MAKE:-make} preinstall