]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
1e8c1418aa9d9460fddc7610b148838a42037681
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.502 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100530.
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-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --disable-libtool-version  enable to use libtool's incompatible naming scheme
716   --with-libtool          generate libraries with libtool
717   --with-shared           generate shared-libraries
718   --with-normal           generate normal-libraries (default)
719   --with-debug            generate debug-libraries (default)
720   --with-profile          generate profile-libraries
721   --with-termlib          generate separate terminfo library
722   --with-ticlib           generate separate tic library
723   --with-gpm              use Alessandro Rubini's GPM library
724   --without-dlsym         do not use dlsym() to load GPM dynamically
725   --with-sysmouse         use sysmouse (FreeBSD console)
726   --enable-rpath          use rpath option when generating shared libraries
727   --disable-relink        relink shared libraries during install
728   --with-shlib-version=X  Specify rel or abi version for shared libs
729   --disable-rpath-hack    don't add rpath options for additional libraries
730 Fine-Tuning Your Configuration:
731   --disable-overwrite     leave out the link to -lcurses
732   --disable-database      do not use terminfo, only fallbacks/termcap
733   --with-database=XXX     specify terminfo source to install
734   --with-hashed-db        specify hashed-database library
735   --with-fallbacks=XXX    specify list of fallback terminal descriptions
736   --without-xterm-new     specify if xterm terminfo should be old version
737   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
738   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
739   --disable-big-core      assume machine has little memory
740   --disable-big-strings   assume compiler has only standard-size strings
741   --enable-termcap        compile in termcap fallback support
742   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
743   --enable-getcap         fast termcap load, no xrefs to terminfo
744   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
745   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
746   --disable-root-environ  restrict environment when running as root
747   --enable-symlinks       make tic use symbolic links not hard links
748   --enable-broken_linker  compile with broken-linker support code
749   --enable-bsdpad         recognize BSD-style prefix padding
750   --enable-widec          compile with wide-char/UTF-8 code
751   --disable-lp64          allow chtype to be long (ignore _LP64)
752   --disable-largefile     omit support for large files
753   --disable-tparm-varargs compile tparm() without varargs interface
754   --disable-tic-depends   link tic library without explicit dependency on ncurses library
755   --with-bool=TYPE        override fallback type of bool variable
756   --with-caps=alt         compile with alternate Caps file
757   --with-chtype=TYPE      override type of chtype
758   --with-ospeed=TYPE      override type of ospeed variable
759   --with-mmask-t=TYPE     override type of mmask_t
760   --with-ccharw-max=XXX   override size CCHARW_MAX
761   --with-rcs-ids          compile-in RCS identifiers
762 Options to Specify How Manpages are Installed:
763   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
764                           optionally formatted/catonly, e.g., gzip,formatted
765   --with-manpage-renames  specify manpage-renaming
766   --with-manpage-aliases  specify manpage-aliases using .so
767   --with-manpage-symlinks specify manpage-aliases using symlinks
768   --with-manpage-tbl      specify manpage processing with tbl
769 Extensions:
770   --disable-ext-funcs     disable function-extensions
771   --enable-sp-funcs       enable experimental SCREEN-extensions
772   --enable-term-driver    enable experimental terminal-driver
773   --enable-const          compile with extra/non-standard const
774   --enable-ext-colors     compile for 256-color support
775   --enable-ext-mouse      compile for extended mouse-encoding
776   --enable-no-padding     compile with $NCURSES_NO_PADDING code
777   --enable-signed-char    compile using signed Boolean's in term.h
778   --enable-sigwinch       compile with SIGWINCH handler
779   --enable-tcap-names     compile with user-definable terminal capabilities
780 Development Code:
781   --without-develop       disable development options
782   --enable-hard-tabs      compile with hard-tabs code
783   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
784 Experimental Code:
785   --disable-assumed-color do not assume anything about default-colors
786   --disable-hashmap       compile without hashmap scrolling-optimization
787   --enable-colorfgbg      compile-in experimental $COLORFGBG code
788   --enable-interop        compile-in experimental interop bindings
789   --with-pthread          use POSIX thread library
790   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
791   --enable-weak-symbols   enable weak-symbols for pthreads
792   --enable-reentrant      compile with experimental reentrant code
793   --with-wrap-prefix=XXX  override prefix used for public variables
794   --enable-safe-sprintf   compile with experimental safe-sprintf code
795   --disable-scroll-hints  compile without scroll-hints code
796   --enable-wgetch-events  compile with experimental wgetch-events code
797 Testing/development Options:
798   --enable-echo           build: display "compiling" commands (default)
799   --enable-warnings       build: turn on GCC compiler warnings
800   --enable-assertions     test: turn on generation of assertion code
801   --with-dmalloc          test: use Gray Watson's dmalloc library
802   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
803   --with-valgrind         test: use valgrind
804   --disable-leaks         test: free permanent memory, analyze leaks
805   --enable-expanded       test: generate functions for certain macros
806   --disable-macros        test: use functions rather than macros
807   --with-trace            test: add trace() function to all models of ncurses
808 Ada95 Binding Options:
809   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
810   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
811   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
812   --with-ada-sharedlib=XX build Ada95 shared-library
813
814 Some influential environment variables:
815   CC          C compiler command
816   CFLAGS      C compiler flags
817   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
818               nonstandard directory <lib dir>
819   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
820               headers in a nonstandard directory <include dir>
821   CPP         C preprocessor
822   CXX         C++ compiler command
823   CXXFLAGS    C++ compiler flags
824   CXXCPP      C++ preprocessor
825
826 Use these variables to override the choices made by `configure' or to help
827 it to find libraries and programs with nonstandard names/locations.
828
829 EOF
830 fi
831
832 if test "$ac_init_help" = "recursive"; then
833   # If there are subdirs, report their specific --help.
834   ac_popdir=`pwd`
835   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
836     cd $ac_subdir
837     # A "../" for each directory in /$ac_subdir.
838     ac_dots=`echo $ac_subdir |
839              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
840
841     case $srcdir in
842     .) # No --srcdir option.  We are building in place.
843       ac_sub_srcdir=$srcdir ;;
844     [\\/]* | ?:[\\/]* ) # Absolute path.
845       ac_sub_srcdir=$srcdir/$ac_subdir ;;
846     *) # Relative path.
847       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
848     esac
849
850     # Check for guested configure; otherwise get Cygnus style configure.
851     if test -f $ac_sub_srcdir/configure.gnu; then
852       echo
853       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
854     elif test -f $ac_sub_srcdir/configure; then
855       echo
856       $SHELL $ac_sub_srcdir/configure  --help=recursive
857     elif test -f $ac_sub_srcdir/configure.ac ||
858            test -f $ac_sub_srcdir/configure.in; then
859       echo
860       $ac_configure --help
861     else
862       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
863     fi
864     cd $ac_popdir
865   done
866 fi
867
868 test -n "$ac_init_help" && exit 0
869 if $ac_init_version; then
870   cat <<\EOF
871
872 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
873 Free Software Foundation, Inc.
874 This configure script is free software; the Free Software Foundation
875 gives unlimited permission to copy, distribute and modify it.
876 EOF
877   exit 0
878 fi
879 exec 5>config.log
880 cat >&5 <<EOF
881 This file contains any messages produced by compilers while
882 running configure, to aid debugging if configure makes a mistake.
883
884 It was created by $as_me, which was
885 generated by GNU Autoconf 2.52.20100530.  Invocation command line was
886
887   $ $0 $@
888
889 EOF
890 {
891 cat <<_ASUNAME
892 ## ---------- ##
893 ## Platform.  ##
894 ## ---------- ##
895
896 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
897 uname -m = `(uname -m) 2>/dev/null || echo unknown`
898 uname -r = `(uname -r) 2>/dev/null || echo unknown`
899 uname -s = `(uname -s) 2>/dev/null || echo unknown`
900 uname -v = `(uname -v) 2>/dev/null || echo unknown`
901
902 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
903 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
904
905 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
906 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
907 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
908 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
909 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
910 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
911 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
912
913 PATH = $PATH
914
915 _ASUNAME
916 } >&5
917
918 cat >&5 <<EOF
919 ## ------------ ##
920 ## Core tests.  ##
921 ## ------------ ##
922
923 EOF
924
925 # Keep a trace of the command line.
926 # Strip out --no-create and --no-recursion so they do not pile up.
927 # Also quote any args containing shell meta-characters.
928 ac_configure_args=
929 ac_sep=
930 for ac_arg
931 do
932   case $ac_arg in
933   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
934   | --no-cr | --no-c) ;;
935   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
936   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
937   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
938     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
939     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
940     ac_sep=" " ;;
941   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
942      ac_sep=" " ;;
943   esac
944   # Get rid of the leading space.
945 done
946
947 # When interrupted or exit'd, cleanup temporary files, and complete
948 # config.log.  We remove comments because anyway the quotes in there
949 # would cause problems or look ugly.
950 trap 'exit_status=$?
951   # Save into config.log some information that might help in debugging.
952   echo >&5
953   echo "## ----------------- ##" >&5
954   echo "## Cache variables.  ##" >&5
955   echo "## ----------------- ##" >&5
956   echo >&5
957   # The following way of writing the cache mishandles newlines in values,
958 {
959   (set) 2>&1 |
960     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
961     *ac_space=\ *)
962       sed -n \
963         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
964           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
965       ;;
966     *)
967       sed -n \
968         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
969       ;;
970     esac;
971 } >&5
972   sed "/^$/d" confdefs.h >conftest.log
973   if test -s conftest.log; then
974     echo >&5
975     echo "## ------------ ##" >&5
976     echo "## confdefs.h.  ##" >&5
977     echo "## ------------ ##" >&5
978     echo >&5
979     cat conftest.log >&5
980   fi
981   (echo; echo) >&5
982   test "$ac_signal" != 0 &&
983     echo "$as_me: caught signal $ac_signal" >&5
984   echo "$as_me: exit $exit_status" >&5
985   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
986     exit $exit_status
987      ' 0
988 for ac_signal in 1 2 13 15; do
989   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
990 done
991 ac_signal=0
992
993 # confdefs.h avoids OS command line length limits that DEFS can exceed.
994 rm -rf conftest* confdefs.h
995 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
996 echo >confdefs.h
997
998 # Let the site file select an alternate cache file if it wants to.
999 # Prefer explicitly selected file to automatically selected ones.
1000 if test -z "$CONFIG_SITE"; then
1001   if test "x$prefix" != xNONE; then
1002     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1003   else
1004     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1005   fi
1006 fi
1007 for ac_site_file in $CONFIG_SITE; do
1008   if test -r "$ac_site_file"; then
1009     { echo "$as_me:1009: loading site script $ac_site_file" >&5
1010 echo "$as_me: loading site script $ac_site_file" >&6;}
1011     cat "$ac_site_file" >&5
1012     . "$ac_site_file"
1013   fi
1014 done
1015
1016 if test -r "$cache_file"; then
1017   # Some versions of bash will fail to source /dev/null (special
1018   # files actually), so we avoid doing that.
1019   if test -f "$cache_file"; then
1020     { echo "$as_me:1020: loading cache $cache_file" >&5
1021 echo "$as_me: loading cache $cache_file" >&6;}
1022     case $cache_file in
1023       [\\/]* | ?:[\\/]* ) . $cache_file;;
1024       *)                      . ./$cache_file;;
1025     esac
1026   fi
1027 else
1028   { echo "$as_me:1028: creating cache $cache_file" >&5
1029 echo "$as_me: creating cache $cache_file" >&6;}
1030   >$cache_file
1031 fi
1032
1033 # Check that the precious variables saved in the cache have kept the same
1034 # value.
1035 ac_cache_corrupted=false
1036 for ac_var in `(set) 2>&1 |
1037                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1038   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1039   eval ac_new_set=\$ac_env_${ac_var}_set
1040   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1041   eval ac_new_val="\$ac_env_${ac_var}_value"
1042   case $ac_old_set,$ac_new_set in
1043     set,)
1044       { echo "$as_me:1044: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1045 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1046       ac_cache_corrupted=: ;;
1047     ,set)
1048       { echo "$as_me:1048: error: \`$ac_var' was not set in the previous run" >&5
1049 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1050       ac_cache_corrupted=: ;;
1051     ,);;
1052     *)
1053       if test "x$ac_old_val" != "x$ac_new_val"; then
1054         { echo "$as_me:1054: error: \`$ac_var' has changed since the previous run:" >&5
1055 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1056         { echo "$as_me:1056:   former value:  $ac_old_val" >&5
1057 echo "$as_me:   former value:  $ac_old_val" >&2;}
1058         { echo "$as_me:1058:   current value: $ac_new_val" >&5
1059 echo "$as_me:   current value: $ac_new_val" >&2;}
1060         ac_cache_corrupted=:
1061       fi;;
1062   esac
1063   # Pass precious variables to config.status.  It doesn't matter if
1064   # we pass some twice (in addition to the command line arguments).
1065   if test "$ac_new_set" = set; then
1066     case $ac_new_val in
1067     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1068       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1069       ac_configure_args="$ac_configure_args '$ac_arg'"
1070       ;;
1071     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1072        ;;
1073     esac
1074   fi
1075 done
1076 if $ac_cache_corrupted; then
1077   { echo "$as_me:1077: error: changes in the environment can compromise the build" >&5
1078 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1079   { { echo "$as_me:1079: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1080 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1081    { (exit 1); exit 1; }; }
1082 fi
1083
1084 ac_ext=c
1085 ac_cpp='$CPP $CPPFLAGS'
1086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1089 ac_main_return=return
1090
1091 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1092   *c*,-n*) ECHO_N= ECHO_C='
1093 ' ECHO_T='      ' ;;
1094   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1095   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1096 esac
1097 echo "#! $SHELL" >conftest.sh
1098 echo  "exit 0"   >>conftest.sh
1099 chmod +x conftest.sh
1100 if { (echo "$as_me:1100: PATH=\".;.\"; conftest.sh") >&5
1101   (PATH=".;."; conftest.sh) 2>&5
1102   ac_status=$?
1103   echo "$as_me:1103: \$? = $ac_status" >&5
1104   (exit $ac_status); }; then
1105   ac_path_separator=';'
1106 else
1107   ac_path_separator=:
1108 fi
1109 PATH_SEPARATOR="$ac_path_separator"
1110 rm -f conftest.sh
1111
1112 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1113
1114 top_builddir=`pwd`
1115
1116 echo "$as_me:1116: checking for egrep" >&5
1117 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1118 if test "${ac_cv_prog_egrep+set}" = set; then
1119   echo $ECHO_N "(cached) $ECHO_C" >&6
1120 else
1121   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1122     then ac_cv_prog_egrep='grep -E'
1123     else ac_cv_prog_egrep='egrep'
1124     fi
1125 fi
1126 echo "$as_me:1126: result: $ac_cv_prog_egrep" >&5
1127 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1128  EGREP=$ac_cv_prog_egrep
1129
1130 test -z "$EGREP" && { { echo "$as_me:1130: error: No egrep program found" >&5
1131 echo "$as_me: error: No egrep program found" >&2;}
1132    { (exit 1); exit 1; }; }
1133
1134 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1135 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 cf_cv_abi_version=${NCURSES_MAJOR}
1138 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1139 cf_cv_timestamp=`date`
1140 echo "$as_me:1140: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1141 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1142
1143 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1144
1145 # Check whether --with-rel-version or --without-rel-version was given.
1146 if test "${with_rel_version+set}" = set; then
1147   withval="$with_rel_version"
1148   { echo "$as_me:1148: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1149 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1150  cf_cv_rel_version=$withval
1151 fi;
1152
1153  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1154  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1155
1156 if test -n "$NCURSES_MAJOR" ; then
1157   case $NCURSES_MAJOR in #(vi
1158   [0-9]*) #(vi
1159         ;;
1160   *)
1161         { { echo "$as_me:1161: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1162 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1163    { (exit 1); exit 1; }; }
1164         ;;
1165   esac
1166 else
1167   { { echo "$as_me:1167: error: Release major-version value is empty" >&5
1168 echo "$as_me: error: Release major-version value is empty" >&2;}
1169    { (exit 1); exit 1; }; }
1170 fi
1171
1172 if test -n "$NCURSES_MINOR" ; then
1173   case $NCURSES_MINOR in #(vi
1174   [0-9]*) #(vi
1175         ;;
1176   *)
1177         { { echo "$as_me:1177: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1178 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1179    { (exit 1); exit 1; }; }
1180         ;;
1181   esac
1182 else
1183   { { echo "$as_me:1183: error: Release minor-version value is empty" >&5
1184 echo "$as_me: error: Release minor-version value is empty" >&2;}
1185    { (exit 1); exit 1; }; }
1186 fi
1187
1188 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1189
1190 # Check whether --with-abi-version or --without-abi-version was given.
1191 if test "${with_abi_version+set}" = set; then
1192   withval="$with_abi_version"
1193   { echo "$as_me:1193: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1194 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1195  cf_cv_abi_version=$withval
1196 fi;
1197
1198 if test -n "$cf_cv_abi_version" ; then
1199   case $cf_cv_abi_version in #(vi
1200   [0-9]*) #(vi
1201         ;;
1202   *)
1203         { { echo "$as_me:1203: error: ABI version is not a number: $cf_cv_abi_version" >&5
1204 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1205    { (exit 1); exit 1; }; }
1206         ;;
1207   esac
1208 else
1209   { { echo "$as_me:1209: error: ABI version value is empty" >&5
1210 echo "$as_me: error: ABI version value is empty" >&2;}
1211    { (exit 1); exit 1; }; }
1212 fi
1213
1214 ac_aux_dir=
1215 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1216   if test -f $ac_dir/install-sh; then
1217     ac_aux_dir=$ac_dir
1218     ac_install_sh="$ac_aux_dir/install-sh -c"
1219     break
1220   elif test -f $ac_dir/install.sh; then
1221     ac_aux_dir=$ac_dir
1222     ac_install_sh="$ac_aux_dir/install.sh -c"
1223     break
1224   elif test -f $ac_dir/shtool; then
1225     ac_aux_dir=$ac_dir
1226     ac_install_sh="$ac_aux_dir/shtool install -c"
1227     break
1228   fi
1229 done
1230 if test -z "$ac_aux_dir"; then
1231   { { echo "$as_me:1231: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1232 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1233    { (exit 1); exit 1; }; }
1234 fi
1235 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1236 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1237 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1238
1239 # Make sure we can run config.sub.
1240 $ac_config_sub sun4 >/dev/null 2>&1 ||
1241   { { echo "$as_me:1241: error: cannot run $ac_config_sub" >&5
1242 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1243    { (exit 1); exit 1; }; }
1244
1245 echo "$as_me:1245: checking build system type" >&5
1246 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1247 if test "${ac_cv_build+set}" = set; then
1248   echo $ECHO_N "(cached) $ECHO_C" >&6
1249 else
1250   ac_cv_build_alias=$build_alias
1251 test -z "$ac_cv_build_alias" &&
1252   ac_cv_build_alias=`$ac_config_guess`
1253 test -z "$ac_cv_build_alias" &&
1254   { { echo "$as_me:1254: error: cannot guess build type; you must specify one" >&5
1255 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1256    { (exit 1); exit 1; }; }
1257 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1258   { { echo "$as_me:1258: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1259 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1260    { (exit 1); exit 1; }; }
1261
1262 fi
1263 echo "$as_me:1263: result: $ac_cv_build" >&5
1264 echo "${ECHO_T}$ac_cv_build" >&6
1265 build=$ac_cv_build
1266 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1267 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1268 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1269
1270 echo "$as_me:1270: checking host system type" >&5
1271 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1272 if test "${ac_cv_host+set}" = set; then
1273   echo $ECHO_N "(cached) $ECHO_C" >&6
1274 else
1275   ac_cv_host_alias=$host_alias
1276 test -z "$ac_cv_host_alias" &&
1277   ac_cv_host_alias=$ac_cv_build_alias
1278 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1279   { { echo "$as_me:1279: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1280 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1281    { (exit 1); exit 1; }; }
1282
1283 fi
1284 echo "$as_me:1284: result: $ac_cv_host" >&5
1285 echo "${ECHO_T}$ac_cv_host" >&6
1286 host=$ac_cv_host
1287 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1288 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1289 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1290
1291 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1292         echo "$as_me:1292: checking target system type" >&5
1293 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1294 if test "${ac_cv_target+set}" = set; then
1295   echo $ECHO_N "(cached) $ECHO_C" >&6
1296 else
1297   ac_cv_target_alias=$target_alias
1298 test "x$ac_cv_target_alias" = "x" &&
1299   ac_cv_target_alias=$ac_cv_host_alias
1300 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1301   { { echo "$as_me:1301: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1302 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1303    { (exit 1); exit 1; }; }
1304
1305 fi
1306 echo "$as_me:1306: result: $ac_cv_target" >&5
1307 echo "${ECHO_T}$ac_cv_target" >&6
1308 target=$ac_cv_target
1309 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1310 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1311 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1312
1313 # The aliases save the names the user supplied, while $host etc.
1314 # will get canonicalized.
1315 test -n "$target_alias" &&
1316   test "$program_prefix$program_suffix$program_transform_name" = \
1317     NONENONEs,x,x, &&
1318   program_prefix=${target_alias}-
1319         system_name="$host_os"
1320 else
1321         system_name="`(uname -s -r) 2>/dev/null`"
1322         if test -z "$system_name" ; then
1323                 system_name="`(hostname) 2>/dev/null`"
1324         fi
1325 fi
1326 test -n "$system_name" && cat >>confdefs.h <<EOF
1327 #define SYSTEM_NAME "$system_name"
1328 EOF
1329
1330 if test "${cf_cv_system_name+set}" = set; then
1331   echo $ECHO_N "(cached) $ECHO_C" >&6
1332 else
1333   cf_cv_system_name="$system_name"
1334 fi
1335
1336 test -z "$system_name" && system_name="$cf_cv_system_name"
1337 test -n "$cf_cv_system_name" && echo "$as_me:1337: result: Configuring for $cf_cv_system_name" >&5
1338 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1339
1340 if test ".$system_name" != ".$cf_cv_system_name" ; then
1341         echo "$as_me:1341: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1342 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1343         { { echo "$as_me:1343: error: \"Please remove config.cache and try again.\"" >&5
1344 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1345    { (exit 1); exit 1; }; }
1346 fi
1347
1348 # Check whether --with-system-type or --without-system-type was given.
1349 if test "${with_system_type+set}" = set; then
1350   withval="$with_system_type"
1351   { echo "$as_me:1351: WARNING: overriding system type to $withval" >&5
1352 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1353  cf_cv_system_name=$withval
1354 fi;
1355
1356 ###     Save the given $CFLAGS to allow user-override.
1357 cf_user_CFLAGS="$CFLAGS"
1358
1359 ###     Default install-location
1360
1361 echo "$as_me:1361: checking for prefix" >&5
1362 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1363 if test "x$prefix" = "xNONE" ; then
1364         case "$cf_cv_system_name" in
1365                 # non-vendor systems don't have a conflict
1366         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1367                 prefix=/usr
1368                 ;;
1369         *)      prefix=$ac_default_prefix
1370                 ;;
1371         esac
1372 fi
1373 echo "$as_me:1373: result: $prefix" >&5
1374 echo "${ECHO_T}$prefix" >&6
1375
1376 if test "x$prefix" = "xNONE" ; then
1377 echo "$as_me:1377: checking for default include-directory" >&5
1378 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1379 test -n "$verbose" && echo 1>&6
1380 for cf_symbol in \
1381         $includedir \
1382         $includedir/ncurses \
1383         $prefix/include \
1384         $prefix/include/ncurses \
1385         /usr/local/include \
1386         /usr/local/include/ncurses \
1387         /usr/include \
1388         /usr/include/ncurses
1389 do
1390         cf_dir=`eval echo $cf_symbol`
1391         if test -f $cf_dir/curses.h ; then
1392         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1393                 includedir="$cf_symbol"
1394                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1395                 break
1396         fi
1397         fi
1398         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1399 done
1400 echo "$as_me:1400: result: $includedir" >&5
1401 echo "${ECHO_T}$includedir" >&6
1402 fi
1403
1404 ###     Checks for programs.
1405 ac_ext=c
1406 ac_cpp='$CPP $CPPFLAGS'
1407 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1408 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1409 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1410 ac_main_return=return
1411 if test -n "$ac_tool_prefix"; then
1412   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1413 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1414 echo "$as_me:1414: checking for $ac_word" >&5
1415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1416 if test "${ac_cv_prog_CC+set}" = set; then
1417   echo $ECHO_N "(cached) $ECHO_C" >&6
1418 else
1419   if test -n "$CC"; then
1420   ac_cv_prog_CC="$CC" # Let the user override the test.
1421 else
1422   ac_save_IFS=$IFS; IFS=$ac_path_separator
1423 ac_dummy="$PATH"
1424 for ac_dir in $ac_dummy; do
1425   IFS=$ac_save_IFS
1426   test -z "$ac_dir" && ac_dir=.
1427   $as_executable_p "$ac_dir/$ac_word" || continue
1428 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1429 echo "$as_me:1429: found $ac_dir/$ac_word" >&5
1430 break
1431 done
1432
1433 fi
1434 fi
1435 CC=$ac_cv_prog_CC
1436 if test -n "$CC"; then
1437   echo "$as_me:1437: result: $CC" >&5
1438 echo "${ECHO_T}$CC" >&6
1439 else
1440   echo "$as_me:1440: result: no" >&5
1441 echo "${ECHO_T}no" >&6
1442 fi
1443
1444 fi
1445 if test -z "$ac_cv_prog_CC"; then
1446   ac_ct_CC=$CC
1447   # Extract the first word of "gcc", so it can be a program name with args.
1448 set dummy gcc; ac_word=$2
1449 echo "$as_me:1449: checking for $ac_word" >&5
1450 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1451 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1452   echo $ECHO_N "(cached) $ECHO_C" >&6
1453 else
1454   if test -n "$ac_ct_CC"; then
1455   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1456 else
1457   ac_save_IFS=$IFS; IFS=$ac_path_separator
1458 ac_dummy="$PATH"
1459 for ac_dir in $ac_dummy; do
1460   IFS=$ac_save_IFS
1461   test -z "$ac_dir" && ac_dir=.
1462   $as_executable_p "$ac_dir/$ac_word" || continue
1463 ac_cv_prog_ac_ct_CC="gcc"
1464 echo "$as_me:1464: found $ac_dir/$ac_word" >&5
1465 break
1466 done
1467
1468 fi
1469 fi
1470 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1471 if test -n "$ac_ct_CC"; then
1472   echo "$as_me:1472: result: $ac_ct_CC" >&5
1473 echo "${ECHO_T}$ac_ct_CC" >&6
1474 else
1475   echo "$as_me:1475: result: no" >&5
1476 echo "${ECHO_T}no" >&6
1477 fi
1478
1479   CC=$ac_ct_CC
1480 else
1481   CC="$ac_cv_prog_CC"
1482 fi
1483
1484 if test -z "$CC"; then
1485   if test -n "$ac_tool_prefix"; then
1486   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1487 set dummy ${ac_tool_prefix}cc; ac_word=$2
1488 echo "$as_me:1488: checking for $ac_word" >&5
1489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1490 if test "${ac_cv_prog_CC+set}" = set; then
1491   echo $ECHO_N "(cached) $ECHO_C" >&6
1492 else
1493   if test -n "$CC"; then
1494   ac_cv_prog_CC="$CC" # Let the user override the test.
1495 else
1496   ac_save_IFS=$IFS; IFS=$ac_path_separator
1497 ac_dummy="$PATH"
1498 for ac_dir in $ac_dummy; do
1499   IFS=$ac_save_IFS
1500   test -z "$ac_dir" && ac_dir=.
1501   $as_executable_p "$ac_dir/$ac_word" || continue
1502 ac_cv_prog_CC="${ac_tool_prefix}cc"
1503 echo "$as_me:1503: found $ac_dir/$ac_word" >&5
1504 break
1505 done
1506
1507 fi
1508 fi
1509 CC=$ac_cv_prog_CC
1510 if test -n "$CC"; then
1511   echo "$as_me:1511: result: $CC" >&5
1512 echo "${ECHO_T}$CC" >&6
1513 else
1514   echo "$as_me:1514: result: no" >&5
1515 echo "${ECHO_T}no" >&6
1516 fi
1517
1518 fi
1519 if test -z "$ac_cv_prog_CC"; then
1520   ac_ct_CC=$CC
1521   # Extract the first word of "cc", so it can be a program name with args.
1522 set dummy cc; ac_word=$2
1523 echo "$as_me:1523: checking for $ac_word" >&5
1524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1525 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1526   echo $ECHO_N "(cached) $ECHO_C" >&6
1527 else
1528   if test -n "$ac_ct_CC"; then
1529   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1530 else
1531   ac_save_IFS=$IFS; IFS=$ac_path_separator
1532 ac_dummy="$PATH"
1533 for ac_dir in $ac_dummy; do
1534   IFS=$ac_save_IFS
1535   test -z "$ac_dir" && ac_dir=.
1536   $as_executable_p "$ac_dir/$ac_word" || continue
1537 ac_cv_prog_ac_ct_CC="cc"
1538 echo "$as_me:1538: found $ac_dir/$ac_word" >&5
1539 break
1540 done
1541
1542 fi
1543 fi
1544 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1545 if test -n "$ac_ct_CC"; then
1546   echo "$as_me:1546: result: $ac_ct_CC" >&5
1547 echo "${ECHO_T}$ac_ct_CC" >&6
1548 else
1549   echo "$as_me:1549: result: no" >&5
1550 echo "${ECHO_T}no" >&6
1551 fi
1552
1553   CC=$ac_ct_CC
1554 else
1555   CC="$ac_cv_prog_CC"
1556 fi
1557
1558 fi
1559 if test -z "$CC"; then
1560   # Extract the first word of "cc", so it can be a program name with args.
1561 set dummy cc; ac_word=$2
1562 echo "$as_me:1562: checking for $ac_word" >&5
1563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1564 if test "${ac_cv_prog_CC+set}" = set; then
1565   echo $ECHO_N "(cached) $ECHO_C" >&6
1566 else
1567   if test -n "$CC"; then
1568   ac_cv_prog_CC="$CC" # Let the user override the test.
1569 else
1570   ac_prog_rejected=no
1571   ac_save_IFS=$IFS; IFS=$ac_path_separator
1572 ac_dummy="$PATH"
1573 for ac_dir in $ac_dummy; do
1574   IFS=$ac_save_IFS
1575   test -z "$ac_dir" && ac_dir=.
1576   $as_executable_p "$ac_dir/$ac_word" || continue
1577 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1578   ac_prog_rejected=yes
1579   continue
1580 fi
1581 ac_cv_prog_CC="cc"
1582 echo "$as_me:1582: found $ac_dir/$ac_word" >&5
1583 break
1584 done
1585
1586 if test $ac_prog_rejected = yes; then
1587   # We found a bogon in the path, so make sure we never use it.
1588   set dummy $ac_cv_prog_CC
1589   shift
1590   if test $# != 0; then
1591     # We chose a different compiler from the bogus one.
1592     # However, it has the same basename, so the bogon will be chosen
1593     # first if we set CC to just the basename; use the full file name.
1594     shift
1595     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1596     shift
1597     ac_cv_prog_CC="$@"
1598   fi
1599 fi
1600 fi
1601 fi
1602 CC=$ac_cv_prog_CC
1603 if test -n "$CC"; then
1604   echo "$as_me:1604: result: $CC" >&5
1605 echo "${ECHO_T}$CC" >&6
1606 else
1607   echo "$as_me:1607: result: no" >&5
1608 echo "${ECHO_T}no" >&6
1609 fi
1610
1611 fi
1612 if test -z "$CC"; then
1613   if test -n "$ac_tool_prefix"; then
1614   for ac_prog in cl
1615   do
1616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1618 echo "$as_me:1618: checking for $ac_word" >&5
1619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1620 if test "${ac_cv_prog_CC+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   ac_save_IFS=$IFS; IFS=$ac_path_separator
1627 ac_dummy="$PATH"
1628 for ac_dir in $ac_dummy; do
1629   IFS=$ac_save_IFS
1630   test -z "$ac_dir" && ac_dir=.
1631   $as_executable_p "$ac_dir/$ac_word" || continue
1632 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1633 echo "$as_me:1633: found $ac_dir/$ac_word" >&5
1634 break
1635 done
1636
1637 fi
1638 fi
1639 CC=$ac_cv_prog_CC
1640 if test -n "$CC"; then
1641   echo "$as_me:1641: result: $CC" >&5
1642 echo "${ECHO_T}$CC" >&6
1643 else
1644   echo "$as_me:1644: result: no" >&5
1645 echo "${ECHO_T}no" >&6
1646 fi
1647
1648     test -n "$CC" && break
1649   done
1650 fi
1651 if test -z "$CC"; then
1652   ac_ct_CC=$CC
1653   for ac_prog in cl
1654 do
1655   # Extract the first word of "$ac_prog", so it can be a program name with args.
1656 set dummy $ac_prog; ac_word=$2
1657 echo "$as_me:1657: checking for $ac_word" >&5
1658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1659 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1660   echo $ECHO_N "(cached) $ECHO_C" >&6
1661 else
1662   if test -n "$ac_ct_CC"; then
1663   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1664 else
1665   ac_save_IFS=$IFS; IFS=$ac_path_separator
1666 ac_dummy="$PATH"
1667 for ac_dir in $ac_dummy; do
1668   IFS=$ac_save_IFS
1669   test -z "$ac_dir" && ac_dir=.
1670   $as_executable_p "$ac_dir/$ac_word" || continue
1671 ac_cv_prog_ac_ct_CC="$ac_prog"
1672 echo "$as_me:1672: found $ac_dir/$ac_word" >&5
1673 break
1674 done
1675
1676 fi
1677 fi
1678 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1679 if test -n "$ac_ct_CC"; then
1680   echo "$as_me:1680: result: $ac_ct_CC" >&5
1681 echo "${ECHO_T}$ac_ct_CC" >&6
1682 else
1683   echo "$as_me:1683: result: no" >&5
1684 echo "${ECHO_T}no" >&6
1685 fi
1686
1687   test -n "$ac_ct_CC" && break
1688 done
1689
1690   CC=$ac_ct_CC
1691 fi
1692
1693 fi
1694
1695 test -z "$CC" && { { echo "$as_me:1695: error: no acceptable cc found in \$PATH" >&5
1696 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1697    { (exit 1); exit 1; }; }
1698
1699 # Provide some information about the compiler.
1700 echo "$as_me:1700:" \
1701      "checking for C compiler version" >&5
1702 ac_compiler=`set X $ac_compile; echo $2`
1703 { (eval echo "$as_me:1703: \"$ac_compiler --version </dev/null >&5\"") >&5
1704   (eval $ac_compiler --version </dev/null >&5) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }
1708 { (eval echo "$as_me:1708: \"$ac_compiler -v </dev/null >&5\"") >&5
1709   (eval $ac_compiler -v </dev/null >&5) 2>&5
1710   ac_status=$?
1711   echo "$as_me:1711: \$? = $ac_status" >&5
1712   (exit $ac_status); }
1713 { (eval echo "$as_me:1713: \"$ac_compiler -V </dev/null >&5\"") >&5
1714   (eval $ac_compiler -V </dev/null >&5) 2>&5
1715   ac_status=$?
1716   echo "$as_me:1716: \$? = $ac_status" >&5
1717   (exit $ac_status); }
1718
1719 cat >conftest.$ac_ext <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main ()
1725 {
1726
1727   ;
1728   return 0;
1729 }
1730 _ACEOF
1731 ac_clean_files_save=$ac_clean_files
1732 ac_clean_files="$ac_clean_files a.out a.exe"
1733 # Try to create an executable without -o first, disregard a.out.
1734 # It will help us diagnose broken compilers, and finding out an intuition
1735 # of exeext.
1736 echo "$as_me:1736: checking for C compiler default output" >&5
1737 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1738 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1739 if { (eval echo "$as_me:1739: \"$ac_link_default\"") >&5
1740   (eval $ac_link_default) 2>&5
1741   ac_status=$?
1742   echo "$as_me:1742: \$? = $ac_status" >&5
1743   (exit $ac_status); }; then
1744   # Find the output, starting from the most likely.  This scheme is
1745 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1746 # resort.
1747 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1748                 ls a.out conftest 2>/dev/null;
1749                 ls a.* conftest.* 2>/dev/null`; do
1750   case $ac_file in
1751     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1752     a.out ) # We found the default executable, but exeext='' is most
1753             # certainly right.
1754             break;;
1755     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1756           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1757           export ac_cv_exeext
1758           break;;
1759     * ) break;;
1760   esac
1761 done
1762 else
1763   echo "$as_me: failed program was:" >&5
1764 cat conftest.$ac_ext >&5
1765 { { echo "$as_me:1765: error: C compiler cannot create executables" >&5
1766 echo "$as_me: error: C compiler cannot create executables" >&2;}
1767    { (exit 77); exit 77; }; }
1768 fi
1769
1770 ac_exeext=$ac_cv_exeext
1771 echo "$as_me:1771: result: $ac_file" >&5
1772 echo "${ECHO_T}$ac_file" >&6
1773
1774 # Check the compiler produces executables we can run.  If not, either
1775 # the compiler is broken, or we cross compile.
1776 echo "$as_me:1776: checking whether the C compiler works" >&5
1777 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1778 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1779 # If not cross compiling, check that we can run a simple program.
1780 if test "$cross_compiling" != yes; then
1781   if { ac_try='./$ac_file'
1782   { (eval echo "$as_me:1782: \"$ac_try\"") >&5
1783   (eval $ac_try) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); }; }; then
1787     cross_compiling=no
1788   else
1789     if test "$cross_compiling" = maybe; then
1790         cross_compiling=yes
1791     else
1792         { { echo "$as_me:1792: error: cannot run C compiled programs.
1793 If you meant to cross compile, use \`--host'." >&5
1794 echo "$as_me: error: cannot run C compiled programs.
1795 If you meant to cross compile, use \`--host'." >&2;}
1796    { (exit 1); exit 1; }; }
1797     fi
1798   fi
1799 fi
1800 echo "$as_me:1800: result: yes" >&5
1801 echo "${ECHO_T}yes" >&6
1802
1803 rm -f a.out a.exe conftest$ac_cv_exeext
1804 ac_clean_files=$ac_clean_files_save
1805 # Check the compiler produces executables we can run.  If not, either
1806 # the compiler is broken, or we cross compile.
1807 echo "$as_me:1807: checking whether we are cross compiling" >&5
1808 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1809 echo "$as_me:1809: result: $cross_compiling" >&5
1810 echo "${ECHO_T}$cross_compiling" >&6
1811
1812 echo "$as_me:1812: checking for executable suffix" >&5
1813 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1814 if { (eval echo "$as_me:1814: \"$ac_link\"") >&5
1815   (eval $ac_link) 2>&5
1816   ac_status=$?
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); }; then
1819   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1820 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1821 # work properly (i.e., refer to `conftest.exe'), while it won't with
1822 # `rm'.
1823 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1824   case $ac_file in
1825     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1826     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1827           export ac_cv_exeext
1828           break;;
1829     * ) break;;
1830   esac
1831 done
1832 else
1833   { { echo "$as_me:1833: error: cannot compute EXEEXT: cannot compile and link" >&5
1834 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1835    { (exit 1); exit 1; }; }
1836 fi
1837
1838 rm -f conftest$ac_cv_exeext
1839 echo "$as_me:1839: result: $ac_cv_exeext" >&5
1840 echo "${ECHO_T}$ac_cv_exeext" >&6
1841
1842 rm -f conftest.$ac_ext
1843 EXEEXT=$ac_cv_exeext
1844 ac_exeext=$EXEEXT
1845 echo "$as_me:1845: checking for object suffix" >&5
1846 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1847 if test "${ac_cv_objext+set}" = set; then
1848   echo $ECHO_N "(cached) $ECHO_C" >&6
1849 else
1850   cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853
1854 int
1855 main ()
1856 {
1857
1858   ;
1859   return 0;
1860 }
1861 _ACEOF
1862 rm -f conftest.o conftest.obj
1863 if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5
1864   (eval $ac_compile) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit $ac_status); }; then
1868   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1869   case $ac_file in
1870     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1871     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1872        break;;
1873   esac
1874 done
1875 else
1876   echo "$as_me: failed program was:" >&5
1877 cat conftest.$ac_ext >&5
1878 { { echo "$as_me:1878: error: cannot compute OBJEXT: cannot compile" >&5
1879 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1880    { (exit 1); exit 1; }; }
1881 fi
1882
1883 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1884 fi
1885 echo "$as_me:1885: result: $ac_cv_objext" >&5
1886 echo "${ECHO_T}$ac_cv_objext" >&6
1887 OBJEXT=$ac_cv_objext
1888 ac_objext=$OBJEXT
1889 echo "$as_me:1889: checking whether we are using the GNU C compiler" >&5
1890 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1891 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1892   echo $ECHO_N "(cached) $ECHO_C" >&6
1893 else
1894   cat >conftest.$ac_ext <<_ACEOF
1895 #line 1895 "configure"
1896 #include "confdefs.h"
1897
1898 int
1899 main ()
1900 {
1901 #ifndef __GNUC__
1902        choke me
1903 #endif
1904
1905   ;
1906   return 0;
1907 }
1908 _ACEOF
1909 rm -f conftest.$ac_objext
1910 if { (eval echo "$as_me:1910: \"$ac_compile\"") >&5
1911   (eval $ac_compile) 2>&5
1912   ac_status=$?
1913   echo "$as_me:1913: \$? = $ac_status" >&5
1914   (exit $ac_status); } &&
1915          { ac_try='test -s conftest.$ac_objext'
1916   { (eval echo "$as_me:1916: \"$ac_try\"") >&5
1917   (eval $ac_try) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit $ac_status); }; }; then
1921   ac_compiler_gnu=yes
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat conftest.$ac_ext >&5
1925 ac_compiler_gnu=no
1926 fi
1927 rm -f conftest.$ac_objext conftest.$ac_ext
1928 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1929
1930 fi
1931 echo "$as_me:1931: result: $ac_cv_c_compiler_gnu" >&5
1932 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1933 GCC=`test $ac_compiler_gnu = yes && echo yes`
1934 ac_test_CFLAGS=${CFLAGS+set}
1935 ac_save_CFLAGS=$CFLAGS
1936 CFLAGS="-g"
1937 echo "$as_me:1937: checking whether $CC accepts -g" >&5
1938 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1939 if test "${ac_cv_prog_cc_g+set}" = set; then
1940   echo $ECHO_N "(cached) $ECHO_C" >&6
1941 else
1942   cat >conftest.$ac_ext <<_ACEOF
1943 #line 1943 "configure"
1944 #include "confdefs.h"
1945
1946 int
1947 main ()
1948 {
1949
1950   ;
1951   return 0;
1952 }
1953 _ACEOF
1954 rm -f conftest.$ac_objext
1955 if { (eval echo "$as_me:1955: \"$ac_compile\"") >&5
1956   (eval $ac_compile) 2>&5
1957   ac_status=$?
1958   echo "$as_me:1958: \$? = $ac_status" >&5
1959   (exit $ac_status); } &&
1960          { ac_try='test -s conftest.$ac_objext'
1961   { (eval echo "$as_me:1961: \"$ac_try\"") >&5
1962   (eval $ac_try) 2>&5
1963   ac_status=$?
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); }; }; then
1966   ac_cv_prog_cc_g=yes
1967 else
1968   echo "$as_me: failed program was:" >&5
1969 cat conftest.$ac_ext >&5
1970 ac_cv_prog_cc_g=no
1971 fi
1972 rm -f conftest.$ac_objext conftest.$ac_ext
1973 fi
1974 echo "$as_me:1974: result: $ac_cv_prog_cc_g" >&5
1975 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1976 if test "$ac_test_CFLAGS" = set; then
1977   CFLAGS=$ac_save_CFLAGS
1978 elif test $ac_cv_prog_cc_g = yes; then
1979   if test "$GCC" = yes; then
1980     CFLAGS="-g -O2"
1981   else
1982     CFLAGS="-g"
1983   fi
1984 else
1985   if test "$GCC" = yes; then
1986     CFLAGS="-O2"
1987   else
1988     CFLAGS=
1989   fi
1990 fi
1991 # Some people use a C++ compiler to compile C.  Since we use `exit',
1992 # in C++ we need to declare it.  In case someone uses the same compiler
1993 # for both compiling C and C++ we need to have the C++ compiler decide
1994 # the declaration of exit, since it's the most demanding environment.
1995 cat >conftest.$ac_ext <<_ACEOF
1996 #ifndef __cplusplus
1997   choke me
1998 #endif
1999 _ACEOF
2000 rm -f conftest.$ac_objext
2001 if { (eval echo "$as_me:2001: \"$ac_compile\"") >&5
2002   (eval $ac_compile) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit $ac_status); } &&
2006          { ac_try='test -s conftest.$ac_objext'
2007   { (eval echo "$as_me:2007: \"$ac_try\"") >&5
2008   (eval $ac_try) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); }; }; then
2012   for ac_declaration in \
2013    ''\
2014    '#include <stdlib.h>' \
2015    'extern "C" void std::exit (int) throw (); using std::exit;' \
2016    'extern "C" void std::exit (int); using std::exit;' \
2017    'extern "C" void exit (int) throw ();' \
2018    'extern "C" void exit (int);' \
2019    'void exit (int);'
2020 do
2021   cat >conftest.$ac_ext <<_ACEOF
2022 #line 2022 "configure"
2023 #include "confdefs.h"
2024 #include <stdlib.h>
2025 $ac_declaration
2026 int
2027 main ()
2028 {
2029 exit (42);
2030   ;
2031   return 0;
2032 }
2033 _ACEOF
2034 rm -f conftest.$ac_objext
2035 if { (eval echo "$as_me:2035: \"$ac_compile\"") >&5
2036   (eval $ac_compile) 2>&5
2037   ac_status=$?
2038   echo "$as_me:2038: \$? = $ac_status" >&5
2039   (exit $ac_status); } &&
2040          { ac_try='test -s conftest.$ac_objext'
2041   { (eval echo "$as_me:2041: \"$ac_try\"") >&5
2042   (eval $ac_try) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); }; }; then
2046   :
2047 else
2048   echo "$as_me: failed program was:" >&5
2049 cat conftest.$ac_ext >&5
2050 continue
2051 fi
2052 rm -f conftest.$ac_objext conftest.$ac_ext
2053   cat >conftest.$ac_ext <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056 $ac_declaration
2057 int
2058 main ()
2059 {
2060 exit (42);
2061   ;
2062   return 0;
2063 }
2064 _ACEOF
2065 rm -f conftest.$ac_objext
2066 if { (eval echo "$as_me:2066: \"$ac_compile\"") >&5
2067   (eval $ac_compile) 2>&5
2068   ac_status=$?
2069   echo "$as_me:2069: \$? = $ac_status" >&5
2070   (exit $ac_status); } &&
2071          { ac_try='test -s conftest.$ac_objext'
2072   { (eval echo "$as_me:2072: \"$ac_try\"") >&5
2073   (eval $ac_try) 2>&5
2074   ac_status=$?
2075   echo "$as_me:2075: \$? = $ac_status" >&5
2076   (exit $ac_status); }; }; then
2077   break
2078 else
2079   echo "$as_me: failed program was:" >&5
2080 cat conftest.$ac_ext >&5
2081 fi
2082 rm -f conftest.$ac_objext conftest.$ac_ext
2083 done
2084 rm -f conftest*
2085 if test -n "$ac_declaration"; then
2086   echo '#ifdef __cplusplus' >>confdefs.h
2087   echo $ac_declaration      >>confdefs.h
2088   echo '#endif'             >>confdefs.h
2089 fi
2090
2091 else
2092   echo "$as_me: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 fi
2095 rm -f conftest.$ac_objext conftest.$ac_ext
2096 ac_ext=c
2097 ac_cpp='$CPP $CPPFLAGS'
2098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2101 ac_main_return=return
2102
2103 GCC_VERSION=none
2104 if test "$GCC" = yes ; then
2105         echo "$as_me:2105: checking version of $CC" >&5
2106 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2107         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2108         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2109         echo "$as_me:2109: result: $GCC_VERSION" >&5
2110 echo "${ECHO_T}$GCC_VERSION" >&6
2111 fi
2112
2113 ac_ext=c
2114 ac_cpp='$CPP $CPPFLAGS'
2115 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2116 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2117 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2118 ac_main_return=return
2119 echo "$as_me:2119: checking how to run the C preprocessor" >&5
2120 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2121 # On Suns, sometimes $CPP names a directory.
2122 if test -n "$CPP" && test -d "$CPP"; then
2123   CPP=
2124 fi
2125 if test -z "$CPP"; then
2126   if test "${ac_cv_prog_CPP+set}" = set; then
2127   echo $ECHO_N "(cached) $ECHO_C" >&6
2128 else
2129       # Double quotes because CPP needs to be expanded
2130     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2131     do
2132       ac_preproc_ok=false
2133 for ac_c_preproc_warn_flag in '' yes
2134 do
2135   # Use a header file that comes with gcc, so configuring glibc
2136   # with a fresh cross-compiler works.
2137   # On the NeXT, cc -E runs the code through the compiler's parser,
2138   # not just through cpp. "Syntax error" is here to catch this case.
2139   cat >conftest.$ac_ext <<_ACEOF
2140 #line 2140 "configure"
2141 #include "confdefs.h"
2142 #include <assert.h>
2143                      Syntax error
2144 _ACEOF
2145 if { (eval echo "$as_me:2145: \"$ac_cpp conftest.$ac_ext\"") >&5
2146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2147   ac_status=$?
2148   egrep -v '^ *\+' conftest.er1 >conftest.err
2149   rm -f conftest.er1
2150   cat conftest.err >&5
2151   echo "$as_me:2151: \$? = $ac_status" >&5
2152   (exit $ac_status); } >/dev/null; then
2153   if test -s conftest.err; then
2154     ac_cpp_err=$ac_c_preproc_warn_flag
2155   else
2156     ac_cpp_err=
2157   fi
2158 else
2159   ac_cpp_err=yes
2160 fi
2161 if test -z "$ac_cpp_err"; then
2162   :
2163 else
2164   echo "$as_me: failed program was:" >&5
2165   cat conftest.$ac_ext >&5
2166   # Broken: fails on valid input.
2167 continue
2168 fi
2169 rm -f conftest.err conftest.$ac_ext
2170
2171   # OK, works on sane cases.  Now check whether non-existent headers
2172   # can be detected and how.
2173   cat >conftest.$ac_ext <<_ACEOF
2174 #line 2174 "configure"
2175 #include "confdefs.h"
2176 #include <ac_nonexistent.h>
2177 _ACEOF
2178 if { (eval echo "$as_me:2178: \"$ac_cpp conftest.$ac_ext\"") >&5
2179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2180   ac_status=$?
2181   egrep -v '^ *\+' conftest.er1 >conftest.err
2182   rm -f conftest.er1
2183   cat conftest.err >&5
2184   echo "$as_me:2184: \$? = $ac_status" >&5
2185   (exit $ac_status); } >/dev/null; then
2186   if test -s conftest.err; then
2187     ac_cpp_err=$ac_c_preproc_warn_flag
2188   else
2189     ac_cpp_err=
2190   fi
2191 else
2192   ac_cpp_err=yes
2193 fi
2194 if test -z "$ac_cpp_err"; then
2195   # Broken: success on invalid input.
2196 continue
2197 else
2198   echo "$as_me: failed program was:" >&5
2199   cat conftest.$ac_ext >&5
2200   # Passes both tests.
2201 ac_preproc_ok=:
2202 break
2203 fi
2204 rm -f conftest.err conftest.$ac_ext
2205
2206 done
2207 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2208 rm -f conftest.err conftest.$ac_ext
2209 if $ac_preproc_ok; then
2210   break
2211 fi
2212
2213     done
2214     ac_cv_prog_CPP=$CPP
2215
2216 fi
2217   CPP=$ac_cv_prog_CPP
2218 else
2219   ac_cv_prog_CPP=$CPP
2220 fi
2221 echo "$as_me:2221: result: $CPP" >&5
2222 echo "${ECHO_T}$CPP" >&6
2223 ac_preproc_ok=false
2224 for ac_c_preproc_warn_flag in '' yes
2225 do
2226   # Use a header file that comes with gcc, so configuring glibc
2227   # with a fresh cross-compiler works.
2228   # On the NeXT, cc -E runs the code through the compiler's parser,
2229   # not just through cpp. "Syntax error" is here to catch this case.
2230   cat >conftest.$ac_ext <<_ACEOF
2231 #line 2231 "configure"
2232 #include "confdefs.h"
2233 #include <assert.h>
2234                      Syntax error
2235 _ACEOF
2236 if { (eval echo "$as_me:2236: \"$ac_cpp conftest.$ac_ext\"") >&5
2237   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2238   ac_status=$?
2239   egrep -v '^ *\+' conftest.er1 >conftest.err
2240   rm -f conftest.er1
2241   cat conftest.err >&5
2242   echo "$as_me:2242: \$? = $ac_status" >&5
2243   (exit $ac_status); } >/dev/null; then
2244   if test -s conftest.err; then
2245     ac_cpp_err=$ac_c_preproc_warn_flag
2246   else
2247     ac_cpp_err=
2248   fi
2249 else
2250   ac_cpp_err=yes
2251 fi
2252 if test -z "$ac_cpp_err"; then
2253   :
2254 else
2255   echo "$as_me: failed program was:" >&5
2256   cat conftest.$ac_ext >&5
2257   # Broken: fails on valid input.
2258 continue
2259 fi
2260 rm -f conftest.err conftest.$ac_ext
2261
2262   # OK, works on sane cases.  Now check whether non-existent headers
2263   # can be detected and how.
2264   cat >conftest.$ac_ext <<_ACEOF
2265 #line 2265 "configure"
2266 #include "confdefs.h"
2267 #include <ac_nonexistent.h>
2268 _ACEOF
2269 if { (eval echo "$as_me:2269: \"$ac_cpp conftest.$ac_ext\"") >&5
2270   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2271   ac_status=$?
2272   egrep -v '^ *\+' conftest.er1 >conftest.err
2273   rm -f conftest.er1
2274   cat conftest.err >&5
2275   echo "$as_me:2275: \$? = $ac_status" >&5
2276   (exit $ac_status); } >/dev/null; then
2277   if test -s conftest.err; then
2278     ac_cpp_err=$ac_c_preproc_warn_flag
2279   else
2280     ac_cpp_err=
2281   fi
2282 else
2283   ac_cpp_err=yes
2284 fi
2285 if test -z "$ac_cpp_err"; then
2286   # Broken: success on invalid input.
2287 continue
2288 else
2289   echo "$as_me: failed program was:" >&5
2290   cat conftest.$ac_ext >&5
2291   # Passes both tests.
2292 ac_preproc_ok=:
2293 break
2294 fi
2295 rm -f conftest.err conftest.$ac_ext
2296
2297 done
2298 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2299 rm -f conftest.err conftest.$ac_ext
2300 if $ac_preproc_ok; then
2301   :
2302 else
2303   { { echo "$as_me:2303: error: C preprocessor \"$CPP\" fails sanity check" >&5
2304 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2305    { (exit 1); exit 1; }; }
2306 fi
2307
2308 ac_ext=c
2309 ac_cpp='$CPP $CPPFLAGS'
2310 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2311 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2312 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2313 ac_main_return=return
2314
2315 if test $ac_cv_c_compiler_gnu = yes; then
2316     echo "$as_me:2316: checking whether $CC needs -traditional" >&5
2317 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2318 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2319   echo $ECHO_N "(cached) $ECHO_C" >&6
2320 else
2321     ac_pattern="Autoconf.*'x'"
2322   cat >conftest.$ac_ext <<_ACEOF
2323 #line 2323 "configure"
2324 #include "confdefs.h"
2325 #include <sgtty.h>
2326 int Autoconf = TIOCGETP;
2327 _ACEOF
2328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2329   egrep "$ac_pattern" >/dev/null 2>&1; then
2330   ac_cv_prog_gcc_traditional=yes
2331 else
2332   ac_cv_prog_gcc_traditional=no
2333 fi
2334 rm -f conftest*
2335
2336   if test $ac_cv_prog_gcc_traditional = no; then
2337     cat >conftest.$ac_ext <<_ACEOF
2338 #line 2338 "configure"
2339 #include "confdefs.h"
2340 #include <termio.h>
2341 int Autoconf = TCGETA;
2342 _ACEOF
2343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2344   egrep "$ac_pattern" >/dev/null 2>&1; then
2345   ac_cv_prog_gcc_traditional=yes
2346 fi
2347 rm -f conftest*
2348
2349   fi
2350 fi
2351 echo "$as_me:2351: result: $ac_cv_prog_gcc_traditional" >&5
2352 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2353   if test $ac_cv_prog_gcc_traditional = yes; then
2354     CC="$CC -traditional"
2355   fi
2356 fi
2357
2358 echo "$as_me:2358: checking whether $CC understands -c and -o together" >&5
2359 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2360 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2361   echo $ECHO_N "(cached) $ECHO_C" >&6
2362 else
2363
2364 cat > conftest.$ac_ext <<CF_EOF
2365 #include <stdio.h>
2366 int main()
2367 {
2368         ${cf_cv_main_return:-return}(0);
2369 }
2370 CF_EOF
2371 # We do the test twice because some compilers refuse to overwrite an
2372 # existing .o file with -o, though they will create one.
2373 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2374 if { (eval echo "$as_me:2374: \"$ac_try\"") >&5
2375   (eval $ac_try) 2>&5
2376   ac_status=$?
2377   echo "$as_me:2377: \$? = $ac_status" >&5
2378   (exit $ac_status); } &&
2379   test -f conftest2.$ac_objext && { (eval echo "$as_me:2379: \"$ac_try\"") >&5
2380   (eval $ac_try) 2>&5
2381   ac_status=$?
2382   echo "$as_me:2382: \$? = $ac_status" >&5
2383   (exit $ac_status); };
2384 then
2385   eval cf_cv_prog_CC_c_o=yes
2386 else
2387   eval cf_cv_prog_CC_c_o=no
2388 fi
2389 rm -f conftest*
2390
2391 fi
2392 if test $cf_cv_prog_CC_c_o = yes; then
2393   echo "$as_me:2393: result: yes" >&5
2394 echo "${ECHO_T}yes" >&6
2395 else
2396   echo "$as_me:2396: result: no" >&5
2397 echo "${ECHO_T}no" >&6
2398 fi
2399
2400 echo "$as_me:2400: checking for POSIXized ISC" >&5
2401 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2402 if test -d /etc/conf/kconfig.d &&
2403    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2404 then
2405   echo "$as_me:2405: result: yes" >&5
2406 echo "${ECHO_T}yes" >&6
2407   ISC=yes # If later tests want to check for ISC.
2408
2409 cat >>confdefs.h <<\EOF
2410 #define _POSIX_SOURCE 1
2411 EOF
2412
2413   if test "$GCC" = yes; then
2414     CC="$CC -posix"
2415   else
2416     CC="$CC -Xp"
2417   fi
2418 else
2419   echo "$as_me:2419: result: no" >&5
2420 echo "${ECHO_T}no" >&6
2421   ISC=
2422 fi
2423
2424 echo "$as_me:2424: checking for ${CC-cc} option to accept ANSI C" >&5
2425 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2426 if test "${cf_cv_ansi_cc+set}" = set; then
2427   echo $ECHO_N "(cached) $ECHO_C" >&6
2428 else
2429
2430 cf_cv_ansi_cc=no
2431 cf_save_CFLAGS="$CFLAGS"
2432 cf_save_CPPFLAGS="$CPPFLAGS"
2433 # Don't try gcc -ansi; that turns off useful extensions and
2434 # breaks some systems' header files.
2435 # AIX                   -qlanglvl=ansi
2436 # Ultrix and OSF/1      -std1
2437 # HP-UX                 -Aa -D_HPUX_SOURCE
2438 # SVR4                  -Xc
2439 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2440 for cf_arg in "-DCC_HAS_PROTOS" \
2441         "" \
2442         -qlanglvl=ansi \
2443         -std1 \
2444         -Ae \
2445         "-Aa -D_HPUX_SOURCE" \
2446         -Xc
2447 do
2448
2449 cf_fix_cppflags=no
2450 cf_new_cflags=
2451 cf_new_cppflags=
2452 cf_new_extra_cppflags=
2453
2454 for cf_add_cflags in $cf_arg
2455 do
2456 case $cf_fix_cppflags in
2457 no)
2458         case $cf_add_cflags in #(vi
2459         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2460                 case $cf_add_cflags in
2461                 -D*)
2462                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2463
2464                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2465                                 && test -z "${cf_tst_cflags}" \
2466                                 && cf_fix_cppflags=yes
2467
2468                         if test $cf_fix_cppflags = yes ; then
2469                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2470                                 continue
2471                         elif test "${cf_tst_cflags}" = "\"'" ; then
2472                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2473                                 continue
2474                         fi
2475                         ;;
2476                 esac
2477                 case "$CPPFLAGS" in
2478                 *$cf_add_cflags) #(vi
2479                         ;;
2480                 *) #(vi
2481                         case $cf_add_cflags in #(vi
2482                         -D*)
2483                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2484
2485 CPPFLAGS=`echo "$CPPFLAGS" | \
2486         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2487                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2488
2489                                 ;;
2490                         esac
2491                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2492                         ;;
2493                 esac
2494                 ;;
2495         *)
2496                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2497                 ;;
2498         esac
2499         ;;
2500 yes)
2501         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2502
2503         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2504
2505         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2506                 && test -z "${cf_tst_cflags}" \
2507                 && cf_fix_cppflags=no
2508         ;;
2509 esac
2510 done
2511
2512 if test -n "$cf_new_cflags" ; then
2513
2514         CFLAGS="$CFLAGS $cf_new_cflags"
2515 fi
2516
2517 if test -n "$cf_new_cppflags" ; then
2518
2519         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2520 fi
2521
2522 if test -n "$cf_new_extra_cppflags" ; then
2523
2524         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2525 fi
2526
2527         cat >conftest.$ac_ext <<_ACEOF
2528 #line 2528 "configure"
2529 #include "confdefs.h"
2530
2531 #ifndef CC_HAS_PROTOS
2532 #if !defined(__STDC__) || (__STDC__ != 1)
2533 choke me
2534 #endif
2535 #endif
2536
2537 int
2538 main ()
2539 {
2540
2541         int test (int i, double x);
2542         struct s1 {int (*f) (int a);};
2543         struct s2 {int (*f) (double a);};
2544   ;
2545   return 0;
2546 }
2547 _ACEOF
2548 rm -f conftest.$ac_objext
2549 if { (eval echo "$as_me:2549: \"$ac_compile\"") >&5
2550   (eval $ac_compile) 2>&5
2551   ac_status=$?
2552   echo "$as_me:2552: \$? = $ac_status" >&5
2553   (exit $ac_status); } &&
2554          { ac_try='test -s conftest.$ac_objext'
2555   { (eval echo "$as_me:2555: \"$ac_try\"") >&5
2556   (eval $ac_try) 2>&5
2557   ac_status=$?
2558   echo "$as_me:2558: \$? = $ac_status" >&5
2559   (exit $ac_status); }; }; then
2560   cf_cv_ansi_cc="$cf_arg"; break
2561 else
2562   echo "$as_me: failed program was:" >&5
2563 cat conftest.$ac_ext >&5
2564 fi
2565 rm -f conftest.$ac_objext conftest.$ac_ext
2566 done
2567 CFLAGS="$cf_save_CFLAGS"
2568 CPPFLAGS="$cf_save_CPPFLAGS"
2569
2570 fi
2571 echo "$as_me:2571: result: $cf_cv_ansi_cc" >&5
2572 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2573
2574 if test "$cf_cv_ansi_cc" != "no"; then
2575 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2576
2577 cf_fix_cppflags=no
2578 cf_new_cflags=
2579 cf_new_cppflags=
2580 cf_new_extra_cppflags=
2581
2582 for cf_add_cflags in $cf_cv_ansi_cc
2583 do
2584 case $cf_fix_cppflags in
2585 no)
2586         case $cf_add_cflags in #(vi
2587         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2588                 case $cf_add_cflags in
2589                 -D*)
2590                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2591
2592                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2593                                 && test -z "${cf_tst_cflags}" \
2594                                 && cf_fix_cppflags=yes
2595
2596                         if test $cf_fix_cppflags = yes ; then
2597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2598                                 continue
2599                         elif test "${cf_tst_cflags}" = "\"'" ; then
2600                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2601                                 continue
2602                         fi
2603                         ;;
2604                 esac
2605                 case "$CPPFLAGS" in
2606                 *$cf_add_cflags) #(vi
2607                         ;;
2608                 *) #(vi
2609                         case $cf_add_cflags in #(vi
2610                         -D*)
2611                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2612
2613 CPPFLAGS=`echo "$CPPFLAGS" | \
2614         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2615                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2616
2617                                 ;;
2618                         esac
2619                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2620                         ;;
2621                 esac
2622                 ;;
2623         *)
2624                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2625                 ;;
2626         esac
2627         ;;
2628 yes)
2629         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2630
2631         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2632
2633         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2634                 && test -z "${cf_tst_cflags}" \
2635                 && cf_fix_cppflags=no
2636         ;;
2637 esac
2638 done
2639
2640 if test -n "$cf_new_cflags" ; then
2641
2642         CFLAGS="$CFLAGS $cf_new_cflags"
2643 fi
2644
2645 if test -n "$cf_new_cppflags" ; then
2646
2647         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2648 fi
2649
2650 if test -n "$cf_new_extra_cppflags" ; then
2651
2652         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2653 fi
2654
2655 else
2656         cat >>confdefs.h <<\EOF
2657 #define CC_HAS_PROTOS 1
2658 EOF
2659
2660 fi
2661 fi
2662
2663 if test "$cf_cv_ansi_cc" = "no"; then
2664         { { echo "$as_me:2664: error: Your compiler does not appear to recognize prototypes.
2665 You have the following choices:
2666         a. adjust your compiler options
2667         b. get an up-to-date compiler
2668         c. use a wrapper such as unproto" >&5
2669 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2670 You have the following choices:
2671         a. adjust your compiler options
2672         b. get an up-to-date compiler
2673         c. use a wrapper such as unproto" >&2;}
2674    { (exit 1); exit 1; }; }
2675 fi
2676
2677 case $cf_cv_system_name in
2678 os2*)
2679     CFLAGS="$CFLAGS -Zmt"
2680     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2681     CXXFLAGS="$CXXFLAGS -Zmt"
2682     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2683     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2684     ac_cv_exeext=.exe
2685     ;;
2686 esac
2687
2688 PROG_EXT="$EXEEXT"
2689
2690 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2691 #define PROG_EXT "$PROG_EXT"
2692 EOF
2693
2694 if test "$cross_compiling" = yes ; then
2695   LDCONFIG=:
2696 else
2697 case "$cf_cv_system_name" in #(vi
2698 dragonfly*|freebsd*) #(vi
2699   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2700   ;;
2701 *) LDPATH=$PATH:/sbin:/usr/sbin
2702   # Extract the first word of "ldconfig", so it can be a program name with args.
2703 set dummy ldconfig; ac_word=$2
2704 echo "$as_me:2704: checking for $ac_word" >&5
2705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2706 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2707   echo $ECHO_N "(cached) $ECHO_C" >&6
2708 else
2709   case $LDCONFIG in
2710   [\\/]* | ?:[\\/]*)
2711   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2712   ;;
2713   *)
2714   ac_save_IFS=$IFS; IFS=$ac_path_separator
2715 ac_dummy="$LDPATH"
2716 for ac_dir in $ac_dummy; do
2717   IFS=$ac_save_IFS
2718   test -z "$ac_dir" && ac_dir=.
2719   if $as_executable_p "$ac_dir/$ac_word"; then
2720    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2721    echo "$as_me:2721: found $ac_dir/$ac_word" >&5
2722    break
2723 fi
2724 done
2725
2726   ;;
2727 esac
2728 fi
2729 LDCONFIG=$ac_cv_path_LDCONFIG
2730
2731 if test -n "$LDCONFIG"; then
2732   echo "$as_me:2732: result: $LDCONFIG" >&5
2733 echo "${ECHO_T}$LDCONFIG" >&6
2734 else
2735   echo "$as_me:2735: result: no" >&5
2736 echo "${ECHO_T}no" >&6
2737 fi
2738
2739   ;;
2740 esac
2741 fi
2742
2743 echo "$as_me:2743: checking if you want to ensure bool is consistent with C++" >&5
2744 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2745
2746 # Check whether --with-cxx or --without-cxx was given.
2747 if test "${with_cxx+set}" = set; then
2748   withval="$with_cxx"
2749   cf_with_cxx=$withval
2750 else
2751   cf_with_cxx=yes
2752 fi;
2753 echo "$as_me:2753: result: $cf_with_cxx" >&5
2754 echo "${ECHO_T}$cf_with_cxx" >&6
2755 if test "X$cf_with_cxx" = Xno ; then
2756         CXX=""
2757         GXX=""
2758 else
2759         # with autoconf 2.13, we can change the error to a warning:
2760                 ac_ext=cc
2761 ac_cpp='$CXXCPP $CPPFLAGS'
2762 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2763 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2764 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2765 ac_main_return=return
2766 if test -n "$ac_tool_prefix"; then
2767   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2768   do
2769     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2770 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2771 echo "$as_me:2771: checking for $ac_word" >&5
2772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2773 if test "${ac_cv_prog_CXX+set}" = set; then
2774   echo $ECHO_N "(cached) $ECHO_C" >&6
2775 else
2776   if test -n "$CXX"; then
2777   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2778 else
2779   ac_save_IFS=$IFS; IFS=$ac_path_separator
2780 ac_dummy="$PATH"
2781 for ac_dir in $ac_dummy; do
2782   IFS=$ac_save_IFS
2783   test -z "$ac_dir" && ac_dir=.
2784   $as_executable_p "$ac_dir/$ac_word" || continue
2785 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2786 echo "$as_me:2786: found $ac_dir/$ac_word" >&5
2787 break
2788 done
2789
2790 fi
2791 fi
2792 CXX=$ac_cv_prog_CXX
2793 if test -n "$CXX"; then
2794   echo "$as_me:2794: result: $CXX" >&5
2795 echo "${ECHO_T}$CXX" >&6
2796 else
2797   echo "$as_me:2797: result: no" >&5
2798 echo "${ECHO_T}no" >&6
2799 fi
2800
2801     test -n "$CXX" && break
2802   done
2803 fi
2804 if test -z "$CXX"; then
2805   ac_ct_CXX=$CXX
2806   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2807 do
2808   # Extract the first word of "$ac_prog", so it can be a program name with args.
2809 set dummy $ac_prog; ac_word=$2
2810 echo "$as_me:2810: checking for $ac_word" >&5
2811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2812 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2813   echo $ECHO_N "(cached) $ECHO_C" >&6
2814 else
2815   if test -n "$ac_ct_CXX"; then
2816   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2817 else
2818   ac_save_IFS=$IFS; IFS=$ac_path_separator
2819 ac_dummy="$PATH"
2820 for ac_dir in $ac_dummy; do
2821   IFS=$ac_save_IFS
2822   test -z "$ac_dir" && ac_dir=.
2823   $as_executable_p "$ac_dir/$ac_word" || continue
2824 ac_cv_prog_ac_ct_CXX="$ac_prog"
2825 echo "$as_me:2825: found $ac_dir/$ac_word" >&5
2826 break
2827 done
2828
2829 fi
2830 fi
2831 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2832 if test -n "$ac_ct_CXX"; then
2833   echo "$as_me:2833: result: $ac_ct_CXX" >&5
2834 echo "${ECHO_T}$ac_ct_CXX" >&6
2835 else
2836   echo "$as_me:2836: result: no" >&5
2837 echo "${ECHO_T}no" >&6
2838 fi
2839
2840   test -n "$ac_ct_CXX" && break
2841 done
2842 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2843
2844   CXX=$ac_ct_CXX
2845 fi
2846
2847 # Provide some information about the compiler.
2848 echo "$as_me:2848:" \
2849      "checking for C++ compiler version" >&5
2850 ac_compiler=`set X $ac_compile; echo $2`
2851 { (eval echo "$as_me:2851: \"$ac_compiler --version </dev/null >&5\"") >&5
2852   (eval $ac_compiler --version </dev/null >&5) 2>&5
2853   ac_status=$?
2854   echo "$as_me:2854: \$? = $ac_status" >&5
2855   (exit $ac_status); }
2856 { (eval echo "$as_me:2856: \"$ac_compiler -v </dev/null >&5\"") >&5
2857   (eval $ac_compiler -v </dev/null >&5) 2>&5
2858   ac_status=$?
2859   echo "$as_me:2859: \$? = $ac_status" >&5
2860   (exit $ac_status); }
2861 { (eval echo "$as_me:2861: \"$ac_compiler -V </dev/null >&5\"") >&5
2862   (eval $ac_compiler -V </dev/null >&5) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }
2866
2867 echo "$as_me:2867: checking whether we are using the GNU C++ compiler" >&5
2868 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2869 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2870   echo $ECHO_N "(cached) $ECHO_C" >&6
2871 else
2872   cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875
2876 int
2877 main ()
2878 {
2879 #ifndef __GNUC__
2880        choke me
2881 #endif
2882
2883   ;
2884   return 0;
2885 }
2886 _ACEOF
2887 rm -f conftest.$ac_objext
2888 if { (eval echo "$as_me:2888: \"$ac_compile\"") >&5
2889   (eval $ac_compile) 2>&5
2890   ac_status=$?
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit $ac_status); } &&
2893          { ac_try='test -s conftest.$ac_objext'
2894   { (eval echo "$as_me:2894: \"$ac_try\"") >&5
2895   (eval $ac_try) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); }; }; then
2899   ac_compiler_gnu=yes
2900 else
2901   echo "$as_me: failed program was:" >&5
2902 cat conftest.$ac_ext >&5
2903 ac_compiler_gnu=no
2904 fi
2905 rm -f conftest.$ac_objext conftest.$ac_ext
2906 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2907
2908 fi
2909 echo "$as_me:2909: result: $ac_cv_cxx_compiler_gnu" >&5
2910 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2911 GXX=`test $ac_compiler_gnu = yes && echo yes`
2912 ac_test_CXXFLAGS=${CXXFLAGS+set}
2913 ac_save_CXXFLAGS=$CXXFLAGS
2914 CXXFLAGS="-g"
2915 echo "$as_me:2915: checking whether $CXX accepts -g" >&5
2916 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2917 if test "${ac_cv_prog_cxx_g+set}" = set; then
2918   echo $ECHO_N "(cached) $ECHO_C" >&6
2919 else
2920   cat >conftest.$ac_ext <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923
2924 int
2925 main ()
2926 {
2927
2928   ;
2929   return 0;
2930 }
2931 _ACEOF
2932 rm -f conftest.$ac_objext
2933 if { (eval echo "$as_me:2933: \"$ac_compile\"") >&5
2934   (eval $ac_compile) 2>&5
2935   ac_status=$?
2936   echo "$as_me:2936: \$? = $ac_status" >&5
2937   (exit $ac_status); } &&
2938          { ac_try='test -s conftest.$ac_objext'
2939   { (eval echo "$as_me:2939: \"$ac_try\"") >&5
2940   (eval $ac_try) 2>&5
2941   ac_status=$?
2942   echo "$as_me:2942: \$? = $ac_status" >&5
2943   (exit $ac_status); }; }; then
2944   ac_cv_prog_cxx_g=yes
2945 else
2946   echo "$as_me: failed program was:" >&5
2947 cat conftest.$ac_ext >&5
2948 ac_cv_prog_cxx_g=no
2949 fi
2950 rm -f conftest.$ac_objext conftest.$ac_ext
2951 fi
2952 echo "$as_me:2952: result: $ac_cv_prog_cxx_g" >&5
2953 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2954 if test "$ac_test_CXXFLAGS" = set; then
2955   CXXFLAGS=$ac_save_CXXFLAGS
2956 elif test $ac_cv_prog_cxx_g = yes; then
2957   if test "$GXX" = yes; then
2958     CXXFLAGS="-g -O2"
2959   else
2960     CXXFLAGS="-g"
2961   fi
2962 else
2963   if test "$GXX" = yes; then
2964     CXXFLAGS="-O2"
2965   else
2966     CXXFLAGS=
2967   fi
2968 fi
2969 for ac_declaration in \
2970    ''\
2971    '#include <stdlib.h>' \
2972    'extern "C" void std::exit (int) throw (); using std::exit;' \
2973    'extern "C" void std::exit (int); using std::exit;' \
2974    'extern "C" void exit (int) throw ();' \
2975    'extern "C" void exit (int);' \
2976    'void exit (int);'
2977 do
2978   cat >conftest.$ac_ext <<_ACEOF
2979 #line 2979 "configure"
2980 #include "confdefs.h"
2981 #include <stdlib.h>
2982 $ac_declaration
2983 int
2984 main ()
2985 {
2986 exit (42);
2987   ;
2988   return 0;
2989 }
2990 _ACEOF
2991 rm -f conftest.$ac_objext
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993   (eval $ac_compile) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); } &&
2997          { ac_try='test -s conftest.$ac_objext'
2998   { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999   (eval $ac_try) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003   :
3004 else
3005   echo "$as_me: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 continue
3008 fi
3009 rm -f conftest.$ac_objext conftest.$ac_ext
3010   cat >conftest.$ac_ext <<_ACEOF
3011 #line 3011 "configure"
3012 #include "confdefs.h"
3013 $ac_declaration
3014 int
3015 main ()
3016 {
3017 exit (42);
3018   ;
3019   return 0;
3020 }
3021 _ACEOF
3022 rm -f conftest.$ac_objext
3023 if { (eval echo "$as_me:3023: \"$ac_compile\"") >&5
3024   (eval $ac_compile) 2>&5
3025   ac_status=$?
3026   echo "$as_me:3026: \$? = $ac_status" >&5
3027   (exit $ac_status); } &&
3028          { ac_try='test -s conftest.$ac_objext'
3029   { (eval echo "$as_me:3029: \"$ac_try\"") >&5
3030   (eval $ac_try) 2>&5
3031   ac_status=$?
3032   echo "$as_me:3032: \$? = $ac_status" >&5
3033   (exit $ac_status); }; }; then
3034   break
3035 else
3036   echo "$as_me: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
3038 fi
3039 rm -f conftest.$ac_objext conftest.$ac_ext
3040 done
3041 rm -f conftest*
3042 if test -n "$ac_declaration"; then
3043   echo '#ifdef __cplusplus' >>confdefs.h
3044   echo $ac_declaration      >>confdefs.h
3045   echo '#endif'             >>confdefs.h
3046 fi
3047
3048 ac_ext=c
3049 ac_cpp='$CPP $CPPFLAGS'
3050 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3051 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3052 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3053 ac_main_return=return
3054
3055                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3056         if test "$CXX" = "g++" ; then
3057                 # Extract the first word of "g++", so it can be a program name with args.
3058 set dummy g++; ac_word=$2
3059 echo "$as_me:3059: checking for $ac_word" >&5
3060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3061 if test "${ac_cv_path_CXX+set}" = set; then
3062   echo $ECHO_N "(cached) $ECHO_C" >&6
3063 else
3064   case $CXX in
3065   [\\/]* | ?:[\\/]*)
3066   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3067   ;;
3068   *)
3069   ac_save_IFS=$IFS; IFS=$ac_path_separator
3070 ac_dummy="$PATH"
3071 for ac_dir in $ac_dummy; do
3072   IFS=$ac_save_IFS
3073   test -z "$ac_dir" && ac_dir=.
3074   if $as_executable_p "$ac_dir/$ac_word"; then
3075    ac_cv_path_CXX="$ac_dir/$ac_word"
3076    echo "$as_me:3076: found $ac_dir/$ac_word" >&5
3077    break
3078 fi
3079 done
3080
3081   ;;
3082 esac
3083 fi
3084 CXX=$ac_cv_path_CXX
3085
3086 if test -n "$CXX"; then
3087   echo "$as_me:3087: result: $CXX" >&5
3088 echo "${ECHO_T}$CXX" >&6
3089 else
3090   echo "$as_me:3090: result: no" >&5
3091 echo "${ECHO_T}no" >&6
3092 fi
3093
3094         fi
3095         if test "$CXX" = "g++" ; then
3096                 { echo "$as_me:3096: WARNING: ignoring hardcoded g++" >&5
3097 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3098                 cf_with_cxx=no; CXX=""; GXX="";
3099         fi
3100 fi
3101
3102 GXX_VERSION=none
3103 if test "$GXX" = yes; then
3104         echo "$as_me:3104: checking version of g++" >&5
3105 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3106         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3107         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3108         echo "$as_me:3108: result: $GXX_VERSION" >&5
3109 echo "${ECHO_T}$GXX_VERSION" >&6
3110 fi
3111
3112 case $GXX_VERSION in
3113 1*|2.[0-6]*)
3114         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3115         # cf_cxx_library=no
3116         { echo "$as_me:3116: WARNING: templates do not work" >&5
3117 echo "$as_me: WARNING: templates do not work" >&2;}
3118         ;;
3119 esac
3120
3121 echo "$as_me:3121: checking if you want to build C++ binding and demo" >&5
3122 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3123
3124 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3125 if test "${with_cxx_binding+set}" = set; then
3126   withval="$with_cxx_binding"
3127   cf_with_cxx_binding=$withval
3128 else
3129   cf_with_cxx_binding=$cf_with_cxx
3130 fi;
3131 echo "$as_me:3131: result: $cf_with_cxx_binding" >&5
3132 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3133
3134 echo "$as_me:3134: checking if you want to build with Ada95" >&5
3135 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3136
3137 # Check whether --with-ada or --without-ada was given.
3138 if test "${with_ada+set}" = set; then
3139   withval="$with_ada"
3140   cf_with_ada=$withval
3141 else
3142   cf_with_ada=yes
3143 fi;
3144 echo "$as_me:3144: result: $cf_with_ada" >&5
3145 echo "${ECHO_T}$cf_with_ada" >&6
3146
3147 echo "$as_me:3147: checking if you want to install manpages" >&5
3148 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3149
3150 # Check whether --with-manpages or --without-manpages was given.
3151 if test "${with_manpages+set}" = set; then
3152   withval="$with_manpages"
3153   cf_with_manpages=$withval
3154 else
3155   cf_with_manpages=yes
3156 fi;
3157 echo "$as_me:3157: result: $cf_with_manpages" >&5
3158 echo "${ECHO_T}$cf_with_manpages" >&6
3159
3160 echo "$as_me:3160: checking if you want to build programs such as tic" >&5
3161 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3162
3163 # Check whether --with-progs or --without-progs was given.
3164 if test "${with_progs+set}" = set; then
3165   withval="$with_progs"
3166   cf_with_progs=$withval
3167 else
3168   cf_with_progs=yes
3169 fi;
3170 echo "$as_me:3170: result: $cf_with_progs" >&5
3171 echo "${ECHO_T}$cf_with_progs" >&6
3172
3173 echo "$as_me:3173: checking if you wish to install curses.h" >&5
3174 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3175
3176 # Check whether --with-curses-h or --without-curses-h was given.
3177 if test "${with_curses_h+set}" = set; then
3178   withval="$with_curses_h"
3179   with_curses_h=$withval
3180 else
3181   with_curses_h=yes
3182 fi;
3183 echo "$as_me:3183: result: $with_curses_h" >&5
3184 echo "${ECHO_T}$with_curses_h" >&6
3185
3186 modules_to_build="ncurses"
3187 if test "X$cf_with_progs" != Xno ; then
3188 modules_to_build="$modules_to_build progs tack"
3189 fi
3190 modules_to_build="$modules_to_build panel menu form"
3191
3192 test "$program_prefix" != NONE &&
3193   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3194 # Use a double $ so make ignores it.
3195 test "$program_suffix" != NONE &&
3196   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3197 # Double any \ or $.  echo might interpret backslashes.
3198 # By default was `s,x,x', remove it if useless.
3199 cat <<\_ACEOF >conftest.sed
3200 s/[\\$]/&&/g;s/;s,x,x,$//
3201 _ACEOF
3202 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3203 rm conftest.sed
3204
3205 for ac_prog in mawk gawk nawk awk
3206 do
3207   # Extract the first word of "$ac_prog", so it can be a program name with args.
3208 set dummy $ac_prog; ac_word=$2
3209 echo "$as_me:3209: checking for $ac_word" >&5
3210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3211 if test "${ac_cv_prog_AWK+set}" = set; then
3212   echo $ECHO_N "(cached) $ECHO_C" >&6
3213 else
3214   if test -n "$AWK"; then
3215   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3216 else
3217   ac_save_IFS=$IFS; IFS=$ac_path_separator
3218 ac_dummy="$PATH"
3219 for ac_dir in $ac_dummy; do
3220   IFS=$ac_save_IFS
3221   test -z "$ac_dir" && ac_dir=.
3222   $as_executable_p "$ac_dir/$ac_word" || continue
3223 ac_cv_prog_AWK="$ac_prog"
3224 echo "$as_me:3224: found $ac_dir/$ac_word" >&5
3225 break
3226 done
3227
3228 fi
3229 fi
3230 AWK=$ac_cv_prog_AWK
3231 if test -n "$AWK"; then
3232   echo "$as_me:3232: result: $AWK" >&5
3233 echo "${ECHO_T}$AWK" >&6
3234 else
3235   echo "$as_me:3235: result: no" >&5
3236 echo "${ECHO_T}no" >&6
3237 fi
3238
3239   test -n "$AWK" && break
3240 done
3241
3242 test -z "$AWK" && { { echo "$as_me:3242: error: No awk program found" >&5
3243 echo "$as_me: error: No awk program found" >&2;}
3244    { (exit 1); exit 1; }; }
3245
3246 echo "$as_me:3246: checking for egrep" >&5
3247 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3248 if test "${ac_cv_prog_egrep+set}" = set; then
3249   echo $ECHO_N "(cached) $ECHO_C" >&6
3250 else
3251   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3252     then ac_cv_prog_egrep='grep -E'
3253     else ac_cv_prog_egrep='egrep'
3254     fi
3255 fi
3256 echo "$as_me:3256: result: $ac_cv_prog_egrep" >&5
3257 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3258  EGREP=$ac_cv_prog_egrep
3259
3260 test -z "$EGREP" && { { echo "$as_me:3260: error: No egrep program found" >&5
3261 echo "$as_me: error: No egrep program found" >&2;}
3262    { (exit 1); exit 1; }; }
3263
3264 # Find a good install program.  We prefer a C program (faster),
3265 # so one script is as good as another.  But avoid the broken or
3266 # incompatible versions:
3267 # SysV /etc/install, /usr/sbin/install
3268 # SunOS /usr/etc/install
3269 # IRIX /sbin/install
3270 # AIX /bin/install
3271 # AmigaOS /C/install, which installs bootblocks on floppy discs
3272 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3273 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3274 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3275 # ./install, which can be erroneously created by make from ./install.sh.
3276 echo "$as_me:3276: checking for a BSD compatible install" >&5
3277 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3278 if test -z "$INSTALL"; then
3279 if test "${ac_cv_path_install+set}" = set; then
3280   echo $ECHO_N "(cached) $ECHO_C" >&6
3281 else
3282     ac_save_IFS=$IFS; IFS=$ac_path_separator
3283   for ac_dir in $PATH; do
3284     IFS=$ac_save_IFS
3285     # Account for people who put trailing slashes in PATH elements.
3286     case $ac_dir/ in
3287     / | ./ | .// | /cC/* \
3288     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3289     | /usr/ucb/* ) ;;
3290     *)
3291       # OSF1 and SCO ODT 3.0 have their own names for install.
3292       # Don't use installbsd from OSF since it installs stuff as root
3293       # by default.
3294       for ac_prog in ginstall scoinst install; do
3295         if $as_executable_p "$ac_dir/$ac_prog"; then
3296           if test $ac_prog = install &&
3297             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3298             # AIX install.  It has an incompatible calling convention.
3299             :
3300           elif test $ac_prog = install &&
3301             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3302             # program-specific install script used by HP pwplus--don't use.
3303             :
3304           else
3305             ac_cv_path_install="$ac_dir/$ac_prog -c"
3306             break 2
3307           fi
3308         fi
3309       done
3310       ;;
3311     esac
3312   done
3313
3314 fi
3315   if test "${ac_cv_path_install+set}" = set; then
3316     INSTALL=$ac_cv_path_install
3317   else
3318     # As a last resort, use the slow shell script.  We don't cache a
3319     # path for INSTALL within a source directory, because that will
3320     # break other packages using the cache if that directory is
3321     # removed, or if the path is relative.
3322     INSTALL=$ac_install_sh
3323   fi
3324 fi
3325 echo "$as_me:3325: result: $INSTALL" >&5
3326 echo "${ECHO_T}$INSTALL" >&6
3327
3328 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3329 # It thinks the first close brace ends the variable substitution.
3330 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3331
3332 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3333
3334 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3335
3336 case $INSTALL in
3337 /*)
3338   ;;
3339 *)
3340   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3341   test -z "$cf_dir" && cf_dir=.
3342   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3343   ;;
3344 esac
3345
3346 for ac_prog in tdlint lint alint splint lclint
3347 do
3348   # Extract the first word of "$ac_prog", so it can be a program name with args.
3349 set dummy $ac_prog; ac_word=$2
3350 echo "$as_me:3350: checking for $ac_word" >&5
3351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3352 if test "${ac_cv_prog_LINT+set}" = set; then
3353   echo $ECHO_N "(cached) $ECHO_C" >&6
3354 else
3355   if test -n "$LINT"; then
3356   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3357 else
3358   ac_save_IFS=$IFS; IFS=$ac_path_separator
3359 ac_dummy="$PATH"
3360 for ac_dir in $ac_dummy; do
3361   IFS=$ac_save_IFS
3362   test -z "$ac_dir" && ac_dir=.
3363   $as_executable_p "$ac_dir/$ac_word" || continue
3364 ac_cv_prog_LINT="$ac_prog"
3365 echo "$as_me:3365: found $ac_dir/$ac_word" >&5
3366 break
3367 done
3368
3369 fi
3370 fi
3371 LINT=$ac_cv_prog_LINT
3372 if test -n "$LINT"; then
3373   echo "$as_me:3373: result: $LINT" >&5
3374 echo "${ECHO_T}$LINT" >&6
3375 else
3376   echo "$as_me:3376: result: no" >&5
3377 echo "${ECHO_T}no" >&6
3378 fi
3379
3380   test -n "$LINT" && break
3381 done
3382
3383 echo "$as_me:3383: checking whether ln -s works" >&5
3384 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3385 LN_S=$as_ln_s
3386 if test "$LN_S" = "ln -s"; then
3387   echo "$as_me:3387: result: yes" >&5
3388 echo "${ECHO_T}yes" >&6
3389 else
3390   echo "$as_me:3390: result: no, using $LN_S" >&5
3391 echo "${ECHO_T}no, using $LN_S" >&6
3392 fi
3393
3394 echo "$as_me:3394: checking if $LN_S -f options work" >&5
3395 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3396
3397 rm -f conf$$.src conf$$dst
3398 echo >conf$$.dst
3399 echo first >conf$$.src
3400 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3401         cf_prog_ln_sf=yes
3402 else
3403         cf_prog_ln_sf=no
3404 fi
3405
3406 echo "$as_me:3406: result: $cf_prog_ln_sf" >&5
3407 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3408
3409 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3410
3411 echo "$as_me:3411: checking for long file names" >&5
3412 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3413 if test "${ac_cv_sys_long_file_names+set}" = set; then
3414   echo $ECHO_N "(cached) $ECHO_C" >&6
3415 else
3416   ac_cv_sys_long_file_names=yes
3417 # Test for long file names in all the places we know might matter:
3418 #      .                the current directory, where building will happen
3419 #      $prefix/lib      where we will be installing things
3420 #      $exec_prefix/lib likewise
3421 # eval it to expand exec_prefix.
3422 #      $TMPDIR          if set, where it might want to write temporary files
3423 # if $TMPDIR is not set:
3424 #      /tmp             where it might want to write temporary files
3425 #      /var/tmp         likewise
3426 #      /usr/tmp         likewise
3427 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3428   ac_tmpdirs=$TMPDIR
3429 else
3430   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3431 fi
3432 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3433   test -d $ac_dir || continue
3434   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3435   ac_xdir=$ac_dir/cf$$
3436   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3437   ac_tf1=$ac_xdir/conftest9012345
3438   ac_tf2=$ac_xdir/conftest9012346
3439   (echo 1 >$ac_tf1) 2>/dev/null
3440   (echo 2 >$ac_tf2) 2>/dev/null
3441   ac_val=`cat $ac_tf1 2>/dev/null`
3442   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3443     ac_cv_sys_long_file_names=no
3444     rm -rf $ac_xdir 2>/dev/null
3445     break
3446   fi
3447   rm -rf $ac_xdir 2>/dev/null
3448 done
3449 fi
3450 echo "$as_me:3450: result: $ac_cv_sys_long_file_names" >&5
3451 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3452 if test $ac_cv_sys_long_file_names = yes; then
3453
3454 cat >>confdefs.h <<\EOF
3455 #define HAVE_LONG_FILE_NAMES 1
3456 EOF
3457
3458 fi
3459
3460 # if we find pkg-config, check if we should install the ".pc" files.
3461
3462 echo "$as_me:3462: checking if you want to use pkg-config" >&5
3463 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3464
3465 # Check whether --with-pkg-config or --without-pkg-config was given.
3466 if test "${with_pkg_config+set}" = set; then
3467   withval="$with_pkg_config"
3468   cf_pkg_config=$withval
3469 else
3470   cf_pkg_config=yes
3471 fi;
3472 echo "$as_me:3472: result: $cf_pkg_config" >&5
3473 echo "${ECHO_T}$cf_pkg_config" >&6
3474
3475 case $cf_pkg_config in #(vi
3476 no) #(vi
3477         PKG_CONFIG=none
3478         ;;
3479 yes) #(vi
3480         # Extract the first word of "pkg-config", so it can be a program name with args.
3481 set dummy pkg-config; ac_word=$2
3482 echo "$as_me:3482: checking for $ac_word" >&5
3483 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3484 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3485   echo $ECHO_N "(cached) $ECHO_C" >&6
3486 else
3487   case $PKG_CONFIG in
3488   [\\/]* | ?:[\\/]*)
3489   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3490   ;;
3491   *)
3492   ac_save_IFS=$IFS; IFS=$ac_path_separator
3493 ac_dummy="$PATH"
3494 for ac_dir in $ac_dummy; do
3495   IFS=$ac_save_IFS
3496   test -z "$ac_dir" && ac_dir=.
3497   if $as_executable_p "$ac_dir/$ac_word"; then
3498    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3499    echo "$as_me:3499: found $ac_dir/$ac_word" >&5
3500    break
3501 fi
3502 done
3503
3504   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3505   ;;
3506 esac
3507 fi
3508 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3509
3510 if test -n "$PKG_CONFIG"; then
3511   echo "$as_me:3511: result: $PKG_CONFIG" >&5
3512 echo "${ECHO_T}$PKG_CONFIG" >&6
3513 else
3514   echo "$as_me:3514: result: no" >&5
3515 echo "${ECHO_T}no" >&6
3516 fi
3517
3518         ;;
3519 *)
3520         PKG_CONFIG=$withval
3521         ;;
3522 esac
3523
3524 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3525 if test "$PKG_CONFIG" != none ; then
3526
3527 if test "x$prefix" != xNONE; then
3528   cf_path_syntax="$prefix"
3529 else
3530   cf_path_syntax="$ac_default_prefix"
3531 fi
3532
3533 case ".$PKG_CONFIG" in #(vi
3534 .\$\(*\)*|.\'*\'*) #(vi
3535   ;;
3536 ..|./*|.\\*) #(vi
3537   ;;
3538 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3539   ;;
3540 .\${*prefix}*) #(vi
3541   eval PKG_CONFIG="$PKG_CONFIG"
3542   case ".$PKG_CONFIG" in #(vi
3543   .NONE/*)
3544     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3545     ;;
3546   esac
3547   ;; #(vi
3548 .no|.NONE/*)
3549   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3550   ;;
3551 *)
3552   { { echo "$as_me:3552: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3553 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3554    { (exit 1); exit 1; }; }
3555   ;;
3556 esac
3557
3558 fi
3559
3560 if test "$PKG_CONFIG" != no ; then
3561         echo "$as_me:3561: checking if we should install .pc files for $PKG_CONFIG" >&5
3562 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3563
3564         # Leave this as something that can be overridden in the environment.
3565         if test -z "$PKG_CONFIG_LIBDIR" ; then
3566                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3567         fi
3568         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3569         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3570
3571 # Check whether --enable-pc-files or --disable-pc-files was given.
3572 if test "${enable_pc_files+set}" = set; then
3573   enableval="$enable_pc_files"
3574   enable_pc_files=$enableval
3575 else
3576   enable_pc_files=no
3577 fi;
3578                 echo "$as_me:3578: result: $enable_pc_files" >&5
3579 echo "${ECHO_T}$enable_pc_files" >&6
3580         else
3581                 echo "$as_me:3581: result: no" >&5
3582 echo "${ECHO_T}no" >&6
3583                 { echo "$as_me:3583: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3584 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3585                 enable_pc_files=no
3586         fi
3587 fi
3588
3589 echo "$as_me:3589: checking if we should assume mixed-case filenames" >&5
3590 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3591
3592 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3593 if test "${enable_mixed_case+set}" = set; then
3594   enableval="$enable_mixed_case"
3595   enable_mixedcase=$enableval
3596 else
3597   enable_mixedcase=auto
3598 fi;
3599 echo "$as_me:3599: result: $enable_mixedcase" >&5
3600 echo "${ECHO_T}$enable_mixedcase" >&6
3601 if test "$enable_mixedcase" = "auto" ; then
3602
3603 echo "$as_me:3603: checking if filesystem supports mixed-case filenames" >&5
3604 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3605 if test "${cf_cv_mixedcase+set}" = set; then
3606   echo $ECHO_N "(cached) $ECHO_C" >&6
3607 else
3608
3609 if test "$cross_compiling" = yes ; then
3610         case $target_alias in #(vi
3611         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3612                 cf_cv_mixedcase=no
3613                 ;;
3614         *)
3615                 cf_cv_mixedcase=yes
3616                 ;;
3617         esac
3618 else
3619         rm -f conftest CONFTEST
3620         echo test >conftest
3621         if test -f CONFTEST ; then
3622                 cf_cv_mixedcase=no
3623         else
3624                 cf_cv_mixedcase=yes
3625         fi
3626         rm -f conftest CONFTEST
3627 fi
3628
3629 fi
3630 echo "$as_me:3630: result: $cf_cv_mixedcase" >&5
3631 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3632 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3633 #define MIXEDCASE_FILENAMES 1
3634 EOF
3635
3636 else
3637     cf_cv_mixedcase=$enable_mixedcase
3638     if test "$enable_mixedcase" = "yes" ; then
3639         cat >>confdefs.h <<\EOF
3640 #define MIXEDCASE_FILENAMES 1
3641 EOF
3642
3643     fi
3644 fi
3645
3646 # do this after mixed-case option (tags/TAGS is not as important as tic).
3647 echo "$as_me:3647: checking whether ${MAKE-make} sets \${MAKE}" >&5
3648 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3649 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3650 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3651   echo $ECHO_N "(cached) $ECHO_C" >&6
3652 else
3653   cat >conftest.make <<\EOF
3654 all:
3655         @echo 'ac_maketemp="${MAKE}"'
3656 EOF
3657 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3658 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3659 if test -n "$ac_maketemp"; then
3660   eval ac_cv_prog_make_${ac_make}_set=yes
3661 else
3662   eval ac_cv_prog_make_${ac_make}_set=no
3663 fi
3664 rm -f conftest.make
3665 fi
3666 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3667   echo "$as_me:3667: result: yes" >&5
3668 echo "${ECHO_T}yes" >&6
3669   SET_MAKE=
3670 else
3671   echo "$as_me:3671: result: no" >&5
3672 echo "${ECHO_T}no" >&6
3673   SET_MAKE="MAKE=${MAKE-make}"
3674 fi
3675
3676 for ac_prog in exctags ctags
3677 do
3678   # Extract the first word of "$ac_prog", so it can be a program name with args.
3679 set dummy $ac_prog; ac_word=$2
3680 echo "$as_me:3680: checking for $ac_word" >&5
3681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3682 if test "${ac_cv_prog_CTAGS+set}" = set; then
3683   echo $ECHO_N "(cached) $ECHO_C" >&6
3684 else
3685   if test -n "$CTAGS"; then
3686   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3687 else
3688   ac_save_IFS=$IFS; IFS=$ac_path_separator
3689 ac_dummy="$PATH"
3690 for ac_dir in $ac_dummy; do
3691   IFS=$ac_save_IFS
3692   test -z "$ac_dir" && ac_dir=.
3693   $as_executable_p "$ac_dir/$ac_word" || continue
3694 ac_cv_prog_CTAGS="$ac_prog"
3695 echo "$as_me:3695: found $ac_dir/$ac_word" >&5
3696 break
3697 done
3698
3699 fi
3700 fi
3701 CTAGS=$ac_cv_prog_CTAGS
3702 if test -n "$CTAGS"; then
3703   echo "$as_me:3703: result: $CTAGS" >&5
3704 echo "${ECHO_T}$CTAGS" >&6
3705 else
3706   echo "$as_me:3706: result: no" >&5
3707 echo "${ECHO_T}no" >&6
3708 fi
3709
3710   test -n "$CTAGS" && break
3711 done
3712
3713 for ac_prog in exetags etags
3714 do
3715   # Extract the first word of "$ac_prog", so it can be a program name with args.
3716 set dummy $ac_prog; ac_word=$2
3717 echo "$as_me:3717: checking for $ac_word" >&5
3718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719 if test "${ac_cv_prog_ETAGS+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   if test -n "$ETAGS"; then
3723   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3724 else
3725   ac_save_IFS=$IFS; IFS=$ac_path_separator
3726 ac_dummy="$PATH"
3727 for ac_dir in $ac_dummy; do
3728   IFS=$ac_save_IFS
3729   test -z "$ac_dir" && ac_dir=.
3730   $as_executable_p "$ac_dir/$ac_word" || continue
3731 ac_cv_prog_ETAGS="$ac_prog"
3732 echo "$as_me:3732: found $ac_dir/$ac_word" >&5
3733 break
3734 done
3735
3736 fi
3737 fi
3738 ETAGS=$ac_cv_prog_ETAGS
3739 if test -n "$ETAGS"; then
3740   echo "$as_me:3740: result: $ETAGS" >&5
3741 echo "${ECHO_T}$ETAGS" >&6
3742 else
3743   echo "$as_me:3743: result: no" >&5
3744 echo "${ECHO_T}no" >&6
3745 fi
3746
3747   test -n "$ETAGS" && break
3748 done
3749
3750 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3751 set dummy ${CTAGS-ctags}; ac_word=$2
3752 echo "$as_me:3752: checking for $ac_word" >&5
3753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3754 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3755   echo $ECHO_N "(cached) $ECHO_C" >&6
3756 else
3757   if test -n "$MAKE_LOWER_TAGS"; then
3758   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3759 else
3760   ac_save_IFS=$IFS; IFS=$ac_path_separator
3761 ac_dummy="$PATH"
3762 for ac_dir in $ac_dummy; do
3763   IFS=$ac_save_IFS
3764   test -z "$ac_dir" && ac_dir=.
3765   $as_executable_p "$ac_dir/$ac_word" || continue
3766 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3767 echo "$as_me:3767: found $ac_dir/$ac_word" >&5
3768 break
3769 done
3770
3771   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3772 fi
3773 fi
3774 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3775 if test -n "$MAKE_LOWER_TAGS"; then
3776   echo "$as_me:3776: result: $MAKE_LOWER_TAGS" >&5
3777 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3778 else
3779   echo "$as_me:3779: result: no" >&5
3780 echo "${ECHO_T}no" >&6
3781 fi
3782
3783 if test "$cf_cv_mixedcase" = yes ; then
3784         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3785 set dummy ${ETAGS-etags}; ac_word=$2
3786 echo "$as_me:3786: checking for $ac_word" >&5
3787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3788 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3789   echo $ECHO_N "(cached) $ECHO_C" >&6
3790 else
3791   if test -n "$MAKE_UPPER_TAGS"; then
3792   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3793 else
3794   ac_save_IFS=$IFS; IFS=$ac_path_separator
3795 ac_dummy="$PATH"
3796 for ac_dir in $ac_dummy; do
3797   IFS=$ac_save_IFS
3798   test -z "$ac_dir" && ac_dir=.
3799   $as_executable_p "$ac_dir/$ac_word" || continue
3800 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3801 echo "$as_me:3801: found $ac_dir/$ac_word" >&5
3802 break
3803 done
3804
3805   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3806 fi
3807 fi
3808 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3809 if test -n "$MAKE_UPPER_TAGS"; then
3810   echo "$as_me:3810: result: $MAKE_UPPER_TAGS" >&5
3811 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3812 else
3813   echo "$as_me:3813: result: no" >&5
3814 echo "${ECHO_T}no" >&6
3815 fi
3816
3817 else
3818         MAKE_UPPER_TAGS=no
3819 fi
3820
3821 if test "$MAKE_UPPER_TAGS" = yes ; then
3822         MAKE_UPPER_TAGS=
3823 else
3824         MAKE_UPPER_TAGS="#"
3825 fi
3826
3827 if test "$MAKE_LOWER_TAGS" = yes ; then
3828         MAKE_LOWER_TAGS=
3829 else
3830         MAKE_LOWER_TAGS="#"
3831 fi
3832
3833 echo "$as_me:3833: checking for makeflags variable" >&5
3834 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3835 if test "${cf_cv_makeflags+set}" = set; then
3836   echo $ECHO_N "(cached) $ECHO_C" >&6
3837 else
3838
3839         cf_cv_makeflags=''
3840         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3841         do
3842                 cat >cf_makeflags.tmp <<CF_EOF
3843 SHELL = /bin/sh
3844 all :
3845         @ echo '.$cf_option'
3846 CF_EOF
3847                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3848                 case "$cf_result" in
3849                 .*k)
3850                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3851                         case "$cf_result" in
3852                         .*CC=*) cf_cv_makeflags=
3853                                 ;;
3854                         *)      cf_cv_makeflags=$cf_option
3855                                 ;;
3856                         esac
3857                         break
3858                         ;;
3859                 .-)     ;;
3860                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3861                         ;;
3862                 esac
3863         done
3864         rm -f cf_makeflags.tmp
3865
3866 fi
3867 echo "$as_me:3867: result: $cf_cv_makeflags" >&5
3868 echo "${ECHO_T}$cf_cv_makeflags" >&6
3869
3870 if test -n "$ac_tool_prefix"; then
3871   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3872 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3873 echo "$as_me:3873: checking for $ac_word" >&5
3874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3875 if test "${ac_cv_prog_RANLIB+set}" = set; then
3876   echo $ECHO_N "(cached) $ECHO_C" >&6
3877 else
3878   if test -n "$RANLIB"; then
3879   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3880 else
3881   ac_save_IFS=$IFS; IFS=$ac_path_separator
3882 ac_dummy="$PATH"
3883 for ac_dir in $ac_dummy; do
3884   IFS=$ac_save_IFS
3885   test -z "$ac_dir" && ac_dir=.
3886   $as_executable_p "$ac_dir/$ac_word" || continue
3887 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3888 echo "$as_me:3888: found $ac_dir/$ac_word" >&5
3889 break
3890 done
3891
3892 fi
3893 fi
3894 RANLIB=$ac_cv_prog_RANLIB
3895 if test -n "$RANLIB"; then
3896   echo "$as_me:3896: result: $RANLIB" >&5
3897 echo "${ECHO_T}$RANLIB" >&6
3898 else
3899   echo "$as_me:3899: result: no" >&5
3900 echo "${ECHO_T}no" >&6
3901 fi
3902
3903 fi
3904 if test -z "$ac_cv_prog_RANLIB"; then
3905   ac_ct_RANLIB=$RANLIB
3906   # Extract the first word of "ranlib", so it can be a program name with args.
3907 set dummy ranlib; ac_word=$2
3908 echo "$as_me:3908: checking for $ac_word" >&5
3909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3910 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3911   echo $ECHO_N "(cached) $ECHO_C" >&6
3912 else
3913   if test -n "$ac_ct_RANLIB"; then
3914   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3915 else
3916   ac_save_IFS=$IFS; IFS=$ac_path_separator
3917 ac_dummy="$PATH"
3918 for ac_dir in $ac_dummy; do
3919   IFS=$ac_save_IFS
3920   test -z "$ac_dir" && ac_dir=.
3921   $as_executable_p "$ac_dir/$ac_word" || continue
3922 ac_cv_prog_ac_ct_RANLIB="ranlib"
3923 echo "$as_me:3923: found $ac_dir/$ac_word" >&5
3924 break
3925 done
3926
3927   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3928 fi
3929 fi
3930 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3931 if test -n "$ac_ct_RANLIB"; then
3932   echo "$as_me:3932: result: $ac_ct_RANLIB" >&5
3933 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3934 else
3935   echo "$as_me:3935: result: no" >&5
3936 echo "${ECHO_T}no" >&6
3937 fi
3938
3939   RANLIB=$ac_ct_RANLIB
3940 else
3941   RANLIB="$ac_cv_prog_RANLIB"
3942 fi
3943
3944 if test -n "$ac_tool_prefix"; then
3945   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3946 set dummy ${ac_tool_prefix}ld; ac_word=$2
3947 echo "$as_me:3947: checking for $ac_word" >&5
3948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3949 if test "${ac_cv_prog_LD+set}" = set; then
3950   echo $ECHO_N "(cached) $ECHO_C" >&6
3951 else
3952   if test -n "$LD"; then
3953   ac_cv_prog_LD="$LD" # Let the user override the test.
3954 else
3955   ac_save_IFS=$IFS; IFS=$ac_path_separator
3956 ac_dummy="$PATH"
3957 for ac_dir in $ac_dummy; do
3958   IFS=$ac_save_IFS
3959   test -z "$ac_dir" && ac_dir=.
3960   $as_executable_p "$ac_dir/$ac_word" || continue
3961 ac_cv_prog_LD="${ac_tool_prefix}ld"
3962 echo "$as_me:3962: found $ac_dir/$ac_word" >&5
3963 break
3964 done
3965
3966 fi
3967 fi
3968 LD=$ac_cv_prog_LD
3969 if test -n "$LD"; then
3970   echo "$as_me:3970: result: $LD" >&5
3971 echo "${ECHO_T}$LD" >&6
3972 else
3973   echo "$as_me:3973: result: no" >&5
3974 echo "${ECHO_T}no" >&6
3975 fi
3976
3977 fi
3978 if test -z "$ac_cv_prog_LD"; then
3979   ac_ct_LD=$LD
3980   # Extract the first word of "ld", so it can be a program name with args.
3981 set dummy ld; ac_word=$2
3982 echo "$as_me:3982: checking for $ac_word" >&5
3983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3984 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3985   echo $ECHO_N "(cached) $ECHO_C" >&6
3986 else
3987   if test -n "$ac_ct_LD"; then
3988   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3989 else
3990   ac_save_IFS=$IFS; IFS=$ac_path_separator
3991 ac_dummy="$PATH"
3992 for ac_dir in $ac_dummy; do
3993   IFS=$ac_save_IFS
3994   test -z "$ac_dir" && ac_dir=.
3995   $as_executable_p "$ac_dir/$ac_word" || continue
3996 ac_cv_prog_ac_ct_LD="ld"
3997 echo "$as_me:3997: found $ac_dir/$ac_word" >&5
3998 break
3999 done
4000
4001   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4002 fi
4003 fi
4004 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4005 if test -n "$ac_ct_LD"; then
4006   echo "$as_me:4006: result: $ac_ct_LD" >&5
4007 echo "${ECHO_T}$ac_ct_LD" >&6
4008 else
4009   echo "$as_me:4009: result: no" >&5
4010 echo "${ECHO_T}no" >&6
4011 fi
4012
4013   LD=$ac_ct_LD
4014 else
4015   LD="$ac_cv_prog_LD"
4016 fi
4017
4018 if test -n "$ac_tool_prefix"; then
4019   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4020 set dummy ${ac_tool_prefix}ar; ac_word=$2
4021 echo "$as_me:4021: checking for $ac_word" >&5
4022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4023 if test "${ac_cv_prog_AR+set}" = set; then
4024   echo $ECHO_N "(cached) $ECHO_C" >&6
4025 else
4026   if test -n "$AR"; then
4027   ac_cv_prog_AR="$AR" # Let the user override the test.
4028 else
4029   ac_save_IFS=$IFS; IFS=$ac_path_separator
4030 ac_dummy="$PATH"
4031 for ac_dir in $ac_dummy; do
4032   IFS=$ac_save_IFS
4033   test -z "$ac_dir" && ac_dir=.
4034   $as_executable_p "$ac_dir/$ac_word" || continue
4035 ac_cv_prog_AR="${ac_tool_prefix}ar"
4036 echo "$as_me:4036: found $ac_dir/$ac_word" >&5
4037 break
4038 done
4039
4040 fi
4041 fi
4042 AR=$ac_cv_prog_AR
4043 if test -n "$AR"; then
4044   echo "$as_me:4044: result: $AR" >&5
4045 echo "${ECHO_T}$AR" >&6
4046 else
4047   echo "$as_me:4047: result: no" >&5
4048 echo "${ECHO_T}no" >&6
4049 fi
4050
4051 fi
4052 if test -z "$ac_cv_prog_AR"; then
4053   ac_ct_AR=$AR
4054   # Extract the first word of "ar", so it can be a program name with args.
4055 set dummy ar; ac_word=$2
4056 echo "$as_me:4056: checking for $ac_word" >&5
4057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4058 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4059   echo $ECHO_N "(cached) $ECHO_C" >&6
4060 else
4061   if test -n "$ac_ct_AR"; then
4062   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4063 else
4064   ac_save_IFS=$IFS; IFS=$ac_path_separator
4065 ac_dummy="$PATH"
4066 for ac_dir in $ac_dummy; do
4067   IFS=$ac_save_IFS
4068   test -z "$ac_dir" && ac_dir=.
4069   $as_executable_p "$ac_dir/$ac_word" || continue
4070 ac_cv_prog_ac_ct_AR="ar"
4071 echo "$as_me:4071: found $ac_dir/$ac_word" >&5
4072 break
4073 done
4074
4075   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4076 fi
4077 fi
4078 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4079 if test -n "$ac_ct_AR"; then
4080   echo "$as_me:4080: result: $ac_ct_AR" >&5
4081 echo "${ECHO_T}$ac_ct_AR" >&6
4082 else
4083   echo "$as_me:4083: result: no" >&5
4084 echo "${ECHO_T}no" >&6
4085 fi
4086
4087   AR=$ac_ct_AR
4088 else
4089   AR="$ac_cv_prog_AR"
4090 fi
4091
4092 if test -n "$ac_tool_prefix"; then
4093   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4094 set dummy ${ac_tool_prefix}ar; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_prog_AR+set}" = set; then
4098   echo $ECHO_N "(cached) $ECHO_C" >&6
4099 else
4100   if test -n "$AR"; then
4101   ac_cv_prog_AR="$AR" # Let the user override the test.
4102 else
4103   ac_save_IFS=$IFS; IFS=$ac_path_separator
4104 ac_dummy="$PATH"
4105 for ac_dir in $ac_dummy; do
4106   IFS=$ac_save_IFS
4107   test -z "$ac_dir" && ac_dir=.
4108   $as_executable_p "$ac_dir/$ac_word" || continue
4109 ac_cv_prog_AR="${ac_tool_prefix}ar"
4110 echo "$as_me:4110: found $ac_dir/$ac_word" >&5
4111 break
4112 done
4113
4114 fi
4115 fi
4116 AR=$ac_cv_prog_AR
4117 if test -n "$AR"; then
4118   echo "$as_me:4118: result: $AR" >&5
4119 echo "${ECHO_T}$AR" >&6
4120 else
4121   echo "$as_me:4121: result: no" >&5
4122 echo "${ECHO_T}no" >&6
4123 fi
4124
4125 fi
4126 if test -z "$ac_cv_prog_AR"; then
4127   ac_ct_AR=$AR
4128   # Extract the first word of "ar", so it can be a program name with args.
4129 set dummy ar; ac_word=$2
4130 echo "$as_me:4130: checking for $ac_word" >&5
4131 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4132 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4133   echo $ECHO_N "(cached) $ECHO_C" >&6
4134 else
4135   if test -n "$ac_ct_AR"; then
4136   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4137 else
4138   ac_save_IFS=$IFS; IFS=$ac_path_separator
4139 ac_dummy="$PATH"
4140 for ac_dir in $ac_dummy; do
4141   IFS=$ac_save_IFS
4142   test -z "$ac_dir" && ac_dir=.
4143   $as_executable_p "$ac_dir/$ac_word" || continue
4144 ac_cv_prog_ac_ct_AR="ar"
4145 echo "$as_me:4145: found $ac_dir/$ac_word" >&5
4146 break
4147 done
4148
4149   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4150 fi
4151 fi
4152 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4153 if test -n "$ac_ct_AR"; then
4154   echo "$as_me:4154: result: $ac_ct_AR" >&5
4155 echo "${ECHO_T}$ac_ct_AR" >&6
4156 else
4157   echo "$as_me:4157: result: no" >&5
4158 echo "${ECHO_T}no" >&6
4159 fi
4160
4161   AR=$ac_ct_AR
4162 else
4163   AR="$ac_cv_prog_AR"
4164 fi
4165
4166 echo "$as_me:4166: checking for options to update archives" >&5
4167 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4168 if test "${cf_cv_ar_flags+set}" = set; then
4169   echo $ECHO_N "(cached) $ECHO_C" >&6
4170 else
4171
4172         cf_cv_ar_flags=unknown
4173         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4174         do
4175
4176                 # check if $ARFLAGS already contains this choice
4177                 if test "x$ARFLAGS" != "x" ; then
4178                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4179                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4180                                 cf_cv_ar_flags=
4181                                 break
4182                         fi
4183                 fi
4184
4185                 rm -f conftest.$ac_cv_objext
4186                 rm -f conftest.a
4187
4188                 cat >conftest.$ac_ext <<EOF
4189 #line 4189 "configure"
4190 int     testdata[3] = { 123, 456, 789 };
4191 EOF
4192                 if { (eval echo "$as_me:4192: \"$ac_compile\"") >&5
4193   (eval $ac_compile) 2>&5
4194   ac_status=$?
4195   echo "$as_me:4195: \$? = $ac_status" >&5
4196   (exit $ac_status); } ; then
4197                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4198                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4199                         if test -f conftest.a ; then
4200                                 cf_cv_ar_flags=$cf_ar_flags
4201                                 break
4202                         fi
4203                 else
4204                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4205
4206 echo "${as_me-configure}:4206: testing cannot compile test-program ..." 1>&5
4207
4208                         break
4209                 fi
4210         done
4211         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4212
4213 fi
4214 echo "$as_me:4214: result: $cf_cv_ar_flags" >&5
4215 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4216
4217 if test -n "$ARFLAGS" ; then
4218         if test -n "$cf_cv_ar_flags" ; then
4219                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4220         fi
4221 else
4222         ARFLAGS=$cf_cv_ar_flags
4223 fi
4224
4225 echo "$as_me:4225: checking if you have specified an install-prefix" >&5
4226 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4227
4228 # Check whether --with-install-prefix or --without-install-prefix was given.
4229 if test "${with_install_prefix+set}" = set; then
4230   withval="$with_install_prefix"
4231   case "$withval" in #(vi
4232         yes|no) #(vi
4233                 ;;
4234         *)      DESTDIR="$withval"
4235                 ;;
4236         esac
4237 fi;
4238 echo "$as_me:4238: result: $DESTDIR" >&5
4239 echo "${ECHO_T}$DESTDIR" >&6
4240
4241 ###############################################################################
4242
4243 # If we're cross-compiling, allow the user to override the tools and their
4244 # options.  The configure script is oriented toward identifying the host
4245 # compiler, etc., but we need a build compiler to generate parts of the source.
4246
4247 if test "$cross_compiling" = yes ; then
4248
4249         # defaults that we might want to override
4250         : ${BUILD_CFLAGS:=''}
4251         : ${BUILD_CPPFLAGS:=''}
4252         : ${BUILD_LDFLAGS:=''}
4253         : ${BUILD_LIBS:=''}
4254         : ${BUILD_EXEEXT:='$x'}
4255         : ${BUILD_OBJEXT:='o'}
4256
4257 # Check whether --with-build-cc or --without-build-cc was given.
4258 if test "${with_build_cc+set}" = set; then
4259   withval="$with_build_cc"
4260   BUILD_CC="$withval"
4261 else
4262   for ac_prog in gcc cc cl
4263 do
4264   # Extract the first word of "$ac_prog", so it can be a program name with args.
4265 set dummy $ac_prog; ac_word=$2
4266 echo "$as_me:4266: checking for $ac_word" >&5
4267 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4268 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4269   echo $ECHO_N "(cached) $ECHO_C" >&6
4270 else
4271   if test -n "$BUILD_CC"; then
4272   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4273 else
4274   ac_save_IFS=$IFS; IFS=$ac_path_separator
4275 ac_dummy="$PATH"
4276 for ac_dir in $ac_dummy; do
4277   IFS=$ac_save_IFS
4278   test -z "$ac_dir" && ac_dir=.
4279   $as_executable_p "$ac_dir/$ac_word" || continue
4280 ac_cv_prog_BUILD_CC="$ac_prog"
4281 echo "$as_me:4281: found $ac_dir/$ac_word" >&5
4282 break
4283 done
4284
4285 fi
4286 fi
4287 BUILD_CC=$ac_cv_prog_BUILD_CC
4288 if test -n "$BUILD_CC"; then
4289   echo "$as_me:4289: result: $BUILD_CC" >&5
4290 echo "${ECHO_T}$BUILD_CC" >&6
4291 else
4292   echo "$as_me:4292: result: no" >&5
4293 echo "${ECHO_T}no" >&6
4294 fi
4295
4296   test -n "$BUILD_CC" && break
4297 done
4298
4299 fi;
4300         echo "$as_me:4300: checking for native build C compiler" >&5
4301 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4302         echo "$as_me:4302: result: $BUILD_CC" >&5
4303 echo "${ECHO_T}$BUILD_CC" >&6
4304
4305         echo "$as_me:4305: checking for native build C preprocessor" >&5
4306 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4307
4308 # Check whether --with-build-cpp or --without-build-cpp was given.
4309 if test "${with_build_cpp+set}" = set; then
4310   withval="$with_build_cpp"
4311   BUILD_CPP="$withval"
4312 else
4313   BUILD_CPP='${BUILD_CC} -E'
4314 fi;
4315         echo "$as_me:4315: result: $BUILD_CPP" >&5
4316 echo "${ECHO_T}$BUILD_CPP" >&6
4317
4318         echo "$as_me:4318: checking for native build C flags" >&5
4319 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4320
4321 # Check whether --with-build-cflags or --without-build-cflags was given.
4322 if test "${with_build_cflags+set}" = set; then
4323   withval="$with_build_cflags"
4324   BUILD_CFLAGS="$withval"
4325 fi;
4326         echo "$as_me:4326: result: $BUILD_CFLAGS" >&5
4327 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4328
4329         echo "$as_me:4329: checking for native build C preprocessor-flags" >&5
4330 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4331
4332 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4333 if test "${with_build_cppflags+set}" = set; then
4334   withval="$with_build_cppflags"
4335   BUILD_CPPFLAGS="$withval"
4336 fi;
4337         echo "$as_me:4337: result: $BUILD_CPPFLAGS" >&5
4338 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4339
4340         echo "$as_me:4340: checking for native build linker-flags" >&5
4341 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4342
4343 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4344 if test "${with_build_ldflags+set}" = set; then
4345   withval="$with_build_ldflags"
4346   BUILD_LDFLAGS="$withval"
4347 fi;
4348         echo "$as_me:4348: result: $BUILD_LDFLAGS" >&5
4349 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4350
4351         echo "$as_me:4351: checking for native build linker-libraries" >&5
4352 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4353
4354 # Check whether --with-build-libs or --without-build-libs was given.
4355 if test "${with_build_libs+set}" = set; then
4356   withval="$with_build_libs"
4357   BUILD_LIBS="$withval"
4358 fi;
4359         echo "$as_me:4359: result: $BUILD_LIBS" >&5
4360 echo "${ECHO_T}$BUILD_LIBS" >&6
4361
4362         # this assumes we're on Unix.
4363         BUILD_EXEEXT=
4364         BUILD_OBJEXT=o
4365
4366         : ${BUILD_CC:='${CC}'}
4367
4368         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4369                 { { echo "$as_me:4369: error: Cross-build requires two compilers.
4370 Use --with-build-cc to specify the native compiler." >&5
4371 echo "$as_me: error: Cross-build requires two compilers.
4372 Use --with-build-cc to specify the native compiler." >&2;}
4373    { (exit 1); exit 1; }; }
4374         fi
4375
4376 else
4377         : ${BUILD_CC:='${CC}'}
4378         : ${BUILD_CPP:='${CPP}'}
4379         : ${BUILD_CFLAGS:='${CFLAGS}'}
4380         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4381         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4382         : ${BUILD_LIBS:='${LIBS}'}
4383         : ${BUILD_EXEEXT:='$x'}
4384         : ${BUILD_OBJEXT:='o'}
4385 fi
4386
4387 ###############################################################################
4388
4389 ### Options to allow the user to specify the set of libraries which are used.
4390 ### Use "--without-normal --with-shared" to allow the default model to be
4391 ### shared, for example.
4392 cf_list_models=""
4393
4394 echo "$as_me:4394: checking if libtool -version-number should be used" >&5
4395 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4396
4397 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4398 if test "${enable_libtool_version+set}" = set; then
4399   enableval="$enable_libtool_version"
4400   test "$enableval" != no && enableval=yes
4401   if test "$enableval" != "yes" ; then
4402     cf_libtool_version=no
4403   else
4404     cf_libtool_version=yes
4405   fi
4406 else
4407   enableval=yes
4408   cf_libtool_version=yes
4409
4410 fi;
4411 echo "$as_me:4411: result: $cf_libtool_version" >&5
4412 echo "${ECHO_T}$cf_libtool_version" >&6
4413
4414 if test "$cf_libtool_version" = yes ; then
4415         LIBTOOL_VERSION="-version-number"
4416 else
4417         LIBTOOL_VERSION="-version-info"
4418 fi
4419
4420 LIBTOOL=
4421
4422 # common library maintenance symbols that are convenient for libtool scripts:
4423 LIB_CREATE='${AR} -cr'
4424 LIB_OBJECT='${OBJECTS}'
4425 LIB_SUFFIX=.a
4426 LIB_PREP="$RANLIB"
4427
4428 # symbols used to prop libtool up to enable it to determine what it should be
4429 # doing:
4430 LIB_CLEAN=
4431 LIB_COMPILE=
4432 LIB_LINK='${CC}'
4433 LIB_INSTALL=
4434 LIB_UNINSTALL=
4435
4436 echo "$as_me:4436: checking if you want to build libraries with libtool" >&5
4437 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4438
4439 # Check whether --with-libtool or --without-libtool was given.
4440 if test "${with_libtool+set}" = set; then
4441   withval="$with_libtool"
4442   with_libtool=$withval
4443 else
4444   with_libtool=no
4445 fi;
4446 echo "$as_me:4446: result: $with_libtool" >&5
4447 echo "${ECHO_T}$with_libtool" >&6
4448 if test "$with_libtool" != "no"; then
4449
4450         if test "$with_libtool" != "yes" ; then
4451
4452 if test "x$prefix" != xNONE; then
4453   cf_path_syntax="$prefix"
4454 else
4455   cf_path_syntax="$ac_default_prefix"
4456 fi
4457
4458 case ".$with_libtool" in #(vi
4459 .\$\(*\)*|.\'*\'*) #(vi
4460   ;;
4461 ..|./*|.\\*) #(vi
4462   ;;
4463 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4464   ;;
4465 .\${*prefix}*) #(vi
4466   eval with_libtool="$with_libtool"
4467   case ".$with_libtool" in #(vi
4468   .NONE/*)
4469     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4470     ;;
4471   esac
4472   ;; #(vi
4473 .no|.NONE/*)
4474   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4475   ;;
4476 *)
4477   { { echo "$as_me:4477: error: expected a pathname, not \"$with_libtool\"" >&5
4478 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4479    { (exit 1); exit 1; }; }
4480   ;;
4481 esac
4482
4483                 LIBTOOL=$with_libtool
4484         else
4485                 # Extract the first word of "libtool", so it can be a program name with args.
4486 set dummy libtool; ac_word=$2
4487 echo "$as_me:4487: checking for $ac_word" >&5
4488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4489 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4490   echo $ECHO_N "(cached) $ECHO_C" >&6
4491 else
4492   case $LIBTOOL in
4493   [\\/]* | ?:[\\/]*)
4494   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4495   ;;
4496   *)
4497   ac_save_IFS=$IFS; IFS=$ac_path_separator
4498 ac_dummy="$PATH"
4499 for ac_dir in $ac_dummy; do
4500   IFS=$ac_save_IFS
4501   test -z "$ac_dir" && ac_dir=.
4502   if $as_executable_p "$ac_dir/$ac_word"; then
4503    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4504    echo "$as_me:4504: found $ac_dir/$ac_word" >&5
4505    break
4506 fi
4507 done
4508
4509   ;;
4510 esac
4511 fi
4512 LIBTOOL=$ac_cv_path_LIBTOOL
4513
4514 if test -n "$LIBTOOL"; then
4515   echo "$as_me:4515: result: $LIBTOOL" >&5
4516 echo "${ECHO_T}$LIBTOOL" >&6
4517 else
4518   echo "$as_me:4518: result: no" >&5
4519 echo "${ECHO_T}no" >&6
4520 fi
4521
4522         fi
4523         if test -z "$LIBTOOL" ; then
4524                 { { echo "$as_me:4524: error: Cannot find libtool" >&5
4525 echo "$as_me: error: Cannot find libtool" >&2;}
4526    { (exit 1); exit 1; }; }
4527         fi
4528         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4529         LIB_OBJECT='${OBJECTS:.o=.lo}'
4530         LIB_SUFFIX=.la
4531         LIB_CLEAN='${LIBTOOL} --mode=clean'
4532         LIB_COMPILE='${LIBTOOL} --mode=compile'
4533         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4534         LIB_INSTALL='${LIBTOOL} --mode=install'
4535         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4536         LIB_PREP=:
4537
4538         # Show the version of libtool
4539         echo "$as_me:4539: checking version of libtool" >&5
4540 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4541
4542         # Save the version in a cache variable - this is not entirely a good
4543         # thing, but the version string from libtool is very ugly, and for
4544         # bug reports it might be useful to have the original string. "("
4545         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.].*//'`
4546         echo "$as_me:4546: result: $cf_cv_libtool_version" >&5
4547 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4548         if test -z "$cf_cv_libtool_version" ; then
4549                 { { echo "$as_me:4549: error: This is not GNU libtool" >&5
4550 echo "$as_me: error: This is not GNU libtool" >&2;}
4551    { (exit 1); exit 1; }; }
4552         fi
4553
4554         # special hack to add -no-undefined (which libtool should do for itself)
4555         LT_UNDEF=
4556         case "$cf_cv_system_name" in #(vi
4557         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4558                 LT_UNDEF=-no-undefined
4559                 ;;
4560         esac
4561
4562         # special hack to add --tag option for C++ compiler
4563         case $cf_cv_libtool_version in #(vi
4564         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4565                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4566                 LIBTOOL="$LIBTOOL --tag=CC"
4567                 ;;
4568         *)
4569                 LIBTOOL_CXX="$LIBTOOL"
4570                 ;;
4571         esac
4572 else
4573         LIBTOOL=""
4574         LIBTOOL_CXX=""
4575 fi
4576
4577 test -z "$LIBTOOL" && ECHO_LT=
4578
4579 if test "$with_libtool" != "no" ; then
4580
4581 cf_list_models="$cf_list_models libtool"
4582
4583 else
4584
4585 echo "$as_me:4585: checking if you want to build shared libraries" >&5
4586 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4587
4588 # Check whether --with-shared or --without-shared was given.
4589 if test "${with_shared+set}" = set; then
4590   withval="$with_shared"
4591   with_shared=$withval
4592 else
4593   with_shared=no
4594 fi;
4595 echo "$as_me:4595: result: $with_shared" >&5
4596 echo "${ECHO_T}$with_shared" >&6
4597 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4598
4599 echo "$as_me:4599: checking if you want to build static libraries" >&5
4600 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4601
4602 # Check whether --with-normal or --without-normal was given.
4603 if test "${with_normal+set}" = set; then
4604   withval="$with_normal"
4605   with_normal=$withval
4606 else
4607   with_normal=yes
4608 fi;
4609 echo "$as_me:4609: result: $with_normal" >&5
4610 echo "${ECHO_T}$with_normal" >&6
4611 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4612
4613 echo "$as_me:4613: checking if you want to build debug libraries" >&5
4614 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4615
4616 # Check whether --with-debug or --without-debug was given.
4617 if test "${with_debug+set}" = set; then
4618   withval="$with_debug"
4619   with_debug=$withval
4620 else
4621   with_debug=yes
4622 fi;
4623 echo "$as_me:4623: result: $with_debug" >&5
4624 echo "${ECHO_T}$with_debug" >&6
4625 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4626
4627 echo "$as_me:4627: checking if you want to build profiling libraries" >&5
4628 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4629
4630 # Check whether --with-profile or --without-profile was given.
4631 if test "${with_profile+set}" = set; then
4632   withval="$with_profile"
4633   with_profile=$withval
4634 else
4635   with_profile=no
4636 fi;
4637 echo "$as_me:4637: result: $with_profile" >&5
4638 echo "${ECHO_T}$with_profile" >&6
4639 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4640
4641 fi
4642
4643 ###############################################################################
4644
4645 echo "$as_me:4645: checking for specified models" >&5
4646 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4647 test -z "$cf_list_models" && cf_list_models=normal
4648 test "$with_libtool" != "no" && cf_list_models=libtool
4649 echo "$as_me:4649: result: $cf_list_models" >&5
4650 echo "${ECHO_T}$cf_list_models" >&6
4651
4652 ### Use the first model as the default, and save its suffix for use in building
4653 ### up test-applications.
4654 echo "$as_me:4654: checking for default model" >&5
4655 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4656 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4657 echo "$as_me:4657: result: $DFT_LWR_MODEL" >&5
4658 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4659
4660 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4661
4662 TICS_NAME=tic
4663
4664 TINFO_NAME=tinfo
4665
4666 LIB_NAME=ncurses
4667
4668 LIB_DIR=../lib
4669 LIB_2ND=../../lib
4670
4671         case $cf_cv_system_name in #(vi
4672         OS/2*|os2*) #(vi
4673         LIB_PREFIX=''
4674         ;;
4675         *)      LIB_PREFIX='lib'
4676         ;;
4677         esac
4678 cf_prefix=$LIB_PREFIX
4679
4680 LIB_PREFIX=$cf_prefix
4681
4682 LIB_SUFFIX=
4683
4684 ###############################################################################
4685
4686 echo "$as_me:4686: checking if you want to build a separate terminfo library" >&5
4687 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4688
4689 # Check whether --with-termlib or --without-termlib was given.
4690 if test "${with_termlib+set}" = set; then
4691   withval="$with_termlib"
4692   with_termlib=$withval
4693 else
4694   with_termlib=no
4695 fi;
4696 echo "$as_me:4696: result: $with_termlib" >&5
4697 echo "${ECHO_T}$with_termlib" >&6
4698
4699 echo "$as_me:4699: checking if you want to build a separate tic library" >&5
4700 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4701
4702 # Check whether --with-ticlib or --without-ticlib was given.
4703 if test "${with_ticlib+set}" = set; then
4704   withval="$with_ticlib"
4705   with_ticlib=$withval
4706 else
4707   with_ticlib=no
4708 fi;
4709 echo "$as_me:4709: result: $with_ticlib" >&5
4710 echo "${ECHO_T}$with_ticlib" >&6
4711
4712 ### Checks for special libraries, must be done up-front.
4713 SHLIB_LIST=""
4714
4715 echo "$as_me:4715: checking if you want to link with the GPM mouse library" >&5
4716 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4717
4718 # Check whether --with-gpm or --without-gpm was given.
4719 if test "${with_gpm+set}" = set; then
4720   withval="$with_gpm"
4721   with_gpm=$withval
4722 else
4723   with_gpm=maybe
4724 fi;
4725 echo "$as_me:4725: result: $with_gpm" >&5
4726 echo "${ECHO_T}$with_gpm" >&6
4727
4728 if test "$with_gpm" != no ; then
4729         echo "$as_me:4729: checking for gpm.h" >&5
4730 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4731 if test "${ac_cv_header_gpm_h+set}" = set; then
4732   echo $ECHO_N "(cached) $ECHO_C" >&6
4733 else
4734   cat >conftest.$ac_ext <<_ACEOF
4735 #line 4735 "configure"
4736 #include "confdefs.h"
4737 #include <gpm.h>
4738 _ACEOF
4739 if { (eval echo "$as_me:4739: \"$ac_cpp conftest.$ac_ext\"") >&5
4740   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4741   ac_status=$?
4742   egrep -v '^ *\+' conftest.er1 >conftest.err
4743   rm -f conftest.er1
4744   cat conftest.err >&5
4745   echo "$as_me:4745: \$? = $ac_status" >&5
4746   (exit $ac_status); } >/dev/null; then
4747   if test -s conftest.err; then
4748     ac_cpp_err=$ac_c_preproc_warn_flag
4749   else
4750     ac_cpp_err=
4751   fi
4752 else
4753   ac_cpp_err=yes
4754 fi
4755 if test -z "$ac_cpp_err"; then
4756   ac_cv_header_gpm_h=yes
4757 else
4758   echo "$as_me: failed program was:" >&5
4759   cat conftest.$ac_ext >&5
4760   ac_cv_header_gpm_h=no
4761 fi
4762 rm -f conftest.err conftest.$ac_ext
4763 fi
4764 echo "$as_me:4764: result: $ac_cv_header_gpm_h" >&5
4765 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4766 if test $ac_cv_header_gpm_h = yes; then
4767
4768                 cat >>confdefs.h <<\EOF
4769 #define HAVE_GPM_H 1
4770 EOF
4771
4772                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4773                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4774
4775 echo "${as_me-configure}:4775: testing assuming we really have GPM library ..." 1>&5
4776
4777                         cat >>confdefs.h <<\EOF
4778 #define HAVE_LIBGPM 1
4779 EOF
4780
4781                 else
4782                         echo "$as_me:4782: checking for Gpm_Open in -lgpm" >&5
4783 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4784 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4785   echo $ECHO_N "(cached) $ECHO_C" >&6
4786 else
4787   ac_check_lib_save_LIBS=$LIBS
4788 LIBS="-lgpm  $LIBS"
4789 cat >conftest.$ac_ext <<_ACEOF
4790 #line 4790 "configure"
4791 #include "confdefs.h"
4792
4793 /* Override any gcc2 internal prototype to avoid an error.  */
4794 #ifdef __cplusplus
4795 extern "C"
4796 #endif
4797 /* We use char because int might match the return type of a gcc2
4798    builtin and then its argument prototype would still apply.  */
4799 char Gpm_Open ();
4800 int
4801 main ()
4802 {
4803 Gpm_Open ();
4804   ;
4805   return 0;
4806 }
4807 _ACEOF
4808 rm -f conftest.$ac_objext conftest$ac_exeext
4809 if { (eval echo "$as_me:4809: \"$ac_link\"") >&5
4810   (eval $ac_link) 2>&5
4811   ac_status=$?
4812   echo "$as_me:4812: \$? = $ac_status" >&5
4813   (exit $ac_status); } &&
4814          { ac_try='test -s conftest$ac_exeext'
4815   { (eval echo "$as_me:4815: \"$ac_try\"") >&5
4816   (eval $ac_try) 2>&5
4817   ac_status=$?
4818   echo "$as_me:4818: \$? = $ac_status" >&5
4819   (exit $ac_status); }; }; then
4820   ac_cv_lib_gpm_Gpm_Open=yes
4821 else
4822   echo "$as_me: failed program was:" >&5
4823 cat conftest.$ac_ext >&5
4824 ac_cv_lib_gpm_Gpm_Open=no
4825 fi
4826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4827 LIBS=$ac_check_lib_save_LIBS
4828 fi
4829 echo "$as_me:4829: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4830 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4831 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4832   :
4833 else
4834
4835                                 { { echo "$as_me:4835: error: Cannot link with GPM library" >&5
4836 echo "$as_me: error: Cannot link with GPM library" >&2;}
4837    { (exit 1); exit 1; }; }
4838                 fi
4839                 with_gpm=yes
4840
4841 fi
4842
4843 else
4844
4845                 test "$with_gpm" != maybe && { echo "$as_me:4845: WARNING: Cannot find GPM header" >&5
4846 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4847                 with_gpm=no
4848
4849 fi
4850
4851 fi
4852
4853 if test "$with_gpm" != no ; then
4854         echo "$as_me:4854: checking if you want to load GPM dynamically" >&5
4855 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4856
4857 # Check whether --with-dlsym or --without-dlsym was given.
4858 if test "${with_dlsym+set}" = set; then
4859   withval="$with_dlsym"
4860   with_dlsym=$withval
4861 else
4862   with_dlsym=yes
4863 fi;
4864         echo "$as_me:4864: result: $with_dlsym" >&5
4865 echo "${ECHO_T}$with_dlsym" >&6
4866         if test "$with_dlsym" = yes ; then
4867
4868 cf_have_dlsym=no
4869 echo "$as_me:4869: checking for dlsym" >&5
4870 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4871 if test "${ac_cv_func_dlsym+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   cat >conftest.$ac_ext <<_ACEOF
4875 #line 4875 "configure"
4876 #include "confdefs.h"
4877 /* System header to define __stub macros and hopefully few prototypes,
4878     which can conflict with char dlsym (); below.  */
4879 #include <assert.h>
4880 /* Override any gcc2 internal prototype to avoid an error.  */
4881 #ifdef __cplusplus
4882 extern "C"
4883 #endif
4884 /* We use char because int might match the return type of a gcc2
4885    builtin and then its argument prototype would still apply.  */
4886 char dlsym ();
4887 char (*f) ();
4888
4889 int
4890 main ()
4891 {
4892 /* The GNU C library defines this for functions which it implements
4893     to always fail with ENOSYS.  Some functions are actually named
4894     something starting with __ and the normal name is an alias.  */
4895 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4896 choke me
4897 #else
4898 f = dlsym;
4899 #endif
4900
4901   ;
4902   return 0;
4903 }
4904 _ACEOF
4905 rm -f conftest.$ac_objext conftest$ac_exeext
4906 if { (eval echo "$as_me:4906: \"$ac_link\"") >&5
4907   (eval $ac_link) 2>&5
4908   ac_status=$?
4909   echo "$as_me:4909: \$? = $ac_status" >&5
4910   (exit $ac_status); } &&
4911          { ac_try='test -s conftest$ac_exeext'
4912   { (eval echo "$as_me:4912: \"$ac_try\"") >&5
4913   (eval $ac_try) 2>&5
4914   ac_status=$?
4915   echo "$as_me:4915: \$? = $ac_status" >&5
4916   (exit $ac_status); }; }; then
4917   ac_cv_func_dlsym=yes
4918 else
4919   echo "$as_me: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 ac_cv_func_dlsym=no
4922 fi
4923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4924 fi
4925 echo "$as_me:4925: result: $ac_cv_func_dlsym" >&5
4926 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4927 if test $ac_cv_func_dlsym = yes; then
4928   cf_have_dlsym=yes
4929 else
4930
4931 cf_have_libdl=no
4932 echo "$as_me:4932: checking for dlsym in -ldl" >&5
4933 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4934 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4935   echo $ECHO_N "(cached) $ECHO_C" >&6
4936 else
4937   ac_check_lib_save_LIBS=$LIBS
4938 LIBS="-ldl  $LIBS"
4939 cat >conftest.$ac_ext <<_ACEOF
4940 #line 4940 "configure"
4941 #include "confdefs.h"
4942
4943 /* Override any gcc2 internal prototype to avoid an error.  */
4944 #ifdef __cplusplus
4945 extern "C"
4946 #endif
4947 /* We use char because int might match the return type of a gcc2
4948    builtin and then its argument prototype would still apply.  */
4949 char dlsym ();
4950 int
4951 main ()
4952 {
4953 dlsym ();
4954   ;
4955   return 0;
4956 }
4957 _ACEOF
4958 rm -f conftest.$ac_objext conftest$ac_exeext
4959 if { (eval echo "$as_me:4959: \"$ac_link\"") >&5
4960   (eval $ac_link) 2>&5
4961   ac_status=$?
4962   echo "$as_me:4962: \$? = $ac_status" >&5
4963   (exit $ac_status); } &&
4964          { ac_try='test -s conftest$ac_exeext'
4965   { (eval echo "$as_me:4965: \"$ac_try\"") >&5
4966   (eval $ac_try) 2>&5
4967   ac_status=$?
4968   echo "$as_me:4968: \$? = $ac_status" >&5
4969   (exit $ac_status); }; }; then
4970   ac_cv_lib_dl_dlsym=yes
4971 else
4972   echo "$as_me: failed program was:" >&5
4973 cat conftest.$ac_ext >&5
4974 ac_cv_lib_dl_dlsym=no
4975 fi
4976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4977 LIBS=$ac_check_lib_save_LIBS
4978 fi
4979 echo "$as_me:4979: result: $ac_cv_lib_dl_dlsym" >&5
4980 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4981 if test $ac_cv_lib_dl_dlsym = yes; then
4982
4983         cf_have_dlsym=yes
4984         cf_have_libdl=yes
4985 fi
4986
4987 fi
4988
4989 if test "$cf_have_dlsym" = yes ; then
4990         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4991
4992         echo "$as_me:4992: checking whether able to link to dl*() functions" >&5
4993 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4994         cat >conftest.$ac_ext <<_ACEOF
4995 #line 4995 "configure"
4996 #include "confdefs.h"
4997 #include <dlfcn.h>
4998 int
4999 main ()
5000 {
5001
5002                 void *obj;
5003                 if ((obj = dlopen("filename", 0)) != 0) {
5004                         if (dlsym(obj, "symbolname") == 0) {
5005                         dlclose(obj);
5006                         }
5007                 }
5008   ;
5009   return 0;
5010 }
5011 _ACEOF
5012 rm -f conftest.$ac_objext conftest$ac_exeext
5013 if { (eval echo "$as_me:5013: \"$ac_link\"") >&5
5014   (eval $ac_link) 2>&5
5015   ac_status=$?
5016   echo "$as_me:5016: \$? = $ac_status" >&5
5017   (exit $ac_status); } &&
5018          { ac_try='test -s conftest$ac_exeext'
5019   { (eval echo "$as_me:5019: \"$ac_try\"") >&5
5020   (eval $ac_try) 2>&5
5021   ac_status=$?
5022   echo "$as_me:5022: \$? = $ac_status" >&5
5023   (exit $ac_status); }; }; then
5024
5025                 cat >>confdefs.h <<\EOF
5026 #define HAVE_LIBDL 1
5027 EOF
5028
5029 else
5030   echo "$as_me: failed program was:" >&5
5031 cat conftest.$ac_ext >&5
5032
5033                 { { echo "$as_me:5033: error: Cannot link test program for libdl" >&5
5034 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5035    { (exit 1); exit 1; }; }
5036 fi
5037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5038         echo "$as_me:5038: result: ok" >&5
5039 echo "${ECHO_T}ok" >&6
5040 else
5041         { { echo "$as_me:5041: error: Cannot find dlsym function" >&5
5042 echo "$as_me: error: Cannot find dlsym function" >&2;}
5043    { (exit 1); exit 1; }; }
5044 fi
5045
5046                 if test "$with_gpm" != yes ; then
5047                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5048
5049 echo "${as_me-configure}:5049: testing assuming soname for gpm is $with_gpm ..." 1>&5
5050
5051                         cf_cv_gpm_soname="$with_gpm"
5052                 else
5053
5054 echo "$as_me:5054: checking for soname of gpm library" >&5
5055 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5056 if test "${cf_cv_gpm_soname+set}" = set; then
5057   echo $ECHO_N "(cached) $ECHO_C" >&6
5058 else
5059
5060 cf_cv_gpm_soname=unknown
5061 if test "$cross_compiling" != yes ; then
5062 cat >conftest.$ac_ext <<CF_EOF
5063 #include <gpm.h>
5064 int main()
5065 {
5066 if (Gpm_Open(0,0)) Gpm_Close();
5067         ${cf_cv_main_return:-return}(0);
5068 }
5069 CF_EOF
5070 cf_save_LIBS="$LIBS"
5071         LIBS="-lgpm $LIBS"
5072         if { (eval echo "$as_me:5072: \"$ac_compile\"") >&5
5073   (eval $ac_compile) 2>&5
5074   ac_status=$?
5075   echo "$as_me:5075: \$? = $ac_status" >&5
5076   (exit $ac_status); } ; then
5077                 if { (eval echo "$as_me:5077: \"$ac_link\"") >&5
5078   (eval $ac_link) 2>&5
5079   ac_status=$?
5080   echo "$as_me:5080: \$? = $ac_status" >&5
5081   (exit $ac_status); } ; then
5082                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5083                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5084                 fi
5085         fi
5086 rm -f conftest*
5087 LIBS="$cf_save_LIBS"
5088 fi
5089
5090 fi
5091 echo "$as_me:5091: result: $cf_cv_gpm_soname" >&5
5092 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5093
5094                 fi
5095                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5096 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5097 EOF
5098
5099                 SHLIB_LIST="-ldl $SHLIB_LIST"
5100         else
5101                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5102                 TEST_LIBS="-lgpm $TEST_LIBS"
5103         fi
5104         cat >>confdefs.h <<\EOF
5105 #define HAVE_LIBGPM 1
5106 EOF
5107
5108 echo "$as_me:5108: checking for Gpm_Wgetch in -lgpm" >&5
5109 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5110 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5111   echo $ECHO_N "(cached) $ECHO_C" >&6
5112 else
5113   ac_check_lib_save_LIBS=$LIBS
5114 LIBS="-lgpm  $LIBS"
5115 cat >conftest.$ac_ext <<_ACEOF
5116 #line 5116 "configure"
5117 #include "confdefs.h"
5118
5119 /* Override any gcc2 internal prototype to avoid an error.  */
5120 #ifdef __cplusplus
5121 extern "C"
5122 #endif
5123 /* We use char because int might match the return type of a gcc2
5124    builtin and then its argument prototype would still apply.  */
5125 char Gpm_Wgetch ();
5126 int
5127 main ()
5128 {
5129 Gpm_Wgetch ();
5130   ;
5131   return 0;
5132 }
5133 _ACEOF
5134 rm -f conftest.$ac_objext conftest$ac_exeext
5135 if { (eval echo "$as_me:5135: \"$ac_link\"") >&5
5136   (eval $ac_link) 2>&5
5137   ac_status=$?
5138   echo "$as_me:5138: \$? = $ac_status" >&5
5139   (exit $ac_status); } &&
5140          { ac_try='test -s conftest$ac_exeext'
5141   { (eval echo "$as_me:5141: \"$ac_try\"") >&5
5142   (eval $ac_try) 2>&5
5143   ac_status=$?
5144   echo "$as_me:5144: \$? = $ac_status" >&5
5145   (exit $ac_status); }; }; then
5146   ac_cv_lib_gpm_Gpm_Wgetch=yes
5147 else
5148   echo "$as_me: failed program was:" >&5
5149 cat conftest.$ac_ext >&5
5150 ac_cv_lib_gpm_Gpm_Wgetch=no
5151 fi
5152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5153 LIBS=$ac_check_lib_save_LIBS
5154 fi
5155 echo "$as_me:5155: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5156 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5157 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5158
5159 echo "$as_me:5159: checking if GPM is weakly bound to curses library" >&5
5160 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5161 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5162   echo $ECHO_N "(cached) $ECHO_C" >&6
5163 else
5164
5165 cf_cv_check_gpm_wgetch=unknown
5166 if test "$cross_compiling" != yes ; then
5167
5168 cat >conftest.$ac_ext <<CF_EOF
5169 #include <gpm.h>
5170 int main()
5171 {
5172         Gpm_Wgetch();
5173         ${cf_cv_main_return:-return}(0);
5174 }
5175 CF_EOF
5176
5177         cf_save_LIBS="$LIBS"
5178         # This only works if we can look at the symbol table.  If a shared
5179         # library is stripped for install, we cannot use that.  So we're forced
5180         # to rely on the static library, noting that some packagers may not
5181         # include it.
5182         LIBS="-static -lgpm -dynamic $LIBS"
5183         if { (eval echo "$as_me:5183: \"$ac_compile\"") >&5
5184   (eval $ac_compile) 2>&5
5185   ac_status=$?
5186   echo "$as_me:5186: \$? = $ac_status" >&5
5187   (exit $ac_status); } ; then
5188                 if { (eval echo "$as_me:5188: \"$ac_link\"") >&5
5189   (eval $ac_link) 2>&5
5190   ac_status=$?
5191   echo "$as_me:5191: \$? = $ac_status" >&5
5192   (exit $ac_status); } ; then
5193                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5194                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5195                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5196                 fi
5197         fi
5198         rm -f conftest*
5199         LIBS="$cf_save_LIBS"
5200 fi
5201
5202 fi
5203 echo "$as_me:5203: result: $cf_cv_check_gpm_wgetch" >&5
5204 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5205
5206 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5207         { echo "$as_me:5207: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5208 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5209 fi
5210
5211 fi
5212
5213 fi
5214
5215 # not everyone has "test -c"
5216 if test -c /dev/sysmouse 2>/dev/null ; then
5217 echo "$as_me:5217: checking if you want to use sysmouse" >&5
5218 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5219
5220 # Check whether --with-sysmouse or --without-sysmouse was given.
5221 if test "${with_sysmouse+set}" = set; then
5222   withval="$with_sysmouse"
5223   cf_with_sysmouse=$withval
5224 else
5225   cf_with_sysmouse=maybe
5226 fi;
5227         if test "$cf_with_sysmouse" != no ; then
5228         cat >conftest.$ac_ext <<_ACEOF
5229 #line 5229 "configure"
5230 #include "confdefs.h"
5231
5232 #include <osreldate.h>
5233 #if (__FreeBSD_version >= 400017)
5234 #include <sys/consio.h>
5235 #include <sys/fbio.h>
5236 #else
5237 #include <machine/console.h>
5238 #endif
5239
5240 int
5241 main ()
5242 {
5243
5244         struct mouse_info the_mouse;
5245         ioctl(0, CONS_MOUSECTL, &the_mouse);
5246
5247   ;
5248   return 0;
5249 }
5250 _ACEOF
5251 rm -f conftest.$ac_objext
5252 if { (eval echo "$as_me:5252: \"$ac_compile\"") >&5
5253   (eval $ac_compile) 2>&5
5254   ac_status=$?
5255   echo "$as_me:5255: \$? = $ac_status" >&5
5256   (exit $ac_status); } &&
5257          { ac_try='test -s conftest.$ac_objext'
5258   { (eval echo "$as_me:5258: \"$ac_try\"") >&5
5259   (eval $ac_try) 2>&5
5260   ac_status=$?
5261   echo "$as_me:5261: \$? = $ac_status" >&5
5262   (exit $ac_status); }; }; then
5263   cf_with_sysmouse=yes
5264 else
5265   echo "$as_me: failed program was:" >&5
5266 cat conftest.$ac_ext >&5
5267 cf_with_sysmouse=no
5268 fi
5269 rm -f conftest.$ac_objext conftest.$ac_ext
5270         fi
5271 echo "$as_me:5271: result: $cf_with_sysmouse" >&5
5272 echo "${ECHO_T}$cf_with_sysmouse" >&6
5273 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5274 #define USE_SYSMOUSE 1
5275 EOF
5276
5277 fi
5278
5279 if test X"$CC_G_OPT" = X"" ; then
5280         CC_G_OPT='-g'
5281         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5282 fi
5283
5284 if test X"$CXX_G_OPT" = X"" ; then
5285         CXX_G_OPT='-g'
5286         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5287 fi
5288
5289 echo "$as_me:5289: checking for default loader flags" >&5
5290 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5291 case $DFT_LWR_MODEL in
5292 libtool) LD_MODEL=''   ;;
5293 normal)  LD_MODEL=''   ;;
5294 debug)   LD_MODEL=$CC_G_OPT ;;
5295 profile) LD_MODEL='-pg';;
5296 shared)  LD_MODEL=''   ;;
5297 esac
5298 echo "$as_me:5298: result: $LD_MODEL" >&5
5299 echo "${ECHO_T}$LD_MODEL" >&6
5300
5301 case $DFT_LWR_MODEL in
5302 shared)
5303
5304 echo "$as_me:5304: checking if rpath option should be used" >&5
5305 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5306
5307 # Check whether --enable-rpath or --disable-rpath was given.
5308 if test "${enable_rpath+set}" = set; then
5309   enableval="$enable_rpath"
5310   cf_cv_enable_rpath=$enableval
5311 else
5312   cf_cv_enable_rpath=no
5313 fi;
5314 echo "$as_me:5314: result: $cf_cv_enable_rpath" >&5
5315 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5316
5317 echo "$as_me:5317: checking if shared libraries should be relinked during install" >&5
5318 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5319
5320 # Check whether --enable-relink or --disable-relink was given.
5321 if test "${enable_relink+set}" = set; then
5322   enableval="$enable_relink"
5323   cf_cv_do_relink=$enableval
5324 else
5325   cf_cv_do_relink=yes
5326 fi;
5327 echo "$as_me:5327: result: $cf_cv_do_relink" >&5
5328 echo "${ECHO_T}$cf_cv_do_relink" >&6
5329         ;;
5330 esac
5331
5332 LD_RPATH_OPT=
5333 echo "$as_me:5333: checking for an rpath option" >&5
5334 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5335 case $cf_cv_system_name in #(vi
5336 irix*) #(vi
5337         if test "$GCC" = yes; then
5338                 LD_RPATH_OPT="-Wl,-rpath,"
5339         else
5340                 LD_RPATH_OPT="-rpath "
5341         fi
5342         ;;
5343 linux*|gnu*|k*bsd*-gnu) #(vi
5344         LD_RPATH_OPT="-Wl,-rpath,"
5345         ;;
5346 openbsd[2-9].*) #(vi
5347         LD_RPATH_OPT="-Wl,-rpath,"
5348         ;;
5349 freebsd*) #(vi
5350         LD_RPATH_OPT="-rpath "
5351         ;;
5352 netbsd*) #(vi
5353         LD_RPATH_OPT="-Wl,-rpath,"
5354         ;;
5355 osf*|mls+*) #(vi
5356         LD_RPATH_OPT="-rpath "
5357         ;;
5358 solaris2*) #(vi
5359         LD_RPATH_OPT="-R"
5360         ;;
5361 *)
5362         ;;
5363 esac
5364 echo "$as_me:5364: result: $LD_RPATH_OPT" >&5
5365 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5366
5367 case "x$LD_RPATH_OPT" in #(vi
5368 x-R*)
5369         echo "$as_me:5369: checking if we need a space after rpath option" >&5
5370 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5371         cf_save_LIBS="$LIBS"
5372         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5373         cat >conftest.$ac_ext <<_ACEOF
5374 #line 5374 "configure"
5375 #include "confdefs.h"
5376
5377 int
5378 main ()
5379 {
5380
5381   ;
5382   return 0;
5383 }
5384 _ACEOF
5385 rm -f conftest.$ac_objext conftest$ac_exeext
5386 if { (eval echo "$as_me:5386: \"$ac_link\"") >&5
5387   (eval $ac_link) 2>&5
5388   ac_status=$?
5389   echo "$as_me:5389: \$? = $ac_status" >&5
5390   (exit $ac_status); } &&
5391          { ac_try='test -s conftest$ac_exeext'
5392   { (eval echo "$as_me:5392: \"$ac_try\"") >&5
5393   (eval $ac_try) 2>&5
5394   ac_status=$?
5395   echo "$as_me:5395: \$? = $ac_status" >&5
5396   (exit $ac_status); }; }; then
5397   cf_rpath_space=no
5398 else
5399   echo "$as_me: failed program was:" >&5
5400 cat conftest.$ac_ext >&5
5401 cf_rpath_space=yes
5402 fi
5403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5404         LIBS="$cf_save_LIBS"
5405         echo "$as_me:5405: result: $cf_rpath_space" >&5
5406 echo "${ECHO_T}$cf_rpath_space" >&6
5407         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5408         ;;
5409 esac
5410
5411         LOCAL_LDFLAGS=
5412         LOCAL_LDFLAGS2=
5413         LD_SHARED_OPTS=
5414         INSTALL_LIB="-m 644"
5415
5416         cf_cv_do_symlinks=no
5417         cf_ld_rpath_opt=
5418         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5419
5420         echo "$as_me:5420: checking if release/abi version should be used for shared libs" >&5
5421 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5422
5423 # Check whether --with-shlib-version or --without-shlib-version was given.
5424 if test "${with_shlib_version+set}" = set; then
5425   withval="$with_shlib_version"
5426   test -z "$withval" && withval=auto
5427         case $withval in #(vi
5428         yes) #(vi
5429                 cf_cv_shlib_version=auto
5430                 ;;
5431         rel|abi|auto|no) #(vi
5432                 cf_cv_shlib_version=$withval
5433                 ;;
5434         *)
5435                 { { echo "$as_me:5435: error: option value must be one of: rel, abi, auto or no" >&5
5436 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5437    { (exit 1); exit 1; }; }
5438                 ;;
5439         esac
5440
5441 else
5442   cf_cv_shlib_version=auto
5443 fi;
5444         echo "$as_me:5444: result: $cf_cv_shlib_version" >&5
5445 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5446
5447         cf_cv_rm_so_locs=no
5448
5449         # Some less-capable ports of gcc support only -fpic
5450         CC_SHARED_OPTS=
5451         if test "$GCC" = yes
5452         then
5453                 echo "$as_me:5453: checking which $CC option to use" >&5
5454 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5455                 cf_save_CFLAGS="$CFLAGS"
5456                 for CC_SHARED_OPTS in -fPIC -fpic ''
5457                 do
5458                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5459                         cat >conftest.$ac_ext <<_ACEOF
5460 #line 5460 "configure"
5461 #include "confdefs.h"
5462 #include <stdio.h>
5463 int
5464 main ()
5465 {
5466 int x = 1
5467   ;
5468   return 0;
5469 }
5470 _ACEOF
5471 rm -f conftest.$ac_objext
5472 if { (eval echo "$as_me:5472: \"$ac_compile\"") >&5
5473   (eval $ac_compile) 2>&5
5474   ac_status=$?
5475   echo "$as_me:5475: \$? = $ac_status" >&5
5476   (exit $ac_status); } &&
5477          { ac_try='test -s conftest.$ac_objext'
5478   { (eval echo "$as_me:5478: \"$ac_try\"") >&5
5479   (eval $ac_try) 2>&5
5480   ac_status=$?
5481   echo "$as_me:5481: \$? = $ac_status" >&5
5482   (exit $ac_status); }; }; then
5483   break
5484 else
5485   echo "$as_me: failed program was:" >&5
5486 cat conftest.$ac_ext >&5
5487 fi
5488 rm -f conftest.$ac_objext conftest.$ac_ext
5489                 done
5490                 echo "$as_me:5490: result: $CC_SHARED_OPTS" >&5
5491 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5492                 CFLAGS="$cf_save_CFLAGS"
5493         fi
5494
5495         cf_cv_shlib_version_infix=no
5496
5497         case $cf_cv_system_name in #(vi
5498         aix[56]*) #(vi
5499                 if test "$GCC" = yes; then
5500                         CC_SHARED_OPTS=
5501                         MK_SHARED_LIB='$(CC) -shared'
5502                 fi
5503                 ;;
5504         beos*) #(vi
5505                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5506                 ;;
5507         cygwin*) #(vi
5508                 CC_SHARED_OPTS=
5509                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5510                 cf_cv_shlib_version=cygdll
5511                 cf_cv_shlib_version_infix=cygdll
5512                 cat >mk_shared_lib.sh <<-CF_EOF
5513                 #!/bin/sh
5514                 SHARED_LIB=\$1
5515                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5516                 shift
5517                 cat <<-EOF
5518                 Linking shared library
5519                 ** SHARED_LIB \$SHARED_LIB
5520                 ** IMPORT_LIB \$IMPORT_LIB
5521 EOF
5522                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5523 CF_EOF
5524                 chmod +x mk_shared_lib.sh
5525                 ;;
5526         darwin*) #(vi
5527                 EXTRA_CFLAGS="-no-cpp-precomp"
5528                 CC_SHARED_OPTS="-dynamic"
5529                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5530                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5531                 cf_cv_shlib_version_infix=yes
5532                 echo "$as_me:5532: checking if ld -search_paths_first works" >&5
5533 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5534 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537
5538                         cf_save_LDFLAGS=$LDFLAGS
5539                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5540                         cat >conftest.$ac_ext <<_ACEOF
5541 #line 5541 "configure"
5542 #include "confdefs.h"
5543
5544 int
5545 main ()
5546 {
5547 int i;
5548   ;
5549   return 0;
5550 }
5551 _ACEOF
5552 rm -f conftest.$ac_objext conftest$ac_exeext
5553 if { (eval echo "$as_me:5553: \"$ac_link\"") >&5
5554   (eval $ac_link) 2>&5
5555   ac_status=$?
5556   echo "$as_me:5556: \$? = $ac_status" >&5
5557   (exit $ac_status); } &&
5558          { ac_try='test -s conftest$ac_exeext'
5559   { (eval echo "$as_me:5559: \"$ac_try\"") >&5
5560   (eval $ac_try) 2>&5
5561   ac_status=$?
5562   echo "$as_me:5562: \$? = $ac_status" >&5
5563   (exit $ac_status); }; }; then
5564   cf_cv_ldflags_search_paths_first=yes
5565 else
5566   echo "$as_me: failed program was:" >&5
5567 cat conftest.$ac_ext >&5
5568 cf_cv_ldflags_search_paths_first=no
5569 fi
5570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5571                                 LDFLAGS=$cf_save_LDFLAGS
5572 fi
5573 echo "$as_me:5573: result: $cf_cv_ldflags_search_paths_first" >&5
5574 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5575                 if test $cf_cv_ldflags_search_paths_first = yes; then
5576                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5577                 fi
5578                 ;;
5579         hpux*) #(vi
5580                 # (tested with gcc 2.7.2 -- I don't have c89)
5581                 if test "$GCC" = yes; then
5582                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5583                 else
5584                         CC_SHARED_OPTS='+Z'
5585                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5586                 fi
5587                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5588                 # HP-UX shared libraries must be executable, and should be
5589                 # readonly to exploit a quirk in the memory manager.
5590                 INSTALL_LIB="-m 555"
5591                 ;;
5592         irix*) #(vi
5593                 if test "$cf_cv_enable_rpath" = yes ; then
5594                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5595                 fi
5596                 # tested with IRIX 5.2 and 'cc'.
5597                 if test "$GCC" != yes; then
5598                         CC_SHARED_OPTS='-KPIC'
5599                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5600                 else
5601                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5602                 fi
5603                 cf_cv_rm_so_locs=yes
5604                 ;;
5605         linux*|gnu*|k*bsd*-gnu) #(vi
5606                 if test "$DFT_LWR_MODEL" = "shared" ; then
5607                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5608                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5609                 fi
5610                 if test "$cf_cv_enable_rpath" = yes ; then
5611                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5612                 fi
5613
5614         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5615         if test "$cf_cv_shlib_version" = rel; then
5616                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5617         else
5618                 cf_cv_shared_soname='`basename $@`'
5619         fi
5620
5621                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5622                 ;;
5623         openbsd[2-9].*) #(vi
5624                 if test "$DFT_LWR_MODEL" = "shared" ; then
5625                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5626                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5627                 fi
5628                 if test "$cf_cv_enable_rpath" = yes ; then
5629                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5630                 fi
5631                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5632
5633         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5634         if test "$cf_cv_shlib_version" = rel; then
5635                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5636         else
5637                 cf_cv_shared_soname='`basename $@`'
5638         fi
5639
5640                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5641                 ;;
5642         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5643                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5644                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5645                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5646                 ;;
5647         freebsd*) #(vi
5648                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5649                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5650                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5651                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5652                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5653                 fi
5654
5655         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5656         if test "$cf_cv_shlib_version" = rel; then
5657                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5658         else
5659                 cf_cv_shared_soname='`basename $@`'
5660         fi
5661
5662                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5663                 ;;
5664         netbsd*) #(vi
5665                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5666                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5667                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5668                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5669                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5670                         if test "$cf_cv_shlib_version" = auto; then
5671                         if test -f /usr/libexec/ld.elf_so; then
5672                                 cf_cv_shlib_version=abi
5673                         else
5674                                 cf_cv_shlib_version=rel
5675                         fi
5676                         fi
5677
5678         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5679         if test "$cf_cv_shlib_version" = rel; then
5680                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5681         else
5682                 cf_cv_shared_soname='`basename $@`'
5683         fi
5684
5685                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5686                 else
5687                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5688                 fi
5689                 ;;
5690         osf*|mls+*) #(vi
5691                 # tested with OSF/1 V3.2 and 'cc'
5692                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5693                 # link with shared libs).
5694                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5695                 case $host_os in #(vi
5696                 osf4*)
5697                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5698                         ;;
5699                 esac
5700                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5701                 if test "$DFT_LWR_MODEL" = "shared" ; then
5702                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5703                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5704                 fi
5705                 cf_cv_rm_so_locs=yes
5706                 ;;
5707         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5708                 # tested with osr5.0.5
5709                 if test "$GCC" != yes; then
5710                         CC_SHARED_OPTS='-belf -KPIC'
5711                 fi
5712                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5713                 if test "$cf_cv_enable_rpath" = yes ; then
5714                         # only way is to set LD_RUN_PATH but no switch for it
5715                         RUN_PATH=$libdir
5716                 fi
5717                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5718                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5719                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5720                 ;;
5721         sunos4*) #(vi
5722                 # tested with SunOS 4.1.1 and gcc 2.7.0
5723                 if test "$GCC" != yes; then
5724                         CC_SHARED_OPTS='-KPIC'
5725                 fi
5726                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5727                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5728                 ;;
5729         solaris2*) #(vi
5730                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5731                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5732                 if test "$DFT_LWR_MODEL" = "shared" ; then
5733                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5734                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5735                 fi
5736                 if test "$cf_cv_enable_rpath" = yes ; then
5737                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5738                 fi
5739
5740         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5741         if test "$cf_cv_shlib_version" = rel; then
5742                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5743         else
5744                 cf_cv_shared_soname='`basename $@`'
5745         fi
5746
5747                 if test "$GCC" != yes; then
5748                         cf_save_CFLAGS="$CFLAGS"
5749                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5750                         do
5751                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5752                                 cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755 #include <stdio.h>
5756 int
5757 main ()
5758 {
5759 printf("Hello\n");
5760   ;
5761   return 0;
5762 }
5763 _ACEOF
5764 rm -f conftest.$ac_objext
5765 if { (eval echo "$as_me:5765: \"$ac_compile\"") >&5
5766   (eval $ac_compile) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); } &&
5770          { ac_try='test -s conftest.$ac_objext'
5771   { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); }; }; then
5776   break
5777 else
5778   echo "$as_me: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 fi
5781 rm -f conftest.$ac_objext conftest.$ac_ext
5782                         done
5783                         CFLAGS="$cf_save_CFLAGS"
5784                         CC_SHARED_OPTS=$cf_shared_opts
5785                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5786                 else
5787                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5788                 fi
5789                 ;;
5790         sysv5uw7*|unix_sv*) #(vi
5791                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5792                 if test "$GCC" != yes; then
5793                         CC_SHARED_OPTS='-KPIC'
5794                 fi
5795                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5796                 ;;
5797         *)
5798                 CC_SHARED_OPTS='unknown'
5799                 MK_SHARED_LIB='echo unknown'
5800                 ;;
5801         esac
5802
5803         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5804         case "$cf_cv_shlib_version" in #(vi
5805         rel|abi)
5806                 case "$MK_SHARED_LIB" in #(vi
5807                 *'-o $@') #(vi
5808                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5809                         ;;
5810                 *)
5811                         { echo "$as_me:5811: WARNING: ignored --with-shlib-version" >&5
5812 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5813                         ;;
5814                 esac
5815                 ;;
5816         esac
5817
5818         if test -n "$cf_ld_rpath_opt" ; then
5819                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5820         fi
5821
5822 if test "$CC_SHARED_OPTS" = "unknown"; then
5823         for model in $cf_list_models; do
5824                 if test "$model" = "shared"; then
5825                         { { echo "$as_me:5825: error: Shared libraries are not supported in this version" >&5
5826 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5827    { (exit 1); exit 1; }; }
5828                 fi
5829         done
5830 fi
5831
5832 ### If we're building with rpath, try to link non-standard libs that way too.
5833 if test "$DFT_LWR_MODEL" = "shared"; then
5834
5835 echo "$as_me:5835: checking if rpath should be not be set" >&5
5836 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
5837
5838 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5839 if test "${enable_rpath_hack+set}" = set; then
5840   enableval="$enable_rpath_hack"
5841   test "$enableval" != no && enableval=yes
5842   if test "$enableval" != "yes" ; then
5843     cf_disable_rpath_hack=yes
5844   else
5845     cf_disable_rpath_hack=no
5846   fi
5847 else
5848   enableval=yes
5849   cf_disable_rpath_hack=no
5850
5851 fi;
5852 echo "$as_me:5852: result: $cf_disable_rpath_hack" >&5
5853 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5854 if test "$cf_disable_rpath_hack" = no ; then
5855
5856 echo "$as_me:5856: checking for updated LDFLAGS" >&5
5857 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5858 if test -n "$LD_RPATH_OPT" ; then
5859         echo "$as_me:5859: result: maybe" >&5
5860 echo "${ECHO_T}maybe" >&6
5861
5862         for ac_prog in ldd
5863 do
5864   # Extract the first word of "$ac_prog", so it can be a program name with args.
5865 set dummy $ac_prog; ac_word=$2
5866 echo "$as_me:5866: checking for $ac_word" >&5
5867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5868 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5869   echo $ECHO_N "(cached) $ECHO_C" >&6
5870 else
5871   if test -n "$cf_ldd_prog"; then
5872   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5873 else
5874   ac_save_IFS=$IFS; IFS=$ac_path_separator
5875 ac_dummy="$PATH"
5876 for ac_dir in $ac_dummy; do
5877   IFS=$ac_save_IFS
5878   test -z "$ac_dir" && ac_dir=.
5879   $as_executable_p "$ac_dir/$ac_word" || continue
5880 ac_cv_prog_cf_ldd_prog="$ac_prog"
5881 echo "$as_me:5881: found $ac_dir/$ac_word" >&5
5882 break
5883 done
5884
5885 fi
5886 fi
5887 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5888 if test -n "$cf_ldd_prog"; then
5889   echo "$as_me:5889: result: $cf_ldd_prog" >&5
5890 echo "${ECHO_T}$cf_ldd_prog" >&6
5891 else
5892   echo "$as_me:5892: result: no" >&5
5893 echo "${ECHO_T}no" >&6
5894 fi
5895
5896   test -n "$cf_ldd_prog" && break
5897 done
5898 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5899
5900         cf_rpath_list="/usr/lib /lib"
5901         if test "$cf_ldd_prog" != no
5902         then
5903 cat >conftest.$ac_ext <<_ACEOF
5904 #line 5904 "configure"
5905 #include "confdefs.h"
5906 #include <stdio.h>
5907 int
5908 main ()
5909 {
5910 printf("Hello");
5911   ;
5912   return 0;
5913 }
5914 _ACEOF
5915 rm -f conftest.$ac_objext conftest$ac_exeext
5916 if { (eval echo "$as_me:5916: \"$ac_link\"") >&5
5917   (eval $ac_link) 2>&5
5918   ac_status=$?
5919   echo "$as_me:5919: \$? = $ac_status" >&5
5920   (exit $ac_status); } &&
5921          { ac_try='test -s conftest$ac_exeext'
5922   { (eval echo "$as_me:5922: \"$ac_try\"") >&5
5923   (eval $ac_try) 2>&5
5924   ac_status=$?
5925   echo "$as_me:5925: \$? = $ac_status" >&5
5926   (exit $ac_status); }; }; then
5927   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5928 else
5929   echo "$as_me: failed program was:" >&5
5930 cat conftest.$ac_ext >&5
5931 fi
5932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5933         fi
5934
5935         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5936
5937 echo "${as_me-configure}:5937: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5938
5939 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5940
5941 echo "${as_me-configure}:5941: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5942
5943 cf_rpath_dst=
5944 for cf_rpath_src in $LDFLAGS
5945 do
5946         case $cf_rpath_src in #(vi
5947         -L*) #(vi
5948
5949                 # check if this refers to a directory which we will ignore
5950                 cf_rpath_skip=no
5951                 if test -n "$cf_rpath_list"
5952                 then
5953                         for cf_rpath_item in $cf_rpath_list
5954                         do
5955                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5956                                 then
5957                                         cf_rpath_skip=yes
5958                                         break
5959                                 fi
5960                         done
5961                 fi
5962
5963                 if test "$cf_rpath_skip" = no
5964                 then
5965                         # transform the option
5966                         if test "$LD_RPATH_OPT" = "-R " ; then
5967                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5968                         else
5969                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5970                         fi
5971
5972                         # if we have not already added this, add it now
5973                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5974                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5975                         then
5976                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5977
5978 echo "${as_me-configure}:5978: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5979
5980                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5981                         fi
5982                 fi
5983                 ;;
5984         esac
5985         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5986 done
5987 LDFLAGS=$cf_rpath_dst
5988
5989 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5990
5991 echo "${as_me-configure}:5991: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5992
5993 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5994
5995 echo "${as_me-configure}:5995: testing ...checking LIBS $LIBS ..." 1>&5
5996
5997 cf_rpath_dst=
5998 for cf_rpath_src in $LIBS
5999 do
6000         case $cf_rpath_src in #(vi
6001         -L*) #(vi
6002
6003                 # check if this refers to a directory which we will ignore
6004                 cf_rpath_skip=no
6005                 if test -n "$cf_rpath_list"
6006                 then
6007                         for cf_rpath_item in $cf_rpath_list
6008                         do
6009                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6010                                 then
6011                                         cf_rpath_skip=yes
6012                                         break
6013                                 fi
6014                         done
6015                 fi
6016
6017                 if test "$cf_rpath_skip" = no
6018                 then
6019                         # transform the option
6020                         if test "$LD_RPATH_OPT" = "-R " ; then
6021                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6022                         else
6023                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6024                         fi
6025
6026                         # if we have not already added this, add it now
6027                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6028                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6029                         then
6030                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6031
6032 echo "${as_me-configure}:6032: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6033
6034                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6035                         fi
6036                 fi
6037                 ;;
6038         esac
6039         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6040 done
6041 LIBS=$cf_rpath_dst
6042
6043 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6044
6045 echo "${as_me-configure}:6045: testing ...checked LIBS $LIBS ..." 1>&5
6046
6047         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6048
6049 echo "${as_me-configure}:6049: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6050
6051 fi
6052
6053 fi
6054
6055 fi
6056
6057 ###############################################################################
6058
6059 ###     use option --disable-overwrite to leave out the link to -lcurses
6060 echo "$as_me:6060: checking if you wish to install ncurses overwriting curses" >&5
6061 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6062
6063 # Check whether --enable-overwrite or --disable-overwrite was given.
6064 if test "${enable_overwrite+set}" = set; then
6065   enableval="$enable_overwrite"
6066   with_overwrite=$enableval
6067 else
6068   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6069 fi;
6070 echo "$as_me:6070: result: $with_overwrite" >&5
6071 echo "${ECHO_T}$with_overwrite" >&6
6072
6073 echo "$as_me:6073: checking if external terminfo-database is used" >&5
6074 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6075
6076 # Check whether --enable-database or --disable-database was given.
6077 if test "${enable_database+set}" = set; then
6078   enableval="$enable_database"
6079   use_database=$enableval
6080 else
6081   use_database=yes
6082 fi;
6083 echo "$as_me:6083: result: $use_database" >&5
6084 echo "${ECHO_T}$use_database" >&6
6085
6086 case $host_os in #(vi
6087 os2*) #(vi
6088         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6089         ;;
6090 *) #(vi
6091         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6092         ;;
6093 esac
6094
6095         case $cf_cv_system_name in
6096         os2*)   PATH_SEPARATOR=';'  ;;
6097         *)      PATH_SEPARATOR=':'  ;;
6098         esac
6099
6100 if test "$use_database" != no ; then
6101         cat >>confdefs.h <<\EOF
6102 #define USE_DATABASE 1
6103 EOF
6104
6105         echo "$as_me:6105: checking which terminfo source-file will be installed" >&5
6106 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6107
6108 # Check whether --with-database or --without-database was given.
6109 if test "${with_database+set}" = set; then
6110   withval="$with_database"
6111   TERMINFO_SRC=$withval
6112 fi;
6113         echo "$as_me:6113: result: $TERMINFO_SRC" >&5
6114 echo "${ECHO_T}$TERMINFO_SRC" >&6
6115
6116         echo "$as_me:6116: checking whether to use hashed database instead of directory/tree" >&5
6117 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6118
6119 # Check whether --with-hashed-db or --without-hashed-db was given.
6120 if test "${with_hashed_db+set}" = set; then
6121   withval="$with_hashed_db"
6122
6123 else
6124   with_hashed_db=no
6125 fi;
6126         echo "$as_me:6126: result: $with_hashed_db" >&5
6127 echo "${ECHO_T}$with_hashed_db" >&6
6128 else
6129         with_hashed_db=no
6130 fi
6131
6132 echo "$as_me:6132: checking for list of fallback descriptions" >&5
6133 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6134
6135 # Check whether --with-fallbacks or --without-fallbacks was given.
6136 if test "${with_fallbacks+set}" = set; then
6137   withval="$with_fallbacks"
6138   with_fallback=$withval
6139 else
6140   with_fallback=
6141 fi;
6142 echo "$as_me:6142: result: $with_fallback" >&5
6143 echo "${ECHO_T}$with_fallback" >&6
6144 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6145
6146 echo "$as_me:6146: checking if you want modern xterm or antique" >&5
6147 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6148
6149 # Check whether --with-xterm-new or --without-xterm-new was given.
6150 if test "${with_xterm_new+set}" = set; then
6151   withval="$with_xterm_new"
6152   with_xterm_new=$withval
6153 else
6154   with_xterm_new=yes
6155 fi;
6156 case $with_xterm_new in
6157 no)     with_xterm_new=xterm-old;;
6158 *)      with_xterm_new=xterm-new;;
6159 esac
6160 echo "$as_me:6160: result: $with_xterm_new" >&5
6161 echo "${ECHO_T}$with_xterm_new" >&6
6162 WHICH_XTERM=$with_xterm_new
6163
6164 MAKE_TERMINFO=
6165 if test "$use_database" = no ; then
6166         TERMINFO="${datadir}/terminfo"
6167         MAKE_TERMINFO="#"
6168 else
6169
6170 echo "$as_me:6170: checking for list of terminfo directories" >&5
6171 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6172
6173 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6174 if test "${with_terminfo_dirs+set}" = set; then
6175   withval="$with_terminfo_dirs"
6176
6177 else
6178   withval=${TERMINFO_DIRS-${datadir}/terminfo}
6179 fi;
6180 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6181 cf_dst_path=
6182 for cf_src_path in $withval
6183 do
6184
6185 if test "x$prefix" != xNONE; then
6186   cf_path_syntax="$prefix"
6187 else
6188   cf_path_syntax="$ac_default_prefix"
6189 fi
6190
6191 case ".$cf_src_path" in #(vi
6192 .\$\(*\)*|.\'*\'*) #(vi
6193   ;;
6194 ..|./*|.\\*) #(vi
6195   ;;
6196 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6197   ;;
6198 .\${*prefix}*) #(vi
6199   eval cf_src_path="$cf_src_path"
6200   case ".$cf_src_path" in #(vi
6201   .NONE/*)
6202     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6203     ;;
6204   esac
6205   ;; #(vi
6206 .no|.NONE/*)
6207   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6208   ;;
6209 *)
6210   { { echo "$as_me:6210: error: expected a pathname, not \"$cf_src_path\"" >&5
6211 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6212    { (exit 1); exit 1; }; }
6213   ;;
6214 esac
6215
6216   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6217   cf_dst_path="${cf_dst_path}${cf_src_path}"
6218 done
6219 IFS="$ac_save_ifs"
6220
6221 eval 'TERMINFO_DIRS="$cf_dst_path"'
6222
6223 echo "$as_me:6223: result: $TERMINFO_DIRS" >&5
6224 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6225 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6226 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6227 EOF
6228
6229 echo "$as_me:6229: checking for default terminfo directory" >&5
6230 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6231
6232 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6233 if test "${with_default_terminfo_dir+set}" = set; then
6234   withval="$with_default_terminfo_dir"
6235
6236 else
6237   withval="${TERMINFO-${datadir}/terminfo}"
6238 fi; if test -n "${datadir}/terminfo" ; then
6239
6240 if test "x$prefix" != xNONE; then
6241   cf_path_syntax="$prefix"
6242 else
6243   cf_path_syntax="$ac_default_prefix"
6244 fi
6245
6246 case ".$withval" in #(vi
6247 .\$\(*\)*|.\'*\'*) #(vi
6248   ;;
6249 ..|./*|.\\*) #(vi
6250   ;;
6251 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6252   ;;
6253 .\${*prefix}*) #(vi
6254   eval withval="$withval"
6255   case ".$withval" in #(vi
6256   .NONE/*)
6257     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6258     ;;
6259   esac
6260   ;; #(vi
6261 .no|.NONE/*)
6262   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6263   ;;
6264 *)
6265   { { echo "$as_me:6265: error: expected a pathname, not \"$withval\"" >&5
6266 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6267    { (exit 1); exit 1; }; }
6268   ;;
6269 esac
6270
6271 fi
6272 TERMINFO="$withval"
6273
6274 echo "$as_me:6274: result: $TERMINFO" >&5
6275 echo "${ECHO_T}$TERMINFO" >&6
6276 cat >>confdefs.h <<EOF
6277 #define TERMINFO "$TERMINFO"
6278 EOF
6279
6280 fi
6281
6282 ###     use option --disable-big-core to make tic run on small machines
6283 ###     We need 4Mb, check if we can allocate 50% more than that.
6284 echo "$as_me:6284: checking if big-core option selected" >&5
6285 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6286
6287 # Check whether --enable-big-core or --disable-big-core was given.
6288 if test "${enable_big_core+set}" = set; then
6289   enableval="$enable_big_core"
6290   with_big_core=$enableval
6291 else
6292   if test "$cross_compiling" = yes; then
6293   with_big_core=no
6294 else
6295   cat >conftest.$ac_ext <<_ACEOF
6296 #line 6296 "configure"
6297 #include "confdefs.h"
6298
6299 #include <stdlib.h>
6300 #include <string.h>
6301 int main() {
6302         unsigned long n = 6000000L;
6303         char *s = malloc(n);
6304         if (s != 0)
6305                 s[0] = s[n-1] = 0;
6306         ${cf_cv_main_return:-return}(s == 0);
6307 }
6308 _ACEOF
6309 rm -f conftest$ac_exeext
6310 if { (eval echo "$as_me:6310: \"$ac_link\"") >&5
6311   (eval $ac_link) 2>&5
6312   ac_status=$?
6313   echo "$as_me:6313: \$? = $ac_status" >&5
6314   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6315   { (eval echo "$as_me:6315: \"$ac_try\"") >&5
6316   (eval $ac_try) 2>&5
6317   ac_status=$?
6318   echo "$as_me:6318: \$? = $ac_status" >&5
6319   (exit $ac_status); }; }; then
6320   with_big_core=yes
6321 else
6322   echo "$as_me: program exited with status $ac_status" >&5
6323 echo "$as_me: failed program was:" >&5
6324 cat conftest.$ac_ext >&5
6325 with_big_core=no
6326 fi
6327 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6328 fi
6329 fi;
6330 echo "$as_me:6330: result: $with_big_core" >&5
6331 echo "${ECHO_T}$with_big_core" >&6
6332 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6333 #define HAVE_BIG_CORE 1
6334 EOF
6335
6336 ### ISO C only guarantees 512-char strings, we have tables which load faster
6337 ### when constructed using "big" strings.  More than the C compiler, the awk
6338 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6339 echo "$as_me:6339: checking if big-strings option selected" >&5
6340 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6341
6342 # Check whether --enable-big-strings or --disable-big-strings was given.
6343 if test "${enable_big_strings+set}" = set; then
6344   enableval="$enable_big_strings"
6345   with_big_strings=$enableval
6346 else
6347
6348         case x$AWK in #(vi
6349         x)
6350                 eval with_big_strings=no
6351                 ;;
6352         *) #(vi
6353                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6354                         | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6355                         eval with_big_strings=yes
6356                 else
6357                         eval with_big_strings=no
6358                 fi
6359                 ;;
6360         esac
6361
6362 fi;
6363 echo "$as_me:6363: result: $with_big_strings" >&5
6364 echo "${ECHO_T}$with_big_strings" >&6
6365
6366 USE_BIG_STRINGS=0
6367 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6368
6369 ###     use option --enable-termcap to compile in the termcap fallback support
6370 echo "$as_me:6370: checking if you want termcap-fallback support" >&5
6371 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6372
6373 # Check whether --enable-termcap or --disable-termcap was given.
6374 if test "${enable_termcap+set}" = set; then
6375   enableval="$enable_termcap"
6376   with_termcap=$enableval
6377 else
6378   with_termcap=no
6379 fi;
6380 echo "$as_me:6380: result: $with_termcap" >&5
6381 echo "${ECHO_T}$with_termcap" >&6
6382
6383 if test "$with_termcap" != "yes" ; then
6384         if test "$use_database" = no ; then
6385                 if test -z "$with_fallback" ; then
6386                         { { echo "$as_me:6386: error: You have disabled the database w/o specifying fallbacks" >&5
6387 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6388    { (exit 1); exit 1; }; }
6389                 fi
6390         fi
6391         cat >>confdefs.h <<\EOF
6392 #define PURE_TERMINFO 1
6393 EOF
6394
6395 else
6396
6397 if test "$with_ticlib" != no ; then
6398         { { echo "$as_me:6398: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6399 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6400    { (exit 1); exit 1; }; }
6401 fi
6402
6403 cat >>confdefs.h <<\EOF
6404 #define USE_TERMCAP 1
6405 EOF
6406
6407 echo "$as_me:6407: checking for list of termcap files" >&5
6408 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6409
6410 # Check whether --with-termpath or --without-termpath was given.
6411 if test "${with_termpath+set}" = set; then
6412   withval="$with_termpath"
6413
6414 else
6415   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6416 fi;
6417 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6418 cf_dst_path=
6419 for cf_src_path in $withval
6420 do
6421
6422 if test "x$prefix" != xNONE; then
6423   cf_path_syntax="$prefix"
6424 else
6425   cf_path_syntax="$ac_default_prefix"
6426 fi
6427
6428 case ".$cf_src_path" in #(vi
6429 .\$\(*\)*|.\'*\'*) #(vi
6430   ;;
6431 ..|./*|.\\*) #(vi
6432   ;;
6433 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6434   ;;
6435 .\${*prefix}*) #(vi
6436   eval cf_src_path="$cf_src_path"
6437   case ".$cf_src_path" in #(vi
6438   .NONE/*)
6439     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6440     ;;
6441   esac
6442   ;; #(vi
6443 .no|.NONE/*)
6444   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6445   ;;
6446 *)
6447   { { echo "$as_me:6447: error: expected a pathname, not \"$cf_src_path\"" >&5
6448 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6449    { (exit 1); exit 1; }; }
6450   ;;
6451 esac
6452
6453   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6454   cf_dst_path="${cf_dst_path}${cf_src_path}"
6455 done
6456 IFS="$ac_save_ifs"
6457
6458 eval 'TERMPATH="$cf_dst_path"'
6459
6460 echo "$as_me:6460: result: $TERMPATH" >&5
6461 echo "${ECHO_T}$TERMPATH" >&6
6462 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6463 #define TERMPATH "$TERMPATH"
6464 EOF
6465
6466 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6467 echo "$as_me:6467: checking if fast termcap-loader is needed" >&5
6468 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6469
6470 # Check whether --enable-getcap or --disable-getcap was given.
6471 if test "${enable_getcap+set}" = set; then
6472   enableval="$enable_getcap"
6473   with_getcap=$enableval
6474 else
6475   with_getcap=no
6476 fi;
6477 echo "$as_me:6477: result: $with_getcap" >&5
6478 echo "${ECHO_T}$with_getcap" >&6
6479 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6480 #define USE_GETCAP 1
6481 EOF
6482
6483 echo "$as_me:6483: checking if translated termcaps will be cached in ~/.terminfo" >&5
6484 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6485
6486 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6487 if test "${enable_getcap_cache+set}" = set; then
6488   enableval="$enable_getcap_cache"
6489   with_getcap_cache=$enableval
6490 else
6491   with_getcap_cache=no
6492 fi;
6493 echo "$as_me:6493: result: $with_getcap_cache" >&5
6494 echo "${ECHO_T}$with_getcap_cache" >&6
6495 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6496 #define USE_GETCAP_CACHE 1
6497 EOF
6498
6499 fi
6500
6501 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6502 echo "$as_me:6502: checking if ~/.terminfo is wanted" >&5
6503 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6504
6505 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6506 if test "${enable_home_terminfo+set}" = set; then
6507   enableval="$enable_home_terminfo"
6508   with_home_terminfo=$enableval
6509 else
6510   with_home_terminfo=yes
6511 fi;
6512 echo "$as_me:6512: result: $with_home_terminfo" >&5
6513 echo "${ECHO_T}$with_home_terminfo" >&6
6514 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6515 #define USE_HOME_TERMINFO 1
6516 EOF
6517
6518 echo "$as_me:6518: checking if you want to use restricted environment when running as root" >&5
6519 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6520
6521 # Check whether --enable-root-environ or --disable-root-environ was given.
6522 if test "${enable_root_environ+set}" = set; then
6523   enableval="$enable_root_environ"
6524   with_root_environ=$enableval
6525 else
6526   with_root_environ=yes
6527 fi;
6528 echo "$as_me:6528: result: $with_root_environ" >&5
6529 echo "${ECHO_T}$with_root_environ" >&6
6530 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6531 #define USE_ROOT_ENVIRON 1
6532 EOF
6533
6534 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6535 ###   to reduce storage requirements for the terminfo database.
6536
6537 for ac_func in \
6538         remove \
6539         unlink
6540 do
6541 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6542 echo "$as_me:6542: checking for $ac_func" >&5
6543 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6544 if eval "test \"\${$as_ac_var+set}\" = set"; then
6545   echo $ECHO_N "(cached) $ECHO_C" >&6
6546 else
6547   cat >conftest.$ac_ext <<_ACEOF
6548 #line 6548 "configure"
6549 #include "confdefs.h"
6550 /* System header to define __stub macros and hopefully few prototypes,
6551     which can conflict with char $ac_func (); below.  */
6552 #include <assert.h>
6553 /* Override any gcc2 internal prototype to avoid an error.  */
6554 #ifdef __cplusplus
6555 extern "C"
6556 #endif
6557 /* We use char because int might match the return type of a gcc2
6558    builtin and then its argument prototype would still apply.  */
6559 char $ac_func ();
6560 char (*f) ();
6561
6562 int
6563 main ()
6564 {
6565 /* The GNU C library defines this for functions which it implements
6566     to always fail with ENOSYS.  Some functions are actually named
6567     something starting with __ and the normal name is an alias.  */
6568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6569 choke me
6570 #else
6571 f = $ac_func;
6572 #endif
6573
6574   ;
6575   return 0;
6576 }
6577 _ACEOF
6578 rm -f conftest.$ac_objext conftest$ac_exeext
6579 if { (eval echo "$as_me:6579: \"$ac_link\"") >&5
6580   (eval $ac_link) 2>&5
6581   ac_status=$?
6582   echo "$as_me:6582: \$? = $ac_status" >&5
6583   (exit $ac_status); } &&
6584          { ac_try='test -s conftest$ac_exeext'
6585   { (eval echo "$as_me:6585: \"$ac_try\"") >&5
6586   (eval $ac_try) 2>&5
6587   ac_status=$?
6588   echo "$as_me:6588: \$? = $ac_status" >&5
6589   (exit $ac_status); }; }; then
6590   eval "$as_ac_var=yes"
6591 else
6592   echo "$as_me: failed program was:" >&5
6593 cat conftest.$ac_ext >&5
6594 eval "$as_ac_var=no"
6595 fi
6596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6597 fi
6598 echo "$as_me:6598: result: `eval echo '${'$as_ac_var'}'`" >&5
6599 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6600 if test `eval echo '${'$as_ac_var'}'` = yes; then
6601   cat >>confdefs.h <<EOF
6602 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6603 EOF
6604
6605 fi
6606 done
6607
6608 if test "$cross_compiling" = yes ; then
6609
6610 for ac_func in \
6611                 link \
6612                 symlink
6613 do
6614 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6615 echo "$as_me:6615: checking for $ac_func" >&5
6616 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6617 if eval "test \"\${$as_ac_var+set}\" = set"; then
6618   echo $ECHO_N "(cached) $ECHO_C" >&6
6619 else
6620   cat >conftest.$ac_ext <<_ACEOF
6621 #line 6621 "configure"
6622 #include "confdefs.h"
6623 /* System header to define __stub macros and hopefully few prototypes,
6624     which can conflict with char $ac_func (); below.  */
6625 #include <assert.h>
6626 /* Override any gcc2 internal prototype to avoid an error.  */
6627 #ifdef __cplusplus
6628 extern "C"
6629 #endif
6630 /* We use char because int might match the return type of a gcc2
6631    builtin and then its argument prototype would still apply.  */
6632 char $ac_func ();
6633 char (*f) ();
6634
6635 int
6636 main ()
6637 {
6638 /* The GNU C library defines this for functions which it implements
6639     to always fail with ENOSYS.  Some functions are actually named
6640     something starting with __ and the normal name is an alias.  */
6641 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6642 choke me
6643 #else
6644 f = $ac_func;
6645 #endif
6646
6647   ;
6648   return 0;
6649 }
6650 _ACEOF
6651 rm -f conftest.$ac_objext conftest$ac_exeext
6652 if { (eval echo "$as_me:6652: \"$ac_link\"") >&5
6653   (eval $ac_link) 2>&5
6654   ac_status=$?
6655   echo "$as_me:6655: \$? = $ac_status" >&5
6656   (exit $ac_status); } &&
6657          { ac_try='test -s conftest$ac_exeext'
6658   { (eval echo "$as_me:6658: \"$ac_try\"") >&5
6659   (eval $ac_try) 2>&5
6660   ac_status=$?
6661   echo "$as_me:6661: \$? = $ac_status" >&5
6662   (exit $ac_status); }; }; then
6663   eval "$as_ac_var=yes"
6664 else
6665   echo "$as_me: failed program was:" >&5
6666 cat conftest.$ac_ext >&5
6667 eval "$as_ac_var=no"
6668 fi
6669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6670 fi
6671 echo "$as_me:6671: result: `eval echo '${'$as_ac_var'}'`" >&5
6672 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6673 if test `eval echo '${'$as_ac_var'}'` = yes; then
6674   cat >>confdefs.h <<EOF
6675 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6676 EOF
6677
6678 fi
6679 done
6680
6681 else
6682         echo "$as_me:6682: checking if link/symlink functions work" >&5
6683 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6684 if test "${cf_cv_link_funcs+set}" = set; then
6685   echo $ECHO_N "(cached) $ECHO_C" >&6
6686 else
6687
6688                 cf_cv_link_funcs=
6689                 for cf_func in link symlink ; do
6690                         if test "$cross_compiling" = yes; then
6691
6692                         eval 'ac_cv_func_'$cf_func'=error'
6693 else
6694   cat >conftest.$ac_ext <<_ACEOF
6695 #line 6695 "configure"
6696 #include "confdefs.h"
6697
6698 #include <sys/types.h>
6699 #include <sys/stat.h>
6700 #ifdef HAVE_UNISTD_H
6701 #include <unistd.h>
6702 #endif
6703 int main()
6704 {
6705         int fail = 0;
6706         char *src = "config.log";
6707         char *dst = "conftest.chk";
6708         struct stat src_sb;
6709         struct stat dst_sb;
6710
6711         stat(src, &src_sb);
6712         fail = ($cf_func("config.log", "conftest.chk") < 0)
6713             || (stat(dst, &dst_sb) < 0)
6714             || (dst_sb.st_mtime != src_sb.st_mtime);
6715 #ifdef HAVE_UNLINK
6716         unlink(dst);
6717 #else
6718         remove(dst);
6719 #endif
6720         ${cf_cv_main_return:-return} (fail);
6721 }
6722
6723 _ACEOF
6724 rm -f conftest$ac_exeext
6725 if { (eval echo "$as_me:6725: \"$ac_link\"") >&5
6726   (eval $ac_link) 2>&5
6727   ac_status=$?
6728   echo "$as_me:6728: \$? = $ac_status" >&5
6729   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6730   { (eval echo "$as_me:6730: \"$ac_try\"") >&5
6731   (eval $ac_try) 2>&5
6732   ac_status=$?
6733   echo "$as_me:6733: \$? = $ac_status" >&5
6734   (exit $ac_status); }; }; then
6735
6736                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6737                         eval 'ac_cv_func_'$cf_func'=yes'
6738 else
6739   echo "$as_me: program exited with status $ac_status" >&5
6740 echo "$as_me: failed program was:" >&5
6741 cat conftest.$ac_ext >&5
6742
6743                         eval 'ac_cv_func_'$cf_func'=no'
6744 fi
6745 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6746 fi
6747                 done
6748                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6749
6750 fi
6751 echo "$as_me:6751: result: $cf_cv_link_funcs" >&5
6752 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6753         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6754 #define HAVE_LINK 1
6755 EOF
6756
6757         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6758 #define HAVE_SYMLINK 1
6759 EOF
6760
6761 fi
6762
6763 with_links=no
6764 with_symlinks=no
6765
6766 # soft links (symbolic links) are useful for some systems where hard links do
6767 # not work, or to make it simpler to copy terminfo trees around.
6768 if test "$ac_cv_func_symlink" = yes ; then
6769     echo "$as_me:6769: checking if tic should use symbolic links" >&5
6770 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6771
6772 # Check whether --enable-symlinks or --disable-symlinks was given.
6773 if test "${enable_symlinks+set}" = set; then
6774   enableval="$enable_symlinks"
6775   with_symlinks=$enableval
6776 else
6777   with_symlinks=no
6778 fi;
6779     echo "$as_me:6779: result: $with_symlinks" >&5
6780 echo "${ECHO_T}$with_symlinks" >&6
6781 fi
6782
6783 # If we have hard links and did not choose to use soft links instead, there is
6784 # no reason to make this choice optional - use the hard links.
6785 if test "$with_symlinks" = no ; then
6786     echo "$as_me:6786: checking if tic should use hard links" >&5
6787 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6788     if test "$ac_cv_func_link" = yes ; then
6789         with_links=yes
6790     else
6791         with_links=no
6792     fi
6793     echo "$as_me:6793: result: $with_links" >&5
6794 echo "${ECHO_T}$with_links" >&6
6795 fi
6796
6797 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6798 #define USE_LINKS 1
6799 EOF
6800
6801 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6802 #define USE_SYMLINKS 1
6803 EOF
6804
6805 ###   use option --enable-broken-linker to force on use of broken-linker support
6806 echo "$as_me:6806: checking if you want broken-linker support code" >&5
6807 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6808
6809 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6810 if test "${enable_broken_linker+set}" = set; then
6811   enableval="$enable_broken_linker"
6812   with_broken_linker=$enableval
6813 else
6814   with_broken_linker=${BROKEN_LINKER-no}
6815 fi;
6816 echo "$as_me:6816: result: $with_broken_linker" >&5
6817 echo "${ECHO_T}$with_broken_linker" >&6
6818
6819 BROKEN_LINKER=0
6820 if test "$with_broken_linker" = yes ; then
6821         cat >>confdefs.h <<\EOF
6822 #define BROKEN_LINKER 1
6823 EOF
6824
6825         BROKEN_LINKER=1
6826 elif test "$DFT_LWR_MODEL" = shared ; then
6827         case $cf_cv_system_name in #(vi
6828         cygwin*)
6829                 cat >>confdefs.h <<\EOF
6830 #define BROKEN_LINKER 1
6831 EOF
6832
6833                 BROKEN_LINKER=1
6834                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6835
6836 echo "${as_me-configure}:6836: testing cygwin linker is broken anyway ..." 1>&5
6837
6838                 ;;
6839         esac
6840 fi
6841
6842 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6843 echo "$as_me:6843: checking if tputs should process BSD-style prefix padding" >&5
6844 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6845
6846 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6847 if test "${enable_bsdpad+set}" = set; then
6848   enableval="$enable_bsdpad"
6849   with_bsdpad=$enableval
6850 else
6851   with_bsdpad=no
6852 fi;
6853 echo "$as_me:6853: result: $with_bsdpad" >&5
6854 echo "${ECHO_T}$with_bsdpad" >&6
6855 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6856 #define BSD_TPUTS 1
6857 EOF
6858
6859 ###   use option --enable-widec to turn on use of wide-character support
6860 NCURSES_CH_T=chtype
6861 NCURSES_LIBUTF8=0
6862
6863 NEED_WCHAR_H=0
6864 NCURSES_MBSTATE_T=0
6865 NCURSES_WCHAR_T=0
6866 NCURSES_WINT_T=0
6867
6868 # Check to define _XOPEN_SOURCE "automatically"
6869
6870 cf_XOPEN_SOURCE=500
6871 cf_POSIX_C_SOURCE=199506L
6872 cf_xopen_source=
6873
6874 case $host_os in #(vi
6875 aix[456]*) #(vi
6876         cf_xopen_source="-D_ALL_SOURCE"
6877         ;;
6878 darwin[0-8].*) #(vi
6879         cf_xopen_source="-D_APPLE_C_SOURCE"
6880         ;;
6881 darwin*) #(vi
6882         cf_xopen_source="-D_DARWIN_C_SOURCE"
6883         ;;
6884 freebsd*|dragonfly*) #(vi
6885         # 5.x headers associate
6886         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6887         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6888         cf_POSIX_C_SOURCE=200112L
6889         cf_XOPEN_SOURCE=600
6890         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6891         ;;
6892 hpux11*) #(vi
6893         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6894         ;;
6895 hpux*) #(vi
6896         cf_xopen_source="-D_HPUX_SOURCE"
6897         ;;
6898 irix[56].*) #(vi
6899         cf_xopen_source="-D_SGI_SOURCE"
6900         ;;
6901 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6902
6903 echo "$as_me:6903: checking if we must define _GNU_SOURCE" >&5
6904 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6905 if test "${cf_cv_gnu_source+set}" = set; then
6906   echo $ECHO_N "(cached) $ECHO_C" >&6
6907 else
6908
6909 cat >conftest.$ac_ext <<_ACEOF
6910 #line 6910 "configure"
6911 #include "confdefs.h"
6912 #include <sys/types.h>
6913 int
6914 main ()
6915 {
6916
6917 #ifndef _XOPEN_SOURCE
6918 make an error
6919 #endif
6920   ;
6921   return 0;
6922 }
6923 _ACEOF
6924 rm -f conftest.$ac_objext
6925 if { (eval echo "$as_me:6925: \"$ac_compile\"") >&5
6926   (eval $ac_compile) 2>&5
6927   ac_status=$?
6928   echo "$as_me:6928: \$? = $ac_status" >&5
6929   (exit $ac_status); } &&
6930          { ac_try='test -s conftest.$ac_objext'
6931   { (eval echo "$as_me:6931: \"$ac_try\"") >&5
6932   (eval $ac_try) 2>&5
6933   ac_status=$?
6934   echo "$as_me:6934: \$? = $ac_status" >&5
6935   (exit $ac_status); }; }; then
6936   cf_cv_gnu_source=no
6937 else
6938   echo "$as_me: failed program was:" >&5
6939 cat conftest.$ac_ext >&5
6940 cf_save="$CPPFLAGS"
6941          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6942          cat >conftest.$ac_ext <<_ACEOF
6943 #line 6943 "configure"
6944 #include "confdefs.h"
6945 #include <sys/types.h>
6946 int
6947 main ()
6948 {
6949
6950 #ifdef _XOPEN_SOURCE
6951 make an error
6952 #endif
6953   ;
6954   return 0;
6955 }
6956 _ACEOF
6957 rm -f conftest.$ac_objext
6958 if { (eval echo "$as_me:6958: \"$ac_compile\"") >&5
6959   (eval $ac_compile) 2>&5
6960   ac_status=$?
6961   echo "$as_me:6961: \$? = $ac_status" >&5
6962   (exit $ac_status); } &&
6963          { ac_try='test -s conftest.$ac_objext'
6964   { (eval echo "$as_me:6964: \"$ac_try\"") >&5
6965   (eval $ac_try) 2>&5
6966   ac_status=$?
6967   echo "$as_me:6967: \$? = $ac_status" >&5
6968   (exit $ac_status); }; }; then
6969   cf_cv_gnu_source=no
6970 else
6971   echo "$as_me: failed program was:" >&5
6972 cat conftest.$ac_ext >&5
6973 cf_cv_gnu_source=yes
6974 fi
6975 rm -f conftest.$ac_objext conftest.$ac_ext
6976         CPPFLAGS="$cf_save"
6977
6978 fi
6979 rm -f conftest.$ac_objext conftest.$ac_ext
6980
6981 fi
6982 echo "$as_me:6982: result: $cf_cv_gnu_source" >&5
6983 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6984 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6985
6986         ;;
6987 mirbsd*) #(vi
6988         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6989         ;;
6990 netbsd*) #(vi
6991         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6992         ;;
6993 openbsd*) #(vi
6994         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6995         ;;
6996 osf[45]*) #(vi
6997         cf_xopen_source="-D_OSF_SOURCE"
6998         ;;
6999 nto-qnx*) #(vi
7000         cf_xopen_source="-D_QNX_SOURCE"
7001         ;;
7002 sco*) #(vi
7003         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7004         ;;
7005 solaris2.1[0-9]) #(vi
7006         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7007         ;;
7008 solaris2.[1-9]) #(vi
7009         cf_xopen_source="-D__EXTENSIONS__"
7010         ;;
7011 *)
7012         echo "$as_me:7012: checking if we should define _XOPEN_SOURCE" >&5
7013 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7014 if test "${cf_cv_xopen_source+set}" = set; then
7015   echo $ECHO_N "(cached) $ECHO_C" >&6
7016 else
7017
7018         cat >conftest.$ac_ext <<_ACEOF
7019 #line 7019 "configure"
7020 #include "confdefs.h"
7021 #include <sys/types.h>
7022 int
7023 main ()
7024 {
7025
7026 #ifndef _XOPEN_SOURCE
7027 make an error
7028 #endif
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext
7034 if { (eval echo "$as_me:7034: \"$ac_compile\"") >&5
7035   (eval $ac_compile) 2>&5
7036   ac_status=$?
7037   echo "$as_me:7037: \$? = $ac_status" >&5
7038   (exit $ac_status); } &&
7039          { ac_try='test -s conftest.$ac_objext'
7040   { (eval echo "$as_me:7040: \"$ac_try\"") >&5
7041   (eval $ac_try) 2>&5
7042   ac_status=$?
7043   echo "$as_me:7043: \$? = $ac_status" >&5
7044   (exit $ac_status); }; }; then
7045   cf_cv_xopen_source=no
7046 else
7047   echo "$as_me: failed program was:" >&5
7048 cat conftest.$ac_ext >&5
7049 cf_save="$CPPFLAGS"
7050          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7051          cat >conftest.$ac_ext <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054 #include <sys/types.h>
7055 int
7056 main ()
7057 {
7058
7059 #ifdef _XOPEN_SOURCE
7060 make an error
7061 #endif
7062   ;
7063   return 0;
7064 }
7065 _ACEOF
7066 rm -f conftest.$ac_objext
7067 if { (eval echo "$as_me:7067: \"$ac_compile\"") >&5
7068   (eval $ac_compile) 2>&5
7069   ac_status=$?
7070   echo "$as_me:7070: \$? = $ac_status" >&5
7071   (exit $ac_status); } &&
7072          { ac_try='test -s conftest.$ac_objext'
7073   { (eval echo "$as_me:7073: \"$ac_try\"") >&5
7074   (eval $ac_try) 2>&5
7075   ac_status=$?
7076   echo "$as_me:7076: \$? = $ac_status" >&5
7077   (exit $ac_status); }; }; then
7078   cf_cv_xopen_source=no
7079 else
7080   echo "$as_me: failed program was:" >&5
7081 cat conftest.$ac_ext >&5
7082 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7083 fi
7084 rm -f conftest.$ac_objext conftest.$ac_ext
7085         CPPFLAGS="$cf_save"
7086
7087 fi
7088 rm -f conftest.$ac_objext conftest.$ac_ext
7089
7090 fi
7091 echo "$as_me:7091: result: $cf_cv_xopen_source" >&5
7092 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7093         if test "$cf_cv_xopen_source" != no ; then
7094
7095 CFLAGS=`echo "$CFLAGS" | \
7096         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7097                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7098
7099 CPPFLAGS=`echo "$CPPFLAGS" | \
7100         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7101                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7102
7103                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7104
7105 cf_fix_cppflags=no
7106 cf_new_cflags=
7107 cf_new_cppflags=
7108 cf_new_extra_cppflags=
7109
7110 for cf_add_cflags in $cf_temp_xopen_source
7111 do
7112 case $cf_fix_cppflags in
7113 no)
7114         case $cf_add_cflags in #(vi
7115         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7116                 case $cf_add_cflags in
7117                 -D*)
7118                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7119
7120                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7121                                 && test -z "${cf_tst_cflags}" \
7122                                 && cf_fix_cppflags=yes
7123
7124                         if test $cf_fix_cppflags = yes ; then
7125                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7126                                 continue
7127                         elif test "${cf_tst_cflags}" = "\"'" ; then
7128                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7129                                 continue
7130                         fi
7131                         ;;
7132                 esac
7133                 case "$CPPFLAGS" in
7134                 *$cf_add_cflags) #(vi
7135                         ;;
7136                 *) #(vi
7137                         case $cf_add_cflags in #(vi
7138                         -D*)
7139                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7140
7141 CPPFLAGS=`echo "$CPPFLAGS" | \
7142         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7143                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7144
7145                                 ;;
7146                         esac
7147                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7148                         ;;
7149                 esac
7150                 ;;
7151         *)
7152                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7153                 ;;
7154         esac
7155         ;;
7156 yes)
7157         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7158
7159         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7160
7161         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7162                 && test -z "${cf_tst_cflags}" \
7163                 && cf_fix_cppflags=no
7164         ;;
7165 esac
7166 done
7167
7168 if test -n "$cf_new_cflags" ; then
7169
7170         CFLAGS="$CFLAGS $cf_new_cflags"
7171 fi
7172
7173 if test -n "$cf_new_cppflags" ; then
7174
7175         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7176 fi
7177
7178 if test -n "$cf_new_extra_cppflags" ; then
7179
7180         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7181 fi
7182
7183         fi
7184
7185 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7186
7187 cf_save_CFLAGS="$CFLAGS"
7188 cf_save_CPPFLAGS="$CPPFLAGS"
7189
7190 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7191         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7192                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7193
7194 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7195         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7196                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7197
7198 echo "$as_me:7198: checking if we should define _POSIX_C_SOURCE" >&5
7199 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7200 if test "${cf_cv_posix_c_source+set}" = set; then
7201   echo $ECHO_N "(cached) $ECHO_C" >&6
7202 else
7203
7204 echo "${as_me-configure}:7204: testing if the symbol is already defined go no further ..." 1>&5
7205
7206         cat >conftest.$ac_ext <<_ACEOF
7207 #line 7207 "configure"
7208 #include "confdefs.h"
7209 #include <sys/types.h>
7210 int
7211 main ()
7212 {
7213
7214 #ifndef _POSIX_C_SOURCE
7215 make an error
7216 #endif
7217   ;
7218   return 0;
7219 }
7220 _ACEOF
7221 rm -f conftest.$ac_objext
7222 if { (eval echo "$as_me:7222: \"$ac_compile\"") >&5
7223   (eval $ac_compile) 2>&5
7224   ac_status=$?
7225   echo "$as_me:7225: \$? = $ac_status" >&5
7226   (exit $ac_status); } &&
7227          { ac_try='test -s conftest.$ac_objext'
7228   { (eval echo "$as_me:7228: \"$ac_try\"") >&5
7229   (eval $ac_try) 2>&5
7230   ac_status=$?
7231   echo "$as_me:7231: \$? = $ac_status" >&5
7232   (exit $ac_status); }; }; then
7233   cf_cv_posix_c_source=no
7234 else
7235   echo "$as_me: failed program was:" >&5
7236 cat conftest.$ac_ext >&5
7237 cf_want_posix_source=no
7238          case .$cf_POSIX_C_SOURCE in #(vi
7239          .[12]??*) #(vi
7240                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7241                 ;;
7242          .2) #(vi
7243                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7244                 cf_want_posix_source=yes
7245                 ;;
7246          .*)
7247                 cf_want_posix_source=yes
7248                 ;;
7249          esac
7250          if test "$cf_want_posix_source" = yes ; then
7251                 cat >conftest.$ac_ext <<_ACEOF
7252 #line 7252 "configure"
7253 #include "confdefs.h"
7254 #include <sys/types.h>
7255 int
7256 main ()
7257 {
7258
7259 #ifdef _POSIX_SOURCE
7260 make an error
7261 #endif
7262   ;
7263   return 0;
7264 }
7265 _ACEOF
7266 rm -f conftest.$ac_objext
7267 if { (eval echo "$as_me:7267: \"$ac_compile\"") >&5
7268   (eval $ac_compile) 2>&5
7269   ac_status=$?
7270   echo "$as_me:7270: \$? = $ac_status" >&5
7271   (exit $ac_status); } &&
7272          { ac_try='test -s conftest.$ac_objext'
7273   { (eval echo "$as_me:7273: \"$ac_try\"") >&5
7274   (eval $ac_try) 2>&5
7275   ac_status=$?
7276   echo "$as_me:7276: \$? = $ac_status" >&5
7277   (exit $ac_status); }; }; then
7278   :
7279 else
7280   echo "$as_me: failed program was:" >&5
7281 cat conftest.$ac_ext >&5
7282 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7283 fi
7284 rm -f conftest.$ac_objext conftest.$ac_ext
7285          fi
7286
7287 echo "${as_me-configure}:7287: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7288
7289          CFLAGS="$cf_trim_CFLAGS"
7290          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7291
7292 echo "${as_me-configure}:7292: testing if the second compile does not leave our definition intact error ..." 1>&5
7293
7294          cat >conftest.$ac_ext <<_ACEOF
7295 #line 7295 "configure"
7296 #include "confdefs.h"
7297 #include <sys/types.h>
7298 int
7299 main ()
7300 {
7301
7302 #ifndef _POSIX_C_SOURCE
7303 make an error
7304 #endif
7305   ;
7306   return 0;
7307 }
7308 _ACEOF
7309 rm -f conftest.$ac_objext
7310 if { (eval echo "$as_me:7310: \"$ac_compile\"") >&5
7311   (eval $ac_compile) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); } &&
7315          { ac_try='test -s conftest.$ac_objext'
7316   { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7317   (eval $ac_try) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); }; }; then
7321   :
7322 else
7323   echo "$as_me: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 cf_cv_posix_c_source=no
7326 fi
7327 rm -f conftest.$ac_objext conftest.$ac_ext
7328          CFLAGS="$cf_save_CFLAGS"
7329          CPPFLAGS="$cf_save_CPPFLAGS"
7330
7331 fi
7332 rm -f conftest.$ac_objext conftest.$ac_ext
7333
7334 fi
7335 echo "$as_me:7335: result: $cf_cv_posix_c_source" >&5
7336 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7337
7338 if test "$cf_cv_posix_c_source" != no ; then
7339         CFLAGS="$cf_trim_CFLAGS"
7340         CPPFLAGS="$cf_trim_CPPFLAGS"
7341
7342 cf_fix_cppflags=no
7343 cf_new_cflags=
7344 cf_new_cppflags=
7345 cf_new_extra_cppflags=
7346
7347 for cf_add_cflags in $cf_cv_posix_c_source
7348 do
7349 case $cf_fix_cppflags in
7350 no)
7351         case $cf_add_cflags in #(vi
7352         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7353                 case $cf_add_cflags in
7354                 -D*)
7355                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7356
7357                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7358                                 && test -z "${cf_tst_cflags}" \
7359                                 && cf_fix_cppflags=yes
7360
7361                         if test $cf_fix_cppflags = yes ; then
7362                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7363                                 continue
7364                         elif test "${cf_tst_cflags}" = "\"'" ; then
7365                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7366                                 continue
7367                         fi
7368                         ;;
7369                 esac
7370                 case "$CPPFLAGS" in
7371                 *$cf_add_cflags) #(vi
7372                         ;;
7373                 *) #(vi
7374                         case $cf_add_cflags in #(vi
7375                         -D*)
7376                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7377
7378 CPPFLAGS=`echo "$CPPFLAGS" | \
7379         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7380                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7381
7382                                 ;;
7383                         esac
7384                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7385                         ;;
7386                 esac
7387                 ;;
7388         *)
7389                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7390                 ;;
7391         esac
7392         ;;
7393 yes)
7394         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7395
7396         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7397
7398         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7399                 && test -z "${cf_tst_cflags}" \
7400                 && cf_fix_cppflags=no
7401         ;;
7402 esac
7403 done
7404
7405 if test -n "$cf_new_cflags" ; then
7406
7407         CFLAGS="$CFLAGS $cf_new_cflags"
7408 fi
7409
7410 if test -n "$cf_new_cppflags" ; then
7411
7412         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7413 fi
7414
7415 if test -n "$cf_new_extra_cppflags" ; then
7416
7417         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7418 fi
7419
7420 fi
7421
7422         ;;
7423 esac
7424
7425 if test -n "$cf_xopen_source" ; then
7426
7427 cf_fix_cppflags=no
7428 cf_new_cflags=
7429 cf_new_cppflags=
7430 cf_new_extra_cppflags=
7431
7432 for cf_add_cflags in $cf_xopen_source
7433 do
7434 case $cf_fix_cppflags in
7435 no)
7436         case $cf_add_cflags in #(vi
7437         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7438                 case $cf_add_cflags in
7439                 -D*)
7440                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7441
7442                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7443                                 && test -z "${cf_tst_cflags}" \
7444                                 && cf_fix_cppflags=yes
7445
7446                         if test $cf_fix_cppflags = yes ; then
7447                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7448                                 continue
7449                         elif test "${cf_tst_cflags}" = "\"'" ; then
7450                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7451                                 continue
7452                         fi
7453                         ;;
7454                 esac
7455                 case "$CPPFLAGS" in
7456                 *$cf_add_cflags) #(vi
7457                         ;;
7458                 *) #(vi
7459                         case $cf_add_cflags in #(vi
7460                         -D*)
7461                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7462
7463 CPPFLAGS=`echo "$CPPFLAGS" | \
7464         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7465                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7466
7467                                 ;;
7468                         esac
7469                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7470                         ;;
7471                 esac
7472                 ;;
7473         *)
7474                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7475                 ;;
7476         esac
7477         ;;
7478 yes)
7479         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7480
7481         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7482
7483         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7484                 && test -z "${cf_tst_cflags}" \
7485                 && cf_fix_cppflags=no
7486         ;;
7487 esac
7488 done
7489
7490 if test -n "$cf_new_cflags" ; then
7491
7492         CFLAGS="$CFLAGS $cf_new_cflags"
7493 fi
7494
7495 if test -n "$cf_new_cppflags" ; then
7496
7497         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7498 fi
7499
7500 if test -n "$cf_new_extra_cppflags" ; then
7501
7502         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7503 fi
7504
7505 fi
7506
7507 # Work around breakage on OS X
7508
7509 echo "$as_me:7509: checking if SIGWINCH is defined" >&5
7510 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7511 if test "${cf_cv_define_sigwinch+set}" = set; then
7512   echo $ECHO_N "(cached) $ECHO_C" >&6
7513 else
7514
7515         cat >conftest.$ac_ext <<_ACEOF
7516 #line 7516 "configure"
7517 #include "confdefs.h"
7518
7519 #include <sys/types.h>
7520 #include <sys/signal.h>
7521
7522 int
7523 main ()
7524 {
7525 int x = SIGWINCH
7526   ;
7527   return 0;
7528 }
7529 _ACEOF
7530 rm -f conftest.$ac_objext
7531 if { (eval echo "$as_me:7531: \"$ac_compile\"") >&5
7532   (eval $ac_compile) 2>&5
7533   ac_status=$?
7534   echo "$as_me:7534: \$? = $ac_status" >&5
7535   (exit $ac_status); } &&
7536          { ac_try='test -s conftest.$ac_objext'
7537   { (eval echo "$as_me:7537: \"$ac_try\"") >&5
7538   (eval $ac_try) 2>&5
7539   ac_status=$?
7540   echo "$as_me:7540: \$? = $ac_status" >&5
7541   (exit $ac_status); }; }; then
7542   cf_cv_define_sigwinch=yes
7543 else
7544   echo "$as_me: failed program was:" >&5
7545 cat conftest.$ac_ext >&5
7546 cat >conftest.$ac_ext <<_ACEOF
7547 #line 7547 "configure"
7548 #include "confdefs.h"
7549
7550 #undef _XOPEN_SOURCE
7551 #undef _POSIX_SOURCE
7552 #undef _POSIX_C_SOURCE
7553 #include <sys/types.h>
7554 #include <sys/signal.h>
7555
7556 int
7557 main ()
7558 {
7559 int x = SIGWINCH
7560   ;
7561   return 0;
7562 }
7563 _ACEOF
7564 rm -f conftest.$ac_objext
7565 if { (eval echo "$as_me:7565: \"$ac_compile\"") >&5
7566   (eval $ac_compile) 2>&5
7567   ac_status=$?
7568   echo "$as_me:7568: \$? = $ac_status" >&5
7569   (exit $ac_status); } &&
7570          { ac_try='test -s conftest.$ac_objext'
7571   { (eval echo "$as_me:7571: \"$ac_try\"") >&5
7572   (eval $ac_try) 2>&5
7573   ac_status=$?
7574   echo "$as_me:7574: \$? = $ac_status" >&5
7575   (exit $ac_status); }; }; then
7576   cf_cv_define_sigwinch=maybe
7577 else
7578   echo "$as_me: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7580 cf_cv_define_sigwinch=no
7581 fi
7582 rm -f conftest.$ac_objext conftest.$ac_ext
7583
7584 fi
7585 rm -f conftest.$ac_objext conftest.$ac_ext
7586
7587 fi
7588 echo "$as_me:7588: result: $cf_cv_define_sigwinch" >&5
7589 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7590
7591 if test "$cf_cv_define_sigwinch" = maybe ; then
7592 echo "$as_me:7592: checking for actual SIGWINCH definition" >&5
7593 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7594 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7595   echo $ECHO_N "(cached) $ECHO_C" >&6
7596 else
7597
7598 cf_cv_fixup_sigwinch=unknown
7599 cf_sigwinch=32
7600 while test $cf_sigwinch != 1
7601 do
7602         cat >conftest.$ac_ext <<_ACEOF
7603 #line 7603 "configure"
7604 #include "confdefs.h"
7605
7606 #undef _XOPEN_SOURCE
7607 #undef _POSIX_SOURCE
7608 #undef _POSIX_C_SOURCE
7609 #include <sys/types.h>
7610 #include <sys/signal.h>
7611
7612 int
7613 main ()
7614 {
7615
7616 #if SIGWINCH != $cf_sigwinch
7617 make an error
7618 #endif
7619 int x = SIGWINCH
7620   ;
7621   return 0;
7622 }
7623 _ACEOF
7624 rm -f conftest.$ac_objext
7625 if { (eval echo "$as_me:7625: \"$ac_compile\"") >&5
7626   (eval $ac_compile) 2>&5
7627   ac_status=$?
7628   echo "$as_me:7628: \$? = $ac_status" >&5
7629   (exit $ac_status); } &&
7630          { ac_try='test -s conftest.$ac_objext'
7631   { (eval echo "$as_me:7631: \"$ac_try\"") >&5
7632   (eval $ac_try) 2>&5
7633   ac_status=$?
7634   echo "$as_me:7634: \$? = $ac_status" >&5
7635   (exit $ac_status); }; }; then
7636   cf_cv_fixup_sigwinch=$cf_sigwinch
7637          break
7638 else
7639   echo "$as_me: failed program was:" >&5
7640 cat conftest.$ac_ext >&5
7641 fi
7642 rm -f conftest.$ac_objext conftest.$ac_ext
7643
7644 cf_sigwinch=`expr $cf_sigwinch - 1`
7645 done
7646
7647 fi
7648 echo "$as_me:7648: result: $cf_cv_fixup_sigwinch" >&5
7649 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7650
7651         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7652                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7653         fi
7654 fi
7655
7656 # Checks for CODESET support.
7657
7658   echo "$as_me:7658: checking for nl_langinfo and CODESET" >&5
7659 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7660 if test "${am_cv_langinfo_codeset+set}" = set; then
7661   echo $ECHO_N "(cached) $ECHO_C" >&6
7662 else
7663   cat >conftest.$ac_ext <<_ACEOF
7664 #line 7664 "configure"
7665 #include "confdefs.h"
7666 #include <langinfo.h>
7667 int
7668 main ()
7669 {
7670 char* cs = nl_langinfo(CODESET);
7671   ;
7672   return 0;
7673 }
7674 _ACEOF
7675 rm -f conftest.$ac_objext conftest$ac_exeext
7676 if { (eval echo "$as_me:7676: \"$ac_link\"") >&5
7677   (eval $ac_link) 2>&5
7678   ac_status=$?
7679   echo "$as_me:7679: \$? = $ac_status" >&5
7680   (exit $ac_status); } &&
7681          { ac_try='test -s conftest$ac_exeext'
7682   { (eval echo "$as_me:7682: \"$ac_try\"") >&5
7683   (eval $ac_try) 2>&5
7684   ac_status=$?
7685   echo "$as_me:7685: \$? = $ac_status" >&5
7686   (exit $ac_status); }; }; then
7687   am_cv_langinfo_codeset=yes
7688 else
7689   echo "$as_me: failed program was:" >&5
7690 cat conftest.$ac_ext >&5
7691 am_cv_langinfo_codeset=no
7692 fi
7693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7694
7695 fi
7696 echo "$as_me:7696: result: $am_cv_langinfo_codeset" >&5
7697 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7698   if test $am_cv_langinfo_codeset = yes; then
7699
7700 cat >>confdefs.h <<\EOF
7701 #define HAVE_LANGINFO_CODESET 1
7702 EOF
7703
7704   fi
7705
7706 # use these variables to work around a defect in gcc's fixincludes.
7707 NCURSES_OK_WCHAR_T=
7708 NCURSES_OK_WINT_T=
7709
7710 echo "$as_me:7710: checking if you want wide-character code" >&5
7711 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7712
7713 # Check whether --enable-widec or --disable-widec was given.
7714 if test "${enable_widec+set}" = set; then
7715   enableval="$enable_widec"
7716   with_widec=$enableval
7717 else
7718   with_widec=no
7719 fi;
7720 echo "$as_me:7720: result: $with_widec" >&5
7721 echo "${ECHO_T}$with_widec" >&6
7722 if test "$with_widec" = yes ; then
7723         LIB_SUFFIX="w${LIB_SUFFIX}"
7724         cat >>confdefs.h <<\EOF
7725 #define USE_WIDEC_SUPPORT 1
7726 EOF
7727
7728         case "$CFLAGS $CPPFLAGS" in #(vi
7729         *-D_XOPEN_SOURCE=500) #(vi
7730                 ;;
7731         *)
7732
7733 echo "$as_me:7733: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7734 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7735 cat >conftest.$ac_ext <<_ACEOF
7736 #line 7736 "configure"
7737 #include "confdefs.h"
7738 #include <sys/types.h>
7739
7740 int
7741 main ()
7742 {
7743
7744 #ifndef _XOPEN_SOURCE_EXTENDED
7745 make an error
7746 #endif
7747   ;
7748   return 0;
7749 }
7750 _ACEOF
7751 rm -f conftest.$ac_objext
7752 if { (eval echo "$as_me:7752: \"$ac_compile\"") >&5
7753   (eval $ac_compile) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit $ac_status); } &&
7757          { ac_try='test -s conftest.$ac_objext'
7758   { (eval echo "$as_me:7758: \"$ac_try\"") >&5
7759   (eval $ac_try) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); }; }; then
7763   cf_result=no
7764 else
7765   echo "$as_me: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767 cf_result=yes
7768 fi
7769 rm -f conftest.$ac_objext conftest.$ac_ext
7770 echo "$as_me:7770: result: $cf_result" >&5
7771 echo "${ECHO_T}$cf_result" >&6
7772
7773 if test "$cf_result" = yes ; then
7774         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7775 elif test "x" != "x" ; then
7776         echo "$as_me:7776: checking checking for compatible value versus " >&5
7777 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7778         cat >conftest.$ac_ext <<_ACEOF
7779 #line 7779 "configure"
7780 #include "confdefs.h"
7781 #include <sys/types.h>
7782
7783 int
7784 main ()
7785 {
7786
7787 #if _XOPEN_SOURCE_EXTENDED- < 0
7788 make an error
7789 #endif
7790   ;
7791   return 0;
7792 }
7793 _ACEOF
7794 rm -f conftest.$ac_objext
7795 if { (eval echo "$as_me:7795: \"$ac_compile\"") >&5
7796   (eval $ac_compile) 2>&5
7797   ac_status=$?
7798   echo "$as_me:7798: \$? = $ac_status" >&5
7799   (exit $ac_status); } &&
7800          { ac_try='test -s conftest.$ac_objext'
7801   { (eval echo "$as_me:7801: \"$ac_try\"") >&5
7802   (eval $ac_try) 2>&5
7803   ac_status=$?
7804   echo "$as_me:7804: \$? = $ac_status" >&5
7805   (exit $ac_status); }; }; then
7806   cf_result=yes
7807 else
7808   echo "$as_me: failed program was:" >&5
7809 cat conftest.$ac_ext >&5
7810 cf_result=no
7811 fi
7812 rm -f conftest.$ac_objext conftest.$ac_ext
7813         echo "$as_me:7813: result: $cf_result" >&5
7814 echo "${ECHO_T}$cf_result" >&6
7815         if test "$cf_result" = no ; then
7816                 # perhaps we can override it - try...
7817                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7818         fi
7819 fi
7820
7821                 ;;
7822         esac
7823
7824         # with_overwrite=no
7825         NCURSES_CH_T=cchar_t
7826
7827 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7828 do
7829 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7830 echo "$as_me:7830: checking for $ac_func" >&5
7831 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7832 if eval "test \"\${$as_ac_var+set}\" = set"; then
7833   echo $ECHO_N "(cached) $ECHO_C" >&6
7834 else
7835   cat >conftest.$ac_ext <<_ACEOF
7836 #line 7836 "configure"
7837 #include "confdefs.h"
7838 /* System header to define __stub macros and hopefully few prototypes,
7839     which can conflict with char $ac_func (); below.  */
7840 #include <assert.h>
7841 /* Override any gcc2 internal prototype to avoid an error.  */
7842 #ifdef __cplusplus
7843 extern "C"
7844 #endif
7845 /* We use char because int might match the return type of a gcc2
7846    builtin and then its argument prototype would still apply.  */
7847 char $ac_func ();
7848 char (*f) ();
7849
7850 int
7851 main ()
7852 {
7853 /* The GNU C library defines this for functions which it implements
7854     to always fail with ENOSYS.  Some functions are actually named
7855     something starting with __ and the normal name is an alias.  */
7856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7857 choke me
7858 #else
7859 f = $ac_func;
7860 #endif
7861
7862   ;
7863   return 0;
7864 }
7865 _ACEOF
7866 rm -f conftest.$ac_objext conftest$ac_exeext
7867 if { (eval echo "$as_me:7867: \"$ac_link\"") >&5
7868   (eval $ac_link) 2>&5
7869   ac_status=$?
7870   echo "$as_me:7870: \$? = $ac_status" >&5
7871   (exit $ac_status); } &&
7872          { ac_try='test -s conftest$ac_exeext'
7873   { (eval echo "$as_me:7873: \"$ac_try\"") >&5
7874   (eval $ac_try) 2>&5
7875   ac_status=$?
7876   echo "$as_me:7876: \$? = $ac_status" >&5
7877   (exit $ac_status); }; }; then
7878   eval "$as_ac_var=yes"
7879 else
7880   echo "$as_me: failed program was:" >&5
7881 cat conftest.$ac_ext >&5
7882 eval "$as_ac_var=no"
7883 fi
7884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7885 fi
7886 echo "$as_me:7886: result: `eval echo '${'$as_ac_var'}'`" >&5
7887 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7888 if test `eval echo '${'$as_ac_var'}'` = yes; then
7889   cat >>confdefs.h <<EOF
7890 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7891 EOF
7892
7893 fi
7894 done
7895
7896         if test "$ac_cv_func_putwc" != yes ; then
7897
7898 echo "$as_me:7898: checking for multibyte character support" >&5
7899 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7900 if test "${cf_cv_utf8_lib+set}" = set; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 else
7903
7904         cf_save_LIBS="$LIBS"
7905         cat >conftest.$ac_ext <<_ACEOF
7906 #line 7906 "configure"
7907 #include "confdefs.h"
7908
7909 #include <stdlib.h>
7910 int
7911 main ()
7912 {
7913 putwc(0,0);
7914   ;
7915   return 0;
7916 }
7917 _ACEOF
7918 rm -f conftest.$ac_objext conftest$ac_exeext
7919 if { (eval echo "$as_me:7919: \"$ac_link\"") >&5
7920   (eval $ac_link) 2>&5
7921   ac_status=$?
7922   echo "$as_me:7922: \$? = $ac_status" >&5
7923   (exit $ac_status); } &&
7924          { ac_try='test -s conftest$ac_exeext'
7925   { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:7928: \$? = $ac_status" >&5
7929   (exit $ac_status); }; }; then
7930   cf_cv_utf8_lib=yes
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934
7935 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7936 # will be set on completion of the AC_TRY_LINK below.
7937 cf_cv_header_path_utf8=
7938 cf_cv_library_path_utf8=
7939
7940 echo "${as_me-configure}:7940: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7941
7942 cf_save_LIBS="$LIBS"
7943
7944 cat >conftest.$ac_ext <<_ACEOF
7945 #line 7945 "configure"
7946 #include "confdefs.h"
7947
7948 #include <libutf8.h>
7949 int
7950 main ()
7951 {
7952 putwc(0,0);
7953   ;
7954   return 0;
7955 }
7956 _ACEOF
7957 rm -f conftest.$ac_objext conftest$ac_exeext
7958 if { (eval echo "$as_me:7958: \"$ac_link\"") >&5
7959   (eval $ac_link) 2>&5
7960   ac_status=$?
7961   echo "$as_me:7961: \$? = $ac_status" >&5
7962   (exit $ac_status); } &&
7963          { ac_try='test -s conftest$ac_exeext'
7964   { (eval echo "$as_me:7964: \"$ac_try\"") >&5
7965   (eval $ac_try) 2>&5
7966   ac_status=$?
7967   echo "$as_me:7967: \$? = $ac_status" >&5
7968   (exit $ac_status); }; }; then
7969
7970         cf_cv_find_linkage_utf8=yes
7971         cf_cv_header_path_utf8=/usr/include
7972         cf_cv_library_path_utf8=/usr/lib
7973
7974 else
7975   echo "$as_me: failed program was:" >&5
7976 cat conftest.$ac_ext >&5
7977
7978 LIBS="-lutf8  $cf_save_LIBS"
7979
7980 cat >conftest.$ac_ext <<_ACEOF
7981 #line 7981 "configure"
7982 #include "confdefs.h"
7983
7984 #include <libutf8.h>
7985 int
7986 main ()
7987 {
7988 putwc(0,0);
7989   ;
7990   return 0;
7991 }
7992 _ACEOF
7993 rm -f conftest.$ac_objext conftest$ac_exeext
7994 if { (eval echo "$as_me:7994: \"$ac_link\"") >&5
7995   (eval $ac_link) 2>&5
7996   ac_status=$?
7997   echo "$as_me:7997: \$? = $ac_status" >&5
7998   (exit $ac_status); } &&
7999          { ac_try='test -s conftest$ac_exeext'
8000   { (eval echo "$as_me:8000: \"$ac_try\"") >&5
8001   (eval $ac_try) 2>&5
8002   ac_status=$?
8003   echo "$as_me:8003: \$? = $ac_status" >&5
8004   (exit $ac_status); }; }; then
8005
8006         cf_cv_find_linkage_utf8=yes
8007         cf_cv_header_path_utf8=/usr/include
8008         cf_cv_library_path_utf8=/usr/lib
8009         cf_cv_library_file_utf8="-lutf8"
8010
8011 else
8012   echo "$as_me: failed program was:" >&5
8013 cat conftest.$ac_ext >&5
8014
8015         cf_cv_find_linkage_utf8=no
8016         LIBS="$cf_save_LIBS"
8017
8018     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8019
8020 echo "${as_me-configure}:8020: testing find linkage for utf8 library ..." 1>&5
8021
8022 echo "${as_me-configure}:8022: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8023
8024     cf_save_CPPFLAGS="$CPPFLAGS"
8025     cf_test_CPPFLAGS="$CPPFLAGS"
8026
8027 cf_search=
8028
8029 # collect the current set of include-directories from compiler flags
8030 cf_header_path_list=""
8031 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8032         for cf_header_path in $CPPFLAGS $CFLAGS
8033         do
8034                 case $cf_header_path in #(vi
8035                 -I*)
8036                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8037
8038 test "$cf_header_path" != "NONE" && \
8039 test -d "$cf_header_path" && \
8040  {
8041         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8042         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8043         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8044         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8045         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8046         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8047 }
8048
8049                         cf_header_path_list="$cf_header_path_list $cf_search"
8050                         ;;
8051                 esac
8052         done
8053 fi
8054
8055 # add the variations for the package we are looking for
8056
8057 cf_search=
8058
8059 test "/usr" != "$prefix" && \
8060 test -d "/usr" && \
8061 (test $prefix = NONE || test "/usr" != "$prefix") && {
8062         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8063         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8064         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8065         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8066         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8067         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8068 }
8069
8070 test "$prefix" != "NONE" && \
8071 test -d "$prefix" && \
8072  {
8073         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8074         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8075         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8076         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8077         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8078         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8079 }
8080
8081 test "/usr/local" != "$prefix" && \
8082 test -d "/usr/local" && \
8083 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8084         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8085         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8086         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8087         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8088         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8089         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8090 }
8091
8092 test "/opt" != "$prefix" && \
8093 test -d "/opt" && \
8094 (test $prefix = NONE || test "/opt" != "$prefix") && {
8095         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8096         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8097         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8098         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8099         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8100         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8101 }
8102
8103 test "$HOME" != "$prefix" && \
8104 test -d "$HOME" && \
8105 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8106         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8107         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8108         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8109         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8110         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8111         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8112 }
8113
8114 test "$includedir" != NONE && \
8115 test "$includedir" != "/usr/include" && \
8116 test -d "$includedir" && {
8117         test -d $includedir &&    cf_search="$cf_search $includedir"
8118         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8119 }
8120
8121 test "$oldincludedir" != NONE && \
8122 test "$oldincludedir" != "/usr/include" && \
8123 test -d "$oldincludedir" && {
8124         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8125         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8126 }
8127
8128 cf_search="$cf_search $cf_header_path_list"
8129
8130     for cf_cv_header_path_utf8 in $cf_search
8131     do
8132       if test -d $cf_cv_header_path_utf8 ; then
8133         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8134
8135 echo "${as_me-configure}:8135: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8136
8137         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8138         cat >conftest.$ac_ext <<_ACEOF
8139 #line 8139 "configure"
8140 #include "confdefs.h"
8141
8142 #include <libutf8.h>
8143 int
8144 main ()
8145 {
8146 putwc(0,0);
8147   ;
8148   return 0;
8149 }
8150 _ACEOF
8151 rm -f conftest.$ac_objext
8152 if { (eval echo "$as_me:8152: \"$ac_compile\"") >&5
8153   (eval $ac_compile) 2>&5
8154   ac_status=$?
8155   echo "$as_me:8155: \$? = $ac_status" >&5
8156   (exit $ac_status); } &&
8157          { ac_try='test -s conftest.$ac_objext'
8158   { (eval echo "$as_me:8158: \"$ac_try\"") >&5
8159   (eval $ac_try) 2>&5
8160   ac_status=$?
8161   echo "$as_me:8161: \$? = $ac_status" >&5
8162   (exit $ac_status); }; }; then
8163
8164             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8165
8166 echo "${as_me-configure}:8166: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8167
8168             cf_cv_find_linkage_utf8=maybe
8169             cf_test_CPPFLAGS="$CPPFLAGS"
8170             break
8171 else
8172   echo "$as_me: failed program was:" >&5
8173 cat conftest.$ac_ext >&5
8174
8175             CPPFLAGS="$cf_save_CPPFLAGS"
8176
8177 fi
8178 rm -f conftest.$ac_objext conftest.$ac_ext
8179       fi
8180     done
8181
8182     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8183
8184 echo "${as_me-configure}:8184: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8185
8186       cf_save_LIBS="$LIBS"
8187       cf_save_LDFLAGS="$LDFLAGS"
8188
8189       if test "$cf_cv_find_linkage_utf8" != yes ; then
8190
8191 cf_search=
8192 cf_library_path_list=""
8193 if test -n "${LDFLAGS}${LIBS}" ; then
8194         for cf_library_path in $LDFLAGS $LIBS
8195         do
8196                 case $cf_library_path in #(vi
8197                 -L*)
8198                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8199
8200 test "$cf_library_path" != "NONE" && \
8201 test -d "$cf_library_path" && \
8202  {
8203         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8204         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8205         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8206         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8207         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8208         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8209 }
8210
8211                         cf_library_path_list="$cf_library_path_list $cf_search"
8212                         ;;
8213                 esac
8214         done
8215 fi
8216
8217 cf_search=
8218
8219 test "/usr" != "$prefix" && \
8220 test -d "/usr" && \
8221 (test $prefix = NONE || test "/usr" != "$prefix") && {
8222         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8223         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8224         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8225         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8226         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8227         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8228 }
8229
8230 test "$prefix" != "NONE" && \
8231 test -d "$prefix" && \
8232  {
8233         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8234         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8235         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8236         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8237         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8238         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8239 }
8240
8241 test "/usr/local" != "$prefix" && \
8242 test -d "/usr/local" && \
8243 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8244         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8245         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8246         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8247         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8248         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8249         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8250 }
8251
8252 test "/opt" != "$prefix" && \
8253 test -d "/opt" && \
8254 (test $prefix = NONE || test "/opt" != "$prefix") && {
8255         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8256         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8257         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8258         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8259         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8260         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8261 }
8262
8263 test "$HOME" != "$prefix" && \
8264 test -d "$HOME" && \
8265 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8266         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8267         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8268         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8269         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8270         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8271         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8272 }
8273
8274 cf_search="$cf_library_path_list $cf_search"
8275
8276         for cf_cv_library_path_utf8 in $cf_search
8277         do
8278           if test -d $cf_cv_library_path_utf8 ; then
8279             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8280
8281 echo "${as_me-configure}:8281: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8282
8283             CPPFLAGS="$cf_test_CPPFLAGS"
8284             LIBS="-lutf8  $cf_save_LIBS"
8285             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8286             cat >conftest.$ac_ext <<_ACEOF
8287 #line 8287 "configure"
8288 #include "confdefs.h"
8289
8290 #include <libutf8.h>
8291 int
8292 main ()
8293 {
8294 putwc(0,0);
8295   ;
8296   return 0;
8297 }
8298 _ACEOF
8299 rm -f conftest.$ac_objext conftest$ac_exeext
8300 if { (eval echo "$as_me:8300: \"$ac_link\"") >&5
8301   (eval $ac_link) 2>&5
8302   ac_status=$?
8303   echo "$as_me:8303: \$? = $ac_status" >&5
8304   (exit $ac_status); } &&
8305          { ac_try='test -s conftest$ac_exeext'
8306   { (eval echo "$as_me:8306: \"$ac_try\"") >&5
8307   (eval $ac_try) 2>&5
8308   ac_status=$?
8309   echo "$as_me:8309: \$? = $ac_status" >&5
8310   (exit $ac_status); }; }; then
8311
8312                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8313
8314 echo "${as_me-configure}:8314: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8315
8316                 cf_cv_find_linkage_utf8=yes
8317                 cf_cv_library_file_utf8="-lutf8"
8318                 break
8319 else
8320   echo "$as_me: failed program was:" >&5
8321 cat conftest.$ac_ext >&5
8322
8323                 CPPFLAGS="$cf_save_CPPFLAGS"
8324                 LIBS="$cf_save_LIBS"
8325                 LDFLAGS="$cf_save_LDFLAGS"
8326
8327 fi
8328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8329           fi
8330         done
8331         CPPFLAGS="$cf_save_CPPFLAGS"
8332         LDFLAGS="$cf_save_LDFLAGS"
8333       fi
8334
8335     else
8336       cf_cv_find_linkage_utf8=no
8337     fi
8338
8339 fi
8340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8341
8342 fi
8343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8344
8345 LIBS="$cf_save_LIBS"
8346
8347 if test "$cf_cv_find_linkage_utf8" = yes ; then
8348 cf_cv_utf8_lib=add-on
8349 else
8350 cf_cv_utf8_lib=no
8351 fi
8352
8353 fi
8354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8355 fi
8356 echo "$as_me:8356: result: $cf_cv_utf8_lib" >&5
8357 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8358
8359 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8360 # ncurses/ncursesw:
8361 if test "$cf_cv_utf8_lib" = "add-on" ; then
8362         cat >>confdefs.h <<\EOF
8363 #define HAVE_LIBUTF8_H 1
8364 EOF
8365
8366 if test -n "$cf_cv_header_path_utf8" ; then
8367   for cf_add_incdir in $cf_cv_header_path_utf8
8368   do
8369         while test $cf_add_incdir != /usr/include
8370         do
8371           if test -d $cf_add_incdir
8372           then
8373                 cf_have_incdir=no
8374                 if test -n "$CFLAGS$CPPFLAGS" ; then
8375                   # a loop is needed to ensure we can add subdirs of existing dirs
8376                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8377                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8378                           cf_have_incdir=yes; break
8379                         fi
8380                   done
8381                 fi
8382
8383                 if test "$cf_have_incdir" = no ; then
8384                   if test "$cf_add_incdir" = /usr/local/include ; then
8385                         if test "$GCC" = yes
8386                         then
8387                           cf_save_CPPFLAGS=$CPPFLAGS
8388                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8389                           cat >conftest.$ac_ext <<_ACEOF
8390 #line 8390 "configure"
8391 #include "confdefs.h"
8392 #include <stdio.h>
8393 int
8394 main ()
8395 {
8396 printf("Hello")
8397   ;
8398   return 0;
8399 }
8400 _ACEOF
8401 rm -f conftest.$ac_objext
8402 if { (eval echo "$as_me:8402: \"$ac_compile\"") >&5
8403   (eval $ac_compile) 2>&5
8404   ac_status=$?
8405   echo "$as_me:8405: \$? = $ac_status" >&5
8406   (exit $ac_status); } &&
8407          { ac_try='test -s conftest.$ac_objext'
8408   { (eval echo "$as_me:8408: \"$ac_try\"") >&5
8409   (eval $ac_try) 2>&5
8410   ac_status=$?
8411   echo "$as_me:8411: \$? = $ac_status" >&5
8412   (exit $ac_status); }; }; then
8413   :
8414 else
8415   echo "$as_me: failed program was:" >&5
8416 cat conftest.$ac_ext >&5
8417 cf_have_incdir=yes
8418 fi
8419 rm -f conftest.$ac_objext conftest.$ac_ext
8420                           CPPFLAGS=$cf_save_CPPFLAGS
8421                         fi
8422                   fi
8423                 fi
8424
8425                 if test "$cf_have_incdir" = no ; then
8426                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8427
8428 echo "${as_me-configure}:8428: testing adding $cf_add_incdir to include-path ..." 1>&5
8429
8430                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8431
8432                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8433                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8434                   cf_add_incdir="$cf_top_incdir"
8435                 else
8436                   break
8437                 fi
8438           fi
8439         done
8440   done
8441 fi
8442
8443 if test -n "$cf_cv_library_path_utf8" ; then
8444   for cf_add_libdir in $cf_cv_library_path_utf8
8445   do
8446     if test $cf_add_libdir = /usr/lib ; then
8447       :
8448     elif test -d $cf_add_libdir
8449     then
8450       cf_have_libdir=no
8451       if test -n "$LDFLAGS$LIBS" ; then
8452         # a loop is needed to ensure we can add subdirs of existing dirs
8453         for cf_test_libdir in $LDFLAGS $LIBS ; do
8454           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8455             cf_have_libdir=yes; break
8456           fi
8457         done
8458       fi
8459       if test "$cf_have_libdir" = no ; then
8460         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8461
8462 echo "${as_me-configure}:8462: testing adding $cf_add_libdir to library-path ..." 1>&5
8463
8464         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8465       fi
8466     fi
8467   done
8468 fi
8469
8470         LIBS="$cf_cv_library_file_utf8 $LIBS"
8471 fi
8472
8473                 if test "$cf_cv_utf8_lib" != no ; then
8474                         NCURSES_LIBUTF8=1
8475                 fi
8476         fi
8477
8478 # This is needed on Tru64 5.0 to declare mbstate_t
8479 echo "$as_me:8479: checking if we must include wchar.h to declare mbstate_t" >&5
8480 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8481 if test "${cf_cv_mbstate_t+set}" = set; then
8482   echo $ECHO_N "(cached) $ECHO_C" >&6
8483 else
8484
8485 cat >conftest.$ac_ext <<_ACEOF
8486 #line 8486 "configure"
8487 #include "confdefs.h"
8488
8489 #include <stdlib.h>
8490 #include <stdarg.h>
8491 #include <stdio.h>
8492 #ifdef HAVE_LIBUTF8_H
8493 #include <libutf8.h>
8494 #endif
8495 int
8496 main ()
8497 {
8498 mbstate_t state
8499   ;
8500   return 0;
8501 }
8502 _ACEOF
8503 rm -f conftest.$ac_objext
8504 if { (eval echo "$as_me:8504: \"$ac_compile\"") >&5
8505   (eval $ac_compile) 2>&5
8506   ac_status=$?
8507   echo "$as_me:8507: \$? = $ac_status" >&5
8508   (exit $ac_status); } &&
8509          { ac_try='test -s conftest.$ac_objext'
8510   { (eval echo "$as_me:8510: \"$ac_try\"") >&5
8511   (eval $ac_try) 2>&5
8512   ac_status=$?
8513   echo "$as_me:8513: \$? = $ac_status" >&5
8514   (exit $ac_status); }; }; then
8515   cf_cv_mbstate_t=no
8516 else
8517   echo "$as_me: failed program was:" >&5
8518 cat conftest.$ac_ext >&5
8519 cat >conftest.$ac_ext <<_ACEOF
8520 #line 8520 "configure"
8521 #include "confdefs.h"
8522
8523 #include <stdlib.h>
8524 #include <stdarg.h>
8525 #include <stdio.h>
8526 #include <wchar.h>
8527 #ifdef HAVE_LIBUTF8_H
8528 #include <libutf8.h>
8529 #endif
8530 int
8531 main ()
8532 {
8533 mbstate_t value
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext
8539 if { (eval echo "$as_me:8539: \"$ac_compile\"") >&5
8540   (eval $ac_compile) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest.$ac_objext'
8545   { (eval echo "$as_me:8545: \"$ac_try\"") >&5
8546   (eval $ac_try) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); }; }; then
8550   cf_cv_mbstate_t=yes
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 cf_cv_mbstate_t=unknown
8555 fi
8556 rm -f conftest.$ac_objext conftest.$ac_ext
8557 fi
8558 rm -f conftest.$ac_objext conftest.$ac_ext
8559 fi
8560 echo "$as_me:8560: result: $cf_cv_mbstate_t" >&5
8561 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8562
8563 if test "$cf_cv_mbstate_t" = yes ; then
8564         cat >>confdefs.h <<\EOF
8565 #define NEED_WCHAR_H 1
8566 EOF
8567
8568         NEED_WCHAR_H=1
8569 fi
8570
8571 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8572 if test "$cf_cv_mbstate_t" = unknown ; then
8573         NCURSES_MBSTATE_T=1
8574 fi
8575
8576 # This is needed on Tru64 5.0 to declare wchar_t
8577 echo "$as_me:8577: checking if we must include wchar.h to declare wchar_t" >&5
8578 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8579 if test "${cf_cv_wchar_t+set}" = set; then
8580   echo $ECHO_N "(cached) $ECHO_C" >&6
8581 else
8582
8583 cat >conftest.$ac_ext <<_ACEOF
8584 #line 8584 "configure"
8585 #include "confdefs.h"
8586
8587 #include <stdlib.h>
8588 #include <stdarg.h>
8589 #include <stdio.h>
8590 #ifdef HAVE_LIBUTF8_H
8591 #include <libutf8.h>
8592 #endif
8593 int
8594 main ()
8595 {
8596 wchar_t state
8597   ;
8598   return 0;
8599 }
8600 _ACEOF
8601 rm -f conftest.$ac_objext
8602 if { (eval echo "$as_me:8602: \"$ac_compile\"") >&5
8603   (eval $ac_compile) 2>&5
8604   ac_status=$?
8605   echo "$as_me:8605: \$? = $ac_status" >&5
8606   (exit $ac_status); } &&
8607          { ac_try='test -s conftest.$ac_objext'
8608   { (eval echo "$as_me:8608: \"$ac_try\"") >&5
8609   (eval $ac_try) 2>&5
8610   ac_status=$?
8611   echo "$as_me:8611: \$? = $ac_status" >&5
8612   (exit $ac_status); }; }; then
8613   cf_cv_wchar_t=no
8614 else
8615   echo "$as_me: failed program was:" >&5
8616 cat conftest.$ac_ext >&5
8617 cat >conftest.$ac_ext <<_ACEOF
8618 #line 8618 "configure"
8619 #include "confdefs.h"
8620
8621 #include <stdlib.h>
8622 #include <stdarg.h>
8623 #include <stdio.h>
8624 #include <wchar.h>
8625 #ifdef HAVE_LIBUTF8_H
8626 #include <libutf8.h>
8627 #endif
8628 int
8629 main ()
8630 {
8631 wchar_t value
8632   ;
8633   return 0;
8634 }
8635 _ACEOF
8636 rm -f conftest.$ac_objext
8637 if { (eval echo "$as_me:8637: \"$ac_compile\"") >&5
8638   (eval $ac_compile) 2>&5
8639   ac_status=$?
8640   echo "$as_me:8640: \$? = $ac_status" >&5
8641   (exit $ac_status); } &&
8642          { ac_try='test -s conftest.$ac_objext'
8643   { (eval echo "$as_me:8643: \"$ac_try\"") >&5
8644   (eval $ac_try) 2>&5
8645   ac_status=$?
8646   echo "$as_me:8646: \$? = $ac_status" >&5
8647   (exit $ac_status); }; }; then
8648   cf_cv_wchar_t=yes
8649 else
8650   echo "$as_me: failed program was:" >&5
8651 cat conftest.$ac_ext >&5
8652 cf_cv_wchar_t=unknown
8653 fi
8654 rm -f conftest.$ac_objext conftest.$ac_ext
8655 fi
8656 rm -f conftest.$ac_objext conftest.$ac_ext
8657 fi
8658 echo "$as_me:8658: result: $cf_cv_wchar_t" >&5
8659 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8660
8661 if test "$cf_cv_wchar_t" = yes ; then
8662         cat >>confdefs.h <<\EOF
8663 #define NEED_WCHAR_H 1
8664 EOF
8665
8666         NEED_WCHAR_H=1
8667 fi
8668
8669 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8670 if test "$cf_cv_wchar_t" = unknown ; then
8671         NCURSES_WCHAR_T=1
8672 fi
8673
8674 # if we find wchar_t in either place, use substitution to provide a fallback.
8675 if test "$cf_cv_wchar_t" != unknown ; then
8676         NCURSES_OK_WCHAR_T=1
8677 fi
8678
8679 # This is needed on Tru64 5.0 to declare wint_t
8680 echo "$as_me:8680: checking if we must include wchar.h to declare wint_t" >&5
8681 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8682 if test "${cf_cv_wint_t+set}" = set; then
8683   echo $ECHO_N "(cached) $ECHO_C" >&6
8684 else
8685
8686 cat >conftest.$ac_ext <<_ACEOF
8687 #line 8687 "configure"
8688 #include "confdefs.h"
8689
8690 #include <stdlib.h>
8691 #include <stdarg.h>
8692 #include <stdio.h>
8693 #ifdef HAVE_LIBUTF8_H
8694 #include <libutf8.h>
8695 #endif
8696 int
8697 main ()
8698 {
8699 wint_t state
8700   ;
8701   return 0;
8702 }
8703 _ACEOF
8704 rm -f conftest.$ac_objext
8705 if { (eval echo "$as_me:8705: \"$ac_compile\"") >&5
8706   (eval $ac_compile) 2>&5
8707   ac_status=$?
8708   echo "$as_me:8708: \$? = $ac_status" >&5
8709   (exit $ac_status); } &&
8710          { ac_try='test -s conftest.$ac_objext'
8711   { (eval echo "$as_me:8711: \"$ac_try\"") >&5
8712   (eval $ac_try) 2>&5
8713   ac_status=$?
8714   echo "$as_me:8714: \$? = $ac_status" >&5
8715   (exit $ac_status); }; }; then
8716   cf_cv_wint_t=no
8717 else
8718   echo "$as_me: failed program was:" >&5
8719 cat conftest.$ac_ext >&5
8720 cat >conftest.$ac_ext <<_ACEOF
8721 #line 8721 "configure"
8722 #include "confdefs.h"
8723
8724 #include <stdlib.h>
8725 #include <stdarg.h>
8726 #include <stdio.h>
8727 #include <wchar.h>
8728 #ifdef HAVE_LIBUTF8_H
8729 #include <libutf8.h>
8730 #endif
8731 int
8732 main ()
8733 {
8734 wint_t value
8735   ;
8736   return 0;
8737 }
8738 _ACEOF
8739 rm -f conftest.$ac_objext
8740 if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5
8741   (eval $ac_compile) 2>&5
8742   ac_status=$?
8743   echo "$as_me:8743: \$? = $ac_status" >&5
8744   (exit $ac_status); } &&
8745          { ac_try='test -s conftest.$ac_objext'
8746   { (eval echo "$as_me:8746: \"$ac_try\"") >&5
8747   (eval $ac_try) 2>&5
8748   ac_status=$?
8749   echo "$as_me:8749: \$? = $ac_status" >&5
8750   (exit $ac_status); }; }; then
8751   cf_cv_wint_t=yes
8752 else
8753   echo "$as_me: failed program was:" >&5
8754 cat conftest.$ac_ext >&5
8755 cf_cv_wint_t=unknown
8756 fi
8757 rm -f conftest.$ac_objext conftest.$ac_ext
8758 fi
8759 rm -f conftest.$ac_objext conftest.$ac_ext
8760 fi
8761 echo "$as_me:8761: result: $cf_cv_wint_t" >&5
8762 echo "${ECHO_T}$cf_cv_wint_t" >&6
8763
8764 if test "$cf_cv_wint_t" = yes ; then
8765         cat >>confdefs.h <<\EOF
8766 #define NEED_WCHAR_H 1
8767 EOF
8768
8769         NEED_WCHAR_H=1
8770 fi
8771
8772 # if we do not find wint_t in either place, use substitution to provide a fallback.
8773 if test "$cf_cv_wint_t" = unknown ; then
8774         NCURSES_WINT_T=1
8775 fi
8776
8777 # if we find wint_t in either place, use substitution to provide a fallback.
8778 if test "$cf_cv_wint_t" != unknown ; then
8779         NCURSES_OK_WINT_T=1
8780 fi
8781
8782         if test "$NCURSES_MBSTATE_T" != 0; then
8783                 cat >>confdefs.h <<\EOF
8784 #define NEED_MBSTATE_T_DEF 1
8785 EOF
8786
8787         fi
8788 fi
8789
8790 ###   use option --disable-lp64 to allow long chtype
8791 case $cf_cv_abi_version in
8792 [345]*)
8793         default_with_lp64=no
8794         ;;
8795 *)
8796         default_with_lp64=yes
8797         ;;
8798 esac
8799
8800 echo "$as_me:8800: checking whether to enable _LP64 definition in curses.h" >&5
8801 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8802
8803 # Check whether --enable-lp64 or --disable-lp64 was given.
8804 if test "${enable_lp64+set}" = set; then
8805   enableval="$enable_lp64"
8806   with_lp64=$enableval
8807 else
8808   with_lp64=$default_with_lp64
8809 fi;
8810 echo "$as_me:8810: result: $with_lp64" >&5
8811 echo "${ECHO_T}$with_lp64" >&6
8812
8813 if test "$with_lp64" = yes ; then
8814         cf_cv_enable_lp64=1
8815 else
8816         cf_cv_enable_lp64=0
8817 fi
8818
8819 # Check whether --enable-largefile or --disable-largefile was given.
8820 if test "${enable_largefile+set}" = set; then
8821   enableval="$enable_largefile"
8822
8823 fi;
8824 if test "$enable_largefile" != no; then
8825
8826   echo "$as_me:8826: checking for special C compiler options needed for large files" >&5
8827 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8828 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8829   echo $ECHO_N "(cached) $ECHO_C" >&6
8830 else
8831   ac_cv_sys_largefile_CC=no
8832      if test "$GCC" != yes; then
8833        ac_save_CC=$CC
8834        while :; do
8835          # IRIX 6.2 and later do not support large files by default,
8836          # so use the C compiler's -n32 option if that helps.
8837          cat >conftest.$ac_ext <<_ACEOF
8838 #line 8838 "configure"
8839 #include "confdefs.h"
8840 #include <sys/types.h>
8841  /* Check that off_t can represent 2**63 - 1 correctly.
8842     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8843     since some C++ compilers masquerading as C compilers
8844     incorrectly reject 9223372036854775807.  */
8845 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8846   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8847                        && LARGE_OFF_T % 2147483647 == 1)
8848                       ? 1 : -1];
8849 int
8850 main ()
8851 {
8852
8853   ;
8854   return 0;
8855 }
8856 _ACEOF
8857          rm -f conftest.$ac_objext
8858 if { (eval echo "$as_me:8858: \"$ac_compile\"") >&5
8859   (eval $ac_compile) 2>&5
8860   ac_status=$?
8861   echo "$as_me:8861: \$? = $ac_status" >&5
8862   (exit $ac_status); } &&
8863          { ac_try='test -s conftest.$ac_objext'
8864   { (eval echo "$as_me:8864: \"$ac_try\"") >&5
8865   (eval $ac_try) 2>&5
8866   ac_status=$?
8867   echo "$as_me:8867: \$? = $ac_status" >&5
8868   (exit $ac_status); }; }; then
8869   break
8870 else
8871   echo "$as_me: failed program was:" >&5
8872 cat conftest.$ac_ext >&5
8873 fi
8874 rm -f conftest.$ac_objext
8875          CC="$CC -n32"
8876          rm -f conftest.$ac_objext
8877 if { (eval echo "$as_me:8877: \"$ac_compile\"") >&5
8878   (eval $ac_compile) 2>&5
8879   ac_status=$?
8880   echo "$as_me:8880: \$? = $ac_status" >&5
8881   (exit $ac_status); } &&
8882          { ac_try='test -s conftest.$ac_objext'
8883   { (eval echo "$as_me:8883: \"$ac_try\"") >&5
8884   (eval $ac_try) 2>&5
8885   ac_status=$?
8886   echo "$as_me:8886: \$? = $ac_status" >&5
8887   (exit $ac_status); }; }; then
8888   ac_cv_sys_largefile_CC=' -n32'; break
8889 else
8890   echo "$as_me: failed program was:" >&5
8891 cat conftest.$ac_ext >&5
8892 fi
8893 rm -f conftest.$ac_objext
8894          break
8895        done
8896        CC=$ac_save_CC
8897        rm -f conftest.$ac_ext
8898     fi
8899 fi
8900 echo "$as_me:8900: result: $ac_cv_sys_largefile_CC" >&5
8901 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8902   if test "$ac_cv_sys_largefile_CC" != no; then
8903     CC=$CC$ac_cv_sys_largefile_CC
8904   fi
8905
8906   echo "$as_me:8906: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8907 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8908 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8909   echo $ECHO_N "(cached) $ECHO_C" >&6
8910 else
8911   while :; do
8912   ac_cv_sys_file_offset_bits=no
8913   cat >conftest.$ac_ext <<_ACEOF
8914 #line 8914 "configure"
8915 #include "confdefs.h"
8916 #include <sys/types.h>
8917  /* Check that off_t can represent 2**63 - 1 correctly.
8918     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8919     since some C++ compilers masquerading as C compilers
8920     incorrectly reject 9223372036854775807.  */
8921 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8922   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8923                        && LARGE_OFF_T % 2147483647 == 1)
8924                       ? 1 : -1];
8925 int
8926 main ()
8927 {
8928
8929   ;
8930   return 0;
8931 }
8932 _ACEOF
8933 rm -f conftest.$ac_objext
8934 if { (eval echo "$as_me:8934: \"$ac_compile\"") >&5
8935   (eval $ac_compile) 2>&5
8936   ac_status=$?
8937   echo "$as_me:8937: \$? = $ac_status" >&5
8938   (exit $ac_status); } &&
8939          { ac_try='test -s conftest.$ac_objext'
8940   { (eval echo "$as_me:8940: \"$ac_try\"") >&5
8941   (eval $ac_try) 2>&5
8942   ac_status=$?
8943   echo "$as_me:8943: \$? = $ac_status" >&5
8944   (exit $ac_status); }; }; then
8945   break
8946 else
8947   echo "$as_me: failed program was:" >&5
8948 cat conftest.$ac_ext >&5
8949 fi
8950 rm -f conftest.$ac_objext conftest.$ac_ext
8951   cat >conftest.$ac_ext <<_ACEOF
8952 #line 8952 "configure"
8953 #include "confdefs.h"
8954 #define _FILE_OFFSET_BITS 64
8955 #include <sys/types.h>
8956  /* Check that off_t can represent 2**63 - 1 correctly.
8957     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8958     since some C++ compilers masquerading as C compilers
8959     incorrectly reject 9223372036854775807.  */
8960 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8961   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8962                        && LARGE_OFF_T % 2147483647 == 1)
8963                       ? 1 : -1];
8964 int
8965 main ()
8966 {
8967
8968   ;
8969   return 0;
8970 }
8971 _ACEOF
8972 rm -f conftest.$ac_objext
8973 if { (eval echo "$as_me:8973: \"$ac_compile\"") >&5
8974   (eval $ac_compile) 2>&5
8975   ac_status=$?
8976   echo "$as_me:8976: \$? = $ac_status" >&5
8977   (exit $ac_status); } &&
8978          { ac_try='test -s conftest.$ac_objext'
8979   { (eval echo "$as_me:8979: \"$ac_try\"") >&5
8980   (eval $ac_try) 2>&5
8981   ac_status=$?
8982   echo "$as_me:8982: \$? = $ac_status" >&5
8983   (exit $ac_status); }; }; then
8984   ac_cv_sys_file_offset_bits=64; break
8985 else
8986   echo "$as_me: failed program was:" >&5
8987 cat conftest.$ac_ext >&5
8988 fi
8989 rm -f conftest.$ac_objext conftest.$ac_ext
8990   break
8991 done
8992 fi
8993 echo "$as_me:8993: result: $ac_cv_sys_file_offset_bits" >&5
8994 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8995 if test "$ac_cv_sys_file_offset_bits" != no; then
8996
8997 cat >>confdefs.h <<EOF
8998 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8999 EOF
9000
9001 fi
9002 rm -f conftest*
9003   echo "$as_me:9003: checking for _LARGE_FILES value needed for large files" >&5
9004 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9005 if test "${ac_cv_sys_large_files+set}" = set; then
9006   echo $ECHO_N "(cached) $ECHO_C" >&6
9007 else
9008   while :; do
9009   ac_cv_sys_large_files=no
9010   cat >conftest.$ac_ext <<_ACEOF
9011 #line 9011 "configure"
9012 #include "confdefs.h"
9013 #include <sys/types.h>
9014  /* Check that off_t can represent 2**63 - 1 correctly.
9015     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9016     since some C++ compilers masquerading as C compilers
9017     incorrectly reject 9223372036854775807.  */
9018 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9019   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9020                        && LARGE_OFF_T % 2147483647 == 1)
9021                       ? 1 : -1];
9022 int
9023 main ()
9024 {
9025
9026   ;
9027   return 0;
9028 }
9029 _ACEOF
9030 rm -f conftest.$ac_objext
9031 if { (eval echo "$as_me:9031: \"$ac_compile\"") >&5
9032   (eval $ac_compile) 2>&5
9033   ac_status=$?
9034   echo "$as_me:9034: \$? = $ac_status" >&5
9035   (exit $ac_status); } &&
9036          { ac_try='test -s conftest.$ac_objext'
9037   { (eval echo "$as_me:9037: \"$ac_try\"") >&5
9038   (eval $ac_try) 2>&5
9039   ac_status=$?
9040   echo "$as_me:9040: \$? = $ac_status" >&5
9041   (exit $ac_status); }; }; then
9042   break
9043 else
9044   echo "$as_me: failed program was:" >&5
9045 cat conftest.$ac_ext >&5
9046 fi
9047 rm -f conftest.$ac_objext conftest.$ac_ext
9048   cat >conftest.$ac_ext <<_ACEOF
9049 #line 9049 "configure"
9050 #include "confdefs.h"
9051 #define _LARGE_FILES 1
9052 #include <sys/types.h>
9053  /* Check that off_t can represent 2**63 - 1 correctly.
9054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9055     since some C++ compilers masquerading as C compilers
9056     incorrectly reject 9223372036854775807.  */
9057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9059                        && LARGE_OFF_T % 2147483647 == 1)
9060                       ? 1 : -1];
9061 int
9062 main ()
9063 {
9064
9065   ;
9066   return 0;
9067 }
9068 _ACEOF
9069 rm -f conftest.$ac_objext
9070 if { (eval echo "$as_me:9070: \"$ac_compile\"") >&5
9071   (eval $ac_compile) 2>&5
9072   ac_status=$?
9073   echo "$as_me:9073: \$? = $ac_status" >&5
9074   (exit $ac_status); } &&
9075          { ac_try='test -s conftest.$ac_objext'
9076   { (eval echo "$as_me:9076: \"$ac_try\"") >&5
9077   (eval $ac_try) 2>&5
9078   ac_status=$?
9079   echo "$as_me:9079: \$? = $ac_status" >&5
9080   (exit $ac_status); }; }; then
9081   ac_cv_sys_large_files=1; break
9082 else
9083   echo "$as_me: failed program was:" >&5
9084 cat conftest.$ac_ext >&5
9085 fi
9086 rm -f conftest.$ac_objext conftest.$ac_ext
9087   break
9088 done
9089 fi
9090 echo "$as_me:9090: result: $ac_cv_sys_large_files" >&5
9091 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9092 if test "$ac_cv_sys_large_files" != no; then
9093
9094 cat >>confdefs.h <<EOF
9095 #define _LARGE_FILES $ac_cv_sys_large_files
9096 EOF
9097
9098 fi
9099 rm -f conftest*
9100 fi
9101
9102     if test "$enable_largefile" != no ; then
9103         echo "$as_me:9103: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9104 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9105 if test "${ac_cv_sys_largefile_source+set}" = set; then
9106   echo $ECHO_N "(cached) $ECHO_C" >&6
9107 else
9108   while :; do
9109   ac_cv_sys_largefile_source=no
9110   cat >conftest.$ac_ext <<_ACEOF
9111 #line 9111 "configure"
9112 #include "confdefs.h"
9113 #include <stdio.h>
9114 int
9115 main ()
9116 {
9117 return !fseeko;
9118   ;
9119   return 0;
9120 }
9121 _ACEOF
9122 rm -f conftest.$ac_objext
9123 if { (eval echo "$as_me:9123: \"$ac_compile\"") >&5
9124   (eval $ac_compile) 2>&5
9125   ac_status=$?
9126   echo "$as_me:9126: \$? = $ac_status" >&5
9127   (exit $ac_status); } &&
9128          { ac_try='test -s conftest.$ac_objext'
9129   { (eval echo "$as_me:9129: \"$ac_try\"") >&5
9130   (eval $ac_try) 2>&5
9131   ac_status=$?
9132   echo "$as_me:9132: \$? = $ac_status" >&5
9133   (exit $ac_status); }; }; then
9134   break
9135 else
9136   echo "$as_me: failed program was:" >&5
9137 cat conftest.$ac_ext >&5
9138 fi
9139 rm -f conftest.$ac_objext conftest.$ac_ext
9140   cat >conftest.$ac_ext <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9143 #define _LARGEFILE_SOURCE 1
9144 #include <stdio.h>
9145 int
9146 main ()
9147 {
9148 return !fseeko;
9149   ;
9150   return 0;
9151 }
9152 _ACEOF
9153 rm -f conftest.$ac_objext
9154 if { (eval echo "$as_me:9154: \"$ac_compile\"") >&5
9155   (eval $ac_compile) 2>&5
9156   ac_status=$?
9157   echo "$as_me:9157: \$? = $ac_status" >&5
9158   (exit $ac_status); } &&
9159          { ac_try='test -s conftest.$ac_objext'
9160   { (eval echo "$as_me:9160: \"$ac_try\"") >&5
9161   (eval $ac_try) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit $ac_status); }; }; then
9165   ac_cv_sys_largefile_source=1; break
9166 else
9167   echo "$as_me: failed program was:" >&5
9168 cat conftest.$ac_ext >&5
9169 fi
9170 rm -f conftest.$ac_objext conftest.$ac_ext
9171   break
9172 done
9173 fi
9174 echo "$as_me:9174: result: $ac_cv_sys_largefile_source" >&5
9175 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9176 if test "$ac_cv_sys_largefile_source" != no; then
9177
9178 cat >>confdefs.h <<EOF
9179 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9180 EOF
9181
9182 fi
9183 rm -f conftest*
9184
9185 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9186 # in glibc 2.1.3, but that breaks too many other things.
9187 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9188 echo "$as_me:9188: checking for fseeko" >&5
9189 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9190 if test "${ac_cv_func_fseeko+set}" = set; then
9191   echo $ECHO_N "(cached) $ECHO_C" >&6
9192 else
9193   cat >conftest.$ac_ext <<_ACEOF
9194 #line 9194 "configure"
9195 #include "confdefs.h"
9196 #include <stdio.h>
9197 int
9198 main ()
9199 {
9200 return fseeko && fseeko (stdin, 0, 0);
9201   ;
9202   return 0;
9203 }
9204 _ACEOF
9205 rm -f conftest.$ac_objext conftest$ac_exeext
9206 if { (eval echo "$as_me:9206: \"$ac_link\"") >&5
9207   (eval $ac_link) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); } &&
9211          { ac_try='test -s conftest$ac_exeext'
9212   { (eval echo "$as_me:9212: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217   ac_cv_func_fseeko=yes
9218 else
9219   echo "$as_me: failed program was:" >&5
9220 cat conftest.$ac_ext >&5
9221 ac_cv_func_fseeko=no
9222 fi
9223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9224 fi
9225 echo "$as_me:9225: result: $ac_cv_func_fseeko" >&5
9226 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9227 if test $ac_cv_func_fseeko = yes; then
9228
9229 cat >>confdefs.h <<\EOF
9230 #define HAVE_FSEEKO 1
9231 EOF
9232
9233 fi
9234
9235         # Normally we would collect these definitions in the config.h,
9236         # but (like _XOPEN_SOURCE), some environments rely on having these
9237         # defined before any of the system headers are included.  Another
9238         # case comes up with C++, e.g., on AIX the compiler compiles the
9239         # header files by themselves before looking at the body files it is
9240         # told to compile.  For ncurses, those header files do not include
9241         # the config.h
9242         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9243         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9244         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9245
9246         echo "$as_me:9246: checking whether to use struct dirent64" >&5
9247 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9248 if test "${cf_cv_struct_dirent64+set}" = set; then
9249   echo $ECHO_N "(cached) $ECHO_C" >&6
9250 else
9251
9252                 cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255
9256 #include <sys/types.h>
9257 #include <dirent.h>
9258
9259 int
9260 main ()
9261 {
9262
9263                 /* if transitional largefile support is setup, this is true */
9264                 extern struct dirent64 * readdir(DIR *);
9265                 struct dirent64 *x = readdir((DIR *)0);
9266                 struct dirent *y = readdir((DIR *)0);
9267                 int z = x - y;
9268
9269   ;
9270   return 0;
9271 }
9272 _ACEOF
9273 rm -f conftest.$ac_objext
9274 if { (eval echo "$as_me:9274: \"$ac_compile\"") >&5
9275   (eval $ac_compile) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); } &&
9279          { ac_try='test -s conftest.$ac_objext'
9280   { (eval echo "$as_me:9280: \"$ac_try\"") >&5
9281   (eval $ac_try) 2>&5
9282   ac_status=$?
9283   echo "$as_me:9283: \$? = $ac_status" >&5
9284   (exit $ac_status); }; }; then
9285   cf_cv_struct_dirent64=yes
9286 else
9287   echo "$as_me: failed program was:" >&5
9288 cat conftest.$ac_ext >&5
9289 cf_cv_struct_dirent64=no
9290 fi
9291 rm -f conftest.$ac_objext conftest.$ac_ext
9292
9293 fi
9294 echo "$as_me:9294: result: $cf_cv_struct_dirent64" >&5
9295 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9296         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9297 #define HAVE_STRUCT_DIRENT64 1
9298 EOF
9299
9300     fi
9301
9302 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9303 echo "$as_me:9303: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9304 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9305
9306 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9307 if test "${enable_tparm_varargs+set}" = set; then
9308   enableval="$enable_tparm_varargs"
9309   with_tparm_varargs=$enableval
9310 else
9311   with_tparm_varargs=yes
9312 fi;
9313 echo "$as_me:9313: result: $with_tparm_varargs" >&5
9314 echo "${ECHO_T}$with_tparm_varargs" >&6
9315 NCURSES_TPARM_VARARGS=0
9316 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9317
9318 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9319 if test "$with_ticlib" != no ; then
9320 echo "$as_me:9320: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9321 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9322
9323 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9324 if test "${enable_tic_depends+set}" = set; then
9325   enableval="$enable_tic_depends"
9326   with_tic_depends=$enableval
9327 else
9328   with_tic_depends=yes
9329 fi;
9330 echo "$as_me:9330: result: $with_tic_depends" >&5
9331 echo "${ECHO_T}$with_tic_depends" >&6
9332 else
9333         with_tic_depends=no
9334 fi
9335
9336 ###   use option --with-bool to override bool's type
9337 echo "$as_me:9337: checking for type of bool" >&5
9338 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9339
9340 # Check whether --with-bool or --without-bool was given.
9341 if test "${with_bool+set}" = set; then
9342   withval="$with_bool"
9343   NCURSES_BOOL="$withval"
9344 else
9345   NCURSES_BOOL=auto
9346 fi;
9347 echo "$as_me:9347: result: $NCURSES_BOOL" >&5
9348 echo "${ECHO_T}$NCURSES_BOOL" >&6
9349
9350 echo "$as_me:9350: checking for alternate terminal capabilities file" >&5
9351 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9352
9353 # Check whether --with-caps or --without-caps was given.
9354 if test "${with_caps+set}" = set; then
9355   withval="$with_caps"
9356   TERMINFO_CAPS=Caps.$withval
9357 else
9358   TERMINFO_CAPS=Caps
9359 fi;
9360 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9361 echo "$as_me:9361: result: $TERMINFO_CAPS" >&5
9362 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9363
9364 ###   use option --with-chtype to override chtype's type
9365 echo "$as_me:9365: checking for type of chtype" >&5
9366 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9367
9368 # Check whether --with-chtype or --without-chtype was given.
9369 if test "${with_chtype+set}" = set; then
9370   withval="$with_chtype"
9371   NCURSES_CHTYPE="$withval"
9372 else
9373   NCURSES_CHTYPE=auto
9374 fi;
9375 echo "$as_me:9375: result: $NCURSES_CHTYPE" >&5
9376 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9377
9378 ###   use option --with-ospeed to override ospeed's type
9379 echo "$as_me:9379: checking for type of ospeed" >&5
9380 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9381
9382 # Check whether --with-ospeed or --without-ospeed was given.
9383 if test "${with_ospeed+set}" = set; then
9384   withval="$with_ospeed"
9385   NCURSES_OSPEED="$withval"
9386 else
9387   NCURSES_OSPEED=short
9388 fi;
9389 echo "$as_me:9389: result: $NCURSES_OSPEED" >&5
9390 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9391
9392 ###   use option --with-mmask-t to override mmask_t's type
9393 echo "$as_me:9393: checking for type of mmask_t" >&5
9394 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9395
9396 # Check whether --with-mmask-t or --without-mmask-t was given.
9397 if test "${with_mmask_t+set}" = set; then
9398   withval="$with_mmask_t"
9399   NCURSES_MMASK_T="$withval"
9400 else
9401   NCURSES_MMASK_T=auto
9402 fi;
9403 echo "$as_me:9403: result: $NCURSES_MMASK_T" >&5
9404 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9405
9406 ###   use option --with-ccharw-max to override CCHARW_MAX size
9407 echo "$as_me:9407: checking for size CCHARW_MAX" >&5
9408 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9409
9410 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9411 if test "${with_ccharw_max+set}" = set; then
9412   withval="$with_ccharw_max"
9413   NCURSES_CCHARW_MAX="$withval"
9414 else
9415   NCURSES_CCHARW_MAX=5
9416 fi;
9417 echo "$as_me:9417: result: $NCURSES_CCHARW_MAX" >&5
9418 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9419
9420 ### Enable compiling-in rcs id's
9421 echo "$as_me:9421: checking if RCS identifiers should be compiled-in" >&5
9422 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9423
9424 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9425 if test "${with_rcs_ids+set}" = set; then
9426   withval="$with_rcs_ids"
9427   with_rcs_ids=$withval
9428 else
9429   with_rcs_ids=no
9430 fi;
9431 echo "$as_me:9431: result: $with_rcs_ids" >&5
9432 echo "${ECHO_T}$with_rcs_ids" >&6
9433 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9434 #define USE_RCS_IDS 1
9435 EOF
9436
9437 ###############################################################################
9438
9439 echo "$as_me:9439: checking format of man-pages" >&5
9440 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9441
9442 # Check whether --with-manpage-format or --without-manpage-format was given.
9443 if test "${with_manpage_format+set}" = set; then
9444   withval="$with_manpage_format"
9445   MANPAGE_FORMAT=$withval
9446 else
9447   MANPAGE_FORMAT=unknown
9448 fi;
9449
9450 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9451 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9452
9453 cf_unknown=
9454
9455 case $MANPAGE_FORMAT in
9456 unknown)
9457   if test -z "$MANPATH" ; then
9458     MANPATH="/usr/man:/usr/share/man"
9459   fi
9460
9461   # look for the 'date' man-page (it's most likely to be installed!)
9462   MANPAGE_FORMAT=
9463   cf_preform=no
9464   cf_catonly=yes
9465   cf_example=date
9466
9467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9468   for cf_dir in $MANPATH; do
9469     test -z "$cf_dir" && cf_dir=/usr/man
9470     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
9471     do
9472       cf_test=`echo $cf_name | sed -e 's/*//'`
9473       if test "x$cf_test" = "x$cf_name" ; then
9474
9475         case "$cf_name" in
9476         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9477         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9478         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9479         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9480         esac
9481
9482         case "$cf_name" in
9483         $cf_dir/man*)
9484           cf_catonly=no
9485           ;;
9486         $cf_dir/cat*)
9487           cf_preform=yes
9488           ;;
9489         esac
9490         break
9491       fi
9492
9493       # if we found a match in either man* or cat*, stop looking
9494       if test -n "$MANPAGE_FORMAT" ; then
9495         cf_found=no
9496         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9497         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9498         case "$cf_name" in
9499         $cf_dir/cat*)
9500           cf_found=yes
9501           ;;
9502         esac
9503         test $cf_found=yes && break
9504       fi
9505     done
9506     # only check the first directory in $MANPATH where we find manpages
9507     if test -n "$MANPAGE_FORMAT" ; then
9508        break
9509     fi
9510   done
9511   # if we did not find the example, just assume it is normal
9512   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9513   IFS="$ac_save_ifs"
9514   ;;
9515 *)
9516   for cf_option in $MANPAGE_FORMAT; do
9517      case $cf_option in #(vi
9518      gzip|compress|BSDI|normal|formatted|catonly)
9519        ;;
9520      *)
9521        cf_unknown="$cf_unknown $cf_option"
9522        ;;
9523      esac
9524   done
9525   ;;
9526 esac
9527
9528 echo "$as_me:9528: result: $MANPAGE_FORMAT" >&5
9529 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9530 if test -n "$cf_unknown" ; then
9531   { echo "$as_me:9531: WARNING: Unexpected manpage-format $cf_unknown" >&5
9532 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9533 fi
9534
9535 echo "$as_me:9535: checking for manpage renaming" >&5
9536 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9537
9538 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9539 if test "${with_manpage_renames+set}" = set; then
9540   withval="$with_manpage_renames"
9541   MANPAGE_RENAMES=$withval
9542 else
9543   MANPAGE_RENAMES=yes
9544 fi;
9545
9546 case ".$MANPAGE_RENAMES" in #(vi
9547 .no) #(vi
9548   ;;
9549 .|.yes)
9550   # Debian 'man' program?
9551   if test -f /etc/debian_version ; then
9552     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9553   else
9554     MANPAGE_RENAMES=no
9555   fi
9556   ;;
9557 esac
9558
9559 if test "$MANPAGE_RENAMES" != no ; then
9560   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9561     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9562   elif test ! -f $MANPAGE_RENAMES ; then
9563     { { echo "$as_me:9563: error: not a filename: $MANPAGE_RENAMES" >&5
9564 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9565    { (exit 1); exit 1; }; }
9566   fi
9567
9568   test ! -d man && mkdir man
9569
9570   # Construct a sed-script to perform renaming within man-pages
9571   if test -n "$MANPAGE_RENAMES" ; then
9572     test ! -d man && mkdir man
9573     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9574   fi
9575 fi
9576
9577 echo "$as_me:9577: result: $MANPAGE_RENAMES" >&5
9578 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9579
9580 echo "$as_me:9580: checking if manpage aliases will be installed" >&5
9581 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9582
9583 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9584 if test "${with_manpage_aliases+set}" = set; then
9585   withval="$with_manpage_aliases"
9586   MANPAGE_ALIASES=$withval
9587 else
9588   MANPAGE_ALIASES=yes
9589 fi;
9590
9591 echo "$as_me:9591: result: $MANPAGE_ALIASES" >&5
9592 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9593
9594 case "x$LN_S" in #(vi
9595 xln*) #(vi
9596         cf_use_symlinks=yes
9597         ;;
9598 *)
9599         cf_use_symlinks=no
9600         ;;
9601 esac
9602
9603 MANPAGE_SYMLINKS=no
9604 if test "$MANPAGE_ALIASES" = yes ; then
9605 echo "$as_me:9605: checking if manpage symlinks should be used" >&5
9606 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9607
9608 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9609 if test "${with_manpage_symlinks+set}" = set; then
9610   withval="$with_manpage_symlinks"
9611   MANPAGE_SYMLINKS=$withval
9612 else
9613   MANPAGE_SYMLINKS=$cf_use_symlinks
9614 fi;
9615
9616 if test "$$cf_use_symlinks" = no; then
9617 if test "$MANPAGE_SYMLINKS" = yes ; then
9618         { echo "$as_me:9618: WARNING: cannot make symlinks" >&5
9619 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9620         MANPAGE_SYMLINKS=no
9621 fi
9622 fi
9623
9624 echo "$as_me:9624: result: $MANPAGE_SYMLINKS" >&5
9625 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9626 fi
9627
9628 echo "$as_me:9628: checking for manpage tbl" >&5
9629 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9630
9631 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9632 if test "${with_manpage_tbl+set}" = set; then
9633   withval="$with_manpage_tbl"
9634   MANPAGE_TBL=$withval
9635 else
9636   MANPAGE_TBL=no
9637 fi;
9638
9639 echo "$as_me:9639: result: $MANPAGE_TBL" >&5
9640 echo "${ECHO_T}$MANPAGE_TBL" >&6
9641
9642   if test "$prefix" = "NONE" ; then
9643      cf_prefix="$ac_default_prefix"
9644   else
9645      cf_prefix="$prefix"
9646   fi
9647
9648   case "$MANPAGE_FORMAT" in # (vi
9649   *catonly*) # (vi
9650     cf_format=yes
9651     cf_inboth=no
9652     ;;
9653   *formatted*) # (vi
9654     cf_format=yes
9655     cf_inboth=yes
9656     ;;
9657   *)
9658     cf_format=no
9659     cf_inboth=no
9660     ;;
9661   esac
9662
9663 test ! -d man && mkdir man
9664
9665 cf_so_strip=
9666 cf_compress=
9667 case "$MANPAGE_FORMAT" in #(vi
9668 *compress*) #(vi
9669         cf_so_strip="Z"
9670         cf_compress=compress
9671   ;;
9672 *gzip*)
9673         cf_so_strip="gz"
9674         cf_compress=gzip
9675   ;;
9676 esac
9677
9678 cf_edit_man=./edit_man.sh
9679 cf_man_alias=`pwd`/man_alias.sed
9680
9681 cat >$cf_edit_man <<CF_EOF
9682 #! /bin/sh
9683 # this script is generated by the configure-script CF_MAN_PAGES macro.
9684
9685 prefix="$cf_prefix"
9686 datadir="$datadir"
9687
9688 NCURSES_MAJOR="$NCURSES_MAJOR"
9689 NCURSES_MINOR="$NCURSES_MINOR"
9690 NCURSES_PATCH="$NCURSES_PATCH"
9691
9692 NCURSES_OSPEED="$NCURSES_OSPEED"
9693 TERMINFO="$TERMINFO"
9694
9695 INSTALL="$INSTALL"
9696 INSTALL_DATA="$INSTALL_DATA"
9697
9698 transform="$program_transform_name"
9699
9700 TMP=\${TMPDIR-/tmp}/man\$\$
9701 trap "rm -f \$TMP" 0 1 2 5 15
9702
9703 form=\$1
9704 shift || exit 1
9705
9706 verb=\$1
9707 shift || exit 1
9708
9709 mandir=\$1
9710 shift || exit 1
9711
9712 srcdir=\$1
9713 top_srcdir=\$srcdir/..
9714 shift || exit 1
9715
9716 if test "\$form" = normal ; then
9717         if test "$cf_format" = yes ; then
9718         if test "$cf_inboth" = no ; then
9719                 sh \$0 format \$verb \$mandir \$srcdir \$*
9720                 exit $?
9721         fi
9722         fi
9723         cf_subdir=\$mandir/man
9724         cf_tables=$MANPAGE_TBL
9725 else
9726         cf_subdir=\$mandir/cat
9727         cf_tables=yes
9728 fi
9729
9730 # process the list of source-files
9731 for i in \$* ; do
9732 case \$i in #(vi
9733 *.orig|*.rej) ;; #(vi
9734 *.[0-9]*)
9735         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9736         if test \$verb = installing ; then
9737         if test ! -d \$cf_subdir\${section} ; then
9738                 mkdir -p \$cf_subdir\$section
9739         fi
9740         fi
9741
9742         # replace variables in man page
9743         if test ! -f $cf_man_alias ; then
9744 cat >>$cf_man_alias <<-CF_EOF2
9745                 s,@DATADIR@,\$datadir,g
9746                 s,@TERMINFO@,\$TERMINFO,g
9747                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9748                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9749                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9750                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9751 CF_EOF
9752
9753         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9754         do
9755                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9756                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9757 cat >>$cf_edit_man <<-CF_EOF
9758                 s,@$cf_NAME@,$cf_name,g
9759 CF_EOF
9760         done
9761
9762 cat >>$cf_edit_man <<CF_EOF
9763 CF_EOF2
9764                 echo "...made $cf_man_alias"
9765         fi
9766
9767         aliases=
9768         cf_source=\`basename \$i\`
9769         inalias=\$cf_source
9770         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9771         if test ! -f \$inalias ; then
9772                 echo .. skipped \$cf_source
9773                 continue
9774         fi
9775 CF_EOF
9776
9777 if test "$MANPAGE_ALIASES" != no ; then
9778 cat >>$cf_edit_man <<CF_EOF
9779         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9780 CF_EOF
9781 fi
9782
9783 if test "$MANPAGE_RENAMES" = no ; then
9784 cat >>$cf_edit_man <<CF_EOF
9785         # perform program transformations for section 1 man pages
9786         if test \$section = 1 ; then
9787                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9788         else
9789                 cf_target=\$cf_subdir\${section}/\$cf_source
9790         fi
9791 CF_EOF
9792 else
9793 cat >>$cf_edit_man <<CF_EOF
9794         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9795         if test -z "\$cf_target" ; then
9796                 echo '? missing rename for '\$cf_source
9797                 cf_target="\$cf_source"
9798         fi
9799         cf_target="\$cf_subdir\${section}/\${cf_target}"
9800
9801 CF_EOF
9802 fi
9803
9804 cat >>$cf_edit_man <<CF_EOF
9805         sed     -f $cf_man_alias \\
9806 CF_EOF
9807
9808 if test -f $MANPAGE_RENAMES ; then
9809 cat >>$cf_edit_man <<CF_EOF
9810                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9811 CF_EOF
9812 else
9813 cat >>$cf_edit_man <<CF_EOF
9814                 < \$i >\$TMP
9815 CF_EOF
9816 fi
9817
9818 cat >>$cf_edit_man <<CF_EOF
9819 if test \$cf_tables = yes ; then
9820         tbl \$TMP >\$TMP.out
9821         mv \$TMP.out \$TMP
9822 fi
9823 CF_EOF
9824
9825 if test $with_curses_h != yes ; then
9826 cat >>$cf_edit_man <<CF_EOF
9827         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9828         mv \$TMP.out \$TMP
9829 CF_EOF
9830 fi
9831
9832 cat >>$cf_edit_man <<CF_EOF
9833         if test \$form = format ; then
9834                 nroff -man \$TMP >\$TMP.out
9835                 mv \$TMP.out \$TMP
9836         fi
9837 CF_EOF
9838
9839 if test -n "$cf_compress" ; then
9840 cat >>$cf_edit_man <<CF_EOF
9841         if test \$verb = installing ; then
9842         if ( $cf_compress -f \$TMP )
9843         then
9844                 mv \$TMP.$cf_so_strip \$TMP
9845         fi
9846         fi
9847         cf_target="\$cf_target.$cf_so_strip"
9848 CF_EOF
9849 fi
9850
9851 case "$MANPAGE_FORMAT" in #(vi
9852 *BSDI*)
9853 cat >>$cf_edit_man <<CF_EOF
9854         if test \$form = format ; then
9855                 # BSDI installs only .0 suffixes in the cat directories
9856                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9857         fi
9858 CF_EOF
9859   ;;
9860 esac
9861
9862 cat >>$cf_edit_man <<CF_EOF
9863         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9864         if test \$verb = installing ; then
9865                 echo \$verb \$cf_target
9866                 \$INSTALL_DATA \$TMP \$cf_target
9867                 test -d \$cf_subdir\${section} &&
9868                 test -n "\$aliases" && (
9869                         cd \$cf_subdir\${section} && (
9870                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9871                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9872                                 cf_target=\`basename \$cf_target\`
9873                                 for cf_alias in \$aliases
9874                                 do
9875                                         if test \$section = 1 ; then
9876                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9877                                         fi
9878
9879                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9880                                                 if test -f \$cf_alias\${suffix} ; then
9881                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9882                                                         then
9883                                                                 continue
9884                                                         fi
9885                                                 fi
9886                                                 echo .. \$verb alias \$cf_alias\${suffix}
9887 CF_EOF
9888 case "x$LN_S" in #(vi
9889 *-f) #(vi
9890 cat >>$cf_edit_man <<CF_EOF
9891                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9892 CF_EOF
9893         ;;
9894 *)
9895 cat >>$cf_edit_man <<CF_EOF
9896                                                 rm -f \$cf_alias\${suffix}
9897                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9898 CF_EOF
9899         ;;
9900 esac
9901 cat >>$cf_edit_man <<CF_EOF
9902                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9903                                                 echo ".so \$cf_source" >\$TMP
9904 CF_EOF
9905 if test -n "$cf_compress" ; then
9906 cat >>$cf_edit_man <<CF_EOF
9907                                                 if test -n "$cf_so_strip" ; then
9908                                                         $cf_compress -f \$TMP
9909                                                         mv \$TMP.$cf_so_strip \$TMP
9910                                                 fi
9911 CF_EOF
9912 fi
9913 cat >>$cf_edit_man <<CF_EOF
9914                                                 echo .. \$verb alias \$cf_alias\${suffix}
9915                                                 rm -f \$cf_alias\${suffix}
9916                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9917                                         fi
9918                                 done
9919                         )
9920                 )
9921         elif test \$verb = removing ; then
9922                 test -f \$cf_target && (
9923                         echo \$verb \$cf_target
9924                         rm -f \$cf_target
9925                 )
9926                 test -d \$cf_subdir\${section} &&
9927                 test -n "\$aliases" && (
9928                         cd \$cf_subdir\${section} && (
9929                                 for cf_alias in \$aliases
9930                                 do
9931                                         if test \$section = 1 ; then
9932                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9933                                         fi
9934
9935                                         echo .. \$verb alias \$cf_alias\${suffix}
9936                                         rm -f \$cf_alias\${suffix}
9937                                 done
9938                         )
9939                 )
9940         else
9941 #               echo ".hy 0"
9942                 cat \$TMP
9943         fi
9944         ;;
9945 esac
9946 done
9947
9948 if test $cf_inboth = yes ; then
9949 if test \$form != format ; then
9950         sh \$0 format \$verb \$mandir \$srcdir \$*
9951 fi
9952 fi
9953
9954 exit 0
9955 CF_EOF
9956 chmod 755 $cf_edit_man
9957
9958 ###############################################################################
9959
9960 ### Note that some functions (such as const) are normally disabled anyway.
9961 echo "$as_me:9961: checking if you want to build with function extensions" >&5
9962 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9963
9964 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9965 if test "${enable_ext_funcs+set}" = set; then
9966   enableval="$enable_ext_funcs"
9967   with_ext_funcs=$enableval
9968 else
9969   with_ext_funcs=yes
9970 fi;
9971 echo "$as_me:9971: result: $with_ext_funcs" >&5
9972 echo "${ECHO_T}$with_ext_funcs" >&6
9973 if test "$with_ext_funcs" = yes ; then
9974         NCURSES_EXT_FUNCS=1
9975         cat >>confdefs.h <<\EOF
9976 #define HAVE_CURSES_VERSION 1
9977 EOF
9978
9979         cat >>confdefs.h <<\EOF
9980 #define HAVE_HAS_KEY 1
9981 EOF
9982
9983         cat >>confdefs.h <<\EOF
9984 #define HAVE_RESIZETERM 1
9985 EOF
9986
9987         cat >>confdefs.h <<\EOF
9988 #define HAVE_RESIZE_TERM 1
9989 EOF
9990
9991         cat >>confdefs.h <<\EOF
9992 #define HAVE_USE_DEFAULT_COLORS 1
9993 EOF
9994
9995         cat >>confdefs.h <<\EOF
9996 #define HAVE_WRESIZE 1
9997 EOF
9998
9999         cat >>confdefs.h <<\EOF
10000 #define NCURSES_EXT_FUNCS 1
10001 EOF
10002
10003         GENERATED_EXT_FUNCS=generated
10004 else
10005         NCURSES_EXT_FUNCS=0
10006         GENERATED_EXT_FUNCS=
10007 fi
10008
10009 echo "$as_me:10009: checking if you want to build with experimental SCREEN extensions" >&5
10010 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10011
10012 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10013 if test "${enable_sp_funcs+set}" = set; then
10014   enableval="$enable_sp_funcs"
10015   with_sp_funcs=$enableval
10016 else
10017   with_sp_funcs=no
10018 fi;
10019 echo "$as_me:10019: result: $with_sp_funcs" >&5
10020 echo "${ECHO_T}$with_sp_funcs" >&6
10021 if test "$with_sp_funcs" = yes ; then
10022         NCURSES_SP_FUNCS=1
10023         cat >>confdefs.h <<\EOF
10024 #define NCURSES_SP_FUNCS 1
10025 EOF
10026
10027         GENERATED_SP_FUNCS=generated
10028 else
10029         NCURSES_SP_FUNCS=0
10030         GENERATED_SP_FUNCS=
10031 fi
10032
10033 echo "$as_me:10033: checking if you want to build with experimental terminal-driver" >&5
10034 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10035
10036 # Check whether --enable-term-driver or --disable-term-driver was given.
10037 if test "${enable_term_driver+set}" = set; then
10038   enableval="$enable_term_driver"
10039   with_term_driver=$enableval
10040 else
10041   with_term_driver=no
10042 fi;
10043 echo "$as_me:10043: result: $with_term_driver" >&5
10044 echo "${ECHO_T}$with_term_driver" >&6
10045 if test "$with_term_driver" = yes ; then
10046         cat >>confdefs.h <<\EOF
10047 #define USE_TERM_DRIVER 1
10048 EOF
10049
10050         if test "$with_sp_funcs" != yes ; then
10051                 { { echo "$as_me:10051: error: The term-driver option relies upon sp-funcs" >&5
10052 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10053    { (exit 1); exit 1; }; }
10054         fi
10055 fi
10056
10057 ###   use option --enable-const to turn on use of const beyond that in XSI.
10058 echo "$as_me:10058: checking for extended use of const keyword" >&5
10059 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10060
10061 # Check whether --enable-const or --disable-const was given.
10062 if test "${enable_const+set}" = set; then
10063   enableval="$enable_const"
10064   with_ext_const=$enableval
10065 else
10066   with_ext_const=no
10067 fi;
10068 echo "$as_me:10068: result: $with_ext_const" >&5
10069 echo "${ECHO_T}$with_ext_const" >&6
10070 NCURSES_CONST='/*nothing*/'
10071 if test "$with_ext_const" = yes ; then
10072         NCURSES_CONST=const
10073 fi
10074
10075 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10076 echo "$as_me:10076: checking if you want to use extended colors" >&5
10077 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10078
10079 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10080 if test "${enable_ext_colors+set}" = set; then
10081   enableval="$enable_ext_colors"
10082   with_ext_colors=$enableval
10083 else
10084   with_ext_colors=no
10085 fi;
10086 echo "$as_me:10086: result: $with_ext_colors" >&5
10087 echo "${ECHO_T}$with_ext_colors" >&6
10088 NCURSES_EXT_COLORS=0
10089 if test "$with_ext_colors" = yes ; then
10090         if test "$with_widec" != yes ; then
10091                 { { echo "$as_me:10091: error: This option applies only to wide-character library" >&5
10092 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10093    { (exit 1); exit 1; }; }
10094         else
10095                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10096
10097 if test "${with_abi_version+set}" != set; then
10098         case $cf_cv_rel_version in
10099         5.*)
10100                 cf_cv_rel_version=6.0
10101                 cf_cv_abi_version=6
10102                 { echo "$as_me:10102: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10103 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10104                 ;;
10105         esac
10106 fi
10107
10108         fi
10109         NCURSES_EXT_COLORS=1
10110         cat >>confdefs.h <<\EOF
10111 #define NCURSES_EXT_COLORS 1
10112 EOF
10113
10114 fi
10115
10116 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10117 echo "$as_me:10117: checking if you want to use extended mouse encoding" >&5
10118 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10119
10120 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10121 if test "${enable_ext_mouse+set}" = set; then
10122   enableval="$enable_ext_mouse"
10123   with_ext_mouse=$enableval
10124 else
10125   with_ext_mouse=no
10126 fi;
10127 echo "$as_me:10127: result: $with_ext_mouse" >&5
10128 echo "${ECHO_T}$with_ext_mouse" >&6
10129 NCURSES_MOUSE_VERSION=1
10130 if test "$with_ext_mouse" = yes ; then
10131         NCURSES_MOUSE_VERSION=2
10132
10133 if test "${with_abi_version+set}" != set; then
10134         case $cf_cv_rel_version in
10135         5.*)
10136                 cf_cv_rel_version=6.0
10137                 cf_cv_abi_version=6
10138                 { echo "$as_me:10138: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10139 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10140                 ;;
10141         esac
10142 fi
10143
10144 fi
10145
10146 echo "$as_me:10146: checking if you want \$NCURSES_NO_PADDING code" >&5
10147 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10148
10149 # Check whether --enable-no-padding or --disable-no-padding was given.
10150 if test "${enable_no_padding+set}" = set; then
10151   enableval="$enable_no_padding"
10152   with_no_padding=$enableval
10153 else
10154   with_no_padding=$with_ext_funcs
10155 fi;
10156 echo "$as_me:10156: result: $with_no_padding" >&5
10157 echo "${ECHO_T}$with_no_padding" >&6
10158 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10159 #define NCURSES_NO_PADDING 1
10160 EOF
10161
10162 echo "$as_me:10162: checking for ANSI C header files" >&5
10163 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10164 if test "${ac_cv_header_stdc+set}" = set; then
10165   echo $ECHO_N "(cached) $ECHO_C" >&6
10166 else
10167   cat >conftest.$ac_ext <<_ACEOF
10168 #line 10168 "configure"
10169 #include "confdefs.h"
10170 #include <stdlib.h>
10171 #include <stdarg.h>
10172 #include <string.h>
10173 #include <float.h>
10174
10175 _ACEOF
10176 if { (eval echo "$as_me:10176: \"$ac_cpp conftest.$ac_ext\"") >&5
10177   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10178   ac_status=$?
10179   egrep -v '^ *\+' conftest.er1 >conftest.err
10180   rm -f conftest.er1
10181   cat conftest.err >&5
10182   echo "$as_me:10182: \$? = $ac_status" >&5
10183   (exit $ac_status); } >/dev/null; then
10184   if test -s conftest.err; then
10185     ac_cpp_err=$ac_c_preproc_warn_flag
10186   else
10187     ac_cpp_err=
10188   fi
10189 else
10190   ac_cpp_err=yes
10191 fi
10192 if test -z "$ac_cpp_err"; then
10193   ac_cv_header_stdc=yes
10194 else
10195   echo "$as_me: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   ac_cv_header_stdc=no
10198 fi
10199 rm -f conftest.err conftest.$ac_ext
10200
10201 if test $ac_cv_header_stdc = yes; then
10202   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10203   cat >conftest.$ac_ext <<_ACEOF
10204 #line 10204 "configure"
10205 #include "confdefs.h"
10206 #include <string.h>
10207
10208 _ACEOF
10209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10210   egrep "memchr" >/dev/null 2>&1; then
10211   :
10212 else
10213   ac_cv_header_stdc=no
10214 fi
10215 rm -f conftest*
10216
10217 fi
10218
10219 if test $ac_cv_header_stdc = yes; then
10220   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10221   cat >conftest.$ac_ext <<_ACEOF
10222 #line 10222 "configure"
10223 #include "confdefs.h"
10224 #include <stdlib.h>
10225
10226 _ACEOF
10227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10228   egrep "free" >/dev/null 2>&1; then
10229   :
10230 else
10231   ac_cv_header_stdc=no
10232 fi
10233 rm -f conftest*
10234
10235 fi
10236
10237 if test $ac_cv_header_stdc = yes; then
10238   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10239   if test "$cross_compiling" = yes; then
10240   :
10241 else
10242   cat >conftest.$ac_ext <<_ACEOF
10243 #line 10243 "configure"
10244 #include "confdefs.h"
10245 #include <ctype.h>
10246 #if ((' ' & 0x0FF) == 0x020)
10247 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10248 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10249 #else
10250 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10251                      || ('j' <= (c) && (c) <= 'r') \
10252                      || ('s' <= (c) && (c) <= 'z'))
10253 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10254 #endif
10255
10256 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10257 int
10258 main ()
10259 {
10260   int i;
10261   for (i = 0; i < 256; i++)
10262     if (XOR (islower (i), ISLOWER (i))
10263         || toupper (i) != TOUPPER (i))
10264       $ac_main_return(2);
10265   $ac_main_return (0);
10266 }
10267 _ACEOF
10268 rm -f conftest$ac_exeext
10269 if { (eval echo "$as_me:10269: \"$ac_link\"") >&5
10270   (eval $ac_link) 2>&5
10271   ac_status=$?
10272   echo "$as_me:10272: \$? = $ac_status" >&5
10273   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10274   { (eval echo "$as_me:10274: \"$ac_try\"") >&5
10275   (eval $ac_try) 2>&5
10276   ac_status=$?
10277   echo "$as_me:10277: \$? = $ac_status" >&5
10278   (exit $ac_status); }; }; then
10279   :
10280 else
10281   echo "$as_me: program exited with status $ac_status" >&5
10282 echo "$as_me: failed program was:" >&5
10283 cat conftest.$ac_ext >&5
10284 ac_cv_header_stdc=no
10285 fi
10286 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10287 fi
10288 fi
10289 fi
10290 echo "$as_me:10290: result: $ac_cv_header_stdc" >&5
10291 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10292 if test $ac_cv_header_stdc = yes; then
10293
10294 cat >>confdefs.h <<\EOF
10295 #define STDC_HEADERS 1
10296 EOF
10297
10298 fi
10299
10300 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10301
10302 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10303                   inttypes.h stdint.h unistd.h
10304 do
10305 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10306 echo "$as_me:10306: checking for $ac_header" >&5
10307 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10309   echo $ECHO_N "(cached) $ECHO_C" >&6
10310 else
10311   cat >conftest.$ac_ext <<_ACEOF
10312 #line 10312 "configure"
10313 #include "confdefs.h"
10314 $ac_includes_default
10315 #include <$ac_header>
10316 _ACEOF
10317 rm -f conftest.$ac_objext
10318 if { (eval echo "$as_me:10318: \"$ac_compile\"") >&5
10319   (eval $ac_compile) 2>&5
10320   ac_status=$?
10321   echo "$as_me:10321: \$? = $ac_status" >&5
10322   (exit $ac_status); } &&
10323          { ac_try='test -s conftest.$ac_objext'
10324   { (eval echo "$as_me:10324: \"$ac_try\"") >&5
10325   (eval $ac_try) 2>&5
10326   ac_status=$?
10327   echo "$as_me:10327: \$? = $ac_status" >&5
10328   (exit $ac_status); }; }; then
10329   eval "$as_ac_Header=yes"
10330 else
10331   echo "$as_me: failed program was:" >&5
10332 cat conftest.$ac_ext >&5
10333 eval "$as_ac_Header=no"
10334 fi
10335 rm -f conftest.$ac_objext conftest.$ac_ext
10336 fi
10337 echo "$as_me:10337: result: `eval echo '${'$as_ac_Header'}'`" >&5
10338 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10339 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10340   cat >>confdefs.h <<EOF
10341 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10342 EOF
10343
10344 fi
10345 done
10346
10347 echo "$as_me:10347: checking for signed char" >&5
10348 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10349 if test "${ac_cv_type_signed_char+set}" = set; then
10350   echo $ECHO_N "(cached) $ECHO_C" >&6
10351 else
10352   cat >conftest.$ac_ext <<_ACEOF
10353 #line 10353 "configure"
10354 #include "confdefs.h"
10355 $ac_includes_default
10356 int
10357 main ()
10358 {
10359 if ((signed char *) 0)
10360   return 0;
10361 if (sizeof (signed char))
10362   return 0;
10363   ;
10364   return 0;
10365 }
10366 _ACEOF
10367 rm -f conftest.$ac_objext
10368 if { (eval echo "$as_me:10368: \"$ac_compile\"") >&5
10369   (eval $ac_compile) 2>&5
10370   ac_status=$?
10371   echo "$as_me:10371: \$? = $ac_status" >&5
10372   (exit $ac_status); } &&
10373          { ac_try='test -s conftest.$ac_objext'
10374   { (eval echo "$as_me:10374: \"$ac_try\"") >&5
10375   (eval $ac_try) 2>&5
10376   ac_status=$?
10377   echo "$as_me:10377: \$? = $ac_status" >&5
10378   (exit $ac_status); }; }; then
10379   ac_cv_type_signed_char=yes
10380 else
10381   echo "$as_me: failed program was:" >&5
10382 cat conftest.$ac_ext >&5
10383 ac_cv_type_signed_char=no
10384 fi
10385 rm -f conftest.$ac_objext conftest.$ac_ext
10386 fi
10387 echo "$as_me:10387: result: $ac_cv_type_signed_char" >&5
10388 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10389
10390 echo "$as_me:10390: checking size of signed char" >&5
10391 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10392 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10393   echo $ECHO_N "(cached) $ECHO_C" >&6
10394 else
10395   if test "$ac_cv_type_signed_char" = yes; then
10396   if test "$cross_compiling" = yes; then
10397   # Depending upon the size, compute the lo and hi bounds.
10398 cat >conftest.$ac_ext <<_ACEOF
10399 #line 10399 "configure"
10400 #include "confdefs.h"
10401 $ac_includes_default
10402 int
10403 main ()
10404 {
10405 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10406   ;
10407   return 0;
10408 }
10409 _ACEOF
10410 rm -f conftest.$ac_objext
10411 if { (eval echo "$as_me:10411: \"$ac_compile\"") >&5
10412   (eval $ac_compile) 2>&5
10413   ac_status=$?
10414   echo "$as_me:10414: \$? = $ac_status" >&5
10415   (exit $ac_status); } &&
10416          { ac_try='test -s conftest.$ac_objext'
10417   { (eval echo "$as_me:10417: \"$ac_try\"") >&5
10418   (eval $ac_try) 2>&5
10419   ac_status=$?
10420   echo "$as_me:10420: \$? = $ac_status" >&5
10421   (exit $ac_status); }; }; then
10422   ac_lo=0 ac_mid=0
10423   while :; do
10424     cat >conftest.$ac_ext <<_ACEOF
10425 #line 10425 "configure"
10426 #include "confdefs.h"
10427 $ac_includes_default
10428 int
10429 main ()
10430 {
10431 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10432   ;
10433   return 0;
10434 }
10435 _ACEOF
10436 rm -f conftest.$ac_objext
10437 if { (eval echo "$as_me:10437: \"$ac_compile\"") >&5
10438   (eval $ac_compile) 2>&5
10439   ac_status=$?
10440   echo "$as_me:10440: \$? = $ac_status" >&5
10441   (exit $ac_status); } &&
10442          { ac_try='test -s conftest.$ac_objext'
10443   { (eval echo "$as_me:10443: \"$ac_try\"") >&5
10444   (eval $ac_try) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit $ac_status); }; }; then
10448   ac_hi=$ac_mid; break
10449 else
10450   echo "$as_me: failed program was:" >&5
10451 cat conftest.$ac_ext >&5
10452 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10453 fi
10454 rm -f conftest.$ac_objext conftest.$ac_ext
10455   done
10456 else
10457   echo "$as_me: failed program was:" >&5
10458 cat conftest.$ac_ext >&5
10459 ac_hi=-1 ac_mid=-1
10460   while :; do
10461     cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464 $ac_includes_default
10465 int
10466 main ()
10467 {
10468 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10469   ;
10470   return 0;
10471 }
10472 _ACEOF
10473 rm -f conftest.$ac_objext
10474 if { (eval echo "$as_me:10474: \"$ac_compile\"") >&5
10475   (eval $ac_compile) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); } &&
10479          { ac_try='test -s conftest.$ac_objext'
10480   { (eval echo "$as_me:10480: \"$ac_try\"") >&5
10481   (eval $ac_try) 2>&5
10482   ac_status=$?
10483   echo "$as_me:10483: \$? = $ac_status" >&5
10484   (exit $ac_status); }; }; then
10485   ac_lo=$ac_mid; break
10486 else
10487   echo "$as_me: failed program was:" >&5
10488 cat conftest.$ac_ext >&5
10489 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10490 fi
10491 rm -f conftest.$ac_objext conftest.$ac_ext
10492   done
10493 fi
10494 rm -f conftest.$ac_objext conftest.$ac_ext
10495 # Binary search between lo and hi bounds.
10496 while test "x$ac_lo" != "x$ac_hi"; do
10497   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10498   cat >conftest.$ac_ext <<_ACEOF
10499 #line 10499 "configure"
10500 #include "confdefs.h"
10501 $ac_includes_default
10502 int
10503 main ()
10504 {
10505 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10506   ;
10507   return 0;
10508 }
10509 _ACEOF
10510 rm -f conftest.$ac_objext
10511 if { (eval echo "$as_me:10511: \"$ac_compile\"") >&5
10512   (eval $ac_compile) 2>&5
10513   ac_status=$?
10514   echo "$as_me:10514: \$? = $ac_status" >&5
10515   (exit $ac_status); } &&
10516          { ac_try='test -s conftest.$ac_objext'
10517   { (eval echo "$as_me:10517: \"$ac_try\"") >&5
10518   (eval $ac_try) 2>&5
10519   ac_status=$?
10520   echo "$as_me:10520: \$? = $ac_status" >&5
10521   (exit $ac_status); }; }; then
10522   ac_hi=$ac_mid
10523 else
10524   echo "$as_me: failed program was:" >&5
10525 cat conftest.$ac_ext >&5
10526 ac_lo=`expr $ac_mid + 1`
10527 fi
10528 rm -f conftest.$ac_objext conftest.$ac_ext
10529 done
10530 ac_cv_sizeof_signed_char=$ac_lo
10531 else
10532   if test "$cross_compiling" = yes; then
10533   { { echo "$as_me:10533: error: cannot run test program while cross compiling" >&5
10534 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10535    { (exit 1); exit 1; }; }
10536 else
10537   cat >conftest.$ac_ext <<_ACEOF
10538 #line 10538 "configure"
10539 #include "confdefs.h"
10540 $ac_includes_default
10541 int
10542 main ()
10543 {
10544 FILE *f = fopen ("conftest.val", "w");
10545 if (!f)
10546   $ac_main_return (1);
10547 fprintf (f, "%d", (sizeof (signed char)));
10548 fclose (f);
10549   ;
10550   return 0;
10551 }
10552 _ACEOF
10553 rm -f conftest$ac_exeext
10554 if { (eval echo "$as_me:10554: \"$ac_link\"") >&5
10555   (eval $ac_link) 2>&5
10556   ac_status=$?
10557   echo "$as_me:10557: \$? = $ac_status" >&5
10558   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10559   { (eval echo "$as_me:10559: \"$ac_try\"") >&5
10560   (eval $ac_try) 2>&5
10561   ac_status=$?
10562   echo "$as_me:10562: \$? = $ac_status" >&5
10563   (exit $ac_status); }; }; then
10564   ac_cv_sizeof_signed_char=`cat conftest.val`
10565 else
10566   echo "$as_me: program exited with status $ac_status" >&5
10567 echo "$as_me: failed program was:" >&5
10568 cat conftest.$ac_ext >&5
10569 fi
10570 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10571 fi
10572 fi
10573 rm -f conftest.val
10574 else
10575   ac_cv_sizeof_signed_char=0
10576 fi
10577 fi
10578 echo "$as_me:10578: result: $ac_cv_sizeof_signed_char" >&5
10579 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10580 cat >>confdefs.h <<EOF
10581 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10582 EOF
10583
10584 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10585         NCURSES_SBOOL="signed char"
10586 else
10587         NCURSES_SBOOL="char"
10588 fi
10589 echo "$as_me:10589: checking if you want to use signed Boolean array in term.h" >&5
10590 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10591
10592 # Check whether --enable-signed-char or --disable-signed-char was given.
10593 if test "${enable_signed_char+set}" = set; then
10594   enableval="$enable_signed_char"
10595   with_signed_char=$enableval
10596 else
10597   with_signed_char=no
10598 fi;
10599 echo "$as_me:10599: result: $with_signed_char" >&5
10600 echo "${ECHO_T}$with_signed_char" >&6
10601 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10602
10603 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10604 echo "$as_me:10604: checking if you want SIGWINCH handler" >&5
10605 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10606
10607 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10608 if test "${enable_sigwinch+set}" = set; then
10609   enableval="$enable_sigwinch"
10610   with_sigwinch=$enableval
10611 else
10612   with_sigwinch=$with_ext_funcs
10613 fi;
10614 echo "$as_me:10614: result: $with_sigwinch" >&5
10615 echo "${ECHO_T}$with_sigwinch" >&6
10616 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10617 #define USE_SIGWINCH 1
10618 EOF
10619
10620 ###   use option --enable-tcap-names to allow user to define new capabilities
10621 echo "$as_me:10621: checking if you want user-definable terminal capabilities like termcap" >&5
10622 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10623
10624 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10625 if test "${enable_tcap_names+set}" = set; then
10626   enableval="$enable_tcap_names"
10627   with_tcap_names=$enableval
10628 else
10629   with_tcap_names=$with_ext_funcs
10630 fi;
10631 echo "$as_me:10631: result: $with_tcap_names" >&5
10632 echo "${ECHO_T}$with_tcap_names" >&6
10633 NCURSES_XNAMES=0
10634 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10635
10636 ###############################################################################
10637 # These options are relatively safe to experiment with.
10638
10639 echo "$as_me:10639: checking if you want all development code" >&5
10640 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10641
10642 # Check whether --with-develop or --without-develop was given.
10643 if test "${with_develop+set}" = set; then
10644   withval="$with_develop"
10645   with_develop=$withval
10646 else
10647   with_develop=no
10648 fi;
10649 echo "$as_me:10649: result: $with_develop" >&5
10650 echo "${ECHO_T}$with_develop" >&6
10651
10652 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10653 echo "$as_me:10653: checking if you want hard-tabs code" >&5
10654 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10655
10656 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10657 if test "${enable_hard_tabs+set}" = set; then
10658   enableval="$enable_hard_tabs"
10659
10660 else
10661   enable_hard_tabs=$with_develop
10662 fi;
10663 echo "$as_me:10663: result: $enable_hard_tabs" >&5
10664 echo "${ECHO_T}$enable_hard_tabs" >&6
10665 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10666 #define USE_HARD_TABS 1
10667 EOF
10668
10669 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10670 echo "$as_me:10670: checking if you want limited support for xmc" >&5
10671 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10672
10673 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10674 if test "${enable_xmc_glitch+set}" = set; then
10675   enableval="$enable_xmc_glitch"
10676
10677 else
10678   enable_xmc_glitch=$with_develop
10679 fi;
10680 echo "$as_me:10680: result: $enable_xmc_glitch" >&5
10681 echo "${ECHO_T}$enable_xmc_glitch" >&6
10682 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10683 #define USE_XMC_SUPPORT 1
10684 EOF
10685
10686 ###############################################################################
10687 # These are just experimental, probably should not be in a package:
10688
10689 echo "$as_me:10689: checking if you do not want to assume colors are white-on-black" >&5
10690 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10691
10692 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10693 if test "${enable_assumed_color+set}" = set; then
10694   enableval="$enable_assumed_color"
10695   with_assumed_color=$enableval
10696 else
10697   with_assumed_color=yes
10698 fi;
10699 echo "$as_me:10699: result: $with_assumed_color" >&5
10700 echo "${ECHO_T}$with_assumed_color" >&6
10701 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10702 #define USE_ASSUMED_COLOR 1
10703 EOF
10704
10705 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10706 echo "$as_me:10706: checking if you want hashmap scrolling-optimization code" >&5
10707 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10708
10709 # Check whether --enable-hashmap or --disable-hashmap was given.
10710 if test "${enable_hashmap+set}" = set; then
10711   enableval="$enable_hashmap"
10712   with_hashmap=$enableval
10713 else
10714   with_hashmap=yes
10715 fi;
10716 echo "$as_me:10716: result: $with_hashmap" >&5
10717 echo "${ECHO_T}$with_hashmap" >&6
10718 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10719 #define USE_HASHMAP 1
10720 EOF
10721
10722 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10723 echo "$as_me:10723: checking if you want colorfgbg code" >&5
10724 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10725
10726 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10727 if test "${enable_colorfgbg+set}" = set; then
10728   enableval="$enable_colorfgbg"
10729   with_colorfgbg=$enableval
10730 else
10731   with_colorfgbg=no
10732 fi;
10733 echo "$as_me:10733: result: $with_colorfgbg" >&5
10734 echo "${ECHO_T}$with_colorfgbg" >&6
10735 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10736 #define USE_COLORFGBG 1
10737 EOF
10738
10739 ###   use option --enable-interop to turn on use of bindings used for interop
10740 echo "$as_me:10740: checking if you want interop bindings" >&5
10741 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10742
10743 # Check whether --enable-interop or --disable-interop was given.
10744 if test "${enable_interop+set}" = set; then
10745   enableval="$enable_interop"
10746   with_exp_interop=$enableval
10747 else
10748   with_exp_interop=no
10749 fi;
10750 echo "$as_me:10750: result: $with_exp_interop" >&5
10751 echo "${ECHO_T}$with_exp_interop" >&6
10752
10753 NCURSES_INTEROP_FUNCS=0
10754 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10755
10756 # This is still experimental (20080329), but should ultimately be moved to
10757 # the script-block --with-normal, etc.
10758
10759 echo "$as_me:10759: checking if you want to link with the pthread library" >&5
10760 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10761
10762 # Check whether --with-pthread or --without-pthread was given.
10763 if test "${with_pthread+set}" = set; then
10764   withval="$with_pthread"
10765   with_pthread=$withval
10766 else
10767   with_pthread=no
10768 fi;
10769 echo "$as_me:10769: result: $with_pthread" >&5
10770 echo "${ECHO_T}$with_pthread" >&6
10771
10772 if test "$with_pthread" != no ; then
10773     echo "$as_me:10773: checking for pthread.h" >&5
10774 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10775 if test "${ac_cv_header_pthread_h+set}" = set; then
10776   echo $ECHO_N "(cached) $ECHO_C" >&6
10777 else
10778   cat >conftest.$ac_ext <<_ACEOF
10779 #line 10779 "configure"
10780 #include "confdefs.h"
10781 #include <pthread.h>
10782 _ACEOF
10783 if { (eval echo "$as_me:10783: \"$ac_cpp conftest.$ac_ext\"") >&5
10784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10785   ac_status=$?
10786   egrep -v '^ *\+' conftest.er1 >conftest.err
10787   rm -f conftest.er1
10788   cat conftest.err >&5
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit $ac_status); } >/dev/null; then
10791   if test -s conftest.err; then
10792     ac_cpp_err=$ac_c_preproc_warn_flag
10793   else
10794     ac_cpp_err=
10795   fi
10796 else
10797   ac_cpp_err=yes
10798 fi
10799 if test -z "$ac_cpp_err"; then
10800   ac_cv_header_pthread_h=yes
10801 else
10802   echo "$as_me: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   ac_cv_header_pthread_h=no
10805 fi
10806 rm -f conftest.err conftest.$ac_ext
10807 fi
10808 echo "$as_me:10808: result: $ac_cv_header_pthread_h" >&5
10809 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10810 if test $ac_cv_header_pthread_h = yes; then
10811
10812         cat >>confdefs.h <<\EOF
10813 #define HAVE_PTHREADS_H 1
10814 EOF
10815
10816         echo "$as_me:10816: checking if we can link with the pthread library" >&5
10817 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10818         cf_save_LIBS="$LIBS"
10819         LIBS="-lpthread $LIBS"
10820         cat >conftest.$ac_ext <<_ACEOF
10821 #line 10821 "configure"
10822 #include "confdefs.h"
10823
10824 #include <pthread.h>
10825
10826 int
10827 main ()
10828 {
10829
10830         int rc = pthread_create(0,0,0,0);
10831
10832   ;
10833   return 0;
10834 }
10835 _ACEOF
10836 rm -f conftest.$ac_objext conftest$ac_exeext
10837 if { (eval echo "$as_me:10837: \"$ac_link\"") >&5
10838   (eval $ac_link) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit $ac_status); } &&
10842          { ac_try='test -s conftest$ac_exeext'
10843   { (eval echo "$as_me:10843: \"$ac_try\"") >&5
10844   (eval $ac_try) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit $ac_status); }; }; then
10848   with_pthread=yes
10849 else
10850   echo "$as_me: failed program was:" >&5
10851 cat conftest.$ac_ext >&5
10852 with_pthread=no
10853 fi
10854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10855         LIBS="$cf_save_LIBS"
10856         echo "$as_me:10856: result: $with_pthread" >&5
10857 echo "${ECHO_T}$with_pthread" >&6
10858
10859         if test "$with_pthread" = yes ; then
10860             LIBS="-lpthread $LIBS"
10861             cat >>confdefs.h <<\EOF
10862 #define HAVE_LIBPTHREADS 1
10863 EOF
10864
10865         else
10866             { { echo "$as_me:10866: error: Cannot link with pthread library" >&5
10867 echo "$as_me: error: Cannot link with pthread library" >&2;}
10868    { (exit 1); exit 1; }; }
10869         fi
10870
10871 fi
10872
10873 fi
10874
10875 echo "$as_me:10875: checking if you want to allow EINTR in wgetch with pthreads" >&5
10876 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
10877
10878 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
10879 if test "${enable_pthreads_eintr+set}" = set; then
10880   enableval="$enable_pthreads_eintr"
10881   use_pthreads_eintr=$enableval
10882 else
10883   use_pthreads_eintr=no
10884 fi;
10885 echo "$as_me:10885: result: $use_pthreads_eintr" >&5
10886 echo "${ECHO_T}$use_pthreads_eintr" >&6
10887 if test $use_pthreads_eintr = yes ; then
10888     cat >>confdefs.h <<\EOF
10889 #define USE_PTHREADS_EINTR 1
10890 EOF
10891
10892 fi
10893
10894 echo "$as_me:10894: checking if you want to use weak-symbols for pthreads" >&5
10895 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10896
10897 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10898 if test "${enable_weak_symbols+set}" = set; then
10899   enableval="$enable_weak_symbols"
10900   use_weak_symbols=$enableval
10901 else
10902   use_weak_symbols=no
10903 fi;
10904 echo "$as_me:10904: result: $use_weak_symbols" >&5
10905 echo "${ECHO_T}$use_weak_symbols" >&6
10906 if test "$use_weak_symbols" = yes ; then
10907
10908 echo "$as_me:10908: checking if $CC supports weak symbols" >&5
10909 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10910 if test "${cf_cv_weak_symbols+set}" = set; then
10911   echo $ECHO_N "(cached) $ECHO_C" >&6
10912 else
10913
10914 cat >conftest.$ac_ext <<_ACEOF
10915 #line 10915 "configure"
10916 #include "confdefs.h"
10917
10918 #include <stdio.h>
10919 int
10920 main ()
10921 {
10922
10923 #if defined(__GNUC__)
10924 #  if defined __USE_ISOC99
10925 #    define _cat_pragma(exp)    _Pragma(#exp)
10926 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10927 #  else
10928 #    define _weak_pragma(exp)
10929 #  endif
10930 #  define _declare(name)        __extension__ extern __typeof__(name) name
10931 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10932 #endif
10933
10934 weak_symbol(fopen);
10935
10936   ;
10937   return 0;
10938 }
10939 _ACEOF
10940 rm -f conftest.$ac_objext
10941 if { (eval echo "$as_me:10941: \"$ac_compile\"") >&5
10942   (eval $ac_compile) 2>&5
10943   ac_status=$?
10944   echo "$as_me:10944: \$? = $ac_status" >&5
10945   (exit $ac_status); } &&
10946          { ac_try='test -s conftest.$ac_objext'
10947   { (eval echo "$as_me:10947: \"$ac_try\"") >&5
10948   (eval $ac_try) 2>&5
10949   ac_status=$?
10950   echo "$as_me:10950: \$? = $ac_status" >&5
10951   (exit $ac_status); }; }; then
10952   cf_cv_weak_symbols=yes
10953 else
10954   echo "$as_me: failed program was:" >&5
10955 cat conftest.$ac_ext >&5
10956 cf_cv_weak_symbols=no
10957 fi
10958 rm -f conftest.$ac_objext conftest.$ac_ext
10959
10960 fi
10961 echo "$as_me:10961: result: $cf_cv_weak_symbols" >&5
10962 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10963
10964 else
10965     cf_cv_weak_symbols=no
10966 fi
10967
10968 if test $cf_cv_weak_symbols = yes ; then
10969     cat >>confdefs.h <<\EOF
10970 #define USE_WEAK_SYMBOLS 1
10971 EOF
10972
10973 fi
10974
10975 PTHREAD=
10976 if test "$with_pthread" = "yes" ; then
10977     cat >>confdefs.h <<\EOF
10978 #define USE_PTHREADS 1
10979 EOF
10980
10981     enable_reentrant=yes
10982     if test $cf_cv_weak_symbols = yes ; then
10983         PTHREAD=-lpthread
10984     fi
10985 fi
10986
10987 # Reentrant code has to be opaque; there's little advantage to making ncurses
10988 # opaque outside of that, so there is no --enable-opaque option.  We can use
10989 # this option without --with-pthreads, but this will be always set for
10990 # pthreads.
10991 echo "$as_me:10991: checking if you want experimental reentrant code" >&5
10992 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10993
10994 # Check whether --enable-reentrant or --disable-reentrant was given.
10995 if test "${enable_reentrant+set}" = set; then
10996   enableval="$enable_reentrant"
10997   with_reentrant=$enableval
10998 else
10999   with_reentrant=no
11000 fi;
11001 echo "$as_me:11001: result: $with_reentrant" >&5
11002 echo "${ECHO_T}$with_reentrant" >&6
11003 if test "$with_reentrant" = yes ; then
11004         cf_cv_enable_reentrant=1
11005         cf_cv_enable_opaque="NCURSES_INTERNALS"
11006         NCURSES_OPAQUE=1
11007         NCURSES_SIZE_T=int
11008         if test $cf_cv_weak_symbols = yes ; then
11009
11010 # remove pthread library from $LIBS
11011 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11012
11013                 TEST_LIBS="-lpthread $TEST_LIBS"
11014                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11015         fi
11016         LIB_SUFFIX="t${LIB_SUFFIX}"
11017         cat >>confdefs.h <<\EOF
11018 #define USE_REENTRANT 1
11019 EOF
11020
11021 if test "${with_abi_version+set}" != set; then
11022         case $cf_cv_rel_version in
11023         5.*)
11024                 cf_cv_rel_version=6.0
11025                 cf_cv_abi_version=6
11026                 { echo "$as_me:11026: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11027 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11028                 ;;
11029         esac
11030 fi
11031
11032 else
11033         cf_cv_enable_reentrant=0
11034         cf_cv_enable_opaque="NCURSES_OPAQUE"
11035         NCURSES_OPAQUE=0
11036         NCURSES_SIZE_T=short
11037 fi
11038
11039 ### Allow using a different wrap-prefix
11040 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11041         echo "$as_me:11041: checking for prefix used to wrap public variables" >&5
11042 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11043
11044 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11045 if test "${with_wrap_prefix+set}" = set; then
11046   withval="$with_wrap_prefix"
11047   NCURSES_WRAP_PREFIX=$withval
11048 else
11049   NCURSES_WRAP_PREFIX=_nc_
11050 fi;
11051         echo "$as_me:11051: result: $NCURSES_WRAP_PREFIX" >&5
11052 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11053 else
11054         NCURSES_WRAP_PREFIX=_nc_
11055 fi
11056
11057 cat >>confdefs.h <<EOF
11058 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11059 EOF
11060
11061 echo "$as_me:11061: checking if you want experimental safe-sprintf code" >&5
11062 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11063
11064 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11065 if test "${enable_safe_sprintf+set}" = set; then
11066   enableval="$enable_safe_sprintf"
11067   with_safe_sprintf=$enableval
11068 else
11069   with_safe_sprintf=no
11070 fi;
11071 echo "$as_me:11071: result: $with_safe_sprintf" >&5
11072 echo "${ECHO_T}$with_safe_sprintf" >&6
11073 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11074 #define USE_SAFE_SPRINTF 1
11075 EOF
11076
11077 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11078 # when hashmap is used scroll hints are useless
11079 if test "$with_hashmap" = no ; then
11080 echo "$as_me:11080: checking if you want to experiment without scrolling-hints code" >&5
11081 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11082
11083 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11084 if test "${enable_scroll_hints+set}" = set; then
11085   enableval="$enable_scroll_hints"
11086   with_scroll_hints=$enableval
11087 else
11088   with_scroll_hints=yes
11089 fi;
11090 echo "$as_me:11090: result: $with_scroll_hints" >&5
11091 echo "${ECHO_T}$with_scroll_hints" >&6
11092 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11093 #define USE_SCROLL_HINTS 1
11094 EOF
11095
11096 fi
11097
11098 echo "$as_me:11098: checking if you want experimental wgetch-events code" >&5
11099 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11100
11101 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11102 if test "${enable_wgetch_events+set}" = set; then
11103   enableval="$enable_wgetch_events"
11104   with_wgetch_events=$enableval
11105 else
11106   with_wgetch_events=no
11107 fi;
11108 echo "$as_me:11108: result: $with_wgetch_events" >&5
11109 echo "${ECHO_T}$with_wgetch_events" >&6
11110 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11111 #define NCURSES_WGETCH_EVENTS 1
11112 EOF
11113
11114 ###############################################################################
11115
11116 ###     use option --disable-echo to suppress full display compiling commands
11117 echo "$as_me:11117: checking if you want to display full commands during build" >&5
11118 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11119
11120 # Check whether --enable-echo or --disable-echo was given.
11121 if test "${enable_echo+set}" = set; then
11122   enableval="$enable_echo"
11123   with_echo=$enableval
11124 else
11125   with_echo=yes
11126 fi;
11127 if test "$with_echo" = yes; then
11128         ECHO_LINK=
11129 else
11130         ECHO_LINK='@ echo linking $@ ... ;'
11131         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11132         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11133 fi
11134 echo "$as_me:11134: result: $with_echo" >&5
11135 echo "${ECHO_T}$with_echo" >&6
11136
11137 ###     use option --enable-warnings to turn on all gcc warnings
11138 echo "$as_me:11138: checking if you want to see compiler warnings" >&5
11139 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11140
11141 # Check whether --enable-warnings or --disable-warnings was given.
11142 if test "${enable_warnings+set}" = set; then
11143   enableval="$enable_warnings"
11144   with_warnings=$enableval
11145 fi;
11146 echo "$as_me:11146: result: $with_warnings" >&5
11147 echo "${ECHO_T}$with_warnings" >&6
11148
11149 if test "x$with_warnings" = "xyes"; then
11150
11151         ADAFLAGS="$ADAFLAGS -gnatg"
11152
11153 INTEL_COMPILER=no
11154
11155 if test "$GCC" = yes ; then
11156         case $host_os in
11157         linux*|gnu*)
11158                 echo "$as_me:11158: checking if this is really Intel C compiler" >&5
11159 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11160                 cf_save_CFLAGS="$CFLAGS"
11161                 CFLAGS="$CFLAGS -no-gcc"
11162                 cat >conftest.$ac_ext <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11165
11166 int
11167 main ()
11168 {
11169
11170 #ifdef __INTEL_COMPILER
11171 #else
11172 make an error
11173 #endif
11174
11175   ;
11176   return 0;
11177 }
11178 _ACEOF
11179 rm -f conftest.$ac_objext
11180 if { (eval echo "$as_me:11180: \"$ac_compile\"") >&5
11181   (eval $ac_compile) 2>&5
11182   ac_status=$?
11183   echo "$as_me:11183: \$? = $ac_status" >&5
11184   (exit $ac_status); } &&
11185          { ac_try='test -s conftest.$ac_objext'
11186   { (eval echo "$as_me:11186: \"$ac_try\"") >&5
11187   (eval $ac_try) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit $ac_status); }; }; then
11191   INTEL_COMPILER=yes
11192 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11193
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat conftest.$ac_ext >&5
11197 fi
11198 rm -f conftest.$ac_objext conftest.$ac_ext
11199                 CFLAGS="$cf_save_CFLAGS"
11200                 echo "$as_me:11200: result: $INTEL_COMPILER" >&5
11201 echo "${ECHO_T}$INTEL_COMPILER" >&6
11202                 ;;
11203         esac
11204 fi
11205
11206 cat > conftest.$ac_ext <<EOF
11207 #line 11207 "${as_me-configure}"
11208 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11209 EOF
11210
11211 if test "$INTEL_COMPILER" = yes
11212 then
11213 # The "-wdXXX" options suppress warnings:
11214 # remark #1419: external declaration in primary source file
11215 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11216 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11217 # remark #193: zero used for undefined preprocessing identifier
11218 # remark #593: variable "curs_sb_left_arrow" was set but never used
11219 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11220 # remark #869: parameter "tw" was never referenced
11221 # remark #981: operands are evaluated in unspecified order
11222 # warning #279: controlling expression is constant
11223
11224         { echo "$as_me:11224: checking for $CC warning options..." >&5
11225 echo "$as_me: checking for $CC warning options..." >&6;}
11226         cf_save_CFLAGS="$CFLAGS"
11227         EXTRA_CFLAGS="-Wall"
11228         for cf_opt in \
11229                 wd1419 \
11230                 wd1683 \
11231                 wd1684 \
11232                 wd193 \
11233                 wd593 \
11234                 wd279 \
11235                 wd810 \
11236                 wd869 \
11237                 wd981
11238         do
11239                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11240                 if { (eval echo "$as_me:11240: \"$ac_compile\"") >&5
11241   (eval $ac_compile) 2>&5
11242   ac_status=$?
11243   echo "$as_me:11243: \$? = $ac_status" >&5
11244   (exit $ac_status); }; then
11245                         test -n "$verbose" && echo "$as_me:11245: result: ... -$cf_opt" >&5
11246 echo "${ECHO_T}... -$cf_opt" >&6
11247                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11248                 fi
11249         done
11250         CFLAGS="$cf_save_CFLAGS"
11251
11252 elif test "$GCC" = yes
11253 then
11254         { echo "$as_me:11254: checking for $CC warning options..." >&5
11255 echo "$as_me: checking for $CC warning options..." >&6;}
11256         cf_save_CFLAGS="$CFLAGS"
11257         EXTRA_CFLAGS=
11258         cf_warn_CONST=""
11259         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11260         for cf_opt in W Wall \
11261                 Wbad-function-cast \
11262                 Wcast-align \
11263                 Wcast-qual \
11264                 Winline \
11265                 Wmissing-declarations \
11266                 Wmissing-prototypes \
11267                 Wnested-externs \
11268                 Wpointer-arith \
11269                 Wshadow \
11270                 Wstrict-prototypes \
11271                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11272         do
11273                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11274                 if { (eval echo "$as_me:11274: \"$ac_compile\"") >&5
11275   (eval $ac_compile) 2>&5
11276   ac_status=$?
11277   echo "$as_me:11277: \$? = $ac_status" >&5
11278   (exit $ac_status); }; then
11279                         test -n "$verbose" && echo "$as_me:11279: result: ... -$cf_opt" >&5
11280 echo "${ECHO_T}... -$cf_opt" >&6
11281                         case $cf_opt in #(vi
11282                         Wcast-qual) #(vi
11283                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11284                                 ;;
11285                         Winline) #(vi
11286                                 case $GCC_VERSION in
11287                                 [34].*)
11288                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11289
11290 echo "${as_me-configure}:11290: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11291
11292                                         continue;;
11293                                 esac
11294                                 ;;
11295                         esac
11296                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11297                 fi
11298         done
11299         CFLAGS="$cf_save_CFLAGS"
11300 fi
11301 rm -f conftest*
11302
11303         if test "$cf_with_cxx" = yes ; then
11304
11305 INTEL_CPLUSPLUS=no
11306
11307 if test "$GCC" = yes ; then
11308         case $host_os in
11309         linux*|gnu*)
11310                 echo "$as_me:11310: checking if this is really Intel C++ compiler" >&5
11311 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11312                 cf_save_CFLAGS="$CXXFLAGS"
11313                 CXXFLAGS="$CXXFLAGS -no-gcc"
11314                 cat >conftest.$ac_ext <<_ACEOF
11315 #line 11315 "configure"
11316 #include "confdefs.h"
11317
11318 int
11319 main ()
11320 {
11321
11322 #ifdef __INTEL_COMPILER
11323 #else
11324 make an error
11325 #endif
11326
11327   ;
11328   return 0;
11329 }
11330 _ACEOF
11331 rm -f conftest.$ac_objext
11332 if { (eval echo "$as_me:11332: \"$ac_compile\"") >&5
11333   (eval $ac_compile) 2>&5
11334   ac_status=$?
11335   echo "$as_me:11335: \$? = $ac_status" >&5
11336   (exit $ac_status); } &&
11337          { ac_try='test -s conftest.$ac_objext'
11338   { (eval echo "$as_me:11338: \"$ac_try\"") >&5
11339   (eval $ac_try) 2>&5
11340   ac_status=$?
11341   echo "$as_me:11341: \$? = $ac_status" >&5
11342   (exit $ac_status); }; }; then
11343   INTEL_CPLUSPLUS=yes
11344 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11345
11346 else
11347   echo "$as_me: failed program was:" >&5
11348 cat conftest.$ac_ext >&5
11349 fi
11350 rm -f conftest.$ac_objext conftest.$ac_ext
11351                 CXXFLAGS="$cf_save_CFLAGS"
11352                 echo "$as_me:11352: result: $INTEL_CPLUSPLUS" >&5
11353 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11354                 ;;
11355         esac
11356 fi
11357
11358 ac_ext=cc
11359 ac_cpp='$CXXCPP $CPPFLAGS'
11360 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11361 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11362 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11363 ac_main_return=return
11364
11365 cat > conftest.$ac_ext <<EOF
11366 #line 11366 "configure"
11367 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11368 EOF
11369
11370 if test "$INTEL_CPLUSPLUS" = yes
11371 then
11372 # The "-wdXXX" options suppress warnings:
11373 # remark #1419: external declaration in primary source file
11374 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11375 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11376 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11377 # remark #193: zero used for undefined preprocessing identifier
11378 # remark #593: variable "curs_sb_left_arrow" was set but never used
11379 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11380 # remark #869: parameter "tw" was never referenced
11381 # remark #981: operands are evaluated in unspecified order
11382 # warning #269: invalid format string conversion
11383
11384         { echo "$as_me:11384: checking for $CC warning options..." >&5
11385 echo "$as_me: checking for $CC warning options..." >&6;}
11386         cf_save_CXXFLAGS="$CXXFLAGS"
11387         EXTRA_CXXFLAGS="-Wall"
11388         for cf_opt in \
11389                 wd1419 \
11390                 wd1682 \
11391                 wd1683 \
11392                 wd1684 \
11393                 wd193 \
11394                 wd279 \
11395                 wd593 \
11396                 wd810 \
11397                 wd869 \
11398                 wd981
11399         do
11400                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11401                 if { (eval echo "$as_me:11401: \"$ac_compile\"") >&5
11402   (eval $ac_compile) 2>&5
11403   ac_status=$?
11404   echo "$as_me:11404: \$? = $ac_status" >&5
11405   (exit $ac_status); }; then
11406                         test -n "$verbose" && echo "$as_me:11406: result: ... -$cf_opt" >&5
11407 echo "${ECHO_T}... -$cf_opt" >&6
11408                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11409                 fi
11410         done
11411         CXXFLAGS="$cf_save_CXXFLAGS"
11412
11413 elif test "$GXX" = yes
11414 then
11415         { echo "$as_me:11415: checking for $CXX warning options..." >&5
11416 echo "$as_me: checking for $CXX warning options..." >&6;}
11417         cf_save_CXXFLAGS="$CXXFLAGS"
11418         EXTRA_CXXFLAGS="-W -Wall"
11419         cf_gxx_extra_warnings=""
11420         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11421         case "$GCC_VERSION" in
11422         [1-2].*)
11423                 ;;
11424         *)
11425                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11426                 ;;
11427         esac
11428         for cf_opt in \
11429                 Wabi \
11430                 fabi-version=0 \
11431                 Woverloaded-virtual \
11432                 Wsign-promo \
11433                 Wsynth \
11434                 Wold-style-cast \
11435                 Wcast-align \
11436                 Wcast-qual \
11437                 Wmissing-prototypes \
11438                 Wpointer-arith \
11439                 Wshadow \
11440                 Wstrict-prototypes \
11441                 Wundef $cf_gxx_extra_warnings Wno-unused
11442         do
11443                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
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); }; then
11449                         test -n "$verbose" && echo "$as_me:11449: result: ... -$cf_opt" >&5
11450 echo "${ECHO_T}... -$cf_opt" >&6
11451                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11452                 else
11453                         test -n "$verbose" && echo "$as_me:11453: result: ... no -$cf_opt" >&5
11454 echo "${ECHO_T}... no -$cf_opt" >&6
11455                 fi
11456         done
11457         CXXFLAGS="$cf_save_CXXFLAGS"
11458 fi
11459
11460 rm -f conftest*
11461 ac_ext=c
11462 ac_cpp='$CPP $CPPFLAGS'
11463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11466 ac_main_return=return
11467
11468         fi
11469 fi
11470
11471 if test "$GCC" = yes
11472 then
11473 cat > conftest.i <<EOF
11474 #ifndef GCC_PRINTF
11475 #define GCC_PRINTF 0
11476 #endif
11477 #ifndef GCC_SCANF
11478 #define GCC_SCANF 0
11479 #endif
11480 #ifndef GCC_NORETURN
11481 #define GCC_NORETURN /* nothing */
11482 #endif
11483 #ifndef GCC_UNUSED
11484 #define GCC_UNUSED /* nothing */
11485 #endif
11486 EOF
11487 if test "$GCC" = yes
11488 then
11489         { echo "$as_me:11489: checking for $CC __attribute__ directives..." >&5
11490 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11491 cat > conftest.$ac_ext <<EOF
11492 #line 11492 "${as_me-configure}"
11493 #include "confdefs.h"
11494 #include "conftest.h"
11495 #include "conftest.i"
11496 #if     GCC_PRINTF
11497 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11498 #else
11499 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11500 #endif
11501 #if     GCC_SCANF
11502 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11503 #else
11504 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11505 #endif
11506 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11507 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11508 extern void foo(void) GCC_NORETURN;
11509 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11510 EOF
11511         cf_printf_attribute=no
11512         cf_scanf_attribute=no
11513         for cf_attribute in scanf printf unused noreturn
11514         do
11515
11516 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11517
11518                 cf_directive="__attribute__(($cf_attribute))"
11519                 echo "checking for $CC $cf_directive" 1>&5
11520
11521                 case $cf_attribute in #(vi
11522                 printf) #(vi
11523                         cf_printf_attribute=yes
11524                         cat >conftest.h <<EOF
11525 #define GCC_$cf_ATTRIBUTE 1
11526 EOF
11527                         ;;
11528                 scanf) #(vi
11529                         cf_scanf_attribute=yes
11530                         cat >conftest.h <<EOF
11531 #define GCC_$cf_ATTRIBUTE 1
11532 EOF
11533                         ;;
11534                 *) #(vi
11535                         cat >conftest.h <<EOF
11536 #define GCC_$cf_ATTRIBUTE $cf_directive
11537 EOF
11538                         ;;
11539                 esac
11540
11541                 if { (eval echo "$as_me:11541: \"$ac_compile\"") >&5
11542   (eval $ac_compile) 2>&5
11543   ac_status=$?
11544   echo "$as_me:11544: \$? = $ac_status" >&5
11545   (exit $ac_status); }; then
11546                         test -n "$verbose" && echo "$as_me:11546: result: ... $cf_attribute" >&5
11547 echo "${ECHO_T}... $cf_attribute" >&6
11548                         cat conftest.h >>confdefs.h
11549                         case $cf_attribute in #(vi
11550                         printf) #(vi
11551                                 if test "$cf_printf_attribute" = no ; then
11552                                         cat >>confdefs.h <<EOF
11553 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11554 EOF
11555                                 else
11556                                         cat >>confdefs.h <<EOF
11557 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11558 EOF
11559                                 fi
11560                                 ;;
11561                         scanf) #(vi
11562                                 if test "$cf_scanf_attribute" = no ; then
11563                                         cat >>confdefs.h <<EOF
11564 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11565 EOF
11566                                 else
11567                                         cat >>confdefs.h <<EOF
11568 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11569 EOF
11570                                 fi
11571                                 ;;
11572                         esac
11573                 fi
11574         done
11575 else
11576         fgrep define conftest.i >>confdefs.h
11577 fi
11578 rm -rf conftest*
11579 fi
11580
11581 ###     use option --enable-assertions to turn on generation of assertion code
11582 echo "$as_me:11582: checking if you want to enable runtime assertions" >&5
11583 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11584
11585 # Check whether --enable-assertions or --disable-assertions was given.
11586 if test "${enable_assertions+set}" = set; then
11587   enableval="$enable_assertions"
11588   with_assertions=$enableval
11589 else
11590   with_assertions=no
11591 fi;
11592 echo "$as_me:11592: result: $with_assertions" >&5
11593 echo "${ECHO_T}$with_assertions" >&6
11594 if test -n "$GCC"
11595 then
11596         if test "$with_assertions" = no
11597         then
11598                 cat >>confdefs.h <<\EOF
11599 #define NDEBUG 1
11600 EOF
11601
11602                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11603         else
11604
11605         ADAFLAGS="$ADAFLAGS -gnata"
11606
11607         fi
11608 fi
11609
11610 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11611
11612 echo "$as_me:11612: checking if you want to use dmalloc for testing" >&5
11613 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11614
11615 # Check whether --with-dmalloc or --without-dmalloc was given.
11616 if test "${with_dmalloc+set}" = set; then
11617   withval="$with_dmalloc"
11618   cat >>confdefs.h <<\EOF
11619 #define USE_DMALLOC 1
11620 EOF
11621
11622         : ${with_cflags:=-g}
11623         : ${with_no_leaks:=yes}
11624          with_dmalloc=yes
11625 else
11626   with_dmalloc=
11627 fi;
11628 echo "$as_me:11628: result: ${with_dmalloc:-no}" >&5
11629 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11630
11631 case .$with_cflags in #(vi
11632 .*-g*)
11633         case .$CFLAGS in #(vi
11634         .*-g*) #(vi
11635                 ;;
11636         *)
11637
11638 cf_fix_cppflags=no
11639 cf_new_cflags=
11640 cf_new_cppflags=
11641 cf_new_extra_cppflags=
11642
11643 for cf_add_cflags in -g
11644 do
11645 case $cf_fix_cppflags in
11646 no)
11647         case $cf_add_cflags in #(vi
11648         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11649                 case $cf_add_cflags in
11650                 -D*)
11651                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11652
11653                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11654                                 && test -z "${cf_tst_cflags}" \
11655                                 && cf_fix_cppflags=yes
11656
11657                         if test $cf_fix_cppflags = yes ; then
11658                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11659                                 continue
11660                         elif test "${cf_tst_cflags}" = "\"'" ; then
11661                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11662                                 continue
11663                         fi
11664                         ;;
11665                 esac
11666                 case "$CPPFLAGS" in
11667                 *$cf_add_cflags) #(vi
11668                         ;;
11669                 *) #(vi
11670                         case $cf_add_cflags in #(vi
11671                         -D*)
11672                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11673
11674 CPPFLAGS=`echo "$CPPFLAGS" | \
11675         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11676                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11677
11678                                 ;;
11679                         esac
11680                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11681                         ;;
11682                 esac
11683                 ;;
11684         *)
11685                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11686                 ;;
11687         esac
11688         ;;
11689 yes)
11690         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11691
11692         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11693
11694         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11695                 && test -z "${cf_tst_cflags}" \
11696                 && cf_fix_cppflags=no
11697         ;;
11698 esac
11699 done
11700
11701 if test -n "$cf_new_cflags" ; then
11702
11703         CFLAGS="$CFLAGS $cf_new_cflags"
11704 fi
11705
11706 if test -n "$cf_new_cppflags" ; then
11707
11708         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11709 fi
11710
11711 if test -n "$cf_new_extra_cppflags" ; then
11712
11713         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11714 fi
11715
11716                 ;;
11717         esac
11718         ;;
11719 esac
11720
11721 if test "$with_dmalloc" = yes ; then
11722         echo "$as_me:11722: checking for dmalloc.h" >&5
11723 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11724 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11725   echo $ECHO_N "(cached) $ECHO_C" >&6
11726 else
11727   cat >conftest.$ac_ext <<_ACEOF
11728 #line 11728 "configure"
11729 #include "confdefs.h"
11730 #include <dmalloc.h>
11731 _ACEOF
11732 if { (eval echo "$as_me:11732: \"$ac_cpp conftest.$ac_ext\"") >&5
11733   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11734   ac_status=$?
11735   egrep -v '^ *\+' conftest.er1 >conftest.err
11736   rm -f conftest.er1
11737   cat conftest.err >&5
11738   echo "$as_me:11738: \$? = $ac_status" >&5
11739   (exit $ac_status); } >/dev/null; then
11740   if test -s conftest.err; then
11741     ac_cpp_err=$ac_c_preproc_warn_flag
11742   else
11743     ac_cpp_err=
11744   fi
11745 else
11746   ac_cpp_err=yes
11747 fi
11748 if test -z "$ac_cpp_err"; then
11749   ac_cv_header_dmalloc_h=yes
11750 else
11751   echo "$as_me: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   ac_cv_header_dmalloc_h=no
11754 fi
11755 rm -f conftest.err conftest.$ac_ext
11756 fi
11757 echo "$as_me:11757: result: $ac_cv_header_dmalloc_h" >&5
11758 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11759 if test $ac_cv_header_dmalloc_h = yes; then
11760
11761 echo "$as_me:11761: checking for dmalloc_debug in -ldmalloc" >&5
11762 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11763 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11764   echo $ECHO_N "(cached) $ECHO_C" >&6
11765 else
11766   ac_check_lib_save_LIBS=$LIBS
11767 LIBS="-ldmalloc  $LIBS"
11768 cat >conftest.$ac_ext <<_ACEOF
11769 #line 11769 "configure"
11770 #include "confdefs.h"
11771
11772 /* Override any gcc2 internal prototype to avoid an error.  */
11773 #ifdef __cplusplus
11774 extern "C"
11775 #endif
11776 /* We use char because int might match the return type of a gcc2
11777    builtin and then its argument prototype would still apply.  */
11778 char dmalloc_debug ();
11779 int
11780 main ()
11781 {
11782 dmalloc_debug ();
11783   ;
11784   return 0;
11785 }
11786 _ACEOF
11787 rm -f conftest.$ac_objext conftest$ac_exeext
11788 if { (eval echo "$as_me:11788: \"$ac_link\"") >&5
11789   (eval $ac_link) 2>&5
11790   ac_status=$?
11791   echo "$as_me:11791: \$? = $ac_status" >&5
11792   (exit $ac_status); } &&
11793          { ac_try='test -s conftest$ac_exeext'
11794   { (eval echo "$as_me:11794: \"$ac_try\"") >&5
11795   (eval $ac_try) 2>&5
11796   ac_status=$?
11797   echo "$as_me:11797: \$? = $ac_status" >&5
11798   (exit $ac_status); }; }; then
11799   ac_cv_lib_dmalloc_dmalloc_debug=yes
11800 else
11801   echo "$as_me: failed program was:" >&5
11802 cat conftest.$ac_ext >&5
11803 ac_cv_lib_dmalloc_dmalloc_debug=no
11804 fi
11805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11806 LIBS=$ac_check_lib_save_LIBS
11807 fi
11808 echo "$as_me:11808: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11809 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11810 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11811   cat >>confdefs.h <<EOF
11812 #define HAVE_LIBDMALLOC 1
11813 EOF
11814
11815   LIBS="-ldmalloc $LIBS"
11816
11817 fi
11818
11819 fi
11820
11821 fi
11822
11823 echo "$as_me:11823: checking if you want to use dbmalloc for testing" >&5
11824 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11825
11826 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11827 if test "${with_dbmalloc+set}" = set; then
11828   withval="$with_dbmalloc"
11829   cat >>confdefs.h <<\EOF
11830 #define USE_DBMALLOC 1
11831 EOF
11832
11833         : ${with_cflags:=-g}
11834         : ${with_no_leaks:=yes}
11835          with_dbmalloc=yes
11836 else
11837   with_dbmalloc=
11838 fi;
11839 echo "$as_me:11839: result: ${with_dbmalloc:-no}" >&5
11840 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11841
11842 case .$with_cflags in #(vi
11843 .*-g*)
11844         case .$CFLAGS in #(vi
11845         .*-g*) #(vi
11846                 ;;
11847         *)
11848
11849 cf_fix_cppflags=no
11850 cf_new_cflags=
11851 cf_new_cppflags=
11852 cf_new_extra_cppflags=
11853
11854 for cf_add_cflags in -g
11855 do
11856 case $cf_fix_cppflags in
11857 no)
11858         case $cf_add_cflags in #(vi
11859         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11860                 case $cf_add_cflags in
11861                 -D*)
11862                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11863
11864                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11865                                 && test -z "${cf_tst_cflags}" \
11866                                 && cf_fix_cppflags=yes
11867
11868                         if test $cf_fix_cppflags = yes ; then
11869                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11870                                 continue
11871                         elif test "${cf_tst_cflags}" = "\"'" ; then
11872                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11873                                 continue
11874                         fi
11875                         ;;
11876                 esac
11877                 case "$CPPFLAGS" in
11878                 *$cf_add_cflags) #(vi
11879                         ;;
11880                 *) #(vi
11881                         case $cf_add_cflags in #(vi
11882                         -D*)
11883                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11884
11885 CPPFLAGS=`echo "$CPPFLAGS" | \
11886         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11887                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11888
11889                                 ;;
11890                         esac
11891                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11892                         ;;
11893                 esac
11894                 ;;
11895         *)
11896                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11897                 ;;
11898         esac
11899         ;;
11900 yes)
11901         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11902
11903         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11904
11905         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11906                 && test -z "${cf_tst_cflags}" \
11907                 && cf_fix_cppflags=no
11908         ;;
11909 esac
11910 done
11911
11912 if test -n "$cf_new_cflags" ; then
11913
11914         CFLAGS="$CFLAGS $cf_new_cflags"
11915 fi
11916
11917 if test -n "$cf_new_cppflags" ; then
11918
11919         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11920 fi
11921
11922 if test -n "$cf_new_extra_cppflags" ; then
11923
11924         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11925 fi
11926
11927                 ;;
11928         esac
11929         ;;
11930 esac
11931
11932 if test "$with_dbmalloc" = yes ; then
11933         echo "$as_me:11933: checking for dbmalloc.h" >&5
11934 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11935 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11936   echo $ECHO_N "(cached) $ECHO_C" >&6
11937 else
11938   cat >conftest.$ac_ext <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11941 #include <dbmalloc.h>
11942 _ACEOF
11943 if { (eval echo "$as_me:11943: \"$ac_cpp conftest.$ac_ext\"") >&5
11944   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11945   ac_status=$?
11946   egrep -v '^ *\+' conftest.er1 >conftest.err
11947   rm -f conftest.er1
11948   cat conftest.err >&5
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit $ac_status); } >/dev/null; then
11951   if test -s conftest.err; then
11952     ac_cpp_err=$ac_c_preproc_warn_flag
11953   else
11954     ac_cpp_err=
11955   fi
11956 else
11957   ac_cpp_err=yes
11958 fi
11959 if test -z "$ac_cpp_err"; then
11960   ac_cv_header_dbmalloc_h=yes
11961 else
11962   echo "$as_me: failed program was:" >&5
11963   cat conftest.$ac_ext >&5
11964   ac_cv_header_dbmalloc_h=no
11965 fi
11966 rm -f conftest.err conftest.$ac_ext
11967 fi
11968 echo "$as_me:11968: result: $ac_cv_header_dbmalloc_h" >&5
11969 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11970 if test $ac_cv_header_dbmalloc_h = yes; then
11971
11972 echo "$as_me:11972: checking for debug_malloc in -ldbmalloc" >&5
11973 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11974 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11975   echo $ECHO_N "(cached) $ECHO_C" >&6
11976 else
11977   ac_check_lib_save_LIBS=$LIBS
11978 LIBS="-ldbmalloc  $LIBS"
11979 cat >conftest.$ac_ext <<_ACEOF
11980 #line 11980 "configure"
11981 #include "confdefs.h"
11982
11983 /* Override any gcc2 internal prototype to avoid an error.  */
11984 #ifdef __cplusplus
11985 extern "C"
11986 #endif
11987 /* We use char because int might match the return type of a gcc2
11988    builtin and then its argument prototype would still apply.  */
11989 char debug_malloc ();
11990 int
11991 main ()
11992 {
11993 debug_malloc ();
11994   ;
11995   return 0;
11996 }
11997 _ACEOF
11998 rm -f conftest.$ac_objext conftest$ac_exeext
11999 if { (eval echo "$as_me:11999: \"$ac_link\"") >&5
12000   (eval $ac_link) 2>&5
12001   ac_status=$?
12002   echo "$as_me:12002: \$? = $ac_status" >&5
12003   (exit $ac_status); } &&
12004          { ac_try='test -s conftest$ac_exeext'
12005   { (eval echo "$as_me:12005: \"$ac_try\"") >&5
12006   (eval $ac_try) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); }; }; then
12010   ac_cv_lib_dbmalloc_debug_malloc=yes
12011 else
12012   echo "$as_me: failed program was:" >&5
12013 cat conftest.$ac_ext >&5
12014 ac_cv_lib_dbmalloc_debug_malloc=no
12015 fi
12016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12017 LIBS=$ac_check_lib_save_LIBS
12018 fi
12019 echo "$as_me:12019: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12020 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12021 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12022   cat >>confdefs.h <<EOF
12023 #define HAVE_LIBDBMALLOC 1
12024 EOF
12025
12026   LIBS="-ldbmalloc $LIBS"
12027
12028 fi
12029
12030 fi
12031
12032 fi
12033
12034 echo "$as_me:12034: checking if you want to use valgrind for testing" >&5
12035 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12036
12037 # Check whether --with-valgrind or --without-valgrind was given.
12038 if test "${with_valgrind+set}" = set; then
12039   withval="$with_valgrind"
12040   cat >>confdefs.h <<\EOF
12041 #define USE_VALGRIND 1
12042 EOF
12043
12044         : ${with_cflags:=-g}
12045         : ${with_no_leaks:=yes}
12046          with_valgrind=yes
12047 else
12048   with_valgrind=
12049 fi;
12050 echo "$as_me:12050: result: ${with_valgrind:-no}" >&5
12051 echo "${ECHO_T}${with_valgrind:-no}" >&6
12052
12053 case .$with_cflags in #(vi
12054 .*-g*)
12055         case .$CFLAGS in #(vi
12056         .*-g*) #(vi
12057                 ;;
12058         *)
12059
12060 cf_fix_cppflags=no
12061 cf_new_cflags=
12062 cf_new_cppflags=
12063 cf_new_extra_cppflags=
12064
12065 for cf_add_cflags in -g
12066 do
12067 case $cf_fix_cppflags in
12068 no)
12069         case $cf_add_cflags in #(vi
12070         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12071                 case $cf_add_cflags in
12072                 -D*)
12073                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12074
12075                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12076                                 && test -z "${cf_tst_cflags}" \
12077                                 && cf_fix_cppflags=yes
12078
12079                         if test $cf_fix_cppflags = yes ; then
12080                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12081                                 continue
12082                         elif test "${cf_tst_cflags}" = "\"'" ; then
12083                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12084                                 continue
12085                         fi
12086                         ;;
12087                 esac
12088                 case "$CPPFLAGS" in
12089                 *$cf_add_cflags) #(vi
12090                         ;;
12091                 *) #(vi
12092                         case $cf_add_cflags in #(vi
12093                         -D*)
12094                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12095
12096 CPPFLAGS=`echo "$CPPFLAGS" | \
12097         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12098                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12099
12100                                 ;;
12101                         esac
12102                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12103                         ;;
12104                 esac
12105                 ;;
12106         *)
12107                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12108                 ;;
12109         esac
12110         ;;
12111 yes)
12112         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12113
12114         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12115
12116         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12117                 && test -z "${cf_tst_cflags}" \
12118                 && cf_fix_cppflags=no
12119         ;;
12120 esac
12121 done
12122
12123 if test -n "$cf_new_cflags" ; then
12124
12125         CFLAGS="$CFLAGS $cf_new_cflags"
12126 fi
12127
12128 if test -n "$cf_new_cppflags" ; then
12129
12130         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12131 fi
12132
12133 if test -n "$cf_new_extra_cppflags" ; then
12134
12135         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12136 fi
12137
12138                 ;;
12139         esac
12140         ;;
12141 esac
12142
12143 echo "$as_me:12143: checking if you want to perform memory-leak testing" >&5
12144 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12145
12146 # Check whether --enable-leaks or --disable-leaks was given.
12147 if test "${enable_leaks+set}" = set; then
12148   enableval="$enable_leaks"
12149   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12150 else
12151   : ${with_no_leaks:=no}
12152 fi;
12153 echo "$as_me:12153: result: $with_no_leaks" >&5
12154 echo "${ECHO_T}$with_no_leaks" >&6
12155
12156 if test "$with_no_leaks" = yes ; then
12157         cat >>confdefs.h <<\EOF
12158 #define NO_LEAKS 1
12159 EOF
12160
12161         cat >>confdefs.h <<\EOF
12162 #define YY_NO_LEAKS 1
12163 EOF
12164
12165 fi
12166
12167 cat >>confdefs.h <<\EOF
12168 #define HAVE_NC_ALLOC_H 1
12169 EOF
12170
12171 ###     use option --enable-expanded to generate certain macros as functions
12172
12173 # Check whether --enable-expanded or --disable-expanded was given.
12174 if test "${enable_expanded+set}" = set; then
12175   enableval="$enable_expanded"
12176   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12177 #define NCURSES_EXPANDED 1
12178 EOF
12179
12180 fi;
12181
12182 ###     use option --disable-macros to suppress macros in favor of functions
12183
12184 # Check whether --enable-macros or --disable-macros was given.
12185 if test "${enable_macros+set}" = set; then
12186   enableval="$enable_macros"
12187   test "$enableval" = no && cat >>confdefs.h <<\EOF
12188 #define NCURSES_NOMACROS 1
12189 EOF
12190
12191 fi;
12192
12193 # Normally we only add trace() to the debug-library.  Allow this to be
12194 # extended to all models of the ncurses library:
12195 cf_all_traces=no
12196 case "$CFLAGS $CPPFLAGS" in
12197 *-DTRACE*)
12198         cf_all_traces=yes
12199         ;;
12200 esac
12201
12202 echo "$as_me:12202: checking whether to add trace feature to all models" >&5
12203 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12204
12205 # Check whether --with-trace or --without-trace was given.
12206 if test "${with_trace+set}" = set; then
12207   withval="$with_trace"
12208   cf_with_trace=$withval
12209 else
12210   cf_with_trace=$cf_all_traces
12211 fi;
12212 echo "$as_me:12212: result: $cf_with_trace" >&5
12213 echo "${ECHO_T}$cf_with_trace" >&6
12214
12215 if test "$cf_with_trace" = yes ; then
12216         LIB_TRACING=all
12217         ADA_TRACE=TRUE
12218
12219 cf_fix_cppflags=no
12220 cf_new_cflags=
12221 cf_new_cppflags=
12222 cf_new_extra_cppflags=
12223
12224 for cf_add_cflags in -DTRACE
12225 do
12226 case $cf_fix_cppflags in
12227 no)
12228         case $cf_add_cflags in #(vi
12229         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12230                 case $cf_add_cflags in
12231                 -D*)
12232                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12233
12234                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12235                                 && test -z "${cf_tst_cflags}" \
12236                                 && cf_fix_cppflags=yes
12237
12238                         if test $cf_fix_cppflags = yes ; then
12239                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12240                                 continue
12241                         elif test "${cf_tst_cflags}" = "\"'" ; then
12242                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12243                                 continue
12244                         fi
12245                         ;;
12246                 esac
12247                 case "$CPPFLAGS" in
12248                 *$cf_add_cflags) #(vi
12249                         ;;
12250                 *) #(vi
12251                         case $cf_add_cflags in #(vi
12252                         -D*)
12253                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12254
12255 CPPFLAGS=`echo "$CPPFLAGS" | \
12256         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12257                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12258
12259                                 ;;
12260                         esac
12261                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12262                         ;;
12263                 esac
12264                 ;;
12265         *)
12266                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12267                 ;;
12268         esac
12269         ;;
12270 yes)
12271         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12272
12273         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12274
12275         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12276                 && test -z "${cf_tst_cflags}" \
12277                 && cf_fix_cppflags=no
12278         ;;
12279 esac
12280 done
12281
12282 if test -n "$cf_new_cflags" ; then
12283
12284         CFLAGS="$CFLAGS $cf_new_cflags"
12285 fi
12286
12287 if test -n "$cf_new_cppflags" ; then
12288
12289         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12290 fi
12291
12292 if test -n "$cf_new_extra_cppflags" ; then
12293
12294         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12295 fi
12296
12297 else
12298         LIB_TRACING=DEBUG
12299         ADA_TRACE=FALSE
12300 fi
12301
12302 ###     Checks for libraries.
12303 case $cf_cv_system_name in #(vi
12304 *mingw32*) #(vi
12305         ;;
12306 *)
12307 echo "$as_me:12307: checking for gettimeofday" >&5
12308 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12309 if test "${ac_cv_func_gettimeofday+set}" = set; then
12310   echo $ECHO_N "(cached) $ECHO_C" >&6
12311 else
12312   cat >conftest.$ac_ext <<_ACEOF
12313 #line 12313 "configure"
12314 #include "confdefs.h"
12315 /* System header to define __stub macros and hopefully few prototypes,
12316     which can conflict with char gettimeofday (); below.  */
12317 #include <assert.h>
12318 /* Override any gcc2 internal prototype to avoid an error.  */
12319 #ifdef __cplusplus
12320 extern "C"
12321 #endif
12322 /* We use char because int might match the return type of a gcc2
12323    builtin and then its argument prototype would still apply.  */
12324 char gettimeofday ();
12325 char (*f) ();
12326
12327 int
12328 main ()
12329 {
12330 /* The GNU C library defines this for functions which it implements
12331     to always fail with ENOSYS.  Some functions are actually named
12332     something starting with __ and the normal name is an alias.  */
12333 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12334 choke me
12335 #else
12336 f = gettimeofday;
12337 #endif
12338
12339   ;
12340   return 0;
12341 }
12342 _ACEOF
12343 rm -f conftest.$ac_objext conftest$ac_exeext
12344 if { (eval echo "$as_me:12344: \"$ac_link\"") >&5
12345   (eval $ac_link) 2>&5
12346   ac_status=$?
12347   echo "$as_me:12347: \$? = $ac_status" >&5
12348   (exit $ac_status); } &&
12349          { ac_try='test -s conftest$ac_exeext'
12350   { (eval echo "$as_me:12350: \"$ac_try\"") >&5
12351   (eval $ac_try) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); }; }; then
12355   ac_cv_func_gettimeofday=yes
12356 else
12357   echo "$as_me: failed program was:" >&5
12358 cat conftest.$ac_ext >&5
12359 ac_cv_func_gettimeofday=no
12360 fi
12361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12362 fi
12363 echo "$as_me:12363: result: $ac_cv_func_gettimeofday" >&5
12364 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12365 if test $ac_cv_func_gettimeofday = yes; then
12366   cat >>confdefs.h <<\EOF
12367 #define HAVE_GETTIMEOFDAY 1
12368 EOF
12369
12370 else
12371
12372 echo "$as_me:12372: checking for gettimeofday in -lbsd" >&5
12373 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12374 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12375   echo $ECHO_N "(cached) $ECHO_C" >&6
12376 else
12377   ac_check_lib_save_LIBS=$LIBS
12378 LIBS="-lbsd  $LIBS"
12379 cat >conftest.$ac_ext <<_ACEOF
12380 #line 12380 "configure"
12381 #include "confdefs.h"
12382
12383 /* Override any gcc2 internal prototype to avoid an error.  */
12384 #ifdef __cplusplus
12385 extern "C"
12386 #endif
12387 /* We use char because int might match the return type of a gcc2
12388    builtin and then its argument prototype would still apply.  */
12389 char gettimeofday ();
12390 int
12391 main ()
12392 {
12393 gettimeofday ();
12394   ;
12395   return 0;
12396 }
12397 _ACEOF
12398 rm -f conftest.$ac_objext conftest$ac_exeext
12399 if { (eval echo "$as_me:12399: \"$ac_link\"") >&5
12400   (eval $ac_link) 2>&5
12401   ac_status=$?
12402   echo "$as_me:12402: \$? = $ac_status" >&5
12403   (exit $ac_status); } &&
12404          { ac_try='test -s conftest$ac_exeext'
12405   { (eval echo "$as_me:12405: \"$ac_try\"") >&5
12406   (eval $ac_try) 2>&5
12407   ac_status=$?
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit $ac_status); }; }; then
12410   ac_cv_lib_bsd_gettimeofday=yes
12411 else
12412   echo "$as_me: failed program was:" >&5
12413 cat conftest.$ac_ext >&5
12414 ac_cv_lib_bsd_gettimeofday=no
12415 fi
12416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12417 LIBS=$ac_check_lib_save_LIBS
12418 fi
12419 echo "$as_me:12419: result: $ac_cv_lib_bsd_gettimeofday" >&5
12420 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12421 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12422   cat >>confdefs.h <<\EOF
12423 #define HAVE_GETTIMEOFDAY 1
12424 EOF
12425
12426         LIBS="-lbsd $LIBS"
12427 fi
12428
12429 fi
12430         ;;
12431 esac
12432
12433 echo "$as_me:12433: checking if -lm needed for math functions" >&5
12434 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12435 if test "${cf_cv_need_libm+set}" = set; then
12436   echo $ECHO_N "(cached) $ECHO_C" >&6
12437 else
12438
12439         cat >conftest.$ac_ext <<_ACEOF
12440 #line 12440 "configure"
12441 #include "confdefs.h"
12442
12443         #include <stdio.h>
12444         #include <math.h>
12445
12446 int
12447 main ()
12448 {
12449 double x = rand(); printf("result = %g\n", sin(x))
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 rm -f conftest.$ac_objext conftest$ac_exeext
12455 if { (eval echo "$as_me:12455: \"$ac_link\"") >&5
12456   (eval $ac_link) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); } &&
12460          { ac_try='test -s conftest$ac_exeext'
12461   { (eval echo "$as_me:12461: \"$ac_try\"") >&5
12462   (eval $ac_try) 2>&5
12463   ac_status=$?
12464   echo "$as_me:12464: \$? = $ac_status" >&5
12465   (exit $ac_status); }; }; then
12466   cf_cv_need_libm=no
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 cat conftest.$ac_ext >&5
12470 cf_cv_need_libm=yes
12471 fi
12472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12473 fi
12474 echo "$as_me:12474: result: $cf_cv_need_libm" >&5
12475 echo "${ECHO_T}$cf_cv_need_libm" >&6
12476 if test "$cf_cv_need_libm" = yes
12477 then
12478 MATH_LIB=-lm
12479 fi
12480
12481 ###     Checks for header files.
12482 echo "$as_me:12482: checking for ANSI C header files" >&5
12483 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12484 if test "${ac_cv_header_stdc+set}" = set; then
12485   echo $ECHO_N "(cached) $ECHO_C" >&6
12486 else
12487   cat >conftest.$ac_ext <<_ACEOF
12488 #line 12488 "configure"
12489 #include "confdefs.h"
12490 #include <stdlib.h>
12491 #include <stdarg.h>
12492 #include <string.h>
12493 #include <float.h>
12494
12495 _ACEOF
12496 if { (eval echo "$as_me:12496: \"$ac_cpp conftest.$ac_ext\"") >&5
12497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12498   ac_status=$?
12499   egrep -v '^ *\+' conftest.er1 >conftest.err
12500   rm -f conftest.er1
12501   cat conftest.err >&5
12502   echo "$as_me:12502: \$? = $ac_status" >&5
12503   (exit $ac_status); } >/dev/null; then
12504   if test -s conftest.err; then
12505     ac_cpp_err=$ac_c_preproc_warn_flag
12506   else
12507     ac_cpp_err=
12508   fi
12509 else
12510   ac_cpp_err=yes
12511 fi
12512 if test -z "$ac_cpp_err"; then
12513   ac_cv_header_stdc=yes
12514 else
12515   echo "$as_me: failed program was:" >&5
12516   cat conftest.$ac_ext >&5
12517   ac_cv_header_stdc=no
12518 fi
12519 rm -f conftest.err conftest.$ac_ext
12520
12521 if test $ac_cv_header_stdc = yes; then
12522   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12523   cat >conftest.$ac_ext <<_ACEOF
12524 #line 12524 "configure"
12525 #include "confdefs.h"
12526 #include <string.h>
12527
12528 _ACEOF
12529 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12530   egrep "memchr" >/dev/null 2>&1; then
12531   :
12532 else
12533   ac_cv_header_stdc=no
12534 fi
12535 rm -f conftest*
12536
12537 fi
12538
12539 if test $ac_cv_header_stdc = yes; then
12540   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12541   cat >conftest.$ac_ext <<_ACEOF
12542 #line 12542 "configure"
12543 #include "confdefs.h"
12544 #include <stdlib.h>
12545
12546 _ACEOF
12547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12548   egrep "free" >/dev/null 2>&1; then
12549   :
12550 else
12551   ac_cv_header_stdc=no
12552 fi
12553 rm -f conftest*
12554
12555 fi
12556
12557 if test $ac_cv_header_stdc = yes; then
12558   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12559   if test "$cross_compiling" = yes; then
12560   :
12561 else
12562   cat >conftest.$ac_ext <<_ACEOF
12563 #line 12563 "configure"
12564 #include "confdefs.h"
12565 #include <ctype.h>
12566 #if ((' ' & 0x0FF) == 0x020)
12567 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12568 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12569 #else
12570 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12571                      || ('j' <= (c) && (c) <= 'r') \
12572                      || ('s' <= (c) && (c) <= 'z'))
12573 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12574 #endif
12575
12576 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12577 int
12578 main ()
12579 {
12580   int i;
12581   for (i = 0; i < 256; i++)
12582     if (XOR (islower (i), ISLOWER (i))
12583         || toupper (i) != TOUPPER (i))
12584       $ac_main_return(2);
12585   $ac_main_return (0);
12586 }
12587 _ACEOF
12588 rm -f conftest$ac_exeext
12589 if { (eval echo "$as_me:12589: \"$ac_link\"") >&5
12590   (eval $ac_link) 2>&5
12591   ac_status=$?
12592   echo "$as_me:12592: \$? = $ac_status" >&5
12593   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12594   { (eval echo "$as_me:12594: \"$ac_try\"") >&5
12595   (eval $ac_try) 2>&5
12596   ac_status=$?
12597   echo "$as_me:12597: \$? = $ac_status" >&5
12598   (exit $ac_status); }; }; then
12599   :
12600 else
12601   echo "$as_me: program exited with status $ac_status" >&5
12602 echo "$as_me: failed program was:" >&5
12603 cat conftest.$ac_ext >&5
12604 ac_cv_header_stdc=no
12605 fi
12606 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12607 fi
12608 fi
12609 fi
12610 echo "$as_me:12610: result: $ac_cv_header_stdc" >&5
12611 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12612 if test $ac_cv_header_stdc = yes; then
12613
12614 cat >>confdefs.h <<\EOF
12615 #define STDC_HEADERS 1
12616 EOF
12617
12618 fi
12619
12620 ac_header_dirent=no
12621 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12622   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12623 echo "$as_me:12623: checking for $ac_hdr that defines DIR" >&5
12624 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12626   echo $ECHO_N "(cached) $ECHO_C" >&6
12627 else
12628   cat >conftest.$ac_ext <<_ACEOF
12629 #line 12629 "configure"
12630 #include "confdefs.h"
12631 #include <sys/types.h>
12632 #include <$ac_hdr>
12633
12634 int
12635 main ()
12636 {
12637 if ((DIR *) 0)
12638 return 0;
12639   ;
12640   return 0;
12641 }
12642 _ACEOF
12643 rm -f conftest.$ac_objext
12644 if { (eval echo "$as_me:12644: \"$ac_compile\"") >&5
12645   (eval $ac_compile) 2>&5
12646   ac_status=$?
12647   echo "$as_me:12647: \$? = $ac_status" >&5
12648   (exit $ac_status); } &&
12649          { ac_try='test -s conftest.$ac_objext'
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_Header=yes"
12656 else
12657   echo "$as_me: failed program was:" >&5
12658 cat conftest.$ac_ext >&5
12659 eval "$as_ac_Header=no"
12660 fi
12661 rm -f conftest.$ac_objext conftest.$ac_ext
12662 fi
12663 echo "$as_me:12663: result: `eval echo '${'$as_ac_Header'}'`" >&5
12664 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12665 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12666   cat >>confdefs.h <<EOF
12667 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12668 EOF
12669
12670 ac_header_dirent=$ac_hdr; break
12671 fi
12672
12673 done
12674 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12675 if test $ac_header_dirent = dirent.h; then
12676   echo "$as_me:12676: checking for opendir in -ldir" >&5
12677 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12678 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12679   echo $ECHO_N "(cached) $ECHO_C" >&6
12680 else
12681   ac_check_lib_save_LIBS=$LIBS
12682 LIBS="-ldir  $LIBS"
12683 cat >conftest.$ac_ext <<_ACEOF
12684 #line 12684 "configure"
12685 #include "confdefs.h"
12686
12687 /* Override any gcc2 internal prototype to avoid an error.  */
12688 #ifdef __cplusplus
12689 extern "C"
12690 #endif
12691 /* We use char because int might match the return type of a gcc2
12692    builtin and then its argument prototype would still apply.  */
12693 char opendir ();
12694 int
12695 main ()
12696 {
12697 opendir ();
12698   ;
12699   return 0;
12700 }
12701 _ACEOF
12702 rm -f conftest.$ac_objext conftest$ac_exeext
12703 if { (eval echo "$as_me:12703: \"$ac_link\"") >&5
12704   (eval $ac_link) 2>&5
12705   ac_status=$?
12706   echo "$as_me:12706: \$? = $ac_status" >&5
12707   (exit $ac_status); } &&
12708          { ac_try='test -s conftest$ac_exeext'
12709   { (eval echo "$as_me:12709: \"$ac_try\"") >&5
12710   (eval $ac_try) 2>&5
12711   ac_status=$?
12712   echo "$as_me:12712: \$? = $ac_status" >&5
12713   (exit $ac_status); }; }; then
12714   ac_cv_lib_dir_opendir=yes
12715 else
12716   echo "$as_me: failed program was:" >&5
12717 cat conftest.$ac_ext >&5
12718 ac_cv_lib_dir_opendir=no
12719 fi
12720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12721 LIBS=$ac_check_lib_save_LIBS
12722 fi
12723 echo "$as_me:12723: result: $ac_cv_lib_dir_opendir" >&5
12724 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12725 if test $ac_cv_lib_dir_opendir = yes; then
12726   LIBS="$LIBS -ldir"
12727 fi
12728
12729 else
12730   echo "$as_me:12730: checking for opendir in -lx" >&5
12731 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12732 if test "${ac_cv_lib_x_opendir+set}" = set; then
12733   echo $ECHO_N "(cached) $ECHO_C" >&6
12734 else
12735   ac_check_lib_save_LIBS=$LIBS
12736 LIBS="-lx  $LIBS"
12737 cat >conftest.$ac_ext <<_ACEOF
12738 #line 12738 "configure"
12739 #include "confdefs.h"
12740
12741 /* Override any gcc2 internal prototype to avoid an error.  */
12742 #ifdef __cplusplus
12743 extern "C"
12744 #endif
12745 /* We use char because int might match the return type of a gcc2
12746    builtin and then its argument prototype would still apply.  */
12747 char opendir ();
12748 int
12749 main ()
12750 {
12751 opendir ();
12752   ;
12753   return 0;
12754 }
12755 _ACEOF
12756 rm -f conftest.$ac_objext conftest$ac_exeext
12757 if { (eval echo "$as_me:12757: \"$ac_link\"") >&5
12758   (eval $ac_link) 2>&5
12759   ac_status=$?
12760   echo "$as_me:12760: \$? = $ac_status" >&5
12761   (exit $ac_status); } &&
12762          { ac_try='test -s conftest$ac_exeext'
12763   { (eval echo "$as_me:12763: \"$ac_try\"") >&5
12764   (eval $ac_try) 2>&5
12765   ac_status=$?
12766   echo "$as_me:12766: \$? = $ac_status" >&5
12767   (exit $ac_status); }; }; then
12768   ac_cv_lib_x_opendir=yes
12769 else
12770   echo "$as_me: failed program was:" >&5
12771 cat conftest.$ac_ext >&5
12772 ac_cv_lib_x_opendir=no
12773 fi
12774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12775 LIBS=$ac_check_lib_save_LIBS
12776 fi
12777 echo "$as_me:12777: result: $ac_cv_lib_x_opendir" >&5
12778 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12779 if test $ac_cv_lib_x_opendir = yes; then
12780   LIBS="$LIBS -lx"
12781 fi
12782
12783 fi
12784
12785 echo "$as_me:12785: checking whether time.h and sys/time.h may both be included" >&5
12786 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12787 if test "${ac_cv_header_time+set}" = set; then
12788   echo $ECHO_N "(cached) $ECHO_C" >&6
12789 else
12790   cat >conftest.$ac_ext <<_ACEOF
12791 #line 12791 "configure"
12792 #include "confdefs.h"
12793 #include <sys/types.h>
12794 #include <sys/time.h>
12795 #include <time.h>
12796
12797 int
12798 main ()
12799 {
12800 if ((struct tm *) 0)
12801 return 0;
12802   ;
12803   return 0;
12804 }
12805 _ACEOF
12806 rm -f conftest.$ac_objext
12807 if { (eval echo "$as_me:12807: \"$ac_compile\"") >&5
12808   (eval $ac_compile) 2>&5
12809   ac_status=$?
12810   echo "$as_me:12810: \$? = $ac_status" >&5
12811   (exit $ac_status); } &&
12812          { ac_try='test -s conftest.$ac_objext'
12813   { (eval echo "$as_me:12813: \"$ac_try\"") >&5
12814   (eval $ac_try) 2>&5
12815   ac_status=$?
12816   echo "$as_me:12816: \$? = $ac_status" >&5
12817   (exit $ac_status); }; }; then
12818   ac_cv_header_time=yes
12819 else
12820   echo "$as_me: failed program was:" >&5
12821 cat conftest.$ac_ext >&5
12822 ac_cv_header_time=no
12823 fi
12824 rm -f conftest.$ac_objext conftest.$ac_ext
12825 fi
12826 echo "$as_me:12826: result: $ac_cv_header_time" >&5
12827 echo "${ECHO_T}$ac_cv_header_time" >&6
12828 if test $ac_cv_header_time = yes; then
12829
12830 cat >>confdefs.h <<\EOF
12831 #define TIME_WITH_SYS_TIME 1
12832 EOF
12833
12834 fi
12835
12836 cf_regex_func=no
12837
12838 echo "$as_me:12838: checking for regcomp" >&5
12839 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12840 if test "${ac_cv_func_regcomp+set}" = set; then
12841   echo $ECHO_N "(cached) $ECHO_C" >&6
12842 else
12843   cat >conftest.$ac_ext <<_ACEOF
12844 #line 12844 "configure"
12845 #include "confdefs.h"
12846 /* System header to define __stub macros and hopefully few prototypes,
12847     which can conflict with char regcomp (); below.  */
12848 #include <assert.h>
12849 /* Override any gcc2 internal prototype to avoid an error.  */
12850 #ifdef __cplusplus
12851 extern "C"
12852 #endif
12853 /* We use char because int might match the return type of a gcc2
12854    builtin and then its argument prototype would still apply.  */
12855 char regcomp ();
12856 char (*f) ();
12857
12858 int
12859 main ()
12860 {
12861 /* The GNU C library defines this for functions which it implements
12862     to always fail with ENOSYS.  Some functions are actually named
12863     something starting with __ and the normal name is an alias.  */
12864 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12865 choke me
12866 #else
12867 f = regcomp;
12868 #endif
12869
12870   ;
12871   return 0;
12872 }
12873 _ACEOF
12874 rm -f conftest.$ac_objext conftest$ac_exeext
12875 if { (eval echo "$as_me:12875: \"$ac_link\"") >&5
12876   (eval $ac_link) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit $ac_status); } &&
12880          { ac_try='test -s conftest$ac_exeext'
12881   { (eval echo "$as_me:12881: \"$ac_try\"") >&5
12882   (eval $ac_try) 2>&5
12883   ac_status=$?
12884   echo "$as_me:12884: \$? = $ac_status" >&5
12885   (exit $ac_status); }; }; then
12886   ac_cv_func_regcomp=yes
12887 else
12888   echo "$as_me: failed program was:" >&5
12889 cat conftest.$ac_ext >&5
12890 ac_cv_func_regcomp=no
12891 fi
12892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12893 fi
12894 echo "$as_me:12894: result: $ac_cv_func_regcomp" >&5
12895 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12896 if test $ac_cv_func_regcomp = yes; then
12897   cf_regex_func=regcomp
12898 else
12899
12900         for cf_regex_lib in regex re
12901         do
12902                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12903 echo "$as_me:12903: checking for regcomp in -l$cf_regex_lib" >&5
12904 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12905 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12906   echo $ECHO_N "(cached) $ECHO_C" >&6
12907 else
12908   ac_check_lib_save_LIBS=$LIBS
12909 LIBS="-l$cf_regex_lib  $LIBS"
12910 cat >conftest.$ac_ext <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12913
12914 /* Override any gcc2 internal prototype to avoid an error.  */
12915 #ifdef __cplusplus
12916 extern "C"
12917 #endif
12918 /* We use char because int might match the return type of a gcc2
12919    builtin and then its argument prototype would still apply.  */
12920 char regcomp ();
12921 int
12922 main ()
12923 {
12924 regcomp ();
12925   ;
12926   return 0;
12927 }
12928 _ACEOF
12929 rm -f conftest.$ac_objext conftest$ac_exeext
12930 if { (eval echo "$as_me:12930: \"$ac_link\"") >&5
12931   (eval $ac_link) 2>&5
12932   ac_status=$?
12933   echo "$as_me:12933: \$? = $ac_status" >&5
12934   (exit $ac_status); } &&
12935          { ac_try='test -s conftest$ac_exeext'
12936   { (eval echo "$as_me:12936: \"$ac_try\"") >&5
12937   (eval $ac_try) 2>&5
12938   ac_status=$?
12939   echo "$as_me:12939: \$? = $ac_status" >&5
12940   (exit $ac_status); }; }; then
12941   eval "$as_ac_Lib=yes"
12942 else
12943   echo "$as_me: failed program was:" >&5
12944 cat conftest.$ac_ext >&5
12945 eval "$as_ac_Lib=no"
12946 fi
12947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12948 LIBS=$ac_check_lib_save_LIBS
12949 fi
12950 echo "$as_me:12950: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12951 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12952 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12953
12954                                 LIBS="-l$cf_regex_lib $LIBS"
12955                                 cf_regex_func=regcomp
12956                                 break
12957 fi
12958
12959         done
12960
12961 fi
12962
12963 if test "$cf_regex_func" = no ; then
12964         echo "$as_me:12964: checking for compile" >&5
12965 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12966 if test "${ac_cv_func_compile+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969   cat >conftest.$ac_ext <<_ACEOF
12970 #line 12970 "configure"
12971 #include "confdefs.h"
12972 /* System header to define __stub macros and hopefully few prototypes,
12973     which can conflict with char compile (); below.  */
12974 #include <assert.h>
12975 /* Override any gcc2 internal prototype to avoid an error.  */
12976 #ifdef __cplusplus
12977 extern "C"
12978 #endif
12979 /* We use char because int might match the return type of a gcc2
12980    builtin and then its argument prototype would still apply.  */
12981 char compile ();
12982 char (*f) ();
12983
12984 int
12985 main ()
12986 {
12987 /* The GNU C library defines this for functions which it implements
12988     to always fail with ENOSYS.  Some functions are actually named
12989     something starting with __ and the normal name is an alias.  */
12990 #if defined (__stub_compile) || defined (__stub___compile)
12991 choke me
12992 #else
12993 f = compile;
12994 #endif
12995
12996   ;
12997   return 0;
12998 }
12999 _ACEOF
13000 rm -f conftest.$ac_objext conftest$ac_exeext
13001 if { (eval echo "$as_me:13001: \"$ac_link\"") >&5
13002   (eval $ac_link) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit $ac_status); } &&
13006          { ac_try='test -s conftest$ac_exeext'
13007   { (eval echo "$as_me:13007: \"$ac_try\"") >&5
13008   (eval $ac_try) 2>&5
13009   ac_status=$?
13010   echo "$as_me:13010: \$? = $ac_status" >&5
13011   (exit $ac_status); }; }; then
13012   ac_cv_func_compile=yes
13013 else
13014   echo "$as_me: failed program was:" >&5
13015 cat conftest.$ac_ext >&5
13016 ac_cv_func_compile=no
13017 fi
13018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13019 fi
13020 echo "$as_me:13020: result: $ac_cv_func_compile" >&5
13021 echo "${ECHO_T}$ac_cv_func_compile" >&6
13022 if test $ac_cv_func_compile = yes; then
13023   cf_regex_func=compile
13024 else
13025
13026                 echo "$as_me:13026: checking for compile in -lgen" >&5
13027 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13028 if test "${ac_cv_lib_gen_compile+set}" = set; then
13029   echo $ECHO_N "(cached) $ECHO_C" >&6
13030 else
13031   ac_check_lib_save_LIBS=$LIBS
13032 LIBS="-lgen  $LIBS"
13033 cat >conftest.$ac_ext <<_ACEOF
13034 #line 13034 "configure"
13035 #include "confdefs.h"
13036
13037 /* Override any gcc2 internal prototype to avoid an error.  */
13038 #ifdef __cplusplus
13039 extern "C"
13040 #endif
13041 /* We use char because int might match the return type of a gcc2
13042    builtin and then its argument prototype would still apply.  */
13043 char compile ();
13044 int
13045 main ()
13046 {
13047 compile ();
13048   ;
13049   return 0;
13050 }
13051 _ACEOF
13052 rm -f conftest.$ac_objext conftest$ac_exeext
13053 if { (eval echo "$as_me:13053: \"$ac_link\"") >&5
13054   (eval $ac_link) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit $ac_status); } &&
13058          { ac_try='test -s conftest$ac_exeext'
13059   { (eval echo "$as_me:13059: \"$ac_try\"") >&5
13060   (eval $ac_try) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit $ac_status); }; }; then
13064   ac_cv_lib_gen_compile=yes
13065 else
13066   echo "$as_me: failed program was:" >&5
13067 cat conftest.$ac_ext >&5
13068 ac_cv_lib_gen_compile=no
13069 fi
13070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13071 LIBS=$ac_check_lib_save_LIBS
13072 fi
13073 echo "$as_me:13073: result: $ac_cv_lib_gen_compile" >&5
13074 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13075 if test $ac_cv_lib_gen_compile = yes; then
13076
13077                                 LIBS="-lgen $LIBS"
13078                                 cf_regex_func=compile
13079 fi
13080
13081 fi
13082
13083 fi
13084
13085 if test "$cf_regex_func" = no ; then
13086         { echo "$as_me:13086: WARNING: cannot find regular expression library" >&5
13087 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13088 fi
13089
13090 echo "$as_me:13090: checking for regular-expression headers" >&5
13091 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13092 if test "${cf_cv_regex_hdrs+set}" = set; then
13093   echo $ECHO_N "(cached) $ECHO_C" >&6
13094 else
13095
13096 cf_cv_regex_hdrs=no
13097 case $cf_regex_func in #(vi
13098 compile) #(vi
13099         for cf_regex_hdr in regexp.h regexpr.h
13100         do
13101                 cat >conftest.$ac_ext <<_ACEOF
13102 #line 13102 "configure"
13103 #include "confdefs.h"
13104 #include <$cf_regex_hdr>
13105 int
13106 main ()
13107 {
13108
13109                         char *p = compile("", "", "", 0);
13110                         int x = step("", "");
13111
13112   ;
13113   return 0;
13114 }
13115 _ACEOF
13116 rm -f conftest.$ac_objext conftest$ac_exeext
13117 if { (eval echo "$as_me:13117: \"$ac_link\"") >&5
13118   (eval $ac_link) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); } &&
13122          { ac_try='test -s conftest$ac_exeext'
13123   { (eval echo "$as_me:13123: \"$ac_try\"") >&5
13124   (eval $ac_try) 2>&5
13125   ac_status=$?
13126   echo "$as_me:13126: \$? = $ac_status" >&5
13127   (exit $ac_status); }; }; then
13128
13129                         cf_cv_regex_hdrs=$cf_regex_hdr
13130                         break
13131
13132 else
13133   echo "$as_me: failed program was:" >&5
13134 cat conftest.$ac_ext >&5
13135 fi
13136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13137         done
13138         ;;
13139 *)
13140         for cf_regex_hdr in regex.h
13141         do
13142                 cat >conftest.$ac_ext <<_ACEOF
13143 #line 13143 "configure"
13144 #include "confdefs.h"
13145 #include <sys/types.h>
13146 #include <$cf_regex_hdr>
13147 int
13148 main ()
13149 {
13150
13151                         regex_t *p;
13152                         int x = regcomp(p, "", 0);
13153                         int y = regexec(p, "", 0, 0, 0);
13154                         regfree(p);
13155
13156   ;
13157   return 0;
13158 }
13159 _ACEOF
13160 rm -f conftest.$ac_objext conftest$ac_exeext
13161 if { (eval echo "$as_me:13161: \"$ac_link\"") >&5
13162   (eval $ac_link) 2>&5
13163   ac_status=$?
13164   echo "$as_me:13164: \$? = $ac_status" >&5
13165   (exit $ac_status); } &&
13166          { ac_try='test -s conftest$ac_exeext'
13167   { (eval echo "$as_me:13167: \"$ac_try\"") >&5
13168   (eval $ac_try) 2>&5
13169   ac_status=$?
13170   echo "$as_me:13170: \$? = $ac_status" >&5
13171   (exit $ac_status); }; }; then
13172
13173                         cf_cv_regex_hdrs=$cf_regex_hdr
13174                         break
13175
13176 else
13177   echo "$as_me: failed program was:" >&5
13178 cat conftest.$ac_ext >&5
13179 fi
13180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13181         done
13182         ;;
13183 esac
13184
13185 fi
13186 echo "$as_me:13186: result: $cf_cv_regex_hdrs" >&5
13187 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13188
13189 case $cf_cv_regex_hdrs in #(vi
13190     no)        { echo "$as_me:13190: WARNING: no regular expression header found" >&5
13191 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13192     regex.h)   cat >>confdefs.h <<\EOF
13193 #define HAVE_REGEX_H_FUNCS 1
13194 EOF
13195  ;; #(vi
13196     regexp.h)  cat >>confdefs.h <<\EOF
13197 #define HAVE_REGEXP_H_FUNCS 1
13198 EOF
13199  ;; #(vi
13200     regexpr.h) cat >>confdefs.h <<\EOF
13201 #define HAVE_REGEXPR_H_FUNCS 1
13202 EOF
13203  ;;
13204 esac
13205
13206 for ac_header in \
13207 fcntl.h \
13208 getopt.h \
13209 limits.h \
13210 locale.h \
13211 poll.h \
13212 sys/bsdtypes.h \
13213 sys/ioctl.h \
13214 sys/param.h \
13215 sys/poll.h \
13216 sys/select.h \
13217 sys/time.h \
13218 sys/times.h \
13219 ttyent.h \
13220 unistd.h \
13221 wctype.h \
13222
13223 do
13224 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13225 echo "$as_me:13225: checking for $ac_header" >&5
13226 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13227 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13228   echo $ECHO_N "(cached) $ECHO_C" >&6
13229 else
13230   cat >conftest.$ac_ext <<_ACEOF
13231 #line 13231 "configure"
13232 #include "confdefs.h"
13233 #include <$ac_header>
13234 _ACEOF
13235 if { (eval echo "$as_me:13235: \"$ac_cpp conftest.$ac_ext\"") >&5
13236   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13237   ac_status=$?
13238   egrep -v '^ *\+' conftest.er1 >conftest.err
13239   rm -f conftest.er1
13240   cat conftest.err >&5
13241   echo "$as_me:13241: \$? = $ac_status" >&5
13242   (exit $ac_status); } >/dev/null; then
13243   if test -s conftest.err; then
13244     ac_cpp_err=$ac_c_preproc_warn_flag
13245   else
13246     ac_cpp_err=
13247   fi
13248 else
13249   ac_cpp_err=yes
13250 fi
13251 if test -z "$ac_cpp_err"; then
13252   eval "$as_ac_Header=yes"
13253 else
13254   echo "$as_me: failed program was:" >&5
13255   cat conftest.$ac_ext >&5
13256   eval "$as_ac_Header=no"
13257 fi
13258 rm -f conftest.err conftest.$ac_ext
13259 fi
13260 echo "$as_me:13260: result: `eval echo '${'$as_ac_Header'}'`" >&5
13261 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13262 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13263   cat >>confdefs.h <<EOF
13264 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13265 EOF
13266
13267 fi
13268 done
13269
13270 # check for ISC (this may also define _POSIX_SOURCE)
13271 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13272 if test "$ISC" = yes ; then
13273
13274 echo "$as_me:13274: checking for main in -lcposix" >&5
13275 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13276 if test "${ac_cv_lib_cposix_main+set}" = set; then
13277   echo $ECHO_N "(cached) $ECHO_C" >&6
13278 else
13279   ac_check_lib_save_LIBS=$LIBS
13280 LIBS="-lcposix  $LIBS"
13281 cat >conftest.$ac_ext <<_ACEOF
13282 #line 13282 "configure"
13283 #include "confdefs.h"
13284
13285 int
13286 main ()
13287 {
13288 main ();
13289   ;
13290   return 0;
13291 }
13292 _ACEOF
13293 rm -f conftest.$ac_objext conftest$ac_exeext
13294 if { (eval echo "$as_me:13294: \"$ac_link\"") >&5
13295   (eval $ac_link) 2>&5
13296   ac_status=$?
13297   echo "$as_me:13297: \$? = $ac_status" >&5
13298   (exit $ac_status); } &&
13299          { ac_try='test -s conftest$ac_exeext'
13300   { (eval echo "$as_me:13300: \"$ac_try\"") >&5
13301   (eval $ac_try) 2>&5
13302   ac_status=$?
13303   echo "$as_me:13303: \$? = $ac_status" >&5
13304   (exit $ac_status); }; }; then
13305   ac_cv_lib_cposix_main=yes
13306 else
13307   echo "$as_me: failed program was:" >&5
13308 cat conftest.$ac_ext >&5
13309 ac_cv_lib_cposix_main=no
13310 fi
13311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13312 LIBS=$ac_check_lib_save_LIBS
13313 fi
13314 echo "$as_me:13314: result: $ac_cv_lib_cposix_main" >&5
13315 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13316 if test $ac_cv_lib_cposix_main = yes; then
13317   cat >>confdefs.h <<EOF
13318 #define HAVE_LIBCPOSIX 1
13319 EOF
13320
13321   LIBS="-lcposix $LIBS"
13322
13323 fi
13324
13325         echo "$as_me:13325: checking for bzero in -linet" >&5
13326 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13327 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13328   echo $ECHO_N "(cached) $ECHO_C" >&6
13329 else
13330   ac_check_lib_save_LIBS=$LIBS
13331 LIBS="-linet  $LIBS"
13332 cat >conftest.$ac_ext <<_ACEOF
13333 #line 13333 "configure"
13334 #include "confdefs.h"
13335
13336 /* Override any gcc2 internal prototype to avoid an error.  */
13337 #ifdef __cplusplus
13338 extern "C"
13339 #endif
13340 /* We use char because int might match the return type of a gcc2
13341    builtin and then its argument prototype would still apply.  */
13342 char bzero ();
13343 int
13344 main ()
13345 {
13346 bzero ();
13347   ;
13348   return 0;
13349 }
13350 _ACEOF
13351 rm -f conftest.$ac_objext conftest$ac_exeext
13352 if { (eval echo "$as_me:13352: \"$ac_link\"") >&5
13353   (eval $ac_link) 2>&5
13354   ac_status=$?
13355   echo "$as_me:13355: \$? = $ac_status" >&5
13356   (exit $ac_status); } &&
13357          { ac_try='test -s conftest$ac_exeext'
13358   { (eval echo "$as_me:13358: \"$ac_try\"") >&5
13359   (eval $ac_try) 2>&5
13360   ac_status=$?
13361   echo "$as_me:13361: \$? = $ac_status" >&5
13362   (exit $ac_status); }; }; then
13363   ac_cv_lib_inet_bzero=yes
13364 else
13365   echo "$as_me: failed program was:" >&5
13366 cat conftest.$ac_ext >&5
13367 ac_cv_lib_inet_bzero=no
13368 fi
13369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13370 LIBS=$ac_check_lib_save_LIBS
13371 fi
13372 echo "$as_me:13372: result: $ac_cv_lib_inet_bzero" >&5
13373 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13374 if test $ac_cv_lib_inet_bzero = yes; then
13375   LIBS="-linet $LIBS"
13376 fi
13377 fi
13378
13379 echo "$as_me:13379: checking if sys/time.h works with sys/select.h" >&5
13380 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13381 if test "${cf_cv_sys_time_select+set}" = set; then
13382   echo $ECHO_N "(cached) $ECHO_C" >&6
13383 else
13384
13385 cat >conftest.$ac_ext <<_ACEOF
13386 #line 13386 "configure"
13387 #include "confdefs.h"
13388
13389 #include <sys/types.h>
13390 #ifdef HAVE_SYS_TIME_H
13391 #include <sys/time.h>
13392 #endif
13393 #ifdef HAVE_SYS_SELECT_H
13394 #include <sys/select.h>
13395 #endif
13396
13397 int
13398 main ()
13399 {
13400
13401   ;
13402   return 0;
13403 }
13404 _ACEOF
13405 rm -f conftest.$ac_objext
13406 if { (eval echo "$as_me:13406: \"$ac_compile\"") >&5
13407   (eval $ac_compile) 2>&5
13408   ac_status=$?
13409   echo "$as_me:13409: \$? = $ac_status" >&5
13410   (exit $ac_status); } &&
13411          { ac_try='test -s conftest.$ac_objext'
13412   { (eval echo "$as_me:13412: \"$ac_try\"") >&5
13413   (eval $ac_try) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); }; }; then
13417   cf_cv_sys_time_select=yes
13418 else
13419   echo "$as_me: failed program was:" >&5
13420 cat conftest.$ac_ext >&5
13421 cf_cv_sys_time_select=no
13422 fi
13423 rm -f conftest.$ac_objext conftest.$ac_ext
13424
13425 fi
13426
13427 echo "$as_me:13427: result: $cf_cv_sys_time_select" >&5
13428 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13429 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13430 #define HAVE_SYS_TIME_SELECT 1
13431 EOF
13432
13433 ###     checks for compiler characteristics
13434 ac_ext=c
13435 ac_cpp='$CPP $CPPFLAGS'
13436 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13437 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13438 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13439 ac_main_return=return
13440
13441 echo "$as_me:13441: checking for $CC option to accept ANSI C" >&5
13442 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13443 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13444   echo $ECHO_N "(cached) $ECHO_C" >&6
13445 else
13446   ac_cv_prog_cc_stdc=no
13447 ac_save_CC=$CC
13448 cat >conftest.$ac_ext <<_ACEOF
13449 #line 13449 "configure"
13450 #include "confdefs.h"
13451 #include <stdarg.h>
13452 #include <stdio.h>
13453 #include <sys/types.h>
13454 #include <sys/stat.h>
13455 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13456 struct buf { int x; };
13457 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13458 static char *e (p, i)
13459      char **p;
13460      int i;
13461 {
13462   return p[i];
13463 }
13464 static char *f (char * (*g) (char **, int), char **p, ...)
13465 {
13466   char *s;
13467   va_list v;
13468   va_start (v,p);
13469   s = g (p, va_arg (v,int));
13470   va_end (v);
13471   return s;
13472 }
13473 int test (int i, double x);
13474 struct s1 {int (*f) (int a);};
13475 struct s2 {int (*f) (double a);};
13476 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13477 int argc;
13478 char **argv;
13479 int
13480 main ()
13481 {
13482 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13483   ;
13484   return 0;
13485 }
13486 _ACEOF
13487 # Don't try gcc -ansi; that turns off useful extensions and
13488 # breaks some systems' header files.
13489 # AIX                   -qlanglvl=ansi
13490 # Ultrix and OSF/1      -std1
13491 # HP-UX 10.20 and later -Ae
13492 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13493 # SVR4                  -Xc -D__EXTENSIONS__
13494 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13495 do
13496   CC="$ac_save_CC $ac_arg"
13497   rm -f conftest.$ac_objext
13498 if { (eval echo "$as_me:13498: \"$ac_compile\"") >&5
13499   (eval $ac_compile) 2>&5
13500   ac_status=$?
13501   echo "$as_me:13501: \$? = $ac_status" >&5
13502   (exit $ac_status); } &&
13503          { ac_try='test -s conftest.$ac_objext'
13504   { (eval echo "$as_me:13504: \"$ac_try\"") >&5
13505   (eval $ac_try) 2>&5
13506   ac_status=$?
13507   echo "$as_me:13507: \$? = $ac_status" >&5
13508   (exit $ac_status); }; }; then
13509   ac_cv_prog_cc_stdc=$ac_arg
13510 break
13511 else
13512   echo "$as_me: failed program was:" >&5
13513 cat conftest.$ac_ext >&5
13514 fi
13515 rm -f conftest.$ac_objext
13516 done
13517 rm -f conftest.$ac_ext conftest.$ac_objext
13518 CC=$ac_save_CC
13519
13520 fi
13521
13522 case "x$ac_cv_prog_cc_stdc" in
13523   x|xno)
13524     echo "$as_me:13524: result: none needed" >&5
13525 echo "${ECHO_T}none needed" >&6 ;;
13526   *)
13527     echo "$as_me:13527: result: $ac_cv_prog_cc_stdc" >&5
13528 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13529     CC="$CC $ac_cv_prog_cc_stdc" ;;
13530 esac
13531
13532 echo "$as_me:13532: checking for an ANSI C-conforming const" >&5
13533 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13534 if test "${ac_cv_c_const+set}" = set; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537   cat >conftest.$ac_ext <<_ACEOF
13538 #line 13538 "configure"
13539 #include "confdefs.h"
13540
13541 int
13542 main ()
13543 {
13544 /* FIXME: Include the comments suggested by Paul. */
13545 #ifndef __cplusplus
13546   /* Ultrix mips cc rejects this.  */
13547   typedef int charset[2];
13548   const charset x;
13549   /* SunOS 4.1.1 cc rejects this.  */
13550   char const *const *ccp;
13551   char **p;
13552   /* NEC SVR4.0.2 mips cc rejects this.  */
13553   struct point {int x, y;};
13554   static struct point const zero = {0,0};
13555   /* AIX XL C 1.02.0.0 rejects this.
13556      It does not let you subtract one const X* pointer from another in
13557      an arm of an if-expression whose if-part is not a constant
13558      expression */
13559   const char *g = "string";
13560   ccp = &g + (g ? g-g : 0);
13561   /* HPUX 7.0 cc rejects these. */
13562   ++ccp;
13563   p = (char**) ccp;
13564   ccp = (char const *const *) p;
13565   { /* SCO 3.2v4 cc rejects this.  */
13566     char *t;
13567     char const *s = 0 ? (char *) 0 : (char const *) 0;
13568
13569     *t++ = 0;
13570   }
13571   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13572     int x[] = {25, 17};
13573     const int *foo = &x[0];
13574     ++foo;
13575   }
13576   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13577     typedef const int *iptr;
13578     iptr p = 0;
13579     ++p;
13580   }
13581   { /* AIX XL C 1.02.0.0 rejects this saying
13582        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13583     struct s { int j; const int *ap[3]; };
13584     struct s *b; b->j = 5;
13585   }
13586   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13587     const int foo = 10;
13588   }
13589 #endif
13590
13591   ;
13592   return 0;
13593 }
13594 _ACEOF
13595 rm -f conftest.$ac_objext
13596 if { (eval echo "$as_me:13596: \"$ac_compile\"") >&5
13597   (eval $ac_compile) 2>&5
13598   ac_status=$?
13599   echo "$as_me:13599: \$? = $ac_status" >&5
13600   (exit $ac_status); } &&
13601          { ac_try='test -s conftest.$ac_objext'
13602   { (eval echo "$as_me:13602: \"$ac_try\"") >&5
13603   (eval $ac_try) 2>&5
13604   ac_status=$?
13605   echo "$as_me:13605: \$? = $ac_status" >&5
13606   (exit $ac_status); }; }; then
13607   ac_cv_c_const=yes
13608 else
13609   echo "$as_me: failed program was:" >&5
13610 cat conftest.$ac_ext >&5
13611 ac_cv_c_const=no
13612 fi
13613 rm -f conftest.$ac_objext conftest.$ac_ext
13614 fi
13615 echo "$as_me:13615: result: $ac_cv_c_const" >&5
13616 echo "${ECHO_T}$ac_cv_c_const" >&6
13617 if test $ac_cv_c_const = no; then
13618
13619 cat >>confdefs.h <<\EOF
13620 #define const
13621 EOF
13622
13623 fi
13624
13625 echo "$as_me:13625: checking for inline" >&5
13626 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13627 if test "${ac_cv_c_inline+set}" = set; then
13628   echo $ECHO_N "(cached) $ECHO_C" >&6
13629 else
13630   ac_cv_c_inline=no
13631 for ac_kw in inline __inline__ __inline; do
13632   cat >conftest.$ac_ext <<_ACEOF
13633 #line 13633 "configure"
13634 #include "confdefs.h"
13635 #ifndef __cplusplus
13636 static $ac_kw int static_foo () {return 0; }
13637 $ac_kw int foo () {return 0; }
13638 #endif
13639
13640 _ACEOF
13641 rm -f conftest.$ac_objext
13642 if { (eval echo "$as_me:13642: \"$ac_compile\"") >&5
13643   (eval $ac_compile) 2>&5
13644   ac_status=$?
13645   echo "$as_me:13645: \$? = $ac_status" >&5
13646   (exit $ac_status); } &&
13647          { ac_try='test -s conftest.$ac_objext'
13648   { (eval echo "$as_me:13648: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:13651: \$? = $ac_status" >&5
13652   (exit $ac_status); }; }; then
13653   ac_cv_c_inline=$ac_kw; break
13654 else
13655   echo "$as_me: failed program was:" >&5
13656 cat conftest.$ac_ext >&5
13657 fi
13658 rm -f conftest.$ac_objext conftest.$ac_ext
13659 done
13660
13661 fi
13662 echo "$as_me:13662: result: $ac_cv_c_inline" >&5
13663 echo "${ECHO_T}$ac_cv_c_inline" >&6
13664 case $ac_cv_c_inline in
13665   inline | yes) ;;
13666   no)
13667 cat >>confdefs.h <<\EOF
13668 #define inline
13669 EOF
13670  ;;
13671   *)  cat >>confdefs.h <<EOF
13672 #define inline $ac_cv_c_inline
13673 EOF
13674  ;;
13675 esac
13676
13677 NCURSES_INLINE=
13678 if test "$ac_cv_c_inline" != no ; then
13679   NCURSES_INLINE=inline
13680   if test "$INTEL_COMPILER" = yes
13681   then
13682     :
13683   elif test "$GCC" = yes
13684   then
13685     echo "$as_me:13685: checking if $CC supports options to tune inlining" >&5
13686 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13687 if test "${cf_cv_gcc_inline+set}" = set; then
13688   echo $ECHO_N "(cached) $ECHO_C" >&6
13689 else
13690
13691       cf_save_CFLAGS=$CFLAGS
13692       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13693       cat >conftest.$ac_ext <<_ACEOF
13694 #line 13694 "configure"
13695 #include "confdefs.h"
13696 inline int foo(void) { return 1; }
13697 int
13698 main ()
13699 {
13700 ${cf_cv_main_return:-return} foo()
13701   ;
13702   return 0;
13703 }
13704 _ACEOF
13705 rm -f conftest.$ac_objext
13706 if { (eval echo "$as_me:13706: \"$ac_compile\"") >&5
13707   (eval $ac_compile) 2>&5
13708   ac_status=$?
13709   echo "$as_me:13709: \$? = $ac_status" >&5
13710   (exit $ac_status); } &&
13711          { ac_try='test -s conftest.$ac_objext'
13712   { (eval echo "$as_me:13712: \"$ac_try\"") >&5
13713   (eval $ac_try) 2>&5
13714   ac_status=$?
13715   echo "$as_me:13715: \$? = $ac_status" >&5
13716   (exit $ac_status); }; }; then
13717   cf_cv_gcc_inline=yes
13718 else
13719   echo "$as_me: failed program was:" >&5
13720 cat conftest.$ac_ext >&5
13721 cf_cv_gcc_inline=no
13722 fi
13723 rm -f conftest.$ac_objext conftest.$ac_ext
13724       CFLAGS=$cf_save_CFLAGS
13725
13726 fi
13727 echo "$as_me:13727: result: $cf_cv_gcc_inline" >&5
13728 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13729     if test "$cf_cv_gcc_inline" = yes ; then
13730
13731 cf_fix_cppflags=no
13732 cf_new_cflags=
13733 cf_new_cppflags=
13734 cf_new_extra_cppflags=
13735
13736 for cf_add_cflags in --param max-inline-insns-single=1200
13737 do
13738 case $cf_fix_cppflags in
13739 no)
13740         case $cf_add_cflags in #(vi
13741         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13742                 case $cf_add_cflags in
13743                 -D*)
13744                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13745
13746                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13747                                 && test -z "${cf_tst_cflags}" \
13748                                 && cf_fix_cppflags=yes
13749
13750                         if test $cf_fix_cppflags = yes ; then
13751                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13752                                 continue
13753                         elif test "${cf_tst_cflags}" = "\"'" ; then
13754                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13755                                 continue
13756                         fi
13757                         ;;
13758                 esac
13759                 case "$CPPFLAGS" in
13760                 *$cf_add_cflags) #(vi
13761                         ;;
13762                 *) #(vi
13763                         case $cf_add_cflags in #(vi
13764                         -D*)
13765                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13766
13767 CPPFLAGS=`echo "$CPPFLAGS" | \
13768         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13769                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13770
13771                                 ;;
13772                         esac
13773                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13774                         ;;
13775                 esac
13776                 ;;
13777         *)
13778                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13779                 ;;
13780         esac
13781         ;;
13782 yes)
13783         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13784
13785         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13786
13787         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13788                 && test -z "${cf_tst_cflags}" \
13789                 && cf_fix_cppflags=no
13790         ;;
13791 esac
13792 done
13793
13794 if test -n "$cf_new_cflags" ; then
13795
13796         CFLAGS="$CFLAGS $cf_new_cflags"
13797 fi
13798
13799 if test -n "$cf_new_cppflags" ; then
13800
13801         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13802 fi
13803
13804 if test -n "$cf_new_extra_cppflags" ; then
13805
13806         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13807 fi
13808
13809     fi
13810   fi
13811 fi
13812
13813 echo "$as_me:13813: checking for signal global datatype" >&5
13814 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13815 if test "${cf_cv_sig_atomic_t+set}" = set; then
13816   echo $ECHO_N "(cached) $ECHO_C" >&6
13817 else
13818
13819         for cf_type in \
13820                 "volatile sig_atomic_t" \
13821                 "sig_atomic_t" \
13822                 "int"
13823         do
13824         cat >conftest.$ac_ext <<_ACEOF
13825 #line 13825 "configure"
13826 #include "confdefs.h"
13827
13828 #include <sys/types.h>
13829 #include <signal.h>
13830 #include <stdio.h>
13831
13832 extern $cf_type x;
13833 $cf_type x;
13834 static void handler(int sig)
13835 {
13836         x = 5;
13837 }
13838 int
13839 main ()
13840 {
13841 signal(SIGINT, handler);
13842                  x = 1
13843   ;
13844   return 0;
13845 }
13846 _ACEOF
13847 rm -f conftest.$ac_objext
13848 if { (eval echo "$as_me:13848: \"$ac_compile\"") >&5
13849   (eval $ac_compile) 2>&5
13850   ac_status=$?
13851   echo "$as_me:13851: \$? = $ac_status" >&5
13852   (exit $ac_status); } &&
13853          { ac_try='test -s conftest.$ac_objext'
13854   { (eval echo "$as_me:13854: \"$ac_try\"") >&5
13855   (eval $ac_try) 2>&5
13856   ac_status=$?
13857   echo "$as_me:13857: \$? = $ac_status" >&5
13858   (exit $ac_status); }; }; then
13859   cf_cv_sig_atomic_t=$cf_type
13860 else
13861   echo "$as_me: failed program was:" >&5
13862 cat conftest.$ac_ext >&5
13863 cf_cv_sig_atomic_t=no
13864 fi
13865 rm -f conftest.$ac_objext conftest.$ac_ext
13866                 test "$cf_cv_sig_atomic_t" != no && break
13867         done
13868
13869 fi
13870
13871 echo "$as_me:13871: result: $cf_cv_sig_atomic_t" >&5
13872 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13873 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13874 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13875 EOF
13876
13877 if test $NCURSES_CHTYPE = auto ; then
13878
13879 echo "$as_me:13879: checking for type of chtype" >&5
13880 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13881 if test "${cf_cv_typeof_chtype+set}" = set; then
13882   echo $ECHO_N "(cached) $ECHO_C" >&6
13883 else
13884
13885                 if test "$cross_compiling" = yes; then
13886   cf_cv_typeof_chtype=long
13887 else
13888   cat >conftest.$ac_ext <<_ACEOF
13889 #line 13889 "configure"
13890 #include "confdefs.h"
13891
13892 #define WANT_BITS 31
13893 #include <stdio.h>
13894 int main()
13895 {
13896         FILE *fp = fopen("cf_test.out", "w");
13897         if (fp != 0) {
13898                 char *result = "long";
13899                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13900                         int n;
13901                         unsigned int x, y;
13902                         for (n = 0; n < WANT_BITS; n++) {
13903                                 x = (1 << n);
13904                                 y = (x >> n);
13905                                 if (y != 1 || x == 0) {
13906                                         x = 0;
13907                                         break;
13908                                 }
13909                         }
13910                         /*
13911                          * If x is nonzero, an int is big enough for the bits
13912                          * that we want.
13913                          */
13914                         result = (x != 0) ? "int" : "long";
13915                 }
13916                 fputs(result, fp);
13917                 fclose(fp);
13918         }
13919         ${cf_cv_main_return:-return}(0);
13920 }
13921
13922 _ACEOF
13923 rm -f conftest$ac_exeext
13924 if { (eval echo "$as_me:13924: \"$ac_link\"") >&5
13925   (eval $ac_link) 2>&5
13926   ac_status=$?
13927   echo "$as_me:13927: \$? = $ac_status" >&5
13928   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13929   { (eval echo "$as_me:13929: \"$ac_try\"") >&5
13930   (eval $ac_try) 2>&5
13931   ac_status=$?
13932   echo "$as_me:13932: \$? = $ac_status" >&5
13933   (exit $ac_status); }; }; then
13934   cf_cv_typeof_chtype=`cat cf_test.out`
13935 else
13936   echo "$as_me: program exited with status $ac_status" >&5
13937 echo "$as_me: failed program was:" >&5
13938 cat conftest.$ac_ext >&5
13939 cf_cv_typeof_chtype=long
13940 fi
13941 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13942 fi
13943                 rm -f cf_test.out
13944
13945 fi
13946
13947 echo "$as_me:13947: result: $cf_cv_typeof_chtype" >&5
13948 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13949
13950 cat >>confdefs.h <<EOF
13951 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13952 EOF
13953
13954 else
13955         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13956 fi
13957 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13958
13959 echo "$as_me:13959: checking if unsigned literals are legal" >&5
13960 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13961 if test "${cf_cv_unsigned_literals+set}" = set; then
13962   echo $ECHO_N "(cached) $ECHO_C" >&6
13963 else
13964
13965         cat >conftest.$ac_ext <<_ACEOF
13966 #line 13966 "configure"
13967 #include "confdefs.h"
13968
13969 int
13970 main ()
13971 {
13972 long x = 1L + 1UL + 1U + 1
13973   ;
13974   return 0;
13975 }
13976 _ACEOF
13977 rm -f conftest.$ac_objext
13978 if { (eval echo "$as_me:13978: \"$ac_compile\"") >&5
13979   (eval $ac_compile) 2>&5
13980   ac_status=$?
13981   echo "$as_me:13981: \$? = $ac_status" >&5
13982   (exit $ac_status); } &&
13983          { ac_try='test -s conftest.$ac_objext'
13984   { (eval echo "$as_me:13984: \"$ac_try\"") >&5
13985   (eval $ac_try) 2>&5
13986   ac_status=$?
13987   echo "$as_me:13987: \$? = $ac_status" >&5
13988   (exit $ac_status); }; }; then
13989   cf_cv_unsigned_literals=yes
13990 else
13991   echo "$as_me: failed program was:" >&5
13992 cat conftest.$ac_ext >&5
13993 cf_cv_unsigned_literals=no
13994 fi
13995 rm -f conftest.$ac_objext conftest.$ac_ext
13996
13997 fi
13998
13999 echo "$as_me:13999: result: $cf_cv_unsigned_literals" >&5
14000 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14001
14002 cf_cv_1UL="1"
14003 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14004 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14005
14006 if test $NCURSES_MMASK_T = auto ; then
14007         cf_cv_typeof_mmask_t=long
14008 else
14009         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14010 fi
14011 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14012
14013 ###     Checks for external-data
14014
14015 echo "$as_me:14015: checking if external errno is declared" >&5
14016 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14017 if test "${cf_cv_dcl_errno+set}" = set; then
14018   echo $ECHO_N "(cached) $ECHO_C" >&6
14019 else
14020
14021     cat >conftest.$ac_ext <<_ACEOF
14022 #line 14022 "configure"
14023 #include "confdefs.h"
14024
14025 #ifdef HAVE_STDLIB_H
14026 #include <stdlib.h>
14027 #endif
14028 #include <stdio.h>
14029 #include <sys/types.h>
14030 #include <errno.h>
14031 int
14032 main ()
14033 {
14034 int x = (int) errno
14035   ;
14036   return 0;
14037 }
14038 _ACEOF
14039 rm -f conftest.$ac_objext
14040 if { (eval echo "$as_me:14040: \"$ac_compile\"") >&5
14041   (eval $ac_compile) 2>&5
14042   ac_status=$?
14043   echo "$as_me:14043: \$? = $ac_status" >&5
14044   (exit $ac_status); } &&
14045          { ac_try='test -s conftest.$ac_objext'
14046   { (eval echo "$as_me:14046: \"$ac_try\"") >&5
14047   (eval $ac_try) 2>&5
14048   ac_status=$?
14049   echo "$as_me:14049: \$? = $ac_status" >&5
14050   (exit $ac_status); }; }; then
14051   cf_cv_dcl_errno=yes
14052 else
14053   echo "$as_me: failed program was:" >&5
14054 cat conftest.$ac_ext >&5
14055 cf_cv_dcl_errno=no
14056 fi
14057 rm -f conftest.$ac_objext conftest.$ac_ext
14058
14059 fi
14060 echo "$as_me:14060: result: $cf_cv_dcl_errno" >&5
14061 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14062
14063 if test "$cf_cv_dcl_errno" = no ; then
14064
14065 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14066
14067     cat >>confdefs.h <<EOF
14068 #define $cf_result 1
14069 EOF
14070
14071 fi
14072
14073 # It's possible (for near-UNIX clones) that the data doesn't exist
14074
14075 echo "$as_me:14075: checking if external errno exists" >&5
14076 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14077 if test "${cf_cv_have_errno+set}" = set; then
14078   echo $ECHO_N "(cached) $ECHO_C" >&6
14079 else
14080
14081     cat >conftest.$ac_ext <<_ACEOF
14082 #line 14082 "configure"
14083 #include "confdefs.h"
14084
14085 #undef errno
14086 extern int errno;
14087
14088 int
14089 main ()
14090 {
14091 errno = 2
14092   ;
14093   return 0;
14094 }
14095 _ACEOF
14096 rm -f conftest.$ac_objext conftest$ac_exeext
14097 if { (eval echo "$as_me:14097: \"$ac_link\"") >&5
14098   (eval $ac_link) 2>&5
14099   ac_status=$?
14100   echo "$as_me:14100: \$? = $ac_status" >&5
14101   (exit $ac_status); } &&
14102          { ac_try='test -s conftest$ac_exeext'
14103   { (eval echo "$as_me:14103: \"$ac_try\"") >&5
14104   (eval $ac_try) 2>&5
14105   ac_status=$?
14106   echo "$as_me:14106: \$? = $ac_status" >&5
14107   (exit $ac_status); }; }; then
14108   cf_cv_have_errno=yes
14109 else
14110   echo "$as_me: failed program was:" >&5
14111 cat conftest.$ac_ext >&5
14112 cf_cv_have_errno=no
14113 fi
14114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14115
14116 fi
14117 echo "$as_me:14117: result: $cf_cv_have_errno" >&5
14118 echo "${ECHO_T}$cf_cv_have_errno" >&6
14119
14120 if test "$cf_cv_have_errno" = yes ; then
14121
14122 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14123
14124     cat >>confdefs.h <<EOF
14125 #define $cf_result 1
14126 EOF
14127
14128 fi
14129
14130 echo "$as_me:14130: checking if data-only library module links" >&5
14131 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14132 if test "${cf_cv_link_dataonly+set}" = set; then
14133   echo $ECHO_N "(cached) $ECHO_C" >&6
14134 else
14135
14136         rm -f conftest.a
14137         cat >conftest.$ac_ext <<EOF
14138 #line 14138 "configure"
14139 int     testdata[3] = { 123, 456, 789 };
14140 EOF
14141         if { (eval echo "$as_me:14141: \"$ac_compile\"") >&5
14142   (eval $ac_compile) 2>&5
14143   ac_status=$?
14144   echo "$as_me:14144: \$? = $ac_status" >&5
14145   (exit $ac_status); } ; then
14146                 mv conftest.o data.o && \
14147                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14148         fi
14149         rm -f conftest.$ac_ext data.o
14150         cat >conftest.$ac_ext <<EOF
14151 #line 14151 "configure"
14152 int     testfunc()
14153 {
14154 #if defined(NeXT)
14155         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14156 #else
14157         extern int testdata[3];
14158         return testdata[0] == 123
14159            &&  testdata[1] == 456
14160            &&  testdata[2] == 789;
14161 #endif
14162 }
14163 EOF
14164         if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5
14165   (eval $ac_compile) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); }; then
14169                 mv conftest.o func.o && \
14170                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14171         fi
14172         rm -f conftest.$ac_ext func.o
14173         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14174         cf_saveLIBS="$LIBS"
14175         LIBS="conftest.a $LIBS"
14176         if test "$cross_compiling" = yes; then
14177   cf_cv_link_dataonly=unknown
14178 else
14179   cat >conftest.$ac_ext <<_ACEOF
14180 #line 14180 "configure"
14181 #include "confdefs.h"
14182
14183         int main()
14184         {
14185                 extern int testfunc();
14186                 ${cf_cv_main_return:-return} (!testfunc());
14187         }
14188
14189 _ACEOF
14190 rm -f conftest$ac_exeext
14191 if { (eval echo "$as_me:14191: \"$ac_link\"") >&5
14192   (eval $ac_link) 2>&5
14193   ac_status=$?
14194   echo "$as_me:14194: \$? = $ac_status" >&5
14195   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14196   { (eval echo "$as_me:14196: \"$ac_try\"") >&5
14197   (eval $ac_try) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit $ac_status); }; }; then
14201   cf_cv_link_dataonly=yes
14202 else
14203   echo "$as_me: program exited with status $ac_status" >&5
14204 echo "$as_me: failed program was:" >&5
14205 cat conftest.$ac_ext >&5
14206 cf_cv_link_dataonly=no
14207 fi
14208 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14209 fi
14210         LIBS="$cf_saveLIBS"
14211
14212 fi
14213
14214 echo "$as_me:14214: result: $cf_cv_link_dataonly" >&5
14215 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14216
14217 if test "$cf_cv_link_dataonly" = no ; then
14218         cat >>confdefs.h <<\EOF
14219 #define BROKEN_LINKER 1
14220 EOF
14221
14222         BROKEN_LINKER=1
14223 fi
14224
14225 ###     Checks for library functions.
14226
14227 for ac_func in \
14228 getcwd \
14229 getegid \
14230 geteuid \
14231 getttynam \
14232 issetugid \
14233 poll \
14234 remove \
14235 select \
14236 setbuf \
14237 setbuffer \
14238 setvbuf \
14239 sigaction \
14240 sigvec \
14241 strdup \
14242 strstr \
14243 tcgetpgrp \
14244 times \
14245 vsnprintf \
14246
14247 do
14248 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14249 echo "$as_me:14249: checking for $ac_func" >&5
14250 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14251 if eval "test \"\${$as_ac_var+set}\" = set"; then
14252   echo $ECHO_N "(cached) $ECHO_C" >&6
14253 else
14254   cat >conftest.$ac_ext <<_ACEOF
14255 #line 14255 "configure"
14256 #include "confdefs.h"
14257 /* System header to define __stub macros and hopefully few prototypes,
14258     which can conflict with char $ac_func (); below.  */
14259 #include <assert.h>
14260 /* Override any gcc2 internal prototype to avoid an error.  */
14261 #ifdef __cplusplus
14262 extern "C"
14263 #endif
14264 /* We use char because int might match the return type of a gcc2
14265    builtin and then its argument prototype would still apply.  */
14266 char $ac_func ();
14267 char (*f) ();
14268
14269 int
14270 main ()
14271 {
14272 /* The GNU C library defines this for functions which it implements
14273     to always fail with ENOSYS.  Some functions are actually named
14274     something starting with __ and the normal name is an alias.  */
14275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14276 choke me
14277 #else
14278 f = $ac_func;
14279 #endif
14280
14281   ;
14282   return 0;
14283 }
14284 _ACEOF
14285 rm -f conftest.$ac_objext conftest$ac_exeext
14286 if { (eval echo "$as_me:14286: \"$ac_link\"") >&5
14287   (eval $ac_link) 2>&5
14288   ac_status=$?
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit $ac_status); } &&
14291          { ac_try='test -s conftest$ac_exeext'
14292   { (eval echo "$as_me:14292: \"$ac_try\"") >&5
14293   (eval $ac_try) 2>&5
14294   ac_status=$?
14295   echo "$as_me:14295: \$? = $ac_status" >&5
14296   (exit $ac_status); }; }; then
14297   eval "$as_ac_var=yes"
14298 else
14299   echo "$as_me: failed program was:" >&5
14300 cat conftest.$ac_ext >&5
14301 eval "$as_ac_var=no"
14302 fi
14303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14304 fi
14305 echo "$as_me:14305: result: `eval echo '${'$as_ac_var'}'`" >&5
14306 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14307 if test `eval echo '${'$as_ac_var'}'` = yes; then
14308   cat >>confdefs.h <<EOF
14309 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14310 EOF
14311
14312 fi
14313 done
14314
14315 if test "$with_getcap" = "yes" ; then
14316
14317 echo "$as_me:14317: checking for terminal-capability database functions" >&5
14318 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14319 if test "${cf_cv_cgetent+set}" = set; then
14320   echo $ECHO_N "(cached) $ECHO_C" >&6
14321 else
14322
14323 cat >conftest.$ac_ext <<_ACEOF
14324 #line 14324 "configure"
14325 #include "confdefs.h"
14326
14327 #include <stdlib.h>
14328 int
14329 main ()
14330 {
14331
14332         char temp[128];
14333         char *buf = temp;
14334         char *db_array = temp;
14335         cgetent(&buf, /* int *, */ &db_array, "vt100");
14336         cgetcap(buf, "tc", '=');
14337         cgetmatch(buf, "tc");
14338
14339   ;
14340   return 0;
14341 }
14342 _ACEOF
14343 rm -f conftest.$ac_objext conftest$ac_exeext
14344 if { (eval echo "$as_me:14344: \"$ac_link\"") >&5
14345   (eval $ac_link) 2>&5
14346   ac_status=$?
14347   echo "$as_me:14347: \$? = $ac_status" >&5
14348   (exit $ac_status); } &&
14349          { ac_try='test -s conftest$ac_exeext'
14350   { (eval echo "$as_me:14350: \"$ac_try\"") >&5
14351   (eval $ac_try) 2>&5
14352   ac_status=$?
14353   echo "$as_me:14353: \$? = $ac_status" >&5
14354   (exit $ac_status); }; }; then
14355   cf_cv_cgetent=yes
14356 else
14357   echo "$as_me: failed program was:" >&5
14358 cat conftest.$ac_ext >&5
14359 cf_cv_cgetent=no
14360 fi
14361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14362
14363 fi
14364
14365 echo "$as_me:14365: result: $cf_cv_cgetent" >&5
14366 echo "${ECHO_T}$cf_cv_cgetent" >&6
14367 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14368 #define HAVE_BSD_CGETENT 1
14369 EOF
14370
14371 fi
14372
14373 echo "$as_me:14373: checking for isascii" >&5
14374 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14375 if test "${cf_cv_have_isascii+set}" = set; then
14376   echo $ECHO_N "(cached) $ECHO_C" >&6
14377 else
14378
14379         cat >conftest.$ac_ext <<_ACEOF
14380 #line 14380 "configure"
14381 #include "confdefs.h"
14382 #include <ctype.h>
14383 int
14384 main ()
14385 {
14386 int x = isascii(' ')
14387   ;
14388   return 0;
14389 }
14390 _ACEOF
14391 rm -f conftest.$ac_objext conftest$ac_exeext
14392 if { (eval echo "$as_me:14392: \"$ac_link\"") >&5
14393   (eval $ac_link) 2>&5
14394   ac_status=$?
14395   echo "$as_me:14395: \$? = $ac_status" >&5
14396   (exit $ac_status); } &&
14397          { ac_try='test -s conftest$ac_exeext'
14398   { (eval echo "$as_me:14398: \"$ac_try\"") >&5
14399   (eval $ac_try) 2>&5
14400   ac_status=$?
14401   echo "$as_me:14401: \$? = $ac_status" >&5
14402   (exit $ac_status); }; }; then
14403   cf_cv_have_isascii=yes
14404 else
14405   echo "$as_me: failed program was:" >&5
14406 cat conftest.$ac_ext >&5
14407 cf_cv_have_isascii=no
14408 fi
14409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14410
14411 fi
14412 echo "$as_me:14412: result: $cf_cv_have_isascii" >&5
14413 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14414 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14415 #define HAVE_ISASCII 1
14416 EOF
14417
14418 if test "$ac_cv_func_sigaction" = yes; then
14419 echo "$as_me:14419: checking whether sigaction needs _POSIX_SOURCE" >&5
14420 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14421 cat >conftest.$ac_ext <<_ACEOF
14422 #line 14422 "configure"
14423 #include "confdefs.h"
14424
14425 #include <sys/types.h>
14426 #include <signal.h>
14427 int
14428 main ()
14429 {
14430 struct sigaction act
14431   ;
14432   return 0;
14433 }
14434 _ACEOF
14435 rm -f conftest.$ac_objext
14436 if { (eval echo "$as_me:14436: \"$ac_compile\"") >&5
14437   (eval $ac_compile) 2>&5
14438   ac_status=$?
14439   echo "$as_me:14439: \$? = $ac_status" >&5
14440   (exit $ac_status); } &&
14441          { ac_try='test -s conftest.$ac_objext'
14442   { (eval echo "$as_me:14442: \"$ac_try\"") >&5
14443   (eval $ac_try) 2>&5
14444   ac_status=$?
14445   echo "$as_me:14445: \$? = $ac_status" >&5
14446   (exit $ac_status); }; }; then
14447   sigact_bad=no
14448 else
14449   echo "$as_me: failed program was:" >&5
14450 cat conftest.$ac_ext >&5
14451
14452 cat >conftest.$ac_ext <<_ACEOF
14453 #line 14453 "configure"
14454 #include "confdefs.h"
14455
14456 #define _POSIX_SOURCE
14457 #include <sys/types.h>
14458 #include <signal.h>
14459 int
14460 main ()
14461 {
14462 struct sigaction act
14463   ;
14464   return 0;
14465 }
14466 _ACEOF
14467 rm -f conftest.$ac_objext
14468 if { (eval echo "$as_me:14468: \"$ac_compile\"") >&5
14469   (eval $ac_compile) 2>&5
14470   ac_status=$?
14471   echo "$as_me:14471: \$? = $ac_status" >&5
14472   (exit $ac_status); } &&
14473          { ac_try='test -s conftest.$ac_objext'
14474   { (eval echo "$as_me:14474: \"$ac_try\"") >&5
14475   (eval $ac_try) 2>&5
14476   ac_status=$?
14477   echo "$as_me:14477: \$? = $ac_status" >&5
14478   (exit $ac_status); }; }; then
14479   sigact_bad=yes
14480          cat >>confdefs.h <<\EOF
14481 #define SVR4_ACTION 1
14482 EOF
14483
14484 else
14485   echo "$as_me: failed program was:" >&5
14486 cat conftest.$ac_ext >&5
14487 sigact_bad=unknown
14488 fi
14489 rm -f conftest.$ac_objext conftest.$ac_ext
14490 fi
14491 rm -f conftest.$ac_objext conftest.$ac_ext
14492 echo "$as_me:14492: result: $sigact_bad" >&5
14493 echo "${ECHO_T}$sigact_bad" >&6
14494 fi
14495
14496 echo "$as_me:14496: checking if nanosleep really works" >&5
14497 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14498 if test "${cf_cv_func_nanosleep+set}" = set; then
14499   echo $ECHO_N "(cached) $ECHO_C" >&6
14500 else
14501
14502 if test "$cross_compiling" = yes; then
14503   cf_cv_func_nanosleep=unknown
14504 else
14505   cat >conftest.$ac_ext <<_ACEOF
14506 #line 14506 "configure"
14507 #include "confdefs.h"
14508
14509 #include <stdio.h>
14510 #include <errno.h>
14511 #include <time.h>
14512
14513 #ifdef HAVE_SYS_TIME_H
14514 #include <sys/time.h>
14515 #endif
14516
14517 int main() {
14518         struct timespec ts1, ts2;
14519         int code;
14520         ts1.tv_sec  = 0;
14521         ts1.tv_nsec = 750000000;
14522         ts2.tv_sec  = 0;
14523         ts2.tv_nsec = 0;
14524         errno = 0;
14525         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14526         ${cf_cv_main_return:-return}(code != 0);
14527 }
14528
14529 _ACEOF
14530 rm -f conftest$ac_exeext
14531 if { (eval echo "$as_me:14531: \"$ac_link\"") >&5
14532   (eval $ac_link) 2>&5
14533   ac_status=$?
14534   echo "$as_me:14534: \$? = $ac_status" >&5
14535   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14536   { (eval echo "$as_me:14536: \"$ac_try\"") >&5
14537   (eval $ac_try) 2>&5
14538   ac_status=$?
14539   echo "$as_me:14539: \$? = $ac_status" >&5
14540   (exit $ac_status); }; }; then
14541   cf_cv_func_nanosleep=yes
14542 else
14543   echo "$as_me: program exited with status $ac_status" >&5
14544 echo "$as_me: failed program was:" >&5
14545 cat conftest.$ac_ext >&5
14546 cf_cv_func_nanosleep=no
14547 fi
14548 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14549 fi
14550 fi
14551 echo "$as_me:14551: result: $cf_cv_func_nanosleep" >&5
14552 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14553
14554 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14555 #define HAVE_NANOSLEEP 1
14556 EOF
14557
14558 for ac_header in \
14559 termio.h \
14560 termios.h \
14561 unistd.h \
14562
14563 do
14564 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14565 echo "$as_me:14565: checking for $ac_header" >&5
14566 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14567 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14568   echo $ECHO_N "(cached) $ECHO_C" >&6
14569 else
14570   cat >conftest.$ac_ext <<_ACEOF
14571 #line 14571 "configure"
14572 #include "confdefs.h"
14573 #include <$ac_header>
14574 _ACEOF
14575 if { (eval echo "$as_me:14575: \"$ac_cpp conftest.$ac_ext\"") >&5
14576   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14577   ac_status=$?
14578   egrep -v '^ *\+' conftest.er1 >conftest.err
14579   rm -f conftest.er1
14580   cat conftest.err >&5
14581   echo "$as_me:14581: \$? = $ac_status" >&5
14582   (exit $ac_status); } >/dev/null; then
14583   if test -s conftest.err; then
14584     ac_cpp_err=$ac_c_preproc_warn_flag
14585   else
14586     ac_cpp_err=
14587   fi
14588 else
14589   ac_cpp_err=yes
14590 fi
14591 if test -z "$ac_cpp_err"; then
14592   eval "$as_ac_Header=yes"
14593 else
14594   echo "$as_me: failed program was:" >&5
14595   cat conftest.$ac_ext >&5
14596   eval "$as_ac_Header=no"
14597 fi
14598 rm -f conftest.err conftest.$ac_ext
14599 fi
14600 echo "$as_me:14600: result: `eval echo '${'$as_ac_Header'}'`" >&5
14601 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14602 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14603   cat >>confdefs.h <<EOF
14604 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14605 EOF
14606
14607 fi
14608 done
14609
14610 if test "$ISC" = yes ; then
14611
14612 for ac_header in sys/termio.h
14613 do
14614 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14615 echo "$as_me:14615: checking for $ac_header" >&5
14616 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14617 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14618   echo $ECHO_N "(cached) $ECHO_C" >&6
14619 else
14620   cat >conftest.$ac_ext <<_ACEOF
14621 #line 14621 "configure"
14622 #include "confdefs.h"
14623 #include <$ac_header>
14624 _ACEOF
14625 if { (eval echo "$as_me:14625: \"$ac_cpp conftest.$ac_ext\"") >&5
14626   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14627   ac_status=$?
14628   egrep -v '^ *\+' conftest.er1 >conftest.err
14629   rm -f conftest.er1
14630   cat conftest.err >&5
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); } >/dev/null; then
14633   if test -s conftest.err; then
14634     ac_cpp_err=$ac_c_preproc_warn_flag
14635   else
14636     ac_cpp_err=
14637   fi
14638 else
14639   ac_cpp_err=yes
14640 fi
14641 if test -z "$ac_cpp_err"; then
14642   eval "$as_ac_Header=yes"
14643 else
14644   echo "$as_me: failed program was:" >&5
14645   cat conftest.$ac_ext >&5
14646   eval "$as_ac_Header=no"
14647 fi
14648 rm -f conftest.err conftest.$ac_ext
14649 fi
14650 echo "$as_me:14650: result: `eval echo '${'$as_ac_Header'}'`" >&5
14651 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14652 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14653   cat >>confdefs.h <<EOF
14654 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14655 EOF
14656
14657 fi
14658 done
14659
14660 fi
14661 if test "$ac_cv_header_termios_h" = yes ; then
14662         case "$CFLAGS $CPPFLAGS" in
14663         *-D_POSIX_SOURCE*)
14664                 termios_bad=dunno ;;
14665         *)      termios_bad=maybe ;;
14666         esac
14667         if test "$termios_bad" = maybe ; then
14668         echo "$as_me:14668: checking whether termios.h needs _POSIX_SOURCE" >&5
14669 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14670         cat >conftest.$ac_ext <<_ACEOF
14671 #line 14671 "configure"
14672 #include "confdefs.h"
14673 #include <termios.h>
14674 int
14675 main ()
14676 {
14677 struct termios foo; int x = foo.c_iflag
14678   ;
14679   return 0;
14680 }
14681 _ACEOF
14682 rm -f conftest.$ac_objext
14683 if { (eval echo "$as_me:14683: \"$ac_compile\"") >&5
14684   (eval $ac_compile) 2>&5
14685   ac_status=$?
14686   echo "$as_me:14686: \$? = $ac_status" >&5
14687   (exit $ac_status); } &&
14688          { ac_try='test -s conftest.$ac_objext'
14689   { (eval echo "$as_me:14689: \"$ac_try\"") >&5
14690   (eval $ac_try) 2>&5
14691   ac_status=$?
14692   echo "$as_me:14692: \$? = $ac_status" >&5
14693   (exit $ac_status); }; }; then
14694   termios_bad=no
14695 else
14696   echo "$as_me: failed program was:" >&5
14697 cat conftest.$ac_ext >&5
14698
14699                 cat >conftest.$ac_ext <<_ACEOF
14700 #line 14700 "configure"
14701 #include "confdefs.h"
14702
14703 #define _POSIX_SOURCE
14704 #include <termios.h>
14705 int
14706 main ()
14707 {
14708 struct termios foo; int x = foo.c_iflag
14709   ;
14710   return 0;
14711 }
14712 _ACEOF
14713 rm -f conftest.$ac_objext
14714 if { (eval echo "$as_me:14714: \"$ac_compile\"") >&5
14715   (eval $ac_compile) 2>&5
14716   ac_status=$?
14717   echo "$as_me:14717: \$? = $ac_status" >&5
14718   (exit $ac_status); } &&
14719          { ac_try='test -s conftest.$ac_objext'
14720   { (eval echo "$as_me:14720: \"$ac_try\"") >&5
14721   (eval $ac_try) 2>&5
14722   ac_status=$?
14723   echo "$as_me:14723: \$? = $ac_status" >&5
14724   (exit $ac_status); }; }; then
14725   termios_bad=unknown
14726 else
14727   echo "$as_me: failed program was:" >&5
14728 cat conftest.$ac_ext >&5
14729 termios_bad=yes cat >>confdefs.h <<\EOF
14730 #define SVR4_TERMIO 1
14731 EOF
14732
14733 fi
14734 rm -f conftest.$ac_objext conftest.$ac_ext
14735
14736 fi
14737 rm -f conftest.$ac_objext conftest.$ac_ext
14738         echo "$as_me:14738: result: $termios_bad" >&5
14739 echo "${ECHO_T}$termios_bad" >&6
14740         fi
14741 fi
14742
14743 echo "$as_me:14743: checking for tcgetattr" >&5
14744 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14745 if test "${cf_cv_have_tcgetattr+set}" = set; then
14746   echo $ECHO_N "(cached) $ECHO_C" >&6
14747 else
14748
14749 cat >conftest.$ac_ext <<_ACEOF
14750 #line 14750 "configure"
14751 #include "confdefs.h"
14752
14753 #include <sys/types.h>
14754 #ifdef HAVE_UNISTD_H
14755 #include <unistd.h>
14756 #endif
14757 #ifdef HAVE_TERMIOS_H
14758 #include <termios.h>
14759 #define TTY struct termios
14760 #else
14761 #ifdef HAVE_TERMIO_H
14762 #include <termio.h>
14763 #define TTY struct termio
14764 #endif
14765 #endif
14766
14767 int
14768 main ()
14769 {
14770
14771 TTY foo;
14772 tcgetattr(1, &foo);
14773   ;
14774   return 0;
14775 }
14776 _ACEOF
14777 rm -f conftest.$ac_objext conftest$ac_exeext
14778 if { (eval echo "$as_me:14778: \"$ac_link\"") >&5
14779   (eval $ac_link) 2>&5
14780   ac_status=$?
14781   echo "$as_me:14781: \$? = $ac_status" >&5
14782   (exit $ac_status); } &&
14783          { ac_try='test -s conftest$ac_exeext'
14784   { (eval echo "$as_me:14784: \"$ac_try\"") >&5
14785   (eval $ac_try) 2>&5
14786   ac_status=$?
14787   echo "$as_me:14787: \$? = $ac_status" >&5
14788   (exit $ac_status); }; }; then
14789   cf_cv_have_tcgetattr=yes
14790 else
14791   echo "$as_me: failed program was:" >&5
14792 cat conftest.$ac_ext >&5
14793 cf_cv_have_tcgetattr=no
14794 fi
14795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14796 fi
14797 echo "$as_me:14797: result: $cf_cv_have_tcgetattr" >&5
14798 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14799 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14800 #define HAVE_TCGETATTR 1
14801 EOF
14802
14803 echo "$as_me:14803: checking for vsscanf function or workaround" >&5
14804 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14805 if test "${cf_cv_func_vsscanf+set}" = set; then
14806   echo $ECHO_N "(cached) $ECHO_C" >&6
14807 else
14808
14809 cat >conftest.$ac_ext <<_ACEOF
14810 #line 14810 "configure"
14811 #include "confdefs.h"
14812
14813 #include <stdarg.h>
14814 #include <stdio.h>
14815 int
14816 main ()
14817 {
14818
14819         va_list ap;
14820         vsscanf("from", "%d", ap)
14821   ;
14822   return 0;
14823 }
14824 _ACEOF
14825 rm -f conftest.$ac_objext conftest$ac_exeext
14826 if { (eval echo "$as_me:14826: \"$ac_link\"") >&5
14827   (eval $ac_link) 2>&5
14828   ac_status=$?
14829   echo "$as_me:14829: \$? = $ac_status" >&5
14830   (exit $ac_status); } &&
14831          { ac_try='test -s conftest$ac_exeext'
14832   { (eval echo "$as_me:14832: \"$ac_try\"") >&5
14833   (eval $ac_try) 2>&5
14834   ac_status=$?
14835   echo "$as_me:14835: \$? = $ac_status" >&5
14836   (exit $ac_status); }; }; then
14837   cf_cv_func_vsscanf=vsscanf
14838 else
14839   echo "$as_me: failed program was:" >&5
14840 cat conftest.$ac_ext >&5
14841
14842 cat >conftest.$ac_ext <<_ACEOF
14843 #line 14843 "configure"
14844 #include "confdefs.h"
14845
14846 #include <stdarg.h>
14847 #include <stdio.h>
14848 int
14849 main ()
14850 {
14851
14852     FILE strbuf;
14853     char *str = "from";
14854
14855     strbuf._flag = _IOREAD;
14856     strbuf._ptr = strbuf._base = (unsigned char *) str;
14857     strbuf._cnt = strlen(str);
14858     strbuf._file = _NFILE;
14859     return (vfscanf(&strbuf, "%d", ap))
14860   ;
14861   return 0;
14862 }
14863 _ACEOF
14864 rm -f conftest.$ac_objext conftest$ac_exeext
14865 if { (eval echo "$as_me:14865: \"$ac_link\"") >&5
14866   (eval $ac_link) 2>&5
14867   ac_status=$?
14868   echo "$as_me:14868: \$? = $ac_status" >&5
14869   (exit $ac_status); } &&
14870          { ac_try='test -s conftest$ac_exeext'
14871   { (eval echo "$as_me:14871: \"$ac_try\"") >&5
14872   (eval $ac_try) 2>&5
14873   ac_status=$?
14874   echo "$as_me:14874: \$? = $ac_status" >&5
14875   (exit $ac_status); }; }; then
14876   cf_cv_func_vsscanf=vfscanf
14877 else
14878   echo "$as_me: failed program was:" >&5
14879 cat conftest.$ac_ext >&5
14880
14881 cat >conftest.$ac_ext <<_ACEOF
14882 #line 14882 "configure"
14883 #include "confdefs.h"
14884
14885 #include <stdarg.h>
14886 #include <stdio.h>
14887 int
14888 main ()
14889 {
14890
14891     FILE strbuf;
14892     char *str = "from";
14893
14894     strbuf._flag = _IOREAD;
14895     strbuf._ptr = strbuf._base = (unsigned char *) str;
14896     strbuf._cnt = strlen(str);
14897     strbuf._file = _NFILE;
14898     return (_doscan(&strbuf, "%d", ap))
14899   ;
14900   return 0;
14901 }
14902 _ACEOF
14903 rm -f conftest.$ac_objext conftest$ac_exeext
14904 if { (eval echo "$as_me:14904: \"$ac_link\"") >&5
14905   (eval $ac_link) 2>&5
14906   ac_status=$?
14907   echo "$as_me:14907: \$? = $ac_status" >&5
14908   (exit $ac_status); } &&
14909          { ac_try='test -s conftest$ac_exeext'
14910   { (eval echo "$as_me:14910: \"$ac_try\"") >&5
14911   (eval $ac_try) 2>&5
14912   ac_status=$?
14913   echo "$as_me:14913: \$? = $ac_status" >&5
14914   (exit $ac_status); }; }; then
14915   cf_cv_func_vsscanf=_doscan
14916 else
14917   echo "$as_me: failed program was:" >&5
14918 cat conftest.$ac_ext >&5
14919
14920 cf_cv_func_vsscanf=no
14921 fi
14922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14923 fi
14924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14925 fi
14926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14927 fi
14928 echo "$as_me:14928: result: $cf_cv_func_vsscanf" >&5
14929 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14930
14931 case $cf_cv_func_vsscanf in #(vi
14932 vsscanf) cat >>confdefs.h <<\EOF
14933 #define HAVE_VSSCANF 1
14934 EOF
14935 ;; #(vi
14936 vfscanf) cat >>confdefs.h <<\EOF
14937 #define HAVE_VFSCANF 1
14938 EOF
14939 ;; #(vi
14940 _doscan) cat >>confdefs.h <<\EOF
14941 #define HAVE__DOSCAN 1
14942 EOF
14943 ;;
14944 esac
14945
14946 echo "$as_me:14946: checking for working mkstemp" >&5
14947 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14948 if test "${cf_cv_func_mkstemp+set}" = set; then
14949   echo $ECHO_N "(cached) $ECHO_C" >&6
14950 else
14951
14952 rm -f conftest*
14953 if test "$cross_compiling" = yes; then
14954   echo "$as_me:14954: checking for mkstemp" >&5
14955 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14956 if test "${ac_cv_func_mkstemp+set}" = set; then
14957   echo $ECHO_N "(cached) $ECHO_C" >&6
14958 else
14959   cat >conftest.$ac_ext <<_ACEOF
14960 #line 14960 "configure"
14961 #include "confdefs.h"
14962 /* System header to define __stub macros and hopefully few prototypes,
14963     which can conflict with char mkstemp (); below.  */
14964 #include <assert.h>
14965 /* Override any gcc2 internal prototype to avoid an error.  */
14966 #ifdef __cplusplus
14967 extern "C"
14968 #endif
14969 /* We use char because int might match the return type of a gcc2
14970    builtin and then its argument prototype would still apply.  */
14971 char mkstemp ();
14972 char (*f) ();
14973
14974 int
14975 main ()
14976 {
14977 /* The GNU C library defines this for functions which it implements
14978     to always fail with ENOSYS.  Some functions are actually named
14979     something starting with __ and the normal name is an alias.  */
14980 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14981 choke me
14982 #else
14983 f = mkstemp;
14984 #endif
14985
14986   ;
14987   return 0;
14988 }
14989 _ACEOF
14990 rm -f conftest.$ac_objext conftest$ac_exeext
14991 if { (eval echo "$as_me:14991: \"$ac_link\"") >&5
14992   (eval $ac_link) 2>&5
14993   ac_status=$?
14994   echo "$as_me:14994: \$? = $ac_status" >&5
14995   (exit $ac_status); } &&
14996          { ac_try='test -s conftest$ac_exeext'
14997   { (eval echo "$as_me:14997: \"$ac_try\"") >&5
14998   (eval $ac_try) 2>&5
14999   ac_status=$?
15000   echo "$as_me:15000: \$? = $ac_status" >&5
15001   (exit $ac_status); }; }; then
15002   ac_cv_func_mkstemp=yes
15003 else
15004   echo "$as_me: failed program was:" >&5
15005 cat conftest.$ac_ext >&5
15006 ac_cv_func_mkstemp=no
15007 fi
15008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15009 fi
15010 echo "$as_me:15010: result: $ac_cv_func_mkstemp" >&5
15011 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15012
15013 else
15014   cat >conftest.$ac_ext <<_ACEOF
15015 #line 15015 "configure"
15016 #include "confdefs.h"
15017
15018 #include <sys/types.h>
15019 #include <stdlib.h>
15020 #include <stdio.h>
15021 #include <string.h>
15022 #include <sys/stat.h>
15023 int main()
15024 {
15025         char *tmpl = "conftestXXXXXX";
15026         char name[2][80];
15027         int n;
15028         int result = 0;
15029         int fd;
15030         struct stat sb;
15031
15032         umask(077);
15033         for (n = 0; n < 2; ++n) {
15034                 strcpy(name[n], tmpl);
15035                 if ((fd = mkstemp(name[n])) >= 0) {
15036                         if (!strcmp(name[n], tmpl)
15037                          || stat(name[n], &sb) != 0
15038                          || (sb.st_mode & S_IFMT) != S_IFREG
15039                          || (sb.st_mode & 077) != 0) {
15040                                 result = 1;
15041                         }
15042                         close(fd);
15043                 }
15044         }
15045         if (result == 0
15046          && !strcmp(name[0], name[1]))
15047                 result = 1;
15048         ${cf_cv_main_return:-return}(result);
15049 }
15050
15051 _ACEOF
15052 rm -f conftest$ac_exeext
15053 if { (eval echo "$as_me:15053: \"$ac_link\"") >&5
15054   (eval $ac_link) 2>&5
15055   ac_status=$?
15056   echo "$as_me:15056: \$? = $ac_status" >&5
15057   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15058   { (eval echo "$as_me:15058: \"$ac_try\"") >&5
15059   (eval $ac_try) 2>&5
15060   ac_status=$?
15061   echo "$as_me:15061: \$? = $ac_status" >&5
15062   (exit $ac_status); }; }; then
15063   cf_cv_func_mkstemp=yes
15064
15065 else
15066   echo "$as_me: program exited with status $ac_status" >&5
15067 echo "$as_me: failed program was:" >&5
15068 cat conftest.$ac_ext >&5
15069 cf_cv_func_mkstemp=no
15070
15071 fi
15072 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15073 fi
15074
15075 fi
15076 echo "$as_me:15076: result: $cf_cv_func_mkstemp" >&5
15077 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15078 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15079         cat >>confdefs.h <<\EOF
15080 #define HAVE_MKSTEMP 1
15081 EOF
15082
15083 fi
15084
15085 # setup for prototype of fallback for vsscanf()
15086
15087 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15088         HAVE_VSSCANF=1
15089 else
15090         HAVE_VSSCANF=0
15091 fi
15092
15093 if test "$cross_compiling" = yes ; then
15094         { echo "$as_me:15094: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15095 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15096 else
15097         echo "$as_me:15097: checking whether setvbuf arguments are reversed" >&5
15098 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15099 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15100   echo $ECHO_N "(cached) $ECHO_C" >&6
15101 else
15102   if test "$cross_compiling" = yes; then
15103   { { echo "$as_me:15103: error: cannot run test program while cross compiling" >&5
15104 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15105    { (exit 1); exit 1; }; }
15106 else
15107   cat >conftest.$ac_ext <<_ACEOF
15108 #line 15108 "configure"
15109 #include "confdefs.h"
15110 #include <stdio.h>
15111 /* If setvbuf has the reversed format, exit 0. */
15112 int
15113 main ()
15114 {
15115   /* This call has the arguments reversed.
15116      A reversed system may check and see that the address of main
15117      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15118   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15119     $ac_main_return(1);
15120   putc('\r', stdout);
15121   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15122 }
15123 _ACEOF
15124 rm -f conftest$ac_exeext
15125 if { (eval echo "$as_me:15125: \"$ac_link\"") >&5
15126   (eval $ac_link) 2>&5
15127   ac_status=$?
15128   echo "$as_me:15128: \$? = $ac_status" >&5
15129   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15130   { (eval echo "$as_me:15130: \"$ac_try\"") >&5
15131   (eval $ac_try) 2>&5
15132   ac_status=$?
15133   echo "$as_me:15133: \$? = $ac_status" >&5
15134   (exit $ac_status); }; }; then
15135   ac_cv_func_setvbuf_reversed=yes
15136 else
15137   echo "$as_me: program exited with status $ac_status" >&5
15138 echo "$as_me: failed program was:" >&5
15139 cat conftest.$ac_ext >&5
15140 ac_cv_func_setvbuf_reversed=no
15141 fi
15142 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15143 fi
15144 rm -f core core.* *.core
15145 fi
15146 echo "$as_me:15146: result: $ac_cv_func_setvbuf_reversed" >&5
15147 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15148 if test $ac_cv_func_setvbuf_reversed = yes; then
15149
15150 cat >>confdefs.h <<\EOF
15151 #define SETVBUF_REVERSED 1
15152 EOF
15153
15154 fi
15155
15156 fi
15157 echo "$as_me:15157: checking return type of signal handlers" >&5
15158 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15159 if test "${ac_cv_type_signal+set}" = set; then
15160   echo $ECHO_N "(cached) $ECHO_C" >&6
15161 else
15162   cat >conftest.$ac_ext <<_ACEOF
15163 #line 15163 "configure"
15164 #include "confdefs.h"
15165 #include <sys/types.h>
15166 #include <signal.h>
15167 #ifdef signal
15168 # undef signal
15169 #endif
15170 #ifdef __cplusplus
15171 extern "C" void (*signal (int, void (*)(int)))(int);
15172 #else
15173 void (*signal ()) ();
15174 #endif
15175
15176 int
15177 main ()
15178 {
15179 int i;
15180   ;
15181   return 0;
15182 }
15183 _ACEOF
15184 rm -f conftest.$ac_objext
15185 if { (eval echo "$as_me:15185: \"$ac_compile\"") >&5
15186   (eval $ac_compile) 2>&5
15187   ac_status=$?
15188   echo "$as_me:15188: \$? = $ac_status" >&5
15189   (exit $ac_status); } &&
15190          { ac_try='test -s conftest.$ac_objext'
15191   { (eval echo "$as_me:15191: \"$ac_try\"") >&5
15192   (eval $ac_try) 2>&5
15193   ac_status=$?
15194   echo "$as_me:15194: \$? = $ac_status" >&5
15195   (exit $ac_status); }; }; then
15196   ac_cv_type_signal=void
15197 else
15198   echo "$as_me: failed program was:" >&5
15199 cat conftest.$ac_ext >&5
15200 ac_cv_type_signal=int
15201 fi
15202 rm -f conftest.$ac_objext conftest.$ac_ext
15203 fi
15204 echo "$as_me:15204: result: $ac_cv_type_signal" >&5
15205 echo "${ECHO_T}$ac_cv_type_signal" >&6
15206
15207 cat >>confdefs.h <<EOF
15208 #define RETSIGTYPE $ac_cv_type_signal
15209 EOF
15210
15211 echo "$as_me:15211: checking for type sigaction_t" >&5
15212 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15213 if test "${cf_cv_type_sigaction+set}" = set; then
15214   echo $ECHO_N "(cached) $ECHO_C" >&6
15215 else
15216
15217         cat >conftest.$ac_ext <<_ACEOF
15218 #line 15218 "configure"
15219 #include "confdefs.h"
15220
15221 #include <signal.h>
15222 int
15223 main ()
15224 {
15225 sigaction_t x
15226   ;
15227   return 0;
15228 }
15229 _ACEOF
15230 rm -f conftest.$ac_objext
15231 if { (eval echo "$as_me:15231: \"$ac_compile\"") >&5
15232   (eval $ac_compile) 2>&5
15233   ac_status=$?
15234   echo "$as_me:15234: \$? = $ac_status" >&5
15235   (exit $ac_status); } &&
15236          { ac_try='test -s conftest.$ac_objext'
15237   { (eval echo "$as_me:15237: \"$ac_try\"") >&5
15238   (eval $ac_try) 2>&5
15239   ac_status=$?
15240   echo "$as_me:15240: \$? = $ac_status" >&5
15241   (exit $ac_status); }; }; then
15242   cf_cv_type_sigaction=yes
15243 else
15244   echo "$as_me: failed program was:" >&5
15245 cat conftest.$ac_ext >&5
15246 cf_cv_type_sigaction=no
15247 fi
15248 rm -f conftest.$ac_objext conftest.$ac_ext
15249 fi
15250
15251 echo "$as_me:15251: result: $cf_cv_type_sigaction" >&5
15252 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15253 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15254 #define HAVE_TYPE_SIGACTION 1
15255 EOF
15256
15257 echo "$as_me:15257: checking declaration of size-change" >&5
15258 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15259 if test "${cf_cv_sizechange+set}" = set; then
15260   echo $ECHO_N "(cached) $ECHO_C" >&6
15261 else
15262
15263     cf_cv_sizechange=unknown
15264     cf_save_CPPFLAGS="$CPPFLAGS"
15265
15266 for cf_opts in "" "NEED_PTEM_H"
15267 do
15268
15269     CPPFLAGS="$cf_save_CPPFLAGS"
15270     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15271     cat >conftest.$ac_ext <<_ACEOF
15272 #line 15272 "configure"
15273 #include "confdefs.h"
15274 #include <sys/types.h>
15275 #ifdef HAVE_TERMIOS_H
15276 #include <termios.h>
15277 #else
15278 #ifdef HAVE_TERMIO_H
15279 #include <termio.h>
15280 #endif
15281 #endif
15282 #ifdef NEED_PTEM_H
15283 /* This is a workaround for SCO:  they neglected to define struct winsize in
15284  * termios.h -- it's only in termio.h and ptem.h
15285  */
15286 #include        <sys/stream.h>
15287 #include        <sys/ptem.h>
15288 #endif
15289 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15290 #include <sys/ioctl.h>
15291 #endif
15292
15293 int
15294 main ()
15295 {
15296
15297 #ifdef TIOCGSIZE
15298         struct ttysize win;     /* FIXME: what system is this? */
15299         int y = win.ts_lines;
15300         int x = win.ts_cols;
15301 #else
15302 #ifdef TIOCGWINSZ
15303         struct winsize win;
15304         int y = win.ws_row;
15305         int x = win.ws_col;
15306 #else
15307         no TIOCGSIZE or TIOCGWINSZ
15308 #endif /* TIOCGWINSZ */
15309 #endif /* TIOCGSIZE */
15310
15311   ;
15312   return 0;
15313 }
15314 _ACEOF
15315 rm -f conftest.$ac_objext
15316 if { (eval echo "$as_me:15316: \"$ac_compile\"") >&5
15317   (eval $ac_compile) 2>&5
15318   ac_status=$?
15319   echo "$as_me:15319: \$? = $ac_status" >&5
15320   (exit $ac_status); } &&
15321          { ac_try='test -s conftest.$ac_objext'
15322   { (eval echo "$as_me:15322: \"$ac_try\"") >&5
15323   (eval $ac_try) 2>&5
15324   ac_status=$?
15325   echo "$as_me:15325: \$? = $ac_status" >&5
15326   (exit $ac_status); }; }; then
15327   cf_cv_sizechange=yes
15328 else
15329   echo "$as_me: failed program was:" >&5
15330 cat conftest.$ac_ext >&5
15331 cf_cv_sizechange=no
15332 fi
15333 rm -f conftest.$ac_objext conftest.$ac_ext
15334
15335         CPPFLAGS="$cf_save_CPPFLAGS"
15336         if test "$cf_cv_sizechange" = yes ; then
15337                 echo "size-change succeeded ($cf_opts)" >&5
15338                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15339                 break
15340         fi
15341 done
15342
15343 fi
15344 echo "$as_me:15344: result: $cf_cv_sizechange" >&5
15345 echo "${ECHO_T}$cf_cv_sizechange" >&6
15346 if test "$cf_cv_sizechange" != no ; then
15347         cat >>confdefs.h <<\EOF
15348 #define HAVE_SIZECHANGE 1
15349 EOF
15350
15351         case $cf_cv_sizechange in #(vi
15352         NEED*)
15353                 cat >>confdefs.h <<EOF
15354 #define $cf_cv_sizechange  1
15355 EOF
15356
15357                 ;;
15358         esac
15359 fi
15360
15361 echo "$as_me:15361: checking for memmove" >&5
15362 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15363 if test "${ac_cv_func_memmove+set}" = set; then
15364   echo $ECHO_N "(cached) $ECHO_C" >&6
15365 else
15366   cat >conftest.$ac_ext <<_ACEOF
15367 #line 15367 "configure"
15368 #include "confdefs.h"
15369 /* System header to define __stub macros and hopefully few prototypes,
15370     which can conflict with char memmove (); below.  */
15371 #include <assert.h>
15372 /* Override any gcc2 internal prototype to avoid an error.  */
15373 #ifdef __cplusplus
15374 extern "C"
15375 #endif
15376 /* We use char because int might match the return type of a gcc2
15377    builtin and then its argument prototype would still apply.  */
15378 char memmove ();
15379 char (*f) ();
15380
15381 int
15382 main ()
15383 {
15384 /* The GNU C library defines this for functions which it implements
15385     to always fail with ENOSYS.  Some functions are actually named
15386     something starting with __ and the normal name is an alias.  */
15387 #if defined (__stub_memmove) || defined (__stub___memmove)
15388 choke me
15389 #else
15390 f = memmove;
15391 #endif
15392
15393   ;
15394   return 0;
15395 }
15396 _ACEOF
15397 rm -f conftest.$ac_objext conftest$ac_exeext
15398 if { (eval echo "$as_me:15398: \"$ac_link\"") >&5
15399   (eval $ac_link) 2>&5
15400   ac_status=$?
15401   echo "$as_me:15401: \$? = $ac_status" >&5
15402   (exit $ac_status); } &&
15403          { ac_try='test -s conftest$ac_exeext'
15404   { (eval echo "$as_me:15404: \"$ac_try\"") >&5
15405   (eval $ac_try) 2>&5
15406   ac_status=$?
15407   echo "$as_me:15407: \$? = $ac_status" >&5
15408   (exit $ac_status); }; }; then
15409   ac_cv_func_memmove=yes
15410 else
15411   echo "$as_me: failed program was:" >&5
15412 cat conftest.$ac_ext >&5
15413 ac_cv_func_memmove=no
15414 fi
15415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15416 fi
15417 echo "$as_me:15417: result: $ac_cv_func_memmove" >&5
15418 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15419 if test $ac_cv_func_memmove = yes; then
15420   :
15421 else
15422
15423 echo "$as_me:15423: checking for bcopy" >&5
15424 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15425 if test "${ac_cv_func_bcopy+set}" = set; then
15426   echo $ECHO_N "(cached) $ECHO_C" >&6
15427 else
15428   cat >conftest.$ac_ext <<_ACEOF
15429 #line 15429 "configure"
15430 #include "confdefs.h"
15431 /* System header to define __stub macros and hopefully few prototypes,
15432     which can conflict with char bcopy (); below.  */
15433 #include <assert.h>
15434 /* Override any gcc2 internal prototype to avoid an error.  */
15435 #ifdef __cplusplus
15436 extern "C"
15437 #endif
15438 /* We use char because int might match the return type of a gcc2
15439    builtin and then its argument prototype would still apply.  */
15440 char bcopy ();
15441 char (*f) ();
15442
15443 int
15444 main ()
15445 {
15446 /* The GNU C library defines this for functions which it implements
15447     to always fail with ENOSYS.  Some functions are actually named
15448     something starting with __ and the normal name is an alias.  */
15449 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15450 choke me
15451 #else
15452 f = bcopy;
15453 #endif
15454
15455   ;
15456   return 0;
15457 }
15458 _ACEOF
15459 rm -f conftest.$ac_objext conftest$ac_exeext
15460 if { (eval echo "$as_me:15460: \"$ac_link\"") >&5
15461   (eval $ac_link) 2>&5
15462   ac_status=$?
15463   echo "$as_me:15463: \$? = $ac_status" >&5
15464   (exit $ac_status); } &&
15465          { ac_try='test -s conftest$ac_exeext'
15466   { (eval echo "$as_me:15466: \"$ac_try\"") >&5
15467   (eval $ac_try) 2>&5
15468   ac_status=$?
15469   echo "$as_me:15469: \$? = $ac_status" >&5
15470   (exit $ac_status); }; }; then
15471   ac_cv_func_bcopy=yes
15472 else
15473   echo "$as_me: failed program was:" >&5
15474 cat conftest.$ac_ext >&5
15475 ac_cv_func_bcopy=no
15476 fi
15477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15478 fi
15479 echo "$as_me:15479: result: $ac_cv_func_bcopy" >&5
15480 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15481 if test $ac_cv_func_bcopy = yes; then
15482
15483         echo "$as_me:15483: checking if bcopy does overlapping moves" >&5
15484 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15485 if test "${cf_cv_good_bcopy+set}" = set; then
15486   echo $ECHO_N "(cached) $ECHO_C" >&6
15487 else
15488
15489                 if test "$cross_compiling" = yes; then
15490   cf_cv_good_bcopy=unknown
15491 else
15492   cat >conftest.$ac_ext <<_ACEOF
15493 #line 15493 "configure"
15494 #include "confdefs.h"
15495
15496 int main() {
15497         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15498         char temp[40];
15499         bcopy(data, temp, sizeof(data));
15500         bcopy(temp+10, temp, 15);
15501         bcopy(temp+5, temp+15, 10);
15502         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15503 }
15504
15505 _ACEOF
15506 rm -f conftest$ac_exeext
15507 if { (eval echo "$as_me:15507: \"$ac_link\"") >&5
15508   (eval $ac_link) 2>&5
15509   ac_status=$?
15510   echo "$as_me:15510: \$? = $ac_status" >&5
15511   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15512   { (eval echo "$as_me:15512: \"$ac_try\"") >&5
15513   (eval $ac_try) 2>&5
15514   ac_status=$?
15515   echo "$as_me:15515: \$? = $ac_status" >&5
15516   (exit $ac_status); }; }; then
15517   cf_cv_good_bcopy=yes
15518 else
15519   echo "$as_me: program exited with status $ac_status" >&5
15520 echo "$as_me: failed program was:" >&5
15521 cat conftest.$ac_ext >&5
15522 cf_cv_good_bcopy=no
15523 fi
15524 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15525 fi
15526
15527 fi
15528 echo "$as_me:15528: result: $cf_cv_good_bcopy" >&5
15529 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15530
15531 else
15532   cf_cv_good_bcopy=no
15533 fi
15534
15535         if test "$cf_cv_good_bcopy" = yes ; then
15536                 cat >>confdefs.h <<\EOF
15537 #define USE_OK_BCOPY 1
15538 EOF
15539
15540         else
15541                 cat >>confdefs.h <<\EOF
15542 #define USE_MY_MEMMOVE 1
15543 EOF
15544
15545         fi
15546
15547 fi
15548
15549 echo "$as_me:15549: checking if poll really works" >&5
15550 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15551 if test "${cf_cv_working_poll+set}" = set; then
15552   echo $ECHO_N "(cached) $ECHO_C" >&6
15553 else
15554
15555 if test "$cross_compiling" = yes; then
15556   cf_cv_working_poll=unknown
15557 else
15558   cat >conftest.$ac_ext <<_ACEOF
15559 #line 15559 "configure"
15560 #include "confdefs.h"
15561
15562 #include <stdio.h>
15563 #ifdef HAVE_POLL_H
15564 #include <poll.h>
15565 #else
15566 #include <sys/poll.h>
15567 #endif
15568 int main() {
15569         struct pollfd myfds;
15570         int ret;
15571
15572         myfds.fd = 0;
15573         myfds.events = POLLIN;
15574
15575         ret = poll(&myfds, 1, 100);
15576         ${cf_cv_main_return:-return}(ret != 0);
15577 }
15578 _ACEOF
15579 rm -f conftest$ac_exeext
15580 if { (eval echo "$as_me:15580: \"$ac_link\"") >&5
15581   (eval $ac_link) 2>&5
15582   ac_status=$?
15583   echo "$as_me:15583: \$? = $ac_status" >&5
15584   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15585   { (eval echo "$as_me:15585: \"$ac_try\"") >&5
15586   (eval $ac_try) 2>&5
15587   ac_status=$?
15588   echo "$as_me:15588: \$? = $ac_status" >&5
15589   (exit $ac_status); }; }; then
15590   cf_cv_working_poll=yes
15591 else
15592   echo "$as_me: program exited with status $ac_status" >&5
15593 echo "$as_me: failed program was:" >&5
15594 cat conftest.$ac_ext >&5
15595 cf_cv_working_poll=no
15596 fi
15597 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15598 fi
15599 fi
15600 echo "$as_me:15600: result: $cf_cv_working_poll" >&5
15601 echo "${ECHO_T}$cf_cv_working_poll" >&6
15602 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15603 #define HAVE_WORKING_POLL 1
15604 EOF
15605
15606 echo "$as_me:15606: checking for va_copy" >&5
15607 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15608 if test "${cf_cv_have_va_copy+set}" = set; then
15609   echo $ECHO_N "(cached) $ECHO_C" >&6
15610 else
15611
15612 cat >conftest.$ac_ext <<_ACEOF
15613 #line 15613 "configure"
15614 #include "confdefs.h"
15615
15616 #include <stdarg.h>
15617
15618 int
15619 main ()
15620 {
15621
15622         static va_list dst;
15623         static va_list src;
15624         va_copy(dst, src)
15625   ;
15626   return 0;
15627 }
15628 _ACEOF
15629 rm -f conftest.$ac_objext conftest$ac_exeext
15630 if { (eval echo "$as_me:15630: \"$ac_link\"") >&5
15631   (eval $ac_link) 2>&5
15632   ac_status=$?
15633   echo "$as_me:15633: \$? = $ac_status" >&5
15634   (exit $ac_status); } &&
15635          { ac_try='test -s conftest$ac_exeext'
15636   { (eval echo "$as_me:15636: \"$ac_try\"") >&5
15637   (eval $ac_try) 2>&5
15638   ac_status=$?
15639   echo "$as_me:15639: \$? = $ac_status" >&5
15640   (exit $ac_status); }; }; then
15641   cf_cv_have_va_copy=yes
15642 else
15643   echo "$as_me: failed program was:" >&5
15644 cat conftest.$ac_ext >&5
15645 cf_cv_have_va_copy=no
15646 fi
15647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15648 fi
15649 echo "$as_me:15649: result: $cf_cv_have_va_copy" >&5
15650 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15651
15652 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15653 #define HAVE_VA_COPY 1
15654 EOF
15655
15656 echo "$as_me:15656: checking for __va_copy" >&5
15657 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15658 if test "${cf_cv_have___va_copy+set}" = set; then
15659   echo $ECHO_N "(cached) $ECHO_C" >&6
15660 else
15661
15662 cat >conftest.$ac_ext <<_ACEOF
15663 #line 15663 "configure"
15664 #include "confdefs.h"
15665
15666 #include <stdarg.h>
15667
15668 int
15669 main ()
15670 {
15671
15672         static va_list dst;
15673         static va_list src;
15674         __va_copy(dst, src)
15675   ;
15676   return 0;
15677 }
15678 _ACEOF
15679 rm -f conftest.$ac_objext conftest$ac_exeext
15680 if { (eval echo "$as_me:15680: \"$ac_link\"") >&5
15681   (eval $ac_link) 2>&5
15682   ac_status=$?
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit $ac_status); } &&
15685          { ac_try='test -s conftest$ac_exeext'
15686   { (eval echo "$as_me:15686: \"$ac_try\"") >&5
15687   (eval $ac_try) 2>&5
15688   ac_status=$?
15689   echo "$as_me:15689: \$? = $ac_status" >&5
15690   (exit $ac_status); }; }; then
15691   cf_cv_have___va_copy=yes
15692 else
15693   echo "$as_me: failed program was:" >&5
15694 cat conftest.$ac_ext >&5
15695 cf_cv_have___va_copy=no
15696 fi
15697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15698 fi
15699 echo "$as_me:15699: result: $cf_cv_have___va_copy" >&5
15700 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15701
15702 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15703 #define HAVE___VA_COPY 1
15704 EOF
15705
15706 echo "$as_me:15706: checking for pid_t" >&5
15707 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15708 if test "${ac_cv_type_pid_t+set}" = set; then
15709   echo $ECHO_N "(cached) $ECHO_C" >&6
15710 else
15711   cat >conftest.$ac_ext <<_ACEOF
15712 #line 15712 "configure"
15713 #include "confdefs.h"
15714 $ac_includes_default
15715 int
15716 main ()
15717 {
15718 if ((pid_t *) 0)
15719   return 0;
15720 if (sizeof (pid_t))
15721   return 0;
15722   ;
15723   return 0;
15724 }
15725 _ACEOF
15726 rm -f conftest.$ac_objext
15727 if { (eval echo "$as_me:15727: \"$ac_compile\"") >&5
15728   (eval $ac_compile) 2>&5
15729   ac_status=$?
15730   echo "$as_me:15730: \$? = $ac_status" >&5
15731   (exit $ac_status); } &&
15732          { ac_try='test -s conftest.$ac_objext'
15733   { (eval echo "$as_me:15733: \"$ac_try\"") >&5
15734   (eval $ac_try) 2>&5
15735   ac_status=$?
15736   echo "$as_me:15736: \$? = $ac_status" >&5
15737   (exit $ac_status); }; }; then
15738   ac_cv_type_pid_t=yes
15739 else
15740   echo "$as_me: failed program was:" >&5
15741 cat conftest.$ac_ext >&5
15742 ac_cv_type_pid_t=no
15743 fi
15744 rm -f conftest.$ac_objext conftest.$ac_ext
15745 fi
15746 echo "$as_me:15746: result: $ac_cv_type_pid_t" >&5
15747 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15748 if test $ac_cv_type_pid_t = yes; then
15749   :
15750 else
15751
15752 cat >>confdefs.h <<EOF
15753 #define pid_t int
15754 EOF
15755
15756 fi
15757
15758 for ac_header in unistd.h vfork.h
15759 do
15760 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15761 echo "$as_me:15761: checking for $ac_header" >&5
15762 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15763 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15764   echo $ECHO_N "(cached) $ECHO_C" >&6
15765 else
15766   cat >conftest.$ac_ext <<_ACEOF
15767 #line 15767 "configure"
15768 #include "confdefs.h"
15769 #include <$ac_header>
15770 _ACEOF
15771 if { (eval echo "$as_me:15771: \"$ac_cpp conftest.$ac_ext\"") >&5
15772   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15773   ac_status=$?
15774   egrep -v '^ *\+' conftest.er1 >conftest.err
15775   rm -f conftest.er1
15776   cat conftest.err >&5
15777   echo "$as_me:15777: \$? = $ac_status" >&5
15778   (exit $ac_status); } >/dev/null; then
15779   if test -s conftest.err; then
15780     ac_cpp_err=$ac_c_preproc_warn_flag
15781   else
15782     ac_cpp_err=
15783   fi
15784 else
15785   ac_cpp_err=yes
15786 fi
15787 if test -z "$ac_cpp_err"; then
15788   eval "$as_ac_Header=yes"
15789 else
15790   echo "$as_me: failed program was:" >&5
15791   cat conftest.$ac_ext >&5
15792   eval "$as_ac_Header=no"
15793 fi
15794 rm -f conftest.err conftest.$ac_ext
15795 fi
15796 echo "$as_me:15796: result: `eval echo '${'$as_ac_Header'}'`" >&5
15797 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15798 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15799   cat >>confdefs.h <<EOF
15800 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15801 EOF
15802
15803 fi
15804 done
15805
15806 for ac_func in fork vfork
15807 do
15808 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15809 echo "$as_me:15809: checking for $ac_func" >&5
15810 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15811 if eval "test \"\${$as_ac_var+set}\" = set"; then
15812   echo $ECHO_N "(cached) $ECHO_C" >&6
15813 else
15814   cat >conftest.$ac_ext <<_ACEOF
15815 #line 15815 "configure"
15816 #include "confdefs.h"
15817 /* System header to define __stub macros and hopefully few prototypes,
15818     which can conflict with char $ac_func (); below.  */
15819 #include <assert.h>
15820 /* Override any gcc2 internal prototype to avoid an error.  */
15821 #ifdef __cplusplus
15822 extern "C"
15823 #endif
15824 /* We use char because int might match the return type of a gcc2
15825    builtin and then its argument prototype would still apply.  */
15826 char $ac_func ();
15827 char (*f) ();
15828
15829 int
15830 main ()
15831 {
15832 /* The GNU C library defines this for functions which it implements
15833     to always fail with ENOSYS.  Some functions are actually named
15834     something starting with __ and the normal name is an alias.  */
15835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15836 choke me
15837 #else
15838 f = $ac_func;
15839 #endif
15840
15841   ;
15842   return 0;
15843 }
15844 _ACEOF
15845 rm -f conftest.$ac_objext conftest$ac_exeext
15846 if { (eval echo "$as_me:15846: \"$ac_link\"") >&5
15847   (eval $ac_link) 2>&5
15848   ac_status=$?
15849   echo "$as_me:15849: \$? = $ac_status" >&5
15850   (exit $ac_status); } &&
15851          { ac_try='test -s conftest$ac_exeext'
15852   { (eval echo "$as_me:15852: \"$ac_try\"") >&5
15853   (eval $ac_try) 2>&5
15854   ac_status=$?
15855   echo "$as_me:15855: \$? = $ac_status" >&5
15856   (exit $ac_status); }; }; then
15857   eval "$as_ac_var=yes"
15858 else
15859   echo "$as_me: failed program was:" >&5
15860 cat conftest.$ac_ext >&5
15861 eval "$as_ac_var=no"
15862 fi
15863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15864 fi
15865 echo "$as_me:15865: result: `eval echo '${'$as_ac_var'}'`" >&5
15866 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15867 if test `eval echo '${'$as_ac_var'}'` = yes; then
15868   cat >>confdefs.h <<EOF
15869 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15870 EOF
15871
15872 fi
15873 done
15874
15875 ac_cv_func_fork_works=$ac_cv_func_fork
15876 if test "x$ac_cv_func_fork" = xyes; then
15877   echo "$as_me:15877: checking for working fork" >&5
15878 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15879 if test "${ac_cv_func_fork_works+set}" = set; then
15880   echo $ECHO_N "(cached) $ECHO_C" >&6
15881 else
15882   if test "$cross_compiling" = yes; then
15883   ac_cv_func_fork_works=cross
15884 else
15885   cat >conftest.$ac_ext <<_ACEOF
15886 /* By Rüdiger Kuhlmann. */
15887       #include <sys/types.h>
15888       #if HAVE_UNISTD_H
15889       # include <unistd.h>
15890       #endif
15891       /* Some systems only have a dummy stub for fork() */
15892       int main ()
15893       {
15894         if (fork() < 0)
15895           $ac_main_return (1);
15896         $ac_main_return (0);
15897       }
15898 _ACEOF
15899 rm -f conftest$ac_exeext
15900 if { (eval echo "$as_me:15900: \"$ac_link\"") >&5
15901   (eval $ac_link) 2>&5
15902   ac_status=$?
15903   echo "$as_me:15903: \$? = $ac_status" >&5
15904   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15905   { (eval echo "$as_me:15905: \"$ac_try\"") >&5
15906   (eval $ac_try) 2>&5
15907   ac_status=$?
15908   echo "$as_me:15908: \$? = $ac_status" >&5
15909   (exit $ac_status); }; }; then
15910   ac_cv_func_fork_works=yes
15911 else
15912   echo "$as_me: program exited with status $ac_status" >&5
15913 echo "$as_me: failed program was:" >&5
15914 cat conftest.$ac_ext >&5
15915 ac_cv_func_fork_works=no
15916 fi
15917 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15918 fi
15919 fi
15920 echo "$as_me:15920: result: $ac_cv_func_fork_works" >&5
15921 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15922
15923 fi
15924 if test "x$ac_cv_func_fork_works" = xcross; then
15925   case $host in
15926     *-*-amigaos* | *-*-msdosdjgpp*)
15927       # Override, as these systems have only a dummy fork() stub
15928       ac_cv_func_fork_works=no
15929       ;;
15930     *)
15931       ac_cv_func_fork_works=yes
15932       ;;
15933   esac
15934   { echo "$as_me:15934: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15935 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15936 fi
15937 ac_cv_func_vfork_works=$ac_cv_func_vfork
15938 if test "x$ac_cv_func_vfork" = xyes; then
15939   echo "$as_me:15939: checking for working vfork" >&5
15940 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15941 if test "${ac_cv_func_vfork_works+set}" = set; then
15942   echo $ECHO_N "(cached) $ECHO_C" >&6
15943 else
15944   if test "$cross_compiling" = yes; then
15945   ac_cv_func_vfork_works=cross
15946 else
15947   cat >conftest.$ac_ext <<_ACEOF
15948 #line 15948 "configure"
15949 #include "confdefs.h"
15950 /* Thanks to Paul Eggert for this test.  */
15951 #include <stdio.h>
15952 #include <sys/types.h>
15953 #include <sys/stat.h>
15954 #if HAVE_UNISTD_H
15955 # include <unistd.h>
15956 #endif
15957 #if HAVE_VFORK_H
15958 # include <vfork.h>
15959 #endif
15960 /* On some sparc systems, changes by the child to local and incoming
15961    argument registers are propagated back to the parent.  The compiler
15962    is told about this with #include <vfork.h>, but some compilers
15963    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15964    static variable whose address is put into a register that is
15965    clobbered by the vfork.  */
15966 static
15967 #ifdef __cplusplus
15968 sparc_address_test (int arg)
15969 # else
15970 sparc_address_test (arg) int arg;
15971 #endif
15972 {
15973   static pid_t child;
15974   if (!child) {
15975     child = vfork ();
15976     if (child < 0) {
15977       perror ("vfork");
15978       _exit(2);
15979     }
15980     if (!child) {
15981       arg = getpid();
15982       write(-1, "", 0);
15983       _exit (arg);
15984     }
15985   }
15986 }
15987
15988 int
15989 main ()
15990 {
15991   pid_t parent = getpid ();
15992   pid_t child;
15993
15994   sparc_address_test ();
15995
15996   child = vfork ();
15997
15998   if (child == 0) {
15999     /* Here is another test for sparc vfork register problems.  This
16000        test uses lots of local variables, at least as many local
16001        variables as main has allocated so far including compiler
16002        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16003        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16004        reuse the register of parent for one of the local variables,
16005        since it will think that parent can't possibly be used any more
16006        in this routine.  Assigning to the local variable will thus
16007        munge parent in the parent process.  */
16008     pid_t
16009       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16010       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16011     /* Convince the compiler that p..p7 are live; otherwise, it might
16012        use the same hardware register for all 8 local variables.  */
16013     if (p != p1 || p != p2 || p != p3 || p != p4
16014         || p != p5 || p != p6 || p != p7)
16015       _exit(1);
16016
16017     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16018        from child file descriptors.  If the child closes a descriptor
16019        before it execs or exits, this munges the parent's descriptor
16020        as well.  Test for this by closing stdout in the child.  */
16021     _exit(close(fileno(stdout)) != 0);
16022   } else {
16023     int status;
16024     struct stat st;
16025
16026     while (wait(&status) != child)
16027       ;
16028     $ac_main_return(
16029          /* Was there some problem with vforking?  */
16030          child < 0
16031
16032          /* Did the child fail?  (This shouldn't happen.)  */
16033          || status
16034
16035          /* Did the vfork/compiler bug occur?  */
16036          || parent != getpid()
16037
16038          /* Did the file descriptor bug occur?  */
16039          || fstat(fileno(stdout), &st) != 0
16040          );
16041   }
16042 }
16043 _ACEOF
16044 rm -f conftest$ac_exeext
16045 if { (eval echo "$as_me:16045: \"$ac_link\"") >&5
16046   (eval $ac_link) 2>&5
16047   ac_status=$?
16048   echo "$as_me:16048: \$? = $ac_status" >&5
16049   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16050   { (eval echo "$as_me:16050: \"$ac_try\"") >&5
16051   (eval $ac_try) 2>&5
16052   ac_status=$?
16053   echo "$as_me:16053: \$? = $ac_status" >&5
16054   (exit $ac_status); }; }; then
16055   ac_cv_func_vfork_works=yes
16056 else
16057   echo "$as_me: program exited with status $ac_status" >&5
16058 echo "$as_me: failed program was:" >&5
16059 cat conftest.$ac_ext >&5
16060 ac_cv_func_vfork_works=no
16061 fi
16062 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16063 fi
16064 fi
16065 echo "$as_me:16065: result: $ac_cv_func_vfork_works" >&5
16066 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16067
16068 fi;
16069 if test "x$ac_cv_func_fork_works" = xcross; then
16070   ac_cv_func_vfork_works=ac_cv_func_vfork
16071   { echo "$as_me:16071: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16072 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16073 fi
16074
16075 if test "x$ac_cv_func_vfork_works" = xyes; then
16076
16077 cat >>confdefs.h <<\EOF
16078 #define HAVE_WORKING_VFORK 1
16079 EOF
16080
16081 else
16082
16083 cat >>confdefs.h <<\EOF
16084 #define vfork fork
16085 EOF
16086
16087 fi
16088 if test "x$ac_cv_func_fork_works" = xyes; then
16089
16090 cat >>confdefs.h <<\EOF
16091 #define HAVE_WORKING_FORK 1
16092 EOF
16093
16094 fi
16095
16096 # special check for test/ditto.c
16097
16098 echo "$as_me:16098: checking for openpty in -lutil" >&5
16099 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16100 if test "${ac_cv_lib_util_openpty+set}" = set; then
16101   echo $ECHO_N "(cached) $ECHO_C" >&6
16102 else
16103   ac_check_lib_save_LIBS=$LIBS
16104 LIBS="-lutil  $LIBS"
16105 cat >conftest.$ac_ext <<_ACEOF
16106 #line 16106 "configure"
16107 #include "confdefs.h"
16108
16109 /* Override any gcc2 internal prototype to avoid an error.  */
16110 #ifdef __cplusplus
16111 extern "C"
16112 #endif
16113 /* We use char because int might match the return type of a gcc2
16114    builtin and then its argument prototype would still apply.  */
16115 char openpty ();
16116 int
16117 main ()
16118 {
16119 openpty ();
16120   ;
16121   return 0;
16122 }
16123 _ACEOF
16124 rm -f conftest.$ac_objext conftest$ac_exeext
16125 if { (eval echo "$as_me:16125: \"$ac_link\"") >&5
16126   (eval $ac_link) 2>&5
16127   ac_status=$?
16128   echo "$as_me:16128: \$? = $ac_status" >&5
16129   (exit $ac_status); } &&
16130          { ac_try='test -s conftest$ac_exeext'
16131   { (eval echo "$as_me:16131: \"$ac_try\"") >&5
16132   (eval $ac_try) 2>&5
16133   ac_status=$?
16134   echo "$as_me:16134: \$? = $ac_status" >&5
16135   (exit $ac_status); }; }; then
16136   ac_cv_lib_util_openpty=yes
16137 else
16138   echo "$as_me: failed program was:" >&5
16139 cat conftest.$ac_ext >&5
16140 ac_cv_lib_util_openpty=no
16141 fi
16142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16143 LIBS=$ac_check_lib_save_LIBS
16144 fi
16145 echo "$as_me:16145: result: $ac_cv_lib_util_openpty" >&5
16146 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16147 if test $ac_cv_lib_util_openpty = yes; then
16148   cf_cv_lib_util=yes
16149 else
16150   cf_cv_lib_util=no
16151 fi
16152
16153 echo "$as_me:16153: checking for openpty header" >&5
16154 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16155 if test "${cf_cv_func_openpty+set}" = set; then
16156   echo $ECHO_N "(cached) $ECHO_C" >&6
16157 else
16158
16159     cf_save_LIBS="$LIBS"
16160     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16161     for cf_header in pty.h libutil.h util.h
16162     do
16163     cat >conftest.$ac_ext <<_ACEOF
16164 #line 16164 "configure"
16165 #include "confdefs.h"
16166
16167 #include <$cf_header>
16168
16169 int
16170 main ()
16171 {
16172
16173     int x = openpty((int *)0, (int *)0, (char *)0,
16174                    (struct termios *)0, (struct winsize *)0);
16175
16176   ;
16177   return 0;
16178 }
16179 _ACEOF
16180 rm -f conftest.$ac_objext conftest$ac_exeext
16181 if { (eval echo "$as_me:16181: \"$ac_link\"") >&5
16182   (eval $ac_link) 2>&5
16183   ac_status=$?
16184   echo "$as_me:16184: \$? = $ac_status" >&5
16185   (exit $ac_status); } &&
16186          { ac_try='test -s conftest$ac_exeext'
16187   { (eval echo "$as_me:16187: \"$ac_try\"") >&5
16188   (eval $ac_try) 2>&5
16189   ac_status=$?
16190   echo "$as_me:16190: \$? = $ac_status" >&5
16191   (exit $ac_status); }; }; then
16192
16193         cf_cv_func_openpty=$cf_header
16194         break
16195
16196 else
16197   echo "$as_me: failed program was:" >&5
16198 cat conftest.$ac_ext >&5
16199
16200         cf_cv_func_openpty=no
16201
16202 fi
16203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16204     done
16205     LIBS="$cf_save_LIBS"
16206
16207 fi
16208 echo "$as_me:16208: result: $cf_cv_func_openpty" >&5
16209 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16210
16211 if test "$cf_cv_func_openpty" != no ; then
16212     cat >>confdefs.h <<EOF
16213 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16214 EOF
16215
16216     cat >>confdefs.h <<\EOF
16217 #define USE_XTERM_PTY 1
16218 EOF
16219
16220     if test "$cf_cv_lib_util" = yes ; then
16221         TEST_LIBS="-lutil $TEST_LIBS"
16222     fi
16223 fi
16224
16225 if test "$with_hashed_db" != no ; then
16226         cat >>confdefs.h <<\EOF
16227 #define USE_HASHED_DB 1
16228 EOF
16229
16230 case $with_hashed_db in #(vi
16231 yes|*able*) #(vi
16232     ;;
16233 *)
16234     if test -d "$with_hashed_db" ; then
16235
16236 if test -n "$with_hashed_db/include" ; then
16237   for cf_add_incdir in $with_hashed_db/include
16238   do
16239         while test $cf_add_incdir != /usr/include
16240         do
16241           if test -d $cf_add_incdir
16242           then
16243                 cf_have_incdir=no
16244                 if test -n "$CFLAGS$CPPFLAGS" ; then
16245                   # a loop is needed to ensure we can add subdirs of existing dirs
16246                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16247                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16248                           cf_have_incdir=yes; break
16249                         fi
16250                   done
16251                 fi
16252
16253                 if test "$cf_have_incdir" = no ; then
16254                   if test "$cf_add_incdir" = /usr/local/include ; then
16255                         if test "$GCC" = yes
16256                         then
16257                           cf_save_CPPFLAGS=$CPPFLAGS
16258                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16259                           cat >conftest.$ac_ext <<_ACEOF
16260 #line 16260 "configure"
16261 #include "confdefs.h"
16262 #include <stdio.h>
16263 int
16264 main ()
16265 {
16266 printf("Hello")
16267   ;
16268   return 0;
16269 }
16270 _ACEOF
16271 rm -f conftest.$ac_objext
16272 if { (eval echo "$as_me:16272: \"$ac_compile\"") >&5
16273   (eval $ac_compile) 2>&5
16274   ac_status=$?
16275   echo "$as_me:16275: \$? = $ac_status" >&5
16276   (exit $ac_status); } &&
16277          { ac_try='test -s conftest.$ac_objext'
16278   { (eval echo "$as_me:16278: \"$ac_try\"") >&5
16279   (eval $ac_try) 2>&5
16280   ac_status=$?
16281   echo "$as_me:16281: \$? = $ac_status" >&5
16282   (exit $ac_status); }; }; then
16283   :
16284 else
16285   echo "$as_me: failed program was:" >&5
16286 cat conftest.$ac_ext >&5
16287 cf_have_incdir=yes
16288 fi
16289 rm -f conftest.$ac_objext conftest.$ac_ext
16290                           CPPFLAGS=$cf_save_CPPFLAGS
16291                         fi
16292                   fi
16293                 fi
16294
16295                 if test "$cf_have_incdir" = no ; then
16296                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16297
16298 echo "${as_me-configure}:16298: testing adding $cf_add_incdir to include-path ..." 1>&5
16299
16300                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16301
16302                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16303                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16304                   cf_add_incdir="$cf_top_incdir"
16305                 else
16306                   break
16307                 fi
16308           fi
16309         done
16310   done
16311 fi
16312
16313 if test -n "$with_hashed_db/lib" ; then
16314   for cf_add_libdir in $with_hashed_db/lib
16315   do
16316     if test $cf_add_libdir = /usr/lib ; then
16317       :
16318     elif test -d $cf_add_libdir
16319     then
16320       cf_have_libdir=no
16321       if test -n "$LDFLAGS$LIBS" ; then
16322         # a loop is needed to ensure we can add subdirs of existing dirs
16323         for cf_test_libdir in $LDFLAGS $LIBS ; do
16324           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16325             cf_have_libdir=yes; break
16326           fi
16327         done
16328       fi
16329       if test "$cf_have_libdir" = no ; then
16330         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16331
16332 echo "${as_me-configure}:16332: testing adding $cf_add_libdir to library-path ..." 1>&5
16333
16334         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16335       fi
16336     fi
16337   done
16338 fi
16339
16340     fi
16341 esac
16342
16343 echo "$as_me:16343: checking for db.h" >&5
16344 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16345 if test "${ac_cv_header_db_h+set}" = set; then
16346   echo $ECHO_N "(cached) $ECHO_C" >&6
16347 else
16348   cat >conftest.$ac_ext <<_ACEOF
16349 #line 16349 "configure"
16350 #include "confdefs.h"
16351 #include <db.h>
16352 _ACEOF
16353 if { (eval echo "$as_me:16353: \"$ac_cpp conftest.$ac_ext\"") >&5
16354   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16355   ac_status=$?
16356   egrep -v '^ *\+' conftest.er1 >conftest.err
16357   rm -f conftest.er1
16358   cat conftest.err >&5
16359   echo "$as_me:16359: \$? = $ac_status" >&5
16360   (exit $ac_status); } >/dev/null; then
16361   if test -s conftest.err; then
16362     ac_cpp_err=$ac_c_preproc_warn_flag
16363   else
16364     ac_cpp_err=
16365   fi
16366 else
16367   ac_cpp_err=yes
16368 fi
16369 if test -z "$ac_cpp_err"; then
16370   ac_cv_header_db_h=yes
16371 else
16372   echo "$as_me: failed program was:" >&5
16373   cat conftest.$ac_ext >&5
16374   ac_cv_header_db_h=no
16375 fi
16376 rm -f conftest.err conftest.$ac_ext
16377 fi
16378 echo "$as_me:16378: result: $ac_cv_header_db_h" >&5
16379 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16380 if test $ac_cv_header_db_h = yes; then
16381
16382 echo "$as_me:16382: checking for version of db" >&5
16383 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16384 if test "${cf_cv_hashed_db_version+set}" = set; then
16385   echo $ECHO_N "(cached) $ECHO_C" >&6
16386 else
16387
16388 cf_cv_hashed_db_version=unknown
16389
16390 for cf_db_version in 1 2 3 4 5
16391 do
16392
16393 echo "${as_me-configure}:16393: testing checking for db version $cf_db_version ..." 1>&5
16394
16395         cat >conftest.$ac_ext <<_ACEOF
16396 #line 16396 "configure"
16397 #include "confdefs.h"
16398
16399 $ac_includes_default
16400 #include <db.h>
16401
16402 #ifdef DB_VERSION_MAJOR
16403         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16404 #if $cf_db_version == DB_VERSION_MAJOR
16405         /* ok */
16406 #else
16407         make an error
16408 #endif
16409 #else
16410 #if $cf_db_version == 1
16411         /* ok: assuming this is DB 1.8.5 */
16412 #else
16413         make an error
16414 #endif
16415 #endif
16416
16417 int
16418 main ()
16419 {
16420 DBT *foo = 0
16421   ;
16422   return 0;
16423 }
16424 _ACEOF
16425 rm -f conftest.$ac_objext
16426 if { (eval echo "$as_me:16426: \"$ac_compile\"") >&5
16427   (eval $ac_compile) 2>&5
16428   ac_status=$?
16429   echo "$as_me:16429: \$? = $ac_status" >&5
16430   (exit $ac_status); } &&
16431          { ac_try='test -s conftest.$ac_objext'
16432   { (eval echo "$as_me:16432: \"$ac_try\"") >&5
16433   (eval $ac_try) 2>&5
16434   ac_status=$?
16435   echo "$as_me:16435: \$? = $ac_status" >&5
16436   (exit $ac_status); }; }; then
16437
16438         cf_cv_hashed_db_version=$cf_db_version
16439         break
16440
16441 else
16442   echo "$as_me: failed program was:" >&5
16443 cat conftest.$ac_ext >&5
16444 fi
16445 rm -f conftest.$ac_objext conftest.$ac_ext
16446 done
16447
16448 fi
16449 echo "$as_me:16449: result: $cf_cv_hashed_db_version" >&5
16450 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16451
16452 if test "$cf_cv_hashed_db_version" = unknown ; then
16453         { { echo "$as_me:16453: error: Cannot determine version of db" >&5
16454 echo "$as_me: error: Cannot determine version of db" >&2;}
16455    { (exit 1); exit 1; }; }
16456 else
16457
16458 echo "$as_me:16458: checking for db libraries" >&5
16459 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16460 if test "${cf_cv_hashed_db_libs+set}" = set; then
16461   echo $ECHO_N "(cached) $ECHO_C" >&6
16462 else
16463
16464 cf_cv_hashed_db_libs=unknown
16465 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16466 do
16467         cf_save_libs="$LIBS"
16468         if test -n "$cf_db_libs"; then
16469                 LIBS="-l$cf_db_libs $LIBS"
16470         fi
16471
16472 echo "${as_me-configure}:16472: testing checking for library "$cf_db_libs" ..." 1>&5
16473
16474         cat >conftest.$ac_ext <<_ACEOF
16475 #line 16475 "configure"
16476 #include "confdefs.h"
16477
16478 $ac_includes_default
16479 #include <db.h>
16480
16481 int
16482 main ()
16483 {
16484
16485         char *path = "/tmp/foo";
16486 #ifdef DB_VERSION_MAJOR
16487 #if DB_VERSION_MAJOR >= 4
16488         DB *result = 0;
16489         db_create(&result, NULL, 0);
16490         result->open(result,
16491                 NULL,
16492                 path,
16493                 path,
16494                 DB_HASH,
16495                 DB_CREATE,
16496                 0644);
16497 #elif DB_VERSION_MAJOR >= 3
16498         DB *result = 0;
16499         db_create(&result, NULL, 0);
16500         result->open(result,
16501                 path,
16502                 path,
16503                 DB_HASH,
16504                 DB_CREATE,
16505                 0644);
16506 #elif DB_VERSION_MAJOR >= 2
16507         DB *result = 0;
16508         db_open(path,
16509                 DB_HASH,
16510                 DB_CREATE,
16511                 0644,
16512                 (DB_ENV *) 0,
16513                 (DB_INFO *) 0,
16514                 &result);
16515 #endif /* DB_VERSION_MAJOR */
16516 #else
16517         DB *result = dbopen(path,
16518                      2,
16519                      0644,
16520                      DB_HASH,
16521                      0);
16522 #endif
16523         ${cf_cv_main_return:-return}(result != 0)
16524
16525   ;
16526   return 0;
16527 }
16528 _ACEOF
16529 rm -f conftest.$ac_objext conftest$ac_exeext
16530 if { (eval echo "$as_me:16530: \"$ac_link\"") >&5
16531   (eval $ac_link) 2>&5
16532   ac_status=$?
16533   echo "$as_me:16533: \$? = $ac_status" >&5
16534   (exit $ac_status); } &&
16535          { ac_try='test -s conftest$ac_exeext'
16536   { (eval echo "$as_me:16536: \"$ac_try\"") >&5
16537   (eval $ac_try) 2>&5
16538   ac_status=$?
16539   echo "$as_me:16539: \$? = $ac_status" >&5
16540   (exit $ac_status); }; }; then
16541
16542         if test -n "$cf_db_libs" ; then
16543                 cf_cv_hashed_db_libs=$cf_db_libs
16544         else
16545                 cf_cv_hashed_db_libs=default
16546         fi
16547         LIBS="$cf_save_libs"
16548         break
16549
16550 else
16551   echo "$as_me: failed program was:" >&5
16552 cat conftest.$ac_ext >&5
16553 fi
16554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16555         LIBS="$cf_save_libs"
16556 done
16557
16558 fi
16559 echo "$as_me:16559: result: $cf_cv_hashed_db_libs" >&5
16560 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16561
16562         if test "$cf_cv_hashed_db_libs" = unknown ; then
16563                 { { echo "$as_me:16563: error: Cannot determine library for db" >&5
16564 echo "$as_me: error: Cannot determine library for db" >&2;}
16565    { (exit 1); exit 1; }; }
16566         elif test "$cf_cv_hashed_db_libs" != default ; then
16567                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16568         fi
16569 fi
16570
16571 else
16572
16573         { { echo "$as_me:16573: error: Cannot find db.h" >&5
16574 echo "$as_me: error: Cannot find db.h" >&2;}
16575    { (exit 1); exit 1; }; }
16576
16577 fi
16578
16579 fi
16580
16581 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16582         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16583         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16584 fi
16585
16586 # Just in case, check if the C compiler has a bool type.
16587
16588 echo "$as_me:16588: checking if we should include stdbool.h" >&5
16589 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16590
16591 if test "${cf_cv_header_stdbool_h+set}" = set; then
16592   echo $ECHO_N "(cached) $ECHO_C" >&6
16593 else
16594
16595         cat >conftest.$ac_ext <<_ACEOF
16596 #line 16596 "configure"
16597 #include "confdefs.h"
16598
16599 int
16600 main ()
16601 {
16602 bool foo = false
16603   ;
16604   return 0;
16605 }
16606 _ACEOF
16607 rm -f conftest.$ac_objext
16608 if { (eval echo "$as_me:16608: \"$ac_compile\"") >&5
16609   (eval $ac_compile) 2>&5
16610   ac_status=$?
16611   echo "$as_me:16611: \$? = $ac_status" >&5
16612   (exit $ac_status); } &&
16613          { ac_try='test -s conftest.$ac_objext'
16614   { (eval echo "$as_me:16614: \"$ac_try\"") >&5
16615   (eval $ac_try) 2>&5
16616   ac_status=$?
16617   echo "$as_me:16617: \$? = $ac_status" >&5
16618   (exit $ac_status); }; }; then
16619   cf_cv_header_stdbool_h=0
16620 else
16621   echo "$as_me: failed program was:" >&5
16622 cat conftest.$ac_ext >&5
16623 cat >conftest.$ac_ext <<_ACEOF
16624 #line 16624 "configure"
16625 #include "confdefs.h"
16626
16627 #ifndef __BEOS__
16628 #include <stdbool.h>
16629 #endif
16630
16631 int
16632 main ()
16633 {
16634 bool foo = false
16635   ;
16636   return 0;
16637 }
16638 _ACEOF
16639 rm -f conftest.$ac_objext
16640 if { (eval echo "$as_me:16640: \"$ac_compile\"") >&5
16641   (eval $ac_compile) 2>&5
16642   ac_status=$?
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); } &&
16645          { ac_try='test -s conftest.$ac_objext'
16646   { (eval echo "$as_me:16646: \"$ac_try\"") >&5
16647   (eval $ac_try) 2>&5
16648   ac_status=$?
16649   echo "$as_me:16649: \$? = $ac_status" >&5
16650   (exit $ac_status); }; }; then
16651   cf_cv_header_stdbool_h=1
16652 else
16653   echo "$as_me: failed program was:" >&5
16654 cat conftest.$ac_ext >&5
16655 cf_cv_header_stdbool_h=0
16656 fi
16657 rm -f conftest.$ac_objext conftest.$ac_ext
16658 fi
16659 rm -f conftest.$ac_objext conftest.$ac_ext
16660 fi
16661
16662 if test "$cf_cv_header_stdbool_h" = 1
16663 then    echo "$as_me:16663: result: yes" >&5
16664 echo "${ECHO_T}yes" >&6
16665 else    echo "$as_me:16665: result: no" >&5
16666 echo "${ECHO_T}no" >&6
16667 fi
16668
16669 echo "$as_me:16669: checking for builtin bool type" >&5
16670 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16671
16672 if test "${cf_cv_cc_bool_type+set}" = set; then
16673   echo $ECHO_N "(cached) $ECHO_C" >&6
16674 else
16675
16676         cat >conftest.$ac_ext <<_ACEOF
16677 #line 16677 "configure"
16678 #include "confdefs.h"
16679
16680 #include <stdio.h>
16681 #include <sys/types.h>
16682
16683 int
16684 main ()
16685 {
16686 bool x = false
16687   ;
16688   return 0;
16689 }
16690 _ACEOF
16691 rm -f conftest.$ac_objext
16692 if { (eval echo "$as_me:16692: \"$ac_compile\"") >&5
16693   (eval $ac_compile) 2>&5
16694   ac_status=$?
16695   echo "$as_me:16695: \$? = $ac_status" >&5
16696   (exit $ac_status); } &&
16697          { ac_try='test -s conftest.$ac_objext'
16698   { (eval echo "$as_me:16698: \"$ac_try\"") >&5
16699   (eval $ac_try) 2>&5
16700   ac_status=$?
16701   echo "$as_me:16701: \$? = $ac_status" >&5
16702   (exit $ac_status); }; }; then
16703   cf_cv_cc_bool_type=1
16704 else
16705   echo "$as_me: failed program was:" >&5
16706 cat conftest.$ac_ext >&5
16707 cf_cv_cc_bool_type=0
16708 fi
16709 rm -f conftest.$ac_objext conftest.$ac_ext
16710
16711 fi
16712
16713 if test "$cf_cv_cc_bool_type" = 1
16714 then    echo "$as_me:16714: result: yes" >&5
16715 echo "${ECHO_T}yes" >&6
16716 else    echo "$as_me:16716: result: no" >&5
16717 echo "${ECHO_T}no" >&6
16718 fi
16719
16720 # Check for C++ compiler characteristics (and ensure that it's there!)
16721 if test -n "$CXX" ; then
16722         ac_ext=cc
16723 ac_cpp='$CXXCPP $CPPFLAGS'
16724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16727 ac_main_return=return
16728
16729 if test -n "$GXX" ; then
16730 case $cf_cv_system_name in #(vi
16731 os2*) #(vi
16732         cf_stdcpp_libname=stdcpp
16733         ;;
16734 *)
16735         cf_stdcpp_libname=stdc++
16736         ;;
16737 esac
16738 echo "$as_me:16738: checking for library $cf_stdcpp_libname" >&5
16739 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16740 if test "${cf_cv_libstdcpp+set}" = set; then
16741   echo $ECHO_N "(cached) $ECHO_C" >&6
16742 else
16743
16744         cf_save="$LIBS"
16745         LIBS="-l$cf_stdcpp_libname $LIBS"
16746 cat >conftest.$ac_ext <<_ACEOF
16747 #line 16747 "configure"
16748 #include "confdefs.h"
16749
16750 #include <strstream.h>
16751 int
16752 main ()
16753 {
16754
16755 char buf[80];
16756 strstreambuf foo(buf, sizeof(buf))
16757
16758   ;
16759   return 0;
16760 }
16761 _ACEOF
16762 rm -f conftest.$ac_objext conftest$ac_exeext
16763 if { (eval echo "$as_me:16763: \"$ac_link\"") >&5
16764   (eval $ac_link) 2>&5
16765   ac_status=$?
16766   echo "$as_me:16766: \$? = $ac_status" >&5
16767   (exit $ac_status); } &&
16768          { ac_try='test -s conftest$ac_exeext'
16769   { (eval echo "$as_me:16769: \"$ac_try\"") >&5
16770   (eval $ac_try) 2>&5
16771   ac_status=$?
16772   echo "$as_me:16772: \$? = $ac_status" >&5
16773   (exit $ac_status); }; }; then
16774   cf_cv_libstdcpp=yes
16775 else
16776   echo "$as_me: failed program was:" >&5
16777 cat conftest.$ac_ext >&5
16778 cf_cv_libstdcpp=no
16779 fi
16780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16781         LIBS="$cf_save"
16782
16783 fi
16784 echo "$as_me:16784: result: $cf_cv_libstdcpp" >&5
16785 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16786 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
16787 fi
16788
16789         echo "$as_me:16789: checking whether $CXX understands -c and -o together" >&5
16790 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16791 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16792   echo $ECHO_N "(cached) $ECHO_C" >&6
16793 else
16794
16795 cat > conftest.$ac_ext <<CF_EOF
16796 #include <stdio.h>
16797 int main()
16798 {
16799         ${cf_cv_main_return:-return}(0);
16800 }
16801 CF_EOF
16802 # We do the test twice because some compilers refuse to overwrite an
16803 # existing .o file with -o, though they will create one.
16804 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16805 if { (eval echo "$as_me:16805: \"$ac_try\"") >&5
16806   (eval $ac_try) 2>&5
16807   ac_status=$?
16808   echo "$as_me:16808: \$? = $ac_status" >&5
16809   (exit $ac_status); } &&
16810   test -f conftest2.$ac_objext && { (eval echo "$as_me:16810: \"$ac_try\"") >&5
16811   (eval $ac_try) 2>&5
16812   ac_status=$?
16813   echo "$as_me:16813: \$? = $ac_status" >&5
16814   (exit $ac_status); };
16815 then
16816   eval cf_cv_prog_CXX_c_o=yes
16817 else
16818   eval cf_cv_prog_CXX_c_o=no
16819 fi
16820 rm -f conftest*
16821
16822 fi
16823 if test $cf_cv_prog_CXX_c_o = yes; then
16824   echo "$as_me:16824: result: yes" >&5
16825 echo "${ECHO_T}yes" >&6
16826 else
16827   echo "$as_me:16827: result: no" >&5
16828 echo "${ECHO_T}no" >&6
16829 fi
16830
16831         case $GXX_VERSION in
16832         1*|2.0-6*)
16833                 cf_cxx_library=yes
16834                 ;;
16835         *-2.7*|2.7*)
16836
16837 cf_cxx_library=unknown
16838 case $cf_cv_system_name in #(vi
16839 os2*) #(vi
16840         cf_gpp_libname=gpp
16841         ;;
16842 *)
16843         cf_gpp_libname=g++
16844         ;;
16845 esac
16846 if test "$GXX" = yes; then
16847         echo "$as_me:16847: checking for lib$cf_gpp_libname" >&5
16848 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16849         cf_save="$LIBS"
16850         LIBS="-l$cf_gpp_libname $LIBS"
16851         cat >conftest.$ac_ext <<_ACEOF
16852 #line 16852 "configure"
16853 #include "confdefs.h"
16854
16855 #include <$cf_gpp_libname/builtin.h>
16856
16857 int
16858 main ()
16859 {
16860 two_arg_error_handler_t foo2 = lib_error_handler
16861   ;
16862   return 0;
16863 }
16864 _ACEOF
16865 rm -f conftest.$ac_objext conftest$ac_exeext
16866 if { (eval echo "$as_me:16866: \"$ac_link\"") >&5
16867   (eval $ac_link) 2>&5
16868   ac_status=$?
16869   echo "$as_me:16869: \$? = $ac_status" >&5
16870   (exit $ac_status); } &&
16871          { ac_try='test -s conftest$ac_exeext'
16872   { (eval echo "$as_me:16872: \"$ac_try\"") >&5
16873   (eval $ac_try) 2>&5
16874   ac_status=$?
16875   echo "$as_me:16875: \$? = $ac_status" >&5
16876   (exit $ac_status); }; }; then
16877   cf_cxx_library=yes
16878          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16879          if test "$cf_gpp_libname" = cpp ; then
16880             cat >>confdefs.h <<\EOF
16881 #define HAVE_GPP_BUILTIN_H 1
16882 EOF
16883
16884          else
16885             cat >>confdefs.h <<\EOF
16886 #define HAVE_GXX_BUILTIN_H 1
16887 EOF
16888
16889          fi
16890 else
16891   echo "$as_me: failed program was:" >&5
16892 cat conftest.$ac_ext >&5
16893 cat >conftest.$ac_ext <<_ACEOF
16894 #line 16894 "configure"
16895 #include "confdefs.h"
16896
16897 #include <builtin.h>
16898
16899 int
16900 main ()
16901 {
16902 two_arg_error_handler_t foo2 = lib_error_handler
16903   ;
16904   return 0;
16905 }
16906 _ACEOF
16907 rm -f conftest.$ac_objext conftest$ac_exeext
16908 if { (eval echo "$as_me:16908: \"$ac_link\"") >&5
16909   (eval $ac_link) 2>&5
16910   ac_status=$?
16911   echo "$as_me:16911: \$? = $ac_status" >&5
16912   (exit $ac_status); } &&
16913          { ac_try='test -s conftest$ac_exeext'
16914   { (eval echo "$as_me:16914: \"$ac_try\"") >&5
16915   (eval $ac_try) 2>&5
16916   ac_status=$?
16917   echo "$as_me:16917: \$? = $ac_status" >&5
16918   (exit $ac_status); }; }; then
16919   cf_cxx_library=yes
16920          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16921          cat >>confdefs.h <<\EOF
16922 #define HAVE_BUILTIN_H 1
16923 EOF
16924
16925 else
16926   echo "$as_me: failed program was:" >&5
16927 cat conftest.$ac_ext >&5
16928 cf_cxx_library=no
16929 fi
16930 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16931 fi
16932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16933         LIBS="$cf_save"
16934         echo "$as_me:16934: result: $cf_cxx_library" >&5
16935 echo "${ECHO_T}$cf_cxx_library" >&6
16936 fi
16937
16938                 ;;
16939         *)
16940                 cf_cxx_library=no
16941                 ;;
16942         esac
16943
16944         ac_ext=cc
16945 ac_cpp='$CXXCPP $CPPFLAGS'
16946 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16947 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16948 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16949 ac_main_return=return
16950 echo "$as_me:16950: checking how to run the C++ preprocessor" >&5
16951 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16952 if test -z "$CXXCPP"; then
16953   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16954   echo $ECHO_N "(cached) $ECHO_C" >&6
16955 else
16956       # Double quotes because CXXCPP needs to be expanded
16957     for CXXCPP in "$CXX -E" "/lib/cpp"
16958     do
16959       ac_preproc_ok=false
16960 for ac_cxx_preproc_warn_flag in '' yes
16961 do
16962   # Use a header file that comes with gcc, so configuring glibc
16963   # with a fresh cross-compiler works.
16964   # On the NeXT, cc -E runs the code through the compiler's parser,
16965   # not just through cpp. "Syntax error" is here to catch this case.
16966   cat >conftest.$ac_ext <<_ACEOF
16967 #line 16967 "configure"
16968 #include "confdefs.h"
16969 #include <assert.h>
16970                      Syntax error
16971 _ACEOF
16972 if { (eval echo "$as_me:16972: \"$ac_cpp conftest.$ac_ext\"") >&5
16973   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16974   ac_status=$?
16975   egrep -v '^ *\+' conftest.er1 >conftest.err
16976   rm -f conftest.er1
16977   cat conftest.err >&5
16978   echo "$as_me:16978: \$? = $ac_status" >&5
16979   (exit $ac_status); } >/dev/null; then
16980   if test -s conftest.err; then
16981     ac_cpp_err=$ac_cxx_preproc_warn_flag
16982   else
16983     ac_cpp_err=
16984   fi
16985 else
16986   ac_cpp_err=yes
16987 fi
16988 if test -z "$ac_cpp_err"; then
16989   :
16990 else
16991   echo "$as_me: failed program was:" >&5
16992   cat conftest.$ac_ext >&5
16993   # Broken: fails on valid input.
16994 continue
16995 fi
16996 rm -f conftest.err conftest.$ac_ext
16997
16998   # OK, works on sane cases.  Now check whether non-existent headers
16999   # can be detected and how.
17000   cat >conftest.$ac_ext <<_ACEOF
17001 #line 17001 "configure"
17002 #include "confdefs.h"
17003 #include <ac_nonexistent.h>
17004 _ACEOF
17005 if { (eval echo "$as_me:17005: \"$ac_cpp conftest.$ac_ext\"") >&5
17006   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17007   ac_status=$?
17008   egrep -v '^ *\+' conftest.er1 >conftest.err
17009   rm -f conftest.er1
17010   cat conftest.err >&5
17011   echo "$as_me:17011: \$? = $ac_status" >&5
17012   (exit $ac_status); } >/dev/null; then
17013   if test -s conftest.err; then
17014     ac_cpp_err=$ac_cxx_preproc_warn_flag
17015   else
17016     ac_cpp_err=
17017   fi
17018 else
17019   ac_cpp_err=yes
17020 fi
17021 if test -z "$ac_cpp_err"; then
17022   # Broken: success on invalid input.
17023 continue
17024 else
17025   echo "$as_me: failed program was:" >&5
17026   cat conftest.$ac_ext >&5
17027   # Passes both tests.
17028 ac_preproc_ok=:
17029 break
17030 fi
17031 rm -f conftest.err conftest.$ac_ext
17032
17033 done
17034 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17035 rm -f conftest.err conftest.$ac_ext
17036 if $ac_preproc_ok; then
17037   break
17038 fi
17039
17040     done
17041     ac_cv_prog_CXXCPP=$CXXCPP
17042
17043 fi
17044   CXXCPP=$ac_cv_prog_CXXCPP
17045 else
17046   ac_cv_prog_CXXCPP=$CXXCPP
17047 fi
17048 echo "$as_me:17048: result: $CXXCPP" >&5
17049 echo "${ECHO_T}$CXXCPP" >&6
17050 ac_preproc_ok=false
17051 for ac_cxx_preproc_warn_flag in '' yes
17052 do
17053   # Use a header file that comes with gcc, so configuring glibc
17054   # with a fresh cross-compiler works.
17055   # On the NeXT, cc -E runs the code through the compiler's parser,
17056   # not just through cpp. "Syntax error" is here to catch this case.
17057   cat >conftest.$ac_ext <<_ACEOF
17058 #line 17058 "configure"
17059 #include "confdefs.h"
17060 #include <assert.h>
17061                      Syntax error
17062 _ACEOF
17063 if { (eval echo "$as_me:17063: \"$ac_cpp conftest.$ac_ext\"") >&5
17064   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17065   ac_status=$?
17066   egrep -v '^ *\+' conftest.er1 >conftest.err
17067   rm -f conftest.er1
17068   cat conftest.err >&5
17069   echo "$as_me:17069: \$? = $ac_status" >&5
17070   (exit $ac_status); } >/dev/null; then
17071   if test -s conftest.err; then
17072     ac_cpp_err=$ac_cxx_preproc_warn_flag
17073   else
17074     ac_cpp_err=
17075   fi
17076 else
17077   ac_cpp_err=yes
17078 fi
17079 if test -z "$ac_cpp_err"; then
17080   :
17081 else
17082   echo "$as_me: failed program was:" >&5
17083   cat conftest.$ac_ext >&5
17084   # Broken: fails on valid input.
17085 continue
17086 fi
17087 rm -f conftest.err conftest.$ac_ext
17088
17089   # OK, works on sane cases.  Now check whether non-existent headers
17090   # can be detected and how.
17091   cat >conftest.$ac_ext <<_ACEOF
17092 #line 17092 "configure"
17093 #include "confdefs.h"
17094 #include <ac_nonexistent.h>
17095 _ACEOF
17096 if { (eval echo "$as_me:17096: \"$ac_cpp conftest.$ac_ext\"") >&5
17097   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17098   ac_status=$?
17099   egrep -v '^ *\+' conftest.er1 >conftest.err
17100   rm -f conftest.er1
17101   cat conftest.err >&5
17102   echo "$as_me:17102: \$? = $ac_status" >&5
17103   (exit $ac_status); } >/dev/null; then
17104   if test -s conftest.err; then
17105     ac_cpp_err=$ac_cxx_preproc_warn_flag
17106   else
17107     ac_cpp_err=
17108   fi
17109 else
17110   ac_cpp_err=yes
17111 fi
17112 if test -z "$ac_cpp_err"; then
17113   # Broken: success on invalid input.
17114 continue
17115 else
17116   echo "$as_me: failed program was:" >&5
17117   cat conftest.$ac_ext >&5
17118   # Passes both tests.
17119 ac_preproc_ok=:
17120 break
17121 fi
17122 rm -f conftest.err conftest.$ac_ext
17123
17124 done
17125 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17126 rm -f conftest.err conftest.$ac_ext
17127 if $ac_preproc_ok; then
17128   :
17129 else
17130   { { echo "$as_me:17130: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17131 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17132    { (exit 1); exit 1; }; }
17133 fi
17134
17135 ac_ext=cc
17136 ac_cpp='$CXXCPP $CPPFLAGS'
17137 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17138 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17139 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17140 ac_main_return=return
17141
17142 for ac_header in iostream typeinfo
17143 do
17144 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17145 echo "$as_me:17145: checking for $ac_header" >&5
17146 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17147 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17148   echo $ECHO_N "(cached) $ECHO_C" >&6
17149 else
17150   cat >conftest.$ac_ext <<_ACEOF
17151 #line 17151 "configure"
17152 #include "confdefs.h"
17153 #include <$ac_header>
17154 _ACEOF
17155 if { (eval echo "$as_me:17155: \"$ac_cpp conftest.$ac_ext\"") >&5
17156   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17157   ac_status=$?
17158   egrep -v '^ *\+' conftest.er1 >conftest.err
17159   rm -f conftest.er1
17160   cat conftest.err >&5
17161   echo "$as_me:17161: \$? = $ac_status" >&5
17162   (exit $ac_status); } >/dev/null; then
17163   if test -s conftest.err; then
17164     ac_cpp_err=$ac_cxx_preproc_warn_flag
17165   else
17166     ac_cpp_err=
17167   fi
17168 else
17169   ac_cpp_err=yes
17170 fi
17171 if test -z "$ac_cpp_err"; then
17172   eval "$as_ac_Header=yes"
17173 else
17174   echo "$as_me: failed program was:" >&5
17175   cat conftest.$ac_ext >&5
17176   eval "$as_ac_Header=no"
17177 fi
17178 rm -f conftest.err conftest.$ac_ext
17179 fi
17180 echo "$as_me:17180: result: `eval echo '${'$as_ac_Header'}'`" >&5
17181 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17182 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17183   cat >>confdefs.h <<EOF
17184 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17185 EOF
17186
17187 fi
17188 done
17189
17190     if test x"$ac_cv_header_iostream" = xyes ; then
17191         echo "$as_me:17191: checking if iostream uses std-namespace" >&5
17192 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17193         cat >conftest.$ac_ext <<_ACEOF
17194 #line 17194 "configure"
17195 #include "confdefs.h"
17196
17197 #include <iostream>
17198 using std::endl;
17199 using std::cerr;
17200 int
17201 main ()
17202 {
17203
17204 cerr << "testing" << endl;
17205
17206   ;
17207   return 0;
17208 }
17209 _ACEOF
17210 rm -f conftest.$ac_objext
17211 if { (eval echo "$as_me:17211: \"$ac_compile\"") >&5
17212   (eval $ac_compile) 2>&5
17213   ac_status=$?
17214   echo "$as_me:17214: \$? = $ac_status" >&5
17215   (exit $ac_status); } &&
17216          { ac_try='test -s conftest.$ac_objext'
17217   { (eval echo "$as_me:17217: \"$ac_try\"") >&5
17218   (eval $ac_try) 2>&5
17219   ac_status=$?
17220   echo "$as_me:17220: \$? = $ac_status" >&5
17221   (exit $ac_status); }; }; then
17222   cf_iostream_namespace=yes
17223 else
17224   echo "$as_me: failed program was:" >&5
17225 cat conftest.$ac_ext >&5
17226 cf_iostream_namespace=no
17227 fi
17228 rm -f conftest.$ac_objext conftest.$ac_ext
17229         echo "$as_me:17229: result: $cf_iostream_namespace" >&5
17230 echo "${ECHO_T}$cf_iostream_namespace" >&6
17231         if test "$cf_iostream_namespace" = yes ; then
17232             cat >>confdefs.h <<\EOF
17233 #define IOSTREAM_NAMESPACE 1
17234 EOF
17235
17236         fi
17237     fi
17238
17239 echo "$as_me:17239: checking if we should include stdbool.h" >&5
17240 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17241
17242 if test "${cf_cv_header_stdbool_h+set}" = set; then
17243   echo $ECHO_N "(cached) $ECHO_C" >&6
17244 else
17245
17246         cat >conftest.$ac_ext <<_ACEOF
17247 #line 17247 "configure"
17248 #include "confdefs.h"
17249
17250 int
17251 main ()
17252 {
17253 bool foo = false
17254   ;
17255   return 0;
17256 }
17257 _ACEOF
17258 rm -f conftest.$ac_objext
17259 if { (eval echo "$as_me:17259: \"$ac_compile\"") >&5
17260   (eval $ac_compile) 2>&5
17261   ac_status=$?
17262   echo "$as_me:17262: \$? = $ac_status" >&5
17263   (exit $ac_status); } &&
17264          { ac_try='test -s conftest.$ac_objext'
17265   { (eval echo "$as_me:17265: \"$ac_try\"") >&5
17266   (eval $ac_try) 2>&5
17267   ac_status=$?
17268   echo "$as_me:17268: \$? = $ac_status" >&5
17269   (exit $ac_status); }; }; then
17270   cf_cv_header_stdbool_h=0
17271 else
17272   echo "$as_me: failed program was:" >&5
17273 cat conftest.$ac_ext >&5
17274 cat >conftest.$ac_ext <<_ACEOF
17275 #line 17275 "configure"
17276 #include "confdefs.h"
17277
17278 #ifndef __BEOS__
17279 #include <stdbool.h>
17280 #endif
17281
17282 int
17283 main ()
17284 {
17285 bool foo = false
17286   ;
17287   return 0;
17288 }
17289 _ACEOF
17290 rm -f conftest.$ac_objext
17291 if { (eval echo "$as_me:17291: \"$ac_compile\"") >&5
17292   (eval $ac_compile) 2>&5
17293   ac_status=$?
17294   echo "$as_me:17294: \$? = $ac_status" >&5
17295   (exit $ac_status); } &&
17296          { ac_try='test -s conftest.$ac_objext'
17297   { (eval echo "$as_me:17297: \"$ac_try\"") >&5
17298   (eval $ac_try) 2>&5
17299   ac_status=$?
17300   echo "$as_me:17300: \$? = $ac_status" >&5
17301   (exit $ac_status); }; }; then
17302   cf_cv_header_stdbool_h=1
17303 else
17304   echo "$as_me: failed program was:" >&5
17305 cat conftest.$ac_ext >&5
17306 cf_cv_header_stdbool_h=0
17307 fi
17308 rm -f conftest.$ac_objext conftest.$ac_ext
17309 fi
17310 rm -f conftest.$ac_objext conftest.$ac_ext
17311 fi
17312
17313 if test "$cf_cv_header_stdbool_h" = 1
17314 then    echo "$as_me:17314: result: yes" >&5
17315 echo "${ECHO_T}yes" >&6
17316 else    echo "$as_me:17316: result: no" >&5
17317 echo "${ECHO_T}no" >&6
17318 fi
17319
17320 echo "$as_me:17320: checking for builtin bool type" >&5
17321 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17322
17323 if test "${cf_cv_builtin_bool+set}" = set; then
17324   echo $ECHO_N "(cached) $ECHO_C" >&6
17325 else
17326
17327         cat >conftest.$ac_ext <<_ACEOF
17328 #line 17328 "configure"
17329 #include "confdefs.h"
17330
17331 #include <stdio.h>
17332 #include <sys/types.h>
17333
17334 int
17335 main ()
17336 {
17337 bool x = false
17338   ;
17339   return 0;
17340 }
17341 _ACEOF
17342 rm -f conftest.$ac_objext
17343 if { (eval echo "$as_me:17343: \"$ac_compile\"") >&5
17344   (eval $ac_compile) 2>&5
17345   ac_status=$?
17346   echo "$as_me:17346: \$? = $ac_status" >&5
17347   (exit $ac_status); } &&
17348          { ac_try='test -s conftest.$ac_objext'
17349   { (eval echo "$as_me:17349: \"$ac_try\"") >&5
17350   (eval $ac_try) 2>&5
17351   ac_status=$?
17352   echo "$as_me:17352: \$? = $ac_status" >&5
17353   (exit $ac_status); }; }; then
17354   cf_cv_builtin_bool=1
17355 else
17356   echo "$as_me: failed program was:" >&5
17357 cat conftest.$ac_ext >&5
17358 cf_cv_builtin_bool=0
17359 fi
17360 rm -f conftest.$ac_objext conftest.$ac_ext
17361
17362 fi
17363
17364 if test "$cf_cv_builtin_bool" = 1
17365 then    echo "$as_me:17365: result: yes" >&5
17366 echo "${ECHO_T}yes" >&6
17367 else    echo "$as_me:17367: result: no" >&5
17368 echo "${ECHO_T}no" >&6
17369 fi
17370
17371 echo "$as_me:17371: checking for size of bool" >&5
17372 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17373 if test "${cf_cv_type_of_bool+set}" = set; then
17374   echo $ECHO_N "(cached) $ECHO_C" >&6
17375 else
17376
17377         rm -f cf_test.out
17378         if test "$cross_compiling" = yes; then
17379   cf_cv_type_of_bool=unknown
17380 else
17381   cat >conftest.$ac_ext <<_ACEOF
17382 #line 17382 "configure"
17383 #include "confdefs.h"
17384
17385 #include <stdlib.h>
17386 #include <stdio.h>
17387
17388 #if defined(__cplusplus)
17389
17390 #ifdef HAVE_GXX_BUILTIN_H
17391 #include <g++/builtin.h>
17392 #elif HAVE_GPP_BUILTIN_H
17393 #include <gpp/builtin.h>
17394 #elif HAVE_BUILTIN_H
17395 #include <builtin.h>
17396 #endif
17397
17398 #else
17399
17400 #if $cf_cv_header_stdbool_h
17401 #include <stdbool.h>
17402 #endif
17403
17404 #endif
17405
17406 main()
17407 {
17408         FILE *fp = fopen("cf_test.out", "w");
17409         if (fp != 0) {
17410                 bool x = true;
17411                 if ((bool)(-x) >= 0)
17412                         fputs("unsigned ", fp);
17413                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17414                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17415                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17416                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17417                 fclose(fp);
17418         }
17419         ${cf_cv_main_return:-return}(0);
17420 }
17421
17422 _ACEOF
17423 rm -f conftest$ac_exeext
17424 if { (eval echo "$as_me:17424: \"$ac_link\"") >&5
17425   (eval $ac_link) 2>&5
17426   ac_status=$?
17427   echo "$as_me:17427: \$? = $ac_status" >&5
17428   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17429   { (eval echo "$as_me:17429: \"$ac_try\"") >&5
17430   (eval $ac_try) 2>&5
17431   ac_status=$?
17432   echo "$as_me:17432: \$? = $ac_status" >&5
17433   (exit $ac_status); }; }; then
17434   cf_cv_type_of_bool=`cat cf_test.out`
17435                  if test -z "$cf_cv_type_of_bool"; then
17436                    cf_cv_type_of_bool=unknown
17437                  fi
17438 else
17439   echo "$as_me: program exited with status $ac_status" >&5
17440 echo "$as_me: failed program was:" >&5
17441 cat conftest.$ac_ext >&5
17442 cf_cv_type_of_bool=unknown
17443 fi
17444 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17445 fi
17446
17447 fi
17448
17449         rm -f cf_test.out
17450 echo "$as_me:17450: result: $cf_cv_type_of_bool" >&5
17451 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17452 if test "$cf_cv_type_of_bool" = unknown ; then
17453         case .$NCURSES_BOOL in #(vi
17454         .auto|.) NCURSES_BOOL=unsigned;;
17455         esac
17456         { echo "$as_me:17456: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17457 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17458         cf_cv_type_of_bool=$NCURSES_BOOL
17459 fi
17460
17461 echo "$as_me:17461: checking for special defines needed for etip.h" >&5
17462 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17463 cf_save_CXXFLAGS="$CXXFLAGS"
17464 cf_result="none"
17465 for cf_math in "" MATH_H
17466 do
17467 for cf_excp in "" MATH_EXCEPTION
17468 do
17469         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17470         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17471         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17472 cat >conftest.$ac_ext <<_ACEOF
17473 #line 17473 "configure"
17474 #include "confdefs.h"
17475
17476 #include <etip.h.in>
17477
17478 int
17479 main ()
17480 {
17481
17482   ;
17483   return 0;
17484 }
17485 _ACEOF
17486 rm -f conftest.$ac_objext
17487 if { (eval echo "$as_me:17487: \"$ac_compile\"") >&5
17488   (eval $ac_compile) 2>&5
17489   ac_status=$?
17490   echo "$as_me:17490: \$? = $ac_status" >&5
17491   (exit $ac_status); } &&
17492          { ac_try='test -s conftest.$ac_objext'
17493   { (eval echo "$as_me:17493: \"$ac_try\"") >&5
17494   (eval $ac_try) 2>&5
17495   ac_status=$?
17496   echo "$as_me:17496: \$? = $ac_status" >&5
17497   (exit $ac_status); }; }; then
17498
17499         test -n "$cf_math" && cat >>confdefs.h <<EOF
17500 #define ETIP_NEEDS_${cf_math} 1
17501 EOF
17502
17503         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17504 #define ETIP_NEEDS_${cf_excp} 1
17505 EOF
17506
17507         cf_result="$cf_math $cf_excp"
17508         break
17509
17510 else
17511   echo "$as_me: failed program was:" >&5
17512 cat conftest.$ac_ext >&5
17513 fi
17514 rm -f conftest.$ac_objext conftest.$ac_ext
17515 done
17516 done
17517 echo "$as_me:17517: result: $cf_result" >&5
17518 echo "${ECHO_T}$cf_result" >&6
17519 CXXFLAGS="$cf_save_CXXFLAGS"
17520
17521 if test -n "$CXX"; then
17522 echo "$as_me:17522: checking if $CXX accepts parameter initialization" >&5
17523 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17524 if test "${cf_cv_cpp_param_init+set}" = set; then
17525   echo $ECHO_N "(cached) $ECHO_C" >&6
17526 else
17527
17528         ac_ext=cc
17529 ac_cpp='$CXXCPP $CPPFLAGS'
17530 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17531 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17532 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17533 ac_main_return=return
17534
17535         if test "$cross_compiling" = yes; then
17536   cf_cv_cpp_param_init=unknown
17537 else
17538   cat >conftest.$ac_ext <<_ACEOF
17539 #line 17539 "configure"
17540 #include "confdefs.h"
17541
17542 class TEST {
17543 private:
17544         int value;
17545 public:
17546         TEST(int x = 1);
17547         ~TEST();
17548 };
17549
17550 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17551 {
17552         value = x;
17553 }
17554 void main() { }
17555
17556 _ACEOF
17557 rm -f conftest$ac_exeext
17558 if { (eval echo "$as_me:17558: \"$ac_link\"") >&5
17559   (eval $ac_link) 2>&5
17560   ac_status=$?
17561   echo "$as_me:17561: \$? = $ac_status" >&5
17562   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17563   { (eval echo "$as_me:17563: \"$ac_try\"") >&5
17564   (eval $ac_try) 2>&5
17565   ac_status=$?
17566   echo "$as_me:17566: \$? = $ac_status" >&5
17567   (exit $ac_status); }; }; then
17568   cf_cv_cpp_param_init=yes
17569 else
17570   echo "$as_me: program exited with status $ac_status" >&5
17571 echo "$as_me: failed program was:" >&5
17572 cat conftest.$ac_ext >&5
17573 cf_cv_cpp_param_init=no
17574 fi
17575 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17576 fi
17577         ac_ext=cc
17578 ac_cpp='$CXXCPP $CPPFLAGS'
17579 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17580 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17581 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17582 ac_main_return=return
17583
17584 fi
17585 echo "$as_me:17585: result: $cf_cv_cpp_param_init" >&5
17586 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17587 fi
17588 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17589 #define CPP_HAS_PARAM_INIT 1
17590 EOF
17591
17592 if test -n "$CXX"; then
17593
17594 echo "$as_me:17594: checking if $CXX accepts static_cast" >&5
17595 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17596 if test "${cf_cv_cpp_static_cast+set}" = set; then
17597   echo $ECHO_N "(cached) $ECHO_C" >&6
17598 else
17599
17600         ac_ext=cc
17601 ac_cpp='$CXXCPP $CPPFLAGS'
17602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17603 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17605 ac_main_return=return
17606
17607         cat >conftest.$ac_ext <<_ACEOF
17608 #line 17608 "configure"
17609 #include "confdefs.h"
17610
17611 class NCursesPanel
17612 {
17613 public:
17614   NCursesPanel(int nlines,
17615                int ncols,
17616                int begin_y = 0,
17617                int begin_x = 0)
17618   {
17619   }
17620
17621   ~NCursesPanel();
17622 };
17623
17624 template<class T> class NCursesUserPanel : public NCursesPanel
17625 {
17626 public:
17627   NCursesUserPanel (int nlines,
17628                     int ncols,
17629                     int begin_y = 0,
17630                     int begin_x = 0,
17631                     const T* p_UserData = static_cast<T*>(0))
17632     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17633   {
17634   };
17635   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17636   {
17637   };
17638
17639   virtual ~NCursesUserPanel() {};
17640 };
17641
17642 int
17643 main ()
17644 {
17645
17646         const char* p_UserData = static_cast<char*>(0)
17647   ;
17648   return 0;
17649 }
17650 _ACEOF
17651 rm -f conftest.$ac_objext
17652 if { (eval echo "$as_me:17652: \"$ac_compile\"") >&5
17653   (eval $ac_compile) 2>&5
17654   ac_status=$?
17655   echo "$as_me:17655: \$? = $ac_status" >&5
17656   (exit $ac_status); } &&
17657          { ac_try='test -s conftest.$ac_objext'
17658   { (eval echo "$as_me:17658: \"$ac_try\"") >&5
17659   (eval $ac_try) 2>&5
17660   ac_status=$?
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit $ac_status); }; }; then
17663   cf_cv_cpp_static_cast=yes
17664 else
17665   echo "$as_me: failed program was:" >&5
17666 cat conftest.$ac_ext >&5
17667 cf_cv_cpp_static_cast=no
17668 fi
17669 rm -f conftest.$ac_objext conftest.$ac_ext
17670
17671         ac_ext=cc
17672 ac_cpp='$CXXCPP $CPPFLAGS'
17673 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17674 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17675 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17676 ac_main_return=return
17677
17678 fi
17679 echo "$as_me:17679: result: $cf_cv_cpp_static_cast" >&5
17680 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17681
17682 fi
17683
17684 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17685 #define CPP_HAS_STATIC_CAST 1
17686 EOF
17687
17688         CXX_AR='$(AR)'
17689         CXX_ARFLAGS='$(ARFLAGS)'
17690         case $cf_cv_system_name in #(vi
17691         irix*) #(vi
17692             if test "$GXX" != yes ; then
17693                 CXX_AR='$(CXX)'
17694                 CXX_ARFLAGS='-ar -o'
17695             fi
17696             ;;
17697         sco3.2v5*) #(vi
17698             CXXLDFLAGS="-u main"
17699             ;;
17700         solaris2*)
17701             if test "$GXX" != yes ; then
17702                 CXX_AR='$(CXX)'
17703                 CXX_ARFLAGS='-xar -o'
17704             fi
17705             ;;
17706         esac
17707
17708 else
17709         cf_cxx_library=no
17710         cf_cv_builtin_bool=1
17711
17712         # Just because we are not configuring against C++ right now does not
17713         # mean that a user will not want to use C++.  Some distributors disable
17714         # the C++ portion of this configuration as a shortcut (or just to avoid
17715         # compiling the demo in the c++ directory).  So we need a reasonable
17716         # default for the 'bool' type.
17717         #
17718         # Caveat: since the storage of the bool type is not standardized, it
17719         # may change.
17720
17721         if test "$NCURSES_BOOL" != auto ; then
17722                 cf_cv_type_of_bool=$NCURSES_BOOL
17723                 cf_cv_header_stdbool_h=0
17724         else
17725                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17726
17727 echo "$as_me:17727: checking for size of bool" >&5
17728 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17729 if test "${cf_cv_type_of_bool+set}" = set; then
17730   echo $ECHO_N "(cached) $ECHO_C" >&6
17731 else
17732
17733         rm -f cf_test.out
17734         if test "$cross_compiling" = yes; then
17735   cf_cv_type_of_bool=unknown
17736 else
17737   cat >conftest.$ac_ext <<_ACEOF
17738 #line 17738 "configure"
17739 #include "confdefs.h"
17740
17741 #include <stdlib.h>
17742 #include <stdio.h>
17743
17744 #if defined(__cplusplus)
17745
17746 #ifdef HAVE_GXX_BUILTIN_H
17747 #include <g++/builtin.h>
17748 #elif HAVE_GPP_BUILTIN_H
17749 #include <gpp/builtin.h>
17750 #elif HAVE_BUILTIN_H
17751 #include <builtin.h>
17752 #endif
17753
17754 #else
17755
17756 #if $cf_cv_header_stdbool_h
17757 #include <stdbool.h>
17758 #endif
17759
17760 #endif
17761
17762 main()
17763 {
17764         FILE *fp = fopen("cf_test.out", "w");
17765         if (fp != 0) {
17766                 bool x = true;
17767                 if ((bool)(-x) >= 0)
17768                         fputs("unsigned ", fp);
17769                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17770                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17771                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17772                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17773                 fclose(fp);
17774         }
17775         ${cf_cv_main_return:-return}(0);
17776 }
17777
17778 _ACEOF
17779 rm -f conftest$ac_exeext
17780 if { (eval echo "$as_me:17780: \"$ac_link\"") >&5
17781   (eval $ac_link) 2>&5
17782   ac_status=$?
17783   echo "$as_me:17783: \$? = $ac_status" >&5
17784   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17785   { (eval echo "$as_me:17785: \"$ac_try\"") >&5
17786   (eval $ac_try) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit $ac_status); }; }; then
17790   cf_cv_type_of_bool=`cat cf_test.out`
17791                  if test -z "$cf_cv_type_of_bool"; then
17792                    cf_cv_type_of_bool=unknown
17793                  fi
17794 else
17795   echo "$as_me: program exited with status $ac_status" >&5
17796 echo "$as_me: failed program was:" >&5
17797 cat conftest.$ac_ext >&5
17798 cf_cv_type_of_bool=unknown
17799 fi
17800 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17801 fi
17802
17803 fi
17804
17805         rm -f cf_test.out
17806 echo "$as_me:17806: result: $cf_cv_type_of_bool" >&5
17807 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17808 if test "$cf_cv_type_of_bool" = unknown ; then
17809         case .$NCURSES_BOOL in #(vi
17810         .auto|.) NCURSES_BOOL=unsigned;;
17811         esac
17812         { echo "$as_me:17812: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17813 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17814         cf_cv_type_of_bool=$NCURSES_BOOL
17815 fi
17816
17817                 else
17818                         echo "$as_me:17818: checking for fallback type of bool" >&5
17819 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17820                         case "$host_cpu" in #(vi
17821                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17822                         *)      cf_cv_type_of_bool=int  ;;
17823                         esac
17824                         echo "$as_me:17824: result: $cf_cv_type_of_bool" >&5
17825 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17826                 fi
17827         fi
17828 fi
17829
17830 # If the C compiler did not declare bool, and we did not determine that the C++
17831 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17832 # ncurses library use the same type as C++ bool.  Note that this allows one to
17833 # specify the type of bool in a configure-script option and postpone
17834 # integration with the C++ compiler provided that the types are compatible.
17835 USE_CXX_BOOL=1
17836 if test $cf_cv_cc_bool_type = 1
17837 then
17838         # oops: C has a bool.  Unlikely, but C++ could differ.
17839         USE_CXX_BOOL=0
17840 elif test $cf_cv_builtin_bool = 0
17841 then
17842         # C++ has no bool
17843         USE_CXX_BOOL=0
17844 else
17845         # this is the normal case
17846         USE_CXX_BOOL='defined(__cplusplus)'
17847 fi
17848
17849 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17850
17851         if test "$cf_with_ada" != "no" ; then
17852                 if test "$with_libtool" != "no"; then
17853                         { echo "$as_me:17853: WARNING: libtool does not support Ada - disabling feature" >&5
17854 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17855                         cf_with_ada=no
17856                 fi
17857         fi
17858
17859         if test "$cf_with_ada" != "no" ; then
17860
17861 cf_ada_make=gnatmake
17862 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17863 set dummy $cf_ada_make; ac_word=$2
17864 echo "$as_me:17864: checking for $ac_word" >&5
17865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17866 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17867   echo $ECHO_N "(cached) $ECHO_C" >&6
17868 else
17869   if test -n "$gnat_exists"; then
17870   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17871 else
17872   ac_save_IFS=$IFS; IFS=$ac_path_separator
17873 ac_dummy="$PATH"
17874 for ac_dir in $ac_dummy; do
17875   IFS=$ac_save_IFS
17876   test -z "$ac_dir" && ac_dir=.
17877   $as_executable_p "$ac_dir/$ac_word" || continue
17878 ac_cv_prog_gnat_exists="yes"
17879 echo "$as_me:17879: found $ac_dir/$ac_word" >&5
17880 break
17881 done
17882
17883   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17884 fi
17885 fi
17886 gnat_exists=$ac_cv_prog_gnat_exists
17887 if test -n "$gnat_exists"; then
17888   echo "$as_me:17888: result: $gnat_exists" >&5
17889 echo "${ECHO_T}$gnat_exists" >&6
17890 else
17891   echo "$as_me:17891: result: no" >&5
17892 echo "${ECHO_T}no" >&6
17893 fi
17894
17895 if test "$ac_cv_prog_gnat_exists" = no; then
17896    cf_ada_make=
17897 else
17898
17899 echo "$as_me:17899: checking for gnat version" >&5
17900 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17901 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17902   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17903 echo "$as_me:17903: result: $cf_gnat_version" >&5
17904 echo "${ECHO_T}$cf_gnat_version" >&6
17905
17906 case $cf_gnat_version in
17907   3.1[1-9]*|3.[2-9]*|[4-9].*)
17908     cf_cv_prog_gnat_correct=yes
17909     ;;
17910   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17911      cf_cv_prog_gnat_correct=no
17912      ;;
17913 esac
17914
17915 case $cf_gnat_version in
17916   3.[1-9]*|[4-9].*)
17917       cf_compile_generics=generics
17918       cf_generic_objects="\${GENOBJS}"
17919       ;;
17920   *)  cf_compile_generics=
17921       cf_generic_objects=
17922       ;;
17923 esac
17924
17925 case $cf_gnat_version in
17926   3.[0-9]*)
17927     USE_OLD_MAKERULES=""
17928     USE_GNAT_PROJECTS="#"
17929     ;;
17930   *)
17931     USE_OLD_MAKERULES="#"
17932     USE_GNAT_PROJECTS=""
17933     ;;
17934 esac
17935
17936    # Extract the first word of "m4", so it can be a program name with args.
17937 set dummy m4; ac_word=$2
17938 echo "$as_me:17938: checking for $ac_word" >&5
17939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17940 if test "${ac_cv_prog_M4_exists+set}" = set; then
17941   echo $ECHO_N "(cached) $ECHO_C" >&6
17942 else
17943   if test -n "$M4_exists"; then
17944   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17945 else
17946   ac_save_IFS=$IFS; IFS=$ac_path_separator
17947 ac_dummy="$PATH"
17948 for ac_dir in $ac_dummy; do
17949   IFS=$ac_save_IFS
17950   test -z "$ac_dir" && ac_dir=.
17951   $as_executable_p "$ac_dir/$ac_word" || continue
17952 ac_cv_prog_M4_exists="yes"
17953 echo "$as_me:17953: found $ac_dir/$ac_word" >&5
17954 break
17955 done
17956
17957   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17958 fi
17959 fi
17960 M4_exists=$ac_cv_prog_M4_exists
17961 if test -n "$M4_exists"; then
17962   echo "$as_me:17962: result: $M4_exists" >&5
17963 echo "${ECHO_T}$M4_exists" >&6
17964 else
17965   echo "$as_me:17965: result: no" >&5
17966 echo "${ECHO_T}no" >&6
17967 fi
17968
17969    if test "$ac_cv_prog_M4_exists" = no; then
17970       cf_cv_prog_gnat_correct=no
17971       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17972    fi
17973    if test "$cf_cv_prog_gnat_correct" = yes; then
17974       echo "$as_me:17974: checking if GNAT works" >&5
17975 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17976
17977 rm -f conftest*
17978 cat >>conftest.ads <<CF_EOF
17979 procedure conftest;
17980 CF_EOF
17981 cat >>conftest.adb <<CF_EOF
17982 with Text_IO;
17983 with GNAT.OS_Lib;
17984 procedure conftest is
17985 begin
17986    Text_IO.Put ("Hello World");
17987    Text_IO.New_Line;
17988    GNAT.OS_Lib.OS_Exit (0);
17989 end conftest;
17990 CF_EOF
17991 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17992    if ( ./conftest 1>&5 2>&1 ) ; then
17993       cf_cv_prog_gnat_correct=yes
17994    else
17995       cf_cv_prog_gnat_correct=no
17996    fi
17997 else
17998    cf_cv_prog_gnat_correct=no
17999 fi
18000 rm -f conftest*
18001
18002       echo "$as_me:18002: result: $cf_cv_prog_gnat_correct" >&5
18003 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18004    fi
18005 fi
18006
18007                 if test "$cf_cv_prog_gnat_correct" = yes; then
18008
18009         ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
18010
18011 echo "$as_me:18011: checking if GNAT pragma Unreferenced works" >&5
18012 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18013 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18014   echo $ECHO_N "(cached) $ECHO_C" >&6
18015 else
18016
18017 rm -f conftest*
18018 cat >>conftest.ads <<CF_EOF
18019 procedure conftest;
18020 CF_EOF
18021 cat >>conftest.adb <<CF_EOF
18022 with Text_IO;
18023 with GNAT.OS_Lib;
18024 procedure conftest is
18025    test : Integer;
18026    pragma Unreferenced (test);
18027 begin
18028    test := 1;
18029    Text_IO.Put ("Hello World");
18030    Text_IO.New_Line;
18031    GNAT.OS_Lib.OS_Exit (0);
18032 end conftest;
18033 CF_EOF
18034 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18035       cf_cv_pragma_unreferenced=yes
18036 else
18037    cf_cv_pragma_unreferenced=no
18038 fi
18039 rm -f conftest*
18040
18041 fi
18042 echo "$as_me:18042: result: $cf_cv_pragma_unreferenced" >&5
18043 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18044
18045 # if the pragma is supported, use it (needed in the Trace code).
18046 if test $cf_cv_pragma_unreferenced = yes ; then
18047         PRAGMA_UNREF=TRUE
18048 else
18049         PRAGMA_UNREF=FALSE
18050 fi
18051
18052 echo "$as_me:18052: checking for ada-compiler" >&5
18053 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18054
18055 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18056 if test "${with_ada_compiler+set}" = set; then
18057   withval="$with_ada_compiler"
18058   cf_ada_compiler=$withval
18059 else
18060   cf_ada_compiler=gnatmake
18061 fi;
18062
18063 echo "$as_me:18063: result: $cf_ada_compiler" >&5
18064 echo "${ECHO_T}$cf_ada_compiler" >&6
18065
18066                         cf_ada_package=terminal_interface
18067
18068 echo "$as_me:18068: checking for ada-include" >&5
18069 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18070
18071 # Check whether --with-ada-include or --without-ada-include was given.
18072 if test "${with_ada_include+set}" = set; then
18073   withval="$with_ada_include"
18074
18075 else
18076   withval="${ADA_INCLUDE-$prefix/share/ada/adainclude}"
18077 fi; if test -n "$prefix/share/ada/adainclude" ; then
18078
18079 if test "x$prefix" != xNONE; then
18080   cf_path_syntax="$prefix"
18081 else
18082   cf_path_syntax="$ac_default_prefix"
18083 fi
18084
18085 case ".$withval" in #(vi
18086 .\$\(*\)*|.\'*\'*) #(vi
18087   ;;
18088 ..|./*|.\\*) #(vi
18089   ;;
18090 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18091   ;;
18092 .\${*prefix}*) #(vi
18093   eval withval="$withval"
18094   case ".$withval" in #(vi
18095   .NONE/*)
18096     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18097     ;;
18098   esac
18099   ;; #(vi
18100 .no|.NONE/*)
18101   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18102   ;;
18103 *)
18104   { { echo "$as_me:18104: error: expected a pathname, not \"$withval\"" >&5
18105 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18106    { (exit 1); exit 1; }; }
18107   ;;
18108 esac
18109
18110 fi
18111 ADA_INCLUDE="$withval"
18112
18113 echo "$as_me:18113: result: $ADA_INCLUDE" >&5
18114 echo "${ECHO_T}$ADA_INCLUDE" >&6
18115
18116 echo "$as_me:18116: checking for ada-objects" >&5
18117 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18118
18119 # Check whether --with-ada-objects or --without-ada-objects was given.
18120 if test "${with_ada_objects+set}" = set; then
18121   withval="$with_ada_objects"
18122
18123 else
18124   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
18125 fi; if test -n "$prefix/lib/ada/adalib" ; then
18126
18127 if test "x$prefix" != xNONE; then
18128   cf_path_syntax="$prefix"
18129 else
18130   cf_path_syntax="$ac_default_prefix"
18131 fi
18132
18133 case ".$withval" in #(vi
18134 .\$\(*\)*|.\'*\'*) #(vi
18135   ;;
18136 ..|./*|.\\*) #(vi
18137   ;;
18138 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18139   ;;
18140 .\${*prefix}*) #(vi
18141   eval withval="$withval"
18142   case ".$withval" in #(vi
18143   .NONE/*)
18144     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18145     ;;
18146   esac
18147   ;; #(vi
18148 .no|.NONE/*)
18149   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18150   ;;
18151 *)
18152   { { echo "$as_me:18152: error: expected a pathname, not \"$withval\"" >&5
18153 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18154    { (exit 1); exit 1; }; }
18155   ;;
18156 esac
18157
18158 fi
18159 ADA_OBJECTS="$withval"
18160
18161 echo "$as_me:18161: result: $ADA_OBJECTS" >&5
18162 echo "${ECHO_T}$ADA_OBJECTS" >&6
18163
18164 echo "$as_me:18164: checking if an Ada95 shared-library should be built" >&5
18165 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18166
18167 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18168 if test "${with_ada_sharedlib+set}" = set; then
18169   withval="$with_ada_sharedlib"
18170   with_ada_sharedlib=$withval
18171 else
18172   with_ada_sharedlib=no
18173 fi;
18174 echo "$as_me:18174: result: $with_ada_sharedlib" >&5
18175 echo "${ECHO_T}$with_ada_sharedlib" >&6
18176
18177 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18178 MAKE_ADA_SHAREDLIB="#"
18179
18180 if test "x$with_ada_sharedlib" != xno
18181 then
18182         MAKE_ADA_SHAREDLIB=
18183         if test "x$with_ada_sharedlib" != xyes
18184         then
18185                 ADA_SHAREDLIB="$with_ada_sharedlib"
18186         fi
18187 fi
18188
18189                 fi
18190         fi
18191 else
18192         cf_with_ada=no
18193 fi
18194
18195 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18196 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18197 ###
18198 ### ticlib modules may be a separate library, otherwise contained in termlib.
18199 ### termlib modules may be a separate library, otherwise contained in ncurses.
18200 ###
18201 ### The of "+" or " " between the tokens controls the way the script
18202 ### chooses to split module lists into libraries.
18203 ###
18204 ### (see CF_LIB_RULES).
18205 echo "$as_me:18205: checking for library subsets" >&5
18206 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18207 LIB_SUBSETS=
18208
18209 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18210         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18211         if test "$with_ticlib" != no ; then
18212                 LIB_SUBSETS="${LIB_SUBSETS} "
18213         else
18214                 LIB_SUBSETS="${LIB_SUBSETS}+"
18215         fi
18216 fi
18217
18218 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18219 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18220
18221 if test "$with_termlib" != no ; then
18222         LIB_SUBSETS="${LIB_SUBSETS} "
18223 else
18224         LIB_SUBSETS="${LIB_SUBSETS}+"
18225 fi
18226
18227 LIB_SUBSETS="${LIB_SUBSETS}base"
18228
18229 # Most term-driver calls are to tinfo, but some like init_pair are to the
18230 # base library (so it resides in base).
18231 if test "$with_term_driver" != no ; then
18232         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18233         case $cf_cv_system_name in #(vi
18234         *mingw32*) #(vi
18235                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18236                 ;;
18237         *) #(vi
18238                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18239                 ;;
18240         esac
18241 fi
18242
18243 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18244 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18245
18246 echo "$as_me:18246: result: $LIB_SUBSETS" >&5
18247 echo "${ECHO_T}$LIB_SUBSETS" >&6
18248
18249 ### Construct the list of include-directories to be generated
18250
18251 CPPFLAGS="$CPPFLAGS -I. -I../include"
18252 if test "$srcdir" != "."; then
18253         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18254 fi
18255 if test "$GCC" != yes; then
18256         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18257 elif test "$includedir" != "/usr/include"; then
18258         if test "$includedir" = '${prefix}/include' ; then
18259                 if test $prefix != /usr ; then
18260                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18261                 fi
18262         else
18263                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18264         fi
18265 fi
18266
18267 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18268 if test "$srcdir" != "."; then
18269         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18270 fi
18271 if test "$GCC" != yes; then
18272         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18273 elif test "$includedir" != "/usr/include"; then
18274         if test "$includedir" = '${prefix}/include' ; then
18275                 if test $prefix != /usr ; then
18276                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18277                 fi
18278         else
18279                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18280         fi
18281 fi
18282
18283 ### Build up pieces for makefile rules
18284 echo "$as_me:18284: checking default library suffix" >&5
18285 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18286
18287         case $DFT_LWR_MODEL in
18288         libtool) DFT_ARG_SUFFIX=''   ;;
18289         normal)  DFT_ARG_SUFFIX=''   ;;
18290         debug)   DFT_ARG_SUFFIX='_g' ;;
18291         profile) DFT_ARG_SUFFIX='_p' ;;
18292         shared)  DFT_ARG_SUFFIX=''   ;;
18293         esac
18294         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18295 echo "$as_me:18295: result: $DFT_ARG_SUFFIX" >&5
18296 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18297
18298 echo "$as_me:18298: checking default library-dependency suffix" >&5
18299 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18300
18301         case $DFT_LWR_MODEL in #(vi
18302         libtool) #(vi
18303                 DFT_LIB_SUFFIX='.la'
18304                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18305                 ;;
18306         normal) #(vi
18307                 DFT_LIB_SUFFIX='.a'
18308                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18309                 ;;
18310         debug) #(vi
18311                 DFT_LIB_SUFFIX='_g.a'
18312                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18313                 ;;
18314         profile) #(vi
18315                 DFT_LIB_SUFFIX='_p.a'
18316                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18317                 ;;
18318         shared) #(vi
18319                 case $cf_cv_system_name in
18320                 aix[56]*) #(vi
18321                         DFT_LIB_SUFFIX='.a'
18322                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18323                         ;;
18324                 cygwin*) #(vi
18325                         DFT_LIB_SUFFIX='.dll'
18326                         DFT_DEP_SUFFIX='.dll.a'
18327                         ;;
18328                 darwin*) #(vi
18329                         DFT_LIB_SUFFIX='.dylib'
18330                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18331                         ;;
18332                 hpux*) #(vi
18333                         case $target in
18334                         ia64*) #(vi
18335                                 DFT_LIB_SUFFIX='.so'
18336                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18337                                 ;;
18338                         *) #(vi
18339                                 DFT_LIB_SUFFIX='.sl'
18340                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18341                                 ;;
18342                         esac
18343                         ;;
18344                 *)      DFT_LIB_SUFFIX='.so'
18345                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18346                         ;;
18347                 esac
18348         esac
18349         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18350         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18351 echo "$as_me:18351: result: $DFT_DEP_SUFFIX" >&5
18352 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18353
18354 echo "$as_me:18354: checking default object directory" >&5
18355 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18356
18357         case $DFT_LWR_MODEL in
18358         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18359         normal)  DFT_OBJ_SUBDIR='objects' ;;
18360         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18361         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18362         shared)
18363                 case $cf_cv_system_name in #(vi
18364                 cygwin) #(vi
18365                         DFT_OBJ_SUBDIR='objects' ;;
18366                 *)
18367                         DFT_OBJ_SUBDIR='obj_s' ;;
18368                 esac
18369         esac
18370 echo "$as_me:18370: result: $DFT_OBJ_SUBDIR" >&5
18371 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18372
18373 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18374 if test "$cf_with_cxx" = yes ; then
18375 echo "$as_me:18375: checking c++ library-dependency suffix" >&5
18376 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18377 if test "$with_libtool" != "no"; then
18378         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18379 else
18380
18381         case normal in #(vi
18382         libtool) #(vi
18383                 CXX_LIB_SUFFIX='.la'
18384                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18385                 ;;
18386         normal) #(vi
18387                 CXX_LIB_SUFFIX='.a'
18388                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18389                 ;;
18390         debug) #(vi
18391                 CXX_LIB_SUFFIX='_g.a'
18392                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18393                 ;;
18394         profile) #(vi
18395                 CXX_LIB_SUFFIX='_p.a'
18396                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18397                 ;;
18398         shared) #(vi
18399                 case $cf_cv_system_name in
18400                 aix[56]*) #(vi
18401                         CXX_LIB_SUFFIX='.a'
18402                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18403                         ;;
18404                 cygwin*) #(vi
18405                         CXX_LIB_SUFFIX='.dll'
18406                         CXX_DEP_SUFFIX='.dll.a'
18407                         ;;
18408                 darwin*) #(vi
18409                         CXX_LIB_SUFFIX='.dylib'
18410                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18411                         ;;
18412                 hpux*) #(vi
18413                         case $target in
18414                         ia64*) #(vi
18415                                 CXX_LIB_SUFFIX='.so'
18416                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18417                                 ;;
18418                         *) #(vi
18419                                 CXX_LIB_SUFFIX='.sl'
18420                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18421                                 ;;
18422                         esac
18423                         ;;
18424                 *)      CXX_LIB_SUFFIX='.so'
18425                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18426                         ;;
18427                 esac
18428         esac
18429         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18430         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18431 fi
18432 echo "$as_me:18432: result: $CXX_LIB_SUFFIX" >&5
18433 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18434
18435 fi
18436
18437 # do not want -ldl in build except as needed for -lncurses dependency
18438 if test "$with_dlsym" = yes ; then
18439 if test $DFT_LWR_MODEL = shared || \
18440    test $DFT_LWR_MODEL = libtool ; then
18441
18442 # remove dl library from $LIBS
18443 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18444
18445 fi
18446 fi
18447 ### Set up low-level terminfo dependencies for makefiles.
18448
18449 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18450 # do not need libdl
18451 TICS_LIST=
18452 if test "$with_dlsym" = yes ; then
18453
18454 # remove dl library from $SHLIB_LIST
18455 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18456
18457 fi
18458
18459 if test "$with_ticlib" != no ; then
18460
18461         if test "$with_ticlib" != yes ; then
18462                 TICS_NAME=$with_ticlib
18463                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18464                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18465                 TICS_LIB_SUFFIX="${with_ticlib}"
18466         else
18467                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18468                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18469                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18470         fi
18471         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18472 else
18473         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18474 fi
18475
18476 if test "$with_termlib" != no ; then
18477
18478         if test "$with_termlib" != yes ; then
18479                 TINFO_NAME=$with_termlib
18480                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18481                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18482                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18483                 TINFO_LIB_SUFFIX="${with_termlib}"
18484         else
18485                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18486                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18487                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18488                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18489         fi
18490
18491         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18492         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18493         if test "$DFT_LWR_MODEL" = "libtool"; then
18494                 TEST_ARGS="${TEST_DEPS}"
18495                 TEST_ARG2="${TEST_DEP2}"
18496                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18497                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18498                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18499         else
18500                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18501                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18502                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18503                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18504                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18505         fi
18506 else
18507         # the next lines are needed for linking libtic over libncurses
18508         TINFO_NAME=${LIB_NAME}
18509         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18510         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18511         if test "$with_tic_depends" = yes ; then
18512                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18513         else
18514                 TICS_LIST="$SHLIB_LIST"
18515         fi
18516
18517         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18518 fi
18519
18520 if test "$DFT_LWR_MODEL" = shared ; then
18521         case $cf_cv_system_name in #(vi
18522         cygwin*)
18523                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18524                 TINFO_SUFFIX=.dll
18525                 ;;
18526         esac
18527 fi
18528
18529 if test "$with_dlsym" = yes ; then
18530
18531 # remove dl library from $TICS_LIST
18532 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18533
18534 fi
18535
18536 if test "$DFT_LWR_MODEL" = "libtool"; then
18537     OBJEXT=lo
18538 fi
18539
18540 # needed for Ada95
18541 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18542
18543 case $DFT_LWR_MODEL in
18544 normal|debug|profile)
18545
18546 if test "$GCC" = yes ; then
18547         case $cf_cv_system_name in #(
18548         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18549                 LDFLAGS_STATIC=
18550                 LDFLAGS_SHARED=
18551                 ;;
18552     *)  #( normally, except when broken
18553         LDFLAGS_STATIC=-static
18554         LDFLAGS_SHARED=-dynamic
18555         ;;
18556     esac
18557 else
18558         case $cf_cv_system_name in #(
18559         aix[456]*)      #( from ld manpage
18560                 LDFLAGS_STATIC=-bstatic
18561                 LDFLAGS_SHARED=-bdynamic
18562                 ;;
18563         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18564                 # We could also use just "archive" and "shared".
18565                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18566                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18567                 ;;
18568         irix*)          #( from ld manpage IRIX64
18569                 LDFLAGS_STATIC=-Bstatic
18570                 LDFLAGS_SHARED=-Bdynamic
18571                 ;;
18572         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18573                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18574                 LDFLAGS_STATIC=-noso
18575                 LDFLAGS_SHARED=-so_archive
18576                 ;;
18577         solaris2*)
18578                 LDFLAGS_STATIC=-Bstatic
18579                 LDFLAGS_SHARED=-Bdynamic
18580                 ;;
18581         esac
18582 fi
18583
18584         ;;
18585 esac
18586
18587 echo "$as_me:18587: checking where we will install curses.h" >&5
18588 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18589 test "$with_overwrite" = no && \
18590 test "x$includedir" = 'x${prefix}/include' && \
18591         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18592 echo "$as_me:18592: result: $includedir" >&5
18593 echo "${ECHO_T}$includedir" >&6
18594
18595 ### Resolve a conflict between normal and wide-curses by forcing applications
18596 ### that will need libutf8 to add it to their configure script.
18597 if test "$with_overwrite" != no ; then
18598 if test "$NCURSES_LIBUTF8" = 1 ; then
18599         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18600         { echo "$as_me:18600: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18601 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18602 fi
18603 fi
18604 WITH_OVERWRITE=$with_overwrite
18605
18606 # used to separate tack out of the tree
18607 NCURSES_TREE=
18608
18609 ### predefined stuff for the test programs
18610 cat >>confdefs.h <<\EOF
18611 #define HAVE_SLK_COLOR 1
18612 EOF
18613
18614 ### Construct the list of subdirectories for which we'll customize makefiles
18615 ### with the appropriate compile-rules.
18616
18617 echo "$as_me:18617: checking for src modules" >&5
18618 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18619
18620 # dependencies and linker-arguments for test-programs
18621 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18622 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18623 if test "$DFT_LWR_MODEL" = "libtool"; then
18624         TEST_ARGS="${TEST_DEPS}"
18625         TEST_ARG2="${TEST_DEP2}"
18626 else
18627         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18628         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18629 fi
18630
18631 cf_cv_src_modules=
18632 for cf_dir in $modules_to_build
18633 do
18634         if test -f $srcdir/$cf_dir/modules; then
18635
18636                 # We may/may not have tack in the distribution, though the
18637                 # makefile is.
18638                 if test $cf_dir = tack ; then
18639                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18640                                 continue
18641                         fi
18642                 fi
18643
18644                 if test -z "$cf_cv_src_modules"; then
18645                         cf_cv_src_modules=$cf_dir
18646                 else
18647                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18648                 fi
18649
18650                 # Make the ncurses_cfg.h file record the library interface files as
18651                 # well.  These are header files that are the same name as their
18652                 # directory.  Ncurses is the only library that does not follow
18653                 # that pattern.
18654                 if test $cf_dir = tack ; then
18655                         continue
18656                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18657
18658 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18659
18660                         cat >>confdefs.h <<EOF
18661 #define HAVE_${cf_have_include}_H 1
18662 EOF
18663
18664                         cat >>confdefs.h <<EOF
18665 #define HAVE_LIB${cf_have_include} 1
18666 EOF
18667
18668                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18669                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18670                         if test "$DFT_LWR_MODEL" = "libtool"; then
18671                                 TEST_ARGS="${TEST_DEPS}"
18672                                 TEST_ARG2="${TEST_DEP2}"
18673                         else
18674                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18675                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18676                         fi
18677                 fi
18678         fi
18679 done
18680 echo "$as_me:18680: result: $cf_cv_src_modules" >&5
18681 echo "${ECHO_T}$cf_cv_src_modules" >&6
18682
18683 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18684 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18685
18686 SRC_SUBDIRS=
18687 if test "x$cf_with_manpages" != xno ; then
18688         SRC_SUBDIRS="$SRC_SUBDIRS man"
18689 fi
18690 SRC_SUBDIRS="$SRC_SUBDIRS include"
18691 for cf_dir in $cf_cv_src_modules
18692 do
18693         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18694 done
18695 SRC_SUBDIRS="$SRC_SUBDIRS test"
18696 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18697 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18698
18699 ADA_SUBDIRS=
18700 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18701         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18702         ADA_SUBDIRS="gen src samples"
18703 fi
18704
18705 SUB_MAKEFILES=
18706 for cf_dir in $SRC_SUBDIRS
18707 do
18708         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18709 done
18710
18711 if test -n "$ADA_SUBDIRS"; then
18712         for cf_dir in $ADA_SUBDIRS
18713         do
18714                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18715         done
18716
18717 fi
18718
18719 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18720    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18721    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18722 fi
18723
18724 DIRS_TO_MAKE="lib"
18725 for cf_item in $cf_list_models
18726 do
18727
18728         case $cf_item in
18729         libtool) cf_subdir='obj_lo'  ;;
18730         normal)  cf_subdir='objects' ;;
18731         debug)   cf_subdir='obj_g' ;;
18732         profile) cf_subdir='obj_p' ;;
18733         shared)
18734                 case $cf_cv_system_name in #(vi
18735                 cygwin) #(vi
18736                         cf_subdir='objects' ;;
18737                 *)
18738                         cf_subdir='obj_s' ;;
18739                 esac
18740         esac
18741
18742         for cf_item2 in $DIRS_TO_MAKE
18743         do
18744                 test $cf_item2 = $cf_subdir && break
18745         done
18746         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18747 done
18748 for cf_dir in $DIRS_TO_MAKE
18749 do
18750         test ! -d $cf_dir && mkdir $cf_dir
18751 done
18752
18753 # symbols that differ when compiling Ada95 by itself.
18754 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18755
18756 # values to use as strings
18757 cat >>confdefs.h <<EOF
18758 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18759 EOF
18760
18761 cat >>confdefs.h <<EOF
18762 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18763 EOF
18764
18765 ### Now that we're done running tests, add the compiler-warnings, if any
18766
18767 cf_fix_cppflags=no
18768 cf_new_cflags=
18769 cf_new_cppflags=
18770 cf_new_extra_cppflags=
18771
18772 for cf_add_cflags in $EXTRA_CFLAGS
18773 do
18774 case $cf_fix_cppflags in
18775 no)
18776         case $cf_add_cflags in #(vi
18777         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18778                 case $cf_add_cflags in
18779                 -D*)
18780                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18781
18782                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18783                                 && test -z "${cf_tst_cflags}" \
18784                                 && cf_fix_cppflags=yes
18785
18786                         if test $cf_fix_cppflags = yes ; then
18787                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18788                                 continue
18789                         elif test "${cf_tst_cflags}" = "\"'" ; then
18790                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18791                                 continue
18792                         fi
18793                         ;;
18794                 esac
18795                 case "$CPPFLAGS" in
18796                 *$cf_add_cflags) #(vi
18797                         ;;
18798                 *) #(vi
18799                         case $cf_add_cflags in #(vi
18800                         -D*)
18801                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18802
18803 CPPFLAGS=`echo "$CPPFLAGS" | \
18804         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18805                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18806
18807                                 ;;
18808                         esac
18809                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18810                         ;;
18811                 esac
18812                 ;;
18813         *)
18814                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18815                 ;;
18816         esac
18817         ;;
18818 yes)
18819         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18820
18821         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18822
18823         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18824                 && test -z "${cf_tst_cflags}" \
18825                 && cf_fix_cppflags=no
18826         ;;
18827 esac
18828 done
18829
18830 if test -n "$cf_new_cflags" ; then
18831
18832         CFLAGS="$CFLAGS $cf_new_cflags"
18833 fi
18834
18835 if test -n "$cf_new_cppflags" ; then
18836
18837         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18838 fi
18839
18840 if test -n "$cf_new_extra_cppflags" ; then
18841
18842         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18843 fi
18844
18845 ### Define substitutions for header files to avoid name-pollution
18846
18847 if test "$cf_cv_have_tcgetattr" = yes ; then
18848         HAVE_TCGETATTR=1
18849 else
18850         HAVE_TCGETATTR=0
18851 fi
18852
18853 if test "$ac_cv_header_termio_h" = yes ; then
18854         HAVE_TERMIO_H=1
18855 else
18856         HAVE_TERMIO_H=0
18857 fi
18858
18859 if test "$ac_cv_header_termios_h" = yes ; then
18860         HAVE_TERMIOS_H=1
18861 else
18862         HAVE_TERMIOS_H=0
18863 fi
18864
18865 ################################################################################
18866 test "$use_database" = yes && \
18867 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18868
18869 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18870 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18871
18872 if test x"$enable_pc_files" = xyes ; then \
18873 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18874 MAKE_PC_FILES=
18875 else
18876 MAKE_PC_FILES="#"
18877 fi
18878
18879 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_MAKEFILES Makefile"
18880 ac_config_commands="$ac_config_commands default"
18881 cat >confcache <<\_ACEOF
18882 # This file is a shell script that caches the results of configure
18883 # tests run on this system so they can be shared between configure
18884 # scripts and configure runs, see configure's option --config-cache.
18885 # It is not useful on other systems.  If it contains results you don't
18886 # want to keep, you may remove or edit it.
18887 #
18888 # config.status only pays attention to the cache file if you give it
18889 # the --recheck option to rerun configure.
18890 #
18891 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18892 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18893 # following values.
18894
18895 _ACEOF
18896
18897 # The following way of writing the cache mishandles newlines in values,
18898 # but we know of no workaround that is simple, portable, and efficient.
18899 # So, don't put newlines in cache variables' values.
18900 # Ultrix sh set writes to stderr and can't be redirected directly,
18901 # and sets the high bit in the cache file unless we assign to the vars.
18902 {
18903   (set) 2>&1 |
18904     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18905     *ac_space=\ *)
18906       # `set' does not quote correctly, so add quotes (double-quote
18907       # substitution turns \\\\ into \\, and sed turns \\ into \).
18908       sed -n \
18909         "s/'/'\\\\''/g;
18910           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18911       ;;
18912     *)
18913       # `set' quotes correctly as required by POSIX, so do not add quotes.
18914       sed -n \
18915         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18916       ;;
18917     esac;
18918 } |
18919   sed '
18920      t clear
18921      : clear
18922      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18923      t end
18924      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18925      : end' >>confcache
18926 if cmp -s $cache_file confcache; then :; else
18927   if test -w $cache_file; then
18928     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18929     cat confcache >$cache_file
18930   else
18931     echo "not updating unwritable cache $cache_file"
18932   fi
18933 fi
18934 rm -f confcache
18935
18936 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18937 # Let make expand exec_prefix.
18938 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18939
18940 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18941 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18942 # trailing colons and then remove the whole line if VPATH becomes empty
18943 # (actually we leave an empty line to preserve line numbers).
18944 if test "x$srcdir" = x.; then
18945   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18946 s/:*\$(srcdir):*/:/;
18947 s/:*\${srcdir}:*/:/;
18948 s/:*@srcdir@:*/:/;
18949 s/^\([^=]*=[    ]*\):*/\1/;
18950 s/:*$//;
18951 s/^[^=]*=[      ]*$//;
18952 }'
18953 fi
18954
18955 DEFS=-DHAVE_CONFIG_H
18956
18957 : ${CONFIG_STATUS=./config.status}
18958 ac_clean_files_save=$ac_clean_files
18959 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18960 { echo "$as_me:18960: creating $CONFIG_STATUS" >&5
18961 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18962 cat >$CONFIG_STATUS <<_ACEOF
18963 #! $SHELL
18964 # Generated automatically by configure.
18965 # Run this file to recreate the current configuration.
18966 # Compiler output produced by configure, useful for debugging
18967 # configure, is in config.log if it exists.
18968
18969 debug=false
18970 SHELL=\${CONFIG_SHELL-$SHELL}
18971 ac_cs_invocation="\$0 \$@"
18972
18973 _ACEOF
18974
18975 cat >>$CONFIG_STATUS <<\_ACEOF
18976 # Be Bourne compatible
18977 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18978   emulate sh
18979   NULLCMD=:
18980 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18981   set -o posix
18982 fi
18983
18984 # Name of the executable.
18985 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18986
18987 if expr a : '\(a\)' >/dev/null 2>&1; then
18988   as_expr=expr
18989 else
18990   as_expr=false
18991 fi
18992
18993 rm -f conf$$ conf$$.exe conf$$.file
18994 echo >conf$$.file
18995 if ln -s conf$$.file conf$$ 2>/dev/null; then
18996   # We could just check for DJGPP; but this test a) works b) is more generic
18997   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18998   if test -f conf$$.exe; then
18999     # Don't use ln at all; we don't have any links
19000     as_ln_s='cp -p'
19001   else
19002     as_ln_s='ln -s'
19003   fi
19004 elif ln conf$$.file conf$$ 2>/dev/null; then
19005   as_ln_s=ln
19006 else
19007   as_ln_s='cp -p'
19008 fi
19009 rm -f conf$$ conf$$.exe conf$$.file
19010
19011 as_executable_p="test -f"
19012
19013 # Support unset when possible.
19014 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19015   as_unset=unset
19016 else
19017   as_unset=false
19018 fi
19019
19020 # NLS nuisances.
19021 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19022 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19023 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19024 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19025 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19026 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19027 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19028 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19029
19030 # IFS
19031 # We need space, tab and new line, in precisely that order.
19032 as_nl='
19033 '
19034 IFS="   $as_nl"
19035
19036 # CDPATH.
19037 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19038
19039 exec 6>&1
19040
19041 _ACEOF
19042
19043 # Files that config.status was made for.
19044 if test -n "$ac_config_files"; then
19045   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19046 fi
19047
19048 if test -n "$ac_config_headers"; then
19049   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19050 fi
19051
19052 if test -n "$ac_config_links"; then
19053   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19054 fi
19055
19056 if test -n "$ac_config_commands"; then
19057   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19058 fi
19059
19060 cat >>$CONFIG_STATUS <<\EOF
19061
19062 ac_cs_usage="\
19063 \`$as_me' instantiates files from templates according to the
19064 current configuration.
19065
19066 Usage: $0 [OPTIONS] [FILE]...
19067
19068   -h, --help       print this help, then exit
19069   -V, --version    print version number, then exit
19070   -d, --debug      don't remove temporary files
19071       --recheck    update $as_me by reconfiguring in the same conditions
19072   --file=FILE[:TEMPLATE]
19073                    instantiate the configuration file FILE
19074   --header=FILE[:TEMPLATE]
19075                    instantiate the configuration header FILE
19076
19077 Configuration files:
19078 $config_files
19079
19080 Configuration headers:
19081 $config_headers
19082
19083 Configuration commands:
19084 $config_commands
19085
19086 Report bugs to <bug-autoconf@gnu.org>."
19087 EOF
19088
19089 cat >>$CONFIG_STATUS <<EOF
19090 ac_cs_version="\\
19091 config.status
19092 configured by $0, generated by GNU Autoconf 2.52.20100530,
19093   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19094
19095 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19096 Free Software Foundation, Inc.
19097 This config.status script is free software; the Free Software Foundation
19098 gives unlimited permission to copy, distribute and modify it."
19099 srcdir=$srcdir
19100 INSTALL="$INSTALL"
19101 EOF
19102
19103 cat >>$CONFIG_STATUS <<\EOF
19104 # If no file are specified by the user, then we need to provide default
19105 # value.  By we need to know if files were specified by the user.
19106 ac_need_defaults=:
19107 while test $# != 0
19108 do
19109   case $1 in
19110   --*=*)
19111     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19112     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19113     shift
19114     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19115     shift
19116     ;;
19117   -*);;
19118   *) # This is not an option, so the user has probably given explicit
19119      # arguments.
19120      ac_need_defaults=false;;
19121   esac
19122
19123   case $1 in
19124   # Handling of the options.
19125 EOF
19126 cat >>$CONFIG_STATUS <<EOF
19127   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19128     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19129     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19130 EOF
19131 cat >>$CONFIG_STATUS <<\EOF
19132   --version | --vers* | -V )
19133     echo "$ac_cs_version"; exit 0 ;;
19134   --he | --h)
19135     # Conflict between --help and --header
19136     { { echo "$as_me:19136: error: ambiguous option: $1
19137 Try \`$0 --help' for more information." >&5
19138 echo "$as_me: error: ambiguous option: $1
19139 Try \`$0 --help' for more information." >&2;}
19140    { (exit 1); exit 1; }; };;
19141   --help | --hel | -h )
19142     echo "$ac_cs_usage"; exit 0 ;;
19143   --debug | --d* | -d )
19144     debug=: ;;
19145   --file | --fil | --fi | --f )
19146     shift
19147     CONFIG_FILES="$CONFIG_FILES $1"
19148     ac_need_defaults=false;;
19149   --header | --heade | --head | --hea )
19150     shift
19151     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19152     ac_need_defaults=false;;
19153
19154   # This is an error.
19155   -*) { { echo "$as_me:19155: error: unrecognized option: $1
19156 Try \`$0 --help' for more information." >&5
19157 echo "$as_me: error: unrecognized option: $1
19158 Try \`$0 --help' for more information." >&2;}
19159    { (exit 1); exit 1; }; } ;;
19160
19161   *) ac_config_targets="$ac_config_targets $1" ;;
19162
19163   esac
19164   shift
19165 done
19166
19167 exec 5>>config.log
19168 cat >&5 << _ACEOF
19169
19170 ## ----------------------- ##
19171 ## Running config.status.  ##
19172 ## ----------------------- ##
19173
19174 This file was extended by $as_me 2.52.20100530, executed with
19175   CONFIG_FILES    = $CONFIG_FILES
19176   CONFIG_HEADERS  = $CONFIG_HEADERS
19177   CONFIG_LINKS    = $CONFIG_LINKS
19178   CONFIG_COMMANDS = $CONFIG_COMMANDS
19179   > $ac_cs_invocation
19180 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19181
19182 _ACEOF
19183 EOF
19184
19185 cat >>$CONFIG_STATUS <<EOF
19186 #
19187 # INIT-COMMANDS section.
19188 #
19189
19190 ### Special initialization commands, used to pass information from the
19191 ### configuration-run into config.status
19192
19193 AWK="$AWK"
19194 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19195 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19196 ECHO_LINK="$ECHO_LINK"
19197 LDCONFIG="$LDCONFIG"
19198 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19199 LIB_NAME="$LIB_NAME"
19200 LIB_SUBSETS="$LIB_SUBSETS"
19201 LIB_SUFFIX="$LIB_SUFFIX"
19202 LIB_TRACING="$LIB_TRACING"
19203 LN_S="$LN_S"
19204 MAKE_TERMINFO="$MAKE_TERMINFO"
19205 NCURSES_MAJOR="$NCURSES_MAJOR"
19206 NCURSES_MINOR="$NCURSES_MINOR"
19207 NCURSES_OSPEED="$NCURSES_OSPEED"
19208 NCURSES_PATCH="$NCURSES_PATCH"
19209 SRC_SUBDIRS="$SRC_SUBDIRS"
19210 TERMINFO="$TERMINFO"
19211 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19212 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19213 TICS_NAME="$TICS_NAME"
19214 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19215 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19216 TINFO_NAME="$TINFO_NAME"
19217 TINFO_SUFFIX="$TINFO_SUFFIX"
19218 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19219 WITH_CURSES_H="$with_curses_h"
19220 WITH_ECHO="$with_echo"
19221 WITH_OVERWRITE="$with_overwrite"
19222 cf_LIST_MODELS="$cf_list_models"
19223 cf_cv_abi_version="$cf_cv_abi_version"
19224 cf_cv_do_relink="$cf_cv_do_relink"
19225 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19226 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19227 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19228 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19229 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19230 cf_cv_rel_version="$cf_cv_rel_version"
19231 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19232 cf_cv_shared_soname='$cf_cv_shared_soname'
19233 cf_cv_shlib_version="$cf_cv_shlib_version"
19234 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19235 cf_cv_system_name="$cf_cv_system_name"
19236 cf_with_ada="$cf_with_ada"
19237 cf_with_cxx_binding="$cf_with_cxx_binding"
19238 cf_with_manpages="$cf_with_manpages"
19239 host="$host"
19240 target="$target"
19241
19242 EOF
19243
19244 cat >>$CONFIG_STATUS <<\EOF
19245 for ac_config_target in $ac_config_targets
19246 do
19247   case "$ac_config_target" in
19248   # Handling of arguments.
19249   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19250   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19251   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19252   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19253   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19254   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19255   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19256   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19257   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19258   *) { { echo "$as_me:19258: error: invalid argument: $ac_config_target" >&5
19259 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19260    { (exit 1); exit 1; }; };;
19261   esac
19262 done
19263
19264 # If the user did not use the arguments to specify the items to instantiate,
19265 # then the envvar interface is used.  Set only those that are not.
19266 # We use the long form for the default assignment because of an extremely
19267 # bizarre bug on SunOS 4.1.3.
19268 if $ac_need_defaults; then
19269   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19270   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19271   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19272 fi
19273
19274 # Create a temporary directory, and hook for its removal unless debugging.
19275 $debug ||
19276 {
19277   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19278   trap '{ (exit 1); exit 1; }' 1 2 13 15
19279 }
19280
19281 # Create a (secure) tmp directory for tmp files.
19282 : ${TMPDIR=/tmp}
19283 {
19284   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19285   test -n "$tmp" && test -d "$tmp"
19286 }  ||
19287 {
19288   tmp=$TMPDIR/cs$$-$RANDOM
19289   (umask 077 && mkdir $tmp)
19290 } ||
19291 {
19292    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19293    { (exit 1); exit 1; }
19294 }
19295
19296 EOF
19297
19298 cat >>$CONFIG_STATUS <<EOF
19299
19300 #
19301 # CONFIG_FILES section.
19302 #
19303
19304 # No need to generate the scripts if there are no CONFIG_FILES.
19305 # This happens for instance when ./config.status config.h
19306 if test -n "\$CONFIG_FILES"; then
19307   # Protect against being on the right side of a sed subst in config.status.
19308   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19309    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19310 s,@SHELL@,$SHELL,;t t
19311 s,@exec_prefix@,$exec_prefix,;t t
19312 s,@prefix@,$prefix,;t t
19313 s,@program_transform_name@,$program_transform_name,;t t
19314 s,@bindir@,$bindir,;t t
19315 s,@sbindir@,$sbindir,;t t
19316 s,@libexecdir@,$libexecdir,;t t
19317 s,@datadir@,$datadir,;t t
19318 s,@sysconfdir@,$sysconfdir,;t t
19319 s,@sharedstatedir@,$sharedstatedir,;t t
19320 s,@localstatedir@,$localstatedir,;t t
19321 s,@libdir@,$libdir,;t t
19322 s,@includedir@,$includedir,;t t
19323 s,@oldincludedir@,$oldincludedir,;t t
19324 s,@infodir@,$infodir,;t t
19325 s,@mandir@,$mandir,;t t
19326 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19327 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19328 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19329 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19330 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19331 s,@build_alias@,$build_alias,;t t
19332 s,@host_alias@,$host_alias,;t t
19333 s,@target_alias@,$target_alias,;t t
19334 s,@ECHO_C@,$ECHO_C,;t t
19335 s,@ECHO_N@,$ECHO_N,;t t
19336 s,@ECHO_T@,$ECHO_T,;t t
19337 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19338 s,@DEFS@,$DEFS,;t t
19339 s,@LIBS@,$LIBS,;t t
19340 s,@top_builddir@,$top_builddir,;t t
19341 s,@EGREP@,$EGREP,;t t
19342 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19343 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19344 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19345 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19346 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19347 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19348 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19349 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19350 s,@build@,$build,;t t
19351 s,@build_cpu@,$build_cpu,;t t
19352 s,@build_vendor@,$build_vendor,;t t
19353 s,@build_os@,$build_os,;t t
19354 s,@host@,$host,;t t
19355 s,@host_cpu@,$host_cpu,;t t
19356 s,@host_vendor@,$host_vendor,;t t
19357 s,@host_os@,$host_os,;t t
19358 s,@target@,$target,;t t
19359 s,@target_cpu@,$target_cpu,;t t
19360 s,@target_vendor@,$target_vendor,;t t
19361 s,@target_os@,$target_os,;t t
19362 s,@CC@,$CC,;t t
19363 s,@CFLAGS@,$CFLAGS,;t t
19364 s,@LDFLAGS@,$LDFLAGS,;t t
19365 s,@CPPFLAGS@,$CPPFLAGS,;t t
19366 s,@ac_ct_CC@,$ac_ct_CC,;t t
19367 s,@EXEEXT@,$EXEEXT,;t t
19368 s,@OBJEXT@,$OBJEXT,;t t
19369 s,@CPP@,$CPP,;t t
19370 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19371 s,@PROG_EXT@,$PROG_EXT,;t t
19372 s,@LDCONFIG@,$LDCONFIG,;t t
19373 s,@CXX@,$CXX,;t t
19374 s,@CXXFLAGS@,$CXXFLAGS,;t t
19375 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19376 s,@AWK@,$AWK,;t t
19377 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19378 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19379 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19380 s,@LINT@,$LINT,;t t
19381 s,@LINT_OPTS@,$LINT_OPTS,;t t
19382 s,@LN_S@,$LN_S,;t t
19383 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19384 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19385 s,@SET_MAKE@,$SET_MAKE,;t t
19386 s,@CTAGS@,$CTAGS,;t t
19387 s,@ETAGS@,$ETAGS,;t t
19388 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19389 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19390 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19391 s,@RANLIB@,$RANLIB,;t t
19392 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19393 s,@LD@,$LD,;t t
19394 s,@ac_ct_LD@,$ac_ct_LD,;t t
19395 s,@AR@,$AR,;t t
19396 s,@ac_ct_AR@,$ac_ct_AR,;t t
19397 s,@ARFLAGS@,$ARFLAGS,;t t
19398 s,@DESTDIR@,$DESTDIR,;t t
19399 s,@BUILD_CC@,$BUILD_CC,;t t
19400 s,@BUILD_CPP@,$BUILD_CPP,;t t
19401 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19402 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19403 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19404 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19405 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19406 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19407 s,@cf_list_models@,$cf_list_models,;t t
19408 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19409 s,@LIBTOOL@,$LIBTOOL,;t t
19410 s,@LT_UNDEF@,$LT_UNDEF,;t t
19411 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19412 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19413 s,@LIB_CREATE@,$LIB_CREATE,;t t
19414 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19415 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19416 s,@LIB_PREP@,$LIB_PREP,;t t
19417 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19418 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19419 s,@LIB_LINK@,$LIB_LINK,;t t
19420 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19421 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19422 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19423 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19424 s,@TICS_NAME@,$TICS_NAME,;t t
19425 s,@TINFO_NAME@,$TINFO_NAME,;t t
19426 s,@LIB_NAME@,$LIB_NAME,;t t
19427 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19428 s,@CC_G_OPT@,$CC_G_OPT,;t t
19429 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19430 s,@LD_MODEL@,$LD_MODEL,;t t
19431 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19432 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19433 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19434 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19435 s,@LINK_PROGS@,$LINK_PROGS,;t t
19436 s,@LINK_TESTS@,$LINK_TESTS,;t t
19437 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19438 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19439 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19440 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19441 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19442 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19443 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19444 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19445 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19446 s,@TERMINFO@,$TERMINFO,;t t
19447 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19448 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19449 s,@TERMPATH@,$TERMPATH,;t t
19450 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19451 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19452 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19453 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19454 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19455 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19456 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19457 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19458 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19459 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19460 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19461 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19462 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19463 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19464 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19465 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19466 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19467 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19468 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19469 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19470 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19471 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19472 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19473 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19474 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19475 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19476 s,@PTHREAD@,$PTHREAD,;t t
19477 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19478 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19479 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19480 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19481 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19482 s,@ECHO_LINK@,$ECHO_LINK,;t t
19483 s,@ADAFLAGS@,$ADAFLAGS,;t t
19484 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19485 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19486 s,@ADA_TRACE@,$ADA_TRACE,;t t
19487 s,@MATH_LIB@,$MATH_LIB,;t t
19488 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19489 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19490 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19491 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19492 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19493 s,@TEST_LIBS@,$TEST_LIBS,;t t
19494 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19495 s,@CXXCPP@,$CXXCPP,;t t
19496 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19497 s,@CXX_AR@,$CXX_AR,;t t
19498 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19499 s,@CXXLIBS@,$CXXLIBS,;t t
19500 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19501 s,@gnat_exists@,$gnat_exists,;t t
19502 s,@cf_compile_generics@,$cf_compile_generics,;t t
19503 s,@cf_generic_objects@,$cf_generic_objects,;t t
19504 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
19505 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
19506 s,@M4_exists@,$M4_exists,;t t
19507 s,@cf_ada_make@,$cf_ada_make,;t t
19508 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19509 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19510 s,@cf_ada_package@,$cf_ada_package,;t t
19511 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19512 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19513 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
19514 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
19515 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19516 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19517 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19518 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19519 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19520 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19521 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19522 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19523 s,@TICS_ARGS@,$TICS_ARGS,;t t
19524 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19525 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19526 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19527 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19528 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19529 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19530 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19531 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19532 s,@TICS_LIST@,$TICS_LIST,;t t
19533 s,@TINFO_LIST@,$TINFO_LIST,;t t
19534 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19535 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19536 s,@TEST_ARGS@,$TEST_ARGS,;t t
19537 s,@TEST_DEPS@,$TEST_DEPS,;t t
19538 s,@TEST_ARG2@,$TEST_ARG2,;t t
19539 s,@TEST_DEP2@,$TEST_DEP2,;t t
19540 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19541 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19542 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19543 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19544 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19545 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19546 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19547 s,@cross_compiling@,$cross_compiling,;t t
19548 CEOF
19549
19550 EOF
19551
19552   cat >>$CONFIG_STATUS <<\EOF
19553   # Split the substitutions into bite-sized pieces for seds with
19554   # small command number limits, like on Digital OSF/1 and HP-UX.
19555   ac_max_sed_lines=48
19556   ac_sed_frag=1 # Number of current file.
19557   ac_beg=1 # First line for current file.
19558   ac_end=$ac_max_sed_lines # Line after last line for current file.
19559   ac_more_lines=:
19560   ac_sed_cmds=
19561   while $ac_more_lines; do
19562     if test $ac_beg -gt 1; then
19563       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19564     else
19565       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19566     fi
19567     if test ! -s $tmp/subs.frag; then
19568       ac_more_lines=false
19569     else
19570       # The purpose of the label and of the branching condition is to
19571       # speed up the sed processing (if there are no `@' at all, there
19572       # is no need to browse any of the substitutions).
19573       # These are the two extra sed commands mentioned above.
19574       (echo ':t
19575   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19576       if test -z "$ac_sed_cmds"; then
19577         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19578       else
19579         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19580       fi
19581       ac_sed_frag=`expr $ac_sed_frag + 1`
19582       ac_beg=$ac_end
19583       ac_end=`expr $ac_end + $ac_max_sed_lines`
19584     fi
19585   done
19586   if test -z "$ac_sed_cmds"; then
19587     ac_sed_cmds=cat
19588   fi
19589 fi # test -n "$CONFIG_FILES"
19590
19591 EOF
19592 cat >>$CONFIG_STATUS <<\EOF
19593 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19594   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19595   case $ac_file in
19596   - | *:- | *:-:* ) # input from stdin
19597         cat >$tmp/stdin
19598         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19599         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19600   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19601         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19602   * )   ac_file_in=$ac_file.in ;;
19603   esac
19604
19605   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19606   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19607          X"$ac_file" : 'X\(//\)[^/]' \| \
19608          X"$ac_file" : 'X\(//\)$' \| \
19609          X"$ac_file" : 'X\(/\)' \| \
19610          .     : '\(.\)' 2>/dev/null ||
19611 echo X"$ac_file" |
19612     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19613           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19614           /^X\(\/\/\)$/{ s//\1/; q; }
19615           /^X\(\/\).*/{ s//\1/; q; }
19616           s/.*/./; q'`
19617   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19618     { case "$ac_dir" in
19619   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19620   *)                      as_incr_dir=.;;
19621 esac
19622 as_dummy="$ac_dir"
19623 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19624   case $as_mkdir_dir in
19625     # Skip DOS drivespec
19626     ?:) as_incr_dir=$as_mkdir_dir ;;
19627     *)
19628       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19629       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19630     ;;
19631   esac
19632 done; }
19633
19634     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19635     # A "../" for each directory in $ac_dir_suffix.
19636     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19637   else
19638     ac_dir_suffix= ac_dots=
19639   fi
19640
19641   case $srcdir in
19642   .)  ac_srcdir=.
19643       if test -z "$ac_dots"; then
19644          ac_top_srcdir=.
19645       else
19646          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19647       fi ;;
19648   [\\/]* | ?:[\\/]* )
19649       ac_srcdir=$srcdir$ac_dir_suffix;
19650       ac_top_srcdir=$srcdir ;;
19651   *) # Relative path.
19652     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19653     ac_top_srcdir=$ac_dots$srcdir ;;
19654   esac
19655
19656   case $INSTALL in
19657   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19658   *) ac_INSTALL=$ac_dots$INSTALL ;;
19659   esac
19660
19661   if test x"$ac_file" != x-; then
19662     { echo "$as_me:19662: creating $ac_file" >&5
19663 echo "$as_me: creating $ac_file" >&6;}
19664     rm -f "$ac_file"
19665   fi
19666   # Let's still pretend it is `configure' which instantiates (i.e., don't
19667   # use $as_me), people would be surprised to read:
19668   #    /* config.h.  Generated automatically by config.status.  */
19669   configure_input="Generated automatically from `echo $ac_file_in |
19670                                                  sed 's,.*/,,'` by configure."
19671
19672   # First look for the input files in the build tree, otherwise in the
19673   # src tree.
19674   ac_file_inputs=`IFS=:
19675     for f in $ac_file_in; do
19676       case $f in
19677       -) echo $tmp/stdin ;;
19678       [\\/$]*)
19679          # Absolute (can't be DOS-style, as IFS=:)
19680          test -f "$f" || { { echo "$as_me:19680: error: cannot find input file: $f" >&5
19681 echo "$as_me: error: cannot find input file: $f" >&2;}
19682    { (exit 1); exit 1; }; }
19683          echo $f;;
19684       *) # Relative
19685          if test -f "$f"; then
19686            # Build tree
19687            echo $f
19688          elif test -f "$srcdir/$f"; then
19689            # Source tree
19690            echo $srcdir/$f
19691          else
19692            # /dev/null tree
19693            { { echo "$as_me:19693: error: cannot find input file: $f" >&5
19694 echo "$as_me: error: cannot find input file: $f" >&2;}
19695    { (exit 1); exit 1; }; }
19696          fi;;
19697       esac
19698     done` || { (exit 1); exit 1; }
19699 EOF
19700 cat >>$CONFIG_STATUS <<EOF
19701   sed "$ac_vpsub
19702 $extrasub
19703 EOF
19704 cat >>$CONFIG_STATUS <<\EOF
19705 :t
19706 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19707 s,@configure_input@,$configure_input,;t t
19708 s,@srcdir@,$ac_srcdir,;t t
19709 s,@top_srcdir@,$ac_top_srcdir,;t t
19710 s,@INSTALL@,$ac_INSTALL,;t t
19711 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19712   rm -f $tmp/stdin
19713   if test x"$ac_file" != x-; then
19714     mv $tmp/out $ac_file
19715   else
19716     cat $tmp/out
19717     rm -f $tmp/out
19718   fi
19719
19720 done
19721 EOF
19722 cat >>$CONFIG_STATUS <<\EOF
19723
19724 #
19725 # CONFIG_HEADER section.
19726 #
19727
19728 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19729 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19730 #
19731 # ac_d sets the value in "#define NAME VALUE" lines.
19732 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19733 ac_dB='[        ].*$,\1#\2'
19734 ac_dC=' '
19735 ac_dD=',;t'
19736 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19737 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19738 ac_iB='\([      ]\),\1#\2define\3'
19739 ac_iC=' '
19740 ac_iD='\4,;t'
19741 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19742 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19743 ac_uB='$,\1#\2define\3'
19744 ac_uC=' '
19745 ac_uD=',;t'
19746
19747 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19748   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19749   case $ac_file in
19750   - | *:- | *:-:* ) # input from stdin
19751         cat >$tmp/stdin
19752         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19753         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19754   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19755         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19756   * )   ac_file_in=$ac_file.in ;;
19757   esac
19758
19759   test x"$ac_file" != x- && { echo "$as_me:19759: creating $ac_file" >&5
19760 echo "$as_me: creating $ac_file" >&6;}
19761
19762   # First look for the input files in the build tree, otherwise in the
19763   # src tree.
19764   ac_file_inputs=`IFS=:
19765     for f in $ac_file_in; do
19766       case $f in
19767       -) echo $tmp/stdin ;;
19768       [\\/$]*)
19769          # Absolute (can't be DOS-style, as IFS=:)
19770          test -f "$f" || { { echo "$as_me:19770: error: cannot find input file: $f" >&5
19771 echo "$as_me: error: cannot find input file: $f" >&2;}
19772    { (exit 1); exit 1; }; }
19773          echo $f;;
19774       *) # Relative
19775          if test -f "$f"; then
19776            # Build tree
19777            echo $f
19778          elif test -f "$srcdir/$f"; then
19779            # Source tree
19780            echo $srcdir/$f
19781          else
19782            # /dev/null tree
19783            { { echo "$as_me:19783: error: cannot find input file: $f" >&5
19784 echo "$as_me: error: cannot find input file: $f" >&2;}
19785    { (exit 1); exit 1; }; }
19786          fi;;
19787       esac
19788     done` || { (exit 1); exit 1; }
19789   # Remove the trailing spaces.
19790   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19791
19792 EOF
19793
19794 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19795 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19796 # be either 'cat' or 'sort'.
19797 cat confdefs.h | uniq >conftest.vals
19798
19799 # Break up conftest.vals because some shells have a limit on
19800 # the size of here documents, and old seds have small limits too.
19801
19802 rm -f conftest.tail
19803 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19804 while grep . conftest.vals >/dev/null
19805 do
19806   # Write chunks of a limited-size here document to conftest.frag.
19807   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19808   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19809   echo 'CEOF' >> $CONFIG_STATUS
19810   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19811   rm -f conftest.vals
19812   mv conftest.tail conftest.vals
19813 done
19814 rm -f conftest.vals
19815
19816 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19817 # marker @DEFS@.
19818 echo '  cat >> conftest.edit <<CEOF
19819 /@DEFS@/r conftest.frag
19820 /@DEFS@/d
19821 CEOF
19822 sed -f conftest.edit $tmp/in > $tmp/out
19823 rm -f $tmp/in
19824 mv $tmp/out $tmp/in
19825 rm -f conftest.edit conftest.frag
19826 ' >> $CONFIG_STATUS
19827
19828 cat >>$CONFIG_STATUS <<\EOF
19829   # Let's still pretend it is `configure' which instantiates (i.e., don't
19830   # use $as_me), people would be surprised to read:
19831   #    /* config.h.  Generated automatically by config.status.  */
19832   if test x"$ac_file" = x-; then
19833     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19834   else
19835     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19836   fi
19837   cat $tmp/in >>$tmp/config.h
19838   rm -f $tmp/in
19839   if test x"$ac_file" != x-; then
19840     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19841       { echo "$as_me:19841: $ac_file is unchanged" >&5
19842 echo "$as_me: $ac_file is unchanged" >&6;}
19843     else
19844       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19845          X"$ac_file" : 'X\(//\)[^/]' \| \
19846          X"$ac_file" : 'X\(//\)$' \| \
19847          X"$ac_file" : 'X\(/\)' \| \
19848          .     : '\(.\)' 2>/dev/null ||
19849 echo X"$ac_file" |
19850     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19851           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19852           /^X\(\/\/\)$/{ s//\1/; q; }
19853           /^X\(\/\).*/{ s//\1/; q; }
19854           s/.*/./; q'`
19855       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19856         { case "$ac_dir" in
19857   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19858   *)                      as_incr_dir=.;;
19859 esac
19860 as_dummy="$ac_dir"
19861 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19862   case $as_mkdir_dir in
19863     # Skip DOS drivespec
19864     ?:) as_incr_dir=$as_mkdir_dir ;;
19865     *)
19866       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19867       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19868     ;;
19869   esac
19870 done; }
19871
19872       fi
19873       rm -f $ac_file
19874       mv $tmp/config.h $ac_file
19875     fi
19876   else
19877     cat $tmp/config.h
19878     rm -f $tmp/config.h
19879   fi
19880 done
19881 EOF
19882 cat >>$CONFIG_STATUS <<\EOF
19883 #
19884 # CONFIG_COMMANDS section.
19885 #
19886 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19887   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19888   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19889
19890   case $ac_dest in
19891     default )
19892
19893 for cf_dir in test
19894 do
19895         if test ! -d $srcdir/$cf_dir; then
19896                 continue
19897         elif test -f $srcdir/$cf_dir/programs; then
19898                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19899         fi
19900 done
19901
19902         case $cf_cv_system_name in #(vi
19903         OS/2*|os2*) #(vi
19904         LIB_PREFIX=''
19905         ;;
19906         *)      LIB_PREFIX='lib'
19907         ;;
19908         esac
19909 cf_prefix=$LIB_PREFIX
19910
19911 if test $cf_cv_shlib_version = cygdll ; then
19912         TINFO_NAME=$TINFO_ARG_SUFFIX
19913         TINFO_SUFFIX=.dll
19914 fi
19915
19916 for cf_dir in $SRC_SUBDIRS
19917 do
19918         if test ! -d $srcdir/$cf_dir ; then
19919                 continue
19920         elif test -f $srcdir/$cf_dir/modules; then
19921
19922                 SHARED_LIB=
19923                 LIBS_TO_MAKE=
19924                 for cf_item in $cf_LIST_MODELS
19925                 do
19926
19927         case $cf_item in #(vi
19928         libtool) #(vi
19929                 cf_suffix='.la'
19930                 cf_depsuf=$cf_suffix
19931                 ;;
19932         normal) #(vi
19933                 cf_suffix='.a'
19934                 cf_depsuf=$cf_suffix
19935                 ;;
19936         debug) #(vi
19937                 cf_suffix='_g.a'
19938                 cf_depsuf=$cf_suffix
19939                 ;;
19940         profile) #(vi
19941                 cf_suffix='_p.a'
19942                 cf_depsuf=$cf_suffix
19943                 ;;
19944         shared) #(vi
19945                 case $cf_cv_system_name in
19946                 aix[56]*) #(vi
19947                         cf_suffix='.a'
19948                         cf_depsuf=$cf_suffix
19949                         ;;
19950                 cygwin*) #(vi
19951                         cf_suffix='.dll'
19952                         cf_depsuf='.dll.a'
19953                         ;;
19954                 darwin*) #(vi
19955                         cf_suffix='.dylib'
19956                         cf_depsuf=$cf_suffix
19957                         ;;
19958                 hpux*) #(vi
19959                         case $target in
19960                         ia64*) #(vi
19961                                 cf_suffix='.so'
19962                                 cf_depsuf=$cf_suffix
19963                                 ;;
19964                         *) #(vi
19965                                 cf_suffix='.sl'
19966                                 cf_depsuf=$cf_suffix
19967                                 ;;
19968                         esac
19969                         ;;
19970                 *)      cf_suffix='.so'
19971                         cf_depsuf=$cf_suffix
19972                         ;;
19973                 esac
19974         esac
19975         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19976         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19977
19978                         if test $cf_item = shared ; then
19979                         if test "$cf_cv_do_symlinks" = yes ; then
19980                                 case "$cf_cv_shlib_version" in #(vi
19981                                 rel) #(vi
19982                                         case "$cf_cv_system_name" in #(vi
19983                                         darwin*)
19984                                         case .${LIB_SUFFIX} in
19985                                         .w*)
19986                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19987                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19988                                                 ;;
19989                                         *)
19990                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19991                                                 ;;
19992                                         esac
19993                                         ;; #(vi
19994                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19995                                         esac
19996                                         ;;
19997                                 abi)
19998                                         case "$cf_cv_system_name" in #(vi
19999                                         darwin*)
20000                                         case .${LIB_SUFFIX} in
20001                                         .w*)
20002                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20003                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20004                                                 ;;
20005                                         *)
20006                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20007                                                 ;;
20008                                         esac
20009                                         ;; #(vi
20010                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20011                                         esac
20012                                         ;;
20013                                 esac
20014                         fi
20015                         # cygwin needs import library, and has unique naming convention
20016                         # use autodetected ${cf_prefix} for import lib and static lib, but
20017                         # use 'cyg' prefix for shared lib.
20018                         if test $cf_cv_shlib_version = cygdll ; then
20019                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20020                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20021                                 continue
20022                         fi
20023                         fi
20024                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20025                 done
20026
20027                 if test $cf_dir = ncurses ; then
20028                         cf_subsets="$LIB_SUBSETS"
20029                         cf_r_parts="$cf_subsets"
20030                         cf_liblist="$LIBS_TO_MAKE"
20031
20032                         while test -n "$cf_r_parts"
20033                         do
20034                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20035                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20036                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20037                                         cf_item=
20038                                         case $cf_l_parts in #(vi
20039                                         *termlib*) #(vi
20040                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20041                                                 ;;
20042                                         *ticlib*)
20043                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20044                                                 ;;
20045                                         *)
20046                                                 break
20047                                                 ;;
20048                                         esac
20049                                         if test -n "$cf_item"; then
20050                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20051                                         fi
20052                                 else
20053                                         break
20054                                 fi
20055                         done
20056                 else
20057                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20058                 fi
20059
20060                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20061                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20062                         $cf_dir/Makefile >$cf_dir/Makefile.out
20063                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20064
20065                 $AWK -f $srcdir/mk-0th.awk \
20066                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20067                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20068
20069                 for cf_subset in $cf_subsets
20070                 do
20071                         cf_subdirs=
20072                         for cf_item in $cf_LIST_MODELS
20073                         do
20074                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20075
20076 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20077
20078         case $cf_item in #(vi
20079         libtool) #(vi
20080                 cf_suffix='.la'
20081                 cf_depsuf=$cf_suffix
20082                 ;;
20083         normal) #(vi
20084                 cf_suffix='.a'
20085                 cf_depsuf=$cf_suffix
20086                 ;;
20087         debug) #(vi
20088                 cf_suffix='_g.a'
20089                 cf_depsuf=$cf_suffix
20090                 ;;
20091         profile) #(vi
20092                 cf_suffix='_p.a'
20093                 cf_depsuf=$cf_suffix
20094                 ;;
20095         shared) #(vi
20096                 case $cf_cv_system_name in
20097                 aix[56]*) #(vi
20098                         cf_suffix='.a'
20099                         cf_depsuf=$cf_suffix
20100                         ;;
20101                 cygwin*) #(vi
20102                         cf_suffix='.dll'
20103                         cf_depsuf='.dll.a'
20104                         ;;
20105                 darwin*) #(vi
20106                         cf_suffix='.dylib'
20107                         cf_depsuf=$cf_suffix
20108                         ;;
20109                 hpux*) #(vi
20110                         case $target in
20111                         ia64*) #(vi
20112                                 cf_suffix='.so'
20113                                 cf_depsuf=$cf_suffix
20114                                 ;;
20115                         *) #(vi
20116                                 cf_suffix='.sl'
20117                                 cf_depsuf=$cf_suffix
20118                                 ;;
20119                         esac
20120                         ;;
20121                 *)      cf_suffix='.so'
20122                         cf_depsuf=$cf_suffix
20123                         ;;
20124                 esac
20125         esac
20126         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20127         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20128
20129         case $cf_item in
20130         libtool) cf_subdir='obj_lo'  ;;
20131         normal)  cf_subdir='objects' ;;
20132         debug)   cf_subdir='obj_g' ;;
20133         profile) cf_subdir='obj_p' ;;
20134         shared)
20135                 case $cf_cv_system_name in #(vi
20136                 cygwin) #(vi
20137                         cf_subdir='objects' ;;
20138                 *)
20139                         cf_subdir='obj_s' ;;
20140                 esac
20141         esac
20142
20143                         # Test for case where we build libtinfo with a different name.
20144                         cf_libname=$cf_dir
20145                         if test $cf_dir = ncurses ; then
20146                                 case $cf_subset in
20147                                 *base*)
20148                                         cf_libname=${cf_libname}$LIB_SUFFIX
20149                                         ;;
20150                                 *termlib*)
20151                                         cf_libname=$TINFO_LIB_SUFFIX
20152                                         ;;
20153                                 ticlib*)
20154                                         cf_libname=$TICS_LIB_SUFFIX
20155                                         ;;
20156                                 esac
20157                         else
20158                                 cf_libname=${cf_libname}$LIB_SUFFIX
20159                         fi
20160                         if test -n "${DFT_ARG_SUFFIX}" ; then
20161                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20162                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20163                         fi
20164
20165                         # These dependencies really are for development, not
20166                         # builds, but they are useful in porting, too.
20167                         cf_depend="../include/ncurses_cfg.h"
20168                         if test "$srcdir" = "."; then
20169                                 cf_reldir="."
20170                         else
20171                                 cf_reldir="\${srcdir}"
20172                         fi
20173
20174                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20175                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20176                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20177                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20178                         fi
20179
20180                         cf_dir_suffix=
20181                         old_cf_suffix="$cf_suffix"
20182                         if test "$cf_cv_shlib_version_infix" = yes ; then
20183                         if test -n "$LIB_SUFFIX" ; then
20184                                 case $LIB_SUFFIX in
20185                                 w*)
20186                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20187                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20188                                         cf_dir_suffix=w
20189                                         ;;
20190                                 esac
20191                         fi
20192                         fi
20193
20194                         $AWK -f $srcdir/mk-1st.awk \
20195                                 name=${cf_libname}${cf_dir_suffix} \
20196                                 traces=$LIB_TRACING \
20197                                 MODEL=$cf_ITEM \
20198                                 model=$cf_subdir \
20199                                 prefix=$cf_prefix \
20200                                 suffix=$cf_suffix \
20201                                 subset=$cf_subset \
20202                                 SymLink="$LN_S" \
20203                                 TermlibRoot=$TINFO_NAME \
20204                                 TermlibSuffix=$TINFO_SUFFIX \
20205                                 ShlibVer=$cf_cv_shlib_version \
20206                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20207                                 ReLink=${cf_cv_do_relink-no} \
20208                                 DoLinks=$cf_cv_do_symlinks \
20209                                 rmSoLocs=$cf_cv_rm_so_locs \
20210                                 ldconfig="$LDCONFIG" \
20211                                 overwrite=$WITH_OVERWRITE \
20212                                 depend="$cf_depend" \
20213                                 host="$host" \
20214                                 libtool_version="$LIBTOOL_VERSION" \
20215                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20216
20217                         cf_suffix="$old_cf_suffix"
20218
20219                         for cf_subdir2 in $cf_subdirs lib
20220                         do
20221                                 test $cf_subdir = $cf_subdir2 && break
20222                         done
20223                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20224                         $AWK -f $srcdir/mk-2nd.awk \
20225                                 name=$cf_dir \
20226                                 traces=$LIB_TRACING \
20227                                 MODEL=$cf_ITEM \
20228                                 model=$cf_subdir \
20229                                 subset=$cf_subset \
20230                                 srcdir=$srcdir \
20231                                 echo=$WITH_ECHO \
20232                                 crenames=$cf_cv_prog_CC_c_o \
20233                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20234                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20235                         cf_subdirs="$cf_subdirs $cf_subdir"
20236                         done
20237                 done
20238         fi
20239
20240         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20241 done
20242
20243 for cf_dir in $SRC_SUBDIRS
20244 do
20245         if test ! -d $srcdir/$cf_dir ; then
20246                 continue
20247         fi
20248
20249         if test -f $cf_dir/Makefile ; then
20250                 case "$cf_dir" in
20251                 Ada95) #(vi
20252                         echo 'libs \' >> Makefile
20253                         echo 'install.libs \' >> Makefile
20254                         echo 'uninstall.libs ::' >> Makefile
20255                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20256                         ;;
20257                 esac
20258         fi
20259
20260         if test -f $srcdir/$cf_dir/modules; then
20261                 echo >> Makefile
20262                 if test -f $srcdir/$cf_dir/headers; then
20263 cat >> Makefile <<CF_EOF
20264 install.includes \\
20265 uninstall.includes \\
20266 CF_EOF
20267                 fi
20268 if test "$cf_dir" != "c++" ; then
20269 echo 'lint \' >> Makefile
20270 fi
20271 cat >> Makefile <<CF_EOF
20272 libs \\
20273 lintlib \\
20274 install.libs \\
20275 uninstall.libs \\
20276 install.$cf_dir \\
20277 uninstall.$cf_dir ::
20278         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20279 CF_EOF
20280         elif test -f $srcdir/$cf_dir/headers; then
20281 cat >> Makefile <<CF_EOF
20282
20283 libs \\
20284 install.libs \\
20285 uninstall.libs \\
20286 install.includes \\
20287 uninstall.includes ::
20288         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20289 CF_EOF
20290 fi
20291 done
20292
20293 cat >> Makefile <<CF_EOF
20294
20295 install.libs uninstall.libs \\
20296 install.data uninstall.data ::
20297 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20298 CF_EOF
20299
20300 if test "x$cf_with_manpages" = xyes; then
20301 cat >> Makefile <<CF_EOF
20302
20303 install.man \\
20304 uninstall.man ::
20305         cd man && \${MAKE} \${CF_MFLAGS} \$@
20306 CF_EOF
20307 fi
20308
20309 cat >> Makefile <<CF_EOF
20310
20311 distclean ::
20312         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20313         rm -f headers.sh headers.sed mk_shared_lib.sh
20314         rm -f edit_man.* man_alias.*
20315         rm -rf \${DIRS_TO_MAKE}
20316 CF_EOF
20317
20318 # Special case: tack's manpage lives in its own directory.
20319 if test "x$cf_with_manpages" = xyes; then
20320 if test -d tack ; then
20321 if test -f $srcdir/$tack.h; then
20322 cat >> Makefile <<CF_EOF
20323
20324 install.man \\
20325 uninstall.man ::
20326         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20327 CF_EOF
20328 fi
20329 fi
20330 fi
20331
20332 rm -f headers.sed headers.sh
20333
20334 echo creating headers.sh
20335 cat >headers.sh <<CF_EOF
20336 #! /bin/sh
20337 # This shell script is generated by the 'configure' script.  It is invoked in a
20338 # subdirectory of the build tree.  It generates a sed-script in the parent
20339 # directory that is used to adjust includes for header files that reside in a
20340 # subdirectory of /usr/include, etc.
20341 PRG=""
20342 while test \$# != 3
20343 do
20344 PRG="\$PRG \$1"; shift
20345 done
20346 DST=\$1
20347 REF=\$2
20348 SRC=\$3
20349 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20350 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20351 echo installing \$SRC in \$DST
20352 CF_EOF
20353
20354 if test $WITH_CURSES_H = yes; then
20355         cat >>headers.sh <<CF_EOF
20356 case \$DST in
20357 /*/include/*)
20358         END=\`basename \$DST\`
20359         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20360         do
20361                 NAME=\`basename \$i\`
20362                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20363         done
20364         ;;
20365 *)
20366         echo "" >> \$TMPSED
20367         ;;
20368 esac
20369 CF_EOF
20370
20371 else
20372         cat >>headers.sh <<CF_EOF
20373 case \$DST in
20374 /*/include/*)
20375         END=\`basename \$DST\`
20376         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20377         do
20378                 NAME=\`basename \$i\`
20379                 if test "\$NAME" = "curses.h"
20380                 then
20381                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20382                         NAME=ncurses.h
20383                 fi
20384                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20385         done
20386         ;;
20387 *)
20388         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20389         ;;
20390 esac
20391 CF_EOF
20392 fi
20393 cat >>headers.sh <<CF_EOF
20394 rm -f \$TMPSRC
20395 sed -f \$TMPSED \$SRC > \$TMPSRC
20396 NAME=\`basename \$SRC\`
20397 CF_EOF
20398 if test $WITH_CURSES_H != yes; then
20399         cat >>headers.sh <<CF_EOF
20400 test "\$NAME" = "curses.h" && NAME=ncurses.h
20401 CF_EOF
20402 fi
20403 cat >>headers.sh <<CF_EOF
20404 # Just in case someone gzip'd manpages, remove the conflicting copy.
20405 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20406
20407 eval \$PRG \$TMPSRC \$DST/\$NAME
20408 rm -f \$TMPSRC \$TMPSED
20409 CF_EOF
20410
20411 chmod 0755 headers.sh
20412
20413 for cf_dir in $SRC_SUBDIRS
20414 do
20415         if test ! -d $srcdir/$cf_dir ; then
20416                 continue
20417         fi
20418
20419         if test -f $srcdir/$cf_dir/headers; then
20420                 $AWK -f $srcdir/mk-hdr.awk \
20421                         subset="$LIB_SUBSETS" \
20422                         compat="$WITH_CURSES_H" \
20423                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20424         fi
20425
20426         if test -f $srcdir/$cf_dir/modules; then
20427                 if test "$cf_dir" != "c++" ; then
20428                         cat >>$cf_dir/Makefile <<"CF_EOF"
20429 depend : ${AUTO_SRC}
20430         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20431
20432 # DO NOT DELETE THIS LINE -- make depend depends on it.
20433 CF_EOF
20434                 fi
20435         fi
20436 done
20437
20438 if test "x$cf_with_ada" != xno ; then
20439 if test -z "$USE_OLD_MAKERULES" ; then
20440         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
20441 fi
20442 fi
20443  ;;
20444   esac
20445 done
20446 EOF
20447
20448 cat >>$CONFIG_STATUS <<\EOF
20449
20450 { (exit 0); exit 0; }
20451 EOF
20452 chmod +x $CONFIG_STATUS
20453 ac_clean_files=$ac_clean_files_save
20454
20455 # configure is writing to config.log, and then calls config.status.
20456 # config.status does its own redirection, appending to config.log.
20457 # Unfortunately, on DOS this fails, as config.log is still kept open
20458 # by configure, so config.status won't be able to write to it; its
20459 # output is simply discarded.  So we exec the FD to /dev/null,
20460 # effectively closing config.log, so it can be properly (re)opened and
20461 # appended to by config.status.  When coming back to configure, we
20462 # need to make the FD available again.
20463 if test "$no_create" != yes; then
20464   ac_cs_success=:
20465   exec 5>/dev/null
20466   $SHELL $CONFIG_STATUS || ac_cs_success=false
20467   exec 5>>config.log
20468   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20469   # would make configure fail if this is the last instruction.
20470   $ac_cs_success || { (exit 1); exit 1; }
20471 fi
20472 ${MAKE-make} preinstall