]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20120728
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.551 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20120310.
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-ada           suppress check for Ada95, don't build demo
698   --without-cxx           do not adjust ncurses bool to match C++
699   --without-cxx-binding   do not build C++ binding and demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --with-pkg-config-libdir=XXX use given directory for installing pc-files
706   --enable-pc-files       generate and install .pc files for pkg-config
707   --enable-mixed-case     tic should assume mixed-case filenames
708   --with-install-prefix   prefixes actual install-location ($DESTDIR)
709 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
710   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
711   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
712   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
713   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
714   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
715   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
716 Options to Specify the Libraries Built/Used:
717   --disable-libtool-version  enable to use libtool's incompatible naming scheme
718   --with-libtool          generate libraries with libtool
719   --with-shared           generate shared-libraries
720   --with-normal           generate normal-libraries (default)
721   --with-debug            generate debug-libraries (default)
722   --with-profile          generate profile-libraries
723   --with-lib-prefix       override library-prefix
724   --with-termlib          generate separate terminfo library
725   --with-ticlib           generate separate tic library
726   --with-gpm              use Alessandro Rubini's GPM library
727   --without-dlsym         do not use dlsym() to load GPM dynamically
728   --with-sysmouse         use sysmouse (FreeBSD console)
729   --enable-rpath          use rpath option when generating shared libraries
730   --disable-relink        relink shared libraries during install
731   --with-shlib-version=X  Specify rel or abi version for shared libs
732   --disable-rpath-hack    don't add rpath options for additional libraries
733 Fine-Tuning Your Configuration:
734   --disable-overwrite     leave out the link to -lcurses
735   --disable-database      do not use terminfo, only fallbacks/termcap
736   --with-database=XXX     specify terminfo source to install
737   --with-hashed-db        specify hashed-database library
738   --with-fallbacks=XXX    specify list of fallback terminal descriptions
739   --without-xterm-new     specify if xterm terminfo should be old version
740   --with-xterm-kbs=XXX     specify if xterm backspace sends BS or DEL
741   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
742   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
743   --disable-big-core      assume machine has little memory
744   --disable-big-strings   assume compiler has only standard-size strings
745   --enable-termcap        compile in termcap fallback support
746   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
747   --enable-getcap         fast termcap load, no xrefs to terminfo
748   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
749   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
750   --disable-root-environ  restrict environment when running as root
751   --enable-symlinks       make tic use symbolic links not hard links
752   --enable-broken_linker  compile with broken-linker support code
753   --enable-bsdpad         recognize BSD-style prefix padding
754   --enable-widec          compile with wide-char/UTF-8 code
755   --disable-lp64          allow chtype to be long (ignore _LP64)
756   --disable-largefile     omit support for large files
757   --disable-tparm-varargs compile tparm() without varargs interface
758   --disable-tic-depends   link tic library without explicit dependency on ncurses library
759   --with-bool=TYPE        override fallback type of bool variable
760   --with-caps=alt         compile with alternate Caps file
761   --with-chtype=TYPE      override type of chtype
762   --with-ospeed=TYPE      override type of ospeed variable
763   --with-mmask-t=TYPE     override type of mmask_t
764   --with-ccharw-max=XXX   override size CCHARW_MAX
765   --with-tparm-arg=TYPE   override parameter type of tparm
766   --with-rcs-ids          compile-in RCS identifiers
767 Options to Specify How Manpages are Installed:
768   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
769                           optionally formatted/catonly, e.g., gzip,formatted
770   --with-manpage-renames  specify manpage-renaming
771   --with-manpage-aliases  specify manpage-aliases using .so
772   --with-manpage-symlinks specify manpage-aliases using symlinks
773   --with-manpage-tbl      specify manpage processing with tbl
774 Extensions:
775   --disable-ext-funcs     disable function-extensions
776   --enable-sp-funcs       enable experimental SCREEN-extensions
777   --enable-term-driver    enable experimental terminal-driver
778   --enable-const          compile with extra/non-standard const
779   --enable-ext-colors     compile for 256-color support
780   --enable-ext-mouse      compile for extended mouse-encoding
781   --enable-no-padding     compile with $NCURSES_NO_PADDING code
782   --enable-signed-char    compile using signed Boolean's in term.h
783   --enable-sigwinch       compile with SIGWINCH handler
784   --enable-tcap-names     compile with user-definable terminal capabilities
785 Development Code:
786   --without-develop       disable development options
787   --enable-hard-tabs      compile with hard-tabs code
788   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
789 Experimental Code:
790   --disable-assumed-color do not assume anything about default-colors
791   --disable-hashmap       compile without hashmap scrolling-optimization
792   --enable-colorfgbg      compile-in experimental $COLORFGBG code
793   --enable-interop        compile-in experimental interop bindings
794   --with-pthread          use POSIX thread library
795   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
796   --enable-weak-symbols   enable weak-symbols for pthreads
797   --enable-reentrant      compile with experimental reentrant code
798   --with-wrap-prefix=XXX  override prefix used for public variables
799   --enable-safe-sprintf   compile with experimental safe-sprintf code
800   --disable-scroll-hints  compile without scroll-hints code
801   --enable-wgetch-events  compile with experimental wgetch-events code
802 Testing/development Options:
803   --disable-echo          display "compiling" commands
804   --enable-warnings       build: turn on GCC compiler warnings
805   --enable-string-hacks  work around bogus compiler/loader warnings
806   --enable-assertions     test: turn on generation of assertion code
807   --with-dmalloc          test: use Gray Watson's dmalloc library
808   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
809   --with-valgrind         test: use valgrind
810   --disable-leaks         test: free permanent memory, analyze leaks
811   --enable-expanded       test: generate functions for certain macros
812   --disable-macros        test: use functions rather than macros
813   --with-trace            test: add trace() function to all models of ncurses
814 Ada95 Binding Options:
815   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
816   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
817   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
818   --with-ada-sharedlib=XX build Ada95 shared-library
819
820 Some influential environment variables:
821   CC          C compiler command
822   CFLAGS      C compiler flags
823   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
824               nonstandard directory <lib dir>
825   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
826               headers in a nonstandard directory <include dir>
827   CPP         C preprocessor
828   CXX         C++ compiler command
829   CXXFLAGS    C++ compiler flags
830   CXXCPP      C++ preprocessor
831
832 Use these variables to override the choices made by `configure' or to help
833 it to find libraries and programs with nonstandard names/locations.
834
835 EOF
836 fi
837
838 if test "$ac_init_help" = "recursive"; then
839   # If there are subdirs, report their specific --help.
840   ac_popdir=`pwd`
841   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
842     cd $ac_subdir
843     # A "../" for each directory in /$ac_subdir.
844     ac_dots=`echo $ac_subdir |
845              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
846
847     case $srcdir in
848     .) # No --srcdir option.  We are building in place.
849       ac_sub_srcdir=$srcdir ;;
850     [\\/]* | ?:[\\/]* ) # Absolute path.
851       ac_sub_srcdir=$srcdir/$ac_subdir ;;
852     *) # Relative path.
853       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
854     esac
855
856     # Check for guested configure; otherwise get Cygnus style configure.
857     if test -f $ac_sub_srcdir/configure.gnu; then
858       echo
859       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
860     elif test -f $ac_sub_srcdir/configure; then
861       echo
862       $SHELL $ac_sub_srcdir/configure  --help=recursive
863     elif test -f $ac_sub_srcdir/configure.ac ||
864            test -f $ac_sub_srcdir/configure.in; then
865       echo
866       $ac_configure --help
867     else
868       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
869     fi
870     cd $ac_popdir
871   done
872 fi
873
874 test -n "$ac_init_help" && exit 0
875 if $ac_init_version; then
876   cat <<\EOF
877
878 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
879 Free Software Foundation, Inc.
880 This configure script is free software; the Free Software Foundation
881 gives unlimited permission to copy, distribute and modify it.
882 EOF
883   exit 0
884 fi
885 exec 5>config.log
886 cat >&5 <<EOF
887 This file contains any messages produced by compilers while
888 running configure, to aid debugging if configure makes a mistake.
889
890 It was created by $as_me, which was
891 generated by GNU Autoconf 2.52.20120310.  Invocation command line was
892
893   $ $0 $@
894
895 EOF
896 {
897 cat <<_ASUNAME
898 ## ---------- ##
899 ## Platform.  ##
900 ## ---------- ##
901
902 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
903 uname -m = `(uname -m) 2>/dev/null || echo unknown`
904 uname -r = `(uname -r) 2>/dev/null || echo unknown`
905 uname -s = `(uname -s) 2>/dev/null || echo unknown`
906 uname -v = `(uname -v) 2>/dev/null || echo unknown`
907
908 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
909 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
910
911 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
912 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
913 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
914 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
915 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
916 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
917 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
918
919 PATH = $PATH
920
921 _ASUNAME
922 } >&5
923
924 cat >&5 <<EOF
925 ## ------------ ##
926 ## Core tests.  ##
927 ## ------------ ##
928
929 EOF
930
931 # Keep a trace of the command line.
932 # Strip out --no-create and --no-recursion so they do not pile up.
933 # Also quote any args containing shell meta-characters.
934 ac_configure_args=
935 ac_sep=
936 for ac_arg
937 do
938   case $ac_arg in
939   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
940   | --no-cr | --no-c) ;;
941   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
942   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
943   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
944     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
945     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
946     ac_sep=" " ;;
947   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
948      ac_sep=" " ;;
949   esac
950   # Get rid of the leading space.
951 done
952
953 # When interrupted or exit'd, cleanup temporary files, and complete
954 # config.log.  We remove comments because anyway the quotes in there
955 # would cause problems or look ugly.
956 trap 'exit_status=$?
957   # Save into config.log some information that might help in debugging.
958   echo >&5
959   echo "## ----------------- ##" >&5
960   echo "## Cache variables.  ##" >&5
961   echo "## ----------------- ##" >&5
962   echo >&5
963   # The following way of writing the cache mishandles newlines in values,
964 {
965   (set) 2>&1 |
966     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
967     *ac_space=\ *)
968       sed -n \
969         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
970           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
971       ;;
972     *)
973       sed -n \
974         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
975       ;;
976     esac;
977 } >&5
978   sed "/^$/d" confdefs.h >conftest.log
979   if test -s conftest.log; then
980     echo >&5
981     echo "## ------------ ##" >&5
982     echo "## confdefs.h.  ##" >&5
983     echo "## ------------ ##" >&5
984     echo >&5
985     cat conftest.log >&5
986   fi
987   (echo; echo) >&5
988   test "$ac_signal" != 0 &&
989     echo "$as_me: caught signal $ac_signal" >&5
990   echo "$as_me: exit $exit_status" >&5
991   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
992     exit $exit_status
993      ' 0
994 for ac_signal in 1 2 13 15; do
995   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
996 done
997 ac_signal=0
998
999 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1000 rm -rf conftest* confdefs.h
1001 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1002 echo >confdefs.h
1003
1004 # Let the site file select an alternate cache file if it wants to.
1005 # Prefer explicitly selected file to automatically selected ones.
1006 if test -z "$CONFIG_SITE"; then
1007   if test "x$prefix" != xNONE; then
1008     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1009   else
1010     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1011   fi
1012 fi
1013 for ac_site_file in $CONFIG_SITE; do
1014   if test -r "$ac_site_file"; then
1015     { echo "$as_me:1015: loading site script $ac_site_file" >&5
1016 echo "$as_me: loading site script $ac_site_file" >&6;}
1017     cat "$ac_site_file" >&5
1018     . "$ac_site_file"
1019   fi
1020 done
1021
1022 if test -r "$cache_file"; then
1023   # Some versions of bash will fail to source /dev/null (special
1024   # files actually), so we avoid doing that.
1025   if test -f "$cache_file"; then
1026     { echo "$as_me:1026: loading cache $cache_file" >&5
1027 echo "$as_me: loading cache $cache_file" >&6;}
1028     case $cache_file in
1029       [\\/]* | ?:[\\/]* ) . $cache_file;;
1030       *)                      . ./$cache_file;;
1031     esac
1032   fi
1033 else
1034   { echo "$as_me:1034: creating cache $cache_file" >&5
1035 echo "$as_me: creating cache $cache_file" >&6;}
1036   >$cache_file
1037 fi
1038
1039 # Check that the precious variables saved in the cache have kept the same
1040 # value.
1041 ac_cache_corrupted=false
1042 for ac_var in `(set) 2>&1 |
1043                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1044   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1045   eval ac_new_set=\$ac_env_${ac_var}_set
1046   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1047   eval ac_new_val="\$ac_env_${ac_var}_value"
1048   case $ac_old_set,$ac_new_set in
1049     set,)
1050       { echo "$as_me:1050: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1051 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1052       ac_cache_corrupted=: ;;
1053     ,set)
1054       { echo "$as_me:1054: error: \`$ac_var' was not set in the previous run" >&5
1055 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1056       ac_cache_corrupted=: ;;
1057     ,);;
1058     *)
1059       if test "x$ac_old_val" != "x$ac_new_val"; then
1060         { echo "$as_me:1060: error: \`$ac_var' has changed since the previous run:" >&5
1061 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1062         { echo "$as_me:1062:   former value:  $ac_old_val" >&5
1063 echo "$as_me:   former value:  $ac_old_val" >&2;}
1064         { echo "$as_me:1064:   current value: $ac_new_val" >&5
1065 echo "$as_me:   current value: $ac_new_val" >&2;}
1066         ac_cache_corrupted=:
1067       fi;;
1068   esac
1069   # Pass precious variables to config.status.  It doesn't matter if
1070   # we pass some twice (in addition to the command line arguments).
1071   if test "$ac_new_set" = set; then
1072     case $ac_new_val in
1073     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1075       ac_configure_args="$ac_configure_args '$ac_arg'"
1076       ;;
1077     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1078        ;;
1079     esac
1080   fi
1081 done
1082 if $ac_cache_corrupted; then
1083   { echo "$as_me:1083: error: changes in the environment can compromise the build" >&5
1084 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1085   { { echo "$as_me:1085: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1086 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1087    { (exit 1); exit 1; }; }
1088 fi
1089
1090 ac_ext=c
1091 ac_cpp='$CPP $CPPFLAGS'
1092 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1093 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1094 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1095 ac_main_return=return
1096
1097 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1098   *c*,-n*) ECHO_N= ECHO_C='
1099 ' ECHO_T='      ' ;;
1100   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1101   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1102 esac
1103 echo "#! $SHELL" >conftest.sh
1104 echo  "exit 0"   >>conftest.sh
1105 chmod +x conftest.sh
1106 if { (echo "$as_me:1106: PATH=\".;.\"; conftest.sh") >&5
1107   (PATH=".;."; conftest.sh) 2>&5
1108   ac_status=$?
1109   echo "$as_me:1109: \$? = $ac_status" >&5
1110   (exit $ac_status); }; then
1111   ac_path_separator=';'
1112 else
1113   ac_path_separator=:
1114 fi
1115 PATH_SEPARATOR="$ac_path_separator"
1116 rm -f conftest.sh
1117
1118 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1119
1120 top_builddir=`pwd`
1121
1122 echo "$as_me:1122: checking for egrep" >&5
1123 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1124 if test "${ac_cv_prog_egrep+set}" = set; then
1125   echo $ECHO_N "(cached) $ECHO_C" >&6
1126 else
1127   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1128     then ac_cv_prog_egrep='grep -E'
1129     else ac_cv_prog_egrep='egrep'
1130     fi
1131 fi
1132 echo "$as_me:1132: result: $ac_cv_prog_egrep" >&5
1133 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1134  EGREP=$ac_cv_prog_egrep
1135
1136 test -z "$EGREP" && { { echo "$as_me:1136: error: No egrep program found" >&5
1137 echo "$as_me: error: No egrep program found" >&2;}
1138    { (exit 1); exit 1; }; }
1139
1140 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1141 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1142 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1143 cf_cv_abi_version=${NCURSES_MAJOR}
1144 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1145 cf_cv_timestamp=`date`
1146 echo "$as_me:1146: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1147 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1148
1149 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1150
1151 # Check whether --with-rel-version or --without-rel-version was given.
1152 if test "${with_rel_version+set}" = set; then
1153   withval="$with_rel_version"
1154   { echo "$as_me:1154: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1155 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1156  cf_cv_rel_version=$withval
1157 fi;
1158
1159  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1160  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1161
1162 if test -n "$NCURSES_MAJOR" ; then
1163   case $NCURSES_MAJOR in #(vi
1164   [0-9]*) #(vi
1165         ;;
1166   *)
1167         { { echo "$as_me:1167: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1168 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1169    { (exit 1); exit 1; }; }
1170         ;;
1171   esac
1172 else
1173   { { echo "$as_me:1173: error: Release major-version value is empty" >&5
1174 echo "$as_me: error: Release major-version value is empty" >&2;}
1175    { (exit 1); exit 1; }; }
1176 fi
1177
1178 if test -n "$NCURSES_MINOR" ; then
1179   case $NCURSES_MINOR in #(vi
1180   [0-9]*) #(vi
1181         ;;
1182   *)
1183         { { echo "$as_me:1183: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1184 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1185    { (exit 1); exit 1; }; }
1186         ;;
1187   esac
1188 else
1189   { { echo "$as_me:1189: error: Release minor-version value is empty" >&5
1190 echo "$as_me: error: Release minor-version value is empty" >&2;}
1191    { (exit 1); exit 1; }; }
1192 fi
1193
1194 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1195
1196 # Check whether --with-abi-version or --without-abi-version was given.
1197 if test "${with_abi_version+set}" = set; then
1198   withval="$with_abi_version"
1199   { echo "$as_me:1199: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1200 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1201  cf_cv_abi_version=$withval
1202 fi;
1203
1204 if test -n "$cf_cv_abi_version" ; then
1205   case $cf_cv_abi_version in #(vi
1206   [0-9]*) #(vi
1207         ;;
1208   *)
1209         { { echo "$as_me:1209: error: ABI version is not a number: $cf_cv_abi_version" >&5
1210 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1211    { (exit 1); exit 1; }; }
1212         ;;
1213   esac
1214 else
1215   { { echo "$as_me:1215: error: ABI version value is empty" >&5
1216 echo "$as_me: error: ABI version value is empty" >&2;}
1217    { (exit 1); exit 1; }; }
1218 fi
1219
1220 ac_aux_dir=
1221 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1222   if test -f $ac_dir/install-sh; then
1223     ac_aux_dir=$ac_dir
1224     ac_install_sh="$ac_aux_dir/install-sh -c"
1225     break
1226   elif test -f $ac_dir/install.sh; then
1227     ac_aux_dir=$ac_dir
1228     ac_install_sh="$ac_aux_dir/install.sh -c"
1229     break
1230   elif test -f $ac_dir/shtool; then
1231     ac_aux_dir=$ac_dir
1232     ac_install_sh="$ac_aux_dir/shtool install -c"
1233     break
1234   fi
1235 done
1236 if test -z "$ac_aux_dir"; then
1237   { { echo "$as_me:1237: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1238 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1239    { (exit 1); exit 1; }; }
1240 fi
1241 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1242 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1243 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1244
1245 # Make sure we can run config.sub.
1246 $ac_config_sub sun4 >/dev/null 2>&1 ||
1247   { { echo "$as_me:1247: error: cannot run $ac_config_sub" >&5
1248 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1249    { (exit 1); exit 1; }; }
1250
1251 echo "$as_me:1251: checking build system type" >&5
1252 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1253 if test "${ac_cv_build+set}" = set; then
1254   echo $ECHO_N "(cached) $ECHO_C" >&6
1255 else
1256   ac_cv_build_alias=$build_alias
1257 test -z "$ac_cv_build_alias" &&
1258   ac_cv_build_alias=`$ac_config_guess`
1259 test -z "$ac_cv_build_alias" &&
1260   { { echo "$as_me:1260: error: cannot guess build type; you must specify one" >&5
1261 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1262    { (exit 1); exit 1; }; }
1263 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1264   { { echo "$as_me:1264: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1265 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1266    { (exit 1); exit 1; }; }
1267
1268 fi
1269 echo "$as_me:1269: result: $ac_cv_build" >&5
1270 echo "${ECHO_T}$ac_cv_build" >&6
1271 build=$ac_cv_build
1272 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1273 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1274 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1275
1276 echo "$as_me:1276: checking host system type" >&5
1277 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1278 if test "${ac_cv_host+set}" = set; then
1279   echo $ECHO_N "(cached) $ECHO_C" >&6
1280 else
1281   ac_cv_host_alias=$host_alias
1282 test -z "$ac_cv_host_alias" &&
1283   ac_cv_host_alias=$ac_cv_build_alias
1284 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1285   { { echo "$as_me:1285: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1286 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1287    { (exit 1); exit 1; }; }
1288
1289 fi
1290 echo "$as_me:1290: result: $ac_cv_host" >&5
1291 echo "${ECHO_T}$ac_cv_host" >&6
1292 host=$ac_cv_host
1293 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1294 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1295 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1296
1297 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1298         echo "$as_me:1298: checking target system type" >&5
1299 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1300 if test "${ac_cv_target+set}" = set; then
1301   echo $ECHO_N "(cached) $ECHO_C" >&6
1302 else
1303   ac_cv_target_alias=$target_alias
1304 test "x$ac_cv_target_alias" = "x" &&
1305   ac_cv_target_alias=$ac_cv_host_alias
1306 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1307   { { echo "$as_me:1307: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1308 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1309    { (exit 1); exit 1; }; }
1310
1311 fi
1312 echo "$as_me:1312: result: $ac_cv_target" >&5
1313 echo "${ECHO_T}$ac_cv_target" >&6
1314 target=$ac_cv_target
1315 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1316 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1317 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1318
1319 # The aliases save the names the user supplied, while $host etc.
1320 # will get canonicalized.
1321 test -n "$target_alias" &&
1322   test "$program_prefix$program_suffix$program_transform_name" = \
1323     NONENONEs,x,x, &&
1324   program_prefix=${target_alias}-
1325         system_name="$host_os"
1326 else
1327         system_name="`(uname -s -r) 2>/dev/null`"
1328         if test -z "$system_name" ; then
1329                 system_name="`(hostname) 2>/dev/null`"
1330         fi
1331 fi
1332 test -n "$system_name" && cat >>confdefs.h <<EOF
1333 #define SYSTEM_NAME "$system_name"
1334 EOF
1335
1336 if test "${cf_cv_system_name+set}" = set; then
1337   echo $ECHO_N "(cached) $ECHO_C" >&6
1338 else
1339   cf_cv_system_name="$system_name"
1340 fi
1341
1342 test -z "$system_name" && system_name="$cf_cv_system_name"
1343 test -n "$cf_cv_system_name" && echo "$as_me:1343: result: Configuring for $cf_cv_system_name" >&5
1344 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1345
1346 if test ".$system_name" != ".$cf_cv_system_name" ; then
1347         echo "$as_me:1347: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1348 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1349         { { echo "$as_me:1349: error: \"Please remove config.cache and try again.\"" >&5
1350 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1351    { (exit 1); exit 1; }; }
1352 fi
1353
1354 # Check whether --with-system-type or --without-system-type was given.
1355 if test "${with_system_type+set}" = set; then
1356   withval="$with_system_type"
1357   { echo "$as_me:1357: WARNING: overriding system type to $withval" >&5
1358 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1359  cf_cv_system_name=$withval
1360 fi;
1361
1362 ###     Save the given $CFLAGS to allow user-override.
1363 cf_user_CFLAGS="$CFLAGS"
1364
1365 ###     Default install-location
1366
1367 echo "$as_me:1367: checking for prefix" >&5
1368 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1369 if test "x$prefix" = "xNONE" ; then
1370         case "$cf_cv_system_name" in
1371                 # non-vendor systems don't have a conflict
1372         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1373                 prefix=/usr
1374                 ;;
1375         *)      prefix=$ac_default_prefix
1376                 ;;
1377         esac
1378 fi
1379 echo "$as_me:1379: result: $prefix" >&5
1380 echo "${ECHO_T}$prefix" >&6
1381
1382 if test "x$prefix" = "xNONE" ; then
1383 echo "$as_me:1383: checking for default include-directory" >&5
1384 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1385 test -n "$verbose" && echo 1>&6
1386 for cf_symbol in \
1387         $includedir \
1388         $includedir/ncurses \
1389         $prefix/include \
1390         $prefix/include/ncurses \
1391         /usr/local/include \
1392         /usr/local/include/ncurses \
1393         /usr/include \
1394         /usr/include/ncurses
1395 do
1396         cf_dir=`eval echo $cf_symbol`
1397         if test -f $cf_dir/curses.h ; then
1398         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1399                 includedir="$cf_symbol"
1400                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1401                 break
1402         fi
1403         fi
1404         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1405 done
1406 echo "$as_me:1406: result: $includedir" >&5
1407 echo "${ECHO_T}$includedir" >&6
1408 fi
1409
1410 ###     Checks for programs.
1411
1412 # Check whether --with-ada or --without-ada was given.
1413 if test "${with_ada+set}" = set; then
1414   withval="$with_ada"
1415   cf_with_ada=$withval
1416 else
1417   cf_with_ada=yes
1418 fi;
1419 if test x"$cf_with_ada" = xyes
1420 then
1421         cf_PROG_CC="gnatgcc gcc cc"
1422 else
1423         cf_PROG_CC="gcc cc"
1424 fi
1425
1426 ac_ext=c
1427 ac_cpp='$CPP $CPPFLAGS'
1428 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1429 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1430 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1431 ac_main_return=return
1432 if test -n "$ac_tool_prefix"; then
1433   for ac_prog in $cf_PROG_CC
1434   do
1435     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1436 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1437 echo "$as_me:1437: checking for $ac_word" >&5
1438 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1439 if test "${ac_cv_prog_CC+set}" = set; then
1440   echo $ECHO_N "(cached) $ECHO_C" >&6
1441 else
1442   if test -n "$CC"; then
1443   ac_cv_prog_CC="$CC" # Let the user override the test.
1444 else
1445   ac_save_IFS=$IFS; IFS=$ac_path_separator
1446 ac_dummy="$PATH"
1447 for ac_dir in $ac_dummy; do
1448   IFS=$ac_save_IFS
1449   test -z "$ac_dir" && ac_dir=.
1450   $as_executable_p "$ac_dir/$ac_word" || continue
1451 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1452 echo "$as_me:1452: found $ac_dir/$ac_word" >&5
1453 break
1454 done
1455
1456 fi
1457 fi
1458 CC=$ac_cv_prog_CC
1459 if test -n "$CC"; then
1460   echo "$as_me:1460: result: $CC" >&5
1461 echo "${ECHO_T}$CC" >&6
1462 else
1463   echo "$as_me:1463: result: no" >&5
1464 echo "${ECHO_T}no" >&6
1465 fi
1466
1467     test -n "$CC" && break
1468   done
1469 fi
1470 if test -z "$CC"; then
1471   ac_ct_CC=$CC
1472   for ac_prog in $cf_PROG_CC
1473 do
1474   # Extract the first word of "$ac_prog", so it can be a program name with args.
1475 set dummy $ac_prog; ac_word=$2
1476 echo "$as_me:1476: checking for $ac_word" >&5
1477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1478 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1479   echo $ECHO_N "(cached) $ECHO_C" >&6
1480 else
1481   if test -n "$ac_ct_CC"; then
1482   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1483 else
1484   ac_save_IFS=$IFS; IFS=$ac_path_separator
1485 ac_dummy="$PATH"
1486 for ac_dir in $ac_dummy; do
1487   IFS=$ac_save_IFS
1488   test -z "$ac_dir" && ac_dir=.
1489   $as_executable_p "$ac_dir/$ac_word" || continue
1490 ac_cv_prog_ac_ct_CC="$ac_prog"
1491 echo "$as_me:1491: found $ac_dir/$ac_word" >&5
1492 break
1493 done
1494
1495 fi
1496 fi
1497 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1498 if test -n "$ac_ct_CC"; then
1499   echo "$as_me:1499: result: $ac_ct_CC" >&5
1500 echo "${ECHO_T}$ac_ct_CC" >&6
1501 else
1502   echo "$as_me:1502: result: no" >&5
1503 echo "${ECHO_T}no" >&6
1504 fi
1505
1506   test -n "$ac_ct_CC" && break
1507 done
1508
1509   CC=$ac_ct_CC
1510 fi
1511
1512 test -z "$CC" && { { echo "$as_me:1512: error: no acceptable cc found in \$PATH" >&5
1513 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1514    { (exit 1); exit 1; }; }
1515
1516 # Provide some information about the compiler.
1517 echo "$as_me:1517:" \
1518      "checking for C compiler version" >&5
1519 ac_compiler=`set X $ac_compile; echo $2`
1520 { (eval echo "$as_me:1520: \"$ac_compiler --version </dev/null >&5\"") >&5
1521   (eval $ac_compiler --version </dev/null >&5) 2>&5
1522   ac_status=$?
1523   echo "$as_me:1523: \$? = $ac_status" >&5
1524   (exit $ac_status); }
1525 { (eval echo "$as_me:1525: \"$ac_compiler -v </dev/null >&5\"") >&5
1526   (eval $ac_compiler -v </dev/null >&5) 2>&5
1527   ac_status=$?
1528   echo "$as_me:1528: \$? = $ac_status" >&5
1529   (exit $ac_status); }
1530 { (eval echo "$as_me:1530: \"$ac_compiler -V </dev/null >&5\"") >&5
1531   (eval $ac_compiler -V </dev/null >&5) 2>&5
1532   ac_status=$?
1533   echo "$as_me:1533: \$? = $ac_status" >&5
1534   (exit $ac_status); }
1535
1536 cat >conftest.$ac_ext <<_ACEOF
1537 #line 1537 "configure"
1538 #include "confdefs.h"
1539
1540 int
1541 main ()
1542 {
1543
1544   ;
1545   return 0;
1546 }
1547 _ACEOF
1548 ac_clean_files_save=$ac_clean_files
1549 ac_clean_files="$ac_clean_files a.out a.exe"
1550 # Try to create an executable without -o first, disregard a.out.
1551 # It will help us diagnose broken compilers, and finding out an intuition
1552 # of exeext.
1553 echo "$as_me:1553: checking for C compiler default output" >&5
1554 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1555 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1556 if { (eval echo "$as_me:1556: \"$ac_link_default\"") >&5
1557   (eval $ac_link_default) 2>&5
1558   ac_status=$?
1559   echo "$as_me:1559: \$? = $ac_status" >&5
1560   (exit $ac_status); }; then
1561   # Find the output, starting from the most likely.  This scheme is
1562 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1563 # resort.
1564 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1565                 ls a.out conftest 2>/dev/null;
1566                 ls a.* conftest.* 2>/dev/null`; do
1567   case $ac_file in
1568     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1569     a.out ) # We found the default executable, but exeext='' is most
1570             # certainly right.
1571             break;;
1572     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1573           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1574           export ac_cv_exeext
1575           break;;
1576     * ) break;;
1577   esac
1578 done
1579 else
1580   echo "$as_me: failed program was:" >&5
1581 cat conftest.$ac_ext >&5
1582 { { echo "$as_me:1582: error: C compiler cannot create executables" >&5
1583 echo "$as_me: error: C compiler cannot create executables" >&2;}
1584    { (exit 77); exit 77; }; }
1585 fi
1586
1587 ac_exeext=$ac_cv_exeext
1588 echo "$as_me:1588: result: $ac_file" >&5
1589 echo "${ECHO_T}$ac_file" >&6
1590
1591 # Check the compiler produces executables we can run.  If not, either
1592 # the compiler is broken, or we cross compile.
1593 echo "$as_me:1593: checking whether the C compiler works" >&5
1594 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1595 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1596 # If not cross compiling, check that we can run a simple program.
1597 if test "$cross_compiling" != yes; then
1598   if { ac_try='./$ac_file'
1599   { (eval echo "$as_me:1599: \"$ac_try\"") >&5
1600   (eval $ac_try) 2>&5
1601   ac_status=$?
1602   echo "$as_me:1602: \$? = $ac_status" >&5
1603   (exit $ac_status); }; }; then
1604     cross_compiling=no
1605   else
1606     if test "$cross_compiling" = maybe; then
1607         cross_compiling=yes
1608     else
1609         { { echo "$as_me:1609: error: cannot run C compiled programs.
1610 If you meant to cross compile, use \`--host'." >&5
1611 echo "$as_me: error: cannot run C compiled programs.
1612 If you meant to cross compile, use \`--host'." >&2;}
1613    { (exit 1); exit 1; }; }
1614     fi
1615   fi
1616 fi
1617 echo "$as_me:1617: result: yes" >&5
1618 echo "${ECHO_T}yes" >&6
1619
1620 rm -f a.out a.exe conftest$ac_cv_exeext
1621 ac_clean_files=$ac_clean_files_save
1622 # Check the compiler produces executables we can run.  If not, either
1623 # the compiler is broken, or we cross compile.
1624 echo "$as_me:1624: checking whether we are cross compiling" >&5
1625 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1626 echo "$as_me:1626: result: $cross_compiling" >&5
1627 echo "${ECHO_T}$cross_compiling" >&6
1628
1629 echo "$as_me:1629: checking for executable suffix" >&5
1630 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1631 if { (eval echo "$as_me:1631: \"$ac_link\"") >&5
1632   (eval $ac_link) 2>&5
1633   ac_status=$?
1634   echo "$as_me:1634: \$? = $ac_status" >&5
1635   (exit $ac_status); }; then
1636   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1637 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1638 # work properly (i.e., refer to `conftest.exe'), while it won't with
1639 # `rm'.
1640 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1641   case $ac_file in
1642     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1643     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1644           export ac_cv_exeext
1645           break;;
1646     * ) break;;
1647   esac
1648 done
1649 else
1650   { { echo "$as_me:1650: error: cannot compute EXEEXT: cannot compile and link" >&5
1651 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1652    { (exit 1); exit 1; }; }
1653 fi
1654
1655 rm -f conftest$ac_cv_exeext
1656 echo "$as_me:1656: result: $ac_cv_exeext" >&5
1657 echo "${ECHO_T}$ac_cv_exeext" >&6
1658
1659 rm -f conftest.$ac_ext
1660 EXEEXT=$ac_cv_exeext
1661 ac_exeext=$EXEEXT
1662 echo "$as_me:1662: checking for object suffix" >&5
1663 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1664 if test "${ac_cv_objext+set}" = set; then
1665   echo $ECHO_N "(cached) $ECHO_C" >&6
1666 else
1667   cat >conftest.$ac_ext <<_ACEOF
1668 #line 1668 "configure"
1669 #include "confdefs.h"
1670
1671 int
1672 main ()
1673 {
1674
1675   ;
1676   return 0;
1677 }
1678 _ACEOF
1679 rm -f conftest.o conftest.obj
1680 if { (eval echo "$as_me:1680: \"$ac_compile\"") >&5
1681   (eval $ac_compile) 2>&5
1682   ac_status=$?
1683   echo "$as_me:1683: \$? = $ac_status" >&5
1684   (exit $ac_status); }; then
1685   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1686   case $ac_file in
1687     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1688     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1689        break;;
1690   esac
1691 done
1692 else
1693   echo "$as_me: failed program was:" >&5
1694 cat conftest.$ac_ext >&5
1695 { { echo "$as_me:1695: error: cannot compute OBJEXT: cannot compile" >&5
1696 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1697    { (exit 1); exit 1; }; }
1698 fi
1699
1700 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1701 fi
1702 echo "$as_me:1702: result: $ac_cv_objext" >&5
1703 echo "${ECHO_T}$ac_cv_objext" >&6
1704 OBJEXT=$ac_cv_objext
1705 ac_objext=$OBJEXT
1706 echo "$as_me:1706: checking whether we are using the GNU C compiler" >&5
1707 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1708 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1709   echo $ECHO_N "(cached) $ECHO_C" >&6
1710 else
1711   cat >conftest.$ac_ext <<_ACEOF
1712 #line 1712 "configure"
1713 #include "confdefs.h"
1714
1715 int
1716 main ()
1717 {
1718 #ifndef __GNUC__
1719        choke me
1720 #endif
1721
1722   ;
1723   return 0;
1724 }
1725 _ACEOF
1726 rm -f conftest.$ac_objext
1727 if { (eval echo "$as_me:1727: \"$ac_compile\"") >&5
1728   (eval $ac_compile) 2>&5
1729   ac_status=$?
1730   echo "$as_me:1730: \$? = $ac_status" >&5
1731   (exit $ac_status); } &&
1732          { ac_try='test -s conftest.$ac_objext'
1733   { (eval echo "$as_me:1733: \"$ac_try\"") >&5
1734   (eval $ac_try) 2>&5
1735   ac_status=$?
1736   echo "$as_me:1736: \$? = $ac_status" >&5
1737   (exit $ac_status); }; }; then
1738   ac_compiler_gnu=yes
1739 else
1740   echo "$as_me: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 ac_compiler_gnu=no
1743 fi
1744 rm -f conftest.$ac_objext conftest.$ac_ext
1745 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1746
1747 fi
1748 echo "$as_me:1748: result: $ac_cv_c_compiler_gnu" >&5
1749 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1750 GCC=`test $ac_compiler_gnu = yes && echo yes`
1751 ac_test_CFLAGS=${CFLAGS+set}
1752 ac_save_CFLAGS=$CFLAGS
1753 CFLAGS="-g"
1754 echo "$as_me:1754: checking whether $CC accepts -g" >&5
1755 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1756 if test "${ac_cv_prog_cc_g+set}" = set; then
1757   echo $ECHO_N "(cached) $ECHO_C" >&6
1758 else
1759   cat >conftest.$ac_ext <<_ACEOF
1760 #line 1760 "configure"
1761 #include "confdefs.h"
1762
1763 int
1764 main ()
1765 {
1766
1767   ;
1768   return 0;
1769 }
1770 _ACEOF
1771 rm -f conftest.$ac_objext
1772 if { (eval echo "$as_me:1772: \"$ac_compile\"") >&5
1773   (eval $ac_compile) 2>&5
1774   ac_status=$?
1775   echo "$as_me:1775: \$? = $ac_status" >&5
1776   (exit $ac_status); } &&
1777          { ac_try='test -s conftest.$ac_objext'
1778   { (eval echo "$as_me:1778: \"$ac_try\"") >&5
1779   (eval $ac_try) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); }; }; then
1783   ac_cv_prog_cc_g=yes
1784 else
1785   echo "$as_me: failed program was:" >&5
1786 cat conftest.$ac_ext >&5
1787 ac_cv_prog_cc_g=no
1788 fi
1789 rm -f conftest.$ac_objext conftest.$ac_ext
1790 fi
1791 echo "$as_me:1791: result: $ac_cv_prog_cc_g" >&5
1792 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1793 if test "$ac_test_CFLAGS" = set; then
1794   CFLAGS=$ac_save_CFLAGS
1795 elif test $ac_cv_prog_cc_g = yes; then
1796   if test "$GCC" = yes; then
1797     CFLAGS="-g -O2"
1798   else
1799     CFLAGS="-g"
1800   fi
1801 else
1802   if test "$GCC" = yes; then
1803     CFLAGS="-O2"
1804   else
1805     CFLAGS=
1806   fi
1807 fi
1808 # Some people use a C++ compiler to compile C.  Since we use `exit',
1809 # in C++ we need to declare it.  In case someone uses the same compiler
1810 # for both compiling C and C++ we need to have the C++ compiler decide
1811 # the declaration of exit, since it's the most demanding environment.
1812 cat >conftest.$ac_ext <<_ACEOF
1813 #ifndef __cplusplus
1814   choke me
1815 #endif
1816 _ACEOF
1817 rm -f conftest.$ac_objext
1818 if { (eval echo "$as_me:1818: \"$ac_compile\"") >&5
1819   (eval $ac_compile) 2>&5
1820   ac_status=$?
1821   echo "$as_me:1821: \$? = $ac_status" >&5
1822   (exit $ac_status); } &&
1823          { ac_try='test -s conftest.$ac_objext'
1824   { (eval echo "$as_me:1824: \"$ac_try\"") >&5
1825   (eval $ac_try) 2>&5
1826   ac_status=$?
1827   echo "$as_me:1827: \$? = $ac_status" >&5
1828   (exit $ac_status); }; }; then
1829   for ac_declaration in \
1830    ''\
1831    '#include <stdlib.h>' \
1832    'extern "C" void std::exit (int) throw (); using std::exit;' \
1833    'extern "C" void std::exit (int); using std::exit;' \
1834    'extern "C" void exit (int) throw ();' \
1835    'extern "C" void exit (int);' \
1836    'void exit (int);'
1837 do
1838   cat >conftest.$ac_ext <<_ACEOF
1839 #line 1839 "configure"
1840 #include "confdefs.h"
1841 #include <stdlib.h>
1842 $ac_declaration
1843 int
1844 main ()
1845 {
1846 exit (42);
1847   ;
1848   return 0;
1849 }
1850 _ACEOF
1851 rm -f conftest.$ac_objext
1852 if { (eval echo "$as_me:1852: \"$ac_compile\"") >&5
1853   (eval $ac_compile) 2>&5
1854   ac_status=$?
1855   echo "$as_me:1855: \$? = $ac_status" >&5
1856   (exit $ac_status); } &&
1857          { ac_try='test -s conftest.$ac_objext'
1858   { (eval echo "$as_me:1858: \"$ac_try\"") >&5
1859   (eval $ac_try) 2>&5
1860   ac_status=$?
1861   echo "$as_me:1861: \$? = $ac_status" >&5
1862   (exit $ac_status); }; }; then
1863   :
1864 else
1865   echo "$as_me: failed program was:" >&5
1866 cat conftest.$ac_ext >&5
1867 continue
1868 fi
1869 rm -f conftest.$ac_objext conftest.$ac_ext
1870   cat >conftest.$ac_ext <<_ACEOF
1871 #line 1871 "configure"
1872 #include "confdefs.h"
1873 $ac_declaration
1874 int
1875 main ()
1876 {
1877 exit (42);
1878   ;
1879   return 0;
1880 }
1881 _ACEOF
1882 rm -f conftest.$ac_objext
1883 if { (eval echo "$as_me:1883: \"$ac_compile\"") >&5
1884   (eval $ac_compile) 2>&5
1885   ac_status=$?
1886   echo "$as_me:1886: \$? = $ac_status" >&5
1887   (exit $ac_status); } &&
1888          { ac_try='test -s conftest.$ac_objext'
1889   { (eval echo "$as_me:1889: \"$ac_try\"") >&5
1890   (eval $ac_try) 2>&5
1891   ac_status=$?
1892   echo "$as_me:1892: \$? = $ac_status" >&5
1893   (exit $ac_status); }; }; then
1894   break
1895 else
1896   echo "$as_me: failed program was:" >&5
1897 cat conftest.$ac_ext >&5
1898 fi
1899 rm -f conftest.$ac_objext conftest.$ac_ext
1900 done
1901 rm -rf conftest*
1902 if test -n "$ac_declaration"; then
1903   echo '#ifdef __cplusplus' >>confdefs.h
1904   echo $ac_declaration      >>confdefs.h
1905   echo '#endif'             >>confdefs.h
1906 fi
1907
1908 else
1909   echo "$as_me: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 ac_ext=c
1914 ac_cpp='$CPP $CPPFLAGS'
1915 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1916 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1917 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1918 ac_main_return=return
1919
1920 GCC_VERSION=none
1921 if test "$GCC" = yes ; then
1922         echo "$as_me:1922: checking version of $CC" >&5
1923 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1924         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1925         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1926         echo "$as_me:1926: result: $GCC_VERSION" >&5
1927 echo "${ECHO_T}$GCC_VERSION" >&6
1928 fi
1929
1930 ac_ext=c
1931 ac_cpp='$CPP $CPPFLAGS'
1932 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1933 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1934 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1935 ac_main_return=return
1936 echo "$as_me:1936: checking how to run the C preprocessor" >&5
1937 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1938 # On Suns, sometimes $CPP names a directory.
1939 if test -n "$CPP" && test -d "$CPP"; then
1940   CPP=
1941 fi
1942 if test -z "$CPP"; then
1943   if test "${ac_cv_prog_CPP+set}" = set; then
1944   echo $ECHO_N "(cached) $ECHO_C" >&6
1945 else
1946       # Double quotes because CPP needs to be expanded
1947     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1948     do
1949       ac_preproc_ok=false
1950 for ac_c_preproc_warn_flag in '' yes
1951 do
1952   # Use a header file that comes with gcc, so configuring glibc
1953   # with a fresh cross-compiler works.
1954   # On the NeXT, cc -E runs the code through the compiler's parser,
1955   # not just through cpp. "Syntax error" is here to catch this case.
1956   cat >conftest.$ac_ext <<_ACEOF
1957 #line 1957 "configure"
1958 #include "confdefs.h"
1959 #include <assert.h>
1960                      Syntax error
1961 _ACEOF
1962 if { (eval echo "$as_me:1962: \"$ac_cpp conftest.$ac_ext\"") >&5
1963   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1964   ac_status=$?
1965   egrep -v '^ *\+' conftest.er1 >conftest.err
1966   rm -f conftest.er1
1967   cat conftest.err >&5
1968   echo "$as_me:1968: \$? = $ac_status" >&5
1969   (exit $ac_status); } >/dev/null; then
1970   if test -s conftest.err; then
1971     ac_cpp_err=$ac_c_preproc_warn_flag
1972   else
1973     ac_cpp_err=
1974   fi
1975 else
1976   ac_cpp_err=yes
1977 fi
1978 if test -z "$ac_cpp_err"; then
1979   :
1980 else
1981   echo "$as_me: failed program was:" >&5
1982   cat conftest.$ac_ext >&5
1983   # Broken: fails on valid input.
1984 continue
1985 fi
1986 rm -f conftest.err conftest.$ac_ext
1987
1988   # OK, works on sane cases.  Now check whether non-existent headers
1989   # can be detected and how.
1990   cat >conftest.$ac_ext <<_ACEOF
1991 #line 1991 "configure"
1992 #include "confdefs.h"
1993 #include <ac_nonexistent.h>
1994 _ACEOF
1995 if { (eval echo "$as_me:1995: \"$ac_cpp conftest.$ac_ext\"") >&5
1996   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1997   ac_status=$?
1998   egrep -v '^ *\+' conftest.er1 >conftest.err
1999   rm -f conftest.er1
2000   cat conftest.err >&5
2001   echo "$as_me:2001: \$? = $ac_status" >&5
2002   (exit $ac_status); } >/dev/null; then
2003   if test -s conftest.err; then
2004     ac_cpp_err=$ac_c_preproc_warn_flag
2005   else
2006     ac_cpp_err=
2007   fi
2008 else
2009   ac_cpp_err=yes
2010 fi
2011 if test -z "$ac_cpp_err"; then
2012   # Broken: success on invalid input.
2013 continue
2014 else
2015   echo "$as_me: failed program was:" >&5
2016   cat conftest.$ac_ext >&5
2017   # Passes both tests.
2018 ac_preproc_ok=:
2019 break
2020 fi
2021 rm -f conftest.err conftest.$ac_ext
2022
2023 done
2024 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2025 rm -f conftest.err conftest.$ac_ext
2026 if $ac_preproc_ok; then
2027   break
2028 fi
2029
2030     done
2031     ac_cv_prog_CPP=$CPP
2032
2033 fi
2034   CPP=$ac_cv_prog_CPP
2035 else
2036   ac_cv_prog_CPP=$CPP
2037 fi
2038 echo "$as_me:2038: result: $CPP" >&5
2039 echo "${ECHO_T}$CPP" >&6
2040 ac_preproc_ok=false
2041 for ac_c_preproc_warn_flag in '' yes
2042 do
2043   # Use a header file that comes with gcc, so configuring glibc
2044   # with a fresh cross-compiler works.
2045   # On the NeXT, cc -E runs the code through the compiler's parser,
2046   # not just through cpp. "Syntax error" is here to catch this case.
2047   cat >conftest.$ac_ext <<_ACEOF
2048 #line 2048 "configure"
2049 #include "confdefs.h"
2050 #include <assert.h>
2051                      Syntax error
2052 _ACEOF
2053 if { (eval echo "$as_me:2053: \"$ac_cpp conftest.$ac_ext\"") >&5
2054   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2055   ac_status=$?
2056   egrep -v '^ *\+' conftest.er1 >conftest.err
2057   rm -f conftest.er1
2058   cat conftest.err >&5
2059   echo "$as_me:2059: \$? = $ac_status" >&5
2060   (exit $ac_status); } >/dev/null; then
2061   if test -s conftest.err; then
2062     ac_cpp_err=$ac_c_preproc_warn_flag
2063   else
2064     ac_cpp_err=
2065   fi
2066 else
2067   ac_cpp_err=yes
2068 fi
2069 if test -z "$ac_cpp_err"; then
2070   :
2071 else
2072   echo "$as_me: failed program was:" >&5
2073   cat conftest.$ac_ext >&5
2074   # Broken: fails on valid input.
2075 continue
2076 fi
2077 rm -f conftest.err conftest.$ac_ext
2078
2079   # OK, works on sane cases.  Now check whether non-existent headers
2080   # can be detected and how.
2081   cat >conftest.$ac_ext <<_ACEOF
2082 #line 2082 "configure"
2083 #include "confdefs.h"
2084 #include <ac_nonexistent.h>
2085 _ACEOF
2086 if { (eval echo "$as_me:2086: \"$ac_cpp conftest.$ac_ext\"") >&5
2087   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2088   ac_status=$?
2089   egrep -v '^ *\+' conftest.er1 >conftest.err
2090   rm -f conftest.er1
2091   cat conftest.err >&5
2092   echo "$as_me:2092: \$? = $ac_status" >&5
2093   (exit $ac_status); } >/dev/null; then
2094   if test -s conftest.err; then
2095     ac_cpp_err=$ac_c_preproc_warn_flag
2096   else
2097     ac_cpp_err=
2098   fi
2099 else
2100   ac_cpp_err=yes
2101 fi
2102 if test -z "$ac_cpp_err"; then
2103   # Broken: success on invalid input.
2104 continue
2105 else
2106   echo "$as_me: failed program was:" >&5
2107   cat conftest.$ac_ext >&5
2108   # Passes both tests.
2109 ac_preproc_ok=:
2110 break
2111 fi
2112 rm -f conftest.err conftest.$ac_ext
2113
2114 done
2115 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2116 rm -f conftest.err conftest.$ac_ext
2117 if $ac_preproc_ok; then
2118   :
2119 else
2120   { { echo "$as_me:2120: error: C preprocessor \"$CPP\" fails sanity check" >&5
2121 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2122    { (exit 1); exit 1; }; }
2123 fi
2124
2125 ac_ext=c
2126 ac_cpp='$CPP $CPPFLAGS'
2127 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2128 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2129 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2130 ac_main_return=return
2131
2132 if test $ac_cv_c_compiler_gnu = yes; then
2133     echo "$as_me:2133: checking whether $CC needs -traditional" >&5
2134 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2135 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2136   echo $ECHO_N "(cached) $ECHO_C" >&6
2137 else
2138     ac_pattern="Autoconf.*'x'"
2139   cat >conftest.$ac_ext <<_ACEOF
2140 #line 2140 "configure"
2141 #include "confdefs.h"
2142 #include <sgtty.h>
2143 int Autoconf = TIOCGETP;
2144 _ACEOF
2145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2146   egrep "$ac_pattern" >/dev/null 2>&1; then
2147   ac_cv_prog_gcc_traditional=yes
2148 else
2149   ac_cv_prog_gcc_traditional=no
2150 fi
2151 rm -rf conftest*
2152
2153   if test $ac_cv_prog_gcc_traditional = no; then
2154     cat >conftest.$ac_ext <<_ACEOF
2155 #line 2155 "configure"
2156 #include "confdefs.h"
2157 #include <termio.h>
2158 int Autoconf = TCGETA;
2159 _ACEOF
2160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2161   egrep "$ac_pattern" >/dev/null 2>&1; then
2162   ac_cv_prog_gcc_traditional=yes
2163 fi
2164 rm -rf conftest*
2165
2166   fi
2167 fi
2168 echo "$as_me:2168: result: $ac_cv_prog_gcc_traditional" >&5
2169 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2170   if test $ac_cv_prog_gcc_traditional = yes; then
2171     CC="$CC -traditional"
2172   fi
2173 fi
2174
2175 echo "$as_me:2175: checking whether $CC understands -c and -o together" >&5
2176 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2177 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2178   echo $ECHO_N "(cached) $ECHO_C" >&6
2179 else
2180
2181 cat > conftest.$ac_ext <<CF_EOF
2182 #include <stdio.h>
2183 int main()
2184 {
2185         ${cf_cv_main_return:-return}(0);
2186 }
2187 CF_EOF
2188 # We do the test twice because some compilers refuse to overwrite an
2189 # existing .o file with -o, though they will create one.
2190 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2191 if { (eval echo "$as_me:2191: \"$ac_try\"") >&5
2192   (eval $ac_try) 2>&5
2193   ac_status=$?
2194   echo "$as_me:2194: \$? = $ac_status" >&5
2195   (exit $ac_status); } &&
2196   test -f conftest2.$ac_objext && { (eval echo "$as_me:2196: \"$ac_try\"") >&5
2197   (eval $ac_try) 2>&5
2198   ac_status=$?
2199   echo "$as_me:2199: \$? = $ac_status" >&5
2200   (exit $ac_status); };
2201 then
2202   eval cf_cv_prog_CC_c_o=yes
2203 else
2204   eval cf_cv_prog_CC_c_o=no
2205 fi
2206 rm -rf conftest*
2207
2208 fi
2209 if test $cf_cv_prog_CC_c_o = yes; then
2210   echo "$as_me:2210: result: yes" >&5
2211 echo "${ECHO_T}yes" >&6
2212 else
2213   echo "$as_me:2213: result: no" >&5
2214 echo "${ECHO_T}no" >&6
2215 fi
2216
2217 echo "$as_me:2217: checking for POSIXized ISC" >&5
2218 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2219 if test -d /etc/conf/kconfig.d &&
2220    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2221 then
2222   echo "$as_me:2222: result: yes" >&5
2223 echo "${ECHO_T}yes" >&6
2224   ISC=yes # If later tests want to check for ISC.
2225
2226 cat >>confdefs.h <<\EOF
2227 #define _POSIX_SOURCE 1
2228 EOF
2229
2230   if test "$GCC" = yes; then
2231     CC="$CC -posix"
2232   else
2233     CC="$CC -Xp"
2234   fi
2235 else
2236   echo "$as_me:2236: result: no" >&5
2237 echo "${ECHO_T}no" >&6
2238   ISC=
2239 fi
2240
2241 # This should have been defined by AC_PROG_CC
2242 : ${CC:=cc}
2243
2244 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2245 # into CC.  This will not help with broken scripts that wrap the compiler with
2246 # options, but eliminates a more common category of user confusion.
2247 echo "$as_me:2247: checking \$CC variable" >&5
2248 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2249 case "$CC" in #(vi
2250 *[\ \   ]-[IUD]*)
2251         echo "$as_me:2251: result: broken" >&5
2252 echo "${ECHO_T}broken" >&6
2253         { echo "$as_me:2253: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2254 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2255         # humor him...
2256         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2257         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2258
2259 cf_fix_cppflags=no
2260 cf_new_cflags=
2261 cf_new_cppflags=
2262 cf_new_extra_cppflags=
2263
2264 for cf_add_cflags in $cf_flags
2265 do
2266 case $cf_fix_cppflags in
2267 no)
2268         case $cf_add_cflags in #(vi
2269         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2270                 case $cf_add_cflags in
2271                 -D*)
2272                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2273
2274                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2275                                 && test -z "${cf_tst_cflags}" \
2276                                 && cf_fix_cppflags=yes
2277
2278                         if test $cf_fix_cppflags = yes ; then
2279                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2280                                 continue
2281                         elif test "${cf_tst_cflags}" = "\"'" ; then
2282                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2283                                 continue
2284                         fi
2285                         ;;
2286                 esac
2287                 case "$CPPFLAGS" in
2288                 *$cf_add_cflags) #(vi
2289                         ;;
2290                 *) #(vi
2291                         case $cf_add_cflags in #(vi
2292                         -D*)
2293                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2294
2295 CPPFLAGS=`echo "$CPPFLAGS" | \
2296         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2297                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2298
2299                                 ;;
2300                         esac
2301                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2302                         ;;
2303                 esac
2304                 ;;
2305         *)
2306                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2307                 ;;
2308         esac
2309         ;;
2310 yes)
2311         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2312
2313         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2314
2315         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2316                 && test -z "${cf_tst_cflags}" \
2317                 && cf_fix_cppflags=no
2318         ;;
2319 esac
2320 done
2321
2322 if test -n "$cf_new_cflags" ; then
2323
2324         CFLAGS="$CFLAGS $cf_new_cflags"
2325 fi
2326
2327 if test -n "$cf_new_cppflags" ; then
2328
2329         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2330 fi
2331
2332 if test -n "$cf_new_extra_cppflags" ; then
2333
2334         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2335 fi
2336
2337         ;;
2338 *)
2339         echo "$as_me:2339: result: ok" >&5
2340 echo "${ECHO_T}ok" >&6
2341         ;;
2342 esac
2343
2344 echo "$as_me:2344: checking for ${CC:-cc} option to accept ANSI C" >&5
2345 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2346 if test "${cf_cv_ansi_cc+set}" = set; then
2347   echo $ECHO_N "(cached) $ECHO_C" >&6
2348 else
2349
2350 cf_cv_ansi_cc=no
2351 cf_save_CFLAGS="$CFLAGS"
2352 cf_save_CPPFLAGS="$CPPFLAGS"
2353 # Don't try gcc -ansi; that turns off useful extensions and
2354 # breaks some systems' header files.
2355 # AIX                   -qlanglvl=ansi
2356 # Ultrix and OSF/1      -std1
2357 # HP-UX                 -Aa -D_HPUX_SOURCE
2358 # SVR4                  -Xc
2359 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2360 for cf_arg in "-DCC_HAS_PROTOS" \
2361         "" \
2362         -qlanglvl=ansi \
2363         -std1 \
2364         -Ae \
2365         "-Aa -D_HPUX_SOURCE" \
2366         -Xc
2367 do
2368
2369 cf_fix_cppflags=no
2370 cf_new_cflags=
2371 cf_new_cppflags=
2372 cf_new_extra_cppflags=
2373
2374 for cf_add_cflags in $cf_arg
2375 do
2376 case $cf_fix_cppflags in
2377 no)
2378         case $cf_add_cflags in #(vi
2379         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2380                 case $cf_add_cflags in
2381                 -D*)
2382                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2383
2384                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2385                                 && test -z "${cf_tst_cflags}" \
2386                                 && cf_fix_cppflags=yes
2387
2388                         if test $cf_fix_cppflags = yes ; then
2389                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2390                                 continue
2391                         elif test "${cf_tst_cflags}" = "\"'" ; then
2392                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2393                                 continue
2394                         fi
2395                         ;;
2396                 esac
2397                 case "$CPPFLAGS" in
2398                 *$cf_add_cflags) #(vi
2399                         ;;
2400                 *) #(vi
2401                         case $cf_add_cflags in #(vi
2402                         -D*)
2403                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2404
2405 CPPFLAGS=`echo "$CPPFLAGS" | \
2406         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2407                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2408
2409                                 ;;
2410                         esac
2411                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2412                         ;;
2413                 esac
2414                 ;;
2415         *)
2416                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2417                 ;;
2418         esac
2419         ;;
2420 yes)
2421         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2422
2423         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2424
2425         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2426                 && test -z "${cf_tst_cflags}" \
2427                 && cf_fix_cppflags=no
2428         ;;
2429 esac
2430 done
2431
2432 if test -n "$cf_new_cflags" ; then
2433
2434         CFLAGS="$CFLAGS $cf_new_cflags"
2435 fi
2436
2437 if test -n "$cf_new_cppflags" ; then
2438
2439         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2440 fi
2441
2442 if test -n "$cf_new_extra_cppflags" ; then
2443
2444         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2445 fi
2446
2447         cat >conftest.$ac_ext <<_ACEOF
2448 #line 2448 "configure"
2449 #include "confdefs.h"
2450
2451 #ifndef CC_HAS_PROTOS
2452 #if !defined(__STDC__) || (__STDC__ != 1)
2453 choke me
2454 #endif
2455 #endif
2456
2457 int
2458 main ()
2459 {
2460
2461         int test (int i, double x);
2462         struct s1 {int (*f) (int a);};
2463         struct s2 {int (*f) (double a);};
2464   ;
2465   return 0;
2466 }
2467 _ACEOF
2468 rm -f conftest.$ac_objext
2469 if { (eval echo "$as_me:2469: \"$ac_compile\"") >&5
2470   (eval $ac_compile) 2>&5
2471   ac_status=$?
2472   echo "$as_me:2472: \$? = $ac_status" >&5
2473   (exit $ac_status); } &&
2474          { ac_try='test -s conftest.$ac_objext'
2475   { (eval echo "$as_me:2475: \"$ac_try\"") >&5
2476   (eval $ac_try) 2>&5
2477   ac_status=$?
2478   echo "$as_me:2478: \$? = $ac_status" >&5
2479   (exit $ac_status); }; }; then
2480   cf_cv_ansi_cc="$cf_arg"; break
2481 else
2482   echo "$as_me: failed program was:" >&5
2483 cat conftest.$ac_ext >&5
2484 fi
2485 rm -f conftest.$ac_objext conftest.$ac_ext
2486 done
2487 CFLAGS="$cf_save_CFLAGS"
2488 CPPFLAGS="$cf_save_CPPFLAGS"
2489
2490 fi
2491 echo "$as_me:2491: result: $cf_cv_ansi_cc" >&5
2492 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2493
2494 if test "$cf_cv_ansi_cc" != "no"; then
2495 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2496
2497 cf_fix_cppflags=no
2498 cf_new_cflags=
2499 cf_new_cppflags=
2500 cf_new_extra_cppflags=
2501
2502 for cf_add_cflags in $cf_cv_ansi_cc
2503 do
2504 case $cf_fix_cppflags in
2505 no)
2506         case $cf_add_cflags in #(vi
2507         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2508                 case $cf_add_cflags in
2509                 -D*)
2510                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2511
2512                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2513                                 && test -z "${cf_tst_cflags}" \
2514                                 && cf_fix_cppflags=yes
2515
2516                         if test $cf_fix_cppflags = yes ; then
2517                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2518                                 continue
2519                         elif test "${cf_tst_cflags}" = "\"'" ; then
2520                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2521                                 continue
2522                         fi
2523                         ;;
2524                 esac
2525                 case "$CPPFLAGS" in
2526                 *$cf_add_cflags) #(vi
2527                         ;;
2528                 *) #(vi
2529                         case $cf_add_cflags in #(vi
2530                         -D*)
2531                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2532
2533 CPPFLAGS=`echo "$CPPFLAGS" | \
2534         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2535                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2536
2537                                 ;;
2538                         esac
2539                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2540                         ;;
2541                 esac
2542                 ;;
2543         *)
2544                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2545                 ;;
2546         esac
2547         ;;
2548 yes)
2549         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2550
2551         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2552
2553         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2554                 && test -z "${cf_tst_cflags}" \
2555                 && cf_fix_cppflags=no
2556         ;;
2557 esac
2558 done
2559
2560 if test -n "$cf_new_cflags" ; then
2561
2562         CFLAGS="$CFLAGS $cf_new_cflags"
2563 fi
2564
2565 if test -n "$cf_new_cppflags" ; then
2566
2567         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2568 fi
2569
2570 if test -n "$cf_new_extra_cppflags" ; then
2571
2572         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2573 fi
2574
2575 else
2576         cat >>confdefs.h <<\EOF
2577 #define CC_HAS_PROTOS 1
2578 EOF
2579
2580 fi
2581 fi
2582
2583 if test "$cf_cv_ansi_cc" = "no"; then
2584         { { echo "$as_me:2584: error: Your compiler does not appear to recognize prototypes.
2585 You have the following choices:
2586         a. adjust your compiler options
2587         b. get an up-to-date compiler
2588         c. use a wrapper such as unproto" >&5
2589 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2590 You have the following choices:
2591         a. adjust your compiler options
2592         b. get an up-to-date compiler
2593         c. use a wrapper such as unproto" >&2;}
2594    { (exit 1); exit 1; }; }
2595 fi
2596
2597 case $cf_cv_system_name in
2598 os2*)
2599     CFLAGS="$CFLAGS -Zmt"
2600     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2601     CXXFLAGS="$CXXFLAGS -Zmt"
2602     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2603     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2604     ac_cv_exeext=.exe
2605     ;;
2606 esac
2607
2608 PROG_EXT="$EXEEXT"
2609
2610 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2611 #define PROG_EXT "$PROG_EXT"
2612 EOF
2613
2614 if test "$cross_compiling" = yes ; then
2615   LDCONFIG=:
2616 else
2617 case "$cf_cv_system_name" in #(vi
2618 dragonfly*|mirbsd*|freebsd*) #(vi
2619   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2620   ;;
2621 *) LDPATH=$PATH:/sbin:/usr/sbin
2622   # Extract the first word of "ldconfig", so it can be a program name with args.
2623 set dummy ldconfig; ac_word=$2
2624 echo "$as_me:2624: checking for $ac_word" >&5
2625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2626 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2627   echo $ECHO_N "(cached) $ECHO_C" >&6
2628 else
2629   case $LDCONFIG in
2630   [\\/]* | ?:[\\/]*)
2631   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2632   ;;
2633   *)
2634   ac_save_IFS=$IFS; IFS=$ac_path_separator
2635 ac_dummy="$LDPATH"
2636 for ac_dir in $ac_dummy; do
2637   IFS=$ac_save_IFS
2638   test -z "$ac_dir" && ac_dir=.
2639   if $as_executable_p "$ac_dir/$ac_word"; then
2640    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2641    echo "$as_me:2641: found $ac_dir/$ac_word" >&5
2642    break
2643 fi
2644 done
2645
2646   ;;
2647 esac
2648 fi
2649 LDCONFIG=$ac_cv_path_LDCONFIG
2650
2651 if test -n "$LDCONFIG"; then
2652   echo "$as_me:2652: result: $LDCONFIG" >&5
2653 echo "${ECHO_T}$LDCONFIG" >&6
2654 else
2655   echo "$as_me:2655: result: no" >&5
2656 echo "${ECHO_T}no" >&6
2657 fi
2658
2659   ;;
2660 esac
2661 fi
2662
2663 echo "$as_me:2663: checking if you want to ensure bool is consistent with C++" >&5
2664 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2665
2666 # Check whether --with-cxx or --without-cxx was given.
2667 if test "${with_cxx+set}" = set; then
2668   withval="$with_cxx"
2669   cf_with_cxx=$withval
2670 else
2671   cf_with_cxx=yes
2672 fi;
2673 echo "$as_me:2673: result: $cf_with_cxx" >&5
2674 echo "${ECHO_T}$cf_with_cxx" >&6
2675 if test "X$cf_with_cxx" = Xno ; then
2676         CXX=""
2677         GXX=""
2678 else
2679         # with autoconf 2.13, we can change the error to a warning:
2680                 ac_ext=cc
2681 ac_cpp='$CXXCPP $CPPFLAGS'
2682 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2685 ac_main_return=return
2686 if test -n "$ac_tool_prefix"; then
2687   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2688   do
2689     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2690 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2691 echo "$as_me:2691: checking for $ac_word" >&5
2692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2693 if test "${ac_cv_prog_CXX+set}" = set; then
2694   echo $ECHO_N "(cached) $ECHO_C" >&6
2695 else
2696   if test -n "$CXX"; then
2697   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2698 else
2699   ac_save_IFS=$IFS; IFS=$ac_path_separator
2700 ac_dummy="$PATH"
2701 for ac_dir in $ac_dummy; do
2702   IFS=$ac_save_IFS
2703   test -z "$ac_dir" && ac_dir=.
2704   $as_executable_p "$ac_dir/$ac_word" || continue
2705 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2706 echo "$as_me:2706: found $ac_dir/$ac_word" >&5
2707 break
2708 done
2709
2710 fi
2711 fi
2712 CXX=$ac_cv_prog_CXX
2713 if test -n "$CXX"; then
2714   echo "$as_me:2714: result: $CXX" >&5
2715 echo "${ECHO_T}$CXX" >&6
2716 else
2717   echo "$as_me:2717: result: no" >&5
2718 echo "${ECHO_T}no" >&6
2719 fi
2720
2721     test -n "$CXX" && break
2722   done
2723 fi
2724 if test -z "$CXX"; then
2725   ac_ct_CXX=$CXX
2726   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2727 do
2728   # Extract the first word of "$ac_prog", so it can be a program name with args.
2729 set dummy $ac_prog; ac_word=$2
2730 echo "$as_me:2730: checking for $ac_word" >&5
2731 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2732 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2733   echo $ECHO_N "(cached) $ECHO_C" >&6
2734 else
2735   if test -n "$ac_ct_CXX"; then
2736   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2737 else
2738   ac_save_IFS=$IFS; IFS=$ac_path_separator
2739 ac_dummy="$PATH"
2740 for ac_dir in $ac_dummy; do
2741   IFS=$ac_save_IFS
2742   test -z "$ac_dir" && ac_dir=.
2743   $as_executable_p "$ac_dir/$ac_word" || continue
2744 ac_cv_prog_ac_ct_CXX="$ac_prog"
2745 echo "$as_me:2745: found $ac_dir/$ac_word" >&5
2746 break
2747 done
2748
2749 fi
2750 fi
2751 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2752 if test -n "$ac_ct_CXX"; then
2753   echo "$as_me:2753: result: $ac_ct_CXX" >&5
2754 echo "${ECHO_T}$ac_ct_CXX" >&6
2755 else
2756   echo "$as_me:2756: result: no" >&5
2757 echo "${ECHO_T}no" >&6
2758 fi
2759
2760   test -n "$ac_ct_CXX" && break
2761 done
2762 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2763
2764   CXX=$ac_ct_CXX
2765 fi
2766
2767 # Provide some information about the compiler.
2768 echo "$as_me:2768:" \
2769      "checking for C++ compiler version" >&5
2770 ac_compiler=`set X $ac_compile; echo $2`
2771 { (eval echo "$as_me:2771: \"$ac_compiler --version </dev/null >&5\"") >&5
2772   (eval $ac_compiler --version </dev/null >&5) 2>&5
2773   ac_status=$?
2774   echo "$as_me:2774: \$? = $ac_status" >&5
2775   (exit $ac_status); }
2776 { (eval echo "$as_me:2776: \"$ac_compiler -v </dev/null >&5\"") >&5
2777   (eval $ac_compiler -v </dev/null >&5) 2>&5
2778   ac_status=$?
2779   echo "$as_me:2779: \$? = $ac_status" >&5
2780   (exit $ac_status); }
2781 { (eval echo "$as_me:2781: \"$ac_compiler -V </dev/null >&5\"") >&5
2782   (eval $ac_compiler -V </dev/null >&5) 2>&5
2783   ac_status=$?
2784   echo "$as_me:2784: \$? = $ac_status" >&5
2785   (exit $ac_status); }
2786
2787 echo "$as_me:2787: checking whether we are using the GNU C++ compiler" >&5
2788 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2789 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   cat >conftest.$ac_ext <<_ACEOF
2793 #line 2793 "configure"
2794 #include "confdefs.h"
2795
2796 int
2797 main ()
2798 {
2799 #ifndef __GNUC__
2800        choke me
2801 #endif
2802
2803   ;
2804   return 0;
2805 }
2806 _ACEOF
2807 rm -f conftest.$ac_objext
2808 if { (eval echo "$as_me:2808: \"$ac_compile\"") >&5
2809   (eval $ac_compile) 2>&5
2810   ac_status=$?
2811   echo "$as_me:2811: \$? = $ac_status" >&5
2812   (exit $ac_status); } &&
2813          { ac_try='test -s conftest.$ac_objext'
2814   { (eval echo "$as_me:2814: \"$ac_try\"") >&5
2815   (eval $ac_try) 2>&5
2816   ac_status=$?
2817   echo "$as_me:2817: \$? = $ac_status" >&5
2818   (exit $ac_status); }; }; then
2819   ac_compiler_gnu=yes
2820 else
2821   echo "$as_me: failed program was:" >&5
2822 cat conftest.$ac_ext >&5
2823 ac_compiler_gnu=no
2824 fi
2825 rm -f conftest.$ac_objext conftest.$ac_ext
2826 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2827
2828 fi
2829 echo "$as_me:2829: result: $ac_cv_cxx_compiler_gnu" >&5
2830 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2831 GXX=`test $ac_compiler_gnu = yes && echo yes`
2832 ac_test_CXXFLAGS=${CXXFLAGS+set}
2833 ac_save_CXXFLAGS=$CXXFLAGS
2834 CXXFLAGS="-g"
2835 echo "$as_me:2835: checking whether $CXX accepts -g" >&5
2836 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2837 if test "${ac_cv_prog_cxx_g+set}" = set; then
2838   echo $ECHO_N "(cached) $ECHO_C" >&6
2839 else
2840   cat >conftest.$ac_ext <<_ACEOF
2841 #line 2841 "configure"
2842 #include "confdefs.h"
2843
2844 int
2845 main ()
2846 {
2847
2848   ;
2849   return 0;
2850 }
2851 _ACEOF
2852 rm -f conftest.$ac_objext
2853 if { (eval echo "$as_me:2853: \"$ac_compile\"") >&5
2854   (eval $ac_compile) 2>&5
2855   ac_status=$?
2856   echo "$as_me:2856: \$? = $ac_status" >&5
2857   (exit $ac_status); } &&
2858          { ac_try='test -s conftest.$ac_objext'
2859   { (eval echo "$as_me:2859: \"$ac_try\"") >&5
2860   (eval $ac_try) 2>&5
2861   ac_status=$?
2862   echo "$as_me:2862: \$? = $ac_status" >&5
2863   (exit $ac_status); }; }; then
2864   ac_cv_prog_cxx_g=yes
2865 else
2866   echo "$as_me: failed program was:" >&5
2867 cat conftest.$ac_ext >&5
2868 ac_cv_prog_cxx_g=no
2869 fi
2870 rm -f conftest.$ac_objext conftest.$ac_ext
2871 fi
2872 echo "$as_me:2872: result: $ac_cv_prog_cxx_g" >&5
2873 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2874 if test "$ac_test_CXXFLAGS" = set; then
2875   CXXFLAGS=$ac_save_CXXFLAGS
2876 elif test $ac_cv_prog_cxx_g = yes; then
2877   if test "$GXX" = yes; then
2878     CXXFLAGS="-g -O2"
2879   else
2880     CXXFLAGS="-g"
2881   fi
2882 else
2883   if test "$GXX" = yes; then
2884     CXXFLAGS="-O2"
2885   else
2886     CXXFLAGS=
2887   fi
2888 fi
2889 for ac_declaration in \
2890    ''\
2891    '#include <stdlib.h>' \
2892    'extern "C" void std::exit (int) throw (); using std::exit;' \
2893    'extern "C" void std::exit (int); using std::exit;' \
2894    'extern "C" void exit (int) throw ();' \
2895    'extern "C" void exit (int);' \
2896    'void exit (int);'
2897 do
2898   cat >conftest.$ac_ext <<_ACEOF
2899 #line 2899 "configure"
2900 #include "confdefs.h"
2901 #include <stdlib.h>
2902 $ac_declaration
2903 int
2904 main ()
2905 {
2906 exit (42);
2907   ;
2908   return 0;
2909 }
2910 _ACEOF
2911 rm -f conftest.$ac_objext
2912 if { (eval echo "$as_me:2912: \"$ac_compile\"") >&5
2913   (eval $ac_compile) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); } &&
2917          { ac_try='test -s conftest.$ac_objext'
2918   { (eval echo "$as_me:2918: \"$ac_try\"") >&5
2919   (eval $ac_try) 2>&5
2920   ac_status=$?
2921   echo "$as_me:2921: \$? = $ac_status" >&5
2922   (exit $ac_status); }; }; then
2923   :
2924 else
2925   echo "$as_me: failed program was:" >&5
2926 cat conftest.$ac_ext >&5
2927 continue
2928 fi
2929 rm -f conftest.$ac_objext conftest.$ac_ext
2930   cat >conftest.$ac_ext <<_ACEOF
2931 #line 2931 "configure"
2932 #include "confdefs.h"
2933 $ac_declaration
2934 int
2935 main ()
2936 {
2937 exit (42);
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 rm -f conftest.$ac_objext
2943 if { (eval echo "$as_me:2943: \"$ac_compile\"") >&5
2944   (eval $ac_compile) 2>&5
2945   ac_status=$?
2946   echo "$as_me:2946: \$? = $ac_status" >&5
2947   (exit $ac_status); } &&
2948          { ac_try='test -s conftest.$ac_objext'
2949   { (eval echo "$as_me:2949: \"$ac_try\"") >&5
2950   (eval $ac_try) 2>&5
2951   ac_status=$?
2952   echo "$as_me:2952: \$? = $ac_status" >&5
2953   (exit $ac_status); }; }; then
2954   break
2955 else
2956   echo "$as_me: failed program was:" >&5
2957 cat conftest.$ac_ext >&5
2958 fi
2959 rm -f conftest.$ac_objext conftest.$ac_ext
2960 done
2961 rm -rf conftest*
2962 if test -n "$ac_declaration"; then
2963   echo '#ifdef __cplusplus' >>confdefs.h
2964   echo $ac_declaration      >>confdefs.h
2965   echo '#endif'             >>confdefs.h
2966 fi
2967
2968 ac_ext=c
2969 ac_cpp='$CPP $CPPFLAGS'
2970 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2971 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2972 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2973 ac_main_return=return
2974
2975                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2976         if test "$CXX" = "g++" ; then
2977                 # Extract the first word of "g++", so it can be a program name with args.
2978 set dummy g++; ac_word=$2
2979 echo "$as_me:2979: checking for $ac_word" >&5
2980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2981 if test "${ac_cv_path_CXX+set}" = set; then
2982   echo $ECHO_N "(cached) $ECHO_C" >&6
2983 else
2984   case $CXX in
2985   [\\/]* | ?:[\\/]*)
2986   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2987   ;;
2988   *)
2989   ac_save_IFS=$IFS; IFS=$ac_path_separator
2990 ac_dummy="$PATH"
2991 for ac_dir in $ac_dummy; do
2992   IFS=$ac_save_IFS
2993   test -z "$ac_dir" && ac_dir=.
2994   if $as_executable_p "$ac_dir/$ac_word"; then
2995    ac_cv_path_CXX="$ac_dir/$ac_word"
2996    echo "$as_me:2996: found $ac_dir/$ac_word" >&5
2997    break
2998 fi
2999 done
3000
3001   ;;
3002 esac
3003 fi
3004 CXX=$ac_cv_path_CXX
3005
3006 if test -n "$CXX"; then
3007   echo "$as_me:3007: result: $CXX" >&5
3008 echo "${ECHO_T}$CXX" >&6
3009 else
3010   echo "$as_me:3010: result: no" >&5
3011 echo "${ECHO_T}no" >&6
3012 fi
3013
3014         fi
3015         case "x$CXX" in #(vi
3016         x|xg++)
3017                 { echo "$as_me:3017: WARNING: You don't have any C++ compiler, too bad" >&5
3018 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3019                 cf_with_cxx=no; CXX=""; GXX="";
3020                 ;;
3021         esac
3022 fi
3023
3024 GXX_VERSION=none
3025 if test "$GXX" = yes; then
3026         echo "$as_me:3026: checking version of ${CXX:-g++}" >&5
3027 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3028         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3029         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3030         echo "$as_me:3030: result: $GXX_VERSION" >&5
3031 echo "${ECHO_T}$GXX_VERSION" >&6
3032 fi
3033
3034 case $GXX_VERSION in
3035 1*|2.[0-6]*)
3036         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3037         # cf_cxx_library=no
3038         { echo "$as_me:3038: WARNING: templates do not work" >&5
3039 echo "$as_me: WARNING: templates do not work" >&2;}
3040         ;;
3041 esac
3042
3043 echo "$as_me:3043: checking if you want to build C++ binding and demo" >&5
3044 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3045
3046 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3047 if test "${with_cxx_binding+set}" = set; then
3048   withval="$with_cxx_binding"
3049   cf_with_cxx_binding=$withval
3050 else
3051   cf_with_cxx_binding=$cf_with_cxx
3052 fi;
3053 echo "$as_me:3053: result: $cf_with_cxx_binding" >&5
3054 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3055
3056 echo "$as_me:3056: checking if you want to build with Ada95" >&5
3057 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3058 echo "$as_me:3058: result: $cf_with_ada" >&5
3059 echo "${ECHO_T}$cf_with_ada" >&6
3060
3061 echo "$as_me:3061: checking if you want to install manpages" >&5
3062 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3063
3064 # Check whether --with-manpages or --without-manpages was given.
3065 if test "${with_manpages+set}" = set; then
3066   withval="$with_manpages"
3067   cf_with_manpages=$withval
3068 else
3069   cf_with_manpages=yes
3070 fi;
3071 echo "$as_me:3071: result: $cf_with_manpages" >&5
3072 echo "${ECHO_T}$cf_with_manpages" >&6
3073
3074 echo "$as_me:3074: checking if you want to build programs such as tic" >&5
3075 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3076
3077 # Check whether --with-progs or --without-progs was given.
3078 if test "${with_progs+set}" = set; then
3079   withval="$with_progs"
3080   cf_with_progs=$withval
3081 else
3082   cf_with_progs=yes
3083 fi;
3084 echo "$as_me:3084: result: $cf_with_progs" >&5
3085 echo "${ECHO_T}$cf_with_progs" >&6
3086
3087 echo "$as_me:3087: checking if you want to build test-programs" >&5
3088 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3089
3090 # Check whether --with-tests or --without-tests was given.
3091 if test "${with_tests+set}" = set; then
3092   withval="$with_tests"
3093   cf_with_tests=$withval
3094 else
3095   cf_with_tests=yes
3096 fi;
3097 echo "$as_me:3097: result: $cf_with_tests" >&5
3098 echo "${ECHO_T}$cf_with_tests" >&6
3099
3100 echo "$as_me:3100: checking if you wish to install curses.h" >&5
3101 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3102
3103 # Check whether --with-curses-h or --without-curses-h was given.
3104 if test "${with_curses_h+set}" = set; then
3105   withval="$with_curses_h"
3106   with_curses_h=$withval
3107 else
3108   with_curses_h=yes
3109 fi;
3110 echo "$as_me:3110: result: $with_curses_h" >&5
3111 echo "${ECHO_T}$with_curses_h" >&6
3112
3113 modules_to_build="ncurses"
3114 if test "X$cf_with_progs" != Xno ; then
3115 modules_to_build="$modules_to_build progs tack"
3116 fi
3117 modules_to_build="$modules_to_build panel menu form"
3118
3119 test "$program_prefix" != NONE &&
3120   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3121 # Use a double $ so make ignores it.
3122 test "$program_suffix" != NONE &&
3123   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3124 # Double any \ or $.  echo might interpret backslashes.
3125 # By default was `s,x,x', remove it if useless.
3126 cat <<\_ACEOF >conftest.sed
3127 s/[\\$]/&&/g;s/;s,x,x,$//
3128 _ACEOF
3129 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3130 rm conftest.sed
3131
3132 for ac_prog in mawk gawk nawk awk
3133 do
3134   # Extract the first word of "$ac_prog", so it can be a program name with args.
3135 set dummy $ac_prog; ac_word=$2
3136 echo "$as_me:3136: checking for $ac_word" >&5
3137 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3138 if test "${ac_cv_prog_AWK+set}" = set; then
3139   echo $ECHO_N "(cached) $ECHO_C" >&6
3140 else
3141   if test -n "$AWK"; then
3142   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3143 else
3144   ac_save_IFS=$IFS; IFS=$ac_path_separator
3145 ac_dummy="$PATH"
3146 for ac_dir in $ac_dummy; do
3147   IFS=$ac_save_IFS
3148   test -z "$ac_dir" && ac_dir=.
3149   $as_executable_p "$ac_dir/$ac_word" || continue
3150 ac_cv_prog_AWK="$ac_prog"
3151 echo "$as_me:3151: found $ac_dir/$ac_word" >&5
3152 break
3153 done
3154
3155 fi
3156 fi
3157 AWK=$ac_cv_prog_AWK
3158 if test -n "$AWK"; then
3159   echo "$as_me:3159: result: $AWK" >&5
3160 echo "${ECHO_T}$AWK" >&6
3161 else
3162   echo "$as_me:3162: result: no" >&5
3163 echo "${ECHO_T}no" >&6
3164 fi
3165
3166   test -n "$AWK" && break
3167 done
3168
3169 test -z "$AWK" && { { echo "$as_me:3169: error: No awk program found" >&5
3170 echo "$as_me: error: No awk program found" >&2;}
3171    { (exit 1); exit 1; }; }
3172
3173 echo "$as_me:3173: checking for egrep" >&5
3174 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3175 if test "${ac_cv_prog_egrep+set}" = set; then
3176   echo $ECHO_N "(cached) $ECHO_C" >&6
3177 else
3178   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3179     then ac_cv_prog_egrep='grep -E'
3180     else ac_cv_prog_egrep='egrep'
3181     fi
3182 fi
3183 echo "$as_me:3183: result: $ac_cv_prog_egrep" >&5
3184 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3185  EGREP=$ac_cv_prog_egrep
3186
3187 test -z "$EGREP" && { { echo "$as_me:3187: error: No egrep program found" >&5
3188 echo "$as_me: error: No egrep program found" >&2;}
3189    { (exit 1); exit 1; }; }
3190
3191 # Find a good install program.  We prefer a C program (faster),
3192 # so one script is as good as another.  But avoid the broken or
3193 # incompatible versions:
3194 # SysV /etc/install, /usr/sbin/install
3195 # SunOS /usr/etc/install
3196 # IRIX /sbin/install
3197 # AIX /bin/install
3198 # AmigaOS /C/install, which installs bootblocks on floppy discs
3199 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3200 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3201 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3202 # ./install, which can be erroneously created by make from ./install.sh.
3203 echo "$as_me:3203: checking for a BSD compatible install" >&5
3204 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3205 if test -z "$INSTALL"; then
3206 if test "${ac_cv_path_install+set}" = set; then
3207   echo $ECHO_N "(cached) $ECHO_C" >&6
3208 else
3209     ac_save_IFS=$IFS; IFS=$ac_path_separator
3210   for ac_dir in $PATH; do
3211     IFS=$ac_save_IFS
3212     # Account for people who put trailing slashes in PATH elements.
3213     case $ac_dir/ in
3214     / | ./ | .// | /cC/* \
3215     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3216     | /usr/ucb/* ) ;;
3217     *)
3218       # OSF1 and SCO ODT 3.0 have their own names for install.
3219       # Don't use installbsd from OSF since it installs stuff as root
3220       # by default.
3221       for ac_prog in ginstall scoinst install; do
3222         if $as_executable_p "$ac_dir/$ac_prog"; then
3223           if test $ac_prog = install &&
3224             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3225             # AIX install.  It has an incompatible calling convention.
3226             :
3227           elif test $ac_prog = install &&
3228             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3229             # program-specific install script used by HP pwplus--don't use.
3230             :
3231           else
3232             ac_cv_path_install="$ac_dir/$ac_prog -c"
3233             break 2
3234           fi
3235         fi
3236       done
3237       ;;
3238     esac
3239   done
3240
3241 fi
3242   if test "${ac_cv_path_install+set}" = set; then
3243     INSTALL=$ac_cv_path_install
3244   else
3245     # As a last resort, use the slow shell script.  We don't cache a
3246     # path for INSTALL within a source directory, because that will
3247     # break other packages using the cache if that directory is
3248     # removed, or if the path is relative.
3249     INSTALL=$ac_install_sh
3250   fi
3251 fi
3252 echo "$as_me:3252: result: $INSTALL" >&5
3253 echo "${ECHO_T}$INSTALL" >&6
3254
3255 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3256 # It thinks the first close brace ends the variable substitution.
3257 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3258
3259 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3260
3261 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3262
3263 case $INSTALL in
3264 /*)
3265   ;;
3266 *)
3267   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3268   test -z "$cf_dir" && cf_dir=.
3269   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3270   ;;
3271 esac
3272
3273 for ac_prog in tdlint lint alint splint lclint
3274 do
3275   # Extract the first word of "$ac_prog", so it can be a program name with args.
3276 set dummy $ac_prog; ac_word=$2
3277 echo "$as_me:3277: checking for $ac_word" >&5
3278 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3279 if test "${ac_cv_prog_LINT+set}" = set; then
3280   echo $ECHO_N "(cached) $ECHO_C" >&6
3281 else
3282   if test -n "$LINT"; then
3283   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3284 else
3285   ac_save_IFS=$IFS; IFS=$ac_path_separator
3286 ac_dummy="$PATH"
3287 for ac_dir in $ac_dummy; do
3288   IFS=$ac_save_IFS
3289   test -z "$ac_dir" && ac_dir=.
3290   $as_executable_p "$ac_dir/$ac_word" || continue
3291 ac_cv_prog_LINT="$ac_prog"
3292 echo "$as_me:3292: found $ac_dir/$ac_word" >&5
3293 break
3294 done
3295
3296 fi
3297 fi
3298 LINT=$ac_cv_prog_LINT
3299 if test -n "$LINT"; then
3300   echo "$as_me:3300: result: $LINT" >&5
3301 echo "${ECHO_T}$LINT" >&6
3302 else
3303   echo "$as_me:3303: result: no" >&5
3304 echo "${ECHO_T}no" >&6
3305 fi
3306
3307   test -n "$LINT" && break
3308 done
3309
3310 echo "$as_me:3310: checking whether ln -s works" >&5
3311 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3312 LN_S=$as_ln_s
3313 if test "$LN_S" = "ln -s"; then
3314   echo "$as_me:3314: result: yes" >&5
3315 echo "${ECHO_T}yes" >&6
3316 else
3317   echo "$as_me:3317: result: no, using $LN_S" >&5
3318 echo "${ECHO_T}no, using $LN_S" >&6
3319 fi
3320
3321 echo "$as_me:3321: checking if $LN_S -f options work" >&5
3322 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3323
3324 rm -f conf$$.src conf$$dst
3325 echo >conf$$.dst
3326 echo first >conf$$.src
3327 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3328         cf_prog_ln_sf=yes
3329 else
3330         cf_prog_ln_sf=no
3331 fi
3332 rm -f conf$$.dst conf$$src
3333 echo "$as_me:3333: result: $cf_prog_ln_sf" >&5
3334 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3335
3336 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3337
3338 echo "$as_me:3338: checking for long file names" >&5
3339 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3340 if test "${ac_cv_sys_long_file_names+set}" = set; then
3341   echo $ECHO_N "(cached) $ECHO_C" >&6
3342 else
3343   ac_cv_sys_long_file_names=yes
3344 # Test for long file names in all the places we know might matter:
3345 #      .                the current directory, where building will happen
3346 #      $prefix/lib      where we will be installing things
3347 #      $exec_prefix/lib likewise
3348 # eval it to expand exec_prefix.
3349 #      $TMPDIR          if set, where it might want to write temporary files
3350 # if $TMPDIR is not set:
3351 #      /tmp             where it might want to write temporary files
3352 #      /var/tmp         likewise
3353 #      /usr/tmp         likewise
3354 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3355   ac_tmpdirs=$TMPDIR
3356 else
3357   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3358 fi
3359 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3360   test -d $ac_dir || continue
3361   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3362   ac_xdir=$ac_dir/cf$$
3363   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3364   ac_tf1=$ac_xdir/conftest9012345
3365   ac_tf2=$ac_xdir/conftest9012346
3366   (echo 1 >$ac_tf1) 2>/dev/null
3367   (echo 2 >$ac_tf2) 2>/dev/null
3368   ac_val=`cat $ac_tf1 2>/dev/null`
3369   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3370     ac_cv_sys_long_file_names=no
3371     rm -rf $ac_xdir 2>/dev/null
3372     break
3373   fi
3374   rm -rf $ac_xdir 2>/dev/null
3375 done
3376 fi
3377 echo "$as_me:3377: result: $ac_cv_sys_long_file_names" >&5
3378 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3379 if test $ac_cv_sys_long_file_names = yes; then
3380
3381 cat >>confdefs.h <<\EOF
3382 #define HAVE_LONG_FILE_NAMES 1
3383 EOF
3384
3385 fi
3386
3387 # if we find pkg-config, check if we should install the ".pc" files.
3388
3389 echo "$as_me:3389: checking if you want to use pkg-config" >&5
3390 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3391
3392 # Check whether --with-pkg-config or --without-pkg-config was given.
3393 if test "${with_pkg_config+set}" = set; then
3394   withval="$with_pkg_config"
3395   cf_pkg_config=$withval
3396 else
3397   cf_pkg_config=yes
3398 fi;
3399 echo "$as_me:3399: result: $cf_pkg_config" >&5
3400 echo "${ECHO_T}$cf_pkg_config" >&6
3401
3402 case $cf_pkg_config in #(vi
3403 no) #(vi
3404         PKG_CONFIG=none
3405         ;;
3406 yes) #(vi
3407
3408 if test -n "$ac_tool_prefix"; then
3409   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3410 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3411 echo "$as_me:3411: checking for $ac_word" >&5
3412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3413 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3414   echo $ECHO_N "(cached) $ECHO_C" >&6
3415 else
3416   case $PKG_CONFIG in
3417   [\\/]* | ?:[\\/]*)
3418   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3419   ;;
3420   *)
3421   ac_save_IFS=$IFS; IFS=$ac_path_separator
3422 ac_dummy="$PATH"
3423 for ac_dir in $ac_dummy; do
3424   IFS=$ac_save_IFS
3425   test -z "$ac_dir" && ac_dir=.
3426   if $as_executable_p "$ac_dir/$ac_word"; then
3427    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3428    echo "$as_me:3428: found $ac_dir/$ac_word" >&5
3429    break
3430 fi
3431 done
3432
3433   ;;
3434 esac
3435 fi
3436 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3437
3438 if test -n "$PKG_CONFIG"; then
3439   echo "$as_me:3439: result: $PKG_CONFIG" >&5
3440 echo "${ECHO_T}$PKG_CONFIG" >&6
3441 else
3442   echo "$as_me:3442: result: no" >&5
3443 echo "${ECHO_T}no" >&6
3444 fi
3445
3446 fi
3447 if test -z "$ac_cv_path_PKG_CONFIG"; then
3448   ac_pt_PKG_CONFIG=$PKG_CONFIG
3449   # Extract the first word of "pkg-config", so it can be a program name with args.
3450 set dummy pkg-config; ac_word=$2
3451 echo "$as_me:3451: checking for $ac_word" >&5
3452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3453 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3454   echo $ECHO_N "(cached) $ECHO_C" >&6
3455 else
3456   case $ac_pt_PKG_CONFIG in
3457   [\\/]* | ?:[\\/]*)
3458   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3459   ;;
3460   *)
3461   ac_save_IFS=$IFS; IFS=$ac_path_separator
3462 ac_dummy="$PATH"
3463 for ac_dir in $ac_dummy; do
3464   IFS=$ac_save_IFS
3465   test -z "$ac_dir" && ac_dir=.
3466   if $as_executable_p "$ac_dir/$ac_word"; then
3467    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3468    echo "$as_me:3468: found $ac_dir/$ac_word" >&5
3469    break
3470 fi
3471 done
3472
3473   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3474   ;;
3475 esac
3476 fi
3477 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3478
3479 if test -n "$ac_pt_PKG_CONFIG"; then
3480   echo "$as_me:3480: result: $ac_pt_PKG_CONFIG" >&5
3481 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3482 else
3483   echo "$as_me:3483: result: no" >&5
3484 echo "${ECHO_T}no" >&6
3485 fi
3486
3487   PKG_CONFIG=$ac_pt_PKG_CONFIG
3488 else
3489   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3490 fi
3491
3492         ;;
3493 *)
3494         PKG_CONFIG=$withval
3495         ;;
3496 esac
3497
3498 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3499 if test "$PKG_CONFIG" != none ; then
3500
3501 if test "x$prefix" != xNONE; then
3502   cf_path_syntax="$prefix"
3503 else
3504   cf_path_syntax="$ac_default_prefix"
3505 fi
3506
3507 case ".$PKG_CONFIG" in #(vi
3508 .\$\(*\)*|.\'*\'*) #(vi
3509   ;;
3510 ..|./*|.\\*) #(vi
3511   ;;
3512 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3513   ;;
3514 .\${*prefix}*|.\${*dir}*) #(vi
3515   eval PKG_CONFIG="$PKG_CONFIG"
3516   case ".$PKG_CONFIG" in #(vi
3517   .NONE/*)
3518     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3519     ;;
3520   esac
3521   ;; #(vi
3522 .no|.NONE/*)
3523   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3524   ;;
3525 *)
3526   { { echo "$as_me:3526: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3527 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3528    { (exit 1); exit 1; }; }
3529   ;;
3530 esac
3531
3532 fi
3533
3534 if test "$PKG_CONFIG" != none ; then
3535         echo "$as_me:3535: checking for $PKG_CONFIG library directory" >&5
3536 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3537
3538 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3539 if test "${with_pkg_config_libdir+set}" = set; then
3540   withval="$with_pkg_config_libdir"
3541   PKG_CONFIG_LIBDIR=$withval
3542 else
3543   PKG_CONFIG_LIBDIR=yes
3544 fi;
3545
3546         case x$PKG_CONFIG_LIBDIR in #(vi
3547         x/*) #(vi
3548                 ;;
3549         xyes) #(vi
3550                 # look for the library directory using the same prefix as the executable
3551                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3552                 case x`(arch) 2>/dev/null` in #(vi
3553                 *64) #(vi
3554                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3555                         do
3556                                 if test -d $cf_config/pkgconfig
3557                                 then
3558                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3559                                         break
3560                                 fi
3561                         done
3562                         ;;
3563                 *)
3564                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3565                         ;;
3566                 esac
3567                 ;;
3568         *)
3569                 ;;
3570         esac
3571
3572         echo "$as_me:3572: result: $PKG_CONFIG_LIBDIR" >&5
3573 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3574 fi
3575
3576 if test "$PKG_CONFIG" != none ; then
3577         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3578                 echo "$as_me:3578: checking if we should install .pc files for $PKG_CONFIG" >&5
3579 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3580
3581 # Check whether --enable-pc-files or --disable-pc-files was given.
3582 if test "${enable_pc_files+set}" = set; then
3583   enableval="$enable_pc_files"
3584   enable_pc_files=$enableval
3585 else
3586   enable_pc_files=no
3587 fi;
3588                 echo "$as_me:3588: result: $enable_pc_files" >&5
3589 echo "${ECHO_T}$enable_pc_files" >&6
3590         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3591                 enable_pc_files=no
3592                 { echo "$as_me:3592: WARNING: did not find $PKG_CONFIG library" >&5
3593 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3594         fi
3595 else
3596         enable_pc_files=no
3597 fi
3598
3599 echo "$as_me:3599: checking if we should assume mixed-case filenames" >&5
3600 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3601
3602 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3603 if test "${enable_mixed_case+set}" = set; then
3604   enableval="$enable_mixed_case"
3605   enable_mixedcase=$enableval
3606 else
3607   enable_mixedcase=auto
3608 fi;
3609 echo "$as_me:3609: result: $enable_mixedcase" >&5
3610 echo "${ECHO_T}$enable_mixedcase" >&6
3611 if test "$enable_mixedcase" = "auto" ; then
3612
3613 echo "$as_me:3613: checking if filesystem supports mixed-case filenames" >&5
3614 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3615 if test "${cf_cv_mixedcase+set}" = set; then
3616   echo $ECHO_N "(cached) $ECHO_C" >&6
3617 else
3618
3619 if test "$cross_compiling" = yes ; then
3620         case $target_alias in #(vi
3621         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3622                 cf_cv_mixedcase=no
3623                 ;;
3624         *)
3625                 cf_cv_mixedcase=yes
3626                 ;;
3627         esac
3628 else
3629         rm -f conftest CONFTEST
3630         echo test >conftest
3631         if test -f CONFTEST ; then
3632                 cf_cv_mixedcase=no
3633         else
3634                 cf_cv_mixedcase=yes
3635         fi
3636         rm -f conftest CONFTEST
3637 fi
3638
3639 fi
3640 echo "$as_me:3640: result: $cf_cv_mixedcase" >&5
3641 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3642 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3643 #define MIXEDCASE_FILENAMES 1
3644 EOF
3645
3646 else
3647     cf_cv_mixedcase=$enable_mixedcase
3648     if test "$enable_mixedcase" = "yes" ; then
3649         cat >>confdefs.h <<\EOF
3650 #define MIXEDCASE_FILENAMES 1
3651 EOF
3652
3653     fi
3654 fi
3655
3656 # do this after mixed-case option (tags/TAGS is not as important as tic).
3657 echo "$as_me:3657: checking whether ${MAKE-make} sets \${MAKE}" >&5
3658 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3659 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3660 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3661   echo $ECHO_N "(cached) $ECHO_C" >&6
3662 else
3663   cat >conftest.make <<\EOF
3664 all:
3665         @echo 'ac_maketemp="${MAKE}"'
3666 EOF
3667 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3668 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3669 if test -n "$ac_maketemp"; then
3670   eval ac_cv_prog_make_${ac_make}_set=yes
3671 else
3672   eval ac_cv_prog_make_${ac_make}_set=no
3673 fi
3674 rm -f conftest.make
3675 fi
3676 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3677   echo "$as_me:3677: result: yes" >&5
3678 echo "${ECHO_T}yes" >&6
3679   SET_MAKE=
3680 else
3681   echo "$as_me:3681: result: no" >&5
3682 echo "${ECHO_T}no" >&6
3683   SET_MAKE="MAKE=${MAKE-make}"
3684 fi
3685
3686 for ac_prog in exctags ctags
3687 do
3688   # Extract the first word of "$ac_prog", so it can be a program name with args.
3689 set dummy $ac_prog; ac_word=$2
3690 echo "$as_me:3690: checking for $ac_word" >&5
3691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3692 if test "${ac_cv_prog_CTAGS+set}" = set; then
3693   echo $ECHO_N "(cached) $ECHO_C" >&6
3694 else
3695   if test -n "$CTAGS"; then
3696   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3697 else
3698   ac_save_IFS=$IFS; IFS=$ac_path_separator
3699 ac_dummy="$PATH"
3700 for ac_dir in $ac_dummy; do
3701   IFS=$ac_save_IFS
3702   test -z "$ac_dir" && ac_dir=.
3703   $as_executable_p "$ac_dir/$ac_word" || continue
3704 ac_cv_prog_CTAGS="$ac_prog"
3705 echo "$as_me:3705: found $ac_dir/$ac_word" >&5
3706 break
3707 done
3708
3709 fi
3710 fi
3711 CTAGS=$ac_cv_prog_CTAGS
3712 if test -n "$CTAGS"; then
3713   echo "$as_me:3713: result: $CTAGS" >&5
3714 echo "${ECHO_T}$CTAGS" >&6
3715 else
3716   echo "$as_me:3716: result: no" >&5
3717 echo "${ECHO_T}no" >&6
3718 fi
3719
3720   test -n "$CTAGS" && break
3721 done
3722
3723 for ac_prog in exetags etags
3724 do
3725   # Extract the first word of "$ac_prog", so it can be a program name with args.
3726 set dummy $ac_prog; ac_word=$2
3727 echo "$as_me:3727: checking for $ac_word" >&5
3728 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3729 if test "${ac_cv_prog_ETAGS+set}" = set; then
3730   echo $ECHO_N "(cached) $ECHO_C" >&6
3731 else
3732   if test -n "$ETAGS"; then
3733   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3734 else
3735   ac_save_IFS=$IFS; IFS=$ac_path_separator
3736 ac_dummy="$PATH"
3737 for ac_dir in $ac_dummy; do
3738   IFS=$ac_save_IFS
3739   test -z "$ac_dir" && ac_dir=.
3740   $as_executable_p "$ac_dir/$ac_word" || continue
3741 ac_cv_prog_ETAGS="$ac_prog"
3742 echo "$as_me:3742: found $ac_dir/$ac_word" >&5
3743 break
3744 done
3745
3746 fi
3747 fi
3748 ETAGS=$ac_cv_prog_ETAGS
3749 if test -n "$ETAGS"; then
3750   echo "$as_me:3750: result: $ETAGS" >&5
3751 echo "${ECHO_T}$ETAGS" >&6
3752 else
3753   echo "$as_me:3753: result: no" >&5
3754 echo "${ECHO_T}no" >&6
3755 fi
3756
3757   test -n "$ETAGS" && break
3758 done
3759
3760 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3761 set dummy ${CTAGS:-ctags}; ac_word=$2
3762 echo "$as_me:3762: checking for $ac_word" >&5
3763 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3764 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3765   echo $ECHO_N "(cached) $ECHO_C" >&6
3766 else
3767   if test -n "$MAKE_LOWER_TAGS"; then
3768   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3769 else
3770   ac_save_IFS=$IFS; IFS=$ac_path_separator
3771 ac_dummy="$PATH"
3772 for ac_dir in $ac_dummy; do
3773   IFS=$ac_save_IFS
3774   test -z "$ac_dir" && ac_dir=.
3775   $as_executable_p "$ac_dir/$ac_word" || continue
3776 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3777 echo "$as_me:3777: found $ac_dir/$ac_word" >&5
3778 break
3779 done
3780
3781   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3782 fi
3783 fi
3784 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3785 if test -n "$MAKE_LOWER_TAGS"; then
3786   echo "$as_me:3786: result: $MAKE_LOWER_TAGS" >&5
3787 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3788 else
3789   echo "$as_me:3789: result: no" >&5
3790 echo "${ECHO_T}no" >&6
3791 fi
3792
3793 if test "$cf_cv_mixedcase" = yes ; then
3794         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3795 set dummy ${ETAGS:-etags}; ac_word=$2
3796 echo "$as_me:3796: checking for $ac_word" >&5
3797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3798 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3799   echo $ECHO_N "(cached) $ECHO_C" >&6
3800 else
3801   if test -n "$MAKE_UPPER_TAGS"; then
3802   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3803 else
3804   ac_save_IFS=$IFS; IFS=$ac_path_separator
3805 ac_dummy="$PATH"
3806 for ac_dir in $ac_dummy; do
3807   IFS=$ac_save_IFS
3808   test -z "$ac_dir" && ac_dir=.
3809   $as_executable_p "$ac_dir/$ac_word" || continue
3810 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3811 echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3812 break
3813 done
3814
3815   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3816 fi
3817 fi
3818 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3819 if test -n "$MAKE_UPPER_TAGS"; then
3820   echo "$as_me:3820: result: $MAKE_UPPER_TAGS" >&5
3821 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3822 else
3823   echo "$as_me:3823: result: no" >&5
3824 echo "${ECHO_T}no" >&6
3825 fi
3826
3827 else
3828         MAKE_UPPER_TAGS=no
3829 fi
3830
3831 if test "$MAKE_UPPER_TAGS" = yes ; then
3832         MAKE_UPPER_TAGS=
3833 else
3834         MAKE_UPPER_TAGS="#"
3835 fi
3836
3837 if test "$MAKE_LOWER_TAGS" = yes ; then
3838         MAKE_LOWER_TAGS=
3839 else
3840         MAKE_LOWER_TAGS="#"
3841 fi
3842
3843 echo "$as_me:3843: checking for makeflags variable" >&5
3844 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3845 if test "${cf_cv_makeflags+set}" = set; then
3846   echo $ECHO_N "(cached) $ECHO_C" >&6
3847 else
3848
3849         cf_cv_makeflags=''
3850         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3851         do
3852                 cat >cf_makeflags.tmp <<CF_EOF
3853 SHELL = /bin/sh
3854 all :
3855         @ echo '.$cf_option'
3856 CF_EOF
3857                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3858                 case "$cf_result" in
3859                 .*k)
3860                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3861                         case "$cf_result" in
3862                         .*CC=*) cf_cv_makeflags=
3863                                 ;;
3864                         *)      cf_cv_makeflags=$cf_option
3865                                 ;;
3866                         esac
3867                         break
3868                         ;;
3869                 .-)     ;;
3870                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3871                         ;;
3872                 esac
3873         done
3874         rm -f cf_makeflags.tmp
3875
3876 fi
3877 echo "$as_me:3877: result: $cf_cv_makeflags" >&5
3878 echo "${ECHO_T}$cf_cv_makeflags" >&6
3879
3880 if test -n "$ac_tool_prefix"; then
3881   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3882 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3883 echo "$as_me:3883: checking for $ac_word" >&5
3884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885 if test "${ac_cv_prog_RANLIB+set}" = set; then
3886   echo $ECHO_N "(cached) $ECHO_C" >&6
3887 else
3888   if test -n "$RANLIB"; then
3889   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3890 else
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   $as_executable_p "$ac_dir/$ac_word" || continue
3897 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3898 echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899 break
3900 done
3901
3902 fi
3903 fi
3904 RANLIB=$ac_cv_prog_RANLIB
3905 if test -n "$RANLIB"; then
3906   echo "$as_me:3906: result: $RANLIB" >&5
3907 echo "${ECHO_T}$RANLIB" >&6
3908 else
3909   echo "$as_me:3909: result: no" >&5
3910 echo "${ECHO_T}no" >&6
3911 fi
3912
3913 fi
3914 if test -z "$ac_cv_prog_RANLIB"; then
3915   ac_ct_RANLIB=$RANLIB
3916   # Extract the first word of "ranlib", so it can be a program name with args.
3917 set dummy ranlib; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ac_ct_RANLIB"; then
3924   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ac_ct_RANLIB="ranlib"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3938 fi
3939 fi
3940 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3941 if test -n "$ac_ct_RANLIB"; then
3942   echo "$as_me:3942: result: $ac_ct_RANLIB" >&5
3943 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3944 else
3945   echo "$as_me:3945: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   RANLIB=$ac_ct_RANLIB
3950 else
3951   RANLIB="$ac_cv_prog_RANLIB"
3952 fi
3953
3954 if test -n "$ac_tool_prefix"; then
3955   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3956 set dummy ${ac_tool_prefix}ld; ac_word=$2
3957 echo "$as_me:3957: checking for $ac_word" >&5
3958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3959 if test "${ac_cv_prog_LD+set}" = set; then
3960   echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962   if test -n "$LD"; then
3963   ac_cv_prog_LD="$LD" # Let the user override the test.
3964 else
3965   ac_save_IFS=$IFS; IFS=$ac_path_separator
3966 ac_dummy="$PATH"
3967 for ac_dir in $ac_dummy; do
3968   IFS=$ac_save_IFS
3969   test -z "$ac_dir" && ac_dir=.
3970   $as_executable_p "$ac_dir/$ac_word" || continue
3971 ac_cv_prog_LD="${ac_tool_prefix}ld"
3972 echo "$as_me:3972: found $ac_dir/$ac_word" >&5
3973 break
3974 done
3975
3976 fi
3977 fi
3978 LD=$ac_cv_prog_LD
3979 if test -n "$LD"; then
3980   echo "$as_me:3980: result: $LD" >&5
3981 echo "${ECHO_T}$LD" >&6
3982 else
3983   echo "$as_me:3983: result: no" >&5
3984 echo "${ECHO_T}no" >&6
3985 fi
3986
3987 fi
3988 if test -z "$ac_cv_prog_LD"; then
3989   ac_ct_LD=$LD
3990   # Extract the first word of "ld", so it can be a program name with args.
3991 set dummy ld; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3995   echo $ECHO_N "(cached) $ECHO_C" >&6
3996 else
3997   if test -n "$ac_ct_LD"; then
3998   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3999 else
4000   ac_save_IFS=$IFS; IFS=$ac_path_separator
4001 ac_dummy="$PATH"
4002 for ac_dir in $ac_dummy; do
4003   IFS=$ac_save_IFS
4004   test -z "$ac_dir" && ac_dir=.
4005   $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_ac_ct_LD="ld"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4008 break
4009 done
4010
4011   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4012 fi
4013 fi
4014 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4015 if test -n "$ac_ct_LD"; then
4016   echo "$as_me:4016: result: $ac_ct_LD" >&5
4017 echo "${ECHO_T}$ac_ct_LD" >&6
4018 else
4019   echo "$as_me:4019: result: no" >&5
4020 echo "${ECHO_T}no" >&6
4021 fi
4022
4023   LD=$ac_ct_LD
4024 else
4025   LD="$ac_cv_prog_LD"
4026 fi
4027
4028 if test -n "$ac_tool_prefix"; then
4029   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}ar; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_prog_AR+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   if test -n "$AR"; then
4037   ac_cv_prog_AR="$AR" # Let the user override the test.
4038 else
4039   ac_save_IFS=$IFS; IFS=$ac_path_separator
4040 ac_dummy="$PATH"
4041 for ac_dir in $ac_dummy; do
4042   IFS=$ac_save_IFS
4043   test -z "$ac_dir" && ac_dir=.
4044   $as_executable_p "$ac_dir/$ac_word" || continue
4045 ac_cv_prog_AR="${ac_tool_prefix}ar"
4046 echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047 break
4048 done
4049
4050 fi
4051 fi
4052 AR=$ac_cv_prog_AR
4053 if test -n "$AR"; then
4054   echo "$as_me:4054: result: $AR" >&5
4055 echo "${ECHO_T}$AR" >&6
4056 else
4057   echo "$as_me:4057: result: no" >&5
4058 echo "${ECHO_T}no" >&6
4059 fi
4060
4061 fi
4062 if test -z "$ac_cv_prog_AR"; then
4063   ac_ct_AR=$AR
4064   # Extract the first word of "ar", so it can be a program name with args.
4065 set dummy ar; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4069   echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071   if test -n "$ac_ct_AR"; then
4072   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4073 else
4074   ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 ac_dummy="$PATH"
4076 for ac_dir in $ac_dummy; do
4077   IFS=$ac_save_IFS
4078   test -z "$ac_dir" && ac_dir=.
4079   $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_ac_ct_AR="ar"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082 break
4083 done
4084
4085   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4086 fi
4087 fi
4088 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4089 if test -n "$ac_ct_AR"; then
4090   echo "$as_me:4090: result: $ac_ct_AR" >&5
4091 echo "${ECHO_T}$ac_ct_AR" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   AR=$ac_ct_AR
4098 else
4099   AR="$ac_cv_prog_AR"
4100 fi
4101
4102 if test -n "$ac_tool_prefix"; then
4103   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4104 set dummy ${ac_tool_prefix}ar; ac_word=$2
4105 echo "$as_me:4105: checking for $ac_word" >&5
4106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4107 if test "${ac_cv_prog_AR+set}" = set; then
4108   echo $ECHO_N "(cached) $ECHO_C" >&6
4109 else
4110   if test -n "$AR"; then
4111   ac_cv_prog_AR="$AR" # Let the user override the test.
4112 else
4113   ac_save_IFS=$IFS; IFS=$ac_path_separator
4114 ac_dummy="$PATH"
4115 for ac_dir in $ac_dummy; do
4116   IFS=$ac_save_IFS
4117   test -z "$ac_dir" && ac_dir=.
4118   $as_executable_p "$ac_dir/$ac_word" || continue
4119 ac_cv_prog_AR="${ac_tool_prefix}ar"
4120 echo "$as_me:4120: found $ac_dir/$ac_word" >&5
4121 break
4122 done
4123
4124 fi
4125 fi
4126 AR=$ac_cv_prog_AR
4127 if test -n "$AR"; then
4128   echo "$as_me:4128: result: $AR" >&5
4129 echo "${ECHO_T}$AR" >&6
4130 else
4131   echo "$as_me:4131: result: no" >&5
4132 echo "${ECHO_T}no" >&6
4133 fi
4134
4135 fi
4136 if test -z "$ac_cv_prog_AR"; then
4137   ac_ct_AR=$AR
4138   # Extract the first word of "ar", so it can be a program name with args.
4139 set dummy ar; ac_word=$2
4140 echo "$as_me:4140: checking for $ac_word" >&5
4141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4142 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4143   echo $ECHO_N "(cached) $ECHO_C" >&6
4144 else
4145   if test -n "$ac_ct_AR"; then
4146   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4147 else
4148   ac_save_IFS=$IFS; IFS=$ac_path_separator
4149 ac_dummy="$PATH"
4150 for ac_dir in $ac_dummy; do
4151   IFS=$ac_save_IFS
4152   test -z "$ac_dir" && ac_dir=.
4153   $as_executable_p "$ac_dir/$ac_word" || continue
4154 ac_cv_prog_ac_ct_AR="ar"
4155 echo "$as_me:4155: found $ac_dir/$ac_word" >&5
4156 break
4157 done
4158
4159   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4160 fi
4161 fi
4162 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4163 if test -n "$ac_ct_AR"; then
4164   echo "$as_me:4164: result: $ac_ct_AR" >&5
4165 echo "${ECHO_T}$ac_ct_AR" >&6
4166 else
4167   echo "$as_me:4167: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4169 fi
4170
4171   AR=$ac_ct_AR
4172 else
4173   AR="$ac_cv_prog_AR"
4174 fi
4175
4176 echo "$as_me:4176: checking for options to update archives" >&5
4177 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4178 if test "${cf_cv_ar_flags+set}" = set; then
4179   echo $ECHO_N "(cached) $ECHO_C" >&6
4180 else
4181
4182         cf_cv_ar_flags=unknown
4183         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4184         do
4185
4186                 # check if $ARFLAGS already contains this choice
4187                 if test "x$ARFLAGS" != "x" ; then
4188                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4189                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4190                                 cf_cv_ar_flags=
4191                                 break
4192                         fi
4193                 fi
4194
4195                 rm -f conftest.$ac_cv_objext
4196                 rm -f conftest.a
4197
4198                 cat >conftest.$ac_ext <<EOF
4199 #line 4199 "configure"
4200 int     testdata[3] = { 123, 456, 789 };
4201 EOF
4202                 if { (eval echo "$as_me:4202: \"$ac_compile\"") >&5
4203   (eval $ac_compile) 2>&5
4204   ac_status=$?
4205   echo "$as_me:4205: \$? = $ac_status" >&5
4206   (exit $ac_status); } ; then
4207                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4208                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4209                         if test -f conftest.a ; then
4210                                 cf_cv_ar_flags=$cf_ar_flags
4211                                 break
4212                         fi
4213                 else
4214                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4215
4216 echo "${as_me:-configure}:4216: testing cannot compile test-program ..." 1>&5
4217
4218                         break
4219                 fi
4220         done
4221         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4222
4223 fi
4224 echo "$as_me:4224: result: $cf_cv_ar_flags" >&5
4225 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4226
4227 if test -n "$ARFLAGS" ; then
4228         if test -n "$cf_cv_ar_flags" ; then
4229                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4230         fi
4231 else
4232         ARFLAGS=$cf_cv_ar_flags
4233 fi
4234
4235 echo "$as_me:4235: checking if you have specified an install-prefix" >&5
4236 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4237
4238 # Check whether --with-install-prefix or --without-install-prefix was given.
4239 if test "${with_install_prefix+set}" = set; then
4240   withval="$with_install_prefix"
4241   case "$withval" in #(vi
4242         yes|no) #(vi
4243                 ;;
4244         *)      DESTDIR="$withval"
4245                 ;;
4246         esac
4247 fi;
4248 echo "$as_me:4248: result: $DESTDIR" >&5
4249 echo "${ECHO_T}$DESTDIR" >&6
4250
4251 ###############################################################################
4252
4253 # If we're cross-compiling, allow the user to override the tools and their
4254 # options.  The configure script is oriented toward identifying the host
4255 # compiler, etc., but we need a build compiler to generate parts of the source.
4256
4257 if test "$cross_compiling" = yes ; then
4258
4259         # defaults that we might want to override
4260         : ${BUILD_CFLAGS:=''}
4261         : ${BUILD_CPPFLAGS:=''}
4262         : ${BUILD_LDFLAGS:=''}
4263         : ${BUILD_LIBS:=''}
4264         : ${BUILD_EXEEXT:='$x'}
4265         : ${BUILD_OBJEXT:='o'}
4266
4267 # Check whether --with-build-cc or --without-build-cc was given.
4268 if test "${with_build_cc+set}" = set; then
4269   withval="$with_build_cc"
4270   BUILD_CC="$withval"
4271 else
4272   for ac_prog in gcc cc cl
4273 do
4274   # Extract the first word of "$ac_prog", so it can be a program name with args.
4275 set dummy $ac_prog; ac_word=$2
4276 echo "$as_me:4276: checking for $ac_word" >&5
4277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4278 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4279   echo $ECHO_N "(cached) $ECHO_C" >&6
4280 else
4281   if test -n "$BUILD_CC"; then
4282   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4283 else
4284   ac_save_IFS=$IFS; IFS=$ac_path_separator
4285 ac_dummy="$PATH"
4286 for ac_dir in $ac_dummy; do
4287   IFS=$ac_save_IFS
4288   test -z "$ac_dir" && ac_dir=.
4289   $as_executable_p "$ac_dir/$ac_word" || continue
4290 ac_cv_prog_BUILD_CC="$ac_prog"
4291 echo "$as_me:4291: found $ac_dir/$ac_word" >&5
4292 break
4293 done
4294
4295 fi
4296 fi
4297 BUILD_CC=$ac_cv_prog_BUILD_CC
4298 if test -n "$BUILD_CC"; then
4299   echo "$as_me:4299: result: $BUILD_CC" >&5
4300 echo "${ECHO_T}$BUILD_CC" >&6
4301 else
4302   echo "$as_me:4302: result: no" >&5
4303 echo "${ECHO_T}no" >&6
4304 fi
4305
4306   test -n "$BUILD_CC" && break
4307 done
4308
4309 fi;
4310         echo "$as_me:4310: checking for native build C compiler" >&5
4311 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4312         echo "$as_me:4312: result: $BUILD_CC" >&5
4313 echo "${ECHO_T}$BUILD_CC" >&6
4314
4315         echo "$as_me:4315: checking for native build C preprocessor" >&5
4316 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4317
4318 # Check whether --with-build-cpp or --without-build-cpp was given.
4319 if test "${with_build_cpp+set}" = set; then
4320   withval="$with_build_cpp"
4321   BUILD_CPP="$withval"
4322 else
4323   BUILD_CPP='${BUILD_CC} -E'
4324 fi;
4325         echo "$as_me:4325: result: $BUILD_CPP" >&5
4326 echo "${ECHO_T}$BUILD_CPP" >&6
4327
4328         echo "$as_me:4328: checking for native build C flags" >&5
4329 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4330
4331 # Check whether --with-build-cflags or --without-build-cflags was given.
4332 if test "${with_build_cflags+set}" = set; then
4333   withval="$with_build_cflags"
4334   BUILD_CFLAGS="$withval"
4335 fi;
4336         echo "$as_me:4336: result: $BUILD_CFLAGS" >&5
4337 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4338
4339         echo "$as_me:4339: checking for native build C preprocessor-flags" >&5
4340 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4341
4342 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4343 if test "${with_build_cppflags+set}" = set; then
4344   withval="$with_build_cppflags"
4345   BUILD_CPPFLAGS="$withval"
4346 fi;
4347         echo "$as_me:4347: result: $BUILD_CPPFLAGS" >&5
4348 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4349
4350         echo "$as_me:4350: checking for native build linker-flags" >&5
4351 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4352
4353 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4354 if test "${with_build_ldflags+set}" = set; then
4355   withval="$with_build_ldflags"
4356   BUILD_LDFLAGS="$withval"
4357 fi;
4358         echo "$as_me:4358: result: $BUILD_LDFLAGS" >&5
4359 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4360
4361         echo "$as_me:4361: checking for native build linker-libraries" >&5
4362 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4363
4364 # Check whether --with-build-libs or --without-build-libs was given.
4365 if test "${with_build_libs+set}" = set; then
4366   withval="$with_build_libs"
4367   BUILD_LIBS="$withval"
4368 fi;
4369         echo "$as_me:4369: result: $BUILD_LIBS" >&5
4370 echo "${ECHO_T}$BUILD_LIBS" >&6
4371
4372         # this assumes we're on Unix.
4373         BUILD_EXEEXT=
4374         BUILD_OBJEXT=o
4375
4376         : ${BUILD_CC:='${CC}'}
4377
4378         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4379                 { { echo "$as_me:4379: error: Cross-build requires two compilers.
4380 Use --with-build-cc to specify the native compiler." >&5
4381 echo "$as_me: error: Cross-build requires two compilers.
4382 Use --with-build-cc to specify the native compiler." >&2;}
4383    { (exit 1); exit 1; }; }
4384         fi
4385
4386 else
4387         : ${BUILD_CC:='${CC}'}
4388         : ${BUILD_CPP:='${CPP}'}
4389         : ${BUILD_CFLAGS:='${CFLAGS}'}
4390         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4391         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4392         : ${BUILD_LIBS:='${LIBS}'}
4393         : ${BUILD_EXEEXT:='$x'}
4394         : ${BUILD_OBJEXT:='o'}
4395 fi
4396
4397 ###############################################################################
4398
4399 ### Options to allow the user to specify the set of libraries which are used.
4400 ### Use "--without-normal --with-shared" to allow the default model to be
4401 ### shared, for example.
4402 cf_list_models=""
4403
4404 echo "$as_me:4404: checking if libtool -version-number should be used" >&5
4405 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4406
4407 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4408 if test "${enable_libtool_version+set}" = set; then
4409   enableval="$enable_libtool_version"
4410   test "$enableval" != no && enableval=yes
4411   if test "$enableval" != "yes" ; then
4412     cf_libtool_version=no
4413   else
4414     cf_libtool_version=yes
4415   fi
4416 else
4417   enableval=yes
4418   cf_libtool_version=yes
4419
4420 fi;
4421 echo "$as_me:4421: result: $cf_libtool_version" >&5
4422 echo "${ECHO_T}$cf_libtool_version" >&6
4423
4424 if test "$cf_libtool_version" = yes ; then
4425         LIBTOOL_VERSION="-version-number"
4426 else
4427         LIBTOOL_VERSION="-version-info"
4428 fi
4429
4430 LIBTOOL=
4431
4432 # common library maintenance symbols that are convenient for libtool scripts:
4433 LIB_CREATE='${AR} -cr'
4434 LIB_OBJECT='${OBJECTS}'
4435 LIB_SUFFIX=.a
4436 LIB_PREP="$RANLIB"
4437
4438 # symbols used to prop libtool up to enable it to determine what it should be
4439 # doing:
4440 LIB_CLEAN=
4441 LIB_COMPILE=
4442 LIB_LINK='${CC}'
4443 LIB_INSTALL=
4444 LIB_UNINSTALL=
4445
4446 echo "$as_me:4446: checking if you want to build libraries with libtool" >&5
4447 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4448
4449 # Check whether --with-libtool or --without-libtool was given.
4450 if test "${with_libtool+set}" = set; then
4451   withval="$with_libtool"
4452   with_libtool=$withval
4453 else
4454   with_libtool=no
4455 fi;
4456 echo "$as_me:4456: result: $with_libtool" >&5
4457 echo "${ECHO_T}$with_libtool" >&6
4458 if test "$with_libtool" != "no"; then
4459
4460         if test "$with_libtool" != "yes" ; then
4461
4462 if test "x$prefix" != xNONE; then
4463   cf_path_syntax="$prefix"
4464 else
4465   cf_path_syntax="$ac_default_prefix"
4466 fi
4467
4468 case ".$with_libtool" in #(vi
4469 .\$\(*\)*|.\'*\'*) #(vi
4470   ;;
4471 ..|./*|.\\*) #(vi
4472   ;;
4473 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4474   ;;
4475 .\${*prefix}*|.\${*dir}*) #(vi
4476   eval with_libtool="$with_libtool"
4477   case ".$with_libtool" in #(vi
4478   .NONE/*)
4479     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4480     ;;
4481   esac
4482   ;; #(vi
4483 .no|.NONE/*)
4484   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4485   ;;
4486 *)
4487   { { echo "$as_me:4487: error: expected a pathname, not \"$with_libtool\"" >&5
4488 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4489    { (exit 1); exit 1; }; }
4490   ;;
4491 esac
4492
4493                 LIBTOOL=$with_libtool
4494         else
4495                 # Extract the first word of "libtool", so it can be a program name with args.
4496 set dummy libtool; ac_word=$2
4497 echo "$as_me:4497: checking for $ac_word" >&5
4498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4499 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4500   echo $ECHO_N "(cached) $ECHO_C" >&6
4501 else
4502   case $LIBTOOL in
4503   [\\/]* | ?:[\\/]*)
4504   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4505   ;;
4506   *)
4507   ac_save_IFS=$IFS; IFS=$ac_path_separator
4508 ac_dummy="$PATH"
4509 for ac_dir in $ac_dummy; do
4510   IFS=$ac_save_IFS
4511   test -z "$ac_dir" && ac_dir=.
4512   if $as_executable_p "$ac_dir/$ac_word"; then
4513    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4514    echo "$as_me:4514: found $ac_dir/$ac_word" >&5
4515    break
4516 fi
4517 done
4518
4519   ;;
4520 esac
4521 fi
4522 LIBTOOL=$ac_cv_path_LIBTOOL
4523
4524 if test -n "$LIBTOOL"; then
4525   echo "$as_me:4525: result: $LIBTOOL" >&5
4526 echo "${ECHO_T}$LIBTOOL" >&6
4527 else
4528   echo "$as_me:4528: result: no" >&5
4529 echo "${ECHO_T}no" >&6
4530 fi
4531
4532         fi
4533         if test -z "$LIBTOOL" ; then
4534                 { { echo "$as_me:4534: error: Cannot find libtool" >&5
4535 echo "$as_me: error: Cannot find libtool" >&2;}
4536    { (exit 1); exit 1; }; }
4537         fi
4538         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4539         LIB_OBJECT='${OBJECTS:.o=.lo}'
4540         LIB_SUFFIX=.la
4541         LIB_CLEAN='${LIBTOOL} --mode=clean'
4542         LIB_COMPILE='${LIBTOOL} --mode=compile'
4543         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4544         LIB_INSTALL='${LIBTOOL} --mode=install'
4545         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4546         LIB_PREP=:
4547
4548         # Show the version of libtool
4549         echo "$as_me:4549: checking version of libtool" >&5
4550 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4551
4552         # Save the version in a cache variable - this is not entirely a good
4553         # thing, but the version string from libtool is very ugly, and for
4554         # bug reports it might be useful to have the original string. "("
4555         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.].*//'`
4556         echo "$as_me:4556: result: $cf_cv_libtool_version" >&5
4557 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4558         if test -z "$cf_cv_libtool_version" ; then
4559                 { { echo "$as_me:4559: error: This is not GNU libtool" >&5
4560 echo "$as_me: error: This is not GNU libtool" >&2;}
4561    { (exit 1); exit 1; }; }
4562         fi
4563
4564         # special hack to add -no-undefined (which libtool should do for itself)
4565         LT_UNDEF=
4566         case "$cf_cv_system_name" in #(vi
4567         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4568                 LT_UNDEF=-no-undefined
4569                 ;;
4570         esac
4571
4572         # special hack to add --tag option for C++ compiler
4573         case $cf_cv_libtool_version in #(vi
4574         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4575                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4576                 LIBTOOL="$LIBTOOL --tag=CC"
4577                 ;;
4578         *)
4579                 LIBTOOL_CXX="$LIBTOOL"
4580                 ;;
4581         esac
4582 else
4583         LIBTOOL=""
4584         LIBTOOL_CXX=""
4585 fi
4586
4587 test -z "$LIBTOOL" && ECHO_LT=
4588
4589 if test "$with_libtool" != "no" ; then
4590
4591 cf_list_models="$cf_list_models libtool"
4592
4593 else
4594
4595 echo "$as_me:4595: checking if you want to build shared libraries" >&5
4596 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4597
4598 # Check whether --with-shared or --without-shared was given.
4599 if test "${with_shared+set}" = set; then
4600   withval="$with_shared"
4601   with_shared=$withval
4602 else
4603   with_shared=no
4604 fi;
4605 echo "$as_me:4605: result: $with_shared" >&5
4606 echo "${ECHO_T}$with_shared" >&6
4607 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4608
4609 echo "$as_me:4609: checking if you want to build static libraries" >&5
4610 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4611
4612 # Check whether --with-normal or --without-normal was given.
4613 if test "${with_normal+set}" = set; then
4614   withval="$with_normal"
4615   with_normal=$withval
4616 else
4617   with_normal=yes
4618 fi;
4619 echo "$as_me:4619: result: $with_normal" >&5
4620 echo "${ECHO_T}$with_normal" >&6
4621 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4622
4623 echo "$as_me:4623: checking if you want to build debug libraries" >&5
4624 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4625
4626 # Check whether --with-debug or --without-debug was given.
4627 if test "${with_debug+set}" = set; then
4628   withval="$with_debug"
4629   with_debug=$withval
4630 else
4631   with_debug=yes
4632 fi;
4633 echo "$as_me:4633: result: $with_debug" >&5
4634 echo "${ECHO_T}$with_debug" >&6
4635 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4636
4637 echo "$as_me:4637: checking if you want to build profiling libraries" >&5
4638 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4639
4640 # Check whether --with-profile or --without-profile was given.
4641 if test "${with_profile+set}" = set; then
4642   withval="$with_profile"
4643   with_profile=$withval
4644 else
4645   with_profile=no
4646 fi;
4647 echo "$as_me:4647: result: $with_profile" >&5
4648 echo "${ECHO_T}$with_profile" >&6
4649 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4650
4651 fi
4652
4653 ###############################################################################
4654
4655 echo "$as_me:4655: checking for specified models" >&5
4656 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4657 test -z "$cf_list_models" && cf_list_models=normal
4658 test "$with_libtool" != "no" && cf_list_models=libtool
4659 echo "$as_me:4659: result: $cf_list_models" >&5
4660 echo "${ECHO_T}$cf_list_models" >&6
4661
4662 ### Use the first model as the default, and save its suffix for use in building
4663 ### up test-applications.
4664 echo "$as_me:4664: checking for default model" >&5
4665 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4666 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4667 echo "$as_me:4667: result: $DFT_LWR_MODEL" >&5
4668 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4669
4670 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4671
4672 TICS_NAME=tic
4673
4674 TINFO_NAME=tinfo
4675
4676 LIB_NAME=ncurses
4677
4678 LIB_DIR=../lib
4679 LIB_2ND=../../lib
4680
4681 echo "$as_me:4681: checking if you want to have a library-prefix" >&5
4682 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4683
4684 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4685 if test "${with_lib_prefix+set}" = set; then
4686   withval="$with_lib_prefix"
4687   with_lib_prefix=$withval
4688 else
4689   with_lib_prefix=auto
4690 fi;
4691 echo "$as_me:4691: result: $with_lib_prefix" >&5
4692 echo "${ECHO_T}$with_lib_prefix" >&6
4693
4694 if test $with_lib_prefix = auto
4695 then
4696
4697         case $cf_cv_system_name in #(vi
4698         OS/2*|os2*) #(vi
4699         LIB_PREFIX=''
4700         ;;
4701         *)      LIB_PREFIX='lib'
4702         ;;
4703         esac
4704 cf_prefix=$LIB_PREFIX
4705
4706 elif test $with_lib_prefix = no
4707 then
4708         LIB_PREFIX=
4709 else
4710         LIB_PREFIX=$with_lib_prefix
4711 fi
4712
4713 LIB_SUFFIX=
4714
4715 ###############################################################################
4716
4717 echo "$as_me:4717: checking if you want to build a separate terminfo library" >&5
4718 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4719
4720 # Check whether --with-termlib or --without-termlib was given.
4721 if test "${with_termlib+set}" = set; then
4722   withval="$with_termlib"
4723   with_termlib=$withval
4724 else
4725   with_termlib=no
4726 fi;
4727 echo "$as_me:4727: result: $with_termlib" >&5
4728 echo "${ECHO_T}$with_termlib" >&6
4729
4730 echo "$as_me:4730: checking if you want to build a separate tic library" >&5
4731 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4732
4733 # Check whether --with-ticlib or --without-ticlib was given.
4734 if test "${with_ticlib+set}" = set; then
4735   withval="$with_ticlib"
4736   with_ticlib=$withval
4737 else
4738   with_ticlib=no
4739 fi;
4740 echo "$as_me:4740: result: $with_ticlib" >&5
4741 echo "${ECHO_T}$with_ticlib" >&6
4742
4743 ### Checks for special libraries, must be done up-front.
4744 SHLIB_LIST=""
4745
4746 echo "$as_me:4746: checking if you want to link with the GPM mouse library" >&5
4747 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4748
4749 # Check whether --with-gpm or --without-gpm was given.
4750 if test "${with_gpm+set}" = set; then
4751   withval="$with_gpm"
4752   with_gpm=$withval
4753 else
4754   with_gpm=maybe
4755 fi;
4756 echo "$as_me:4756: result: $with_gpm" >&5
4757 echo "${ECHO_T}$with_gpm" >&6
4758
4759 if test "$with_gpm" != no ; then
4760         echo "$as_me:4760: checking for gpm.h" >&5
4761 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4762 if test "${ac_cv_header_gpm_h+set}" = set; then
4763   echo $ECHO_N "(cached) $ECHO_C" >&6
4764 else
4765   cat >conftest.$ac_ext <<_ACEOF
4766 #line 4766 "configure"
4767 #include "confdefs.h"
4768 #include <gpm.h>
4769 _ACEOF
4770 if { (eval echo "$as_me:4770: \"$ac_cpp conftest.$ac_ext\"") >&5
4771   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4772   ac_status=$?
4773   egrep -v '^ *\+' conftest.er1 >conftest.err
4774   rm -f conftest.er1
4775   cat conftest.err >&5
4776   echo "$as_me:4776: \$? = $ac_status" >&5
4777   (exit $ac_status); } >/dev/null; then
4778   if test -s conftest.err; then
4779     ac_cpp_err=$ac_c_preproc_warn_flag
4780   else
4781     ac_cpp_err=
4782   fi
4783 else
4784   ac_cpp_err=yes
4785 fi
4786 if test -z "$ac_cpp_err"; then
4787   ac_cv_header_gpm_h=yes
4788 else
4789   echo "$as_me: failed program was:" >&5
4790   cat conftest.$ac_ext >&5
4791   ac_cv_header_gpm_h=no
4792 fi
4793 rm -f conftest.err conftest.$ac_ext
4794 fi
4795 echo "$as_me:4795: result: $ac_cv_header_gpm_h" >&5
4796 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4797 if test $ac_cv_header_gpm_h = yes; then
4798
4799                 cat >>confdefs.h <<\EOF
4800 #define HAVE_GPM_H 1
4801 EOF
4802
4803                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4804                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4805
4806 echo "${as_me:-configure}:4806: testing assuming we really have GPM library ..." 1>&5
4807
4808                         cat >>confdefs.h <<\EOF
4809 #define HAVE_LIBGPM 1
4810 EOF
4811
4812                 else
4813                         echo "$as_me:4813: checking for Gpm_Open in -lgpm" >&5
4814 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4815 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4816   echo $ECHO_N "(cached) $ECHO_C" >&6
4817 else
4818   ac_check_lib_save_LIBS=$LIBS
4819 LIBS="-lgpm  $LIBS"
4820 cat >conftest.$ac_ext <<_ACEOF
4821 #line 4821 "configure"
4822 #include "confdefs.h"
4823
4824 /* Override any gcc2 internal prototype to avoid an error.  */
4825 #ifdef __cplusplus
4826 extern "C"
4827 #endif
4828 /* We use char because int might match the return type of a gcc2
4829    builtin and then its argument prototype would still apply.  */
4830 char Gpm_Open ();
4831 int
4832 main ()
4833 {
4834 Gpm_Open ();
4835   ;
4836   return 0;
4837 }
4838 _ACEOF
4839 rm -f conftest.$ac_objext conftest$ac_exeext
4840 if { (eval echo "$as_me:4840: \"$ac_link\"") >&5
4841   (eval $ac_link) 2>&5
4842   ac_status=$?
4843   echo "$as_me:4843: \$? = $ac_status" >&5
4844   (exit $ac_status); } &&
4845          { ac_try='test -s conftest$ac_exeext'
4846   { (eval echo "$as_me:4846: \"$ac_try\"") >&5
4847   (eval $ac_try) 2>&5
4848   ac_status=$?
4849   echo "$as_me:4849: \$? = $ac_status" >&5
4850   (exit $ac_status); }; }; then
4851   ac_cv_lib_gpm_Gpm_Open=yes
4852 else
4853   echo "$as_me: failed program was:" >&5
4854 cat conftest.$ac_ext >&5
4855 ac_cv_lib_gpm_Gpm_Open=no
4856 fi
4857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4858 LIBS=$ac_check_lib_save_LIBS
4859 fi
4860 echo "$as_me:4860: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4861 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4862 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4863   :
4864 else
4865
4866                                 { { echo "$as_me:4866: error: Cannot link with GPM library" >&5
4867 echo "$as_me: error: Cannot link with GPM library" >&2;}
4868    { (exit 1); exit 1; }; }
4869                 fi
4870                 with_gpm=yes
4871
4872 fi
4873
4874 else
4875
4876                 test "$with_gpm" != maybe && { echo "$as_me:4876: WARNING: Cannot find GPM header" >&5
4877 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4878                 with_gpm=no
4879
4880 fi
4881
4882 fi
4883
4884 if test "$with_gpm" != no ; then
4885         echo "$as_me:4885: checking if you want to load GPM dynamically" >&5
4886 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4887
4888 # Check whether --with-dlsym or --without-dlsym was given.
4889 if test "${with_dlsym+set}" = set; then
4890   withval="$with_dlsym"
4891   with_dlsym=$withval
4892 else
4893   with_dlsym=yes
4894 fi;
4895         echo "$as_me:4895: result: $with_dlsym" >&5
4896 echo "${ECHO_T}$with_dlsym" >&6
4897         if test "$with_dlsym" = yes ; then
4898
4899 cf_have_dlsym=no
4900 echo "$as_me:4900: checking for dlsym" >&5
4901 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4902 if test "${ac_cv_func_dlsym+set}" = set; then
4903   echo $ECHO_N "(cached) $ECHO_C" >&6
4904 else
4905   cat >conftest.$ac_ext <<_ACEOF
4906 #line 4906 "configure"
4907 #include "confdefs.h"
4908 /* System header to define __stub macros and hopefully few prototypes,
4909     which can conflict with char dlsym (); below.  */
4910 #include <assert.h>
4911 /* Override any gcc2 internal prototype to avoid an error.  */
4912 #ifdef __cplusplus
4913 extern "C"
4914 #endif
4915 /* We use char because int might match the return type of a gcc2
4916    builtin and then its argument prototype would still apply.  */
4917 char dlsym ();
4918 char (*f) ();
4919
4920 int
4921 main ()
4922 {
4923 /* The GNU C library defines this for functions which it implements
4924     to always fail with ENOSYS.  Some functions are actually named
4925     something starting with __ and the normal name is an alias.  */
4926 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4927 choke me
4928 #else
4929 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4930 #endif
4931
4932   ;
4933   return 0;
4934 }
4935 _ACEOF
4936 rm -f conftest.$ac_objext conftest$ac_exeext
4937 if { (eval echo "$as_me:4937: \"$ac_link\"") >&5
4938   (eval $ac_link) 2>&5
4939   ac_status=$?
4940   echo "$as_me:4940: \$? = $ac_status" >&5
4941   (exit $ac_status); } &&
4942          { ac_try='test -s conftest$ac_exeext'
4943   { (eval echo "$as_me:4943: \"$ac_try\"") >&5
4944   (eval $ac_try) 2>&5
4945   ac_status=$?
4946   echo "$as_me:4946: \$? = $ac_status" >&5
4947   (exit $ac_status); }; }; then
4948   ac_cv_func_dlsym=yes
4949 else
4950   echo "$as_me: failed program was:" >&5
4951 cat conftest.$ac_ext >&5
4952 ac_cv_func_dlsym=no
4953 fi
4954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4955 fi
4956 echo "$as_me:4956: result: $ac_cv_func_dlsym" >&5
4957 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4958 if test $ac_cv_func_dlsym = yes; then
4959   cf_have_dlsym=yes
4960 else
4961
4962 cf_have_libdl=no
4963 echo "$as_me:4963: checking for dlsym in -ldl" >&5
4964 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4965 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4966   echo $ECHO_N "(cached) $ECHO_C" >&6
4967 else
4968   ac_check_lib_save_LIBS=$LIBS
4969 LIBS="-ldl  $LIBS"
4970 cat >conftest.$ac_ext <<_ACEOF
4971 #line 4971 "configure"
4972 #include "confdefs.h"
4973
4974 /* Override any gcc2 internal prototype to avoid an error.  */
4975 #ifdef __cplusplus
4976 extern "C"
4977 #endif
4978 /* We use char because int might match the return type of a gcc2
4979    builtin and then its argument prototype would still apply.  */
4980 char dlsym ();
4981 int
4982 main ()
4983 {
4984 dlsym ();
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 rm -f conftest.$ac_objext conftest$ac_exeext
4990 if { (eval echo "$as_me:4990: \"$ac_link\"") >&5
4991   (eval $ac_link) 2>&5
4992   ac_status=$?
4993   echo "$as_me:4993: \$? = $ac_status" >&5
4994   (exit $ac_status); } &&
4995          { ac_try='test -s conftest$ac_exeext'
4996   { (eval echo "$as_me:4996: \"$ac_try\"") >&5
4997   (eval $ac_try) 2>&5
4998   ac_status=$?
4999   echo "$as_me:4999: \$? = $ac_status" >&5
5000   (exit $ac_status); }; }; then
5001   ac_cv_lib_dl_dlsym=yes
5002 else
5003   echo "$as_me: failed program was:" >&5
5004 cat conftest.$ac_ext >&5
5005 ac_cv_lib_dl_dlsym=no
5006 fi
5007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5008 LIBS=$ac_check_lib_save_LIBS
5009 fi
5010 echo "$as_me:5010: result: $ac_cv_lib_dl_dlsym" >&5
5011 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5012 if test $ac_cv_lib_dl_dlsym = yes; then
5013
5014         cf_have_dlsym=yes
5015         cf_have_libdl=yes
5016 fi
5017
5018 fi
5019
5020 if test "$cf_have_dlsym" = yes ; then
5021         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5022
5023         echo "$as_me:5023: checking whether able to link to dl*() functions" >&5
5024 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5025         cat >conftest.$ac_ext <<_ACEOF
5026 #line 5026 "configure"
5027 #include "confdefs.h"
5028 #include <dlfcn.h>
5029 int
5030 main ()
5031 {
5032
5033                 void *obj;
5034                 if ((obj = dlopen("filename", 0)) != 0) {
5035                         if (dlsym(obj, "symbolname") == 0) {
5036                         dlclose(obj);
5037                         }
5038                 }
5039   ;
5040   return 0;
5041 }
5042 _ACEOF
5043 rm -f conftest.$ac_objext conftest$ac_exeext
5044 if { (eval echo "$as_me:5044: \"$ac_link\"") >&5
5045   (eval $ac_link) 2>&5
5046   ac_status=$?
5047   echo "$as_me:5047: \$? = $ac_status" >&5
5048   (exit $ac_status); } &&
5049          { ac_try='test -s conftest$ac_exeext'
5050   { (eval echo "$as_me:5050: \"$ac_try\"") >&5
5051   (eval $ac_try) 2>&5
5052   ac_status=$?
5053   echo "$as_me:5053: \$? = $ac_status" >&5
5054   (exit $ac_status); }; }; then
5055
5056                 cat >>confdefs.h <<\EOF
5057 #define HAVE_LIBDL 1
5058 EOF
5059
5060 else
5061   echo "$as_me: failed program was:" >&5
5062 cat conftest.$ac_ext >&5
5063
5064                 { { echo "$as_me:5064: error: Cannot link test program for libdl" >&5
5065 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5066    { (exit 1); exit 1; }; }
5067 fi
5068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5069         echo "$as_me:5069: result: ok" >&5
5070 echo "${ECHO_T}ok" >&6
5071 else
5072         { { echo "$as_me:5072: error: Cannot find dlsym function" >&5
5073 echo "$as_me: error: Cannot find dlsym function" >&2;}
5074    { (exit 1); exit 1; }; }
5075 fi
5076
5077                 if test "$with_gpm" != yes ; then
5078                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5079
5080 echo "${as_me:-configure}:5080: testing assuming soname for gpm is $with_gpm ..." 1>&5
5081
5082                         cf_cv_gpm_soname="$with_gpm"
5083                 else
5084
5085 echo "$as_me:5085: checking for soname of gpm library" >&5
5086 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5087 if test "${cf_cv_gpm_soname+set}" = set; then
5088   echo $ECHO_N "(cached) $ECHO_C" >&6
5089 else
5090
5091 cf_cv_gpm_soname=unknown
5092 if test "$cross_compiling" != yes ; then
5093 cat >conftest.$ac_ext <<CF_EOF
5094 #include <gpm.h>
5095 int main()
5096 {
5097 if (Gpm_Open(0,0)) Gpm_Close();
5098         ${cf_cv_main_return:-return}(0);
5099 }
5100 CF_EOF
5101 cf_save_LIBS="$LIBS"
5102         LIBS="-lgpm $LIBS"
5103         if { (eval echo "$as_me:5103: \"$ac_compile\"") >&5
5104   (eval $ac_compile) 2>&5
5105   ac_status=$?
5106   echo "$as_me:5106: \$? = $ac_status" >&5
5107   (exit $ac_status); } ; then
5108                 if { (eval echo "$as_me:5108: \"$ac_link\"") >&5
5109   (eval $ac_link) 2>&5
5110   ac_status=$?
5111   echo "$as_me:5111: \$? = $ac_status" >&5
5112   (exit $ac_status); } ; then
5113                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5114                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5115                 fi
5116         fi
5117 rm -rf conftest*
5118 LIBS="$cf_save_LIBS"
5119 fi
5120
5121 fi
5122 echo "$as_me:5122: result: $cf_cv_gpm_soname" >&5
5123 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5124
5125                 fi
5126                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5127 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5128 EOF
5129
5130                 SHLIB_LIST="-ldl $SHLIB_LIST"
5131         else
5132                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5133                 TEST_LIBS="-lgpm $TEST_LIBS"
5134         fi
5135         cat >>confdefs.h <<\EOF
5136 #define HAVE_LIBGPM 1
5137 EOF
5138
5139 echo "$as_me:5139: checking for Gpm_Wgetch in -lgpm" >&5
5140 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5141 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5142   echo $ECHO_N "(cached) $ECHO_C" >&6
5143 else
5144   ac_check_lib_save_LIBS=$LIBS
5145 LIBS="-lgpm  $LIBS"
5146 cat >conftest.$ac_ext <<_ACEOF
5147 #line 5147 "configure"
5148 #include "confdefs.h"
5149
5150 /* Override any gcc2 internal prototype to avoid an error.  */
5151 #ifdef __cplusplus
5152 extern "C"
5153 #endif
5154 /* We use char because int might match the return type of a gcc2
5155    builtin and then its argument prototype would still apply.  */
5156 char Gpm_Wgetch ();
5157 int
5158 main ()
5159 {
5160 Gpm_Wgetch ();
5161   ;
5162   return 0;
5163 }
5164 _ACEOF
5165 rm -f conftest.$ac_objext conftest$ac_exeext
5166 if { (eval echo "$as_me:5166: \"$ac_link\"") >&5
5167   (eval $ac_link) 2>&5
5168   ac_status=$?
5169   echo "$as_me:5169: \$? = $ac_status" >&5
5170   (exit $ac_status); } &&
5171          { ac_try='test -s conftest$ac_exeext'
5172   { (eval echo "$as_me:5172: \"$ac_try\"") >&5
5173   (eval $ac_try) 2>&5
5174   ac_status=$?
5175   echo "$as_me:5175: \$? = $ac_status" >&5
5176   (exit $ac_status); }; }; then
5177   ac_cv_lib_gpm_Gpm_Wgetch=yes
5178 else
5179   echo "$as_me: failed program was:" >&5
5180 cat conftest.$ac_ext >&5
5181 ac_cv_lib_gpm_Gpm_Wgetch=no
5182 fi
5183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5184 LIBS=$ac_check_lib_save_LIBS
5185 fi
5186 echo "$as_me:5186: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5187 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5188 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5189
5190 echo "$as_me:5190: checking if GPM is weakly bound to curses library" >&5
5191 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5192 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5193   echo $ECHO_N "(cached) $ECHO_C" >&6
5194 else
5195
5196 cf_cv_check_gpm_wgetch=unknown
5197 if test "$cross_compiling" != yes ; then
5198
5199 cat >conftest.$ac_ext <<CF_EOF
5200 #include <gpm.h>
5201 int main()
5202 {
5203         Gpm_Wgetch();
5204         ${cf_cv_main_return:-return}(0);
5205 }
5206 CF_EOF
5207
5208         cf_save_LIBS="$LIBS"
5209         # This only works if we can look at the symbol table.  If a shared
5210         # library is stripped for install, we cannot use that.  So we're forced
5211         # to rely on the static library, noting that some packagers may not
5212         # include it.
5213         LIBS="-static -lgpm -dynamic $LIBS"
5214         if { (eval echo "$as_me:5214: \"$ac_compile\"") >&5
5215   (eval $ac_compile) 2>&5
5216   ac_status=$?
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } ; then
5219                 if { (eval echo "$as_me:5219: \"$ac_link\"") >&5
5220   (eval $ac_link) 2>&5
5221   ac_status=$?
5222   echo "$as_me:5222: \$? = $ac_status" >&5
5223   (exit $ac_status); } ; then
5224                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5225                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5226                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5227                 fi
5228         fi
5229         rm -rf conftest*
5230         LIBS="$cf_save_LIBS"
5231 fi
5232
5233 fi
5234 echo "$as_me:5234: result: $cf_cv_check_gpm_wgetch" >&5
5235 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5236
5237 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5238         { echo "$as_me:5238: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5239 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5240 fi
5241
5242 fi
5243
5244 fi
5245
5246 # not everyone has "test -c"
5247 if test -c /dev/sysmouse 2>/dev/null ; then
5248 echo "$as_me:5248: checking if you want to use sysmouse" >&5
5249 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5250
5251 # Check whether --with-sysmouse or --without-sysmouse was given.
5252 if test "${with_sysmouse+set}" = set; then
5253   withval="$with_sysmouse"
5254   cf_with_sysmouse=$withval
5255 else
5256   cf_with_sysmouse=maybe
5257 fi;
5258         if test "$cf_with_sysmouse" != no ; then
5259         cat >conftest.$ac_ext <<_ACEOF
5260 #line 5260 "configure"
5261 #include "confdefs.h"
5262
5263 #include <osreldate.h>
5264 #if (__FreeBSD_version >= 400017)
5265 #include <sys/consio.h>
5266 #include <sys/fbio.h>
5267 #else
5268 #include <machine/console.h>
5269 #endif
5270
5271 int
5272 main ()
5273 {
5274
5275         struct mouse_info the_mouse;
5276         ioctl(0, CONS_MOUSECTL, &the_mouse);
5277
5278   ;
5279   return 0;
5280 }
5281 _ACEOF
5282 rm -f conftest.$ac_objext
5283 if { (eval echo "$as_me:5283: \"$ac_compile\"") >&5
5284   (eval $ac_compile) 2>&5
5285   ac_status=$?
5286   echo "$as_me:5286: \$? = $ac_status" >&5
5287   (exit $ac_status); } &&
5288          { ac_try='test -s conftest.$ac_objext'
5289   { (eval echo "$as_me:5289: \"$ac_try\"") >&5
5290   (eval $ac_try) 2>&5
5291   ac_status=$?
5292   echo "$as_me:5292: \$? = $ac_status" >&5
5293   (exit $ac_status); }; }; then
5294   cf_with_sysmouse=yes
5295 else
5296   echo "$as_me: failed program was:" >&5
5297 cat conftest.$ac_ext >&5
5298 cf_with_sysmouse=no
5299 fi
5300 rm -f conftest.$ac_objext conftest.$ac_ext
5301         fi
5302 echo "$as_me:5302: result: $cf_with_sysmouse" >&5
5303 echo "${ECHO_T}$cf_with_sysmouse" >&6
5304 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5305 #define USE_SYSMOUSE 1
5306 EOF
5307
5308 fi
5309
5310 if test X"$CC_G_OPT" = X"" ; then
5311         CC_G_OPT='-g'
5312         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5313 fi
5314
5315 if test X"$CXX_G_OPT" = X"" ; then
5316         CXX_G_OPT='-g'
5317         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5318 fi
5319
5320 echo "$as_me:5320: checking for default loader flags" >&5
5321 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5322 case $DFT_LWR_MODEL in
5323 libtool) LD_MODEL=''   ;;
5324 normal)  LD_MODEL=''   ;;
5325 debug)   LD_MODEL=$CC_G_OPT ;;
5326 profile) LD_MODEL='-pg';;
5327 shared)  LD_MODEL=''   ;;
5328 esac
5329 echo "$as_me:5329: result: $LD_MODEL" >&5
5330 echo "${ECHO_T}$LD_MODEL" >&6
5331
5332 case $DFT_LWR_MODEL in
5333 shared)
5334
5335 echo "$as_me:5335: checking if rpath option should be used" >&5
5336 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5337
5338 # Check whether --enable-rpath or --disable-rpath was given.
5339 if test "${enable_rpath+set}" = set; then
5340   enableval="$enable_rpath"
5341   cf_cv_enable_rpath=$enableval
5342 else
5343   cf_cv_enable_rpath=no
5344 fi;
5345 echo "$as_me:5345: result: $cf_cv_enable_rpath" >&5
5346 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5347
5348 echo "$as_me:5348: checking if shared libraries should be relinked during install" >&5
5349 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5350
5351 # Check whether --enable-relink or --disable-relink was given.
5352 if test "${enable_relink+set}" = set; then
5353   enableval="$enable_relink"
5354   cf_cv_do_relink=$enableval
5355 else
5356   cf_cv_do_relink=yes
5357 fi;
5358 echo "$as_me:5358: result: $cf_cv_do_relink" >&5
5359 echo "${ECHO_T}$cf_cv_do_relink" >&6
5360         ;;
5361 esac
5362
5363 LD_RPATH_OPT=
5364 echo "$as_me:5364: checking for an rpath option" >&5
5365 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5366 case $cf_cv_system_name in #(vi
5367 irix*) #(vi
5368         if test "$GCC" = yes; then
5369                 LD_RPATH_OPT="-Wl,-rpath,"
5370         else
5371                 LD_RPATH_OPT="-rpath "
5372         fi
5373         ;;
5374 linux*|gnu*|k*bsd*-gnu) #(vi
5375         LD_RPATH_OPT="-Wl,-rpath,"
5376         ;;
5377 openbsd[2-9].*|mirbsd*) #(vi
5378         LD_RPATH_OPT="-Wl,-rpath,"
5379         ;;
5380 dragonfly*|freebsd*) #(vi
5381         LD_RPATH_OPT="-rpath "
5382         ;;
5383 netbsd*) #(vi
5384         LD_RPATH_OPT="-Wl,-rpath,"
5385         ;;
5386 osf*|mls+*) #(vi
5387         LD_RPATH_OPT="-rpath "
5388         ;;
5389 solaris2*) #(vi
5390         LD_RPATH_OPT="-R"
5391         ;;
5392 *)
5393         ;;
5394 esac
5395 echo "$as_me:5395: result: $LD_RPATH_OPT" >&5
5396 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5397
5398 case "x$LD_RPATH_OPT" in #(vi
5399 x-R*)
5400         echo "$as_me:5400: checking if we need a space after rpath option" >&5
5401 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5402         cf_save_LIBS="$LIBS"
5403         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5404         cat >conftest.$ac_ext <<_ACEOF
5405 #line 5405 "configure"
5406 #include "confdefs.h"
5407
5408 int
5409 main ()
5410 {
5411
5412   ;
5413   return 0;
5414 }
5415 _ACEOF
5416 rm -f conftest.$ac_objext conftest$ac_exeext
5417 if { (eval echo "$as_me:5417: \"$ac_link\"") >&5
5418   (eval $ac_link) 2>&5
5419   ac_status=$?
5420   echo "$as_me:5420: \$? = $ac_status" >&5
5421   (exit $ac_status); } &&
5422          { ac_try='test -s conftest$ac_exeext'
5423   { (eval echo "$as_me:5423: \"$ac_try\"") >&5
5424   (eval $ac_try) 2>&5
5425   ac_status=$?
5426   echo "$as_me:5426: \$? = $ac_status" >&5
5427   (exit $ac_status); }; }; then
5428   cf_rpath_space=no
5429 else
5430   echo "$as_me: failed program was:" >&5
5431 cat conftest.$ac_ext >&5
5432 cf_rpath_space=yes
5433 fi
5434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5435         LIBS="$cf_save_LIBS"
5436         echo "$as_me:5436: result: $cf_rpath_space" >&5
5437 echo "${ECHO_T}$cf_rpath_space" >&6
5438         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5439         ;;
5440 esac
5441
5442         LOCAL_LDFLAGS=
5443         LOCAL_LDFLAGS2=
5444         LD_SHARED_OPTS=
5445         INSTALL_LIB="-m 644"
5446
5447         cf_cv_do_symlinks=no
5448         cf_ld_rpath_opt=
5449         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5450
5451         echo "$as_me:5451: checking if release/abi version should be used for shared libs" >&5
5452 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5453
5454 # Check whether --with-shlib-version or --without-shlib-version was given.
5455 if test "${with_shlib_version+set}" = set; then
5456   withval="$with_shlib_version"
5457   test -z "$withval" && withval=auto
5458         case $withval in #(vi
5459         yes) #(vi
5460                 cf_cv_shlib_version=auto
5461                 ;;
5462         rel|abi|auto|no) #(vi
5463                 cf_cv_shlib_version=$withval
5464                 ;;
5465         *)
5466                 { { echo "$as_me:5466: error: option value must be one of: rel, abi, auto or no" >&5
5467 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5468    { (exit 1); exit 1; }; }
5469                 ;;
5470         esac
5471
5472 else
5473   cf_cv_shlib_version=auto
5474 fi;
5475         echo "$as_me:5475: result: $cf_cv_shlib_version" >&5
5476 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5477
5478         cf_cv_rm_so_locs=no
5479
5480         # Some less-capable ports of gcc support only -fpic
5481         CC_SHARED_OPTS=
5482         if test "$GCC" = yes
5483         then
5484                 echo "$as_me:5484: checking which $CC option to use" >&5
5485 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5486                 cf_save_CFLAGS="$CFLAGS"
5487                 for CC_SHARED_OPTS in -fPIC -fpic ''
5488                 do
5489                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5490                         cat >conftest.$ac_ext <<_ACEOF
5491 #line 5491 "configure"
5492 #include "confdefs.h"
5493 #include <stdio.h>
5494 int
5495 main ()
5496 {
5497 int x = 1
5498   ;
5499   return 0;
5500 }
5501 _ACEOF
5502 rm -f conftest.$ac_objext
5503 if { (eval echo "$as_me:5503: \"$ac_compile\"") >&5
5504   (eval $ac_compile) 2>&5
5505   ac_status=$?
5506   echo "$as_me:5506: \$? = $ac_status" >&5
5507   (exit $ac_status); } &&
5508          { ac_try='test -s conftest.$ac_objext'
5509   { (eval echo "$as_me:5509: \"$ac_try\"") >&5
5510   (eval $ac_try) 2>&5
5511   ac_status=$?
5512   echo "$as_me:5512: \$? = $ac_status" >&5
5513   (exit $ac_status); }; }; then
5514   break
5515 else
5516   echo "$as_me: failed program was:" >&5
5517 cat conftest.$ac_ext >&5
5518 fi
5519 rm -f conftest.$ac_objext conftest.$ac_ext
5520                 done
5521                 echo "$as_me:5521: result: $CC_SHARED_OPTS" >&5
5522 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5523                 CFLAGS="$cf_save_CFLAGS"
5524         fi
5525
5526         cf_cv_shlib_version_infix=no
5527
5528         case $cf_cv_system_name in #(vi
5529         aix4.3-9*|aix[5-7]*) #(vi
5530                 if test "$GCC" = yes; then
5531                         CC_SHARED_OPTS=
5532                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5533                 else
5534                         # CC_SHARED_OPTS='-qpic=large -G'
5535                         # perhaps "-bM:SRE -bnoentry -bexpall"
5536                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5537                 fi
5538                 ;;
5539         beos*) #(vi
5540                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5541                 ;;
5542         cygwin*) #(vi
5543                 CC_SHARED_OPTS=
5544                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5545                 cf_cv_shlib_version=cygdll
5546                 cf_cv_shlib_version_infix=cygdll
5547                 cat >mk_shared_lib.sh <<-CF_EOF
5548                 #!/bin/sh
5549                 SHARED_LIB=\$1
5550                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5551                 shift
5552                 cat <<-EOF
5553                 Linking shared library
5554                 ** SHARED_LIB \$SHARED_LIB
5555                 ** IMPORT_LIB \$IMPORT_LIB
5556 EOF
5557                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5558 CF_EOF
5559                 chmod +x mk_shared_lib.sh
5560                 ;;
5561         darwin*) #(vi
5562                 EXTRA_CFLAGS="-no-cpp-precomp"
5563                 CC_SHARED_OPTS="-dynamic"
5564                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5565                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5566                 cf_cv_shlib_version_infix=yes
5567                 echo "$as_me:5567: checking if ld -search_paths_first works" >&5
5568 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5569 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5570   echo $ECHO_N "(cached) $ECHO_C" >&6
5571 else
5572
5573                         cf_save_LDFLAGS=$LDFLAGS
5574                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5575                         cat >conftest.$ac_ext <<_ACEOF
5576 #line 5576 "configure"
5577 #include "confdefs.h"
5578
5579 int
5580 main ()
5581 {
5582 int i;
5583   ;
5584   return 0;
5585 }
5586 _ACEOF
5587 rm -f conftest.$ac_objext conftest$ac_exeext
5588 if { (eval echo "$as_me:5588: \"$ac_link\"") >&5
5589   (eval $ac_link) 2>&5
5590   ac_status=$?
5591   echo "$as_me:5591: \$? = $ac_status" >&5
5592   (exit $ac_status); } &&
5593          { ac_try='test -s conftest$ac_exeext'
5594   { (eval echo "$as_me:5594: \"$ac_try\"") >&5
5595   (eval $ac_try) 2>&5
5596   ac_status=$?
5597   echo "$as_me:5597: \$? = $ac_status" >&5
5598   (exit $ac_status); }; }; then
5599   cf_cv_ldflags_search_paths_first=yes
5600 else
5601   echo "$as_me: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603 cf_cv_ldflags_search_paths_first=no
5604 fi
5605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5606                                 LDFLAGS=$cf_save_LDFLAGS
5607 fi
5608 echo "$as_me:5608: result: $cf_cv_ldflags_search_paths_first" >&5
5609 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5610                 if test $cf_cv_ldflags_search_paths_first = yes; then
5611                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5612                 fi
5613                 ;;
5614         hpux*) #(vi
5615                 # (tested with gcc 2.7.2 -- I don't have c89)
5616                 if test "$GCC" = yes; then
5617                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5618                 else
5619                         CC_SHARED_OPTS='+Z'
5620                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5621                 fi
5622                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5623                 # HP-UX shared libraries must be executable, and should be
5624                 # readonly to exploit a quirk in the memory manager.
5625                 INSTALL_LIB="-m 555"
5626                 ;;
5627         interix*)
5628                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5629                 if test "$cf_cv_shlib_version" = rel; then
5630                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5631                 else
5632                         cf_shared_soname='`basename `'
5633                 fi
5634                 CC_SHARED_OPTS=
5635                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5636                 ;;
5637         irix*) #(vi
5638                 if test "$cf_cv_enable_rpath" = yes ; then
5639                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5640                 fi
5641                 # tested with IRIX 5.2 and 'cc'.
5642                 if test "$GCC" != yes; then
5643                         CC_SHARED_OPTS='-KPIC'
5644                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5645                 else
5646                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5647                 fi
5648                 cf_cv_rm_so_locs=yes
5649                 ;;
5650         linux*|gnu*|k*bsd*-gnu) #(vi
5651                 if test "$DFT_LWR_MODEL" = "shared" ; then
5652                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5653                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5654                 fi
5655                 if test "$cf_cv_enable_rpath" = yes ; then
5656                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5657                 fi
5658
5659         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5660         if test "$cf_cv_shlib_version" = rel; then
5661                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5662         else
5663                 cf_cv_shared_soname='`basename $@`'
5664         fi
5665
5666                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5667                 ;;
5668         mingw*) #(vi
5669                 cf_cv_shlib_version=mingw
5670                 cf_cv_shlib_version_infix=mingw
5671                 CC_SHARED_OPTS=
5672                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5673                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5674                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5675                 cat >mk_shared_lib.sh <<-CF_EOF
5676                 #!/bin/sh
5677                 SHARED_LIB=\$1
5678                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5679                 shift
5680                 cat <<-EOF
5681                 Linking shared library
5682                 ** SHARED_LIB \$SHARED_LIB
5683                 ** IMPORT_LIB \$IMPORT_LIB
5684 EOF
5685                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5686 CF_EOF
5687                 chmod +x mk_shared_lib.sh
5688                 ;;
5689         openbsd[2-9].*|mirbsd*) #(vi
5690                 if test "$DFT_LWR_MODEL" = "shared" ; then
5691                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5692                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5693                 fi
5694                 if test "$cf_cv_enable_rpath" = yes ; then
5695                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5696                 fi
5697                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5698
5699         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5700         if test "$cf_cv_shlib_version" = rel; then
5701                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5702         else
5703                 cf_cv_shared_soname='`basename $@`'
5704         fi
5705
5706                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5707                 ;;
5708         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5709                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5710                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5711                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5712                 ;;
5713         dragonfly*|freebsd*) #(vi
5714                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5715                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5716                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5717                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5718                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5719                 fi
5720
5721         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5722         if test "$cf_cv_shlib_version" = rel; then
5723                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5724         else
5725                 cf_cv_shared_soname='`basename $@`'
5726         fi
5727
5728                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5729                 ;;
5730         netbsd*) #(vi
5731                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5732                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5733                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5734                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5735                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5736                         if test "$cf_cv_shlib_version" = auto; then
5737                         if test -f /usr/libexec/ld.elf_so; then
5738                                 cf_cv_shlib_version=abi
5739                         else
5740                                 cf_cv_shlib_version=rel
5741                         fi
5742                         fi
5743
5744         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5745         if test "$cf_cv_shlib_version" = rel; then
5746                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5747         else
5748                 cf_cv_shared_soname='`basename $@`'
5749         fi
5750
5751                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5752                 else
5753                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5754                 fi
5755                 ;;
5756         osf*|mls+*) #(vi
5757                 # tested with OSF/1 V3.2 and 'cc'
5758                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5759                 # link with shared libs).
5760                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5761                 case $host_os in #(vi
5762                 osf4*)
5763                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5764                         ;;
5765                 esac
5766                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5767                 if test "$DFT_LWR_MODEL" = "shared" ; then
5768                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5769                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5770                 fi
5771                 cf_cv_rm_so_locs=yes
5772                 ;;
5773         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5774                 # tested with osr5.0.5
5775                 if test "$GCC" != yes; then
5776                         CC_SHARED_OPTS='-belf -KPIC'
5777                 fi
5778                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5779                 if test "$cf_cv_enable_rpath" = yes ; then
5780                         # only way is to set LD_RUN_PATH but no switch for it
5781                         RUN_PATH=$libdir
5782                 fi
5783                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5784                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5785                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5786                 ;;
5787         sunos4*) #(vi
5788                 # tested with SunOS 4.1.1 and gcc 2.7.0
5789                 if test "$GCC" != yes; then
5790                         CC_SHARED_OPTS='-KPIC'
5791                 fi
5792                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5793                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5794                 ;;
5795         solaris2*) #(vi
5796                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5797                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5798                 if test "$DFT_LWR_MODEL" = "shared" ; then
5799                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5800                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5801                 fi
5802                 if test "$cf_cv_enable_rpath" = yes ; then
5803                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5804                 fi
5805
5806         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5807         if test "$cf_cv_shlib_version" = rel; then
5808                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5809         else
5810                 cf_cv_shared_soname='`basename $@`'
5811         fi
5812
5813                 if test "$GCC" != yes; then
5814                         cf_save_CFLAGS="$CFLAGS"
5815                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5816                         do
5817                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5818                                 cat >conftest.$ac_ext <<_ACEOF
5819 #line 5819 "configure"
5820 #include "confdefs.h"
5821 #include <stdio.h>
5822 int
5823 main ()
5824 {
5825 printf("Hello\n");
5826   ;
5827   return 0;
5828 }
5829 _ACEOF
5830 rm -f conftest.$ac_objext
5831 if { (eval echo "$as_me:5831: \"$ac_compile\"") >&5
5832   (eval $ac_compile) 2>&5
5833   ac_status=$?
5834   echo "$as_me:5834: \$? = $ac_status" >&5
5835   (exit $ac_status); } &&
5836          { ac_try='test -s conftest.$ac_objext'
5837   { (eval echo "$as_me:5837: \"$ac_try\"") >&5
5838   (eval $ac_try) 2>&5
5839   ac_status=$?
5840   echo "$as_me:5840: \$? = $ac_status" >&5
5841   (exit $ac_status); }; }; then
5842   break
5843 else
5844   echo "$as_me: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5846 fi
5847 rm -f conftest.$ac_objext conftest.$ac_ext
5848                         done
5849                         CFLAGS="$cf_save_CFLAGS"
5850                         CC_SHARED_OPTS=$cf_shared_opts
5851                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5852                 else
5853                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5854                 fi
5855                 ;;
5856         sysv5uw7*|unix_sv*) #(vi
5857                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5858                 if test "$GCC" != yes; then
5859                         CC_SHARED_OPTS='-KPIC'
5860                 fi
5861                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5862                 ;;
5863         *)
5864                 CC_SHARED_OPTS='unknown'
5865                 MK_SHARED_LIB='echo unknown'
5866                 ;;
5867         esac
5868
5869         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5870         case "$cf_cv_shlib_version" in #(vi
5871         rel|abi)
5872                 case "$MK_SHARED_LIB" in #(vi
5873                 *'-o $@') #(vi
5874                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5875                         ;;
5876                 *)
5877                         { echo "$as_me:5877: WARNING: ignored --with-shlib-version" >&5
5878 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5879                         ;;
5880                 esac
5881                 ;;
5882         esac
5883
5884         # RPATH_LIST is a colon-separated list of directories
5885         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5886         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5887
5888         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5889
5890 echo "${as_me:-configure}:5890: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5891
5892         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5893
5894 echo "${as_me:-configure}:5894: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5895
5896 if test "$CC_SHARED_OPTS" = "unknown"; then
5897         for model in $cf_list_models; do
5898                 if test "$model" = "shared"; then
5899                         { { echo "$as_me:5899: error: Shared libraries are not supported in this version" >&5
5900 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5901    { (exit 1); exit 1; }; }
5902                 fi
5903         done
5904 fi
5905
5906 ### If we're building with rpath, try to link non-standard libs that way too.
5907 if test "$DFT_LWR_MODEL" = "shared"; then
5908
5909 echo "$as_me:5909: checking if rpath-hack should be disabled" >&5
5910 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5911
5912 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5913 if test "${enable_rpath_hack+set}" = set; then
5914   enableval="$enable_rpath_hack"
5915   test "$enableval" != no && enableval=yes
5916   if test "$enableval" != "yes" ; then
5917     cf_disable_rpath_hack=yes
5918   else
5919     cf_disable_rpath_hack=no
5920   fi
5921 else
5922   enableval=yes
5923   cf_disable_rpath_hack=no
5924
5925 fi;
5926 echo "$as_me:5926: result: $cf_disable_rpath_hack" >&5
5927 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5928 if test "$cf_disable_rpath_hack" = no ; then
5929
5930 echo "$as_me:5930: checking for updated LDFLAGS" >&5
5931 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5932 if test -n "$LD_RPATH_OPT" ; then
5933         echo "$as_me:5933: result: maybe" >&5
5934 echo "${ECHO_T}maybe" >&6
5935
5936         for ac_prog in ldd
5937 do
5938   # Extract the first word of "$ac_prog", so it can be a program name with args.
5939 set dummy $ac_prog; ac_word=$2
5940 echo "$as_me:5940: checking for $ac_word" >&5
5941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5942 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5943   echo $ECHO_N "(cached) $ECHO_C" >&6
5944 else
5945   if test -n "$cf_ldd_prog"; then
5946   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5947 else
5948   ac_save_IFS=$IFS; IFS=$ac_path_separator
5949 ac_dummy="$PATH"
5950 for ac_dir in $ac_dummy; do
5951   IFS=$ac_save_IFS
5952   test -z "$ac_dir" && ac_dir=.
5953   $as_executable_p "$ac_dir/$ac_word" || continue
5954 ac_cv_prog_cf_ldd_prog="$ac_prog"
5955 echo "$as_me:5955: found $ac_dir/$ac_word" >&5
5956 break
5957 done
5958
5959 fi
5960 fi
5961 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5962 if test -n "$cf_ldd_prog"; then
5963   echo "$as_me:5963: result: $cf_ldd_prog" >&5
5964 echo "${ECHO_T}$cf_ldd_prog" >&6
5965 else
5966   echo "$as_me:5966: result: no" >&5
5967 echo "${ECHO_T}no" >&6
5968 fi
5969
5970   test -n "$cf_ldd_prog" && break
5971 done
5972 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5973
5974         cf_rpath_list="/usr/lib /lib"
5975         if test "$cf_ldd_prog" != no
5976         then
5977                 cf_rpath_oops=
5978
5979 cat >conftest.$ac_ext <<_ACEOF
5980 #line 5980 "configure"
5981 #include "confdefs.h"
5982 #include <stdio.h>
5983 int
5984 main ()
5985 {
5986 printf("Hello");
5987   ;
5988   return 0;
5989 }
5990 _ACEOF
5991 rm -f conftest.$ac_objext conftest$ac_exeext
5992 if { (eval echo "$as_me:5992: \"$ac_link\"") >&5
5993   (eval $ac_link) 2>&5
5994   ac_status=$?
5995   echo "$as_me:5995: \$? = $ac_status" >&5
5996   (exit $ac_status); } &&
5997          { ac_try='test -s conftest$ac_exeext'
5998   { (eval echo "$as_me:5998: \"$ac_try\"") >&5
5999   (eval $ac_try) 2>&5
6000   ac_status=$?
6001   echo "$as_me:6001: \$? = $ac_status" >&5
6002   (exit $ac_status); }; }; then
6003   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6004                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6005 else
6006   echo "$as_me: failed program was:" >&5
6007 cat conftest.$ac_ext >&5
6008 fi
6009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6010
6011                 # If we passed the link-test, but get a "not found" on a given library,
6012                 # this could be due to inept reconfiguration of gcc to make it only
6013                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6014                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6015                 # /usr/local libraries.
6016                 if test -n "$cf_rpath_oops"
6017                 then
6018                         for cf_rpath_src in $cf_rpath_oops
6019                         do
6020                                 for cf_rpath_dir in \
6021                                         /usr/local \
6022                                         /usr/pkg \
6023                                         /opt/sfw
6024                                 do
6025                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6026                                         then
6027                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6028
6029 echo "${as_me:-configure}:6029: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6030
6031                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6032                                                 break
6033                                         fi
6034                                 done
6035                         done
6036                 fi
6037         fi
6038
6039         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6040
6041 echo "${as_me:-configure}:6041: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6042
6043 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6044
6045 echo "${as_me:-configure}:6045: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6046
6047 cf_rpath_dst=
6048 for cf_rpath_src in $LDFLAGS
6049 do
6050         case $cf_rpath_src in #(vi
6051         -L*) #(vi
6052
6053                 # check if this refers to a directory which we will ignore
6054                 cf_rpath_skip=no
6055                 if test -n "$cf_rpath_list"
6056                 then
6057                         for cf_rpath_item in $cf_rpath_list
6058                         do
6059                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6060                                 then
6061                                         cf_rpath_skip=yes
6062                                         break
6063                                 fi
6064                         done
6065                 fi
6066
6067                 if test "$cf_rpath_skip" = no
6068                 then
6069                         # transform the option
6070                         if test "$LD_RPATH_OPT" = "-R " ; then
6071                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6072                         else
6073                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6074                         fi
6075
6076                         # if we have not already added this, add it now
6077                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6078                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6079                         then
6080                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6081
6082 echo "${as_me:-configure}:6082: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6083
6084                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6085                         fi
6086                 fi
6087                 ;;
6088         esac
6089         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6090 done
6091 LDFLAGS=$cf_rpath_dst
6092
6093 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6094
6095 echo "${as_me:-configure}:6095: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6096
6097 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6098
6099 echo "${as_me:-configure}:6099: testing ...checking LIBS $LIBS ..." 1>&5
6100
6101 cf_rpath_dst=
6102 for cf_rpath_src in $LIBS
6103 do
6104         case $cf_rpath_src in #(vi
6105         -L*) #(vi
6106
6107                 # check if this refers to a directory which we will ignore
6108                 cf_rpath_skip=no
6109                 if test -n "$cf_rpath_list"
6110                 then
6111                         for cf_rpath_item in $cf_rpath_list
6112                         do
6113                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6114                                 then
6115                                         cf_rpath_skip=yes
6116                                         break
6117                                 fi
6118                         done
6119                 fi
6120
6121                 if test "$cf_rpath_skip" = no
6122                 then
6123                         # transform the option
6124                         if test "$LD_RPATH_OPT" = "-R " ; then
6125                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6126                         else
6127                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6128                         fi
6129
6130                         # if we have not already added this, add it now
6131                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6132                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6133                         then
6134                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6135
6136 echo "${as_me:-configure}:6136: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6137
6138                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6139                         fi
6140                 fi
6141                 ;;
6142         esac
6143         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6144 done
6145 LIBS=$cf_rpath_dst
6146
6147 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6148
6149 echo "${as_me:-configure}:6149: testing ...checked LIBS $LIBS ..." 1>&5
6150
6151         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6152
6153 echo "${as_me:-configure}:6153: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6154
6155 fi
6156
6157 fi
6158
6159 fi
6160
6161 ###############################################################################
6162
6163 ###     use option --disable-overwrite to leave out the link to -lcurses
6164 echo "$as_me:6164: checking if you wish to install ncurses overwriting curses" >&5
6165 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6166
6167 # Check whether --enable-overwrite or --disable-overwrite was given.
6168 if test "${enable_overwrite+set}" = set; then
6169   enableval="$enable_overwrite"
6170   with_overwrite=$enableval
6171 else
6172   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6173 fi;
6174 echo "$as_me:6174: result: $with_overwrite" >&5
6175 echo "${ECHO_T}$with_overwrite" >&6
6176
6177 echo "$as_me:6177: checking if external terminfo-database is used" >&5
6178 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6179
6180 # Check whether --enable-database or --disable-database was given.
6181 if test "${enable_database+set}" = set; then
6182   enableval="$enable_database"
6183   use_database=$enableval
6184 else
6185   use_database=yes
6186 fi;
6187 echo "$as_me:6187: result: $use_database" >&5
6188 echo "${ECHO_T}$use_database" >&6
6189
6190 case $host_os in #(vi
6191 os2*) #(vi
6192         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6193         ;;
6194 *) #(vi
6195         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6196         ;;
6197 esac
6198
6199 if test "$use_database" != no ; then
6200         cat >>confdefs.h <<\EOF
6201 #define USE_DATABASE 1
6202 EOF
6203
6204         echo "$as_me:6204: checking which terminfo source-file will be installed" >&5
6205 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6206
6207 # Check whether --with-database or --without-database was given.
6208 if test "${with_database+set}" = set; then
6209   withval="$with_database"
6210   TERMINFO_SRC=$withval
6211 fi;
6212         echo "$as_me:6212: result: $TERMINFO_SRC" >&5
6213 echo "${ECHO_T}$TERMINFO_SRC" >&6
6214
6215         echo "$as_me:6215: checking whether to use hashed database instead of directory/tree" >&5
6216 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6217
6218 # Check whether --with-hashed-db or --without-hashed-db was given.
6219 if test "${with_hashed_db+set}" = set; then
6220   withval="$with_hashed_db"
6221
6222 else
6223   with_hashed_db=no
6224 fi;
6225         echo "$as_me:6225: result: $with_hashed_db" >&5
6226 echo "${ECHO_T}$with_hashed_db" >&6
6227 else
6228         with_hashed_db=no
6229 fi
6230
6231 echo "$as_me:6231: checking for list of fallback descriptions" >&5
6232 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6233
6234 # Check whether --with-fallbacks or --without-fallbacks was given.
6235 if test "${with_fallbacks+set}" = set; then
6236   withval="$with_fallbacks"
6237   with_fallback=$withval
6238 else
6239   with_fallback=
6240 fi;
6241 echo "$as_me:6241: result: $with_fallback" >&5
6242 echo "${ECHO_T}$with_fallback" >&6
6243 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6244
6245 echo "$as_me:6245: checking if you want modern xterm or antique" >&5
6246 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6247
6248 # Check whether --with-xterm-new or --without-xterm-new was given.
6249 if test "${with_xterm_new+set}" = set; then
6250   withval="$with_xterm_new"
6251   with_xterm_new=$withval
6252 else
6253   with_xterm_new=yes
6254 fi;
6255 case $with_xterm_new in
6256 no)     with_xterm_new=xterm-old;;
6257 *)      with_xterm_new=xterm-new;;
6258 esac
6259 echo "$as_me:6259: result: $with_xterm_new" >&5
6260 echo "${ECHO_T}$with_xterm_new" >&6
6261 WHICH_XTERM=$with_xterm_new
6262
6263 echo "$as_me:6263: checking if xterm backspace sends BS or DEL" >&5
6264 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6265
6266 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6267 if test "${with_xterm_kbs+set}" = set; then
6268   withval="$with_xterm_kbs"
6269   with_xterm_kbs=$withval
6270 else
6271   with_xterm_kbs=BS
6272 fi;
6273 case x$with_xterm_kbs in
6274 xyes|xno|xBS|xbs|x8)
6275         with_xterm_kbs=BS
6276         ;;
6277 xDEL|xdel|x127)
6278         with_xterm_kbs=DEL
6279         ;;
6280 *)
6281         with_xterm_kbs=$withval
6282         ;;
6283 esac
6284 echo "$as_me:6284: result: $with_xterm_kbs" >&5
6285 echo "${ECHO_T}$with_xterm_kbs" >&6
6286 XTERM_KBS=$with_xterm_kbs
6287
6288 MAKE_TERMINFO=
6289 if test "$use_database" = no ; then
6290         TERMINFO="${datadir}/terminfo"
6291         MAKE_TERMINFO="#"
6292 else
6293
6294 echo "$as_me:6294: checking for list of terminfo directories" >&5
6295 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6296
6297         case $cf_cv_system_name in
6298         os2*)   PATH_SEPARATOR=';'  ;;
6299         *)      PATH_SEPARATOR=':'  ;;
6300         esac
6301
6302 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6303 if test "${with_terminfo_dirs+set}" = set; then
6304   withval="$with_terminfo_dirs"
6305
6306 else
6307   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6308 fi;
6309 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6310 cf_dst_path=
6311 for cf_src_path in $withval
6312 do
6313
6314 if test "x$prefix" != xNONE; then
6315   cf_path_syntax="$prefix"
6316 else
6317   cf_path_syntax="$ac_default_prefix"
6318 fi
6319
6320 case ".$cf_src_path" in #(vi
6321 .\$\(*\)*|.\'*\'*) #(vi
6322   ;;
6323 ..|./*|.\\*) #(vi
6324   ;;
6325 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6326   ;;
6327 .\${*prefix}*|.\${*dir}*) #(vi
6328   eval cf_src_path="$cf_src_path"
6329   case ".$cf_src_path" in #(vi
6330   .NONE/*)
6331     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6332     ;;
6333   esac
6334   ;; #(vi
6335 .no|.NONE/*)
6336   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6337   ;;
6338 *)
6339   { { echo "$as_me:6339: error: expected a pathname, not \"$cf_src_path\"" >&5
6340 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6341    { (exit 1); exit 1; }; }
6342   ;;
6343 esac
6344
6345   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6346   cf_dst_path="${cf_dst_path}${cf_src_path}"
6347 done
6348 IFS="$ac_save_ifs"
6349
6350 eval 'TERMINFO_DIRS="$cf_dst_path"'
6351
6352 echo "$as_me:6352: result: $TERMINFO_DIRS" >&5
6353 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6354 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6355 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6356 EOF
6357
6358 echo "$as_me:6358: checking for default terminfo directory" >&5
6359 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6360
6361 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6362 if test "${with_default_terminfo_dir+set}" = set; then
6363   withval="$with_default_terminfo_dir"
6364
6365 else
6366   withval="${TERMINFO:-${datadir}/terminfo}"
6367 fi; if test -n "${datadir}/terminfo" ; then
6368
6369 if test "x$prefix" != xNONE; then
6370   cf_path_syntax="$prefix"
6371 else
6372   cf_path_syntax="$ac_default_prefix"
6373 fi
6374
6375 case ".$withval" in #(vi
6376 .\$\(*\)*|.\'*\'*) #(vi
6377   ;;
6378 ..|./*|.\\*) #(vi
6379   ;;
6380 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6381   ;;
6382 .\${*prefix}*|.\${*dir}*) #(vi
6383   eval withval="$withval"
6384   case ".$withval" in #(vi
6385   .NONE/*)
6386     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6387     ;;
6388   esac
6389   ;; #(vi
6390 .no|.NONE/*)
6391   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6392   ;;
6393 *)
6394   { { echo "$as_me:6394: error: expected a pathname, not \"$withval\"" >&5
6395 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6396    { (exit 1); exit 1; }; }
6397   ;;
6398 esac
6399
6400 fi
6401 TERMINFO="$withval"
6402
6403 echo "$as_me:6403: result: $TERMINFO" >&5
6404 echo "${ECHO_T}$TERMINFO" >&6
6405 cat >>confdefs.h <<EOF
6406 #define TERMINFO "$TERMINFO"
6407 EOF
6408
6409 fi
6410
6411 ###     use option --disable-big-core to make tic run on small machines
6412 ###     We need 4Mb, check if we can allocate 50% more than that.
6413 echo "$as_me:6413: checking if big-core option selected" >&5
6414 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6415
6416 # Check whether --enable-big-core or --disable-big-core was given.
6417 if test "${enable_big_core+set}" = set; then
6418   enableval="$enable_big_core"
6419   with_big_core=$enableval
6420 else
6421   if test "$cross_compiling" = yes; then
6422   with_big_core=no
6423 else
6424   cat >conftest.$ac_ext <<_ACEOF
6425 #line 6425 "configure"
6426 #include "confdefs.h"
6427
6428 #include <stdlib.h>
6429 #include <string.h>
6430 int main() {
6431         unsigned long n = 6000000L;
6432         char *s = malloc(n);
6433         if (s != 0)
6434                 s[0] = s[n-1] = 0;
6435         ${cf_cv_main_return:-return}(s == 0);
6436 }
6437 _ACEOF
6438 rm -f conftest$ac_exeext
6439 if { (eval echo "$as_me:6439: \"$ac_link\"") >&5
6440   (eval $ac_link) 2>&5
6441   ac_status=$?
6442   echo "$as_me:6442: \$? = $ac_status" >&5
6443   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6444   { (eval echo "$as_me:6444: \"$ac_try\"") >&5
6445   (eval $ac_try) 2>&5
6446   ac_status=$?
6447   echo "$as_me:6447: \$? = $ac_status" >&5
6448   (exit $ac_status); }; }; then
6449   with_big_core=yes
6450 else
6451   echo "$as_me: program exited with status $ac_status" >&5
6452 echo "$as_me: failed program was:" >&5
6453 cat conftest.$ac_ext >&5
6454 with_big_core=no
6455 fi
6456 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6457 fi
6458 fi;
6459 echo "$as_me:6459: result: $with_big_core" >&5
6460 echo "${ECHO_T}$with_big_core" >&6
6461 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6462 #define HAVE_BIG_CORE 1
6463 EOF
6464
6465 ### ISO C only guarantees 512-char strings, we have tables which load faster
6466 ### when constructed using "big" strings.  More than the C compiler, the awk
6467 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6468 echo "$as_me:6468: checking if big-strings option selected" >&5
6469 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6470
6471 # Check whether --enable-big-strings or --disable-big-strings was given.
6472 if test "${enable_big_strings+set}" = set; then
6473   enableval="$enable_big_strings"
6474   with_big_strings=$enableval
6475 else
6476
6477         case x$AWK in #(vi
6478         x)
6479                 eval with_big_strings=no
6480                 ;;
6481         *) #(vi
6482                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6483                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6484                         eval with_big_strings=yes
6485                 else
6486                         eval with_big_strings=no
6487                 fi
6488                 ;;
6489         esac
6490
6491 fi;
6492 echo "$as_me:6492: result: $with_big_strings" >&5
6493 echo "${ECHO_T}$with_big_strings" >&6
6494
6495 USE_BIG_STRINGS=0
6496 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6497
6498 ###     use option --enable-termcap to compile in the termcap fallback support
6499 echo "$as_me:6499: checking if you want termcap-fallback support" >&5
6500 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6501
6502 # Check whether --enable-termcap or --disable-termcap was given.
6503 if test "${enable_termcap+set}" = set; then
6504   enableval="$enable_termcap"
6505   with_termcap=$enableval
6506 else
6507   with_termcap=no
6508 fi;
6509 echo "$as_me:6509: result: $with_termcap" >&5
6510 echo "${ECHO_T}$with_termcap" >&6
6511
6512 if test "$with_termcap" != "yes" ; then
6513         if test "$use_database" = no ; then
6514                 if test -z "$with_fallback" ; then
6515                         { { echo "$as_me:6515: error: You have disabled the database w/o specifying fallbacks" >&5
6516 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6517    { (exit 1); exit 1; }; }
6518                 fi
6519         fi
6520         cat >>confdefs.h <<\EOF
6521 #define PURE_TERMINFO 1
6522 EOF
6523
6524 else
6525
6526 if test "$with_ticlib" != no ; then
6527         { { echo "$as_me:6527: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6528 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6529    { (exit 1); exit 1; }; }
6530 fi
6531
6532 cat >>confdefs.h <<\EOF
6533 #define USE_TERMCAP 1
6534 EOF
6535
6536 echo "$as_me:6536: checking for list of termcap files" >&5
6537 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6538
6539 # Check whether --with-termpath or --without-termpath was given.
6540 if test "${with_termpath+set}" = set; then
6541   withval="$with_termpath"
6542
6543 else
6544   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6545 fi;
6546 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6547 cf_dst_path=
6548 for cf_src_path in $withval
6549 do
6550
6551 if test "x$prefix" != xNONE; then
6552   cf_path_syntax="$prefix"
6553 else
6554   cf_path_syntax="$ac_default_prefix"
6555 fi
6556
6557 case ".$cf_src_path" in #(vi
6558 .\$\(*\)*|.\'*\'*) #(vi
6559   ;;
6560 ..|./*|.\\*) #(vi
6561   ;;
6562 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6563   ;;
6564 .\${*prefix}*|.\${*dir}*) #(vi
6565   eval cf_src_path="$cf_src_path"
6566   case ".$cf_src_path" in #(vi
6567   .NONE/*)
6568     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6569     ;;
6570   esac
6571   ;; #(vi
6572 .no|.NONE/*)
6573   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6574   ;;
6575 *)
6576   { { echo "$as_me:6576: error: expected a pathname, not \"$cf_src_path\"" >&5
6577 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6578    { (exit 1); exit 1; }; }
6579   ;;
6580 esac
6581
6582   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6583   cf_dst_path="${cf_dst_path}${cf_src_path}"
6584 done
6585 IFS="$ac_save_ifs"
6586
6587 eval 'TERMPATH="$cf_dst_path"'
6588
6589 echo "$as_me:6589: result: $TERMPATH" >&5
6590 echo "${ECHO_T}$TERMPATH" >&6
6591 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6592 #define TERMPATH "$TERMPATH"
6593 EOF
6594
6595 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6596 echo "$as_me:6596: checking if fast termcap-loader is needed" >&5
6597 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6598
6599 # Check whether --enable-getcap or --disable-getcap was given.
6600 if test "${enable_getcap+set}" = set; then
6601   enableval="$enable_getcap"
6602   with_getcap=$enableval
6603 else
6604   with_getcap=no
6605 fi;
6606 echo "$as_me:6606: result: $with_getcap" >&5
6607 echo "${ECHO_T}$with_getcap" >&6
6608 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6609 #define USE_GETCAP 1
6610 EOF
6611
6612 echo "$as_me:6612: checking if translated termcaps will be cached in ~/.terminfo" >&5
6613 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6614
6615 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6616 if test "${enable_getcap_cache+set}" = set; then
6617   enableval="$enable_getcap_cache"
6618   with_getcap_cache=$enableval
6619 else
6620   with_getcap_cache=no
6621 fi;
6622 echo "$as_me:6622: result: $with_getcap_cache" >&5
6623 echo "${ECHO_T}$with_getcap_cache" >&6
6624 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6625 #define USE_GETCAP_CACHE 1
6626 EOF
6627
6628 fi
6629
6630 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6631 echo "$as_me:6631: checking if ~/.terminfo is wanted" >&5
6632 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6633
6634 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6635 if test "${enable_home_terminfo+set}" = set; then
6636   enableval="$enable_home_terminfo"
6637   with_home_terminfo=$enableval
6638 else
6639   with_home_terminfo=yes
6640 fi;
6641 echo "$as_me:6641: result: $with_home_terminfo" >&5
6642 echo "${ECHO_T}$with_home_terminfo" >&6
6643 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6644 #define USE_HOME_TERMINFO 1
6645 EOF
6646
6647 echo "$as_me:6647: checking if you want to use restricted environment when running as root" >&5
6648 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6649
6650 # Check whether --enable-root-environ or --disable-root-environ was given.
6651 if test "${enable_root_environ+set}" = set; then
6652   enableval="$enable_root_environ"
6653   with_root_environ=$enableval
6654 else
6655   with_root_environ=yes
6656 fi;
6657 echo "$as_me:6657: result: $with_root_environ" >&5
6658 echo "${ECHO_T}$with_root_environ" >&6
6659 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6660 #define USE_ROOT_ENVIRON 1
6661 EOF
6662
6663 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6664 ###   to reduce storage requirements for the terminfo database.
6665
6666 for ac_func in \
6667         remove \
6668         unlink
6669 do
6670 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6671 echo "$as_me:6671: checking for $ac_func" >&5
6672 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6673 if eval "test \"\${$as_ac_var+set}\" = set"; then
6674   echo $ECHO_N "(cached) $ECHO_C" >&6
6675 else
6676   cat >conftest.$ac_ext <<_ACEOF
6677 #line 6677 "configure"
6678 #include "confdefs.h"
6679 /* System header to define __stub macros and hopefully few prototypes,
6680     which can conflict with char $ac_func (); below.  */
6681 #include <assert.h>
6682 /* Override any gcc2 internal prototype to avoid an error.  */
6683 #ifdef __cplusplus
6684 extern "C"
6685 #endif
6686 /* We use char because int might match the return type of a gcc2
6687    builtin and then its argument prototype would still apply.  */
6688 char $ac_func ();
6689 char (*f) ();
6690
6691 int
6692 main ()
6693 {
6694 /* The GNU C library defines this for functions which it implements
6695     to always fail with ENOSYS.  Some functions are actually named
6696     something starting with __ and the normal name is an alias.  */
6697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6698 choke me
6699 #else
6700 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6701 #endif
6702
6703   ;
6704   return 0;
6705 }
6706 _ACEOF
6707 rm -f conftest.$ac_objext conftest$ac_exeext
6708 if { (eval echo "$as_me:6708: \"$ac_link\"") >&5
6709   (eval $ac_link) 2>&5
6710   ac_status=$?
6711   echo "$as_me:6711: \$? = $ac_status" >&5
6712   (exit $ac_status); } &&
6713          { ac_try='test -s conftest$ac_exeext'
6714   { (eval echo "$as_me:6714: \"$ac_try\"") >&5
6715   (eval $ac_try) 2>&5
6716   ac_status=$?
6717   echo "$as_me:6717: \$? = $ac_status" >&5
6718   (exit $ac_status); }; }; then
6719   eval "$as_ac_var=yes"
6720 else
6721   echo "$as_me: failed program was:" >&5
6722 cat conftest.$ac_ext >&5
6723 eval "$as_ac_var=no"
6724 fi
6725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6726 fi
6727 echo "$as_me:6727: result: `eval echo '${'$as_ac_var'}'`" >&5
6728 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6729 if test `eval echo '${'$as_ac_var'}'` = yes; then
6730   cat >>confdefs.h <<EOF
6731 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6732 EOF
6733
6734 fi
6735 done
6736
6737 if test "$cross_compiling" = yes ; then
6738
6739 for ac_func in \
6740                 link \
6741                 symlink
6742 do
6743 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6744 echo "$as_me:6744: checking for $ac_func" >&5
6745 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6746 if eval "test \"\${$as_ac_var+set}\" = set"; then
6747   echo $ECHO_N "(cached) $ECHO_C" >&6
6748 else
6749   cat >conftest.$ac_ext <<_ACEOF
6750 #line 6750 "configure"
6751 #include "confdefs.h"
6752 /* System header to define __stub macros and hopefully few prototypes,
6753     which can conflict with char $ac_func (); below.  */
6754 #include <assert.h>
6755 /* Override any gcc2 internal prototype to avoid an error.  */
6756 #ifdef __cplusplus
6757 extern "C"
6758 #endif
6759 /* We use char because int might match the return type of a gcc2
6760    builtin and then its argument prototype would still apply.  */
6761 char $ac_func ();
6762 char (*f) ();
6763
6764 int
6765 main ()
6766 {
6767 /* The GNU C library defines this for functions which it implements
6768     to always fail with ENOSYS.  Some functions are actually named
6769     something starting with __ and the normal name is an alias.  */
6770 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6771 choke me
6772 #else
6773 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6774 #endif
6775
6776   ;
6777   return 0;
6778 }
6779 _ACEOF
6780 rm -f conftest.$ac_objext conftest$ac_exeext
6781 if { (eval echo "$as_me:6781: \"$ac_link\"") >&5
6782   (eval $ac_link) 2>&5
6783   ac_status=$?
6784   echo "$as_me:6784: \$? = $ac_status" >&5
6785   (exit $ac_status); } &&
6786          { ac_try='test -s conftest$ac_exeext'
6787   { (eval echo "$as_me:6787: \"$ac_try\"") >&5
6788   (eval $ac_try) 2>&5
6789   ac_status=$?
6790   echo "$as_me:6790: \$? = $ac_status" >&5
6791   (exit $ac_status); }; }; then
6792   eval "$as_ac_var=yes"
6793 else
6794   echo "$as_me: failed program was:" >&5
6795 cat conftest.$ac_ext >&5
6796 eval "$as_ac_var=no"
6797 fi
6798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6799 fi
6800 echo "$as_me:6800: result: `eval echo '${'$as_ac_var'}'`" >&5
6801 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6802 if test `eval echo '${'$as_ac_var'}'` = yes; then
6803   cat >>confdefs.h <<EOF
6804 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6805 EOF
6806
6807 fi
6808 done
6809
6810 else
6811         echo "$as_me:6811: checking if link/symlink functions work" >&5
6812 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6813 if test "${cf_cv_link_funcs+set}" = set; then
6814   echo $ECHO_N "(cached) $ECHO_C" >&6
6815 else
6816
6817                 cf_cv_link_funcs=
6818                 for cf_func in link symlink ; do
6819                         if test "$cross_compiling" = yes; then
6820
6821                         eval 'ac_cv_func_'$cf_func'=error'
6822 else
6823   cat >conftest.$ac_ext <<_ACEOF
6824 #line 6824 "configure"
6825 #include "confdefs.h"
6826
6827 #include <sys/types.h>
6828 #include <sys/stat.h>
6829 #ifdef HAVE_UNISTD_H
6830 #include <unistd.h>
6831 #endif
6832 int main()
6833 {
6834         int fail = 0;
6835         char *src = "config.log";
6836         char *dst = "conftest.chk";
6837         struct stat src_sb;
6838         struct stat dst_sb;
6839
6840         stat(src, &src_sb);
6841         fail = ($cf_func("config.log", "conftest.chk") < 0)
6842             || (stat(dst, &dst_sb) < 0)
6843             || (dst_sb.st_mtime != src_sb.st_mtime);
6844 #ifdef HAVE_UNLINK
6845         unlink(dst);
6846 #else
6847         remove(dst);
6848 #endif
6849         ${cf_cv_main_return:-return} (fail);
6850 }
6851
6852 _ACEOF
6853 rm -f conftest$ac_exeext
6854 if { (eval echo "$as_me:6854: \"$ac_link\"") >&5
6855   (eval $ac_link) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6859   { (eval echo "$as_me:6859: \"$ac_try\"") >&5
6860   (eval $ac_try) 2>&5
6861   ac_status=$?
6862   echo "$as_me:6862: \$? = $ac_status" >&5
6863   (exit $ac_status); }; }; then
6864
6865                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6866                         eval 'ac_cv_func_'$cf_func'=yes'
6867 else
6868   echo "$as_me: program exited with status $ac_status" >&5
6869 echo "$as_me: failed program was:" >&5
6870 cat conftest.$ac_ext >&5
6871
6872                         eval 'ac_cv_func_'$cf_func'=no'
6873 fi
6874 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6875 fi
6876                 done
6877                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6878
6879 fi
6880 echo "$as_me:6880: result: $cf_cv_link_funcs" >&5
6881 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6882         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6883 #define HAVE_LINK 1
6884 EOF
6885
6886         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6887 #define HAVE_SYMLINK 1
6888 EOF
6889
6890 fi
6891
6892 with_links=no
6893 with_symlinks=no
6894
6895 # soft links (symbolic links) are useful for some systems where hard links do
6896 # not work, or to make it simpler to copy terminfo trees around.
6897 if test "$ac_cv_func_symlink" = yes ; then
6898     echo "$as_me:6898: checking if tic should use symbolic links" >&5
6899 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6900
6901 # Check whether --enable-symlinks or --disable-symlinks was given.
6902 if test "${enable_symlinks+set}" = set; then
6903   enableval="$enable_symlinks"
6904   with_symlinks=$enableval
6905 else
6906   with_symlinks=no
6907 fi;
6908     echo "$as_me:6908: result: $with_symlinks" >&5
6909 echo "${ECHO_T}$with_symlinks" >&6
6910 fi
6911
6912 # If we have hard links and did not choose to use soft links instead, there is
6913 # no reason to make this choice optional - use the hard links.
6914 if test "$with_symlinks" = no ; then
6915     echo "$as_me:6915: checking if tic should use hard links" >&5
6916 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6917     if test "$ac_cv_func_link" = yes ; then
6918         with_links=yes
6919     else
6920         with_links=no
6921     fi
6922     echo "$as_me:6922: result: $with_links" >&5
6923 echo "${ECHO_T}$with_links" >&6
6924 fi
6925
6926 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6927 #define USE_LINKS 1
6928 EOF
6929
6930 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6931 #define USE_SYMLINKS 1
6932 EOF
6933
6934 ###   use option --enable-broken-linker to force on use of broken-linker support
6935 echo "$as_me:6935: checking if you want broken-linker support code" >&5
6936 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6937
6938 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6939 if test "${enable_broken_linker+set}" = set; then
6940   enableval="$enable_broken_linker"
6941   with_broken_linker=$enableval
6942 else
6943   with_broken_linker=${BROKEN_LINKER:-no}
6944 fi;
6945 echo "$as_me:6945: result: $with_broken_linker" >&5
6946 echo "${ECHO_T}$with_broken_linker" >&6
6947
6948 BROKEN_LINKER=0
6949 if test "$with_broken_linker" = yes ; then
6950         cat >>confdefs.h <<\EOF
6951 #define BROKEN_LINKER 1
6952 EOF
6953
6954         BROKEN_LINKER=1
6955 elif test "$DFT_LWR_MODEL" = shared ; then
6956         case $cf_cv_system_name in #(vi
6957         cygwin*)
6958                 cat >>confdefs.h <<\EOF
6959 #define BROKEN_LINKER 1
6960 EOF
6961
6962                 BROKEN_LINKER=1
6963                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6964
6965 echo "${as_me:-configure}:6965: testing cygwin linker is broken anyway ..." 1>&5
6966
6967                 ;;
6968         esac
6969 fi
6970
6971 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6972 echo "$as_me:6972: checking if tputs should process BSD-style prefix padding" >&5
6973 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6974
6975 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6976 if test "${enable_bsdpad+set}" = set; then
6977   enableval="$enable_bsdpad"
6978   with_bsdpad=$enableval
6979 else
6980   with_bsdpad=no
6981 fi;
6982 echo "$as_me:6982: result: $with_bsdpad" >&5
6983 echo "${ECHO_T}$with_bsdpad" >&6
6984 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6985 #define BSD_TPUTS 1
6986 EOF
6987
6988 ###   use option --enable-widec to turn on use of wide-character support
6989 NCURSES_CH_T=chtype
6990 NCURSES_LIBUTF8=0
6991
6992 NEED_WCHAR_H=0
6993 NCURSES_MBSTATE_T=0
6994 NCURSES_WCHAR_T=0
6995 NCURSES_WINT_T=0
6996
6997 # Check to define _XOPEN_SOURCE "automatically"
6998
6999 cf_XOPEN_SOURCE=500
7000 cf_POSIX_C_SOURCE=199506L
7001 cf_xopen_source=
7002
7003 case $host_os in #(vi
7004 aix[4-7]*) #(vi
7005         cf_xopen_source="-D_ALL_SOURCE"
7006         ;;
7007 cygwin) #(vi
7008         cf_XOPEN_SOURCE=600
7009         ;;
7010 darwin[0-8].*) #(vi
7011         cf_xopen_source="-D_APPLE_C_SOURCE"
7012         ;;
7013 darwin*) #(vi
7014         cf_xopen_source="-D_DARWIN_C_SOURCE"
7015         cf_XOPEN_SOURCE=
7016         ;;
7017 freebsd*|dragonfly*) #(vi
7018         # 5.x headers associate
7019         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7020         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7021         cf_POSIX_C_SOURCE=200112L
7022         cf_XOPEN_SOURCE=600
7023         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7024         ;;
7025 hpux11*) #(vi
7026         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7027         ;;
7028 hpux*) #(vi
7029         cf_xopen_source="-D_HPUX_SOURCE"
7030         ;;
7031 irix[56].*) #(vi
7032         cf_xopen_source="-D_SGI_SOURCE"
7033         cf_XOPEN_SOURCE=
7034         ;;
7035 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7036
7037 echo "$as_me:7037: checking if we must define _GNU_SOURCE" >&5
7038 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7039 if test "${cf_cv_gnu_source+set}" = set; then
7040   echo $ECHO_N "(cached) $ECHO_C" >&6
7041 else
7042
7043 cat >conftest.$ac_ext <<_ACEOF
7044 #line 7044 "configure"
7045 #include "confdefs.h"
7046 #include <sys/types.h>
7047 int
7048 main ()
7049 {
7050
7051 #ifndef _XOPEN_SOURCE
7052 make an error
7053 #endif
7054   ;
7055   return 0;
7056 }
7057 _ACEOF
7058 rm -f conftest.$ac_objext
7059 if { (eval echo "$as_me:7059: \"$ac_compile\"") >&5
7060   (eval $ac_compile) 2>&5
7061   ac_status=$?
7062   echo "$as_me:7062: \$? = $ac_status" >&5
7063   (exit $ac_status); } &&
7064          { ac_try='test -s conftest.$ac_objext'
7065   { (eval echo "$as_me:7065: \"$ac_try\"") >&5
7066   (eval $ac_try) 2>&5
7067   ac_status=$?
7068   echo "$as_me:7068: \$? = $ac_status" >&5
7069   (exit $ac_status); }; }; then
7070   cf_cv_gnu_source=no
7071 else
7072   echo "$as_me: failed program was:" >&5
7073 cat conftest.$ac_ext >&5
7074 cf_save="$CPPFLAGS"
7075          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7076          cat >conftest.$ac_ext <<_ACEOF
7077 #line 7077 "configure"
7078 #include "confdefs.h"
7079 #include <sys/types.h>
7080 int
7081 main ()
7082 {
7083
7084 #ifdef _XOPEN_SOURCE
7085 make an error
7086 #endif
7087   ;
7088   return 0;
7089 }
7090 _ACEOF
7091 rm -f conftest.$ac_objext
7092 if { (eval echo "$as_me:7092: \"$ac_compile\"") >&5
7093   (eval $ac_compile) 2>&5
7094   ac_status=$?
7095   echo "$as_me:7095: \$? = $ac_status" >&5
7096   (exit $ac_status); } &&
7097          { ac_try='test -s conftest.$ac_objext'
7098   { (eval echo "$as_me:7098: \"$ac_try\"") >&5
7099   (eval $ac_try) 2>&5
7100   ac_status=$?
7101   echo "$as_me:7101: \$? = $ac_status" >&5
7102   (exit $ac_status); }; }; then
7103   cf_cv_gnu_source=no
7104 else
7105   echo "$as_me: failed program was:" >&5
7106 cat conftest.$ac_ext >&5
7107 cf_cv_gnu_source=yes
7108 fi
7109 rm -f conftest.$ac_objext conftest.$ac_ext
7110         CPPFLAGS="$cf_save"
7111
7112 fi
7113 rm -f conftest.$ac_objext conftest.$ac_ext
7114
7115 fi
7116 echo "$as_me:7116: result: $cf_cv_gnu_source" >&5
7117 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7118 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7119
7120         ;;
7121 mirbsd*) #(vi
7122         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7123         cf_XOPEN_SOURCE=
7124
7125 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7126
7127 cf_save_CFLAGS="$CFLAGS"
7128 cf_save_CPPFLAGS="$CPPFLAGS"
7129
7130 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7131         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7132                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7133
7134 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7135         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7136                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7137
7138 echo "$as_me:7138: checking if we should define _POSIX_C_SOURCE" >&5
7139 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7140 if test "${cf_cv_posix_c_source+set}" = set; then
7141   echo $ECHO_N "(cached) $ECHO_C" >&6
7142 else
7143
7144 echo "${as_me:-configure}:7144: testing if the symbol is already defined go no further ..." 1>&5
7145
7146         cat >conftest.$ac_ext <<_ACEOF
7147 #line 7147 "configure"
7148 #include "confdefs.h"
7149 #include <sys/types.h>
7150 int
7151 main ()
7152 {
7153
7154 #ifndef _POSIX_C_SOURCE
7155 make an error
7156 #endif
7157   ;
7158   return 0;
7159 }
7160 _ACEOF
7161 rm -f conftest.$ac_objext
7162 if { (eval echo "$as_me:7162: \"$ac_compile\"") >&5
7163   (eval $ac_compile) 2>&5
7164   ac_status=$?
7165   echo "$as_me:7165: \$? = $ac_status" >&5
7166   (exit $ac_status); } &&
7167          { ac_try='test -s conftest.$ac_objext'
7168   { (eval echo "$as_me:7168: \"$ac_try\"") >&5
7169   (eval $ac_try) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); }; }; then
7173   cf_cv_posix_c_source=no
7174 else
7175   echo "$as_me: failed program was:" >&5
7176 cat conftest.$ac_ext >&5
7177 cf_want_posix_source=no
7178          case .$cf_POSIX_C_SOURCE in #(vi
7179          .[12]??*) #(vi
7180                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7181                 ;;
7182          .2) #(vi
7183                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7184                 cf_want_posix_source=yes
7185                 ;;
7186          .*)
7187                 cf_want_posix_source=yes
7188                 ;;
7189          esac
7190          if test "$cf_want_posix_source" = yes ; then
7191                 cat >conftest.$ac_ext <<_ACEOF
7192 #line 7192 "configure"
7193 #include "confdefs.h"
7194 #include <sys/types.h>
7195 int
7196 main ()
7197 {
7198
7199 #ifdef _POSIX_SOURCE
7200 make an error
7201 #endif
7202   ;
7203   return 0;
7204 }
7205 _ACEOF
7206 rm -f conftest.$ac_objext
7207 if { (eval echo "$as_me:7207: \"$ac_compile\"") >&5
7208   (eval $ac_compile) 2>&5
7209   ac_status=$?
7210   echo "$as_me:7210: \$? = $ac_status" >&5
7211   (exit $ac_status); } &&
7212          { ac_try='test -s conftest.$ac_objext'
7213   { (eval echo "$as_me:7213: \"$ac_try\"") >&5
7214   (eval $ac_try) 2>&5
7215   ac_status=$?
7216   echo "$as_me:7216: \$? = $ac_status" >&5
7217   (exit $ac_status); }; }; then
7218   :
7219 else
7220   echo "$as_me: failed program was:" >&5
7221 cat conftest.$ac_ext >&5
7222 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7223 fi
7224 rm -f conftest.$ac_objext conftest.$ac_ext
7225          fi
7226
7227 echo "${as_me:-configure}:7227: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7228
7229          CFLAGS="$cf_trim_CFLAGS"
7230          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7231
7232 echo "${as_me:-configure}:7232: testing if the second compile does not leave our definition intact error ..." 1>&5
7233
7234          cat >conftest.$ac_ext <<_ACEOF
7235 #line 7235 "configure"
7236 #include "confdefs.h"
7237 #include <sys/types.h>
7238 int
7239 main ()
7240 {
7241
7242 #ifndef _POSIX_C_SOURCE
7243 make an error
7244 #endif
7245   ;
7246   return 0;
7247 }
7248 _ACEOF
7249 rm -f conftest.$ac_objext
7250 if { (eval echo "$as_me:7250: \"$ac_compile\"") >&5
7251   (eval $ac_compile) 2>&5
7252   ac_status=$?
7253   echo "$as_me:7253: \$? = $ac_status" >&5
7254   (exit $ac_status); } &&
7255          { ac_try='test -s conftest.$ac_objext'
7256   { (eval echo "$as_me:7256: \"$ac_try\"") >&5
7257   (eval $ac_try) 2>&5
7258   ac_status=$?
7259   echo "$as_me:7259: \$? = $ac_status" >&5
7260   (exit $ac_status); }; }; then
7261   :
7262 else
7263   echo "$as_me: failed program was:" >&5
7264 cat conftest.$ac_ext >&5
7265 cf_cv_posix_c_source=no
7266 fi
7267 rm -f conftest.$ac_objext conftest.$ac_ext
7268          CFLAGS="$cf_save_CFLAGS"
7269          CPPFLAGS="$cf_save_CPPFLAGS"
7270
7271 fi
7272 rm -f conftest.$ac_objext conftest.$ac_ext
7273
7274 fi
7275 echo "$as_me:7275: result: $cf_cv_posix_c_source" >&5
7276 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7277
7278 if test "$cf_cv_posix_c_source" != no ; then
7279         CFLAGS="$cf_trim_CFLAGS"
7280         CPPFLAGS="$cf_trim_CPPFLAGS"
7281
7282 cf_fix_cppflags=no
7283 cf_new_cflags=
7284 cf_new_cppflags=
7285 cf_new_extra_cppflags=
7286
7287 for cf_add_cflags in $cf_cv_posix_c_source
7288 do
7289 case $cf_fix_cppflags in
7290 no)
7291         case $cf_add_cflags in #(vi
7292         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7293                 case $cf_add_cflags in
7294                 -D*)
7295                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7296
7297                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7298                                 && test -z "${cf_tst_cflags}" \
7299                                 && cf_fix_cppflags=yes
7300
7301                         if test $cf_fix_cppflags = yes ; then
7302                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7303                                 continue
7304                         elif test "${cf_tst_cflags}" = "\"'" ; then
7305                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7306                                 continue
7307                         fi
7308                         ;;
7309                 esac
7310                 case "$CPPFLAGS" in
7311                 *$cf_add_cflags) #(vi
7312                         ;;
7313                 *) #(vi
7314                         case $cf_add_cflags in #(vi
7315                         -D*)
7316                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7317
7318 CPPFLAGS=`echo "$CPPFLAGS" | \
7319         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7320                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7321
7322                                 ;;
7323                         esac
7324                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7325                         ;;
7326                 esac
7327                 ;;
7328         *)
7329                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7330                 ;;
7331         esac
7332         ;;
7333 yes)
7334         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7335
7336         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7337
7338         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7339                 && test -z "${cf_tst_cflags}" \
7340                 && cf_fix_cppflags=no
7341         ;;
7342 esac
7343 done
7344
7345 if test -n "$cf_new_cflags" ; then
7346
7347         CFLAGS="$CFLAGS $cf_new_cflags"
7348 fi
7349
7350 if test -n "$cf_new_cppflags" ; then
7351
7352         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7353 fi
7354
7355 if test -n "$cf_new_extra_cppflags" ; then
7356
7357         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7358 fi
7359
7360 fi
7361
7362         ;;
7363 netbsd*) #(vi
7364         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7365         ;;
7366 openbsd[4-9]*) #(vi
7367         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7368         cf_xopen_source="-D_BSD_SOURCE"
7369         cf_XOPEN_SOURCE=600
7370         ;;
7371 openbsd*) #(vi
7372         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7373         ;;
7374 osf[45]*) #(vi
7375         cf_xopen_source="-D_OSF_SOURCE"
7376         ;;
7377 nto-qnx*) #(vi
7378         cf_xopen_source="-D_QNX_SOURCE"
7379         ;;
7380 sco*) #(vi
7381         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7382         ;;
7383 solaris2.*) #(vi
7384         cf_xopen_source="-D__EXTENSIONS__"
7385         ;;
7386 *)
7387
7388 echo "$as_me:7388: checking if we should define _XOPEN_SOURCE" >&5
7389 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7390 if test "${cf_cv_xopen_source+set}" = set; then
7391   echo $ECHO_N "(cached) $ECHO_C" >&6
7392 else
7393
7394         cat >conftest.$ac_ext <<_ACEOF
7395 #line 7395 "configure"
7396 #include "confdefs.h"
7397
7398 #include <stdlib.h>
7399 #include <string.h>
7400 #include <sys/types.h>
7401
7402 int
7403 main ()
7404 {
7405
7406 #ifndef _XOPEN_SOURCE
7407 make an error
7408 #endif
7409   ;
7410   return 0;
7411 }
7412 _ACEOF
7413 rm -f conftest.$ac_objext
7414 if { (eval echo "$as_me:7414: \"$ac_compile\"") >&5
7415   (eval $ac_compile) 2>&5
7416   ac_status=$?
7417   echo "$as_me:7417: \$? = $ac_status" >&5
7418   (exit $ac_status); } &&
7419          { ac_try='test -s conftest.$ac_objext'
7420   { (eval echo "$as_me:7420: \"$ac_try\"") >&5
7421   (eval $ac_try) 2>&5
7422   ac_status=$?
7423   echo "$as_me:7423: \$? = $ac_status" >&5
7424   (exit $ac_status); }; }; then
7425   cf_cv_xopen_source=no
7426 else
7427   echo "$as_me: failed program was:" >&5
7428 cat conftest.$ac_ext >&5
7429 cf_save="$CPPFLAGS"
7430          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7431          cat >conftest.$ac_ext <<_ACEOF
7432 #line 7432 "configure"
7433 #include "confdefs.h"
7434
7435 #include <stdlib.h>
7436 #include <string.h>
7437 #include <sys/types.h>
7438
7439 int
7440 main ()
7441 {
7442
7443 #ifdef _XOPEN_SOURCE
7444 make an error
7445 #endif
7446   ;
7447   return 0;
7448 }
7449 _ACEOF
7450 rm -f conftest.$ac_objext
7451 if { (eval echo "$as_me:7451: \"$ac_compile\"") >&5
7452   (eval $ac_compile) 2>&5
7453   ac_status=$?
7454   echo "$as_me:7454: \$? = $ac_status" >&5
7455   (exit $ac_status); } &&
7456          { ac_try='test -s conftest.$ac_objext'
7457   { (eval echo "$as_me:7457: \"$ac_try\"") >&5
7458   (eval $ac_try) 2>&5
7459   ac_status=$?
7460   echo "$as_me:7460: \$? = $ac_status" >&5
7461   (exit $ac_status); }; }; then
7462   cf_cv_xopen_source=no
7463 else
7464   echo "$as_me: failed program was:" >&5
7465 cat conftest.$ac_ext >&5
7466 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7467 fi
7468 rm -f conftest.$ac_objext conftest.$ac_ext
7469         CPPFLAGS="$cf_save"
7470
7471 fi
7472 rm -f conftest.$ac_objext conftest.$ac_ext
7473
7474 fi
7475 echo "$as_me:7475: result: $cf_cv_xopen_source" >&5
7476 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7477
7478 if test "$cf_cv_xopen_source" != no ; then
7479
7480 CFLAGS=`echo "$CFLAGS" | \
7481         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7482                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7483
7484 CPPFLAGS=`echo "$CPPFLAGS" | \
7485         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7486                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7487
7488         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7489
7490 cf_fix_cppflags=no
7491 cf_new_cflags=
7492 cf_new_cppflags=
7493 cf_new_extra_cppflags=
7494
7495 for cf_add_cflags in $cf_temp_xopen_source
7496 do
7497 case $cf_fix_cppflags in
7498 no)
7499         case $cf_add_cflags in #(vi
7500         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7501                 case $cf_add_cflags in
7502                 -D*)
7503                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7504
7505                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7506                                 && test -z "${cf_tst_cflags}" \
7507                                 && cf_fix_cppflags=yes
7508
7509                         if test $cf_fix_cppflags = yes ; then
7510                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7511                                 continue
7512                         elif test "${cf_tst_cflags}" = "\"'" ; then
7513                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7514                                 continue
7515                         fi
7516                         ;;
7517                 esac
7518                 case "$CPPFLAGS" in
7519                 *$cf_add_cflags) #(vi
7520                         ;;
7521                 *) #(vi
7522                         case $cf_add_cflags in #(vi
7523                         -D*)
7524                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7525
7526 CPPFLAGS=`echo "$CPPFLAGS" | \
7527         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7528                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7529
7530                                 ;;
7531                         esac
7532                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7533                         ;;
7534                 esac
7535                 ;;
7536         *)
7537                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7538                 ;;
7539         esac
7540         ;;
7541 yes)
7542         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7543
7544         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7545
7546         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7547                 && test -z "${cf_tst_cflags}" \
7548                 && cf_fix_cppflags=no
7549         ;;
7550 esac
7551 done
7552
7553 if test -n "$cf_new_cflags" ; then
7554
7555         CFLAGS="$CFLAGS $cf_new_cflags"
7556 fi
7557
7558 if test -n "$cf_new_cppflags" ; then
7559
7560         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7561 fi
7562
7563 if test -n "$cf_new_extra_cppflags" ; then
7564
7565         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7566 fi
7567
7568 fi
7569
7570 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7571
7572 cf_save_CFLAGS="$CFLAGS"
7573 cf_save_CPPFLAGS="$CPPFLAGS"
7574
7575 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7576         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7577                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7578
7579 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7580         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7581                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7582
7583 echo "$as_me:7583: checking if we should define _POSIX_C_SOURCE" >&5
7584 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7585 if test "${cf_cv_posix_c_source+set}" = set; then
7586   echo $ECHO_N "(cached) $ECHO_C" >&6
7587 else
7588
7589 echo "${as_me:-configure}:7589: testing if the symbol is already defined go no further ..." 1>&5
7590
7591         cat >conftest.$ac_ext <<_ACEOF
7592 #line 7592 "configure"
7593 #include "confdefs.h"
7594 #include <sys/types.h>
7595 int
7596 main ()
7597 {
7598
7599 #ifndef _POSIX_C_SOURCE
7600 make an error
7601 #endif
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 rm -f conftest.$ac_objext
7607 if { (eval echo "$as_me:7607: \"$ac_compile\"") >&5
7608   (eval $ac_compile) 2>&5
7609   ac_status=$?
7610   echo "$as_me:7610: \$? = $ac_status" >&5
7611   (exit $ac_status); } &&
7612          { ac_try='test -s conftest.$ac_objext'
7613   { (eval echo "$as_me:7613: \"$ac_try\"") >&5
7614   (eval $ac_try) 2>&5
7615   ac_status=$?
7616   echo "$as_me:7616: \$? = $ac_status" >&5
7617   (exit $ac_status); }; }; then
7618   cf_cv_posix_c_source=no
7619 else
7620   echo "$as_me: failed program was:" >&5
7621 cat conftest.$ac_ext >&5
7622 cf_want_posix_source=no
7623          case .$cf_POSIX_C_SOURCE in #(vi
7624          .[12]??*) #(vi
7625                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7626                 ;;
7627          .2) #(vi
7628                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7629                 cf_want_posix_source=yes
7630                 ;;
7631          .*)
7632                 cf_want_posix_source=yes
7633                 ;;
7634          esac
7635          if test "$cf_want_posix_source" = yes ; then
7636                 cat >conftest.$ac_ext <<_ACEOF
7637 #line 7637 "configure"
7638 #include "confdefs.h"
7639 #include <sys/types.h>
7640 int
7641 main ()
7642 {
7643
7644 #ifdef _POSIX_SOURCE
7645 make an error
7646 #endif
7647   ;
7648   return 0;
7649 }
7650 _ACEOF
7651 rm -f conftest.$ac_objext
7652 if { (eval echo "$as_me:7652: \"$ac_compile\"") >&5
7653   (eval $ac_compile) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit $ac_status); } &&
7657          { ac_try='test -s conftest.$ac_objext'
7658   { (eval echo "$as_me:7658: \"$ac_try\"") >&5
7659   (eval $ac_try) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); }; }; then
7663   :
7664 else
7665   echo "$as_me: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7667 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7668 fi
7669 rm -f conftest.$ac_objext conftest.$ac_ext
7670          fi
7671
7672 echo "${as_me:-configure}:7672: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7673
7674          CFLAGS="$cf_trim_CFLAGS"
7675          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7676
7677 echo "${as_me:-configure}:7677: testing if the second compile does not leave our definition intact error ..." 1>&5
7678
7679          cat >conftest.$ac_ext <<_ACEOF
7680 #line 7680 "configure"
7681 #include "confdefs.h"
7682 #include <sys/types.h>
7683 int
7684 main ()
7685 {
7686
7687 #ifndef _POSIX_C_SOURCE
7688 make an error
7689 #endif
7690   ;
7691   return 0;
7692 }
7693 _ACEOF
7694 rm -f conftest.$ac_objext
7695 if { (eval echo "$as_me:7695: \"$ac_compile\"") >&5
7696   (eval $ac_compile) 2>&5
7697   ac_status=$?
7698   echo "$as_me:7698: \$? = $ac_status" >&5
7699   (exit $ac_status); } &&
7700          { ac_try='test -s conftest.$ac_objext'
7701   { (eval echo "$as_me:7701: \"$ac_try\"") >&5
7702   (eval $ac_try) 2>&5
7703   ac_status=$?
7704   echo "$as_me:7704: \$? = $ac_status" >&5
7705   (exit $ac_status); }; }; then
7706   :
7707 else
7708   echo "$as_me: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 cf_cv_posix_c_source=no
7711 fi
7712 rm -f conftest.$ac_objext conftest.$ac_ext
7713          CFLAGS="$cf_save_CFLAGS"
7714          CPPFLAGS="$cf_save_CPPFLAGS"
7715
7716 fi
7717 rm -f conftest.$ac_objext conftest.$ac_ext
7718
7719 fi
7720 echo "$as_me:7720: result: $cf_cv_posix_c_source" >&5
7721 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7722
7723 if test "$cf_cv_posix_c_source" != no ; then
7724         CFLAGS="$cf_trim_CFLAGS"
7725         CPPFLAGS="$cf_trim_CPPFLAGS"
7726
7727 cf_fix_cppflags=no
7728 cf_new_cflags=
7729 cf_new_cppflags=
7730 cf_new_extra_cppflags=
7731
7732 for cf_add_cflags in $cf_cv_posix_c_source
7733 do
7734 case $cf_fix_cppflags in
7735 no)
7736         case $cf_add_cflags in #(vi
7737         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7738                 case $cf_add_cflags in
7739                 -D*)
7740                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7741
7742                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7743                                 && test -z "${cf_tst_cflags}" \
7744                                 && cf_fix_cppflags=yes
7745
7746                         if test $cf_fix_cppflags = yes ; then
7747                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7748                                 continue
7749                         elif test "${cf_tst_cflags}" = "\"'" ; then
7750                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7751                                 continue
7752                         fi
7753                         ;;
7754                 esac
7755                 case "$CPPFLAGS" in
7756                 *$cf_add_cflags) #(vi
7757                         ;;
7758                 *) #(vi
7759                         case $cf_add_cflags in #(vi
7760                         -D*)
7761                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7762
7763 CPPFLAGS=`echo "$CPPFLAGS" | \
7764         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7765                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7766
7767                                 ;;
7768                         esac
7769                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7770                         ;;
7771                 esac
7772                 ;;
7773         *)
7774                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7775                 ;;
7776         esac
7777         ;;
7778 yes)
7779         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7780
7781         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7782
7783         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7784                 && test -z "${cf_tst_cflags}" \
7785                 && cf_fix_cppflags=no
7786         ;;
7787 esac
7788 done
7789
7790 if test -n "$cf_new_cflags" ; then
7791
7792         CFLAGS="$CFLAGS $cf_new_cflags"
7793 fi
7794
7795 if test -n "$cf_new_cppflags" ; then
7796
7797         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7798 fi
7799
7800 if test -n "$cf_new_extra_cppflags" ; then
7801
7802         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7803 fi
7804
7805 fi
7806
7807         ;;
7808 esac
7809
7810 if test -n "$cf_xopen_source" ; then
7811
7812 cf_fix_cppflags=no
7813 cf_new_cflags=
7814 cf_new_cppflags=
7815 cf_new_extra_cppflags=
7816
7817 for cf_add_cflags in $cf_xopen_source
7818 do
7819 case $cf_fix_cppflags in
7820 no)
7821         case $cf_add_cflags in #(vi
7822         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7823                 case $cf_add_cflags in
7824                 -D*)
7825                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7826
7827                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7828                                 && test -z "${cf_tst_cflags}" \
7829                                 && cf_fix_cppflags=yes
7830
7831                         if test $cf_fix_cppflags = yes ; then
7832                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7833                                 continue
7834                         elif test "${cf_tst_cflags}" = "\"'" ; then
7835                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7836                                 continue
7837                         fi
7838                         ;;
7839                 esac
7840                 case "$CPPFLAGS" in
7841                 *$cf_add_cflags) #(vi
7842                         ;;
7843                 *) #(vi
7844                         case $cf_add_cflags in #(vi
7845                         -D*)
7846                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7847
7848 CPPFLAGS=`echo "$CPPFLAGS" | \
7849         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7850                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7851
7852                                 ;;
7853                         esac
7854                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7855                         ;;
7856                 esac
7857                 ;;
7858         *)
7859                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7860                 ;;
7861         esac
7862         ;;
7863 yes)
7864         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7865
7866         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7867
7868         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7869                 && test -z "${cf_tst_cflags}" \
7870                 && cf_fix_cppflags=no
7871         ;;
7872 esac
7873 done
7874
7875 if test -n "$cf_new_cflags" ; then
7876
7877         CFLAGS="$CFLAGS $cf_new_cflags"
7878 fi
7879
7880 if test -n "$cf_new_cppflags" ; then
7881
7882         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7883 fi
7884
7885 if test -n "$cf_new_extra_cppflags" ; then
7886
7887         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7888 fi
7889
7890 fi
7891
7892 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7893         echo "$as_me:7893: checking if _XOPEN_SOURCE really is set" >&5
7894 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7895         cat >conftest.$ac_ext <<_ACEOF
7896 #line 7896 "configure"
7897 #include "confdefs.h"
7898 #include <stdlib.h>
7899 int
7900 main ()
7901 {
7902
7903 #ifndef _XOPEN_SOURCE
7904 make an error
7905 #endif
7906   ;
7907   return 0;
7908 }
7909 _ACEOF
7910 rm -f conftest.$ac_objext
7911 if { (eval echo "$as_me:7911: \"$ac_compile\"") >&5
7912   (eval $ac_compile) 2>&5
7913   ac_status=$?
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit $ac_status); } &&
7916          { ac_try='test -s conftest.$ac_objext'
7917   { (eval echo "$as_me:7917: \"$ac_try\"") >&5
7918   (eval $ac_try) 2>&5
7919   ac_status=$?
7920   echo "$as_me:7920: \$? = $ac_status" >&5
7921   (exit $ac_status); }; }; then
7922   cf_XOPEN_SOURCE_set=yes
7923 else
7924   echo "$as_me: failed program was:" >&5
7925 cat conftest.$ac_ext >&5
7926 cf_XOPEN_SOURCE_set=no
7927 fi
7928 rm -f conftest.$ac_objext conftest.$ac_ext
7929         echo "$as_me:7929: result: $cf_XOPEN_SOURCE_set" >&5
7930 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7931         if test $cf_XOPEN_SOURCE_set = yes
7932         then
7933                 cat >conftest.$ac_ext <<_ACEOF
7934 #line 7934 "configure"
7935 #include "confdefs.h"
7936 #include <stdlib.h>
7937 int
7938 main ()
7939 {
7940
7941 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7942 make an error
7943 #endif
7944   ;
7945   return 0;
7946 }
7947 _ACEOF
7948 rm -f conftest.$ac_objext
7949 if { (eval echo "$as_me:7949: \"$ac_compile\"") >&5
7950   (eval $ac_compile) 2>&5
7951   ac_status=$?
7952   echo "$as_me:7952: \$? = $ac_status" >&5
7953   (exit $ac_status); } &&
7954          { ac_try='test -s conftest.$ac_objext'
7955   { (eval echo "$as_me:7955: \"$ac_try\"") >&5
7956   (eval $ac_try) 2>&5
7957   ac_status=$?
7958   echo "$as_me:7958: \$? = $ac_status" >&5
7959   (exit $ac_status); }; }; then
7960   cf_XOPEN_SOURCE_set_ok=yes
7961 else
7962   echo "$as_me: failed program was:" >&5
7963 cat conftest.$ac_ext >&5
7964 cf_XOPEN_SOURCE_set_ok=no
7965 fi
7966 rm -f conftest.$ac_objext conftest.$ac_ext
7967                 if test $cf_XOPEN_SOURCE_set_ok = no
7968                 then
7969                         { echo "$as_me:7969: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7970 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
7971                 fi
7972         else
7973
7974 echo "$as_me:7974: checking if we should define _XOPEN_SOURCE" >&5
7975 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7976 if test "${cf_cv_xopen_source+set}" = set; then
7977   echo $ECHO_N "(cached) $ECHO_C" >&6
7978 else
7979
7980         cat >conftest.$ac_ext <<_ACEOF
7981 #line 7981 "configure"
7982 #include "confdefs.h"
7983
7984 #include <stdlib.h>
7985 #include <string.h>
7986 #include <sys/types.h>
7987
7988 int
7989 main ()
7990 {
7991
7992 #ifndef _XOPEN_SOURCE
7993 make an error
7994 #endif
7995   ;
7996   return 0;
7997 }
7998 _ACEOF
7999 rm -f conftest.$ac_objext
8000 if { (eval echo "$as_me:8000: \"$ac_compile\"") >&5
8001   (eval $ac_compile) 2>&5
8002   ac_status=$?
8003   echo "$as_me:8003: \$? = $ac_status" >&5
8004   (exit $ac_status); } &&
8005          { ac_try='test -s conftest.$ac_objext'
8006   { (eval echo "$as_me:8006: \"$ac_try\"") >&5
8007   (eval $ac_try) 2>&5
8008   ac_status=$?
8009   echo "$as_me:8009: \$? = $ac_status" >&5
8010   (exit $ac_status); }; }; then
8011   cf_cv_xopen_source=no
8012 else
8013   echo "$as_me: failed program was:" >&5
8014 cat conftest.$ac_ext >&5
8015 cf_save="$CPPFLAGS"
8016          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8017          cat >conftest.$ac_ext <<_ACEOF
8018 #line 8018 "configure"
8019 #include "confdefs.h"
8020
8021 #include <stdlib.h>
8022 #include <string.h>
8023 #include <sys/types.h>
8024
8025 int
8026 main ()
8027 {
8028
8029 #ifdef _XOPEN_SOURCE
8030 make an error
8031 #endif
8032   ;
8033   return 0;
8034 }
8035 _ACEOF
8036 rm -f conftest.$ac_objext
8037 if { (eval echo "$as_me:8037: \"$ac_compile\"") >&5
8038   (eval $ac_compile) 2>&5
8039   ac_status=$?
8040   echo "$as_me:8040: \$? = $ac_status" >&5
8041   (exit $ac_status); } &&
8042          { ac_try='test -s conftest.$ac_objext'
8043   { (eval echo "$as_me:8043: \"$ac_try\"") >&5
8044   (eval $ac_try) 2>&5
8045   ac_status=$?
8046   echo "$as_me:8046: \$? = $ac_status" >&5
8047   (exit $ac_status); }; }; then
8048   cf_cv_xopen_source=no
8049 else
8050   echo "$as_me: failed program was:" >&5
8051 cat conftest.$ac_ext >&5
8052 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8053 fi
8054 rm -f conftest.$ac_objext conftest.$ac_ext
8055         CPPFLAGS="$cf_save"
8056
8057 fi
8058 rm -f conftest.$ac_objext conftest.$ac_ext
8059
8060 fi
8061 echo "$as_me:8061: result: $cf_cv_xopen_source" >&5
8062 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8063
8064 if test "$cf_cv_xopen_source" != no ; then
8065
8066 CFLAGS=`echo "$CFLAGS" | \
8067         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8068                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8069
8070 CPPFLAGS=`echo "$CPPFLAGS" | \
8071         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8072                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8073
8074         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8075
8076 cf_fix_cppflags=no
8077 cf_new_cflags=
8078 cf_new_cppflags=
8079 cf_new_extra_cppflags=
8080
8081 for cf_add_cflags in $cf_temp_xopen_source
8082 do
8083 case $cf_fix_cppflags in
8084 no)
8085         case $cf_add_cflags in #(vi
8086         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8087                 case $cf_add_cflags in
8088                 -D*)
8089                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8090
8091                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8092                                 && test -z "${cf_tst_cflags}" \
8093                                 && cf_fix_cppflags=yes
8094
8095                         if test $cf_fix_cppflags = yes ; then
8096                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8097                                 continue
8098                         elif test "${cf_tst_cflags}" = "\"'" ; then
8099                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8100                                 continue
8101                         fi
8102                         ;;
8103                 esac
8104                 case "$CPPFLAGS" in
8105                 *$cf_add_cflags) #(vi
8106                         ;;
8107                 *) #(vi
8108                         case $cf_add_cflags in #(vi
8109                         -D*)
8110                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8111
8112 CPPFLAGS=`echo "$CPPFLAGS" | \
8113         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8114                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8115
8116                                 ;;
8117                         esac
8118                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8119                         ;;
8120                 esac
8121                 ;;
8122         *)
8123                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8124                 ;;
8125         esac
8126         ;;
8127 yes)
8128         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8129
8130         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8131
8132         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8133                 && test -z "${cf_tst_cflags}" \
8134                 && cf_fix_cppflags=no
8135         ;;
8136 esac
8137 done
8138
8139 if test -n "$cf_new_cflags" ; then
8140
8141         CFLAGS="$CFLAGS $cf_new_cflags"
8142 fi
8143
8144 if test -n "$cf_new_cppflags" ; then
8145
8146         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8147 fi
8148
8149 if test -n "$cf_new_extra_cppflags" ; then
8150
8151         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8152 fi
8153
8154 fi
8155
8156         fi
8157 fi
8158
8159 # Work around breakage on OS X
8160
8161 echo "$as_me:8161: checking if SIGWINCH is defined" >&5
8162 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8163 if test "${cf_cv_define_sigwinch+set}" = set; then
8164   echo $ECHO_N "(cached) $ECHO_C" >&6
8165 else
8166
8167         cat >conftest.$ac_ext <<_ACEOF
8168 #line 8168 "configure"
8169 #include "confdefs.h"
8170
8171 #include <sys/types.h>
8172 #include <sys/signal.h>
8173
8174 int
8175 main ()
8176 {
8177 int x = SIGWINCH
8178   ;
8179   return 0;
8180 }
8181 _ACEOF
8182 rm -f conftest.$ac_objext
8183 if { (eval echo "$as_me:8183: \"$ac_compile\"") >&5
8184   (eval $ac_compile) 2>&5
8185   ac_status=$?
8186   echo "$as_me:8186: \$? = $ac_status" >&5
8187   (exit $ac_status); } &&
8188          { ac_try='test -s conftest.$ac_objext'
8189   { (eval echo "$as_me:8189: \"$ac_try\"") >&5
8190   (eval $ac_try) 2>&5
8191   ac_status=$?
8192   echo "$as_me:8192: \$? = $ac_status" >&5
8193   (exit $ac_status); }; }; then
8194   cf_cv_define_sigwinch=yes
8195 else
8196   echo "$as_me: failed program was:" >&5
8197 cat conftest.$ac_ext >&5
8198 cat >conftest.$ac_ext <<_ACEOF
8199 #line 8199 "configure"
8200 #include "confdefs.h"
8201
8202 #undef _XOPEN_SOURCE
8203 #undef _POSIX_SOURCE
8204 #undef _POSIX_C_SOURCE
8205 #include <sys/types.h>
8206 #include <sys/signal.h>
8207
8208 int
8209 main ()
8210 {
8211 int x = SIGWINCH
8212   ;
8213   return 0;
8214 }
8215 _ACEOF
8216 rm -f conftest.$ac_objext
8217 if { (eval echo "$as_me:8217: \"$ac_compile\"") >&5
8218   (eval $ac_compile) 2>&5
8219   ac_status=$?
8220   echo "$as_me:8220: \$? = $ac_status" >&5
8221   (exit $ac_status); } &&
8222          { ac_try='test -s conftest.$ac_objext'
8223   { (eval echo "$as_me:8223: \"$ac_try\"") >&5
8224   (eval $ac_try) 2>&5
8225   ac_status=$?
8226   echo "$as_me:8226: \$? = $ac_status" >&5
8227   (exit $ac_status); }; }; then
8228   cf_cv_define_sigwinch=maybe
8229 else
8230   echo "$as_me: failed program was:" >&5
8231 cat conftest.$ac_ext >&5
8232 cf_cv_define_sigwinch=no
8233 fi
8234 rm -f conftest.$ac_objext conftest.$ac_ext
8235
8236 fi
8237 rm -f conftest.$ac_objext conftest.$ac_ext
8238
8239 fi
8240 echo "$as_me:8240: result: $cf_cv_define_sigwinch" >&5
8241 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8242
8243 if test "$cf_cv_define_sigwinch" = maybe ; then
8244 echo "$as_me:8244: checking for actual SIGWINCH definition" >&5
8245 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8246 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8247   echo $ECHO_N "(cached) $ECHO_C" >&6
8248 else
8249
8250 cf_cv_fixup_sigwinch=unknown
8251 cf_sigwinch=32
8252 while test $cf_sigwinch != 1
8253 do
8254         cat >conftest.$ac_ext <<_ACEOF
8255 #line 8255 "configure"
8256 #include "confdefs.h"
8257
8258 #undef _XOPEN_SOURCE
8259 #undef _POSIX_SOURCE
8260 #undef _POSIX_C_SOURCE
8261 #include <sys/types.h>
8262 #include <sys/signal.h>
8263
8264 int
8265 main ()
8266 {
8267
8268 #if SIGWINCH != $cf_sigwinch
8269 make an error
8270 #endif
8271 int x = SIGWINCH
8272   ;
8273   return 0;
8274 }
8275 _ACEOF
8276 rm -f conftest.$ac_objext
8277 if { (eval echo "$as_me:8277: \"$ac_compile\"") >&5
8278   (eval $ac_compile) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); } &&
8282          { ac_try='test -s conftest.$ac_objext'
8283   { (eval echo "$as_me:8283: \"$ac_try\"") >&5
8284   (eval $ac_try) 2>&5
8285   ac_status=$?
8286   echo "$as_me:8286: \$? = $ac_status" >&5
8287   (exit $ac_status); }; }; then
8288   cf_cv_fixup_sigwinch=$cf_sigwinch
8289          break
8290 else
8291   echo "$as_me: failed program was:" >&5
8292 cat conftest.$ac_ext >&5
8293 fi
8294 rm -f conftest.$ac_objext conftest.$ac_ext
8295
8296 cf_sigwinch=`expr $cf_sigwinch - 1`
8297 done
8298
8299 fi
8300 echo "$as_me:8300: result: $cf_cv_fixup_sigwinch" >&5
8301 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8302
8303         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8304                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8305         fi
8306 fi
8307
8308 # Checks for CODESET support.
8309
8310   echo "$as_me:8310: checking for nl_langinfo and CODESET" >&5
8311 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8312 if test "${am_cv_langinfo_codeset+set}" = set; then
8313   echo $ECHO_N "(cached) $ECHO_C" >&6
8314 else
8315   cat >conftest.$ac_ext <<_ACEOF
8316 #line 8316 "configure"
8317 #include "confdefs.h"
8318 #include <langinfo.h>
8319 int
8320 main ()
8321 {
8322 char* cs = nl_langinfo(CODESET);
8323   ;
8324   return 0;
8325 }
8326 _ACEOF
8327 rm -f conftest.$ac_objext conftest$ac_exeext
8328 if { (eval echo "$as_me:8328: \"$ac_link\"") >&5
8329   (eval $ac_link) 2>&5
8330   ac_status=$?
8331   echo "$as_me:8331: \$? = $ac_status" >&5
8332   (exit $ac_status); } &&
8333          { ac_try='test -s conftest$ac_exeext'
8334   { (eval echo "$as_me:8334: \"$ac_try\"") >&5
8335   (eval $ac_try) 2>&5
8336   ac_status=$?
8337   echo "$as_me:8337: \$? = $ac_status" >&5
8338   (exit $ac_status); }; }; then
8339   am_cv_langinfo_codeset=yes
8340 else
8341   echo "$as_me: failed program was:" >&5
8342 cat conftest.$ac_ext >&5
8343 am_cv_langinfo_codeset=no
8344 fi
8345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8346
8347 fi
8348 echo "$as_me:8348: result: $am_cv_langinfo_codeset" >&5
8349 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8350   if test $am_cv_langinfo_codeset = yes; then
8351
8352 cat >>confdefs.h <<\EOF
8353 #define HAVE_LANGINFO_CODESET 1
8354 EOF
8355
8356   fi
8357
8358 # use these variables to work around a defect in gcc's fixincludes.
8359 NCURSES_OK_WCHAR_T=
8360 NCURSES_OK_WINT_T=
8361
8362 echo "$as_me:8362: checking if you want wide-character code" >&5
8363 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8364
8365 # Check whether --enable-widec or --disable-widec was given.
8366 if test "${enable_widec+set}" = set; then
8367   enableval="$enable_widec"
8368   with_widec=$enableval
8369 else
8370   with_widec=no
8371 fi;
8372 echo "$as_me:8372: result: $with_widec" >&5
8373 echo "${ECHO_T}$with_widec" >&6
8374 if test "$with_widec" = yes ; then
8375         LIB_SUFFIX="w${LIB_SUFFIX}"
8376         cat >>confdefs.h <<\EOF
8377 #define USE_WIDEC_SUPPORT 1
8378 EOF
8379
8380         cat >>confdefs.h <<\EOF
8381 #define NCURSES_WIDECHAR 1
8382 EOF
8383
8384 echo "$as_me:8384: checking if wchar.h can be used as is" >&5
8385 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8386 if test "${cf_cv_wchar_h_okay+set}" = set; then
8387   echo $ECHO_N "(cached) $ECHO_C" >&6
8388 else
8389
8390 cat >conftest.$ac_ext <<_ACEOF
8391 #line 8391 "configure"
8392 #include "confdefs.h"
8393
8394 #include <stdlib.h>
8395 #include <wchar.h>
8396
8397 int
8398 main ()
8399 {
8400
8401         wint_t foo = 0;
8402         int bar = iswpunct(foo)
8403   ;
8404   return 0;
8405 }
8406 _ACEOF
8407 rm -f conftest.$ac_objext
8408 if { (eval echo "$as_me:8408: \"$ac_compile\"") >&5
8409   (eval $ac_compile) 2>&5
8410   ac_status=$?
8411   echo "$as_me:8411: \$? = $ac_status" >&5
8412   (exit $ac_status); } &&
8413          { ac_try='test -s conftest.$ac_objext'
8414   { (eval echo "$as_me:8414: \"$ac_try\"") >&5
8415   (eval $ac_try) 2>&5
8416   ac_status=$?
8417   echo "$as_me:8417: \$? = $ac_status" >&5
8418   (exit $ac_status); }; }; then
8419   cf_cv_wchar_h_okay=yes
8420 else
8421   echo "$as_me: failed program was:" >&5
8422 cat conftest.$ac_ext >&5
8423 cf_cv_wchar_h_okay=no
8424 fi
8425 rm -f conftest.$ac_objext conftest.$ac_ext
8426 fi
8427 echo "$as_me:8427: result: $cf_cv_wchar_h_okay" >&5
8428 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8429
8430 if test $cf_cv_wchar_h_okay = no
8431 then
8432
8433 echo "$as_me:8433: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8434 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8435 cat >conftest.$ac_ext <<_ACEOF
8436 #line 8436 "configure"
8437 #include "confdefs.h"
8438 #include <sys/types.h>
8439
8440 int
8441 main ()
8442 {
8443
8444 #ifndef _XOPEN_SOURCE_EXTENDED
8445 make an error
8446 #endif
8447   ;
8448   return 0;
8449 }
8450 _ACEOF
8451 rm -f conftest.$ac_objext
8452 if { (eval echo "$as_me:8452: \"$ac_compile\"") >&5
8453   (eval $ac_compile) 2>&5
8454   ac_status=$?
8455   echo "$as_me:8455: \$? = $ac_status" >&5
8456   (exit $ac_status); } &&
8457          { ac_try='test -s conftest.$ac_objext'
8458   { (eval echo "$as_me:8458: \"$ac_try\"") >&5
8459   (eval $ac_try) 2>&5
8460   ac_status=$?
8461   echo "$as_me:8461: \$? = $ac_status" >&5
8462   (exit $ac_status); }; }; then
8463   cf_result=no
8464 else
8465   echo "$as_me: failed program was:" >&5
8466 cat conftest.$ac_ext >&5
8467 cf_result=yes
8468 fi
8469 rm -f conftest.$ac_objext conftest.$ac_ext
8470 echo "$as_me:8470: result: $cf_result" >&5
8471 echo "${ECHO_T}$cf_result" >&6
8472
8473 if test "$cf_result" = yes ; then
8474         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8475 elif test "x" != "x" ; then
8476         echo "$as_me:8476: checking checking for compatible value versus " >&5
8477 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8478         cat >conftest.$ac_ext <<_ACEOF
8479 #line 8479 "configure"
8480 #include "confdefs.h"
8481 #include <sys/types.h>
8482
8483 int
8484 main ()
8485 {
8486
8487 #if _XOPEN_SOURCE_EXTENDED- < 0
8488 make an error
8489 #endif
8490   ;
8491   return 0;
8492 }
8493 _ACEOF
8494 rm -f conftest.$ac_objext
8495 if { (eval echo "$as_me:8495: \"$ac_compile\"") >&5
8496   (eval $ac_compile) 2>&5
8497   ac_status=$?
8498   echo "$as_me:8498: \$? = $ac_status" >&5
8499   (exit $ac_status); } &&
8500          { ac_try='test -s conftest.$ac_objext'
8501   { (eval echo "$as_me:8501: \"$ac_try\"") >&5
8502   (eval $ac_try) 2>&5
8503   ac_status=$?
8504   echo "$as_me:8504: \$? = $ac_status" >&5
8505   (exit $ac_status); }; }; then
8506   cf_result=yes
8507 else
8508   echo "$as_me: failed program was:" >&5
8509 cat conftest.$ac_ext >&5
8510 cf_result=no
8511 fi
8512 rm -f conftest.$ac_objext conftest.$ac_ext
8513         echo "$as_me:8513: result: $cf_result" >&5
8514 echo "${ECHO_T}$cf_result" >&6
8515         if test "$cf_result" = no ; then
8516                 # perhaps we can override it - try...
8517                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8518         fi
8519 fi
8520
8521 fi
8522
8523         # with_overwrite=no
8524         NCURSES_CH_T=cchar_t
8525
8526 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8527 do
8528 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8529 echo "$as_me:8529: checking for $ac_func" >&5
8530 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8531 if eval "test \"\${$as_ac_var+set}\" = set"; then
8532   echo $ECHO_N "(cached) $ECHO_C" >&6
8533 else
8534   cat >conftest.$ac_ext <<_ACEOF
8535 #line 8535 "configure"
8536 #include "confdefs.h"
8537 /* System header to define __stub macros and hopefully few prototypes,
8538     which can conflict with char $ac_func (); below.  */
8539 #include <assert.h>
8540 /* Override any gcc2 internal prototype to avoid an error.  */
8541 #ifdef __cplusplus
8542 extern "C"
8543 #endif
8544 /* We use char because int might match the return type of a gcc2
8545    builtin and then its argument prototype would still apply.  */
8546 char $ac_func ();
8547 char (*f) ();
8548
8549 int
8550 main ()
8551 {
8552 /* The GNU C library defines this for functions which it implements
8553     to always fail with ENOSYS.  Some functions are actually named
8554     something starting with __ and the normal name is an alias.  */
8555 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8556 choke me
8557 #else
8558 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8559 #endif
8560
8561   ;
8562   return 0;
8563 }
8564 _ACEOF
8565 rm -f conftest.$ac_objext conftest$ac_exeext
8566 if { (eval echo "$as_me:8566: \"$ac_link\"") >&5
8567   (eval $ac_link) 2>&5
8568   ac_status=$?
8569   echo "$as_me:8569: \$? = $ac_status" >&5
8570   (exit $ac_status); } &&
8571          { ac_try='test -s conftest$ac_exeext'
8572   { (eval echo "$as_me:8572: \"$ac_try\"") >&5
8573   (eval $ac_try) 2>&5
8574   ac_status=$?
8575   echo "$as_me:8575: \$? = $ac_status" >&5
8576   (exit $ac_status); }; }; then
8577   eval "$as_ac_var=yes"
8578 else
8579   echo "$as_me: failed program was:" >&5
8580 cat conftest.$ac_ext >&5
8581 eval "$as_ac_var=no"
8582 fi
8583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8584 fi
8585 echo "$as_me:8585: result: `eval echo '${'$as_ac_var'}'`" >&5
8586 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8587 if test `eval echo '${'$as_ac_var'}'` = yes; then
8588   cat >>confdefs.h <<EOF
8589 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8590 EOF
8591
8592 fi
8593 done
8594
8595         if test "$ac_cv_func_putwc" != yes ; then
8596
8597 echo "$as_me:8597: checking for multibyte character support" >&5
8598 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8599 if test "${cf_cv_utf8_lib+set}" = set; then
8600   echo $ECHO_N "(cached) $ECHO_C" >&6
8601 else
8602
8603         cf_save_LIBS="$LIBS"
8604         cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607
8608 #include <stdlib.h>
8609 int
8610 main ()
8611 {
8612 putwc(0,0);
8613   ;
8614   return 0;
8615 }
8616 _ACEOF
8617 rm -f conftest.$ac_objext conftest$ac_exeext
8618 if { (eval echo "$as_me:8618: \"$ac_link\"") >&5
8619   (eval $ac_link) 2>&5
8620   ac_status=$?
8621   echo "$as_me:8621: \$? = $ac_status" >&5
8622   (exit $ac_status); } &&
8623          { ac_try='test -s conftest$ac_exeext'
8624   { (eval echo "$as_me:8624: \"$ac_try\"") >&5
8625   (eval $ac_try) 2>&5
8626   ac_status=$?
8627   echo "$as_me:8627: \$? = $ac_status" >&5
8628   (exit $ac_status); }; }; then
8629   cf_cv_utf8_lib=yes
8630 else
8631   echo "$as_me: failed program was:" >&5
8632 cat conftest.$ac_ext >&5
8633
8634 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8635 # will be set on completion of the AC_TRY_LINK below.
8636 cf_cv_header_path_utf8=
8637 cf_cv_library_path_utf8=
8638
8639 echo "${as_me:-configure}:8639: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8640
8641 cf_save_LIBS="$LIBS"
8642
8643 cat >conftest.$ac_ext <<_ACEOF
8644 #line 8644 "configure"
8645 #include "confdefs.h"
8646
8647 #include <libutf8.h>
8648 int
8649 main ()
8650 {
8651 putwc(0,0);
8652   ;
8653   return 0;
8654 }
8655 _ACEOF
8656 rm -f conftest.$ac_objext conftest$ac_exeext
8657 if { (eval echo "$as_me:8657: \"$ac_link\"") >&5
8658   (eval $ac_link) 2>&5
8659   ac_status=$?
8660   echo "$as_me:8660: \$? = $ac_status" >&5
8661   (exit $ac_status); } &&
8662          { ac_try='test -s conftest$ac_exeext'
8663   { (eval echo "$as_me:8663: \"$ac_try\"") >&5
8664   (eval $ac_try) 2>&5
8665   ac_status=$?
8666   echo "$as_me:8666: \$? = $ac_status" >&5
8667   (exit $ac_status); }; }; then
8668
8669         cf_cv_find_linkage_utf8=yes
8670         cf_cv_header_path_utf8=/usr/include
8671         cf_cv_library_path_utf8=/usr/lib
8672
8673 else
8674   echo "$as_me: failed program was:" >&5
8675 cat conftest.$ac_ext >&5
8676
8677 LIBS="-lutf8  $cf_save_LIBS"
8678
8679 cat >conftest.$ac_ext <<_ACEOF
8680 #line 8680 "configure"
8681 #include "confdefs.h"
8682
8683 #include <libutf8.h>
8684 int
8685 main ()
8686 {
8687 putwc(0,0);
8688   ;
8689   return 0;
8690 }
8691 _ACEOF
8692 rm -f conftest.$ac_objext conftest$ac_exeext
8693 if { (eval echo "$as_me:8693: \"$ac_link\"") >&5
8694   (eval $ac_link) 2>&5
8695   ac_status=$?
8696   echo "$as_me:8696: \$? = $ac_status" >&5
8697   (exit $ac_status); } &&
8698          { ac_try='test -s conftest$ac_exeext'
8699   { (eval echo "$as_me:8699: \"$ac_try\"") >&5
8700   (eval $ac_try) 2>&5
8701   ac_status=$?
8702   echo "$as_me:8702: \$? = $ac_status" >&5
8703   (exit $ac_status); }; }; then
8704
8705         cf_cv_find_linkage_utf8=yes
8706         cf_cv_header_path_utf8=/usr/include
8707         cf_cv_library_path_utf8=/usr/lib
8708         cf_cv_library_file_utf8="-lutf8"
8709
8710 else
8711   echo "$as_me: failed program was:" >&5
8712 cat conftest.$ac_ext >&5
8713
8714         cf_cv_find_linkage_utf8=no
8715         LIBS="$cf_save_LIBS"
8716
8717     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8718
8719 echo "${as_me:-configure}:8719: testing find linkage for utf8 library ..." 1>&5
8720
8721 echo "${as_me:-configure}:8721: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8722
8723     cf_save_CPPFLAGS="$CPPFLAGS"
8724     cf_test_CPPFLAGS="$CPPFLAGS"
8725
8726 cf_search=
8727
8728 # collect the current set of include-directories from compiler flags
8729 cf_header_path_list=""
8730 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8731         for cf_header_path in $CPPFLAGS $CFLAGS
8732         do
8733                 case $cf_header_path in #(vi
8734                 -I*)
8735                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8736
8737 test "$cf_header_path" != "NONE" && \
8738 test -d "$cf_header_path" && \
8739  {
8740         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8741         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8742         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8743         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8744         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8745         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8746 }
8747
8748                         cf_header_path_list="$cf_header_path_list $cf_search"
8749                         ;;
8750                 esac
8751         done
8752 fi
8753
8754 # add the variations for the package we are looking for
8755
8756 cf_search=
8757
8758 test "/usr" != "$prefix" && \
8759 test -d "/usr" && \
8760 (test $prefix = NONE || test "/usr" != "$prefix") && {
8761         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8762         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8763         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8764         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8765         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8766         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8767 }
8768
8769 test "$prefix" != "NONE" && \
8770 test -d "$prefix" && \
8771  {
8772         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8773         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8774         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8775         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8776         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8777         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8778 }
8779
8780 test "/usr/local" != "$prefix" && \
8781 test -d "/usr/local" && \
8782 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8783         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8784         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8785         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8786         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8787         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8788         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8789 }
8790
8791 test "/opt" != "$prefix" && \
8792 test -d "/opt" && \
8793 (test $prefix = NONE || test "/opt" != "$prefix") && {
8794         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8795         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8796         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8797         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8798         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8799         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8800 }
8801
8802 test "$HOME" != "$prefix" && \
8803 test -d "$HOME" && \
8804 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8805         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8806         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8807         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8808         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8809         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8810         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8811 }
8812
8813 test "$includedir" != NONE && \
8814 test "$includedir" != "/usr/include" && \
8815 test -d "$includedir" && {
8816         test -d $includedir &&    cf_search="$cf_search $includedir"
8817         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8818 }
8819
8820 test "$oldincludedir" != NONE && \
8821 test "$oldincludedir" != "/usr/include" && \
8822 test -d "$oldincludedir" && {
8823         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8824         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8825 }
8826
8827 cf_search="$cf_search $cf_header_path_list"
8828
8829     for cf_cv_header_path_utf8 in $cf_search
8830     do
8831       if test -d $cf_cv_header_path_utf8 ; then
8832         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8833
8834 echo "${as_me:-configure}:8834: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8835
8836         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8837         cat >conftest.$ac_ext <<_ACEOF
8838 #line 8838 "configure"
8839 #include "confdefs.h"
8840
8841 #include <libutf8.h>
8842 int
8843 main ()
8844 {
8845 putwc(0,0);
8846   ;
8847   return 0;
8848 }
8849 _ACEOF
8850 rm -f conftest.$ac_objext
8851 if { (eval echo "$as_me:8851: \"$ac_compile\"") >&5
8852   (eval $ac_compile) 2>&5
8853   ac_status=$?
8854   echo "$as_me:8854: \$? = $ac_status" >&5
8855   (exit $ac_status); } &&
8856          { ac_try='test -s conftest.$ac_objext'
8857   { (eval echo "$as_me:8857: \"$ac_try\"") >&5
8858   (eval $ac_try) 2>&5
8859   ac_status=$?
8860   echo "$as_me:8860: \$? = $ac_status" >&5
8861   (exit $ac_status); }; }; then
8862
8863             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8864
8865 echo "${as_me:-configure}:8865: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8866
8867             cf_cv_find_linkage_utf8=maybe
8868             cf_test_CPPFLAGS="$CPPFLAGS"
8869             break
8870 else
8871   echo "$as_me: failed program was:" >&5
8872 cat conftest.$ac_ext >&5
8873
8874             CPPFLAGS="$cf_save_CPPFLAGS"
8875
8876 fi
8877 rm -f conftest.$ac_objext conftest.$ac_ext
8878       fi
8879     done
8880
8881     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8882
8883 echo "${as_me:-configure}:8883: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8884
8885       cf_save_LIBS="$LIBS"
8886       cf_save_LDFLAGS="$LDFLAGS"
8887
8888       if test "$cf_cv_find_linkage_utf8" != yes ; then
8889
8890 cf_search=
8891 cf_library_path_list=""
8892 if test -n "${LDFLAGS}${LIBS}" ; then
8893         for cf_library_path in $LDFLAGS $LIBS
8894         do
8895                 case $cf_library_path in #(vi
8896                 -L*)
8897                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8898
8899 test "$cf_library_path" != "NONE" && \
8900 test -d "$cf_library_path" && \
8901  {
8902         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8903         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8904         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8905         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8906         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8907         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8908 }
8909
8910                         cf_library_path_list="$cf_library_path_list $cf_search"
8911                         ;;
8912                 esac
8913         done
8914 fi
8915
8916 cf_search=
8917
8918 test "/usr" != "$prefix" && \
8919 test -d "/usr" && \
8920 (test $prefix = NONE || test "/usr" != "$prefix") && {
8921         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8922         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8923         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8924         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8925         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8926         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8927 }
8928
8929 test "$prefix" != "NONE" && \
8930 test -d "$prefix" && \
8931  {
8932         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8933         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8934         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8935         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8936         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8937         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8938 }
8939
8940 test "/usr/local" != "$prefix" && \
8941 test -d "/usr/local" && \
8942 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8943         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8944         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8945         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8946         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8947         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8948         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8949 }
8950
8951 test "/opt" != "$prefix" && \
8952 test -d "/opt" && \
8953 (test $prefix = NONE || test "/opt" != "$prefix") && {
8954         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8955         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8956         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8957         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8958         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8959         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8960 }
8961
8962 test "$HOME" != "$prefix" && \
8963 test -d "$HOME" && \
8964 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8965         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8966         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8967         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8968         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8969         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8970         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8971 }
8972
8973 cf_search="$cf_library_path_list $cf_search"
8974
8975         for cf_cv_library_path_utf8 in $cf_search
8976         do
8977           if test -d $cf_cv_library_path_utf8 ; then
8978             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8979
8980 echo "${as_me:-configure}:8980: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8981
8982             CPPFLAGS="$cf_test_CPPFLAGS"
8983             LIBS="-lutf8  $cf_save_LIBS"
8984             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8985             cat >conftest.$ac_ext <<_ACEOF
8986 #line 8986 "configure"
8987 #include "confdefs.h"
8988
8989 #include <libutf8.h>
8990 int
8991 main ()
8992 {
8993 putwc(0,0);
8994   ;
8995   return 0;
8996 }
8997 _ACEOF
8998 rm -f conftest.$ac_objext conftest$ac_exeext
8999 if { (eval echo "$as_me:8999: \"$ac_link\"") >&5
9000   (eval $ac_link) 2>&5
9001   ac_status=$?
9002   echo "$as_me:9002: \$? = $ac_status" >&5
9003   (exit $ac_status); } &&
9004          { ac_try='test -s conftest$ac_exeext'
9005   { (eval echo "$as_me:9005: \"$ac_try\"") >&5
9006   (eval $ac_try) 2>&5
9007   ac_status=$?
9008   echo "$as_me:9008: \$? = $ac_status" >&5
9009   (exit $ac_status); }; }; then
9010
9011                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9012
9013 echo "${as_me:-configure}:9013: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9014
9015                 cf_cv_find_linkage_utf8=yes
9016                 cf_cv_library_file_utf8="-lutf8"
9017                 break
9018 else
9019   echo "$as_me: failed program was:" >&5
9020 cat conftest.$ac_ext >&5
9021
9022                 CPPFLAGS="$cf_save_CPPFLAGS"
9023                 LIBS="$cf_save_LIBS"
9024                 LDFLAGS="$cf_save_LDFLAGS"
9025
9026 fi
9027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9028           fi
9029         done
9030         CPPFLAGS="$cf_save_CPPFLAGS"
9031         LDFLAGS="$cf_save_LDFLAGS"
9032       fi
9033
9034     else
9035       cf_cv_find_linkage_utf8=no
9036     fi
9037
9038 fi
9039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9040
9041 fi
9042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9043
9044 LIBS="$cf_save_LIBS"
9045
9046 if test "$cf_cv_find_linkage_utf8" = yes ; then
9047 cf_cv_utf8_lib=add-on
9048 else
9049 cf_cv_utf8_lib=no
9050 fi
9051
9052 fi
9053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9054 fi
9055 echo "$as_me:9055: result: $cf_cv_utf8_lib" >&5
9056 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9057
9058 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9059 # ncurses/ncursesw:
9060 if test "$cf_cv_utf8_lib" = "add-on" ; then
9061         cat >>confdefs.h <<\EOF
9062 #define HAVE_LIBUTF8_H 1
9063 EOF
9064
9065 if test -n "$cf_cv_header_path_utf8" ; then
9066   for cf_add_incdir in $cf_cv_header_path_utf8
9067   do
9068         while test $cf_add_incdir != /usr/include
9069         do
9070           if test -d $cf_add_incdir
9071           then
9072                 cf_have_incdir=no
9073                 if test -n "$CFLAGS$CPPFLAGS" ; then
9074                   # a loop is needed to ensure we can add subdirs of existing dirs
9075                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9076                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9077                           cf_have_incdir=yes; break
9078                         fi
9079                   done
9080                 fi
9081
9082                 if test "$cf_have_incdir" = no ; then
9083                   if test "$cf_add_incdir" = /usr/local/include ; then
9084                         if test "$GCC" = yes
9085                         then
9086                           cf_save_CPPFLAGS=$CPPFLAGS
9087                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9088                           cat >conftest.$ac_ext <<_ACEOF
9089 #line 9089 "configure"
9090 #include "confdefs.h"
9091 #include <stdio.h>
9092 int
9093 main ()
9094 {
9095 printf("Hello")
9096   ;
9097   return 0;
9098 }
9099 _ACEOF
9100 rm -f conftest.$ac_objext
9101 if { (eval echo "$as_me:9101: \"$ac_compile\"") >&5
9102   (eval $ac_compile) 2>&5
9103   ac_status=$?
9104   echo "$as_me:9104: \$? = $ac_status" >&5
9105   (exit $ac_status); } &&
9106          { ac_try='test -s conftest.$ac_objext'
9107   { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108   (eval $ac_try) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); }; }; then
9112   :
9113 else
9114   echo "$as_me: failed program was:" >&5
9115 cat conftest.$ac_ext >&5
9116 cf_have_incdir=yes
9117 fi
9118 rm -f conftest.$ac_objext conftest.$ac_ext
9119                           CPPFLAGS=$cf_save_CPPFLAGS
9120                         fi
9121                   fi
9122                 fi
9123
9124                 if test "$cf_have_incdir" = no ; then
9125                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9126
9127 echo "${as_me:-configure}:9127: testing adding $cf_add_incdir to include-path ..." 1>&5
9128
9129                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9130
9131                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9132                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9133                   cf_add_incdir="$cf_top_incdir"
9134                 else
9135                   break
9136                 fi
9137           fi
9138         done
9139   done
9140 fi
9141
9142 if test -n "$cf_cv_library_path_utf8" ; then
9143   for cf_add_libdir in $cf_cv_library_path_utf8
9144   do
9145     if test $cf_add_libdir = /usr/lib ; then
9146       :
9147     elif test -d $cf_add_libdir
9148     then
9149       cf_have_libdir=no
9150       if test -n "$LDFLAGS$LIBS" ; then
9151         # a loop is needed to ensure we can add subdirs of existing dirs
9152         for cf_test_libdir in $LDFLAGS $LIBS ; do
9153           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9154             cf_have_libdir=yes; break
9155           fi
9156         done
9157       fi
9158       if test "$cf_have_libdir" = no ; then
9159         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9160
9161 echo "${as_me:-configure}:9161: testing adding $cf_add_libdir to library-path ..." 1>&5
9162
9163         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9164       fi
9165     fi
9166   done
9167 fi
9168
9169         LIBS="$cf_cv_library_file_utf8 $LIBS"
9170 fi
9171
9172                 if test "$cf_cv_utf8_lib" != no ; then
9173                         NCURSES_LIBUTF8=1
9174                 fi
9175         fi
9176
9177 # This is needed on Tru64 5.0 to declare mbstate_t
9178 echo "$as_me:9178: checking if we must include wchar.h to declare mbstate_t" >&5
9179 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9180 if test "${cf_cv_mbstate_t+set}" = set; then
9181   echo $ECHO_N "(cached) $ECHO_C" >&6
9182 else
9183
9184 cat >conftest.$ac_ext <<_ACEOF
9185 #line 9185 "configure"
9186 #include "confdefs.h"
9187
9188 #include <stdlib.h>
9189 #include <stdarg.h>
9190 #include <stdio.h>
9191 #ifdef HAVE_LIBUTF8_H
9192 #include <libutf8.h>
9193 #endif
9194 int
9195 main ()
9196 {
9197 mbstate_t state
9198   ;
9199   return 0;
9200 }
9201 _ACEOF
9202 rm -f conftest.$ac_objext
9203 if { (eval echo "$as_me:9203: \"$ac_compile\"") >&5
9204   (eval $ac_compile) 2>&5
9205   ac_status=$?
9206   echo "$as_me:9206: \$? = $ac_status" >&5
9207   (exit $ac_status); } &&
9208          { ac_try='test -s conftest.$ac_objext'
9209   { (eval echo "$as_me:9209: \"$ac_try\"") >&5
9210   (eval $ac_try) 2>&5
9211   ac_status=$?
9212   echo "$as_me:9212: \$? = $ac_status" >&5
9213   (exit $ac_status); }; }; then
9214   cf_cv_mbstate_t=no
9215 else
9216   echo "$as_me: failed program was:" >&5
9217 cat conftest.$ac_ext >&5
9218 cat >conftest.$ac_ext <<_ACEOF
9219 #line 9219 "configure"
9220 #include "confdefs.h"
9221
9222 #include <stdlib.h>
9223 #include <stdarg.h>
9224 #include <stdio.h>
9225 #include <wchar.h>
9226 #ifdef HAVE_LIBUTF8_H
9227 #include <libutf8.h>
9228 #endif
9229 int
9230 main ()
9231 {
9232 mbstate_t value
9233   ;
9234   return 0;
9235 }
9236 _ACEOF
9237 rm -f conftest.$ac_objext
9238 if { (eval echo "$as_me:9238: \"$ac_compile\"") >&5
9239   (eval $ac_compile) 2>&5
9240   ac_status=$?
9241   echo "$as_me:9241: \$? = $ac_status" >&5
9242   (exit $ac_status); } &&
9243          { ac_try='test -s conftest.$ac_objext'
9244   { (eval echo "$as_me:9244: \"$ac_try\"") >&5
9245   (eval $ac_try) 2>&5
9246   ac_status=$?
9247   echo "$as_me:9247: \$? = $ac_status" >&5
9248   (exit $ac_status); }; }; then
9249   cf_cv_mbstate_t=yes
9250 else
9251   echo "$as_me: failed program was:" >&5
9252 cat conftest.$ac_ext >&5
9253 cf_cv_mbstate_t=unknown
9254 fi
9255 rm -f conftest.$ac_objext conftest.$ac_ext
9256 fi
9257 rm -f conftest.$ac_objext conftest.$ac_ext
9258 fi
9259 echo "$as_me:9259: result: $cf_cv_mbstate_t" >&5
9260 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9261
9262 if test "$cf_cv_mbstate_t" = yes ; then
9263         cat >>confdefs.h <<\EOF
9264 #define NEED_WCHAR_H 1
9265 EOF
9266
9267         NEED_WCHAR_H=1
9268 fi
9269
9270 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9271 if test "$cf_cv_mbstate_t" = unknown ; then
9272         NCURSES_MBSTATE_T=1
9273 fi
9274
9275 # This is needed on Tru64 5.0 to declare wchar_t
9276 echo "$as_me:9276: checking if we must include wchar.h to declare wchar_t" >&5
9277 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9278 if test "${cf_cv_wchar_t+set}" = set; then
9279   echo $ECHO_N "(cached) $ECHO_C" >&6
9280 else
9281
9282 cat >conftest.$ac_ext <<_ACEOF
9283 #line 9283 "configure"
9284 #include "confdefs.h"
9285
9286 #include <stdlib.h>
9287 #include <stdarg.h>
9288 #include <stdio.h>
9289 #ifdef HAVE_LIBUTF8_H
9290 #include <libutf8.h>
9291 #endif
9292 int
9293 main ()
9294 {
9295 wchar_t state
9296   ;
9297   return 0;
9298 }
9299 _ACEOF
9300 rm -f conftest.$ac_objext
9301 if { (eval echo "$as_me:9301: \"$ac_compile\"") >&5
9302   (eval $ac_compile) 2>&5
9303   ac_status=$?
9304   echo "$as_me:9304: \$? = $ac_status" >&5
9305   (exit $ac_status); } &&
9306          { ac_try='test -s conftest.$ac_objext'
9307   { (eval echo "$as_me:9307: \"$ac_try\"") >&5
9308   (eval $ac_try) 2>&5
9309   ac_status=$?
9310   echo "$as_me:9310: \$? = $ac_status" >&5
9311   (exit $ac_status); }; }; then
9312   cf_cv_wchar_t=no
9313 else
9314   echo "$as_me: failed program was:" >&5
9315 cat conftest.$ac_ext >&5
9316 cat >conftest.$ac_ext <<_ACEOF
9317 #line 9317 "configure"
9318 #include "confdefs.h"
9319
9320 #include <stdlib.h>
9321 #include <stdarg.h>
9322 #include <stdio.h>
9323 #include <wchar.h>
9324 #ifdef HAVE_LIBUTF8_H
9325 #include <libutf8.h>
9326 #endif
9327 int
9328 main ()
9329 {
9330 wchar_t value
9331   ;
9332   return 0;
9333 }
9334 _ACEOF
9335 rm -f conftest.$ac_objext
9336 if { (eval echo "$as_me:9336: \"$ac_compile\"") >&5
9337   (eval $ac_compile) 2>&5
9338   ac_status=$?
9339   echo "$as_me:9339: \$? = $ac_status" >&5
9340   (exit $ac_status); } &&
9341          { ac_try='test -s conftest.$ac_objext'
9342   { (eval echo "$as_me:9342: \"$ac_try\"") >&5
9343   (eval $ac_try) 2>&5
9344   ac_status=$?
9345   echo "$as_me:9345: \$? = $ac_status" >&5
9346   (exit $ac_status); }; }; then
9347   cf_cv_wchar_t=yes
9348 else
9349   echo "$as_me: failed program was:" >&5
9350 cat conftest.$ac_ext >&5
9351 cf_cv_wchar_t=unknown
9352 fi
9353 rm -f conftest.$ac_objext conftest.$ac_ext
9354 fi
9355 rm -f conftest.$ac_objext conftest.$ac_ext
9356 fi
9357 echo "$as_me:9357: result: $cf_cv_wchar_t" >&5
9358 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9359
9360 if test "$cf_cv_wchar_t" = yes ; then
9361         cat >>confdefs.h <<\EOF
9362 #define NEED_WCHAR_H 1
9363 EOF
9364
9365         NEED_WCHAR_H=1
9366 fi
9367
9368 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9369 if test "$cf_cv_wchar_t" = unknown ; then
9370         NCURSES_WCHAR_T=1
9371 fi
9372
9373 # if we find wchar_t in either place, use substitution to provide a fallback.
9374 if test "$cf_cv_wchar_t" != unknown ; then
9375         NCURSES_OK_WCHAR_T=1
9376 fi
9377
9378 # This is needed on Tru64 5.0 to declare wint_t
9379 echo "$as_me:9379: checking if we must include wchar.h to declare wint_t" >&5
9380 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9381 if test "${cf_cv_wint_t+set}" = set; then
9382   echo $ECHO_N "(cached) $ECHO_C" >&6
9383 else
9384
9385 cat >conftest.$ac_ext <<_ACEOF
9386 #line 9386 "configure"
9387 #include "confdefs.h"
9388
9389 #include <stdlib.h>
9390 #include <stdarg.h>
9391 #include <stdio.h>
9392 #ifdef HAVE_LIBUTF8_H
9393 #include <libutf8.h>
9394 #endif
9395 int
9396 main ()
9397 {
9398 wint_t state
9399   ;
9400   return 0;
9401 }
9402 _ACEOF
9403 rm -f conftest.$ac_objext
9404 if { (eval echo "$as_me:9404: \"$ac_compile\"") >&5
9405   (eval $ac_compile) 2>&5
9406   ac_status=$?
9407   echo "$as_me:9407: \$? = $ac_status" >&5
9408   (exit $ac_status); } &&
9409          { ac_try='test -s conftest.$ac_objext'
9410   { (eval echo "$as_me:9410: \"$ac_try\"") >&5
9411   (eval $ac_try) 2>&5
9412   ac_status=$?
9413   echo "$as_me:9413: \$? = $ac_status" >&5
9414   (exit $ac_status); }; }; then
9415   cf_cv_wint_t=no
9416 else
9417   echo "$as_me: failed program was:" >&5
9418 cat conftest.$ac_ext >&5
9419 cat >conftest.$ac_ext <<_ACEOF
9420 #line 9420 "configure"
9421 #include "confdefs.h"
9422
9423 #include <stdlib.h>
9424 #include <stdarg.h>
9425 #include <stdio.h>
9426 #include <wchar.h>
9427 #ifdef HAVE_LIBUTF8_H
9428 #include <libutf8.h>
9429 #endif
9430 int
9431 main ()
9432 {
9433 wint_t value
9434   ;
9435   return 0;
9436 }
9437 _ACEOF
9438 rm -f conftest.$ac_objext
9439 if { (eval echo "$as_me:9439: \"$ac_compile\"") >&5
9440   (eval $ac_compile) 2>&5
9441   ac_status=$?
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); } &&
9444          { ac_try='test -s conftest.$ac_objext'
9445   { (eval echo "$as_me:9445: \"$ac_try\"") >&5
9446   (eval $ac_try) 2>&5
9447   ac_status=$?
9448   echo "$as_me:9448: \$? = $ac_status" >&5
9449   (exit $ac_status); }; }; then
9450   cf_cv_wint_t=yes
9451 else
9452   echo "$as_me: failed program was:" >&5
9453 cat conftest.$ac_ext >&5
9454 cf_cv_wint_t=unknown
9455 fi
9456 rm -f conftest.$ac_objext conftest.$ac_ext
9457 fi
9458 rm -f conftest.$ac_objext conftest.$ac_ext
9459 fi
9460 echo "$as_me:9460: result: $cf_cv_wint_t" >&5
9461 echo "${ECHO_T}$cf_cv_wint_t" >&6
9462
9463 if test "$cf_cv_wint_t" = yes ; then
9464         cat >>confdefs.h <<\EOF
9465 #define NEED_WCHAR_H 1
9466 EOF
9467
9468         NEED_WCHAR_H=1
9469 fi
9470
9471 # if we do not find wint_t in either place, use substitution to provide a fallback.
9472 if test "$cf_cv_wint_t" = unknown ; then
9473         NCURSES_WINT_T=1
9474 fi
9475
9476 # if we find wint_t in either place, use substitution to provide a fallback.
9477 if test "$cf_cv_wint_t" != unknown ; then
9478         NCURSES_OK_WINT_T=1
9479 fi
9480
9481         if test "$NCURSES_MBSTATE_T" != 0; then
9482                 cat >>confdefs.h <<\EOF
9483 #define NEED_MBSTATE_T_DEF 1
9484 EOF
9485
9486         fi
9487 fi
9488
9489 ###   use option --disable-lp64 to allow long chtype
9490 case $cf_cv_abi_version in
9491 [345]*)
9492         default_with_lp64=no
9493         ;;
9494 *)
9495         default_with_lp64=yes
9496         ;;
9497 esac
9498
9499 echo "$as_me:9499: checking whether to enable _LP64 definition in curses.h" >&5
9500 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9501
9502 # Check whether --enable-lp64 or --disable-lp64 was given.
9503 if test "${enable_lp64+set}" = set; then
9504   enableval="$enable_lp64"
9505   with_lp64=$enableval
9506 else
9507   with_lp64=$default_with_lp64
9508 fi;
9509 echo "$as_me:9509: result: $with_lp64" >&5
9510 echo "${ECHO_T}$with_lp64" >&6
9511
9512 if test "$with_lp64" = yes ; then
9513         cf_cv_enable_lp64=1
9514 else
9515         cf_cv_enable_lp64=0
9516 fi
9517
9518 # Check whether --enable-largefile or --disable-largefile was given.
9519 if test "${enable_largefile+set}" = set; then
9520   enableval="$enable_largefile"
9521
9522 fi;
9523 if test "$enable_largefile" != no; then
9524
9525   echo "$as_me:9525: checking for special C compiler options needed for large files" >&5
9526 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9527 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9528   echo $ECHO_N "(cached) $ECHO_C" >&6
9529 else
9530   ac_cv_sys_largefile_CC=no
9531      if test "$GCC" != yes; then
9532        ac_save_CC=$CC
9533        while :; do
9534          # IRIX 6.2 and later do not support large files by default,
9535          # so use the C compiler's -n32 option if that helps.
9536          cat >conftest.$ac_ext <<_ACEOF
9537 #line 9537 "configure"
9538 #include "confdefs.h"
9539 #include <sys/types.h>
9540  /* Check that off_t can represent 2**63 - 1 correctly.
9541     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9542     since some C++ compilers masquerading as C compilers
9543     incorrectly reject 9223372036854775807.  */
9544 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9545   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9546                        && LARGE_OFF_T % 2147483647 == 1)
9547                       ? 1 : -1];
9548 int
9549 main ()
9550 {
9551
9552   ;
9553   return 0;
9554 }
9555 _ACEOF
9556          rm -f conftest.$ac_objext
9557 if { (eval echo "$as_me:9557: \"$ac_compile\"") >&5
9558   (eval $ac_compile) 2>&5
9559   ac_status=$?
9560   echo "$as_me:9560: \$? = $ac_status" >&5
9561   (exit $ac_status); } &&
9562          { ac_try='test -s conftest.$ac_objext'
9563   { (eval echo "$as_me:9563: \"$ac_try\"") >&5
9564   (eval $ac_try) 2>&5
9565   ac_status=$?
9566   echo "$as_me:9566: \$? = $ac_status" >&5
9567   (exit $ac_status); }; }; then
9568   break
9569 else
9570   echo "$as_me: failed program was:" >&5
9571 cat conftest.$ac_ext >&5
9572 fi
9573 rm -f conftest.$ac_objext
9574          CC="$CC -n32"
9575          rm -f conftest.$ac_objext
9576 if { (eval echo "$as_me:9576: \"$ac_compile\"") >&5
9577   (eval $ac_compile) 2>&5
9578   ac_status=$?
9579   echo "$as_me:9579: \$? = $ac_status" >&5
9580   (exit $ac_status); } &&
9581          { ac_try='test -s conftest.$ac_objext'
9582   { (eval echo "$as_me:9582: \"$ac_try\"") >&5
9583   (eval $ac_try) 2>&5
9584   ac_status=$?
9585   echo "$as_me:9585: \$? = $ac_status" >&5
9586   (exit $ac_status); }; }; then
9587   ac_cv_sys_largefile_CC=' -n32'; break
9588 else
9589   echo "$as_me: failed program was:" >&5
9590 cat conftest.$ac_ext >&5
9591 fi
9592 rm -f conftest.$ac_objext
9593          break
9594        done
9595        CC=$ac_save_CC
9596        rm -f conftest.$ac_ext
9597     fi
9598 fi
9599 echo "$as_me:9599: result: $ac_cv_sys_largefile_CC" >&5
9600 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9601   if test "$ac_cv_sys_largefile_CC" != no; then
9602     CC=$CC$ac_cv_sys_largefile_CC
9603   fi
9604
9605   echo "$as_me:9605: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9606 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9607 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9608   echo $ECHO_N "(cached) $ECHO_C" >&6
9609 else
9610   while :; do
9611   ac_cv_sys_file_offset_bits=no
9612   cat >conftest.$ac_ext <<_ACEOF
9613 #line 9613 "configure"
9614 #include "confdefs.h"
9615 #include <sys/types.h>
9616  /* Check that off_t can represent 2**63 - 1 correctly.
9617     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9618     since some C++ compilers masquerading as C compilers
9619     incorrectly reject 9223372036854775807.  */
9620 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9621   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9622                        && LARGE_OFF_T % 2147483647 == 1)
9623                       ? 1 : -1];
9624 int
9625 main ()
9626 {
9627
9628   ;
9629   return 0;
9630 }
9631 _ACEOF
9632 rm -f conftest.$ac_objext
9633 if { (eval echo "$as_me:9633: \"$ac_compile\"") >&5
9634   (eval $ac_compile) 2>&5
9635   ac_status=$?
9636   echo "$as_me:9636: \$? = $ac_status" >&5
9637   (exit $ac_status); } &&
9638          { ac_try='test -s conftest.$ac_objext'
9639   { (eval echo "$as_me:9639: \"$ac_try\"") >&5
9640   (eval $ac_try) 2>&5
9641   ac_status=$?
9642   echo "$as_me:9642: \$? = $ac_status" >&5
9643   (exit $ac_status); }; }; then
9644   break
9645 else
9646   echo "$as_me: failed program was:" >&5
9647 cat conftest.$ac_ext >&5
9648 fi
9649 rm -f conftest.$ac_objext conftest.$ac_ext
9650   cat >conftest.$ac_ext <<_ACEOF
9651 #line 9651 "configure"
9652 #include "confdefs.h"
9653 #define _FILE_OFFSET_BITS 64
9654 #include <sys/types.h>
9655  /* Check that off_t can represent 2**63 - 1 correctly.
9656     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9657     since some C++ compilers masquerading as C compilers
9658     incorrectly reject 9223372036854775807.  */
9659 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9660   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9661                        && LARGE_OFF_T % 2147483647 == 1)
9662                       ? 1 : -1];
9663 int
9664 main ()
9665 {
9666
9667   ;
9668   return 0;
9669 }
9670 _ACEOF
9671 rm -f conftest.$ac_objext
9672 if { (eval echo "$as_me:9672: \"$ac_compile\"") >&5
9673   (eval $ac_compile) 2>&5
9674   ac_status=$?
9675   echo "$as_me:9675: \$? = $ac_status" >&5
9676   (exit $ac_status); } &&
9677          { ac_try='test -s conftest.$ac_objext'
9678   { (eval echo "$as_me:9678: \"$ac_try\"") >&5
9679   (eval $ac_try) 2>&5
9680   ac_status=$?
9681   echo "$as_me:9681: \$? = $ac_status" >&5
9682   (exit $ac_status); }; }; then
9683   ac_cv_sys_file_offset_bits=64; break
9684 else
9685   echo "$as_me: failed program was:" >&5
9686 cat conftest.$ac_ext >&5
9687 fi
9688 rm -f conftest.$ac_objext conftest.$ac_ext
9689   break
9690 done
9691 fi
9692 echo "$as_me:9692: result: $ac_cv_sys_file_offset_bits" >&5
9693 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9694 if test "$ac_cv_sys_file_offset_bits" != no; then
9695
9696 cat >>confdefs.h <<EOF
9697 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9698 EOF
9699
9700 fi
9701 rm -rf conftest*
9702   echo "$as_me:9702: checking for _LARGE_FILES value needed for large files" >&5
9703 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9704 if test "${ac_cv_sys_large_files+set}" = set; then
9705   echo $ECHO_N "(cached) $ECHO_C" >&6
9706 else
9707   while :; do
9708   ac_cv_sys_large_files=no
9709   cat >conftest.$ac_ext <<_ACEOF
9710 #line 9710 "configure"
9711 #include "confdefs.h"
9712 #include <sys/types.h>
9713  /* Check that off_t can represent 2**63 - 1 correctly.
9714     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9715     since some C++ compilers masquerading as C compilers
9716     incorrectly reject 9223372036854775807.  */
9717 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9718   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9719                        && LARGE_OFF_T % 2147483647 == 1)
9720                       ? 1 : -1];
9721 int
9722 main ()
9723 {
9724
9725   ;
9726   return 0;
9727 }
9728 _ACEOF
9729 rm -f conftest.$ac_objext
9730 if { (eval echo "$as_me:9730: \"$ac_compile\"") >&5
9731   (eval $ac_compile) 2>&5
9732   ac_status=$?
9733   echo "$as_me:9733: \$? = $ac_status" >&5
9734   (exit $ac_status); } &&
9735          { ac_try='test -s conftest.$ac_objext'
9736   { (eval echo "$as_me:9736: \"$ac_try\"") >&5
9737   (eval $ac_try) 2>&5
9738   ac_status=$?
9739   echo "$as_me:9739: \$? = $ac_status" >&5
9740   (exit $ac_status); }; }; then
9741   break
9742 else
9743   echo "$as_me: failed program was:" >&5
9744 cat conftest.$ac_ext >&5
9745 fi
9746 rm -f conftest.$ac_objext conftest.$ac_ext
9747   cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 #define _LARGE_FILES 1
9751 #include <sys/types.h>
9752  /* Check that off_t can represent 2**63 - 1 correctly.
9753     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9754     since some C++ compilers masquerading as C compilers
9755     incorrectly reject 9223372036854775807.  */
9756 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9757   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9758                        && LARGE_OFF_T % 2147483647 == 1)
9759                       ? 1 : -1];
9760 int
9761 main ()
9762 {
9763
9764   ;
9765   return 0;
9766 }
9767 _ACEOF
9768 rm -f conftest.$ac_objext
9769 if { (eval echo "$as_me:9769: \"$ac_compile\"") >&5
9770   (eval $ac_compile) 2>&5
9771   ac_status=$?
9772   echo "$as_me:9772: \$? = $ac_status" >&5
9773   (exit $ac_status); } &&
9774          { ac_try='test -s conftest.$ac_objext'
9775   { (eval echo "$as_me:9775: \"$ac_try\"") >&5
9776   (eval $ac_try) 2>&5
9777   ac_status=$?
9778   echo "$as_me:9778: \$? = $ac_status" >&5
9779   (exit $ac_status); }; }; then
9780   ac_cv_sys_large_files=1; break
9781 else
9782   echo "$as_me: failed program was:" >&5
9783 cat conftest.$ac_ext >&5
9784 fi
9785 rm -f conftest.$ac_objext conftest.$ac_ext
9786   break
9787 done
9788 fi
9789 echo "$as_me:9789: result: $ac_cv_sys_large_files" >&5
9790 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9791 if test "$ac_cv_sys_large_files" != no; then
9792
9793 cat >>confdefs.h <<EOF
9794 #define _LARGE_FILES $ac_cv_sys_large_files
9795 EOF
9796
9797 fi
9798 rm -rf conftest*
9799 fi
9800
9801     if test "$enable_largefile" != no ; then
9802         echo "$as_me:9802: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9803 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9804 if test "${ac_cv_sys_largefile_source+set}" = set; then
9805   echo $ECHO_N "(cached) $ECHO_C" >&6
9806 else
9807   while :; do
9808   ac_cv_sys_largefile_source=no
9809   cat >conftest.$ac_ext <<_ACEOF
9810 #line 9810 "configure"
9811 #include "confdefs.h"
9812 #include <stdio.h>
9813 int
9814 main ()
9815 {
9816 return !fseeko;
9817   ;
9818   return 0;
9819 }
9820 _ACEOF
9821 rm -f conftest.$ac_objext
9822 if { (eval echo "$as_me:9822: \"$ac_compile\"") >&5
9823   (eval $ac_compile) 2>&5
9824   ac_status=$?
9825   echo "$as_me:9825: \$? = $ac_status" >&5
9826   (exit $ac_status); } &&
9827          { ac_try='test -s conftest.$ac_objext'
9828   { (eval echo "$as_me:9828: \"$ac_try\"") >&5
9829   (eval $ac_try) 2>&5
9830   ac_status=$?
9831   echo "$as_me:9831: \$? = $ac_status" >&5
9832   (exit $ac_status); }; }; then
9833   break
9834 else
9835   echo "$as_me: failed program was:" >&5
9836 cat conftest.$ac_ext >&5
9837 fi
9838 rm -f conftest.$ac_objext conftest.$ac_ext
9839   cat >conftest.$ac_ext <<_ACEOF
9840 #line 9840 "configure"
9841 #include "confdefs.h"
9842 #define _LARGEFILE_SOURCE 1
9843 #include <stdio.h>
9844 int
9845 main ()
9846 {
9847 return !fseeko;
9848   ;
9849   return 0;
9850 }
9851 _ACEOF
9852 rm -f conftest.$ac_objext
9853 if { (eval echo "$as_me:9853: \"$ac_compile\"") >&5
9854   (eval $ac_compile) 2>&5
9855   ac_status=$?
9856   echo "$as_me:9856: \$? = $ac_status" >&5
9857   (exit $ac_status); } &&
9858          { ac_try='test -s conftest.$ac_objext'
9859   { (eval echo "$as_me:9859: \"$ac_try\"") >&5
9860   (eval $ac_try) 2>&5
9861   ac_status=$?
9862   echo "$as_me:9862: \$? = $ac_status" >&5
9863   (exit $ac_status); }; }; then
9864   ac_cv_sys_largefile_source=1; break
9865 else
9866   echo "$as_me: failed program was:" >&5
9867 cat conftest.$ac_ext >&5
9868 fi
9869 rm -f conftest.$ac_objext conftest.$ac_ext
9870   break
9871 done
9872 fi
9873 echo "$as_me:9873: result: $ac_cv_sys_largefile_source" >&5
9874 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9875 if test "$ac_cv_sys_largefile_source" != no; then
9876
9877 cat >>confdefs.h <<EOF
9878 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9879 EOF
9880
9881 fi
9882 rm -rf conftest*
9883
9884 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9885 # in glibc 2.1.3, but that breaks too many other things.
9886 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9887 echo "$as_me:9887: checking for fseeko" >&5
9888 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9889 if test "${ac_cv_func_fseeko+set}" = set; then
9890   echo $ECHO_N "(cached) $ECHO_C" >&6
9891 else
9892   cat >conftest.$ac_ext <<_ACEOF
9893 #line 9893 "configure"
9894 #include "confdefs.h"
9895 #include <stdio.h>
9896 int
9897 main ()
9898 {
9899 return fseeko && fseeko (stdin, 0, 0);
9900   ;
9901   return 0;
9902 }
9903 _ACEOF
9904 rm -f conftest.$ac_objext conftest$ac_exeext
9905 if { (eval echo "$as_me:9905: \"$ac_link\"") >&5
9906   (eval $ac_link) 2>&5
9907   ac_status=$?
9908   echo "$as_me:9908: \$? = $ac_status" >&5
9909   (exit $ac_status); } &&
9910          { ac_try='test -s conftest$ac_exeext'
9911   { (eval echo "$as_me:9911: \"$ac_try\"") >&5
9912   (eval $ac_try) 2>&5
9913   ac_status=$?
9914   echo "$as_me:9914: \$? = $ac_status" >&5
9915   (exit $ac_status); }; }; then
9916   ac_cv_func_fseeko=yes
9917 else
9918   echo "$as_me: failed program was:" >&5
9919 cat conftest.$ac_ext >&5
9920 ac_cv_func_fseeko=no
9921 fi
9922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9923 fi
9924 echo "$as_me:9924: result: $ac_cv_func_fseeko" >&5
9925 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9926 if test $ac_cv_func_fseeko = yes; then
9927
9928 cat >>confdefs.h <<\EOF
9929 #define HAVE_FSEEKO 1
9930 EOF
9931
9932 fi
9933
9934         # Normally we would collect these definitions in the config.h,
9935         # but (like _XOPEN_SOURCE), some environments rely on having these
9936         # defined before any of the system headers are included.  Another
9937         # case comes up with C++, e.g., on AIX the compiler compiles the
9938         # header files by themselves before looking at the body files it is
9939         # told to compile.  For ncurses, those header files do not include
9940         # the config.h
9941         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9942         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9943         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9944
9945         echo "$as_me:9945: checking whether to use struct dirent64" >&5
9946 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9947 if test "${cf_cv_struct_dirent64+set}" = set; then
9948   echo $ECHO_N "(cached) $ECHO_C" >&6
9949 else
9950
9951                 cat >conftest.$ac_ext <<_ACEOF
9952 #line 9952 "configure"
9953 #include "confdefs.h"
9954
9955 #include <sys/types.h>
9956 #include <dirent.h>
9957
9958 int
9959 main ()
9960 {
9961
9962                 /* if transitional largefile support is setup, this is true */
9963                 extern struct dirent64 * readdir(DIR *);
9964                 struct dirent64 *x = readdir((DIR *)0);
9965                 struct dirent *y = readdir((DIR *)0);
9966                 int z = x - y;
9967
9968   ;
9969   return 0;
9970 }
9971 _ACEOF
9972 rm -f conftest.$ac_objext
9973 if { (eval echo "$as_me:9973: \"$ac_compile\"") >&5
9974   (eval $ac_compile) 2>&5
9975   ac_status=$?
9976   echo "$as_me:9976: \$? = $ac_status" >&5
9977   (exit $ac_status); } &&
9978          { ac_try='test -s conftest.$ac_objext'
9979   { (eval echo "$as_me:9979: \"$ac_try\"") >&5
9980   (eval $ac_try) 2>&5
9981   ac_status=$?
9982   echo "$as_me:9982: \$? = $ac_status" >&5
9983   (exit $ac_status); }; }; then
9984   cf_cv_struct_dirent64=yes
9985 else
9986   echo "$as_me: failed program was:" >&5
9987 cat conftest.$ac_ext >&5
9988 cf_cv_struct_dirent64=no
9989 fi
9990 rm -f conftest.$ac_objext conftest.$ac_ext
9991
9992 fi
9993 echo "$as_me:9993: result: $cf_cv_struct_dirent64" >&5
9994 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9995         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9996 #define HAVE_STRUCT_DIRENT64 1
9997 EOF
9998
9999     fi
10000
10001 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10002 echo "$as_me:10002: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10003 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10004
10005 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10006 if test "${enable_tparm_varargs+set}" = set; then
10007   enableval="$enable_tparm_varargs"
10008   with_tparm_varargs=$enableval
10009 else
10010   with_tparm_varargs=yes
10011 fi;
10012 echo "$as_me:10012: result: $with_tparm_varargs" >&5
10013 echo "${ECHO_T}$with_tparm_varargs" >&6
10014 NCURSES_TPARM_VARARGS=0
10015 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10016
10017 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10018 if test "$with_ticlib" != no ; then
10019 echo "$as_me:10019: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10020 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10021
10022 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10023 if test "${enable_tic_depends+set}" = set; then
10024   enableval="$enable_tic_depends"
10025   with_tic_depends=$enableval
10026 else
10027   with_tic_depends=yes
10028 fi;
10029 echo "$as_me:10029: result: $with_tic_depends" >&5
10030 echo "${ECHO_T}$with_tic_depends" >&6
10031 else
10032         with_tic_depends=no
10033 fi
10034
10035 ###   use option --with-bool to override bool's type
10036 echo "$as_me:10036: checking for type of bool" >&5
10037 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10038
10039 # Check whether --with-bool or --without-bool was given.
10040 if test "${with_bool+set}" = set; then
10041   withval="$with_bool"
10042   NCURSES_BOOL="$withval"
10043 else
10044   NCURSES_BOOL=auto
10045 fi;
10046 echo "$as_me:10046: result: $NCURSES_BOOL" >&5
10047 echo "${ECHO_T}$NCURSES_BOOL" >&6
10048
10049 echo "$as_me:10049: checking for alternate terminal capabilities file" >&5
10050 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10051
10052 # Check whether --with-caps or --without-caps was given.
10053 if test "${with_caps+set}" = set; then
10054   withval="$with_caps"
10055   TERMINFO_CAPS=Caps.$withval
10056 else
10057   TERMINFO_CAPS=Caps
10058 fi;
10059 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10060 echo "$as_me:10060: result: $TERMINFO_CAPS" >&5
10061 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10062
10063 ###   use option --with-chtype to override chtype's type
10064 echo "$as_me:10064: checking for type of chtype" >&5
10065 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10066
10067 # Check whether --with-chtype or --without-chtype was given.
10068 if test "${with_chtype+set}" = set; then
10069   withval="$with_chtype"
10070   NCURSES_CHTYPE="$withval"
10071 else
10072   NCURSES_CHTYPE=auto
10073 fi;
10074 echo "$as_me:10074: result: $NCURSES_CHTYPE" >&5
10075 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10076
10077 ###   use option --with-ospeed to override ospeed's type
10078 echo "$as_me:10078: checking for type of ospeed" >&5
10079 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10080
10081 # Check whether --with-ospeed or --without-ospeed was given.
10082 if test "${with_ospeed+set}" = set; then
10083   withval="$with_ospeed"
10084   NCURSES_OSPEED="$withval"
10085 else
10086   NCURSES_OSPEED=short
10087 fi;
10088 echo "$as_me:10088: result: $NCURSES_OSPEED" >&5
10089 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10090
10091 ###   use option --with-mmask-t to override mmask_t's type
10092 echo "$as_me:10092: checking for type of mmask_t" >&5
10093 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10094
10095 # Check whether --with-mmask-t or --without-mmask-t was given.
10096 if test "${with_mmask_t+set}" = set; then
10097   withval="$with_mmask_t"
10098   NCURSES_MMASK_T="$withval"
10099 else
10100   NCURSES_MMASK_T=auto
10101 fi;
10102 echo "$as_me:10102: result: $NCURSES_MMASK_T" >&5
10103 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10104
10105 ###   use option --with-ccharw-max to override CCHARW_MAX size
10106 echo "$as_me:10106: checking for size CCHARW_MAX" >&5
10107 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10108
10109 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10110 if test "${with_ccharw_max+set}" = set; then
10111   withval="$with_ccharw_max"
10112   NCURSES_CCHARW_MAX="$withval"
10113 else
10114   NCURSES_CCHARW_MAX=5
10115 fi;
10116 echo "$as_me:10116: result: $NCURSES_CCHARW_MAX" >&5
10117 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10118
10119 ###   use option --with-tparm-arg to override tparm's argument type
10120 echo "$as_me:10120: checking for type of tparm args" >&5
10121 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10122
10123 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10124 if test "${with_tparm_arg+set}" = set; then
10125   withval="$with_tparm_arg"
10126   NCURSES_TPARM_ARG="$withval"
10127 else
10128   NCURSES_TPARM_ARG=long
10129 fi;
10130 echo "$as_me:10130: result: $NCURSES_TPARM_ARG" >&5
10131 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10132
10133 ### Enable compiling-in rcs id's
10134 echo "$as_me:10134: checking if RCS identifiers should be compiled-in" >&5
10135 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10136
10137 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10138 if test "${with_rcs_ids+set}" = set; then
10139   withval="$with_rcs_ids"
10140   with_rcs_ids=$withval
10141 else
10142   with_rcs_ids=no
10143 fi;
10144 echo "$as_me:10144: result: $with_rcs_ids" >&5
10145 echo "${ECHO_T}$with_rcs_ids" >&6
10146 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10147 #define USE_RCS_IDS 1
10148 EOF
10149
10150 ###############################################################################
10151
10152 echo "$as_me:10152: checking format of man-pages" >&5
10153 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10154
10155 # Check whether --with-manpage-format or --without-manpage-format was given.
10156 if test "${with_manpage_format+set}" = set; then
10157   withval="$with_manpage_format"
10158   MANPAGE_FORMAT=$withval
10159 else
10160   MANPAGE_FORMAT=unknown
10161 fi;
10162
10163 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10164 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10165
10166 cf_unknown=
10167
10168 case $MANPAGE_FORMAT in
10169 unknown)
10170   if test -z "$MANPATH" ; then
10171     MANPATH="/usr/man:/usr/share/man"
10172   fi
10173
10174   # look for the 'date' man-page (it's most likely to be installed!)
10175   MANPAGE_FORMAT=
10176   cf_preform=no
10177   cf_catonly=yes
10178   cf_example=date
10179
10180   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10181   for cf_dir in $MANPATH; do
10182     test -z "$cf_dir" && cf_dir=/usr/man
10183     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
10184     do
10185       cf_test=`echo $cf_name | sed -e 's/*//'`
10186       if test "x$cf_test" = "x$cf_name" ; then
10187
10188         case "$cf_name" in
10189         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10190         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10191         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10192         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10193         esac
10194
10195         case "$cf_name" in
10196         $cf_dir/man*)
10197           cf_catonly=no
10198           ;;
10199         $cf_dir/cat*)
10200           cf_preform=yes
10201           ;;
10202         esac
10203         break
10204       fi
10205
10206       # if we found a match in either man* or cat*, stop looking
10207       if test -n "$MANPAGE_FORMAT" ; then
10208         cf_found=no
10209         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10210         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10211         case "$cf_name" in
10212         $cf_dir/cat*)
10213           cf_found=yes
10214           ;;
10215         esac
10216         test $cf_found=yes && break
10217       fi
10218     done
10219     # only check the first directory in $MANPATH where we find manpages
10220     if test -n "$MANPAGE_FORMAT" ; then
10221        break
10222     fi
10223   done
10224   # if we did not find the example, just assume it is normal
10225   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10226   IFS="$ac_save_ifs"
10227   ;;
10228 *)
10229   for cf_option in $MANPAGE_FORMAT; do
10230      case $cf_option in #(vi
10231      gzip|compress|BSDI|normal|formatted|catonly)
10232        ;;
10233      *)
10234        cf_unknown="$cf_unknown $cf_option"
10235        ;;
10236      esac
10237   done
10238   ;;
10239 esac
10240
10241 echo "$as_me:10241: result: $MANPAGE_FORMAT" >&5
10242 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10243 if test -n "$cf_unknown" ; then
10244   { echo "$as_me:10244: WARNING: Unexpected manpage-format $cf_unknown" >&5
10245 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10246 fi
10247
10248 echo "$as_me:10248: checking for manpage renaming" >&5
10249 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10250
10251 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10252 if test "${with_manpage_renames+set}" = set; then
10253   withval="$with_manpage_renames"
10254   MANPAGE_RENAMES=$withval
10255 else
10256   MANPAGE_RENAMES=yes
10257 fi;
10258
10259 case ".$MANPAGE_RENAMES" in #(vi
10260 .no) #(vi
10261   ;;
10262 .|.yes)
10263   # Debian 'man' program?
10264   if test -f /etc/debian_version ; then
10265     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10266   else
10267     MANPAGE_RENAMES=no
10268   fi
10269   ;;
10270 esac
10271
10272 if test "$MANPAGE_RENAMES" != no ; then
10273   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10274     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10275   elif test ! -f $MANPAGE_RENAMES ; then
10276     { { echo "$as_me:10276: error: not a filename: $MANPAGE_RENAMES" >&5
10277 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10278    { (exit 1); exit 1; }; }
10279   fi
10280
10281   test ! -d man && mkdir man
10282
10283   # Construct a sed-script to perform renaming within man-pages
10284   if test -n "$MANPAGE_RENAMES" ; then
10285     test ! -d man && mkdir man
10286     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10287   fi
10288 fi
10289
10290 echo "$as_me:10290: result: $MANPAGE_RENAMES" >&5
10291 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10292
10293 echo "$as_me:10293: checking if manpage aliases will be installed" >&5
10294 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10295
10296 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10297 if test "${with_manpage_aliases+set}" = set; then
10298   withval="$with_manpage_aliases"
10299   MANPAGE_ALIASES=$withval
10300 else
10301   MANPAGE_ALIASES=yes
10302 fi;
10303
10304 echo "$as_me:10304: result: $MANPAGE_ALIASES" >&5
10305 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10306
10307 case "x$LN_S" in #(vi
10308 xln*) #(vi
10309         cf_use_symlinks=yes
10310         ;;
10311 *)
10312         cf_use_symlinks=no
10313         ;;
10314 esac
10315
10316 MANPAGE_SYMLINKS=no
10317 if test "$MANPAGE_ALIASES" = yes ; then
10318 echo "$as_me:10318: checking if manpage symlinks should be used" >&5
10319 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10320
10321 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10322 if test "${with_manpage_symlinks+set}" = set; then
10323   withval="$with_manpage_symlinks"
10324   MANPAGE_SYMLINKS=$withval
10325 else
10326   MANPAGE_SYMLINKS=$cf_use_symlinks
10327 fi;
10328
10329 if test "$$cf_use_symlinks" = no; then
10330 if test "$MANPAGE_SYMLINKS" = yes ; then
10331         { echo "$as_me:10331: WARNING: cannot make symlinks" >&5
10332 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10333         MANPAGE_SYMLINKS=no
10334 fi
10335 fi
10336
10337 echo "$as_me:10337: result: $MANPAGE_SYMLINKS" >&5
10338 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10339 fi
10340
10341 echo "$as_me:10341: checking for manpage tbl" >&5
10342 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10343
10344 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10345 if test "${with_manpage_tbl+set}" = set; then
10346   withval="$with_manpage_tbl"
10347   MANPAGE_TBL=$withval
10348 else
10349   MANPAGE_TBL=no
10350 fi;
10351
10352 echo "$as_me:10352: result: $MANPAGE_TBL" >&5
10353 echo "${ECHO_T}$MANPAGE_TBL" >&6
10354
10355   if test "$prefix" = "NONE" ; then
10356      cf_prefix="$ac_default_prefix"
10357   else
10358      cf_prefix="$prefix"
10359   fi
10360
10361   case "$MANPAGE_FORMAT" in # (vi
10362   *catonly*) # (vi
10363     cf_format=yes
10364     cf_inboth=no
10365     ;;
10366   *formatted*) # (vi
10367     cf_format=yes
10368     cf_inboth=yes
10369     ;;
10370   *)
10371     cf_format=no
10372     cf_inboth=no
10373     ;;
10374   esac
10375
10376 test ! -d man && mkdir man
10377
10378 cf_so_strip=
10379 cf_compress=
10380 case "$MANPAGE_FORMAT" in #(vi
10381 *compress*) #(vi
10382         cf_so_strip="Z"
10383         cf_compress=compress
10384   ;;
10385 *gzip*)
10386         cf_so_strip="gz"
10387         cf_compress=gzip
10388   ;;
10389 esac
10390
10391 cf_edit_man=./edit_man.sh
10392 cf_man_alias=`pwd`/man_alias.sed
10393
10394 cat >$cf_edit_man <<CF_EOF
10395 #! /bin/sh
10396 # this script is generated by the configure-script CF_MAN_PAGES macro.
10397
10398 prefix="$cf_prefix"
10399 datadir="$datadir"
10400
10401 NCURSES_MAJOR="$NCURSES_MAJOR"
10402 NCURSES_MINOR="$NCURSES_MINOR"
10403 NCURSES_PATCH="$NCURSES_PATCH"
10404
10405 NCURSES_OSPEED="$NCURSES_OSPEED"
10406 TERMINFO="$TERMINFO"
10407
10408 INSTALL="$INSTALL"
10409 INSTALL_DATA="$INSTALL_DATA"
10410
10411 transform="$program_transform_name"
10412
10413 TMP=\${TMPDIR:=/tmp}/man\$\$
10414 trap "rm -f \$TMP" 0 1 2 5 15
10415
10416 form=\$1
10417 shift || exit 1
10418
10419 verb=\$1
10420 shift || exit 1
10421
10422 mandir=\$1
10423 shift || exit 1
10424
10425 srcdir=\$1
10426 top_srcdir=\$srcdir/..
10427 shift || exit 1
10428
10429 if test "\$form" = normal ; then
10430         if test "$cf_format" = yes ; then
10431         if test "$cf_inboth" = no ; then
10432                 sh \$0 format \$verb \$mandir \$srcdir \$*
10433                 exit $?
10434         fi
10435         fi
10436         cf_subdir=\$mandir/man
10437         cf_tables=$MANPAGE_TBL
10438 else
10439         cf_subdir=\$mandir/cat
10440         cf_tables=yes
10441 fi
10442
10443 # process the list of source-files
10444 for i in \$* ; do
10445 case \$i in #(vi
10446 *.orig|*.rej) ;; #(vi
10447 *.[0-9]*)
10448         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10449         if test \$verb = installing ; then
10450         if test ! -d \$cf_subdir\${section} ; then
10451                 mkdir -p \$cf_subdir\$section
10452         fi
10453         fi
10454
10455         # replace variables in man page
10456         if test ! -f $cf_man_alias ; then
10457 cat >>$cf_man_alias <<-CF_EOF2
10458                 s,@DATADIR@,\$datadir,g
10459                 s,@TERMINFO@,\$TERMINFO,g
10460                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10461                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10462                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10463                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10464 CF_EOF
10465
10466         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10467         do
10468                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10469                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10470 cat >>$cf_edit_man <<-CF_EOF
10471                 s,@$cf_NAME@,$cf_name,g
10472 CF_EOF
10473         done
10474
10475 cat >>$cf_edit_man <<CF_EOF
10476 CF_EOF2
10477                 echo "...made $cf_man_alias"
10478         fi
10479
10480         aliases=
10481         cf_source=\`basename \$i\`
10482         inalias=\$cf_source
10483         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10484         if test ! -f \$inalias ; then
10485                 echo .. skipped \$cf_source
10486                 continue
10487         fi
10488 CF_EOF
10489
10490 if test "$MANPAGE_ALIASES" != no ; then
10491 cat >>$cf_edit_man <<CF_EOF
10492         nCurses=ignore.3x
10493         test $with_curses_h = yes && nCurses=ncurses.3x
10494         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10495 CF_EOF
10496 fi
10497
10498 if test "$MANPAGE_RENAMES" = no ; then
10499 cat >>$cf_edit_man <<CF_EOF
10500         # perform program transformations for section 1 man pages
10501         if test \$section = 1 ; then
10502                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10503         else
10504                 cf_target=\$cf_subdir\${section}/\$cf_source
10505         fi
10506 CF_EOF
10507 else
10508 cat >>$cf_edit_man <<CF_EOF
10509         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10510         if test -z "\$cf_target" ; then
10511                 echo '? missing rename for '\$cf_source
10512                 cf_target="\$cf_source"
10513         fi
10514         cf_target="\$cf_subdir\${section}/\${cf_target}"
10515
10516 CF_EOF
10517 fi
10518
10519 cat >>$cf_edit_man <<CF_EOF
10520         sed     -f $cf_man_alias \\
10521 CF_EOF
10522
10523 if test -f $MANPAGE_RENAMES ; then
10524 cat >>$cf_edit_man <<CF_EOF
10525                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10526 CF_EOF
10527 else
10528 cat >>$cf_edit_man <<CF_EOF
10529                 < \$i >\$TMP
10530 CF_EOF
10531 fi
10532
10533 cat >>$cf_edit_man <<CF_EOF
10534 if test \$cf_tables = yes ; then
10535         tbl \$TMP >\$TMP.out
10536         mv \$TMP.out \$TMP
10537 fi
10538 CF_EOF
10539
10540 if test $with_overwrite != yes ; then
10541 cat >>$cf_edit_man <<CF_EOF
10542         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10543         mv \$TMP.out \$TMP
10544 CF_EOF
10545 fi
10546
10547 if test $with_curses_h != yes ; then
10548 cat >>$cf_edit_man <<CF_EOF
10549         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10550         mv \$TMP.out \$TMP
10551 CF_EOF
10552 fi
10553
10554 cat >>$cf_edit_man <<CF_EOF
10555         if test \$form = format ; then
10556                 nroff -man \$TMP >\$TMP.out
10557                 mv \$TMP.out \$TMP
10558         fi
10559 CF_EOF
10560
10561 if test -n "$cf_compress" ; then
10562 cat >>$cf_edit_man <<CF_EOF
10563         if test \$verb = installing ; then
10564         if ( $cf_compress -f \$TMP )
10565         then
10566                 mv \$TMP.$cf_so_strip \$TMP
10567         fi
10568         fi
10569         cf_target="\$cf_target.$cf_so_strip"
10570 CF_EOF
10571 fi
10572
10573 case "$MANPAGE_FORMAT" in #(vi
10574 *BSDI*)
10575 cat >>$cf_edit_man <<CF_EOF
10576         if test \$form = format ; then
10577                 # BSDI installs only .0 suffixes in the cat directories
10578                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10579         fi
10580 CF_EOF
10581   ;;
10582 esac
10583
10584 cat >>$cf_edit_man <<CF_EOF
10585         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10586         if test \$verb = installing ; then
10587                 echo \$verb \$cf_target
10588                 \$INSTALL_DATA \$TMP \$cf_target
10589                 test -d \$cf_subdir\${section} &&
10590                 test -n "\$aliases" && (
10591                         cd \$cf_subdir\${section} && (
10592                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10593                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10594                                 cf_target=\`basename \$cf_target\`
10595                                 for cf_alias in \$aliases
10596                                 do
10597                                         if test \$section = 1 ; then
10598                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10599                                         fi
10600
10601                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10602                                                 if test -f \$cf_alias\${suffix} ; then
10603                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10604                                                         then
10605                                                                 continue
10606                                                         fi
10607                                                 fi
10608                                                 echo .. \$verb alias \$cf_alias\${suffix}
10609 CF_EOF
10610 case "x$LN_S" in #(vi
10611 *-f) #(vi
10612 cat >>$cf_edit_man <<CF_EOF
10613                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10614 CF_EOF
10615         ;;
10616 *)
10617 cat >>$cf_edit_man <<CF_EOF
10618                                                 rm -f \$cf_alias\${suffix}
10619                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10620 CF_EOF
10621         ;;
10622 esac
10623 cat >>$cf_edit_man <<CF_EOF
10624                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10625                                                 echo ".so \$cf_source" >\$TMP
10626 CF_EOF
10627 if test -n "$cf_compress" ; then
10628 cat >>$cf_edit_man <<CF_EOF
10629                                                 if test -n "$cf_so_strip" ; then
10630                                                         $cf_compress -f \$TMP
10631                                                         mv \$TMP.$cf_so_strip \$TMP
10632                                                 fi
10633 CF_EOF
10634 fi
10635 cat >>$cf_edit_man <<CF_EOF
10636                                                 echo .. \$verb alias \$cf_alias\${suffix}
10637                                                 rm -f \$cf_alias\${suffix}
10638                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10639                                         fi
10640                                 done
10641                         )
10642                 )
10643         elif test \$verb = removing ; then
10644                 test -f \$cf_target && (
10645                         echo \$verb \$cf_target
10646                         rm -f \$cf_target
10647                 )
10648                 test -d \$cf_subdir\${section} &&
10649                 test -n "\$aliases" && (
10650                         cd \$cf_subdir\${section} && (
10651                                 for cf_alias in \$aliases
10652                                 do
10653                                         if test \$section = 1 ; then
10654                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10655                                         fi
10656
10657                                         echo .. \$verb alias \$cf_alias\${suffix}
10658                                         rm -f \$cf_alias\${suffix}
10659                                 done
10660                         )
10661                 )
10662         else
10663 #               echo ".hy 0"
10664                 cat \$TMP
10665         fi
10666         ;;
10667 esac
10668 done
10669
10670 if test $cf_inboth = yes ; then
10671 if test \$form != format ; then
10672         sh \$0 format \$verb \$mandir \$srcdir \$*
10673 fi
10674 fi
10675
10676 exit 0
10677 CF_EOF
10678 chmod 755 $cf_edit_man
10679
10680 ###############################################################################
10681
10682 ### Note that some functions (such as const) are normally disabled anyway.
10683 echo "$as_me:10683: checking if you want to build with function extensions" >&5
10684 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10685
10686 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10687 if test "${enable_ext_funcs+set}" = set; then
10688   enableval="$enable_ext_funcs"
10689   with_ext_funcs=$enableval
10690 else
10691   with_ext_funcs=yes
10692 fi;
10693 echo "$as_me:10693: result: $with_ext_funcs" >&5
10694 echo "${ECHO_T}$with_ext_funcs" >&6
10695 if test "$with_ext_funcs" = yes ; then
10696         NCURSES_EXT_FUNCS=1
10697         cat >>confdefs.h <<\EOF
10698 #define HAVE_ASSUME_DEFAULT_COLORS 1
10699 EOF
10700
10701         cat >>confdefs.h <<\EOF
10702 #define HAVE_CURSES_VERSION 1
10703 EOF
10704
10705         cat >>confdefs.h <<\EOF
10706 #define HAVE_HAS_KEY 1
10707 EOF
10708
10709         cat >>confdefs.h <<\EOF
10710 #define HAVE_RESIZETERM 1
10711 EOF
10712
10713         cat >>confdefs.h <<\EOF
10714 #define HAVE_RESIZE_TERM 1
10715 EOF
10716
10717         cat >>confdefs.h <<\EOF
10718 #define HAVE_TERM_ENTRY_H 1
10719 EOF
10720
10721         cat >>confdefs.h <<\EOF
10722 #define HAVE_USE_DEFAULT_COLORS 1
10723 EOF
10724
10725         cat >>confdefs.h <<\EOF
10726 #define HAVE_USE_SCREEN 1
10727 EOF
10728
10729         cat >>confdefs.h <<\EOF
10730 #define HAVE_USE_WINDOW 1
10731 EOF
10732
10733         cat >>confdefs.h <<\EOF
10734 #define HAVE_WRESIZE 1
10735 EOF
10736
10737         cat >>confdefs.h <<\EOF
10738 #define NCURSES_EXT_FUNCS 1
10739 EOF
10740
10741         GENERATED_EXT_FUNCS=generated
10742 else
10743         NCURSES_EXT_FUNCS=0
10744         GENERATED_EXT_FUNCS=
10745 fi
10746
10747 echo "$as_me:10747: checking if you want to build with experimental SCREEN extensions" >&5
10748 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10749
10750 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10751 if test "${enable_sp_funcs+set}" = set; then
10752   enableval="$enable_sp_funcs"
10753   with_sp_funcs=$enableval
10754 else
10755   with_sp_funcs=no
10756 fi;
10757 echo "$as_me:10757: result: $with_sp_funcs" >&5
10758 echo "${ECHO_T}$with_sp_funcs" >&6
10759 if test "$with_sp_funcs" = yes ; then
10760         NCURSES_SP_FUNCS=1
10761         cat >>confdefs.h <<\EOF
10762 #define NCURSES_SP_FUNCS 1
10763 EOF
10764
10765         GENERATED_SP_FUNCS=generated
10766 else
10767         NCURSES_SP_FUNCS=0
10768         GENERATED_SP_FUNCS=
10769 fi
10770
10771 echo "$as_me:10771: checking if you want to build with experimental terminal-driver" >&5
10772 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10773
10774 # Check whether --enable-term-driver or --disable-term-driver was given.
10775 if test "${enable_term_driver+set}" = set; then
10776   enableval="$enable_term_driver"
10777   with_term_driver=$enableval
10778 else
10779   with_term_driver=no
10780 fi;
10781 echo "$as_me:10781: result: $with_term_driver" >&5
10782 echo "${ECHO_T}$with_term_driver" >&6
10783 if test "$with_term_driver" = yes ; then
10784         cat >>confdefs.h <<\EOF
10785 #define USE_TERM_DRIVER 1
10786 EOF
10787
10788         if test "$with_sp_funcs" != yes ; then
10789                 { { echo "$as_me:10789: error: The term-driver option relies upon sp-funcs" >&5
10790 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10791    { (exit 1); exit 1; }; }
10792         fi
10793 fi
10794
10795 ###   use option --enable-const to turn on use of const beyond that in XSI.
10796 echo "$as_me:10796: checking for extended use of const keyword" >&5
10797 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10798
10799 # Check whether --enable-const or --disable-const was given.
10800 if test "${enable_const+set}" = set; then
10801   enableval="$enable_const"
10802   with_ext_const=$enableval
10803 else
10804   with_ext_const=no
10805 fi;
10806 echo "$as_me:10806: result: $with_ext_const" >&5
10807 echo "${ECHO_T}$with_ext_const" >&6
10808 NCURSES_CONST='/*nothing*/'
10809 if test "$with_ext_const" = yes ; then
10810         NCURSES_CONST=const
10811 fi
10812
10813 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10814 echo "$as_me:10814: checking if you want to use extended colors" >&5
10815 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10816
10817 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10818 if test "${enable_ext_colors+set}" = set; then
10819   enableval="$enable_ext_colors"
10820   with_ext_colors=$enableval
10821 else
10822   with_ext_colors=no
10823 fi;
10824 echo "$as_me:10824: result: $with_ext_colors" >&5
10825 echo "${ECHO_T}$with_ext_colors" >&6
10826 NCURSES_EXT_COLORS=0
10827 if test "$with_ext_colors" = yes ; then
10828         if test "$with_widec" != yes ; then
10829                 { { echo "$as_me:10829: error: This option applies only to wide-character library" >&5
10830 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10831    { (exit 1); exit 1; }; }
10832         else
10833                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10834
10835 if test "${with_abi_version+set}" != set; then
10836         case $cf_cv_rel_version in
10837         5.*)
10838                 cf_cv_rel_version=6.0
10839                 cf_cv_abi_version=6
10840                 { echo "$as_me:10840: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10841 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10842                 ;;
10843         esac
10844 fi
10845
10846         fi
10847         NCURSES_EXT_COLORS=1
10848         cat >>confdefs.h <<\EOF
10849 #define NCURSES_EXT_COLORS 1
10850 EOF
10851
10852 fi
10853
10854 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10855 echo "$as_me:10855: checking if you want to use extended mouse encoding" >&5
10856 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10857
10858 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10859 if test "${enable_ext_mouse+set}" = set; then
10860   enableval="$enable_ext_mouse"
10861   with_ext_mouse=$enableval
10862 else
10863   with_ext_mouse=no
10864 fi;
10865 echo "$as_me:10865: result: $with_ext_mouse" >&5
10866 echo "${ECHO_T}$with_ext_mouse" >&6
10867 NCURSES_MOUSE_VERSION=1
10868 if test "$with_ext_mouse" = yes ; then
10869         NCURSES_MOUSE_VERSION=2
10870
10871 if test "${with_abi_version+set}" != set; then
10872         case $cf_cv_rel_version in
10873         5.*)
10874                 cf_cv_rel_version=6.0
10875                 cf_cv_abi_version=6
10876                 { echo "$as_me:10876: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10877 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10878                 ;;
10879         esac
10880 fi
10881
10882 fi
10883
10884 echo "$as_me:10884: checking if you want \$NCURSES_NO_PADDING code" >&5
10885 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10886
10887 # Check whether --enable-no-padding or --disable-no-padding was given.
10888 if test "${enable_no_padding+set}" = set; then
10889   enableval="$enable_no_padding"
10890   with_no_padding=$enableval
10891 else
10892   with_no_padding=$with_ext_funcs
10893 fi;
10894 echo "$as_me:10894: result: $with_no_padding" >&5
10895 echo "${ECHO_T}$with_no_padding" >&6
10896 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10897 #define NCURSES_NO_PADDING 1
10898 EOF
10899
10900 echo "$as_me:10900: checking for ANSI C header files" >&5
10901 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10902 if test "${ac_cv_header_stdc+set}" = set; then
10903   echo $ECHO_N "(cached) $ECHO_C" >&6
10904 else
10905   cat >conftest.$ac_ext <<_ACEOF
10906 #line 10906 "configure"
10907 #include "confdefs.h"
10908 #include <stdlib.h>
10909 #include <stdarg.h>
10910 #include <string.h>
10911 #include <float.h>
10912
10913 _ACEOF
10914 if { (eval echo "$as_me:10914: \"$ac_cpp conftest.$ac_ext\"") >&5
10915   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10916   ac_status=$?
10917   egrep -v '^ *\+' conftest.er1 >conftest.err
10918   rm -f conftest.er1
10919   cat conftest.err >&5
10920   echo "$as_me:10920: \$? = $ac_status" >&5
10921   (exit $ac_status); } >/dev/null; then
10922   if test -s conftest.err; then
10923     ac_cpp_err=$ac_c_preproc_warn_flag
10924   else
10925     ac_cpp_err=
10926   fi
10927 else
10928   ac_cpp_err=yes
10929 fi
10930 if test -z "$ac_cpp_err"; then
10931   ac_cv_header_stdc=yes
10932 else
10933   echo "$as_me: failed program was:" >&5
10934   cat conftest.$ac_ext >&5
10935   ac_cv_header_stdc=no
10936 fi
10937 rm -f conftest.err conftest.$ac_ext
10938
10939 if test $ac_cv_header_stdc = yes; then
10940   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10941   cat >conftest.$ac_ext <<_ACEOF
10942 #line 10942 "configure"
10943 #include "confdefs.h"
10944 #include <string.h>
10945
10946 _ACEOF
10947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10948   egrep "memchr" >/dev/null 2>&1; then
10949   :
10950 else
10951   ac_cv_header_stdc=no
10952 fi
10953 rm -rf conftest*
10954
10955 fi
10956
10957 if test $ac_cv_header_stdc = yes; then
10958   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10959   cat >conftest.$ac_ext <<_ACEOF
10960 #line 10960 "configure"
10961 #include "confdefs.h"
10962 #include <stdlib.h>
10963
10964 _ACEOF
10965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10966   egrep "free" >/dev/null 2>&1; then
10967   :
10968 else
10969   ac_cv_header_stdc=no
10970 fi
10971 rm -rf conftest*
10972
10973 fi
10974
10975 if test $ac_cv_header_stdc = yes; then
10976   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10977   if test "$cross_compiling" = yes; then
10978   :
10979 else
10980   cat >conftest.$ac_ext <<_ACEOF
10981 #line 10981 "configure"
10982 #include "confdefs.h"
10983 #include <ctype.h>
10984 #if ((' ' & 0x0FF) == 0x020)
10985 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10986 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10987 #else
10988 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10989                      || ('j' <= (c) && (c) <= 'r') \
10990                      || ('s' <= (c) && (c) <= 'z'))
10991 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10992 #endif
10993
10994 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10995 int
10996 main ()
10997 {
10998   int i;
10999   for (i = 0; i < 256; i++)
11000     if (XOR (islower (i), ISLOWER (i))
11001         || toupper (i) != TOUPPER (i))
11002       $ac_main_return(2);
11003   $ac_main_return (0);
11004 }
11005 _ACEOF
11006 rm -f conftest$ac_exeext
11007 if { (eval echo "$as_me:11007: \"$ac_link\"") >&5
11008   (eval $ac_link) 2>&5
11009   ac_status=$?
11010   echo "$as_me:11010: \$? = $ac_status" >&5
11011   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11012   { (eval echo "$as_me:11012: \"$ac_try\"") >&5
11013   (eval $ac_try) 2>&5
11014   ac_status=$?
11015   echo "$as_me:11015: \$? = $ac_status" >&5
11016   (exit $ac_status); }; }; then
11017   :
11018 else
11019   echo "$as_me: program exited with status $ac_status" >&5
11020 echo "$as_me: failed program was:" >&5
11021 cat conftest.$ac_ext >&5
11022 ac_cv_header_stdc=no
11023 fi
11024 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11025 fi
11026 fi
11027 fi
11028 echo "$as_me:11028: result: $ac_cv_header_stdc" >&5
11029 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11030 if test $ac_cv_header_stdc = yes; then
11031
11032 cat >>confdefs.h <<\EOF
11033 #define STDC_HEADERS 1
11034 EOF
11035
11036 fi
11037
11038 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11039
11040 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11041                   inttypes.h stdint.h unistd.h
11042 do
11043 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11044 echo "$as_me:11044: checking for $ac_header" >&5
11045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11047   echo $ECHO_N "(cached) $ECHO_C" >&6
11048 else
11049   cat >conftest.$ac_ext <<_ACEOF
11050 #line 11050 "configure"
11051 #include "confdefs.h"
11052 $ac_includes_default
11053 #include <$ac_header>
11054 _ACEOF
11055 rm -f conftest.$ac_objext
11056 if { (eval echo "$as_me:11056: \"$ac_compile\"") >&5
11057   (eval $ac_compile) 2>&5
11058   ac_status=$?
11059   echo "$as_me:11059: \$? = $ac_status" >&5
11060   (exit $ac_status); } &&
11061          { ac_try='test -s conftest.$ac_objext'
11062   { (eval echo "$as_me:11062: \"$ac_try\"") >&5
11063   (eval $ac_try) 2>&5
11064   ac_status=$?
11065   echo "$as_me:11065: \$? = $ac_status" >&5
11066   (exit $ac_status); }; }; then
11067   eval "$as_ac_Header=yes"
11068 else
11069   echo "$as_me: failed program was:" >&5
11070 cat conftest.$ac_ext >&5
11071 eval "$as_ac_Header=no"
11072 fi
11073 rm -f conftest.$ac_objext conftest.$ac_ext
11074 fi
11075 echo "$as_me:11075: result: `eval echo '${'$as_ac_Header'}'`" >&5
11076 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11077 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11078   cat >>confdefs.h <<EOF
11079 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11080 EOF
11081
11082 fi
11083 done
11084
11085 echo "$as_me:11085: checking for signed char" >&5
11086 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11087 if test "${ac_cv_type_signed_char+set}" = set; then
11088   echo $ECHO_N "(cached) $ECHO_C" >&6
11089 else
11090   cat >conftest.$ac_ext <<_ACEOF
11091 #line 11091 "configure"
11092 #include "confdefs.h"
11093 $ac_includes_default
11094 int
11095 main ()
11096 {
11097 if ((signed char *) 0)
11098   return 0;
11099 if (sizeof (signed char))
11100   return 0;
11101   ;
11102   return 0;
11103 }
11104 _ACEOF
11105 rm -f conftest.$ac_objext
11106 if { (eval echo "$as_me:11106: \"$ac_compile\"") >&5
11107   (eval $ac_compile) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); } &&
11111          { ac_try='test -s conftest.$ac_objext'
11112   { (eval echo "$as_me:11112: \"$ac_try\"") >&5
11113   (eval $ac_try) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); }; }; then
11117   ac_cv_type_signed_char=yes
11118 else
11119   echo "$as_me: failed program was:" >&5
11120 cat conftest.$ac_ext >&5
11121 ac_cv_type_signed_char=no
11122 fi
11123 rm -f conftest.$ac_objext conftest.$ac_ext
11124 fi
11125 echo "$as_me:11125: result: $ac_cv_type_signed_char" >&5
11126 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11127
11128 echo "$as_me:11128: checking size of signed char" >&5
11129 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11130 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11131   echo $ECHO_N "(cached) $ECHO_C" >&6
11132 else
11133   if test "$ac_cv_type_signed_char" = yes; then
11134   if test "$cross_compiling" = yes; then
11135   # Depending upon the size, compute the lo and hi bounds.
11136 cat >conftest.$ac_ext <<_ACEOF
11137 #line 11137 "configure"
11138 #include "confdefs.h"
11139 $ac_includes_default
11140 int
11141 main ()
11142 {
11143 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11144   ;
11145   return 0;
11146 }
11147 _ACEOF
11148 rm -f conftest.$ac_objext
11149 if { (eval echo "$as_me:11149: \"$ac_compile\"") >&5
11150   (eval $ac_compile) 2>&5
11151   ac_status=$?
11152   echo "$as_me:11152: \$? = $ac_status" >&5
11153   (exit $ac_status); } &&
11154          { ac_try='test -s conftest.$ac_objext'
11155   { (eval echo "$as_me:11155: \"$ac_try\"") >&5
11156   (eval $ac_try) 2>&5
11157   ac_status=$?
11158   echo "$as_me:11158: \$? = $ac_status" >&5
11159   (exit $ac_status); }; }; then
11160   ac_lo=0 ac_mid=0
11161   while :; do
11162     cat >conftest.$ac_ext <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11165 $ac_includes_default
11166 int
11167 main ()
11168 {
11169 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11170   ;
11171   return 0;
11172 }
11173 _ACEOF
11174 rm -f conftest.$ac_objext
11175 if { (eval echo "$as_me:11175: \"$ac_compile\"") >&5
11176   (eval $ac_compile) 2>&5
11177   ac_status=$?
11178   echo "$as_me:11178: \$? = $ac_status" >&5
11179   (exit $ac_status); } &&
11180          { ac_try='test -s conftest.$ac_objext'
11181   { (eval echo "$as_me:11181: \"$ac_try\"") >&5
11182   (eval $ac_try) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); }; }; then
11186   ac_hi=$ac_mid; break
11187 else
11188   echo "$as_me: failed program was:" >&5
11189 cat conftest.$ac_ext >&5
11190 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11191 fi
11192 rm -f conftest.$ac_objext conftest.$ac_ext
11193   done
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat conftest.$ac_ext >&5
11197 ac_hi=-1 ac_mid=-1
11198   while :; do
11199     cat >conftest.$ac_ext <<_ACEOF
11200 #line 11200 "configure"
11201 #include "confdefs.h"
11202 $ac_includes_default
11203 int
11204 main ()
11205 {
11206 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11207   ;
11208   return 0;
11209 }
11210 _ACEOF
11211 rm -f conftest.$ac_objext
11212 if { (eval echo "$as_me:11212: \"$ac_compile\"") >&5
11213   (eval $ac_compile) 2>&5
11214   ac_status=$?
11215   echo "$as_me:11215: \$? = $ac_status" >&5
11216   (exit $ac_status); } &&
11217          { ac_try='test -s conftest.$ac_objext'
11218   { (eval echo "$as_me:11218: \"$ac_try\"") >&5
11219   (eval $ac_try) 2>&5
11220   ac_status=$?
11221   echo "$as_me:11221: \$? = $ac_status" >&5
11222   (exit $ac_status); }; }; then
11223   ac_lo=$ac_mid; break
11224 else
11225   echo "$as_me: failed program was:" >&5
11226 cat conftest.$ac_ext >&5
11227 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11228 fi
11229 rm -f conftest.$ac_objext conftest.$ac_ext
11230   done
11231 fi
11232 rm -f conftest.$ac_objext conftest.$ac_ext
11233 # Binary search between lo and hi bounds.
11234 while test "x$ac_lo" != "x$ac_hi"; do
11235   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11236   cat >conftest.$ac_ext <<_ACEOF
11237 #line 11237 "configure"
11238 #include "confdefs.h"
11239 $ac_includes_default
11240 int
11241 main ()
11242 {
11243 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11244   ;
11245   return 0;
11246 }
11247 _ACEOF
11248 rm -f conftest.$ac_objext
11249 if { (eval echo "$as_me:11249: \"$ac_compile\"") >&5
11250   (eval $ac_compile) 2>&5
11251   ac_status=$?
11252   echo "$as_me:11252: \$? = $ac_status" >&5
11253   (exit $ac_status); } &&
11254          { ac_try='test -s conftest.$ac_objext'
11255   { (eval echo "$as_me:11255: \"$ac_try\"") >&5
11256   (eval $ac_try) 2>&5
11257   ac_status=$?
11258   echo "$as_me:11258: \$? = $ac_status" >&5
11259   (exit $ac_status); }; }; then
11260   ac_hi=$ac_mid
11261 else
11262   echo "$as_me: failed program was:" >&5
11263 cat conftest.$ac_ext >&5
11264 ac_lo=`expr $ac_mid + 1`
11265 fi
11266 rm -f conftest.$ac_objext conftest.$ac_ext
11267 done
11268 ac_cv_sizeof_signed_char=$ac_lo
11269 else
11270   if test "$cross_compiling" = yes; then
11271   { { echo "$as_me:11271: error: cannot run test program while cross compiling" >&5
11272 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11273    { (exit 1); exit 1; }; }
11274 else
11275   cat >conftest.$ac_ext <<_ACEOF
11276 #line 11276 "configure"
11277 #include "confdefs.h"
11278 $ac_includes_default
11279 int
11280 main ()
11281 {
11282 FILE *f = fopen ("conftest.val", "w");
11283 if (!f)
11284   $ac_main_return (1);
11285 fprintf (f, "%d", (sizeof (signed char)));
11286 fclose (f);
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 rm -f conftest$ac_exeext
11292 if { (eval echo "$as_me:11292: \"$ac_link\"") >&5
11293   (eval $ac_link) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11297   { (eval echo "$as_me:11297: \"$ac_try\"") >&5
11298   (eval $ac_try) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); }; }; then
11302   ac_cv_sizeof_signed_char=`cat conftest.val`
11303 else
11304   echo "$as_me: program exited with status $ac_status" >&5
11305 echo "$as_me: failed program was:" >&5
11306 cat conftest.$ac_ext >&5
11307 fi
11308 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11309 fi
11310 fi
11311 rm -f conftest.val
11312 else
11313   ac_cv_sizeof_signed_char=0
11314 fi
11315 fi
11316 echo "$as_me:11316: result: $ac_cv_sizeof_signed_char" >&5
11317 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11318 cat >>confdefs.h <<EOF
11319 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11320 EOF
11321
11322 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11323         NCURSES_SBOOL="signed char"
11324 else
11325         NCURSES_SBOOL="char"
11326 fi
11327 echo "$as_me:11327: checking if you want to use signed Boolean array in term.h" >&5
11328 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11329
11330 # Check whether --enable-signed-char or --disable-signed-char was given.
11331 if test "${enable_signed_char+set}" = set; then
11332   enableval="$enable_signed_char"
11333   with_signed_char=$enableval
11334 else
11335   with_signed_char=no
11336 fi;
11337 echo "$as_me:11337: result: $with_signed_char" >&5
11338 echo "${ECHO_T}$with_signed_char" >&6
11339 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11340
11341 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11342 echo "$as_me:11342: checking if you want SIGWINCH handler" >&5
11343 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11344
11345 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11346 if test "${enable_sigwinch+set}" = set; then
11347   enableval="$enable_sigwinch"
11348   with_sigwinch=$enableval
11349 else
11350   with_sigwinch=$with_ext_funcs
11351 fi;
11352 echo "$as_me:11352: result: $with_sigwinch" >&5
11353 echo "${ECHO_T}$with_sigwinch" >&6
11354 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11355 #define USE_SIGWINCH 1
11356 EOF
11357
11358 ###   use option --enable-tcap-names to allow user to define new capabilities
11359 echo "$as_me:11359: checking if you want user-definable terminal capabilities like termcap" >&5
11360 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11361
11362 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11363 if test "${enable_tcap_names+set}" = set; then
11364   enableval="$enable_tcap_names"
11365   with_tcap_names=$enableval
11366 else
11367   with_tcap_names=$with_ext_funcs
11368 fi;
11369 echo "$as_me:11369: result: $with_tcap_names" >&5
11370 echo "${ECHO_T}$with_tcap_names" >&6
11371 NCURSES_XNAMES=0
11372 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11373
11374 ###############################################################################
11375 # These options are relatively safe to experiment with.
11376
11377 echo "$as_me:11377: checking if you want all development code" >&5
11378 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11379
11380 # Check whether --with-develop or --without-develop was given.
11381 if test "${with_develop+set}" = set; then
11382   withval="$with_develop"
11383   with_develop=$withval
11384 else
11385   with_develop=no
11386 fi;
11387 echo "$as_me:11387: result: $with_develop" >&5
11388 echo "${ECHO_T}$with_develop" >&6
11389
11390 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11391 echo "$as_me:11391: checking if you want hard-tabs code" >&5
11392 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11393
11394 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11395 if test "${enable_hard_tabs+set}" = set; then
11396   enableval="$enable_hard_tabs"
11397
11398 else
11399   enable_hard_tabs=$with_develop
11400 fi;
11401 echo "$as_me:11401: result: $enable_hard_tabs" >&5
11402 echo "${ECHO_T}$enable_hard_tabs" >&6
11403 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11404 #define USE_HARD_TABS 1
11405 EOF
11406
11407 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11408 echo "$as_me:11408: checking if you want limited support for xmc" >&5
11409 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11410
11411 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11412 if test "${enable_xmc_glitch+set}" = set; then
11413   enableval="$enable_xmc_glitch"
11414
11415 else
11416   enable_xmc_glitch=$with_develop
11417 fi;
11418 echo "$as_me:11418: result: $enable_xmc_glitch" >&5
11419 echo "${ECHO_T}$enable_xmc_glitch" >&6
11420 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11421 #define USE_XMC_SUPPORT 1
11422 EOF
11423
11424 ###############################################################################
11425 # These are just experimental, probably should not be in a package:
11426
11427 echo "$as_me:11427: checking if you do not want to assume colors are white-on-black" >&5
11428 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11429
11430 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11431 if test "${enable_assumed_color+set}" = set; then
11432   enableval="$enable_assumed_color"
11433   with_assumed_color=$enableval
11434 else
11435   with_assumed_color=yes
11436 fi;
11437 echo "$as_me:11437: result: $with_assumed_color" >&5
11438 echo "${ECHO_T}$with_assumed_color" >&6
11439 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11440 #define USE_ASSUMED_COLOR 1
11441 EOF
11442
11443 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11444 echo "$as_me:11444: checking if you want hashmap scrolling-optimization code" >&5
11445 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11446
11447 # Check whether --enable-hashmap or --disable-hashmap was given.
11448 if test "${enable_hashmap+set}" = set; then
11449   enableval="$enable_hashmap"
11450   with_hashmap=$enableval
11451 else
11452   with_hashmap=yes
11453 fi;
11454 echo "$as_me:11454: result: $with_hashmap" >&5
11455 echo "${ECHO_T}$with_hashmap" >&6
11456 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11457 #define USE_HASHMAP 1
11458 EOF
11459
11460 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11461 echo "$as_me:11461: checking if you want colorfgbg code" >&5
11462 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11463
11464 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11465 if test "${enable_colorfgbg+set}" = set; then
11466   enableval="$enable_colorfgbg"
11467   with_colorfgbg=$enableval
11468 else
11469   with_colorfgbg=no
11470 fi;
11471 echo "$as_me:11471: result: $with_colorfgbg" >&5
11472 echo "${ECHO_T}$with_colorfgbg" >&6
11473 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11474 #define USE_COLORFGBG 1
11475 EOF
11476
11477 ###   use option --enable-interop to turn on use of bindings used for interop
11478 echo "$as_me:11478: checking if you want interop bindings" >&5
11479 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11480
11481 # Check whether --enable-interop or --disable-interop was given.
11482 if test "${enable_interop+set}" = set; then
11483   enableval="$enable_interop"
11484   with_exp_interop=$enableval
11485 else
11486   with_exp_interop=no
11487 fi;
11488 echo "$as_me:11488: result: $with_exp_interop" >&5
11489 echo "${ECHO_T}$with_exp_interop" >&6
11490
11491 NCURSES_INTEROP_FUNCS=0
11492 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11493
11494 # This is still experimental (20080329), but should ultimately be moved to
11495 # the script-block --with-normal, etc.
11496
11497 echo "$as_me:11497: checking if you want to link with the pthread library" >&5
11498 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11499
11500 # Check whether --with-pthread or --without-pthread was given.
11501 if test "${with_pthread+set}" = set; then
11502   withval="$with_pthread"
11503   with_pthread=$withval
11504 else
11505   with_pthread=no
11506 fi;
11507 echo "$as_me:11507: result: $with_pthread" >&5
11508 echo "${ECHO_T}$with_pthread" >&6
11509
11510 if test "$with_pthread" != no ; then
11511     echo "$as_me:11511: checking for pthread.h" >&5
11512 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11513 if test "${ac_cv_header_pthread_h+set}" = set; then
11514   echo $ECHO_N "(cached) $ECHO_C" >&6
11515 else
11516   cat >conftest.$ac_ext <<_ACEOF
11517 #line 11517 "configure"
11518 #include "confdefs.h"
11519 #include <pthread.h>
11520 _ACEOF
11521 if { (eval echo "$as_me:11521: \"$ac_cpp conftest.$ac_ext\"") >&5
11522   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11523   ac_status=$?
11524   egrep -v '^ *\+' conftest.er1 >conftest.err
11525   rm -f conftest.er1
11526   cat conftest.err >&5
11527   echo "$as_me:11527: \$? = $ac_status" >&5
11528   (exit $ac_status); } >/dev/null; then
11529   if test -s conftest.err; then
11530     ac_cpp_err=$ac_c_preproc_warn_flag
11531   else
11532     ac_cpp_err=
11533   fi
11534 else
11535   ac_cpp_err=yes
11536 fi
11537 if test -z "$ac_cpp_err"; then
11538   ac_cv_header_pthread_h=yes
11539 else
11540   echo "$as_me: failed program was:" >&5
11541   cat conftest.$ac_ext >&5
11542   ac_cv_header_pthread_h=no
11543 fi
11544 rm -f conftest.err conftest.$ac_ext
11545 fi
11546 echo "$as_me:11546: result: $ac_cv_header_pthread_h" >&5
11547 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11548 if test $ac_cv_header_pthread_h = yes; then
11549
11550         cat >>confdefs.h <<\EOF
11551 #define HAVE_PTHREADS_H 1
11552 EOF
11553
11554         for cf_lib_pthread in pthread c_r
11555         do
11556             echo "$as_me:11556: checking if we can link with the $cf_lib_pthread library" >&5
11557 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11558             cf_save_LIBS="$LIBS"
11559             LIBS="-l$cf_lib_pthread $LIBS"
11560             cat >conftest.$ac_ext <<_ACEOF
11561 #line 11561 "configure"
11562 #include "confdefs.h"
11563
11564 #include <pthread.h>
11565
11566 int
11567 main ()
11568 {
11569
11570                 int rc = pthread_create(0,0,0,0);
11571                 int r2 = pthread_mutexattr_settype(0, 0);
11572
11573   ;
11574   return 0;
11575 }
11576 _ACEOF
11577 rm -f conftest.$ac_objext conftest$ac_exeext
11578 if { (eval echo "$as_me:11578: \"$ac_link\"") >&5
11579   (eval $ac_link) 2>&5
11580   ac_status=$?
11581   echo "$as_me:11581: \$? = $ac_status" >&5
11582   (exit $ac_status); } &&
11583          { ac_try='test -s conftest$ac_exeext'
11584   { (eval echo "$as_me:11584: \"$ac_try\"") >&5
11585   (eval $ac_try) 2>&5
11586   ac_status=$?
11587   echo "$as_me:11587: \$? = $ac_status" >&5
11588   (exit $ac_status); }; }; then
11589   with_pthread=yes
11590 else
11591   echo "$as_me: failed program was:" >&5
11592 cat conftest.$ac_ext >&5
11593 with_pthread=no
11594 fi
11595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11596             LIBS="$cf_save_LIBS"
11597             echo "$as_me:11597: result: $with_pthread" >&5
11598 echo "${ECHO_T}$with_pthread" >&6
11599             test "$with_pthread" = yes && break
11600         done
11601
11602         if test "$with_pthread" = yes ; then
11603             LIBS="-l$cf_lib_pthread $LIBS"
11604             cat >>confdefs.h <<\EOF
11605 #define HAVE_LIBPTHREADS 1
11606 EOF
11607
11608         else
11609             { { echo "$as_me:11609: error: Cannot link with pthread library" >&5
11610 echo "$as_me: error: Cannot link with pthread library" >&2;}
11611    { (exit 1); exit 1; }; }
11612         fi
11613
11614 fi
11615
11616 fi
11617
11618 if test "x$with_pthread" != xno; then
11619         echo "$as_me:11619: checking for pthread_kill" >&5
11620 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11621 if test "${ac_cv_func_pthread_kill+set}" = set; then
11622   echo $ECHO_N "(cached) $ECHO_C" >&6
11623 else
11624   cat >conftest.$ac_ext <<_ACEOF
11625 #line 11625 "configure"
11626 #include "confdefs.h"
11627 /* System header to define __stub macros and hopefully few prototypes,
11628     which can conflict with char pthread_kill (); below.  */
11629 #include <assert.h>
11630 /* Override any gcc2 internal prototype to avoid an error.  */
11631 #ifdef __cplusplus
11632 extern "C"
11633 #endif
11634 /* We use char because int might match the return type of a gcc2
11635    builtin and then its argument prototype would still apply.  */
11636 char pthread_kill ();
11637 char (*f) ();
11638
11639 int
11640 main ()
11641 {
11642 /* The GNU C library defines this for functions which it implements
11643     to always fail with ENOSYS.  Some functions are actually named
11644     something starting with __ and the normal name is an alias.  */
11645 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11646 choke me
11647 #else
11648 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11649 #endif
11650
11651   ;
11652   return 0;
11653 }
11654 _ACEOF
11655 rm -f conftest.$ac_objext conftest$ac_exeext
11656 if { (eval echo "$as_me:11656: \"$ac_link\"") >&5
11657   (eval $ac_link) 2>&5
11658   ac_status=$?
11659   echo "$as_me:11659: \$? = $ac_status" >&5
11660   (exit $ac_status); } &&
11661          { ac_try='test -s conftest$ac_exeext'
11662   { (eval echo "$as_me:11662: \"$ac_try\"") >&5
11663   (eval $ac_try) 2>&5
11664   ac_status=$?
11665   echo "$as_me:11665: \$? = $ac_status" >&5
11666   (exit $ac_status); }; }; then
11667   ac_cv_func_pthread_kill=yes
11668 else
11669   echo "$as_me: failed program was:" >&5
11670 cat conftest.$ac_ext >&5
11671 ac_cv_func_pthread_kill=no
11672 fi
11673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11674 fi
11675 echo "$as_me:11675: result: $ac_cv_func_pthread_kill" >&5
11676 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11677 if test $ac_cv_func_pthread_kill = yes; then
11678
11679                 echo "$as_me:11679: checking if you want to allow EINTR in wgetch with pthreads" >&5
11680 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11681
11682 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11683 if test "${enable_pthreads_eintr+set}" = set; then
11684   enableval="$enable_pthreads_eintr"
11685   use_pthreads_eintr=$enableval
11686 else
11687   use_pthreads_eintr=no
11688 fi;
11689                 echo "$as_me:11689: result: $use_pthreads_eintr" >&5
11690 echo "${ECHO_T}$use_pthreads_eintr" >&6
11691                 if test $use_pthreads_eintr = yes ; then
11692                         cat >>confdefs.h <<\EOF
11693 #define USE_PTHREADS_EINTR 1
11694 EOF
11695
11696                 fi
11697 fi
11698
11699         echo "$as_me:11699: checking if you want to use weak-symbols for pthreads" >&5
11700 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11701
11702 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11703 if test "${enable_weak_symbols+set}" = set; then
11704   enableval="$enable_weak_symbols"
11705   use_weak_symbols=$enableval
11706 else
11707   use_weak_symbols=no
11708 fi;
11709         echo "$as_me:11709: result: $use_weak_symbols" >&5
11710 echo "${ECHO_T}$use_weak_symbols" >&6
11711         if test "$use_weak_symbols" = yes ; then
11712
11713 echo "$as_me:11713: checking if $CC supports weak symbols" >&5
11714 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11715 if test "${cf_cv_weak_symbols+set}" = set; then
11716   echo $ECHO_N "(cached) $ECHO_C" >&6
11717 else
11718
11719 cat >conftest.$ac_ext <<_ACEOF
11720 #line 11720 "configure"
11721 #include "confdefs.h"
11722
11723 #include <stdio.h>
11724 int
11725 main ()
11726 {
11727
11728 #if defined(__GNUC__)
11729 #  if defined __USE_ISOC99
11730 #    define _cat_pragma(exp)    _Pragma(#exp)
11731 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11732 #  else
11733 #    define _weak_pragma(exp)
11734 #  endif
11735 #  define _declare(name)        __extension__ extern __typeof__(name) name
11736 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11737 #endif
11738
11739 weak_symbol(fopen);
11740
11741   ;
11742   return 0;
11743 }
11744 _ACEOF
11745 rm -f conftest.$ac_objext
11746 if { (eval echo "$as_me:11746: \"$ac_compile\"") >&5
11747   (eval $ac_compile) 2>&5
11748   ac_status=$?
11749   echo "$as_me:11749: \$? = $ac_status" >&5
11750   (exit $ac_status); } &&
11751          { ac_try='test -s conftest.$ac_objext'
11752   { (eval echo "$as_me:11752: \"$ac_try\"") >&5
11753   (eval $ac_try) 2>&5
11754   ac_status=$?
11755   echo "$as_me:11755: \$? = $ac_status" >&5
11756   (exit $ac_status); }; }; then
11757   cf_cv_weak_symbols=yes
11758 else
11759   echo "$as_me: failed program was:" >&5
11760 cat conftest.$ac_ext >&5
11761 cf_cv_weak_symbols=no
11762 fi
11763 rm -f conftest.$ac_objext conftest.$ac_ext
11764
11765 fi
11766 echo "$as_me:11766: result: $cf_cv_weak_symbols" >&5
11767 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11768
11769         else
11770                 cf_cv_weak_symbols=no
11771         fi
11772
11773         if test $cf_cv_weak_symbols = yes ; then
11774                 cat >>confdefs.h <<\EOF
11775 #define USE_WEAK_SYMBOLS 1
11776 EOF
11777
11778         fi
11779 fi
11780
11781 PTHREAD=
11782 if test "$with_pthread" = "yes" ; then
11783     cat >>confdefs.h <<\EOF
11784 #define USE_PTHREADS 1
11785 EOF
11786
11787     enable_reentrant=yes
11788     if test $cf_cv_weak_symbols = yes ; then
11789         PTHREAD=-lpthread
11790     fi
11791 fi
11792
11793 # Reentrant code has to be opaque; there's little advantage to making ncurses
11794 # opaque outside of that, so there is no --enable-opaque option.  We can use
11795 # this option without --with-pthreads, but this will be always set for
11796 # pthreads.
11797 echo "$as_me:11797: checking if you want experimental reentrant code" >&5
11798 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11799
11800 # Check whether --enable-reentrant or --disable-reentrant was given.
11801 if test "${enable_reentrant+set}" = set; then
11802   enableval="$enable_reentrant"
11803   with_reentrant=$enableval
11804 else
11805   with_reentrant=no
11806 fi;
11807 echo "$as_me:11807: result: $with_reentrant" >&5
11808 echo "${ECHO_T}$with_reentrant" >&6
11809 if test "$with_reentrant" = yes ; then
11810         cf_cv_enable_reentrant=1
11811         cf_cv_enable_opaque="NCURSES_INTERNALS"
11812         NCURSES_OPAQUE=1
11813         NCURSES_SIZE_T=int
11814         if test $cf_cv_weak_symbols = yes ; then
11815
11816 # remove pthread library from $LIBS
11817 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11818
11819                 TEST_LIBS="-lpthread $TEST_LIBS"
11820                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11821         else
11822                 LIB_SUFFIX="t${LIB_SUFFIX}"
11823         fi
11824         cat >>confdefs.h <<\EOF
11825 #define USE_REENTRANT 1
11826 EOF
11827
11828 if test "${with_abi_version+set}" != set; then
11829         case $cf_cv_rel_version in
11830         5.*)
11831                 cf_cv_rel_version=6.0
11832                 cf_cv_abi_version=6
11833                 { echo "$as_me:11833: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11834 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11835                 ;;
11836         esac
11837 fi
11838
11839 else
11840         cf_cv_enable_reentrant=0
11841         cf_cv_enable_opaque="NCURSES_OPAQUE"
11842         NCURSES_OPAQUE=0
11843         NCURSES_SIZE_T=short
11844 fi
11845
11846 ### Allow using a different wrap-prefix
11847 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11848         echo "$as_me:11848: checking for prefix used to wrap public variables" >&5
11849 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11850
11851 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11852 if test "${with_wrap_prefix+set}" = set; then
11853   withval="$with_wrap_prefix"
11854   NCURSES_WRAP_PREFIX=$withval
11855 else
11856   NCURSES_WRAP_PREFIX=_nc_
11857 fi;
11858         echo "$as_me:11858: result: $NCURSES_WRAP_PREFIX" >&5
11859 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11860 else
11861         NCURSES_WRAP_PREFIX=_nc_
11862 fi
11863
11864 cat >>confdefs.h <<EOF
11865 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11866 EOF
11867
11868 echo "$as_me:11868: checking if you want experimental safe-sprintf code" >&5
11869 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11870
11871 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11872 if test "${enable_safe_sprintf+set}" = set; then
11873   enableval="$enable_safe_sprintf"
11874   with_safe_sprintf=$enableval
11875 else
11876   with_safe_sprintf=no
11877 fi;
11878 echo "$as_me:11878: result: $with_safe_sprintf" >&5
11879 echo "${ECHO_T}$with_safe_sprintf" >&6
11880 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11881 #define USE_SAFE_SPRINTF 1
11882 EOF
11883
11884 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11885 # when hashmap is used scroll hints are useless
11886 if test "$with_hashmap" = no ; then
11887 echo "$as_me:11887: checking if you want to experiment without scrolling-hints code" >&5
11888 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11889
11890 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11891 if test "${enable_scroll_hints+set}" = set; then
11892   enableval="$enable_scroll_hints"
11893   with_scroll_hints=$enableval
11894 else
11895   with_scroll_hints=yes
11896 fi;
11897 echo "$as_me:11897: result: $with_scroll_hints" >&5
11898 echo "${ECHO_T}$with_scroll_hints" >&6
11899 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11900 #define USE_SCROLL_HINTS 1
11901 EOF
11902
11903 fi
11904
11905 echo "$as_me:11905: checking if you want experimental wgetch-events code" >&5
11906 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11907
11908 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11909 if test "${enable_wgetch_events+set}" = set; then
11910   enableval="$enable_wgetch_events"
11911   with_wgetch_events=$enableval
11912 else
11913   with_wgetch_events=no
11914 fi;
11915 echo "$as_me:11915: result: $with_wgetch_events" >&5
11916 echo "${ECHO_T}$with_wgetch_events" >&6
11917 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11918 #define NCURSES_WGETCH_EVENTS 1
11919 EOF
11920
11921 ###############################################################################
11922
11923 ###     use option --disable-echo to suppress full display compiling commands
11924
11925 echo "$as_me:11925: checking if you want to see long compiling messages" >&5
11926 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11927
11928 # Check whether --enable-echo or --disable-echo was given.
11929 if test "${enable_echo+set}" = set; then
11930   enableval="$enable_echo"
11931   test "$enableval" != no && enableval=yes
11932   if test "$enableval" != "yes" ; then
11933
11934     ECHO_LT='--silent'
11935     ECHO_LD='@echo linking $@;'
11936     RULE_CC='@echo compiling $<'
11937     SHOW_CC='@echo compiling $@'
11938     ECHO_CC='@'
11939
11940   else
11941
11942     ECHO_LT=''
11943     ECHO_LD=''
11944     RULE_CC=''
11945     SHOW_CC=''
11946     ECHO_CC=''
11947
11948   fi
11949 else
11950   enableval=yes
11951
11952     ECHO_LT=''
11953     ECHO_LD=''
11954     RULE_CC=''
11955     SHOW_CC=''
11956     ECHO_CC=''
11957
11958 fi;
11959 echo "$as_me:11959: result: $enableval" >&5
11960 echo "${ECHO_T}$enableval" >&6
11961
11962 if test "$enable_echo" = yes; then
11963         ECHO_LINK=
11964 else
11965         ECHO_LINK='@ echo linking $@ ... ;'
11966         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11967         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11968 fi
11969
11970 ###     use option --enable-warnings to turn on all gcc warnings
11971 echo "$as_me:11971: checking if you want to see compiler warnings" >&5
11972 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11973
11974 # Check whether --enable-warnings or --disable-warnings was given.
11975 if test "${enable_warnings+set}" = set; then
11976   enableval="$enable_warnings"
11977   with_warnings=$enableval
11978 fi;
11979 echo "$as_me:11979: result: $with_warnings" >&5
11980 echo "${ECHO_T}$with_warnings" >&6
11981
11982 if test "x$with_warnings" = "xyes"; then
11983
11984         ADAFLAGS="$ADAFLAGS -gnatg"
11985
11986 INTEL_COMPILER=no
11987
11988 if test "$GCC" = yes ; then
11989         case $host_os in
11990         linux*|gnu*)
11991                 echo "$as_me:11991: checking if this is really Intel C compiler" >&5
11992 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11993                 cf_save_CFLAGS="$CFLAGS"
11994                 CFLAGS="$CFLAGS -no-gcc"
11995                 cat >conftest.$ac_ext <<_ACEOF
11996 #line 11996 "configure"
11997 #include "confdefs.h"
11998
11999 int
12000 main ()
12001 {
12002
12003 #ifdef __INTEL_COMPILER
12004 #else
12005 make an error
12006 #endif
12007
12008   ;
12009   return 0;
12010 }
12011 _ACEOF
12012 rm -f conftest.$ac_objext
12013 if { (eval echo "$as_me:12013: \"$ac_compile\"") >&5
12014   (eval $ac_compile) 2>&5
12015   ac_status=$?
12016   echo "$as_me:12016: \$? = $ac_status" >&5
12017   (exit $ac_status); } &&
12018          { ac_try='test -s conftest.$ac_objext'
12019   { (eval echo "$as_me:12019: \"$ac_try\"") >&5
12020   (eval $ac_try) 2>&5
12021   ac_status=$?
12022   echo "$as_me:12022: \$? = $ac_status" >&5
12023   (exit $ac_status); }; }; then
12024   INTEL_COMPILER=yes
12025 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12026
12027 else
12028   echo "$as_me: failed program was:" >&5
12029 cat conftest.$ac_ext >&5
12030 fi
12031 rm -f conftest.$ac_objext conftest.$ac_ext
12032                 CFLAGS="$cf_save_CFLAGS"
12033                 echo "$as_me:12033: result: $INTEL_COMPILER" >&5
12034 echo "${ECHO_T}$INTEL_COMPILER" >&6
12035                 ;;
12036         esac
12037 fi
12038
12039 CLANG_COMPILER=no
12040
12041 if test "$GCC" = yes ; then
12042         echo "$as_me:12042: checking if this is really Clang C compiler" >&5
12043 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12044         cf_save_CFLAGS="$CFLAGS"
12045         CFLAGS="$CFLAGS -Qunused-arguments"
12046         cat >conftest.$ac_ext <<_ACEOF
12047 #line 12047 "configure"
12048 #include "confdefs.h"
12049
12050 int
12051 main ()
12052 {
12053
12054 #ifdef __clang__
12055 #else
12056 make an error
12057 #endif
12058
12059   ;
12060   return 0;
12061 }
12062 _ACEOF
12063 rm -f conftest.$ac_objext
12064 if { (eval echo "$as_me:12064: \"$ac_compile\"") >&5
12065   (eval $ac_compile) 2>&5
12066   ac_status=$?
12067   echo "$as_me:12067: \$? = $ac_status" >&5
12068   (exit $ac_status); } &&
12069          { ac_try='test -s conftest.$ac_objext'
12070   { (eval echo "$as_me:12070: \"$ac_try\"") >&5
12071   (eval $ac_try) 2>&5
12072   ac_status=$?
12073   echo "$as_me:12073: \$? = $ac_status" >&5
12074   (exit $ac_status); }; }; then
12075   CLANG_COMPILER=yes
12076 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12077
12078 else
12079   echo "$as_me: failed program was:" >&5
12080 cat conftest.$ac_ext >&5
12081 fi
12082 rm -f conftest.$ac_objext conftest.$ac_ext
12083         CFLAGS="$cf_save_CFLAGS"
12084         echo "$as_me:12084: result: $CLANG_COMPILER" >&5
12085 echo "${ECHO_T}$CLANG_COMPILER" >&6
12086 fi
12087
12088 cat > conftest.$ac_ext <<EOF
12089 #line 12089 "${as_me:-configure}"
12090 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12091 EOF
12092
12093 if test "$INTEL_COMPILER" = yes
12094 then
12095 # The "-wdXXX" options suppress warnings:
12096 # remark #1419: external declaration in primary source file
12097 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12098 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12099 # remark #193: zero used for undefined preprocessing identifier
12100 # remark #593: variable "curs_sb_left_arrow" was set but never used
12101 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12102 # remark #869: parameter "tw" was never referenced
12103 # remark #981: operands are evaluated in unspecified order
12104 # warning #279: controlling expression is constant
12105
12106         { echo "$as_me:12106: checking for $CC warning options..." >&5
12107 echo "$as_me: checking for $CC warning options..." >&6;}
12108         cf_save_CFLAGS="$CFLAGS"
12109         EXTRA_CFLAGS="-Wall"
12110         for cf_opt in \
12111                 wd1419 \
12112                 wd1683 \
12113                 wd1684 \
12114                 wd193 \
12115                 wd593 \
12116                 wd279 \
12117                 wd810 \
12118                 wd869 \
12119                 wd981
12120         do
12121                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12122                 if { (eval echo "$as_me:12122: \"$ac_compile\"") >&5
12123   (eval $ac_compile) 2>&5
12124   ac_status=$?
12125   echo "$as_me:12125: \$? = $ac_status" >&5
12126   (exit $ac_status); }; then
12127                         test -n "$verbose" && echo "$as_me:12127: result: ... -$cf_opt" >&5
12128 echo "${ECHO_T}... -$cf_opt" >&6
12129                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12130                 fi
12131         done
12132         CFLAGS="$cf_save_CFLAGS"
12133
12134 elif test "$GCC" = yes
12135 then
12136         { echo "$as_me:12136: checking for $CC warning options..." >&5
12137 echo "$as_me: checking for $CC warning options..." >&6;}
12138         cf_save_CFLAGS="$CFLAGS"
12139         EXTRA_CFLAGS=
12140         cf_warn_CONST=""
12141         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12142         for cf_opt in W Wall \
12143                 Wbad-function-cast \
12144                 Wcast-align \
12145                 Wcast-qual \
12146                 Winline \
12147                 Wmissing-declarations \
12148                 Wmissing-prototypes \
12149                 Wnested-externs \
12150                 Wpointer-arith \
12151                 Wshadow \
12152                 Wstrict-prototypes \
12153                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12154         do
12155                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12156                 if { (eval echo "$as_me:12156: \"$ac_compile\"") >&5
12157   (eval $ac_compile) 2>&5
12158   ac_status=$?
12159   echo "$as_me:12159: \$? = $ac_status" >&5
12160   (exit $ac_status); }; then
12161                         test -n "$verbose" && echo "$as_me:12161: result: ... -$cf_opt" >&5
12162 echo "${ECHO_T}... -$cf_opt" >&6
12163                         case $cf_opt in #(vi
12164                         Wcast-qual) #(vi
12165                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12166                                 ;;
12167                         Winline) #(vi
12168                                 case $GCC_VERSION in
12169                                 [34].*)
12170                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12171
12172 echo "${as_me:-configure}:12172: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12173
12174                                         continue;;
12175                                 esac
12176                                 ;;
12177                         Wpointer-arith) #(vi
12178                                 case $GCC_VERSION in
12179                                 [12].*)
12180                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12181
12182 echo "${as_me:-configure}:12182: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12183
12184                                         continue;;
12185                                 esac
12186                                 ;;
12187                         esac
12188                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12189                 fi
12190         done
12191         CFLAGS="$cf_save_CFLAGS"
12192 fi
12193 rm -rf conftest*
12194
12195         if test "$cf_with_cxx" = yes ; then
12196
12197 INTEL_CPLUSPLUS=no
12198
12199 if test "$GCC" = yes ; then
12200         case $host_os in
12201         linux*|gnu*)
12202                 echo "$as_me:12202: checking if this is really Intel C++ compiler" >&5
12203 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12204                 cf_save_CFLAGS="$CXXFLAGS"
12205                 CXXFLAGS="$CXXFLAGS -no-gcc"
12206                 cat >conftest.$ac_ext <<_ACEOF
12207 #line 12207 "configure"
12208 #include "confdefs.h"
12209
12210 int
12211 main ()
12212 {
12213
12214 #ifdef __INTEL_COMPILER
12215 #else
12216 make an error
12217 #endif
12218
12219   ;
12220   return 0;
12221 }
12222 _ACEOF
12223 rm -f conftest.$ac_objext
12224 if { (eval echo "$as_me:12224: \"$ac_compile\"") >&5
12225   (eval $ac_compile) 2>&5
12226   ac_status=$?
12227   echo "$as_me:12227: \$? = $ac_status" >&5
12228   (exit $ac_status); } &&
12229          { ac_try='test -s conftest.$ac_objext'
12230   { (eval echo "$as_me:12230: \"$ac_try\"") >&5
12231   (eval $ac_try) 2>&5
12232   ac_status=$?
12233   echo "$as_me:12233: \$? = $ac_status" >&5
12234   (exit $ac_status); }; }; then
12235   INTEL_CPLUSPLUS=yes
12236 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12237
12238 else
12239   echo "$as_me: failed program was:" >&5
12240 cat conftest.$ac_ext >&5
12241 fi
12242 rm -f conftest.$ac_objext conftest.$ac_ext
12243                 CXXFLAGS="$cf_save_CFLAGS"
12244                 echo "$as_me:12244: result: $INTEL_CPLUSPLUS" >&5
12245 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12246                 ;;
12247         esac
12248 fi
12249
12250 CLANG_CPLUSPLUS=no
12251
12252 if test "$GCC" = yes ; then
12253         echo "$as_me:12253: checking if this is really Clang C++ compiler" >&5
12254 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12255         cf_save_CFLAGS="$CXXFLAGS"
12256         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12257         cat >conftest.$ac_ext <<_ACEOF
12258 #line 12258 "configure"
12259 #include "confdefs.h"
12260
12261 int
12262 main ()
12263 {
12264
12265 #ifdef __clang__
12266 #else
12267 make an error
12268 #endif
12269
12270   ;
12271   return 0;
12272 }
12273 _ACEOF
12274 rm -f conftest.$ac_objext
12275 if { (eval echo "$as_me:12275: \"$ac_compile\"") >&5
12276   (eval $ac_compile) 2>&5
12277   ac_status=$?
12278   echo "$as_me:12278: \$? = $ac_status" >&5
12279   (exit $ac_status); } &&
12280          { ac_try='test -s conftest.$ac_objext'
12281   { (eval echo "$as_me:12281: \"$ac_try\"") >&5
12282   (eval $ac_try) 2>&5
12283   ac_status=$?
12284   echo "$as_me:12284: \$? = $ac_status" >&5
12285   (exit $ac_status); }; }; then
12286   CLANG_CPLUSPLUS=yes
12287 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12288
12289 else
12290   echo "$as_me: failed program was:" >&5
12291 cat conftest.$ac_ext >&5
12292 fi
12293 rm -f conftest.$ac_objext conftest.$ac_ext
12294         CXXFLAGS="$cf_save_CFLAGS"
12295         echo "$as_me:12295: result: $CLANG_CPLUSPLUS" >&5
12296 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12297 fi
12298
12299 ac_ext=cc
12300 ac_cpp='$CXXCPP $CPPFLAGS'
12301 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12302 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12303 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12304 ac_main_return=return
12305
12306 cat > conftest.$ac_ext <<EOF
12307 #line 12307 "configure"
12308 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12309 EOF
12310
12311 if test "$INTEL_CPLUSPLUS" = yes
12312 then
12313 # The "-wdXXX" options suppress warnings:
12314 # remark #1419: external declaration in primary source file
12315 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12316 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12317 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12318 # remark #193: zero used for undefined preprocessing identifier
12319 # remark #593: variable "curs_sb_left_arrow" was set but never used
12320 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12321 # remark #869: parameter "tw" was never referenced
12322 # remark #981: operands are evaluated in unspecified order
12323 # warning #269: invalid format string conversion
12324
12325         { echo "$as_me:12325: checking for $CC warning options..." >&5
12326 echo "$as_me: checking for $CC warning options..." >&6;}
12327         cf_save_CXXFLAGS="$CXXFLAGS"
12328         EXTRA_CXXFLAGS="-Wall"
12329         for cf_opt in \
12330                 wd1419 \
12331                 wd1682 \
12332                 wd1683 \
12333                 wd1684 \
12334                 wd193 \
12335                 wd279 \
12336                 wd593 \
12337                 wd810 \
12338                 wd869 \
12339                 wd981
12340         do
12341                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12342                 if { (eval echo "$as_me:12342: \"$ac_compile\"") >&5
12343   (eval $ac_compile) 2>&5
12344   ac_status=$?
12345   echo "$as_me:12345: \$? = $ac_status" >&5
12346   (exit $ac_status); }; then
12347                         test -n "$verbose" && echo "$as_me:12347: result: ... -$cf_opt" >&5
12348 echo "${ECHO_T}... -$cf_opt" >&6
12349                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12350                 fi
12351         done
12352         CXXFLAGS="$cf_save_CXXFLAGS"
12353
12354 elif test "$GXX" = yes
12355 then
12356         { echo "$as_me:12356: checking for $CXX warning options..." >&5
12357 echo "$as_me: checking for $CXX warning options..." >&6;}
12358         cf_save_CXXFLAGS="$CXXFLAGS"
12359         EXTRA_CXXFLAGS="-W -Wall"
12360         cf_gxx_extra_warnings=""
12361         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12362         case "$GCC_VERSION" in
12363         [1-2].*)
12364                 ;;
12365         *)
12366                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12367                 ;;
12368         esac
12369         for cf_opt in \
12370                 Wabi \
12371                 fabi-version=0 \
12372                 Woverloaded-virtual \
12373                 Wsign-promo \
12374                 Wsynth \
12375                 Wold-style-cast \
12376                 Wcast-align \
12377                 Wcast-qual \
12378                 Wmissing-prototypes \
12379                 Wpointer-arith \
12380                 Wshadow \
12381                 Wstrict-prototypes \
12382                 Wundef $cf_gxx_extra_warnings Wno-unused
12383         do
12384                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12385                 if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5
12386   (eval $ac_compile) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit $ac_status); }; then
12390                         test -n "$verbose" && echo "$as_me:12390: result: ... -$cf_opt" >&5
12391 echo "${ECHO_T}... -$cf_opt" >&6
12392                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12393                 else
12394                         test -n "$verbose" && echo "$as_me:12394: result: ... no -$cf_opt" >&5
12395 echo "${ECHO_T}... no -$cf_opt" >&6
12396                 fi
12397         done
12398         CXXFLAGS="$cf_save_CXXFLAGS"
12399 fi
12400
12401 rm -rf conftest*
12402 ac_ext=c
12403 ac_cpp='$CPP $CPPFLAGS'
12404 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12405 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12406 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12407 ac_main_return=return
12408
12409         fi
12410 fi
12411
12412 if test "$GCC" = yes
12413 then
12414 cat > conftest.i <<EOF
12415 #ifndef GCC_PRINTF
12416 #define GCC_PRINTF 0
12417 #endif
12418 #ifndef GCC_SCANF
12419 #define GCC_SCANF 0
12420 #endif
12421 #ifndef GCC_NORETURN
12422 #define GCC_NORETURN /* nothing */
12423 #endif
12424 #ifndef GCC_UNUSED
12425 #define GCC_UNUSED /* nothing */
12426 #endif
12427 EOF
12428 if test "$GCC" = yes
12429 then
12430         { echo "$as_me:12430: checking for $CC __attribute__ directives..." >&5
12431 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12432 cat > conftest.$ac_ext <<EOF
12433 #line 12433 "${as_me:-configure}"
12434 #include "confdefs.h"
12435 #include "conftest.h"
12436 #include "conftest.i"
12437 #if     GCC_PRINTF
12438 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12439 #else
12440 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12441 #endif
12442 #if     GCC_SCANF
12443 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12444 #else
12445 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12446 #endif
12447 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12448 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12449 extern void foo(void) GCC_NORETURN;
12450 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12451 EOF
12452         cf_printf_attribute=no
12453         cf_scanf_attribute=no
12454         for cf_attribute in scanf printf unused noreturn
12455         do
12456
12457 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12458
12459                 cf_directive="__attribute__(($cf_attribute))"
12460                 echo "checking for $CC $cf_directive" 1>&5
12461
12462                 case $cf_attribute in #(vi
12463                 printf) #(vi
12464                         cf_printf_attribute=yes
12465                         cat >conftest.h <<EOF
12466 #define GCC_$cf_ATTRIBUTE 1
12467 EOF
12468                         ;;
12469                 scanf) #(vi
12470                         cf_scanf_attribute=yes
12471                         cat >conftest.h <<EOF
12472 #define GCC_$cf_ATTRIBUTE 1
12473 EOF
12474                         ;;
12475                 *) #(vi
12476                         cat >conftest.h <<EOF
12477 #define GCC_$cf_ATTRIBUTE $cf_directive
12478 EOF
12479                         ;;
12480                 esac
12481
12482                 if { (eval echo "$as_me:12482: \"$ac_compile\"") >&5
12483   (eval $ac_compile) 2>&5
12484   ac_status=$?
12485   echo "$as_me:12485: \$? = $ac_status" >&5
12486   (exit $ac_status); }; then
12487                         test -n "$verbose" && echo "$as_me:12487: result: ... $cf_attribute" >&5
12488 echo "${ECHO_T}... $cf_attribute" >&6
12489                         cat conftest.h >>confdefs.h
12490                         case $cf_attribute in #(vi
12491                         printf) #(vi
12492                                 if test "$cf_printf_attribute" = no ; then
12493                                         cat >>confdefs.h <<EOF
12494 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12495 EOF
12496                                 else
12497                                         cat >>confdefs.h <<EOF
12498 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12499 EOF
12500                                 fi
12501                                 ;;
12502                         scanf) #(vi
12503                                 if test "$cf_scanf_attribute" = no ; then
12504                                         cat >>confdefs.h <<EOF
12505 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12506 EOF
12507                                 else
12508                                         cat >>confdefs.h <<EOF
12509 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12510 EOF
12511                                 fi
12512                                 ;;
12513                         esac
12514                 fi
12515         done
12516 else
12517         fgrep define conftest.i >>confdefs.h
12518 fi
12519 rm -rf conftest*
12520 fi
12521
12522 echo "$as_me:12522: checking if you want to work around bogus compiler/loader warnings" >&5
12523 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12524
12525 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12526 if test "${enable_string_hacks+set}" = set; then
12527   enableval="$enable_string_hacks"
12528   with_string_hacks=$enableval
12529 else
12530   with_string_hacks=no
12531 fi;
12532 echo "$as_me:12532: result: $with_string_hacks" >&5
12533 echo "${ECHO_T}$with_string_hacks" >&6
12534
12535 if test "x$with_string_hacks" = "xyes"; then
12536         cat >>confdefs.h <<\EOF
12537 #define USE_STRING_HACKS 1
12538 EOF
12539
12540         { echo "$as_me:12540: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12541 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12542
12543 for ac_func in strlcat strlcpy snprintf
12544 do
12545 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12546 echo "$as_me:12546: checking for $ac_func" >&5
12547 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12548 if eval "test \"\${$as_ac_var+set}\" = set"; then
12549   echo $ECHO_N "(cached) $ECHO_C" >&6
12550 else
12551   cat >conftest.$ac_ext <<_ACEOF
12552 #line 12552 "configure"
12553 #include "confdefs.h"
12554 /* System header to define __stub macros and hopefully few prototypes,
12555     which can conflict with char $ac_func (); below.  */
12556 #include <assert.h>
12557 /* Override any gcc2 internal prototype to avoid an error.  */
12558 #ifdef __cplusplus
12559 extern "C"
12560 #endif
12561 /* We use char because int might match the return type of a gcc2
12562    builtin and then its argument prototype would still apply.  */
12563 char $ac_func ();
12564 char (*f) ();
12565
12566 int
12567 main ()
12568 {
12569 /* The GNU C library defines this for functions which it implements
12570     to always fail with ENOSYS.  Some functions are actually named
12571     something starting with __ and the normal name is an alias.  */
12572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12573 choke me
12574 #else
12575 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12576 #endif
12577
12578   ;
12579   return 0;
12580 }
12581 _ACEOF
12582 rm -f conftest.$ac_objext conftest$ac_exeext
12583 if { (eval echo "$as_me:12583: \"$ac_link\"") >&5
12584   (eval $ac_link) 2>&5
12585   ac_status=$?
12586   echo "$as_me:12586: \$? = $ac_status" >&5
12587   (exit $ac_status); } &&
12588          { ac_try='test -s conftest$ac_exeext'
12589   { (eval echo "$as_me:12589: \"$ac_try\"") >&5
12590   (eval $ac_try) 2>&5
12591   ac_status=$?
12592   echo "$as_me:12592: \$? = $ac_status" >&5
12593   (exit $ac_status); }; }; then
12594   eval "$as_ac_var=yes"
12595 else
12596   echo "$as_me: failed program was:" >&5
12597 cat conftest.$ac_ext >&5
12598 eval "$as_ac_var=no"
12599 fi
12600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12601 fi
12602 echo "$as_me:12602: result: `eval echo '${'$as_ac_var'}'`" >&5
12603 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12604 if test `eval echo '${'$as_ac_var'}'` = yes; then
12605   cat >>confdefs.h <<EOF
12606 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12607 EOF
12608
12609 fi
12610 done
12611
12612 fi
12613
12614 ###     use option --enable-assertions to turn on generation of assertion code
12615 echo "$as_me:12615: checking if you want to enable runtime assertions" >&5
12616 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12617
12618 # Check whether --enable-assertions or --disable-assertions was given.
12619 if test "${enable_assertions+set}" = set; then
12620   enableval="$enable_assertions"
12621   with_assertions=$enableval
12622 else
12623   with_assertions=no
12624 fi;
12625 echo "$as_me:12625: result: $with_assertions" >&5
12626 echo "${ECHO_T}$with_assertions" >&6
12627 if test -n "$GCC"
12628 then
12629         if test "$with_assertions" = no
12630         then
12631                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12632         else
12633
12634         ADAFLAGS="$ADAFLAGS -gnata"
12635
12636         fi
12637 fi
12638
12639 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12640
12641 echo "$as_me:12641: checking if you want to use dmalloc for testing" >&5
12642 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12643
12644 # Check whether --with-dmalloc or --without-dmalloc was given.
12645 if test "${with_dmalloc+set}" = set; then
12646   withval="$with_dmalloc"
12647   cat >>confdefs.h <<\EOF
12648 #define USE_DMALLOC 1
12649 EOF
12650
12651         : ${with_cflags:=-g}
12652         : ${with_no_leaks:=yes}
12653          with_dmalloc=yes
12654 else
12655   with_dmalloc=
12656 fi;
12657 echo "$as_me:12657: result: ${with_dmalloc:-no}" >&5
12658 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12659
12660 case .$with_cflags in #(vi
12661 .*-g*)
12662         case .$CFLAGS in #(vi
12663         .*-g*) #(vi
12664                 ;;
12665         *)
12666
12667 cf_fix_cppflags=no
12668 cf_new_cflags=
12669 cf_new_cppflags=
12670 cf_new_extra_cppflags=
12671
12672 for cf_add_cflags in -g
12673 do
12674 case $cf_fix_cppflags in
12675 no)
12676         case $cf_add_cflags in #(vi
12677         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12678                 case $cf_add_cflags in
12679                 -D*)
12680                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12681
12682                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12683                                 && test -z "${cf_tst_cflags}" \
12684                                 && cf_fix_cppflags=yes
12685
12686                         if test $cf_fix_cppflags = yes ; then
12687                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12688                                 continue
12689                         elif test "${cf_tst_cflags}" = "\"'" ; then
12690                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12691                                 continue
12692                         fi
12693                         ;;
12694                 esac
12695                 case "$CPPFLAGS" in
12696                 *$cf_add_cflags) #(vi
12697                         ;;
12698                 *) #(vi
12699                         case $cf_add_cflags in #(vi
12700                         -D*)
12701                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12702
12703 CPPFLAGS=`echo "$CPPFLAGS" | \
12704         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12705                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12706
12707                                 ;;
12708                         esac
12709                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12710                         ;;
12711                 esac
12712                 ;;
12713         *)
12714                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12715                 ;;
12716         esac
12717         ;;
12718 yes)
12719         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12720
12721         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12722
12723         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12724                 && test -z "${cf_tst_cflags}" \
12725                 && cf_fix_cppflags=no
12726         ;;
12727 esac
12728 done
12729
12730 if test -n "$cf_new_cflags" ; then
12731
12732         CFLAGS="$CFLAGS $cf_new_cflags"
12733 fi
12734
12735 if test -n "$cf_new_cppflags" ; then
12736
12737         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12738 fi
12739
12740 if test -n "$cf_new_extra_cppflags" ; then
12741
12742         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12743 fi
12744
12745                 ;;
12746         esac
12747         ;;
12748 esac
12749
12750 if test "$with_dmalloc" = yes ; then
12751         echo "$as_me:12751: checking for dmalloc.h" >&5
12752 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12753 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12754   echo $ECHO_N "(cached) $ECHO_C" >&6
12755 else
12756   cat >conftest.$ac_ext <<_ACEOF
12757 #line 12757 "configure"
12758 #include "confdefs.h"
12759 #include <dmalloc.h>
12760 _ACEOF
12761 if { (eval echo "$as_me:12761: \"$ac_cpp conftest.$ac_ext\"") >&5
12762   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12763   ac_status=$?
12764   egrep -v '^ *\+' conftest.er1 >conftest.err
12765   rm -f conftest.er1
12766   cat conftest.err >&5
12767   echo "$as_me:12767: \$? = $ac_status" >&5
12768   (exit $ac_status); } >/dev/null; then
12769   if test -s conftest.err; then
12770     ac_cpp_err=$ac_c_preproc_warn_flag
12771   else
12772     ac_cpp_err=
12773   fi
12774 else
12775   ac_cpp_err=yes
12776 fi
12777 if test -z "$ac_cpp_err"; then
12778   ac_cv_header_dmalloc_h=yes
12779 else
12780   echo "$as_me: failed program was:" >&5
12781   cat conftest.$ac_ext >&5
12782   ac_cv_header_dmalloc_h=no
12783 fi
12784 rm -f conftest.err conftest.$ac_ext
12785 fi
12786 echo "$as_me:12786: result: $ac_cv_header_dmalloc_h" >&5
12787 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12788 if test $ac_cv_header_dmalloc_h = yes; then
12789
12790 echo "$as_me:12790: checking for dmalloc_debug in -ldmalloc" >&5
12791 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12792 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12793   echo $ECHO_N "(cached) $ECHO_C" >&6
12794 else
12795   ac_check_lib_save_LIBS=$LIBS
12796 LIBS="-ldmalloc  $LIBS"
12797 cat >conftest.$ac_ext <<_ACEOF
12798 #line 12798 "configure"
12799 #include "confdefs.h"
12800
12801 /* Override any gcc2 internal prototype to avoid an error.  */
12802 #ifdef __cplusplus
12803 extern "C"
12804 #endif
12805 /* We use char because int might match the return type of a gcc2
12806    builtin and then its argument prototype would still apply.  */
12807 char dmalloc_debug ();
12808 int
12809 main ()
12810 {
12811 dmalloc_debug ();
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 rm -f conftest.$ac_objext conftest$ac_exeext
12817 if { (eval echo "$as_me:12817: \"$ac_link\"") >&5
12818   (eval $ac_link) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); } &&
12822          { ac_try='test -s conftest$ac_exeext'
12823   { (eval echo "$as_me:12823: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:12826: \$? = $ac_status" >&5
12827   (exit $ac_status); }; }; then
12828   ac_cv_lib_dmalloc_dmalloc_debug=yes
12829 else
12830   echo "$as_me: failed program was:" >&5
12831 cat conftest.$ac_ext >&5
12832 ac_cv_lib_dmalloc_dmalloc_debug=no
12833 fi
12834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12835 LIBS=$ac_check_lib_save_LIBS
12836 fi
12837 echo "$as_me:12837: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12838 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12839 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12840   cat >>confdefs.h <<EOF
12841 #define HAVE_LIBDMALLOC 1
12842 EOF
12843
12844   LIBS="-ldmalloc $LIBS"
12845
12846 fi
12847
12848 fi
12849
12850 fi
12851
12852 echo "$as_me:12852: checking if you want to use dbmalloc for testing" >&5
12853 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12854
12855 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12856 if test "${with_dbmalloc+set}" = set; then
12857   withval="$with_dbmalloc"
12858   cat >>confdefs.h <<\EOF
12859 #define USE_DBMALLOC 1
12860 EOF
12861
12862         : ${with_cflags:=-g}
12863         : ${with_no_leaks:=yes}
12864          with_dbmalloc=yes
12865 else
12866   with_dbmalloc=
12867 fi;
12868 echo "$as_me:12868: result: ${with_dbmalloc:-no}" >&5
12869 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12870
12871 case .$with_cflags in #(vi
12872 .*-g*)
12873         case .$CFLAGS in #(vi
12874         .*-g*) #(vi
12875                 ;;
12876         *)
12877
12878 cf_fix_cppflags=no
12879 cf_new_cflags=
12880 cf_new_cppflags=
12881 cf_new_extra_cppflags=
12882
12883 for cf_add_cflags in -g
12884 do
12885 case $cf_fix_cppflags in
12886 no)
12887         case $cf_add_cflags in #(vi
12888         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12889                 case $cf_add_cflags in
12890                 -D*)
12891                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12892
12893                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12894                                 && test -z "${cf_tst_cflags}" \
12895                                 && cf_fix_cppflags=yes
12896
12897                         if test $cf_fix_cppflags = yes ; then
12898                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12899                                 continue
12900                         elif test "${cf_tst_cflags}" = "\"'" ; then
12901                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12902                                 continue
12903                         fi
12904                         ;;
12905                 esac
12906                 case "$CPPFLAGS" in
12907                 *$cf_add_cflags) #(vi
12908                         ;;
12909                 *) #(vi
12910                         case $cf_add_cflags in #(vi
12911                         -D*)
12912                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12913
12914 CPPFLAGS=`echo "$CPPFLAGS" | \
12915         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12916                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12917
12918                                 ;;
12919                         esac
12920                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12921                         ;;
12922                 esac
12923                 ;;
12924         *)
12925                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12926                 ;;
12927         esac
12928         ;;
12929 yes)
12930         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12931
12932         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12933
12934         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12935                 && test -z "${cf_tst_cflags}" \
12936                 && cf_fix_cppflags=no
12937         ;;
12938 esac
12939 done
12940
12941 if test -n "$cf_new_cflags" ; then
12942
12943         CFLAGS="$CFLAGS $cf_new_cflags"
12944 fi
12945
12946 if test -n "$cf_new_cppflags" ; then
12947
12948         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12949 fi
12950
12951 if test -n "$cf_new_extra_cppflags" ; then
12952
12953         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12954 fi
12955
12956                 ;;
12957         esac
12958         ;;
12959 esac
12960
12961 if test "$with_dbmalloc" = yes ; then
12962         echo "$as_me:12962: checking for dbmalloc.h" >&5
12963 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12964 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12965   echo $ECHO_N "(cached) $ECHO_C" >&6
12966 else
12967   cat >conftest.$ac_ext <<_ACEOF
12968 #line 12968 "configure"
12969 #include "confdefs.h"
12970 #include <dbmalloc.h>
12971 _ACEOF
12972 if { (eval echo "$as_me:12972: \"$ac_cpp conftest.$ac_ext\"") >&5
12973   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12974   ac_status=$?
12975   egrep -v '^ *\+' conftest.er1 >conftest.err
12976   rm -f conftest.er1
12977   cat conftest.err >&5
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit $ac_status); } >/dev/null; then
12980   if test -s conftest.err; then
12981     ac_cpp_err=$ac_c_preproc_warn_flag
12982   else
12983     ac_cpp_err=
12984   fi
12985 else
12986   ac_cpp_err=yes
12987 fi
12988 if test -z "$ac_cpp_err"; then
12989   ac_cv_header_dbmalloc_h=yes
12990 else
12991   echo "$as_me: failed program was:" >&5
12992   cat conftest.$ac_ext >&5
12993   ac_cv_header_dbmalloc_h=no
12994 fi
12995 rm -f conftest.err conftest.$ac_ext
12996 fi
12997 echo "$as_me:12997: result: $ac_cv_header_dbmalloc_h" >&5
12998 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12999 if test $ac_cv_header_dbmalloc_h = yes; then
13000
13001 echo "$as_me:13001: checking for debug_malloc in -ldbmalloc" >&5
13002 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13003 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13004   echo $ECHO_N "(cached) $ECHO_C" >&6
13005 else
13006   ac_check_lib_save_LIBS=$LIBS
13007 LIBS="-ldbmalloc  $LIBS"
13008 cat >conftest.$ac_ext <<_ACEOF
13009 #line 13009 "configure"
13010 #include "confdefs.h"
13011
13012 /* Override any gcc2 internal prototype to avoid an error.  */
13013 #ifdef __cplusplus
13014 extern "C"
13015 #endif
13016 /* We use char because int might match the return type of a gcc2
13017    builtin and then its argument prototype would still apply.  */
13018 char debug_malloc ();
13019 int
13020 main ()
13021 {
13022 debug_malloc ();
13023   ;
13024   return 0;
13025 }
13026 _ACEOF
13027 rm -f conftest.$ac_objext conftest$ac_exeext
13028 if { (eval echo "$as_me:13028: \"$ac_link\"") >&5
13029   (eval $ac_link) 2>&5
13030   ac_status=$?
13031   echo "$as_me:13031: \$? = $ac_status" >&5
13032   (exit $ac_status); } &&
13033          { ac_try='test -s conftest$ac_exeext'
13034   { (eval echo "$as_me:13034: \"$ac_try\"") >&5
13035   (eval $ac_try) 2>&5
13036   ac_status=$?
13037   echo "$as_me:13037: \$? = $ac_status" >&5
13038   (exit $ac_status); }; }; then
13039   ac_cv_lib_dbmalloc_debug_malloc=yes
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 cat conftest.$ac_ext >&5
13043 ac_cv_lib_dbmalloc_debug_malloc=no
13044 fi
13045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13046 LIBS=$ac_check_lib_save_LIBS
13047 fi
13048 echo "$as_me:13048: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13049 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13050 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13051   cat >>confdefs.h <<EOF
13052 #define HAVE_LIBDBMALLOC 1
13053 EOF
13054
13055   LIBS="-ldbmalloc $LIBS"
13056
13057 fi
13058
13059 fi
13060
13061 fi
13062
13063 echo "$as_me:13063: checking if you want to use valgrind for testing" >&5
13064 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13065
13066 # Check whether --with-valgrind or --without-valgrind was given.
13067 if test "${with_valgrind+set}" = set; then
13068   withval="$with_valgrind"
13069   cat >>confdefs.h <<\EOF
13070 #define USE_VALGRIND 1
13071 EOF
13072
13073         : ${with_cflags:=-g}
13074         : ${with_no_leaks:=yes}
13075          with_valgrind=yes
13076 else
13077   with_valgrind=
13078 fi;
13079 echo "$as_me:13079: result: ${with_valgrind:-no}" >&5
13080 echo "${ECHO_T}${with_valgrind:-no}" >&6
13081
13082 case .$with_cflags in #(vi
13083 .*-g*)
13084         case .$CFLAGS in #(vi
13085         .*-g*) #(vi
13086                 ;;
13087         *)
13088
13089 cf_fix_cppflags=no
13090 cf_new_cflags=
13091 cf_new_cppflags=
13092 cf_new_extra_cppflags=
13093
13094 for cf_add_cflags in -g
13095 do
13096 case $cf_fix_cppflags in
13097 no)
13098         case $cf_add_cflags in #(vi
13099         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13100                 case $cf_add_cflags in
13101                 -D*)
13102                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13103
13104                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13105                                 && test -z "${cf_tst_cflags}" \
13106                                 && cf_fix_cppflags=yes
13107
13108                         if test $cf_fix_cppflags = yes ; then
13109                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13110                                 continue
13111                         elif test "${cf_tst_cflags}" = "\"'" ; then
13112                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13113                                 continue
13114                         fi
13115                         ;;
13116                 esac
13117                 case "$CPPFLAGS" in
13118                 *$cf_add_cflags) #(vi
13119                         ;;
13120                 *) #(vi
13121                         case $cf_add_cflags in #(vi
13122                         -D*)
13123                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13124
13125 CPPFLAGS=`echo "$CPPFLAGS" | \
13126         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13127                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13128
13129                                 ;;
13130                         esac
13131                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13132                         ;;
13133                 esac
13134                 ;;
13135         *)
13136                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13137                 ;;
13138         esac
13139         ;;
13140 yes)
13141         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13142
13143         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13144
13145         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13146                 && test -z "${cf_tst_cflags}" \
13147                 && cf_fix_cppflags=no
13148         ;;
13149 esac
13150 done
13151
13152 if test -n "$cf_new_cflags" ; then
13153
13154         CFLAGS="$CFLAGS $cf_new_cflags"
13155 fi
13156
13157 if test -n "$cf_new_cppflags" ; then
13158
13159         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13160 fi
13161
13162 if test -n "$cf_new_extra_cppflags" ; then
13163
13164         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13165 fi
13166
13167                 ;;
13168         esac
13169         ;;
13170 esac
13171
13172 echo "$as_me:13172: checking if you want to perform memory-leak testing" >&5
13173 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13174
13175 # Check whether --enable-leaks or --disable-leaks was given.
13176 if test "${enable_leaks+set}" = set; then
13177   enableval="$enable_leaks"
13178   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13179 else
13180   : ${with_no_leaks:=no}
13181 fi;
13182 echo "$as_me:13182: result: $with_no_leaks" >&5
13183 echo "${ECHO_T}$with_no_leaks" >&6
13184
13185 if test "$with_no_leaks" = yes ; then
13186         cat >>confdefs.h <<\EOF
13187 #define NO_LEAKS 1
13188 EOF
13189
13190         cat >>confdefs.h <<\EOF
13191 #define YY_NO_LEAKS 1
13192 EOF
13193
13194 fi
13195
13196 cat >>confdefs.h <<\EOF
13197 #define HAVE_NC_ALLOC_H 1
13198 EOF
13199
13200 ###     use option --enable-expanded to generate certain macros as functions
13201
13202 # Check whether --enable-expanded or --disable-expanded was given.
13203 if test "${enable_expanded+set}" = set; then
13204   enableval="$enable_expanded"
13205   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13206 #define NCURSES_EXPANDED 1
13207 EOF
13208
13209 fi;
13210
13211 ###     use option --disable-macros to suppress macros in favor of functions
13212
13213 # Check whether --enable-macros or --disable-macros was given.
13214 if test "${enable_macros+set}" = set; then
13215   enableval="$enable_macros"
13216   test "$enableval" = no && cat >>confdefs.h <<\EOF
13217 #define NCURSES_NOMACROS 1
13218 EOF
13219
13220 fi;
13221
13222 # Normally we only add trace() to the debug-library.  Allow this to be
13223 # extended to all models of the ncurses library:
13224 cf_all_traces=no
13225 case "$CFLAGS $CPPFLAGS" in
13226 *-DTRACE*)
13227         cf_all_traces=yes
13228         ;;
13229 esac
13230
13231 echo "$as_me:13231: checking whether to add trace feature to all models" >&5
13232 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13233
13234 # Check whether --with-trace or --without-trace was given.
13235 if test "${with_trace+set}" = set; then
13236   withval="$with_trace"
13237   cf_with_trace=$withval
13238 else
13239   cf_with_trace=$cf_all_traces
13240 fi;
13241 echo "$as_me:13241: result: $cf_with_trace" >&5
13242 echo "${ECHO_T}$cf_with_trace" >&6
13243
13244 if test "$cf_with_trace" = yes ; then
13245         LIB_TRACING=all
13246         ADA_TRACE=TRUE
13247
13248 cf_fix_cppflags=no
13249 cf_new_cflags=
13250 cf_new_cppflags=
13251 cf_new_extra_cppflags=
13252
13253 for cf_add_cflags in -DTRACE
13254 do
13255 case $cf_fix_cppflags in
13256 no)
13257         case $cf_add_cflags in #(vi
13258         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13259                 case $cf_add_cflags in
13260                 -D*)
13261                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13262
13263                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13264                                 && test -z "${cf_tst_cflags}" \
13265                                 && cf_fix_cppflags=yes
13266
13267                         if test $cf_fix_cppflags = yes ; then
13268                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13269                                 continue
13270                         elif test "${cf_tst_cflags}" = "\"'" ; then
13271                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13272                                 continue
13273                         fi
13274                         ;;
13275                 esac
13276                 case "$CPPFLAGS" in
13277                 *$cf_add_cflags) #(vi
13278                         ;;
13279                 *) #(vi
13280                         case $cf_add_cflags in #(vi
13281                         -D*)
13282                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13283
13284 CPPFLAGS=`echo "$CPPFLAGS" | \
13285         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13286                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13287
13288                                 ;;
13289                         esac
13290                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13291                         ;;
13292                 esac
13293                 ;;
13294         *)
13295                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13296                 ;;
13297         esac
13298         ;;
13299 yes)
13300         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13301
13302         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13303
13304         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13305                 && test -z "${cf_tst_cflags}" \
13306                 && cf_fix_cppflags=no
13307         ;;
13308 esac
13309 done
13310
13311 if test -n "$cf_new_cflags" ; then
13312
13313         CFLAGS="$CFLAGS $cf_new_cflags"
13314 fi
13315
13316 if test -n "$cf_new_cppflags" ; then
13317
13318         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13319 fi
13320
13321 if test -n "$cf_new_extra_cppflags" ; then
13322
13323         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13324 fi
13325
13326 else
13327         LIB_TRACING=DEBUG
13328         ADA_TRACE=FALSE
13329 fi
13330
13331 ###     Checks for libraries.
13332 case $cf_cv_system_name in #(vi
13333 *mingw32*) #(vi
13334         ;;
13335 *)
13336 echo "$as_me:13336: checking for gettimeofday" >&5
13337 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13338 if test "${ac_cv_func_gettimeofday+set}" = set; then
13339   echo $ECHO_N "(cached) $ECHO_C" >&6
13340 else
13341   cat >conftest.$ac_ext <<_ACEOF
13342 #line 13342 "configure"
13343 #include "confdefs.h"
13344 /* System header to define __stub macros and hopefully few prototypes,
13345     which can conflict with char gettimeofday (); below.  */
13346 #include <assert.h>
13347 /* Override any gcc2 internal prototype to avoid an error.  */
13348 #ifdef __cplusplus
13349 extern "C"
13350 #endif
13351 /* We use char because int might match the return type of a gcc2
13352    builtin and then its argument prototype would still apply.  */
13353 char gettimeofday ();
13354 char (*f) ();
13355
13356 int
13357 main ()
13358 {
13359 /* The GNU C library defines this for functions which it implements
13360     to always fail with ENOSYS.  Some functions are actually named
13361     something starting with __ and the normal name is an alias.  */
13362 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13363 choke me
13364 #else
13365 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13366 #endif
13367
13368   ;
13369   return 0;
13370 }
13371 _ACEOF
13372 rm -f conftest.$ac_objext conftest$ac_exeext
13373 if { (eval echo "$as_me:13373: \"$ac_link\"") >&5
13374   (eval $ac_link) 2>&5
13375   ac_status=$?
13376   echo "$as_me:13376: \$? = $ac_status" >&5
13377   (exit $ac_status); } &&
13378          { ac_try='test -s conftest$ac_exeext'
13379   { (eval echo "$as_me:13379: \"$ac_try\"") >&5
13380   (eval $ac_try) 2>&5
13381   ac_status=$?
13382   echo "$as_me:13382: \$? = $ac_status" >&5
13383   (exit $ac_status); }; }; then
13384   ac_cv_func_gettimeofday=yes
13385 else
13386   echo "$as_me: failed program was:" >&5
13387 cat conftest.$ac_ext >&5
13388 ac_cv_func_gettimeofday=no
13389 fi
13390 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13391 fi
13392 echo "$as_me:13392: result: $ac_cv_func_gettimeofday" >&5
13393 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13394 if test $ac_cv_func_gettimeofday = yes; then
13395   cat >>confdefs.h <<\EOF
13396 #define HAVE_GETTIMEOFDAY 1
13397 EOF
13398
13399 else
13400
13401 echo "$as_me:13401: checking for gettimeofday in -lbsd" >&5
13402 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13403 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13404   echo $ECHO_N "(cached) $ECHO_C" >&6
13405 else
13406   ac_check_lib_save_LIBS=$LIBS
13407 LIBS="-lbsd  $LIBS"
13408 cat >conftest.$ac_ext <<_ACEOF
13409 #line 13409 "configure"
13410 #include "confdefs.h"
13411
13412 /* Override any gcc2 internal prototype to avoid an error.  */
13413 #ifdef __cplusplus
13414 extern "C"
13415 #endif
13416 /* We use char because int might match the return type of a gcc2
13417    builtin and then its argument prototype would still apply.  */
13418 char gettimeofday ();
13419 int
13420 main ()
13421 {
13422 gettimeofday ();
13423   ;
13424   return 0;
13425 }
13426 _ACEOF
13427 rm -f conftest.$ac_objext conftest$ac_exeext
13428 if { (eval echo "$as_me:13428: \"$ac_link\"") >&5
13429   (eval $ac_link) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit $ac_status); } &&
13433          { ac_try='test -s conftest$ac_exeext'
13434   { (eval echo "$as_me:13434: \"$ac_try\"") >&5
13435   (eval $ac_try) 2>&5
13436   ac_status=$?
13437   echo "$as_me:13437: \$? = $ac_status" >&5
13438   (exit $ac_status); }; }; then
13439   ac_cv_lib_bsd_gettimeofday=yes
13440 else
13441   echo "$as_me: failed program was:" >&5
13442 cat conftest.$ac_ext >&5
13443 ac_cv_lib_bsd_gettimeofday=no
13444 fi
13445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13446 LIBS=$ac_check_lib_save_LIBS
13447 fi
13448 echo "$as_me:13448: result: $ac_cv_lib_bsd_gettimeofday" >&5
13449 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13450 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13451   cat >>confdefs.h <<\EOF
13452 #define HAVE_GETTIMEOFDAY 1
13453 EOF
13454
13455         LIBS="-lbsd $LIBS"
13456 fi
13457
13458 fi
13459         ;;
13460 esac
13461
13462 echo "$as_me:13462: checking if -lm needed for math functions" >&5
13463 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13464 if test "${cf_cv_need_libm+set}" = set; then
13465   echo $ECHO_N "(cached) $ECHO_C" >&6
13466 else
13467
13468         cat >conftest.$ac_ext <<_ACEOF
13469 #line 13469 "configure"
13470 #include "confdefs.h"
13471
13472         #include <stdio.h>
13473         #include <math.h>
13474
13475 int
13476 main ()
13477 {
13478 double x = rand(); printf("result = %g\n", sin(x))
13479   ;
13480   return 0;
13481 }
13482 _ACEOF
13483 rm -f conftest.$ac_objext conftest$ac_exeext
13484 if { (eval echo "$as_me:13484: \"$ac_link\"") >&5
13485   (eval $ac_link) 2>&5
13486   ac_status=$?
13487   echo "$as_me:13487: \$? = $ac_status" >&5
13488   (exit $ac_status); } &&
13489          { ac_try='test -s conftest$ac_exeext'
13490   { (eval echo "$as_me:13490: \"$ac_try\"") >&5
13491   (eval $ac_try) 2>&5
13492   ac_status=$?
13493   echo "$as_me:13493: \$? = $ac_status" >&5
13494   (exit $ac_status); }; }; then
13495   cf_cv_need_libm=no
13496 else
13497   echo "$as_me: failed program was:" >&5
13498 cat conftest.$ac_ext >&5
13499 cf_cv_need_libm=yes
13500 fi
13501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13502 fi
13503 echo "$as_me:13503: result: $cf_cv_need_libm" >&5
13504 echo "${ECHO_T}$cf_cv_need_libm" >&6
13505 if test "$cf_cv_need_libm" = yes
13506 then
13507 MATH_LIB=-lm
13508 fi
13509
13510 ###     Checks for header files.
13511 echo "$as_me:13511: checking for ANSI C header files" >&5
13512 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13513 if test "${ac_cv_header_stdc+set}" = set; then
13514   echo $ECHO_N "(cached) $ECHO_C" >&6
13515 else
13516   cat >conftest.$ac_ext <<_ACEOF
13517 #line 13517 "configure"
13518 #include "confdefs.h"
13519 #include <stdlib.h>
13520 #include <stdarg.h>
13521 #include <string.h>
13522 #include <float.h>
13523
13524 _ACEOF
13525 if { (eval echo "$as_me:13525: \"$ac_cpp conftest.$ac_ext\"") >&5
13526   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13527   ac_status=$?
13528   egrep -v '^ *\+' conftest.er1 >conftest.err
13529   rm -f conftest.er1
13530   cat conftest.err >&5
13531   echo "$as_me:13531: \$? = $ac_status" >&5
13532   (exit $ac_status); } >/dev/null; then
13533   if test -s conftest.err; then
13534     ac_cpp_err=$ac_c_preproc_warn_flag
13535   else
13536     ac_cpp_err=
13537   fi
13538 else
13539   ac_cpp_err=yes
13540 fi
13541 if test -z "$ac_cpp_err"; then
13542   ac_cv_header_stdc=yes
13543 else
13544   echo "$as_me: failed program was:" >&5
13545   cat conftest.$ac_ext >&5
13546   ac_cv_header_stdc=no
13547 fi
13548 rm -f conftest.err conftest.$ac_ext
13549
13550 if test $ac_cv_header_stdc = yes; then
13551   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13552   cat >conftest.$ac_ext <<_ACEOF
13553 #line 13553 "configure"
13554 #include "confdefs.h"
13555 #include <string.h>
13556
13557 _ACEOF
13558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13559   egrep "memchr" >/dev/null 2>&1; then
13560   :
13561 else
13562   ac_cv_header_stdc=no
13563 fi
13564 rm -rf conftest*
13565
13566 fi
13567
13568 if test $ac_cv_header_stdc = yes; then
13569   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13570   cat >conftest.$ac_ext <<_ACEOF
13571 #line 13571 "configure"
13572 #include "confdefs.h"
13573 #include <stdlib.h>
13574
13575 _ACEOF
13576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13577   egrep "free" >/dev/null 2>&1; then
13578   :
13579 else
13580   ac_cv_header_stdc=no
13581 fi
13582 rm -rf conftest*
13583
13584 fi
13585
13586 if test $ac_cv_header_stdc = yes; then
13587   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13588   if test "$cross_compiling" = yes; then
13589   :
13590 else
13591   cat >conftest.$ac_ext <<_ACEOF
13592 #line 13592 "configure"
13593 #include "confdefs.h"
13594 #include <ctype.h>
13595 #if ((' ' & 0x0FF) == 0x020)
13596 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13597 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13598 #else
13599 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13600                      || ('j' <= (c) && (c) <= 'r') \
13601                      || ('s' <= (c) && (c) <= 'z'))
13602 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13603 #endif
13604
13605 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13606 int
13607 main ()
13608 {
13609   int i;
13610   for (i = 0; i < 256; i++)
13611     if (XOR (islower (i), ISLOWER (i))
13612         || toupper (i) != TOUPPER (i))
13613       $ac_main_return(2);
13614   $ac_main_return (0);
13615 }
13616 _ACEOF
13617 rm -f conftest$ac_exeext
13618 if { (eval echo "$as_me:13618: \"$ac_link\"") >&5
13619   (eval $ac_link) 2>&5
13620   ac_status=$?
13621   echo "$as_me:13621: \$? = $ac_status" >&5
13622   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13623   { (eval echo "$as_me:13623: \"$ac_try\"") >&5
13624   (eval $ac_try) 2>&5
13625   ac_status=$?
13626   echo "$as_me:13626: \$? = $ac_status" >&5
13627   (exit $ac_status); }; }; then
13628   :
13629 else
13630   echo "$as_me: program exited with status $ac_status" >&5
13631 echo "$as_me: failed program was:" >&5
13632 cat conftest.$ac_ext >&5
13633 ac_cv_header_stdc=no
13634 fi
13635 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13636 fi
13637 fi
13638 fi
13639 echo "$as_me:13639: result: $ac_cv_header_stdc" >&5
13640 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13641 if test $ac_cv_header_stdc = yes; then
13642
13643 cat >>confdefs.h <<\EOF
13644 #define STDC_HEADERS 1
13645 EOF
13646
13647 fi
13648
13649 ac_header_dirent=no
13650 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13651   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13652 echo "$as_me:13652: checking for $ac_hdr that defines DIR" >&5
13653 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13654 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13655   echo $ECHO_N "(cached) $ECHO_C" >&6
13656 else
13657   cat >conftest.$ac_ext <<_ACEOF
13658 #line 13658 "configure"
13659 #include "confdefs.h"
13660 #include <sys/types.h>
13661 #include <$ac_hdr>
13662
13663 int
13664 main ()
13665 {
13666 if ((DIR *) 0)
13667 return 0;
13668   ;
13669   return 0;
13670 }
13671 _ACEOF
13672 rm -f conftest.$ac_objext
13673 if { (eval echo "$as_me:13673: \"$ac_compile\"") >&5
13674   (eval $ac_compile) 2>&5
13675   ac_status=$?
13676   echo "$as_me:13676: \$? = $ac_status" >&5
13677   (exit $ac_status); } &&
13678          { ac_try='test -s conftest.$ac_objext'
13679   { (eval echo "$as_me:13679: \"$ac_try\"") >&5
13680   (eval $ac_try) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit $ac_status); }; }; then
13684   eval "$as_ac_Header=yes"
13685 else
13686   echo "$as_me: failed program was:" >&5
13687 cat conftest.$ac_ext >&5
13688 eval "$as_ac_Header=no"
13689 fi
13690 rm -f conftest.$ac_objext conftest.$ac_ext
13691 fi
13692 echo "$as_me:13692: result: `eval echo '${'$as_ac_Header'}'`" >&5
13693 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13694 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13695   cat >>confdefs.h <<EOF
13696 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13697 EOF
13698
13699 ac_header_dirent=$ac_hdr; break
13700 fi
13701
13702 done
13703 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13704 if test $ac_header_dirent = dirent.h; then
13705   echo "$as_me:13705: checking for opendir in -ldir" >&5
13706 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13707 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13708   echo $ECHO_N "(cached) $ECHO_C" >&6
13709 else
13710   ac_check_lib_save_LIBS=$LIBS
13711 LIBS="-ldir  $LIBS"
13712 cat >conftest.$ac_ext <<_ACEOF
13713 #line 13713 "configure"
13714 #include "confdefs.h"
13715
13716 /* Override any gcc2 internal prototype to avoid an error.  */
13717 #ifdef __cplusplus
13718 extern "C"
13719 #endif
13720 /* We use char because int might match the return type of a gcc2
13721    builtin and then its argument prototype would still apply.  */
13722 char opendir ();
13723 int
13724 main ()
13725 {
13726 opendir ();
13727   ;
13728   return 0;
13729 }
13730 _ACEOF
13731 rm -f conftest.$ac_objext conftest$ac_exeext
13732 if { (eval echo "$as_me:13732: \"$ac_link\"") >&5
13733   (eval $ac_link) 2>&5
13734   ac_status=$?
13735   echo "$as_me:13735: \$? = $ac_status" >&5
13736   (exit $ac_status); } &&
13737          { ac_try='test -s conftest$ac_exeext'
13738   { (eval echo "$as_me:13738: \"$ac_try\"") >&5
13739   (eval $ac_try) 2>&5
13740   ac_status=$?
13741   echo "$as_me:13741: \$? = $ac_status" >&5
13742   (exit $ac_status); }; }; then
13743   ac_cv_lib_dir_opendir=yes
13744 else
13745   echo "$as_me: failed program was:" >&5
13746 cat conftest.$ac_ext >&5
13747 ac_cv_lib_dir_opendir=no
13748 fi
13749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13750 LIBS=$ac_check_lib_save_LIBS
13751 fi
13752 echo "$as_me:13752: result: $ac_cv_lib_dir_opendir" >&5
13753 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13754 if test $ac_cv_lib_dir_opendir = yes; then
13755   LIBS="$LIBS -ldir"
13756 fi
13757
13758 else
13759   echo "$as_me:13759: checking for opendir in -lx" >&5
13760 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13761 if test "${ac_cv_lib_x_opendir+set}" = set; then
13762   echo $ECHO_N "(cached) $ECHO_C" >&6
13763 else
13764   ac_check_lib_save_LIBS=$LIBS
13765 LIBS="-lx  $LIBS"
13766 cat >conftest.$ac_ext <<_ACEOF
13767 #line 13767 "configure"
13768 #include "confdefs.h"
13769
13770 /* Override any gcc2 internal prototype to avoid an error.  */
13771 #ifdef __cplusplus
13772 extern "C"
13773 #endif
13774 /* We use char because int might match the return type of a gcc2
13775    builtin and then its argument prototype would still apply.  */
13776 char opendir ();
13777 int
13778 main ()
13779 {
13780 opendir ();
13781   ;
13782   return 0;
13783 }
13784 _ACEOF
13785 rm -f conftest.$ac_objext conftest$ac_exeext
13786 if { (eval echo "$as_me:13786: \"$ac_link\"") >&5
13787   (eval $ac_link) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit $ac_status); } &&
13791          { ac_try='test -s conftest$ac_exeext'
13792   { (eval echo "$as_me:13792: \"$ac_try\"") >&5
13793   (eval $ac_try) 2>&5
13794   ac_status=$?
13795   echo "$as_me:13795: \$? = $ac_status" >&5
13796   (exit $ac_status); }; }; then
13797   ac_cv_lib_x_opendir=yes
13798 else
13799   echo "$as_me: failed program was:" >&5
13800 cat conftest.$ac_ext >&5
13801 ac_cv_lib_x_opendir=no
13802 fi
13803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13804 LIBS=$ac_check_lib_save_LIBS
13805 fi
13806 echo "$as_me:13806: result: $ac_cv_lib_x_opendir" >&5
13807 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13808 if test $ac_cv_lib_x_opendir = yes; then
13809   LIBS="$LIBS -lx"
13810 fi
13811
13812 fi
13813
13814 echo "$as_me:13814: checking whether time.h and sys/time.h may both be included" >&5
13815 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13816 if test "${ac_cv_header_time+set}" = set; then
13817   echo $ECHO_N "(cached) $ECHO_C" >&6
13818 else
13819   cat >conftest.$ac_ext <<_ACEOF
13820 #line 13820 "configure"
13821 #include "confdefs.h"
13822 #include <sys/types.h>
13823 #include <sys/time.h>
13824 #include <time.h>
13825
13826 int
13827 main ()
13828 {
13829 if ((struct tm *) 0)
13830 return 0;
13831   ;
13832   return 0;
13833 }
13834 _ACEOF
13835 rm -f conftest.$ac_objext
13836 if { (eval echo "$as_me:13836: \"$ac_compile\"") >&5
13837   (eval $ac_compile) 2>&5
13838   ac_status=$?
13839   echo "$as_me:13839: \$? = $ac_status" >&5
13840   (exit $ac_status); } &&
13841          { ac_try='test -s conftest.$ac_objext'
13842   { (eval echo "$as_me:13842: \"$ac_try\"") >&5
13843   (eval $ac_try) 2>&5
13844   ac_status=$?
13845   echo "$as_me:13845: \$? = $ac_status" >&5
13846   (exit $ac_status); }; }; then
13847   ac_cv_header_time=yes
13848 else
13849   echo "$as_me: failed program was:" >&5
13850 cat conftest.$ac_ext >&5
13851 ac_cv_header_time=no
13852 fi
13853 rm -f conftest.$ac_objext conftest.$ac_ext
13854 fi
13855 echo "$as_me:13855: result: $ac_cv_header_time" >&5
13856 echo "${ECHO_T}$ac_cv_header_time" >&6
13857 if test $ac_cv_header_time = yes; then
13858
13859 cat >>confdefs.h <<\EOF
13860 #define TIME_WITH_SYS_TIME 1
13861 EOF
13862
13863 fi
13864
13865 cf_regex_func=no
13866
13867 cf_regex_libs="regex re"
13868 case $host_os in #(vi
13869 mingw*)
13870         cf_regex_libs="gnurx $cf_regex_libs"
13871         ;;
13872 esac
13873
13874 echo "$as_me:13874: checking for regcomp" >&5
13875 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13876 if test "${ac_cv_func_regcomp+set}" = set; then
13877   echo $ECHO_N "(cached) $ECHO_C" >&6
13878 else
13879   cat >conftest.$ac_ext <<_ACEOF
13880 #line 13880 "configure"
13881 #include "confdefs.h"
13882 /* System header to define __stub macros and hopefully few prototypes,
13883     which can conflict with char regcomp (); below.  */
13884 #include <assert.h>
13885 /* Override any gcc2 internal prototype to avoid an error.  */
13886 #ifdef __cplusplus
13887 extern "C"
13888 #endif
13889 /* We use char because int might match the return type of a gcc2
13890    builtin and then its argument prototype would still apply.  */
13891 char regcomp ();
13892 char (*f) ();
13893
13894 int
13895 main ()
13896 {
13897 /* The GNU C library defines this for functions which it implements
13898     to always fail with ENOSYS.  Some functions are actually named
13899     something starting with __ and the normal name is an alias.  */
13900 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13901 choke me
13902 #else
13903 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13904 #endif
13905
13906   ;
13907   return 0;
13908 }
13909 _ACEOF
13910 rm -f conftest.$ac_objext conftest$ac_exeext
13911 if { (eval echo "$as_me:13911: \"$ac_link\"") >&5
13912   (eval $ac_link) 2>&5
13913   ac_status=$?
13914   echo "$as_me:13914: \$? = $ac_status" >&5
13915   (exit $ac_status); } &&
13916          { ac_try='test -s conftest$ac_exeext'
13917   { (eval echo "$as_me:13917: \"$ac_try\"") >&5
13918   (eval $ac_try) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit $ac_status); }; }; then
13922   ac_cv_func_regcomp=yes
13923 else
13924   echo "$as_me: failed program was:" >&5
13925 cat conftest.$ac_ext >&5
13926 ac_cv_func_regcomp=no
13927 fi
13928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13929 fi
13930 echo "$as_me:13930: result: $ac_cv_func_regcomp" >&5
13931 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13932 if test $ac_cv_func_regcomp = yes; then
13933   cf_regex_func=regcomp
13934 else
13935
13936         for cf_regex_lib in $cf_regex_libs
13937         do
13938                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13939 echo "$as_me:13939: checking for regcomp in -l$cf_regex_lib" >&5
13940 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13941 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13942   echo $ECHO_N "(cached) $ECHO_C" >&6
13943 else
13944   ac_check_lib_save_LIBS=$LIBS
13945 LIBS="-l$cf_regex_lib  $LIBS"
13946 cat >conftest.$ac_ext <<_ACEOF
13947 #line 13947 "configure"
13948 #include "confdefs.h"
13949
13950 /* Override any gcc2 internal prototype to avoid an error.  */
13951 #ifdef __cplusplus
13952 extern "C"
13953 #endif
13954 /* We use char because int might match the return type of a gcc2
13955    builtin and then its argument prototype would still apply.  */
13956 char regcomp ();
13957 int
13958 main ()
13959 {
13960 regcomp ();
13961   ;
13962   return 0;
13963 }
13964 _ACEOF
13965 rm -f conftest.$ac_objext conftest$ac_exeext
13966 if { (eval echo "$as_me:13966: \"$ac_link\"") >&5
13967   (eval $ac_link) 2>&5
13968   ac_status=$?
13969   echo "$as_me:13969: \$? = $ac_status" >&5
13970   (exit $ac_status); } &&
13971          { ac_try='test -s conftest$ac_exeext'
13972   { (eval echo "$as_me:13972: \"$ac_try\"") >&5
13973   (eval $ac_try) 2>&5
13974   ac_status=$?
13975   echo "$as_me:13975: \$? = $ac_status" >&5
13976   (exit $ac_status); }; }; then
13977   eval "$as_ac_Lib=yes"
13978 else
13979   echo "$as_me: failed program was:" >&5
13980 cat conftest.$ac_ext >&5
13981 eval "$as_ac_Lib=no"
13982 fi
13983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13984 LIBS=$ac_check_lib_save_LIBS
13985 fi
13986 echo "$as_me:13986: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13987 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13988 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13989
13990                                 LIBS="-l$cf_regex_lib $LIBS"
13991                                 cf_regex_func=regcomp
13992                                 break
13993 fi
13994
13995         done
13996
13997 fi
13998
13999 if test "$cf_regex_func" = no ; then
14000         echo "$as_me:14000: checking for compile" >&5
14001 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14002 if test "${ac_cv_func_compile+set}" = set; then
14003   echo $ECHO_N "(cached) $ECHO_C" >&6
14004 else
14005   cat >conftest.$ac_ext <<_ACEOF
14006 #line 14006 "configure"
14007 #include "confdefs.h"
14008 /* System header to define __stub macros and hopefully few prototypes,
14009     which can conflict with char compile (); below.  */
14010 #include <assert.h>
14011 /* Override any gcc2 internal prototype to avoid an error.  */
14012 #ifdef __cplusplus
14013 extern "C"
14014 #endif
14015 /* We use char because int might match the return type of a gcc2
14016    builtin and then its argument prototype would still apply.  */
14017 char compile ();
14018 char (*f) ();
14019
14020 int
14021 main ()
14022 {
14023 /* The GNU C library defines this for functions which it implements
14024     to always fail with ENOSYS.  Some functions are actually named
14025     something starting with __ and the normal name is an alias.  */
14026 #if defined (__stub_compile) || defined (__stub___compile)
14027 choke me
14028 #else
14029 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14030 #endif
14031
14032   ;
14033   return 0;
14034 }
14035 _ACEOF
14036 rm -f conftest.$ac_objext conftest$ac_exeext
14037 if { (eval echo "$as_me:14037: \"$ac_link\"") >&5
14038   (eval $ac_link) 2>&5
14039   ac_status=$?
14040   echo "$as_me:14040: \$? = $ac_status" >&5
14041   (exit $ac_status); } &&
14042          { ac_try='test -s conftest$ac_exeext'
14043   { (eval echo "$as_me:14043: \"$ac_try\"") >&5
14044   (eval $ac_try) 2>&5
14045   ac_status=$?
14046   echo "$as_me:14046: \$? = $ac_status" >&5
14047   (exit $ac_status); }; }; then
14048   ac_cv_func_compile=yes
14049 else
14050   echo "$as_me: failed program was:" >&5
14051 cat conftest.$ac_ext >&5
14052 ac_cv_func_compile=no
14053 fi
14054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14055 fi
14056 echo "$as_me:14056: result: $ac_cv_func_compile" >&5
14057 echo "${ECHO_T}$ac_cv_func_compile" >&6
14058 if test $ac_cv_func_compile = yes; then
14059   cf_regex_func=compile
14060 else
14061
14062                 echo "$as_me:14062: checking for compile in -lgen" >&5
14063 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14064 if test "${ac_cv_lib_gen_compile+set}" = set; then
14065   echo $ECHO_N "(cached) $ECHO_C" >&6
14066 else
14067   ac_check_lib_save_LIBS=$LIBS
14068 LIBS="-lgen  $LIBS"
14069 cat >conftest.$ac_ext <<_ACEOF
14070 #line 14070 "configure"
14071 #include "confdefs.h"
14072
14073 /* Override any gcc2 internal prototype to avoid an error.  */
14074 #ifdef __cplusplus
14075 extern "C"
14076 #endif
14077 /* We use char because int might match the return type of a gcc2
14078    builtin and then its argument prototype would still apply.  */
14079 char compile ();
14080 int
14081 main ()
14082 {
14083 compile ();
14084   ;
14085   return 0;
14086 }
14087 _ACEOF
14088 rm -f conftest.$ac_objext conftest$ac_exeext
14089 if { (eval echo "$as_me:14089: \"$ac_link\"") >&5
14090   (eval $ac_link) 2>&5
14091   ac_status=$?
14092   echo "$as_me:14092: \$? = $ac_status" >&5
14093   (exit $ac_status); } &&
14094          { ac_try='test -s conftest$ac_exeext'
14095   { (eval echo "$as_me:14095: \"$ac_try\"") >&5
14096   (eval $ac_try) 2>&5
14097   ac_status=$?
14098   echo "$as_me:14098: \$? = $ac_status" >&5
14099   (exit $ac_status); }; }; then
14100   ac_cv_lib_gen_compile=yes
14101 else
14102   echo "$as_me: failed program was:" >&5
14103 cat conftest.$ac_ext >&5
14104 ac_cv_lib_gen_compile=no
14105 fi
14106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14107 LIBS=$ac_check_lib_save_LIBS
14108 fi
14109 echo "$as_me:14109: result: $ac_cv_lib_gen_compile" >&5
14110 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14111 if test $ac_cv_lib_gen_compile = yes; then
14112
14113                                 LIBS="-lgen $LIBS"
14114                                 cf_regex_func=compile
14115 fi
14116
14117 fi
14118
14119 fi
14120
14121 if test "$cf_regex_func" = no ; then
14122         { echo "$as_me:14122: WARNING: cannot find regular expression library" >&5
14123 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14124 fi
14125
14126 echo "$as_me:14126: checking for regular-expression headers" >&5
14127 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14128 if test "${cf_cv_regex_hdrs+set}" = set; then
14129   echo $ECHO_N "(cached) $ECHO_C" >&6
14130 else
14131
14132 cf_cv_regex_hdrs=no
14133 case $cf_regex_func in #(vi
14134 compile) #(vi
14135         for cf_regex_hdr in regexp.h regexpr.h
14136         do
14137                 cat >conftest.$ac_ext <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14140 #include <$cf_regex_hdr>
14141 int
14142 main ()
14143 {
14144
14145                         char *p = compile("", "", "", 0);
14146                         int x = step("", "");
14147
14148   ;
14149   return 0;
14150 }
14151 _ACEOF
14152 rm -f conftest.$ac_objext conftest$ac_exeext
14153 if { (eval echo "$as_me:14153: \"$ac_link\"") >&5
14154   (eval $ac_link) 2>&5
14155   ac_status=$?
14156   echo "$as_me:14156: \$? = $ac_status" >&5
14157   (exit $ac_status); } &&
14158          { ac_try='test -s conftest$ac_exeext'
14159   { (eval echo "$as_me:14159: \"$ac_try\"") >&5
14160   (eval $ac_try) 2>&5
14161   ac_status=$?
14162   echo "$as_me:14162: \$? = $ac_status" >&5
14163   (exit $ac_status); }; }; then
14164
14165                         cf_cv_regex_hdrs=$cf_regex_hdr
14166                         break
14167
14168 else
14169   echo "$as_me: failed program was:" >&5
14170 cat conftest.$ac_ext >&5
14171 fi
14172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14173         done
14174         ;;
14175 *)
14176         for cf_regex_hdr in regex.h
14177         do
14178                 cat >conftest.$ac_ext <<_ACEOF
14179 #line 14179 "configure"
14180 #include "confdefs.h"
14181 #include <sys/types.h>
14182 #include <$cf_regex_hdr>
14183 int
14184 main ()
14185 {
14186
14187                         regex_t *p;
14188                         int x = regcomp(p, "", 0);
14189                         int y = regexec(p, "", 0, 0, 0);
14190                         regfree(p);
14191
14192   ;
14193   return 0;
14194 }
14195 _ACEOF
14196 rm -f conftest.$ac_objext conftest$ac_exeext
14197 if { (eval echo "$as_me:14197: \"$ac_link\"") >&5
14198   (eval $ac_link) 2>&5
14199   ac_status=$?
14200   echo "$as_me:14200: \$? = $ac_status" >&5
14201   (exit $ac_status); } &&
14202          { ac_try='test -s conftest$ac_exeext'
14203   { (eval echo "$as_me:14203: \"$ac_try\"") >&5
14204   (eval $ac_try) 2>&5
14205   ac_status=$?
14206   echo "$as_me:14206: \$? = $ac_status" >&5
14207   (exit $ac_status); }; }; then
14208
14209                         cf_cv_regex_hdrs=$cf_regex_hdr
14210                         break
14211
14212 else
14213   echo "$as_me: failed program was:" >&5
14214 cat conftest.$ac_ext >&5
14215 fi
14216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14217         done
14218         ;;
14219 esac
14220
14221 fi
14222 echo "$as_me:14222: result: $cf_cv_regex_hdrs" >&5
14223 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14224
14225 case $cf_cv_regex_hdrs in #(vi
14226     no)        { echo "$as_me:14226: WARNING: no regular expression header found" >&5
14227 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14228     regex.h)   cat >>confdefs.h <<\EOF
14229 #define HAVE_REGEX_H_FUNCS 1
14230 EOF
14231  ;; #(vi
14232     regexp.h)  cat >>confdefs.h <<\EOF
14233 #define HAVE_REGEXP_H_FUNCS 1
14234 EOF
14235  ;; #(vi
14236     regexpr.h) cat >>confdefs.h <<\EOF
14237 #define HAVE_REGEXPR_H_FUNCS 1
14238 EOF
14239  ;;
14240 esac
14241
14242 for ac_header in \
14243 fcntl.h \
14244 getopt.h \
14245 limits.h \
14246 locale.h \
14247 math.h \
14248 poll.h \
14249 sys/bsdtypes.h \
14250 sys/ioctl.h \
14251 sys/param.h \
14252 sys/poll.h \
14253 sys/select.h \
14254 sys/time.h \
14255 sys/times.h \
14256 ttyent.h \
14257 unistd.h \
14258 wctype.h \
14259
14260 do
14261 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14262 echo "$as_me:14262: checking for $ac_header" >&5
14263 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14265   echo $ECHO_N "(cached) $ECHO_C" >&6
14266 else
14267   cat >conftest.$ac_ext <<_ACEOF
14268 #line 14268 "configure"
14269 #include "confdefs.h"
14270 #include <$ac_header>
14271 _ACEOF
14272 if { (eval echo "$as_me:14272: \"$ac_cpp conftest.$ac_ext\"") >&5
14273   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14274   ac_status=$?
14275   egrep -v '^ *\+' conftest.er1 >conftest.err
14276   rm -f conftest.er1
14277   cat conftest.err >&5
14278   echo "$as_me:14278: \$? = $ac_status" >&5
14279   (exit $ac_status); } >/dev/null; then
14280   if test -s conftest.err; then
14281     ac_cpp_err=$ac_c_preproc_warn_flag
14282   else
14283     ac_cpp_err=
14284   fi
14285 else
14286   ac_cpp_err=yes
14287 fi
14288 if test -z "$ac_cpp_err"; then
14289   eval "$as_ac_Header=yes"
14290 else
14291   echo "$as_me: failed program was:" >&5
14292   cat conftest.$ac_ext >&5
14293   eval "$as_ac_Header=no"
14294 fi
14295 rm -f conftest.err conftest.$ac_ext
14296 fi
14297 echo "$as_me:14297: result: `eval echo '${'$as_ac_Header'}'`" >&5
14298 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14299 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14300   cat >>confdefs.h <<EOF
14301 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14302 EOF
14303
14304 fi
14305 done
14306
14307 for ac_header in unistd.h getopt.h
14308 do
14309 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14310 echo "$as_me:14310: checking for $ac_header" >&5
14311 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14312 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14313   echo $ECHO_N "(cached) $ECHO_C" >&6
14314 else
14315   cat >conftest.$ac_ext <<_ACEOF
14316 #line 14316 "configure"
14317 #include "confdefs.h"
14318 #include <$ac_header>
14319 _ACEOF
14320 if { (eval echo "$as_me:14320: \"$ac_cpp conftest.$ac_ext\"") >&5
14321   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14322   ac_status=$?
14323   egrep -v '^ *\+' conftest.er1 >conftest.err
14324   rm -f conftest.er1
14325   cat conftest.err >&5
14326   echo "$as_me:14326: \$? = $ac_status" >&5
14327   (exit $ac_status); } >/dev/null; then
14328   if test -s conftest.err; then
14329     ac_cpp_err=$ac_c_preproc_warn_flag
14330   else
14331     ac_cpp_err=
14332   fi
14333 else
14334   ac_cpp_err=yes
14335 fi
14336 if test -z "$ac_cpp_err"; then
14337   eval "$as_ac_Header=yes"
14338 else
14339   echo "$as_me: failed program was:" >&5
14340   cat conftest.$ac_ext >&5
14341   eval "$as_ac_Header=no"
14342 fi
14343 rm -f conftest.err conftest.$ac_ext
14344 fi
14345 echo "$as_me:14345: result: `eval echo '${'$as_ac_Header'}'`" >&5
14346 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14347 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14348   cat >>confdefs.h <<EOF
14349 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14350 EOF
14351
14352 fi
14353 done
14354
14355 echo "$as_me:14355: checking for header declaring getopt variables" >&5
14356 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14357 if test "${cf_cv_getopt_header+set}" = set; then
14358   echo $ECHO_N "(cached) $ECHO_C" >&6
14359 else
14360
14361 cf_cv_getopt_header=none
14362 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14363 do
14364 cat >conftest.$ac_ext <<_ACEOF
14365 #line 14365 "configure"
14366 #include "confdefs.h"
14367
14368 #include <$cf_header>
14369 int
14370 main ()
14371 {
14372 int x = optind; char *y = optarg
14373   ;
14374   return 0;
14375 }
14376 _ACEOF
14377 rm -f conftest.$ac_objext
14378 if { (eval echo "$as_me:14378: \"$ac_compile\"") >&5
14379   (eval $ac_compile) 2>&5
14380   ac_status=$?
14381   echo "$as_me:14381: \$? = $ac_status" >&5
14382   (exit $ac_status); } &&
14383          { ac_try='test -s conftest.$ac_objext'
14384   { (eval echo "$as_me:14384: \"$ac_try\"") >&5
14385   (eval $ac_try) 2>&5
14386   ac_status=$?
14387   echo "$as_me:14387: \$? = $ac_status" >&5
14388   (exit $ac_status); }; }; then
14389   cf_cv_getopt_header=$cf_header
14390  break
14391 else
14392   echo "$as_me: failed program was:" >&5
14393 cat conftest.$ac_ext >&5
14394 fi
14395 rm -f conftest.$ac_objext conftest.$ac_ext
14396 done
14397
14398 fi
14399 echo "$as_me:14399: result: $cf_cv_getopt_header" >&5
14400 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14401 if test $cf_cv_getopt_header != none ; then
14402         cat >>confdefs.h <<\EOF
14403 #define HAVE_GETOPT_HEADER 1
14404 EOF
14405
14406 fi
14407
14408 # check for ISC (this may also define _POSIX_SOURCE)
14409 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14410 if test "$ISC" = yes ; then
14411
14412 echo "$as_me:14412: checking for main in -lcposix" >&5
14413 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14414 if test "${ac_cv_lib_cposix_main+set}" = set; then
14415   echo $ECHO_N "(cached) $ECHO_C" >&6
14416 else
14417   ac_check_lib_save_LIBS=$LIBS
14418 LIBS="-lcposix  $LIBS"
14419 cat >conftest.$ac_ext <<_ACEOF
14420 #line 14420 "configure"
14421 #include "confdefs.h"
14422
14423 int
14424 main ()
14425 {
14426 main ();
14427   ;
14428   return 0;
14429 }
14430 _ACEOF
14431 rm -f conftest.$ac_objext conftest$ac_exeext
14432 if { (eval echo "$as_me:14432: \"$ac_link\"") >&5
14433   (eval $ac_link) 2>&5
14434   ac_status=$?
14435   echo "$as_me:14435: \$? = $ac_status" >&5
14436   (exit $ac_status); } &&
14437          { ac_try='test -s conftest$ac_exeext'
14438   { (eval echo "$as_me:14438: \"$ac_try\"") >&5
14439   (eval $ac_try) 2>&5
14440   ac_status=$?
14441   echo "$as_me:14441: \$? = $ac_status" >&5
14442   (exit $ac_status); }; }; then
14443   ac_cv_lib_cposix_main=yes
14444 else
14445   echo "$as_me: failed program was:" >&5
14446 cat conftest.$ac_ext >&5
14447 ac_cv_lib_cposix_main=no
14448 fi
14449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14450 LIBS=$ac_check_lib_save_LIBS
14451 fi
14452 echo "$as_me:14452: result: $ac_cv_lib_cposix_main" >&5
14453 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14454 if test $ac_cv_lib_cposix_main = yes; then
14455   cat >>confdefs.h <<EOF
14456 #define HAVE_LIBCPOSIX 1
14457 EOF
14458
14459   LIBS="-lcposix $LIBS"
14460
14461 fi
14462
14463         echo "$as_me:14463: checking for bzero in -linet" >&5
14464 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14465 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14466   echo $ECHO_N "(cached) $ECHO_C" >&6
14467 else
14468   ac_check_lib_save_LIBS=$LIBS
14469 LIBS="-linet  $LIBS"
14470 cat >conftest.$ac_ext <<_ACEOF
14471 #line 14471 "configure"
14472 #include "confdefs.h"
14473
14474 /* Override any gcc2 internal prototype to avoid an error.  */
14475 #ifdef __cplusplus
14476 extern "C"
14477 #endif
14478 /* We use char because int might match the return type of a gcc2
14479    builtin and then its argument prototype would still apply.  */
14480 char bzero ();
14481 int
14482 main ()
14483 {
14484 bzero ();
14485   ;
14486   return 0;
14487 }
14488 _ACEOF
14489 rm -f conftest.$ac_objext conftest$ac_exeext
14490 if { (eval echo "$as_me:14490: \"$ac_link\"") >&5
14491   (eval $ac_link) 2>&5
14492   ac_status=$?
14493   echo "$as_me:14493: \$? = $ac_status" >&5
14494   (exit $ac_status); } &&
14495          { ac_try='test -s conftest$ac_exeext'
14496   { (eval echo "$as_me:14496: \"$ac_try\"") >&5
14497   (eval $ac_try) 2>&5
14498   ac_status=$?
14499   echo "$as_me:14499: \$? = $ac_status" >&5
14500   (exit $ac_status); }; }; then
14501   ac_cv_lib_inet_bzero=yes
14502 else
14503   echo "$as_me: failed program was:" >&5
14504 cat conftest.$ac_ext >&5
14505 ac_cv_lib_inet_bzero=no
14506 fi
14507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14508 LIBS=$ac_check_lib_save_LIBS
14509 fi
14510 echo "$as_me:14510: result: $ac_cv_lib_inet_bzero" >&5
14511 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14512 if test $ac_cv_lib_inet_bzero = yes; then
14513   LIBS="-linet $LIBS"
14514 fi
14515 fi
14516
14517 echo "$as_me:14517: checking if sys/time.h works with sys/select.h" >&5
14518 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14519 if test "${cf_cv_sys_time_select+set}" = set; then
14520   echo $ECHO_N "(cached) $ECHO_C" >&6
14521 else
14522
14523 cat >conftest.$ac_ext <<_ACEOF
14524 #line 14524 "configure"
14525 #include "confdefs.h"
14526
14527 #include <sys/types.h>
14528 #ifdef HAVE_SYS_TIME_H
14529 #include <sys/time.h>
14530 #endif
14531 #ifdef HAVE_SYS_SELECT_H
14532 #include <sys/select.h>
14533 #endif
14534
14535 int
14536 main ()
14537 {
14538
14539   ;
14540   return 0;
14541 }
14542 _ACEOF
14543 rm -f conftest.$ac_objext
14544 if { (eval echo "$as_me:14544: \"$ac_compile\"") >&5
14545   (eval $ac_compile) 2>&5
14546   ac_status=$?
14547   echo "$as_me:14547: \$? = $ac_status" >&5
14548   (exit $ac_status); } &&
14549          { ac_try='test -s conftest.$ac_objext'
14550   { (eval echo "$as_me:14550: \"$ac_try\"") >&5
14551   (eval $ac_try) 2>&5
14552   ac_status=$?
14553   echo "$as_me:14553: \$? = $ac_status" >&5
14554   (exit $ac_status); }; }; then
14555   cf_cv_sys_time_select=yes
14556 else
14557   echo "$as_me: failed program was:" >&5
14558 cat conftest.$ac_ext >&5
14559 cf_cv_sys_time_select=no
14560 fi
14561 rm -f conftest.$ac_objext conftest.$ac_ext
14562
14563 fi
14564
14565 echo "$as_me:14565: result: $cf_cv_sys_time_select" >&5
14566 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14567 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14568 #define HAVE_SYS_TIME_SELECT 1
14569 EOF
14570
14571 ###     checks for compiler characteristics
14572 ac_ext=c
14573 ac_cpp='$CPP $CPPFLAGS'
14574 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14575 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14576 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14577 ac_main_return=return
14578
14579 echo "$as_me:14579: checking for $CC option to accept ANSI C" >&5
14580 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14581 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14582   echo $ECHO_N "(cached) $ECHO_C" >&6
14583 else
14584   ac_cv_prog_cc_stdc=no
14585 ac_save_CC=$CC
14586 cat >conftest.$ac_ext <<_ACEOF
14587 #line 14587 "configure"
14588 #include "confdefs.h"
14589 #include <stdarg.h>
14590 #include <stdio.h>
14591 #include <sys/types.h>
14592 #include <sys/stat.h>
14593 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14594 struct buf { int x; };
14595 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14596 static char *e (p, i)
14597      char **p;
14598      int i;
14599 {
14600   return p[i];
14601 }
14602 static char *f (char * (*g) (char **, int), char **p, ...)
14603 {
14604   char *s;
14605   va_list v;
14606   va_start (v,p);
14607   s = g (p, va_arg (v,int));
14608   va_end (v);
14609   return s;
14610 }
14611 int test (int i, double x);
14612 struct s1 {int (*f) (int a);};
14613 struct s2 {int (*f) (double a);};
14614 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14615 int argc;
14616 char **argv;
14617 int
14618 main ()
14619 {
14620 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14621   ;
14622   return 0;
14623 }
14624 _ACEOF
14625 # Don't try gcc -ansi; that turns off useful extensions and
14626 # breaks some systems' header files.
14627 # AIX                   -qlanglvl=ansi
14628 # Ultrix and OSF/1      -std1
14629 # HP-UX 10.20 and later -Ae
14630 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14631 # SVR4                  -Xc -D__EXTENSIONS__
14632 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14633 do
14634   CC="$ac_save_CC $ac_arg"
14635   rm -f conftest.$ac_objext
14636 if { (eval echo "$as_me:14636: \"$ac_compile\"") >&5
14637   (eval $ac_compile) 2>&5
14638   ac_status=$?
14639   echo "$as_me:14639: \$? = $ac_status" >&5
14640   (exit $ac_status); } &&
14641          { ac_try='test -s conftest.$ac_objext'
14642   { (eval echo "$as_me:14642: \"$ac_try\"") >&5
14643   (eval $ac_try) 2>&5
14644   ac_status=$?
14645   echo "$as_me:14645: \$? = $ac_status" >&5
14646   (exit $ac_status); }; }; then
14647   ac_cv_prog_cc_stdc=$ac_arg
14648 break
14649 else
14650   echo "$as_me: failed program was:" >&5
14651 cat conftest.$ac_ext >&5
14652 fi
14653 rm -f conftest.$ac_objext
14654 done
14655 rm -f conftest.$ac_ext conftest.$ac_objext
14656 CC=$ac_save_CC
14657
14658 fi
14659
14660 case "x$ac_cv_prog_cc_stdc" in
14661   x|xno)
14662     echo "$as_me:14662: result: none needed" >&5
14663 echo "${ECHO_T}none needed" >&6 ;;
14664   *)
14665     echo "$as_me:14665: result: $ac_cv_prog_cc_stdc" >&5
14666 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14667     CC="$CC $ac_cv_prog_cc_stdc" ;;
14668 esac
14669
14670 echo "$as_me:14670: checking for an ANSI C-conforming const" >&5
14671 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14672 if test "${ac_cv_c_const+set}" = set; then
14673   echo $ECHO_N "(cached) $ECHO_C" >&6
14674 else
14675   cat >conftest.$ac_ext <<_ACEOF
14676 #line 14676 "configure"
14677 #include "confdefs.h"
14678
14679 int
14680 main ()
14681 {
14682 /* FIXME: Include the comments suggested by Paul. */
14683 #ifndef __cplusplus
14684   /* Ultrix mips cc rejects this.  */
14685   typedef int charset[2];
14686   const charset x;
14687   /* SunOS 4.1.1 cc rejects this.  */
14688   char const *const *ccp;
14689   char **p;
14690   /* NEC SVR4.0.2 mips cc rejects this.  */
14691   struct point {int x, y;};
14692   static struct point const zero = {0,0};
14693   /* AIX XL C 1.02.0.0 rejects this.
14694      It does not let you subtract one const X* pointer from another in
14695      an arm of an if-expression whose if-part is not a constant
14696      expression */
14697   const char *g = "string";
14698   ccp = &g + (g ? g-g : 0);
14699   /* HPUX 7.0 cc rejects these. */
14700   ++ccp;
14701   p = (char**) ccp;
14702   ccp = (char const *const *) p;
14703   { /* SCO 3.2v4 cc rejects this.  */
14704     char *t;
14705     char const *s = 0 ? (char *) 0 : (char const *) 0;
14706
14707     *t++ = 0;
14708   }
14709   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14710     int x[] = {25, 17};
14711     const int *foo = &x[0];
14712     ++foo;
14713   }
14714   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14715     typedef const int *iptr;
14716     iptr p = 0;
14717     ++p;
14718   }
14719   { /* AIX XL C 1.02.0.0 rejects this saying
14720        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14721     struct s { int j; const int *ap[3]; };
14722     struct s *b; b->j = 5;
14723   }
14724   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14725     const int foo = 10;
14726   }
14727 #endif
14728
14729   ;
14730   return 0;
14731 }
14732 _ACEOF
14733 rm -f conftest.$ac_objext
14734 if { (eval echo "$as_me:14734: \"$ac_compile\"") >&5
14735   (eval $ac_compile) 2>&5
14736   ac_status=$?
14737   echo "$as_me:14737: \$? = $ac_status" >&5
14738   (exit $ac_status); } &&
14739          { ac_try='test -s conftest.$ac_objext'
14740   { (eval echo "$as_me:14740: \"$ac_try\"") >&5
14741   (eval $ac_try) 2>&5
14742   ac_status=$?
14743   echo "$as_me:14743: \$? = $ac_status" >&5
14744   (exit $ac_status); }; }; then
14745   ac_cv_c_const=yes
14746 else
14747   echo "$as_me: failed program was:" >&5
14748 cat conftest.$ac_ext >&5
14749 ac_cv_c_const=no
14750 fi
14751 rm -f conftest.$ac_objext conftest.$ac_ext
14752 fi
14753 echo "$as_me:14753: result: $ac_cv_c_const" >&5
14754 echo "${ECHO_T}$ac_cv_c_const" >&6
14755 if test $ac_cv_c_const = no; then
14756
14757 cat >>confdefs.h <<\EOF
14758 #define const
14759 EOF
14760
14761 fi
14762
14763 echo "$as_me:14763: checking for inline" >&5
14764 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14765 if test "${ac_cv_c_inline+set}" = set; then
14766   echo $ECHO_N "(cached) $ECHO_C" >&6
14767 else
14768   ac_cv_c_inline=no
14769 for ac_kw in inline __inline__ __inline; do
14770   cat >conftest.$ac_ext <<_ACEOF
14771 #line 14771 "configure"
14772 #include "confdefs.h"
14773 #ifndef __cplusplus
14774 static $ac_kw int static_foo () {return 0; }
14775 $ac_kw int foo () {return 0; }
14776 #endif
14777
14778 _ACEOF
14779 rm -f conftest.$ac_objext
14780 if { (eval echo "$as_me:14780: \"$ac_compile\"") >&5
14781   (eval $ac_compile) 2>&5
14782   ac_status=$?
14783   echo "$as_me:14783: \$? = $ac_status" >&5
14784   (exit $ac_status); } &&
14785          { ac_try='test -s conftest.$ac_objext'
14786   { (eval echo "$as_me:14786: \"$ac_try\"") >&5
14787   (eval $ac_try) 2>&5
14788   ac_status=$?
14789   echo "$as_me:14789: \$? = $ac_status" >&5
14790   (exit $ac_status); }; }; then
14791   ac_cv_c_inline=$ac_kw; break
14792 else
14793   echo "$as_me: failed program was:" >&5
14794 cat conftest.$ac_ext >&5
14795 fi
14796 rm -f conftest.$ac_objext conftest.$ac_ext
14797 done
14798
14799 fi
14800 echo "$as_me:14800: result: $ac_cv_c_inline" >&5
14801 echo "${ECHO_T}$ac_cv_c_inline" >&6
14802 case $ac_cv_c_inline in
14803   inline | yes) ;;
14804   no)
14805 cat >>confdefs.h <<\EOF
14806 #define inline
14807 EOF
14808  ;;
14809   *)  cat >>confdefs.h <<EOF
14810 #define inline $ac_cv_c_inline
14811 EOF
14812  ;;
14813 esac
14814
14815 NCURSES_INLINE=
14816 if test "$ac_cv_c_inline" != no ; then
14817   NCURSES_INLINE=inline
14818   if test "$INTEL_COMPILER" = yes
14819   then
14820     :
14821   elif test "$CLANG_COMPILER" = yes
14822   then
14823     :
14824   elif test "$GCC" = yes
14825   then
14826     echo "$as_me:14826: checking if $CC supports options to tune inlining" >&5
14827 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14828 if test "${cf_cv_gcc_inline+set}" = set; then
14829   echo $ECHO_N "(cached) $ECHO_C" >&6
14830 else
14831
14832       cf_save_CFLAGS=$CFLAGS
14833       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14834       cat >conftest.$ac_ext <<_ACEOF
14835 #line 14835 "configure"
14836 #include "confdefs.h"
14837 inline int foo(void) { return 1; }
14838 int
14839 main ()
14840 {
14841 ${cf_cv_main_return:-return} foo()
14842   ;
14843   return 0;
14844 }
14845 _ACEOF
14846 rm -f conftest.$ac_objext
14847 if { (eval echo "$as_me:14847: \"$ac_compile\"") >&5
14848   (eval $ac_compile) 2>&5
14849   ac_status=$?
14850   echo "$as_me:14850: \$? = $ac_status" >&5
14851   (exit $ac_status); } &&
14852          { ac_try='test -s conftest.$ac_objext'
14853   { (eval echo "$as_me:14853: \"$ac_try\"") >&5
14854   (eval $ac_try) 2>&5
14855   ac_status=$?
14856   echo "$as_me:14856: \$? = $ac_status" >&5
14857   (exit $ac_status); }; }; then
14858   cf_cv_gcc_inline=yes
14859 else
14860   echo "$as_me: failed program was:" >&5
14861 cat conftest.$ac_ext >&5
14862 cf_cv_gcc_inline=no
14863 fi
14864 rm -f conftest.$ac_objext conftest.$ac_ext
14865       CFLAGS=$cf_save_CFLAGS
14866
14867 fi
14868 echo "$as_me:14868: result: $cf_cv_gcc_inline" >&5
14869 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14870     if test "$cf_cv_gcc_inline" = yes ; then
14871
14872 cf_fix_cppflags=no
14873 cf_new_cflags=
14874 cf_new_cppflags=
14875 cf_new_extra_cppflags=
14876
14877 for cf_add_cflags in --param max-inline-insns-single=1200
14878 do
14879 case $cf_fix_cppflags in
14880 no)
14881         case $cf_add_cflags in #(vi
14882         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14883                 case $cf_add_cflags in
14884                 -D*)
14885                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14886
14887                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14888                                 && test -z "${cf_tst_cflags}" \
14889                                 && cf_fix_cppflags=yes
14890
14891                         if test $cf_fix_cppflags = yes ; then
14892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14893                                 continue
14894                         elif test "${cf_tst_cflags}" = "\"'" ; then
14895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14896                                 continue
14897                         fi
14898                         ;;
14899                 esac
14900                 case "$CPPFLAGS" in
14901                 *$cf_add_cflags) #(vi
14902                         ;;
14903                 *) #(vi
14904                         case $cf_add_cflags in #(vi
14905                         -D*)
14906                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14907
14908 CPPFLAGS=`echo "$CPPFLAGS" | \
14909         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14910                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14911
14912                                 ;;
14913                         esac
14914                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14915                         ;;
14916                 esac
14917                 ;;
14918         *)
14919                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14920                 ;;
14921         esac
14922         ;;
14923 yes)
14924         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14925
14926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14927
14928         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14929                 && test -z "${cf_tst_cflags}" \
14930                 && cf_fix_cppflags=no
14931         ;;
14932 esac
14933 done
14934
14935 if test -n "$cf_new_cflags" ; then
14936
14937         CFLAGS="$CFLAGS $cf_new_cflags"
14938 fi
14939
14940 if test -n "$cf_new_cppflags" ; then
14941
14942         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14943 fi
14944
14945 if test -n "$cf_new_extra_cppflags" ; then
14946
14947         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14948 fi
14949
14950     fi
14951   fi
14952 fi
14953
14954 echo "$as_me:14954: checking for signal global datatype" >&5
14955 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14956 if test "${cf_cv_sig_atomic_t+set}" = set; then
14957   echo $ECHO_N "(cached) $ECHO_C" >&6
14958 else
14959
14960         for cf_type in \
14961                 "volatile sig_atomic_t" \
14962                 "sig_atomic_t" \
14963                 "int"
14964         do
14965         cat >conftest.$ac_ext <<_ACEOF
14966 #line 14966 "configure"
14967 #include "confdefs.h"
14968
14969 #include <sys/types.h>
14970 #include <signal.h>
14971 #include <stdio.h>
14972
14973 extern $cf_type x;
14974 $cf_type x;
14975 static void handler(int sig)
14976 {
14977         x = 5;
14978 }
14979 int
14980 main ()
14981 {
14982 signal(SIGINT, handler);
14983                  x = 1
14984   ;
14985   return 0;
14986 }
14987 _ACEOF
14988 rm -f conftest.$ac_objext
14989 if { (eval echo "$as_me:14989: \"$ac_compile\"") >&5
14990   (eval $ac_compile) 2>&5
14991   ac_status=$?
14992   echo "$as_me:14992: \$? = $ac_status" >&5
14993   (exit $ac_status); } &&
14994          { ac_try='test -s conftest.$ac_objext'
14995   { (eval echo "$as_me:14995: \"$ac_try\"") >&5
14996   (eval $ac_try) 2>&5
14997   ac_status=$?
14998   echo "$as_me:14998: \$? = $ac_status" >&5
14999   (exit $ac_status); }; }; then
15000   cf_cv_sig_atomic_t=$cf_type
15001 else
15002   echo "$as_me: failed program was:" >&5
15003 cat conftest.$ac_ext >&5
15004 cf_cv_sig_atomic_t=no
15005 fi
15006 rm -f conftest.$ac_objext conftest.$ac_ext
15007                 test "$cf_cv_sig_atomic_t" != no && break
15008         done
15009
15010 fi
15011
15012 echo "$as_me:15012: result: $cf_cv_sig_atomic_t" >&5
15013 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15014 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
15015 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15016 EOF
15017
15018 if test $NCURSES_CHTYPE = auto ; then
15019
15020 echo "$as_me:15020: checking for type of chtype" >&5
15021 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15022 if test "${cf_cv_typeof_chtype+set}" = set; then
15023   echo $ECHO_N "(cached) $ECHO_C" >&6
15024 else
15025
15026                 if test "$cross_compiling" = yes; then
15027   cf_cv_typeof_chtype=long
15028 else
15029   cat >conftest.$ac_ext <<_ACEOF
15030 #line 15030 "configure"
15031 #include "confdefs.h"
15032
15033 #define WANT_BITS 31
15034 #include <stdio.h>
15035 int main()
15036 {
15037         FILE *fp = fopen("cf_test.out", "w");
15038         if (fp != 0) {
15039                 char *result = "long";
15040                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15041                         int n;
15042                         unsigned int x, y;
15043                         for (n = 0; n < WANT_BITS; n++) {
15044                                 x = (1 << n);
15045                                 y = (x >> n);
15046                                 if (y != 1 || x == 0) {
15047                                         x = 0;
15048                                         break;
15049                                 }
15050                         }
15051                         /*
15052                          * If x is nonzero, an int is big enough for the bits
15053                          * that we want.
15054                          */
15055                         result = (x != 0) ? "int" : "long";
15056                 }
15057                 fputs(result, fp);
15058                 fclose(fp);
15059         }
15060         ${cf_cv_main_return:-return}(0);
15061 }
15062
15063 _ACEOF
15064 rm -f conftest$ac_exeext
15065 if { (eval echo "$as_me:15065: \"$ac_link\"") >&5
15066   (eval $ac_link) 2>&5
15067   ac_status=$?
15068   echo "$as_me:15068: \$? = $ac_status" >&5
15069   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15070   { (eval echo "$as_me:15070: \"$ac_try\"") >&5
15071   (eval $ac_try) 2>&5
15072   ac_status=$?
15073   echo "$as_me:15073: \$? = $ac_status" >&5
15074   (exit $ac_status); }; }; then
15075   cf_cv_typeof_chtype=`cat cf_test.out`
15076 else
15077   echo "$as_me: program exited with status $ac_status" >&5
15078 echo "$as_me: failed program was:" >&5
15079 cat conftest.$ac_ext >&5
15080 cf_cv_typeof_chtype=long
15081 fi
15082 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15083 fi
15084                 rm -f cf_test.out
15085
15086 fi
15087
15088 echo "$as_me:15088: result: $cf_cv_typeof_chtype" >&5
15089 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15090
15091 cat >>confdefs.h <<EOF
15092 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15093 EOF
15094
15095 else
15096         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15097 fi
15098 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15099
15100 echo "$as_me:15100: checking if unsigned literals are legal" >&5
15101 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15102 if test "${cf_cv_unsigned_literals+set}" = set; then
15103   echo $ECHO_N "(cached) $ECHO_C" >&6
15104 else
15105
15106         cat >conftest.$ac_ext <<_ACEOF
15107 #line 15107 "configure"
15108 #include "confdefs.h"
15109
15110 int
15111 main ()
15112 {
15113 long x = 1L + 1UL + 1U + 1
15114   ;
15115   return 0;
15116 }
15117 _ACEOF
15118 rm -f conftest.$ac_objext
15119 if { (eval echo "$as_me:15119: \"$ac_compile\"") >&5
15120   (eval $ac_compile) 2>&5
15121   ac_status=$?
15122   echo "$as_me:15122: \$? = $ac_status" >&5
15123   (exit $ac_status); } &&
15124          { ac_try='test -s conftest.$ac_objext'
15125   { (eval echo "$as_me:15125: \"$ac_try\"") >&5
15126   (eval $ac_try) 2>&5
15127   ac_status=$?
15128   echo "$as_me:15128: \$? = $ac_status" >&5
15129   (exit $ac_status); }; }; then
15130   cf_cv_unsigned_literals=yes
15131 else
15132   echo "$as_me: failed program was:" >&5
15133 cat conftest.$ac_ext >&5
15134 cf_cv_unsigned_literals=no
15135 fi
15136 rm -f conftest.$ac_objext conftest.$ac_ext
15137
15138 fi
15139
15140 echo "$as_me:15140: result: $cf_cv_unsigned_literals" >&5
15141 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15142
15143 cf_cv_1UL="1"
15144 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15145 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15146
15147 if test $NCURSES_MMASK_T = auto ; then
15148         cf_cv_typeof_mmask_t=long
15149 else
15150         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15151 fi
15152 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15153
15154 ###     Checks for external-data
15155
15156 echo "$as_me:15156: checking if external errno is declared" >&5
15157 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15158 if test "${cf_cv_dcl_errno+set}" = set; then
15159   echo $ECHO_N "(cached) $ECHO_C" >&6
15160 else
15161
15162     cat >conftest.$ac_ext <<_ACEOF
15163 #line 15163 "configure"
15164 #include "confdefs.h"
15165
15166 #ifdef HAVE_STDLIB_H
15167 #include <stdlib.h>
15168 #endif
15169 #include <stdio.h>
15170 #include <sys/types.h>
15171 #include <errno.h>
15172 int
15173 main ()
15174 {
15175 int x = (int) errno
15176   ;
15177   return 0;
15178 }
15179 _ACEOF
15180 rm -f conftest.$ac_objext
15181 if { (eval echo "$as_me:15181: \"$ac_compile\"") >&5
15182   (eval $ac_compile) 2>&5
15183   ac_status=$?
15184   echo "$as_me:15184: \$? = $ac_status" >&5
15185   (exit $ac_status); } &&
15186          { ac_try='test -s conftest.$ac_objext'
15187   { (eval echo "$as_me:15187: \"$ac_try\"") >&5
15188   (eval $ac_try) 2>&5
15189   ac_status=$?
15190   echo "$as_me:15190: \$? = $ac_status" >&5
15191   (exit $ac_status); }; }; then
15192   cf_cv_dcl_errno=yes
15193 else
15194   echo "$as_me: failed program was:" >&5
15195 cat conftest.$ac_ext >&5
15196 cf_cv_dcl_errno=no
15197 fi
15198 rm -f conftest.$ac_objext conftest.$ac_ext
15199
15200 fi
15201 echo "$as_me:15201: result: $cf_cv_dcl_errno" >&5
15202 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15203
15204 if test "$cf_cv_dcl_errno" = no ; then
15205
15206 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15207
15208     cat >>confdefs.h <<EOF
15209 #define $cf_result 1
15210 EOF
15211
15212 fi
15213
15214 # It's possible (for near-UNIX clones) that the data doesn't exist
15215
15216 echo "$as_me:15216: checking if external errno exists" >&5
15217 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15218 if test "${cf_cv_have_errno+set}" = set; then
15219   echo $ECHO_N "(cached) $ECHO_C" >&6
15220 else
15221
15222     cat >conftest.$ac_ext <<_ACEOF
15223 #line 15223 "configure"
15224 #include "confdefs.h"
15225
15226 #undef errno
15227 extern int errno;
15228
15229 int
15230 main ()
15231 {
15232 errno = 2
15233   ;
15234   return 0;
15235 }
15236 _ACEOF
15237 rm -f conftest.$ac_objext conftest$ac_exeext
15238 if { (eval echo "$as_me:15238: \"$ac_link\"") >&5
15239   (eval $ac_link) 2>&5
15240   ac_status=$?
15241   echo "$as_me:15241: \$? = $ac_status" >&5
15242   (exit $ac_status); } &&
15243          { ac_try='test -s conftest$ac_exeext'
15244   { (eval echo "$as_me:15244: \"$ac_try\"") >&5
15245   (eval $ac_try) 2>&5
15246   ac_status=$?
15247   echo "$as_me:15247: \$? = $ac_status" >&5
15248   (exit $ac_status); }; }; then
15249   cf_cv_have_errno=yes
15250 else
15251   echo "$as_me: failed program was:" >&5
15252 cat conftest.$ac_ext >&5
15253 cf_cv_have_errno=no
15254 fi
15255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15256
15257 fi
15258 echo "$as_me:15258: result: $cf_cv_have_errno" >&5
15259 echo "${ECHO_T}$cf_cv_have_errno" >&6
15260
15261 if test "$cf_cv_have_errno" = yes ; then
15262
15263 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15264
15265     cat >>confdefs.h <<EOF
15266 #define $cf_result 1
15267 EOF
15268
15269 fi
15270
15271 echo "$as_me:15271: checking if data-only library module links" >&5
15272 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15273 if test "${cf_cv_link_dataonly+set}" = set; then
15274   echo $ECHO_N "(cached) $ECHO_C" >&6
15275 else
15276
15277         rm -f conftest.a
15278         cat >conftest.$ac_ext <<EOF
15279 #line 15279 "configure"
15280 int     testdata[3] = { 123, 456, 789 };
15281 EOF
15282         if { (eval echo "$as_me:15282: \"$ac_compile\"") >&5
15283   (eval $ac_compile) 2>&5
15284   ac_status=$?
15285   echo "$as_me:15285: \$? = $ac_status" >&5
15286   (exit $ac_status); } ; then
15287                 mv conftest.o data.o && \
15288                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15289         fi
15290         rm -f conftest.$ac_ext data.o
15291         cat >conftest.$ac_ext <<EOF
15292 #line 15292 "configure"
15293 int     testfunc()
15294 {
15295 #if defined(NeXT)
15296         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15297 #else
15298         extern int testdata[3];
15299         return testdata[0] == 123
15300            &&  testdata[1] == 456
15301            &&  testdata[2] == 789;
15302 #endif
15303 }
15304 EOF
15305         if { (eval echo "$as_me:15305: \"$ac_compile\"") >&5
15306   (eval $ac_compile) 2>&5
15307   ac_status=$?
15308   echo "$as_me:15308: \$? = $ac_status" >&5
15309   (exit $ac_status); }; then
15310                 mv conftest.o func.o && \
15311                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15312         fi
15313         rm -f conftest.$ac_ext func.o
15314         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15315         cf_saveLIBS="$LIBS"
15316         LIBS="conftest.a $LIBS"
15317         if test "$cross_compiling" = yes; then
15318   cf_cv_link_dataonly=unknown
15319 else
15320   cat >conftest.$ac_ext <<_ACEOF
15321 #line 15321 "configure"
15322 #include "confdefs.h"
15323
15324         int main()
15325         {
15326                 extern int testfunc();
15327                 ${cf_cv_main_return:-return} (!testfunc());
15328         }
15329
15330 _ACEOF
15331 rm -f conftest$ac_exeext
15332 if { (eval echo "$as_me:15332: \"$ac_link\"") >&5
15333   (eval $ac_link) 2>&5
15334   ac_status=$?
15335   echo "$as_me:15335: \$? = $ac_status" >&5
15336   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15337   { (eval echo "$as_me:15337: \"$ac_try\"") >&5
15338   (eval $ac_try) 2>&5
15339   ac_status=$?
15340   echo "$as_me:15340: \$? = $ac_status" >&5
15341   (exit $ac_status); }; }; then
15342   cf_cv_link_dataonly=yes
15343 else
15344   echo "$as_me: program exited with status $ac_status" >&5
15345 echo "$as_me: failed program was:" >&5
15346 cat conftest.$ac_ext >&5
15347 cf_cv_link_dataonly=no
15348 fi
15349 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15350 fi
15351         LIBS="$cf_saveLIBS"
15352
15353 fi
15354
15355 echo "$as_me:15355: result: $cf_cv_link_dataonly" >&5
15356 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15357
15358 if test "$cf_cv_link_dataonly" = no ; then
15359         cat >>confdefs.h <<\EOF
15360 #define BROKEN_LINKER 1
15361 EOF
15362
15363         BROKEN_LINKER=1
15364 fi
15365
15366 ###     Checks for library functions.
15367
15368 for ac_func in \
15369 getcwd \
15370 getegid \
15371 geteuid \
15372 getttynam \
15373 issetugid \
15374 poll \
15375 putenv \
15376 remove \
15377 select \
15378 setbuf \
15379 setbuffer \
15380 setenv \
15381 setvbuf \
15382 sigaction \
15383 sigvec \
15384 strdup \
15385 strstr \
15386 tcgetpgrp \
15387 times \
15388 vsnprintf \
15389
15390 do
15391 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15392 echo "$as_me:15392: checking for $ac_func" >&5
15393 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15394 if eval "test \"\${$as_ac_var+set}\" = set"; then
15395   echo $ECHO_N "(cached) $ECHO_C" >&6
15396 else
15397   cat >conftest.$ac_ext <<_ACEOF
15398 #line 15398 "configure"
15399 #include "confdefs.h"
15400 /* System header to define __stub macros and hopefully few prototypes,
15401     which can conflict with char $ac_func (); below.  */
15402 #include <assert.h>
15403 /* Override any gcc2 internal prototype to avoid an error.  */
15404 #ifdef __cplusplus
15405 extern "C"
15406 #endif
15407 /* We use char because int might match the return type of a gcc2
15408    builtin and then its argument prototype would still apply.  */
15409 char $ac_func ();
15410 char (*f) ();
15411
15412 int
15413 main ()
15414 {
15415 /* The GNU C library defines this for functions which it implements
15416     to always fail with ENOSYS.  Some functions are actually named
15417     something starting with __ and the normal name is an alias.  */
15418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15419 choke me
15420 #else
15421 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15422 #endif
15423
15424   ;
15425   return 0;
15426 }
15427 _ACEOF
15428 rm -f conftest.$ac_objext conftest$ac_exeext
15429 if { (eval echo "$as_me:15429: \"$ac_link\"") >&5
15430   (eval $ac_link) 2>&5
15431   ac_status=$?
15432   echo "$as_me:15432: \$? = $ac_status" >&5
15433   (exit $ac_status); } &&
15434          { ac_try='test -s conftest$ac_exeext'
15435   { (eval echo "$as_me:15435: \"$ac_try\"") >&5
15436   (eval $ac_try) 2>&5
15437   ac_status=$?
15438   echo "$as_me:15438: \$? = $ac_status" >&5
15439   (exit $ac_status); }; }; then
15440   eval "$as_ac_var=yes"
15441 else
15442   echo "$as_me: failed program was:" >&5
15443 cat conftest.$ac_ext >&5
15444 eval "$as_ac_var=no"
15445 fi
15446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15447 fi
15448 echo "$as_me:15448: result: `eval echo '${'$as_ac_var'}'`" >&5
15449 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15450 if test `eval echo '${'$as_ac_var'}'` = yes; then
15451   cat >>confdefs.h <<EOF
15452 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15453 EOF
15454
15455 fi
15456 done
15457
15458 if test "$with_getcap" = "yes" ; then
15459
15460 echo "$as_me:15460: checking for terminal-capability database functions" >&5
15461 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15462 if test "${cf_cv_cgetent+set}" = set; then
15463   echo $ECHO_N "(cached) $ECHO_C" >&6
15464 else
15465
15466 cat >conftest.$ac_ext <<_ACEOF
15467 #line 15467 "configure"
15468 #include "confdefs.h"
15469
15470 #include <stdlib.h>
15471 int
15472 main ()
15473 {
15474
15475         char temp[128];
15476         char *buf = temp;
15477         char *db_array = temp;
15478         cgetent(&buf, &db_array, "vt100");
15479         cgetcap(buf, "tc", '=');
15480         cgetmatch(buf, "tc");
15481
15482   ;
15483   return 0;
15484 }
15485 _ACEOF
15486 rm -f conftest.$ac_objext conftest$ac_exeext
15487 if { (eval echo "$as_me:15487: \"$ac_link\"") >&5
15488   (eval $ac_link) 2>&5
15489   ac_status=$?
15490   echo "$as_me:15490: \$? = $ac_status" >&5
15491   (exit $ac_status); } &&
15492          { ac_try='test -s conftest$ac_exeext'
15493   { (eval echo "$as_me:15493: \"$ac_try\"") >&5
15494   (eval $ac_try) 2>&5
15495   ac_status=$?
15496   echo "$as_me:15496: \$? = $ac_status" >&5
15497   (exit $ac_status); }; }; then
15498   cf_cv_cgetent=yes
15499 else
15500   echo "$as_me: failed program was:" >&5
15501 cat conftest.$ac_ext >&5
15502 cf_cv_cgetent=no
15503 fi
15504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15505
15506 fi
15507 echo "$as_me:15507: result: $cf_cv_cgetent" >&5
15508 echo "${ECHO_T}$cf_cv_cgetent" >&6
15509
15510 if test "$cf_cv_cgetent" = yes
15511 then
15512         cat >>confdefs.h <<\EOF
15513 #define HAVE_BSD_CGETENT 1
15514 EOF
15515
15516 echo "$as_me:15516: checking if cgetent uses const parameter" >&5
15517 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15518 if test "${cf_cv_cgetent_const+set}" = set; then
15519   echo $ECHO_N "(cached) $ECHO_C" >&6
15520 else
15521
15522 cat >conftest.$ac_ext <<_ACEOF
15523 #line 15523 "configure"
15524 #include "confdefs.h"
15525
15526 #include <stdlib.h>
15527 int
15528 main ()
15529 {
15530
15531         char temp[128];
15532         char *buf = temp;
15533 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15534         const char *db_array = temp;
15535         cgetent(&buf, &db_array, "vt100");
15536 #endif
15537         cgetcap(buf, "tc", '=');
15538         cgetmatch(buf, "tc");
15539
15540   ;
15541   return 0;
15542 }
15543 _ACEOF
15544 rm -f conftest.$ac_objext conftest$ac_exeext
15545 if { (eval echo "$as_me:15545: \"$ac_link\"") >&5
15546   (eval $ac_link) 2>&5
15547   ac_status=$?
15548   echo "$as_me:15548: \$? = $ac_status" >&5
15549   (exit $ac_status); } &&
15550          { ac_try='test -s conftest$ac_exeext'
15551   { (eval echo "$as_me:15551: \"$ac_try\"") >&5
15552   (eval $ac_try) 2>&5
15553   ac_status=$?
15554   echo "$as_me:15554: \$? = $ac_status" >&5
15555   (exit $ac_status); }; }; then
15556   cf_cv_cgetent_const=yes
15557 else
15558   echo "$as_me: failed program was:" >&5
15559 cat conftest.$ac_ext >&5
15560 cf_cv_cgetent_const=no
15561 fi
15562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15563
15564 fi
15565 echo "$as_me:15565: result: $cf_cv_cgetent_const" >&5
15566 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15567         if test "$cf_cv_cgetent_const" = yes
15568         then
15569                 cat >>confdefs.h <<EOF
15570 #define CGETENT_CONST const
15571 EOF
15572
15573         fi
15574 fi
15575
15576 fi
15577
15578 echo "$as_me:15578: checking for isascii" >&5
15579 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15580 if test "${cf_cv_have_isascii+set}" = set; then
15581   echo $ECHO_N "(cached) $ECHO_C" >&6
15582 else
15583
15584         cat >conftest.$ac_ext <<_ACEOF
15585 #line 15585 "configure"
15586 #include "confdefs.h"
15587 #include <ctype.h>
15588 int
15589 main ()
15590 {
15591 int x = isascii(' ')
15592   ;
15593   return 0;
15594 }
15595 _ACEOF
15596 rm -f conftest.$ac_objext conftest$ac_exeext
15597 if { (eval echo "$as_me:15597: \"$ac_link\"") >&5
15598   (eval $ac_link) 2>&5
15599   ac_status=$?
15600   echo "$as_me:15600: \$? = $ac_status" >&5
15601   (exit $ac_status); } &&
15602          { ac_try='test -s conftest$ac_exeext'
15603   { (eval echo "$as_me:15603: \"$ac_try\"") >&5
15604   (eval $ac_try) 2>&5
15605   ac_status=$?
15606   echo "$as_me:15606: \$? = $ac_status" >&5
15607   (exit $ac_status); }; }; then
15608   cf_cv_have_isascii=yes
15609 else
15610   echo "$as_me: failed program was:" >&5
15611 cat conftest.$ac_ext >&5
15612 cf_cv_have_isascii=no
15613 fi
15614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15615
15616 fi
15617 echo "$as_me:15617: result: $cf_cv_have_isascii" >&5
15618 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15619 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15620 #define HAVE_ISASCII 1
15621 EOF
15622
15623 if test "$ac_cv_func_sigaction" = yes; then
15624 echo "$as_me:15624: checking whether sigaction needs _POSIX_SOURCE" >&5
15625 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15626 cat >conftest.$ac_ext <<_ACEOF
15627 #line 15627 "configure"
15628 #include "confdefs.h"
15629
15630 #include <sys/types.h>
15631 #include <signal.h>
15632 int
15633 main ()
15634 {
15635 struct sigaction act
15636   ;
15637   return 0;
15638 }
15639 _ACEOF
15640 rm -f conftest.$ac_objext
15641 if { (eval echo "$as_me:15641: \"$ac_compile\"") >&5
15642   (eval $ac_compile) 2>&5
15643   ac_status=$?
15644   echo "$as_me:15644: \$? = $ac_status" >&5
15645   (exit $ac_status); } &&
15646          { ac_try='test -s conftest.$ac_objext'
15647   { (eval echo "$as_me:15647: \"$ac_try\"") >&5
15648   (eval $ac_try) 2>&5
15649   ac_status=$?
15650   echo "$as_me:15650: \$? = $ac_status" >&5
15651   (exit $ac_status); }; }; then
15652   sigact_bad=no
15653 else
15654   echo "$as_me: failed program was:" >&5
15655 cat conftest.$ac_ext >&5
15656
15657 cat >conftest.$ac_ext <<_ACEOF
15658 #line 15658 "configure"
15659 #include "confdefs.h"
15660
15661 #define _POSIX_SOURCE
15662 #include <sys/types.h>
15663 #include <signal.h>
15664 int
15665 main ()
15666 {
15667 struct sigaction act
15668   ;
15669   return 0;
15670 }
15671 _ACEOF
15672 rm -f conftest.$ac_objext
15673 if { (eval echo "$as_me:15673: \"$ac_compile\"") >&5
15674   (eval $ac_compile) 2>&5
15675   ac_status=$?
15676   echo "$as_me:15676: \$? = $ac_status" >&5
15677   (exit $ac_status); } &&
15678          { ac_try='test -s conftest.$ac_objext'
15679   { (eval echo "$as_me:15679: \"$ac_try\"") >&5
15680   (eval $ac_try) 2>&5
15681   ac_status=$?
15682   echo "$as_me:15682: \$? = $ac_status" >&5
15683   (exit $ac_status); }; }; then
15684   sigact_bad=yes
15685          cat >>confdefs.h <<\EOF
15686 #define _POSIX_SOURCE 1
15687 EOF
15688
15689 else
15690   echo "$as_me: failed program was:" >&5
15691 cat conftest.$ac_ext >&5
15692 sigact_bad=unknown
15693 fi
15694 rm -f conftest.$ac_objext conftest.$ac_ext
15695 fi
15696 rm -f conftest.$ac_objext conftest.$ac_ext
15697 echo "$as_me:15697: result: $sigact_bad" >&5
15698 echo "${ECHO_T}$sigact_bad" >&6
15699 fi
15700
15701 echo "$as_me:15701: checking if nanosleep really works" >&5
15702 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15703 if test "${cf_cv_func_nanosleep+set}" = set; then
15704   echo $ECHO_N "(cached) $ECHO_C" >&6
15705 else
15706
15707 if test "$cross_compiling" = yes; then
15708   cf_cv_func_nanosleep=unknown
15709 else
15710   cat >conftest.$ac_ext <<_ACEOF
15711 #line 15711 "configure"
15712 #include "confdefs.h"
15713
15714 #include <stdio.h>
15715 #include <errno.h>
15716 #include <time.h>
15717
15718 #ifdef HAVE_SYS_TIME_H
15719 #include <sys/time.h>
15720 #endif
15721
15722 int main() {
15723         struct timespec ts1, ts2;
15724         int code;
15725         ts1.tv_sec  = 0;
15726         ts1.tv_nsec = 750000000;
15727         ts2.tv_sec  = 0;
15728         ts2.tv_nsec = 0;
15729         errno = 0;
15730         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15731         ${cf_cv_main_return:-return}(code != 0);
15732 }
15733
15734 _ACEOF
15735 rm -f conftest$ac_exeext
15736 if { (eval echo "$as_me:15736: \"$ac_link\"") >&5
15737   (eval $ac_link) 2>&5
15738   ac_status=$?
15739   echo "$as_me:15739: \$? = $ac_status" >&5
15740   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15741   { (eval echo "$as_me:15741: \"$ac_try\"") >&5
15742   (eval $ac_try) 2>&5
15743   ac_status=$?
15744   echo "$as_me:15744: \$? = $ac_status" >&5
15745   (exit $ac_status); }; }; then
15746   cf_cv_func_nanosleep=yes
15747 else
15748   echo "$as_me: program exited with status $ac_status" >&5
15749 echo "$as_me: failed program was:" >&5
15750 cat conftest.$ac_ext >&5
15751 cf_cv_func_nanosleep=no
15752 fi
15753 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15754 fi
15755 fi
15756 echo "$as_me:15756: result: $cf_cv_func_nanosleep" >&5
15757 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15758
15759 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15760 #define HAVE_NANOSLEEP 1
15761 EOF
15762
15763 for ac_header in \
15764 termio.h \
15765 termios.h \
15766 unistd.h \
15767
15768 do
15769 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15770 echo "$as_me:15770: checking for $ac_header" >&5
15771 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15772 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15773   echo $ECHO_N "(cached) $ECHO_C" >&6
15774 else
15775   cat >conftest.$ac_ext <<_ACEOF
15776 #line 15776 "configure"
15777 #include "confdefs.h"
15778 #include <$ac_header>
15779 _ACEOF
15780 if { (eval echo "$as_me:15780: \"$ac_cpp conftest.$ac_ext\"") >&5
15781   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15782   ac_status=$?
15783   egrep -v '^ *\+' conftest.er1 >conftest.err
15784   rm -f conftest.er1
15785   cat conftest.err >&5
15786   echo "$as_me:15786: \$? = $ac_status" >&5
15787   (exit $ac_status); } >/dev/null; then
15788   if test -s conftest.err; then
15789     ac_cpp_err=$ac_c_preproc_warn_flag
15790   else
15791     ac_cpp_err=
15792   fi
15793 else
15794   ac_cpp_err=yes
15795 fi
15796 if test -z "$ac_cpp_err"; then
15797   eval "$as_ac_Header=yes"
15798 else
15799   echo "$as_me: failed program was:" >&5
15800   cat conftest.$ac_ext >&5
15801   eval "$as_ac_Header=no"
15802 fi
15803 rm -f conftest.err conftest.$ac_ext
15804 fi
15805 echo "$as_me:15805: result: `eval echo '${'$as_ac_Header'}'`" >&5
15806 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15807 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15808   cat >>confdefs.h <<EOF
15809 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15810 EOF
15811
15812 fi
15813 done
15814
15815 if test "$ISC" = yes ; then
15816
15817 for ac_header in sys/termio.h
15818 do
15819 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15820 echo "$as_me:15820: checking for $ac_header" >&5
15821 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15822 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15823   echo $ECHO_N "(cached) $ECHO_C" >&6
15824 else
15825   cat >conftest.$ac_ext <<_ACEOF
15826 #line 15826 "configure"
15827 #include "confdefs.h"
15828 #include <$ac_header>
15829 _ACEOF
15830 if { (eval echo "$as_me:15830: \"$ac_cpp conftest.$ac_ext\"") >&5
15831   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15832   ac_status=$?
15833   egrep -v '^ *\+' conftest.er1 >conftest.err
15834   rm -f conftest.er1
15835   cat conftest.err >&5
15836   echo "$as_me:15836: \$? = $ac_status" >&5
15837   (exit $ac_status); } >/dev/null; then
15838   if test -s conftest.err; then
15839     ac_cpp_err=$ac_c_preproc_warn_flag
15840   else
15841     ac_cpp_err=
15842   fi
15843 else
15844   ac_cpp_err=yes
15845 fi
15846 if test -z "$ac_cpp_err"; then
15847   eval "$as_ac_Header=yes"
15848 else
15849   echo "$as_me: failed program was:" >&5
15850   cat conftest.$ac_ext >&5
15851   eval "$as_ac_Header=no"
15852 fi
15853 rm -f conftest.err conftest.$ac_ext
15854 fi
15855 echo "$as_me:15855: result: `eval echo '${'$as_ac_Header'}'`" >&5
15856 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15857 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15858   cat >>confdefs.h <<EOF
15859 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15860 EOF
15861
15862 fi
15863 done
15864
15865 fi
15866 if test "$ac_cv_header_termios_h" = yes ; then
15867         case "$CFLAGS $CPPFLAGS" in
15868         *-D_POSIX_SOURCE*)
15869                 termios_bad=dunno ;;
15870         *)      termios_bad=maybe ;;
15871         esac
15872         if test "$termios_bad" = maybe ; then
15873         echo "$as_me:15873: checking whether termios.h needs _POSIX_SOURCE" >&5
15874 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15875         cat >conftest.$ac_ext <<_ACEOF
15876 #line 15876 "configure"
15877 #include "confdefs.h"
15878 #include <termios.h>
15879 int
15880 main ()
15881 {
15882 struct termios foo; int x = foo.c_iflag
15883   ;
15884   return 0;
15885 }
15886 _ACEOF
15887 rm -f conftest.$ac_objext
15888 if { (eval echo "$as_me:15888: \"$ac_compile\"") >&5
15889   (eval $ac_compile) 2>&5
15890   ac_status=$?
15891   echo "$as_me:15891: \$? = $ac_status" >&5
15892   (exit $ac_status); } &&
15893          { ac_try='test -s conftest.$ac_objext'
15894   { (eval echo "$as_me:15894: \"$ac_try\"") >&5
15895   (eval $ac_try) 2>&5
15896   ac_status=$?
15897   echo "$as_me:15897: \$? = $ac_status" >&5
15898   (exit $ac_status); }; }; then
15899   termios_bad=no
15900 else
15901   echo "$as_me: failed program was:" >&5
15902 cat conftest.$ac_ext >&5
15903
15904                 cat >conftest.$ac_ext <<_ACEOF
15905 #line 15905 "configure"
15906 #include "confdefs.h"
15907
15908 #define _POSIX_SOURCE
15909 #include <termios.h>
15910 int
15911 main ()
15912 {
15913 struct termios foo; int x = foo.c_iflag
15914   ;
15915   return 0;
15916 }
15917 _ACEOF
15918 rm -f conftest.$ac_objext
15919 if { (eval echo "$as_me:15919: \"$ac_compile\"") >&5
15920   (eval $ac_compile) 2>&5
15921   ac_status=$?
15922   echo "$as_me:15922: \$? = $ac_status" >&5
15923   (exit $ac_status); } &&
15924          { ac_try='test -s conftest.$ac_objext'
15925   { (eval echo "$as_me:15925: \"$ac_try\"") >&5
15926   (eval $ac_try) 2>&5
15927   ac_status=$?
15928   echo "$as_me:15928: \$? = $ac_status" >&5
15929   (exit $ac_status); }; }; then
15930   termios_bad=unknown
15931 else
15932   echo "$as_me: failed program was:" >&5
15933 cat conftest.$ac_ext >&5
15934 termios_bad=yes cat >>confdefs.h <<\EOF
15935 #define _POSIX_SOURCE 1
15936 EOF
15937
15938 fi
15939 rm -f conftest.$ac_objext conftest.$ac_ext
15940
15941 fi
15942 rm -f conftest.$ac_objext conftest.$ac_ext
15943         echo "$as_me:15943: result: $termios_bad" >&5
15944 echo "${ECHO_T}$termios_bad" >&6
15945         fi
15946 fi
15947
15948 echo "$as_me:15948: checking for tcgetattr" >&5
15949 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15950 if test "${cf_cv_have_tcgetattr+set}" = set; then
15951   echo $ECHO_N "(cached) $ECHO_C" >&6
15952 else
15953
15954 cat >conftest.$ac_ext <<_ACEOF
15955 #line 15955 "configure"
15956 #include "confdefs.h"
15957
15958 #include <sys/types.h>
15959 #ifdef HAVE_UNISTD_H
15960 #include <unistd.h>
15961 #endif
15962 #ifdef HAVE_TERMIOS_H
15963 #include <termios.h>
15964 #define TTY struct termios
15965 #else
15966 #ifdef HAVE_TERMIO_H
15967 #include <termio.h>
15968 #define TTY struct termio
15969 #endif
15970 #endif
15971
15972 int
15973 main ()
15974 {
15975
15976 TTY foo;
15977 tcgetattr(1, &foo);
15978   ;
15979   return 0;
15980 }
15981 _ACEOF
15982 rm -f conftest.$ac_objext conftest$ac_exeext
15983 if { (eval echo "$as_me:15983: \"$ac_link\"") >&5
15984   (eval $ac_link) 2>&5
15985   ac_status=$?
15986   echo "$as_me:15986: \$? = $ac_status" >&5
15987   (exit $ac_status); } &&
15988          { ac_try='test -s conftest$ac_exeext'
15989   { (eval echo "$as_me:15989: \"$ac_try\"") >&5
15990   (eval $ac_try) 2>&5
15991   ac_status=$?
15992   echo "$as_me:15992: \$? = $ac_status" >&5
15993   (exit $ac_status); }; }; then
15994   cf_cv_have_tcgetattr=yes
15995 else
15996   echo "$as_me: failed program was:" >&5
15997 cat conftest.$ac_ext >&5
15998 cf_cv_have_tcgetattr=no
15999 fi
16000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16001 fi
16002 echo "$as_me:16002: result: $cf_cv_have_tcgetattr" >&5
16003 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16004 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
16005 #define HAVE_TCGETATTR 1
16006 EOF
16007
16008 echo "$as_me:16008: checking for vsscanf function or workaround" >&5
16009 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16010 if test "${cf_cv_func_vsscanf+set}" = set; then
16011   echo $ECHO_N "(cached) $ECHO_C" >&6
16012 else
16013
16014 cat >conftest.$ac_ext <<_ACEOF
16015 #line 16015 "configure"
16016 #include "confdefs.h"
16017
16018 #include <stdarg.h>
16019 #include <stdio.h>
16020 int
16021 main ()
16022 {
16023
16024         va_list ap;
16025         vsscanf("from", "%d", ap)
16026   ;
16027   return 0;
16028 }
16029 _ACEOF
16030 rm -f conftest.$ac_objext conftest$ac_exeext
16031 if { (eval echo "$as_me:16031: \"$ac_link\"") >&5
16032   (eval $ac_link) 2>&5
16033   ac_status=$?
16034   echo "$as_me:16034: \$? = $ac_status" >&5
16035   (exit $ac_status); } &&
16036          { ac_try='test -s conftest$ac_exeext'
16037   { (eval echo "$as_me:16037: \"$ac_try\"") >&5
16038   (eval $ac_try) 2>&5
16039   ac_status=$?
16040   echo "$as_me:16040: \$? = $ac_status" >&5
16041   (exit $ac_status); }; }; then
16042   cf_cv_func_vsscanf=vsscanf
16043 else
16044   echo "$as_me: failed program was:" >&5
16045 cat conftest.$ac_ext >&5
16046
16047 cat >conftest.$ac_ext <<_ACEOF
16048 #line 16048 "configure"
16049 #include "confdefs.h"
16050
16051 #include <stdarg.h>
16052 #include <stdio.h>
16053 int
16054 main ()
16055 {
16056
16057     FILE strbuf;
16058     char *str = "from";
16059
16060     strbuf._flag = _IOREAD;
16061     strbuf._ptr = strbuf._base = (unsigned char *) str;
16062     strbuf._cnt = strlen(str);
16063     strbuf._file = _NFILE;
16064     return (vfscanf(&strbuf, "%d", ap))
16065   ;
16066   return 0;
16067 }
16068 _ACEOF
16069 rm -f conftest.$ac_objext conftest$ac_exeext
16070 if { (eval echo "$as_me:16070: \"$ac_link\"") >&5
16071   (eval $ac_link) 2>&5
16072   ac_status=$?
16073   echo "$as_me:16073: \$? = $ac_status" >&5
16074   (exit $ac_status); } &&
16075          { ac_try='test -s conftest$ac_exeext'
16076   { (eval echo "$as_me:16076: \"$ac_try\"") >&5
16077   (eval $ac_try) 2>&5
16078   ac_status=$?
16079   echo "$as_me:16079: \$? = $ac_status" >&5
16080   (exit $ac_status); }; }; then
16081   cf_cv_func_vsscanf=vfscanf
16082 else
16083   echo "$as_me: failed program was:" >&5
16084 cat conftest.$ac_ext >&5
16085
16086 cat >conftest.$ac_ext <<_ACEOF
16087 #line 16087 "configure"
16088 #include "confdefs.h"
16089
16090 #include <stdarg.h>
16091 #include <stdio.h>
16092 int
16093 main ()
16094 {
16095
16096     FILE strbuf;
16097     char *str = "from";
16098
16099     strbuf._flag = _IOREAD;
16100     strbuf._ptr = strbuf._base = (unsigned char *) str;
16101     strbuf._cnt = strlen(str);
16102     strbuf._file = _NFILE;
16103     return (_doscan(&strbuf, "%d", ap))
16104   ;
16105   return 0;
16106 }
16107 _ACEOF
16108 rm -f conftest.$ac_objext conftest$ac_exeext
16109 if { (eval echo "$as_me:16109: \"$ac_link\"") >&5
16110   (eval $ac_link) 2>&5
16111   ac_status=$?
16112   echo "$as_me:16112: \$? = $ac_status" >&5
16113   (exit $ac_status); } &&
16114          { ac_try='test -s conftest$ac_exeext'
16115   { (eval echo "$as_me:16115: \"$ac_try\"") >&5
16116   (eval $ac_try) 2>&5
16117   ac_status=$?
16118   echo "$as_me:16118: \$? = $ac_status" >&5
16119   (exit $ac_status); }; }; then
16120   cf_cv_func_vsscanf=_doscan
16121 else
16122   echo "$as_me: failed program was:" >&5
16123 cat conftest.$ac_ext >&5
16124
16125 cf_cv_func_vsscanf=no
16126 fi
16127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16128 fi
16129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16130 fi
16131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16132 fi
16133 echo "$as_me:16133: result: $cf_cv_func_vsscanf" >&5
16134 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16135
16136 case $cf_cv_func_vsscanf in #(vi
16137 vsscanf) cat >>confdefs.h <<\EOF
16138 #define HAVE_VSSCANF 1
16139 EOF
16140 ;; #(vi
16141 vfscanf) cat >>confdefs.h <<\EOF
16142 #define HAVE_VFSCANF 1
16143 EOF
16144 ;; #(vi
16145 _doscan) cat >>confdefs.h <<\EOF
16146 #define HAVE__DOSCAN 1
16147 EOF
16148 ;;
16149 esac
16150
16151 echo "$as_me:16151: checking for working mkstemp" >&5
16152 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16153 if test "${cf_cv_func_mkstemp+set}" = set; then
16154   echo $ECHO_N "(cached) $ECHO_C" >&6
16155 else
16156
16157 rm -rf conftest*
16158 if test "$cross_compiling" = yes; then
16159   cf_cv_func_mkstemp=maybe
16160 else
16161   cat >conftest.$ac_ext <<_ACEOF
16162 #line 16162 "configure"
16163 #include "confdefs.h"
16164
16165 #include <sys/types.h>
16166 #include <stdlib.h>
16167 #include <stdio.h>
16168 #include <string.h>
16169 #include <sys/stat.h>
16170 int main()
16171 {
16172         char *tmpl = "conftestXXXXXX";
16173         char name[2][80];
16174         int n;
16175         int result = 0;
16176         int fd;
16177         struct stat sb;
16178
16179         umask(077);
16180         for (n = 0; n < 2; ++n) {
16181                 strcpy(name[n], tmpl);
16182                 if ((fd = mkstemp(name[n])) >= 0) {
16183                         if (!strcmp(name[n], tmpl)
16184                          || stat(name[n], &sb) != 0
16185                          || (sb.st_mode & S_IFMT) != S_IFREG
16186                          || (sb.st_mode & 077) != 0) {
16187                                 result = 1;
16188                         }
16189                         close(fd);
16190                 }
16191         }
16192         if (result == 0
16193          && !strcmp(name[0], name[1]))
16194                 result = 1;
16195         ${cf_cv_main_return:-return}(result);
16196 }
16197
16198 _ACEOF
16199 rm -f conftest$ac_exeext
16200 if { (eval echo "$as_me:16200: \"$ac_link\"") >&5
16201   (eval $ac_link) 2>&5
16202   ac_status=$?
16203   echo "$as_me:16203: \$? = $ac_status" >&5
16204   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16205   { (eval echo "$as_me:16205: \"$ac_try\"") >&5
16206   (eval $ac_try) 2>&5
16207   ac_status=$?
16208   echo "$as_me:16208: \$? = $ac_status" >&5
16209   (exit $ac_status); }; }; then
16210   cf_cv_func_mkstemp=yes
16211
16212 else
16213   echo "$as_me: program exited with status $ac_status" >&5
16214 echo "$as_me: failed program was:" >&5
16215 cat conftest.$ac_ext >&5
16216 cf_cv_func_mkstemp=no
16217
16218 fi
16219 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16220 fi
16221
16222 fi
16223 echo "$as_me:16223: result: $cf_cv_func_mkstemp" >&5
16224 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16225 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16226         echo "$as_me:16226: checking for mkstemp" >&5
16227 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16228 if test "${ac_cv_func_mkstemp+set}" = set; then
16229   echo $ECHO_N "(cached) $ECHO_C" >&6
16230 else
16231   cat >conftest.$ac_ext <<_ACEOF
16232 #line 16232 "configure"
16233 #include "confdefs.h"
16234 /* System header to define __stub macros and hopefully few prototypes,
16235     which can conflict with char mkstemp (); below.  */
16236 #include <assert.h>
16237 /* Override any gcc2 internal prototype to avoid an error.  */
16238 #ifdef __cplusplus
16239 extern "C"
16240 #endif
16241 /* We use char because int might match the return type of a gcc2
16242    builtin and then its argument prototype would still apply.  */
16243 char mkstemp ();
16244 char (*f) ();
16245
16246 int
16247 main ()
16248 {
16249 /* The GNU C library defines this for functions which it implements
16250     to always fail with ENOSYS.  Some functions are actually named
16251     something starting with __ and the normal name is an alias.  */
16252 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16253 choke me
16254 #else
16255 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16256 #endif
16257
16258   ;
16259   return 0;
16260 }
16261 _ACEOF
16262 rm -f conftest.$ac_objext conftest$ac_exeext
16263 if { (eval echo "$as_me:16263: \"$ac_link\"") >&5
16264   (eval $ac_link) 2>&5
16265   ac_status=$?
16266   echo "$as_me:16266: \$? = $ac_status" >&5
16267   (exit $ac_status); } &&
16268          { ac_try='test -s conftest$ac_exeext'
16269   { (eval echo "$as_me:16269: \"$ac_try\"") >&5
16270   (eval $ac_try) 2>&5
16271   ac_status=$?
16272   echo "$as_me:16272: \$? = $ac_status" >&5
16273   (exit $ac_status); }; }; then
16274   ac_cv_func_mkstemp=yes
16275 else
16276   echo "$as_me: failed program was:" >&5
16277 cat conftest.$ac_ext >&5
16278 ac_cv_func_mkstemp=no
16279 fi
16280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16281 fi
16282 echo "$as_me:16282: result: $ac_cv_func_mkstemp" >&5
16283 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16284
16285 fi
16286 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16287         cat >>confdefs.h <<\EOF
16288 #define HAVE_MKSTEMP 1
16289 EOF
16290
16291 fi
16292
16293 # setup for prototype of fallback for vsscanf()
16294
16295 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16296         HAVE_VSSCANF=1
16297 else
16298         HAVE_VSSCANF=0
16299 fi
16300
16301 if test "$cross_compiling" = yes ; then
16302         { echo "$as_me:16302: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16303 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16304 else
16305         echo "$as_me:16305: checking whether setvbuf arguments are reversed" >&5
16306 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16307 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16308   echo $ECHO_N "(cached) $ECHO_C" >&6
16309 else
16310   if test "$cross_compiling" = yes; then
16311   { { echo "$as_me:16311: error: cannot run test program while cross compiling" >&5
16312 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16313    { (exit 1); exit 1; }; }
16314 else
16315   cat >conftest.$ac_ext <<_ACEOF
16316 #line 16316 "configure"
16317 #include "confdefs.h"
16318 #include <stdio.h>
16319 /* If setvbuf has the reversed format, exit 0. */
16320 int
16321 main ()
16322 {
16323   /* This call has the arguments reversed.
16324      A reversed system may check and see that the address of main
16325      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16326   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16327     $ac_main_return(1);
16328   putc('\r', stdout);
16329   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16330 }
16331 _ACEOF
16332 rm -f conftest$ac_exeext
16333 if { (eval echo "$as_me:16333: \"$ac_link\"") >&5
16334   (eval $ac_link) 2>&5
16335   ac_status=$?
16336   echo "$as_me:16336: \$? = $ac_status" >&5
16337   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16338   { (eval echo "$as_me:16338: \"$ac_try\"") >&5
16339   (eval $ac_try) 2>&5
16340   ac_status=$?
16341   echo "$as_me:16341: \$? = $ac_status" >&5
16342   (exit $ac_status); }; }; then
16343   ac_cv_func_setvbuf_reversed=yes
16344 else
16345   echo "$as_me: program exited with status $ac_status" >&5
16346 echo "$as_me: failed program was:" >&5
16347 cat conftest.$ac_ext >&5
16348 ac_cv_func_setvbuf_reversed=no
16349 fi
16350 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16351 fi
16352 rm -f core core.* *.core
16353 fi
16354 echo "$as_me:16354: result: $ac_cv_func_setvbuf_reversed" >&5
16355 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16356 if test $ac_cv_func_setvbuf_reversed = yes; then
16357
16358 cat >>confdefs.h <<\EOF
16359 #define SETVBUF_REVERSED 1
16360 EOF
16361
16362 fi
16363
16364 fi
16365 echo "$as_me:16365: checking return type of signal handlers" >&5
16366 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16367 if test "${ac_cv_type_signal+set}" = set; then
16368   echo $ECHO_N "(cached) $ECHO_C" >&6
16369 else
16370   cat >conftest.$ac_ext <<_ACEOF
16371 #line 16371 "configure"
16372 #include "confdefs.h"
16373 #include <sys/types.h>
16374 #include <signal.h>
16375 #ifdef signal
16376 # undef signal
16377 #endif
16378 #ifdef __cplusplus
16379 extern "C" void (*signal (int, void (*)(int)))(int);
16380 #else
16381 void (*signal ()) ();
16382 #endif
16383
16384 int
16385 main ()
16386 {
16387 int i;
16388   ;
16389   return 0;
16390 }
16391 _ACEOF
16392 rm -f conftest.$ac_objext
16393 if { (eval echo "$as_me:16393: \"$ac_compile\"") >&5
16394   (eval $ac_compile) 2>&5
16395   ac_status=$?
16396   echo "$as_me:16396: \$? = $ac_status" >&5
16397   (exit $ac_status); } &&
16398          { ac_try='test -s conftest.$ac_objext'
16399   { (eval echo "$as_me:16399: \"$ac_try\"") >&5
16400   (eval $ac_try) 2>&5
16401   ac_status=$?
16402   echo "$as_me:16402: \$? = $ac_status" >&5
16403   (exit $ac_status); }; }; then
16404   ac_cv_type_signal=void
16405 else
16406   echo "$as_me: failed program was:" >&5
16407 cat conftest.$ac_ext >&5
16408 ac_cv_type_signal=int
16409 fi
16410 rm -f conftest.$ac_objext conftest.$ac_ext
16411 fi
16412 echo "$as_me:16412: result: $ac_cv_type_signal" >&5
16413 echo "${ECHO_T}$ac_cv_type_signal" >&6
16414
16415 cat >>confdefs.h <<EOF
16416 #define RETSIGTYPE $ac_cv_type_signal
16417 EOF
16418
16419 echo "$as_me:16419: checking for intptr_t" >&5
16420 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16421 if test "${ac_cv_type_intptr_t+set}" = set; then
16422   echo $ECHO_N "(cached) $ECHO_C" >&6
16423 else
16424   cat >conftest.$ac_ext <<_ACEOF
16425 #line 16425 "configure"
16426 #include "confdefs.h"
16427 $ac_includes_default
16428 int
16429 main ()
16430 {
16431 if ((intptr_t *) 0)
16432   return 0;
16433 if (sizeof (intptr_t))
16434   return 0;
16435   ;
16436   return 0;
16437 }
16438 _ACEOF
16439 rm -f conftest.$ac_objext
16440 if { (eval echo "$as_me:16440: \"$ac_compile\"") >&5
16441   (eval $ac_compile) 2>&5
16442   ac_status=$?
16443   echo "$as_me:16443: \$? = $ac_status" >&5
16444   (exit $ac_status); } &&
16445          { ac_try='test -s conftest.$ac_objext'
16446   { (eval echo "$as_me:16446: \"$ac_try\"") >&5
16447   (eval $ac_try) 2>&5
16448   ac_status=$?
16449   echo "$as_me:16449: \$? = $ac_status" >&5
16450   (exit $ac_status); }; }; then
16451   ac_cv_type_intptr_t=yes
16452 else
16453   echo "$as_me: failed program was:" >&5
16454 cat conftest.$ac_ext >&5
16455 ac_cv_type_intptr_t=no
16456 fi
16457 rm -f conftest.$ac_objext conftest.$ac_ext
16458 fi
16459 echo "$as_me:16459: result: $ac_cv_type_intptr_t" >&5
16460 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16461 if test $ac_cv_type_intptr_t = yes; then
16462   :
16463 else
16464
16465 cat >>confdefs.h <<EOF
16466 #define intptr_t long
16467 EOF
16468
16469 fi
16470
16471 echo "$as_me:16471: checking for type sigaction_t" >&5
16472 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16473 if test "${cf_cv_type_sigaction+set}" = set; then
16474   echo $ECHO_N "(cached) $ECHO_C" >&6
16475 else
16476
16477         cat >conftest.$ac_ext <<_ACEOF
16478 #line 16478 "configure"
16479 #include "confdefs.h"
16480
16481 #include <signal.h>
16482 int
16483 main ()
16484 {
16485 sigaction_t x
16486   ;
16487   return 0;
16488 }
16489 _ACEOF
16490 rm -f conftest.$ac_objext
16491 if { (eval echo "$as_me:16491: \"$ac_compile\"") >&5
16492   (eval $ac_compile) 2>&5
16493   ac_status=$?
16494   echo "$as_me:16494: \$? = $ac_status" >&5
16495   (exit $ac_status); } &&
16496          { ac_try='test -s conftest.$ac_objext'
16497   { (eval echo "$as_me:16497: \"$ac_try\"") >&5
16498   (eval $ac_try) 2>&5
16499   ac_status=$?
16500   echo "$as_me:16500: \$? = $ac_status" >&5
16501   (exit $ac_status); }; }; then
16502   cf_cv_type_sigaction=yes
16503 else
16504   echo "$as_me: failed program was:" >&5
16505 cat conftest.$ac_ext >&5
16506 cf_cv_type_sigaction=no
16507 fi
16508 rm -f conftest.$ac_objext conftest.$ac_ext
16509 fi
16510
16511 echo "$as_me:16511: result: $cf_cv_type_sigaction" >&5
16512 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16513 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16514 #define HAVE_TYPE_SIGACTION 1
16515 EOF
16516
16517 echo "$as_me:16517: checking declaration of size-change" >&5
16518 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16519 if test "${cf_cv_sizechange+set}" = set; then
16520   echo $ECHO_N "(cached) $ECHO_C" >&6
16521 else
16522
16523     cf_cv_sizechange=unknown
16524     cf_save_CPPFLAGS="$CPPFLAGS"
16525
16526 for cf_opts in "" "NEED_PTEM_H"
16527 do
16528
16529     CPPFLAGS="$cf_save_CPPFLAGS"
16530     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16531     cat >conftest.$ac_ext <<_ACEOF
16532 #line 16532 "configure"
16533 #include "confdefs.h"
16534 #include <sys/types.h>
16535 #ifdef HAVE_TERMIOS_H
16536 #include <termios.h>
16537 #else
16538 #ifdef HAVE_TERMIO_H
16539 #include <termio.h>
16540 #endif
16541 #endif
16542 #ifdef NEED_PTEM_H
16543 /* This is a workaround for SCO:  they neglected to define struct winsize in
16544  * termios.h -- it's only in termio.h and ptem.h
16545  */
16546 #include        <sys/stream.h>
16547 #include        <sys/ptem.h>
16548 #endif
16549 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16550 #include <sys/ioctl.h>
16551 #endif
16552
16553 int
16554 main ()
16555 {
16556
16557 #ifdef TIOCGSIZE
16558         struct ttysize win;     /* FIXME: what system is this? */
16559         int y = win.ts_lines;
16560         int x = win.ts_cols;
16561 #else
16562 #ifdef TIOCGWINSZ
16563         struct winsize win;
16564         int y = win.ws_row;
16565         int x = win.ws_col;
16566 #else
16567         no TIOCGSIZE or TIOCGWINSZ
16568 #endif /* TIOCGWINSZ */
16569 #endif /* TIOCGSIZE */
16570
16571   ;
16572   return 0;
16573 }
16574 _ACEOF
16575 rm -f conftest.$ac_objext
16576 if { (eval echo "$as_me:16576: \"$ac_compile\"") >&5
16577   (eval $ac_compile) 2>&5
16578   ac_status=$?
16579   echo "$as_me:16579: \$? = $ac_status" >&5
16580   (exit $ac_status); } &&
16581          { ac_try='test -s conftest.$ac_objext'
16582   { (eval echo "$as_me:16582: \"$ac_try\"") >&5
16583   (eval $ac_try) 2>&5
16584   ac_status=$?
16585   echo "$as_me:16585: \$? = $ac_status" >&5
16586   (exit $ac_status); }; }; then
16587   cf_cv_sizechange=yes
16588 else
16589   echo "$as_me: failed program was:" >&5
16590 cat conftest.$ac_ext >&5
16591 cf_cv_sizechange=no
16592 fi
16593 rm -f conftest.$ac_objext conftest.$ac_ext
16594
16595         CPPFLAGS="$cf_save_CPPFLAGS"
16596         if test "$cf_cv_sizechange" = yes ; then
16597                 echo "size-change succeeded ($cf_opts)" >&5
16598                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16599                 break
16600         fi
16601 done
16602
16603 fi
16604 echo "$as_me:16604: result: $cf_cv_sizechange" >&5
16605 echo "${ECHO_T}$cf_cv_sizechange" >&6
16606 if test "$cf_cv_sizechange" != no ; then
16607         cat >>confdefs.h <<\EOF
16608 #define HAVE_SIZECHANGE 1
16609 EOF
16610
16611         case $cf_cv_sizechange in #(vi
16612         NEED*)
16613                 cat >>confdefs.h <<EOF
16614 #define $cf_cv_sizechange  1
16615 EOF
16616
16617                 ;;
16618         esac
16619 fi
16620
16621 echo "$as_me:16621: checking for memmove" >&5
16622 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16623 if test "${ac_cv_func_memmove+set}" = set; then
16624   echo $ECHO_N "(cached) $ECHO_C" >&6
16625 else
16626   cat >conftest.$ac_ext <<_ACEOF
16627 #line 16627 "configure"
16628 #include "confdefs.h"
16629 /* System header to define __stub macros and hopefully few prototypes,
16630     which can conflict with char memmove (); below.  */
16631 #include <assert.h>
16632 /* Override any gcc2 internal prototype to avoid an error.  */
16633 #ifdef __cplusplus
16634 extern "C"
16635 #endif
16636 /* We use char because int might match the return type of a gcc2
16637    builtin and then its argument prototype would still apply.  */
16638 char memmove ();
16639 char (*f) ();
16640
16641 int
16642 main ()
16643 {
16644 /* The GNU C library defines this for functions which it implements
16645     to always fail with ENOSYS.  Some functions are actually named
16646     something starting with __ and the normal name is an alias.  */
16647 #if defined (__stub_memmove) || defined (__stub___memmove)
16648 choke me
16649 #else
16650 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16651 #endif
16652
16653   ;
16654   return 0;
16655 }
16656 _ACEOF
16657 rm -f conftest.$ac_objext conftest$ac_exeext
16658 if { (eval echo "$as_me:16658: \"$ac_link\"") >&5
16659   (eval $ac_link) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); } &&
16663          { ac_try='test -s conftest$ac_exeext'
16664   { (eval echo "$as_me:16664: \"$ac_try\"") >&5
16665   (eval $ac_try) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); }; }; then
16669   ac_cv_func_memmove=yes
16670 else
16671   echo "$as_me: failed program was:" >&5
16672 cat conftest.$ac_ext >&5
16673 ac_cv_func_memmove=no
16674 fi
16675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16676 fi
16677 echo "$as_me:16677: result: $ac_cv_func_memmove" >&5
16678 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16679 if test $ac_cv_func_memmove = yes; then
16680   :
16681 else
16682
16683 echo "$as_me:16683: checking for bcopy" >&5
16684 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16685 if test "${ac_cv_func_bcopy+set}" = set; then
16686   echo $ECHO_N "(cached) $ECHO_C" >&6
16687 else
16688   cat >conftest.$ac_ext <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691 /* System header to define __stub macros and hopefully few prototypes,
16692     which can conflict with char bcopy (); below.  */
16693 #include <assert.h>
16694 /* Override any gcc2 internal prototype to avoid an error.  */
16695 #ifdef __cplusplus
16696 extern "C"
16697 #endif
16698 /* We use char because int might match the return type of a gcc2
16699    builtin and then its argument prototype would still apply.  */
16700 char bcopy ();
16701 char (*f) ();
16702
16703 int
16704 main ()
16705 {
16706 /* The GNU C library defines this for functions which it implements
16707     to always fail with ENOSYS.  Some functions are actually named
16708     something starting with __ and the normal name is an alias.  */
16709 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16710 choke me
16711 #else
16712 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16713 #endif
16714
16715   ;
16716   return 0;
16717 }
16718 _ACEOF
16719 rm -f conftest.$ac_objext conftest$ac_exeext
16720 if { (eval echo "$as_me:16720: \"$ac_link\"") >&5
16721   (eval $ac_link) 2>&5
16722   ac_status=$?
16723   echo "$as_me:16723: \$? = $ac_status" >&5
16724   (exit $ac_status); } &&
16725          { ac_try='test -s conftest$ac_exeext'
16726   { (eval echo "$as_me:16726: \"$ac_try\"") >&5
16727   (eval $ac_try) 2>&5
16728   ac_status=$?
16729   echo "$as_me:16729: \$? = $ac_status" >&5
16730   (exit $ac_status); }; }; then
16731   ac_cv_func_bcopy=yes
16732 else
16733   echo "$as_me: failed program was:" >&5
16734 cat conftest.$ac_ext >&5
16735 ac_cv_func_bcopy=no
16736 fi
16737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16738 fi
16739 echo "$as_me:16739: result: $ac_cv_func_bcopy" >&5
16740 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16741 if test $ac_cv_func_bcopy = yes; then
16742
16743         echo "$as_me:16743: checking if bcopy does overlapping moves" >&5
16744 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16745 if test "${cf_cv_good_bcopy+set}" = set; then
16746   echo $ECHO_N "(cached) $ECHO_C" >&6
16747 else
16748
16749                 if test "$cross_compiling" = yes; then
16750   cf_cv_good_bcopy=unknown
16751 else
16752   cat >conftest.$ac_ext <<_ACEOF
16753 #line 16753 "configure"
16754 #include "confdefs.h"
16755
16756 int main() {
16757         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16758         char temp[40];
16759         bcopy(data, temp, sizeof(data));
16760         bcopy(temp+10, temp, 15);
16761         bcopy(temp+5, temp+15, 10);
16762         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16763 }
16764
16765 _ACEOF
16766 rm -f conftest$ac_exeext
16767 if { (eval echo "$as_me:16767: \"$ac_link\"") >&5
16768   (eval $ac_link) 2>&5
16769   ac_status=$?
16770   echo "$as_me:16770: \$? = $ac_status" >&5
16771   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16772   { (eval echo "$as_me:16772: \"$ac_try\"") >&5
16773   (eval $ac_try) 2>&5
16774   ac_status=$?
16775   echo "$as_me:16775: \$? = $ac_status" >&5
16776   (exit $ac_status); }; }; then
16777   cf_cv_good_bcopy=yes
16778 else
16779   echo "$as_me: program exited with status $ac_status" >&5
16780 echo "$as_me: failed program was:" >&5
16781 cat conftest.$ac_ext >&5
16782 cf_cv_good_bcopy=no
16783 fi
16784 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16785 fi
16786
16787 fi
16788 echo "$as_me:16788: result: $cf_cv_good_bcopy" >&5
16789 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16790
16791 else
16792   cf_cv_good_bcopy=no
16793 fi
16794
16795         if test "$cf_cv_good_bcopy" = yes ; then
16796                 cat >>confdefs.h <<\EOF
16797 #define USE_OK_BCOPY 1
16798 EOF
16799
16800         else
16801                 cat >>confdefs.h <<\EOF
16802 #define USE_MY_MEMMOVE 1
16803 EOF
16804
16805         fi
16806
16807 fi
16808
16809 echo "$as_me:16809: checking if poll really works" >&5
16810 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16811 if test "${cf_cv_working_poll+set}" = set; then
16812   echo $ECHO_N "(cached) $ECHO_C" >&6
16813 else
16814
16815 if test "$cross_compiling" = yes; then
16816   cf_cv_working_poll=unknown
16817 else
16818   cat >conftest.$ac_ext <<_ACEOF
16819 #line 16819 "configure"
16820 #include "confdefs.h"
16821
16822 #include <stdlib.h>
16823 #include <stdio.h>
16824 #include <unistd.h>
16825 #include <fcntl.h>
16826 #ifdef HAVE_POLL_H
16827 #include <poll.h>
16828 #else
16829 #include <sys/poll.h>
16830 #endif
16831 int main() {
16832         struct pollfd myfds;
16833         int ret;
16834
16835         /* check for Darwin bug with respect to "devices" */
16836         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16837         if (myfds.fd < 0)
16838                 myfds.fd = 0;
16839         myfds.events = POLLIN;
16840         myfds.revents = 0;
16841
16842         ret = poll(&myfds, 1, 100);
16843
16844         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16845                 ret = -1;
16846         } else {
16847                 int fd = 0;
16848                 if (!isatty(fd)) {
16849                         fd = open("/dev/tty", 2);       /* O_RDWR */
16850                 }
16851
16852                 if (fd >= 0) {
16853                         /* also check with standard input */
16854                         myfds.fd = fd;
16855                         myfds.events = POLLIN;
16856                         myfds.revents = 0;
16857                         ret = poll(&myfds, 1, 100);
16858                 } else {
16859                         ret = -1;
16860                 }
16861         }
16862         ${cf_cv_main_return:-return}(ret < 0);
16863 }
16864 _ACEOF
16865 rm -f 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); } && { ac_try='./conftest$ac_exeext'
16871   { (eval echo "$as_me:16871: \"$ac_try\"") >&5
16872   (eval $ac_try) 2>&5
16873   ac_status=$?
16874   echo "$as_me:16874: \$? = $ac_status" >&5
16875   (exit $ac_status); }; }; then
16876   cf_cv_working_poll=yes
16877 else
16878   echo "$as_me: program exited with status $ac_status" >&5
16879 echo "$as_me: failed program was:" >&5
16880 cat conftest.$ac_ext >&5
16881 cf_cv_working_poll=no
16882 fi
16883 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16884 fi
16885 fi
16886 echo "$as_me:16886: result: $cf_cv_working_poll" >&5
16887 echo "${ECHO_T}$cf_cv_working_poll" >&6
16888 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16889 #define HAVE_WORKING_POLL 1
16890 EOF
16891
16892 echo "$as_me:16892: checking for va_copy" >&5
16893 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16894 if test "${cf_cv_have_va_copy+set}" = set; then
16895   echo $ECHO_N "(cached) $ECHO_C" >&6
16896 else
16897
16898 cat >conftest.$ac_ext <<_ACEOF
16899 #line 16899 "configure"
16900 #include "confdefs.h"
16901
16902 #include <stdarg.h>
16903
16904 int
16905 main ()
16906 {
16907
16908         static va_list dst;
16909         static va_list src;
16910         va_copy(dst, src)
16911   ;
16912   return 0;
16913 }
16914 _ACEOF
16915 rm -f conftest.$ac_objext conftest$ac_exeext
16916 if { (eval echo "$as_me:16916: \"$ac_link\"") >&5
16917   (eval $ac_link) 2>&5
16918   ac_status=$?
16919   echo "$as_me:16919: \$? = $ac_status" >&5
16920   (exit $ac_status); } &&
16921          { ac_try='test -s conftest$ac_exeext'
16922   { (eval echo "$as_me:16922: \"$ac_try\"") >&5
16923   (eval $ac_try) 2>&5
16924   ac_status=$?
16925   echo "$as_me:16925: \$? = $ac_status" >&5
16926   (exit $ac_status); }; }; then
16927   cf_cv_have_va_copy=yes
16928 else
16929   echo "$as_me: failed program was:" >&5
16930 cat conftest.$ac_ext >&5
16931 cf_cv_have_va_copy=no
16932 fi
16933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16934 fi
16935 echo "$as_me:16935: result: $cf_cv_have_va_copy" >&5
16936 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16937
16938 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16939 #define HAVE_VA_COPY 1
16940 EOF
16941
16942 echo "$as_me:16942: checking for __va_copy" >&5
16943 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16944 if test "${cf_cv_have___va_copy+set}" = set; then
16945   echo $ECHO_N "(cached) $ECHO_C" >&6
16946 else
16947
16948 cat >conftest.$ac_ext <<_ACEOF
16949 #line 16949 "configure"
16950 #include "confdefs.h"
16951
16952 #include <stdarg.h>
16953
16954 int
16955 main ()
16956 {
16957
16958         static va_list dst;
16959         static va_list src;
16960         __va_copy(dst, src)
16961   ;
16962   return 0;
16963 }
16964 _ACEOF
16965 rm -f conftest.$ac_objext conftest$ac_exeext
16966 if { (eval echo "$as_me:16966: \"$ac_link\"") >&5
16967   (eval $ac_link) 2>&5
16968   ac_status=$?
16969   echo "$as_me:16969: \$? = $ac_status" >&5
16970   (exit $ac_status); } &&
16971          { ac_try='test -s conftest$ac_exeext'
16972   { (eval echo "$as_me:16972: \"$ac_try\"") >&5
16973   (eval $ac_try) 2>&5
16974   ac_status=$?
16975   echo "$as_me:16975: \$? = $ac_status" >&5
16976   (exit $ac_status); }; }; then
16977   cf_cv_have___va_copy=yes
16978 else
16979   echo "$as_me: failed program was:" >&5
16980 cat conftest.$ac_ext >&5
16981 cf_cv_have___va_copy=no
16982 fi
16983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16984 fi
16985 echo "$as_me:16985: result: $cf_cv_have___va_copy" >&5
16986 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16987
16988 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16989 #define HAVE___VA_COPY 1
16990 EOF
16991
16992 echo "$as_me:16992: checking for pid_t" >&5
16993 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16994 if test "${ac_cv_type_pid_t+set}" = set; then
16995   echo $ECHO_N "(cached) $ECHO_C" >&6
16996 else
16997   cat >conftest.$ac_ext <<_ACEOF
16998 #line 16998 "configure"
16999 #include "confdefs.h"
17000 $ac_includes_default
17001 int
17002 main ()
17003 {
17004 if ((pid_t *) 0)
17005   return 0;
17006 if (sizeof (pid_t))
17007   return 0;
17008   ;
17009   return 0;
17010 }
17011 _ACEOF
17012 rm -f conftest.$ac_objext
17013 if { (eval echo "$as_me:17013: \"$ac_compile\"") >&5
17014   (eval $ac_compile) 2>&5
17015   ac_status=$?
17016   echo "$as_me:17016: \$? = $ac_status" >&5
17017   (exit $ac_status); } &&
17018          { ac_try='test -s conftest.$ac_objext'
17019   { (eval echo "$as_me:17019: \"$ac_try\"") >&5
17020   (eval $ac_try) 2>&5
17021   ac_status=$?
17022   echo "$as_me:17022: \$? = $ac_status" >&5
17023   (exit $ac_status); }; }; then
17024   ac_cv_type_pid_t=yes
17025 else
17026   echo "$as_me: failed program was:" >&5
17027 cat conftest.$ac_ext >&5
17028 ac_cv_type_pid_t=no
17029 fi
17030 rm -f conftest.$ac_objext conftest.$ac_ext
17031 fi
17032 echo "$as_me:17032: result: $ac_cv_type_pid_t" >&5
17033 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17034 if test $ac_cv_type_pid_t = yes; then
17035   :
17036 else
17037
17038 cat >>confdefs.h <<EOF
17039 #define pid_t int
17040 EOF
17041
17042 fi
17043
17044 for ac_header in unistd.h vfork.h
17045 do
17046 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17047 echo "$as_me:17047: checking for $ac_header" >&5
17048 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17049 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17050   echo $ECHO_N "(cached) $ECHO_C" >&6
17051 else
17052   cat >conftest.$ac_ext <<_ACEOF
17053 #line 17053 "configure"
17054 #include "confdefs.h"
17055 #include <$ac_header>
17056 _ACEOF
17057 if { (eval echo "$as_me:17057: \"$ac_cpp conftest.$ac_ext\"") >&5
17058   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17059   ac_status=$?
17060   egrep -v '^ *\+' conftest.er1 >conftest.err
17061   rm -f conftest.er1
17062   cat conftest.err >&5
17063   echo "$as_me:17063: \$? = $ac_status" >&5
17064   (exit $ac_status); } >/dev/null; then
17065   if test -s conftest.err; then
17066     ac_cpp_err=$ac_c_preproc_warn_flag
17067   else
17068     ac_cpp_err=
17069   fi
17070 else
17071   ac_cpp_err=yes
17072 fi
17073 if test -z "$ac_cpp_err"; then
17074   eval "$as_ac_Header=yes"
17075 else
17076   echo "$as_me: failed program was:" >&5
17077   cat conftest.$ac_ext >&5
17078   eval "$as_ac_Header=no"
17079 fi
17080 rm -f conftest.err conftest.$ac_ext
17081 fi
17082 echo "$as_me:17082: result: `eval echo '${'$as_ac_Header'}'`" >&5
17083 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17084 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17085   cat >>confdefs.h <<EOF
17086 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17087 EOF
17088
17089 fi
17090 done
17091
17092 for ac_func in fork vfork
17093 do
17094 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17095 echo "$as_me:17095: checking for $ac_func" >&5
17096 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17097 if eval "test \"\${$as_ac_var+set}\" = set"; then
17098   echo $ECHO_N "(cached) $ECHO_C" >&6
17099 else
17100   cat >conftest.$ac_ext <<_ACEOF
17101 #line 17101 "configure"
17102 #include "confdefs.h"
17103 /* System header to define __stub macros and hopefully few prototypes,
17104     which can conflict with char $ac_func (); below.  */
17105 #include <assert.h>
17106 /* Override any gcc2 internal prototype to avoid an error.  */
17107 #ifdef __cplusplus
17108 extern "C"
17109 #endif
17110 /* We use char because int might match the return type of a gcc2
17111    builtin and then its argument prototype would still apply.  */
17112 char $ac_func ();
17113 char (*f) ();
17114
17115 int
17116 main ()
17117 {
17118 /* The GNU C library defines this for functions which it implements
17119     to always fail with ENOSYS.  Some functions are actually named
17120     something starting with __ and the normal name is an alias.  */
17121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17122 choke me
17123 #else
17124 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17125 #endif
17126
17127   ;
17128   return 0;
17129 }
17130 _ACEOF
17131 rm -f conftest.$ac_objext conftest$ac_exeext
17132 if { (eval echo "$as_me:17132: \"$ac_link\"") >&5
17133   (eval $ac_link) 2>&5
17134   ac_status=$?
17135   echo "$as_me:17135: \$? = $ac_status" >&5
17136   (exit $ac_status); } &&
17137          { ac_try='test -s conftest$ac_exeext'
17138   { (eval echo "$as_me:17138: \"$ac_try\"") >&5
17139   (eval $ac_try) 2>&5
17140   ac_status=$?
17141   echo "$as_me:17141: \$? = $ac_status" >&5
17142   (exit $ac_status); }; }; then
17143   eval "$as_ac_var=yes"
17144 else
17145   echo "$as_me: failed program was:" >&5
17146 cat conftest.$ac_ext >&5
17147 eval "$as_ac_var=no"
17148 fi
17149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17150 fi
17151 echo "$as_me:17151: result: `eval echo '${'$as_ac_var'}'`" >&5
17152 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17153 if test `eval echo '${'$as_ac_var'}'` = yes; then
17154   cat >>confdefs.h <<EOF
17155 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17156 EOF
17157
17158 fi
17159 done
17160
17161 ac_cv_func_fork_works=$ac_cv_func_fork
17162 if test "x$ac_cv_func_fork" = xyes; then
17163   echo "$as_me:17163: checking for working fork" >&5
17164 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17165 if test "${ac_cv_func_fork_works+set}" = set; then
17166   echo $ECHO_N "(cached) $ECHO_C" >&6
17167 else
17168   if test "$cross_compiling" = yes; then
17169   ac_cv_func_fork_works=cross
17170 else
17171   cat >conftest.$ac_ext <<_ACEOF
17172 /* By Rüdiger Kuhlmann. */
17173       #include <sys/types.h>
17174       #if HAVE_UNISTD_H
17175       # include <unistd.h>
17176       #endif
17177       /* Some systems only have a dummy stub for fork() */
17178       int main ()
17179       {
17180         if (fork() < 0)
17181           $ac_main_return (1);
17182         $ac_main_return (0);
17183       }
17184 _ACEOF
17185 rm -f conftest$ac_exeext
17186 if { (eval echo "$as_me:17186: \"$ac_link\"") >&5
17187   (eval $ac_link) 2>&5
17188   ac_status=$?
17189   echo "$as_me:17189: \$? = $ac_status" >&5
17190   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17191   { (eval echo "$as_me:17191: \"$ac_try\"") >&5
17192   (eval $ac_try) 2>&5
17193   ac_status=$?
17194   echo "$as_me:17194: \$? = $ac_status" >&5
17195   (exit $ac_status); }; }; then
17196   ac_cv_func_fork_works=yes
17197 else
17198   echo "$as_me: program exited with status $ac_status" >&5
17199 echo "$as_me: failed program was:" >&5
17200 cat conftest.$ac_ext >&5
17201 ac_cv_func_fork_works=no
17202 fi
17203 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17204 fi
17205 fi
17206 echo "$as_me:17206: result: $ac_cv_func_fork_works" >&5
17207 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17208
17209 fi
17210 if test "x$ac_cv_func_fork_works" = xcross; then
17211   case $host in
17212     *-*-amigaos* | *-*-msdosdjgpp*)
17213       # Override, as these systems have only a dummy fork() stub
17214       ac_cv_func_fork_works=no
17215       ;;
17216     *)
17217       ac_cv_func_fork_works=yes
17218       ;;
17219   esac
17220   { echo "$as_me:17220: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17221 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17222 fi
17223 ac_cv_func_vfork_works=$ac_cv_func_vfork
17224 if test "x$ac_cv_func_vfork" = xyes; then
17225   echo "$as_me:17225: checking for working vfork" >&5
17226 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17227 if test "${ac_cv_func_vfork_works+set}" = set; then
17228   echo $ECHO_N "(cached) $ECHO_C" >&6
17229 else
17230   if test "$cross_compiling" = yes; then
17231   ac_cv_func_vfork_works=cross
17232 else
17233   cat >conftest.$ac_ext <<_ACEOF
17234 #line 17234 "configure"
17235 #include "confdefs.h"
17236 /* Thanks to Paul Eggert for this test.  */
17237 #include <stdio.h>
17238 #include <sys/types.h>
17239 #include <sys/stat.h>
17240 #if HAVE_UNISTD_H
17241 # include <unistd.h>
17242 #endif
17243 #if HAVE_VFORK_H
17244 # include <vfork.h>
17245 #endif
17246 /* On some sparc systems, changes by the child to local and incoming
17247    argument registers are propagated back to the parent.  The compiler
17248    is told about this with #include <vfork.h>, but some compilers
17249    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17250    static variable whose address is put into a register that is
17251    clobbered by the vfork.  */
17252 static
17253 #ifdef __cplusplus
17254 sparc_address_test (int arg)
17255 # else
17256 sparc_address_test (arg) int arg;
17257 #endif
17258 {
17259   static pid_t child;
17260   if (!child) {
17261     child = vfork ();
17262     if (child < 0) {
17263       perror ("vfork");
17264       _exit(2);
17265     }
17266     if (!child) {
17267       arg = getpid();
17268       write(-1, "", 0);
17269       _exit (arg);
17270     }
17271   }
17272 }
17273
17274 int
17275 main ()
17276 {
17277   pid_t parent = getpid ();
17278   pid_t child;
17279
17280   sparc_address_test ();
17281
17282   child = vfork ();
17283
17284   if (child == 0) {
17285     /* Here is another test for sparc vfork register problems.  This
17286        test uses lots of local variables, at least as many local
17287        variables as main has allocated so far including compiler
17288        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17289        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17290        reuse the register of parent for one of the local variables,
17291        since it will think that parent can't possibly be used any more
17292        in this routine.  Assigning to the local variable will thus
17293        munge parent in the parent process.  */
17294     pid_t
17295       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17296       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17297     /* Convince the compiler that p..p7 are live; otherwise, it might
17298        use the same hardware register for all 8 local variables.  */
17299     if (p != p1 || p != p2 || p != p3 || p != p4
17300         || p != p5 || p != p6 || p != p7)
17301       _exit(1);
17302
17303     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17304        from child file descriptors.  If the child closes a descriptor
17305        before it execs or exits, this munges the parent's descriptor
17306        as well.  Test for this by closing stdout in the child.  */
17307     _exit(close(fileno(stdout)) != 0);
17308   } else {
17309     int status;
17310     struct stat st;
17311
17312     while (wait(&status) != child)
17313       ;
17314     $ac_main_return(
17315          /* Was there some problem with vforking?  */
17316          child < 0
17317
17318          /* Did the child fail?  (This shouldn't happen.)  */
17319          || status
17320
17321          /* Did the vfork/compiler bug occur?  */
17322          || parent != getpid()
17323
17324          /* Did the file descriptor bug occur?  */
17325          || fstat(fileno(stdout), &st) != 0
17326          );
17327   }
17328 }
17329 _ACEOF
17330 rm -f conftest$ac_exeext
17331 if { (eval echo "$as_me:17331: \"$ac_link\"") >&5
17332   (eval $ac_link) 2>&5
17333   ac_status=$?
17334   echo "$as_me:17334: \$? = $ac_status" >&5
17335   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17336   { (eval echo "$as_me:17336: \"$ac_try\"") >&5
17337   (eval $ac_try) 2>&5
17338   ac_status=$?
17339   echo "$as_me:17339: \$? = $ac_status" >&5
17340   (exit $ac_status); }; }; then
17341   ac_cv_func_vfork_works=yes
17342 else
17343   echo "$as_me: program exited with status $ac_status" >&5
17344 echo "$as_me: failed program was:" >&5
17345 cat conftest.$ac_ext >&5
17346 ac_cv_func_vfork_works=no
17347 fi
17348 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17349 fi
17350 fi
17351 echo "$as_me:17351: result: $ac_cv_func_vfork_works" >&5
17352 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17353
17354 fi;
17355 if test "x$ac_cv_func_fork_works" = xcross; then
17356   ac_cv_func_vfork_works=ac_cv_func_vfork
17357   { echo "$as_me:17357: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17358 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17359 fi
17360
17361 if test "x$ac_cv_func_vfork_works" = xyes; then
17362
17363 cat >>confdefs.h <<\EOF
17364 #define HAVE_WORKING_VFORK 1
17365 EOF
17366
17367 else
17368
17369 cat >>confdefs.h <<\EOF
17370 #define vfork fork
17371 EOF
17372
17373 fi
17374 if test "x$ac_cv_func_fork_works" = xyes; then
17375
17376 cat >>confdefs.h <<\EOF
17377 #define HAVE_WORKING_FORK 1
17378 EOF
17379
17380 fi
17381
17382 # special check for test/ditto.c
17383
17384 echo "$as_me:17384: checking for openpty in -lutil" >&5
17385 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17386 if test "${ac_cv_lib_util_openpty+set}" = set; then
17387   echo $ECHO_N "(cached) $ECHO_C" >&6
17388 else
17389   ac_check_lib_save_LIBS=$LIBS
17390 LIBS="-lutil  $LIBS"
17391 cat >conftest.$ac_ext <<_ACEOF
17392 #line 17392 "configure"
17393 #include "confdefs.h"
17394
17395 /* Override any gcc2 internal prototype to avoid an error.  */
17396 #ifdef __cplusplus
17397 extern "C"
17398 #endif
17399 /* We use char because int might match the return type of a gcc2
17400    builtin and then its argument prototype would still apply.  */
17401 char openpty ();
17402 int
17403 main ()
17404 {
17405 openpty ();
17406   ;
17407   return 0;
17408 }
17409 _ACEOF
17410 rm -f conftest.$ac_objext conftest$ac_exeext
17411 if { (eval echo "$as_me:17411: \"$ac_link\"") >&5
17412   (eval $ac_link) 2>&5
17413   ac_status=$?
17414   echo "$as_me:17414: \$? = $ac_status" >&5
17415   (exit $ac_status); } &&
17416          { ac_try='test -s conftest$ac_exeext'
17417   { (eval echo "$as_me:17417: \"$ac_try\"") >&5
17418   (eval $ac_try) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit $ac_status); }; }; then
17422   ac_cv_lib_util_openpty=yes
17423 else
17424   echo "$as_me: failed program was:" >&5
17425 cat conftest.$ac_ext >&5
17426 ac_cv_lib_util_openpty=no
17427 fi
17428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17429 LIBS=$ac_check_lib_save_LIBS
17430 fi
17431 echo "$as_me:17431: result: $ac_cv_lib_util_openpty" >&5
17432 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17433 if test $ac_cv_lib_util_openpty = yes; then
17434   cf_cv_lib_util=yes
17435 else
17436   cf_cv_lib_util=no
17437 fi
17438
17439 echo "$as_me:17439: checking for openpty header" >&5
17440 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17441 if test "${cf_cv_func_openpty+set}" = set; then
17442   echo $ECHO_N "(cached) $ECHO_C" >&6
17443 else
17444
17445     cf_save_LIBS="$LIBS"
17446     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17447     for cf_header in pty.h libutil.h util.h
17448     do
17449     cat >conftest.$ac_ext <<_ACEOF
17450 #line 17450 "configure"
17451 #include "confdefs.h"
17452
17453 #include <$cf_header>
17454
17455 int
17456 main ()
17457 {
17458
17459     int x = openpty((int *)0, (int *)0, (char *)0,
17460                    (struct termios *)0, (struct winsize *)0);
17461
17462   ;
17463   return 0;
17464 }
17465 _ACEOF
17466 rm -f conftest.$ac_objext conftest$ac_exeext
17467 if { (eval echo "$as_me:17467: \"$ac_link\"") >&5
17468   (eval $ac_link) 2>&5
17469   ac_status=$?
17470   echo "$as_me:17470: \$? = $ac_status" >&5
17471   (exit $ac_status); } &&
17472          { ac_try='test -s conftest$ac_exeext'
17473   { (eval echo "$as_me:17473: \"$ac_try\"") >&5
17474   (eval $ac_try) 2>&5
17475   ac_status=$?
17476   echo "$as_me:17476: \$? = $ac_status" >&5
17477   (exit $ac_status); }; }; then
17478
17479         cf_cv_func_openpty=$cf_header
17480         break
17481
17482 else
17483   echo "$as_me: failed program was:" >&5
17484 cat conftest.$ac_ext >&5
17485
17486         cf_cv_func_openpty=no
17487
17488 fi
17489 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17490     done
17491     LIBS="$cf_save_LIBS"
17492
17493 fi
17494 echo "$as_me:17494: result: $cf_cv_func_openpty" >&5
17495 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17496
17497 if test "$cf_cv_func_openpty" != no ; then
17498     cat >>confdefs.h <<EOF
17499 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17500 EOF
17501
17502     cat >>confdefs.h <<\EOF
17503 #define USE_XTERM_PTY 1
17504 EOF
17505
17506     if test "$cf_cv_lib_util" = yes ; then
17507         TEST_LIBS="-lutil $TEST_LIBS"
17508     fi
17509 fi
17510
17511 if test "$with_hashed_db" != no ; then
17512         cat >>confdefs.h <<\EOF
17513 #define USE_HASHED_DB 1
17514 EOF
17515
17516 case $with_hashed_db in #(vi
17517 yes|*able*) #(vi
17518     ;;
17519 *)
17520     if test -d "$with_hashed_db" ; then
17521
17522 if test -n "$with_hashed_db/include" ; then
17523   for cf_add_incdir in $with_hashed_db/include
17524   do
17525         while test $cf_add_incdir != /usr/include
17526         do
17527           if test -d $cf_add_incdir
17528           then
17529                 cf_have_incdir=no
17530                 if test -n "$CFLAGS$CPPFLAGS" ; then
17531                   # a loop is needed to ensure we can add subdirs of existing dirs
17532                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17533                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17534                           cf_have_incdir=yes; break
17535                         fi
17536                   done
17537                 fi
17538
17539                 if test "$cf_have_incdir" = no ; then
17540                   if test "$cf_add_incdir" = /usr/local/include ; then
17541                         if test "$GCC" = yes
17542                         then
17543                           cf_save_CPPFLAGS=$CPPFLAGS
17544                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17545                           cat >conftest.$ac_ext <<_ACEOF
17546 #line 17546 "configure"
17547 #include "confdefs.h"
17548 #include <stdio.h>
17549 int
17550 main ()
17551 {
17552 printf("Hello")
17553   ;
17554   return 0;
17555 }
17556 _ACEOF
17557 rm -f conftest.$ac_objext
17558 if { (eval echo "$as_me:17558: \"$ac_compile\"") >&5
17559   (eval $ac_compile) 2>&5
17560   ac_status=$?
17561   echo "$as_me:17561: \$? = $ac_status" >&5
17562   (exit $ac_status); } &&
17563          { ac_try='test -s conftest.$ac_objext'
17564   { (eval echo "$as_me:17564: \"$ac_try\"") >&5
17565   (eval $ac_try) 2>&5
17566   ac_status=$?
17567   echo "$as_me:17567: \$? = $ac_status" >&5
17568   (exit $ac_status); }; }; then
17569   :
17570 else
17571   echo "$as_me: failed program was:" >&5
17572 cat conftest.$ac_ext >&5
17573 cf_have_incdir=yes
17574 fi
17575 rm -f conftest.$ac_objext conftest.$ac_ext
17576                           CPPFLAGS=$cf_save_CPPFLAGS
17577                         fi
17578                   fi
17579                 fi
17580
17581                 if test "$cf_have_incdir" = no ; then
17582                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17583
17584 echo "${as_me:-configure}:17584: testing adding $cf_add_incdir to include-path ..." 1>&5
17585
17586                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17587
17588                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17589                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17590                   cf_add_incdir="$cf_top_incdir"
17591                 else
17592                   break
17593                 fi
17594           fi
17595         done
17596   done
17597 fi
17598
17599 if test -n "$with_hashed_db/lib" ; then
17600   for cf_add_libdir in $with_hashed_db/lib
17601   do
17602     if test $cf_add_libdir = /usr/lib ; then
17603       :
17604     elif test -d $cf_add_libdir
17605     then
17606       cf_have_libdir=no
17607       if test -n "$LDFLAGS$LIBS" ; then
17608         # a loop is needed to ensure we can add subdirs of existing dirs
17609         for cf_test_libdir in $LDFLAGS $LIBS ; do
17610           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17611             cf_have_libdir=yes; break
17612           fi
17613         done
17614       fi
17615       if test "$cf_have_libdir" = no ; then
17616         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17617
17618 echo "${as_me:-configure}:17618: testing adding $cf_add_libdir to library-path ..." 1>&5
17619
17620         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17621       fi
17622     fi
17623   done
17624 fi
17625
17626     fi
17627 esac
17628
17629 echo "$as_me:17629: checking for db.h" >&5
17630 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17631 if test "${ac_cv_header_db_h+set}" = set; then
17632   echo $ECHO_N "(cached) $ECHO_C" >&6
17633 else
17634   cat >conftest.$ac_ext <<_ACEOF
17635 #line 17635 "configure"
17636 #include "confdefs.h"
17637 #include <db.h>
17638 _ACEOF
17639 if { (eval echo "$as_me:17639: \"$ac_cpp conftest.$ac_ext\"") >&5
17640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17641   ac_status=$?
17642   egrep -v '^ *\+' conftest.er1 >conftest.err
17643   rm -f conftest.er1
17644   cat conftest.err >&5
17645   echo "$as_me:17645: \$? = $ac_status" >&5
17646   (exit $ac_status); } >/dev/null; then
17647   if test -s conftest.err; then
17648     ac_cpp_err=$ac_c_preproc_warn_flag
17649   else
17650     ac_cpp_err=
17651   fi
17652 else
17653   ac_cpp_err=yes
17654 fi
17655 if test -z "$ac_cpp_err"; then
17656   ac_cv_header_db_h=yes
17657 else
17658   echo "$as_me: failed program was:" >&5
17659   cat conftest.$ac_ext >&5
17660   ac_cv_header_db_h=no
17661 fi
17662 rm -f conftest.err conftest.$ac_ext
17663 fi
17664 echo "$as_me:17664: result: $ac_cv_header_db_h" >&5
17665 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17666 if test $ac_cv_header_db_h = yes; then
17667
17668 echo "$as_me:17668: checking for version of db" >&5
17669 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17670 if test "${cf_cv_hashed_db_version+set}" = set; then
17671   echo $ECHO_N "(cached) $ECHO_C" >&6
17672 else
17673
17674 cf_cv_hashed_db_version=unknown
17675
17676 for cf_db_version in 1 2 3 4 5
17677 do
17678
17679 echo "${as_me:-configure}:17679: testing checking for db version $cf_db_version ..." 1>&5
17680
17681         cat >conftest.$ac_ext <<_ACEOF
17682 #line 17682 "configure"
17683 #include "confdefs.h"
17684
17685 $ac_includes_default
17686 #include <db.h>
17687
17688 #ifdef DB_VERSION_MAJOR
17689         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17690 #if $cf_db_version == DB_VERSION_MAJOR
17691         /* ok */
17692 #else
17693         make an error
17694 #endif
17695 #else
17696 #if $cf_db_version == 1
17697         /* ok: assuming this is DB 1.8.5 */
17698 #else
17699         make an error
17700 #endif
17701 #endif
17702
17703 int
17704 main ()
17705 {
17706 DBT *foo = 0
17707   ;
17708   return 0;
17709 }
17710 _ACEOF
17711 rm -f conftest.$ac_objext
17712 if { (eval echo "$as_me:17712: \"$ac_compile\"") >&5
17713   (eval $ac_compile) 2>&5
17714   ac_status=$?
17715   echo "$as_me:17715: \$? = $ac_status" >&5
17716   (exit $ac_status); } &&
17717          { ac_try='test -s conftest.$ac_objext'
17718   { (eval echo "$as_me:17718: \"$ac_try\"") >&5
17719   (eval $ac_try) 2>&5
17720   ac_status=$?
17721   echo "$as_me:17721: \$? = $ac_status" >&5
17722   (exit $ac_status); }; }; then
17723
17724         cf_cv_hashed_db_version=$cf_db_version
17725         break
17726
17727 else
17728   echo "$as_me: failed program was:" >&5
17729 cat conftest.$ac_ext >&5
17730 fi
17731 rm -f conftest.$ac_objext conftest.$ac_ext
17732 done
17733
17734 fi
17735 echo "$as_me:17735: result: $cf_cv_hashed_db_version" >&5
17736 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17737
17738 if test "$cf_cv_hashed_db_version" = unknown ; then
17739         { { echo "$as_me:17739: error: Cannot determine version of db" >&5
17740 echo "$as_me: error: Cannot determine version of db" >&2;}
17741    { (exit 1); exit 1; }; }
17742 else
17743
17744 echo "$as_me:17744: checking for db libraries" >&5
17745 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17746 if test "${cf_cv_hashed_db_libs+set}" = set; then
17747   echo $ECHO_N "(cached) $ECHO_C" >&6
17748 else
17749
17750 cf_cv_hashed_db_libs=unknown
17751 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17752 do
17753         cf_save_libs="$LIBS"
17754         if test -n "$cf_db_libs"; then
17755                 LIBS="-l$cf_db_libs $LIBS"
17756         fi
17757
17758 echo "${as_me:-configure}:17758: testing checking for library "$cf_db_libs" ..." 1>&5
17759
17760         cat >conftest.$ac_ext <<_ACEOF
17761 #line 17761 "configure"
17762 #include "confdefs.h"
17763
17764 $ac_includes_default
17765 #include <db.h>
17766
17767 int
17768 main ()
17769 {
17770
17771         char *path = "/tmp/foo";
17772 #ifdef DB_VERSION_MAJOR
17773 #if DB_VERSION_MAJOR >= 4
17774         DB *result = 0;
17775         db_create(&result, NULL, 0);
17776         result->open(result,
17777                 NULL,
17778                 path,
17779                 path,
17780                 DB_HASH,
17781                 DB_CREATE,
17782                 0644);
17783 #elif DB_VERSION_MAJOR >= 3
17784         DB *result = 0;
17785         db_create(&result, NULL, 0);
17786         result->open(result,
17787                 path,
17788                 path,
17789                 DB_HASH,
17790                 DB_CREATE,
17791                 0644);
17792 #elif DB_VERSION_MAJOR >= 2
17793         DB *result = 0;
17794         db_open(path,
17795                 DB_HASH,
17796                 DB_CREATE,
17797                 0644,
17798                 (DB_ENV *) 0,
17799                 (DB_INFO *) 0,
17800                 &result);
17801 #endif /* DB_VERSION_MAJOR */
17802 #else
17803         DB *result = dbopen(path,
17804                      2,
17805                      0644,
17806                      DB_HASH,
17807                      0);
17808 #endif
17809         ${cf_cv_main_return:-return}(result != 0)
17810
17811   ;
17812   return 0;
17813 }
17814 _ACEOF
17815 rm -f conftest.$ac_objext conftest$ac_exeext
17816 if { (eval echo "$as_me:17816: \"$ac_link\"") >&5
17817   (eval $ac_link) 2>&5
17818   ac_status=$?
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit $ac_status); } &&
17821          { ac_try='test -s conftest$ac_exeext'
17822   { (eval echo "$as_me:17822: \"$ac_try\"") >&5
17823   (eval $ac_try) 2>&5
17824   ac_status=$?
17825   echo "$as_me:17825: \$? = $ac_status" >&5
17826   (exit $ac_status); }; }; then
17827
17828         if test -n "$cf_db_libs" ; then
17829                 cf_cv_hashed_db_libs=$cf_db_libs
17830         else
17831                 cf_cv_hashed_db_libs=default
17832         fi
17833         LIBS="$cf_save_libs"
17834         break
17835
17836 else
17837   echo "$as_me: failed program was:" >&5
17838 cat conftest.$ac_ext >&5
17839 fi
17840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17841         LIBS="$cf_save_libs"
17842 done
17843
17844 fi
17845 echo "$as_me:17845: result: $cf_cv_hashed_db_libs" >&5
17846 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17847
17848         if test "$cf_cv_hashed_db_libs" = unknown ; then
17849                 { { echo "$as_me:17849: error: Cannot determine library for db" >&5
17850 echo "$as_me: error: Cannot determine library for db" >&2;}
17851    { (exit 1); exit 1; }; }
17852         elif test "$cf_cv_hashed_db_libs" != default ; then
17853                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17854         fi
17855 fi
17856
17857 else
17858
17859         { { echo "$as_me:17859: error: Cannot find db.h" >&5
17860 echo "$as_me: error: Cannot find db.h" >&2;}
17861    { (exit 1); exit 1; }; }
17862
17863 fi
17864
17865 fi
17866
17867 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17868         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17869         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17870 fi
17871
17872 # Just in case, check if the C compiler has a bool type.
17873
17874 echo "$as_me:17874: checking if we should include stdbool.h" >&5
17875 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17876
17877 if test "${cf_cv_header_stdbool_h+set}" = set; then
17878   echo $ECHO_N "(cached) $ECHO_C" >&6
17879 else
17880
17881         cat >conftest.$ac_ext <<_ACEOF
17882 #line 17882 "configure"
17883 #include "confdefs.h"
17884
17885 int
17886 main ()
17887 {
17888 bool foo = false
17889   ;
17890   return 0;
17891 }
17892 _ACEOF
17893 rm -f conftest.$ac_objext
17894 if { (eval echo "$as_me:17894: \"$ac_compile\"") >&5
17895   (eval $ac_compile) 2>&5
17896   ac_status=$?
17897   echo "$as_me:17897: \$? = $ac_status" >&5
17898   (exit $ac_status); } &&
17899          { ac_try='test -s conftest.$ac_objext'
17900   { (eval echo "$as_me:17900: \"$ac_try\"") >&5
17901   (eval $ac_try) 2>&5
17902   ac_status=$?
17903   echo "$as_me:17903: \$? = $ac_status" >&5
17904   (exit $ac_status); }; }; then
17905   cf_cv_header_stdbool_h=0
17906 else
17907   echo "$as_me: failed program was:" >&5
17908 cat conftest.$ac_ext >&5
17909 cat >conftest.$ac_ext <<_ACEOF
17910 #line 17910 "configure"
17911 #include "confdefs.h"
17912
17913 #ifndef __BEOS__
17914 #include <stdbool.h>
17915 #endif
17916
17917 int
17918 main ()
17919 {
17920 bool foo = false
17921   ;
17922   return 0;
17923 }
17924 _ACEOF
17925 rm -f conftest.$ac_objext
17926 if { (eval echo "$as_me:17926: \"$ac_compile\"") >&5
17927   (eval $ac_compile) 2>&5
17928   ac_status=$?
17929   echo "$as_me:17929: \$? = $ac_status" >&5
17930   (exit $ac_status); } &&
17931          { ac_try='test -s conftest.$ac_objext'
17932   { (eval echo "$as_me:17932: \"$ac_try\"") >&5
17933   (eval $ac_try) 2>&5
17934   ac_status=$?
17935   echo "$as_me:17935: \$? = $ac_status" >&5
17936   (exit $ac_status); }; }; then
17937   cf_cv_header_stdbool_h=1
17938 else
17939   echo "$as_me: failed program was:" >&5
17940 cat conftest.$ac_ext >&5
17941 cf_cv_header_stdbool_h=0
17942 fi
17943 rm -f conftest.$ac_objext conftest.$ac_ext
17944 fi
17945 rm -f conftest.$ac_objext conftest.$ac_ext
17946 fi
17947
17948 if test "$cf_cv_header_stdbool_h" = 1
17949 then    echo "$as_me:17949: result: yes" >&5
17950 echo "${ECHO_T}yes" >&6
17951 else    echo "$as_me:17951: result: no" >&5
17952 echo "${ECHO_T}no" >&6
17953 fi
17954
17955 echo "$as_me:17955: checking for builtin bool type" >&5
17956 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17957
17958 if test "${cf_cv_cc_bool_type+set}" = set; then
17959   echo $ECHO_N "(cached) $ECHO_C" >&6
17960 else
17961
17962         cat >conftest.$ac_ext <<_ACEOF
17963 #line 17963 "configure"
17964 #include "confdefs.h"
17965
17966 #include <stdio.h>
17967 #include <sys/types.h>
17968
17969 int
17970 main ()
17971 {
17972 bool x = false
17973   ;
17974   return 0;
17975 }
17976 _ACEOF
17977 rm -f conftest.$ac_objext
17978 if { (eval echo "$as_me:17978: \"$ac_compile\"") >&5
17979   (eval $ac_compile) 2>&5
17980   ac_status=$?
17981   echo "$as_me:17981: \$? = $ac_status" >&5
17982   (exit $ac_status); } &&
17983          { ac_try='test -s conftest.$ac_objext'
17984   { (eval echo "$as_me:17984: \"$ac_try\"") >&5
17985   (eval $ac_try) 2>&5
17986   ac_status=$?
17987   echo "$as_me:17987: \$? = $ac_status" >&5
17988   (exit $ac_status); }; }; then
17989   cf_cv_cc_bool_type=1
17990 else
17991   echo "$as_me: failed program was:" >&5
17992 cat conftest.$ac_ext >&5
17993 cf_cv_cc_bool_type=0
17994 fi
17995 rm -f conftest.$ac_objext conftest.$ac_ext
17996
17997 fi
17998
17999 if test "$cf_cv_cc_bool_type" = 1
18000 then    echo "$as_me:18000: result: yes" >&5
18001 echo "${ECHO_T}yes" >&6
18002 else    echo "$as_me:18002: result: no" >&5
18003 echo "${ECHO_T}no" >&6
18004 fi
18005
18006 # Check for C++ compiler characteristics (and ensure that it's there!)
18007 if test -n "$CXX" ; then
18008         ac_ext=cc
18009 ac_cpp='$CXXCPP $CPPFLAGS'
18010 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18011 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18012 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18013 ac_main_return=return
18014
18015 if test -n "$GXX" ; then
18016 case $cf_cv_system_name in #(vi
18017 os2*) #(vi
18018         cf_stdcpp_libname=stdcpp
18019         ;;
18020 *)
18021         cf_stdcpp_libname=stdc++
18022         ;;
18023 esac
18024 echo "$as_me:18024: checking for library $cf_stdcpp_libname" >&5
18025 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18026 if test "${cf_cv_libstdcpp+set}" = set; then
18027   echo $ECHO_N "(cached) $ECHO_C" >&6
18028 else
18029
18030         cf_save="$LIBS"
18031         LIBS="-l$cf_stdcpp_libname $LIBS"
18032 cat >conftest.$ac_ext <<_ACEOF
18033 #line 18033 "configure"
18034 #include "confdefs.h"
18035
18036 #include <strstream.h>
18037 int
18038 main ()
18039 {
18040
18041 char buf[80];
18042 strstreambuf foo(buf, sizeof(buf))
18043
18044   ;
18045   return 0;
18046 }
18047 _ACEOF
18048 rm -f conftest.$ac_objext conftest$ac_exeext
18049 if { (eval echo "$as_me:18049: \"$ac_link\"") >&5
18050   (eval $ac_link) 2>&5
18051   ac_status=$?
18052   echo "$as_me:18052: \$? = $ac_status" >&5
18053   (exit $ac_status); } &&
18054          { ac_try='test -s conftest$ac_exeext'
18055   { (eval echo "$as_me:18055: \"$ac_try\"") >&5
18056   (eval $ac_try) 2>&5
18057   ac_status=$?
18058   echo "$as_me:18058: \$? = $ac_status" >&5
18059   (exit $ac_status); }; }; then
18060   cf_cv_libstdcpp=yes
18061 else
18062   echo "$as_me: failed program was:" >&5
18063 cat conftest.$ac_ext >&5
18064 cf_cv_libstdcpp=no
18065 fi
18066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18067         LIBS="$cf_save"
18068
18069 fi
18070 echo "$as_me:18070: result: $cf_cv_libstdcpp" >&5
18071 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18072 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18073 fi
18074
18075         echo "$as_me:18075: checking whether $CXX understands -c and -o together" >&5
18076 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18077 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18078   echo $ECHO_N "(cached) $ECHO_C" >&6
18079 else
18080
18081 cat > conftest.$ac_ext <<CF_EOF
18082 #include <stdio.h>
18083 int main()
18084 {
18085         ${cf_cv_main_return:-return}(0);
18086 }
18087 CF_EOF
18088 # We do the test twice because some compilers refuse to overwrite an
18089 # existing .o file with -o, though they will create one.
18090 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18091 if { (eval echo "$as_me:18091: \"$ac_try\"") >&5
18092   (eval $ac_try) 2>&5
18093   ac_status=$?
18094   echo "$as_me:18094: \$? = $ac_status" >&5
18095   (exit $ac_status); } &&
18096   test -f conftest2.$ac_objext && { (eval echo "$as_me:18096: \"$ac_try\"") >&5
18097   (eval $ac_try) 2>&5
18098   ac_status=$?
18099   echo "$as_me:18099: \$? = $ac_status" >&5
18100   (exit $ac_status); };
18101 then
18102   eval cf_cv_prog_CXX_c_o=yes
18103 else
18104   eval cf_cv_prog_CXX_c_o=no
18105 fi
18106 rm -rf conftest*
18107
18108 fi
18109 if test $cf_cv_prog_CXX_c_o = yes; then
18110   echo "$as_me:18110: result: yes" >&5
18111 echo "${ECHO_T}yes" >&6
18112 else
18113   echo "$as_me:18113: result: no" >&5
18114 echo "${ECHO_T}no" >&6
18115 fi
18116
18117         case $GXX_VERSION in
18118         1*|2.0-6*)
18119                 cf_cxx_library=yes
18120                 ;;
18121         *-2.7*|2.7*)
18122
18123 cf_cxx_library=unknown
18124 case $cf_cv_system_name in #(vi
18125 os2*) #(vi
18126         cf_gpp_libname=gpp
18127         ;;
18128 *)
18129         cf_gpp_libname=g++
18130         ;;
18131 esac
18132 if test "$GXX" = yes; then
18133         echo "$as_me:18133: checking for lib$cf_gpp_libname" >&5
18134 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18135         cf_save="$LIBS"
18136         LIBS="-l$cf_gpp_libname $LIBS"
18137         cat >conftest.$ac_ext <<_ACEOF
18138 #line 18138 "configure"
18139 #include "confdefs.h"
18140
18141 #include <$cf_gpp_libname/builtin.h>
18142
18143 int
18144 main ()
18145 {
18146 two_arg_error_handler_t foo2 = lib_error_handler
18147   ;
18148   return 0;
18149 }
18150 _ACEOF
18151 rm -f conftest.$ac_objext conftest$ac_exeext
18152 if { (eval echo "$as_me:18152: \"$ac_link\"") >&5
18153   (eval $ac_link) 2>&5
18154   ac_status=$?
18155   echo "$as_me:18155: \$? = $ac_status" >&5
18156   (exit $ac_status); } &&
18157          { ac_try='test -s conftest$ac_exeext'
18158   { (eval echo "$as_me:18158: \"$ac_try\"") >&5
18159   (eval $ac_try) 2>&5
18160   ac_status=$?
18161   echo "$as_me:18161: \$? = $ac_status" >&5
18162   (exit $ac_status); }; }; then
18163   cf_cxx_library=yes
18164          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18165          if test "$cf_gpp_libname" = cpp ; then
18166             cat >>confdefs.h <<\EOF
18167 #define HAVE_GPP_BUILTIN_H 1
18168 EOF
18169
18170          else
18171             cat >>confdefs.h <<\EOF
18172 #define HAVE_GXX_BUILTIN_H 1
18173 EOF
18174
18175          fi
18176 else
18177   echo "$as_me: failed program was:" >&5
18178 cat conftest.$ac_ext >&5
18179 cat >conftest.$ac_ext <<_ACEOF
18180 #line 18180 "configure"
18181 #include "confdefs.h"
18182
18183 #include <builtin.h>
18184
18185 int
18186 main ()
18187 {
18188 two_arg_error_handler_t foo2 = lib_error_handler
18189   ;
18190   return 0;
18191 }
18192 _ACEOF
18193 rm -f conftest.$ac_objext conftest$ac_exeext
18194 if { (eval echo "$as_me:18194: \"$ac_link\"") >&5
18195   (eval $ac_link) 2>&5
18196   ac_status=$?
18197   echo "$as_me:18197: \$? = $ac_status" >&5
18198   (exit $ac_status); } &&
18199          { ac_try='test -s conftest$ac_exeext'
18200   { (eval echo "$as_me:18200: \"$ac_try\"") >&5
18201   (eval $ac_try) 2>&5
18202   ac_status=$?
18203   echo "$as_me:18203: \$? = $ac_status" >&5
18204   (exit $ac_status); }; }; then
18205   cf_cxx_library=yes
18206          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18207          cat >>confdefs.h <<\EOF
18208 #define HAVE_BUILTIN_H 1
18209 EOF
18210
18211 else
18212   echo "$as_me: failed program was:" >&5
18213 cat conftest.$ac_ext >&5
18214 cf_cxx_library=no
18215 fi
18216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18217 fi
18218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18219         LIBS="$cf_save"
18220         echo "$as_me:18220: result: $cf_cxx_library" >&5
18221 echo "${ECHO_T}$cf_cxx_library" >&6
18222 fi
18223
18224                 ;;
18225         *)
18226                 cf_cxx_library=no
18227                 ;;
18228         esac
18229
18230         ac_ext=cc
18231 ac_cpp='$CXXCPP $CPPFLAGS'
18232 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18233 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18234 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18235 ac_main_return=return
18236 echo "$as_me:18236: checking how to run the C++ preprocessor" >&5
18237 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18238 if test -z "$CXXCPP"; then
18239   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18240   echo $ECHO_N "(cached) $ECHO_C" >&6
18241 else
18242       # Double quotes because CXXCPP needs to be expanded
18243     for CXXCPP in "$CXX -E" "/lib/cpp"
18244     do
18245       ac_preproc_ok=false
18246 for ac_cxx_preproc_warn_flag in '' yes
18247 do
18248   # Use a header file that comes with gcc, so configuring glibc
18249   # with a fresh cross-compiler works.
18250   # On the NeXT, cc -E runs the code through the compiler's parser,
18251   # not just through cpp. "Syntax error" is here to catch this case.
18252   cat >conftest.$ac_ext <<_ACEOF
18253 #line 18253 "configure"
18254 #include "confdefs.h"
18255 #include <assert.h>
18256                      Syntax error
18257 _ACEOF
18258 if { (eval echo "$as_me:18258: \"$ac_cpp conftest.$ac_ext\"") >&5
18259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18260   ac_status=$?
18261   egrep -v '^ *\+' conftest.er1 >conftest.err
18262   rm -f conftest.er1
18263   cat conftest.err >&5
18264   echo "$as_me:18264: \$? = $ac_status" >&5
18265   (exit $ac_status); } >/dev/null; then
18266   if test -s conftest.err; then
18267     ac_cpp_err=$ac_cxx_preproc_warn_flag
18268   else
18269     ac_cpp_err=
18270   fi
18271 else
18272   ac_cpp_err=yes
18273 fi
18274 if test -z "$ac_cpp_err"; then
18275   :
18276 else
18277   echo "$as_me: failed program was:" >&5
18278   cat conftest.$ac_ext >&5
18279   # Broken: fails on valid input.
18280 continue
18281 fi
18282 rm -f conftest.err conftest.$ac_ext
18283
18284   # OK, works on sane cases.  Now check whether non-existent headers
18285   # can be detected and how.
18286   cat >conftest.$ac_ext <<_ACEOF
18287 #line 18287 "configure"
18288 #include "confdefs.h"
18289 #include <ac_nonexistent.h>
18290 _ACEOF
18291 if { (eval echo "$as_me:18291: \"$ac_cpp conftest.$ac_ext\"") >&5
18292   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18293   ac_status=$?
18294   egrep -v '^ *\+' conftest.er1 >conftest.err
18295   rm -f conftest.er1
18296   cat conftest.err >&5
18297   echo "$as_me:18297: \$? = $ac_status" >&5
18298   (exit $ac_status); } >/dev/null; then
18299   if test -s conftest.err; then
18300     ac_cpp_err=$ac_cxx_preproc_warn_flag
18301   else
18302     ac_cpp_err=
18303   fi
18304 else
18305   ac_cpp_err=yes
18306 fi
18307 if test -z "$ac_cpp_err"; then
18308   # Broken: success on invalid input.
18309 continue
18310 else
18311   echo "$as_me: failed program was:" >&5
18312   cat conftest.$ac_ext >&5
18313   # Passes both tests.
18314 ac_preproc_ok=:
18315 break
18316 fi
18317 rm -f conftest.err conftest.$ac_ext
18318
18319 done
18320 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18321 rm -f conftest.err conftest.$ac_ext
18322 if $ac_preproc_ok; then
18323   break
18324 fi
18325
18326     done
18327     ac_cv_prog_CXXCPP=$CXXCPP
18328
18329 fi
18330   CXXCPP=$ac_cv_prog_CXXCPP
18331 else
18332   ac_cv_prog_CXXCPP=$CXXCPP
18333 fi
18334 echo "$as_me:18334: result: $CXXCPP" >&5
18335 echo "${ECHO_T}$CXXCPP" >&6
18336 ac_preproc_ok=false
18337 for ac_cxx_preproc_warn_flag in '' yes
18338 do
18339   # Use a header file that comes with gcc, so configuring glibc
18340   # with a fresh cross-compiler works.
18341   # On the NeXT, cc -E runs the code through the compiler's parser,
18342   # not just through cpp. "Syntax error" is here to catch this case.
18343   cat >conftest.$ac_ext <<_ACEOF
18344 #line 18344 "configure"
18345 #include "confdefs.h"
18346 #include <assert.h>
18347                      Syntax error
18348 _ACEOF
18349 if { (eval echo "$as_me:18349: \"$ac_cpp conftest.$ac_ext\"") >&5
18350   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18351   ac_status=$?
18352   egrep -v '^ *\+' conftest.er1 >conftest.err
18353   rm -f conftest.er1
18354   cat conftest.err >&5
18355   echo "$as_me:18355: \$? = $ac_status" >&5
18356   (exit $ac_status); } >/dev/null; then
18357   if test -s conftest.err; then
18358     ac_cpp_err=$ac_cxx_preproc_warn_flag
18359   else
18360     ac_cpp_err=
18361   fi
18362 else
18363   ac_cpp_err=yes
18364 fi
18365 if test -z "$ac_cpp_err"; then
18366   :
18367 else
18368   echo "$as_me: failed program was:" >&5
18369   cat conftest.$ac_ext >&5
18370   # Broken: fails on valid input.
18371 continue
18372 fi
18373 rm -f conftest.err conftest.$ac_ext
18374
18375   # OK, works on sane cases.  Now check whether non-existent headers
18376   # can be detected and how.
18377   cat >conftest.$ac_ext <<_ACEOF
18378 #line 18378 "configure"
18379 #include "confdefs.h"
18380 #include <ac_nonexistent.h>
18381 _ACEOF
18382 if { (eval echo "$as_me:18382: \"$ac_cpp conftest.$ac_ext\"") >&5
18383   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18384   ac_status=$?
18385   egrep -v '^ *\+' conftest.er1 >conftest.err
18386   rm -f conftest.er1
18387   cat conftest.err >&5
18388   echo "$as_me:18388: \$? = $ac_status" >&5
18389   (exit $ac_status); } >/dev/null; then
18390   if test -s conftest.err; then
18391     ac_cpp_err=$ac_cxx_preproc_warn_flag
18392   else
18393     ac_cpp_err=
18394   fi
18395 else
18396   ac_cpp_err=yes
18397 fi
18398 if test -z "$ac_cpp_err"; then
18399   # Broken: success on invalid input.
18400 continue
18401 else
18402   echo "$as_me: failed program was:" >&5
18403   cat conftest.$ac_ext >&5
18404   # Passes both tests.
18405 ac_preproc_ok=:
18406 break
18407 fi
18408 rm -f conftest.err conftest.$ac_ext
18409
18410 done
18411 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18412 rm -f conftest.err conftest.$ac_ext
18413 if $ac_preproc_ok; then
18414   :
18415 else
18416   { { echo "$as_me:18416: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18417 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18418    { (exit 1); exit 1; }; }
18419 fi
18420
18421 ac_ext=cc
18422 ac_cpp='$CXXCPP $CPPFLAGS'
18423 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18424 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18425 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18426 ac_main_return=return
18427
18428 for ac_header in typeinfo
18429 do
18430 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18431 echo "$as_me:18431: checking for $ac_header" >&5
18432 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18433 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18434   echo $ECHO_N "(cached) $ECHO_C" >&6
18435 else
18436   cat >conftest.$ac_ext <<_ACEOF
18437 #line 18437 "configure"
18438 #include "confdefs.h"
18439 #include <$ac_header>
18440 _ACEOF
18441 if { (eval echo "$as_me:18441: \"$ac_cpp conftest.$ac_ext\"") >&5
18442   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18443   ac_status=$?
18444   egrep -v '^ *\+' conftest.er1 >conftest.err
18445   rm -f conftest.er1
18446   cat conftest.err >&5
18447   echo "$as_me:18447: \$? = $ac_status" >&5
18448   (exit $ac_status); } >/dev/null; then
18449   if test -s conftest.err; then
18450     ac_cpp_err=$ac_cxx_preproc_warn_flag
18451   else
18452     ac_cpp_err=
18453   fi
18454 else
18455   ac_cpp_err=yes
18456 fi
18457 if test -z "$ac_cpp_err"; then
18458   eval "$as_ac_Header=yes"
18459 else
18460   echo "$as_me: failed program was:" >&5
18461   cat conftest.$ac_ext >&5
18462   eval "$as_ac_Header=no"
18463 fi
18464 rm -f conftest.err conftest.$ac_ext
18465 fi
18466 echo "$as_me:18466: result: `eval echo '${'$as_ac_Header'}'`" >&5
18467 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18468 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18469   cat >>confdefs.h <<EOF
18470 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18471 EOF
18472
18473 fi
18474 done
18475
18476 for ac_header in iostream
18477 do
18478 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18479 echo "$as_me:18479: checking for $ac_header" >&5
18480 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18481 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18482   echo $ECHO_N "(cached) $ECHO_C" >&6
18483 else
18484   cat >conftest.$ac_ext <<_ACEOF
18485 #line 18485 "configure"
18486 #include "confdefs.h"
18487 #include <$ac_header>
18488 _ACEOF
18489 if { (eval echo "$as_me:18489: \"$ac_cpp conftest.$ac_ext\"") >&5
18490   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18491   ac_status=$?
18492   egrep -v '^ *\+' conftest.er1 >conftest.err
18493   rm -f conftest.er1
18494   cat conftest.err >&5
18495   echo "$as_me:18495: \$? = $ac_status" >&5
18496   (exit $ac_status); } >/dev/null; then
18497   if test -s conftest.err; then
18498     ac_cpp_err=$ac_cxx_preproc_warn_flag
18499   else
18500     ac_cpp_err=
18501   fi
18502 else
18503   ac_cpp_err=yes
18504 fi
18505 if test -z "$ac_cpp_err"; then
18506   eval "$as_ac_Header=yes"
18507 else
18508   echo "$as_me: failed program was:" >&5
18509   cat conftest.$ac_ext >&5
18510   eval "$as_ac_Header=no"
18511 fi
18512 rm -f conftest.err conftest.$ac_ext
18513 fi
18514 echo "$as_me:18514: result: `eval echo '${'$as_ac_Header'}'`" >&5
18515 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18516 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18517   cat >>confdefs.h <<EOF
18518 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18519 EOF
18520
18521 fi
18522 done
18523
18524 if test x"$ac_cv_header_iostream" = xyes ; then
18525         echo "$as_me:18525: checking if iostream uses std-namespace" >&5
18526 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18527         cat >conftest.$ac_ext <<_ACEOF
18528 #line 18528 "configure"
18529 #include "confdefs.h"
18530
18531 #include <iostream>
18532 using std::endl;
18533 using std::cerr;
18534 int
18535 main ()
18536 {
18537
18538 cerr << "testing" << endl;
18539
18540   ;
18541   return 0;
18542 }
18543 _ACEOF
18544 rm -f conftest.$ac_objext
18545 if { (eval echo "$as_me:18545: \"$ac_compile\"") >&5
18546   (eval $ac_compile) 2>&5
18547   ac_status=$?
18548   echo "$as_me:18548: \$? = $ac_status" >&5
18549   (exit $ac_status); } &&
18550          { ac_try='test -s conftest.$ac_objext'
18551   { (eval echo "$as_me:18551: \"$ac_try\"") >&5
18552   (eval $ac_try) 2>&5
18553   ac_status=$?
18554   echo "$as_me:18554: \$? = $ac_status" >&5
18555   (exit $ac_status); }; }; then
18556   cf_iostream_namespace=yes
18557 else
18558   echo "$as_me: failed program was:" >&5
18559 cat conftest.$ac_ext >&5
18560 cf_iostream_namespace=no
18561 fi
18562 rm -f conftest.$ac_objext conftest.$ac_ext
18563         echo "$as_me:18563: result: $cf_iostream_namespace" >&5
18564 echo "${ECHO_T}$cf_iostream_namespace" >&6
18565         if test "$cf_iostream_namespace" = yes ; then
18566                 cat >>confdefs.h <<\EOF
18567 #define IOSTREAM_NAMESPACE 1
18568 EOF
18569
18570         fi
18571 fi
18572
18573 echo "$as_me:18573: checking if we should include stdbool.h" >&5
18574 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18575
18576 if test "${cf_cv_header_stdbool_h+set}" = set; then
18577   echo $ECHO_N "(cached) $ECHO_C" >&6
18578 else
18579
18580         cat >conftest.$ac_ext <<_ACEOF
18581 #line 18581 "configure"
18582 #include "confdefs.h"
18583
18584 int
18585 main ()
18586 {
18587 bool foo = false
18588   ;
18589   return 0;
18590 }
18591 _ACEOF
18592 rm -f conftest.$ac_objext
18593 if { (eval echo "$as_me:18593: \"$ac_compile\"") >&5
18594   (eval $ac_compile) 2>&5
18595   ac_status=$?
18596   echo "$as_me:18596: \$? = $ac_status" >&5
18597   (exit $ac_status); } &&
18598          { ac_try='test -s conftest.$ac_objext'
18599   { (eval echo "$as_me:18599: \"$ac_try\"") >&5
18600   (eval $ac_try) 2>&5
18601   ac_status=$?
18602   echo "$as_me:18602: \$? = $ac_status" >&5
18603   (exit $ac_status); }; }; then
18604   cf_cv_header_stdbool_h=0
18605 else
18606   echo "$as_me: failed program was:" >&5
18607 cat conftest.$ac_ext >&5
18608 cat >conftest.$ac_ext <<_ACEOF
18609 #line 18609 "configure"
18610 #include "confdefs.h"
18611
18612 #ifndef __BEOS__
18613 #include <stdbool.h>
18614 #endif
18615
18616 int
18617 main ()
18618 {
18619 bool foo = false
18620   ;
18621   return 0;
18622 }
18623 _ACEOF
18624 rm -f conftest.$ac_objext
18625 if { (eval echo "$as_me:18625: \"$ac_compile\"") >&5
18626   (eval $ac_compile) 2>&5
18627   ac_status=$?
18628   echo "$as_me:18628: \$? = $ac_status" >&5
18629   (exit $ac_status); } &&
18630          { ac_try='test -s conftest.$ac_objext'
18631   { (eval echo "$as_me:18631: \"$ac_try\"") >&5
18632   (eval $ac_try) 2>&5
18633   ac_status=$?
18634   echo "$as_me:18634: \$? = $ac_status" >&5
18635   (exit $ac_status); }; }; then
18636   cf_cv_header_stdbool_h=1
18637 else
18638   echo "$as_me: failed program was:" >&5
18639 cat conftest.$ac_ext >&5
18640 cf_cv_header_stdbool_h=0
18641 fi
18642 rm -f conftest.$ac_objext conftest.$ac_ext
18643 fi
18644 rm -f conftest.$ac_objext conftest.$ac_ext
18645 fi
18646
18647 if test "$cf_cv_header_stdbool_h" = 1
18648 then    echo "$as_me:18648: result: yes" >&5
18649 echo "${ECHO_T}yes" >&6
18650 else    echo "$as_me:18650: result: no" >&5
18651 echo "${ECHO_T}no" >&6
18652 fi
18653
18654 echo "$as_me:18654: checking for builtin bool type" >&5
18655 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18656
18657 if test "${cf_cv_builtin_bool+set}" = set; then
18658   echo $ECHO_N "(cached) $ECHO_C" >&6
18659 else
18660
18661         cat >conftest.$ac_ext <<_ACEOF
18662 #line 18662 "configure"
18663 #include "confdefs.h"
18664
18665 #include <stdio.h>
18666 #include <sys/types.h>
18667
18668 int
18669 main ()
18670 {
18671 bool x = false
18672   ;
18673   return 0;
18674 }
18675 _ACEOF
18676 rm -f conftest.$ac_objext
18677 if { (eval echo "$as_me:18677: \"$ac_compile\"") >&5
18678   (eval $ac_compile) 2>&5
18679   ac_status=$?
18680   echo "$as_me:18680: \$? = $ac_status" >&5
18681   (exit $ac_status); } &&
18682          { ac_try='test -s conftest.$ac_objext'
18683   { (eval echo "$as_me:18683: \"$ac_try\"") >&5
18684   (eval $ac_try) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); }; }; then
18688   cf_cv_builtin_bool=1
18689 else
18690   echo "$as_me: failed program was:" >&5
18691 cat conftest.$ac_ext >&5
18692 cf_cv_builtin_bool=0
18693 fi
18694 rm -f conftest.$ac_objext conftest.$ac_ext
18695
18696 fi
18697
18698 if test "$cf_cv_builtin_bool" = 1
18699 then    echo "$as_me:18699: result: yes" >&5
18700 echo "${ECHO_T}yes" >&6
18701 else    echo "$as_me:18701: result: no" >&5
18702 echo "${ECHO_T}no" >&6
18703 fi
18704
18705 echo "$as_me:18705: checking for size of bool" >&5
18706 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18707 if test "${cf_cv_type_of_bool+set}" = set; then
18708   echo $ECHO_N "(cached) $ECHO_C" >&6
18709 else
18710
18711         rm -f cf_test.out
18712         if test "$cross_compiling" = yes; then
18713   cf_cv_type_of_bool=unknown
18714 else
18715   cat >conftest.$ac_ext <<_ACEOF
18716 #line 18716 "configure"
18717 #include "confdefs.h"
18718
18719 #include <stdlib.h>
18720 #include <stdio.h>
18721
18722 #if defined(__cplusplus)
18723
18724 #ifdef HAVE_GXX_BUILTIN_H
18725 #include <g++/builtin.h>
18726 #elif HAVE_GPP_BUILTIN_H
18727 #include <gpp/builtin.h>
18728 #elif HAVE_BUILTIN_H
18729 #include <builtin.h>
18730 #endif
18731
18732 #else
18733
18734 #if $cf_cv_header_stdbool_h
18735 #include <stdbool.h>
18736 #endif
18737
18738 #endif
18739
18740 main()
18741 {
18742         FILE *fp = fopen("cf_test.out", "w");
18743         if (fp != 0) {
18744                 bool x = true;
18745                 if ((bool)(-x) >= 0)
18746                         fputs("unsigned ", fp);
18747                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18748                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18749                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18750                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18751                 fclose(fp);
18752         }
18753         ${cf_cv_main_return:-return}(0);
18754 }
18755
18756 _ACEOF
18757 rm -f conftest$ac_exeext
18758 if { (eval echo "$as_me:18758: \"$ac_link\"") >&5
18759   (eval $ac_link) 2>&5
18760   ac_status=$?
18761   echo "$as_me:18761: \$? = $ac_status" >&5
18762   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18763   { (eval echo "$as_me:18763: \"$ac_try\"") >&5
18764   (eval $ac_try) 2>&5
18765   ac_status=$?
18766   echo "$as_me:18766: \$? = $ac_status" >&5
18767   (exit $ac_status); }; }; then
18768   cf_cv_type_of_bool=`cat cf_test.out`
18769                  if test -z "$cf_cv_type_of_bool"; then
18770                    cf_cv_type_of_bool=unknown
18771                  fi
18772 else
18773   echo "$as_me: program exited with status $ac_status" >&5
18774 echo "$as_me: failed program was:" >&5
18775 cat conftest.$ac_ext >&5
18776 cf_cv_type_of_bool=unknown
18777 fi
18778 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18779 fi
18780
18781 fi
18782
18783         rm -f cf_test.out
18784 echo "$as_me:18784: result: $cf_cv_type_of_bool" >&5
18785 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18786 if test "$cf_cv_type_of_bool" = unknown ; then
18787         case .$NCURSES_BOOL in #(vi
18788         .auto|.) NCURSES_BOOL=unsigned;;
18789         esac
18790         { echo "$as_me:18790: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18791 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18792         cf_cv_type_of_bool=$NCURSES_BOOL
18793 fi
18794
18795 echo "$as_me:18795: checking for special defines needed for etip.h" >&5
18796 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18797 cf_save_CXXFLAGS="$CXXFLAGS"
18798 cf_result="none"
18799
18800 # etip.h includes ncurses.h which includes ncurses_dll.h
18801 # But ncurses_dll.h is generated - fix here.
18802 test -d include || mkdir include
18803 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' ${srcdir}/include/ncurses_dll.h.in >include/ncurses_dll.h
18804
18805 for cf_math in "" MATH_H
18806 do
18807 for cf_excp in "" MATH_EXCEPTION
18808 do
18809         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18810         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18811         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18812 cat >conftest.$ac_ext <<_ACEOF
18813 #line 18813 "configure"
18814 #include "confdefs.h"
18815
18816 #include <etip.h.in>
18817
18818 int
18819 main ()
18820 {
18821
18822   ;
18823   return 0;
18824 }
18825 _ACEOF
18826 rm -f conftest.$ac_objext
18827 if { (eval echo "$as_me:18827: \"$ac_compile\"") >&5
18828   (eval $ac_compile) 2>&5
18829   ac_status=$?
18830   echo "$as_me:18830: \$? = $ac_status" >&5
18831   (exit $ac_status); } &&
18832          { ac_try='test -s conftest.$ac_objext'
18833   { (eval echo "$as_me:18833: \"$ac_try\"") >&5
18834   (eval $ac_try) 2>&5
18835   ac_status=$?
18836   echo "$as_me:18836: \$? = $ac_status" >&5
18837   (exit $ac_status); }; }; then
18838
18839         test -n "$cf_math" && cat >>confdefs.h <<EOF
18840 #define ETIP_NEEDS_${cf_math} 1
18841 EOF
18842
18843         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18844 #define ETIP_NEEDS_${cf_excp} 1
18845 EOF
18846
18847         cf_result="$cf_math $cf_excp"
18848         break 2
18849
18850 else
18851   echo "$as_me: failed program was:" >&5
18852 cat conftest.$ac_ext >&5
18853 fi
18854 rm -f conftest.$ac_objext conftest.$ac_ext
18855 done
18856 done
18857 echo "$as_me:18857: result: $cf_result" >&5
18858 echo "${ECHO_T}$cf_result" >&6
18859 CXXFLAGS="$cf_save_CXXFLAGS"
18860
18861 if test -n "$CXX"; then
18862 echo "$as_me:18862: checking if $CXX accepts parameter initialization" >&5
18863 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18864 if test "${cf_cv_cpp_param_init+set}" = set; then
18865   echo $ECHO_N "(cached) $ECHO_C" >&6
18866 else
18867
18868         ac_ext=cc
18869 ac_cpp='$CXXCPP $CPPFLAGS'
18870 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18871 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18872 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18873 ac_main_return=return
18874
18875         if test "$cross_compiling" = yes; then
18876   cf_cv_cpp_param_init=unknown
18877 else
18878   cat >conftest.$ac_ext <<_ACEOF
18879 #line 18879 "configure"
18880 #include "confdefs.h"
18881
18882 class TEST {
18883 private:
18884         int value;
18885 public:
18886         TEST(int x = 1);
18887         ~TEST();
18888 };
18889
18890 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18891 {
18892         value = x;
18893 }
18894 int main() { }
18895
18896 _ACEOF
18897 rm -f conftest$ac_exeext
18898 if { (eval echo "$as_me:18898: \"$ac_link\"") >&5
18899   (eval $ac_link) 2>&5
18900   ac_status=$?
18901   echo "$as_me:18901: \$? = $ac_status" >&5
18902   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18903   { (eval echo "$as_me:18903: \"$ac_try\"") >&5
18904   (eval $ac_try) 2>&5
18905   ac_status=$?
18906   echo "$as_me:18906: \$? = $ac_status" >&5
18907   (exit $ac_status); }; }; then
18908   cf_cv_cpp_param_init=yes
18909 else
18910   echo "$as_me: program exited with status $ac_status" >&5
18911 echo "$as_me: failed program was:" >&5
18912 cat conftest.$ac_ext >&5
18913 cf_cv_cpp_param_init=no
18914 fi
18915 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18916 fi
18917         ac_ext=cc
18918 ac_cpp='$CXXCPP $CPPFLAGS'
18919 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18920 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18921 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18922 ac_main_return=return
18923
18924 fi
18925 echo "$as_me:18925: result: $cf_cv_cpp_param_init" >&5
18926 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18927 fi
18928 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18929 #define CPP_HAS_PARAM_INIT 1
18930 EOF
18931
18932 if test -n "$CXX"; then
18933
18934 echo "$as_me:18934: checking if $CXX accepts static_cast" >&5
18935 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18936 if test "${cf_cv_cpp_static_cast+set}" = set; then
18937   echo $ECHO_N "(cached) $ECHO_C" >&6
18938 else
18939
18940         ac_ext=cc
18941 ac_cpp='$CXXCPP $CPPFLAGS'
18942 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18943 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18944 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18945 ac_main_return=return
18946
18947         cat >conftest.$ac_ext <<_ACEOF
18948 #line 18948 "configure"
18949 #include "confdefs.h"
18950
18951 class NCursesPanel
18952 {
18953 public:
18954   NCursesPanel(int nlines,
18955                int ncols,
18956                int begin_y = 0,
18957                int begin_x = 0)
18958   {
18959   }
18960
18961   ~NCursesPanel();
18962 };
18963
18964 template<class T> class NCursesUserPanel : public NCursesPanel
18965 {
18966 public:
18967   NCursesUserPanel (int nlines,
18968                     int ncols,
18969                     int begin_y = 0,
18970                     int begin_x = 0,
18971                     const T* p_UserData = static_cast<T*>(0))
18972     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18973   {
18974   };
18975   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18976   {
18977   };
18978
18979   virtual ~NCursesUserPanel() {};
18980 };
18981
18982 int
18983 main ()
18984 {
18985
18986         const char* p_UserData = static_cast<char*>(0)
18987   ;
18988   return 0;
18989 }
18990 _ACEOF
18991 rm -f conftest.$ac_objext
18992 if { (eval echo "$as_me:18992: \"$ac_compile\"") >&5
18993   (eval $ac_compile) 2>&5
18994   ac_status=$?
18995   echo "$as_me:18995: \$? = $ac_status" >&5
18996   (exit $ac_status); } &&
18997          { ac_try='test -s conftest.$ac_objext'
18998   { (eval echo "$as_me:18998: \"$ac_try\"") >&5
18999   (eval $ac_try) 2>&5
19000   ac_status=$?
19001   echo "$as_me:19001: \$? = $ac_status" >&5
19002   (exit $ac_status); }; }; then
19003   cf_cv_cpp_static_cast=yes
19004 else
19005   echo "$as_me: failed program was:" >&5
19006 cat conftest.$ac_ext >&5
19007 cf_cv_cpp_static_cast=no
19008 fi
19009 rm -f conftest.$ac_objext conftest.$ac_ext
19010
19011         ac_ext=cc
19012 ac_cpp='$CXXCPP $CPPFLAGS'
19013 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19014 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19015 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19016 ac_main_return=return
19017
19018 fi
19019 echo "$as_me:19019: result: $cf_cv_cpp_static_cast" >&5
19020 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19021
19022 fi
19023
19024 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
19025 #define CPP_HAS_STATIC_CAST 1
19026 EOF
19027
19028         CXX_AR='$(AR)'
19029         CXX_ARFLAGS='$(ARFLAGS)'
19030         case $cf_cv_system_name in #(vi
19031         irix*) #(vi
19032             if test "$GXX" != yes ; then
19033                 CXX_AR='$(CXX)'
19034                 CXX_ARFLAGS='-ar -o'
19035             fi
19036             ;;
19037         sco3.2v5*) #(vi
19038             CXXLDFLAGS="-u main"
19039             ;;
19040         solaris2*)
19041             if test "$GXX" != yes ; then
19042                 CXX_AR='$(CXX)'
19043                 CXX_ARFLAGS='-xar -o'
19044             fi
19045             ;;
19046         esac
19047
19048 else
19049         cf_cxx_library=no
19050         cf_cv_builtin_bool=1
19051
19052         # Just because we are not configuring against C++ right now does not
19053         # mean that a user will not want to use C++.  Some distributors disable
19054         # the C++ portion of this configuration as a shortcut (or just to avoid
19055         # compiling the demo in the c++ directory).  So we need a reasonable
19056         # default for the 'bool' type.
19057         #
19058         # Caveat: since the storage of the bool type is not standardized, it
19059         # may change.
19060
19061         if test "$NCURSES_BOOL" != auto ; then
19062                 cf_cv_type_of_bool=$NCURSES_BOOL
19063                 cf_cv_header_stdbool_h=0
19064         else
19065                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19066
19067 echo "$as_me:19067: checking for size of bool" >&5
19068 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19069 if test "${cf_cv_type_of_bool+set}" = set; then
19070   echo $ECHO_N "(cached) $ECHO_C" >&6
19071 else
19072
19073         rm -f cf_test.out
19074         if test "$cross_compiling" = yes; then
19075   cf_cv_type_of_bool=unknown
19076 else
19077   cat >conftest.$ac_ext <<_ACEOF
19078 #line 19078 "configure"
19079 #include "confdefs.h"
19080
19081 #include <stdlib.h>
19082 #include <stdio.h>
19083
19084 #if defined(__cplusplus)
19085
19086 #ifdef HAVE_GXX_BUILTIN_H
19087 #include <g++/builtin.h>
19088 #elif HAVE_GPP_BUILTIN_H
19089 #include <gpp/builtin.h>
19090 #elif HAVE_BUILTIN_H
19091 #include <builtin.h>
19092 #endif
19093
19094 #else
19095
19096 #if $cf_cv_header_stdbool_h
19097 #include <stdbool.h>
19098 #endif
19099
19100 #endif
19101
19102 main()
19103 {
19104         FILE *fp = fopen("cf_test.out", "w");
19105         if (fp != 0) {
19106                 bool x = true;
19107                 if ((bool)(-x) >= 0)
19108                         fputs("unsigned ", fp);
19109                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19110                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19111                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19112                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19113                 fclose(fp);
19114         }
19115         ${cf_cv_main_return:-return}(0);
19116 }
19117
19118 _ACEOF
19119 rm -f conftest$ac_exeext
19120 if { (eval echo "$as_me:19120: \"$ac_link\"") >&5
19121   (eval $ac_link) 2>&5
19122   ac_status=$?
19123   echo "$as_me:19123: \$? = $ac_status" >&5
19124   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19125   { (eval echo "$as_me:19125: \"$ac_try\"") >&5
19126   (eval $ac_try) 2>&5
19127   ac_status=$?
19128   echo "$as_me:19128: \$? = $ac_status" >&5
19129   (exit $ac_status); }; }; then
19130   cf_cv_type_of_bool=`cat cf_test.out`
19131                  if test -z "$cf_cv_type_of_bool"; then
19132                    cf_cv_type_of_bool=unknown
19133                  fi
19134 else
19135   echo "$as_me: program exited with status $ac_status" >&5
19136 echo "$as_me: failed program was:" >&5
19137 cat conftest.$ac_ext >&5
19138 cf_cv_type_of_bool=unknown
19139 fi
19140 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19141 fi
19142
19143 fi
19144
19145         rm -f cf_test.out
19146 echo "$as_me:19146: result: $cf_cv_type_of_bool" >&5
19147 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19148 if test "$cf_cv_type_of_bool" = unknown ; then
19149         case .$NCURSES_BOOL in #(vi
19150         .auto|.) NCURSES_BOOL=unsigned;;
19151         esac
19152         { echo "$as_me:19152: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19153 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19154         cf_cv_type_of_bool=$NCURSES_BOOL
19155 fi
19156
19157                 else
19158                         echo "$as_me:19158: checking for fallback type of bool" >&5
19159 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19160                         case "$host_cpu" in #(vi
19161                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19162                         *)      cf_cv_type_of_bool=int  ;;
19163                         esac
19164                         echo "$as_me:19164: result: $cf_cv_type_of_bool" >&5
19165 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19166                 fi
19167         fi
19168 fi
19169
19170 # If the C compiler did not declare bool, and we did not determine that the C++
19171 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19172 # ncurses library use the same type as C++ bool.  Note that this allows one to
19173 # specify the type of bool in a configure-script option and postpone
19174 # integration with the C++ compiler provided that the types are compatible.
19175 USE_CXX_BOOL=1
19176 if test $cf_cv_cc_bool_type = 1
19177 then
19178         # oops: C has a bool.  Unlikely, but C++ could differ.
19179         USE_CXX_BOOL=0
19180 elif test $cf_cv_builtin_bool = 0
19181 then
19182         # C++ has no bool
19183         USE_CXX_BOOL=0
19184 else
19185         # this is the normal case
19186         USE_CXX_BOOL='defined(__cplusplus)'
19187 fi
19188
19189 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19190
19191         if test "$cf_with_ada" != "no" ; then
19192                 if test "$with_libtool" != "no"; then
19193                         { echo "$as_me:19193: WARNING: libtool does not support Ada - disabling feature" >&5
19194 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19195                         cf_with_ada=no
19196                 fi
19197         fi
19198
19199         if test "$cf_with_ada" != "no" ; then
19200
19201 cf_ada_make=gnatmake
19202 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19203 set dummy $cf_ada_make; ac_word=$2
19204 echo "$as_me:19204: checking for $ac_word" >&5
19205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19206 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19207   echo $ECHO_N "(cached) $ECHO_C" >&6
19208 else
19209   if test -n "$gnat_exists"; then
19210   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19211 else
19212   ac_save_IFS=$IFS; IFS=$ac_path_separator
19213 ac_dummy="$PATH"
19214 for ac_dir in $ac_dummy; do
19215   IFS=$ac_save_IFS
19216   test -z "$ac_dir" && ac_dir=.
19217   $as_executable_p "$ac_dir/$ac_word" || continue
19218 ac_cv_prog_gnat_exists="yes"
19219 echo "$as_me:19219: found $ac_dir/$ac_word" >&5
19220 break
19221 done
19222
19223   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19224 fi
19225 fi
19226 gnat_exists=$ac_cv_prog_gnat_exists
19227 if test -n "$gnat_exists"; then
19228   echo "$as_me:19228: result: $gnat_exists" >&5
19229 echo "${ECHO_T}$gnat_exists" >&6
19230 else
19231   echo "$as_me:19231: result: no" >&5
19232 echo "${ECHO_T}no" >&6
19233 fi
19234
19235 if test "$ac_cv_prog_gnat_exists" = no; then
19236    cf_ada_make=
19237    cf_cv_prog_gnat_correct=no
19238 else
19239
19240 echo "$as_me:19240: checking for gnat version" >&5
19241 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19242 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19243         grep '[0-9].[0-9][0-9]*' |\
19244     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19245 echo "$as_me:19245: result: $cf_gnat_version" >&5
19246 echo "${ECHO_T}$cf_gnat_version" >&6
19247
19248 case $cf_gnat_version in #(vi
19249 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19250         cf_cv_prog_gnat_correct=yes
19251         ;;
19252 *)
19253         { echo "$as_me:19253: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19254 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19255         cf_cv_prog_gnat_correct=no
19256         ;;
19257 esac
19258
19259    # Extract the first word of "m4", so it can be a program name with args.
19260 set dummy m4; ac_word=$2
19261 echo "$as_me:19261: checking for $ac_word" >&5
19262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19263 if test "${ac_cv_prog_M4_exists+set}" = set; then
19264   echo $ECHO_N "(cached) $ECHO_C" >&6
19265 else
19266   if test -n "$M4_exists"; then
19267   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19268 else
19269   ac_save_IFS=$IFS; IFS=$ac_path_separator
19270 ac_dummy="$PATH"
19271 for ac_dir in $ac_dummy; do
19272   IFS=$ac_save_IFS
19273   test -z "$ac_dir" && ac_dir=.
19274   $as_executable_p "$ac_dir/$ac_word" || continue
19275 ac_cv_prog_M4_exists="yes"
19276 echo "$as_me:19276: found $ac_dir/$ac_word" >&5
19277 break
19278 done
19279
19280   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19281 fi
19282 fi
19283 M4_exists=$ac_cv_prog_M4_exists
19284 if test -n "$M4_exists"; then
19285   echo "$as_me:19285: result: $M4_exists" >&5
19286 echo "${ECHO_T}$M4_exists" >&6
19287 else
19288   echo "$as_me:19288: result: no" >&5
19289 echo "${ECHO_T}no" >&6
19290 fi
19291
19292    if test "$ac_cv_prog_M4_exists" = no; then
19293       cf_cv_prog_gnat_correct=no
19294       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19295    fi
19296    if test "$cf_cv_prog_gnat_correct" = yes; then
19297       echo "$as_me:19297: checking if GNAT works" >&5
19298 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19299
19300 rm -rf conftest* *~conftest*
19301 cat >>conftest.ads <<CF_EOF
19302 procedure conftest;
19303 CF_EOF
19304 cat >>conftest.adb <<CF_EOF
19305 with Text_IO;
19306 with GNAT.OS_Lib;
19307 procedure conftest is
19308 begin
19309    Text_IO.Put ("Hello World");
19310    Text_IO.New_Line;
19311    GNAT.OS_Lib.OS_Exit (0);
19312 end conftest;
19313 CF_EOF
19314 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19315    if ( ./conftest 1>&5 2>&1 ) ; then
19316       cf_cv_prog_gnat_correct=yes
19317    else
19318       cf_cv_prog_gnat_correct=no
19319    fi
19320 else
19321    cf_cv_prog_gnat_correct=no
19322 fi
19323 rm -rf conftest* *~conftest*
19324
19325       echo "$as_me:19325: result: $cf_cv_prog_gnat_correct" >&5
19326 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19327    fi
19328 fi
19329
19330                 if test "$cf_cv_prog_gnat_correct" = yes; then
19331
19332         ADAFLAGS="$ADAFLAGS -gnatpn"
19333
19334         echo "$as_me:19334: checking optimization options for ADAFLAGS" >&5
19335 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19336         case "$CFLAGS" in
19337         *-g*)
19338
19339         ADAFLAGS="$ADAFLAGS -g"
19340
19341                 ;;
19342         esac
19343         case "$CFLAGS" in
19344         *-O*)
19345                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19346
19347         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19348
19349                 ;;
19350         esac
19351         echo "$as_me:19351: result: $ADAFLAGS" >&5
19352 echo "${ECHO_T}$ADAFLAGS" >&6
19353
19354 echo "$as_me:19354: checking if GNAT supports generics" >&5
19355 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19356 case $cf_gnat_version in #(vi
19357 3.[1-9]*|[4-9].*) #(vi
19358         cf_gnat_generics=yes
19359         ;;
19360 *)
19361         cf_gnat_generics=no
19362         ;;
19363 esac
19364 echo "$as_me:19364: result: $cf_gnat_generics" >&5
19365 echo "${ECHO_T}$cf_gnat_generics" >&6
19366
19367 if test "$cf_gnat_generics" = yes
19368 then
19369         cf_compile_generics=generics
19370         cf_generic_objects="\${GENOBJS}"
19371 else
19372         cf_compile_generics=
19373         cf_generic_objects=
19374 fi
19375
19376 echo "$as_me:19376: checking if GNAT supports SIGINT" >&5
19377 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19378 if test "${cf_cv_gnat_sigint+set}" = set; then
19379   echo $ECHO_N "(cached) $ECHO_C" >&6
19380 else
19381
19382 rm -rf conftest* *~conftest*
19383 cat >>conftest.ads <<CF_EOF
19384 with Ada.Interrupts.Names;
19385
19386 package ConfTest is
19387
19388    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19389    pragma Unreserve_All_Interrupts;
19390    pragma Warnings (On);
19391
19392    protected Process is
19393       procedure Stop;
19394       function Continue return Boolean;
19395       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19396    private
19397       Done : Boolean := False;
19398    end Process;
19399
19400 end ConfTest;
19401 CF_EOF
19402 cat >>conftest.adb <<CF_EOF
19403 package body ConfTest is
19404    protected body Process is
19405       procedure Stop is
19406       begin
19407          Done := True;
19408       end Stop;
19409       function Continue return Boolean is
19410       begin
19411          return not Done;
19412       end Continue;
19413    end Process;
19414 end ConfTest;
19415 CF_EOF
19416 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19417       cf_cv_gnat_sigint=yes
19418 else
19419    cf_cv_gnat_sigint=no
19420 fi
19421 rm -rf conftest* *~conftest*
19422
19423 fi
19424 echo "$as_me:19424: result: $cf_cv_gnat_sigint" >&5
19425 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19426
19427 if test $cf_cv_gnat_sigint = yes ; then
19428         USE_GNAT_SIGINT=""
19429 else
19430         USE_GNAT_SIGINT="#"
19431 fi
19432
19433 echo "$as_me:19433: checking if GNAT pragma Unreferenced works" >&5
19434 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19435 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19436   echo $ECHO_N "(cached) $ECHO_C" >&6
19437 else
19438
19439 rm -rf conftest* *~conftest*
19440 cat >>conftest.ads <<CF_EOF
19441 procedure conftest;
19442 CF_EOF
19443 cat >>conftest.adb <<CF_EOF
19444 with Text_IO;
19445 with GNAT.OS_Lib;
19446 procedure conftest is
19447    test : Integer;
19448    pragma Unreferenced (test);
19449 begin
19450    test := 1;
19451    Text_IO.Put ("Hello World");
19452    Text_IO.New_Line;
19453    GNAT.OS_Lib.OS_Exit (0);
19454 end conftest;
19455 CF_EOF
19456 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19457       cf_cv_pragma_unreferenced=yes
19458 else
19459    cf_cv_pragma_unreferenced=no
19460 fi
19461 rm -rf conftest* *~conftest*
19462
19463 fi
19464 echo "$as_me:19464: result: $cf_cv_pragma_unreferenced" >&5
19465 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19466
19467 # if the pragma is supported, use it (needed in the Trace code).
19468 if test $cf_cv_pragma_unreferenced = yes ; then
19469         PRAGMA_UNREF=TRUE
19470 else
19471         PRAGMA_UNREF=FALSE
19472 fi
19473
19474 cf_gnat_libraries=no
19475 cf_gnat_projects=no
19476
19477 echo "$as_me:19477: checking if GNAT supports project files" >&5
19478 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19479 case $cf_gnat_version in #(vi
19480 3.[0-9]*) #(vi
19481         ;;
19482 *)
19483         case $cf_cv_system_name in #(vi
19484         cygwin*) #(vi
19485                 ;;
19486         *)
19487                 mkdir conftest.src conftest.bin conftest.lib
19488                 cd conftest.src
19489                 rm -rf conftest* *~conftest*
19490                 cat >>library.gpr <<CF_EOF
19491 project Library is
19492   Kind := External ("LIB_KIND");
19493   for Library_Name use "ConfTest";
19494   for Object_Dir use ".";
19495   for Library_ALI_Dir use External("LIBRARY_DIR");
19496   for Library_Version use External ("SONAME");
19497   for Library_Kind use Kind;
19498   for Library_Dir use External("BUILD_DIR");
19499   Source_Dir := External ("SOURCE_DIR");
19500   for Source_Dirs use (Source_Dir);
19501   package Compiler is
19502      for Default_Switches ("Ada") use
19503        ("-g",
19504         "-O2",
19505         "-gnatafno",
19506         "-gnatVa",   -- All validity checks
19507         "-gnatwa");  -- Activate all optional errors
19508   end Compiler;
19509 end Library;
19510 CF_EOF
19511                 cat >>confpackage.ads <<CF_EOF
19512 package ConfPackage is
19513    procedure conftest;
19514 end ConfPackage;
19515 CF_EOF
19516                 cat >>confpackage.adb <<CF_EOF
19517 with Text_IO;
19518 package body ConfPackage is
19519    procedure conftest is
19520    begin
19521       Text_IO.Put ("Hello World");
19522       Text_IO.New_Line;
19523    end conftest;
19524 end ConfPackage;
19525 CF_EOF
19526                 if ( $cf_ada_make $ADAFLAGS \
19527                                 -Plibrary.gpr \
19528                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19529                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19530                                 -XSOURCE_DIR=`pwd` \
19531                                 -XSONAME=libConfTest.so.1 \
19532                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19533                         cf_gnat_projects=yes
19534                 fi
19535                 cd ..
19536                 if test -f conftest.lib/confpackage.ali
19537                 then
19538                         cf_gnat_libraries=yes
19539                 fi
19540                 rm -rf conftest* *~conftest*
19541                 ;;
19542         esac
19543         ;;
19544 esac
19545 echo "$as_me:19545: result: $cf_gnat_projects" >&5
19546 echo "${ECHO_T}$cf_gnat_projects" >&6
19547
19548 if test $cf_gnat_projects = yes
19549 then
19550         echo "$as_me:19550: checking if GNAT supports libraries" >&5
19551 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19552         echo "$as_me:19552: result: $cf_gnat_libraries" >&5
19553 echo "${ECHO_T}$cf_gnat_libraries" >&6
19554 fi
19555
19556 if test "$cf_gnat_projects" = yes
19557 then
19558         USE_OLD_MAKERULES="#"
19559         USE_GNAT_PROJECTS=""
19560 else
19561         USE_OLD_MAKERULES=""
19562         USE_GNAT_PROJECTS="#"
19563 fi
19564
19565 if test "$cf_gnat_libraries" = yes
19566 then
19567         USE_GNAT_LIBRARIES=""
19568 else
19569         USE_GNAT_LIBRARIES="#"
19570 fi
19571
19572 echo "$as_me:19572: checking for ada-compiler" >&5
19573 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19574
19575 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19576 if test "${with_ada_compiler+set}" = set; then
19577   withval="$with_ada_compiler"
19578   cf_ada_compiler=$withval
19579 else
19580   cf_ada_compiler=gnatmake
19581 fi;
19582
19583 echo "$as_me:19583: result: $cf_ada_compiler" >&5
19584 echo "${ECHO_T}$cf_ada_compiler" >&6
19585
19586                         cf_ada_package=terminal_interface
19587
19588 echo "$as_me:19588: checking for ada-include" >&5
19589 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19590
19591 # Check whether --with-ada-include or --without-ada-include was given.
19592 if test "${with_ada_include+set}" = set; then
19593   withval="$with_ada_include"
19594
19595 else
19596   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19597 fi; if test -n "$prefix/share/ada/adainclude" ; then
19598
19599 if test "x$prefix" != xNONE; then
19600   cf_path_syntax="$prefix"
19601 else
19602   cf_path_syntax="$ac_default_prefix"
19603 fi
19604
19605 case ".$withval" in #(vi
19606 .\$\(*\)*|.\'*\'*) #(vi
19607   ;;
19608 ..|./*|.\\*) #(vi
19609   ;;
19610 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19611   ;;
19612 .\${*prefix}*|.\${*dir}*) #(vi
19613   eval withval="$withval"
19614   case ".$withval" in #(vi
19615   .NONE/*)
19616     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19617     ;;
19618   esac
19619   ;; #(vi
19620 .no|.NONE/*)
19621   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19622   ;;
19623 *)
19624   { { echo "$as_me:19624: error: expected a pathname, not \"$withval\"" >&5
19625 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19626    { (exit 1); exit 1; }; }
19627   ;;
19628 esac
19629
19630 fi
19631 ADA_INCLUDE="$withval"
19632
19633 echo "$as_me:19633: result: $ADA_INCLUDE" >&5
19634 echo "${ECHO_T}$ADA_INCLUDE" >&6
19635
19636 echo "$as_me:19636: checking for ada-objects" >&5
19637 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19638
19639 # Check whether --with-ada-objects or --without-ada-objects was given.
19640 if test "${with_ada_objects+set}" = set; then
19641   withval="$with_ada_objects"
19642
19643 else
19644   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19645 fi; if test -n "$prefix/lib/ada/adalib" ; then
19646
19647 if test "x$prefix" != xNONE; then
19648   cf_path_syntax="$prefix"
19649 else
19650   cf_path_syntax="$ac_default_prefix"
19651 fi
19652
19653 case ".$withval" in #(vi
19654 .\$\(*\)*|.\'*\'*) #(vi
19655   ;;
19656 ..|./*|.\\*) #(vi
19657   ;;
19658 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19659   ;;
19660 .\${*prefix}*|.\${*dir}*) #(vi
19661   eval withval="$withval"
19662   case ".$withval" in #(vi
19663   .NONE/*)
19664     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19665     ;;
19666   esac
19667   ;; #(vi
19668 .no|.NONE/*)
19669   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19670   ;;
19671 *)
19672   { { echo "$as_me:19672: error: expected a pathname, not \"$withval\"" >&5
19673 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19674    { (exit 1); exit 1; }; }
19675   ;;
19676 esac
19677
19678 fi
19679 ADA_OBJECTS="$withval"
19680
19681 echo "$as_me:19681: result: $ADA_OBJECTS" >&5
19682 echo "${ECHO_T}$ADA_OBJECTS" >&6
19683
19684 echo "$as_me:19684: checking if an Ada95 shared-library should be built" >&5
19685 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19686
19687 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19688 if test "${with_ada_sharedlib+set}" = set; then
19689   withval="$with_ada_sharedlib"
19690   with_ada_sharedlib=$withval
19691 else
19692   with_ada_sharedlib=no
19693 fi;
19694 echo "$as_me:19694: result: $with_ada_sharedlib" >&5
19695 echo "${ECHO_T}$with_ada_sharedlib" >&6
19696
19697 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19698 MAKE_ADA_SHAREDLIB="#"
19699
19700 if test "x$with_ada_sharedlib" != xno
19701 then
19702         MAKE_ADA_SHAREDLIB=
19703         if test "x$with_ada_sharedlib" != xyes
19704         then
19705                 ADA_SHAREDLIB="$with_ada_sharedlib"
19706         fi
19707 fi
19708
19709                 fi
19710         fi
19711 else
19712         cf_with_ada=no
19713 fi
19714
19715 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19716 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19717 ###
19718 ### ticlib modules may be a separate library, otherwise contained in termlib.
19719 ### termlib modules may be a separate library, otherwise contained in ncurses.
19720 ###
19721 ### The of "+" or " " between the tokens controls the way the script
19722 ### chooses to split module lists into libraries.
19723 ###
19724 ### (see CF_LIB_RULES).
19725 echo "$as_me:19725: checking for library subsets" >&5
19726 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19727 LIB_SUBSETS=
19728
19729 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19730         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19731         if test "$with_ticlib" != no ; then
19732                 LIB_SUBSETS="${LIB_SUBSETS} "
19733         else
19734                 LIB_SUBSETS="${LIB_SUBSETS}+"
19735         fi
19736 fi
19737
19738 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19739 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19740
19741 if test "$with_termlib" != no ; then
19742         LIB_SUBSETS="${LIB_SUBSETS} "
19743 else
19744         LIB_SUBSETS="${LIB_SUBSETS}+"
19745 fi
19746
19747 LIB_SUBSETS="${LIB_SUBSETS}base"
19748
19749 # Most term-driver calls are to tinfo, but some like init_pair are to the
19750 # base library (so it resides in base).
19751 if test "$with_term_driver" != no ; then
19752         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19753         case $cf_cv_system_name in #(vi
19754         *mingw32*) #(vi
19755                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19756                 ;;
19757         *) #(vi
19758                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19759                 ;;
19760         esac
19761 fi
19762
19763 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19764 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19765
19766 echo "$as_me:19766: result: $LIB_SUBSETS" >&5
19767 echo "${ECHO_T}$LIB_SUBSETS" >&6
19768
19769 ### Construct the list of include-directories to be generated
19770
19771 CPPFLAGS="$CPPFLAGS -I. -I../include"
19772 if test "$srcdir" != "."; then
19773         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19774 fi
19775 if test "$GCC" != yes; then
19776         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19777 elif test "$includedir" != "/usr/include"; then
19778         if test "$includedir" = '${prefix}/include' ; then
19779                 if test $prefix != /usr ; then
19780                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19781                 fi
19782         else
19783                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19784         fi
19785 fi
19786
19787 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19788 if test "$srcdir" != "."; then
19789         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19790 fi
19791 if test "$GCC" != yes; then
19792         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19793 elif test "$includedir" != "/usr/include"; then
19794         if test "$includedir" = '${prefix}/include' ; then
19795                 if test $prefix != /usr ; then
19796                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19797                 fi
19798         else
19799                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19800         fi
19801 fi
19802
19803 ### Build up pieces for makefile rules
19804 echo "$as_me:19804: checking default library suffix" >&5
19805 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19806
19807         case $DFT_LWR_MODEL in
19808         libtool) DFT_ARG_SUFFIX=''   ;;
19809         normal)  DFT_ARG_SUFFIX=''   ;;
19810         debug)   DFT_ARG_SUFFIX='_g' ;;
19811         profile) DFT_ARG_SUFFIX='_p' ;;
19812         shared)  DFT_ARG_SUFFIX=''   ;;
19813         esac
19814         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19815 echo "$as_me:19815: result: $DFT_ARG_SUFFIX" >&5
19816 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19817
19818 echo "$as_me:19818: checking default library-dependency suffix" >&5
19819 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19820
19821         case $DFT_LWR_MODEL in #(vi
19822         libtool) #(vi
19823                 DFT_LIB_SUFFIX='.la'
19824                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19825                 ;;
19826         normal) #(vi
19827                 DFT_LIB_SUFFIX='.a'
19828                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19829                 ;;
19830         debug) #(vi
19831                 DFT_LIB_SUFFIX='_g.a'
19832                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19833                 ;;
19834         profile) #(vi
19835                 DFT_LIB_SUFFIX='_p.a'
19836                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19837                 ;;
19838         shared) #(vi
19839                 case $cf_cv_system_name in
19840                 aix[5-7]*) #(vi
19841                         DFT_LIB_SUFFIX='.a'
19842                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19843                         ;;
19844                 cygwin*|mingw*) #(vi
19845                         DFT_LIB_SUFFIX='.dll'
19846                         DFT_DEP_SUFFIX='.dll.a'
19847                         ;;
19848                 darwin*) #(vi
19849                         DFT_LIB_SUFFIX='.dylib'
19850                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19851                         ;;
19852                 hpux*) #(vi
19853                         case $target in
19854                         ia64*) #(vi
19855                                 DFT_LIB_SUFFIX='.so'
19856                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19857                                 ;;
19858                         *) #(vi
19859                                 DFT_LIB_SUFFIX='.sl'
19860                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19861                                 ;;
19862                         esac
19863                         ;;
19864                 *)      DFT_LIB_SUFFIX='.so'
19865                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19866                         ;;
19867                 esac
19868         esac
19869         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19870         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19871 echo "$as_me:19871: result: $DFT_DEP_SUFFIX" >&5
19872 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19873
19874 echo "$as_me:19874: checking default object directory" >&5
19875 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19876
19877         case $DFT_LWR_MODEL in
19878         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19879         normal)  DFT_OBJ_SUBDIR='objects' ;;
19880         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19881         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19882         shared)
19883                 case $cf_cv_system_name in #(vi
19884                 cygwin) #(vi
19885                         DFT_OBJ_SUBDIR='objects' ;;
19886                 *)
19887                         DFT_OBJ_SUBDIR='obj_s' ;;
19888                 esac
19889         esac
19890 echo "$as_me:19890: result: $DFT_OBJ_SUBDIR" >&5
19891 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19892
19893 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19894 if test "$cf_with_cxx" = yes ; then
19895 echo "$as_me:19895: checking c++ library-dependency suffix" >&5
19896 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19897 if test "$with_libtool" != "no"; then
19898         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19899 else
19900
19901         case normal in #(vi
19902         libtool) #(vi
19903                 CXX_LIB_SUFFIX='.la'
19904                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19905                 ;;
19906         normal) #(vi
19907                 CXX_LIB_SUFFIX='.a'
19908                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19909                 ;;
19910         debug) #(vi
19911                 CXX_LIB_SUFFIX='_g.a'
19912                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19913                 ;;
19914         profile) #(vi
19915                 CXX_LIB_SUFFIX='_p.a'
19916                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19917                 ;;
19918         shared) #(vi
19919                 case $cf_cv_system_name in
19920                 aix[5-7]*) #(vi
19921                         CXX_LIB_SUFFIX='.a'
19922                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19923                         ;;
19924                 cygwin*|mingw*) #(vi
19925                         CXX_LIB_SUFFIX='.dll'
19926                         CXX_DEP_SUFFIX='.dll.a'
19927                         ;;
19928                 darwin*) #(vi
19929                         CXX_LIB_SUFFIX='.dylib'
19930                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19931                         ;;
19932                 hpux*) #(vi
19933                         case $target in
19934                         ia64*) #(vi
19935                                 CXX_LIB_SUFFIX='.so'
19936                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19937                                 ;;
19938                         *) #(vi
19939                                 CXX_LIB_SUFFIX='.sl'
19940                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19941                                 ;;
19942                         esac
19943                         ;;
19944                 *)      CXX_LIB_SUFFIX='.so'
19945                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19946                         ;;
19947                 esac
19948         esac
19949         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19950         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19951 fi
19952 echo "$as_me:19952: result: $CXX_LIB_SUFFIX" >&5
19953 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19954
19955 fi
19956
19957 # do not want -ldl in build except as needed for -lncurses dependency
19958 if test "$with_dlsym" = yes ; then
19959 if test $DFT_LWR_MODEL = shared || \
19960    test $DFT_LWR_MODEL = libtool ; then
19961
19962 # remove dl library from $LIBS
19963 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19964
19965 fi
19966 fi
19967 ### Set up low-level terminfo dependencies for makefiles.
19968
19969 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19970 # do not need libdl
19971 TICS_LIST=
19972 if test "$with_dlsym" = yes ; then
19973
19974 # remove dl library from $SHLIB_LIST
19975 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19976
19977 fi
19978
19979 if test "$with_ticlib" != no ; then
19980
19981         if test "$with_ticlib" != yes ; then
19982                 TICS_NAME=$with_ticlib
19983                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19984                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19985                 TICS_LIB_SUFFIX="${with_ticlib}"
19986         else
19987                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19988                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19989                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19990         fi
19991         TICS_LDFLAGS="-L${LIB_DIR}"
19992         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19993 else
19994         TICS_LDFLAGS="-L${LIB_DIR}"
19995         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19996 fi
19997
19998 if test "$with_termlib" != no ; then
19999
20000         if test "$with_termlib" != yes ; then
20001                 TINFO_NAME=$with_termlib
20002                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20003                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20004                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20005                 TINFO_LIB_SUFFIX="${with_termlib}"
20006         else
20007                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20008                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20009                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20010                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20011         fi
20012
20013         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20014         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20015         if test "$DFT_LWR_MODEL" = "libtool"; then
20016                 TEST_ARGS="${TEST_DEPS}"
20017                 TEST_ARG2="${TEST_DEP2}"
20018                 TINFO_LDFLAGS="-L${LIB_DIR}"
20019                 TINFO_LIBS="$TEST_ARGS"
20020                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20021                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20022         else
20023                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20024                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20025                 if test "x$with_term_driver" != xno ; then
20026                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20027                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20028                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20029                 else
20030                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20031                         TINFO_LIBS="$TEST_ARGS"
20032                 fi
20033                 TINFO_LDFLAGS="-L${LIB_DIR}"
20034                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20035         fi
20036 else
20037         # the next lines are needed for linking libtic over libncurses
20038         TINFO_NAME=${LIB_NAME}
20039         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20040         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20041         if test "$with_tic_depends" = yes ; then
20042                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20043         else
20044                 TICS_LIST="$SHLIB_LIST"
20045         fi
20046
20047         TINFO_LDFLAGS="-L${LIB_DIR}"
20048         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20049 fi
20050
20051 if test "$DFT_LWR_MODEL" = shared ; then
20052         case $cf_cv_system_name in #(vi
20053         cygwin*)
20054                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20055                 TINFO_SUFFIX=.dll
20056                 ;;
20057         esac
20058 fi
20059
20060 if test "$with_dlsym" = yes ; then
20061
20062 # remove dl library from $TICS_LIST
20063 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20064
20065 fi
20066
20067 if test "$DFT_LWR_MODEL" = "libtool"; then
20068     OBJEXT=lo
20069 fi
20070
20071 # needed for Ada95
20072 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20073
20074 case $DFT_LWR_MODEL in
20075 normal|debug|profile)
20076
20077 if test "$GCC" = yes ; then
20078         case $cf_cv_system_name in #(
20079         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20080                 LDFLAGS_STATIC=
20081                 LDFLAGS_SHARED=
20082                 ;;
20083     *)  #( normally, except when broken
20084         LDFLAGS_STATIC=-static
20085         LDFLAGS_SHARED=-dynamic
20086         ;;
20087     esac
20088 else
20089         case $cf_cv_system_name in #(
20090         aix[4-7]*)      #( from ld manpage
20091                 LDFLAGS_STATIC=-bstatic
20092                 LDFLAGS_SHARED=-bdynamic
20093                 ;;
20094         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20095                 # We could also use just "archive" and "shared".
20096                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20097                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20098                 ;;
20099         irix*)          #( from ld manpage IRIX64
20100                 LDFLAGS_STATIC=-Bstatic
20101                 LDFLAGS_SHARED=-Bdynamic
20102                 ;;
20103         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20104                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20105                 LDFLAGS_STATIC=-noso
20106                 LDFLAGS_SHARED=-so_archive
20107                 ;;
20108         solaris2*)
20109                 LDFLAGS_STATIC=-Bstatic
20110                 LDFLAGS_SHARED=-Bdynamic
20111                 ;;
20112         esac
20113 fi
20114
20115 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20116 then
20117         echo "$as_me:20117: checking if linker supports switching between static/dynamic" >&5
20118 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20119
20120         rm -f libconftest.a
20121         cat >conftest.$ac_ext <<EOF
20122 #line 20122 "configure"
20123 #include <stdio.h>
20124 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20125 EOF
20126         if { (eval echo "$as_me:20126: \"$ac_compile\"") >&5
20127   (eval $ac_compile) 2>&5
20128   ac_status=$?
20129   echo "$as_me:20129: \$? = $ac_status" >&5
20130   (exit $ac_status); } ; then
20131                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20132                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20133         fi
20134         rm -f conftest.*
20135
20136         cf_save_LIBS="$LIBS"
20137
20138         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20139         cat >conftest.$ac_ext <<_ACEOF
20140 #line 20140 "configure"
20141 #include "confdefs.h"
20142
20143 #line 20143 "configure"
20144 #include <stdio.h>
20145 int cf_ldflags_static(FILE *fp);
20146
20147 int
20148 main ()
20149 {
20150
20151         return cf_ldflags_static(stdin);
20152
20153   ;
20154   return 0;
20155 }
20156 _ACEOF
20157 rm -f conftest.$ac_objext conftest$ac_exeext
20158 if { (eval echo "$as_me:20158: \"$ac_link\"") >&5
20159   (eval $ac_link) 2>&5
20160   ac_status=$?
20161   echo "$as_me:20161: \$? = $ac_status" >&5
20162   (exit $ac_status); } &&
20163          { ac_try='test -s conftest$ac_exeext'
20164   { (eval echo "$as_me:20164: \"$ac_try\"") >&5
20165   (eval $ac_try) 2>&5
20166   ac_status=$?
20167   echo "$as_me:20167: \$? = $ac_status" >&5
20168   (exit $ac_status); }; }; then
20169
20170         # some linkers simply ignore the -dynamic
20171         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20172         *static*) # (vi
20173                 cf_ldflags_static=no
20174                 ;;
20175         *)
20176                 cf_ldflags_static=yes
20177                 ;;
20178         esac
20179
20180 else
20181   echo "$as_me: failed program was:" >&5
20182 cat conftest.$ac_ext >&5
20183 cf_ldflags_static=no
20184 fi
20185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20186
20187         rm -f libconftest.*
20188         LIBS="$cf_save_LIBS"
20189
20190         echo "$as_me:20190: result: $cf_ldflags_static" >&5
20191 echo "${ECHO_T}$cf_ldflags_static" >&6
20192
20193         if test $cf_ldflags_static != yes
20194         then
20195                 LDFLAGS_STATIC=
20196                 LDFLAGS_SHARED=
20197         fi
20198 else
20199         LDFLAGS_STATIC=
20200         LDFLAGS_SHARED=
20201 fi
20202
20203         ;;
20204 esac
20205
20206 echo "$as_me:20206: checking where we will install curses.h" >&5
20207 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20208 test "$with_overwrite" = no && \
20209 test "x$includedir" = 'x${prefix}/include' && \
20210         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20211 echo "$as_me:20211: result: $includedir" >&5
20212 echo "${ECHO_T}$includedir" >&6
20213
20214 ### Resolve a conflict between normal and wide-curses by forcing applications
20215 ### that will need libutf8 to add it to their configure script.
20216 if test "$with_overwrite" != no ; then
20217 if test "$NCURSES_LIBUTF8" = 1 ; then
20218         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20219         { echo "$as_me:20219: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20220 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20221 fi
20222 fi
20223 WITH_OVERWRITE=$with_overwrite
20224
20225 # used to separate tack out of the tree
20226 NCURSES_TREE=
20227
20228 ### predefined stuff for the test programs
20229 cat >>confdefs.h <<\EOF
20230 #define HAVE_SLK_COLOR 1
20231 EOF
20232
20233 ### Construct the list of subdirectories for which we'll customize makefiles
20234 ### with the appropriate compile-rules.
20235
20236 echo "$as_me:20236: checking for src modules" >&5
20237 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20238
20239 # dependencies and linker-arguments for test-programs
20240 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20241 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20242 if test "$DFT_LWR_MODEL" = "libtool"; then
20243         TEST_ARGS="${TEST_DEPS}"
20244         TEST_ARG2="${TEST_DEP2}"
20245 else
20246         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20247         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20248 fi
20249
20250 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20251 cf_cv_src_modules=
20252 for cf_dir in $modules_to_build
20253 do
20254         if test -f $srcdir/$cf_dir/modules; then
20255
20256                 # We may/may not have tack in the distribution, though the
20257                 # makefile is.
20258                 if test $cf_dir = tack ; then
20259                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20260                                 continue
20261                         fi
20262                 fi
20263
20264                 if test -z "$cf_cv_src_modules"; then
20265                         cf_cv_src_modules=$cf_dir
20266                 else
20267                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20268                 fi
20269
20270                 # Make the ncurses_cfg.h file record the library interface files as
20271                 # well.  These are header files that are the same name as their
20272                 # directory.  Ncurses is the only library that does not follow
20273                 # that pattern.
20274                 if test $cf_dir = tack ; then
20275                         continue
20276                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20277
20278 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20279
20280                         cat >>confdefs.h <<EOF
20281 #define HAVE_${cf_have_include}_H 1
20282 EOF
20283
20284                         cat >>confdefs.h <<EOF
20285 #define HAVE_LIB${cf_have_include} 1
20286 EOF
20287
20288                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20289                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20290                         if test "$DFT_LWR_MODEL" = "libtool"; then
20291                                 TEST_ARGS="${TEST_DEPS}"
20292                                 TEST_ARG2="${TEST_DEP2}"
20293                         else
20294                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20295                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20296                         fi
20297                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20298                 fi
20299         fi
20300 done
20301 echo "$as_me:20301: result: $cf_cv_src_modules" >&5
20302 echo "${ECHO_T}$cf_cv_src_modules" >&6
20303
20304 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20305 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20306
20307 SRC_SUBDIRS=
20308 if test "x$cf_with_manpages" != xno ; then
20309         SRC_SUBDIRS="$SRC_SUBDIRS man"
20310 fi
20311 SRC_SUBDIRS="$SRC_SUBDIRS include"
20312 for cf_dir in $cf_cv_src_modules
20313 do
20314         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20315 done
20316 if test "x$cf_with_tests" != "xno" ; then
20317         SRC_SUBDIRS="$SRC_SUBDIRS test"
20318 fi
20319 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20320 if test "$cf_with_cxx_binding" != no; then
20321         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20322         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20323 fi
20324
20325 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20326 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20327
20328 ADA_SUBDIRS=
20329 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20330         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20331         ADA_SUBDIRS="gen src"
20332         if test "x$cf_with_tests" != "xno" ; then
20333                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20334         fi
20335 fi
20336
20337 SUB_MAKEFILES=
20338 for cf_dir in $SRC_SUBDIRS
20339 do
20340         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20341 done
20342
20343 if test -n "$ADA_SUBDIRS"; then
20344         for cf_dir in $ADA_SUBDIRS
20345         do
20346                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20347         done
20348
20349 fi
20350
20351 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20352    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20353    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20354 fi
20355
20356 DIRS_TO_MAKE="lib"
20357 for cf_item in $cf_list_models
20358 do
20359
20360         case $cf_item in
20361         libtool) cf_subdir='obj_lo'  ;;
20362         normal)  cf_subdir='objects' ;;
20363         debug)   cf_subdir='obj_g' ;;
20364         profile) cf_subdir='obj_p' ;;
20365         shared)
20366                 case $cf_cv_system_name in #(vi
20367                 cygwin) #(vi
20368                         cf_subdir='objects' ;;
20369                 *)
20370                         cf_subdir='obj_s' ;;
20371                 esac
20372         esac
20373
20374         for cf_item2 in $DIRS_TO_MAKE
20375         do
20376                 test $cf_item2 = $cf_subdir && break
20377         done
20378         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20379 done
20380 for cf_dir in $DIRS_TO_MAKE
20381 do
20382         test ! -d $cf_dir && mkdir $cf_dir
20383 done
20384
20385 # symbols that differ when compiling Ada95 by itself.
20386 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20387
20388 # values to use as strings
20389 cat >>confdefs.h <<EOF
20390 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20391 EOF
20392
20393 cat >>confdefs.h <<EOF
20394 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20395 EOF
20396
20397 ### Now that we're done running tests, add the compiler-warnings, if any
20398
20399 cf_fix_cppflags=no
20400 cf_new_cflags=
20401 cf_new_cppflags=
20402 cf_new_extra_cppflags=
20403
20404 for cf_add_cflags in $EXTRA_CFLAGS
20405 do
20406 case $cf_fix_cppflags in
20407 no)
20408         case $cf_add_cflags in #(vi
20409         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20410                 case $cf_add_cflags in
20411                 -D*)
20412                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20413
20414                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20415                                 && test -z "${cf_tst_cflags}" \
20416                                 && cf_fix_cppflags=yes
20417
20418                         if test $cf_fix_cppflags = yes ; then
20419                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20420                                 continue
20421                         elif test "${cf_tst_cflags}" = "\"'" ; then
20422                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20423                                 continue
20424                         fi
20425                         ;;
20426                 esac
20427                 case "$CPPFLAGS" in
20428                 *$cf_add_cflags) #(vi
20429                         ;;
20430                 *) #(vi
20431                         case $cf_add_cflags in #(vi
20432                         -D*)
20433                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20434
20435 CPPFLAGS=`echo "$CPPFLAGS" | \
20436         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20437                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20438
20439                                 ;;
20440                         esac
20441                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20442                         ;;
20443                 esac
20444                 ;;
20445         *)
20446                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20447                 ;;
20448         esac
20449         ;;
20450 yes)
20451         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20452
20453         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20454
20455         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20456                 && test -z "${cf_tst_cflags}" \
20457                 && cf_fix_cppflags=no
20458         ;;
20459 esac
20460 done
20461
20462 if test -n "$cf_new_cflags" ; then
20463
20464         CFLAGS="$CFLAGS $cf_new_cflags"
20465 fi
20466
20467 if test -n "$cf_new_cppflags" ; then
20468
20469         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20470 fi
20471
20472 if test -n "$cf_new_extra_cppflags" ; then
20473
20474         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20475 fi
20476
20477 ### Define substitutions for header files to avoid name-pollution
20478
20479 if test "$cf_cv_have_tcgetattr" = yes ; then
20480         HAVE_TCGETATTR=1
20481 else
20482         HAVE_TCGETATTR=0
20483 fi
20484
20485 if test "$ac_cv_header_termio_h" = yes ; then
20486         HAVE_TERMIO_H=1
20487 else
20488         HAVE_TERMIO_H=0
20489 fi
20490
20491 if test "$ac_cv_header_termios_h" = yes ; then
20492         HAVE_TERMIOS_H=1
20493 else
20494         HAVE_TERMIOS_H=0
20495 fi
20496
20497 ################################################################################
20498 test "$use_database" = yes && \
20499 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20500
20501 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20502 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20503
20504 if test x"$enable_pc_files" = xyes ; then \
20505 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20506 MAKE_PC_FILES=
20507 else
20508 MAKE_PC_FILES="#"
20509 fi
20510
20511 # Extract the first word of "tic", so it can be a program name with args.
20512 set dummy tic; ac_word=$2
20513 echo "$as_me:20513: checking for $ac_word" >&5
20514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20515 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20516   echo $ECHO_N "(cached) $ECHO_C" >&6
20517 else
20518   case $TIC_PATH in
20519   [\\/]* | ?:[\\/]*)
20520   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20521   ;;
20522   *)
20523   ac_save_IFS=$IFS; IFS=$ac_path_separator
20524 ac_dummy="$PATH:/usr/local/ncurses/bin"
20525 for ac_dir in $ac_dummy; do
20526   IFS=$ac_save_IFS
20527   test -z "$ac_dir" && ac_dir=.
20528   if $as_executable_p "$ac_dir/$ac_word"; then
20529    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20530    echo "$as_me:20530: found $ac_dir/$ac_word" >&5
20531    break
20532 fi
20533 done
20534
20535   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20536   ;;
20537 esac
20538 fi
20539 TIC_PATH=$ac_cv_path_TIC_PATH
20540
20541 if test -n "$TIC_PATH"; then
20542   echo "$as_me:20542: result: $TIC_PATH" >&5
20543 echo "${ECHO_T}$TIC_PATH" >&6
20544 else
20545   echo "$as_me:20545: result: no" >&5
20546 echo "${ECHO_T}no" >&6
20547 fi
20548
20549 if test -n "$FALLBACK_LIST"
20550 then
20551         if test "$TIC_PATH" = unknown
20552         then
20553                 { echo "$as_me:20553: WARNING: no tic program found for fallbacks" >&5
20554 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20555         fi
20556 fi
20557
20558 if test "x$cf_with_tests" != xno ; then
20559         MAKE_TESTS=
20560 else
20561         MAKE_TESTS="#"
20562 fi
20563
20564 ADAHTML_DIR=../../doc/html/ada
20565
20566 SUB_SCRIPTS=
20567
20568 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
20569 ac_config_commands="$ac_config_commands default"
20570 cat >confcache <<\_ACEOF
20571 # This file is a shell script that caches the results of configure
20572 # tests run on this system so they can be shared between configure
20573 # scripts and configure runs, see configure's option --config-cache.
20574 # It is not useful on other systems.  If it contains results you don't
20575 # want to keep, you may remove or edit it.
20576 #
20577 # config.status only pays attention to the cache file if you give it
20578 # the --recheck option to rerun configure.
20579 #
20580 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20581 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20582 # following values.
20583
20584 _ACEOF
20585
20586 # The following way of writing the cache mishandles newlines in values,
20587 # but we know of no workaround that is simple, portable, and efficient.
20588 # So, don't put newlines in cache variables' values.
20589 # Ultrix sh set writes to stderr and can't be redirected directly,
20590 # and sets the high bit in the cache file unless we assign to the vars.
20591 {
20592   (set) 2>&1 |
20593     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20594     *ac_space=\ *)
20595       # `set' does not quote correctly, so add quotes (double-quote
20596       # substitution turns \\\\ into \\, and sed turns \\ into \).
20597       sed -n \
20598         "s/'/'\\\\''/g;
20599           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20600       ;;
20601     *)
20602       # `set' quotes correctly as required by POSIX, so do not add quotes.
20603       sed -n \
20604         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20605       ;;
20606     esac;
20607 } |
20608   sed '
20609      t clear
20610      : clear
20611      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20612      t end
20613      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20614      : end' >>confcache
20615 if cmp -s $cache_file confcache; then :; else
20616   if test -w $cache_file; then
20617     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20618     cat confcache >$cache_file
20619   else
20620     echo "not updating unwritable cache $cache_file"
20621   fi
20622 fi
20623 rm -f confcache
20624
20625 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20626 # Let make expand exec_prefix.
20627 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20628
20629 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20630 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20631 # trailing colons and then remove the whole line if VPATH becomes empty
20632 # (actually we leave an empty line to preserve line numbers).
20633 if test "x$srcdir" = x.; then
20634   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20635 s/:*\$(srcdir):*/:/;
20636 s/:*\${srcdir}:*/:/;
20637 s/:*@srcdir@:*/:/;
20638 s/^\([^=]*=[    ]*\):*/\1/;
20639 s/:*$//;
20640 s/^[^=]*=[      ]*$//;
20641 }'
20642 fi
20643
20644 DEFS=-DHAVE_CONFIG_H
20645
20646 : ${CONFIG_STATUS=./config.status}
20647 ac_clean_files_save=$ac_clean_files
20648 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20649 { echo "$as_me:20649: creating $CONFIG_STATUS" >&5
20650 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20651 cat >$CONFIG_STATUS <<_ACEOF
20652 #! $SHELL
20653 # Generated automatically by configure.
20654 # Run this file to recreate the current configuration.
20655 # Compiler output produced by configure, useful for debugging
20656 # configure, is in config.log if it exists.
20657
20658 debug=false
20659 SHELL=\${CONFIG_SHELL-$SHELL}
20660 ac_cs_invocation="\$0 \$@"
20661
20662 _ACEOF
20663
20664 cat >>$CONFIG_STATUS <<\_ACEOF
20665 # Be Bourne compatible
20666 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20667   emulate sh
20668   NULLCMD=:
20669 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20670   set -o posix
20671 fi
20672
20673 # Name of the executable.
20674 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20675
20676 if expr a : '\(a\)' >/dev/null 2>&1; then
20677   as_expr=expr
20678 else
20679   as_expr=false
20680 fi
20681
20682 rm -f conf$$ conf$$.exe conf$$.file
20683 echo >conf$$.file
20684 if ln -s conf$$.file conf$$ 2>/dev/null; then
20685   # We could just check for DJGPP; but this test a) works b) is more generic
20686   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20687   if test -f conf$$.exe; then
20688     # Don't use ln at all; we don't have any links
20689     as_ln_s='cp -p'
20690   else
20691     as_ln_s='ln -s'
20692   fi
20693 elif ln conf$$.file conf$$ 2>/dev/null; then
20694   as_ln_s=ln
20695 else
20696   as_ln_s='cp -p'
20697 fi
20698 rm -f conf$$ conf$$.exe conf$$.file
20699
20700 as_executable_p="test -f"
20701
20702 # Support unset when possible.
20703 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20704   as_unset=unset
20705 else
20706   as_unset=false
20707 fi
20708
20709 # NLS nuisances.
20710 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20711 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20712 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20713 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20714 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20715 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20716 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20717 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20718
20719 # IFS
20720 # We need space, tab and new line, in precisely that order.
20721 as_nl='
20722 '
20723 IFS="   $as_nl"
20724
20725 # CDPATH.
20726 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20727
20728 exec 6>&1
20729
20730 _ACEOF
20731
20732 # Files that config.status was made for.
20733 if test -n "$ac_config_files"; then
20734   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20735 fi
20736
20737 if test -n "$ac_config_headers"; then
20738   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20739 fi
20740
20741 if test -n "$ac_config_links"; then
20742   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20743 fi
20744
20745 if test -n "$ac_config_commands"; then
20746   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20747 fi
20748
20749 cat >>$CONFIG_STATUS <<\EOF
20750
20751 ac_cs_usage="\
20752 \`$as_me' instantiates files from templates according to the
20753 current configuration.
20754
20755 Usage: $0 [OPTIONS] [FILE]...
20756
20757   -h, --help       print this help, then exit
20758   -V, --version    print version number, then exit
20759   -d, --debug      don't remove temporary files
20760       --recheck    update $as_me by reconfiguring in the same conditions
20761   --file=FILE[:TEMPLATE]
20762                    instantiate the configuration file FILE
20763   --header=FILE[:TEMPLATE]
20764                    instantiate the configuration header FILE
20765
20766 Configuration files:
20767 $config_files
20768
20769 Configuration headers:
20770 $config_headers
20771
20772 Configuration commands:
20773 $config_commands
20774
20775 Report bugs to <dickey@invisible-island.net>."
20776 EOF
20777
20778 cat >>$CONFIG_STATUS <<EOF
20779 ac_cs_version="\\
20780 config.status
20781 configured by $0, generated by GNU Autoconf 2.52.20120310,
20782   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20783
20784 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20785 Free Software Foundation, Inc.
20786 This config.status script is free software; the Free Software Foundation
20787 gives unlimited permission to copy, distribute and modify it."
20788 srcdir=$srcdir
20789 INSTALL="$INSTALL"
20790 EOF
20791
20792 cat >>$CONFIG_STATUS <<\EOF
20793 # If no file are specified by the user, then we need to provide default
20794 # value.  By we need to know if files were specified by the user.
20795 ac_need_defaults=:
20796 while test $# != 0
20797 do
20798   case $1 in
20799   --*=*)
20800     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20801     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20802     shift
20803     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20804     shift
20805     ;;
20806   -*);;
20807   *) # This is not an option, so the user has probably given explicit
20808      # arguments.
20809      ac_need_defaults=false;;
20810   esac
20811
20812   case $1 in
20813   # Handling of the options.
20814 EOF
20815 cat >>$CONFIG_STATUS <<EOF
20816   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20817     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20818     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20819 EOF
20820 cat >>$CONFIG_STATUS <<\EOF
20821   --version | --vers* | -V )
20822     echo "$ac_cs_version"; exit 0 ;;
20823   --he | --h)
20824     # Conflict between --help and --header
20825     { { echo "$as_me:20825: error: ambiguous option: $1
20826 Try \`$0 --help' for more information." >&5
20827 echo "$as_me: error: ambiguous option: $1
20828 Try \`$0 --help' for more information." >&2;}
20829    { (exit 1); exit 1; }; };;
20830   --help | --hel | -h )
20831     echo "$ac_cs_usage"; exit 0 ;;
20832   --debug | --d* | -d )
20833     debug=: ;;
20834   --file | --fil | --fi | --f )
20835     shift
20836     CONFIG_FILES="$CONFIG_FILES $1"
20837     ac_need_defaults=false;;
20838   --header | --heade | --head | --hea )
20839     shift
20840     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20841     ac_need_defaults=false;;
20842
20843   # This is an error.
20844   -*) { { echo "$as_me:20844: error: unrecognized option: $1
20845 Try \`$0 --help' for more information." >&5
20846 echo "$as_me: error: unrecognized option: $1
20847 Try \`$0 --help' for more information." >&2;}
20848    { (exit 1); exit 1; }; } ;;
20849
20850   *) ac_config_targets="$ac_config_targets $1" ;;
20851
20852   esac
20853   shift
20854 done
20855
20856 exec 5>>config.log
20857 cat >&5 << _ACEOF
20858
20859 ## ----------------------- ##
20860 ## Running config.status.  ##
20861 ## ----------------------- ##
20862
20863 This file was extended by $as_me 2.52.20120310, executed with
20864   CONFIG_FILES    = $CONFIG_FILES
20865   CONFIG_HEADERS  = $CONFIG_HEADERS
20866   CONFIG_LINKS    = $CONFIG_LINKS
20867   CONFIG_COMMANDS = $CONFIG_COMMANDS
20868   > $ac_cs_invocation
20869 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20870
20871 _ACEOF
20872 EOF
20873
20874 cat >>$CONFIG_STATUS <<EOF
20875 #
20876 # INIT-COMMANDS section.
20877 #
20878
20879 ### Special initialization commands, used to pass information from the
20880 ### configuration-run into config.status
20881
20882 AWK="$AWK"
20883 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20884 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20885 ECHO_LD="$ECHO_LD"
20886 LDCONFIG="$LDCONFIG"
20887 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20888 LIB_NAME="$LIB_NAME"
20889 LIB_PREFIX="$LIB_PREFIX"
20890 LIB_SUBSETS="$LIB_SUBSETS"
20891 LIB_SUFFIX="$LIB_SUFFIX"
20892 LIB_TRACING="$LIB_TRACING"
20893 LN_S="$LN_S"
20894 MAKE_TERMINFO="$MAKE_TERMINFO"
20895 NCURSES_MAJOR="$NCURSES_MAJOR"
20896 NCURSES_MINOR="$NCURSES_MINOR"
20897 NCURSES_OSPEED="$NCURSES_OSPEED"
20898 NCURSES_PATCH="$NCURSES_PATCH"
20899 SRC_SUBDIRS="$SRC_SUBDIRS"
20900 TERMINFO="$TERMINFO"
20901 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20902 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20903 TICS_NAME="$TICS_NAME"
20904 TIC_PATH="$TIC_PATH"
20905 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20906 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20907 TINFO_NAME="$TINFO_NAME"
20908 TINFO_SUFFIX="$TINFO_SUFFIX"
20909 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20910 WITH_CURSES_H="$with_curses_h"
20911 WITH_ECHO="$with_echo"
20912 WITH_OVERWRITE="$with_overwrite"
20913 cf_LIST_MODELS="$cf_list_models"
20914 cf_cv_abi_version="$cf_cv_abi_version"
20915 cf_cv_do_relink="$cf_cv_do_relink"
20916 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20917 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20918 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20919 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20920 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20921 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20922 cf_cv_rel_version="$cf_cv_rel_version"
20923 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20924 cf_cv_shared_soname='$cf_cv_shared_soname'
20925 cf_cv_shlib_version="$cf_cv_shlib_version"
20926 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20927 cf_cv_system_name="$cf_cv_system_name"
20928 cf_cv_term_driver="$with_term_driver"
20929 cf_with_ada="$cf_with_ada"
20930 cf_with_cxx_binding="$cf_with_cxx_binding"
20931 cf_with_manpages="$cf_with_manpages"
20932 cf_with_tests="$cf_with_tests"
20933 host="$host"
20934 target="$target"
20935
20936 EOF
20937
20938 cat >>$CONFIG_STATUS <<\EOF
20939 for ac_config_target in $ac_config_targets
20940 do
20941   case "$ac_config_target" in
20942   # Handling of arguments.
20943   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20944   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20945   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20946   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20947   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20948   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20949   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20950   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20951   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20952   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20953   *) { { echo "$as_me:20953: error: invalid argument: $ac_config_target" >&5
20954 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20955    { (exit 1); exit 1; }; };;
20956   esac
20957 done
20958
20959 # If the user did not use the arguments to specify the items to instantiate,
20960 # then the envvar interface is used.  Set only those that are not.
20961 # We use the long form for the default assignment because of an extremely
20962 # bizarre bug on SunOS 4.1.3.
20963 if $ac_need_defaults; then
20964   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20965   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20966   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20967 fi
20968
20969 # Create a temporary directory, and hook for its removal unless debugging.
20970 $debug ||
20971 {
20972   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20973   trap '{ (exit 1); exit 1; }' 1 2 13 15
20974 }
20975
20976 # Create a (secure) tmp directory for tmp files.
20977 : ${TMPDIR=/tmp}
20978 {
20979   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20980   test -n "$tmp" && test -d "$tmp"
20981 }  ||
20982 {
20983   tmp=$TMPDIR/cs$$-$RANDOM
20984   (umask 077 && mkdir $tmp)
20985 } ||
20986 {
20987    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20988    { (exit 1); exit 1; }
20989 }
20990
20991 EOF
20992
20993 cat >>$CONFIG_STATUS <<EOF
20994
20995 #
20996 # CONFIG_FILES section.
20997 #
20998
20999 # No need to generate the scripts if there are no CONFIG_FILES.
21000 # This happens for instance when ./config.status config.h
21001 if test -n "\$CONFIG_FILES"; then
21002   # Protect against being on the right side of a sed subst in config.status.
21003   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21004    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21005 s,@SHELL@,$SHELL,;t t
21006 s,@exec_prefix@,$exec_prefix,;t t
21007 s,@prefix@,$prefix,;t t
21008 s,@program_transform_name@,$program_transform_name,;t t
21009 s,@bindir@,$bindir,;t t
21010 s,@sbindir@,$sbindir,;t t
21011 s,@libexecdir@,$libexecdir,;t t
21012 s,@datadir@,$datadir,;t t
21013 s,@sysconfdir@,$sysconfdir,;t t
21014 s,@sharedstatedir@,$sharedstatedir,;t t
21015 s,@localstatedir@,$localstatedir,;t t
21016 s,@libdir@,$libdir,;t t
21017 s,@includedir@,$includedir,;t t
21018 s,@oldincludedir@,$oldincludedir,;t t
21019 s,@infodir@,$infodir,;t t
21020 s,@mandir@,$mandir,;t t
21021 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21022 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21023 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21024 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21025 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21026 s,@build_alias@,$build_alias,;t t
21027 s,@host_alias@,$host_alias,;t t
21028 s,@target_alias@,$target_alias,;t t
21029 s,@ECHO_C@,$ECHO_C,;t t
21030 s,@ECHO_N@,$ECHO_N,;t t
21031 s,@ECHO_T@,$ECHO_T,;t t
21032 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21033 s,@DEFS@,$DEFS,;t t
21034 s,@LIBS@,$LIBS,;t t
21035 s,@top_builddir@,$top_builddir,;t t
21036 s,@EGREP@,$EGREP,;t t
21037 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21038 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21039 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21040 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21041 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21042 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21043 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21044 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21045 s,@build@,$build,;t t
21046 s,@build_cpu@,$build_cpu,;t t
21047 s,@build_vendor@,$build_vendor,;t t
21048 s,@build_os@,$build_os,;t t
21049 s,@host@,$host,;t t
21050 s,@host_cpu@,$host_cpu,;t t
21051 s,@host_vendor@,$host_vendor,;t t
21052 s,@host_os@,$host_os,;t t
21053 s,@target@,$target,;t t
21054 s,@target_cpu@,$target_cpu,;t t
21055 s,@target_vendor@,$target_vendor,;t t
21056 s,@target_os@,$target_os,;t t
21057 s,@CC@,$CC,;t t
21058 s,@CFLAGS@,$CFLAGS,;t t
21059 s,@LDFLAGS@,$LDFLAGS,;t t
21060 s,@CPPFLAGS@,$CPPFLAGS,;t t
21061 s,@ac_ct_CC@,$ac_ct_CC,;t t
21062 s,@EXEEXT@,$EXEEXT,;t t
21063 s,@OBJEXT@,$OBJEXT,;t t
21064 s,@CPP@,$CPP,;t t
21065 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21066 s,@PROG_EXT@,$PROG_EXT,;t t
21067 s,@LDCONFIG@,$LDCONFIG,;t t
21068 s,@CXX@,$CXX,;t t
21069 s,@CXXFLAGS@,$CXXFLAGS,;t t
21070 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21071 s,@AWK@,$AWK,;t t
21072 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21073 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21074 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21075 s,@LINT@,$LINT,;t t
21076 s,@LINT_OPTS@,$LINT_OPTS,;t t
21077 s,@LN_S@,$LN_S,;t t
21078 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21079 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21080 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21081 s,@SET_MAKE@,$SET_MAKE,;t t
21082 s,@CTAGS@,$CTAGS,;t t
21083 s,@ETAGS@,$ETAGS,;t t
21084 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21085 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21086 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21087 s,@RANLIB@,$RANLIB,;t t
21088 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21089 s,@LD@,$LD,;t t
21090 s,@ac_ct_LD@,$ac_ct_LD,;t t
21091 s,@AR@,$AR,;t t
21092 s,@ac_ct_AR@,$ac_ct_AR,;t t
21093 s,@ARFLAGS@,$ARFLAGS,;t t
21094 s,@DESTDIR@,$DESTDIR,;t t
21095 s,@BUILD_CC@,$BUILD_CC,;t t
21096 s,@BUILD_CPP@,$BUILD_CPP,;t t
21097 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21098 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21099 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21100 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21101 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21102 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21103 s,@cf_list_models@,$cf_list_models,;t t
21104 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21105 s,@LIBTOOL@,$LIBTOOL,;t t
21106 s,@LT_UNDEF@,$LT_UNDEF,;t t
21107 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21108 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21109 s,@LIB_CREATE@,$LIB_CREATE,;t t
21110 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21111 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21112 s,@LIB_PREP@,$LIB_PREP,;t t
21113 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21114 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21115 s,@LIB_LINK@,$LIB_LINK,;t t
21116 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21117 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21118 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21119 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21120 s,@TICS_NAME@,$TICS_NAME,;t t
21121 s,@TINFO_NAME@,$TINFO_NAME,;t t
21122 s,@LIB_NAME@,$LIB_NAME,;t t
21123 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21124 s,@CC_G_OPT@,$CC_G_OPT,;t t
21125 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21126 s,@LD_MODEL@,$LD_MODEL,;t t
21127 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21128 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21129 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21130 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21131 s,@LINK_PROGS@,$LINK_PROGS,;t t
21132 s,@LINK_TESTS@,$LINK_TESTS,;t t
21133 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21134 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21135 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21136 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21137 s,@RPATH_LIST@,$RPATH_LIST,;t t
21138 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21139 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21140 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21141 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21142 s,@XTERM_KBS@,$XTERM_KBS,;t t
21143 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21144 s,@TERMINFO@,$TERMINFO,;t t
21145 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21146 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21147 s,@TERMPATH@,$TERMPATH,;t t
21148 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21149 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21150 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21151 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21152 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21153 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21154 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21155 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21156 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21157 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21158 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21159 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21160 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21161 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21162 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21163 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21164 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21165 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21166 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21167 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21168 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21169 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21170 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21171 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21172 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21173 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21174 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21175 s,@PTHREAD@,$PTHREAD,;t t
21176 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21177 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21178 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21179 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21180 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21181 s,@ECHO_LT@,$ECHO_LT,;t t
21182 s,@ECHO_LD@,$ECHO_LD,;t t
21183 s,@RULE_CC@,$RULE_CC,;t t
21184 s,@SHOW_CC@,$SHOW_CC,;t t
21185 s,@ECHO_CC@,$ECHO_CC,;t t
21186 s,@ECHO_LINK@,$ECHO_LINK,;t t
21187 s,@ADAFLAGS@,$ADAFLAGS,;t t
21188 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21189 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21190 s,@ADA_TRACE@,$ADA_TRACE,;t t
21191 s,@MATH_LIB@,$MATH_LIB,;t t
21192 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21193 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21194 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21195 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21196 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21197 s,@TEST_LIBS@,$TEST_LIBS,;t t
21198 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21199 s,@CXXCPP@,$CXXCPP,;t t
21200 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21201 s,@CXX_AR@,$CXX_AR,;t t
21202 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21203 s,@CXXLIBS@,$CXXLIBS,;t t
21204 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21205 s,@gnat_exists@,$gnat_exists,;t t
21206 s,@M4_exists@,$M4_exists,;t t
21207 s,@cf_ada_make@,$cf_ada_make,;t t
21208 s,@cf_compile_generics@,$cf_compile_generics,;t t
21209 s,@cf_generic_objects@,$cf_generic_objects,;t t
21210 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21211 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21212 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21213 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21214 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21215 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21216 s,@cf_ada_package@,$cf_ada_package,;t t
21217 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21218 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21219 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21220 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21221 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21222 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21223 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21224 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21225 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21226 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21227 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21228 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21229 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21230 s,@TICS_LIBS@,$TICS_LIBS,;t t
21231 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21232 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21233 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21234 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21235 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21236 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21237 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21238 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21239 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21240 s,@TICS_LIST@,$TICS_LIST,;t t
21241 s,@TINFO_LIST@,$TINFO_LIST,;t t
21242 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21243 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21244 s,@TEST_ARGS@,$TEST_ARGS,;t t
21245 s,@TEST_DEPS@,$TEST_DEPS,;t t
21246 s,@TEST_ARG2@,$TEST_ARG2,;t t
21247 s,@TEST_DEP2@,$TEST_DEP2,;t t
21248 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21249 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21250 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21251 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21252 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21253 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21254 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21255 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21256 s,@cross_compiling@,$cross_compiling,;t t
21257 s,@TIC_PATH@,$TIC_PATH,;t t
21258 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21259 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21260 CEOF
21261
21262 EOF
21263
21264   cat >>$CONFIG_STATUS <<\EOF
21265   # Split the substitutions into bite-sized pieces for seds with
21266   # small command number limits, like on Digital OSF/1 and HP-UX.
21267   ac_max_sed_lines=48
21268   ac_sed_frag=1 # Number of current file.
21269   ac_beg=1 # First line for current file.
21270   ac_end=$ac_max_sed_lines # Line after last line for current file.
21271   ac_more_lines=:
21272   ac_sed_cmds=
21273   while $ac_more_lines; do
21274     if test $ac_beg -gt 1; then
21275       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21276     else
21277       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21278     fi
21279     if test ! -s $tmp/subs.frag; then
21280       ac_more_lines=false
21281     else
21282       # The purpose of the label and of the branching condition is to
21283       # speed up the sed processing (if there are no `@' at all, there
21284       # is no need to browse any of the substitutions).
21285       # These are the two extra sed commands mentioned above.
21286       (echo ':t
21287   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21288       if test -z "$ac_sed_cmds"; then
21289         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21290       else
21291         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21292       fi
21293       ac_sed_frag=`expr $ac_sed_frag + 1`
21294       ac_beg=$ac_end
21295       ac_end=`expr $ac_end + $ac_max_sed_lines`
21296     fi
21297   done
21298   if test -z "$ac_sed_cmds"; then
21299     ac_sed_cmds=cat
21300   fi
21301 fi # test -n "$CONFIG_FILES"
21302
21303 EOF
21304 cat >>$CONFIG_STATUS <<\EOF
21305 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21306   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21307   case $ac_file in
21308   - | *:- | *:-:* ) # input from stdin
21309         cat >$tmp/stdin
21310         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21311         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21312   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21313         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21314   * )   ac_file_in=$ac_file.in ;;
21315   esac
21316
21317   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21318   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21319          X"$ac_file" : 'X\(//\)[^/]' \| \
21320          X"$ac_file" : 'X\(//\)$' \| \
21321          X"$ac_file" : 'X\(/\)' \| \
21322          .     : '\(.\)' 2>/dev/null ||
21323 echo X"$ac_file" |
21324     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21325           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21326           /^X\(\/\/\)$/{ s//\1/; q; }
21327           /^X\(\/\).*/{ s//\1/; q; }
21328           s/.*/./; q'`
21329   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21330     { case "$ac_dir" in
21331   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21332   *)                      as_incr_dir=.;;
21333 esac
21334 as_dummy="$ac_dir"
21335 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21336   case $as_mkdir_dir in
21337     # Skip DOS drivespec
21338     ?:) as_incr_dir=$as_mkdir_dir ;;
21339     *)
21340       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21341       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21342     ;;
21343   esac
21344 done; }
21345
21346     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21347     # A "../" for each directory in $ac_dir_suffix.
21348     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21349   else
21350     ac_dir_suffix= ac_dots=
21351   fi
21352
21353   case $srcdir in
21354   .)  ac_srcdir=.
21355       if test -z "$ac_dots"; then
21356          ac_top_srcdir=.
21357       else
21358          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21359       fi ;;
21360   [\\/]* | ?:[\\/]* )
21361       ac_srcdir=$srcdir$ac_dir_suffix;
21362       ac_top_srcdir=$srcdir ;;
21363   *) # Relative path.
21364     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21365     ac_top_srcdir=$ac_dots$srcdir ;;
21366   esac
21367
21368   case $INSTALL in
21369   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21370   *) ac_INSTALL=$ac_dots$INSTALL ;;
21371   esac
21372
21373   if test x"$ac_file" != x-; then
21374     { echo "$as_me:21374: creating $ac_file" >&5
21375 echo "$as_me: creating $ac_file" >&6;}
21376     rm -f "$ac_file"
21377   fi
21378   # Let's still pretend it is `configure' which instantiates (i.e., don't
21379   # use $as_me), people would be surprised to read:
21380   #    /* config.h.  Generated automatically by config.status.  */
21381   configure_input="Generated automatically from `echo $ac_file_in |
21382                                                  sed 's,.*/,,'` by configure."
21383
21384   # First look for the input files in the build tree, otherwise in the
21385   # src tree.
21386   ac_file_inputs=`IFS=:
21387     for f in $ac_file_in; do
21388       case $f in
21389       -) echo $tmp/stdin ;;
21390       [\\/$]*)
21391          # Absolute (can't be DOS-style, as IFS=:)
21392          test -f "$f" || { { echo "$as_me:21392: error: cannot find input file: $f" >&5
21393 echo "$as_me: error: cannot find input file: $f" >&2;}
21394    { (exit 1); exit 1; }; }
21395          echo $f;;
21396       *) # Relative
21397          if test -f "$f"; then
21398            # Build tree
21399            echo $f
21400          elif test -f "$srcdir/$f"; then
21401            # Source tree
21402            echo $srcdir/$f
21403          else
21404            # /dev/null tree
21405            { { echo "$as_me:21405: error: cannot find input file: $f" >&5
21406 echo "$as_me: error: cannot find input file: $f" >&2;}
21407    { (exit 1); exit 1; }; }
21408          fi;;
21409       esac
21410     done` || { (exit 1); exit 1; }
21411 EOF
21412 cat >>$CONFIG_STATUS <<EOF
21413   sed "$ac_vpsub
21414 $extrasub
21415 EOF
21416 cat >>$CONFIG_STATUS <<\EOF
21417 :t
21418 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21419 s,@configure_input@,$configure_input,;t t
21420 s,@srcdir@,$ac_srcdir,;t t
21421 s,@top_srcdir@,$ac_top_srcdir,;t t
21422 s,@INSTALL@,$ac_INSTALL,;t t
21423 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21424   rm -f $tmp/stdin
21425   if test x"$ac_file" != x-; then
21426     mv $tmp/out $ac_file
21427   else
21428     cat $tmp/out
21429     rm -f $tmp/out
21430   fi
21431
21432 done
21433 EOF
21434 cat >>$CONFIG_STATUS <<\EOF
21435
21436 #
21437 # CONFIG_HEADER section.
21438 #
21439
21440 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21441 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21442 #
21443 # ac_d sets the value in "#define NAME VALUE" lines.
21444 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21445 ac_dB='[        ].*$,\1#\2'
21446 ac_dC=' '
21447 ac_dD=',;t'
21448 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21449 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21450 ac_iB='\([      ]\),\1#\2define\3'
21451 ac_iC=' '
21452 ac_iD='\4,;t'
21453 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21454 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21455 ac_uB='$,\1#\2define\3'
21456 ac_uC=' '
21457 ac_uD=',;t'
21458
21459 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21460   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21461   case $ac_file in
21462   - | *:- | *:-:* ) # input from stdin
21463         cat >$tmp/stdin
21464         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21465         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21466   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21467         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21468   * )   ac_file_in=$ac_file.in ;;
21469   esac
21470
21471   test x"$ac_file" != x- && { echo "$as_me:21471: creating $ac_file" >&5
21472 echo "$as_me: creating $ac_file" >&6;}
21473
21474   # First look for the input files in the build tree, otherwise in the
21475   # src tree.
21476   ac_file_inputs=`IFS=:
21477     for f in $ac_file_in; do
21478       case $f in
21479       -) echo $tmp/stdin ;;
21480       [\\/$]*)
21481          # Absolute (can't be DOS-style, as IFS=:)
21482          test -f "$f" || { { echo "$as_me:21482: error: cannot find input file: $f" >&5
21483 echo "$as_me: error: cannot find input file: $f" >&2;}
21484    { (exit 1); exit 1; }; }
21485          echo $f;;
21486       *) # Relative
21487          if test -f "$f"; then
21488            # Build tree
21489            echo $f
21490          elif test -f "$srcdir/$f"; then
21491            # Source tree
21492            echo $srcdir/$f
21493          else
21494            # /dev/null tree
21495            { { echo "$as_me:21495: error: cannot find input file: $f" >&5
21496 echo "$as_me: error: cannot find input file: $f" >&2;}
21497    { (exit 1); exit 1; }; }
21498          fi;;
21499       esac
21500     done` || { (exit 1); exit 1; }
21501   # Remove the trailing spaces.
21502   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21503
21504 EOF
21505
21506 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21507 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21508 # be either 'cat' or 'sort'.
21509 cat confdefs.h | uniq >conftest.vals
21510
21511 # Break up conftest.vals because some shells have a limit on
21512 # the size of here documents, and old seds have small limits too.
21513
21514 rm -f conftest.tail
21515 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21516 while grep . conftest.vals >/dev/null
21517 do
21518   # Write chunks of a limited-size here document to conftest.frag.
21519   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21520   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21521   echo 'CEOF' >> $CONFIG_STATUS
21522   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21523   rm -f conftest.vals
21524   mv conftest.tail conftest.vals
21525 done
21526 rm -f conftest.vals
21527
21528 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21529 # marker @DEFS@.
21530 echo '  cat >> conftest.edit <<CEOF
21531 /@DEFS@/r conftest.frag
21532 /@DEFS@/d
21533 CEOF
21534 sed -f conftest.edit $tmp/in > $tmp/out
21535 rm -f $tmp/in
21536 mv $tmp/out $tmp/in
21537 rm -f conftest.edit conftest.frag
21538 ' >> $CONFIG_STATUS
21539
21540 cat >>$CONFIG_STATUS <<\EOF
21541   # Let's still pretend it is `configure' which instantiates (i.e., don't
21542   # use $as_me), people would be surprised to read:
21543   #    /* config.h.  Generated automatically by config.status.  */
21544   if test x"$ac_file" = x-; then
21545     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21546   else
21547     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21548   fi
21549   cat $tmp/in >>$tmp/config.h
21550   rm -f $tmp/in
21551   if test x"$ac_file" != x-; then
21552     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21553       { echo "$as_me:21553: $ac_file is unchanged" >&5
21554 echo "$as_me: $ac_file is unchanged" >&6;}
21555     else
21556       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21557          X"$ac_file" : 'X\(//\)[^/]' \| \
21558          X"$ac_file" : 'X\(//\)$' \| \
21559          X"$ac_file" : 'X\(/\)' \| \
21560          .     : '\(.\)' 2>/dev/null ||
21561 echo X"$ac_file" |
21562     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21563           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21564           /^X\(\/\/\)$/{ s//\1/; q; }
21565           /^X\(\/\).*/{ s//\1/; q; }
21566           s/.*/./; q'`
21567       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21568         { case "$ac_dir" in
21569   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21570   *)                      as_incr_dir=.;;
21571 esac
21572 as_dummy="$ac_dir"
21573 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21574   case $as_mkdir_dir in
21575     # Skip DOS drivespec
21576     ?:) as_incr_dir=$as_mkdir_dir ;;
21577     *)
21578       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21579       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21580     ;;
21581   esac
21582 done; }
21583
21584       fi
21585       rm -f $ac_file
21586       mv $tmp/config.h $ac_file
21587     fi
21588   else
21589     cat $tmp/config.h
21590     rm -f $tmp/config.h
21591   fi
21592 done
21593 EOF
21594 cat >>$CONFIG_STATUS <<\EOF
21595 #
21596 # CONFIG_COMMANDS section.
21597 #
21598 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21599   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21600   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21601
21602   case $ac_dest in
21603     default )
21604 if test "x$cf_with_tests" != xno ; then
21605
21606 for cf_dir in test
21607 do
21608         if test ! -d $srcdir/$cf_dir; then
21609                 continue
21610         elif test -f $srcdir/$cf_dir/programs; then
21611                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21612         fi
21613 done
21614
21615 fi
21616
21617 cf_prefix=$LIB_PREFIX
21618
21619 case $cf_cv_shlib_version in #(vi
21620 cygdll|mingw)
21621         TINFO_NAME=$TINFO_ARG_SUFFIX
21622         TINFO_SUFFIX=.dll
21623         ;;
21624 esac
21625
21626 if test -n "$TINFO_SUFFIX" ; then
21627         case $TINFO_SUFFIX in
21628         tw*)
21629                 TINFO_NAME="${TINFO_NAME}tw"
21630                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21631                 ;;
21632         t*)
21633                 TINFO_NAME="${TINFO_NAME}t"
21634                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21635                 ;;
21636         w*)
21637                 TINFO_NAME="${TINFO_NAME}w"
21638                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21639                 ;;
21640         esac
21641 fi
21642
21643 for cf_dir in $SRC_SUBDIRS
21644 do
21645         if test ! -d $srcdir/$cf_dir ; then
21646                 continue
21647         elif test -f $srcdir/$cf_dir/modules; then
21648
21649                 SHARED_LIB=
21650                 LIBS_TO_MAKE=
21651                 for cf_item in $cf_LIST_MODELS
21652                 do
21653
21654         case $cf_item in #(vi
21655         libtool) #(vi
21656                 cf_suffix='.la'
21657                 cf_depsuf=$cf_suffix
21658                 ;;
21659         normal) #(vi
21660                 cf_suffix='.a'
21661                 cf_depsuf=$cf_suffix
21662                 ;;
21663         debug) #(vi
21664                 cf_suffix='_g.a'
21665                 cf_depsuf=$cf_suffix
21666                 ;;
21667         profile) #(vi
21668                 cf_suffix='_p.a'
21669                 cf_depsuf=$cf_suffix
21670                 ;;
21671         shared) #(vi
21672                 case $cf_cv_system_name in
21673                 aix[5-7]*) #(vi
21674                         cf_suffix='.a'
21675                         cf_depsuf=$cf_suffix
21676                         ;;
21677                 cygwin*|mingw*) #(vi
21678                         cf_suffix='.dll'
21679                         cf_depsuf='.dll.a'
21680                         ;;
21681                 darwin*) #(vi
21682                         cf_suffix='.dylib'
21683                         cf_depsuf=$cf_suffix
21684                         ;;
21685                 hpux*) #(vi
21686                         case $target in
21687                         ia64*) #(vi
21688                                 cf_suffix='.so'
21689                                 cf_depsuf=$cf_suffix
21690                                 ;;
21691                         *) #(vi
21692                                 cf_suffix='.sl'
21693                                 cf_depsuf=$cf_suffix
21694                                 ;;
21695                         esac
21696                         ;;
21697                 *)      cf_suffix='.so'
21698                         cf_depsuf=$cf_suffix
21699                         ;;
21700                 esac
21701         esac
21702         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21703         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21704
21705                         if test $cf_item = shared ; then
21706                         if test "$cf_cv_do_symlinks" = yes ; then
21707                                 case "$cf_cv_shlib_version" in #(vi
21708                                 rel) #(vi
21709                                         case "$cf_cv_system_name" in #(vi
21710                                         darwin*)
21711                                         case .${LIB_SUFFIX} in
21712                                         .tw*)
21713                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21714                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21715                                                 ;;
21716                                         .t*)
21717                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21718                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21719                                                 ;;
21720                                         .w*)
21721                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21722                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21723                                                 ;;
21724                                         *)
21725                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21726                                                 ;;
21727                                         esac
21728                                         ;; #(vi
21729                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21730                                         esac
21731                                         ;;
21732                                 abi)
21733                                         case "$cf_cv_system_name" in #(vi
21734                                         darwin*)
21735                                         case .${LIB_SUFFIX} in
21736                                         .tw*)
21737                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21738                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21739                                                 ;;
21740                                         .t*)
21741                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21742                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21743                                                 ;;
21744                                         .w*)
21745                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21746                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21747                                                 ;;
21748                                         *)
21749                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21750                                                 ;;
21751                                         esac
21752                                         ;; #(vi
21753                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21754                                         esac
21755                                         ;;
21756                                 esac
21757                         fi
21758                         # cygwin needs import library, and has unique naming convention
21759                         # use autodetected ${cf_prefix} for import lib and static lib, but
21760                         # use 'cyg' prefix for shared lib.
21761                         case $cf_cv_shlib_version in #(vi
21762                         cygdll) #(vi
21763                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21764                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21765                                 continue
21766                                 ;;
21767                         mingw)
21768                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21769                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/lib${cf_dir}${cf_cygsuf}"
21770                                 continue
21771                                 ;;
21772                         esac
21773                         fi
21774                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21775                 done
21776
21777                 if test $cf_dir = ncurses ; then
21778                         cf_subsets="$LIB_SUBSETS"
21779                         cf_r_parts="$cf_subsets"
21780                         cf_liblist="$LIBS_TO_MAKE"
21781
21782                         while test -n "$cf_r_parts"
21783                         do
21784                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21785                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21786                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21787                                         cf_item=
21788                                         case $cf_l_parts in #(vi
21789                                         *termlib*) #(vi
21790                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21791                                                 ;;
21792                                         *ticlib*)
21793                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21794                                                 ;;
21795                                         *)
21796                                                 break
21797                                                 ;;
21798                                         esac
21799                                         if test -n "$cf_item"; then
21800                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21801                                         fi
21802                                 else
21803                                         break
21804                                 fi
21805                         done
21806                 else
21807                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21808                 fi
21809
21810                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21811                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21812                         $cf_dir/Makefile >$cf_dir/Makefile.out
21813                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21814
21815                 $AWK -f $srcdir/mk-0th.awk \
21816                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21817                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21818
21819                 for cf_subset in $cf_subsets
21820                 do
21821                         cf_subdirs=
21822                         for cf_item in $cf_LIST_MODELS
21823                         do
21824                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21825
21826 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21827
21828         case $cf_item in #(vi
21829         libtool) #(vi
21830                 cf_suffix='.la'
21831                 cf_depsuf=$cf_suffix
21832                 ;;
21833         normal) #(vi
21834                 cf_suffix='.a'
21835                 cf_depsuf=$cf_suffix
21836                 ;;
21837         debug) #(vi
21838                 cf_suffix='_g.a'
21839                 cf_depsuf=$cf_suffix
21840                 ;;
21841         profile) #(vi
21842                 cf_suffix='_p.a'
21843                 cf_depsuf=$cf_suffix
21844                 ;;
21845         shared) #(vi
21846                 case $cf_cv_system_name in
21847                 aix[5-7]*) #(vi
21848                         cf_suffix='.a'
21849                         cf_depsuf=$cf_suffix
21850                         ;;
21851                 cygwin*|mingw*) #(vi
21852                         cf_suffix='.dll'
21853                         cf_depsuf='.dll.a'
21854                         ;;
21855                 darwin*) #(vi
21856                         cf_suffix='.dylib'
21857                         cf_depsuf=$cf_suffix
21858                         ;;
21859                 hpux*) #(vi
21860                         case $target in
21861                         ia64*) #(vi
21862                                 cf_suffix='.so'
21863                                 cf_depsuf=$cf_suffix
21864                                 ;;
21865                         *) #(vi
21866                                 cf_suffix='.sl'
21867                                 cf_depsuf=$cf_suffix
21868                                 ;;
21869                         esac
21870                         ;;
21871                 *)      cf_suffix='.so'
21872                         cf_depsuf=$cf_suffix
21873                         ;;
21874                 esac
21875         esac
21876         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21877         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21878
21879         case $cf_item in
21880         libtool) cf_subdir='obj_lo'  ;;
21881         normal)  cf_subdir='objects' ;;
21882         debug)   cf_subdir='obj_g' ;;
21883         profile) cf_subdir='obj_p' ;;
21884         shared)
21885                 case $cf_cv_system_name in #(vi
21886                 cygwin) #(vi
21887                         cf_subdir='objects' ;;
21888                 *)
21889                         cf_subdir='obj_s' ;;
21890                 esac
21891         esac
21892
21893                         # Test for case where we build libtinfo with a different name.
21894                         cf_libname=$cf_dir
21895                         if test $cf_dir = ncurses ; then
21896                                 case $cf_subset in
21897                                 *base*)
21898                                         cf_libname=${cf_libname}$LIB_SUFFIX
21899                                         ;;
21900                                 *termlib*)
21901                                         cf_libname=$TINFO_LIB_SUFFIX
21902                                         ;;
21903                                 ticlib*)
21904                                         cf_libname=$TICS_LIB_SUFFIX
21905                                         ;;
21906                                 esac
21907                         else
21908                                 cf_libname=${cf_libname}$LIB_SUFFIX
21909                         fi
21910                         if test -n "${DFT_ARG_SUFFIX}" ; then
21911                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21912                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21913                         fi
21914
21915                         # These dependencies really are for development, not
21916                         # builds, but they are useful in porting, too.
21917                         cf_depend="../include/ncurses_cfg.h"
21918                         if test "$srcdir" = "."; then
21919                                 cf_reldir="."
21920                         else
21921                                 cf_reldir="\${srcdir}"
21922                         fi
21923
21924                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21925                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21926                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21927                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21928                         fi
21929
21930                         cf_dir_suffix=
21931                         old_cf_suffix="$cf_suffix"
21932                         if test "$cf_cv_shlib_version_infix" = yes ; then
21933                         if test -n "$LIB_SUFFIX" ; then
21934                                 case $LIB_SUFFIX in
21935                                 tw*)
21936                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21937                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21938                                         cf_dir_suffix=tw
21939                                         ;;
21940                                 t*)
21941                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21942                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21943                                         cf_dir_suffix=t
21944                                         ;;
21945                                 w*)
21946                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21947                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21948                                         cf_dir_suffix=w
21949                                         ;;
21950                                 esac
21951                         fi
21952                         fi
21953
21954                         $AWK -f $srcdir/mk-1st.awk \
21955                                 name=${cf_libname}${cf_dir_suffix} \
21956                                 traces=$LIB_TRACING \
21957                                 MODEL=$cf_ITEM \
21958                                 model=$cf_subdir \
21959                                 prefix=$cf_prefix \
21960                                 suffix=$cf_suffix \
21961                                 subset=$cf_subset \
21962                                 driver=$cf_cv_term_driver \
21963                                 SymLink="$LN_S" \
21964                                 TermlibRoot=$TINFO_NAME \
21965                                 TermlibSuffix=$TINFO_SUFFIX \
21966                                 ShlibVer=$cf_cv_shlib_version \
21967                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21968                                 ReLink=${cf_cv_do_relink:-no} \
21969                                 DoLinks=$cf_cv_do_symlinks \
21970                                 rmSoLocs=$cf_cv_rm_so_locs \
21971                                 ldconfig="$LDCONFIG" \
21972                                 overwrite=$WITH_OVERWRITE \
21973                                 depend="$cf_depend" \
21974                                 host="$host" \
21975                                 libtool_version="$LIBTOOL_VERSION" \
21976                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21977
21978                         cf_suffix="$old_cf_suffix"
21979
21980                         for cf_subdir2 in $cf_subdirs lib
21981                         do
21982                                 test $cf_subdir = $cf_subdir2 && break
21983                         done
21984                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21985                         $AWK -f $srcdir/mk-2nd.awk \
21986                                 name=$cf_dir \
21987                                 traces=$LIB_TRACING \
21988                                 MODEL=$cf_ITEM \
21989                                 model=$cf_subdir \
21990                                 subset=$cf_subset \
21991                                 srcdir=$srcdir \
21992                                 echo=$WITH_ECHO \
21993                                 crenames=$cf_cv_prog_CC_c_o \
21994                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21995                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21996                         cf_subdirs="$cf_subdirs $cf_subdir"
21997                         done
21998                 done
21999         fi
22000
22001         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
22002 done
22003
22004 for cf_dir in $SRC_SUBDIRS
22005 do
22006         if test ! -d $srcdir/$cf_dir ; then
22007                 continue
22008         fi
22009
22010         if test -f $cf_dir/Makefile ; then
22011                 case "$cf_dir" in
22012                 Ada95) #(vi
22013                         echo 'libs \' >> Makefile
22014                         echo 'install.libs \' >> Makefile
22015                         echo 'uninstall.libs ::' >> Makefile
22016                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
22017                         ;;
22018                 esac
22019         fi
22020
22021         if test -f $srcdir/$cf_dir/modules; then
22022                 echo >> Makefile
22023                 if test -f $srcdir/$cf_dir/headers; then
22024 cat >> Makefile <<CF_EOF
22025 install.includes \\
22026 uninstall.includes \\
22027 CF_EOF
22028                 fi
22029 if test "$cf_dir" != "c++" ; then
22030 echo 'lint \' >> Makefile
22031 fi
22032 cat >> Makefile <<CF_EOF
22033 libs \\
22034 lintlib \\
22035 install.libs \\
22036 uninstall.libs \\
22037 install.$cf_dir \\
22038 uninstall.$cf_dir ::
22039         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22040 CF_EOF
22041         elif test -f $srcdir/$cf_dir/headers; then
22042 cat >> Makefile <<CF_EOF
22043
22044 libs \\
22045 install.libs \\
22046 uninstall.libs \\
22047 install.includes \\
22048 uninstall.includes ::
22049         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22050 CF_EOF
22051 fi
22052 done
22053
22054 cat >> Makefile <<CF_EOF
22055
22056 install.libs uninstall.libs \\
22057 install.data uninstall.data ::
22058 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
22059 CF_EOF
22060
22061 if test "x$cf_with_manpages" = xyes; then
22062 cat >> Makefile <<CF_EOF
22063
22064 install.man \\
22065 uninstall.man ::
22066         cd man && \${MAKE} \${CF_MFLAGS} \$@
22067 CF_EOF
22068 fi
22069
22070 cat >> Makefile <<CF_EOF
22071
22072 distclean ::
22073         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22074         rm -f headers.sh headers.sed mk_shared_lib.sh
22075         rm -f edit_man.* man_alias.*
22076         rm -rf \${DIRS_TO_MAKE}
22077 CF_EOF
22078
22079 # Special case: tack's manpage lives in its own directory.
22080 if test "x$cf_with_manpages" = xyes; then
22081 if test -d tack ; then
22082 if test -f $srcdir/$tack.h; then
22083 cat >> Makefile <<CF_EOF
22084
22085 install.man \\
22086 uninstall.man ::
22087         cd tack && \${MAKE} \${CF_MFLAGS} \$@
22088 CF_EOF
22089 fi
22090 fi
22091 fi
22092
22093 rm -f headers.sed headers.sh
22094
22095 echo creating headers.sh
22096 cat >headers.sh <<CF_EOF
22097 #! /bin/sh
22098 # This shell script is generated by the 'configure' script.  It is invoked in a
22099 # subdirectory of the build tree.  It generates a sed-script in the parent
22100 # directory that is used to adjust includes for header files that reside in a
22101 # subdirectory of /usr/include, etc.
22102 PRG=""
22103 while test \$# != 3
22104 do
22105 PRG="\$PRG \$1"; shift
22106 done
22107 DST=\$1
22108 REF=\$2
22109 SRC=\$3
22110 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22111 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22112 echo installing \$SRC in \$DST
22113 CF_EOF
22114
22115 if test $WITH_CURSES_H = yes; then
22116         cat >>headers.sh <<CF_EOF
22117 case \$DST in
22118 /*/include/*)
22119         END=\`basename \$DST\`
22120         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22121         do
22122                 NAME=\`basename \$i\`
22123                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22124         done
22125         ;;
22126 *)
22127         echo "" >> \$TMPSED
22128         ;;
22129 esac
22130 CF_EOF
22131
22132 else
22133         cat >>headers.sh <<CF_EOF
22134 case \$DST in
22135 /*/include/*)
22136         END=\`basename \$DST\`
22137         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22138         do
22139                 NAME=\`basename \$i\`
22140                 if test "\$NAME" = "curses.h"
22141                 then
22142                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22143                         NAME=ncurses.h
22144                 fi
22145                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22146         done
22147         ;;
22148 *)
22149         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22150         ;;
22151 esac
22152 CF_EOF
22153 fi
22154 cat >>headers.sh <<CF_EOF
22155 rm -f \$TMPSRC
22156 sed -f \$TMPSED \$SRC > \$TMPSRC
22157 NAME=\`basename \$SRC\`
22158 CF_EOF
22159 if test $WITH_CURSES_H != yes; then
22160         cat >>headers.sh <<CF_EOF
22161 test "\$NAME" = "curses.h" && NAME=ncurses.h
22162 CF_EOF
22163 fi
22164 cat >>headers.sh <<CF_EOF
22165 # Just in case someone gzip'd manpages, remove the conflicting copy.
22166 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22167
22168 eval \$PRG \$TMPSRC \$DST/\$NAME
22169 rm -f \$TMPSRC \$TMPSED
22170 CF_EOF
22171
22172 chmod 0755 headers.sh
22173
22174 for cf_dir in $SRC_SUBDIRS
22175 do
22176         if test ! -d $srcdir/$cf_dir ; then
22177                 continue
22178         fi
22179
22180         if test -f $srcdir/$cf_dir/headers; then
22181                 $AWK -f $srcdir/mk-hdr.awk \
22182                         subset="$LIB_SUBSETS" \
22183                         compat="$WITH_CURSES_H" \
22184                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22185         fi
22186
22187         if test -f $srcdir/$cf_dir/modules; then
22188                 if test "$cf_dir" != "c++" ; then
22189                         cat >>$cf_dir/Makefile <<"CF_EOF"
22190 depend : ${AUTO_SRC}
22191         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22192
22193 # DO NOT DELETE THIS LINE -- make depend depends on it.
22194 CF_EOF
22195                 fi
22196         fi
22197 done
22198
22199 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22200 if test -z "$USE_OLD_MAKERULES" ; then
22201         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22202 fi
22203 fi
22204  ;;
22205   esac
22206 done
22207 EOF
22208
22209 cat >>$CONFIG_STATUS <<\EOF
22210
22211 { (exit 0); exit 0; }
22212 EOF
22213 chmod +x $CONFIG_STATUS
22214 ac_clean_files=$ac_clean_files_save
22215
22216 # configure is writing to config.log, and then calls config.status.
22217 # config.status does its own redirection, appending to config.log.
22218 # Unfortunately, on DOS this fails, as config.log is still kept open
22219 # by configure, so config.status won't be able to write to it; its
22220 # output is simply discarded.  So we exec the FD to /dev/null,
22221 # effectively closing config.log, so it can be properly (re)opened and
22222 # appended to by config.status.  When coming back to configure, we
22223 # need to make the FD available again.
22224 if test "$no_create" != yes; then
22225   ac_cs_success=:
22226   exec 5>/dev/null
22227   $SHELL $CONFIG_STATUS || ac_cs_success=false
22228   exec 5>>config.log
22229   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22230   # would make configure fail if this is the last instruction.
22231   $ac_cs_success || { (exit 1); exit 1; }
22232 fi
22233 ${MAKE:-make} preinstall