]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20120804
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.552 .
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         echo "$as_me:3577: checking if we should install .pc files for $PKG_CONFIG" >&5
3578 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3579
3580 # Check whether --enable-pc-files or --disable-pc-files was given.
3581 if test "${enable_pc_files+set}" = set; then
3582   enableval="$enable_pc_files"
3583   enable_pc_files=$enableval
3584 else
3585   enable_pc_files=no
3586 fi;
3587         echo "$as_me:3587: result: $enable_pc_files" >&5
3588 echo "${ECHO_T}$enable_pc_files" >&6
3589         if test "$enable_pc_files" != no
3590         then
3591
3592 if test "x$prefix" != xNONE; then
3593   cf_path_syntax="$prefix"
3594 else
3595   cf_path_syntax="$ac_default_prefix"
3596 fi
3597
3598 case ".$PKG_CONFIG_LIBDIR" in #(vi
3599 .\$\(*\)*|.\'*\'*) #(vi
3600   ;;
3601 ..|./*|.\\*) #(vi
3602   ;;
3603 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3604   ;;
3605 .\${*prefix}*|.\${*dir}*) #(vi
3606   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3607   case ".$PKG_CONFIG_LIBDIR" in #(vi
3608   .NONE/*)
3609     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3610     ;;
3611   esac
3612   ;; #(vi
3613 .no|.NONE/*)
3614   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3615   ;;
3616 *)
3617   { { echo "$as_me:3617: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3618 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3619    { (exit 1); exit 1; }; }
3620   ;;
3621 esac
3622
3623         fi
3624 else
3625         enable_pc_files=no
3626 fi
3627
3628 echo "$as_me:3628: checking if we should assume mixed-case filenames" >&5
3629 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3630
3631 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3632 if test "${enable_mixed_case+set}" = set; then
3633   enableval="$enable_mixed_case"
3634   enable_mixedcase=$enableval
3635 else
3636   enable_mixedcase=auto
3637 fi;
3638 echo "$as_me:3638: result: $enable_mixedcase" >&5
3639 echo "${ECHO_T}$enable_mixedcase" >&6
3640 if test "$enable_mixedcase" = "auto" ; then
3641
3642 echo "$as_me:3642: checking if filesystem supports mixed-case filenames" >&5
3643 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3644 if test "${cf_cv_mixedcase+set}" = set; then
3645   echo $ECHO_N "(cached) $ECHO_C" >&6
3646 else
3647
3648 if test "$cross_compiling" = yes ; then
3649         case $target_alias in #(vi
3650         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3651                 cf_cv_mixedcase=no
3652                 ;;
3653         *)
3654                 cf_cv_mixedcase=yes
3655                 ;;
3656         esac
3657 else
3658         rm -f conftest CONFTEST
3659         echo test >conftest
3660         if test -f CONFTEST ; then
3661                 cf_cv_mixedcase=no
3662         else
3663                 cf_cv_mixedcase=yes
3664         fi
3665         rm -f conftest CONFTEST
3666 fi
3667
3668 fi
3669 echo "$as_me:3669: result: $cf_cv_mixedcase" >&5
3670 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3671 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3672 #define MIXEDCASE_FILENAMES 1
3673 EOF
3674
3675 else
3676     cf_cv_mixedcase=$enable_mixedcase
3677     if test "$enable_mixedcase" = "yes" ; then
3678         cat >>confdefs.h <<\EOF
3679 #define MIXEDCASE_FILENAMES 1
3680 EOF
3681
3682     fi
3683 fi
3684
3685 # do this after mixed-case option (tags/TAGS is not as important as tic).
3686 echo "$as_me:3686: checking whether ${MAKE-make} sets \${MAKE}" >&5
3687 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3688 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3689 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3690   echo $ECHO_N "(cached) $ECHO_C" >&6
3691 else
3692   cat >conftest.make <<\EOF
3693 all:
3694         @echo 'ac_maketemp="${MAKE}"'
3695 EOF
3696 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3697 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3698 if test -n "$ac_maketemp"; then
3699   eval ac_cv_prog_make_${ac_make}_set=yes
3700 else
3701   eval ac_cv_prog_make_${ac_make}_set=no
3702 fi
3703 rm -f conftest.make
3704 fi
3705 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3706   echo "$as_me:3706: result: yes" >&5
3707 echo "${ECHO_T}yes" >&6
3708   SET_MAKE=
3709 else
3710   echo "$as_me:3710: result: no" >&5
3711 echo "${ECHO_T}no" >&6
3712   SET_MAKE="MAKE=${MAKE-make}"
3713 fi
3714
3715 for ac_prog in exctags ctags
3716 do
3717   # Extract the first word of "$ac_prog", so it can be a program name with args.
3718 set dummy $ac_prog; ac_word=$2
3719 echo "$as_me:3719: checking for $ac_word" >&5
3720 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3721 if test "${ac_cv_prog_CTAGS+set}" = set; then
3722   echo $ECHO_N "(cached) $ECHO_C" >&6
3723 else
3724   if test -n "$CTAGS"; then
3725   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3726 else
3727   ac_save_IFS=$IFS; IFS=$ac_path_separator
3728 ac_dummy="$PATH"
3729 for ac_dir in $ac_dummy; do
3730   IFS=$ac_save_IFS
3731   test -z "$ac_dir" && ac_dir=.
3732   $as_executable_p "$ac_dir/$ac_word" || continue
3733 ac_cv_prog_CTAGS="$ac_prog"
3734 echo "$as_me:3734: found $ac_dir/$ac_word" >&5
3735 break
3736 done
3737
3738 fi
3739 fi
3740 CTAGS=$ac_cv_prog_CTAGS
3741 if test -n "$CTAGS"; then
3742   echo "$as_me:3742: result: $CTAGS" >&5
3743 echo "${ECHO_T}$CTAGS" >&6
3744 else
3745   echo "$as_me:3745: result: no" >&5
3746 echo "${ECHO_T}no" >&6
3747 fi
3748
3749   test -n "$CTAGS" && break
3750 done
3751
3752 for ac_prog in exetags etags
3753 do
3754   # Extract the first word of "$ac_prog", so it can be a program name with args.
3755 set dummy $ac_prog; ac_word=$2
3756 echo "$as_me:3756: checking for $ac_word" >&5
3757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758 if test "${ac_cv_prog_ETAGS+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$ETAGS"; then
3762   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3763 else
3764   ac_save_IFS=$IFS; IFS=$ac_path_separator
3765 ac_dummy="$PATH"
3766 for ac_dir in $ac_dummy; do
3767   IFS=$ac_save_IFS
3768   test -z "$ac_dir" && ac_dir=.
3769   $as_executable_p "$ac_dir/$ac_word" || continue
3770 ac_cv_prog_ETAGS="$ac_prog"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775 fi
3776 fi
3777 ETAGS=$ac_cv_prog_ETAGS
3778 if test -n "$ETAGS"; then
3779   echo "$as_me:3779: result: $ETAGS" >&5
3780 echo "${ECHO_T}$ETAGS" >&6
3781 else
3782   echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784 fi
3785
3786   test -n "$ETAGS" && break
3787 done
3788
3789 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3790 set dummy ${CTAGS:-ctags}; ac_word=$2
3791 echo "$as_me:3791: checking for $ac_word" >&5
3792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3793 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796   if test -n "$MAKE_LOWER_TAGS"; then
3797   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3798 else
3799   ac_save_IFS=$IFS; IFS=$ac_path_separator
3800 ac_dummy="$PATH"
3801 for ac_dir in $ac_dummy; do
3802   IFS=$ac_save_IFS
3803   test -z "$ac_dir" && ac_dir=.
3804   $as_executable_p "$ac_dir/$ac_word" || continue
3805 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3806 echo "$as_me:3806: found $ac_dir/$ac_word" >&5
3807 break
3808 done
3809
3810   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3811 fi
3812 fi
3813 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3814 if test -n "$MAKE_LOWER_TAGS"; then
3815   echo "$as_me:3815: result: $MAKE_LOWER_TAGS" >&5
3816 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3817 else
3818   echo "$as_me:3818: result: no" >&5
3819 echo "${ECHO_T}no" >&6
3820 fi
3821
3822 if test "$cf_cv_mixedcase" = yes ; then
3823         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3824 set dummy ${ETAGS:-etags}; ac_word=$2
3825 echo "$as_me:3825: checking for $ac_word" >&5
3826 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3827 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3828   echo $ECHO_N "(cached) $ECHO_C" >&6
3829 else
3830   if test -n "$MAKE_UPPER_TAGS"; then
3831   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3832 else
3833   ac_save_IFS=$IFS; IFS=$ac_path_separator
3834 ac_dummy="$PATH"
3835 for ac_dir in $ac_dummy; do
3836   IFS=$ac_save_IFS
3837   test -z "$ac_dir" && ac_dir=.
3838   $as_executable_p "$ac_dir/$ac_word" || continue
3839 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3840 echo "$as_me:3840: found $ac_dir/$ac_word" >&5
3841 break
3842 done
3843
3844   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3845 fi
3846 fi
3847 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3848 if test -n "$MAKE_UPPER_TAGS"; then
3849   echo "$as_me:3849: result: $MAKE_UPPER_TAGS" >&5
3850 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3851 else
3852   echo "$as_me:3852: result: no" >&5
3853 echo "${ECHO_T}no" >&6
3854 fi
3855
3856 else
3857         MAKE_UPPER_TAGS=no
3858 fi
3859
3860 if test "$MAKE_UPPER_TAGS" = yes ; then
3861         MAKE_UPPER_TAGS=
3862 else
3863         MAKE_UPPER_TAGS="#"
3864 fi
3865
3866 if test "$MAKE_LOWER_TAGS" = yes ; then
3867         MAKE_LOWER_TAGS=
3868 else
3869         MAKE_LOWER_TAGS="#"
3870 fi
3871
3872 echo "$as_me:3872: checking for makeflags variable" >&5
3873 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3874 if test "${cf_cv_makeflags+set}" = set; then
3875   echo $ECHO_N "(cached) $ECHO_C" >&6
3876 else
3877
3878         cf_cv_makeflags=''
3879         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3880         do
3881                 cat >cf_makeflags.tmp <<CF_EOF
3882 SHELL = /bin/sh
3883 all :
3884         @ echo '.$cf_option'
3885 CF_EOF
3886                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3887                 case "$cf_result" in
3888                 .*k)
3889                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3890                         case "$cf_result" in
3891                         .*CC=*) cf_cv_makeflags=
3892                                 ;;
3893                         *)      cf_cv_makeflags=$cf_option
3894                                 ;;
3895                         esac
3896                         break
3897                         ;;
3898                 .-)     ;;
3899                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3900                         ;;
3901                 esac
3902         done
3903         rm -f cf_makeflags.tmp
3904
3905 fi
3906 echo "$as_me:3906: result: $cf_cv_makeflags" >&5
3907 echo "${ECHO_T}$cf_cv_makeflags" >&6
3908
3909 if test -n "$ac_tool_prefix"; then
3910   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3911 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3912 echo "$as_me:3912: checking for $ac_word" >&5
3913 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3914 if test "${ac_cv_prog_RANLIB+set}" = set; then
3915   echo $ECHO_N "(cached) $ECHO_C" >&6
3916 else
3917   if test -n "$RANLIB"; then
3918   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3919 else
3920   ac_save_IFS=$IFS; IFS=$ac_path_separator
3921 ac_dummy="$PATH"
3922 for ac_dir in $ac_dummy; do
3923   IFS=$ac_save_IFS
3924   test -z "$ac_dir" && ac_dir=.
3925   $as_executable_p "$ac_dir/$ac_word" || continue
3926 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3927 echo "$as_me:3927: found $ac_dir/$ac_word" >&5
3928 break
3929 done
3930
3931 fi
3932 fi
3933 RANLIB=$ac_cv_prog_RANLIB
3934 if test -n "$RANLIB"; then
3935   echo "$as_me:3935: result: $RANLIB" >&5
3936 echo "${ECHO_T}$RANLIB" >&6
3937 else
3938   echo "$as_me:3938: result: no" >&5
3939 echo "${ECHO_T}no" >&6
3940 fi
3941
3942 fi
3943 if test -z "$ac_cv_prog_RANLIB"; then
3944   ac_ct_RANLIB=$RANLIB
3945   # Extract the first word of "ranlib", so it can be a program name with args.
3946 set dummy ranlib; ac_word=$2
3947 echo "$as_me:3947: checking for $ac_word" >&5
3948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3949 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3950   echo $ECHO_N "(cached) $ECHO_C" >&6
3951 else
3952   if test -n "$ac_ct_RANLIB"; then
3953   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3954 else
3955   ac_save_IFS=$IFS; IFS=$ac_path_separator
3956 ac_dummy="$PATH"
3957 for ac_dir in $ac_dummy; do
3958   IFS=$ac_save_IFS
3959   test -z "$ac_dir" && ac_dir=.
3960   $as_executable_p "$ac_dir/$ac_word" || continue
3961 ac_cv_prog_ac_ct_RANLIB="ranlib"
3962 echo "$as_me:3962: found $ac_dir/$ac_word" >&5
3963 break
3964 done
3965
3966   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3967 fi
3968 fi
3969 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3970 if test -n "$ac_ct_RANLIB"; then
3971   echo "$as_me:3971: result: $ac_ct_RANLIB" >&5
3972 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3973 else
3974   echo "$as_me:3974: result: no" >&5
3975 echo "${ECHO_T}no" >&6
3976 fi
3977
3978   RANLIB=$ac_ct_RANLIB
3979 else
3980   RANLIB="$ac_cv_prog_RANLIB"
3981 fi
3982
3983 if test -n "$ac_tool_prefix"; then
3984   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3985 set dummy ${ac_tool_prefix}ld; ac_word=$2
3986 echo "$as_me:3986: checking for $ac_word" >&5
3987 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3988 if test "${ac_cv_prog_LD+set}" = set; then
3989   echo $ECHO_N "(cached) $ECHO_C" >&6
3990 else
3991   if test -n "$LD"; then
3992   ac_cv_prog_LD="$LD" # Let the user override the test.
3993 else
3994   ac_save_IFS=$IFS; IFS=$ac_path_separator
3995 ac_dummy="$PATH"
3996 for ac_dir in $ac_dummy; do
3997   IFS=$ac_save_IFS
3998   test -z "$ac_dir" && ac_dir=.
3999   $as_executable_p "$ac_dir/$ac_word" || continue
4000 ac_cv_prog_LD="${ac_tool_prefix}ld"
4001 echo "$as_me:4001: found $ac_dir/$ac_word" >&5
4002 break
4003 done
4004
4005 fi
4006 fi
4007 LD=$ac_cv_prog_LD
4008 if test -n "$LD"; then
4009   echo "$as_me:4009: result: $LD" >&5
4010 echo "${ECHO_T}$LD" >&6
4011 else
4012   echo "$as_me:4012: result: no" >&5
4013 echo "${ECHO_T}no" >&6
4014 fi
4015
4016 fi
4017 if test -z "$ac_cv_prog_LD"; then
4018   ac_ct_LD=$LD
4019   # Extract the first word of "ld", so it can be a program name with args.
4020 set dummy ld; ac_word=$2
4021 echo "$as_me:4021: checking for $ac_word" >&5
4022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4023 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4024   echo $ECHO_N "(cached) $ECHO_C" >&6
4025 else
4026   if test -n "$ac_ct_LD"; then
4027   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4028 else
4029   ac_save_IFS=$IFS; IFS=$ac_path_separator
4030 ac_dummy="$PATH"
4031 for ac_dir in $ac_dummy; do
4032   IFS=$ac_save_IFS
4033   test -z "$ac_dir" && ac_dir=.
4034   $as_executable_p "$ac_dir/$ac_word" || continue
4035 ac_cv_prog_ac_ct_LD="ld"
4036 echo "$as_me:4036: found $ac_dir/$ac_word" >&5
4037 break
4038 done
4039
4040   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4041 fi
4042 fi
4043 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4044 if test -n "$ac_ct_LD"; then
4045   echo "$as_me:4045: result: $ac_ct_LD" >&5
4046 echo "${ECHO_T}$ac_ct_LD" >&6
4047 else
4048   echo "$as_me:4048: result: no" >&5
4049 echo "${ECHO_T}no" >&6
4050 fi
4051
4052   LD=$ac_ct_LD
4053 else
4054   LD="$ac_cv_prog_LD"
4055 fi
4056
4057 if test -n "$ac_tool_prefix"; then
4058   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4059 set dummy ${ac_tool_prefix}ar; ac_word=$2
4060 echo "$as_me:4060: checking for $ac_word" >&5
4061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4062 if test "${ac_cv_prog_AR+set}" = set; then
4063   echo $ECHO_N "(cached) $ECHO_C" >&6
4064 else
4065   if test -n "$AR"; then
4066   ac_cv_prog_AR="$AR" # Let the user override the test.
4067 else
4068   ac_save_IFS=$IFS; IFS=$ac_path_separator
4069 ac_dummy="$PATH"
4070 for ac_dir in $ac_dummy; do
4071   IFS=$ac_save_IFS
4072   test -z "$ac_dir" && ac_dir=.
4073   $as_executable_p "$ac_dir/$ac_word" || continue
4074 ac_cv_prog_AR="${ac_tool_prefix}ar"
4075 echo "$as_me:4075: found $ac_dir/$ac_word" >&5
4076 break
4077 done
4078
4079 fi
4080 fi
4081 AR=$ac_cv_prog_AR
4082 if test -n "$AR"; then
4083   echo "$as_me:4083: result: $AR" >&5
4084 echo "${ECHO_T}$AR" >&6
4085 else
4086   echo "$as_me:4086: result: no" >&5
4087 echo "${ECHO_T}no" >&6
4088 fi
4089
4090 fi
4091 if test -z "$ac_cv_prog_AR"; then
4092   ac_ct_AR=$AR
4093   # Extract the first word of "ar", so it can be a program name with args.
4094 set dummy ar; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4098   echo $ECHO_N "(cached) $ECHO_C" >&6
4099 else
4100   if test -n "$ac_ct_AR"; then
4101   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4102 else
4103   ac_save_IFS=$IFS; IFS=$ac_path_separator
4104 ac_dummy="$PATH"
4105 for ac_dir in $ac_dummy; do
4106   IFS=$ac_save_IFS
4107   test -z "$ac_dir" && ac_dir=.
4108   $as_executable_p "$ac_dir/$ac_word" || continue
4109 ac_cv_prog_ac_ct_AR="ar"
4110 echo "$as_me:4110: found $ac_dir/$ac_word" >&5
4111 break
4112 done
4113
4114   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4115 fi
4116 fi
4117 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4118 if test -n "$ac_ct_AR"; then
4119   echo "$as_me:4119: result: $ac_ct_AR" >&5
4120 echo "${ECHO_T}$ac_ct_AR" >&6
4121 else
4122   echo "$as_me:4122: result: no" >&5
4123 echo "${ECHO_T}no" >&6
4124 fi
4125
4126   AR=$ac_ct_AR
4127 else
4128   AR="$ac_cv_prog_AR"
4129 fi
4130
4131 if test -n "$ac_tool_prefix"; then
4132   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4133 set dummy ${ac_tool_prefix}ar; ac_word=$2
4134 echo "$as_me:4134: checking for $ac_word" >&5
4135 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4136 if test "${ac_cv_prog_AR+set}" = set; then
4137   echo $ECHO_N "(cached) $ECHO_C" >&6
4138 else
4139   if test -n "$AR"; then
4140   ac_cv_prog_AR="$AR" # Let the user override the test.
4141 else
4142   ac_save_IFS=$IFS; IFS=$ac_path_separator
4143 ac_dummy="$PATH"
4144 for ac_dir in $ac_dummy; do
4145   IFS=$ac_save_IFS
4146   test -z "$ac_dir" && ac_dir=.
4147   $as_executable_p "$ac_dir/$ac_word" || continue
4148 ac_cv_prog_AR="${ac_tool_prefix}ar"
4149 echo "$as_me:4149: found $ac_dir/$ac_word" >&5
4150 break
4151 done
4152
4153 fi
4154 fi
4155 AR=$ac_cv_prog_AR
4156 if test -n "$AR"; then
4157   echo "$as_me:4157: result: $AR" >&5
4158 echo "${ECHO_T}$AR" >&6
4159 else
4160   echo "$as_me:4160: result: no" >&5
4161 echo "${ECHO_T}no" >&6
4162 fi
4163
4164 fi
4165 if test -z "$ac_cv_prog_AR"; then
4166   ac_ct_AR=$AR
4167   # Extract the first word of "ar", so it can be a program name with args.
4168 set dummy ar; ac_word=$2
4169 echo "$as_me:4169: checking for $ac_word" >&5
4170 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4171 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4172   echo $ECHO_N "(cached) $ECHO_C" >&6
4173 else
4174   if test -n "$ac_ct_AR"; then
4175   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4176 else
4177   ac_save_IFS=$IFS; IFS=$ac_path_separator
4178 ac_dummy="$PATH"
4179 for ac_dir in $ac_dummy; do
4180   IFS=$ac_save_IFS
4181   test -z "$ac_dir" && ac_dir=.
4182   $as_executable_p "$ac_dir/$ac_word" || continue
4183 ac_cv_prog_ac_ct_AR="ar"
4184 echo "$as_me:4184: found $ac_dir/$ac_word" >&5
4185 break
4186 done
4187
4188   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4189 fi
4190 fi
4191 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4192 if test -n "$ac_ct_AR"; then
4193   echo "$as_me:4193: result: $ac_ct_AR" >&5
4194 echo "${ECHO_T}$ac_ct_AR" >&6
4195 else
4196   echo "$as_me:4196: result: no" >&5
4197 echo "${ECHO_T}no" >&6
4198 fi
4199
4200   AR=$ac_ct_AR
4201 else
4202   AR="$ac_cv_prog_AR"
4203 fi
4204
4205 echo "$as_me:4205: checking for options to update archives" >&5
4206 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4207 if test "${cf_cv_ar_flags+set}" = set; then
4208   echo $ECHO_N "(cached) $ECHO_C" >&6
4209 else
4210
4211         cf_cv_ar_flags=unknown
4212         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4213         do
4214
4215                 # check if $ARFLAGS already contains this choice
4216                 if test "x$ARFLAGS" != "x" ; then
4217                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4218                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4219                                 cf_cv_ar_flags=
4220                                 break
4221                         fi
4222                 fi
4223
4224                 rm -f conftest.$ac_cv_objext
4225                 rm -f conftest.a
4226
4227                 cat >conftest.$ac_ext <<EOF
4228 #line 4228 "configure"
4229 int     testdata[3] = { 123, 456, 789 };
4230 EOF
4231                 if { (eval echo "$as_me:4231: \"$ac_compile\"") >&5
4232   (eval $ac_compile) 2>&5
4233   ac_status=$?
4234   echo "$as_me:4234: \$? = $ac_status" >&5
4235   (exit $ac_status); } ; then
4236                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4237                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4238                         if test -f conftest.a ; then
4239                                 cf_cv_ar_flags=$cf_ar_flags
4240                                 break
4241                         fi
4242                 else
4243                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4244
4245 echo "${as_me:-configure}:4245: testing cannot compile test-program ..." 1>&5
4246
4247                         break
4248                 fi
4249         done
4250         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4251
4252 fi
4253 echo "$as_me:4253: result: $cf_cv_ar_flags" >&5
4254 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4255
4256 if test -n "$ARFLAGS" ; then
4257         if test -n "$cf_cv_ar_flags" ; then
4258                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4259         fi
4260 else
4261         ARFLAGS=$cf_cv_ar_flags
4262 fi
4263
4264 echo "$as_me:4264: checking if you have specified an install-prefix" >&5
4265 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4266
4267 # Check whether --with-install-prefix or --without-install-prefix was given.
4268 if test "${with_install_prefix+set}" = set; then
4269   withval="$with_install_prefix"
4270   case "$withval" in #(vi
4271         yes|no) #(vi
4272                 ;;
4273         *)      DESTDIR="$withval"
4274                 ;;
4275         esac
4276 fi;
4277 echo "$as_me:4277: result: $DESTDIR" >&5
4278 echo "${ECHO_T}$DESTDIR" >&6
4279
4280 ###############################################################################
4281
4282 # If we're cross-compiling, allow the user to override the tools and their
4283 # options.  The configure script is oriented toward identifying the host
4284 # compiler, etc., but we need a build compiler to generate parts of the source.
4285
4286 if test "$cross_compiling" = yes ; then
4287
4288         # defaults that we might want to override
4289         : ${BUILD_CFLAGS:=''}
4290         : ${BUILD_CPPFLAGS:=''}
4291         : ${BUILD_LDFLAGS:=''}
4292         : ${BUILD_LIBS:=''}
4293         : ${BUILD_EXEEXT:='$x'}
4294         : ${BUILD_OBJEXT:='o'}
4295
4296 # Check whether --with-build-cc or --without-build-cc was given.
4297 if test "${with_build_cc+set}" = set; then
4298   withval="$with_build_cc"
4299   BUILD_CC="$withval"
4300 else
4301   for ac_prog in gcc cc cl
4302 do
4303   # Extract the first word of "$ac_prog", so it can be a program name with args.
4304 set dummy $ac_prog; ac_word=$2
4305 echo "$as_me:4305: checking for $ac_word" >&5
4306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4307 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4308   echo $ECHO_N "(cached) $ECHO_C" >&6
4309 else
4310   if test -n "$BUILD_CC"; then
4311   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4312 else
4313   ac_save_IFS=$IFS; IFS=$ac_path_separator
4314 ac_dummy="$PATH"
4315 for ac_dir in $ac_dummy; do
4316   IFS=$ac_save_IFS
4317   test -z "$ac_dir" && ac_dir=.
4318   $as_executable_p "$ac_dir/$ac_word" || continue
4319 ac_cv_prog_BUILD_CC="$ac_prog"
4320 echo "$as_me:4320: found $ac_dir/$ac_word" >&5
4321 break
4322 done
4323
4324 fi
4325 fi
4326 BUILD_CC=$ac_cv_prog_BUILD_CC
4327 if test -n "$BUILD_CC"; then
4328   echo "$as_me:4328: result: $BUILD_CC" >&5
4329 echo "${ECHO_T}$BUILD_CC" >&6
4330 else
4331   echo "$as_me:4331: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335   test -n "$BUILD_CC" && break
4336 done
4337
4338 fi;
4339         echo "$as_me:4339: checking for native build C compiler" >&5
4340 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4341         echo "$as_me:4341: result: $BUILD_CC" >&5
4342 echo "${ECHO_T}$BUILD_CC" >&6
4343
4344         echo "$as_me:4344: checking for native build C preprocessor" >&5
4345 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4346
4347 # Check whether --with-build-cpp or --without-build-cpp was given.
4348 if test "${with_build_cpp+set}" = set; then
4349   withval="$with_build_cpp"
4350   BUILD_CPP="$withval"
4351 else
4352   BUILD_CPP='${BUILD_CC} -E'
4353 fi;
4354         echo "$as_me:4354: result: $BUILD_CPP" >&5
4355 echo "${ECHO_T}$BUILD_CPP" >&6
4356
4357         echo "$as_me:4357: checking for native build C flags" >&5
4358 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4359
4360 # Check whether --with-build-cflags or --without-build-cflags was given.
4361 if test "${with_build_cflags+set}" = set; then
4362   withval="$with_build_cflags"
4363   BUILD_CFLAGS="$withval"
4364 fi;
4365         echo "$as_me:4365: result: $BUILD_CFLAGS" >&5
4366 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4367
4368         echo "$as_me:4368: checking for native build C preprocessor-flags" >&5
4369 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4370
4371 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4372 if test "${with_build_cppflags+set}" = set; then
4373   withval="$with_build_cppflags"
4374   BUILD_CPPFLAGS="$withval"
4375 fi;
4376         echo "$as_me:4376: result: $BUILD_CPPFLAGS" >&5
4377 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4378
4379         echo "$as_me:4379: checking for native build linker-flags" >&5
4380 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4381
4382 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4383 if test "${with_build_ldflags+set}" = set; then
4384   withval="$with_build_ldflags"
4385   BUILD_LDFLAGS="$withval"
4386 fi;
4387         echo "$as_me:4387: result: $BUILD_LDFLAGS" >&5
4388 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4389
4390         echo "$as_me:4390: checking for native build linker-libraries" >&5
4391 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4392
4393 # Check whether --with-build-libs or --without-build-libs was given.
4394 if test "${with_build_libs+set}" = set; then
4395   withval="$with_build_libs"
4396   BUILD_LIBS="$withval"
4397 fi;
4398         echo "$as_me:4398: result: $BUILD_LIBS" >&5
4399 echo "${ECHO_T}$BUILD_LIBS" >&6
4400
4401         # this assumes we're on Unix.
4402         BUILD_EXEEXT=
4403         BUILD_OBJEXT=o
4404
4405         : ${BUILD_CC:='${CC}'}
4406
4407         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4408                 { { echo "$as_me:4408: error: Cross-build requires two compilers.
4409 Use --with-build-cc to specify the native compiler." >&5
4410 echo "$as_me: error: Cross-build requires two compilers.
4411 Use --with-build-cc to specify the native compiler." >&2;}
4412    { (exit 1); exit 1; }; }
4413         fi
4414
4415 else
4416         : ${BUILD_CC:='${CC}'}
4417         : ${BUILD_CPP:='${CPP}'}
4418         : ${BUILD_CFLAGS:='${CFLAGS}'}
4419         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4420         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4421         : ${BUILD_LIBS:='${LIBS}'}
4422         : ${BUILD_EXEEXT:='$x'}
4423         : ${BUILD_OBJEXT:='o'}
4424 fi
4425
4426 ###############################################################################
4427
4428 ### Options to allow the user to specify the set of libraries which are used.
4429 ### Use "--without-normal --with-shared" to allow the default model to be
4430 ### shared, for example.
4431 cf_list_models=""
4432
4433 echo "$as_me:4433: checking if libtool -version-number should be used" >&5
4434 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4435
4436 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4437 if test "${enable_libtool_version+set}" = set; then
4438   enableval="$enable_libtool_version"
4439   test "$enableval" != no && enableval=yes
4440   if test "$enableval" != "yes" ; then
4441     cf_libtool_version=no
4442   else
4443     cf_libtool_version=yes
4444   fi
4445 else
4446   enableval=yes
4447   cf_libtool_version=yes
4448
4449 fi;
4450 echo "$as_me:4450: result: $cf_libtool_version" >&5
4451 echo "${ECHO_T}$cf_libtool_version" >&6
4452
4453 if test "$cf_libtool_version" = yes ; then
4454         LIBTOOL_VERSION="-version-number"
4455 else
4456         LIBTOOL_VERSION="-version-info"
4457 fi
4458
4459 LIBTOOL=
4460
4461 # common library maintenance symbols that are convenient for libtool scripts:
4462 LIB_CREATE='${AR} -cr'
4463 LIB_OBJECT='${OBJECTS}'
4464 LIB_SUFFIX=.a
4465 LIB_PREP="$RANLIB"
4466
4467 # symbols used to prop libtool up to enable it to determine what it should be
4468 # doing:
4469 LIB_CLEAN=
4470 LIB_COMPILE=
4471 LIB_LINK='${CC}'
4472 LIB_INSTALL=
4473 LIB_UNINSTALL=
4474
4475 echo "$as_me:4475: checking if you want to build libraries with libtool" >&5
4476 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4477
4478 # Check whether --with-libtool or --without-libtool was given.
4479 if test "${with_libtool+set}" = set; then
4480   withval="$with_libtool"
4481   with_libtool=$withval
4482 else
4483   with_libtool=no
4484 fi;
4485 echo "$as_me:4485: result: $with_libtool" >&5
4486 echo "${ECHO_T}$with_libtool" >&6
4487 if test "$with_libtool" != "no"; then
4488
4489         if test "$with_libtool" != "yes" ; then
4490
4491 if test "x$prefix" != xNONE; then
4492   cf_path_syntax="$prefix"
4493 else
4494   cf_path_syntax="$ac_default_prefix"
4495 fi
4496
4497 case ".$with_libtool" in #(vi
4498 .\$\(*\)*|.\'*\'*) #(vi
4499   ;;
4500 ..|./*|.\\*) #(vi
4501   ;;
4502 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4503   ;;
4504 .\${*prefix}*|.\${*dir}*) #(vi
4505   eval with_libtool="$with_libtool"
4506   case ".$with_libtool" in #(vi
4507   .NONE/*)
4508     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4509     ;;
4510   esac
4511   ;; #(vi
4512 .no|.NONE/*)
4513   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4514   ;;
4515 *)
4516   { { echo "$as_me:4516: error: expected a pathname, not \"$with_libtool\"" >&5
4517 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4518    { (exit 1); exit 1; }; }
4519   ;;
4520 esac
4521
4522                 LIBTOOL=$with_libtool
4523         else
4524                 # Extract the first word of "libtool", so it can be a program name with args.
4525 set dummy libtool; ac_word=$2
4526 echo "$as_me:4526: checking for $ac_word" >&5
4527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4528 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4529   echo $ECHO_N "(cached) $ECHO_C" >&6
4530 else
4531   case $LIBTOOL in
4532   [\\/]* | ?:[\\/]*)
4533   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4534   ;;
4535   *)
4536   ac_save_IFS=$IFS; IFS=$ac_path_separator
4537 ac_dummy="$PATH"
4538 for ac_dir in $ac_dummy; do
4539   IFS=$ac_save_IFS
4540   test -z "$ac_dir" && ac_dir=.
4541   if $as_executable_p "$ac_dir/$ac_word"; then
4542    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4543    echo "$as_me:4543: found $ac_dir/$ac_word" >&5
4544    break
4545 fi
4546 done
4547
4548   ;;
4549 esac
4550 fi
4551 LIBTOOL=$ac_cv_path_LIBTOOL
4552
4553 if test -n "$LIBTOOL"; then
4554   echo "$as_me:4554: result: $LIBTOOL" >&5
4555 echo "${ECHO_T}$LIBTOOL" >&6
4556 else
4557   echo "$as_me:4557: result: no" >&5
4558 echo "${ECHO_T}no" >&6
4559 fi
4560
4561         fi
4562         if test -z "$LIBTOOL" ; then
4563                 { { echo "$as_me:4563: error: Cannot find libtool" >&5
4564 echo "$as_me: error: Cannot find libtool" >&2;}
4565    { (exit 1); exit 1; }; }
4566         fi
4567         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4568         LIB_OBJECT='${OBJECTS:.o=.lo}'
4569         LIB_SUFFIX=.la
4570         LIB_CLEAN='${LIBTOOL} --mode=clean'
4571         LIB_COMPILE='${LIBTOOL} --mode=compile'
4572         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4573         LIB_INSTALL='${LIBTOOL} --mode=install'
4574         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4575         LIB_PREP=:
4576
4577         # Show the version of libtool
4578         echo "$as_me:4578: checking version of libtool" >&5
4579 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4580
4581         # Save the version in a cache variable - this is not entirely a good
4582         # thing, but the version string from libtool is very ugly, and for
4583         # bug reports it might be useful to have the original string. "("
4584         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.].*//'`
4585         echo "$as_me:4585: result: $cf_cv_libtool_version" >&5
4586 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4587         if test -z "$cf_cv_libtool_version" ; then
4588                 { { echo "$as_me:4588: error: This is not GNU libtool" >&5
4589 echo "$as_me: error: This is not GNU libtool" >&2;}
4590    { (exit 1); exit 1; }; }
4591         fi
4592
4593         # special hack to add -no-undefined (which libtool should do for itself)
4594         LT_UNDEF=
4595         case "$cf_cv_system_name" in #(vi
4596         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4597                 LT_UNDEF=-no-undefined
4598                 ;;
4599         esac
4600
4601         # special hack to add --tag option for C++ compiler
4602         case $cf_cv_libtool_version in #(vi
4603         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4604                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4605                 LIBTOOL="$LIBTOOL --tag=CC"
4606                 ;;
4607         *)
4608                 LIBTOOL_CXX="$LIBTOOL"
4609                 ;;
4610         esac
4611 else
4612         LIBTOOL=""
4613         LIBTOOL_CXX=""
4614 fi
4615
4616 test -z "$LIBTOOL" && ECHO_LT=
4617
4618 if test "$with_libtool" != "no" ; then
4619
4620 cf_list_models="$cf_list_models libtool"
4621
4622 else
4623
4624 echo "$as_me:4624: checking if you want to build shared libraries" >&5
4625 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4626
4627 # Check whether --with-shared or --without-shared was given.
4628 if test "${with_shared+set}" = set; then
4629   withval="$with_shared"
4630   with_shared=$withval
4631 else
4632   with_shared=no
4633 fi;
4634 echo "$as_me:4634: result: $with_shared" >&5
4635 echo "${ECHO_T}$with_shared" >&6
4636 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4637
4638 echo "$as_me:4638: checking if you want to build static libraries" >&5
4639 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4640
4641 # Check whether --with-normal or --without-normal was given.
4642 if test "${with_normal+set}" = set; then
4643   withval="$with_normal"
4644   with_normal=$withval
4645 else
4646   with_normal=yes
4647 fi;
4648 echo "$as_me:4648: result: $with_normal" >&5
4649 echo "${ECHO_T}$with_normal" >&6
4650 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4651
4652 echo "$as_me:4652: checking if you want to build debug libraries" >&5
4653 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4654
4655 # Check whether --with-debug or --without-debug was given.
4656 if test "${with_debug+set}" = set; then
4657   withval="$with_debug"
4658   with_debug=$withval
4659 else
4660   with_debug=yes
4661 fi;
4662 echo "$as_me:4662: result: $with_debug" >&5
4663 echo "${ECHO_T}$with_debug" >&6
4664 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4665
4666 echo "$as_me:4666: checking if you want to build profiling libraries" >&5
4667 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4668
4669 # Check whether --with-profile or --without-profile was given.
4670 if test "${with_profile+set}" = set; then
4671   withval="$with_profile"
4672   with_profile=$withval
4673 else
4674   with_profile=no
4675 fi;
4676 echo "$as_me:4676: result: $with_profile" >&5
4677 echo "${ECHO_T}$with_profile" >&6
4678 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4679
4680 fi
4681
4682 ###############################################################################
4683
4684 echo "$as_me:4684: checking for specified models" >&5
4685 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4686 test -z "$cf_list_models" && cf_list_models=normal
4687 test "$with_libtool" != "no" && cf_list_models=libtool
4688 echo "$as_me:4688: result: $cf_list_models" >&5
4689 echo "${ECHO_T}$cf_list_models" >&6
4690
4691 ### Use the first model as the default, and save its suffix for use in building
4692 ### up test-applications.
4693 echo "$as_me:4693: checking for default model" >&5
4694 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4695 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4696 echo "$as_me:4696: result: $DFT_LWR_MODEL" >&5
4697 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4698
4699 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4700
4701 TICS_NAME=tic
4702
4703 TINFO_NAME=tinfo
4704
4705 LIB_NAME=ncurses
4706
4707 LIB_DIR=../lib
4708 LIB_2ND=../../lib
4709
4710 echo "$as_me:4710: checking if you want to have a library-prefix" >&5
4711 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4712
4713 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4714 if test "${with_lib_prefix+set}" = set; then
4715   withval="$with_lib_prefix"
4716   with_lib_prefix=$withval
4717 else
4718   with_lib_prefix=auto
4719 fi;
4720 echo "$as_me:4720: result: $with_lib_prefix" >&5
4721 echo "${ECHO_T}$with_lib_prefix" >&6
4722
4723 if test $with_lib_prefix = auto
4724 then
4725
4726         case $cf_cv_system_name in #(vi
4727         OS/2*|os2*) #(vi
4728         LIB_PREFIX=''
4729         ;;
4730         *)      LIB_PREFIX='lib'
4731         ;;
4732         esac
4733 cf_prefix=$LIB_PREFIX
4734
4735 elif test $with_lib_prefix = no
4736 then
4737         LIB_PREFIX=
4738 else
4739         LIB_PREFIX=$with_lib_prefix
4740 fi
4741
4742 LIB_SUFFIX=
4743
4744 ###############################################################################
4745
4746 echo "$as_me:4746: checking if you want to build a separate terminfo library" >&5
4747 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4748
4749 # Check whether --with-termlib or --without-termlib was given.
4750 if test "${with_termlib+set}" = set; then
4751   withval="$with_termlib"
4752   with_termlib=$withval
4753 else
4754   with_termlib=no
4755 fi;
4756 echo "$as_me:4756: result: $with_termlib" >&5
4757 echo "${ECHO_T}$with_termlib" >&6
4758
4759 echo "$as_me:4759: checking if you want to build a separate tic library" >&5
4760 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4761
4762 # Check whether --with-ticlib or --without-ticlib was given.
4763 if test "${with_ticlib+set}" = set; then
4764   withval="$with_ticlib"
4765   with_ticlib=$withval
4766 else
4767   with_ticlib=no
4768 fi;
4769 echo "$as_me:4769: result: $with_ticlib" >&5
4770 echo "${ECHO_T}$with_ticlib" >&6
4771
4772 ### Checks for special libraries, must be done up-front.
4773 SHLIB_LIST=""
4774
4775 echo "$as_me:4775: checking if you want to link with the GPM mouse library" >&5
4776 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4777
4778 # Check whether --with-gpm or --without-gpm was given.
4779 if test "${with_gpm+set}" = set; then
4780   withval="$with_gpm"
4781   with_gpm=$withval
4782 else
4783   with_gpm=maybe
4784 fi;
4785 echo "$as_me:4785: result: $with_gpm" >&5
4786 echo "${ECHO_T}$with_gpm" >&6
4787
4788 if test "$with_gpm" != no ; then
4789         echo "$as_me:4789: checking for gpm.h" >&5
4790 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4791 if test "${ac_cv_header_gpm_h+set}" = set; then
4792   echo $ECHO_N "(cached) $ECHO_C" >&6
4793 else
4794   cat >conftest.$ac_ext <<_ACEOF
4795 #line 4795 "configure"
4796 #include "confdefs.h"
4797 #include <gpm.h>
4798 _ACEOF
4799 if { (eval echo "$as_me:4799: \"$ac_cpp conftest.$ac_ext\"") >&5
4800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4801   ac_status=$?
4802   egrep -v '^ *\+' conftest.er1 >conftest.err
4803   rm -f conftest.er1
4804   cat conftest.err >&5
4805   echo "$as_me:4805: \$? = $ac_status" >&5
4806   (exit $ac_status); } >/dev/null; then
4807   if test -s conftest.err; then
4808     ac_cpp_err=$ac_c_preproc_warn_flag
4809   else
4810     ac_cpp_err=
4811   fi
4812 else
4813   ac_cpp_err=yes
4814 fi
4815 if test -z "$ac_cpp_err"; then
4816   ac_cv_header_gpm_h=yes
4817 else
4818   echo "$as_me: failed program was:" >&5
4819   cat conftest.$ac_ext >&5
4820   ac_cv_header_gpm_h=no
4821 fi
4822 rm -f conftest.err conftest.$ac_ext
4823 fi
4824 echo "$as_me:4824: result: $ac_cv_header_gpm_h" >&5
4825 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4826 if test $ac_cv_header_gpm_h = yes; then
4827
4828                 cat >>confdefs.h <<\EOF
4829 #define HAVE_GPM_H 1
4830 EOF
4831
4832                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4833                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4834
4835 echo "${as_me:-configure}:4835: testing assuming we really have GPM library ..." 1>&5
4836
4837                         cat >>confdefs.h <<\EOF
4838 #define HAVE_LIBGPM 1
4839 EOF
4840
4841                 else
4842                         echo "$as_me:4842: checking for Gpm_Open in -lgpm" >&5
4843 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4844 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4845   echo $ECHO_N "(cached) $ECHO_C" >&6
4846 else
4847   ac_check_lib_save_LIBS=$LIBS
4848 LIBS="-lgpm  $LIBS"
4849 cat >conftest.$ac_ext <<_ACEOF
4850 #line 4850 "configure"
4851 #include "confdefs.h"
4852
4853 /* Override any gcc2 internal prototype to avoid an error.  */
4854 #ifdef __cplusplus
4855 extern "C"
4856 #endif
4857 /* We use char because int might match the return type of a gcc2
4858    builtin and then its argument prototype would still apply.  */
4859 char Gpm_Open ();
4860 int
4861 main ()
4862 {
4863 Gpm_Open ();
4864   ;
4865   return 0;
4866 }
4867 _ACEOF
4868 rm -f conftest.$ac_objext conftest$ac_exeext
4869 if { (eval echo "$as_me:4869: \"$ac_link\"") >&5
4870   (eval $ac_link) 2>&5
4871   ac_status=$?
4872   echo "$as_me:4872: \$? = $ac_status" >&5
4873   (exit $ac_status); } &&
4874          { ac_try='test -s conftest$ac_exeext'
4875   { (eval echo "$as_me:4875: \"$ac_try\"") >&5
4876   (eval $ac_try) 2>&5
4877   ac_status=$?
4878   echo "$as_me:4878: \$? = $ac_status" >&5
4879   (exit $ac_status); }; }; then
4880   ac_cv_lib_gpm_Gpm_Open=yes
4881 else
4882   echo "$as_me: failed program was:" >&5
4883 cat conftest.$ac_ext >&5
4884 ac_cv_lib_gpm_Gpm_Open=no
4885 fi
4886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4887 LIBS=$ac_check_lib_save_LIBS
4888 fi
4889 echo "$as_me:4889: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4890 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4891 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4892   :
4893 else
4894
4895                                 { { echo "$as_me:4895: error: Cannot link with GPM library" >&5
4896 echo "$as_me: error: Cannot link with GPM library" >&2;}
4897    { (exit 1); exit 1; }; }
4898                 fi
4899                 with_gpm=yes
4900
4901 fi
4902
4903 else
4904
4905                 test "$with_gpm" != maybe && { echo "$as_me:4905: WARNING: Cannot find GPM header" >&5
4906 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4907                 with_gpm=no
4908
4909 fi
4910
4911 fi
4912
4913 if test "$with_gpm" != no ; then
4914         echo "$as_me:4914: checking if you want to load GPM dynamically" >&5
4915 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4916
4917 # Check whether --with-dlsym or --without-dlsym was given.
4918 if test "${with_dlsym+set}" = set; then
4919   withval="$with_dlsym"
4920   with_dlsym=$withval
4921 else
4922   with_dlsym=yes
4923 fi;
4924         echo "$as_me:4924: result: $with_dlsym" >&5
4925 echo "${ECHO_T}$with_dlsym" >&6
4926         if test "$with_dlsym" = yes ; then
4927
4928 cf_have_dlsym=no
4929 echo "$as_me:4929: checking for dlsym" >&5
4930 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4931 if test "${ac_cv_func_dlsym+set}" = set; then
4932   echo $ECHO_N "(cached) $ECHO_C" >&6
4933 else
4934   cat >conftest.$ac_ext <<_ACEOF
4935 #line 4935 "configure"
4936 #include "confdefs.h"
4937 /* System header to define __stub macros and hopefully few prototypes,
4938     which can conflict with char dlsym (); below.  */
4939 #include <assert.h>
4940 /* Override any gcc2 internal prototype to avoid an error.  */
4941 #ifdef __cplusplus
4942 extern "C"
4943 #endif
4944 /* We use char because int might match the return type of a gcc2
4945    builtin and then its argument prototype would still apply.  */
4946 char dlsym ();
4947 char (*f) ();
4948
4949 int
4950 main ()
4951 {
4952 /* The GNU C library defines this for functions which it implements
4953     to always fail with ENOSYS.  Some functions are actually named
4954     something starting with __ and the normal name is an alias.  */
4955 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4956 choke me
4957 #else
4958 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4959 #endif
4960
4961   ;
4962   return 0;
4963 }
4964 _ACEOF
4965 rm -f conftest.$ac_objext conftest$ac_exeext
4966 if { (eval echo "$as_me:4966: \"$ac_link\"") >&5
4967   (eval $ac_link) 2>&5
4968   ac_status=$?
4969   echo "$as_me:4969: \$? = $ac_status" >&5
4970   (exit $ac_status); } &&
4971          { ac_try='test -s conftest$ac_exeext'
4972   { (eval echo "$as_me:4972: \"$ac_try\"") >&5
4973   (eval $ac_try) 2>&5
4974   ac_status=$?
4975   echo "$as_me:4975: \$? = $ac_status" >&5
4976   (exit $ac_status); }; }; then
4977   ac_cv_func_dlsym=yes
4978 else
4979   echo "$as_me: failed program was:" >&5
4980 cat conftest.$ac_ext >&5
4981 ac_cv_func_dlsym=no
4982 fi
4983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4984 fi
4985 echo "$as_me:4985: result: $ac_cv_func_dlsym" >&5
4986 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4987 if test $ac_cv_func_dlsym = yes; then
4988   cf_have_dlsym=yes
4989 else
4990
4991 cf_have_libdl=no
4992 echo "$as_me:4992: checking for dlsym in -ldl" >&5
4993 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4994 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4995   echo $ECHO_N "(cached) $ECHO_C" >&6
4996 else
4997   ac_check_lib_save_LIBS=$LIBS
4998 LIBS="-ldl  $LIBS"
4999 cat >conftest.$ac_ext <<_ACEOF
5000 #line 5000 "configure"
5001 #include "confdefs.h"
5002
5003 /* Override any gcc2 internal prototype to avoid an error.  */
5004 #ifdef __cplusplus
5005 extern "C"
5006 #endif
5007 /* We use char because int might match the return type of a gcc2
5008    builtin and then its argument prototype would still apply.  */
5009 char dlsym ();
5010 int
5011 main ()
5012 {
5013 dlsym ();
5014   ;
5015   return 0;
5016 }
5017 _ACEOF
5018 rm -f conftest.$ac_objext conftest$ac_exeext
5019 if { (eval echo "$as_me:5019: \"$ac_link\"") >&5
5020   (eval $ac_link) 2>&5
5021   ac_status=$?
5022   echo "$as_me:5022: \$? = $ac_status" >&5
5023   (exit $ac_status); } &&
5024          { ac_try='test -s conftest$ac_exeext'
5025   { (eval echo "$as_me:5025: \"$ac_try\"") >&5
5026   (eval $ac_try) 2>&5
5027   ac_status=$?
5028   echo "$as_me:5028: \$? = $ac_status" >&5
5029   (exit $ac_status); }; }; then
5030   ac_cv_lib_dl_dlsym=yes
5031 else
5032   echo "$as_me: failed program was:" >&5
5033 cat conftest.$ac_ext >&5
5034 ac_cv_lib_dl_dlsym=no
5035 fi
5036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5037 LIBS=$ac_check_lib_save_LIBS
5038 fi
5039 echo "$as_me:5039: result: $ac_cv_lib_dl_dlsym" >&5
5040 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5041 if test $ac_cv_lib_dl_dlsym = yes; then
5042
5043         cf_have_dlsym=yes
5044         cf_have_libdl=yes
5045 fi
5046
5047 fi
5048
5049 if test "$cf_have_dlsym" = yes ; then
5050         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5051
5052         echo "$as_me:5052: checking whether able to link to dl*() functions" >&5
5053 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5054         cat >conftest.$ac_ext <<_ACEOF
5055 #line 5055 "configure"
5056 #include "confdefs.h"
5057 #include <dlfcn.h>
5058 int
5059 main ()
5060 {
5061
5062                 void *obj;
5063                 if ((obj = dlopen("filename", 0)) != 0) {
5064                         if (dlsym(obj, "symbolname") == 0) {
5065                         dlclose(obj);
5066                         }
5067                 }
5068   ;
5069   return 0;
5070 }
5071 _ACEOF
5072 rm -f conftest.$ac_objext conftest$ac_exeext
5073 if { (eval echo "$as_me:5073: \"$ac_link\"") >&5
5074   (eval $ac_link) 2>&5
5075   ac_status=$?
5076   echo "$as_me:5076: \$? = $ac_status" >&5
5077   (exit $ac_status); } &&
5078          { ac_try='test -s conftest$ac_exeext'
5079   { (eval echo "$as_me:5079: \"$ac_try\"") >&5
5080   (eval $ac_try) 2>&5
5081   ac_status=$?
5082   echo "$as_me:5082: \$? = $ac_status" >&5
5083   (exit $ac_status); }; }; then
5084
5085                 cat >>confdefs.h <<\EOF
5086 #define HAVE_LIBDL 1
5087 EOF
5088
5089 else
5090   echo "$as_me: failed program was:" >&5
5091 cat conftest.$ac_ext >&5
5092
5093                 { { echo "$as_me:5093: error: Cannot link test program for libdl" >&5
5094 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5095    { (exit 1); exit 1; }; }
5096 fi
5097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5098         echo "$as_me:5098: result: ok" >&5
5099 echo "${ECHO_T}ok" >&6
5100 else
5101         { { echo "$as_me:5101: error: Cannot find dlsym function" >&5
5102 echo "$as_me: error: Cannot find dlsym function" >&2;}
5103    { (exit 1); exit 1; }; }
5104 fi
5105
5106                 if test "$with_gpm" != yes ; then
5107                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5108
5109 echo "${as_me:-configure}:5109: testing assuming soname for gpm is $with_gpm ..." 1>&5
5110
5111                         cf_cv_gpm_soname="$with_gpm"
5112                 else
5113
5114 echo "$as_me:5114: checking for soname of gpm library" >&5
5115 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5116 if test "${cf_cv_gpm_soname+set}" = set; then
5117   echo $ECHO_N "(cached) $ECHO_C" >&6
5118 else
5119
5120 cf_cv_gpm_soname=unknown
5121 if test "$cross_compiling" != yes ; then
5122 cat >conftest.$ac_ext <<CF_EOF
5123 #include <gpm.h>
5124 int main()
5125 {
5126 if (Gpm_Open(0,0)) Gpm_Close();
5127         ${cf_cv_main_return:-return}(0);
5128 }
5129 CF_EOF
5130 cf_save_LIBS="$LIBS"
5131         LIBS="-lgpm $LIBS"
5132         if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133   (eval $ac_compile) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } ; then
5137                 if { (eval echo "$as_me:5137: \"$ac_link\"") >&5
5138   (eval $ac_link) 2>&5
5139   ac_status=$?
5140   echo "$as_me:5140: \$? = $ac_status" >&5
5141   (exit $ac_status); } ; then
5142                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5143                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5144                 fi
5145         fi
5146 rm -rf conftest*
5147 LIBS="$cf_save_LIBS"
5148 fi
5149
5150 fi
5151 echo "$as_me:5151: result: $cf_cv_gpm_soname" >&5
5152 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5153
5154                 fi
5155                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5156 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5157 EOF
5158
5159                 SHLIB_LIST="-ldl $SHLIB_LIST"
5160         else
5161                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5162                 TEST_LIBS="-lgpm $TEST_LIBS"
5163         fi
5164         cat >>confdefs.h <<\EOF
5165 #define HAVE_LIBGPM 1
5166 EOF
5167
5168 echo "$as_me:5168: checking for Gpm_Wgetch in -lgpm" >&5
5169 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5170 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5171   echo $ECHO_N "(cached) $ECHO_C" >&6
5172 else
5173   ac_check_lib_save_LIBS=$LIBS
5174 LIBS="-lgpm  $LIBS"
5175 cat >conftest.$ac_ext <<_ACEOF
5176 #line 5176 "configure"
5177 #include "confdefs.h"
5178
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 #ifdef __cplusplus
5181 extern "C"
5182 #endif
5183 /* We use char because int might match the return type of a gcc2
5184    builtin and then its argument prototype would still apply.  */
5185 char Gpm_Wgetch ();
5186 int
5187 main ()
5188 {
5189 Gpm_Wgetch ();
5190   ;
5191   return 0;
5192 }
5193 _ACEOF
5194 rm -f conftest.$ac_objext conftest$ac_exeext
5195 if { (eval echo "$as_me:5195: \"$ac_link\"") >&5
5196   (eval $ac_link) 2>&5
5197   ac_status=$?
5198   echo "$as_me:5198: \$? = $ac_status" >&5
5199   (exit $ac_status); } &&
5200          { ac_try='test -s conftest$ac_exeext'
5201   { (eval echo "$as_me:5201: \"$ac_try\"") >&5
5202   (eval $ac_try) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); }; }; then
5206   ac_cv_lib_gpm_Gpm_Wgetch=yes
5207 else
5208   echo "$as_me: failed program was:" >&5
5209 cat conftest.$ac_ext >&5
5210 ac_cv_lib_gpm_Gpm_Wgetch=no
5211 fi
5212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5213 LIBS=$ac_check_lib_save_LIBS
5214 fi
5215 echo "$as_me:5215: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5216 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5217 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5218
5219 echo "$as_me:5219: checking if GPM is weakly bound to curses library" >&5
5220 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5221 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5222   echo $ECHO_N "(cached) $ECHO_C" >&6
5223 else
5224
5225 cf_cv_check_gpm_wgetch=unknown
5226 if test "$cross_compiling" != yes ; then
5227
5228 cat >conftest.$ac_ext <<CF_EOF
5229 #include <gpm.h>
5230 int main()
5231 {
5232         Gpm_Wgetch();
5233         ${cf_cv_main_return:-return}(0);
5234 }
5235 CF_EOF
5236
5237         cf_save_LIBS="$LIBS"
5238         # This only works if we can look at the symbol table.  If a shared
5239         # library is stripped for install, we cannot use that.  So we're forced
5240         # to rely on the static library, noting that some packagers may not
5241         # include it.
5242         LIBS="-static -lgpm -dynamic $LIBS"
5243         if { (eval echo "$as_me:5243: \"$ac_compile\"") >&5
5244   (eval $ac_compile) 2>&5
5245   ac_status=$?
5246   echo "$as_me:5246: \$? = $ac_status" >&5
5247   (exit $ac_status); } ; then
5248                 if { (eval echo "$as_me:5248: \"$ac_link\"") >&5
5249   (eval $ac_link) 2>&5
5250   ac_status=$?
5251   echo "$as_me:5251: \$? = $ac_status" >&5
5252   (exit $ac_status); } ; then
5253                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5254                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5255                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5256                 fi
5257         fi
5258         rm -rf conftest*
5259         LIBS="$cf_save_LIBS"
5260 fi
5261
5262 fi
5263 echo "$as_me:5263: result: $cf_cv_check_gpm_wgetch" >&5
5264 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5265
5266 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5267         { echo "$as_me:5267: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5268 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5269 fi
5270
5271 fi
5272
5273 fi
5274
5275 # not everyone has "test -c"
5276 if test -c /dev/sysmouse 2>/dev/null ; then
5277 echo "$as_me:5277: checking if you want to use sysmouse" >&5
5278 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5279
5280 # Check whether --with-sysmouse or --without-sysmouse was given.
5281 if test "${with_sysmouse+set}" = set; then
5282   withval="$with_sysmouse"
5283   cf_with_sysmouse=$withval
5284 else
5285   cf_with_sysmouse=maybe
5286 fi;
5287         if test "$cf_with_sysmouse" != no ; then
5288         cat >conftest.$ac_ext <<_ACEOF
5289 #line 5289 "configure"
5290 #include "confdefs.h"
5291
5292 #include <osreldate.h>
5293 #if (__FreeBSD_version >= 400017)
5294 #include <sys/consio.h>
5295 #include <sys/fbio.h>
5296 #else
5297 #include <machine/console.h>
5298 #endif
5299
5300 int
5301 main ()
5302 {
5303
5304         struct mouse_info the_mouse;
5305         ioctl(0, CONS_MOUSECTL, &the_mouse);
5306
5307   ;
5308   return 0;
5309 }
5310 _ACEOF
5311 rm -f conftest.$ac_objext
5312 if { (eval echo "$as_me:5312: \"$ac_compile\"") >&5
5313   (eval $ac_compile) 2>&5
5314   ac_status=$?
5315   echo "$as_me:5315: \$? = $ac_status" >&5
5316   (exit $ac_status); } &&
5317          { ac_try='test -s conftest.$ac_objext'
5318   { (eval echo "$as_me:5318: \"$ac_try\"") >&5
5319   (eval $ac_try) 2>&5
5320   ac_status=$?
5321   echo "$as_me:5321: \$? = $ac_status" >&5
5322   (exit $ac_status); }; }; then
5323   cf_with_sysmouse=yes
5324 else
5325   echo "$as_me: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5327 cf_with_sysmouse=no
5328 fi
5329 rm -f conftest.$ac_objext conftest.$ac_ext
5330         fi
5331 echo "$as_me:5331: result: $cf_with_sysmouse" >&5
5332 echo "${ECHO_T}$cf_with_sysmouse" >&6
5333 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5334 #define USE_SYSMOUSE 1
5335 EOF
5336
5337 fi
5338
5339 if test X"$CC_G_OPT" = X"" ; then
5340         CC_G_OPT='-g'
5341         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5342 fi
5343
5344 if test X"$CXX_G_OPT" = X"" ; then
5345         CXX_G_OPT='-g'
5346         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5347 fi
5348
5349 echo "$as_me:5349: checking for default loader flags" >&5
5350 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5351 case $DFT_LWR_MODEL in
5352 libtool) LD_MODEL=''   ;;
5353 normal)  LD_MODEL=''   ;;
5354 debug)   LD_MODEL=$CC_G_OPT ;;
5355 profile) LD_MODEL='-pg';;
5356 shared)  LD_MODEL=''   ;;
5357 esac
5358 echo "$as_me:5358: result: $LD_MODEL" >&5
5359 echo "${ECHO_T}$LD_MODEL" >&6
5360
5361 case $DFT_LWR_MODEL in
5362 shared)
5363
5364 echo "$as_me:5364: checking if rpath option should be used" >&5
5365 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5366
5367 # Check whether --enable-rpath or --disable-rpath was given.
5368 if test "${enable_rpath+set}" = set; then
5369   enableval="$enable_rpath"
5370   cf_cv_enable_rpath=$enableval
5371 else
5372   cf_cv_enable_rpath=no
5373 fi;
5374 echo "$as_me:5374: result: $cf_cv_enable_rpath" >&5
5375 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5376
5377 echo "$as_me:5377: checking if shared libraries should be relinked during install" >&5
5378 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5379
5380 # Check whether --enable-relink or --disable-relink was given.
5381 if test "${enable_relink+set}" = set; then
5382   enableval="$enable_relink"
5383   cf_cv_do_relink=$enableval
5384 else
5385   cf_cv_do_relink=yes
5386 fi;
5387 echo "$as_me:5387: result: $cf_cv_do_relink" >&5
5388 echo "${ECHO_T}$cf_cv_do_relink" >&6
5389         ;;
5390 esac
5391
5392 LD_RPATH_OPT=
5393 echo "$as_me:5393: checking for an rpath option" >&5
5394 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5395 case $cf_cv_system_name in #(vi
5396 irix*) #(vi
5397         if test "$GCC" = yes; then
5398                 LD_RPATH_OPT="-Wl,-rpath,"
5399         else
5400                 LD_RPATH_OPT="-rpath "
5401         fi
5402         ;;
5403 linux*|gnu*|k*bsd*-gnu) #(vi
5404         LD_RPATH_OPT="-Wl,-rpath,"
5405         ;;
5406 openbsd[2-9].*|mirbsd*) #(vi
5407         LD_RPATH_OPT="-Wl,-rpath,"
5408         ;;
5409 dragonfly*|freebsd*) #(vi
5410         LD_RPATH_OPT="-rpath "
5411         ;;
5412 netbsd*) #(vi
5413         LD_RPATH_OPT="-Wl,-rpath,"
5414         ;;
5415 osf*|mls+*) #(vi
5416         LD_RPATH_OPT="-rpath "
5417         ;;
5418 solaris2*) #(vi
5419         LD_RPATH_OPT="-R"
5420         ;;
5421 *)
5422         ;;
5423 esac
5424 echo "$as_me:5424: result: $LD_RPATH_OPT" >&5
5425 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5426
5427 case "x$LD_RPATH_OPT" in #(vi
5428 x-R*)
5429         echo "$as_me:5429: checking if we need a space after rpath option" >&5
5430 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5431         cf_save_LIBS="$LIBS"
5432         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5433         cat >conftest.$ac_ext <<_ACEOF
5434 #line 5434 "configure"
5435 #include "confdefs.h"
5436
5437 int
5438 main ()
5439 {
5440
5441   ;
5442   return 0;
5443 }
5444 _ACEOF
5445 rm -f conftest.$ac_objext conftest$ac_exeext
5446 if { (eval echo "$as_me:5446: \"$ac_link\"") >&5
5447   (eval $ac_link) 2>&5
5448   ac_status=$?
5449   echo "$as_me:5449: \$? = $ac_status" >&5
5450   (exit $ac_status); } &&
5451          { ac_try='test -s conftest$ac_exeext'
5452   { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453   (eval $ac_try) 2>&5
5454   ac_status=$?
5455   echo "$as_me:5455: \$? = $ac_status" >&5
5456   (exit $ac_status); }; }; then
5457   cf_rpath_space=no
5458 else
5459   echo "$as_me: failed program was:" >&5
5460 cat conftest.$ac_ext >&5
5461 cf_rpath_space=yes
5462 fi
5463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5464         LIBS="$cf_save_LIBS"
5465         echo "$as_me:5465: result: $cf_rpath_space" >&5
5466 echo "${ECHO_T}$cf_rpath_space" >&6
5467         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5468         ;;
5469 esac
5470
5471         LOCAL_LDFLAGS=
5472         LOCAL_LDFLAGS2=
5473         LD_SHARED_OPTS=
5474         INSTALL_LIB="-m 644"
5475
5476         cf_cv_do_symlinks=no
5477         cf_ld_rpath_opt=
5478         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5479
5480         echo "$as_me:5480: checking if release/abi version should be used for shared libs" >&5
5481 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5482
5483 # Check whether --with-shlib-version or --without-shlib-version was given.
5484 if test "${with_shlib_version+set}" = set; then
5485   withval="$with_shlib_version"
5486   test -z "$withval" && withval=auto
5487         case $withval in #(vi
5488         yes) #(vi
5489                 cf_cv_shlib_version=auto
5490                 ;;
5491         rel|abi|auto|no) #(vi
5492                 cf_cv_shlib_version=$withval
5493                 ;;
5494         *)
5495                 { { echo "$as_me:5495: error: option value must be one of: rel, abi, auto or no" >&5
5496 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5497    { (exit 1); exit 1; }; }
5498                 ;;
5499         esac
5500
5501 else
5502   cf_cv_shlib_version=auto
5503 fi;
5504         echo "$as_me:5504: result: $cf_cv_shlib_version" >&5
5505 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5506
5507         cf_cv_rm_so_locs=no
5508
5509         # Some less-capable ports of gcc support only -fpic
5510         CC_SHARED_OPTS=
5511         if test "$GCC" = yes
5512         then
5513                 echo "$as_me:5513: checking which $CC option to use" >&5
5514 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5515                 cf_save_CFLAGS="$CFLAGS"
5516                 for CC_SHARED_OPTS in -fPIC -fpic ''
5517                 do
5518                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5519                         cat >conftest.$ac_ext <<_ACEOF
5520 #line 5520 "configure"
5521 #include "confdefs.h"
5522 #include <stdio.h>
5523 int
5524 main ()
5525 {
5526 int x = 1
5527   ;
5528   return 0;
5529 }
5530 _ACEOF
5531 rm -f conftest.$ac_objext
5532 if { (eval echo "$as_me:5532: \"$ac_compile\"") >&5
5533   (eval $ac_compile) 2>&5
5534   ac_status=$?
5535   echo "$as_me:5535: \$? = $ac_status" >&5
5536   (exit $ac_status); } &&
5537          { ac_try='test -s conftest.$ac_objext'
5538   { (eval echo "$as_me:5538: \"$ac_try\"") >&5
5539   (eval $ac_try) 2>&5
5540   ac_status=$?
5541   echo "$as_me:5541: \$? = $ac_status" >&5
5542   (exit $ac_status); }; }; then
5543   break
5544 else
5545   echo "$as_me: failed program was:" >&5
5546 cat conftest.$ac_ext >&5
5547 fi
5548 rm -f conftest.$ac_objext conftest.$ac_ext
5549                 done
5550                 echo "$as_me:5550: result: $CC_SHARED_OPTS" >&5
5551 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5552                 CFLAGS="$cf_save_CFLAGS"
5553         fi
5554
5555         cf_cv_shlib_version_infix=no
5556
5557         case $cf_cv_system_name in #(vi
5558         aix4.3-9*|aix[5-7]*) #(vi
5559                 if test "$GCC" = yes; then
5560                         CC_SHARED_OPTS=
5561                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5562                 else
5563                         # CC_SHARED_OPTS='-qpic=large -G'
5564                         # perhaps "-bM:SRE -bnoentry -bexpall"
5565                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5566                 fi
5567                 ;;
5568         beos*) #(vi
5569                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5570                 ;;
5571         cygwin*) #(vi
5572                 CC_SHARED_OPTS=
5573                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5574                 cf_cv_shlib_version=cygdll
5575                 cf_cv_shlib_version_infix=cygdll
5576                 cat >mk_shared_lib.sh <<-CF_EOF
5577                 #!/bin/sh
5578                 SHARED_LIB=\$1
5579                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5580                 shift
5581                 cat <<-EOF
5582                 Linking shared library
5583                 ** SHARED_LIB \$SHARED_LIB
5584                 ** IMPORT_LIB \$IMPORT_LIB
5585 EOF
5586                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5587 CF_EOF
5588                 chmod +x mk_shared_lib.sh
5589                 ;;
5590         darwin*) #(vi
5591                 EXTRA_CFLAGS="-no-cpp-precomp"
5592                 CC_SHARED_OPTS="-dynamic"
5593                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5594                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5595                 cf_cv_shlib_version_infix=yes
5596                 echo "$as_me:5596: checking if ld -search_paths_first works" >&5
5597 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5598 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5599   echo $ECHO_N "(cached) $ECHO_C" >&6
5600 else
5601
5602                         cf_save_LDFLAGS=$LDFLAGS
5603                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5604                         cat >conftest.$ac_ext <<_ACEOF
5605 #line 5605 "configure"
5606 #include "confdefs.h"
5607
5608 int
5609 main ()
5610 {
5611 int i;
5612   ;
5613   return 0;
5614 }
5615 _ACEOF
5616 rm -f conftest.$ac_objext conftest$ac_exeext
5617 if { (eval echo "$as_me:5617: \"$ac_link\"") >&5
5618   (eval $ac_link) 2>&5
5619   ac_status=$?
5620   echo "$as_me:5620: \$? = $ac_status" >&5
5621   (exit $ac_status); } &&
5622          { ac_try='test -s conftest$ac_exeext'
5623   { (eval echo "$as_me:5623: \"$ac_try\"") >&5
5624   (eval $ac_try) 2>&5
5625   ac_status=$?
5626   echo "$as_me:5626: \$? = $ac_status" >&5
5627   (exit $ac_status); }; }; then
5628   cf_cv_ldflags_search_paths_first=yes
5629 else
5630   echo "$as_me: failed program was:" >&5
5631 cat conftest.$ac_ext >&5
5632 cf_cv_ldflags_search_paths_first=no
5633 fi
5634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5635                                 LDFLAGS=$cf_save_LDFLAGS
5636 fi
5637 echo "$as_me:5637: result: $cf_cv_ldflags_search_paths_first" >&5
5638 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5639                 if test $cf_cv_ldflags_search_paths_first = yes; then
5640                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5641                 fi
5642                 ;;
5643         hpux*) #(vi
5644                 # (tested with gcc 2.7.2 -- I don't have c89)
5645                 if test "$GCC" = yes; then
5646                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5647                 else
5648                         CC_SHARED_OPTS='+Z'
5649                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5650                 fi
5651                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5652                 # HP-UX shared libraries must be executable, and should be
5653                 # readonly to exploit a quirk in the memory manager.
5654                 INSTALL_LIB="-m 555"
5655                 ;;
5656         interix*)
5657                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5658                 if test "$cf_cv_shlib_version" = rel; then
5659                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5660                 else
5661                         cf_shared_soname='`basename `'
5662                 fi
5663                 CC_SHARED_OPTS=
5664                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5665                 ;;
5666         irix*) #(vi
5667                 if test "$cf_cv_enable_rpath" = yes ; then
5668                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5669                 fi
5670                 # tested with IRIX 5.2 and 'cc'.
5671                 if test "$GCC" != yes; then
5672                         CC_SHARED_OPTS='-KPIC'
5673                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5674                 else
5675                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5676                 fi
5677                 cf_cv_rm_so_locs=yes
5678                 ;;
5679         linux*|gnu*|k*bsd*-gnu) #(vi
5680                 if test "$DFT_LWR_MODEL" = "shared" ; then
5681                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5682                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5683                 fi
5684                 if test "$cf_cv_enable_rpath" = yes ; then
5685                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5686                 fi
5687
5688         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5689         if test "$cf_cv_shlib_version" = rel; then
5690                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5691         else
5692                 cf_cv_shared_soname='`basename $@`'
5693         fi
5694
5695                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5696                 ;;
5697         mingw*) #(vi
5698                 cf_cv_shlib_version=mingw
5699                 cf_cv_shlib_version_infix=mingw
5700                 CC_SHARED_OPTS=
5701                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5702                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5703                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5704                 cat >mk_shared_lib.sh <<-CF_EOF
5705                 #!/bin/sh
5706                 SHARED_LIB=\$1
5707                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5708                 shift
5709                 cat <<-EOF
5710                 Linking shared library
5711                 ** SHARED_LIB \$SHARED_LIB
5712                 ** IMPORT_LIB \$IMPORT_LIB
5713 EOF
5714                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5715 CF_EOF
5716                 chmod +x mk_shared_lib.sh
5717                 ;;
5718         openbsd[2-9].*|mirbsd*) #(vi
5719                 if test "$DFT_LWR_MODEL" = "shared" ; then
5720                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5721                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5722                 fi
5723                 if test "$cf_cv_enable_rpath" = yes ; then
5724                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5725                 fi
5726                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5727
5728         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5729         if test "$cf_cv_shlib_version" = rel; then
5730                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5731         else
5732                 cf_cv_shared_soname='`basename $@`'
5733         fi
5734
5735                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5736                 ;;
5737         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5738                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5739                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5740                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5741                 ;;
5742         dragonfly*|freebsd*) #(vi
5743                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5744                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5745                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5746                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5747                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5748                 fi
5749
5750         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5751         if test "$cf_cv_shlib_version" = rel; then
5752                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5753         else
5754                 cf_cv_shared_soname='`basename $@`'
5755         fi
5756
5757                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5758                 ;;
5759         netbsd*) #(vi
5760                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5761                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5762                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5763                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5764                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5765                         if test "$cf_cv_shlib_version" = auto; then
5766                         if test -f /usr/libexec/ld.elf_so; then
5767                                 cf_cv_shlib_version=abi
5768                         else
5769                                 cf_cv_shlib_version=rel
5770                         fi
5771                         fi
5772
5773         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5774         if test "$cf_cv_shlib_version" = rel; then
5775                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5776         else
5777                 cf_cv_shared_soname='`basename $@`'
5778         fi
5779
5780                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5781                 else
5782                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5783                 fi
5784                 ;;
5785         osf*|mls+*) #(vi
5786                 # tested with OSF/1 V3.2 and 'cc'
5787                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5788                 # link with shared libs).
5789                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5790                 case $host_os in #(vi
5791                 osf4*)
5792                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5793                         ;;
5794                 esac
5795                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5796                 if test "$DFT_LWR_MODEL" = "shared" ; then
5797                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5798                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5799                 fi
5800                 cf_cv_rm_so_locs=yes
5801                 ;;
5802         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5803                 # tested with osr5.0.5
5804                 if test "$GCC" != yes; then
5805                         CC_SHARED_OPTS='-belf -KPIC'
5806                 fi
5807                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5808                 if test "$cf_cv_enable_rpath" = yes ; then
5809                         # only way is to set LD_RUN_PATH but no switch for it
5810                         RUN_PATH=$libdir
5811                 fi
5812                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5813                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5814                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5815                 ;;
5816         sunos4*) #(vi
5817                 # tested with SunOS 4.1.1 and gcc 2.7.0
5818                 if test "$GCC" != yes; then
5819                         CC_SHARED_OPTS='-KPIC'
5820                 fi
5821                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5822                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5823                 ;;
5824         solaris2*) #(vi
5825                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5826                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5827                 if test "$DFT_LWR_MODEL" = "shared" ; then
5828                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5829                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5830                 fi
5831                 if test "$cf_cv_enable_rpath" = yes ; then
5832                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5833                 fi
5834
5835         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5836         if test "$cf_cv_shlib_version" = rel; then
5837                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5838         else
5839                 cf_cv_shared_soname='`basename $@`'
5840         fi
5841
5842                 if test "$GCC" != yes; then
5843                         cf_save_CFLAGS="$CFLAGS"
5844                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5845                         do
5846                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5847                                 cat >conftest.$ac_ext <<_ACEOF
5848 #line 5848 "configure"
5849 #include "confdefs.h"
5850 #include <stdio.h>
5851 int
5852 main ()
5853 {
5854 printf("Hello\n");
5855   ;
5856   return 0;
5857 }
5858 _ACEOF
5859 rm -f conftest.$ac_objext
5860 if { (eval echo "$as_me:5860: \"$ac_compile\"") >&5
5861   (eval $ac_compile) 2>&5
5862   ac_status=$?
5863   echo "$as_me:5863: \$? = $ac_status" >&5
5864   (exit $ac_status); } &&
5865          { ac_try='test -s conftest.$ac_objext'
5866   { (eval echo "$as_me:5866: \"$ac_try\"") >&5
5867   (eval $ac_try) 2>&5
5868   ac_status=$?
5869   echo "$as_me:5869: \$? = $ac_status" >&5
5870   (exit $ac_status); }; }; then
5871   break
5872 else
5873   echo "$as_me: failed program was:" >&5
5874 cat conftest.$ac_ext >&5
5875 fi
5876 rm -f conftest.$ac_objext conftest.$ac_ext
5877                         done
5878                         CFLAGS="$cf_save_CFLAGS"
5879                         CC_SHARED_OPTS=$cf_shared_opts
5880                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5881                 else
5882                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5883                 fi
5884                 ;;
5885         sysv5uw7*|unix_sv*) #(vi
5886                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5887                 if test "$GCC" != yes; then
5888                         CC_SHARED_OPTS='-KPIC'
5889                 fi
5890                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5891                 ;;
5892         *)
5893                 CC_SHARED_OPTS='unknown'
5894                 MK_SHARED_LIB='echo unknown'
5895                 ;;
5896         esac
5897
5898         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5899         case "$cf_cv_shlib_version" in #(vi
5900         rel|abi)
5901                 case "$MK_SHARED_LIB" in #(vi
5902                 *'-o $@') #(vi
5903                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5904                         ;;
5905                 *)
5906                         { echo "$as_me:5906: WARNING: ignored --with-shlib-version" >&5
5907 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5908                         ;;
5909                 esac
5910                 ;;
5911         esac
5912
5913         # RPATH_LIST is a colon-separated list of directories
5914         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5915         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5916
5917         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5918
5919 echo "${as_me:-configure}:5919: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5920
5921         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5922
5923 echo "${as_me:-configure}:5923: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5924
5925 if test "$CC_SHARED_OPTS" = "unknown"; then
5926         for model in $cf_list_models; do
5927                 if test "$model" = "shared"; then
5928                         { { echo "$as_me:5928: error: Shared libraries are not supported in this version" >&5
5929 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5930    { (exit 1); exit 1; }; }
5931                 fi
5932         done
5933 fi
5934
5935 ### If we're building with rpath, try to link non-standard libs that way too.
5936 if test "$DFT_LWR_MODEL" = "shared"; then
5937
5938 echo "$as_me:5938: checking if rpath-hack should be disabled" >&5
5939 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5940
5941 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5942 if test "${enable_rpath_hack+set}" = set; then
5943   enableval="$enable_rpath_hack"
5944   test "$enableval" != no && enableval=yes
5945   if test "$enableval" != "yes" ; then
5946     cf_disable_rpath_hack=yes
5947   else
5948     cf_disable_rpath_hack=no
5949   fi
5950 else
5951   enableval=yes
5952   cf_disable_rpath_hack=no
5953
5954 fi;
5955 echo "$as_me:5955: result: $cf_disable_rpath_hack" >&5
5956 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5957 if test "$cf_disable_rpath_hack" = no ; then
5958
5959 echo "$as_me:5959: checking for updated LDFLAGS" >&5
5960 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5961 if test -n "$LD_RPATH_OPT" ; then
5962         echo "$as_me:5962: result: maybe" >&5
5963 echo "${ECHO_T}maybe" >&6
5964
5965         for ac_prog in ldd
5966 do
5967   # Extract the first word of "$ac_prog", so it can be a program name with args.
5968 set dummy $ac_prog; ac_word=$2
5969 echo "$as_me:5969: checking for $ac_word" >&5
5970 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5971 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5972   echo $ECHO_N "(cached) $ECHO_C" >&6
5973 else
5974   if test -n "$cf_ldd_prog"; then
5975   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5976 else
5977   ac_save_IFS=$IFS; IFS=$ac_path_separator
5978 ac_dummy="$PATH"
5979 for ac_dir in $ac_dummy; do
5980   IFS=$ac_save_IFS
5981   test -z "$ac_dir" && ac_dir=.
5982   $as_executable_p "$ac_dir/$ac_word" || continue
5983 ac_cv_prog_cf_ldd_prog="$ac_prog"
5984 echo "$as_me:5984: found $ac_dir/$ac_word" >&5
5985 break
5986 done
5987
5988 fi
5989 fi
5990 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5991 if test -n "$cf_ldd_prog"; then
5992   echo "$as_me:5992: result: $cf_ldd_prog" >&5
5993 echo "${ECHO_T}$cf_ldd_prog" >&6
5994 else
5995   echo "$as_me:5995: result: no" >&5
5996 echo "${ECHO_T}no" >&6
5997 fi
5998
5999   test -n "$cf_ldd_prog" && break
6000 done
6001 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6002
6003         cf_rpath_list="/usr/lib /lib"
6004         if test "$cf_ldd_prog" != no
6005         then
6006                 cf_rpath_oops=
6007
6008 cat >conftest.$ac_ext <<_ACEOF
6009 #line 6009 "configure"
6010 #include "confdefs.h"
6011 #include <stdio.h>
6012 int
6013 main ()
6014 {
6015 printf("Hello");
6016   ;
6017   return 0;
6018 }
6019 _ACEOF
6020 rm -f conftest.$ac_objext conftest$ac_exeext
6021 if { (eval echo "$as_me:6021: \"$ac_link\"") >&5
6022   (eval $ac_link) 2>&5
6023   ac_status=$?
6024   echo "$as_me:6024: \$? = $ac_status" >&5
6025   (exit $ac_status); } &&
6026          { ac_try='test -s conftest$ac_exeext'
6027   { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6028   (eval $ac_try) 2>&5
6029   ac_status=$?
6030   echo "$as_me:6030: \$? = $ac_status" >&5
6031   (exit $ac_status); }; }; then
6032   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6033                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6034 else
6035   echo "$as_me: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037 fi
6038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6039
6040                 # If we passed the link-test, but get a "not found" on a given library,
6041                 # this could be due to inept reconfiguration of gcc to make it only
6042                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6043                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6044                 # /usr/local libraries.
6045                 if test -n "$cf_rpath_oops"
6046                 then
6047                         for cf_rpath_src in $cf_rpath_oops
6048                         do
6049                                 for cf_rpath_dir in \
6050                                         /usr/local \
6051                                         /usr/pkg \
6052                                         /opt/sfw
6053                                 do
6054                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6055                                         then
6056                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6057
6058 echo "${as_me:-configure}:6058: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6059
6060                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6061                                                 break
6062                                         fi
6063                                 done
6064                         done
6065                 fi
6066         fi
6067
6068         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6069
6070 echo "${as_me:-configure}:6070: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6071
6072 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6073
6074 echo "${as_me:-configure}:6074: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6075
6076 cf_rpath_dst=
6077 for cf_rpath_src in $LDFLAGS
6078 do
6079         case $cf_rpath_src in #(vi
6080         -L*) #(vi
6081
6082                 # check if this refers to a directory which we will ignore
6083                 cf_rpath_skip=no
6084                 if test -n "$cf_rpath_list"
6085                 then
6086                         for cf_rpath_item in $cf_rpath_list
6087                         do
6088                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6089                                 then
6090                                         cf_rpath_skip=yes
6091                                         break
6092                                 fi
6093                         done
6094                 fi
6095
6096                 if test "$cf_rpath_skip" = no
6097                 then
6098                         # transform the option
6099                         if test "$LD_RPATH_OPT" = "-R " ; then
6100                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6101                         else
6102                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6103                         fi
6104
6105                         # if we have not already added this, add it now
6106                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6107                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6108                         then
6109                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6110
6111 echo "${as_me:-configure}:6111: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6112
6113                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6114                         fi
6115                 fi
6116                 ;;
6117         esac
6118         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6119 done
6120 LDFLAGS=$cf_rpath_dst
6121
6122 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6123
6124 echo "${as_me:-configure}:6124: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6125
6126 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6127
6128 echo "${as_me:-configure}:6128: testing ...checking LIBS $LIBS ..." 1>&5
6129
6130 cf_rpath_dst=
6131 for cf_rpath_src in $LIBS
6132 do
6133         case $cf_rpath_src in #(vi
6134         -L*) #(vi
6135
6136                 # check if this refers to a directory which we will ignore
6137                 cf_rpath_skip=no
6138                 if test -n "$cf_rpath_list"
6139                 then
6140                         for cf_rpath_item in $cf_rpath_list
6141                         do
6142                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6143                                 then
6144                                         cf_rpath_skip=yes
6145                                         break
6146                                 fi
6147                         done
6148                 fi
6149
6150                 if test "$cf_rpath_skip" = no
6151                 then
6152                         # transform the option
6153                         if test "$LD_RPATH_OPT" = "-R " ; then
6154                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6155                         else
6156                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6157                         fi
6158
6159                         # if we have not already added this, add it now
6160                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6161                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6162                         then
6163                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6164
6165 echo "${as_me:-configure}:6165: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6166
6167                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6168                         fi
6169                 fi
6170                 ;;
6171         esac
6172         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6173 done
6174 LIBS=$cf_rpath_dst
6175
6176 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6177
6178 echo "${as_me:-configure}:6178: testing ...checked LIBS $LIBS ..." 1>&5
6179
6180         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6181
6182 echo "${as_me:-configure}:6182: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6183
6184 fi
6185
6186 fi
6187
6188 fi
6189
6190 ###############################################################################
6191
6192 ###     use option --disable-overwrite to leave out the link to -lcurses
6193 echo "$as_me:6193: checking if you wish to install ncurses overwriting curses" >&5
6194 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6195
6196 # Check whether --enable-overwrite or --disable-overwrite was given.
6197 if test "${enable_overwrite+set}" = set; then
6198   enableval="$enable_overwrite"
6199   with_overwrite=$enableval
6200 else
6201   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6202 fi;
6203 echo "$as_me:6203: result: $with_overwrite" >&5
6204 echo "${ECHO_T}$with_overwrite" >&6
6205
6206 echo "$as_me:6206: checking if external terminfo-database is used" >&5
6207 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6208
6209 # Check whether --enable-database or --disable-database was given.
6210 if test "${enable_database+set}" = set; then
6211   enableval="$enable_database"
6212   use_database=$enableval
6213 else
6214   use_database=yes
6215 fi;
6216 echo "$as_me:6216: result: $use_database" >&5
6217 echo "${ECHO_T}$use_database" >&6
6218
6219 case $host_os in #(vi
6220 os2*) #(vi
6221         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6222         ;;
6223 *) #(vi
6224         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6225         ;;
6226 esac
6227
6228 if test "$use_database" != no ; then
6229         cat >>confdefs.h <<\EOF
6230 #define USE_DATABASE 1
6231 EOF
6232
6233         echo "$as_me:6233: checking which terminfo source-file will be installed" >&5
6234 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6235
6236 # Check whether --with-database or --without-database was given.
6237 if test "${with_database+set}" = set; then
6238   withval="$with_database"
6239   TERMINFO_SRC=$withval
6240 fi;
6241         echo "$as_me:6241: result: $TERMINFO_SRC" >&5
6242 echo "${ECHO_T}$TERMINFO_SRC" >&6
6243
6244         echo "$as_me:6244: checking whether to use hashed database instead of directory/tree" >&5
6245 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6246
6247 # Check whether --with-hashed-db or --without-hashed-db was given.
6248 if test "${with_hashed_db+set}" = set; then
6249   withval="$with_hashed_db"
6250
6251 else
6252   with_hashed_db=no
6253 fi;
6254         echo "$as_me:6254: result: $with_hashed_db" >&5
6255 echo "${ECHO_T}$with_hashed_db" >&6
6256 else
6257         with_hashed_db=no
6258 fi
6259
6260 echo "$as_me:6260: checking for list of fallback descriptions" >&5
6261 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6262
6263 # Check whether --with-fallbacks or --without-fallbacks was given.
6264 if test "${with_fallbacks+set}" = set; then
6265   withval="$with_fallbacks"
6266   with_fallback=$withval
6267 else
6268   with_fallback=
6269 fi;
6270 echo "$as_me:6270: result: $with_fallback" >&5
6271 echo "${ECHO_T}$with_fallback" >&6
6272 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6273
6274 echo "$as_me:6274: checking if you want modern xterm or antique" >&5
6275 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6276
6277 # Check whether --with-xterm-new or --without-xterm-new was given.
6278 if test "${with_xterm_new+set}" = set; then
6279   withval="$with_xterm_new"
6280   with_xterm_new=$withval
6281 else
6282   with_xterm_new=yes
6283 fi;
6284 case $with_xterm_new in
6285 no)     with_xterm_new=xterm-old;;
6286 *)      with_xterm_new=xterm-new;;
6287 esac
6288 echo "$as_me:6288: result: $with_xterm_new" >&5
6289 echo "${ECHO_T}$with_xterm_new" >&6
6290 WHICH_XTERM=$with_xterm_new
6291
6292 echo "$as_me:6292: checking if xterm backspace sends BS or DEL" >&5
6293 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6294
6295 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6296 if test "${with_xterm_kbs+set}" = set; then
6297   withval="$with_xterm_kbs"
6298   with_xterm_kbs=$withval
6299 else
6300   with_xterm_kbs=BS
6301 fi;
6302 case x$with_xterm_kbs in
6303 xyes|xno|xBS|xbs|x8)
6304         with_xterm_kbs=BS
6305         ;;
6306 xDEL|xdel|x127)
6307         with_xterm_kbs=DEL
6308         ;;
6309 *)
6310         with_xterm_kbs=$withval
6311         ;;
6312 esac
6313 echo "$as_me:6313: result: $with_xterm_kbs" >&5
6314 echo "${ECHO_T}$with_xterm_kbs" >&6
6315 XTERM_KBS=$with_xterm_kbs
6316
6317 MAKE_TERMINFO=
6318 if test "$use_database" = no ; then
6319         TERMINFO="${datadir}/terminfo"
6320         MAKE_TERMINFO="#"
6321 else
6322
6323 echo "$as_me:6323: checking for list of terminfo directories" >&5
6324 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6325
6326         case $cf_cv_system_name in
6327         os2*)   PATH_SEPARATOR=';'  ;;
6328         *)      PATH_SEPARATOR=':'  ;;
6329         esac
6330
6331 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6332 if test "${with_terminfo_dirs+set}" = set; then
6333   withval="$with_terminfo_dirs"
6334
6335 else
6336   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6337 fi;
6338 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6339 cf_dst_path=
6340 for cf_src_path in $withval
6341 do
6342
6343 if test "x$prefix" != xNONE; then
6344   cf_path_syntax="$prefix"
6345 else
6346   cf_path_syntax="$ac_default_prefix"
6347 fi
6348
6349 case ".$cf_src_path" in #(vi
6350 .\$\(*\)*|.\'*\'*) #(vi
6351   ;;
6352 ..|./*|.\\*) #(vi
6353   ;;
6354 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6355   ;;
6356 .\${*prefix}*|.\${*dir}*) #(vi
6357   eval cf_src_path="$cf_src_path"
6358   case ".$cf_src_path" in #(vi
6359   .NONE/*)
6360     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6361     ;;
6362   esac
6363   ;; #(vi
6364 .no|.NONE/*)
6365   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6366   ;;
6367 *)
6368   { { echo "$as_me:6368: error: expected a pathname, not \"$cf_src_path\"" >&5
6369 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6370    { (exit 1); exit 1; }; }
6371   ;;
6372 esac
6373
6374   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6375   cf_dst_path="${cf_dst_path}${cf_src_path}"
6376 done
6377 IFS="$ac_save_ifs"
6378
6379 eval 'TERMINFO_DIRS="$cf_dst_path"'
6380
6381 echo "$as_me:6381: result: $TERMINFO_DIRS" >&5
6382 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6383 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6384 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6385 EOF
6386
6387 echo "$as_me:6387: checking for default terminfo directory" >&5
6388 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6389
6390 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6391 if test "${with_default_terminfo_dir+set}" = set; then
6392   withval="$with_default_terminfo_dir"
6393
6394 else
6395   withval="${TERMINFO:-${datadir}/terminfo}"
6396 fi; if test -n "${datadir}/terminfo" ; then
6397
6398 if test "x$prefix" != xNONE; then
6399   cf_path_syntax="$prefix"
6400 else
6401   cf_path_syntax="$ac_default_prefix"
6402 fi
6403
6404 case ".$withval" in #(vi
6405 .\$\(*\)*|.\'*\'*) #(vi
6406   ;;
6407 ..|./*|.\\*) #(vi
6408   ;;
6409 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6410   ;;
6411 .\${*prefix}*|.\${*dir}*) #(vi
6412   eval withval="$withval"
6413   case ".$withval" in #(vi
6414   .NONE/*)
6415     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6416     ;;
6417   esac
6418   ;; #(vi
6419 .no|.NONE/*)
6420   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6421   ;;
6422 *)
6423   { { echo "$as_me:6423: error: expected a pathname, not \"$withval\"" >&5
6424 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6425    { (exit 1); exit 1; }; }
6426   ;;
6427 esac
6428
6429 fi
6430 TERMINFO="$withval"
6431
6432 echo "$as_me:6432: result: $TERMINFO" >&5
6433 echo "${ECHO_T}$TERMINFO" >&6
6434 cat >>confdefs.h <<EOF
6435 #define TERMINFO "$TERMINFO"
6436 EOF
6437
6438 fi
6439
6440 ###     use option --disable-big-core to make tic run on small machines
6441 ###     We need 4Mb, check if we can allocate 50% more than that.
6442 echo "$as_me:6442: checking if big-core option selected" >&5
6443 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6444
6445 # Check whether --enable-big-core or --disable-big-core was given.
6446 if test "${enable_big_core+set}" = set; then
6447   enableval="$enable_big_core"
6448   with_big_core=$enableval
6449 else
6450   if test "$cross_compiling" = yes; then
6451   with_big_core=no
6452 else
6453   cat >conftest.$ac_ext <<_ACEOF
6454 #line 6454 "configure"
6455 #include "confdefs.h"
6456
6457 #include <stdlib.h>
6458 #include <string.h>
6459 int main() {
6460         unsigned long n = 6000000L;
6461         char *s = malloc(n);
6462         if (s != 0)
6463                 s[0] = s[n-1] = 0;
6464         ${cf_cv_main_return:-return}(s == 0);
6465 }
6466 _ACEOF
6467 rm -f conftest$ac_exeext
6468 if { (eval echo "$as_me:6468: \"$ac_link\"") >&5
6469   (eval $ac_link) 2>&5
6470   ac_status=$?
6471   echo "$as_me:6471: \$? = $ac_status" >&5
6472   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6473   { (eval echo "$as_me:6473: \"$ac_try\"") >&5
6474   (eval $ac_try) 2>&5
6475   ac_status=$?
6476   echo "$as_me:6476: \$? = $ac_status" >&5
6477   (exit $ac_status); }; }; then
6478   with_big_core=yes
6479 else
6480   echo "$as_me: program exited with status $ac_status" >&5
6481 echo "$as_me: failed program was:" >&5
6482 cat conftest.$ac_ext >&5
6483 with_big_core=no
6484 fi
6485 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6486 fi
6487 fi;
6488 echo "$as_me:6488: result: $with_big_core" >&5
6489 echo "${ECHO_T}$with_big_core" >&6
6490 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6491 #define HAVE_BIG_CORE 1
6492 EOF
6493
6494 ### ISO C only guarantees 512-char strings, we have tables which load faster
6495 ### when constructed using "big" strings.  More than the C compiler, the awk
6496 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6497 echo "$as_me:6497: checking if big-strings option selected" >&5
6498 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6499
6500 # Check whether --enable-big-strings or --disable-big-strings was given.
6501 if test "${enable_big_strings+set}" = set; then
6502   enableval="$enable_big_strings"
6503   with_big_strings=$enableval
6504 else
6505
6506         case x$AWK in #(vi
6507         x)
6508                 eval with_big_strings=no
6509                 ;;
6510         *) #(vi
6511                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6512                         | $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
6513                         eval with_big_strings=yes
6514                 else
6515                         eval with_big_strings=no
6516                 fi
6517                 ;;
6518         esac
6519
6520 fi;
6521 echo "$as_me:6521: result: $with_big_strings" >&5
6522 echo "${ECHO_T}$with_big_strings" >&6
6523
6524 USE_BIG_STRINGS=0
6525 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6526
6527 ###     use option --enable-termcap to compile in the termcap fallback support
6528 echo "$as_me:6528: checking if you want termcap-fallback support" >&5
6529 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6530
6531 # Check whether --enable-termcap or --disable-termcap was given.
6532 if test "${enable_termcap+set}" = set; then
6533   enableval="$enable_termcap"
6534   with_termcap=$enableval
6535 else
6536   with_termcap=no
6537 fi;
6538 echo "$as_me:6538: result: $with_termcap" >&5
6539 echo "${ECHO_T}$with_termcap" >&6
6540
6541 if test "$with_termcap" != "yes" ; then
6542         if test "$use_database" = no ; then
6543                 if test -z "$with_fallback" ; then
6544                         { { echo "$as_me:6544: error: You have disabled the database w/o specifying fallbacks" >&5
6545 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6546    { (exit 1); exit 1; }; }
6547                 fi
6548         fi
6549         cat >>confdefs.h <<\EOF
6550 #define PURE_TERMINFO 1
6551 EOF
6552
6553 else
6554
6555 if test "$with_ticlib" != no ; then
6556         { { echo "$as_me:6556: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6557 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6558    { (exit 1); exit 1; }; }
6559 fi
6560
6561 cat >>confdefs.h <<\EOF
6562 #define USE_TERMCAP 1
6563 EOF
6564
6565 echo "$as_me:6565: checking for list of termcap files" >&5
6566 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6567
6568 # Check whether --with-termpath or --without-termpath was given.
6569 if test "${with_termpath+set}" = set; then
6570   withval="$with_termpath"
6571
6572 else
6573   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6574 fi;
6575 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6576 cf_dst_path=
6577 for cf_src_path in $withval
6578 do
6579
6580 if test "x$prefix" != xNONE; then
6581   cf_path_syntax="$prefix"
6582 else
6583   cf_path_syntax="$ac_default_prefix"
6584 fi
6585
6586 case ".$cf_src_path" in #(vi
6587 .\$\(*\)*|.\'*\'*) #(vi
6588   ;;
6589 ..|./*|.\\*) #(vi
6590   ;;
6591 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6592   ;;
6593 .\${*prefix}*|.\${*dir}*) #(vi
6594   eval cf_src_path="$cf_src_path"
6595   case ".$cf_src_path" in #(vi
6596   .NONE/*)
6597     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6598     ;;
6599   esac
6600   ;; #(vi
6601 .no|.NONE/*)
6602   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6603   ;;
6604 *)
6605   { { echo "$as_me:6605: error: expected a pathname, not \"$cf_src_path\"" >&5
6606 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6607    { (exit 1); exit 1; }; }
6608   ;;
6609 esac
6610
6611   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6612   cf_dst_path="${cf_dst_path}${cf_src_path}"
6613 done
6614 IFS="$ac_save_ifs"
6615
6616 eval 'TERMPATH="$cf_dst_path"'
6617
6618 echo "$as_me:6618: result: $TERMPATH" >&5
6619 echo "${ECHO_T}$TERMPATH" >&6
6620 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6621 #define TERMPATH "$TERMPATH"
6622 EOF
6623
6624 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6625 echo "$as_me:6625: checking if fast termcap-loader is needed" >&5
6626 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6627
6628 # Check whether --enable-getcap or --disable-getcap was given.
6629 if test "${enable_getcap+set}" = set; then
6630   enableval="$enable_getcap"
6631   with_getcap=$enableval
6632 else
6633   with_getcap=no
6634 fi;
6635 echo "$as_me:6635: result: $with_getcap" >&5
6636 echo "${ECHO_T}$with_getcap" >&6
6637 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6638 #define USE_GETCAP 1
6639 EOF
6640
6641 echo "$as_me:6641: checking if translated termcaps will be cached in ~/.terminfo" >&5
6642 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6643
6644 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6645 if test "${enable_getcap_cache+set}" = set; then
6646   enableval="$enable_getcap_cache"
6647   with_getcap_cache=$enableval
6648 else
6649   with_getcap_cache=no
6650 fi;
6651 echo "$as_me:6651: result: $with_getcap_cache" >&5
6652 echo "${ECHO_T}$with_getcap_cache" >&6
6653 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6654 #define USE_GETCAP_CACHE 1
6655 EOF
6656
6657 fi
6658
6659 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6660 echo "$as_me:6660: checking if ~/.terminfo is wanted" >&5
6661 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6662
6663 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6664 if test "${enable_home_terminfo+set}" = set; then
6665   enableval="$enable_home_terminfo"
6666   with_home_terminfo=$enableval
6667 else
6668   with_home_terminfo=yes
6669 fi;
6670 echo "$as_me:6670: result: $with_home_terminfo" >&5
6671 echo "${ECHO_T}$with_home_terminfo" >&6
6672 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6673 #define USE_HOME_TERMINFO 1
6674 EOF
6675
6676 echo "$as_me:6676: checking if you want to use restricted environment when running as root" >&5
6677 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6678
6679 # Check whether --enable-root-environ or --disable-root-environ was given.
6680 if test "${enable_root_environ+set}" = set; then
6681   enableval="$enable_root_environ"
6682   with_root_environ=$enableval
6683 else
6684   with_root_environ=yes
6685 fi;
6686 echo "$as_me:6686: result: $with_root_environ" >&5
6687 echo "${ECHO_T}$with_root_environ" >&6
6688 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6689 #define USE_ROOT_ENVIRON 1
6690 EOF
6691
6692 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6693 ###   to reduce storage requirements for the terminfo database.
6694
6695 for ac_func in \
6696         remove \
6697         unlink
6698 do
6699 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6700 echo "$as_me:6700: checking for $ac_func" >&5
6701 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6702 if eval "test \"\${$as_ac_var+set}\" = set"; then
6703   echo $ECHO_N "(cached) $ECHO_C" >&6
6704 else
6705   cat >conftest.$ac_ext <<_ACEOF
6706 #line 6706 "configure"
6707 #include "confdefs.h"
6708 /* System header to define __stub macros and hopefully few prototypes,
6709     which can conflict with char $ac_func (); below.  */
6710 #include <assert.h>
6711 /* Override any gcc2 internal prototype to avoid an error.  */
6712 #ifdef __cplusplus
6713 extern "C"
6714 #endif
6715 /* We use char because int might match the return type of a gcc2
6716    builtin and then its argument prototype would still apply.  */
6717 char $ac_func ();
6718 char (*f) ();
6719
6720 int
6721 main ()
6722 {
6723 /* The GNU C library defines this for functions which it implements
6724     to always fail with ENOSYS.  Some functions are actually named
6725     something starting with __ and the normal name is an alias.  */
6726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6727 choke me
6728 #else
6729 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6730 #endif
6731
6732   ;
6733   return 0;
6734 }
6735 _ACEOF
6736 rm -f conftest.$ac_objext conftest$ac_exeext
6737 if { (eval echo "$as_me:6737: \"$ac_link\"") >&5
6738   (eval $ac_link) 2>&5
6739   ac_status=$?
6740   echo "$as_me:6740: \$? = $ac_status" >&5
6741   (exit $ac_status); } &&
6742          { ac_try='test -s conftest$ac_exeext'
6743   { (eval echo "$as_me:6743: \"$ac_try\"") >&5
6744   (eval $ac_try) 2>&5
6745   ac_status=$?
6746   echo "$as_me:6746: \$? = $ac_status" >&5
6747   (exit $ac_status); }; }; then
6748   eval "$as_ac_var=yes"
6749 else
6750   echo "$as_me: failed program was:" >&5
6751 cat conftest.$ac_ext >&5
6752 eval "$as_ac_var=no"
6753 fi
6754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6755 fi
6756 echo "$as_me:6756: result: `eval echo '${'$as_ac_var'}'`" >&5
6757 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6758 if test `eval echo '${'$as_ac_var'}'` = yes; then
6759   cat >>confdefs.h <<EOF
6760 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6761 EOF
6762
6763 fi
6764 done
6765
6766 if test "$cross_compiling" = yes ; then
6767
6768 for ac_func in \
6769                 link \
6770                 symlink
6771 do
6772 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6773 echo "$as_me:6773: checking for $ac_func" >&5
6774 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6775 if eval "test \"\${$as_ac_var+set}\" = set"; then
6776   echo $ECHO_N "(cached) $ECHO_C" >&6
6777 else
6778   cat >conftest.$ac_ext <<_ACEOF
6779 #line 6779 "configure"
6780 #include "confdefs.h"
6781 /* System header to define __stub macros and hopefully few prototypes,
6782     which can conflict with char $ac_func (); below.  */
6783 #include <assert.h>
6784 /* Override any gcc2 internal prototype to avoid an error.  */
6785 #ifdef __cplusplus
6786 extern "C"
6787 #endif
6788 /* We use char because int might match the return type of a gcc2
6789    builtin and then its argument prototype would still apply.  */
6790 char $ac_func ();
6791 char (*f) ();
6792
6793 int
6794 main ()
6795 {
6796 /* The GNU C library defines this for functions which it implements
6797     to always fail with ENOSYS.  Some functions are actually named
6798     something starting with __ and the normal name is an alias.  */
6799 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6800 choke me
6801 #else
6802 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6803 #endif
6804
6805   ;
6806   return 0;
6807 }
6808 _ACEOF
6809 rm -f conftest.$ac_objext conftest$ac_exeext
6810 if { (eval echo "$as_me:6810: \"$ac_link\"") >&5
6811   (eval $ac_link) 2>&5
6812   ac_status=$?
6813   echo "$as_me:6813: \$? = $ac_status" >&5
6814   (exit $ac_status); } &&
6815          { ac_try='test -s conftest$ac_exeext'
6816   { (eval echo "$as_me:6816: \"$ac_try\"") >&5
6817   (eval $ac_try) 2>&5
6818   ac_status=$?
6819   echo "$as_me:6819: \$? = $ac_status" >&5
6820   (exit $ac_status); }; }; then
6821   eval "$as_ac_var=yes"
6822 else
6823   echo "$as_me: failed program was:" >&5
6824 cat conftest.$ac_ext >&5
6825 eval "$as_ac_var=no"
6826 fi
6827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6828 fi
6829 echo "$as_me:6829: result: `eval echo '${'$as_ac_var'}'`" >&5
6830 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6831 if test `eval echo '${'$as_ac_var'}'` = yes; then
6832   cat >>confdefs.h <<EOF
6833 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6834 EOF
6835
6836 fi
6837 done
6838
6839 else
6840         echo "$as_me:6840: checking if link/symlink functions work" >&5
6841 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6842 if test "${cf_cv_link_funcs+set}" = set; then
6843   echo $ECHO_N "(cached) $ECHO_C" >&6
6844 else
6845
6846                 cf_cv_link_funcs=
6847                 for cf_func in link symlink ; do
6848                         if test "$cross_compiling" = yes; then
6849
6850                         eval 'ac_cv_func_'$cf_func'=error'
6851 else
6852   cat >conftest.$ac_ext <<_ACEOF
6853 #line 6853 "configure"
6854 #include "confdefs.h"
6855
6856 #include <sys/types.h>
6857 #include <sys/stat.h>
6858 #ifdef HAVE_UNISTD_H
6859 #include <unistd.h>
6860 #endif
6861 int main()
6862 {
6863         int fail = 0;
6864         char *src = "config.log";
6865         char *dst = "conftest.chk";
6866         struct stat src_sb;
6867         struct stat dst_sb;
6868
6869         stat(src, &src_sb);
6870         fail = ($cf_func("config.log", "conftest.chk") < 0)
6871             || (stat(dst, &dst_sb) < 0)
6872             || (dst_sb.st_mtime != src_sb.st_mtime);
6873 #ifdef HAVE_UNLINK
6874         unlink(dst);
6875 #else
6876         remove(dst);
6877 #endif
6878         ${cf_cv_main_return:-return} (fail);
6879 }
6880
6881 _ACEOF
6882 rm -f conftest$ac_exeext
6883 if { (eval echo "$as_me:6883: \"$ac_link\"") >&5
6884   (eval $ac_link) 2>&5
6885   ac_status=$?
6886   echo "$as_me:6886: \$? = $ac_status" >&5
6887   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6888   { (eval echo "$as_me:6888: \"$ac_try\"") >&5
6889   (eval $ac_try) 2>&5
6890   ac_status=$?
6891   echo "$as_me:6891: \$? = $ac_status" >&5
6892   (exit $ac_status); }; }; then
6893
6894                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6895                         eval 'ac_cv_func_'$cf_func'=yes'
6896 else
6897   echo "$as_me: program exited with status $ac_status" >&5
6898 echo "$as_me: failed program was:" >&5
6899 cat conftest.$ac_ext >&5
6900
6901                         eval 'ac_cv_func_'$cf_func'=no'
6902 fi
6903 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6904 fi
6905                 done
6906                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6907
6908 fi
6909 echo "$as_me:6909: result: $cf_cv_link_funcs" >&5
6910 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6911         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6912 #define HAVE_LINK 1
6913 EOF
6914
6915         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6916 #define HAVE_SYMLINK 1
6917 EOF
6918
6919 fi
6920
6921 with_links=no
6922 with_symlinks=no
6923
6924 # soft links (symbolic links) are useful for some systems where hard links do
6925 # not work, or to make it simpler to copy terminfo trees around.
6926 if test "$ac_cv_func_symlink" = yes ; then
6927     echo "$as_me:6927: checking if tic should use symbolic links" >&5
6928 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6929
6930 # Check whether --enable-symlinks or --disable-symlinks was given.
6931 if test "${enable_symlinks+set}" = set; then
6932   enableval="$enable_symlinks"
6933   with_symlinks=$enableval
6934 else
6935   with_symlinks=no
6936 fi;
6937     echo "$as_me:6937: result: $with_symlinks" >&5
6938 echo "${ECHO_T}$with_symlinks" >&6
6939 fi
6940
6941 # If we have hard links and did not choose to use soft links instead, there is
6942 # no reason to make this choice optional - use the hard links.
6943 if test "$with_symlinks" = no ; then
6944     echo "$as_me:6944: checking if tic should use hard links" >&5
6945 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6946     if test "$ac_cv_func_link" = yes ; then
6947         with_links=yes
6948     else
6949         with_links=no
6950     fi
6951     echo "$as_me:6951: result: $with_links" >&5
6952 echo "${ECHO_T}$with_links" >&6
6953 fi
6954
6955 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6956 #define USE_LINKS 1
6957 EOF
6958
6959 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6960 #define USE_SYMLINKS 1
6961 EOF
6962
6963 ###   use option --enable-broken-linker to force on use of broken-linker support
6964 echo "$as_me:6964: checking if you want broken-linker support code" >&5
6965 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6966
6967 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6968 if test "${enable_broken_linker+set}" = set; then
6969   enableval="$enable_broken_linker"
6970   with_broken_linker=$enableval
6971 else
6972   with_broken_linker=${BROKEN_LINKER:-no}
6973 fi;
6974 echo "$as_me:6974: result: $with_broken_linker" >&5
6975 echo "${ECHO_T}$with_broken_linker" >&6
6976
6977 BROKEN_LINKER=0
6978 if test "$with_broken_linker" = yes ; then
6979         cat >>confdefs.h <<\EOF
6980 #define BROKEN_LINKER 1
6981 EOF
6982
6983         BROKEN_LINKER=1
6984 elif test "$DFT_LWR_MODEL" = shared ; then
6985         case $cf_cv_system_name in #(vi
6986         cygwin*)
6987                 cat >>confdefs.h <<\EOF
6988 #define BROKEN_LINKER 1
6989 EOF
6990
6991                 BROKEN_LINKER=1
6992                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6993
6994 echo "${as_me:-configure}:6994: testing cygwin linker is broken anyway ..." 1>&5
6995
6996                 ;;
6997         esac
6998 fi
6999
7000 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7001 echo "$as_me:7001: checking if tputs should process BSD-style prefix padding" >&5
7002 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7003
7004 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7005 if test "${enable_bsdpad+set}" = set; then
7006   enableval="$enable_bsdpad"
7007   with_bsdpad=$enableval
7008 else
7009   with_bsdpad=no
7010 fi;
7011 echo "$as_me:7011: result: $with_bsdpad" >&5
7012 echo "${ECHO_T}$with_bsdpad" >&6
7013 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7014 #define BSD_TPUTS 1
7015 EOF
7016
7017 ###   use option --enable-widec to turn on use of wide-character support
7018 NCURSES_CH_T=chtype
7019 NCURSES_LIBUTF8=0
7020
7021 NEED_WCHAR_H=0
7022 NCURSES_MBSTATE_T=0
7023 NCURSES_WCHAR_T=0
7024 NCURSES_WINT_T=0
7025
7026 # Check to define _XOPEN_SOURCE "automatically"
7027
7028 cf_XOPEN_SOURCE=500
7029 cf_POSIX_C_SOURCE=199506L
7030 cf_xopen_source=
7031
7032 case $host_os in #(vi
7033 aix[4-7]*) #(vi
7034         cf_xopen_source="-D_ALL_SOURCE"
7035         ;;
7036 cygwin) #(vi
7037         cf_XOPEN_SOURCE=600
7038         ;;
7039 darwin[0-8].*) #(vi
7040         cf_xopen_source="-D_APPLE_C_SOURCE"
7041         ;;
7042 darwin*) #(vi
7043         cf_xopen_source="-D_DARWIN_C_SOURCE"
7044         cf_XOPEN_SOURCE=
7045         ;;
7046 freebsd*|dragonfly*) #(vi
7047         # 5.x headers associate
7048         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7049         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7050         cf_POSIX_C_SOURCE=200112L
7051         cf_XOPEN_SOURCE=600
7052         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7053         ;;
7054 hpux11*) #(vi
7055         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7056         ;;
7057 hpux*) #(vi
7058         cf_xopen_source="-D_HPUX_SOURCE"
7059         ;;
7060 irix[56].*) #(vi
7061         cf_xopen_source="-D_SGI_SOURCE"
7062         cf_XOPEN_SOURCE=
7063         ;;
7064 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7065
7066 echo "$as_me:7066: checking if we must define _GNU_SOURCE" >&5
7067 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7068 if test "${cf_cv_gnu_source+set}" = set; then
7069   echo $ECHO_N "(cached) $ECHO_C" >&6
7070 else
7071
7072 cat >conftest.$ac_ext <<_ACEOF
7073 #line 7073 "configure"
7074 #include "confdefs.h"
7075 #include <sys/types.h>
7076 int
7077 main ()
7078 {
7079
7080 #ifndef _XOPEN_SOURCE
7081 make an error
7082 #endif
7083   ;
7084   return 0;
7085 }
7086 _ACEOF
7087 rm -f conftest.$ac_objext
7088 if { (eval echo "$as_me:7088: \"$ac_compile\"") >&5
7089   (eval $ac_compile) 2>&5
7090   ac_status=$?
7091   echo "$as_me:7091: \$? = $ac_status" >&5
7092   (exit $ac_status); } &&
7093          { ac_try='test -s conftest.$ac_objext'
7094   { (eval echo "$as_me:7094: \"$ac_try\"") >&5
7095   (eval $ac_try) 2>&5
7096   ac_status=$?
7097   echo "$as_me:7097: \$? = $ac_status" >&5
7098   (exit $ac_status); }; }; then
7099   cf_cv_gnu_source=no
7100 else
7101   echo "$as_me: failed program was:" >&5
7102 cat conftest.$ac_ext >&5
7103 cf_save="$CPPFLAGS"
7104          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7105          cat >conftest.$ac_ext <<_ACEOF
7106 #line 7106 "configure"
7107 #include "confdefs.h"
7108 #include <sys/types.h>
7109 int
7110 main ()
7111 {
7112
7113 #ifdef _XOPEN_SOURCE
7114 make an error
7115 #endif
7116   ;
7117   return 0;
7118 }
7119 _ACEOF
7120 rm -f conftest.$ac_objext
7121 if { (eval echo "$as_me:7121: \"$ac_compile\"") >&5
7122   (eval $ac_compile) 2>&5
7123   ac_status=$?
7124   echo "$as_me:7124: \$? = $ac_status" >&5
7125   (exit $ac_status); } &&
7126          { ac_try='test -s conftest.$ac_objext'
7127   { (eval echo "$as_me:7127: \"$ac_try\"") >&5
7128   (eval $ac_try) 2>&5
7129   ac_status=$?
7130   echo "$as_me:7130: \$? = $ac_status" >&5
7131   (exit $ac_status); }; }; then
7132   cf_cv_gnu_source=no
7133 else
7134   echo "$as_me: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
7136 cf_cv_gnu_source=yes
7137 fi
7138 rm -f conftest.$ac_objext conftest.$ac_ext
7139         CPPFLAGS="$cf_save"
7140
7141 fi
7142 rm -f conftest.$ac_objext conftest.$ac_ext
7143
7144 fi
7145 echo "$as_me:7145: result: $cf_cv_gnu_source" >&5
7146 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7147 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7148
7149         ;;
7150 mirbsd*) #(vi
7151         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7152         cf_XOPEN_SOURCE=
7153
7154 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7155
7156 cf_save_CFLAGS="$CFLAGS"
7157 cf_save_CPPFLAGS="$CPPFLAGS"
7158
7159 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7160         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7161                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7162
7163 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7164         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7165                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7166
7167 echo "$as_me:7167: checking if we should define _POSIX_C_SOURCE" >&5
7168 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7169 if test "${cf_cv_posix_c_source+set}" = set; then
7170   echo $ECHO_N "(cached) $ECHO_C" >&6
7171 else
7172
7173 echo "${as_me:-configure}:7173: testing if the symbol is already defined go no further ..." 1>&5
7174
7175         cat >conftest.$ac_ext <<_ACEOF
7176 #line 7176 "configure"
7177 #include "confdefs.h"
7178 #include <sys/types.h>
7179 int
7180 main ()
7181 {
7182
7183 #ifndef _POSIX_C_SOURCE
7184 make an error
7185 #endif
7186   ;
7187   return 0;
7188 }
7189 _ACEOF
7190 rm -f conftest.$ac_objext
7191 if { (eval echo "$as_me:7191: \"$ac_compile\"") >&5
7192   (eval $ac_compile) 2>&5
7193   ac_status=$?
7194   echo "$as_me:7194: \$? = $ac_status" >&5
7195   (exit $ac_status); } &&
7196          { ac_try='test -s conftest.$ac_objext'
7197   { (eval echo "$as_me:7197: \"$ac_try\"") >&5
7198   (eval $ac_try) 2>&5
7199   ac_status=$?
7200   echo "$as_me:7200: \$? = $ac_status" >&5
7201   (exit $ac_status); }; }; then
7202   cf_cv_posix_c_source=no
7203 else
7204   echo "$as_me: failed program was:" >&5
7205 cat conftest.$ac_ext >&5
7206 cf_want_posix_source=no
7207          case .$cf_POSIX_C_SOURCE in #(vi
7208          .[12]??*) #(vi
7209                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7210                 ;;
7211          .2) #(vi
7212                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7213                 cf_want_posix_source=yes
7214                 ;;
7215          .*)
7216                 cf_want_posix_source=yes
7217                 ;;
7218          esac
7219          if test "$cf_want_posix_source" = yes ; then
7220                 cat >conftest.$ac_ext <<_ACEOF
7221 #line 7221 "configure"
7222 #include "confdefs.h"
7223 #include <sys/types.h>
7224 int
7225 main ()
7226 {
7227
7228 #ifdef _POSIX_SOURCE
7229 make an error
7230 #endif
7231   ;
7232   return 0;
7233 }
7234 _ACEOF
7235 rm -f conftest.$ac_objext
7236 if { (eval echo "$as_me:7236: \"$ac_compile\"") >&5
7237   (eval $ac_compile) 2>&5
7238   ac_status=$?
7239   echo "$as_me:7239: \$? = $ac_status" >&5
7240   (exit $ac_status); } &&
7241          { ac_try='test -s conftest.$ac_objext'
7242   { (eval echo "$as_me:7242: \"$ac_try\"") >&5
7243   (eval $ac_try) 2>&5
7244   ac_status=$?
7245   echo "$as_me:7245: \$? = $ac_status" >&5
7246   (exit $ac_status); }; }; then
7247   :
7248 else
7249   echo "$as_me: failed program was:" >&5
7250 cat conftest.$ac_ext >&5
7251 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7252 fi
7253 rm -f conftest.$ac_objext conftest.$ac_ext
7254          fi
7255
7256 echo "${as_me:-configure}:7256: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7257
7258          CFLAGS="$cf_trim_CFLAGS"
7259          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7260
7261 echo "${as_me:-configure}:7261: testing if the second compile does not leave our definition intact error ..." 1>&5
7262
7263          cat >conftest.$ac_ext <<_ACEOF
7264 #line 7264 "configure"
7265 #include "confdefs.h"
7266 #include <sys/types.h>
7267 int
7268 main ()
7269 {
7270
7271 #ifndef _POSIX_C_SOURCE
7272 make an error
7273 #endif
7274   ;
7275   return 0;
7276 }
7277 _ACEOF
7278 rm -f conftest.$ac_objext
7279 if { (eval echo "$as_me:7279: \"$ac_compile\"") >&5
7280   (eval $ac_compile) 2>&5
7281   ac_status=$?
7282   echo "$as_me:7282: \$? = $ac_status" >&5
7283   (exit $ac_status); } &&
7284          { ac_try='test -s conftest.$ac_objext'
7285   { (eval echo "$as_me:7285: \"$ac_try\"") >&5
7286   (eval $ac_try) 2>&5
7287   ac_status=$?
7288   echo "$as_me:7288: \$? = $ac_status" >&5
7289   (exit $ac_status); }; }; then
7290   :
7291 else
7292   echo "$as_me: failed program was:" >&5
7293 cat conftest.$ac_ext >&5
7294 cf_cv_posix_c_source=no
7295 fi
7296 rm -f conftest.$ac_objext conftest.$ac_ext
7297          CFLAGS="$cf_save_CFLAGS"
7298          CPPFLAGS="$cf_save_CPPFLAGS"
7299
7300 fi
7301 rm -f conftest.$ac_objext conftest.$ac_ext
7302
7303 fi
7304 echo "$as_me:7304: result: $cf_cv_posix_c_source" >&5
7305 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7306
7307 if test "$cf_cv_posix_c_source" != no ; then
7308         CFLAGS="$cf_trim_CFLAGS"
7309         CPPFLAGS="$cf_trim_CPPFLAGS"
7310
7311 cf_fix_cppflags=no
7312 cf_new_cflags=
7313 cf_new_cppflags=
7314 cf_new_extra_cppflags=
7315
7316 for cf_add_cflags in $cf_cv_posix_c_source
7317 do
7318 case $cf_fix_cppflags in
7319 no)
7320         case $cf_add_cflags in #(vi
7321         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7322                 case $cf_add_cflags in
7323                 -D*)
7324                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7325
7326                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7327                                 && test -z "${cf_tst_cflags}" \
7328                                 && cf_fix_cppflags=yes
7329
7330                         if test $cf_fix_cppflags = yes ; then
7331                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7332                                 continue
7333                         elif test "${cf_tst_cflags}" = "\"'" ; then
7334                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7335                                 continue
7336                         fi
7337                         ;;
7338                 esac
7339                 case "$CPPFLAGS" in
7340                 *$cf_add_cflags) #(vi
7341                         ;;
7342                 *) #(vi
7343                         case $cf_add_cflags in #(vi
7344                         -D*)
7345                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7346
7347 CPPFLAGS=`echo "$CPPFLAGS" | \
7348         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7349                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7350
7351                                 ;;
7352                         esac
7353                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7354                         ;;
7355                 esac
7356                 ;;
7357         *)
7358                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7359                 ;;
7360         esac
7361         ;;
7362 yes)
7363         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7364
7365         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7366
7367         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7368                 && test -z "${cf_tst_cflags}" \
7369                 && cf_fix_cppflags=no
7370         ;;
7371 esac
7372 done
7373
7374 if test -n "$cf_new_cflags" ; then
7375
7376         CFLAGS="$CFLAGS $cf_new_cflags"
7377 fi
7378
7379 if test -n "$cf_new_cppflags" ; then
7380
7381         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7382 fi
7383
7384 if test -n "$cf_new_extra_cppflags" ; then
7385
7386         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7387 fi
7388
7389 fi
7390
7391         ;;
7392 netbsd*) #(vi
7393         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7394         ;;
7395 openbsd[4-9]*) #(vi
7396         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7397         cf_xopen_source="-D_BSD_SOURCE"
7398         cf_XOPEN_SOURCE=600
7399         ;;
7400 openbsd*) #(vi
7401         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7402         ;;
7403 osf[45]*) #(vi
7404         cf_xopen_source="-D_OSF_SOURCE"
7405         ;;
7406 nto-qnx*) #(vi
7407         cf_xopen_source="-D_QNX_SOURCE"
7408         ;;
7409 sco*) #(vi
7410         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7411         ;;
7412 solaris2.*) #(vi
7413         cf_xopen_source="-D__EXTENSIONS__"
7414         ;;
7415 *)
7416
7417 echo "$as_me:7417: checking if we should define _XOPEN_SOURCE" >&5
7418 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7419 if test "${cf_cv_xopen_source+set}" = set; then
7420   echo $ECHO_N "(cached) $ECHO_C" >&6
7421 else
7422
7423         cat >conftest.$ac_ext <<_ACEOF
7424 #line 7424 "configure"
7425 #include "confdefs.h"
7426
7427 #include <stdlib.h>
7428 #include <string.h>
7429 #include <sys/types.h>
7430
7431 int
7432 main ()
7433 {
7434
7435 #ifndef _XOPEN_SOURCE
7436 make an error
7437 #endif
7438   ;
7439   return 0;
7440 }
7441 _ACEOF
7442 rm -f conftest.$ac_objext
7443 if { (eval echo "$as_me:7443: \"$ac_compile\"") >&5
7444   (eval $ac_compile) 2>&5
7445   ac_status=$?
7446   echo "$as_me:7446: \$? = $ac_status" >&5
7447   (exit $ac_status); } &&
7448          { ac_try='test -s conftest.$ac_objext'
7449   { (eval echo "$as_me:7449: \"$ac_try\"") >&5
7450   (eval $ac_try) 2>&5
7451   ac_status=$?
7452   echo "$as_me:7452: \$? = $ac_status" >&5
7453   (exit $ac_status); }; }; then
7454   cf_cv_xopen_source=no
7455 else
7456   echo "$as_me: failed program was:" >&5
7457 cat conftest.$ac_ext >&5
7458 cf_save="$CPPFLAGS"
7459          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7460          cat >conftest.$ac_ext <<_ACEOF
7461 #line 7461 "configure"
7462 #include "confdefs.h"
7463
7464 #include <stdlib.h>
7465 #include <string.h>
7466 #include <sys/types.h>
7467
7468 int
7469 main ()
7470 {
7471
7472 #ifdef _XOPEN_SOURCE
7473 make an error
7474 #endif
7475   ;
7476   return 0;
7477 }
7478 _ACEOF
7479 rm -f conftest.$ac_objext
7480 if { (eval echo "$as_me:7480: \"$ac_compile\"") >&5
7481   (eval $ac_compile) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit $ac_status); } &&
7485          { ac_try='test -s conftest.$ac_objext'
7486   { (eval echo "$as_me:7486: \"$ac_try\"") >&5
7487   (eval $ac_try) 2>&5
7488   ac_status=$?
7489   echo "$as_me:7489: \$? = $ac_status" >&5
7490   (exit $ac_status); }; }; then
7491   cf_cv_xopen_source=no
7492 else
7493   echo "$as_me: failed program was:" >&5
7494 cat conftest.$ac_ext >&5
7495 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7496 fi
7497 rm -f conftest.$ac_objext conftest.$ac_ext
7498         CPPFLAGS="$cf_save"
7499
7500 fi
7501 rm -f conftest.$ac_objext conftest.$ac_ext
7502
7503 fi
7504 echo "$as_me:7504: result: $cf_cv_xopen_source" >&5
7505 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7506
7507 if test "$cf_cv_xopen_source" != no ; then
7508
7509 CFLAGS=`echo "$CFLAGS" | \
7510         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7511                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7512
7513 CPPFLAGS=`echo "$CPPFLAGS" | \
7514         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7515                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7516
7517         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7518
7519 cf_fix_cppflags=no
7520 cf_new_cflags=
7521 cf_new_cppflags=
7522 cf_new_extra_cppflags=
7523
7524 for cf_add_cflags in $cf_temp_xopen_source
7525 do
7526 case $cf_fix_cppflags in
7527 no)
7528         case $cf_add_cflags in #(vi
7529         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7530                 case $cf_add_cflags in
7531                 -D*)
7532                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7533
7534                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7535                                 && test -z "${cf_tst_cflags}" \
7536                                 && cf_fix_cppflags=yes
7537
7538                         if test $cf_fix_cppflags = yes ; then
7539                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7540                                 continue
7541                         elif test "${cf_tst_cflags}" = "\"'" ; then
7542                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7543                                 continue
7544                         fi
7545                         ;;
7546                 esac
7547                 case "$CPPFLAGS" in
7548                 *$cf_add_cflags) #(vi
7549                         ;;
7550                 *) #(vi
7551                         case $cf_add_cflags in #(vi
7552                         -D*)
7553                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7554
7555 CPPFLAGS=`echo "$CPPFLAGS" | \
7556         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7557                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7558
7559                                 ;;
7560                         esac
7561                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7562                         ;;
7563                 esac
7564                 ;;
7565         *)
7566                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7567                 ;;
7568         esac
7569         ;;
7570 yes)
7571         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7572
7573         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7574
7575         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7576                 && test -z "${cf_tst_cflags}" \
7577                 && cf_fix_cppflags=no
7578         ;;
7579 esac
7580 done
7581
7582 if test -n "$cf_new_cflags" ; then
7583
7584         CFLAGS="$CFLAGS $cf_new_cflags"
7585 fi
7586
7587 if test -n "$cf_new_cppflags" ; then
7588
7589         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7590 fi
7591
7592 if test -n "$cf_new_extra_cppflags" ; then
7593
7594         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7595 fi
7596
7597 fi
7598
7599 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7600
7601 cf_save_CFLAGS="$CFLAGS"
7602 cf_save_CPPFLAGS="$CPPFLAGS"
7603
7604 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7605         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7606                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7607
7608 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7609         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7610                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7611
7612 echo "$as_me:7612: checking if we should define _POSIX_C_SOURCE" >&5
7613 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7614 if test "${cf_cv_posix_c_source+set}" = set; then
7615   echo $ECHO_N "(cached) $ECHO_C" >&6
7616 else
7617
7618 echo "${as_me:-configure}:7618: testing if the symbol is already defined go no further ..." 1>&5
7619
7620         cat >conftest.$ac_ext <<_ACEOF
7621 #line 7621 "configure"
7622 #include "confdefs.h"
7623 #include <sys/types.h>
7624 int
7625 main ()
7626 {
7627
7628 #ifndef _POSIX_C_SOURCE
7629 make an error
7630 #endif
7631   ;
7632   return 0;
7633 }
7634 _ACEOF
7635 rm -f conftest.$ac_objext
7636 if { (eval echo "$as_me:7636: \"$ac_compile\"") >&5
7637   (eval $ac_compile) 2>&5
7638   ac_status=$?
7639   echo "$as_me:7639: \$? = $ac_status" >&5
7640   (exit $ac_status); } &&
7641          { ac_try='test -s conftest.$ac_objext'
7642   { (eval echo "$as_me:7642: \"$ac_try\"") >&5
7643   (eval $ac_try) 2>&5
7644   ac_status=$?
7645   echo "$as_me:7645: \$? = $ac_status" >&5
7646   (exit $ac_status); }; }; then
7647   cf_cv_posix_c_source=no
7648 else
7649   echo "$as_me: failed program was:" >&5
7650 cat conftest.$ac_ext >&5
7651 cf_want_posix_source=no
7652          case .$cf_POSIX_C_SOURCE in #(vi
7653          .[12]??*) #(vi
7654                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7655                 ;;
7656          .2) #(vi
7657                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7658                 cf_want_posix_source=yes
7659                 ;;
7660          .*)
7661                 cf_want_posix_source=yes
7662                 ;;
7663          esac
7664          if test "$cf_want_posix_source" = yes ; then
7665                 cat >conftest.$ac_ext <<_ACEOF
7666 #line 7666 "configure"
7667 #include "confdefs.h"
7668 #include <sys/types.h>
7669 int
7670 main ()
7671 {
7672
7673 #ifdef _POSIX_SOURCE
7674 make an error
7675 #endif
7676   ;
7677   return 0;
7678 }
7679 _ACEOF
7680 rm -f conftest.$ac_objext
7681 if { (eval echo "$as_me:7681: \"$ac_compile\"") >&5
7682   (eval $ac_compile) 2>&5
7683   ac_status=$?
7684   echo "$as_me:7684: \$? = $ac_status" >&5
7685   (exit $ac_status); } &&
7686          { ac_try='test -s conftest.$ac_objext'
7687   { (eval echo "$as_me:7687: \"$ac_try\"") >&5
7688   (eval $ac_try) 2>&5
7689   ac_status=$?
7690   echo "$as_me:7690: \$? = $ac_status" >&5
7691   (exit $ac_status); }; }; then
7692   :
7693 else
7694   echo "$as_me: failed program was:" >&5
7695 cat conftest.$ac_ext >&5
7696 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7697 fi
7698 rm -f conftest.$ac_objext conftest.$ac_ext
7699          fi
7700
7701 echo "${as_me:-configure}:7701: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7702
7703          CFLAGS="$cf_trim_CFLAGS"
7704          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7705
7706 echo "${as_me:-configure}:7706: testing if the second compile does not leave our definition intact error ..." 1>&5
7707
7708          cat >conftest.$ac_ext <<_ACEOF
7709 #line 7709 "configure"
7710 #include "confdefs.h"
7711 #include <sys/types.h>
7712 int
7713 main ()
7714 {
7715
7716 #ifndef _POSIX_C_SOURCE
7717 make an error
7718 #endif
7719   ;
7720   return 0;
7721 }
7722 _ACEOF
7723 rm -f conftest.$ac_objext
7724 if { (eval echo "$as_me:7724: \"$ac_compile\"") >&5
7725   (eval $ac_compile) 2>&5
7726   ac_status=$?
7727   echo "$as_me:7727: \$? = $ac_status" >&5
7728   (exit $ac_status); } &&
7729          { ac_try='test -s conftest.$ac_objext'
7730   { (eval echo "$as_me:7730: \"$ac_try\"") >&5
7731   (eval $ac_try) 2>&5
7732   ac_status=$?
7733   echo "$as_me:7733: \$? = $ac_status" >&5
7734   (exit $ac_status); }; }; then
7735   :
7736 else
7737   echo "$as_me: failed program was:" >&5
7738 cat conftest.$ac_ext >&5
7739 cf_cv_posix_c_source=no
7740 fi
7741 rm -f conftest.$ac_objext conftest.$ac_ext
7742          CFLAGS="$cf_save_CFLAGS"
7743          CPPFLAGS="$cf_save_CPPFLAGS"
7744
7745 fi
7746 rm -f conftest.$ac_objext conftest.$ac_ext
7747
7748 fi
7749 echo "$as_me:7749: result: $cf_cv_posix_c_source" >&5
7750 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7751
7752 if test "$cf_cv_posix_c_source" != no ; then
7753         CFLAGS="$cf_trim_CFLAGS"
7754         CPPFLAGS="$cf_trim_CPPFLAGS"
7755
7756 cf_fix_cppflags=no
7757 cf_new_cflags=
7758 cf_new_cppflags=
7759 cf_new_extra_cppflags=
7760
7761 for cf_add_cflags in $cf_cv_posix_c_source
7762 do
7763 case $cf_fix_cppflags in
7764 no)
7765         case $cf_add_cflags in #(vi
7766         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7767                 case $cf_add_cflags in
7768                 -D*)
7769                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7770
7771                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7772                                 && test -z "${cf_tst_cflags}" \
7773                                 && cf_fix_cppflags=yes
7774
7775                         if test $cf_fix_cppflags = yes ; then
7776                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7777                                 continue
7778                         elif test "${cf_tst_cflags}" = "\"'" ; then
7779                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7780                                 continue
7781                         fi
7782                         ;;
7783                 esac
7784                 case "$CPPFLAGS" in
7785                 *$cf_add_cflags) #(vi
7786                         ;;
7787                 *) #(vi
7788                         case $cf_add_cflags in #(vi
7789                         -D*)
7790                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7791
7792 CPPFLAGS=`echo "$CPPFLAGS" | \
7793         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7794                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7795
7796                                 ;;
7797                         esac
7798                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7799                         ;;
7800                 esac
7801                 ;;
7802         *)
7803                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7804                 ;;
7805         esac
7806         ;;
7807 yes)
7808         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7809
7810         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7811
7812         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7813                 && test -z "${cf_tst_cflags}" \
7814                 && cf_fix_cppflags=no
7815         ;;
7816 esac
7817 done
7818
7819 if test -n "$cf_new_cflags" ; then
7820
7821         CFLAGS="$CFLAGS $cf_new_cflags"
7822 fi
7823
7824 if test -n "$cf_new_cppflags" ; then
7825
7826         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7827 fi
7828
7829 if test -n "$cf_new_extra_cppflags" ; then
7830
7831         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7832 fi
7833
7834 fi
7835
7836         ;;
7837 esac
7838
7839 if test -n "$cf_xopen_source" ; then
7840
7841 cf_fix_cppflags=no
7842 cf_new_cflags=
7843 cf_new_cppflags=
7844 cf_new_extra_cppflags=
7845
7846 for cf_add_cflags in $cf_xopen_source
7847 do
7848 case $cf_fix_cppflags in
7849 no)
7850         case $cf_add_cflags in #(vi
7851         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7852                 case $cf_add_cflags in
7853                 -D*)
7854                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7855
7856                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7857                                 && test -z "${cf_tst_cflags}" \
7858                                 && cf_fix_cppflags=yes
7859
7860                         if test $cf_fix_cppflags = yes ; then
7861                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7862                                 continue
7863                         elif test "${cf_tst_cflags}" = "\"'" ; then
7864                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7865                                 continue
7866                         fi
7867                         ;;
7868                 esac
7869                 case "$CPPFLAGS" in
7870                 *$cf_add_cflags) #(vi
7871                         ;;
7872                 *) #(vi
7873                         case $cf_add_cflags in #(vi
7874                         -D*)
7875                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7876
7877 CPPFLAGS=`echo "$CPPFLAGS" | \
7878         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7879                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7880
7881                                 ;;
7882                         esac
7883                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7884                         ;;
7885                 esac
7886                 ;;
7887         *)
7888                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7889                 ;;
7890         esac
7891         ;;
7892 yes)
7893         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7894
7895         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7896
7897         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7898                 && test -z "${cf_tst_cflags}" \
7899                 && cf_fix_cppflags=no
7900         ;;
7901 esac
7902 done
7903
7904 if test -n "$cf_new_cflags" ; then
7905
7906         CFLAGS="$CFLAGS $cf_new_cflags"
7907 fi
7908
7909 if test -n "$cf_new_cppflags" ; then
7910
7911         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7912 fi
7913
7914 if test -n "$cf_new_extra_cppflags" ; then
7915
7916         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7917 fi
7918
7919 fi
7920
7921 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7922         echo "$as_me:7922: checking if _XOPEN_SOURCE really is set" >&5
7923 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7924         cat >conftest.$ac_ext <<_ACEOF
7925 #line 7925 "configure"
7926 #include "confdefs.h"
7927 #include <stdlib.h>
7928 int
7929 main ()
7930 {
7931
7932 #ifndef _XOPEN_SOURCE
7933 make an error
7934 #endif
7935   ;
7936   return 0;
7937 }
7938 _ACEOF
7939 rm -f conftest.$ac_objext
7940 if { (eval echo "$as_me:7940: \"$ac_compile\"") >&5
7941   (eval $ac_compile) 2>&5
7942   ac_status=$?
7943   echo "$as_me:7943: \$? = $ac_status" >&5
7944   (exit $ac_status); } &&
7945          { ac_try='test -s conftest.$ac_objext'
7946   { (eval echo "$as_me:7946: \"$ac_try\"") >&5
7947   (eval $ac_try) 2>&5
7948   ac_status=$?
7949   echo "$as_me:7949: \$? = $ac_status" >&5
7950   (exit $ac_status); }; }; then
7951   cf_XOPEN_SOURCE_set=yes
7952 else
7953   echo "$as_me: failed program was:" >&5
7954 cat conftest.$ac_ext >&5
7955 cf_XOPEN_SOURCE_set=no
7956 fi
7957 rm -f conftest.$ac_objext conftest.$ac_ext
7958         echo "$as_me:7958: result: $cf_XOPEN_SOURCE_set" >&5
7959 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7960         if test $cf_XOPEN_SOURCE_set = yes
7961         then
7962                 cat >conftest.$ac_ext <<_ACEOF
7963 #line 7963 "configure"
7964 #include "confdefs.h"
7965 #include <stdlib.h>
7966 int
7967 main ()
7968 {
7969
7970 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7971 make an error
7972 #endif
7973   ;
7974   return 0;
7975 }
7976 _ACEOF
7977 rm -f conftest.$ac_objext
7978 if { (eval echo "$as_me:7978: \"$ac_compile\"") >&5
7979   (eval $ac_compile) 2>&5
7980   ac_status=$?
7981   echo "$as_me:7981: \$? = $ac_status" >&5
7982   (exit $ac_status); } &&
7983          { ac_try='test -s conftest.$ac_objext'
7984   { (eval echo "$as_me:7984: \"$ac_try\"") >&5
7985   (eval $ac_try) 2>&5
7986   ac_status=$?
7987   echo "$as_me:7987: \$? = $ac_status" >&5
7988   (exit $ac_status); }; }; then
7989   cf_XOPEN_SOURCE_set_ok=yes
7990 else
7991   echo "$as_me: failed program was:" >&5
7992 cat conftest.$ac_ext >&5
7993 cf_XOPEN_SOURCE_set_ok=no
7994 fi
7995 rm -f conftest.$ac_objext conftest.$ac_ext
7996                 if test $cf_XOPEN_SOURCE_set_ok = no
7997                 then
7998                         { echo "$as_me:7998: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7999 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8000                 fi
8001         else
8002
8003 echo "$as_me:8003: checking if we should define _XOPEN_SOURCE" >&5
8004 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8005 if test "${cf_cv_xopen_source+set}" = set; then
8006   echo $ECHO_N "(cached) $ECHO_C" >&6
8007 else
8008
8009         cat >conftest.$ac_ext <<_ACEOF
8010 #line 8010 "configure"
8011 #include "confdefs.h"
8012
8013 #include <stdlib.h>
8014 #include <string.h>
8015 #include <sys/types.h>
8016
8017 int
8018 main ()
8019 {
8020
8021 #ifndef _XOPEN_SOURCE
8022 make an error
8023 #endif
8024   ;
8025   return 0;
8026 }
8027 _ACEOF
8028 rm -f conftest.$ac_objext
8029 if { (eval echo "$as_me:8029: \"$ac_compile\"") >&5
8030   (eval $ac_compile) 2>&5
8031   ac_status=$?
8032   echo "$as_me:8032: \$? = $ac_status" >&5
8033   (exit $ac_status); } &&
8034          { ac_try='test -s conftest.$ac_objext'
8035   { (eval echo "$as_me:8035: \"$ac_try\"") >&5
8036   (eval $ac_try) 2>&5
8037   ac_status=$?
8038   echo "$as_me:8038: \$? = $ac_status" >&5
8039   (exit $ac_status); }; }; then
8040   cf_cv_xopen_source=no
8041 else
8042   echo "$as_me: failed program was:" >&5
8043 cat conftest.$ac_ext >&5
8044 cf_save="$CPPFLAGS"
8045          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8046          cat >conftest.$ac_ext <<_ACEOF
8047 #line 8047 "configure"
8048 #include "confdefs.h"
8049
8050 #include <stdlib.h>
8051 #include <string.h>
8052 #include <sys/types.h>
8053
8054 int
8055 main ()
8056 {
8057
8058 #ifdef _XOPEN_SOURCE
8059 make an error
8060 #endif
8061   ;
8062   return 0;
8063 }
8064 _ACEOF
8065 rm -f conftest.$ac_objext
8066 if { (eval echo "$as_me:8066: \"$ac_compile\"") >&5
8067   (eval $ac_compile) 2>&5
8068   ac_status=$?
8069   echo "$as_me:8069: \$? = $ac_status" >&5
8070   (exit $ac_status); } &&
8071          { ac_try='test -s conftest.$ac_objext'
8072   { (eval echo "$as_me:8072: \"$ac_try\"") >&5
8073   (eval $ac_try) 2>&5
8074   ac_status=$?
8075   echo "$as_me:8075: \$? = $ac_status" >&5
8076   (exit $ac_status); }; }; then
8077   cf_cv_xopen_source=no
8078 else
8079   echo "$as_me: failed program was:" >&5
8080 cat conftest.$ac_ext >&5
8081 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8082 fi
8083 rm -f conftest.$ac_objext conftest.$ac_ext
8084         CPPFLAGS="$cf_save"
8085
8086 fi
8087 rm -f conftest.$ac_objext conftest.$ac_ext
8088
8089 fi
8090 echo "$as_me:8090: result: $cf_cv_xopen_source" >&5
8091 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8092
8093 if test "$cf_cv_xopen_source" != no ; then
8094
8095 CFLAGS=`echo "$CFLAGS" | \
8096         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8097                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8098
8099 CPPFLAGS=`echo "$CPPFLAGS" | \
8100         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8101                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8102
8103         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8104
8105 cf_fix_cppflags=no
8106 cf_new_cflags=
8107 cf_new_cppflags=
8108 cf_new_extra_cppflags=
8109
8110 for cf_add_cflags in $cf_temp_xopen_source
8111 do
8112 case $cf_fix_cppflags in
8113 no)
8114         case $cf_add_cflags in #(vi
8115         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8116                 case $cf_add_cflags in
8117                 -D*)
8118                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8119
8120                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8121                                 && test -z "${cf_tst_cflags}" \
8122                                 && cf_fix_cppflags=yes
8123
8124                         if test $cf_fix_cppflags = yes ; then
8125                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8126                                 continue
8127                         elif test "${cf_tst_cflags}" = "\"'" ; then
8128                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8129                                 continue
8130                         fi
8131                         ;;
8132                 esac
8133                 case "$CPPFLAGS" in
8134                 *$cf_add_cflags) #(vi
8135                         ;;
8136                 *) #(vi
8137                         case $cf_add_cflags in #(vi
8138                         -D*)
8139                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8140
8141 CPPFLAGS=`echo "$CPPFLAGS" | \
8142         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8143                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8144
8145                                 ;;
8146                         esac
8147                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8148                         ;;
8149                 esac
8150                 ;;
8151         *)
8152                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8153                 ;;
8154         esac
8155         ;;
8156 yes)
8157         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8158
8159         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8160
8161         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8162                 && test -z "${cf_tst_cflags}" \
8163                 && cf_fix_cppflags=no
8164         ;;
8165 esac
8166 done
8167
8168 if test -n "$cf_new_cflags" ; then
8169
8170         CFLAGS="$CFLAGS $cf_new_cflags"
8171 fi
8172
8173 if test -n "$cf_new_cppflags" ; then
8174
8175         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8176 fi
8177
8178 if test -n "$cf_new_extra_cppflags" ; then
8179
8180         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8181 fi
8182
8183 fi
8184
8185         fi
8186 fi
8187
8188 # Work around breakage on OS X
8189
8190 echo "$as_me:8190: checking if SIGWINCH is defined" >&5
8191 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8192 if test "${cf_cv_define_sigwinch+set}" = set; then
8193   echo $ECHO_N "(cached) $ECHO_C" >&6
8194 else
8195
8196         cat >conftest.$ac_ext <<_ACEOF
8197 #line 8197 "configure"
8198 #include "confdefs.h"
8199
8200 #include <sys/types.h>
8201 #include <sys/signal.h>
8202
8203 int
8204 main ()
8205 {
8206 int x = SIGWINCH
8207   ;
8208   return 0;
8209 }
8210 _ACEOF
8211 rm -f conftest.$ac_objext
8212 if { (eval echo "$as_me:8212: \"$ac_compile\"") >&5
8213   (eval $ac_compile) 2>&5
8214   ac_status=$?
8215   echo "$as_me:8215: \$? = $ac_status" >&5
8216   (exit $ac_status); } &&
8217          { ac_try='test -s conftest.$ac_objext'
8218   { (eval echo "$as_me:8218: \"$ac_try\"") >&5
8219   (eval $ac_try) 2>&5
8220   ac_status=$?
8221   echo "$as_me:8221: \$? = $ac_status" >&5
8222   (exit $ac_status); }; }; then
8223   cf_cv_define_sigwinch=yes
8224 else
8225   echo "$as_me: failed program was:" >&5
8226 cat conftest.$ac_ext >&5
8227 cat >conftest.$ac_ext <<_ACEOF
8228 #line 8228 "configure"
8229 #include "confdefs.h"
8230
8231 #undef _XOPEN_SOURCE
8232 #undef _POSIX_SOURCE
8233 #undef _POSIX_C_SOURCE
8234 #include <sys/types.h>
8235 #include <sys/signal.h>
8236
8237 int
8238 main ()
8239 {
8240 int x = SIGWINCH
8241   ;
8242   return 0;
8243 }
8244 _ACEOF
8245 rm -f conftest.$ac_objext
8246 if { (eval echo "$as_me:8246: \"$ac_compile\"") >&5
8247   (eval $ac_compile) 2>&5
8248   ac_status=$?
8249   echo "$as_me:8249: \$? = $ac_status" >&5
8250   (exit $ac_status); } &&
8251          { ac_try='test -s conftest.$ac_objext'
8252   { (eval echo "$as_me:8252: \"$ac_try\"") >&5
8253   (eval $ac_try) 2>&5
8254   ac_status=$?
8255   echo "$as_me:8255: \$? = $ac_status" >&5
8256   (exit $ac_status); }; }; then
8257   cf_cv_define_sigwinch=maybe
8258 else
8259   echo "$as_me: failed program was:" >&5
8260 cat conftest.$ac_ext >&5
8261 cf_cv_define_sigwinch=no
8262 fi
8263 rm -f conftest.$ac_objext conftest.$ac_ext
8264
8265 fi
8266 rm -f conftest.$ac_objext conftest.$ac_ext
8267
8268 fi
8269 echo "$as_me:8269: result: $cf_cv_define_sigwinch" >&5
8270 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8271
8272 if test "$cf_cv_define_sigwinch" = maybe ; then
8273 echo "$as_me:8273: checking for actual SIGWINCH definition" >&5
8274 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8275 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8276   echo $ECHO_N "(cached) $ECHO_C" >&6
8277 else
8278
8279 cf_cv_fixup_sigwinch=unknown
8280 cf_sigwinch=32
8281 while test $cf_sigwinch != 1
8282 do
8283         cat >conftest.$ac_ext <<_ACEOF
8284 #line 8284 "configure"
8285 #include "confdefs.h"
8286
8287 #undef _XOPEN_SOURCE
8288 #undef _POSIX_SOURCE
8289 #undef _POSIX_C_SOURCE
8290 #include <sys/types.h>
8291 #include <sys/signal.h>
8292
8293 int
8294 main ()
8295 {
8296
8297 #if SIGWINCH != $cf_sigwinch
8298 make an error
8299 #endif
8300 int x = SIGWINCH
8301   ;
8302   return 0;
8303 }
8304 _ACEOF
8305 rm -f conftest.$ac_objext
8306 if { (eval echo "$as_me:8306: \"$ac_compile\"") >&5
8307   (eval $ac_compile) 2>&5
8308   ac_status=$?
8309   echo "$as_me:8309: \$? = $ac_status" >&5
8310   (exit $ac_status); } &&
8311          { ac_try='test -s conftest.$ac_objext'
8312   { (eval echo "$as_me:8312: \"$ac_try\"") >&5
8313   (eval $ac_try) 2>&5
8314   ac_status=$?
8315   echo "$as_me:8315: \$? = $ac_status" >&5
8316   (exit $ac_status); }; }; then
8317   cf_cv_fixup_sigwinch=$cf_sigwinch
8318          break
8319 else
8320   echo "$as_me: failed program was:" >&5
8321 cat conftest.$ac_ext >&5
8322 fi
8323 rm -f conftest.$ac_objext conftest.$ac_ext
8324
8325 cf_sigwinch=`expr $cf_sigwinch - 1`
8326 done
8327
8328 fi
8329 echo "$as_me:8329: result: $cf_cv_fixup_sigwinch" >&5
8330 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8331
8332         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8333                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8334         fi
8335 fi
8336
8337 # Checks for CODESET support.
8338
8339   echo "$as_me:8339: checking for nl_langinfo and CODESET" >&5
8340 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8341 if test "${am_cv_langinfo_codeset+set}" = set; then
8342   echo $ECHO_N "(cached) $ECHO_C" >&6
8343 else
8344   cat >conftest.$ac_ext <<_ACEOF
8345 #line 8345 "configure"
8346 #include "confdefs.h"
8347 #include <langinfo.h>
8348 int
8349 main ()
8350 {
8351 char* cs = nl_langinfo(CODESET);
8352   ;
8353   return 0;
8354 }
8355 _ACEOF
8356 rm -f conftest.$ac_objext conftest$ac_exeext
8357 if { (eval echo "$as_me:8357: \"$ac_link\"") >&5
8358   (eval $ac_link) 2>&5
8359   ac_status=$?
8360   echo "$as_me:8360: \$? = $ac_status" >&5
8361   (exit $ac_status); } &&
8362          { ac_try='test -s conftest$ac_exeext'
8363   { (eval echo "$as_me:8363: \"$ac_try\"") >&5
8364   (eval $ac_try) 2>&5
8365   ac_status=$?
8366   echo "$as_me:8366: \$? = $ac_status" >&5
8367   (exit $ac_status); }; }; then
8368   am_cv_langinfo_codeset=yes
8369 else
8370   echo "$as_me: failed program was:" >&5
8371 cat conftest.$ac_ext >&5
8372 am_cv_langinfo_codeset=no
8373 fi
8374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8375
8376 fi
8377 echo "$as_me:8377: result: $am_cv_langinfo_codeset" >&5
8378 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8379   if test $am_cv_langinfo_codeset = yes; then
8380
8381 cat >>confdefs.h <<\EOF
8382 #define HAVE_LANGINFO_CODESET 1
8383 EOF
8384
8385   fi
8386
8387 # use these variables to work around a defect in gcc's fixincludes.
8388 NCURSES_OK_WCHAR_T=
8389 NCURSES_OK_WINT_T=
8390
8391 echo "$as_me:8391: checking if you want wide-character code" >&5
8392 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8393
8394 # Check whether --enable-widec or --disable-widec was given.
8395 if test "${enable_widec+set}" = set; then
8396   enableval="$enable_widec"
8397   with_widec=$enableval
8398 else
8399   with_widec=no
8400 fi;
8401 echo "$as_me:8401: result: $with_widec" >&5
8402 echo "${ECHO_T}$with_widec" >&6
8403 if test "$with_widec" = yes ; then
8404         LIB_SUFFIX="w${LIB_SUFFIX}"
8405         cat >>confdefs.h <<\EOF
8406 #define USE_WIDEC_SUPPORT 1
8407 EOF
8408
8409         cat >>confdefs.h <<\EOF
8410 #define NCURSES_WIDECHAR 1
8411 EOF
8412
8413 echo "$as_me:8413: checking if wchar.h can be used as is" >&5
8414 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8415 if test "${cf_cv_wchar_h_okay+set}" = set; then
8416   echo $ECHO_N "(cached) $ECHO_C" >&6
8417 else
8418
8419 cat >conftest.$ac_ext <<_ACEOF
8420 #line 8420 "configure"
8421 #include "confdefs.h"
8422
8423 #include <stdlib.h>
8424 #include <wchar.h>
8425
8426 int
8427 main ()
8428 {
8429
8430         wint_t foo = 0;
8431         int bar = iswpunct(foo)
8432   ;
8433   return 0;
8434 }
8435 _ACEOF
8436 rm -f conftest.$ac_objext
8437 if { (eval echo "$as_me:8437: \"$ac_compile\"") >&5
8438   (eval $ac_compile) 2>&5
8439   ac_status=$?
8440   echo "$as_me:8440: \$? = $ac_status" >&5
8441   (exit $ac_status); } &&
8442          { ac_try='test -s conftest.$ac_objext'
8443   { (eval echo "$as_me:8443: \"$ac_try\"") >&5
8444   (eval $ac_try) 2>&5
8445   ac_status=$?
8446   echo "$as_me:8446: \$? = $ac_status" >&5
8447   (exit $ac_status); }; }; then
8448   cf_cv_wchar_h_okay=yes
8449 else
8450   echo "$as_me: failed program was:" >&5
8451 cat conftest.$ac_ext >&5
8452 cf_cv_wchar_h_okay=no
8453 fi
8454 rm -f conftest.$ac_objext conftest.$ac_ext
8455 fi
8456 echo "$as_me:8456: result: $cf_cv_wchar_h_okay" >&5
8457 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8458
8459 if test $cf_cv_wchar_h_okay = no
8460 then
8461
8462 echo "$as_me:8462: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8463 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8464 cat >conftest.$ac_ext <<_ACEOF
8465 #line 8465 "configure"
8466 #include "confdefs.h"
8467 #include <sys/types.h>
8468
8469 int
8470 main ()
8471 {
8472
8473 #ifndef _XOPEN_SOURCE_EXTENDED
8474 make an error
8475 #endif
8476   ;
8477   return 0;
8478 }
8479 _ACEOF
8480 rm -f conftest.$ac_objext
8481 if { (eval echo "$as_me:8481: \"$ac_compile\"") >&5
8482   (eval $ac_compile) 2>&5
8483   ac_status=$?
8484   echo "$as_me:8484: \$? = $ac_status" >&5
8485   (exit $ac_status); } &&
8486          { ac_try='test -s conftest.$ac_objext'
8487   { (eval echo "$as_me:8487: \"$ac_try\"") >&5
8488   (eval $ac_try) 2>&5
8489   ac_status=$?
8490   echo "$as_me:8490: \$? = $ac_status" >&5
8491   (exit $ac_status); }; }; then
8492   cf_result=no
8493 else
8494   echo "$as_me: failed program was:" >&5
8495 cat conftest.$ac_ext >&5
8496 cf_result=yes
8497 fi
8498 rm -f conftest.$ac_objext conftest.$ac_ext
8499 echo "$as_me:8499: result: $cf_result" >&5
8500 echo "${ECHO_T}$cf_result" >&6
8501
8502 if test "$cf_result" = yes ; then
8503         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8504 elif test "x" != "x" ; then
8505         echo "$as_me:8505: checking checking for compatible value versus " >&5
8506 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8507         cat >conftest.$ac_ext <<_ACEOF
8508 #line 8508 "configure"
8509 #include "confdefs.h"
8510 #include <sys/types.h>
8511
8512 int
8513 main ()
8514 {
8515
8516 #if _XOPEN_SOURCE_EXTENDED- < 0
8517 make an error
8518 #endif
8519   ;
8520   return 0;
8521 }
8522 _ACEOF
8523 rm -f conftest.$ac_objext
8524 if { (eval echo "$as_me:8524: \"$ac_compile\"") >&5
8525   (eval $ac_compile) 2>&5
8526   ac_status=$?
8527   echo "$as_me:8527: \$? = $ac_status" >&5
8528   (exit $ac_status); } &&
8529          { ac_try='test -s conftest.$ac_objext'
8530   { (eval echo "$as_me:8530: \"$ac_try\"") >&5
8531   (eval $ac_try) 2>&5
8532   ac_status=$?
8533   echo "$as_me:8533: \$? = $ac_status" >&5
8534   (exit $ac_status); }; }; then
8535   cf_result=yes
8536 else
8537   echo "$as_me: failed program was:" >&5
8538 cat conftest.$ac_ext >&5
8539 cf_result=no
8540 fi
8541 rm -f conftest.$ac_objext conftest.$ac_ext
8542         echo "$as_me:8542: result: $cf_result" >&5
8543 echo "${ECHO_T}$cf_result" >&6
8544         if test "$cf_result" = no ; then
8545                 # perhaps we can override it - try...
8546                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8547         fi
8548 fi
8549
8550 fi
8551
8552         # with_overwrite=no
8553         NCURSES_CH_T=cchar_t
8554
8555 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8556 do
8557 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8558 echo "$as_me:8558: checking for $ac_func" >&5
8559 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8560 if eval "test \"\${$as_ac_var+set}\" = set"; then
8561   echo $ECHO_N "(cached) $ECHO_C" >&6
8562 else
8563   cat >conftest.$ac_ext <<_ACEOF
8564 #line 8564 "configure"
8565 #include "confdefs.h"
8566 /* System header to define __stub macros and hopefully few prototypes,
8567     which can conflict with char $ac_func (); below.  */
8568 #include <assert.h>
8569 /* Override any gcc2 internal prototype to avoid an error.  */
8570 #ifdef __cplusplus
8571 extern "C"
8572 #endif
8573 /* We use char because int might match the return type of a gcc2
8574    builtin and then its argument prototype would still apply.  */
8575 char $ac_func ();
8576 char (*f) ();
8577
8578 int
8579 main ()
8580 {
8581 /* The GNU C library defines this for functions which it implements
8582     to always fail with ENOSYS.  Some functions are actually named
8583     something starting with __ and the normal name is an alias.  */
8584 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8585 choke me
8586 #else
8587 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8588 #endif
8589
8590   ;
8591   return 0;
8592 }
8593 _ACEOF
8594 rm -f conftest.$ac_objext conftest$ac_exeext
8595 if { (eval echo "$as_me:8595: \"$ac_link\"") >&5
8596   (eval $ac_link) 2>&5
8597   ac_status=$?
8598   echo "$as_me:8598: \$? = $ac_status" >&5
8599   (exit $ac_status); } &&
8600          { ac_try='test -s conftest$ac_exeext'
8601   { (eval echo "$as_me:8601: \"$ac_try\"") >&5
8602   (eval $ac_try) 2>&5
8603   ac_status=$?
8604   echo "$as_me:8604: \$? = $ac_status" >&5
8605   (exit $ac_status); }; }; then
8606   eval "$as_ac_var=yes"
8607 else
8608   echo "$as_me: failed program was:" >&5
8609 cat conftest.$ac_ext >&5
8610 eval "$as_ac_var=no"
8611 fi
8612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8613 fi
8614 echo "$as_me:8614: result: `eval echo '${'$as_ac_var'}'`" >&5
8615 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8616 if test `eval echo '${'$as_ac_var'}'` = yes; then
8617   cat >>confdefs.h <<EOF
8618 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8619 EOF
8620
8621 fi
8622 done
8623
8624         if test "$ac_cv_func_putwc" != yes ; then
8625
8626 echo "$as_me:8626: checking for multibyte character support" >&5
8627 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8628 if test "${cf_cv_utf8_lib+set}" = set; then
8629   echo $ECHO_N "(cached) $ECHO_C" >&6
8630 else
8631
8632         cf_save_LIBS="$LIBS"
8633         cat >conftest.$ac_ext <<_ACEOF
8634 #line 8634 "configure"
8635 #include "confdefs.h"
8636
8637 #include <stdlib.h>
8638 int
8639 main ()
8640 {
8641 putwc(0,0);
8642   ;
8643   return 0;
8644 }
8645 _ACEOF
8646 rm -f conftest.$ac_objext conftest$ac_exeext
8647 if { (eval echo "$as_me:8647: \"$ac_link\"") >&5
8648   (eval $ac_link) 2>&5
8649   ac_status=$?
8650   echo "$as_me:8650: \$? = $ac_status" >&5
8651   (exit $ac_status); } &&
8652          { ac_try='test -s conftest$ac_exeext'
8653   { (eval echo "$as_me:8653: \"$ac_try\"") >&5
8654   (eval $ac_try) 2>&5
8655   ac_status=$?
8656   echo "$as_me:8656: \$? = $ac_status" >&5
8657   (exit $ac_status); }; }; then
8658   cf_cv_utf8_lib=yes
8659 else
8660   echo "$as_me: failed program was:" >&5
8661 cat conftest.$ac_ext >&5
8662
8663 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8664 # will be set on completion of the AC_TRY_LINK below.
8665 cf_cv_header_path_utf8=
8666 cf_cv_library_path_utf8=
8667
8668 echo "${as_me:-configure}:8668: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8669
8670 cf_save_LIBS="$LIBS"
8671
8672 cat >conftest.$ac_ext <<_ACEOF
8673 #line 8673 "configure"
8674 #include "confdefs.h"
8675
8676 #include <libutf8.h>
8677 int
8678 main ()
8679 {
8680 putwc(0,0);
8681   ;
8682   return 0;
8683 }
8684 _ACEOF
8685 rm -f conftest.$ac_objext conftest$ac_exeext
8686 if { (eval echo "$as_me:8686: \"$ac_link\"") >&5
8687   (eval $ac_link) 2>&5
8688   ac_status=$?
8689   echo "$as_me:8689: \$? = $ac_status" >&5
8690   (exit $ac_status); } &&
8691          { ac_try='test -s conftest$ac_exeext'
8692   { (eval echo "$as_me:8692: \"$ac_try\"") >&5
8693   (eval $ac_try) 2>&5
8694   ac_status=$?
8695   echo "$as_me:8695: \$? = $ac_status" >&5
8696   (exit $ac_status); }; }; then
8697
8698         cf_cv_find_linkage_utf8=yes
8699         cf_cv_header_path_utf8=/usr/include
8700         cf_cv_library_path_utf8=/usr/lib
8701
8702 else
8703   echo "$as_me: failed program was:" >&5
8704 cat conftest.$ac_ext >&5
8705
8706 LIBS="-lutf8  $cf_save_LIBS"
8707
8708 cat >conftest.$ac_ext <<_ACEOF
8709 #line 8709 "configure"
8710 #include "confdefs.h"
8711
8712 #include <libutf8.h>
8713 int
8714 main ()
8715 {
8716 putwc(0,0);
8717   ;
8718   return 0;
8719 }
8720 _ACEOF
8721 rm -f conftest.$ac_objext conftest$ac_exeext
8722 if { (eval echo "$as_me:8722: \"$ac_link\"") >&5
8723   (eval $ac_link) 2>&5
8724   ac_status=$?
8725   echo "$as_me:8725: \$? = $ac_status" >&5
8726   (exit $ac_status); } &&
8727          { ac_try='test -s conftest$ac_exeext'
8728   { (eval echo "$as_me:8728: \"$ac_try\"") >&5
8729   (eval $ac_try) 2>&5
8730   ac_status=$?
8731   echo "$as_me:8731: \$? = $ac_status" >&5
8732   (exit $ac_status); }; }; then
8733
8734         cf_cv_find_linkage_utf8=yes
8735         cf_cv_header_path_utf8=/usr/include
8736         cf_cv_library_path_utf8=/usr/lib
8737         cf_cv_library_file_utf8="-lutf8"
8738
8739 else
8740   echo "$as_me: failed program was:" >&5
8741 cat conftest.$ac_ext >&5
8742
8743         cf_cv_find_linkage_utf8=no
8744         LIBS="$cf_save_LIBS"
8745
8746     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8747
8748 echo "${as_me:-configure}:8748: testing find linkage for utf8 library ..." 1>&5
8749
8750 echo "${as_me:-configure}:8750: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8751
8752     cf_save_CPPFLAGS="$CPPFLAGS"
8753     cf_test_CPPFLAGS="$CPPFLAGS"
8754
8755 cf_search=
8756
8757 # collect the current set of include-directories from compiler flags
8758 cf_header_path_list=""
8759 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8760         for cf_header_path in $CPPFLAGS $CFLAGS
8761         do
8762                 case $cf_header_path in #(vi
8763                 -I*)
8764                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8765
8766 test "$cf_header_path" != "NONE" && \
8767 test -d "$cf_header_path" && \
8768  {
8769         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8770         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8771         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8772         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8773         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8774         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8775 }
8776
8777                         cf_header_path_list="$cf_header_path_list $cf_search"
8778                         ;;
8779                 esac
8780         done
8781 fi
8782
8783 # add the variations for the package we are looking for
8784
8785 cf_search=
8786
8787 test "/usr" != "$prefix" && \
8788 test -d "/usr" && \
8789 (test $prefix = NONE || test "/usr" != "$prefix") && {
8790         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8791         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8792         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8793         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8794         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8795         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8796 }
8797
8798 test "$prefix" != "NONE" && \
8799 test -d "$prefix" && \
8800  {
8801         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8802         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8803         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8804         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8805         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8806         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8807 }
8808
8809 test "/usr/local" != "$prefix" && \
8810 test -d "/usr/local" && \
8811 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8812         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8813         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8814         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8815         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8816         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8817         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8818 }
8819
8820 test "/opt" != "$prefix" && \
8821 test -d "/opt" && \
8822 (test $prefix = NONE || test "/opt" != "$prefix") && {
8823         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8824         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8825         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8826         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8827         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8828         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8829 }
8830
8831 test "$HOME" != "$prefix" && \
8832 test -d "$HOME" && \
8833 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8834         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8835         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8836         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8837         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8838         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8839         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8840 }
8841
8842 test "$includedir" != NONE && \
8843 test "$includedir" != "/usr/include" && \
8844 test -d "$includedir" && {
8845         test -d $includedir &&    cf_search="$cf_search $includedir"
8846         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8847 }
8848
8849 test "$oldincludedir" != NONE && \
8850 test "$oldincludedir" != "/usr/include" && \
8851 test -d "$oldincludedir" && {
8852         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8853         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8854 }
8855
8856 cf_search="$cf_search $cf_header_path_list"
8857
8858     for cf_cv_header_path_utf8 in $cf_search
8859     do
8860       if test -d $cf_cv_header_path_utf8 ; then
8861         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8862
8863 echo "${as_me:-configure}:8863: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8864
8865         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8866         cat >conftest.$ac_ext <<_ACEOF
8867 #line 8867 "configure"
8868 #include "confdefs.h"
8869
8870 #include <libutf8.h>
8871 int
8872 main ()
8873 {
8874 putwc(0,0);
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext
8880 if { (eval echo "$as_me:8880: \"$ac_compile\"") >&5
8881   (eval $ac_compile) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -s conftest.$ac_objext'
8886   { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887   (eval $ac_try) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891
8892             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8893
8894 echo "${as_me:-configure}:8894: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8895
8896             cf_cv_find_linkage_utf8=maybe
8897             cf_test_CPPFLAGS="$CPPFLAGS"
8898             break
8899 else
8900   echo "$as_me: failed program was:" >&5
8901 cat conftest.$ac_ext >&5
8902
8903             CPPFLAGS="$cf_save_CPPFLAGS"
8904
8905 fi
8906 rm -f conftest.$ac_objext conftest.$ac_ext
8907       fi
8908     done
8909
8910     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8911
8912 echo "${as_me:-configure}:8912: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8913
8914       cf_save_LIBS="$LIBS"
8915       cf_save_LDFLAGS="$LDFLAGS"
8916
8917       if test "$cf_cv_find_linkage_utf8" != yes ; then
8918
8919 cf_search=
8920 cf_library_path_list=""
8921 if test -n "${LDFLAGS}${LIBS}" ; then
8922         for cf_library_path in $LDFLAGS $LIBS
8923         do
8924                 case $cf_library_path in #(vi
8925                 -L*)
8926                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8927
8928 test "$cf_library_path" != "NONE" && \
8929 test -d "$cf_library_path" && \
8930  {
8931         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8932         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8933         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8934         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8935         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8936         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8937 }
8938
8939                         cf_library_path_list="$cf_library_path_list $cf_search"
8940                         ;;
8941                 esac
8942         done
8943 fi
8944
8945 cf_search=
8946
8947 test "/usr" != "$prefix" && \
8948 test -d "/usr" && \
8949 (test $prefix = NONE || test "/usr" != "$prefix") && {
8950         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8951         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8952         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8953         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8954         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8955         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8956 }
8957
8958 test "$prefix" != "NONE" && \
8959 test -d "$prefix" && \
8960  {
8961         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8962         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8963         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8964         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8965         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8966         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8967 }
8968
8969 test "/usr/local" != "$prefix" && \
8970 test -d "/usr/local" && \
8971 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8972         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8973         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8974         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8975         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8976         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8977         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8978 }
8979
8980 test "/opt" != "$prefix" && \
8981 test -d "/opt" && \
8982 (test $prefix = NONE || test "/opt" != "$prefix") && {
8983         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8984         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8985         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8986         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8987         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8988         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8989 }
8990
8991 test "$HOME" != "$prefix" && \
8992 test -d "$HOME" && \
8993 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8994         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8995         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8996         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8997         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8998         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8999         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9000 }
9001
9002 cf_search="$cf_library_path_list $cf_search"
9003
9004         for cf_cv_library_path_utf8 in $cf_search
9005         do
9006           if test -d $cf_cv_library_path_utf8 ; then
9007             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9008
9009 echo "${as_me:-configure}:9009: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9010
9011             CPPFLAGS="$cf_test_CPPFLAGS"
9012             LIBS="-lutf8  $cf_save_LIBS"
9013             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9014             cat >conftest.$ac_ext <<_ACEOF
9015 #line 9015 "configure"
9016 #include "confdefs.h"
9017
9018 #include <libutf8.h>
9019 int
9020 main ()
9021 {
9022 putwc(0,0);
9023   ;
9024   return 0;
9025 }
9026 _ACEOF
9027 rm -f conftest.$ac_objext conftest$ac_exeext
9028 if { (eval echo "$as_me:9028: \"$ac_link\"") >&5
9029   (eval $ac_link) 2>&5
9030   ac_status=$?
9031   echo "$as_me:9031: \$? = $ac_status" >&5
9032   (exit $ac_status); } &&
9033          { ac_try='test -s conftest$ac_exeext'
9034   { (eval echo "$as_me:9034: \"$ac_try\"") >&5
9035   (eval $ac_try) 2>&5
9036   ac_status=$?
9037   echo "$as_me:9037: \$? = $ac_status" >&5
9038   (exit $ac_status); }; }; then
9039
9040                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9041
9042 echo "${as_me:-configure}:9042: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9043
9044                 cf_cv_find_linkage_utf8=yes
9045                 cf_cv_library_file_utf8="-lutf8"
9046                 break
9047 else
9048   echo "$as_me: failed program was:" >&5
9049 cat conftest.$ac_ext >&5
9050
9051                 CPPFLAGS="$cf_save_CPPFLAGS"
9052                 LIBS="$cf_save_LIBS"
9053                 LDFLAGS="$cf_save_LDFLAGS"
9054
9055 fi
9056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9057           fi
9058         done
9059         CPPFLAGS="$cf_save_CPPFLAGS"
9060         LDFLAGS="$cf_save_LDFLAGS"
9061       fi
9062
9063     else
9064       cf_cv_find_linkage_utf8=no
9065     fi
9066
9067 fi
9068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9069
9070 fi
9071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9072
9073 LIBS="$cf_save_LIBS"
9074
9075 if test "$cf_cv_find_linkage_utf8" = yes ; then
9076 cf_cv_utf8_lib=add-on
9077 else
9078 cf_cv_utf8_lib=no
9079 fi
9080
9081 fi
9082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9083 fi
9084 echo "$as_me:9084: result: $cf_cv_utf8_lib" >&5
9085 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9086
9087 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9088 # ncurses/ncursesw:
9089 if test "$cf_cv_utf8_lib" = "add-on" ; then
9090         cat >>confdefs.h <<\EOF
9091 #define HAVE_LIBUTF8_H 1
9092 EOF
9093
9094 if test -n "$cf_cv_header_path_utf8" ; then
9095   for cf_add_incdir in $cf_cv_header_path_utf8
9096   do
9097         while test $cf_add_incdir != /usr/include
9098         do
9099           if test -d $cf_add_incdir
9100           then
9101                 cf_have_incdir=no
9102                 if test -n "$CFLAGS$CPPFLAGS" ; then
9103                   # a loop is needed to ensure we can add subdirs of existing dirs
9104                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9105                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9106                           cf_have_incdir=yes; break
9107                         fi
9108                   done
9109                 fi
9110
9111                 if test "$cf_have_incdir" = no ; then
9112                   if test "$cf_add_incdir" = /usr/local/include ; then
9113                         if test "$GCC" = yes
9114                         then
9115                           cf_save_CPPFLAGS=$CPPFLAGS
9116                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9117                           cat >conftest.$ac_ext <<_ACEOF
9118 #line 9118 "configure"
9119 #include "confdefs.h"
9120 #include <stdio.h>
9121 int
9122 main ()
9123 {
9124 printf("Hello")
9125   ;
9126   return 0;
9127 }
9128 _ACEOF
9129 rm -f conftest.$ac_objext
9130 if { (eval echo "$as_me:9130: \"$ac_compile\"") >&5
9131   (eval $ac_compile) 2>&5
9132   ac_status=$?
9133   echo "$as_me:9133: \$? = $ac_status" >&5
9134   (exit $ac_status); } &&
9135          { ac_try='test -s conftest.$ac_objext'
9136   { (eval echo "$as_me:9136: \"$ac_try\"") >&5
9137   (eval $ac_try) 2>&5
9138   ac_status=$?
9139   echo "$as_me:9139: \$? = $ac_status" >&5
9140   (exit $ac_status); }; }; then
9141   :
9142 else
9143   echo "$as_me: failed program was:" >&5
9144 cat conftest.$ac_ext >&5
9145 cf_have_incdir=yes
9146 fi
9147 rm -f conftest.$ac_objext conftest.$ac_ext
9148                           CPPFLAGS=$cf_save_CPPFLAGS
9149                         fi
9150                   fi
9151                 fi
9152
9153                 if test "$cf_have_incdir" = no ; then
9154                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9155
9156 echo "${as_me:-configure}:9156: testing adding $cf_add_incdir to include-path ..." 1>&5
9157
9158                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9159
9160                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9161                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9162                   cf_add_incdir="$cf_top_incdir"
9163                 else
9164                   break
9165                 fi
9166           fi
9167         done
9168   done
9169 fi
9170
9171 if test -n "$cf_cv_library_path_utf8" ; then
9172   for cf_add_libdir in $cf_cv_library_path_utf8
9173   do
9174     if test $cf_add_libdir = /usr/lib ; then
9175       :
9176     elif test -d $cf_add_libdir
9177     then
9178       cf_have_libdir=no
9179       if test -n "$LDFLAGS$LIBS" ; then
9180         # a loop is needed to ensure we can add subdirs of existing dirs
9181         for cf_test_libdir in $LDFLAGS $LIBS ; do
9182           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9183             cf_have_libdir=yes; break
9184           fi
9185         done
9186       fi
9187       if test "$cf_have_libdir" = no ; then
9188         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9189
9190 echo "${as_me:-configure}:9190: testing adding $cf_add_libdir to library-path ..." 1>&5
9191
9192         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9193       fi
9194     fi
9195   done
9196 fi
9197
9198         LIBS="$cf_cv_library_file_utf8 $LIBS"
9199 fi
9200
9201                 if test "$cf_cv_utf8_lib" != no ; then
9202                         NCURSES_LIBUTF8=1
9203                 fi
9204         fi
9205
9206 # This is needed on Tru64 5.0 to declare mbstate_t
9207 echo "$as_me:9207: checking if we must include wchar.h to declare mbstate_t" >&5
9208 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9209 if test "${cf_cv_mbstate_t+set}" = set; then
9210   echo $ECHO_N "(cached) $ECHO_C" >&6
9211 else
9212
9213 cat >conftest.$ac_ext <<_ACEOF
9214 #line 9214 "configure"
9215 #include "confdefs.h"
9216
9217 #include <stdlib.h>
9218 #include <stdarg.h>
9219 #include <stdio.h>
9220 #ifdef HAVE_LIBUTF8_H
9221 #include <libutf8.h>
9222 #endif
9223 int
9224 main ()
9225 {
9226 mbstate_t state
9227   ;
9228   return 0;
9229 }
9230 _ACEOF
9231 rm -f conftest.$ac_objext
9232 if { (eval echo "$as_me:9232: \"$ac_compile\"") >&5
9233   (eval $ac_compile) 2>&5
9234   ac_status=$?
9235   echo "$as_me:9235: \$? = $ac_status" >&5
9236   (exit $ac_status); } &&
9237          { ac_try='test -s conftest.$ac_objext'
9238   { (eval echo "$as_me:9238: \"$ac_try\"") >&5
9239   (eval $ac_try) 2>&5
9240   ac_status=$?
9241   echo "$as_me:9241: \$? = $ac_status" >&5
9242   (exit $ac_status); }; }; then
9243   cf_cv_mbstate_t=no
9244 else
9245   echo "$as_me: failed program was:" >&5
9246 cat conftest.$ac_ext >&5
9247 cat >conftest.$ac_ext <<_ACEOF
9248 #line 9248 "configure"
9249 #include "confdefs.h"
9250
9251 #include <stdlib.h>
9252 #include <stdarg.h>
9253 #include <stdio.h>
9254 #include <wchar.h>
9255 #ifdef HAVE_LIBUTF8_H
9256 #include <libutf8.h>
9257 #endif
9258 int
9259 main ()
9260 {
9261 mbstate_t value
9262   ;
9263   return 0;
9264 }
9265 _ACEOF
9266 rm -f conftest.$ac_objext
9267 if { (eval echo "$as_me:9267: \"$ac_compile\"") >&5
9268   (eval $ac_compile) 2>&5
9269   ac_status=$?
9270   echo "$as_me:9270: \$? = $ac_status" >&5
9271   (exit $ac_status); } &&
9272          { ac_try='test -s conftest.$ac_objext'
9273   { (eval echo "$as_me:9273: \"$ac_try\"") >&5
9274   (eval $ac_try) 2>&5
9275   ac_status=$?
9276   echo "$as_me:9276: \$? = $ac_status" >&5
9277   (exit $ac_status); }; }; then
9278   cf_cv_mbstate_t=yes
9279 else
9280   echo "$as_me: failed program was:" >&5
9281 cat conftest.$ac_ext >&5
9282 cf_cv_mbstate_t=unknown
9283 fi
9284 rm -f conftest.$ac_objext conftest.$ac_ext
9285 fi
9286 rm -f conftest.$ac_objext conftest.$ac_ext
9287 fi
9288 echo "$as_me:9288: result: $cf_cv_mbstate_t" >&5
9289 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9290
9291 if test "$cf_cv_mbstate_t" = yes ; then
9292         cat >>confdefs.h <<\EOF
9293 #define NEED_WCHAR_H 1
9294 EOF
9295
9296         NEED_WCHAR_H=1
9297 fi
9298
9299 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9300 if test "$cf_cv_mbstate_t" = unknown ; then
9301         NCURSES_MBSTATE_T=1
9302 fi
9303
9304 # This is needed on Tru64 5.0 to declare wchar_t
9305 echo "$as_me:9305: checking if we must include wchar.h to declare wchar_t" >&5
9306 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9307 if test "${cf_cv_wchar_t+set}" = set; then
9308   echo $ECHO_N "(cached) $ECHO_C" >&6
9309 else
9310
9311 cat >conftest.$ac_ext <<_ACEOF
9312 #line 9312 "configure"
9313 #include "confdefs.h"
9314
9315 #include <stdlib.h>
9316 #include <stdarg.h>
9317 #include <stdio.h>
9318 #ifdef HAVE_LIBUTF8_H
9319 #include <libutf8.h>
9320 #endif
9321 int
9322 main ()
9323 {
9324 wchar_t state
9325   ;
9326   return 0;
9327 }
9328 _ACEOF
9329 rm -f conftest.$ac_objext
9330 if { (eval echo "$as_me:9330: \"$ac_compile\"") >&5
9331   (eval $ac_compile) 2>&5
9332   ac_status=$?
9333   echo "$as_me:9333: \$? = $ac_status" >&5
9334   (exit $ac_status); } &&
9335          { ac_try='test -s conftest.$ac_objext'
9336   { (eval echo "$as_me:9336: \"$ac_try\"") >&5
9337   (eval $ac_try) 2>&5
9338   ac_status=$?
9339   echo "$as_me:9339: \$? = $ac_status" >&5
9340   (exit $ac_status); }; }; then
9341   cf_cv_wchar_t=no
9342 else
9343   echo "$as_me: failed program was:" >&5
9344 cat conftest.$ac_ext >&5
9345 cat >conftest.$ac_ext <<_ACEOF
9346 #line 9346 "configure"
9347 #include "confdefs.h"
9348
9349 #include <stdlib.h>
9350 #include <stdarg.h>
9351 #include <stdio.h>
9352 #include <wchar.h>
9353 #ifdef HAVE_LIBUTF8_H
9354 #include <libutf8.h>
9355 #endif
9356 int
9357 main ()
9358 {
9359 wchar_t value
9360   ;
9361   return 0;
9362 }
9363 _ACEOF
9364 rm -f conftest.$ac_objext
9365 if { (eval echo "$as_me:9365: \"$ac_compile\"") >&5
9366   (eval $ac_compile) 2>&5
9367   ac_status=$?
9368   echo "$as_me:9368: \$? = $ac_status" >&5
9369   (exit $ac_status); } &&
9370          { ac_try='test -s conftest.$ac_objext'
9371   { (eval echo "$as_me:9371: \"$ac_try\"") >&5
9372   (eval $ac_try) 2>&5
9373   ac_status=$?
9374   echo "$as_me:9374: \$? = $ac_status" >&5
9375   (exit $ac_status); }; }; then
9376   cf_cv_wchar_t=yes
9377 else
9378   echo "$as_me: failed program was:" >&5
9379 cat conftest.$ac_ext >&5
9380 cf_cv_wchar_t=unknown
9381 fi
9382 rm -f conftest.$ac_objext conftest.$ac_ext
9383 fi
9384 rm -f conftest.$ac_objext conftest.$ac_ext
9385 fi
9386 echo "$as_me:9386: result: $cf_cv_wchar_t" >&5
9387 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9388
9389 if test "$cf_cv_wchar_t" = yes ; then
9390         cat >>confdefs.h <<\EOF
9391 #define NEED_WCHAR_H 1
9392 EOF
9393
9394         NEED_WCHAR_H=1
9395 fi
9396
9397 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9398 if test "$cf_cv_wchar_t" = unknown ; then
9399         NCURSES_WCHAR_T=1
9400 fi
9401
9402 # if we find wchar_t in either place, use substitution to provide a fallback.
9403 if test "$cf_cv_wchar_t" != unknown ; then
9404         NCURSES_OK_WCHAR_T=1
9405 fi
9406
9407 # This is needed on Tru64 5.0 to declare wint_t
9408 echo "$as_me:9408: checking if we must include wchar.h to declare wint_t" >&5
9409 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9410 if test "${cf_cv_wint_t+set}" = set; then
9411   echo $ECHO_N "(cached) $ECHO_C" >&6
9412 else
9413
9414 cat >conftest.$ac_ext <<_ACEOF
9415 #line 9415 "configure"
9416 #include "confdefs.h"
9417
9418 #include <stdlib.h>
9419 #include <stdarg.h>
9420 #include <stdio.h>
9421 #ifdef HAVE_LIBUTF8_H
9422 #include <libutf8.h>
9423 #endif
9424 int
9425 main ()
9426 {
9427 wint_t state
9428   ;
9429   return 0;
9430 }
9431 _ACEOF
9432 rm -f conftest.$ac_objext
9433 if { (eval echo "$as_me:9433: \"$ac_compile\"") >&5
9434   (eval $ac_compile) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); } &&
9438          { ac_try='test -s conftest.$ac_objext'
9439   { (eval echo "$as_me:9439: \"$ac_try\"") >&5
9440   (eval $ac_try) 2>&5
9441   ac_status=$?
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); }; }; then
9444   cf_cv_wint_t=no
9445 else
9446   echo "$as_me: failed program was:" >&5
9447 cat conftest.$ac_ext >&5
9448 cat >conftest.$ac_ext <<_ACEOF
9449 #line 9449 "configure"
9450 #include "confdefs.h"
9451
9452 #include <stdlib.h>
9453 #include <stdarg.h>
9454 #include <stdio.h>
9455 #include <wchar.h>
9456 #ifdef HAVE_LIBUTF8_H
9457 #include <libutf8.h>
9458 #endif
9459 int
9460 main ()
9461 {
9462 wint_t value
9463   ;
9464   return 0;
9465 }
9466 _ACEOF
9467 rm -f conftest.$ac_objext
9468 if { (eval echo "$as_me:9468: \"$ac_compile\"") >&5
9469   (eval $ac_compile) 2>&5
9470   ac_status=$?
9471   echo "$as_me:9471: \$? = $ac_status" >&5
9472   (exit $ac_status); } &&
9473          { ac_try='test -s conftest.$ac_objext'
9474   { (eval echo "$as_me:9474: \"$ac_try\"") >&5
9475   (eval $ac_try) 2>&5
9476   ac_status=$?
9477   echo "$as_me:9477: \$? = $ac_status" >&5
9478   (exit $ac_status); }; }; then
9479   cf_cv_wint_t=yes
9480 else
9481   echo "$as_me: failed program was:" >&5
9482 cat conftest.$ac_ext >&5
9483 cf_cv_wint_t=unknown
9484 fi
9485 rm -f conftest.$ac_objext conftest.$ac_ext
9486 fi
9487 rm -f conftest.$ac_objext conftest.$ac_ext
9488 fi
9489 echo "$as_me:9489: result: $cf_cv_wint_t" >&5
9490 echo "${ECHO_T}$cf_cv_wint_t" >&6
9491
9492 if test "$cf_cv_wint_t" = yes ; then
9493         cat >>confdefs.h <<\EOF
9494 #define NEED_WCHAR_H 1
9495 EOF
9496
9497         NEED_WCHAR_H=1
9498 fi
9499
9500 # if we do not find wint_t in either place, use substitution to provide a fallback.
9501 if test "$cf_cv_wint_t" = unknown ; then
9502         NCURSES_WINT_T=1
9503 fi
9504
9505 # if we find wint_t in either place, use substitution to provide a fallback.
9506 if test "$cf_cv_wint_t" != unknown ; then
9507         NCURSES_OK_WINT_T=1
9508 fi
9509
9510         if test "$NCURSES_MBSTATE_T" != 0; then
9511                 cat >>confdefs.h <<\EOF
9512 #define NEED_MBSTATE_T_DEF 1
9513 EOF
9514
9515         fi
9516 fi
9517
9518 ###   use option --disable-lp64 to allow long chtype
9519 case $cf_cv_abi_version in
9520 [345]*)
9521         default_with_lp64=no
9522         ;;
9523 *)
9524         default_with_lp64=yes
9525         ;;
9526 esac
9527
9528 echo "$as_me:9528: checking whether to enable _LP64 definition in curses.h" >&5
9529 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9530
9531 # Check whether --enable-lp64 or --disable-lp64 was given.
9532 if test "${enable_lp64+set}" = set; then
9533   enableval="$enable_lp64"
9534   with_lp64=$enableval
9535 else
9536   with_lp64=$default_with_lp64
9537 fi;
9538 echo "$as_me:9538: result: $with_lp64" >&5
9539 echo "${ECHO_T}$with_lp64" >&6
9540
9541 if test "$with_lp64" = yes ; then
9542         cf_cv_enable_lp64=1
9543 else
9544         cf_cv_enable_lp64=0
9545 fi
9546
9547 # Check whether --enable-largefile or --disable-largefile was given.
9548 if test "${enable_largefile+set}" = set; then
9549   enableval="$enable_largefile"
9550
9551 fi;
9552 if test "$enable_largefile" != no; then
9553
9554   echo "$as_me:9554: checking for special C compiler options needed for large files" >&5
9555 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9556 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9557   echo $ECHO_N "(cached) $ECHO_C" >&6
9558 else
9559   ac_cv_sys_largefile_CC=no
9560      if test "$GCC" != yes; then
9561        ac_save_CC=$CC
9562        while :; do
9563          # IRIX 6.2 and later do not support large files by default,
9564          # so use the C compiler's -n32 option if that helps.
9565          cat >conftest.$ac_ext <<_ACEOF
9566 #line 9566 "configure"
9567 #include "confdefs.h"
9568 #include <sys/types.h>
9569  /* Check that off_t can represent 2**63 - 1 correctly.
9570     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9571     since some C++ compilers masquerading as C compilers
9572     incorrectly reject 9223372036854775807.  */
9573 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9574   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9575                        && LARGE_OFF_T % 2147483647 == 1)
9576                       ? 1 : -1];
9577 int
9578 main ()
9579 {
9580
9581   ;
9582   return 0;
9583 }
9584 _ACEOF
9585          rm -f conftest.$ac_objext
9586 if { (eval echo "$as_me:9586: \"$ac_compile\"") >&5
9587   (eval $ac_compile) 2>&5
9588   ac_status=$?
9589   echo "$as_me:9589: \$? = $ac_status" >&5
9590   (exit $ac_status); } &&
9591          { ac_try='test -s conftest.$ac_objext'
9592   { (eval echo "$as_me:9592: \"$ac_try\"") >&5
9593   (eval $ac_try) 2>&5
9594   ac_status=$?
9595   echo "$as_me:9595: \$? = $ac_status" >&5
9596   (exit $ac_status); }; }; then
9597   break
9598 else
9599   echo "$as_me: failed program was:" >&5
9600 cat conftest.$ac_ext >&5
9601 fi
9602 rm -f conftest.$ac_objext
9603          CC="$CC -n32"
9604          rm -f conftest.$ac_objext
9605 if { (eval echo "$as_me:9605: \"$ac_compile\"") >&5
9606   (eval $ac_compile) 2>&5
9607   ac_status=$?
9608   echo "$as_me:9608: \$? = $ac_status" >&5
9609   (exit $ac_status); } &&
9610          { ac_try='test -s conftest.$ac_objext'
9611   { (eval echo "$as_me:9611: \"$ac_try\"") >&5
9612   (eval $ac_try) 2>&5
9613   ac_status=$?
9614   echo "$as_me:9614: \$? = $ac_status" >&5
9615   (exit $ac_status); }; }; then
9616   ac_cv_sys_largefile_CC=' -n32'; break
9617 else
9618   echo "$as_me: failed program was:" >&5
9619 cat conftest.$ac_ext >&5
9620 fi
9621 rm -f conftest.$ac_objext
9622          break
9623        done
9624        CC=$ac_save_CC
9625        rm -f conftest.$ac_ext
9626     fi
9627 fi
9628 echo "$as_me:9628: result: $ac_cv_sys_largefile_CC" >&5
9629 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9630   if test "$ac_cv_sys_largefile_CC" != no; then
9631     CC=$CC$ac_cv_sys_largefile_CC
9632   fi
9633
9634   echo "$as_me:9634: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9635 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9636 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9637   echo $ECHO_N "(cached) $ECHO_C" >&6
9638 else
9639   while :; do
9640   ac_cv_sys_file_offset_bits=no
9641   cat >conftest.$ac_ext <<_ACEOF
9642 #line 9642 "configure"
9643 #include "confdefs.h"
9644 #include <sys/types.h>
9645  /* Check that off_t can represent 2**63 - 1 correctly.
9646     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9647     since some C++ compilers masquerading as C compilers
9648     incorrectly reject 9223372036854775807.  */
9649 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9650   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9651                        && LARGE_OFF_T % 2147483647 == 1)
9652                       ? 1 : -1];
9653 int
9654 main ()
9655 {
9656
9657   ;
9658   return 0;
9659 }
9660 _ACEOF
9661 rm -f conftest.$ac_objext
9662 if { (eval echo "$as_me:9662: \"$ac_compile\"") >&5
9663   (eval $ac_compile) 2>&5
9664   ac_status=$?
9665   echo "$as_me:9665: \$? = $ac_status" >&5
9666   (exit $ac_status); } &&
9667          { ac_try='test -s conftest.$ac_objext'
9668   { (eval echo "$as_me:9668: \"$ac_try\"") >&5
9669   (eval $ac_try) 2>&5
9670   ac_status=$?
9671   echo "$as_me:9671: \$? = $ac_status" >&5
9672   (exit $ac_status); }; }; then
9673   break
9674 else
9675   echo "$as_me: failed program was:" >&5
9676 cat conftest.$ac_ext >&5
9677 fi
9678 rm -f conftest.$ac_objext conftest.$ac_ext
9679   cat >conftest.$ac_ext <<_ACEOF
9680 #line 9680 "configure"
9681 #include "confdefs.h"
9682 #define _FILE_OFFSET_BITS 64
9683 #include <sys/types.h>
9684  /* Check that off_t can represent 2**63 - 1 correctly.
9685     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9686     since some C++ compilers masquerading as C compilers
9687     incorrectly reject 9223372036854775807.  */
9688 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9689   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9690                        && LARGE_OFF_T % 2147483647 == 1)
9691                       ? 1 : -1];
9692 int
9693 main ()
9694 {
9695
9696   ;
9697   return 0;
9698 }
9699 _ACEOF
9700 rm -f conftest.$ac_objext
9701 if { (eval echo "$as_me:9701: \"$ac_compile\"") >&5
9702   (eval $ac_compile) 2>&5
9703   ac_status=$?
9704   echo "$as_me:9704: \$? = $ac_status" >&5
9705   (exit $ac_status); } &&
9706          { ac_try='test -s conftest.$ac_objext'
9707   { (eval echo "$as_me:9707: \"$ac_try\"") >&5
9708   (eval $ac_try) 2>&5
9709   ac_status=$?
9710   echo "$as_me:9710: \$? = $ac_status" >&5
9711   (exit $ac_status); }; }; then
9712   ac_cv_sys_file_offset_bits=64; break
9713 else
9714   echo "$as_me: failed program was:" >&5
9715 cat conftest.$ac_ext >&5
9716 fi
9717 rm -f conftest.$ac_objext conftest.$ac_ext
9718   break
9719 done
9720 fi
9721 echo "$as_me:9721: result: $ac_cv_sys_file_offset_bits" >&5
9722 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9723 if test "$ac_cv_sys_file_offset_bits" != no; then
9724
9725 cat >>confdefs.h <<EOF
9726 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9727 EOF
9728
9729 fi
9730 rm -rf conftest*
9731   echo "$as_me:9731: checking for _LARGE_FILES value needed for large files" >&5
9732 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9733 if test "${ac_cv_sys_large_files+set}" = set; then
9734   echo $ECHO_N "(cached) $ECHO_C" >&6
9735 else
9736   while :; do
9737   ac_cv_sys_large_files=no
9738   cat >conftest.$ac_ext <<_ACEOF
9739 #line 9739 "configure"
9740 #include "confdefs.h"
9741 #include <sys/types.h>
9742  /* Check that off_t can represent 2**63 - 1 correctly.
9743     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9744     since some C++ compilers masquerading as C compilers
9745     incorrectly reject 9223372036854775807.  */
9746 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9747   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9748                        && LARGE_OFF_T % 2147483647 == 1)
9749                       ? 1 : -1];
9750 int
9751 main ()
9752 {
9753
9754   ;
9755   return 0;
9756 }
9757 _ACEOF
9758 rm -f conftest.$ac_objext
9759 if { (eval echo "$as_me:9759: \"$ac_compile\"") >&5
9760   (eval $ac_compile) 2>&5
9761   ac_status=$?
9762   echo "$as_me:9762: \$? = $ac_status" >&5
9763   (exit $ac_status); } &&
9764          { ac_try='test -s conftest.$ac_objext'
9765   { (eval echo "$as_me:9765: \"$ac_try\"") >&5
9766   (eval $ac_try) 2>&5
9767   ac_status=$?
9768   echo "$as_me:9768: \$? = $ac_status" >&5
9769   (exit $ac_status); }; }; then
9770   break
9771 else
9772   echo "$as_me: failed program was:" >&5
9773 cat conftest.$ac_ext >&5
9774 fi
9775 rm -f conftest.$ac_objext conftest.$ac_ext
9776   cat >conftest.$ac_ext <<_ACEOF
9777 #line 9777 "configure"
9778 #include "confdefs.h"
9779 #define _LARGE_FILES 1
9780 #include <sys/types.h>
9781  /* Check that off_t can represent 2**63 - 1 correctly.
9782     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9783     since some C++ compilers masquerading as C compilers
9784     incorrectly reject 9223372036854775807.  */
9785 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9786   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9787                        && LARGE_OFF_T % 2147483647 == 1)
9788                       ? 1 : -1];
9789 int
9790 main ()
9791 {
9792
9793   ;
9794   return 0;
9795 }
9796 _ACEOF
9797 rm -f conftest.$ac_objext
9798 if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
9799   (eval $ac_compile) 2>&5
9800   ac_status=$?
9801   echo "$as_me:9801: \$? = $ac_status" >&5
9802   (exit $ac_status); } &&
9803          { ac_try='test -s conftest.$ac_objext'
9804   { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805   (eval $ac_try) 2>&5
9806   ac_status=$?
9807   echo "$as_me:9807: \$? = $ac_status" >&5
9808   (exit $ac_status); }; }; then
9809   ac_cv_sys_large_files=1; break
9810 else
9811   echo "$as_me: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9813 fi
9814 rm -f conftest.$ac_objext conftest.$ac_ext
9815   break
9816 done
9817 fi
9818 echo "$as_me:9818: result: $ac_cv_sys_large_files" >&5
9819 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9820 if test "$ac_cv_sys_large_files" != no; then
9821
9822 cat >>confdefs.h <<EOF
9823 #define _LARGE_FILES $ac_cv_sys_large_files
9824 EOF
9825
9826 fi
9827 rm -rf conftest*
9828 fi
9829
9830     if test "$enable_largefile" != no ; then
9831         echo "$as_me:9831: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9832 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9833 if test "${ac_cv_sys_largefile_source+set}" = set; then
9834   echo $ECHO_N "(cached) $ECHO_C" >&6
9835 else
9836   while :; do
9837   ac_cv_sys_largefile_source=no
9838   cat >conftest.$ac_ext <<_ACEOF
9839 #line 9839 "configure"
9840 #include "confdefs.h"
9841 #include <stdio.h>
9842 int
9843 main ()
9844 {
9845 return !fseeko;
9846   ;
9847   return 0;
9848 }
9849 _ACEOF
9850 rm -f conftest.$ac_objext
9851 if { (eval echo "$as_me:9851: \"$ac_compile\"") >&5
9852   (eval $ac_compile) 2>&5
9853   ac_status=$?
9854   echo "$as_me:9854: \$? = $ac_status" >&5
9855   (exit $ac_status); } &&
9856          { ac_try='test -s conftest.$ac_objext'
9857   { (eval echo "$as_me:9857: \"$ac_try\"") >&5
9858   (eval $ac_try) 2>&5
9859   ac_status=$?
9860   echo "$as_me:9860: \$? = $ac_status" >&5
9861   (exit $ac_status); }; }; then
9862   break
9863 else
9864   echo "$as_me: failed program was:" >&5
9865 cat conftest.$ac_ext >&5
9866 fi
9867 rm -f conftest.$ac_objext conftest.$ac_ext
9868   cat >conftest.$ac_ext <<_ACEOF
9869 #line 9869 "configure"
9870 #include "confdefs.h"
9871 #define _LARGEFILE_SOURCE 1
9872 #include <stdio.h>
9873 int
9874 main ()
9875 {
9876 return !fseeko;
9877   ;
9878   return 0;
9879 }
9880 _ACEOF
9881 rm -f conftest.$ac_objext
9882 if { (eval echo "$as_me:9882: \"$ac_compile\"") >&5
9883   (eval $ac_compile) 2>&5
9884   ac_status=$?
9885   echo "$as_me:9885: \$? = $ac_status" >&5
9886   (exit $ac_status); } &&
9887          { ac_try='test -s conftest.$ac_objext'
9888   { (eval echo "$as_me:9888: \"$ac_try\"") >&5
9889   (eval $ac_try) 2>&5
9890   ac_status=$?
9891   echo "$as_me:9891: \$? = $ac_status" >&5
9892   (exit $ac_status); }; }; then
9893   ac_cv_sys_largefile_source=1; break
9894 else
9895   echo "$as_me: failed program was:" >&5
9896 cat conftest.$ac_ext >&5
9897 fi
9898 rm -f conftest.$ac_objext conftest.$ac_ext
9899   break
9900 done
9901 fi
9902 echo "$as_me:9902: result: $ac_cv_sys_largefile_source" >&5
9903 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9904 if test "$ac_cv_sys_largefile_source" != no; then
9905
9906 cat >>confdefs.h <<EOF
9907 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9908 EOF
9909
9910 fi
9911 rm -rf conftest*
9912
9913 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9914 # in glibc 2.1.3, but that breaks too many other things.
9915 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9916 echo "$as_me:9916: checking for fseeko" >&5
9917 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9918 if test "${ac_cv_func_fseeko+set}" = set; then
9919   echo $ECHO_N "(cached) $ECHO_C" >&6
9920 else
9921   cat >conftest.$ac_ext <<_ACEOF
9922 #line 9922 "configure"
9923 #include "confdefs.h"
9924 #include <stdio.h>
9925 int
9926 main ()
9927 {
9928 return fseeko && fseeko (stdin, 0, 0);
9929   ;
9930   return 0;
9931 }
9932 _ACEOF
9933 rm -f conftest.$ac_objext conftest$ac_exeext
9934 if { (eval echo "$as_me:9934: \"$ac_link\"") >&5
9935   (eval $ac_link) 2>&5
9936   ac_status=$?
9937   echo "$as_me:9937: \$? = $ac_status" >&5
9938   (exit $ac_status); } &&
9939          { ac_try='test -s conftest$ac_exeext'
9940   { (eval echo "$as_me:9940: \"$ac_try\"") >&5
9941   (eval $ac_try) 2>&5
9942   ac_status=$?
9943   echo "$as_me:9943: \$? = $ac_status" >&5
9944   (exit $ac_status); }; }; then
9945   ac_cv_func_fseeko=yes
9946 else
9947   echo "$as_me: failed program was:" >&5
9948 cat conftest.$ac_ext >&5
9949 ac_cv_func_fseeko=no
9950 fi
9951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9952 fi
9953 echo "$as_me:9953: result: $ac_cv_func_fseeko" >&5
9954 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9955 if test $ac_cv_func_fseeko = yes; then
9956
9957 cat >>confdefs.h <<\EOF
9958 #define HAVE_FSEEKO 1
9959 EOF
9960
9961 fi
9962
9963         # Normally we would collect these definitions in the config.h,
9964         # but (like _XOPEN_SOURCE), some environments rely on having these
9965         # defined before any of the system headers are included.  Another
9966         # case comes up with C++, e.g., on AIX the compiler compiles the
9967         # header files by themselves before looking at the body files it is
9968         # told to compile.  For ncurses, those header files do not include
9969         # the config.h
9970         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9971         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9972         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9973
9974         echo "$as_me:9974: checking whether to use struct dirent64" >&5
9975 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9976 if test "${cf_cv_struct_dirent64+set}" = set; then
9977   echo $ECHO_N "(cached) $ECHO_C" >&6
9978 else
9979
9980                 cat >conftest.$ac_ext <<_ACEOF
9981 #line 9981 "configure"
9982 #include "confdefs.h"
9983
9984 #include <sys/types.h>
9985 #include <dirent.h>
9986
9987 int
9988 main ()
9989 {
9990
9991                 /* if transitional largefile support is setup, this is true */
9992                 extern struct dirent64 * readdir(DIR *);
9993                 struct dirent64 *x = readdir((DIR *)0);
9994                 struct dirent *y = readdir((DIR *)0);
9995                 int z = x - y;
9996
9997   ;
9998   return 0;
9999 }
10000 _ACEOF
10001 rm -f conftest.$ac_objext
10002 if { (eval echo "$as_me:10002: \"$ac_compile\"") >&5
10003   (eval $ac_compile) 2>&5
10004   ac_status=$?
10005   echo "$as_me:10005: \$? = $ac_status" >&5
10006   (exit $ac_status); } &&
10007          { ac_try='test -s conftest.$ac_objext'
10008   { (eval echo "$as_me:10008: \"$ac_try\"") >&5
10009   (eval $ac_try) 2>&5
10010   ac_status=$?
10011   echo "$as_me:10011: \$? = $ac_status" >&5
10012   (exit $ac_status); }; }; then
10013   cf_cv_struct_dirent64=yes
10014 else
10015   echo "$as_me: failed program was:" >&5
10016 cat conftest.$ac_ext >&5
10017 cf_cv_struct_dirent64=no
10018 fi
10019 rm -f conftest.$ac_objext conftest.$ac_ext
10020
10021 fi
10022 echo "$as_me:10022: result: $cf_cv_struct_dirent64" >&5
10023 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10024         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10025 #define HAVE_STRUCT_DIRENT64 1
10026 EOF
10027
10028     fi
10029
10030 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10031 echo "$as_me:10031: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10032 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10033
10034 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10035 if test "${enable_tparm_varargs+set}" = set; then
10036   enableval="$enable_tparm_varargs"
10037   with_tparm_varargs=$enableval
10038 else
10039   with_tparm_varargs=yes
10040 fi;
10041 echo "$as_me:10041: result: $with_tparm_varargs" >&5
10042 echo "${ECHO_T}$with_tparm_varargs" >&6
10043 NCURSES_TPARM_VARARGS=0
10044 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10045
10046 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10047 if test "$with_ticlib" != no ; then
10048 echo "$as_me:10048: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10049 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10050
10051 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10052 if test "${enable_tic_depends+set}" = set; then
10053   enableval="$enable_tic_depends"
10054   with_tic_depends=$enableval
10055 else
10056   with_tic_depends=yes
10057 fi;
10058 echo "$as_me:10058: result: $with_tic_depends" >&5
10059 echo "${ECHO_T}$with_tic_depends" >&6
10060 else
10061         with_tic_depends=no
10062 fi
10063
10064 ###   use option --with-bool to override bool's type
10065 echo "$as_me:10065: checking for type of bool" >&5
10066 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10067
10068 # Check whether --with-bool or --without-bool was given.
10069 if test "${with_bool+set}" = set; then
10070   withval="$with_bool"
10071   NCURSES_BOOL="$withval"
10072 else
10073   NCURSES_BOOL=auto
10074 fi;
10075 echo "$as_me:10075: result: $NCURSES_BOOL" >&5
10076 echo "${ECHO_T}$NCURSES_BOOL" >&6
10077
10078 echo "$as_me:10078: checking for alternate terminal capabilities file" >&5
10079 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10080
10081 # Check whether --with-caps or --without-caps was given.
10082 if test "${with_caps+set}" = set; then
10083   withval="$with_caps"
10084   TERMINFO_CAPS=Caps.$withval
10085 else
10086   TERMINFO_CAPS=Caps
10087 fi;
10088 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10089 echo "$as_me:10089: result: $TERMINFO_CAPS" >&5
10090 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10091
10092 ###   use option --with-chtype to override chtype's type
10093 echo "$as_me:10093: checking for type of chtype" >&5
10094 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10095
10096 # Check whether --with-chtype or --without-chtype was given.
10097 if test "${with_chtype+set}" = set; then
10098   withval="$with_chtype"
10099   NCURSES_CHTYPE="$withval"
10100 else
10101   NCURSES_CHTYPE=auto
10102 fi;
10103 echo "$as_me:10103: result: $NCURSES_CHTYPE" >&5
10104 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10105
10106 ###   use option --with-ospeed to override ospeed's type
10107 echo "$as_me:10107: checking for type of ospeed" >&5
10108 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10109
10110 # Check whether --with-ospeed or --without-ospeed was given.
10111 if test "${with_ospeed+set}" = set; then
10112   withval="$with_ospeed"
10113   NCURSES_OSPEED="$withval"
10114 else
10115   NCURSES_OSPEED=short
10116 fi;
10117 echo "$as_me:10117: result: $NCURSES_OSPEED" >&5
10118 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10119
10120 ###   use option --with-mmask-t to override mmask_t's type
10121 echo "$as_me:10121: checking for type of mmask_t" >&5
10122 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10123
10124 # Check whether --with-mmask-t or --without-mmask-t was given.
10125 if test "${with_mmask_t+set}" = set; then
10126   withval="$with_mmask_t"
10127   NCURSES_MMASK_T="$withval"
10128 else
10129   NCURSES_MMASK_T=auto
10130 fi;
10131 echo "$as_me:10131: result: $NCURSES_MMASK_T" >&5
10132 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10133
10134 ###   use option --with-ccharw-max to override CCHARW_MAX size
10135 echo "$as_me:10135: checking for size CCHARW_MAX" >&5
10136 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10137
10138 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10139 if test "${with_ccharw_max+set}" = set; then
10140   withval="$with_ccharw_max"
10141   NCURSES_CCHARW_MAX="$withval"
10142 else
10143   NCURSES_CCHARW_MAX=5
10144 fi;
10145 echo "$as_me:10145: result: $NCURSES_CCHARW_MAX" >&5
10146 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10147
10148 ###   use option --with-tparm-arg to override tparm's argument type
10149 echo "$as_me:10149: checking for type of tparm args" >&5
10150 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10151
10152 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10153 if test "${with_tparm_arg+set}" = set; then
10154   withval="$with_tparm_arg"
10155   NCURSES_TPARM_ARG="$withval"
10156 else
10157   NCURSES_TPARM_ARG=long
10158 fi;
10159 echo "$as_me:10159: result: $NCURSES_TPARM_ARG" >&5
10160 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10161
10162 ### Enable compiling-in rcs id's
10163 echo "$as_me:10163: checking if RCS identifiers should be compiled-in" >&5
10164 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10165
10166 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10167 if test "${with_rcs_ids+set}" = set; then
10168   withval="$with_rcs_ids"
10169   with_rcs_ids=$withval
10170 else
10171   with_rcs_ids=no
10172 fi;
10173 echo "$as_me:10173: result: $with_rcs_ids" >&5
10174 echo "${ECHO_T}$with_rcs_ids" >&6
10175 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10176 #define USE_RCS_IDS 1
10177 EOF
10178
10179 ###############################################################################
10180
10181 echo "$as_me:10181: checking format of man-pages" >&5
10182 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10183
10184 # Check whether --with-manpage-format or --without-manpage-format was given.
10185 if test "${with_manpage_format+set}" = set; then
10186   withval="$with_manpage_format"
10187   MANPAGE_FORMAT=$withval
10188 else
10189   MANPAGE_FORMAT=unknown
10190 fi;
10191
10192 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10193 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10194
10195 cf_unknown=
10196
10197 case $MANPAGE_FORMAT in
10198 unknown)
10199   if test -z "$MANPATH" ; then
10200     MANPATH="/usr/man:/usr/share/man"
10201   fi
10202
10203   # look for the 'date' man-page (it's most likely to be installed!)
10204   MANPAGE_FORMAT=
10205   cf_preform=no
10206   cf_catonly=yes
10207   cf_example=date
10208
10209   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10210   for cf_dir in $MANPATH; do
10211     test -z "$cf_dir" && cf_dir=/usr/man
10212     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
10213     do
10214       cf_test=`echo $cf_name | sed -e 's/*//'`
10215       if test "x$cf_test" = "x$cf_name" ; then
10216
10217         case "$cf_name" in
10218         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10219         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10220         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10221         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10222         esac
10223
10224         case "$cf_name" in
10225         $cf_dir/man*)
10226           cf_catonly=no
10227           ;;
10228         $cf_dir/cat*)
10229           cf_preform=yes
10230           ;;
10231         esac
10232         break
10233       fi
10234
10235       # if we found a match in either man* or cat*, stop looking
10236       if test -n "$MANPAGE_FORMAT" ; then
10237         cf_found=no
10238         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10239         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10240         case "$cf_name" in
10241         $cf_dir/cat*)
10242           cf_found=yes
10243           ;;
10244         esac
10245         test $cf_found=yes && break
10246       fi
10247     done
10248     # only check the first directory in $MANPATH where we find manpages
10249     if test -n "$MANPAGE_FORMAT" ; then
10250        break
10251     fi
10252   done
10253   # if we did not find the example, just assume it is normal
10254   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10255   IFS="$ac_save_ifs"
10256   ;;
10257 *)
10258   for cf_option in $MANPAGE_FORMAT; do
10259      case $cf_option in #(vi
10260      gzip|compress|BSDI|normal|formatted|catonly)
10261        ;;
10262      *)
10263        cf_unknown="$cf_unknown $cf_option"
10264        ;;
10265      esac
10266   done
10267   ;;
10268 esac
10269
10270 echo "$as_me:10270: result: $MANPAGE_FORMAT" >&5
10271 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10272 if test -n "$cf_unknown" ; then
10273   { echo "$as_me:10273: WARNING: Unexpected manpage-format $cf_unknown" >&5
10274 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10275 fi
10276
10277 echo "$as_me:10277: checking for manpage renaming" >&5
10278 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10279
10280 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10281 if test "${with_manpage_renames+set}" = set; then
10282   withval="$with_manpage_renames"
10283   MANPAGE_RENAMES=$withval
10284 else
10285   MANPAGE_RENAMES=yes
10286 fi;
10287
10288 case ".$MANPAGE_RENAMES" in #(vi
10289 .no) #(vi
10290   ;;
10291 .|.yes)
10292   # Debian 'man' program?
10293   if test -f /etc/debian_version ; then
10294     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10295   else
10296     MANPAGE_RENAMES=no
10297   fi
10298   ;;
10299 esac
10300
10301 if test "$MANPAGE_RENAMES" != no ; then
10302   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10303     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10304   elif test ! -f $MANPAGE_RENAMES ; then
10305     { { echo "$as_me:10305: error: not a filename: $MANPAGE_RENAMES" >&5
10306 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10307    { (exit 1); exit 1; }; }
10308   fi
10309
10310   test ! -d man && mkdir man
10311
10312   # Construct a sed-script to perform renaming within man-pages
10313   if test -n "$MANPAGE_RENAMES" ; then
10314     test ! -d man && mkdir man
10315     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10316   fi
10317 fi
10318
10319 echo "$as_me:10319: result: $MANPAGE_RENAMES" >&5
10320 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10321
10322 echo "$as_me:10322: checking if manpage aliases will be installed" >&5
10323 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10324
10325 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10326 if test "${with_manpage_aliases+set}" = set; then
10327   withval="$with_manpage_aliases"
10328   MANPAGE_ALIASES=$withval
10329 else
10330   MANPAGE_ALIASES=yes
10331 fi;
10332
10333 echo "$as_me:10333: result: $MANPAGE_ALIASES" >&5
10334 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10335
10336 case "x$LN_S" in #(vi
10337 xln*) #(vi
10338         cf_use_symlinks=yes
10339         ;;
10340 *)
10341         cf_use_symlinks=no
10342         ;;
10343 esac
10344
10345 MANPAGE_SYMLINKS=no
10346 if test "$MANPAGE_ALIASES" = yes ; then
10347 echo "$as_me:10347: checking if manpage symlinks should be used" >&5
10348 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10349
10350 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10351 if test "${with_manpage_symlinks+set}" = set; then
10352   withval="$with_manpage_symlinks"
10353   MANPAGE_SYMLINKS=$withval
10354 else
10355   MANPAGE_SYMLINKS=$cf_use_symlinks
10356 fi;
10357
10358 if test "$$cf_use_symlinks" = no; then
10359 if test "$MANPAGE_SYMLINKS" = yes ; then
10360         { echo "$as_me:10360: WARNING: cannot make symlinks" >&5
10361 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10362         MANPAGE_SYMLINKS=no
10363 fi
10364 fi
10365
10366 echo "$as_me:10366: result: $MANPAGE_SYMLINKS" >&5
10367 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10368 fi
10369
10370 echo "$as_me:10370: checking for manpage tbl" >&5
10371 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10372
10373 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10374 if test "${with_manpage_tbl+set}" = set; then
10375   withval="$with_manpage_tbl"
10376   MANPAGE_TBL=$withval
10377 else
10378   MANPAGE_TBL=no
10379 fi;
10380
10381 echo "$as_me:10381: result: $MANPAGE_TBL" >&5
10382 echo "${ECHO_T}$MANPAGE_TBL" >&6
10383
10384   if test "$prefix" = "NONE" ; then
10385      cf_prefix="$ac_default_prefix"
10386   else
10387      cf_prefix="$prefix"
10388   fi
10389
10390   case "$MANPAGE_FORMAT" in # (vi
10391   *catonly*) # (vi
10392     cf_format=yes
10393     cf_inboth=no
10394     ;;
10395   *formatted*) # (vi
10396     cf_format=yes
10397     cf_inboth=yes
10398     ;;
10399   *)
10400     cf_format=no
10401     cf_inboth=no
10402     ;;
10403   esac
10404
10405 test ! -d man && mkdir man
10406
10407 cf_so_strip=
10408 cf_compress=
10409 case "$MANPAGE_FORMAT" in #(vi
10410 *compress*) #(vi
10411         cf_so_strip="Z"
10412         cf_compress=compress
10413   ;;
10414 *gzip*)
10415         cf_so_strip="gz"
10416         cf_compress=gzip
10417   ;;
10418 esac
10419
10420 cf_edit_man=./edit_man.sh
10421 cf_man_alias=`pwd`/man_alias.sed
10422
10423 cat >$cf_edit_man <<CF_EOF
10424 #! /bin/sh
10425 # this script is generated by the configure-script CF_MAN_PAGES macro.
10426
10427 prefix="$cf_prefix"
10428 datadir="$datadir"
10429
10430 NCURSES_MAJOR="$NCURSES_MAJOR"
10431 NCURSES_MINOR="$NCURSES_MINOR"
10432 NCURSES_PATCH="$NCURSES_PATCH"
10433
10434 NCURSES_OSPEED="$NCURSES_OSPEED"
10435 TERMINFO="$TERMINFO"
10436
10437 INSTALL="$INSTALL"
10438 INSTALL_DATA="$INSTALL_DATA"
10439
10440 transform="$program_transform_name"
10441
10442 TMP=\${TMPDIR:=/tmp}/man\$\$
10443 trap "rm -f \$TMP" 0 1 2 5 15
10444
10445 form=\$1
10446 shift || exit 1
10447
10448 verb=\$1
10449 shift || exit 1
10450
10451 mandir=\$1
10452 shift || exit 1
10453
10454 srcdir=\$1
10455 top_srcdir=\$srcdir/..
10456 shift || exit 1
10457
10458 if test "\$form" = normal ; then
10459         if test "$cf_format" = yes ; then
10460         if test "$cf_inboth" = no ; then
10461                 sh \$0 format \$verb \$mandir \$srcdir \$*
10462                 exit $?
10463         fi
10464         fi
10465         cf_subdir=\$mandir/man
10466         cf_tables=$MANPAGE_TBL
10467 else
10468         cf_subdir=\$mandir/cat
10469         cf_tables=yes
10470 fi
10471
10472 # process the list of source-files
10473 for i in \$* ; do
10474 case \$i in #(vi
10475 *.orig|*.rej) ;; #(vi
10476 *.[0-9]*)
10477         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10478         if test \$verb = installing ; then
10479         if test ! -d \$cf_subdir\${section} ; then
10480                 mkdir -p \$cf_subdir\$section
10481         fi
10482         fi
10483
10484         # replace variables in man page
10485         if test ! -f $cf_man_alias ; then
10486 cat >>$cf_man_alias <<-CF_EOF2
10487                 s,@DATADIR@,\$datadir,g
10488                 s,@TERMINFO@,\$TERMINFO,g
10489                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10490                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10491                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10492                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10493 CF_EOF
10494
10495         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10496         do
10497                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10498                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10499 cat >>$cf_edit_man <<-CF_EOF
10500                 s,@$cf_NAME@,$cf_name,g
10501 CF_EOF
10502         done
10503
10504 cat >>$cf_edit_man <<CF_EOF
10505 CF_EOF2
10506                 echo "...made $cf_man_alias"
10507         fi
10508
10509         aliases=
10510         cf_source=\`basename \$i\`
10511         inalias=\$cf_source
10512         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10513         if test ! -f \$inalias ; then
10514                 echo .. skipped \$cf_source
10515                 continue
10516         fi
10517 CF_EOF
10518
10519 if test "$MANPAGE_ALIASES" != no ; then
10520 cat >>$cf_edit_man <<CF_EOF
10521         nCurses=ignore.3x
10522         test $with_curses_h = yes && nCurses=ncurses.3x
10523         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10524 CF_EOF
10525 fi
10526
10527 if test "$MANPAGE_RENAMES" = no ; then
10528 cat >>$cf_edit_man <<CF_EOF
10529         # perform program transformations for section 1 man pages
10530         if test \$section = 1 ; then
10531                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10532         else
10533                 cf_target=\$cf_subdir\${section}/\$cf_source
10534         fi
10535 CF_EOF
10536 else
10537 cat >>$cf_edit_man <<CF_EOF
10538         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10539         if test -z "\$cf_target" ; then
10540                 echo '? missing rename for '\$cf_source
10541                 cf_target="\$cf_source"
10542         fi
10543         cf_target="\$cf_subdir\${section}/\${cf_target}"
10544
10545 CF_EOF
10546 fi
10547
10548 cat >>$cf_edit_man <<CF_EOF
10549         sed     -f $cf_man_alias \\
10550 CF_EOF
10551
10552 if test -f $MANPAGE_RENAMES ; then
10553 cat >>$cf_edit_man <<CF_EOF
10554                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10555 CF_EOF
10556 else
10557 cat >>$cf_edit_man <<CF_EOF
10558                 < \$i >\$TMP
10559 CF_EOF
10560 fi
10561
10562 cat >>$cf_edit_man <<CF_EOF
10563 if test \$cf_tables = yes ; then
10564         tbl \$TMP >\$TMP.out
10565         mv \$TMP.out \$TMP
10566 fi
10567 CF_EOF
10568
10569 if test $with_overwrite != yes ; then
10570 cat >>$cf_edit_man <<CF_EOF
10571         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10572         mv \$TMP.out \$TMP
10573 CF_EOF
10574 fi
10575
10576 if test $with_curses_h != yes ; then
10577 cat >>$cf_edit_man <<CF_EOF
10578         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10579         mv \$TMP.out \$TMP
10580 CF_EOF
10581 fi
10582
10583 cat >>$cf_edit_man <<CF_EOF
10584         if test \$form = format ; then
10585                 nroff -man \$TMP >\$TMP.out
10586                 mv \$TMP.out \$TMP
10587         fi
10588 CF_EOF
10589
10590 if test -n "$cf_compress" ; then
10591 cat >>$cf_edit_man <<CF_EOF
10592         if test \$verb = installing ; then
10593         if ( $cf_compress -f \$TMP )
10594         then
10595                 mv \$TMP.$cf_so_strip \$TMP
10596         fi
10597         fi
10598         cf_target="\$cf_target.$cf_so_strip"
10599 CF_EOF
10600 fi
10601
10602 case "$MANPAGE_FORMAT" in #(vi
10603 *BSDI*)
10604 cat >>$cf_edit_man <<CF_EOF
10605         if test \$form = format ; then
10606                 # BSDI installs only .0 suffixes in the cat directories
10607                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10608         fi
10609 CF_EOF
10610   ;;
10611 esac
10612
10613 cat >>$cf_edit_man <<CF_EOF
10614         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10615         if test \$verb = installing ; then
10616                 echo \$verb \$cf_target
10617                 \$INSTALL_DATA \$TMP \$cf_target
10618                 test -d \$cf_subdir\${section} &&
10619                 test -n "\$aliases" && (
10620                         cd \$cf_subdir\${section} && (
10621                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10622                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10623                                 cf_target=\`basename \$cf_target\`
10624                                 for cf_alias in \$aliases
10625                                 do
10626                                         if test \$section = 1 ; then
10627                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10628                                         fi
10629
10630                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10631                                                 if test -f \$cf_alias\${suffix} ; then
10632                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10633                                                         then
10634                                                                 continue
10635                                                         fi
10636                                                 fi
10637                                                 echo .. \$verb alias \$cf_alias\${suffix}
10638 CF_EOF
10639 case "x$LN_S" in #(vi
10640 *-f) #(vi
10641 cat >>$cf_edit_man <<CF_EOF
10642                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10643 CF_EOF
10644         ;;
10645 *)
10646 cat >>$cf_edit_man <<CF_EOF
10647                                                 rm -f \$cf_alias\${suffix}
10648                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10649 CF_EOF
10650         ;;
10651 esac
10652 cat >>$cf_edit_man <<CF_EOF
10653                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10654                                                 echo ".so \$cf_source" >\$TMP
10655 CF_EOF
10656 if test -n "$cf_compress" ; then
10657 cat >>$cf_edit_man <<CF_EOF
10658                                                 if test -n "$cf_so_strip" ; then
10659                                                         $cf_compress -f \$TMP
10660                                                         mv \$TMP.$cf_so_strip \$TMP
10661                                                 fi
10662 CF_EOF
10663 fi
10664 cat >>$cf_edit_man <<CF_EOF
10665                                                 echo .. \$verb alias \$cf_alias\${suffix}
10666                                                 rm -f \$cf_alias\${suffix}
10667                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10668                                         fi
10669                                 done
10670                         )
10671                 )
10672         elif test \$verb = removing ; then
10673                 test -f \$cf_target && (
10674                         echo \$verb \$cf_target
10675                         rm -f \$cf_target
10676                 )
10677                 test -d \$cf_subdir\${section} &&
10678                 test -n "\$aliases" && (
10679                         cd \$cf_subdir\${section} && (
10680                                 for cf_alias in \$aliases
10681                                 do
10682                                         if test \$section = 1 ; then
10683                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10684                                         fi
10685
10686                                         echo .. \$verb alias \$cf_alias\${suffix}
10687                                         rm -f \$cf_alias\${suffix}
10688                                 done
10689                         )
10690                 )
10691         else
10692 #               echo ".hy 0"
10693                 cat \$TMP
10694         fi
10695         ;;
10696 esac
10697 done
10698
10699 if test $cf_inboth = yes ; then
10700 if test \$form != format ; then
10701         sh \$0 format \$verb \$mandir \$srcdir \$*
10702 fi
10703 fi
10704
10705 exit 0
10706 CF_EOF
10707 chmod 755 $cf_edit_man
10708
10709 ###############################################################################
10710
10711 ### Note that some functions (such as const) are normally disabled anyway.
10712 echo "$as_me:10712: checking if you want to build with function extensions" >&5
10713 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10714
10715 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10716 if test "${enable_ext_funcs+set}" = set; then
10717   enableval="$enable_ext_funcs"
10718   with_ext_funcs=$enableval
10719 else
10720   with_ext_funcs=yes
10721 fi;
10722 echo "$as_me:10722: result: $with_ext_funcs" >&5
10723 echo "${ECHO_T}$with_ext_funcs" >&6
10724 if test "$with_ext_funcs" = yes ; then
10725         NCURSES_EXT_FUNCS=1
10726         cat >>confdefs.h <<\EOF
10727 #define HAVE_ASSUME_DEFAULT_COLORS 1
10728 EOF
10729
10730         cat >>confdefs.h <<\EOF
10731 #define HAVE_CURSES_VERSION 1
10732 EOF
10733
10734         cat >>confdefs.h <<\EOF
10735 #define HAVE_HAS_KEY 1
10736 EOF
10737
10738         cat >>confdefs.h <<\EOF
10739 #define HAVE_RESIZETERM 1
10740 EOF
10741
10742         cat >>confdefs.h <<\EOF
10743 #define HAVE_RESIZE_TERM 1
10744 EOF
10745
10746         cat >>confdefs.h <<\EOF
10747 #define HAVE_TERM_ENTRY_H 1
10748 EOF
10749
10750         cat >>confdefs.h <<\EOF
10751 #define HAVE_USE_DEFAULT_COLORS 1
10752 EOF
10753
10754         cat >>confdefs.h <<\EOF
10755 #define HAVE_USE_SCREEN 1
10756 EOF
10757
10758         cat >>confdefs.h <<\EOF
10759 #define HAVE_USE_WINDOW 1
10760 EOF
10761
10762         cat >>confdefs.h <<\EOF
10763 #define HAVE_WRESIZE 1
10764 EOF
10765
10766         cat >>confdefs.h <<\EOF
10767 #define NCURSES_EXT_FUNCS 1
10768 EOF
10769
10770         GENERATED_EXT_FUNCS=generated
10771 else
10772         NCURSES_EXT_FUNCS=0
10773         GENERATED_EXT_FUNCS=
10774 fi
10775
10776 echo "$as_me:10776: checking if you want to build with experimental SCREEN extensions" >&5
10777 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10778
10779 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10780 if test "${enable_sp_funcs+set}" = set; then
10781   enableval="$enable_sp_funcs"
10782   with_sp_funcs=$enableval
10783 else
10784   with_sp_funcs=no
10785 fi;
10786 echo "$as_me:10786: result: $with_sp_funcs" >&5
10787 echo "${ECHO_T}$with_sp_funcs" >&6
10788 if test "$with_sp_funcs" = yes ; then
10789         NCURSES_SP_FUNCS=1
10790         cat >>confdefs.h <<\EOF
10791 #define NCURSES_SP_FUNCS 1
10792 EOF
10793
10794         GENERATED_SP_FUNCS=generated
10795 else
10796         NCURSES_SP_FUNCS=0
10797         GENERATED_SP_FUNCS=
10798 fi
10799
10800 echo "$as_me:10800: checking if you want to build with experimental terminal-driver" >&5
10801 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10802
10803 # Check whether --enable-term-driver or --disable-term-driver was given.
10804 if test "${enable_term_driver+set}" = set; then
10805   enableval="$enable_term_driver"
10806   with_term_driver=$enableval
10807 else
10808   with_term_driver=no
10809 fi;
10810 echo "$as_me:10810: result: $with_term_driver" >&5
10811 echo "${ECHO_T}$with_term_driver" >&6
10812 if test "$with_term_driver" = yes ; then
10813         cat >>confdefs.h <<\EOF
10814 #define USE_TERM_DRIVER 1
10815 EOF
10816
10817         if test "$with_sp_funcs" != yes ; then
10818                 { { echo "$as_me:10818: error: The term-driver option relies upon sp-funcs" >&5
10819 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10820    { (exit 1); exit 1; }; }
10821         fi
10822 fi
10823
10824 ###   use option --enable-const to turn on use of const beyond that in XSI.
10825 echo "$as_me:10825: checking for extended use of const keyword" >&5
10826 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10827
10828 # Check whether --enable-const or --disable-const was given.
10829 if test "${enable_const+set}" = set; then
10830   enableval="$enable_const"
10831   with_ext_const=$enableval
10832 else
10833   with_ext_const=no
10834 fi;
10835 echo "$as_me:10835: result: $with_ext_const" >&5
10836 echo "${ECHO_T}$with_ext_const" >&6
10837 NCURSES_CONST='/*nothing*/'
10838 if test "$with_ext_const" = yes ; then
10839         NCURSES_CONST=const
10840 fi
10841
10842 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10843 echo "$as_me:10843: checking if you want to use extended colors" >&5
10844 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10845
10846 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10847 if test "${enable_ext_colors+set}" = set; then
10848   enableval="$enable_ext_colors"
10849   with_ext_colors=$enableval
10850 else
10851   with_ext_colors=no
10852 fi;
10853 echo "$as_me:10853: result: $with_ext_colors" >&5
10854 echo "${ECHO_T}$with_ext_colors" >&6
10855 NCURSES_EXT_COLORS=0
10856 if test "$with_ext_colors" = yes ; then
10857         if test "$with_widec" != yes ; then
10858                 { { echo "$as_me:10858: error: This option applies only to wide-character library" >&5
10859 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10860    { (exit 1); exit 1; }; }
10861         else
10862                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10863
10864 if test "${with_abi_version+set}" != set; then
10865         case $cf_cv_rel_version in
10866         5.*)
10867                 cf_cv_rel_version=6.0
10868                 cf_cv_abi_version=6
10869                 { echo "$as_me:10869: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10870 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10871                 ;;
10872         esac
10873 fi
10874
10875         fi
10876         NCURSES_EXT_COLORS=1
10877         cat >>confdefs.h <<\EOF
10878 #define NCURSES_EXT_COLORS 1
10879 EOF
10880
10881 fi
10882
10883 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10884 echo "$as_me:10884: checking if you want to use extended mouse encoding" >&5
10885 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10886
10887 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10888 if test "${enable_ext_mouse+set}" = set; then
10889   enableval="$enable_ext_mouse"
10890   with_ext_mouse=$enableval
10891 else
10892   with_ext_mouse=no
10893 fi;
10894 echo "$as_me:10894: result: $with_ext_mouse" >&5
10895 echo "${ECHO_T}$with_ext_mouse" >&6
10896 NCURSES_MOUSE_VERSION=1
10897 if test "$with_ext_mouse" = yes ; then
10898         NCURSES_MOUSE_VERSION=2
10899
10900 if test "${with_abi_version+set}" != set; then
10901         case $cf_cv_rel_version in
10902         5.*)
10903                 cf_cv_rel_version=6.0
10904                 cf_cv_abi_version=6
10905                 { echo "$as_me:10905: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10906 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10907                 ;;
10908         esac
10909 fi
10910
10911 fi
10912
10913 echo "$as_me:10913: checking if you want \$NCURSES_NO_PADDING code" >&5
10914 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10915
10916 # Check whether --enable-no-padding or --disable-no-padding was given.
10917 if test "${enable_no_padding+set}" = set; then
10918   enableval="$enable_no_padding"
10919   with_no_padding=$enableval
10920 else
10921   with_no_padding=$with_ext_funcs
10922 fi;
10923 echo "$as_me:10923: result: $with_no_padding" >&5
10924 echo "${ECHO_T}$with_no_padding" >&6
10925 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10926 #define NCURSES_NO_PADDING 1
10927 EOF
10928
10929 echo "$as_me:10929: checking for ANSI C header files" >&5
10930 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10931 if test "${ac_cv_header_stdc+set}" = set; then
10932   echo $ECHO_N "(cached) $ECHO_C" >&6
10933 else
10934   cat >conftest.$ac_ext <<_ACEOF
10935 #line 10935 "configure"
10936 #include "confdefs.h"
10937 #include <stdlib.h>
10938 #include <stdarg.h>
10939 #include <string.h>
10940 #include <float.h>
10941
10942 _ACEOF
10943 if { (eval echo "$as_me:10943: \"$ac_cpp conftest.$ac_ext\"") >&5
10944   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10945   ac_status=$?
10946   egrep -v '^ *\+' conftest.er1 >conftest.err
10947   rm -f conftest.er1
10948   cat conftest.err >&5
10949   echo "$as_me:10949: \$? = $ac_status" >&5
10950   (exit $ac_status); } >/dev/null; then
10951   if test -s conftest.err; then
10952     ac_cpp_err=$ac_c_preproc_warn_flag
10953   else
10954     ac_cpp_err=
10955   fi
10956 else
10957   ac_cpp_err=yes
10958 fi
10959 if test -z "$ac_cpp_err"; then
10960   ac_cv_header_stdc=yes
10961 else
10962   echo "$as_me: failed program was:" >&5
10963   cat conftest.$ac_ext >&5
10964   ac_cv_header_stdc=no
10965 fi
10966 rm -f conftest.err conftest.$ac_ext
10967
10968 if test $ac_cv_header_stdc = yes; then
10969   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10970   cat >conftest.$ac_ext <<_ACEOF
10971 #line 10971 "configure"
10972 #include "confdefs.h"
10973 #include <string.h>
10974
10975 _ACEOF
10976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10977   egrep "memchr" >/dev/null 2>&1; then
10978   :
10979 else
10980   ac_cv_header_stdc=no
10981 fi
10982 rm -rf conftest*
10983
10984 fi
10985
10986 if test $ac_cv_header_stdc = yes; then
10987   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10988   cat >conftest.$ac_ext <<_ACEOF
10989 #line 10989 "configure"
10990 #include "confdefs.h"
10991 #include <stdlib.h>
10992
10993 _ACEOF
10994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10995   egrep "free" >/dev/null 2>&1; then
10996   :
10997 else
10998   ac_cv_header_stdc=no
10999 fi
11000 rm -rf conftest*
11001
11002 fi
11003
11004 if test $ac_cv_header_stdc = yes; then
11005   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11006   if test "$cross_compiling" = yes; then
11007   :
11008 else
11009   cat >conftest.$ac_ext <<_ACEOF
11010 #line 11010 "configure"
11011 #include "confdefs.h"
11012 #include <ctype.h>
11013 #if ((' ' & 0x0FF) == 0x020)
11014 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11015 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11016 #else
11017 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11018                      || ('j' <= (c) && (c) <= 'r') \
11019                      || ('s' <= (c) && (c) <= 'z'))
11020 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11021 #endif
11022
11023 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11024 int
11025 main ()
11026 {
11027   int i;
11028   for (i = 0; i < 256; i++)
11029     if (XOR (islower (i), ISLOWER (i))
11030         || toupper (i) != TOUPPER (i))
11031       $ac_main_return(2);
11032   $ac_main_return (0);
11033 }
11034 _ACEOF
11035 rm -f conftest$ac_exeext
11036 if { (eval echo "$as_me:11036: \"$ac_link\"") >&5
11037   (eval $ac_link) 2>&5
11038   ac_status=$?
11039   echo "$as_me:11039: \$? = $ac_status" >&5
11040   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11041   { (eval echo "$as_me:11041: \"$ac_try\"") >&5
11042   (eval $ac_try) 2>&5
11043   ac_status=$?
11044   echo "$as_me:11044: \$? = $ac_status" >&5
11045   (exit $ac_status); }; }; then
11046   :
11047 else
11048   echo "$as_me: program exited with status $ac_status" >&5
11049 echo "$as_me: failed program was:" >&5
11050 cat conftest.$ac_ext >&5
11051 ac_cv_header_stdc=no
11052 fi
11053 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11054 fi
11055 fi
11056 fi
11057 echo "$as_me:11057: result: $ac_cv_header_stdc" >&5
11058 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11059 if test $ac_cv_header_stdc = yes; then
11060
11061 cat >>confdefs.h <<\EOF
11062 #define STDC_HEADERS 1
11063 EOF
11064
11065 fi
11066
11067 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11068
11069 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11070                   inttypes.h stdint.h unistd.h
11071 do
11072 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11073 echo "$as_me:11073: checking for $ac_header" >&5
11074 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11075 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11076   echo $ECHO_N "(cached) $ECHO_C" >&6
11077 else
11078   cat >conftest.$ac_ext <<_ACEOF
11079 #line 11079 "configure"
11080 #include "confdefs.h"
11081 $ac_includes_default
11082 #include <$ac_header>
11083 _ACEOF
11084 rm -f conftest.$ac_objext
11085 if { (eval echo "$as_me:11085: \"$ac_compile\"") >&5
11086   (eval $ac_compile) 2>&5
11087   ac_status=$?
11088   echo "$as_me:11088: \$? = $ac_status" >&5
11089   (exit $ac_status); } &&
11090          { ac_try='test -s conftest.$ac_objext'
11091   { (eval echo "$as_me:11091: \"$ac_try\"") >&5
11092   (eval $ac_try) 2>&5
11093   ac_status=$?
11094   echo "$as_me:11094: \$? = $ac_status" >&5
11095   (exit $ac_status); }; }; then
11096   eval "$as_ac_Header=yes"
11097 else
11098   echo "$as_me: failed program was:" >&5
11099 cat conftest.$ac_ext >&5
11100 eval "$as_ac_Header=no"
11101 fi
11102 rm -f conftest.$ac_objext conftest.$ac_ext
11103 fi
11104 echo "$as_me:11104: result: `eval echo '${'$as_ac_Header'}'`" >&5
11105 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11106 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11107   cat >>confdefs.h <<EOF
11108 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11109 EOF
11110
11111 fi
11112 done
11113
11114 echo "$as_me:11114: checking for signed char" >&5
11115 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11116 if test "${ac_cv_type_signed_char+set}" = set; then
11117   echo $ECHO_N "(cached) $ECHO_C" >&6
11118 else
11119   cat >conftest.$ac_ext <<_ACEOF
11120 #line 11120 "configure"
11121 #include "confdefs.h"
11122 $ac_includes_default
11123 int
11124 main ()
11125 {
11126 if ((signed char *) 0)
11127   return 0;
11128 if (sizeof (signed char))
11129   return 0;
11130   ;
11131   return 0;
11132 }
11133 _ACEOF
11134 rm -f conftest.$ac_objext
11135 if { (eval echo "$as_me:11135: \"$ac_compile\"") >&5
11136   (eval $ac_compile) 2>&5
11137   ac_status=$?
11138   echo "$as_me:11138: \$? = $ac_status" >&5
11139   (exit $ac_status); } &&
11140          { ac_try='test -s conftest.$ac_objext'
11141   { (eval echo "$as_me:11141: \"$ac_try\"") >&5
11142   (eval $ac_try) 2>&5
11143   ac_status=$?
11144   echo "$as_me:11144: \$? = $ac_status" >&5
11145   (exit $ac_status); }; }; then
11146   ac_cv_type_signed_char=yes
11147 else
11148   echo "$as_me: failed program was:" >&5
11149 cat conftest.$ac_ext >&5
11150 ac_cv_type_signed_char=no
11151 fi
11152 rm -f conftest.$ac_objext conftest.$ac_ext
11153 fi
11154 echo "$as_me:11154: result: $ac_cv_type_signed_char" >&5
11155 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11156
11157 echo "$as_me:11157: checking size of signed char" >&5
11158 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11159 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11160   echo $ECHO_N "(cached) $ECHO_C" >&6
11161 else
11162   if test "$ac_cv_type_signed_char" = yes; then
11163   if test "$cross_compiling" = yes; then
11164   # Depending upon the size, compute the lo and hi bounds.
11165 cat >conftest.$ac_ext <<_ACEOF
11166 #line 11166 "configure"
11167 #include "confdefs.h"
11168 $ac_includes_default
11169 int
11170 main ()
11171 {
11172 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11173   ;
11174   return 0;
11175 }
11176 _ACEOF
11177 rm -f conftest.$ac_objext
11178 if { (eval echo "$as_me:11178: \"$ac_compile\"") >&5
11179   (eval $ac_compile) 2>&5
11180   ac_status=$?
11181   echo "$as_me:11181: \$? = $ac_status" >&5
11182   (exit $ac_status); } &&
11183          { ac_try='test -s conftest.$ac_objext'
11184   { (eval echo "$as_me:11184: \"$ac_try\"") >&5
11185   (eval $ac_try) 2>&5
11186   ac_status=$?
11187   echo "$as_me:11187: \$? = $ac_status" >&5
11188   (exit $ac_status); }; }; then
11189   ac_lo=0 ac_mid=0
11190   while :; do
11191     cat >conftest.$ac_ext <<_ACEOF
11192 #line 11192 "configure"
11193 #include "confdefs.h"
11194 $ac_includes_default
11195 int
11196 main ()
11197 {
11198 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11199   ;
11200   return 0;
11201 }
11202 _ACEOF
11203 rm -f conftest.$ac_objext
11204 if { (eval echo "$as_me:11204: \"$ac_compile\"") >&5
11205   (eval $ac_compile) 2>&5
11206   ac_status=$?
11207   echo "$as_me:11207: \$? = $ac_status" >&5
11208   (exit $ac_status); } &&
11209          { ac_try='test -s conftest.$ac_objext'
11210   { (eval echo "$as_me:11210: \"$ac_try\"") >&5
11211   (eval $ac_try) 2>&5
11212   ac_status=$?
11213   echo "$as_me:11213: \$? = $ac_status" >&5
11214   (exit $ac_status); }; }; then
11215   ac_hi=$ac_mid; break
11216 else
11217   echo "$as_me: failed program was:" >&5
11218 cat conftest.$ac_ext >&5
11219 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11220 fi
11221 rm -f conftest.$ac_objext conftest.$ac_ext
11222   done
11223 else
11224   echo "$as_me: failed program was:" >&5
11225 cat conftest.$ac_ext >&5
11226 ac_hi=-1 ac_mid=-1
11227   while :; do
11228     cat >conftest.$ac_ext <<_ACEOF
11229 #line 11229 "configure"
11230 #include "confdefs.h"
11231 $ac_includes_default
11232 int
11233 main ()
11234 {
11235 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11236   ;
11237   return 0;
11238 }
11239 _ACEOF
11240 rm -f conftest.$ac_objext
11241 if { (eval echo "$as_me:11241: \"$ac_compile\"") >&5
11242   (eval $ac_compile) 2>&5
11243   ac_status=$?
11244   echo "$as_me:11244: \$? = $ac_status" >&5
11245   (exit $ac_status); } &&
11246          { ac_try='test -s conftest.$ac_objext'
11247   { (eval echo "$as_me:11247: \"$ac_try\"") >&5
11248   (eval $ac_try) 2>&5
11249   ac_status=$?
11250   echo "$as_me:11250: \$? = $ac_status" >&5
11251   (exit $ac_status); }; }; then
11252   ac_lo=$ac_mid; break
11253 else
11254   echo "$as_me: failed program was:" >&5
11255 cat conftest.$ac_ext >&5
11256 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11257 fi
11258 rm -f conftest.$ac_objext conftest.$ac_ext
11259   done
11260 fi
11261 rm -f conftest.$ac_objext conftest.$ac_ext
11262 # Binary search between lo and hi bounds.
11263 while test "x$ac_lo" != "x$ac_hi"; do
11264   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11265   cat >conftest.$ac_ext <<_ACEOF
11266 #line 11266 "configure"
11267 #include "confdefs.h"
11268 $ac_includes_default
11269 int
11270 main ()
11271 {
11272 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11273   ;
11274   return 0;
11275 }
11276 _ACEOF
11277 rm -f conftest.$ac_objext
11278 if { (eval echo "$as_me:11278: \"$ac_compile\"") >&5
11279   (eval $ac_compile) 2>&5
11280   ac_status=$?
11281   echo "$as_me:11281: \$? = $ac_status" >&5
11282   (exit $ac_status); } &&
11283          { ac_try='test -s conftest.$ac_objext'
11284   { (eval echo "$as_me:11284: \"$ac_try\"") >&5
11285   (eval $ac_try) 2>&5
11286   ac_status=$?
11287   echo "$as_me:11287: \$? = $ac_status" >&5
11288   (exit $ac_status); }; }; then
11289   ac_hi=$ac_mid
11290 else
11291   echo "$as_me: failed program was:" >&5
11292 cat conftest.$ac_ext >&5
11293 ac_lo=`expr $ac_mid + 1`
11294 fi
11295 rm -f conftest.$ac_objext conftest.$ac_ext
11296 done
11297 ac_cv_sizeof_signed_char=$ac_lo
11298 else
11299   if test "$cross_compiling" = yes; then
11300   { { echo "$as_me:11300: error: cannot run test program while cross compiling" >&5
11301 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11302    { (exit 1); exit 1; }; }
11303 else
11304   cat >conftest.$ac_ext <<_ACEOF
11305 #line 11305 "configure"
11306 #include "confdefs.h"
11307 $ac_includes_default
11308 int
11309 main ()
11310 {
11311 FILE *f = fopen ("conftest.val", "w");
11312 if (!f)
11313   $ac_main_return (1);
11314 fprintf (f, "%d", (sizeof (signed char)));
11315 fclose (f);
11316   ;
11317   return 0;
11318 }
11319 _ACEOF
11320 rm -f conftest$ac_exeext
11321 if { (eval echo "$as_me:11321: \"$ac_link\"") >&5
11322   (eval $ac_link) 2>&5
11323   ac_status=$?
11324   echo "$as_me:11324: \$? = $ac_status" >&5
11325   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11326   { (eval echo "$as_me:11326: \"$ac_try\"") >&5
11327   (eval $ac_try) 2>&5
11328   ac_status=$?
11329   echo "$as_me:11329: \$? = $ac_status" >&5
11330   (exit $ac_status); }; }; then
11331   ac_cv_sizeof_signed_char=`cat conftest.val`
11332 else
11333   echo "$as_me: program exited with status $ac_status" >&5
11334 echo "$as_me: failed program was:" >&5
11335 cat conftest.$ac_ext >&5
11336 fi
11337 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11338 fi
11339 fi
11340 rm -f conftest.val
11341 else
11342   ac_cv_sizeof_signed_char=0
11343 fi
11344 fi
11345 echo "$as_me:11345: result: $ac_cv_sizeof_signed_char" >&5
11346 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11347 cat >>confdefs.h <<EOF
11348 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11349 EOF
11350
11351 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11352         NCURSES_SBOOL="signed char"
11353 else
11354         NCURSES_SBOOL="char"
11355 fi
11356 echo "$as_me:11356: checking if you want to use signed Boolean array in term.h" >&5
11357 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11358
11359 # Check whether --enable-signed-char or --disable-signed-char was given.
11360 if test "${enable_signed_char+set}" = set; then
11361   enableval="$enable_signed_char"
11362   with_signed_char=$enableval
11363 else
11364   with_signed_char=no
11365 fi;
11366 echo "$as_me:11366: result: $with_signed_char" >&5
11367 echo "${ECHO_T}$with_signed_char" >&6
11368 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11369
11370 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11371 echo "$as_me:11371: checking if you want SIGWINCH handler" >&5
11372 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11373
11374 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11375 if test "${enable_sigwinch+set}" = set; then
11376   enableval="$enable_sigwinch"
11377   with_sigwinch=$enableval
11378 else
11379   with_sigwinch=$with_ext_funcs
11380 fi;
11381 echo "$as_me:11381: result: $with_sigwinch" >&5
11382 echo "${ECHO_T}$with_sigwinch" >&6
11383 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11384 #define USE_SIGWINCH 1
11385 EOF
11386
11387 ###   use option --enable-tcap-names to allow user to define new capabilities
11388 echo "$as_me:11388: checking if you want user-definable terminal capabilities like termcap" >&5
11389 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11390
11391 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11392 if test "${enable_tcap_names+set}" = set; then
11393   enableval="$enable_tcap_names"
11394   with_tcap_names=$enableval
11395 else
11396   with_tcap_names=$with_ext_funcs
11397 fi;
11398 echo "$as_me:11398: result: $with_tcap_names" >&5
11399 echo "${ECHO_T}$with_tcap_names" >&6
11400 NCURSES_XNAMES=0
11401 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11402
11403 ###############################################################################
11404 # These options are relatively safe to experiment with.
11405
11406 echo "$as_me:11406: checking if you want all development code" >&5
11407 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11408
11409 # Check whether --with-develop or --without-develop was given.
11410 if test "${with_develop+set}" = set; then
11411   withval="$with_develop"
11412   with_develop=$withval
11413 else
11414   with_develop=no
11415 fi;
11416 echo "$as_me:11416: result: $with_develop" >&5
11417 echo "${ECHO_T}$with_develop" >&6
11418
11419 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11420 echo "$as_me:11420: checking if you want hard-tabs code" >&5
11421 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11422
11423 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11424 if test "${enable_hard_tabs+set}" = set; then
11425   enableval="$enable_hard_tabs"
11426
11427 else
11428   enable_hard_tabs=$with_develop
11429 fi;
11430 echo "$as_me:11430: result: $enable_hard_tabs" >&5
11431 echo "${ECHO_T}$enable_hard_tabs" >&6
11432 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11433 #define USE_HARD_TABS 1
11434 EOF
11435
11436 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11437 echo "$as_me:11437: checking if you want limited support for xmc" >&5
11438 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11439
11440 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11441 if test "${enable_xmc_glitch+set}" = set; then
11442   enableval="$enable_xmc_glitch"
11443
11444 else
11445   enable_xmc_glitch=$with_develop
11446 fi;
11447 echo "$as_me:11447: result: $enable_xmc_glitch" >&5
11448 echo "${ECHO_T}$enable_xmc_glitch" >&6
11449 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11450 #define USE_XMC_SUPPORT 1
11451 EOF
11452
11453 ###############################################################################
11454 # These are just experimental, probably should not be in a package:
11455
11456 echo "$as_me:11456: checking if you do not want to assume colors are white-on-black" >&5
11457 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11458
11459 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11460 if test "${enable_assumed_color+set}" = set; then
11461   enableval="$enable_assumed_color"
11462   with_assumed_color=$enableval
11463 else
11464   with_assumed_color=yes
11465 fi;
11466 echo "$as_me:11466: result: $with_assumed_color" >&5
11467 echo "${ECHO_T}$with_assumed_color" >&6
11468 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11469 #define USE_ASSUMED_COLOR 1
11470 EOF
11471
11472 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11473 echo "$as_me:11473: checking if you want hashmap scrolling-optimization code" >&5
11474 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11475
11476 # Check whether --enable-hashmap or --disable-hashmap was given.
11477 if test "${enable_hashmap+set}" = set; then
11478   enableval="$enable_hashmap"
11479   with_hashmap=$enableval
11480 else
11481   with_hashmap=yes
11482 fi;
11483 echo "$as_me:11483: result: $with_hashmap" >&5
11484 echo "${ECHO_T}$with_hashmap" >&6
11485 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11486 #define USE_HASHMAP 1
11487 EOF
11488
11489 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11490 echo "$as_me:11490: checking if you want colorfgbg code" >&5
11491 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11492
11493 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11494 if test "${enable_colorfgbg+set}" = set; then
11495   enableval="$enable_colorfgbg"
11496   with_colorfgbg=$enableval
11497 else
11498   with_colorfgbg=no
11499 fi;
11500 echo "$as_me:11500: result: $with_colorfgbg" >&5
11501 echo "${ECHO_T}$with_colorfgbg" >&6
11502 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11503 #define USE_COLORFGBG 1
11504 EOF
11505
11506 ###   use option --enable-interop to turn on use of bindings used for interop
11507 echo "$as_me:11507: checking if you want interop bindings" >&5
11508 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11509
11510 # Check whether --enable-interop or --disable-interop was given.
11511 if test "${enable_interop+set}" = set; then
11512   enableval="$enable_interop"
11513   with_exp_interop=$enableval
11514 else
11515   with_exp_interop=no
11516 fi;
11517 echo "$as_me:11517: result: $with_exp_interop" >&5
11518 echo "${ECHO_T}$with_exp_interop" >&6
11519
11520 NCURSES_INTEROP_FUNCS=0
11521 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11522
11523 # This is still experimental (20080329), but should ultimately be moved to
11524 # the script-block --with-normal, etc.
11525
11526 echo "$as_me:11526: checking if you want to link with the pthread library" >&5
11527 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11528
11529 # Check whether --with-pthread or --without-pthread was given.
11530 if test "${with_pthread+set}" = set; then
11531   withval="$with_pthread"
11532   with_pthread=$withval
11533 else
11534   with_pthread=no
11535 fi;
11536 echo "$as_me:11536: result: $with_pthread" >&5
11537 echo "${ECHO_T}$with_pthread" >&6
11538
11539 if test "$with_pthread" != no ; then
11540     echo "$as_me:11540: checking for pthread.h" >&5
11541 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11542 if test "${ac_cv_header_pthread_h+set}" = set; then
11543   echo $ECHO_N "(cached) $ECHO_C" >&6
11544 else
11545   cat >conftest.$ac_ext <<_ACEOF
11546 #line 11546 "configure"
11547 #include "confdefs.h"
11548 #include <pthread.h>
11549 _ACEOF
11550 if { (eval echo "$as_me:11550: \"$ac_cpp conftest.$ac_ext\"") >&5
11551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11552   ac_status=$?
11553   egrep -v '^ *\+' conftest.er1 >conftest.err
11554   rm -f conftest.er1
11555   cat conftest.err >&5
11556   echo "$as_me:11556: \$? = $ac_status" >&5
11557   (exit $ac_status); } >/dev/null; then
11558   if test -s conftest.err; then
11559     ac_cpp_err=$ac_c_preproc_warn_flag
11560   else
11561     ac_cpp_err=
11562   fi
11563 else
11564   ac_cpp_err=yes
11565 fi
11566 if test -z "$ac_cpp_err"; then
11567   ac_cv_header_pthread_h=yes
11568 else
11569   echo "$as_me: failed program was:" >&5
11570   cat conftest.$ac_ext >&5
11571   ac_cv_header_pthread_h=no
11572 fi
11573 rm -f conftest.err conftest.$ac_ext
11574 fi
11575 echo "$as_me:11575: result: $ac_cv_header_pthread_h" >&5
11576 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11577 if test $ac_cv_header_pthread_h = yes; then
11578
11579         cat >>confdefs.h <<\EOF
11580 #define HAVE_PTHREADS_H 1
11581 EOF
11582
11583         for cf_lib_pthread in pthread c_r
11584         do
11585             echo "$as_me:11585: checking if we can link with the $cf_lib_pthread library" >&5
11586 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11587             cf_save_LIBS="$LIBS"
11588             LIBS="-l$cf_lib_pthread $LIBS"
11589             cat >conftest.$ac_ext <<_ACEOF
11590 #line 11590 "configure"
11591 #include "confdefs.h"
11592
11593 #include <pthread.h>
11594
11595 int
11596 main ()
11597 {
11598
11599                 int rc = pthread_create(0,0,0,0);
11600                 int r2 = pthread_mutexattr_settype(0, 0);
11601
11602   ;
11603   return 0;
11604 }
11605 _ACEOF
11606 rm -f conftest.$ac_objext conftest$ac_exeext
11607 if { (eval echo "$as_me:11607: \"$ac_link\"") >&5
11608   (eval $ac_link) 2>&5
11609   ac_status=$?
11610   echo "$as_me:11610: \$? = $ac_status" >&5
11611   (exit $ac_status); } &&
11612          { ac_try='test -s conftest$ac_exeext'
11613   { (eval echo "$as_me:11613: \"$ac_try\"") >&5
11614   (eval $ac_try) 2>&5
11615   ac_status=$?
11616   echo "$as_me:11616: \$? = $ac_status" >&5
11617   (exit $ac_status); }; }; then
11618   with_pthread=yes
11619 else
11620   echo "$as_me: failed program was:" >&5
11621 cat conftest.$ac_ext >&5
11622 with_pthread=no
11623 fi
11624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11625             LIBS="$cf_save_LIBS"
11626             echo "$as_me:11626: result: $with_pthread" >&5
11627 echo "${ECHO_T}$with_pthread" >&6
11628             test "$with_pthread" = yes && break
11629         done
11630
11631         if test "$with_pthread" = yes ; then
11632             LIBS="-l$cf_lib_pthread $LIBS"
11633             cat >>confdefs.h <<\EOF
11634 #define HAVE_LIBPTHREADS 1
11635 EOF
11636
11637         else
11638             { { echo "$as_me:11638: error: Cannot link with pthread library" >&5
11639 echo "$as_me: error: Cannot link with pthread library" >&2;}
11640    { (exit 1); exit 1; }; }
11641         fi
11642
11643 fi
11644
11645 fi
11646
11647 if test "x$with_pthread" != xno; then
11648         echo "$as_me:11648: checking for pthread_kill" >&5
11649 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11650 if test "${ac_cv_func_pthread_kill+set}" = set; then
11651   echo $ECHO_N "(cached) $ECHO_C" >&6
11652 else
11653   cat >conftest.$ac_ext <<_ACEOF
11654 #line 11654 "configure"
11655 #include "confdefs.h"
11656 /* System header to define __stub macros and hopefully few prototypes,
11657     which can conflict with char pthread_kill (); below.  */
11658 #include <assert.h>
11659 /* Override any gcc2 internal prototype to avoid an error.  */
11660 #ifdef __cplusplus
11661 extern "C"
11662 #endif
11663 /* We use char because int might match the return type of a gcc2
11664    builtin and then its argument prototype would still apply.  */
11665 char pthread_kill ();
11666 char (*f) ();
11667
11668 int
11669 main ()
11670 {
11671 /* The GNU C library defines this for functions which it implements
11672     to always fail with ENOSYS.  Some functions are actually named
11673     something starting with __ and the normal name is an alias.  */
11674 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11675 choke me
11676 #else
11677 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11678 #endif
11679
11680   ;
11681   return 0;
11682 }
11683 _ACEOF
11684 rm -f conftest.$ac_objext conftest$ac_exeext
11685 if { (eval echo "$as_me:11685: \"$ac_link\"") >&5
11686   (eval $ac_link) 2>&5
11687   ac_status=$?
11688   echo "$as_me:11688: \$? = $ac_status" >&5
11689   (exit $ac_status); } &&
11690          { ac_try='test -s conftest$ac_exeext'
11691   { (eval echo "$as_me:11691: \"$ac_try\"") >&5
11692   (eval $ac_try) 2>&5
11693   ac_status=$?
11694   echo "$as_me:11694: \$? = $ac_status" >&5
11695   (exit $ac_status); }; }; then
11696   ac_cv_func_pthread_kill=yes
11697 else
11698   echo "$as_me: failed program was:" >&5
11699 cat conftest.$ac_ext >&5
11700 ac_cv_func_pthread_kill=no
11701 fi
11702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11703 fi
11704 echo "$as_me:11704: result: $ac_cv_func_pthread_kill" >&5
11705 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11706 if test $ac_cv_func_pthread_kill = yes; then
11707
11708                 echo "$as_me:11708: checking if you want to allow EINTR in wgetch with pthreads" >&5
11709 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11710
11711 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11712 if test "${enable_pthreads_eintr+set}" = set; then
11713   enableval="$enable_pthreads_eintr"
11714   use_pthreads_eintr=$enableval
11715 else
11716   use_pthreads_eintr=no
11717 fi;
11718                 echo "$as_me:11718: result: $use_pthreads_eintr" >&5
11719 echo "${ECHO_T}$use_pthreads_eintr" >&6
11720                 if test $use_pthreads_eintr = yes ; then
11721                         cat >>confdefs.h <<\EOF
11722 #define USE_PTHREADS_EINTR 1
11723 EOF
11724
11725                 fi
11726 fi
11727
11728         echo "$as_me:11728: checking if you want to use weak-symbols for pthreads" >&5
11729 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11730
11731 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11732 if test "${enable_weak_symbols+set}" = set; then
11733   enableval="$enable_weak_symbols"
11734   use_weak_symbols=$enableval
11735 else
11736   use_weak_symbols=no
11737 fi;
11738         echo "$as_me:11738: result: $use_weak_symbols" >&5
11739 echo "${ECHO_T}$use_weak_symbols" >&6
11740         if test "$use_weak_symbols" = yes ; then
11741
11742 echo "$as_me:11742: checking if $CC supports weak symbols" >&5
11743 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11744 if test "${cf_cv_weak_symbols+set}" = set; then
11745   echo $ECHO_N "(cached) $ECHO_C" >&6
11746 else
11747
11748 cat >conftest.$ac_ext <<_ACEOF
11749 #line 11749 "configure"
11750 #include "confdefs.h"
11751
11752 #include <stdio.h>
11753 int
11754 main ()
11755 {
11756
11757 #if defined(__GNUC__)
11758 #  if defined __USE_ISOC99
11759 #    define _cat_pragma(exp)    _Pragma(#exp)
11760 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11761 #  else
11762 #    define _weak_pragma(exp)
11763 #  endif
11764 #  define _declare(name)        __extension__ extern __typeof__(name) name
11765 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11766 #endif
11767
11768 weak_symbol(fopen);
11769
11770   ;
11771   return 0;
11772 }
11773 _ACEOF
11774 rm -f conftest.$ac_objext
11775 if { (eval echo "$as_me:11775: \"$ac_compile\"") >&5
11776   (eval $ac_compile) 2>&5
11777   ac_status=$?
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit $ac_status); } &&
11780          { ac_try='test -s conftest.$ac_objext'
11781   { (eval echo "$as_me:11781: \"$ac_try\"") >&5
11782   (eval $ac_try) 2>&5
11783   ac_status=$?
11784   echo "$as_me:11784: \$? = $ac_status" >&5
11785   (exit $ac_status); }; }; then
11786   cf_cv_weak_symbols=yes
11787 else
11788   echo "$as_me: failed program was:" >&5
11789 cat conftest.$ac_ext >&5
11790 cf_cv_weak_symbols=no
11791 fi
11792 rm -f conftest.$ac_objext conftest.$ac_ext
11793
11794 fi
11795 echo "$as_me:11795: result: $cf_cv_weak_symbols" >&5
11796 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11797
11798         else
11799                 cf_cv_weak_symbols=no
11800         fi
11801
11802         if test $cf_cv_weak_symbols = yes ; then
11803                 cat >>confdefs.h <<\EOF
11804 #define USE_WEAK_SYMBOLS 1
11805 EOF
11806
11807         fi
11808 fi
11809
11810 PTHREAD=
11811 if test "$with_pthread" = "yes" ; then
11812     cat >>confdefs.h <<\EOF
11813 #define USE_PTHREADS 1
11814 EOF
11815
11816     enable_reentrant=yes
11817     if test $cf_cv_weak_symbols = yes ; then
11818         PTHREAD=-lpthread
11819     fi
11820 fi
11821
11822 # Reentrant code has to be opaque; there's little advantage to making ncurses
11823 # opaque outside of that, so there is no --enable-opaque option.  We can use
11824 # this option without --with-pthreads, but this will be always set for
11825 # pthreads.
11826 echo "$as_me:11826: checking if you want experimental reentrant code" >&5
11827 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11828
11829 # Check whether --enable-reentrant or --disable-reentrant was given.
11830 if test "${enable_reentrant+set}" = set; then
11831   enableval="$enable_reentrant"
11832   with_reentrant=$enableval
11833 else
11834   with_reentrant=no
11835 fi;
11836 echo "$as_me:11836: result: $with_reentrant" >&5
11837 echo "${ECHO_T}$with_reentrant" >&6
11838 if test "$with_reentrant" = yes ; then
11839         cf_cv_enable_reentrant=1
11840         cf_cv_enable_opaque="NCURSES_INTERNALS"
11841         NCURSES_OPAQUE=1
11842         NCURSES_SIZE_T=int
11843         if test $cf_cv_weak_symbols = yes ; then
11844
11845 # remove pthread library from $LIBS
11846 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11847
11848                 TEST_LIBS="-lpthread $TEST_LIBS"
11849                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11850         else
11851                 LIB_SUFFIX="t${LIB_SUFFIX}"
11852         fi
11853         cat >>confdefs.h <<\EOF
11854 #define USE_REENTRANT 1
11855 EOF
11856
11857 if test "${with_abi_version+set}" != set; then
11858         case $cf_cv_rel_version in
11859         5.*)
11860                 cf_cv_rel_version=6.0
11861                 cf_cv_abi_version=6
11862                 { echo "$as_me:11862: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11863 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11864                 ;;
11865         esac
11866 fi
11867
11868 else
11869         cf_cv_enable_reentrant=0
11870         cf_cv_enable_opaque="NCURSES_OPAQUE"
11871         NCURSES_OPAQUE=0
11872         NCURSES_SIZE_T=short
11873 fi
11874
11875 ### Allow using a different wrap-prefix
11876 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11877         echo "$as_me:11877: checking for prefix used to wrap public variables" >&5
11878 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11879
11880 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11881 if test "${with_wrap_prefix+set}" = set; then
11882   withval="$with_wrap_prefix"
11883   NCURSES_WRAP_PREFIX=$withval
11884 else
11885   NCURSES_WRAP_PREFIX=_nc_
11886 fi;
11887         echo "$as_me:11887: result: $NCURSES_WRAP_PREFIX" >&5
11888 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11889 else
11890         NCURSES_WRAP_PREFIX=_nc_
11891 fi
11892
11893 cat >>confdefs.h <<EOF
11894 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11895 EOF
11896
11897 echo "$as_me:11897: checking if you want experimental safe-sprintf code" >&5
11898 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11899
11900 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11901 if test "${enable_safe_sprintf+set}" = set; then
11902   enableval="$enable_safe_sprintf"
11903   with_safe_sprintf=$enableval
11904 else
11905   with_safe_sprintf=no
11906 fi;
11907 echo "$as_me:11907: result: $with_safe_sprintf" >&5
11908 echo "${ECHO_T}$with_safe_sprintf" >&6
11909 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11910 #define USE_SAFE_SPRINTF 1
11911 EOF
11912
11913 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11914 # when hashmap is used scroll hints are useless
11915 if test "$with_hashmap" = no ; then
11916 echo "$as_me:11916: checking if you want to experiment without scrolling-hints code" >&5
11917 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11918
11919 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11920 if test "${enable_scroll_hints+set}" = set; then
11921   enableval="$enable_scroll_hints"
11922   with_scroll_hints=$enableval
11923 else
11924   with_scroll_hints=yes
11925 fi;
11926 echo "$as_me:11926: result: $with_scroll_hints" >&5
11927 echo "${ECHO_T}$with_scroll_hints" >&6
11928 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11929 #define USE_SCROLL_HINTS 1
11930 EOF
11931
11932 fi
11933
11934 echo "$as_me:11934: checking if you want experimental wgetch-events code" >&5
11935 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11936
11937 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11938 if test "${enable_wgetch_events+set}" = set; then
11939   enableval="$enable_wgetch_events"
11940   with_wgetch_events=$enableval
11941 else
11942   with_wgetch_events=no
11943 fi;
11944 echo "$as_me:11944: result: $with_wgetch_events" >&5
11945 echo "${ECHO_T}$with_wgetch_events" >&6
11946 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11947 #define NCURSES_WGETCH_EVENTS 1
11948 EOF
11949
11950 ###############################################################################
11951
11952 ###     use option --disable-echo to suppress full display compiling commands
11953
11954 echo "$as_me:11954: checking if you want to see long compiling messages" >&5
11955 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11956
11957 # Check whether --enable-echo or --disable-echo was given.
11958 if test "${enable_echo+set}" = set; then
11959   enableval="$enable_echo"
11960   test "$enableval" != no && enableval=yes
11961   if test "$enableval" != "yes" ; then
11962
11963     ECHO_LT='--silent'
11964     ECHO_LD='@echo linking $@;'
11965     RULE_CC='@echo compiling $<'
11966     SHOW_CC='@echo compiling $@'
11967     ECHO_CC='@'
11968
11969   else
11970
11971     ECHO_LT=''
11972     ECHO_LD=''
11973     RULE_CC=''
11974     SHOW_CC=''
11975     ECHO_CC=''
11976
11977   fi
11978 else
11979   enableval=yes
11980
11981     ECHO_LT=''
11982     ECHO_LD=''
11983     RULE_CC=''
11984     SHOW_CC=''
11985     ECHO_CC=''
11986
11987 fi;
11988 echo "$as_me:11988: result: $enableval" >&5
11989 echo "${ECHO_T}$enableval" >&6
11990
11991 if test "$enable_echo" = yes; then
11992         ECHO_LINK=
11993 else
11994         ECHO_LINK='@ echo linking $@ ... ;'
11995         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11996         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11997 fi
11998
11999 ###     use option --enable-warnings to turn on all gcc warnings
12000 echo "$as_me:12000: checking if you want to see compiler warnings" >&5
12001 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12002
12003 # Check whether --enable-warnings or --disable-warnings was given.
12004 if test "${enable_warnings+set}" = set; then
12005   enableval="$enable_warnings"
12006   with_warnings=$enableval
12007 fi;
12008 echo "$as_me:12008: result: $with_warnings" >&5
12009 echo "${ECHO_T}$with_warnings" >&6
12010
12011 if test "x$with_warnings" = "xyes"; then
12012
12013         ADAFLAGS="$ADAFLAGS -gnatg"
12014
12015 INTEL_COMPILER=no
12016
12017 if test "$GCC" = yes ; then
12018         case $host_os in
12019         linux*|gnu*)
12020                 echo "$as_me:12020: checking if this is really Intel C compiler" >&5
12021 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12022                 cf_save_CFLAGS="$CFLAGS"
12023                 CFLAGS="$CFLAGS -no-gcc"
12024                 cat >conftest.$ac_ext <<_ACEOF
12025 #line 12025 "configure"
12026 #include "confdefs.h"
12027
12028 int
12029 main ()
12030 {
12031
12032 #ifdef __INTEL_COMPILER
12033 #else
12034 make an error
12035 #endif
12036
12037   ;
12038   return 0;
12039 }
12040 _ACEOF
12041 rm -f conftest.$ac_objext
12042 if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5
12043   (eval $ac_compile) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit $ac_status); } &&
12047          { ac_try='test -s conftest.$ac_objext'
12048   { (eval echo "$as_me:12048: \"$ac_try\"") >&5
12049   (eval $ac_try) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit $ac_status); }; }; then
12053   INTEL_COMPILER=yes
12054 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12055
12056 else
12057   echo "$as_me: failed program was:" >&5
12058 cat conftest.$ac_ext >&5
12059 fi
12060 rm -f conftest.$ac_objext conftest.$ac_ext
12061                 CFLAGS="$cf_save_CFLAGS"
12062                 echo "$as_me:12062: result: $INTEL_COMPILER" >&5
12063 echo "${ECHO_T}$INTEL_COMPILER" >&6
12064                 ;;
12065         esac
12066 fi
12067
12068 CLANG_COMPILER=no
12069
12070 if test "$GCC" = yes ; then
12071         echo "$as_me:12071: checking if this is really Clang C compiler" >&5
12072 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12073         cf_save_CFLAGS="$CFLAGS"
12074         CFLAGS="$CFLAGS -Qunused-arguments"
12075         cat >conftest.$ac_ext <<_ACEOF
12076 #line 12076 "configure"
12077 #include "confdefs.h"
12078
12079 int
12080 main ()
12081 {
12082
12083 #ifdef __clang__
12084 #else
12085 make an error
12086 #endif
12087
12088   ;
12089   return 0;
12090 }
12091 _ACEOF
12092 rm -f conftest.$ac_objext
12093 if { (eval echo "$as_me:12093: \"$ac_compile\"") >&5
12094   (eval $ac_compile) 2>&5
12095   ac_status=$?
12096   echo "$as_me:12096: \$? = $ac_status" >&5
12097   (exit $ac_status); } &&
12098          { ac_try='test -s conftest.$ac_objext'
12099   { (eval echo "$as_me:12099: \"$ac_try\"") >&5
12100   (eval $ac_try) 2>&5
12101   ac_status=$?
12102   echo "$as_me:12102: \$? = $ac_status" >&5
12103   (exit $ac_status); }; }; then
12104   CLANG_COMPILER=yes
12105 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12106
12107 else
12108   echo "$as_me: failed program was:" >&5
12109 cat conftest.$ac_ext >&5
12110 fi
12111 rm -f conftest.$ac_objext conftest.$ac_ext
12112         CFLAGS="$cf_save_CFLAGS"
12113         echo "$as_me:12113: result: $CLANG_COMPILER" >&5
12114 echo "${ECHO_T}$CLANG_COMPILER" >&6
12115 fi
12116
12117 cat > conftest.$ac_ext <<EOF
12118 #line 12118 "${as_me:-configure}"
12119 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12120 EOF
12121
12122 if test "$INTEL_COMPILER" = yes
12123 then
12124 # The "-wdXXX" options suppress warnings:
12125 # remark #1419: external declaration in primary source file
12126 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12127 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12128 # remark #193: zero used for undefined preprocessing identifier
12129 # remark #593: variable "curs_sb_left_arrow" was set but never used
12130 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12131 # remark #869: parameter "tw" was never referenced
12132 # remark #981: operands are evaluated in unspecified order
12133 # warning #279: controlling expression is constant
12134
12135         { echo "$as_me:12135: checking for $CC warning options..." >&5
12136 echo "$as_me: checking for $CC warning options..." >&6;}
12137         cf_save_CFLAGS="$CFLAGS"
12138         EXTRA_CFLAGS="-Wall"
12139         for cf_opt in \
12140                 wd1419 \
12141                 wd1683 \
12142                 wd1684 \
12143                 wd193 \
12144                 wd593 \
12145                 wd279 \
12146                 wd810 \
12147                 wd869 \
12148                 wd981
12149         do
12150                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12151                 if { (eval echo "$as_me:12151: \"$ac_compile\"") >&5
12152   (eval $ac_compile) 2>&5
12153   ac_status=$?
12154   echo "$as_me:12154: \$? = $ac_status" >&5
12155   (exit $ac_status); }; then
12156                         test -n "$verbose" && echo "$as_me:12156: result: ... -$cf_opt" >&5
12157 echo "${ECHO_T}... -$cf_opt" >&6
12158                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12159                 fi
12160         done
12161         CFLAGS="$cf_save_CFLAGS"
12162
12163 elif test "$GCC" = yes
12164 then
12165         { echo "$as_me:12165: checking for $CC warning options..." >&5
12166 echo "$as_me: checking for $CC warning options..." >&6;}
12167         cf_save_CFLAGS="$CFLAGS"
12168         EXTRA_CFLAGS=
12169         cf_warn_CONST=""
12170         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12171         for cf_opt in W Wall \
12172                 Wbad-function-cast \
12173                 Wcast-align \
12174                 Wcast-qual \
12175                 Winline \
12176                 Wmissing-declarations \
12177                 Wmissing-prototypes \
12178                 Wnested-externs \
12179                 Wpointer-arith \
12180                 Wshadow \
12181                 Wstrict-prototypes \
12182                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12183         do
12184                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12185                 if { (eval echo "$as_me:12185: \"$ac_compile\"") >&5
12186   (eval $ac_compile) 2>&5
12187   ac_status=$?
12188   echo "$as_me:12188: \$? = $ac_status" >&5
12189   (exit $ac_status); }; then
12190                         test -n "$verbose" && echo "$as_me:12190: result: ... -$cf_opt" >&5
12191 echo "${ECHO_T}... -$cf_opt" >&6
12192                         case $cf_opt in #(vi
12193                         Wcast-qual) #(vi
12194                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12195                                 ;;
12196                         Winline) #(vi
12197                                 case $GCC_VERSION in
12198                                 [34].*)
12199                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12200
12201 echo "${as_me:-configure}:12201: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12202
12203                                         continue;;
12204                                 esac
12205                                 ;;
12206                         Wpointer-arith) #(vi
12207                                 case $GCC_VERSION in
12208                                 [12].*)
12209                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12210
12211 echo "${as_me:-configure}:12211: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12212
12213                                         continue;;
12214                                 esac
12215                                 ;;
12216                         esac
12217                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12218                 fi
12219         done
12220         CFLAGS="$cf_save_CFLAGS"
12221 fi
12222 rm -rf conftest*
12223
12224         if test "$cf_with_cxx" = yes ; then
12225
12226 INTEL_CPLUSPLUS=no
12227
12228 if test "$GCC" = yes ; then
12229         case $host_os in
12230         linux*|gnu*)
12231                 echo "$as_me:12231: checking if this is really Intel C++ compiler" >&5
12232 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12233                 cf_save_CFLAGS="$CXXFLAGS"
12234                 CXXFLAGS="$CXXFLAGS -no-gcc"
12235                 cat >conftest.$ac_ext <<_ACEOF
12236 #line 12236 "configure"
12237 #include "confdefs.h"
12238
12239 int
12240 main ()
12241 {
12242
12243 #ifdef __INTEL_COMPILER
12244 #else
12245 make an error
12246 #endif
12247
12248   ;
12249   return 0;
12250 }
12251 _ACEOF
12252 rm -f conftest.$ac_objext
12253 if { (eval echo "$as_me:12253: \"$ac_compile\"") >&5
12254   (eval $ac_compile) 2>&5
12255   ac_status=$?
12256   echo "$as_me:12256: \$? = $ac_status" >&5
12257   (exit $ac_status); } &&
12258          { ac_try='test -s conftest.$ac_objext'
12259   { (eval echo "$as_me:12259: \"$ac_try\"") >&5
12260   (eval $ac_try) 2>&5
12261   ac_status=$?
12262   echo "$as_me:12262: \$? = $ac_status" >&5
12263   (exit $ac_status); }; }; then
12264   INTEL_CPLUSPLUS=yes
12265 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12266
12267 else
12268   echo "$as_me: failed program was:" >&5
12269 cat conftest.$ac_ext >&5
12270 fi
12271 rm -f conftest.$ac_objext conftest.$ac_ext
12272                 CXXFLAGS="$cf_save_CFLAGS"
12273                 echo "$as_me:12273: result: $INTEL_CPLUSPLUS" >&5
12274 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12275                 ;;
12276         esac
12277 fi
12278
12279 CLANG_CPLUSPLUS=no
12280
12281 if test "$GCC" = yes ; then
12282         echo "$as_me:12282: checking if this is really Clang C++ compiler" >&5
12283 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12284         cf_save_CFLAGS="$CXXFLAGS"
12285         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12286         cat >conftest.$ac_ext <<_ACEOF
12287 #line 12287 "configure"
12288 #include "confdefs.h"
12289
12290 int
12291 main ()
12292 {
12293
12294 #ifdef __clang__
12295 #else
12296 make an error
12297 #endif
12298
12299   ;
12300   return 0;
12301 }
12302 _ACEOF
12303 rm -f conftest.$ac_objext
12304 if { (eval echo "$as_me:12304: \"$ac_compile\"") >&5
12305   (eval $ac_compile) 2>&5
12306   ac_status=$?
12307   echo "$as_me:12307: \$? = $ac_status" >&5
12308   (exit $ac_status); } &&
12309          { ac_try='test -s conftest.$ac_objext'
12310   { (eval echo "$as_me:12310: \"$ac_try\"") >&5
12311   (eval $ac_try) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit $ac_status); }; }; then
12315   CLANG_CPLUSPLUS=yes
12316 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12317
12318 else
12319   echo "$as_me: failed program was:" >&5
12320 cat conftest.$ac_ext >&5
12321 fi
12322 rm -f conftest.$ac_objext conftest.$ac_ext
12323         CXXFLAGS="$cf_save_CFLAGS"
12324         echo "$as_me:12324: result: $CLANG_CPLUSPLUS" >&5
12325 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12326 fi
12327
12328 ac_ext=cc
12329 ac_cpp='$CXXCPP $CPPFLAGS'
12330 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12331 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12332 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12333 ac_main_return=return
12334
12335 cat > conftest.$ac_ext <<EOF
12336 #line 12336 "configure"
12337 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12338 EOF
12339
12340 if test "$INTEL_CPLUSPLUS" = yes
12341 then
12342 # The "-wdXXX" options suppress warnings:
12343 # remark #1419: external declaration in primary source file
12344 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12345 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12346 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12347 # remark #193: zero used for undefined preprocessing identifier
12348 # remark #593: variable "curs_sb_left_arrow" was set but never used
12349 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12350 # remark #869: parameter "tw" was never referenced
12351 # remark #981: operands are evaluated in unspecified order
12352 # warning #269: invalid format string conversion
12353
12354         { echo "$as_me:12354: checking for $CC warning options..." >&5
12355 echo "$as_me: checking for $CC warning options..." >&6;}
12356         cf_save_CXXFLAGS="$CXXFLAGS"
12357         EXTRA_CXXFLAGS="-Wall"
12358         for cf_opt in \
12359                 wd1419 \
12360                 wd1682 \
12361                 wd1683 \
12362                 wd1684 \
12363                 wd193 \
12364                 wd279 \
12365                 wd593 \
12366                 wd810 \
12367                 wd869 \
12368                 wd981
12369         do
12370                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12371                 if { (eval echo "$as_me:12371: \"$ac_compile\"") >&5
12372   (eval $ac_compile) 2>&5
12373   ac_status=$?
12374   echo "$as_me:12374: \$? = $ac_status" >&5
12375   (exit $ac_status); }; then
12376                         test -n "$verbose" && echo "$as_me:12376: result: ... -$cf_opt" >&5
12377 echo "${ECHO_T}... -$cf_opt" >&6
12378                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12379                 fi
12380         done
12381         CXXFLAGS="$cf_save_CXXFLAGS"
12382
12383 elif test "$GXX" = yes
12384 then
12385         { echo "$as_me:12385: checking for $CXX warning options..." >&5
12386 echo "$as_me: checking for $CXX warning options..." >&6;}
12387         cf_save_CXXFLAGS="$CXXFLAGS"
12388         EXTRA_CXXFLAGS="-W -Wall"
12389         cf_gxx_extra_warnings=""
12390         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12391         case "$GCC_VERSION" in
12392         [1-2].*)
12393                 ;;
12394         *)
12395                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12396                 ;;
12397         esac
12398         for cf_opt in \
12399                 Wabi \
12400                 fabi-version=0 \
12401                 Woverloaded-virtual \
12402                 Wsign-promo \
12403                 Wsynth \
12404                 Wold-style-cast \
12405                 Wcast-align \
12406                 Wcast-qual \
12407                 Wmissing-prototypes \
12408                 Wpointer-arith \
12409                 Wshadow \
12410                 Wstrict-prototypes \
12411                 Wundef $cf_gxx_extra_warnings Wno-unused
12412         do
12413                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12414                 if { (eval echo "$as_me:12414: \"$ac_compile\"") >&5
12415   (eval $ac_compile) 2>&5
12416   ac_status=$?
12417   echo "$as_me:12417: \$? = $ac_status" >&5
12418   (exit $ac_status); }; then
12419                         test -n "$verbose" && echo "$as_me:12419: result: ... -$cf_opt" >&5
12420 echo "${ECHO_T}... -$cf_opt" >&6
12421                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12422                 else
12423                         test -n "$verbose" && echo "$as_me:12423: result: ... no -$cf_opt" >&5
12424 echo "${ECHO_T}... no -$cf_opt" >&6
12425                 fi
12426         done
12427         CXXFLAGS="$cf_save_CXXFLAGS"
12428 fi
12429
12430 rm -rf conftest*
12431 ac_ext=c
12432 ac_cpp='$CPP $CPPFLAGS'
12433 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12434 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12435 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12436 ac_main_return=return
12437
12438         fi
12439 fi
12440
12441 if test "$GCC" = yes
12442 then
12443 cat > conftest.i <<EOF
12444 #ifndef GCC_PRINTF
12445 #define GCC_PRINTF 0
12446 #endif
12447 #ifndef GCC_SCANF
12448 #define GCC_SCANF 0
12449 #endif
12450 #ifndef GCC_NORETURN
12451 #define GCC_NORETURN /* nothing */
12452 #endif
12453 #ifndef GCC_UNUSED
12454 #define GCC_UNUSED /* nothing */
12455 #endif
12456 EOF
12457 if test "$GCC" = yes
12458 then
12459         { echo "$as_me:12459: checking for $CC __attribute__ directives..." >&5
12460 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12461 cat > conftest.$ac_ext <<EOF
12462 #line 12462 "${as_me:-configure}"
12463 #include "confdefs.h"
12464 #include "conftest.h"
12465 #include "conftest.i"
12466 #if     GCC_PRINTF
12467 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12468 #else
12469 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12470 #endif
12471 #if     GCC_SCANF
12472 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12473 #else
12474 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12475 #endif
12476 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12477 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12478 extern void foo(void) GCC_NORETURN;
12479 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12480 EOF
12481         cf_printf_attribute=no
12482         cf_scanf_attribute=no
12483         for cf_attribute in scanf printf unused noreturn
12484         do
12485
12486 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12487
12488                 cf_directive="__attribute__(($cf_attribute))"
12489                 echo "checking for $CC $cf_directive" 1>&5
12490
12491                 case $cf_attribute in #(vi
12492                 printf) #(vi
12493                         cf_printf_attribute=yes
12494                         cat >conftest.h <<EOF
12495 #define GCC_$cf_ATTRIBUTE 1
12496 EOF
12497                         ;;
12498                 scanf) #(vi
12499                         cf_scanf_attribute=yes
12500                         cat >conftest.h <<EOF
12501 #define GCC_$cf_ATTRIBUTE 1
12502 EOF
12503                         ;;
12504                 *) #(vi
12505                         cat >conftest.h <<EOF
12506 #define GCC_$cf_ATTRIBUTE $cf_directive
12507 EOF
12508                         ;;
12509                 esac
12510
12511                 if { (eval echo "$as_me:12511: \"$ac_compile\"") >&5
12512   (eval $ac_compile) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); }; then
12516                         test -n "$verbose" && echo "$as_me:12516: result: ... $cf_attribute" >&5
12517 echo "${ECHO_T}... $cf_attribute" >&6
12518                         cat conftest.h >>confdefs.h
12519                         case $cf_attribute in #(vi
12520                         printf) #(vi
12521                                 if test "$cf_printf_attribute" = no ; then
12522                                         cat >>confdefs.h <<EOF
12523 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12524 EOF
12525                                 else
12526                                         cat >>confdefs.h <<EOF
12527 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12528 EOF
12529                                 fi
12530                                 ;;
12531                         scanf) #(vi
12532                                 if test "$cf_scanf_attribute" = no ; then
12533                                         cat >>confdefs.h <<EOF
12534 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12535 EOF
12536                                 else
12537                                         cat >>confdefs.h <<EOF
12538 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12539 EOF
12540                                 fi
12541                                 ;;
12542                         esac
12543                 fi
12544         done
12545 else
12546         fgrep define conftest.i >>confdefs.h
12547 fi
12548 rm -rf conftest*
12549 fi
12550
12551 echo "$as_me:12551: checking if you want to work around bogus compiler/loader warnings" >&5
12552 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12553
12554 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12555 if test "${enable_string_hacks+set}" = set; then
12556   enableval="$enable_string_hacks"
12557   with_string_hacks=$enableval
12558 else
12559   with_string_hacks=no
12560 fi;
12561 echo "$as_me:12561: result: $with_string_hacks" >&5
12562 echo "${ECHO_T}$with_string_hacks" >&6
12563
12564 if test "x$with_string_hacks" = "xyes"; then
12565         cat >>confdefs.h <<\EOF
12566 #define USE_STRING_HACKS 1
12567 EOF
12568
12569         { echo "$as_me:12569: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12570 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12571
12572 for ac_func in strlcat strlcpy snprintf
12573 do
12574 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12575 echo "$as_me:12575: checking for $ac_func" >&5
12576 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12577 if eval "test \"\${$as_ac_var+set}\" = set"; then
12578   echo $ECHO_N "(cached) $ECHO_C" >&6
12579 else
12580   cat >conftest.$ac_ext <<_ACEOF
12581 #line 12581 "configure"
12582 #include "confdefs.h"
12583 /* System header to define __stub macros and hopefully few prototypes,
12584     which can conflict with char $ac_func (); below.  */
12585 #include <assert.h>
12586 /* Override any gcc2 internal prototype to avoid an error.  */
12587 #ifdef __cplusplus
12588 extern "C"
12589 #endif
12590 /* We use char because int might match the return type of a gcc2
12591    builtin and then its argument prototype would still apply.  */
12592 char $ac_func ();
12593 char (*f) ();
12594
12595 int
12596 main ()
12597 {
12598 /* The GNU C library defines this for functions which it implements
12599     to always fail with ENOSYS.  Some functions are actually named
12600     something starting with __ and the normal name is an alias.  */
12601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12602 choke me
12603 #else
12604 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12605 #endif
12606
12607   ;
12608   return 0;
12609 }
12610 _ACEOF
12611 rm -f conftest.$ac_objext conftest$ac_exeext
12612 if { (eval echo "$as_me:12612: \"$ac_link\"") >&5
12613   (eval $ac_link) 2>&5
12614   ac_status=$?
12615   echo "$as_me:12615: \$? = $ac_status" >&5
12616   (exit $ac_status); } &&
12617          { ac_try='test -s conftest$ac_exeext'
12618   { (eval echo "$as_me:12618: \"$ac_try\"") >&5
12619   (eval $ac_try) 2>&5
12620   ac_status=$?
12621   echo "$as_me:12621: \$? = $ac_status" >&5
12622   (exit $ac_status); }; }; then
12623   eval "$as_ac_var=yes"
12624 else
12625   echo "$as_me: failed program was:" >&5
12626 cat conftest.$ac_ext >&5
12627 eval "$as_ac_var=no"
12628 fi
12629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12630 fi
12631 echo "$as_me:12631: result: `eval echo '${'$as_ac_var'}'`" >&5
12632 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12633 if test `eval echo '${'$as_ac_var'}'` = yes; then
12634   cat >>confdefs.h <<EOF
12635 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12636 EOF
12637
12638 fi
12639 done
12640
12641 fi
12642
12643 ###     use option --enable-assertions to turn on generation of assertion code
12644 echo "$as_me:12644: checking if you want to enable runtime assertions" >&5
12645 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12646
12647 # Check whether --enable-assertions or --disable-assertions was given.
12648 if test "${enable_assertions+set}" = set; then
12649   enableval="$enable_assertions"
12650   with_assertions=$enableval
12651 else
12652   with_assertions=no
12653 fi;
12654 echo "$as_me:12654: result: $with_assertions" >&5
12655 echo "${ECHO_T}$with_assertions" >&6
12656 if test -n "$GCC"
12657 then
12658         if test "$with_assertions" = no
12659         then
12660                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12661         else
12662
12663         ADAFLAGS="$ADAFLAGS -gnata"
12664
12665         fi
12666 fi
12667
12668 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12669
12670 echo "$as_me:12670: checking if you want to use dmalloc for testing" >&5
12671 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12672
12673 # Check whether --with-dmalloc or --without-dmalloc was given.
12674 if test "${with_dmalloc+set}" = set; then
12675   withval="$with_dmalloc"
12676   cat >>confdefs.h <<\EOF
12677 #define USE_DMALLOC 1
12678 EOF
12679
12680         : ${with_cflags:=-g}
12681         : ${with_no_leaks:=yes}
12682          with_dmalloc=yes
12683 else
12684   with_dmalloc=
12685 fi;
12686 echo "$as_me:12686: result: ${with_dmalloc:-no}" >&5
12687 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12688
12689 case .$with_cflags in #(vi
12690 .*-g*)
12691         case .$CFLAGS in #(vi
12692         .*-g*) #(vi
12693                 ;;
12694         *)
12695
12696 cf_fix_cppflags=no
12697 cf_new_cflags=
12698 cf_new_cppflags=
12699 cf_new_extra_cppflags=
12700
12701 for cf_add_cflags in -g
12702 do
12703 case $cf_fix_cppflags in
12704 no)
12705         case $cf_add_cflags in #(vi
12706         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12707                 case $cf_add_cflags in
12708                 -D*)
12709                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12710
12711                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12712                                 && test -z "${cf_tst_cflags}" \
12713                                 && cf_fix_cppflags=yes
12714
12715                         if test $cf_fix_cppflags = yes ; then
12716                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12717                                 continue
12718                         elif test "${cf_tst_cflags}" = "\"'" ; then
12719                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12720                                 continue
12721                         fi
12722                         ;;
12723                 esac
12724                 case "$CPPFLAGS" in
12725                 *$cf_add_cflags) #(vi
12726                         ;;
12727                 *) #(vi
12728                         case $cf_add_cflags in #(vi
12729                         -D*)
12730                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12731
12732 CPPFLAGS=`echo "$CPPFLAGS" | \
12733         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12734                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12735
12736                                 ;;
12737                         esac
12738                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12739                         ;;
12740                 esac
12741                 ;;
12742         *)
12743                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12744                 ;;
12745         esac
12746         ;;
12747 yes)
12748         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12749
12750         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12751
12752         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12753                 && test -z "${cf_tst_cflags}" \
12754                 && cf_fix_cppflags=no
12755         ;;
12756 esac
12757 done
12758
12759 if test -n "$cf_new_cflags" ; then
12760
12761         CFLAGS="$CFLAGS $cf_new_cflags"
12762 fi
12763
12764 if test -n "$cf_new_cppflags" ; then
12765
12766         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12767 fi
12768
12769 if test -n "$cf_new_extra_cppflags" ; then
12770
12771         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12772 fi
12773
12774                 ;;
12775         esac
12776         ;;
12777 esac
12778
12779 if test "$with_dmalloc" = yes ; then
12780         echo "$as_me:12780: checking for dmalloc.h" >&5
12781 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12782 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12783   echo $ECHO_N "(cached) $ECHO_C" >&6
12784 else
12785   cat >conftest.$ac_ext <<_ACEOF
12786 #line 12786 "configure"
12787 #include "confdefs.h"
12788 #include <dmalloc.h>
12789 _ACEOF
12790 if { (eval echo "$as_me:12790: \"$ac_cpp conftest.$ac_ext\"") >&5
12791   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12792   ac_status=$?
12793   egrep -v '^ *\+' conftest.er1 >conftest.err
12794   rm -f conftest.er1
12795   cat conftest.err >&5
12796   echo "$as_me:12796: \$? = $ac_status" >&5
12797   (exit $ac_status); } >/dev/null; then
12798   if test -s conftest.err; then
12799     ac_cpp_err=$ac_c_preproc_warn_flag
12800   else
12801     ac_cpp_err=
12802   fi
12803 else
12804   ac_cpp_err=yes
12805 fi
12806 if test -z "$ac_cpp_err"; then
12807   ac_cv_header_dmalloc_h=yes
12808 else
12809   echo "$as_me: failed program was:" >&5
12810   cat conftest.$ac_ext >&5
12811   ac_cv_header_dmalloc_h=no
12812 fi
12813 rm -f conftest.err conftest.$ac_ext
12814 fi
12815 echo "$as_me:12815: result: $ac_cv_header_dmalloc_h" >&5
12816 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12817 if test $ac_cv_header_dmalloc_h = yes; then
12818
12819 echo "$as_me:12819: checking for dmalloc_debug in -ldmalloc" >&5
12820 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12821 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12822   echo $ECHO_N "(cached) $ECHO_C" >&6
12823 else
12824   ac_check_lib_save_LIBS=$LIBS
12825 LIBS="-ldmalloc  $LIBS"
12826 cat >conftest.$ac_ext <<_ACEOF
12827 #line 12827 "configure"
12828 #include "confdefs.h"
12829
12830 /* Override any gcc2 internal prototype to avoid an error.  */
12831 #ifdef __cplusplus
12832 extern "C"
12833 #endif
12834 /* We use char because int might match the return type of a gcc2
12835    builtin and then its argument prototype would still apply.  */
12836 char dmalloc_debug ();
12837 int
12838 main ()
12839 {
12840 dmalloc_debug ();
12841   ;
12842   return 0;
12843 }
12844 _ACEOF
12845 rm -f conftest.$ac_objext conftest$ac_exeext
12846 if { (eval echo "$as_me:12846: \"$ac_link\"") >&5
12847   (eval $ac_link) 2>&5
12848   ac_status=$?
12849   echo "$as_me:12849: \$? = $ac_status" >&5
12850   (exit $ac_status); } &&
12851          { ac_try='test -s conftest$ac_exeext'
12852   { (eval echo "$as_me:12852: \"$ac_try\"") >&5
12853   (eval $ac_try) 2>&5
12854   ac_status=$?
12855   echo "$as_me:12855: \$? = $ac_status" >&5
12856   (exit $ac_status); }; }; then
12857   ac_cv_lib_dmalloc_dmalloc_debug=yes
12858 else
12859   echo "$as_me: failed program was:" >&5
12860 cat conftest.$ac_ext >&5
12861 ac_cv_lib_dmalloc_dmalloc_debug=no
12862 fi
12863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12864 LIBS=$ac_check_lib_save_LIBS
12865 fi
12866 echo "$as_me:12866: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12867 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12868 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12869   cat >>confdefs.h <<EOF
12870 #define HAVE_LIBDMALLOC 1
12871 EOF
12872
12873   LIBS="-ldmalloc $LIBS"
12874
12875 fi
12876
12877 fi
12878
12879 fi
12880
12881 echo "$as_me:12881: checking if you want to use dbmalloc for testing" >&5
12882 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12883
12884 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12885 if test "${with_dbmalloc+set}" = set; then
12886   withval="$with_dbmalloc"
12887   cat >>confdefs.h <<\EOF
12888 #define USE_DBMALLOC 1
12889 EOF
12890
12891         : ${with_cflags:=-g}
12892         : ${with_no_leaks:=yes}
12893          with_dbmalloc=yes
12894 else
12895   with_dbmalloc=
12896 fi;
12897 echo "$as_me:12897: result: ${with_dbmalloc:-no}" >&5
12898 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12899
12900 case .$with_cflags in #(vi
12901 .*-g*)
12902         case .$CFLAGS in #(vi
12903         .*-g*) #(vi
12904                 ;;
12905         *)
12906
12907 cf_fix_cppflags=no
12908 cf_new_cflags=
12909 cf_new_cppflags=
12910 cf_new_extra_cppflags=
12911
12912 for cf_add_cflags in -g
12913 do
12914 case $cf_fix_cppflags in
12915 no)
12916         case $cf_add_cflags in #(vi
12917         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12918                 case $cf_add_cflags in
12919                 -D*)
12920                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12921
12922                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12923                                 && test -z "${cf_tst_cflags}" \
12924                                 && cf_fix_cppflags=yes
12925
12926                         if test $cf_fix_cppflags = yes ; then
12927                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12928                                 continue
12929                         elif test "${cf_tst_cflags}" = "\"'" ; then
12930                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12931                                 continue
12932                         fi
12933                         ;;
12934                 esac
12935                 case "$CPPFLAGS" in
12936                 *$cf_add_cflags) #(vi
12937                         ;;
12938                 *) #(vi
12939                         case $cf_add_cflags in #(vi
12940                         -D*)
12941                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12942
12943 CPPFLAGS=`echo "$CPPFLAGS" | \
12944         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12945                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12946
12947                                 ;;
12948                         esac
12949                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12950                         ;;
12951                 esac
12952                 ;;
12953         *)
12954                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12955                 ;;
12956         esac
12957         ;;
12958 yes)
12959         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12960
12961         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12962
12963         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12964                 && test -z "${cf_tst_cflags}" \
12965                 && cf_fix_cppflags=no
12966         ;;
12967 esac
12968 done
12969
12970 if test -n "$cf_new_cflags" ; then
12971
12972         CFLAGS="$CFLAGS $cf_new_cflags"
12973 fi
12974
12975 if test -n "$cf_new_cppflags" ; then
12976
12977         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12978 fi
12979
12980 if test -n "$cf_new_extra_cppflags" ; then
12981
12982         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12983 fi
12984
12985                 ;;
12986         esac
12987         ;;
12988 esac
12989
12990 if test "$with_dbmalloc" = yes ; then
12991         echo "$as_me:12991: checking for dbmalloc.h" >&5
12992 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12993 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12994   echo $ECHO_N "(cached) $ECHO_C" >&6
12995 else
12996   cat >conftest.$ac_ext <<_ACEOF
12997 #line 12997 "configure"
12998 #include "confdefs.h"
12999 #include <dbmalloc.h>
13000 _ACEOF
13001 if { (eval echo "$as_me:13001: \"$ac_cpp conftest.$ac_ext\"") >&5
13002   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13003   ac_status=$?
13004   egrep -v '^ *\+' conftest.er1 >conftest.err
13005   rm -f conftest.er1
13006   cat conftest.err >&5
13007   echo "$as_me:13007: \$? = $ac_status" >&5
13008   (exit $ac_status); } >/dev/null; then
13009   if test -s conftest.err; then
13010     ac_cpp_err=$ac_c_preproc_warn_flag
13011   else
13012     ac_cpp_err=
13013   fi
13014 else
13015   ac_cpp_err=yes
13016 fi
13017 if test -z "$ac_cpp_err"; then
13018   ac_cv_header_dbmalloc_h=yes
13019 else
13020   echo "$as_me: failed program was:" >&5
13021   cat conftest.$ac_ext >&5
13022   ac_cv_header_dbmalloc_h=no
13023 fi
13024 rm -f conftest.err conftest.$ac_ext
13025 fi
13026 echo "$as_me:13026: result: $ac_cv_header_dbmalloc_h" >&5
13027 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13028 if test $ac_cv_header_dbmalloc_h = yes; then
13029
13030 echo "$as_me:13030: checking for debug_malloc in -ldbmalloc" >&5
13031 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13032 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13033   echo $ECHO_N "(cached) $ECHO_C" >&6
13034 else
13035   ac_check_lib_save_LIBS=$LIBS
13036 LIBS="-ldbmalloc  $LIBS"
13037 cat >conftest.$ac_ext <<_ACEOF
13038 #line 13038 "configure"
13039 #include "confdefs.h"
13040
13041 /* Override any gcc2 internal prototype to avoid an error.  */
13042 #ifdef __cplusplus
13043 extern "C"
13044 #endif
13045 /* We use char because int might match the return type of a gcc2
13046    builtin and then its argument prototype would still apply.  */
13047 char debug_malloc ();
13048 int
13049 main ()
13050 {
13051 debug_malloc ();
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 rm -f conftest.$ac_objext conftest$ac_exeext
13057 if { (eval echo "$as_me:13057: \"$ac_link\"") >&5
13058   (eval $ac_link) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit $ac_status); } &&
13062          { ac_try='test -s conftest$ac_exeext'
13063   { (eval echo "$as_me:13063: \"$ac_try\"") >&5
13064   (eval $ac_try) 2>&5
13065   ac_status=$?
13066   echo "$as_me:13066: \$? = $ac_status" >&5
13067   (exit $ac_status); }; }; then
13068   ac_cv_lib_dbmalloc_debug_malloc=yes
13069 else
13070   echo "$as_me: failed program was:" >&5
13071 cat conftest.$ac_ext >&5
13072 ac_cv_lib_dbmalloc_debug_malloc=no
13073 fi
13074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13075 LIBS=$ac_check_lib_save_LIBS
13076 fi
13077 echo "$as_me:13077: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13078 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13079 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13080   cat >>confdefs.h <<EOF
13081 #define HAVE_LIBDBMALLOC 1
13082 EOF
13083
13084   LIBS="-ldbmalloc $LIBS"
13085
13086 fi
13087
13088 fi
13089
13090 fi
13091
13092 echo "$as_me:13092: checking if you want to use valgrind for testing" >&5
13093 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13094
13095 # Check whether --with-valgrind or --without-valgrind was given.
13096 if test "${with_valgrind+set}" = set; then
13097   withval="$with_valgrind"
13098   cat >>confdefs.h <<\EOF
13099 #define USE_VALGRIND 1
13100 EOF
13101
13102         : ${with_cflags:=-g}
13103         : ${with_no_leaks:=yes}
13104          with_valgrind=yes
13105 else
13106   with_valgrind=
13107 fi;
13108 echo "$as_me:13108: result: ${with_valgrind:-no}" >&5
13109 echo "${ECHO_T}${with_valgrind:-no}" >&6
13110
13111 case .$with_cflags in #(vi
13112 .*-g*)
13113         case .$CFLAGS in #(vi
13114         .*-g*) #(vi
13115                 ;;
13116         *)
13117
13118 cf_fix_cppflags=no
13119 cf_new_cflags=
13120 cf_new_cppflags=
13121 cf_new_extra_cppflags=
13122
13123 for cf_add_cflags in -g
13124 do
13125 case $cf_fix_cppflags in
13126 no)
13127         case $cf_add_cflags in #(vi
13128         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13129                 case $cf_add_cflags in
13130                 -D*)
13131                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13132
13133                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13134                                 && test -z "${cf_tst_cflags}" \
13135                                 && cf_fix_cppflags=yes
13136
13137                         if test $cf_fix_cppflags = yes ; then
13138                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13139                                 continue
13140                         elif test "${cf_tst_cflags}" = "\"'" ; then
13141                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13142                                 continue
13143                         fi
13144                         ;;
13145                 esac
13146                 case "$CPPFLAGS" in
13147                 *$cf_add_cflags) #(vi
13148                         ;;
13149                 *) #(vi
13150                         case $cf_add_cflags in #(vi
13151                         -D*)
13152                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13153
13154 CPPFLAGS=`echo "$CPPFLAGS" | \
13155         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13156                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13157
13158                                 ;;
13159                         esac
13160                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13161                         ;;
13162                 esac
13163                 ;;
13164         *)
13165                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13166                 ;;
13167         esac
13168         ;;
13169 yes)
13170         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13171
13172         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13173
13174         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13175                 && test -z "${cf_tst_cflags}" \
13176                 && cf_fix_cppflags=no
13177         ;;
13178 esac
13179 done
13180
13181 if test -n "$cf_new_cflags" ; then
13182
13183         CFLAGS="$CFLAGS $cf_new_cflags"
13184 fi
13185
13186 if test -n "$cf_new_cppflags" ; then
13187
13188         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13189 fi
13190
13191 if test -n "$cf_new_extra_cppflags" ; then
13192
13193         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13194 fi
13195
13196                 ;;
13197         esac
13198         ;;
13199 esac
13200
13201 echo "$as_me:13201: checking if you want to perform memory-leak testing" >&5
13202 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13203
13204 # Check whether --enable-leaks or --disable-leaks was given.
13205 if test "${enable_leaks+set}" = set; then
13206   enableval="$enable_leaks"
13207   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13208 else
13209   : ${with_no_leaks:=no}
13210 fi;
13211 echo "$as_me:13211: result: $with_no_leaks" >&5
13212 echo "${ECHO_T}$with_no_leaks" >&6
13213
13214 if test "$with_no_leaks" = yes ; then
13215         cat >>confdefs.h <<\EOF
13216 #define NO_LEAKS 1
13217 EOF
13218
13219         cat >>confdefs.h <<\EOF
13220 #define YY_NO_LEAKS 1
13221 EOF
13222
13223 fi
13224
13225 cat >>confdefs.h <<\EOF
13226 #define HAVE_NC_ALLOC_H 1
13227 EOF
13228
13229 ###     use option --enable-expanded to generate certain macros as functions
13230
13231 # Check whether --enable-expanded or --disable-expanded was given.
13232 if test "${enable_expanded+set}" = set; then
13233   enableval="$enable_expanded"
13234   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13235 #define NCURSES_EXPANDED 1
13236 EOF
13237
13238 fi;
13239
13240 ###     use option --disable-macros to suppress macros in favor of functions
13241
13242 # Check whether --enable-macros or --disable-macros was given.
13243 if test "${enable_macros+set}" = set; then
13244   enableval="$enable_macros"
13245   test "$enableval" = no && cat >>confdefs.h <<\EOF
13246 #define NCURSES_NOMACROS 1
13247 EOF
13248
13249 fi;
13250
13251 # Normally we only add trace() to the debug-library.  Allow this to be
13252 # extended to all models of the ncurses library:
13253 cf_all_traces=no
13254 case "$CFLAGS $CPPFLAGS" in
13255 *-DTRACE*)
13256         cf_all_traces=yes
13257         ;;
13258 esac
13259
13260 echo "$as_me:13260: checking whether to add trace feature to all models" >&5
13261 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13262
13263 # Check whether --with-trace or --without-trace was given.
13264 if test "${with_trace+set}" = set; then
13265   withval="$with_trace"
13266   cf_with_trace=$withval
13267 else
13268   cf_with_trace=$cf_all_traces
13269 fi;
13270 echo "$as_me:13270: result: $cf_with_trace" >&5
13271 echo "${ECHO_T}$cf_with_trace" >&6
13272
13273 if test "$cf_with_trace" = yes ; then
13274         LIB_TRACING=all
13275         ADA_TRACE=TRUE
13276
13277 cf_fix_cppflags=no
13278 cf_new_cflags=
13279 cf_new_cppflags=
13280 cf_new_extra_cppflags=
13281
13282 for cf_add_cflags in -DTRACE
13283 do
13284 case $cf_fix_cppflags in
13285 no)
13286         case $cf_add_cflags in #(vi
13287         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13288                 case $cf_add_cflags in
13289                 -D*)
13290                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13291
13292                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13293                                 && test -z "${cf_tst_cflags}" \
13294                                 && cf_fix_cppflags=yes
13295
13296                         if test $cf_fix_cppflags = yes ; then
13297                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13298                                 continue
13299                         elif test "${cf_tst_cflags}" = "\"'" ; then
13300                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13301                                 continue
13302                         fi
13303                         ;;
13304                 esac
13305                 case "$CPPFLAGS" in
13306                 *$cf_add_cflags) #(vi
13307                         ;;
13308                 *) #(vi
13309                         case $cf_add_cflags in #(vi
13310                         -D*)
13311                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13312
13313 CPPFLAGS=`echo "$CPPFLAGS" | \
13314         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13315                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13316
13317                                 ;;
13318                         esac
13319                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13320                         ;;
13321                 esac
13322                 ;;
13323         *)
13324                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13325                 ;;
13326         esac
13327         ;;
13328 yes)
13329         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13330
13331         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13332
13333         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13334                 && test -z "${cf_tst_cflags}" \
13335                 && cf_fix_cppflags=no
13336         ;;
13337 esac
13338 done
13339
13340 if test -n "$cf_new_cflags" ; then
13341
13342         CFLAGS="$CFLAGS $cf_new_cflags"
13343 fi
13344
13345 if test -n "$cf_new_cppflags" ; then
13346
13347         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13348 fi
13349
13350 if test -n "$cf_new_extra_cppflags" ; then
13351
13352         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13353 fi
13354
13355 else
13356         LIB_TRACING=DEBUG
13357         ADA_TRACE=FALSE
13358 fi
13359
13360 ###     Checks for libraries.
13361 case $cf_cv_system_name in #(vi
13362 *mingw32*) #(vi
13363         ;;
13364 *)
13365 echo "$as_me:13365: checking for gettimeofday" >&5
13366 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13367 if test "${ac_cv_func_gettimeofday+set}" = set; then
13368   echo $ECHO_N "(cached) $ECHO_C" >&6
13369 else
13370   cat >conftest.$ac_ext <<_ACEOF
13371 #line 13371 "configure"
13372 #include "confdefs.h"
13373 /* System header to define __stub macros and hopefully few prototypes,
13374     which can conflict with char gettimeofday (); below.  */
13375 #include <assert.h>
13376 /* Override any gcc2 internal prototype to avoid an error.  */
13377 #ifdef __cplusplus
13378 extern "C"
13379 #endif
13380 /* We use char because int might match the return type of a gcc2
13381    builtin and then its argument prototype would still apply.  */
13382 char gettimeofday ();
13383 char (*f) ();
13384
13385 int
13386 main ()
13387 {
13388 /* The GNU C library defines this for functions which it implements
13389     to always fail with ENOSYS.  Some functions are actually named
13390     something starting with __ and the normal name is an alias.  */
13391 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13392 choke me
13393 #else
13394 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13395 #endif
13396
13397   ;
13398   return 0;
13399 }
13400 _ACEOF
13401 rm -f conftest.$ac_objext conftest$ac_exeext
13402 if { (eval echo "$as_me:13402: \"$ac_link\"") >&5
13403   (eval $ac_link) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit $ac_status); } &&
13407          { ac_try='test -s conftest$ac_exeext'
13408   { (eval echo "$as_me:13408: \"$ac_try\"") >&5
13409   (eval $ac_try) 2>&5
13410   ac_status=$?
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit $ac_status); }; }; then
13413   ac_cv_func_gettimeofday=yes
13414 else
13415   echo "$as_me: failed program was:" >&5
13416 cat conftest.$ac_ext >&5
13417 ac_cv_func_gettimeofday=no
13418 fi
13419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13420 fi
13421 echo "$as_me:13421: result: $ac_cv_func_gettimeofday" >&5
13422 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13423 if test $ac_cv_func_gettimeofday = yes; then
13424   cat >>confdefs.h <<\EOF
13425 #define HAVE_GETTIMEOFDAY 1
13426 EOF
13427
13428 else
13429
13430 echo "$as_me:13430: checking for gettimeofday in -lbsd" >&5
13431 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13432 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13433   echo $ECHO_N "(cached) $ECHO_C" >&6
13434 else
13435   ac_check_lib_save_LIBS=$LIBS
13436 LIBS="-lbsd  $LIBS"
13437 cat >conftest.$ac_ext <<_ACEOF
13438 #line 13438 "configure"
13439 #include "confdefs.h"
13440
13441 /* Override any gcc2 internal prototype to avoid an error.  */
13442 #ifdef __cplusplus
13443 extern "C"
13444 #endif
13445 /* We use char because int might match the return type of a gcc2
13446    builtin and then its argument prototype would still apply.  */
13447 char gettimeofday ();
13448 int
13449 main ()
13450 {
13451 gettimeofday ();
13452   ;
13453   return 0;
13454 }
13455 _ACEOF
13456 rm -f conftest.$ac_objext conftest$ac_exeext
13457 if { (eval echo "$as_me:13457: \"$ac_link\"") >&5
13458   (eval $ac_link) 2>&5
13459   ac_status=$?
13460   echo "$as_me:13460: \$? = $ac_status" >&5
13461   (exit $ac_status); } &&
13462          { ac_try='test -s conftest$ac_exeext'
13463   { (eval echo "$as_me:13463: \"$ac_try\"") >&5
13464   (eval $ac_try) 2>&5
13465   ac_status=$?
13466   echo "$as_me:13466: \$? = $ac_status" >&5
13467   (exit $ac_status); }; }; then
13468   ac_cv_lib_bsd_gettimeofday=yes
13469 else
13470   echo "$as_me: failed program was:" >&5
13471 cat conftest.$ac_ext >&5
13472 ac_cv_lib_bsd_gettimeofday=no
13473 fi
13474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13475 LIBS=$ac_check_lib_save_LIBS
13476 fi
13477 echo "$as_me:13477: result: $ac_cv_lib_bsd_gettimeofday" >&5
13478 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13479 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13480   cat >>confdefs.h <<\EOF
13481 #define HAVE_GETTIMEOFDAY 1
13482 EOF
13483
13484         LIBS="-lbsd $LIBS"
13485 fi
13486
13487 fi
13488         ;;
13489 esac
13490
13491 echo "$as_me:13491: checking if -lm needed for math functions" >&5
13492 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13493 if test "${cf_cv_need_libm+set}" = set; then
13494   echo $ECHO_N "(cached) $ECHO_C" >&6
13495 else
13496
13497         cat >conftest.$ac_ext <<_ACEOF
13498 #line 13498 "configure"
13499 #include "confdefs.h"
13500
13501         #include <stdio.h>
13502         #include <math.h>
13503
13504 int
13505 main ()
13506 {
13507 double x = rand(); printf("result = %g\n", sin(x))
13508   ;
13509   return 0;
13510 }
13511 _ACEOF
13512 rm -f conftest.$ac_objext conftest$ac_exeext
13513 if { (eval echo "$as_me:13513: \"$ac_link\"") >&5
13514   (eval $ac_link) 2>&5
13515   ac_status=$?
13516   echo "$as_me:13516: \$? = $ac_status" >&5
13517   (exit $ac_status); } &&
13518          { ac_try='test -s conftest$ac_exeext'
13519   { (eval echo "$as_me:13519: \"$ac_try\"") >&5
13520   (eval $ac_try) 2>&5
13521   ac_status=$?
13522   echo "$as_me:13522: \$? = $ac_status" >&5
13523   (exit $ac_status); }; }; then
13524   cf_cv_need_libm=no
13525 else
13526   echo "$as_me: failed program was:" >&5
13527 cat conftest.$ac_ext >&5
13528 cf_cv_need_libm=yes
13529 fi
13530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13531 fi
13532 echo "$as_me:13532: result: $cf_cv_need_libm" >&5
13533 echo "${ECHO_T}$cf_cv_need_libm" >&6
13534 if test "$cf_cv_need_libm" = yes
13535 then
13536 MATH_LIB=-lm
13537 fi
13538
13539 ###     Checks for header files.
13540 echo "$as_me:13540: checking for ANSI C header files" >&5
13541 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13542 if test "${ac_cv_header_stdc+set}" = set; then
13543   echo $ECHO_N "(cached) $ECHO_C" >&6
13544 else
13545   cat >conftest.$ac_ext <<_ACEOF
13546 #line 13546 "configure"
13547 #include "confdefs.h"
13548 #include <stdlib.h>
13549 #include <stdarg.h>
13550 #include <string.h>
13551 #include <float.h>
13552
13553 _ACEOF
13554 if { (eval echo "$as_me:13554: \"$ac_cpp conftest.$ac_ext\"") >&5
13555   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13556   ac_status=$?
13557   egrep -v '^ *\+' conftest.er1 >conftest.err
13558   rm -f conftest.er1
13559   cat conftest.err >&5
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit $ac_status); } >/dev/null; then
13562   if test -s conftest.err; then
13563     ac_cpp_err=$ac_c_preproc_warn_flag
13564   else
13565     ac_cpp_err=
13566   fi
13567 else
13568   ac_cpp_err=yes
13569 fi
13570 if test -z "$ac_cpp_err"; then
13571   ac_cv_header_stdc=yes
13572 else
13573   echo "$as_me: failed program was:" >&5
13574   cat conftest.$ac_ext >&5
13575   ac_cv_header_stdc=no
13576 fi
13577 rm -f conftest.err conftest.$ac_ext
13578
13579 if test $ac_cv_header_stdc = yes; then
13580   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13581   cat >conftest.$ac_ext <<_ACEOF
13582 #line 13582 "configure"
13583 #include "confdefs.h"
13584 #include <string.h>
13585
13586 _ACEOF
13587 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13588   egrep "memchr" >/dev/null 2>&1; then
13589   :
13590 else
13591   ac_cv_header_stdc=no
13592 fi
13593 rm -rf conftest*
13594
13595 fi
13596
13597 if test $ac_cv_header_stdc = yes; then
13598   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13599   cat >conftest.$ac_ext <<_ACEOF
13600 #line 13600 "configure"
13601 #include "confdefs.h"
13602 #include <stdlib.h>
13603
13604 _ACEOF
13605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13606   egrep "free" >/dev/null 2>&1; then
13607   :
13608 else
13609   ac_cv_header_stdc=no
13610 fi
13611 rm -rf conftest*
13612
13613 fi
13614
13615 if test $ac_cv_header_stdc = yes; then
13616   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13617   if test "$cross_compiling" = yes; then
13618   :
13619 else
13620   cat >conftest.$ac_ext <<_ACEOF
13621 #line 13621 "configure"
13622 #include "confdefs.h"
13623 #include <ctype.h>
13624 #if ((' ' & 0x0FF) == 0x020)
13625 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13626 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13627 #else
13628 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13629                      || ('j' <= (c) && (c) <= 'r') \
13630                      || ('s' <= (c) && (c) <= 'z'))
13631 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13632 #endif
13633
13634 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13635 int
13636 main ()
13637 {
13638   int i;
13639   for (i = 0; i < 256; i++)
13640     if (XOR (islower (i), ISLOWER (i))
13641         || toupper (i) != TOUPPER (i))
13642       $ac_main_return(2);
13643   $ac_main_return (0);
13644 }
13645 _ACEOF
13646 rm -f conftest$ac_exeext
13647 if { (eval echo "$as_me:13647: \"$ac_link\"") >&5
13648   (eval $ac_link) 2>&5
13649   ac_status=$?
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13652   { (eval echo "$as_me:13652: \"$ac_try\"") >&5
13653   (eval $ac_try) 2>&5
13654   ac_status=$?
13655   echo "$as_me:13655: \$? = $ac_status" >&5
13656   (exit $ac_status); }; }; then
13657   :
13658 else
13659   echo "$as_me: program exited with status $ac_status" >&5
13660 echo "$as_me: failed program was:" >&5
13661 cat conftest.$ac_ext >&5
13662 ac_cv_header_stdc=no
13663 fi
13664 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13665 fi
13666 fi
13667 fi
13668 echo "$as_me:13668: result: $ac_cv_header_stdc" >&5
13669 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13670 if test $ac_cv_header_stdc = yes; then
13671
13672 cat >>confdefs.h <<\EOF
13673 #define STDC_HEADERS 1
13674 EOF
13675
13676 fi
13677
13678 ac_header_dirent=no
13679 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13680   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13681 echo "$as_me:13681: checking for $ac_hdr that defines DIR" >&5
13682 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13683 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13684   echo $ECHO_N "(cached) $ECHO_C" >&6
13685 else
13686   cat >conftest.$ac_ext <<_ACEOF
13687 #line 13687 "configure"
13688 #include "confdefs.h"
13689 #include <sys/types.h>
13690 #include <$ac_hdr>
13691
13692 int
13693 main ()
13694 {
13695 if ((DIR *) 0)
13696 return 0;
13697   ;
13698   return 0;
13699 }
13700 _ACEOF
13701 rm -f conftest.$ac_objext
13702 if { (eval echo "$as_me:13702: \"$ac_compile\"") >&5
13703   (eval $ac_compile) 2>&5
13704   ac_status=$?
13705   echo "$as_me:13705: \$? = $ac_status" >&5
13706   (exit $ac_status); } &&
13707          { ac_try='test -s conftest.$ac_objext'
13708   { (eval echo "$as_me:13708: \"$ac_try\"") >&5
13709   (eval $ac_try) 2>&5
13710   ac_status=$?
13711   echo "$as_me:13711: \$? = $ac_status" >&5
13712   (exit $ac_status); }; }; then
13713   eval "$as_ac_Header=yes"
13714 else
13715   echo "$as_me: failed program was:" >&5
13716 cat conftest.$ac_ext >&5
13717 eval "$as_ac_Header=no"
13718 fi
13719 rm -f conftest.$ac_objext conftest.$ac_ext
13720 fi
13721 echo "$as_me:13721: result: `eval echo '${'$as_ac_Header'}'`" >&5
13722 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13723 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13724   cat >>confdefs.h <<EOF
13725 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13726 EOF
13727
13728 ac_header_dirent=$ac_hdr; break
13729 fi
13730
13731 done
13732 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13733 if test $ac_header_dirent = dirent.h; then
13734   echo "$as_me:13734: checking for opendir in -ldir" >&5
13735 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13736 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13737   echo $ECHO_N "(cached) $ECHO_C" >&6
13738 else
13739   ac_check_lib_save_LIBS=$LIBS
13740 LIBS="-ldir  $LIBS"
13741 cat >conftest.$ac_ext <<_ACEOF
13742 #line 13742 "configure"
13743 #include "confdefs.h"
13744
13745 /* Override any gcc2 internal prototype to avoid an error.  */
13746 #ifdef __cplusplus
13747 extern "C"
13748 #endif
13749 /* We use char because int might match the return type of a gcc2
13750    builtin and then its argument prototype would still apply.  */
13751 char opendir ();
13752 int
13753 main ()
13754 {
13755 opendir ();
13756   ;
13757   return 0;
13758 }
13759 _ACEOF
13760 rm -f conftest.$ac_objext conftest$ac_exeext
13761 if { (eval echo "$as_me:13761: \"$ac_link\"") >&5
13762   (eval $ac_link) 2>&5
13763   ac_status=$?
13764   echo "$as_me:13764: \$? = $ac_status" >&5
13765   (exit $ac_status); } &&
13766          { ac_try='test -s conftest$ac_exeext'
13767   { (eval echo "$as_me:13767: \"$ac_try\"") >&5
13768   (eval $ac_try) 2>&5
13769   ac_status=$?
13770   echo "$as_me:13770: \$? = $ac_status" >&5
13771   (exit $ac_status); }; }; then
13772   ac_cv_lib_dir_opendir=yes
13773 else
13774   echo "$as_me: failed program was:" >&5
13775 cat conftest.$ac_ext >&5
13776 ac_cv_lib_dir_opendir=no
13777 fi
13778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13779 LIBS=$ac_check_lib_save_LIBS
13780 fi
13781 echo "$as_me:13781: result: $ac_cv_lib_dir_opendir" >&5
13782 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13783 if test $ac_cv_lib_dir_opendir = yes; then
13784   LIBS="$LIBS -ldir"
13785 fi
13786
13787 else
13788   echo "$as_me:13788: checking for opendir in -lx" >&5
13789 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13790 if test "${ac_cv_lib_x_opendir+set}" = set; then
13791   echo $ECHO_N "(cached) $ECHO_C" >&6
13792 else
13793   ac_check_lib_save_LIBS=$LIBS
13794 LIBS="-lx  $LIBS"
13795 cat >conftest.$ac_ext <<_ACEOF
13796 #line 13796 "configure"
13797 #include "confdefs.h"
13798
13799 /* Override any gcc2 internal prototype to avoid an error.  */
13800 #ifdef __cplusplus
13801 extern "C"
13802 #endif
13803 /* We use char because int might match the return type of a gcc2
13804    builtin and then its argument prototype would still apply.  */
13805 char opendir ();
13806 int
13807 main ()
13808 {
13809 opendir ();
13810   ;
13811   return 0;
13812 }
13813 _ACEOF
13814 rm -f conftest.$ac_objext conftest$ac_exeext
13815 if { (eval echo "$as_me:13815: \"$ac_link\"") >&5
13816   (eval $ac_link) 2>&5
13817   ac_status=$?
13818   echo "$as_me:13818: \$? = $ac_status" >&5
13819   (exit $ac_status); } &&
13820          { ac_try='test -s conftest$ac_exeext'
13821   { (eval echo "$as_me:13821: \"$ac_try\"") >&5
13822   (eval $ac_try) 2>&5
13823   ac_status=$?
13824   echo "$as_me:13824: \$? = $ac_status" >&5
13825   (exit $ac_status); }; }; then
13826   ac_cv_lib_x_opendir=yes
13827 else
13828   echo "$as_me: failed program was:" >&5
13829 cat conftest.$ac_ext >&5
13830 ac_cv_lib_x_opendir=no
13831 fi
13832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13833 LIBS=$ac_check_lib_save_LIBS
13834 fi
13835 echo "$as_me:13835: result: $ac_cv_lib_x_opendir" >&5
13836 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13837 if test $ac_cv_lib_x_opendir = yes; then
13838   LIBS="$LIBS -lx"
13839 fi
13840
13841 fi
13842
13843 echo "$as_me:13843: checking whether time.h and sys/time.h may both be included" >&5
13844 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13845 if test "${ac_cv_header_time+set}" = set; then
13846   echo $ECHO_N "(cached) $ECHO_C" >&6
13847 else
13848   cat >conftest.$ac_ext <<_ACEOF
13849 #line 13849 "configure"
13850 #include "confdefs.h"
13851 #include <sys/types.h>
13852 #include <sys/time.h>
13853 #include <time.h>
13854
13855 int
13856 main ()
13857 {
13858 if ((struct tm *) 0)
13859 return 0;
13860   ;
13861   return 0;
13862 }
13863 _ACEOF
13864 rm -f conftest.$ac_objext
13865 if { (eval echo "$as_me:13865: \"$ac_compile\"") >&5
13866   (eval $ac_compile) 2>&5
13867   ac_status=$?
13868   echo "$as_me:13868: \$? = $ac_status" >&5
13869   (exit $ac_status); } &&
13870          { ac_try='test -s conftest.$ac_objext'
13871   { (eval echo "$as_me:13871: \"$ac_try\"") >&5
13872   (eval $ac_try) 2>&5
13873   ac_status=$?
13874   echo "$as_me:13874: \$? = $ac_status" >&5
13875   (exit $ac_status); }; }; then
13876   ac_cv_header_time=yes
13877 else
13878   echo "$as_me: failed program was:" >&5
13879 cat conftest.$ac_ext >&5
13880 ac_cv_header_time=no
13881 fi
13882 rm -f conftest.$ac_objext conftest.$ac_ext
13883 fi
13884 echo "$as_me:13884: result: $ac_cv_header_time" >&5
13885 echo "${ECHO_T}$ac_cv_header_time" >&6
13886 if test $ac_cv_header_time = yes; then
13887
13888 cat >>confdefs.h <<\EOF
13889 #define TIME_WITH_SYS_TIME 1
13890 EOF
13891
13892 fi
13893
13894 cf_regex_func=no
13895
13896 cf_regex_libs="regex re"
13897 case $host_os in #(vi
13898 mingw*)
13899         cf_regex_libs="gnurx $cf_regex_libs"
13900         ;;
13901 esac
13902
13903 echo "$as_me:13903: checking for regcomp" >&5
13904 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13905 if test "${ac_cv_func_regcomp+set}" = set; then
13906   echo $ECHO_N "(cached) $ECHO_C" >&6
13907 else
13908   cat >conftest.$ac_ext <<_ACEOF
13909 #line 13909 "configure"
13910 #include "confdefs.h"
13911 /* System header to define __stub macros and hopefully few prototypes,
13912     which can conflict with char regcomp (); below.  */
13913 #include <assert.h>
13914 /* Override any gcc2 internal prototype to avoid an error.  */
13915 #ifdef __cplusplus
13916 extern "C"
13917 #endif
13918 /* We use char because int might match the return type of a gcc2
13919    builtin and then its argument prototype would still apply.  */
13920 char regcomp ();
13921 char (*f) ();
13922
13923 int
13924 main ()
13925 {
13926 /* The GNU C library defines this for functions which it implements
13927     to always fail with ENOSYS.  Some functions are actually named
13928     something starting with __ and the normal name is an alias.  */
13929 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13930 choke me
13931 #else
13932 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13933 #endif
13934
13935   ;
13936   return 0;
13937 }
13938 _ACEOF
13939 rm -f conftest.$ac_objext conftest$ac_exeext
13940 if { (eval echo "$as_me:13940: \"$ac_link\"") >&5
13941   (eval $ac_link) 2>&5
13942   ac_status=$?
13943   echo "$as_me:13943: \$? = $ac_status" >&5
13944   (exit $ac_status); } &&
13945          { ac_try='test -s conftest$ac_exeext'
13946   { (eval echo "$as_me:13946: \"$ac_try\"") >&5
13947   (eval $ac_try) 2>&5
13948   ac_status=$?
13949   echo "$as_me:13949: \$? = $ac_status" >&5
13950   (exit $ac_status); }; }; then
13951   ac_cv_func_regcomp=yes
13952 else
13953   echo "$as_me: failed program was:" >&5
13954 cat conftest.$ac_ext >&5
13955 ac_cv_func_regcomp=no
13956 fi
13957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13958 fi
13959 echo "$as_me:13959: result: $ac_cv_func_regcomp" >&5
13960 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13961 if test $ac_cv_func_regcomp = yes; then
13962   cf_regex_func=regcomp
13963 else
13964
13965         for cf_regex_lib in $cf_regex_libs
13966         do
13967                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13968 echo "$as_me:13968: checking for regcomp in -l$cf_regex_lib" >&5
13969 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13970 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13971   echo $ECHO_N "(cached) $ECHO_C" >&6
13972 else
13973   ac_check_lib_save_LIBS=$LIBS
13974 LIBS="-l$cf_regex_lib  $LIBS"
13975 cat >conftest.$ac_ext <<_ACEOF
13976 #line 13976 "configure"
13977 #include "confdefs.h"
13978
13979 /* Override any gcc2 internal prototype to avoid an error.  */
13980 #ifdef __cplusplus
13981 extern "C"
13982 #endif
13983 /* We use char because int might match the return type of a gcc2
13984    builtin and then its argument prototype would still apply.  */
13985 char regcomp ();
13986 int
13987 main ()
13988 {
13989 regcomp ();
13990   ;
13991   return 0;
13992 }
13993 _ACEOF
13994 rm -f conftest.$ac_objext conftest$ac_exeext
13995 if { (eval echo "$as_me:13995: \"$ac_link\"") >&5
13996   (eval $ac_link) 2>&5
13997   ac_status=$?
13998   echo "$as_me:13998: \$? = $ac_status" >&5
13999   (exit $ac_status); } &&
14000          { ac_try='test -s conftest$ac_exeext'
14001   { (eval echo "$as_me:14001: \"$ac_try\"") >&5
14002   (eval $ac_try) 2>&5
14003   ac_status=$?
14004   echo "$as_me:14004: \$? = $ac_status" >&5
14005   (exit $ac_status); }; }; then
14006   eval "$as_ac_Lib=yes"
14007 else
14008   echo "$as_me: failed program was:" >&5
14009 cat conftest.$ac_ext >&5
14010 eval "$as_ac_Lib=no"
14011 fi
14012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14013 LIBS=$ac_check_lib_save_LIBS
14014 fi
14015 echo "$as_me:14015: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14016 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14017 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14018
14019                                 LIBS="-l$cf_regex_lib $LIBS"
14020                                 cf_regex_func=regcomp
14021                                 break
14022 fi
14023
14024         done
14025
14026 fi
14027
14028 if test "$cf_regex_func" = no ; then
14029         echo "$as_me:14029: checking for compile" >&5
14030 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14031 if test "${ac_cv_func_compile+set}" = set; then
14032   echo $ECHO_N "(cached) $ECHO_C" >&6
14033 else
14034   cat >conftest.$ac_ext <<_ACEOF
14035 #line 14035 "configure"
14036 #include "confdefs.h"
14037 /* System header to define __stub macros and hopefully few prototypes,
14038     which can conflict with char compile (); below.  */
14039 #include <assert.h>
14040 /* Override any gcc2 internal prototype to avoid an error.  */
14041 #ifdef __cplusplus
14042 extern "C"
14043 #endif
14044 /* We use char because int might match the return type of a gcc2
14045    builtin and then its argument prototype would still apply.  */
14046 char compile ();
14047 char (*f) ();
14048
14049 int
14050 main ()
14051 {
14052 /* The GNU C library defines this for functions which it implements
14053     to always fail with ENOSYS.  Some functions are actually named
14054     something starting with __ and the normal name is an alias.  */
14055 #if defined (__stub_compile) || defined (__stub___compile)
14056 choke me
14057 #else
14058 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14059 #endif
14060
14061   ;
14062   return 0;
14063 }
14064 _ACEOF
14065 rm -f conftest.$ac_objext conftest$ac_exeext
14066 if { (eval echo "$as_me:14066: \"$ac_link\"") >&5
14067   (eval $ac_link) 2>&5
14068   ac_status=$?
14069   echo "$as_me:14069: \$? = $ac_status" >&5
14070   (exit $ac_status); } &&
14071          { ac_try='test -s conftest$ac_exeext'
14072   { (eval echo "$as_me:14072: \"$ac_try\"") >&5
14073   (eval $ac_try) 2>&5
14074   ac_status=$?
14075   echo "$as_me:14075: \$? = $ac_status" >&5
14076   (exit $ac_status); }; }; then
14077   ac_cv_func_compile=yes
14078 else
14079   echo "$as_me: failed program was:" >&5
14080 cat conftest.$ac_ext >&5
14081 ac_cv_func_compile=no
14082 fi
14083 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14084 fi
14085 echo "$as_me:14085: result: $ac_cv_func_compile" >&5
14086 echo "${ECHO_T}$ac_cv_func_compile" >&6
14087 if test $ac_cv_func_compile = yes; then
14088   cf_regex_func=compile
14089 else
14090
14091                 echo "$as_me:14091: checking for compile in -lgen" >&5
14092 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14093 if test "${ac_cv_lib_gen_compile+set}" = set; then
14094   echo $ECHO_N "(cached) $ECHO_C" >&6
14095 else
14096   ac_check_lib_save_LIBS=$LIBS
14097 LIBS="-lgen  $LIBS"
14098 cat >conftest.$ac_ext <<_ACEOF
14099 #line 14099 "configure"
14100 #include "confdefs.h"
14101
14102 /* Override any gcc2 internal prototype to avoid an error.  */
14103 #ifdef __cplusplus
14104 extern "C"
14105 #endif
14106 /* We use char because int might match the return type of a gcc2
14107    builtin and then its argument prototype would still apply.  */
14108 char compile ();
14109 int
14110 main ()
14111 {
14112 compile ();
14113   ;
14114   return 0;
14115 }
14116 _ACEOF
14117 rm -f conftest.$ac_objext conftest$ac_exeext
14118 if { (eval echo "$as_me:14118: \"$ac_link\"") >&5
14119   (eval $ac_link) 2>&5
14120   ac_status=$?
14121   echo "$as_me:14121: \$? = $ac_status" >&5
14122   (exit $ac_status); } &&
14123          { ac_try='test -s conftest$ac_exeext'
14124   { (eval echo "$as_me:14124: \"$ac_try\"") >&5
14125   (eval $ac_try) 2>&5
14126   ac_status=$?
14127   echo "$as_me:14127: \$? = $ac_status" >&5
14128   (exit $ac_status); }; }; then
14129   ac_cv_lib_gen_compile=yes
14130 else
14131   echo "$as_me: failed program was:" >&5
14132 cat conftest.$ac_ext >&5
14133 ac_cv_lib_gen_compile=no
14134 fi
14135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14136 LIBS=$ac_check_lib_save_LIBS
14137 fi
14138 echo "$as_me:14138: result: $ac_cv_lib_gen_compile" >&5
14139 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14140 if test $ac_cv_lib_gen_compile = yes; then
14141
14142                                 LIBS="-lgen $LIBS"
14143                                 cf_regex_func=compile
14144 fi
14145
14146 fi
14147
14148 fi
14149
14150 if test "$cf_regex_func" = no ; then
14151         { echo "$as_me:14151: WARNING: cannot find regular expression library" >&5
14152 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14153 fi
14154
14155 echo "$as_me:14155: checking for regular-expression headers" >&5
14156 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14157 if test "${cf_cv_regex_hdrs+set}" = set; then
14158   echo $ECHO_N "(cached) $ECHO_C" >&6
14159 else
14160
14161 cf_cv_regex_hdrs=no
14162 case $cf_regex_func in #(vi
14163 compile) #(vi
14164         for cf_regex_hdr in regexp.h regexpr.h
14165         do
14166                 cat >conftest.$ac_ext <<_ACEOF
14167 #line 14167 "configure"
14168 #include "confdefs.h"
14169 #include <$cf_regex_hdr>
14170 int
14171 main ()
14172 {
14173
14174                         char *p = compile("", "", "", 0);
14175                         int x = step("", "");
14176
14177   ;
14178   return 0;
14179 }
14180 _ACEOF
14181 rm -f conftest.$ac_objext conftest$ac_exeext
14182 if { (eval echo "$as_me:14182: \"$ac_link\"") >&5
14183   (eval $ac_link) 2>&5
14184   ac_status=$?
14185   echo "$as_me:14185: \$? = $ac_status" >&5
14186   (exit $ac_status); } &&
14187          { ac_try='test -s conftest$ac_exeext'
14188   { (eval echo "$as_me:14188: \"$ac_try\"") >&5
14189   (eval $ac_try) 2>&5
14190   ac_status=$?
14191   echo "$as_me:14191: \$? = $ac_status" >&5
14192   (exit $ac_status); }; }; then
14193
14194                         cf_cv_regex_hdrs=$cf_regex_hdr
14195                         break
14196
14197 else
14198   echo "$as_me: failed program was:" >&5
14199 cat conftest.$ac_ext >&5
14200 fi
14201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14202         done
14203         ;;
14204 *)
14205         for cf_regex_hdr in regex.h
14206         do
14207                 cat >conftest.$ac_ext <<_ACEOF
14208 #line 14208 "configure"
14209 #include "confdefs.h"
14210 #include <sys/types.h>
14211 #include <$cf_regex_hdr>
14212 int
14213 main ()
14214 {
14215
14216                         regex_t *p;
14217                         int x = regcomp(p, "", 0);
14218                         int y = regexec(p, "", 0, 0, 0);
14219                         regfree(p);
14220
14221   ;
14222   return 0;
14223 }
14224 _ACEOF
14225 rm -f conftest.$ac_objext conftest$ac_exeext
14226 if { (eval echo "$as_me:14226: \"$ac_link\"") >&5
14227   (eval $ac_link) 2>&5
14228   ac_status=$?
14229   echo "$as_me:14229: \$? = $ac_status" >&5
14230   (exit $ac_status); } &&
14231          { ac_try='test -s conftest$ac_exeext'
14232   { (eval echo "$as_me:14232: \"$ac_try\"") >&5
14233   (eval $ac_try) 2>&5
14234   ac_status=$?
14235   echo "$as_me:14235: \$? = $ac_status" >&5
14236   (exit $ac_status); }; }; then
14237
14238                         cf_cv_regex_hdrs=$cf_regex_hdr
14239                         break
14240
14241 else
14242   echo "$as_me: failed program was:" >&5
14243 cat conftest.$ac_ext >&5
14244 fi
14245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14246         done
14247         ;;
14248 esac
14249
14250 fi
14251 echo "$as_me:14251: result: $cf_cv_regex_hdrs" >&5
14252 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14253
14254 case $cf_cv_regex_hdrs in #(vi
14255     no)        { echo "$as_me:14255: WARNING: no regular expression header found" >&5
14256 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14257     regex.h)   cat >>confdefs.h <<\EOF
14258 #define HAVE_REGEX_H_FUNCS 1
14259 EOF
14260  ;; #(vi
14261     regexp.h)  cat >>confdefs.h <<\EOF
14262 #define HAVE_REGEXP_H_FUNCS 1
14263 EOF
14264  ;; #(vi
14265     regexpr.h) cat >>confdefs.h <<\EOF
14266 #define HAVE_REGEXPR_H_FUNCS 1
14267 EOF
14268  ;;
14269 esac
14270
14271 for ac_header in \
14272 fcntl.h \
14273 getopt.h \
14274 limits.h \
14275 locale.h \
14276 math.h \
14277 poll.h \
14278 sys/bsdtypes.h \
14279 sys/ioctl.h \
14280 sys/param.h \
14281 sys/poll.h \
14282 sys/select.h \
14283 sys/time.h \
14284 sys/times.h \
14285 ttyent.h \
14286 unistd.h \
14287 wctype.h \
14288
14289 do
14290 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14291 echo "$as_me:14291: checking for $ac_header" >&5
14292 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14293 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14294   echo $ECHO_N "(cached) $ECHO_C" >&6
14295 else
14296   cat >conftest.$ac_ext <<_ACEOF
14297 #line 14297 "configure"
14298 #include "confdefs.h"
14299 #include <$ac_header>
14300 _ACEOF
14301 if { (eval echo "$as_me:14301: \"$ac_cpp conftest.$ac_ext\"") >&5
14302   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14303   ac_status=$?
14304   egrep -v '^ *\+' conftest.er1 >conftest.err
14305   rm -f conftest.er1
14306   cat conftest.err >&5
14307   echo "$as_me:14307: \$? = $ac_status" >&5
14308   (exit $ac_status); } >/dev/null; then
14309   if test -s conftest.err; then
14310     ac_cpp_err=$ac_c_preproc_warn_flag
14311   else
14312     ac_cpp_err=
14313   fi
14314 else
14315   ac_cpp_err=yes
14316 fi
14317 if test -z "$ac_cpp_err"; then
14318   eval "$as_ac_Header=yes"
14319 else
14320   echo "$as_me: failed program was:" >&5
14321   cat conftest.$ac_ext >&5
14322   eval "$as_ac_Header=no"
14323 fi
14324 rm -f conftest.err conftest.$ac_ext
14325 fi
14326 echo "$as_me:14326: result: `eval echo '${'$as_ac_Header'}'`" >&5
14327 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14328 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14329   cat >>confdefs.h <<EOF
14330 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14331 EOF
14332
14333 fi
14334 done
14335
14336 for ac_header in unistd.h getopt.h
14337 do
14338 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14339 echo "$as_me:14339: checking for $ac_header" >&5
14340 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14341 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14342   echo $ECHO_N "(cached) $ECHO_C" >&6
14343 else
14344   cat >conftest.$ac_ext <<_ACEOF
14345 #line 14345 "configure"
14346 #include "confdefs.h"
14347 #include <$ac_header>
14348 _ACEOF
14349 if { (eval echo "$as_me:14349: \"$ac_cpp conftest.$ac_ext\"") >&5
14350   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14351   ac_status=$?
14352   egrep -v '^ *\+' conftest.er1 >conftest.err
14353   rm -f conftest.er1
14354   cat conftest.err >&5
14355   echo "$as_me:14355: \$? = $ac_status" >&5
14356   (exit $ac_status); } >/dev/null; then
14357   if test -s conftest.err; then
14358     ac_cpp_err=$ac_c_preproc_warn_flag
14359   else
14360     ac_cpp_err=
14361   fi
14362 else
14363   ac_cpp_err=yes
14364 fi
14365 if test -z "$ac_cpp_err"; then
14366   eval "$as_ac_Header=yes"
14367 else
14368   echo "$as_me: failed program was:" >&5
14369   cat conftest.$ac_ext >&5
14370   eval "$as_ac_Header=no"
14371 fi
14372 rm -f conftest.err conftest.$ac_ext
14373 fi
14374 echo "$as_me:14374: result: `eval echo '${'$as_ac_Header'}'`" >&5
14375 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14376 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14377   cat >>confdefs.h <<EOF
14378 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14379 EOF
14380
14381 fi
14382 done
14383
14384 echo "$as_me:14384: checking for header declaring getopt variables" >&5
14385 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14386 if test "${cf_cv_getopt_header+set}" = set; then
14387   echo $ECHO_N "(cached) $ECHO_C" >&6
14388 else
14389
14390 cf_cv_getopt_header=none
14391 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14392 do
14393 cat >conftest.$ac_ext <<_ACEOF
14394 #line 14394 "configure"
14395 #include "confdefs.h"
14396
14397 #include <$cf_header>
14398 int
14399 main ()
14400 {
14401 int x = optind; char *y = optarg
14402   ;
14403   return 0;
14404 }
14405 _ACEOF
14406 rm -f conftest.$ac_objext
14407 if { (eval echo "$as_me:14407: \"$ac_compile\"") >&5
14408   (eval $ac_compile) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit $ac_status); } &&
14412          { ac_try='test -s conftest.$ac_objext'
14413   { (eval echo "$as_me:14413: \"$ac_try\"") >&5
14414   (eval $ac_try) 2>&5
14415   ac_status=$?
14416   echo "$as_me:14416: \$? = $ac_status" >&5
14417   (exit $ac_status); }; }; then
14418   cf_cv_getopt_header=$cf_header
14419  break
14420 else
14421   echo "$as_me: failed program was:" >&5
14422 cat conftest.$ac_ext >&5
14423 fi
14424 rm -f conftest.$ac_objext conftest.$ac_ext
14425 done
14426
14427 fi
14428 echo "$as_me:14428: result: $cf_cv_getopt_header" >&5
14429 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14430 if test $cf_cv_getopt_header != none ; then
14431         cat >>confdefs.h <<\EOF
14432 #define HAVE_GETOPT_HEADER 1
14433 EOF
14434
14435 fi
14436
14437 # check for ISC (this may also define _POSIX_SOURCE)
14438 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14439 if test "$ISC" = yes ; then
14440
14441 echo "$as_me:14441: checking for main in -lcposix" >&5
14442 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14443 if test "${ac_cv_lib_cposix_main+set}" = set; then
14444   echo $ECHO_N "(cached) $ECHO_C" >&6
14445 else
14446   ac_check_lib_save_LIBS=$LIBS
14447 LIBS="-lcposix  $LIBS"
14448 cat >conftest.$ac_ext <<_ACEOF
14449 #line 14449 "configure"
14450 #include "confdefs.h"
14451
14452 int
14453 main ()
14454 {
14455 main ();
14456   ;
14457   return 0;
14458 }
14459 _ACEOF
14460 rm -f conftest.$ac_objext conftest$ac_exeext
14461 if { (eval echo "$as_me:14461: \"$ac_link\"") >&5
14462   (eval $ac_link) 2>&5
14463   ac_status=$?
14464   echo "$as_me:14464: \$? = $ac_status" >&5
14465   (exit $ac_status); } &&
14466          { ac_try='test -s conftest$ac_exeext'
14467   { (eval echo "$as_me:14467: \"$ac_try\"") >&5
14468   (eval $ac_try) 2>&5
14469   ac_status=$?
14470   echo "$as_me:14470: \$? = $ac_status" >&5
14471   (exit $ac_status); }; }; then
14472   ac_cv_lib_cposix_main=yes
14473 else
14474   echo "$as_me: failed program was:" >&5
14475 cat conftest.$ac_ext >&5
14476 ac_cv_lib_cposix_main=no
14477 fi
14478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14479 LIBS=$ac_check_lib_save_LIBS
14480 fi
14481 echo "$as_me:14481: result: $ac_cv_lib_cposix_main" >&5
14482 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14483 if test $ac_cv_lib_cposix_main = yes; then
14484   cat >>confdefs.h <<EOF
14485 #define HAVE_LIBCPOSIX 1
14486 EOF
14487
14488   LIBS="-lcposix $LIBS"
14489
14490 fi
14491
14492         echo "$as_me:14492: checking for bzero in -linet" >&5
14493 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14494 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14495   echo $ECHO_N "(cached) $ECHO_C" >&6
14496 else
14497   ac_check_lib_save_LIBS=$LIBS
14498 LIBS="-linet  $LIBS"
14499 cat >conftest.$ac_ext <<_ACEOF
14500 #line 14500 "configure"
14501 #include "confdefs.h"
14502
14503 /* Override any gcc2 internal prototype to avoid an error.  */
14504 #ifdef __cplusplus
14505 extern "C"
14506 #endif
14507 /* We use char because int might match the return type of a gcc2
14508    builtin and then its argument prototype would still apply.  */
14509 char bzero ();
14510 int
14511 main ()
14512 {
14513 bzero ();
14514   ;
14515   return 0;
14516 }
14517 _ACEOF
14518 rm -f conftest.$ac_objext conftest$ac_exeext
14519 if { (eval echo "$as_me:14519: \"$ac_link\"") >&5
14520   (eval $ac_link) 2>&5
14521   ac_status=$?
14522   echo "$as_me:14522: \$? = $ac_status" >&5
14523   (exit $ac_status); } &&
14524          { ac_try='test -s conftest$ac_exeext'
14525   { (eval echo "$as_me:14525: \"$ac_try\"") >&5
14526   (eval $ac_try) 2>&5
14527   ac_status=$?
14528   echo "$as_me:14528: \$? = $ac_status" >&5
14529   (exit $ac_status); }; }; then
14530   ac_cv_lib_inet_bzero=yes
14531 else
14532   echo "$as_me: failed program was:" >&5
14533 cat conftest.$ac_ext >&5
14534 ac_cv_lib_inet_bzero=no
14535 fi
14536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14537 LIBS=$ac_check_lib_save_LIBS
14538 fi
14539 echo "$as_me:14539: result: $ac_cv_lib_inet_bzero" >&5
14540 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14541 if test $ac_cv_lib_inet_bzero = yes; then
14542   LIBS="-linet $LIBS"
14543 fi
14544 fi
14545
14546 echo "$as_me:14546: checking if sys/time.h works with sys/select.h" >&5
14547 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14548 if test "${cf_cv_sys_time_select+set}" = set; then
14549   echo $ECHO_N "(cached) $ECHO_C" >&6
14550 else
14551
14552 cat >conftest.$ac_ext <<_ACEOF
14553 #line 14553 "configure"
14554 #include "confdefs.h"
14555
14556 #include <sys/types.h>
14557 #ifdef HAVE_SYS_TIME_H
14558 #include <sys/time.h>
14559 #endif
14560 #ifdef HAVE_SYS_SELECT_H
14561 #include <sys/select.h>
14562 #endif
14563
14564 int
14565 main ()
14566 {
14567
14568   ;
14569   return 0;
14570 }
14571 _ACEOF
14572 rm -f conftest.$ac_objext
14573 if { (eval echo "$as_me:14573: \"$ac_compile\"") >&5
14574   (eval $ac_compile) 2>&5
14575   ac_status=$?
14576   echo "$as_me:14576: \$? = $ac_status" >&5
14577   (exit $ac_status); } &&
14578          { ac_try='test -s conftest.$ac_objext'
14579   { (eval echo "$as_me:14579: \"$ac_try\"") >&5
14580   (eval $ac_try) 2>&5
14581   ac_status=$?
14582   echo "$as_me:14582: \$? = $ac_status" >&5
14583   (exit $ac_status); }; }; then
14584   cf_cv_sys_time_select=yes
14585 else
14586   echo "$as_me: failed program was:" >&5
14587 cat conftest.$ac_ext >&5
14588 cf_cv_sys_time_select=no
14589 fi
14590 rm -f conftest.$ac_objext conftest.$ac_ext
14591
14592 fi
14593
14594 echo "$as_me:14594: result: $cf_cv_sys_time_select" >&5
14595 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14596 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14597 #define HAVE_SYS_TIME_SELECT 1
14598 EOF
14599
14600 ###     checks for compiler characteristics
14601 ac_ext=c
14602 ac_cpp='$CPP $CPPFLAGS'
14603 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14604 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14605 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14606 ac_main_return=return
14607
14608 echo "$as_me:14608: checking for $CC option to accept ANSI C" >&5
14609 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14610 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14611   echo $ECHO_N "(cached) $ECHO_C" >&6
14612 else
14613   ac_cv_prog_cc_stdc=no
14614 ac_save_CC=$CC
14615 cat >conftest.$ac_ext <<_ACEOF
14616 #line 14616 "configure"
14617 #include "confdefs.h"
14618 #include <stdarg.h>
14619 #include <stdio.h>
14620 #include <sys/types.h>
14621 #include <sys/stat.h>
14622 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14623 struct buf { int x; };
14624 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14625 static char *e (p, i)
14626      char **p;
14627      int i;
14628 {
14629   return p[i];
14630 }
14631 static char *f (char * (*g) (char **, int), char **p, ...)
14632 {
14633   char *s;
14634   va_list v;
14635   va_start (v,p);
14636   s = g (p, va_arg (v,int));
14637   va_end (v);
14638   return s;
14639 }
14640 int test (int i, double x);
14641 struct s1 {int (*f) (int a);};
14642 struct s2 {int (*f) (double a);};
14643 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14644 int argc;
14645 char **argv;
14646 int
14647 main ()
14648 {
14649 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14650   ;
14651   return 0;
14652 }
14653 _ACEOF
14654 # Don't try gcc -ansi; that turns off useful extensions and
14655 # breaks some systems' header files.
14656 # AIX                   -qlanglvl=ansi
14657 # Ultrix and OSF/1      -std1
14658 # HP-UX 10.20 and later -Ae
14659 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14660 # SVR4                  -Xc -D__EXTENSIONS__
14661 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14662 do
14663   CC="$ac_save_CC $ac_arg"
14664   rm -f conftest.$ac_objext
14665 if { (eval echo "$as_me:14665: \"$ac_compile\"") >&5
14666   (eval $ac_compile) 2>&5
14667   ac_status=$?
14668   echo "$as_me:14668: \$? = $ac_status" >&5
14669   (exit $ac_status); } &&
14670          { ac_try='test -s conftest.$ac_objext'
14671   { (eval echo "$as_me:14671: \"$ac_try\"") >&5
14672   (eval $ac_try) 2>&5
14673   ac_status=$?
14674   echo "$as_me:14674: \$? = $ac_status" >&5
14675   (exit $ac_status); }; }; then
14676   ac_cv_prog_cc_stdc=$ac_arg
14677 break
14678 else
14679   echo "$as_me: failed program was:" >&5
14680 cat conftest.$ac_ext >&5
14681 fi
14682 rm -f conftest.$ac_objext
14683 done
14684 rm -f conftest.$ac_ext conftest.$ac_objext
14685 CC=$ac_save_CC
14686
14687 fi
14688
14689 case "x$ac_cv_prog_cc_stdc" in
14690   x|xno)
14691     echo "$as_me:14691: result: none needed" >&5
14692 echo "${ECHO_T}none needed" >&6 ;;
14693   *)
14694     echo "$as_me:14694: result: $ac_cv_prog_cc_stdc" >&5
14695 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14696     CC="$CC $ac_cv_prog_cc_stdc" ;;
14697 esac
14698
14699 echo "$as_me:14699: checking for an ANSI C-conforming const" >&5
14700 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14701 if test "${ac_cv_c_const+set}" = set; then
14702   echo $ECHO_N "(cached) $ECHO_C" >&6
14703 else
14704   cat >conftest.$ac_ext <<_ACEOF
14705 #line 14705 "configure"
14706 #include "confdefs.h"
14707
14708 int
14709 main ()
14710 {
14711 /* FIXME: Include the comments suggested by Paul. */
14712 #ifndef __cplusplus
14713   /* Ultrix mips cc rejects this.  */
14714   typedef int charset[2];
14715   const charset x;
14716   /* SunOS 4.1.1 cc rejects this.  */
14717   char const *const *ccp;
14718   char **p;
14719   /* NEC SVR4.0.2 mips cc rejects this.  */
14720   struct point {int x, y;};
14721   static struct point const zero = {0,0};
14722   /* AIX XL C 1.02.0.0 rejects this.
14723      It does not let you subtract one const X* pointer from another in
14724      an arm of an if-expression whose if-part is not a constant
14725      expression */
14726   const char *g = "string";
14727   ccp = &g + (g ? g-g : 0);
14728   /* HPUX 7.0 cc rejects these. */
14729   ++ccp;
14730   p = (char**) ccp;
14731   ccp = (char const *const *) p;
14732   { /* SCO 3.2v4 cc rejects this.  */
14733     char *t;
14734     char const *s = 0 ? (char *) 0 : (char const *) 0;
14735
14736     *t++ = 0;
14737   }
14738   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14739     int x[] = {25, 17};
14740     const int *foo = &x[0];
14741     ++foo;
14742   }
14743   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14744     typedef const int *iptr;
14745     iptr p = 0;
14746     ++p;
14747   }
14748   { /* AIX XL C 1.02.0.0 rejects this saying
14749        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14750     struct s { int j; const int *ap[3]; };
14751     struct s *b; b->j = 5;
14752   }
14753   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14754     const int foo = 10;
14755   }
14756 #endif
14757
14758   ;
14759   return 0;
14760 }
14761 _ACEOF
14762 rm -f conftest.$ac_objext
14763 if { (eval echo "$as_me:14763: \"$ac_compile\"") >&5
14764   (eval $ac_compile) 2>&5
14765   ac_status=$?
14766   echo "$as_me:14766: \$? = $ac_status" >&5
14767   (exit $ac_status); } &&
14768          { ac_try='test -s conftest.$ac_objext'
14769   { (eval echo "$as_me:14769: \"$ac_try\"") >&5
14770   (eval $ac_try) 2>&5
14771   ac_status=$?
14772   echo "$as_me:14772: \$? = $ac_status" >&5
14773   (exit $ac_status); }; }; then
14774   ac_cv_c_const=yes
14775 else
14776   echo "$as_me: failed program was:" >&5
14777 cat conftest.$ac_ext >&5
14778 ac_cv_c_const=no
14779 fi
14780 rm -f conftest.$ac_objext conftest.$ac_ext
14781 fi
14782 echo "$as_me:14782: result: $ac_cv_c_const" >&5
14783 echo "${ECHO_T}$ac_cv_c_const" >&6
14784 if test $ac_cv_c_const = no; then
14785
14786 cat >>confdefs.h <<\EOF
14787 #define const
14788 EOF
14789
14790 fi
14791
14792 echo "$as_me:14792: checking for inline" >&5
14793 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14794 if test "${ac_cv_c_inline+set}" = set; then
14795   echo $ECHO_N "(cached) $ECHO_C" >&6
14796 else
14797   ac_cv_c_inline=no
14798 for ac_kw in inline __inline__ __inline; do
14799   cat >conftest.$ac_ext <<_ACEOF
14800 #line 14800 "configure"
14801 #include "confdefs.h"
14802 #ifndef __cplusplus
14803 static $ac_kw int static_foo () {return 0; }
14804 $ac_kw int foo () {return 0; }
14805 #endif
14806
14807 _ACEOF
14808 rm -f conftest.$ac_objext
14809 if { (eval echo "$as_me:14809: \"$ac_compile\"") >&5
14810   (eval $ac_compile) 2>&5
14811   ac_status=$?
14812   echo "$as_me:14812: \$? = $ac_status" >&5
14813   (exit $ac_status); } &&
14814          { ac_try='test -s conftest.$ac_objext'
14815   { (eval echo "$as_me:14815: \"$ac_try\"") >&5
14816   (eval $ac_try) 2>&5
14817   ac_status=$?
14818   echo "$as_me:14818: \$? = $ac_status" >&5
14819   (exit $ac_status); }; }; then
14820   ac_cv_c_inline=$ac_kw; break
14821 else
14822   echo "$as_me: failed program was:" >&5
14823 cat conftest.$ac_ext >&5
14824 fi
14825 rm -f conftest.$ac_objext conftest.$ac_ext
14826 done
14827
14828 fi
14829 echo "$as_me:14829: result: $ac_cv_c_inline" >&5
14830 echo "${ECHO_T}$ac_cv_c_inline" >&6
14831 case $ac_cv_c_inline in
14832   inline | yes) ;;
14833   no)
14834 cat >>confdefs.h <<\EOF
14835 #define inline
14836 EOF
14837  ;;
14838   *)  cat >>confdefs.h <<EOF
14839 #define inline $ac_cv_c_inline
14840 EOF
14841  ;;
14842 esac
14843
14844 NCURSES_INLINE=
14845 if test "$ac_cv_c_inline" != no ; then
14846   NCURSES_INLINE=inline
14847   if test "$INTEL_COMPILER" = yes
14848   then
14849     :
14850   elif test "$CLANG_COMPILER" = yes
14851   then
14852     :
14853   elif test "$GCC" = yes
14854   then
14855     echo "$as_me:14855: checking if $CC supports options to tune inlining" >&5
14856 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14857 if test "${cf_cv_gcc_inline+set}" = set; then
14858   echo $ECHO_N "(cached) $ECHO_C" >&6
14859 else
14860
14861       cf_save_CFLAGS=$CFLAGS
14862       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14863       cat >conftest.$ac_ext <<_ACEOF
14864 #line 14864 "configure"
14865 #include "confdefs.h"
14866 inline int foo(void) { return 1; }
14867 int
14868 main ()
14869 {
14870 ${cf_cv_main_return:-return} foo()
14871   ;
14872   return 0;
14873 }
14874 _ACEOF
14875 rm -f conftest.$ac_objext
14876 if { (eval echo "$as_me:14876: \"$ac_compile\"") >&5
14877   (eval $ac_compile) 2>&5
14878   ac_status=$?
14879   echo "$as_me:14879: \$? = $ac_status" >&5
14880   (exit $ac_status); } &&
14881          { ac_try='test -s conftest.$ac_objext'
14882   { (eval echo "$as_me:14882: \"$ac_try\"") >&5
14883   (eval $ac_try) 2>&5
14884   ac_status=$?
14885   echo "$as_me:14885: \$? = $ac_status" >&5
14886   (exit $ac_status); }; }; then
14887   cf_cv_gcc_inline=yes
14888 else
14889   echo "$as_me: failed program was:" >&5
14890 cat conftest.$ac_ext >&5
14891 cf_cv_gcc_inline=no
14892 fi
14893 rm -f conftest.$ac_objext conftest.$ac_ext
14894       CFLAGS=$cf_save_CFLAGS
14895
14896 fi
14897 echo "$as_me:14897: result: $cf_cv_gcc_inline" >&5
14898 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14899     if test "$cf_cv_gcc_inline" = yes ; then
14900
14901 cf_fix_cppflags=no
14902 cf_new_cflags=
14903 cf_new_cppflags=
14904 cf_new_extra_cppflags=
14905
14906 for cf_add_cflags in --param max-inline-insns-single=1200
14907 do
14908 case $cf_fix_cppflags in
14909 no)
14910         case $cf_add_cflags in #(vi
14911         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14912                 case $cf_add_cflags in
14913                 -D*)
14914                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14915
14916                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14917                                 && test -z "${cf_tst_cflags}" \
14918                                 && cf_fix_cppflags=yes
14919
14920                         if test $cf_fix_cppflags = yes ; then
14921                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14922                                 continue
14923                         elif test "${cf_tst_cflags}" = "\"'" ; then
14924                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14925                                 continue
14926                         fi
14927                         ;;
14928                 esac
14929                 case "$CPPFLAGS" in
14930                 *$cf_add_cflags) #(vi
14931                         ;;
14932                 *) #(vi
14933                         case $cf_add_cflags in #(vi
14934                         -D*)
14935                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14936
14937 CPPFLAGS=`echo "$CPPFLAGS" | \
14938         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14939                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14940
14941                                 ;;
14942                         esac
14943                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14944                         ;;
14945                 esac
14946                 ;;
14947         *)
14948                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14949                 ;;
14950         esac
14951         ;;
14952 yes)
14953         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14954
14955         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14956
14957         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14958                 && test -z "${cf_tst_cflags}" \
14959                 && cf_fix_cppflags=no
14960         ;;
14961 esac
14962 done
14963
14964 if test -n "$cf_new_cflags" ; then
14965
14966         CFLAGS="$CFLAGS $cf_new_cflags"
14967 fi
14968
14969 if test -n "$cf_new_cppflags" ; then
14970
14971         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14972 fi
14973
14974 if test -n "$cf_new_extra_cppflags" ; then
14975
14976         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14977 fi
14978
14979     fi
14980   fi
14981 fi
14982
14983 echo "$as_me:14983: checking for signal global datatype" >&5
14984 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14985 if test "${cf_cv_sig_atomic_t+set}" = set; then
14986   echo $ECHO_N "(cached) $ECHO_C" >&6
14987 else
14988
14989         for cf_type in \
14990                 "volatile sig_atomic_t" \
14991                 "sig_atomic_t" \
14992                 "int"
14993         do
14994         cat >conftest.$ac_ext <<_ACEOF
14995 #line 14995 "configure"
14996 #include "confdefs.h"
14997
14998 #include <sys/types.h>
14999 #include <signal.h>
15000 #include <stdio.h>
15001
15002 extern $cf_type x;
15003 $cf_type x;
15004 static void handler(int sig)
15005 {
15006         x = 5;
15007 }
15008 int
15009 main ()
15010 {
15011 signal(SIGINT, handler);
15012                  x = 1
15013   ;
15014   return 0;
15015 }
15016 _ACEOF
15017 rm -f conftest.$ac_objext
15018 if { (eval echo "$as_me:15018: \"$ac_compile\"") >&5
15019   (eval $ac_compile) 2>&5
15020   ac_status=$?
15021   echo "$as_me:15021: \$? = $ac_status" >&5
15022   (exit $ac_status); } &&
15023          { ac_try='test -s conftest.$ac_objext'
15024   { (eval echo "$as_me:15024: \"$ac_try\"") >&5
15025   (eval $ac_try) 2>&5
15026   ac_status=$?
15027   echo "$as_me:15027: \$? = $ac_status" >&5
15028   (exit $ac_status); }; }; then
15029   cf_cv_sig_atomic_t=$cf_type
15030 else
15031   echo "$as_me: failed program was:" >&5
15032 cat conftest.$ac_ext >&5
15033 cf_cv_sig_atomic_t=no
15034 fi
15035 rm -f conftest.$ac_objext conftest.$ac_ext
15036                 test "$cf_cv_sig_atomic_t" != no && break
15037         done
15038
15039 fi
15040
15041 echo "$as_me:15041: result: $cf_cv_sig_atomic_t" >&5
15042 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15043 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
15044 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15045 EOF
15046
15047 if test $NCURSES_CHTYPE = auto ; then
15048
15049 echo "$as_me:15049: checking for type of chtype" >&5
15050 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15051 if test "${cf_cv_typeof_chtype+set}" = set; then
15052   echo $ECHO_N "(cached) $ECHO_C" >&6
15053 else
15054
15055                 if test "$cross_compiling" = yes; then
15056   cf_cv_typeof_chtype=long
15057 else
15058   cat >conftest.$ac_ext <<_ACEOF
15059 #line 15059 "configure"
15060 #include "confdefs.h"
15061
15062 #define WANT_BITS 31
15063 #include <stdio.h>
15064 int main()
15065 {
15066         FILE *fp = fopen("cf_test.out", "w");
15067         if (fp != 0) {
15068                 char *result = "long";
15069                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15070                         int n;
15071                         unsigned int x, y;
15072                         for (n = 0; n < WANT_BITS; n++) {
15073                                 x = (1 << n);
15074                                 y = (x >> n);
15075                                 if (y != 1 || x == 0) {
15076                                         x = 0;
15077                                         break;
15078                                 }
15079                         }
15080                         /*
15081                          * If x is nonzero, an int is big enough for the bits
15082                          * that we want.
15083                          */
15084                         result = (x != 0) ? "int" : "long";
15085                 }
15086                 fputs(result, fp);
15087                 fclose(fp);
15088         }
15089         ${cf_cv_main_return:-return}(0);
15090 }
15091
15092 _ACEOF
15093 rm -f conftest$ac_exeext
15094 if { (eval echo "$as_me:15094: \"$ac_link\"") >&5
15095   (eval $ac_link) 2>&5
15096   ac_status=$?
15097   echo "$as_me:15097: \$? = $ac_status" >&5
15098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15099   { (eval echo "$as_me:15099: \"$ac_try\"") >&5
15100   (eval $ac_try) 2>&5
15101   ac_status=$?
15102   echo "$as_me:15102: \$? = $ac_status" >&5
15103   (exit $ac_status); }; }; then
15104   cf_cv_typeof_chtype=`cat cf_test.out`
15105 else
15106   echo "$as_me: program exited with status $ac_status" >&5
15107 echo "$as_me: failed program was:" >&5
15108 cat conftest.$ac_ext >&5
15109 cf_cv_typeof_chtype=long
15110 fi
15111 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15112 fi
15113                 rm -f cf_test.out
15114
15115 fi
15116
15117 echo "$as_me:15117: result: $cf_cv_typeof_chtype" >&5
15118 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15119
15120 cat >>confdefs.h <<EOF
15121 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15122 EOF
15123
15124 else
15125         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15126 fi
15127 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15128
15129 echo "$as_me:15129: checking if unsigned literals are legal" >&5
15130 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15131 if test "${cf_cv_unsigned_literals+set}" = set; then
15132   echo $ECHO_N "(cached) $ECHO_C" >&6
15133 else
15134
15135         cat >conftest.$ac_ext <<_ACEOF
15136 #line 15136 "configure"
15137 #include "confdefs.h"
15138
15139 int
15140 main ()
15141 {
15142 long x = 1L + 1UL + 1U + 1
15143   ;
15144   return 0;
15145 }
15146 _ACEOF
15147 rm -f conftest.$ac_objext
15148 if { (eval echo "$as_me:15148: \"$ac_compile\"") >&5
15149   (eval $ac_compile) 2>&5
15150   ac_status=$?
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit $ac_status); } &&
15153          { ac_try='test -s conftest.$ac_objext'
15154   { (eval echo "$as_me:15154: \"$ac_try\"") >&5
15155   (eval $ac_try) 2>&5
15156   ac_status=$?
15157   echo "$as_me:15157: \$? = $ac_status" >&5
15158   (exit $ac_status); }; }; then
15159   cf_cv_unsigned_literals=yes
15160 else
15161   echo "$as_me: failed program was:" >&5
15162 cat conftest.$ac_ext >&5
15163 cf_cv_unsigned_literals=no
15164 fi
15165 rm -f conftest.$ac_objext conftest.$ac_ext
15166
15167 fi
15168
15169 echo "$as_me:15169: result: $cf_cv_unsigned_literals" >&5
15170 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15171
15172 cf_cv_1UL="1"
15173 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15174 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15175
15176 if test $NCURSES_MMASK_T = auto ; then
15177         cf_cv_typeof_mmask_t=long
15178 else
15179         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15180 fi
15181 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15182
15183 ###     Checks for external-data
15184
15185 echo "$as_me:15185: checking if external errno is declared" >&5
15186 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15187 if test "${cf_cv_dcl_errno+set}" = set; then
15188   echo $ECHO_N "(cached) $ECHO_C" >&6
15189 else
15190
15191     cat >conftest.$ac_ext <<_ACEOF
15192 #line 15192 "configure"
15193 #include "confdefs.h"
15194
15195 #ifdef HAVE_STDLIB_H
15196 #include <stdlib.h>
15197 #endif
15198 #include <stdio.h>
15199 #include <sys/types.h>
15200 #include <errno.h>
15201 int
15202 main ()
15203 {
15204 int x = (int) errno
15205   ;
15206   return 0;
15207 }
15208 _ACEOF
15209 rm -f conftest.$ac_objext
15210 if { (eval echo "$as_me:15210: \"$ac_compile\"") >&5
15211   (eval $ac_compile) 2>&5
15212   ac_status=$?
15213   echo "$as_me:15213: \$? = $ac_status" >&5
15214   (exit $ac_status); } &&
15215          { ac_try='test -s conftest.$ac_objext'
15216   { (eval echo "$as_me:15216: \"$ac_try\"") >&5
15217   (eval $ac_try) 2>&5
15218   ac_status=$?
15219   echo "$as_me:15219: \$? = $ac_status" >&5
15220   (exit $ac_status); }; }; then
15221   cf_cv_dcl_errno=yes
15222 else
15223   echo "$as_me: failed program was:" >&5
15224 cat conftest.$ac_ext >&5
15225 cf_cv_dcl_errno=no
15226 fi
15227 rm -f conftest.$ac_objext conftest.$ac_ext
15228
15229 fi
15230 echo "$as_me:15230: result: $cf_cv_dcl_errno" >&5
15231 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15232
15233 if test "$cf_cv_dcl_errno" = no ; then
15234
15235 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15236
15237     cat >>confdefs.h <<EOF
15238 #define $cf_result 1
15239 EOF
15240
15241 fi
15242
15243 # It's possible (for near-UNIX clones) that the data doesn't exist
15244
15245 echo "$as_me:15245: checking if external errno exists" >&5
15246 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15247 if test "${cf_cv_have_errno+set}" = set; then
15248   echo $ECHO_N "(cached) $ECHO_C" >&6
15249 else
15250
15251     cat >conftest.$ac_ext <<_ACEOF
15252 #line 15252 "configure"
15253 #include "confdefs.h"
15254
15255 #undef errno
15256 extern int errno;
15257
15258 int
15259 main ()
15260 {
15261 errno = 2
15262   ;
15263   return 0;
15264 }
15265 _ACEOF
15266 rm -f conftest.$ac_objext conftest$ac_exeext
15267 if { (eval echo "$as_me:15267: \"$ac_link\"") >&5
15268   (eval $ac_link) 2>&5
15269   ac_status=$?
15270   echo "$as_me:15270: \$? = $ac_status" >&5
15271   (exit $ac_status); } &&
15272          { ac_try='test -s conftest$ac_exeext'
15273   { (eval echo "$as_me:15273: \"$ac_try\"") >&5
15274   (eval $ac_try) 2>&5
15275   ac_status=$?
15276   echo "$as_me:15276: \$? = $ac_status" >&5
15277   (exit $ac_status); }; }; then
15278   cf_cv_have_errno=yes
15279 else
15280   echo "$as_me: failed program was:" >&5
15281 cat conftest.$ac_ext >&5
15282 cf_cv_have_errno=no
15283 fi
15284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15285
15286 fi
15287 echo "$as_me:15287: result: $cf_cv_have_errno" >&5
15288 echo "${ECHO_T}$cf_cv_have_errno" >&6
15289
15290 if test "$cf_cv_have_errno" = yes ; then
15291
15292 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15293
15294     cat >>confdefs.h <<EOF
15295 #define $cf_result 1
15296 EOF
15297
15298 fi
15299
15300 echo "$as_me:15300: checking if data-only library module links" >&5
15301 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15302 if test "${cf_cv_link_dataonly+set}" = set; then
15303   echo $ECHO_N "(cached) $ECHO_C" >&6
15304 else
15305
15306         rm -f conftest.a
15307         cat >conftest.$ac_ext <<EOF
15308 #line 15308 "configure"
15309 int     testdata[3] = { 123, 456, 789 };
15310 EOF
15311         if { (eval echo "$as_me:15311: \"$ac_compile\"") >&5
15312   (eval $ac_compile) 2>&5
15313   ac_status=$?
15314   echo "$as_me:15314: \$? = $ac_status" >&5
15315   (exit $ac_status); } ; then
15316                 mv conftest.o data.o && \
15317                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15318         fi
15319         rm -f conftest.$ac_ext data.o
15320         cat >conftest.$ac_ext <<EOF
15321 #line 15321 "configure"
15322 int     testfunc()
15323 {
15324 #if defined(NeXT)
15325         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15326 #else
15327         extern int testdata[3];
15328         return testdata[0] == 123
15329            &&  testdata[1] == 456
15330            &&  testdata[2] == 789;
15331 #endif
15332 }
15333 EOF
15334         if { (eval echo "$as_me:15334: \"$ac_compile\"") >&5
15335   (eval $ac_compile) 2>&5
15336   ac_status=$?
15337   echo "$as_me:15337: \$? = $ac_status" >&5
15338   (exit $ac_status); }; then
15339                 mv conftest.o func.o && \
15340                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15341         fi
15342         rm -f conftest.$ac_ext func.o
15343         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15344         cf_saveLIBS="$LIBS"
15345         LIBS="conftest.a $LIBS"
15346         if test "$cross_compiling" = yes; then
15347   cf_cv_link_dataonly=unknown
15348 else
15349   cat >conftest.$ac_ext <<_ACEOF
15350 #line 15350 "configure"
15351 #include "confdefs.h"
15352
15353         int main()
15354         {
15355                 extern int testfunc();
15356                 ${cf_cv_main_return:-return} (!testfunc());
15357         }
15358
15359 _ACEOF
15360 rm -f conftest$ac_exeext
15361 if { (eval echo "$as_me:15361: \"$ac_link\"") >&5
15362   (eval $ac_link) 2>&5
15363   ac_status=$?
15364   echo "$as_me:15364: \$? = $ac_status" >&5
15365   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15366   { (eval echo "$as_me:15366: \"$ac_try\"") >&5
15367   (eval $ac_try) 2>&5
15368   ac_status=$?
15369   echo "$as_me:15369: \$? = $ac_status" >&5
15370   (exit $ac_status); }; }; then
15371   cf_cv_link_dataonly=yes
15372 else
15373   echo "$as_me: program exited with status $ac_status" >&5
15374 echo "$as_me: failed program was:" >&5
15375 cat conftest.$ac_ext >&5
15376 cf_cv_link_dataonly=no
15377 fi
15378 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15379 fi
15380         LIBS="$cf_saveLIBS"
15381
15382 fi
15383
15384 echo "$as_me:15384: result: $cf_cv_link_dataonly" >&5
15385 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15386
15387 if test "$cf_cv_link_dataonly" = no ; then
15388         cat >>confdefs.h <<\EOF
15389 #define BROKEN_LINKER 1
15390 EOF
15391
15392         BROKEN_LINKER=1
15393 fi
15394
15395 ###     Checks for library functions.
15396
15397 for ac_func in \
15398 getcwd \
15399 getegid \
15400 geteuid \
15401 getttynam \
15402 issetugid \
15403 poll \
15404 putenv \
15405 remove \
15406 select \
15407 setbuf \
15408 setbuffer \
15409 setenv \
15410 setvbuf \
15411 sigaction \
15412 sigvec \
15413 strdup \
15414 strstr \
15415 tcgetpgrp \
15416 times \
15417 vsnprintf \
15418
15419 do
15420 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15421 echo "$as_me:15421: checking for $ac_func" >&5
15422 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15423 if eval "test \"\${$as_ac_var+set}\" = set"; then
15424   echo $ECHO_N "(cached) $ECHO_C" >&6
15425 else
15426   cat >conftest.$ac_ext <<_ACEOF
15427 #line 15427 "configure"
15428 #include "confdefs.h"
15429 /* System header to define __stub macros and hopefully few prototypes,
15430     which can conflict with char $ac_func (); below.  */
15431 #include <assert.h>
15432 /* Override any gcc2 internal prototype to avoid an error.  */
15433 #ifdef __cplusplus
15434 extern "C"
15435 #endif
15436 /* We use char because int might match the return type of a gcc2
15437    builtin and then its argument prototype would still apply.  */
15438 char $ac_func ();
15439 char (*f) ();
15440
15441 int
15442 main ()
15443 {
15444 /* The GNU C library defines this for functions which it implements
15445     to always fail with ENOSYS.  Some functions are actually named
15446     something starting with __ and the normal name is an alias.  */
15447 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15448 choke me
15449 #else
15450 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15451 #endif
15452
15453   ;
15454   return 0;
15455 }
15456 _ACEOF
15457 rm -f conftest.$ac_objext conftest$ac_exeext
15458 if { (eval echo "$as_me:15458: \"$ac_link\"") >&5
15459   (eval $ac_link) 2>&5
15460   ac_status=$?
15461   echo "$as_me:15461: \$? = $ac_status" >&5
15462   (exit $ac_status); } &&
15463          { ac_try='test -s conftest$ac_exeext'
15464   { (eval echo "$as_me:15464: \"$ac_try\"") >&5
15465   (eval $ac_try) 2>&5
15466   ac_status=$?
15467   echo "$as_me:15467: \$? = $ac_status" >&5
15468   (exit $ac_status); }; }; then
15469   eval "$as_ac_var=yes"
15470 else
15471   echo "$as_me: failed program was:" >&5
15472 cat conftest.$ac_ext >&5
15473 eval "$as_ac_var=no"
15474 fi
15475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15476 fi
15477 echo "$as_me:15477: result: `eval echo '${'$as_ac_var'}'`" >&5
15478 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15479 if test `eval echo '${'$as_ac_var'}'` = yes; then
15480   cat >>confdefs.h <<EOF
15481 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15482 EOF
15483
15484 fi
15485 done
15486
15487 if test "$with_getcap" = "yes" ; then
15488
15489 echo "$as_me:15489: checking for terminal-capability database functions" >&5
15490 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15491 if test "${cf_cv_cgetent+set}" = set; then
15492   echo $ECHO_N "(cached) $ECHO_C" >&6
15493 else
15494
15495 cat >conftest.$ac_ext <<_ACEOF
15496 #line 15496 "configure"
15497 #include "confdefs.h"
15498
15499 #include <stdlib.h>
15500 int
15501 main ()
15502 {
15503
15504         char temp[128];
15505         char *buf = temp;
15506         char *db_array = temp;
15507         cgetent(&buf, &db_array, "vt100");
15508         cgetcap(buf, "tc", '=');
15509         cgetmatch(buf, "tc");
15510
15511   ;
15512   return 0;
15513 }
15514 _ACEOF
15515 rm -f conftest.$ac_objext conftest$ac_exeext
15516 if { (eval echo "$as_me:15516: \"$ac_link\"") >&5
15517   (eval $ac_link) 2>&5
15518   ac_status=$?
15519   echo "$as_me:15519: \$? = $ac_status" >&5
15520   (exit $ac_status); } &&
15521          { ac_try='test -s conftest$ac_exeext'
15522   { (eval echo "$as_me:15522: \"$ac_try\"") >&5
15523   (eval $ac_try) 2>&5
15524   ac_status=$?
15525   echo "$as_me:15525: \$? = $ac_status" >&5
15526   (exit $ac_status); }; }; then
15527   cf_cv_cgetent=yes
15528 else
15529   echo "$as_me: failed program was:" >&5
15530 cat conftest.$ac_ext >&5
15531 cf_cv_cgetent=no
15532 fi
15533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15534
15535 fi
15536 echo "$as_me:15536: result: $cf_cv_cgetent" >&5
15537 echo "${ECHO_T}$cf_cv_cgetent" >&6
15538
15539 if test "$cf_cv_cgetent" = yes
15540 then
15541         cat >>confdefs.h <<\EOF
15542 #define HAVE_BSD_CGETENT 1
15543 EOF
15544
15545 echo "$as_me:15545: checking if cgetent uses const parameter" >&5
15546 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15547 if test "${cf_cv_cgetent_const+set}" = set; then
15548   echo $ECHO_N "(cached) $ECHO_C" >&6
15549 else
15550
15551 cat >conftest.$ac_ext <<_ACEOF
15552 #line 15552 "configure"
15553 #include "confdefs.h"
15554
15555 #include <stdlib.h>
15556 int
15557 main ()
15558 {
15559
15560         char temp[128];
15561         char *buf = temp;
15562 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15563         const char *db_array = temp;
15564         cgetent(&buf, &db_array, "vt100");
15565 #endif
15566         cgetcap(buf, "tc", '=');
15567         cgetmatch(buf, "tc");
15568
15569   ;
15570   return 0;
15571 }
15572 _ACEOF
15573 rm -f conftest.$ac_objext conftest$ac_exeext
15574 if { (eval echo "$as_me:15574: \"$ac_link\"") >&5
15575   (eval $ac_link) 2>&5
15576   ac_status=$?
15577   echo "$as_me:15577: \$? = $ac_status" >&5
15578   (exit $ac_status); } &&
15579          { ac_try='test -s conftest$ac_exeext'
15580   { (eval echo "$as_me:15580: \"$ac_try\"") >&5
15581   (eval $ac_try) 2>&5
15582   ac_status=$?
15583   echo "$as_me:15583: \$? = $ac_status" >&5
15584   (exit $ac_status); }; }; then
15585   cf_cv_cgetent_const=yes
15586 else
15587   echo "$as_me: failed program was:" >&5
15588 cat conftest.$ac_ext >&5
15589 cf_cv_cgetent_const=no
15590 fi
15591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15592
15593 fi
15594 echo "$as_me:15594: result: $cf_cv_cgetent_const" >&5
15595 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15596         if test "$cf_cv_cgetent_const" = yes
15597         then
15598                 cat >>confdefs.h <<EOF
15599 #define CGETENT_CONST const
15600 EOF
15601
15602         fi
15603 fi
15604
15605 fi
15606
15607 echo "$as_me:15607: checking for isascii" >&5
15608 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15609 if test "${cf_cv_have_isascii+set}" = set; then
15610   echo $ECHO_N "(cached) $ECHO_C" >&6
15611 else
15612
15613         cat >conftest.$ac_ext <<_ACEOF
15614 #line 15614 "configure"
15615 #include "confdefs.h"
15616 #include <ctype.h>
15617 int
15618 main ()
15619 {
15620 int x = isascii(' ')
15621   ;
15622   return 0;
15623 }
15624 _ACEOF
15625 rm -f conftest.$ac_objext conftest$ac_exeext
15626 if { (eval echo "$as_me:15626: \"$ac_link\"") >&5
15627   (eval $ac_link) 2>&5
15628   ac_status=$?
15629   echo "$as_me:15629: \$? = $ac_status" >&5
15630   (exit $ac_status); } &&
15631          { ac_try='test -s conftest$ac_exeext'
15632   { (eval echo "$as_me:15632: \"$ac_try\"") >&5
15633   (eval $ac_try) 2>&5
15634   ac_status=$?
15635   echo "$as_me:15635: \$? = $ac_status" >&5
15636   (exit $ac_status); }; }; then
15637   cf_cv_have_isascii=yes
15638 else
15639   echo "$as_me: failed program was:" >&5
15640 cat conftest.$ac_ext >&5
15641 cf_cv_have_isascii=no
15642 fi
15643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15644
15645 fi
15646 echo "$as_me:15646: result: $cf_cv_have_isascii" >&5
15647 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15648 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15649 #define HAVE_ISASCII 1
15650 EOF
15651
15652 if test "$ac_cv_func_sigaction" = yes; then
15653 echo "$as_me:15653: checking whether sigaction needs _POSIX_SOURCE" >&5
15654 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15655 cat >conftest.$ac_ext <<_ACEOF
15656 #line 15656 "configure"
15657 #include "confdefs.h"
15658
15659 #include <sys/types.h>
15660 #include <signal.h>
15661 int
15662 main ()
15663 {
15664 struct sigaction act
15665   ;
15666   return 0;
15667 }
15668 _ACEOF
15669 rm -f conftest.$ac_objext
15670 if { (eval echo "$as_me:15670: \"$ac_compile\"") >&5
15671   (eval $ac_compile) 2>&5
15672   ac_status=$?
15673   echo "$as_me:15673: \$? = $ac_status" >&5
15674   (exit $ac_status); } &&
15675          { ac_try='test -s conftest.$ac_objext'
15676   { (eval echo "$as_me:15676: \"$ac_try\"") >&5
15677   (eval $ac_try) 2>&5
15678   ac_status=$?
15679   echo "$as_me:15679: \$? = $ac_status" >&5
15680   (exit $ac_status); }; }; then
15681   sigact_bad=no
15682 else
15683   echo "$as_me: failed program was:" >&5
15684 cat conftest.$ac_ext >&5
15685
15686 cat >conftest.$ac_ext <<_ACEOF
15687 #line 15687 "configure"
15688 #include "confdefs.h"
15689
15690 #define _POSIX_SOURCE
15691 #include <sys/types.h>
15692 #include <signal.h>
15693 int
15694 main ()
15695 {
15696 struct sigaction act
15697   ;
15698   return 0;
15699 }
15700 _ACEOF
15701 rm -f conftest.$ac_objext
15702 if { (eval echo "$as_me:15702: \"$ac_compile\"") >&5
15703   (eval $ac_compile) 2>&5
15704   ac_status=$?
15705   echo "$as_me:15705: \$? = $ac_status" >&5
15706   (exit $ac_status); } &&
15707          { ac_try='test -s conftest.$ac_objext'
15708   { (eval echo "$as_me:15708: \"$ac_try\"") >&5
15709   (eval $ac_try) 2>&5
15710   ac_status=$?
15711   echo "$as_me:15711: \$? = $ac_status" >&5
15712   (exit $ac_status); }; }; then
15713   sigact_bad=yes
15714          cat >>confdefs.h <<\EOF
15715 #define _POSIX_SOURCE 1
15716 EOF
15717
15718 else
15719   echo "$as_me: failed program was:" >&5
15720 cat conftest.$ac_ext >&5
15721 sigact_bad=unknown
15722 fi
15723 rm -f conftest.$ac_objext conftest.$ac_ext
15724 fi
15725 rm -f conftest.$ac_objext conftest.$ac_ext
15726 echo "$as_me:15726: result: $sigact_bad" >&5
15727 echo "${ECHO_T}$sigact_bad" >&6
15728 fi
15729
15730 echo "$as_me:15730: checking if nanosleep really works" >&5
15731 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15732 if test "${cf_cv_func_nanosleep+set}" = set; then
15733   echo $ECHO_N "(cached) $ECHO_C" >&6
15734 else
15735
15736 if test "$cross_compiling" = yes; then
15737   cf_cv_func_nanosleep=unknown
15738 else
15739   cat >conftest.$ac_ext <<_ACEOF
15740 #line 15740 "configure"
15741 #include "confdefs.h"
15742
15743 #include <stdio.h>
15744 #include <errno.h>
15745 #include <time.h>
15746
15747 #ifdef HAVE_SYS_TIME_H
15748 #include <sys/time.h>
15749 #endif
15750
15751 int main() {
15752         struct timespec ts1, ts2;
15753         int code;
15754         ts1.tv_sec  = 0;
15755         ts1.tv_nsec = 750000000;
15756         ts2.tv_sec  = 0;
15757         ts2.tv_nsec = 0;
15758         errno = 0;
15759         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15760         ${cf_cv_main_return:-return}(code != 0);
15761 }
15762
15763 _ACEOF
15764 rm -f conftest$ac_exeext
15765 if { (eval echo "$as_me:15765: \"$ac_link\"") >&5
15766   (eval $ac_link) 2>&5
15767   ac_status=$?
15768   echo "$as_me:15768: \$? = $ac_status" >&5
15769   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15770   { (eval echo "$as_me:15770: \"$ac_try\"") >&5
15771   (eval $ac_try) 2>&5
15772   ac_status=$?
15773   echo "$as_me:15773: \$? = $ac_status" >&5
15774   (exit $ac_status); }; }; then
15775   cf_cv_func_nanosleep=yes
15776 else
15777   echo "$as_me: program exited with status $ac_status" >&5
15778 echo "$as_me: failed program was:" >&5
15779 cat conftest.$ac_ext >&5
15780 cf_cv_func_nanosleep=no
15781 fi
15782 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15783 fi
15784 fi
15785 echo "$as_me:15785: result: $cf_cv_func_nanosleep" >&5
15786 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15787
15788 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15789 #define HAVE_NANOSLEEP 1
15790 EOF
15791
15792 for ac_header in \
15793 termio.h \
15794 termios.h \
15795 unistd.h \
15796
15797 do
15798 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15799 echo "$as_me:15799: checking for $ac_header" >&5
15800 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15801 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15802   echo $ECHO_N "(cached) $ECHO_C" >&6
15803 else
15804   cat >conftest.$ac_ext <<_ACEOF
15805 #line 15805 "configure"
15806 #include "confdefs.h"
15807 #include <$ac_header>
15808 _ACEOF
15809 if { (eval echo "$as_me:15809: \"$ac_cpp conftest.$ac_ext\"") >&5
15810   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15811   ac_status=$?
15812   egrep -v '^ *\+' conftest.er1 >conftest.err
15813   rm -f conftest.er1
15814   cat conftest.err >&5
15815   echo "$as_me:15815: \$? = $ac_status" >&5
15816   (exit $ac_status); } >/dev/null; then
15817   if test -s conftest.err; then
15818     ac_cpp_err=$ac_c_preproc_warn_flag
15819   else
15820     ac_cpp_err=
15821   fi
15822 else
15823   ac_cpp_err=yes
15824 fi
15825 if test -z "$ac_cpp_err"; then
15826   eval "$as_ac_Header=yes"
15827 else
15828   echo "$as_me: failed program was:" >&5
15829   cat conftest.$ac_ext >&5
15830   eval "$as_ac_Header=no"
15831 fi
15832 rm -f conftest.err conftest.$ac_ext
15833 fi
15834 echo "$as_me:15834: result: `eval echo '${'$as_ac_Header'}'`" >&5
15835 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15836 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15837   cat >>confdefs.h <<EOF
15838 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15839 EOF
15840
15841 fi
15842 done
15843
15844 if test "$ISC" = yes ; then
15845
15846 for ac_header in sys/termio.h
15847 do
15848 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15849 echo "$as_me:15849: checking for $ac_header" >&5
15850 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15851 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15852   echo $ECHO_N "(cached) $ECHO_C" >&6
15853 else
15854   cat >conftest.$ac_ext <<_ACEOF
15855 #line 15855 "configure"
15856 #include "confdefs.h"
15857 #include <$ac_header>
15858 _ACEOF
15859 if { (eval echo "$as_me:15859: \"$ac_cpp conftest.$ac_ext\"") >&5
15860   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15861   ac_status=$?
15862   egrep -v '^ *\+' conftest.er1 >conftest.err
15863   rm -f conftest.er1
15864   cat conftest.err >&5
15865   echo "$as_me:15865: \$? = $ac_status" >&5
15866   (exit $ac_status); } >/dev/null; then
15867   if test -s conftest.err; then
15868     ac_cpp_err=$ac_c_preproc_warn_flag
15869   else
15870     ac_cpp_err=
15871   fi
15872 else
15873   ac_cpp_err=yes
15874 fi
15875 if test -z "$ac_cpp_err"; then
15876   eval "$as_ac_Header=yes"
15877 else
15878   echo "$as_me: failed program was:" >&5
15879   cat conftest.$ac_ext >&5
15880   eval "$as_ac_Header=no"
15881 fi
15882 rm -f conftest.err conftest.$ac_ext
15883 fi
15884 echo "$as_me:15884: result: `eval echo '${'$as_ac_Header'}'`" >&5
15885 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15886 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15887   cat >>confdefs.h <<EOF
15888 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15889 EOF
15890
15891 fi
15892 done
15893
15894 fi
15895 if test "$ac_cv_header_termios_h" = yes ; then
15896         case "$CFLAGS $CPPFLAGS" in
15897         *-D_POSIX_SOURCE*)
15898                 termios_bad=dunno ;;
15899         *)      termios_bad=maybe ;;
15900         esac
15901         if test "$termios_bad" = maybe ; then
15902         echo "$as_me:15902: checking whether termios.h needs _POSIX_SOURCE" >&5
15903 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15904         cat >conftest.$ac_ext <<_ACEOF
15905 #line 15905 "configure"
15906 #include "confdefs.h"
15907 #include <termios.h>
15908 int
15909 main ()
15910 {
15911 struct termios foo; int x = foo.c_iflag
15912   ;
15913   return 0;
15914 }
15915 _ACEOF
15916 rm -f conftest.$ac_objext
15917 if { (eval echo "$as_me:15917: \"$ac_compile\"") >&5
15918   (eval $ac_compile) 2>&5
15919   ac_status=$?
15920   echo "$as_me:15920: \$? = $ac_status" >&5
15921   (exit $ac_status); } &&
15922          { ac_try='test -s conftest.$ac_objext'
15923   { (eval echo "$as_me:15923: \"$ac_try\"") >&5
15924   (eval $ac_try) 2>&5
15925   ac_status=$?
15926   echo "$as_me:15926: \$? = $ac_status" >&5
15927   (exit $ac_status); }; }; then
15928   termios_bad=no
15929 else
15930   echo "$as_me: failed program was:" >&5
15931 cat conftest.$ac_ext >&5
15932
15933                 cat >conftest.$ac_ext <<_ACEOF
15934 #line 15934 "configure"
15935 #include "confdefs.h"
15936
15937 #define _POSIX_SOURCE
15938 #include <termios.h>
15939 int
15940 main ()
15941 {
15942 struct termios foo; int x = foo.c_iflag
15943   ;
15944   return 0;
15945 }
15946 _ACEOF
15947 rm -f conftest.$ac_objext
15948 if { (eval echo "$as_me:15948: \"$ac_compile\"") >&5
15949   (eval $ac_compile) 2>&5
15950   ac_status=$?
15951   echo "$as_me:15951: \$? = $ac_status" >&5
15952   (exit $ac_status); } &&
15953          { ac_try='test -s conftest.$ac_objext'
15954   { (eval echo "$as_me:15954: \"$ac_try\"") >&5
15955   (eval $ac_try) 2>&5
15956   ac_status=$?
15957   echo "$as_me:15957: \$? = $ac_status" >&5
15958   (exit $ac_status); }; }; then
15959   termios_bad=unknown
15960 else
15961   echo "$as_me: failed program was:" >&5
15962 cat conftest.$ac_ext >&5
15963 termios_bad=yes cat >>confdefs.h <<\EOF
15964 #define _POSIX_SOURCE 1
15965 EOF
15966
15967 fi
15968 rm -f conftest.$ac_objext conftest.$ac_ext
15969
15970 fi
15971 rm -f conftest.$ac_objext conftest.$ac_ext
15972         echo "$as_me:15972: result: $termios_bad" >&5
15973 echo "${ECHO_T}$termios_bad" >&6
15974         fi
15975 fi
15976
15977 echo "$as_me:15977: checking for tcgetattr" >&5
15978 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15979 if test "${cf_cv_have_tcgetattr+set}" = set; then
15980   echo $ECHO_N "(cached) $ECHO_C" >&6
15981 else
15982
15983 cat >conftest.$ac_ext <<_ACEOF
15984 #line 15984 "configure"
15985 #include "confdefs.h"
15986
15987 #include <sys/types.h>
15988 #ifdef HAVE_UNISTD_H
15989 #include <unistd.h>
15990 #endif
15991 #ifdef HAVE_TERMIOS_H
15992 #include <termios.h>
15993 #define TTY struct termios
15994 #else
15995 #ifdef HAVE_TERMIO_H
15996 #include <termio.h>
15997 #define TTY struct termio
15998 #endif
15999 #endif
16000
16001 int
16002 main ()
16003 {
16004
16005 TTY foo;
16006 tcgetattr(1, &foo);
16007   ;
16008   return 0;
16009 }
16010 _ACEOF
16011 rm -f conftest.$ac_objext conftest$ac_exeext
16012 if { (eval echo "$as_me:16012: \"$ac_link\"") >&5
16013   (eval $ac_link) 2>&5
16014   ac_status=$?
16015   echo "$as_me:16015: \$? = $ac_status" >&5
16016   (exit $ac_status); } &&
16017          { ac_try='test -s conftest$ac_exeext'
16018   { (eval echo "$as_me:16018: \"$ac_try\"") >&5
16019   (eval $ac_try) 2>&5
16020   ac_status=$?
16021   echo "$as_me:16021: \$? = $ac_status" >&5
16022   (exit $ac_status); }; }; then
16023   cf_cv_have_tcgetattr=yes
16024 else
16025   echo "$as_me: failed program was:" >&5
16026 cat conftest.$ac_ext >&5
16027 cf_cv_have_tcgetattr=no
16028 fi
16029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16030 fi
16031 echo "$as_me:16031: result: $cf_cv_have_tcgetattr" >&5
16032 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16033 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
16034 #define HAVE_TCGETATTR 1
16035 EOF
16036
16037 echo "$as_me:16037: checking for vsscanf function or workaround" >&5
16038 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16039 if test "${cf_cv_func_vsscanf+set}" = set; then
16040   echo $ECHO_N "(cached) $ECHO_C" >&6
16041 else
16042
16043 cat >conftest.$ac_ext <<_ACEOF
16044 #line 16044 "configure"
16045 #include "confdefs.h"
16046
16047 #include <stdarg.h>
16048 #include <stdio.h>
16049 int
16050 main ()
16051 {
16052
16053         va_list ap;
16054         vsscanf("from", "%d", ap)
16055   ;
16056   return 0;
16057 }
16058 _ACEOF
16059 rm -f conftest.$ac_objext conftest$ac_exeext
16060 if { (eval echo "$as_me:16060: \"$ac_link\"") >&5
16061   (eval $ac_link) 2>&5
16062   ac_status=$?
16063   echo "$as_me:16063: \$? = $ac_status" >&5
16064   (exit $ac_status); } &&
16065          { ac_try='test -s conftest$ac_exeext'
16066   { (eval echo "$as_me:16066: \"$ac_try\"") >&5
16067   (eval $ac_try) 2>&5
16068   ac_status=$?
16069   echo "$as_me:16069: \$? = $ac_status" >&5
16070   (exit $ac_status); }; }; then
16071   cf_cv_func_vsscanf=vsscanf
16072 else
16073   echo "$as_me: failed program was:" >&5
16074 cat conftest.$ac_ext >&5
16075
16076 cat >conftest.$ac_ext <<_ACEOF
16077 #line 16077 "configure"
16078 #include "confdefs.h"
16079
16080 #include <stdarg.h>
16081 #include <stdio.h>
16082 int
16083 main ()
16084 {
16085
16086     FILE strbuf;
16087     char *str = "from";
16088
16089     strbuf._flag = _IOREAD;
16090     strbuf._ptr = strbuf._base = (unsigned char *) str;
16091     strbuf._cnt = strlen(str);
16092     strbuf._file = _NFILE;
16093     return (vfscanf(&strbuf, "%d", ap))
16094   ;
16095   return 0;
16096 }
16097 _ACEOF
16098 rm -f conftest.$ac_objext conftest$ac_exeext
16099 if { (eval echo "$as_me:16099: \"$ac_link\"") >&5
16100   (eval $ac_link) 2>&5
16101   ac_status=$?
16102   echo "$as_me:16102: \$? = $ac_status" >&5
16103   (exit $ac_status); } &&
16104          { ac_try='test -s conftest$ac_exeext'
16105   { (eval echo "$as_me:16105: \"$ac_try\"") >&5
16106   (eval $ac_try) 2>&5
16107   ac_status=$?
16108   echo "$as_me:16108: \$? = $ac_status" >&5
16109   (exit $ac_status); }; }; then
16110   cf_cv_func_vsscanf=vfscanf
16111 else
16112   echo "$as_me: failed program was:" >&5
16113 cat conftest.$ac_ext >&5
16114
16115 cat >conftest.$ac_ext <<_ACEOF
16116 #line 16116 "configure"
16117 #include "confdefs.h"
16118
16119 #include <stdarg.h>
16120 #include <stdio.h>
16121 int
16122 main ()
16123 {
16124
16125     FILE strbuf;
16126     char *str = "from";
16127
16128     strbuf._flag = _IOREAD;
16129     strbuf._ptr = strbuf._base = (unsigned char *) str;
16130     strbuf._cnt = strlen(str);
16131     strbuf._file = _NFILE;
16132     return (_doscan(&strbuf, "%d", ap))
16133   ;
16134   return 0;
16135 }
16136 _ACEOF
16137 rm -f conftest.$ac_objext conftest$ac_exeext
16138 if { (eval echo "$as_me:16138: \"$ac_link\"") >&5
16139   (eval $ac_link) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); } &&
16143          { ac_try='test -s conftest$ac_exeext'
16144   { (eval echo "$as_me:16144: \"$ac_try\"") >&5
16145   (eval $ac_try) 2>&5
16146   ac_status=$?
16147   echo "$as_me:16147: \$? = $ac_status" >&5
16148   (exit $ac_status); }; }; then
16149   cf_cv_func_vsscanf=_doscan
16150 else
16151   echo "$as_me: failed program was:" >&5
16152 cat conftest.$ac_ext >&5
16153
16154 cf_cv_func_vsscanf=no
16155 fi
16156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16157 fi
16158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16159 fi
16160 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16161 fi
16162 echo "$as_me:16162: result: $cf_cv_func_vsscanf" >&5
16163 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16164
16165 case $cf_cv_func_vsscanf in #(vi
16166 vsscanf) cat >>confdefs.h <<\EOF
16167 #define HAVE_VSSCANF 1
16168 EOF
16169 ;; #(vi
16170 vfscanf) cat >>confdefs.h <<\EOF
16171 #define HAVE_VFSCANF 1
16172 EOF
16173 ;; #(vi
16174 _doscan) cat >>confdefs.h <<\EOF
16175 #define HAVE__DOSCAN 1
16176 EOF
16177 ;;
16178 esac
16179
16180 echo "$as_me:16180: checking for working mkstemp" >&5
16181 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16182 if test "${cf_cv_func_mkstemp+set}" = set; then
16183   echo $ECHO_N "(cached) $ECHO_C" >&6
16184 else
16185
16186 rm -rf conftest*
16187 if test "$cross_compiling" = yes; then
16188   cf_cv_func_mkstemp=maybe
16189 else
16190   cat >conftest.$ac_ext <<_ACEOF
16191 #line 16191 "configure"
16192 #include "confdefs.h"
16193
16194 #include <sys/types.h>
16195 #include <stdlib.h>
16196 #include <stdio.h>
16197 #include <string.h>
16198 #include <sys/stat.h>
16199 int main()
16200 {
16201         char *tmpl = "conftestXXXXXX";
16202         char name[2][80];
16203         int n;
16204         int result = 0;
16205         int fd;
16206         struct stat sb;
16207
16208         umask(077);
16209         for (n = 0; n < 2; ++n) {
16210                 strcpy(name[n], tmpl);
16211                 if ((fd = mkstemp(name[n])) >= 0) {
16212                         if (!strcmp(name[n], tmpl)
16213                          || stat(name[n], &sb) != 0
16214                          || (sb.st_mode & S_IFMT) != S_IFREG
16215                          || (sb.st_mode & 077) != 0) {
16216                                 result = 1;
16217                         }
16218                         close(fd);
16219                 }
16220         }
16221         if (result == 0
16222          && !strcmp(name[0], name[1]))
16223                 result = 1;
16224         ${cf_cv_main_return:-return}(result);
16225 }
16226
16227 _ACEOF
16228 rm -f conftest$ac_exeext
16229 if { (eval echo "$as_me:16229: \"$ac_link\"") >&5
16230   (eval $ac_link) 2>&5
16231   ac_status=$?
16232   echo "$as_me:16232: \$? = $ac_status" >&5
16233   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16234   { (eval echo "$as_me:16234: \"$ac_try\"") >&5
16235   (eval $ac_try) 2>&5
16236   ac_status=$?
16237   echo "$as_me:16237: \$? = $ac_status" >&5
16238   (exit $ac_status); }; }; then
16239   cf_cv_func_mkstemp=yes
16240
16241 else
16242   echo "$as_me: program exited with status $ac_status" >&5
16243 echo "$as_me: failed program was:" >&5
16244 cat conftest.$ac_ext >&5
16245 cf_cv_func_mkstemp=no
16246
16247 fi
16248 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16249 fi
16250
16251 fi
16252 echo "$as_me:16252: result: $cf_cv_func_mkstemp" >&5
16253 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16254 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16255         echo "$as_me:16255: checking for mkstemp" >&5
16256 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16257 if test "${ac_cv_func_mkstemp+set}" = set; then
16258   echo $ECHO_N "(cached) $ECHO_C" >&6
16259 else
16260   cat >conftest.$ac_ext <<_ACEOF
16261 #line 16261 "configure"
16262 #include "confdefs.h"
16263 /* System header to define __stub macros and hopefully few prototypes,
16264     which can conflict with char mkstemp (); below.  */
16265 #include <assert.h>
16266 /* Override any gcc2 internal prototype to avoid an error.  */
16267 #ifdef __cplusplus
16268 extern "C"
16269 #endif
16270 /* We use char because int might match the return type of a gcc2
16271    builtin and then its argument prototype would still apply.  */
16272 char mkstemp ();
16273 char (*f) ();
16274
16275 int
16276 main ()
16277 {
16278 /* The GNU C library defines this for functions which it implements
16279     to always fail with ENOSYS.  Some functions are actually named
16280     something starting with __ and the normal name is an alias.  */
16281 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16282 choke me
16283 #else
16284 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16285 #endif
16286
16287   ;
16288   return 0;
16289 }
16290 _ACEOF
16291 rm -f conftest.$ac_objext conftest$ac_exeext
16292 if { (eval echo "$as_me:16292: \"$ac_link\"") >&5
16293   (eval $ac_link) 2>&5
16294   ac_status=$?
16295   echo "$as_me:16295: \$? = $ac_status" >&5
16296   (exit $ac_status); } &&
16297          { ac_try='test -s conftest$ac_exeext'
16298   { (eval echo "$as_me:16298: \"$ac_try\"") >&5
16299   (eval $ac_try) 2>&5
16300   ac_status=$?
16301   echo "$as_me:16301: \$? = $ac_status" >&5
16302   (exit $ac_status); }; }; then
16303   ac_cv_func_mkstemp=yes
16304 else
16305   echo "$as_me: failed program was:" >&5
16306 cat conftest.$ac_ext >&5
16307 ac_cv_func_mkstemp=no
16308 fi
16309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16310 fi
16311 echo "$as_me:16311: result: $ac_cv_func_mkstemp" >&5
16312 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16313
16314 fi
16315 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16316         cat >>confdefs.h <<\EOF
16317 #define HAVE_MKSTEMP 1
16318 EOF
16319
16320 fi
16321
16322 # setup for prototype of fallback for vsscanf()
16323
16324 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16325         HAVE_VSSCANF=1
16326 else
16327         HAVE_VSSCANF=0
16328 fi
16329
16330 if test "$cross_compiling" = yes ; then
16331         { echo "$as_me:16331: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16332 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16333 else
16334         echo "$as_me:16334: checking whether setvbuf arguments are reversed" >&5
16335 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16336 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16337   echo $ECHO_N "(cached) $ECHO_C" >&6
16338 else
16339   if test "$cross_compiling" = yes; then
16340   { { echo "$as_me:16340: error: cannot run test program while cross compiling" >&5
16341 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16342    { (exit 1); exit 1; }; }
16343 else
16344   cat >conftest.$ac_ext <<_ACEOF
16345 #line 16345 "configure"
16346 #include "confdefs.h"
16347 #include <stdio.h>
16348 /* If setvbuf has the reversed format, exit 0. */
16349 int
16350 main ()
16351 {
16352   /* This call has the arguments reversed.
16353      A reversed system may check and see that the address of main
16354      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16355   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16356     $ac_main_return(1);
16357   putc('\r', stdout);
16358   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16359 }
16360 _ACEOF
16361 rm -f conftest$ac_exeext
16362 if { (eval echo "$as_me:16362: \"$ac_link\"") >&5
16363   (eval $ac_link) 2>&5
16364   ac_status=$?
16365   echo "$as_me:16365: \$? = $ac_status" >&5
16366   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16367   { (eval echo "$as_me:16367: \"$ac_try\"") >&5
16368   (eval $ac_try) 2>&5
16369   ac_status=$?
16370   echo "$as_me:16370: \$? = $ac_status" >&5
16371   (exit $ac_status); }; }; then
16372   ac_cv_func_setvbuf_reversed=yes
16373 else
16374   echo "$as_me: program exited with status $ac_status" >&5
16375 echo "$as_me: failed program was:" >&5
16376 cat conftest.$ac_ext >&5
16377 ac_cv_func_setvbuf_reversed=no
16378 fi
16379 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16380 fi
16381 rm -f core core.* *.core
16382 fi
16383 echo "$as_me:16383: result: $ac_cv_func_setvbuf_reversed" >&5
16384 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16385 if test $ac_cv_func_setvbuf_reversed = yes; then
16386
16387 cat >>confdefs.h <<\EOF
16388 #define SETVBUF_REVERSED 1
16389 EOF
16390
16391 fi
16392
16393 fi
16394 echo "$as_me:16394: checking return type of signal handlers" >&5
16395 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16396 if test "${ac_cv_type_signal+set}" = set; then
16397   echo $ECHO_N "(cached) $ECHO_C" >&6
16398 else
16399   cat >conftest.$ac_ext <<_ACEOF
16400 #line 16400 "configure"
16401 #include "confdefs.h"
16402 #include <sys/types.h>
16403 #include <signal.h>
16404 #ifdef signal
16405 # undef signal
16406 #endif
16407 #ifdef __cplusplus
16408 extern "C" void (*signal (int, void (*)(int)))(int);
16409 #else
16410 void (*signal ()) ();
16411 #endif
16412
16413 int
16414 main ()
16415 {
16416 int i;
16417   ;
16418   return 0;
16419 }
16420 _ACEOF
16421 rm -f conftest.$ac_objext
16422 if { (eval echo "$as_me:16422: \"$ac_compile\"") >&5
16423   (eval $ac_compile) 2>&5
16424   ac_status=$?
16425   echo "$as_me:16425: \$? = $ac_status" >&5
16426   (exit $ac_status); } &&
16427          { ac_try='test -s conftest.$ac_objext'
16428   { (eval echo "$as_me:16428: \"$ac_try\"") >&5
16429   (eval $ac_try) 2>&5
16430   ac_status=$?
16431   echo "$as_me:16431: \$? = $ac_status" >&5
16432   (exit $ac_status); }; }; then
16433   ac_cv_type_signal=void
16434 else
16435   echo "$as_me: failed program was:" >&5
16436 cat conftest.$ac_ext >&5
16437 ac_cv_type_signal=int
16438 fi
16439 rm -f conftest.$ac_objext conftest.$ac_ext
16440 fi
16441 echo "$as_me:16441: result: $ac_cv_type_signal" >&5
16442 echo "${ECHO_T}$ac_cv_type_signal" >&6
16443
16444 cat >>confdefs.h <<EOF
16445 #define RETSIGTYPE $ac_cv_type_signal
16446 EOF
16447
16448 echo "$as_me:16448: checking for intptr_t" >&5
16449 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16450 if test "${ac_cv_type_intptr_t+set}" = set; then
16451   echo $ECHO_N "(cached) $ECHO_C" >&6
16452 else
16453   cat >conftest.$ac_ext <<_ACEOF
16454 #line 16454 "configure"
16455 #include "confdefs.h"
16456 $ac_includes_default
16457 int
16458 main ()
16459 {
16460 if ((intptr_t *) 0)
16461   return 0;
16462 if (sizeof (intptr_t))
16463   return 0;
16464   ;
16465   return 0;
16466 }
16467 _ACEOF
16468 rm -f conftest.$ac_objext
16469 if { (eval echo "$as_me:16469: \"$ac_compile\"") >&5
16470   (eval $ac_compile) 2>&5
16471   ac_status=$?
16472   echo "$as_me:16472: \$? = $ac_status" >&5
16473   (exit $ac_status); } &&
16474          { ac_try='test -s conftest.$ac_objext'
16475   { (eval echo "$as_me:16475: \"$ac_try\"") >&5
16476   (eval $ac_try) 2>&5
16477   ac_status=$?
16478   echo "$as_me:16478: \$? = $ac_status" >&5
16479   (exit $ac_status); }; }; then
16480   ac_cv_type_intptr_t=yes
16481 else
16482   echo "$as_me: failed program was:" >&5
16483 cat conftest.$ac_ext >&5
16484 ac_cv_type_intptr_t=no
16485 fi
16486 rm -f conftest.$ac_objext conftest.$ac_ext
16487 fi
16488 echo "$as_me:16488: result: $ac_cv_type_intptr_t" >&5
16489 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16490 if test $ac_cv_type_intptr_t = yes; then
16491   :
16492 else
16493
16494 cat >>confdefs.h <<EOF
16495 #define intptr_t long
16496 EOF
16497
16498 fi
16499
16500 echo "$as_me:16500: checking for type sigaction_t" >&5
16501 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16502 if test "${cf_cv_type_sigaction+set}" = set; then
16503   echo $ECHO_N "(cached) $ECHO_C" >&6
16504 else
16505
16506         cat >conftest.$ac_ext <<_ACEOF
16507 #line 16507 "configure"
16508 #include "confdefs.h"
16509
16510 #include <signal.h>
16511 int
16512 main ()
16513 {
16514 sigaction_t x
16515   ;
16516   return 0;
16517 }
16518 _ACEOF
16519 rm -f conftest.$ac_objext
16520 if { (eval echo "$as_me:16520: \"$ac_compile\"") >&5
16521   (eval $ac_compile) 2>&5
16522   ac_status=$?
16523   echo "$as_me:16523: \$? = $ac_status" >&5
16524   (exit $ac_status); } &&
16525          { ac_try='test -s conftest.$ac_objext'
16526   { (eval echo "$as_me:16526: \"$ac_try\"") >&5
16527   (eval $ac_try) 2>&5
16528   ac_status=$?
16529   echo "$as_me:16529: \$? = $ac_status" >&5
16530   (exit $ac_status); }; }; then
16531   cf_cv_type_sigaction=yes
16532 else
16533   echo "$as_me: failed program was:" >&5
16534 cat conftest.$ac_ext >&5
16535 cf_cv_type_sigaction=no
16536 fi
16537 rm -f conftest.$ac_objext conftest.$ac_ext
16538 fi
16539
16540 echo "$as_me:16540: result: $cf_cv_type_sigaction" >&5
16541 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16542 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16543 #define HAVE_TYPE_SIGACTION 1
16544 EOF
16545
16546 echo "$as_me:16546: checking declaration of size-change" >&5
16547 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16548 if test "${cf_cv_sizechange+set}" = set; then
16549   echo $ECHO_N "(cached) $ECHO_C" >&6
16550 else
16551
16552     cf_cv_sizechange=unknown
16553     cf_save_CPPFLAGS="$CPPFLAGS"
16554
16555 for cf_opts in "" "NEED_PTEM_H"
16556 do
16557
16558     CPPFLAGS="$cf_save_CPPFLAGS"
16559     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16560     cat >conftest.$ac_ext <<_ACEOF
16561 #line 16561 "configure"
16562 #include "confdefs.h"
16563 #include <sys/types.h>
16564 #ifdef HAVE_TERMIOS_H
16565 #include <termios.h>
16566 #else
16567 #ifdef HAVE_TERMIO_H
16568 #include <termio.h>
16569 #endif
16570 #endif
16571 #ifdef NEED_PTEM_H
16572 /* This is a workaround for SCO:  they neglected to define struct winsize in
16573  * termios.h -- it's only in termio.h and ptem.h
16574  */
16575 #include        <sys/stream.h>
16576 #include        <sys/ptem.h>
16577 #endif
16578 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16579 #include <sys/ioctl.h>
16580 #endif
16581
16582 int
16583 main ()
16584 {
16585
16586 #ifdef TIOCGSIZE
16587         struct ttysize win;     /* FIXME: what system is this? */
16588         int y = win.ts_lines;
16589         int x = win.ts_cols;
16590 #else
16591 #ifdef TIOCGWINSZ
16592         struct winsize win;
16593         int y = win.ws_row;
16594         int x = win.ws_col;
16595 #else
16596         no TIOCGSIZE or TIOCGWINSZ
16597 #endif /* TIOCGWINSZ */
16598 #endif /* TIOCGSIZE */
16599
16600   ;
16601   return 0;
16602 }
16603 _ACEOF
16604 rm -f conftest.$ac_objext
16605 if { (eval echo "$as_me:16605: \"$ac_compile\"") >&5
16606   (eval $ac_compile) 2>&5
16607   ac_status=$?
16608   echo "$as_me:16608: \$? = $ac_status" >&5
16609   (exit $ac_status); } &&
16610          { ac_try='test -s conftest.$ac_objext'
16611   { (eval echo "$as_me:16611: \"$ac_try\"") >&5
16612   (eval $ac_try) 2>&5
16613   ac_status=$?
16614   echo "$as_me:16614: \$? = $ac_status" >&5
16615   (exit $ac_status); }; }; then
16616   cf_cv_sizechange=yes
16617 else
16618   echo "$as_me: failed program was:" >&5
16619 cat conftest.$ac_ext >&5
16620 cf_cv_sizechange=no
16621 fi
16622 rm -f conftest.$ac_objext conftest.$ac_ext
16623
16624         CPPFLAGS="$cf_save_CPPFLAGS"
16625         if test "$cf_cv_sizechange" = yes ; then
16626                 echo "size-change succeeded ($cf_opts)" >&5
16627                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16628                 break
16629         fi
16630 done
16631
16632 fi
16633 echo "$as_me:16633: result: $cf_cv_sizechange" >&5
16634 echo "${ECHO_T}$cf_cv_sizechange" >&6
16635 if test "$cf_cv_sizechange" != no ; then
16636         cat >>confdefs.h <<\EOF
16637 #define HAVE_SIZECHANGE 1
16638 EOF
16639
16640         case $cf_cv_sizechange in #(vi
16641         NEED*)
16642                 cat >>confdefs.h <<EOF
16643 #define $cf_cv_sizechange  1
16644 EOF
16645
16646                 ;;
16647         esac
16648 fi
16649
16650 echo "$as_me:16650: checking for memmove" >&5
16651 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16652 if test "${ac_cv_func_memmove+set}" = set; then
16653   echo $ECHO_N "(cached) $ECHO_C" >&6
16654 else
16655   cat >conftest.$ac_ext <<_ACEOF
16656 #line 16656 "configure"
16657 #include "confdefs.h"
16658 /* System header to define __stub macros and hopefully few prototypes,
16659     which can conflict with char memmove (); below.  */
16660 #include <assert.h>
16661 /* Override any gcc2 internal prototype to avoid an error.  */
16662 #ifdef __cplusplus
16663 extern "C"
16664 #endif
16665 /* We use char because int might match the return type of a gcc2
16666    builtin and then its argument prototype would still apply.  */
16667 char memmove ();
16668 char (*f) ();
16669
16670 int
16671 main ()
16672 {
16673 /* The GNU C library defines this for functions which it implements
16674     to always fail with ENOSYS.  Some functions are actually named
16675     something starting with __ and the normal name is an alias.  */
16676 #if defined (__stub_memmove) || defined (__stub___memmove)
16677 choke me
16678 #else
16679 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16680 #endif
16681
16682   ;
16683   return 0;
16684 }
16685 _ACEOF
16686 rm -f conftest.$ac_objext conftest$ac_exeext
16687 if { (eval echo "$as_me:16687: \"$ac_link\"") >&5
16688   (eval $ac_link) 2>&5
16689   ac_status=$?
16690   echo "$as_me:16690: \$? = $ac_status" >&5
16691   (exit $ac_status); } &&
16692          { ac_try='test -s conftest$ac_exeext'
16693   { (eval echo "$as_me:16693: \"$ac_try\"") >&5
16694   (eval $ac_try) 2>&5
16695   ac_status=$?
16696   echo "$as_me:16696: \$? = $ac_status" >&5
16697   (exit $ac_status); }; }; then
16698   ac_cv_func_memmove=yes
16699 else
16700   echo "$as_me: failed program was:" >&5
16701 cat conftest.$ac_ext >&5
16702 ac_cv_func_memmove=no
16703 fi
16704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16705 fi
16706 echo "$as_me:16706: result: $ac_cv_func_memmove" >&5
16707 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16708 if test $ac_cv_func_memmove = yes; then
16709   :
16710 else
16711
16712 echo "$as_me:16712: checking for bcopy" >&5
16713 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16714 if test "${ac_cv_func_bcopy+set}" = set; then
16715   echo $ECHO_N "(cached) $ECHO_C" >&6
16716 else
16717   cat >conftest.$ac_ext <<_ACEOF
16718 #line 16718 "configure"
16719 #include "confdefs.h"
16720 /* System header to define __stub macros and hopefully few prototypes,
16721     which can conflict with char bcopy (); below.  */
16722 #include <assert.h>
16723 /* Override any gcc2 internal prototype to avoid an error.  */
16724 #ifdef __cplusplus
16725 extern "C"
16726 #endif
16727 /* We use char because int might match the return type of a gcc2
16728    builtin and then its argument prototype would still apply.  */
16729 char bcopy ();
16730 char (*f) ();
16731
16732 int
16733 main ()
16734 {
16735 /* The GNU C library defines this for functions which it implements
16736     to always fail with ENOSYS.  Some functions are actually named
16737     something starting with __ and the normal name is an alias.  */
16738 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16739 choke me
16740 #else
16741 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16742 #endif
16743
16744   ;
16745   return 0;
16746 }
16747 _ACEOF
16748 rm -f conftest.$ac_objext conftest$ac_exeext
16749 if { (eval echo "$as_me:16749: \"$ac_link\"") >&5
16750   (eval $ac_link) 2>&5
16751   ac_status=$?
16752   echo "$as_me:16752: \$? = $ac_status" >&5
16753   (exit $ac_status); } &&
16754          { ac_try='test -s conftest$ac_exeext'
16755   { (eval echo "$as_me:16755: \"$ac_try\"") >&5
16756   (eval $ac_try) 2>&5
16757   ac_status=$?
16758   echo "$as_me:16758: \$? = $ac_status" >&5
16759   (exit $ac_status); }; }; then
16760   ac_cv_func_bcopy=yes
16761 else
16762   echo "$as_me: failed program was:" >&5
16763 cat conftest.$ac_ext >&5
16764 ac_cv_func_bcopy=no
16765 fi
16766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16767 fi
16768 echo "$as_me:16768: result: $ac_cv_func_bcopy" >&5
16769 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16770 if test $ac_cv_func_bcopy = yes; then
16771
16772         echo "$as_me:16772: checking if bcopy does overlapping moves" >&5
16773 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16774 if test "${cf_cv_good_bcopy+set}" = set; then
16775   echo $ECHO_N "(cached) $ECHO_C" >&6
16776 else
16777
16778                 if test "$cross_compiling" = yes; then
16779   cf_cv_good_bcopy=unknown
16780 else
16781   cat >conftest.$ac_ext <<_ACEOF
16782 #line 16782 "configure"
16783 #include "confdefs.h"
16784
16785 int main() {
16786         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16787         char temp[40];
16788         bcopy(data, temp, sizeof(data));
16789         bcopy(temp+10, temp, 15);
16790         bcopy(temp+5, temp+15, 10);
16791         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16792 }
16793
16794 _ACEOF
16795 rm -f conftest$ac_exeext
16796 if { (eval echo "$as_me:16796: \"$ac_link\"") >&5
16797   (eval $ac_link) 2>&5
16798   ac_status=$?
16799   echo "$as_me:16799: \$? = $ac_status" >&5
16800   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16801   { (eval echo "$as_me:16801: \"$ac_try\"") >&5
16802   (eval $ac_try) 2>&5
16803   ac_status=$?
16804   echo "$as_me:16804: \$? = $ac_status" >&5
16805   (exit $ac_status); }; }; then
16806   cf_cv_good_bcopy=yes
16807 else
16808   echo "$as_me: program exited with status $ac_status" >&5
16809 echo "$as_me: failed program was:" >&5
16810 cat conftest.$ac_ext >&5
16811 cf_cv_good_bcopy=no
16812 fi
16813 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16814 fi
16815
16816 fi
16817 echo "$as_me:16817: result: $cf_cv_good_bcopy" >&5
16818 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16819
16820 else
16821   cf_cv_good_bcopy=no
16822 fi
16823
16824         if test "$cf_cv_good_bcopy" = yes ; then
16825                 cat >>confdefs.h <<\EOF
16826 #define USE_OK_BCOPY 1
16827 EOF
16828
16829         else
16830                 cat >>confdefs.h <<\EOF
16831 #define USE_MY_MEMMOVE 1
16832 EOF
16833
16834         fi
16835
16836 fi
16837
16838 echo "$as_me:16838: checking if poll really works" >&5
16839 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16840 if test "${cf_cv_working_poll+set}" = set; then
16841   echo $ECHO_N "(cached) $ECHO_C" >&6
16842 else
16843
16844 if test "$cross_compiling" = yes; then
16845   cf_cv_working_poll=unknown
16846 else
16847   cat >conftest.$ac_ext <<_ACEOF
16848 #line 16848 "configure"
16849 #include "confdefs.h"
16850
16851 #include <stdlib.h>
16852 #include <stdio.h>
16853 #include <unistd.h>
16854 #include <fcntl.h>
16855 #ifdef HAVE_POLL_H
16856 #include <poll.h>
16857 #else
16858 #include <sys/poll.h>
16859 #endif
16860 int main() {
16861         struct pollfd myfds;
16862         int ret;
16863
16864         /* check for Darwin bug with respect to "devices" */
16865         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16866         if (myfds.fd < 0)
16867                 myfds.fd = 0;
16868         myfds.events = POLLIN;
16869         myfds.revents = 0;
16870
16871         ret = poll(&myfds, 1, 100);
16872
16873         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16874                 ret = -1;
16875         } else {
16876                 int fd = 0;
16877                 if (!isatty(fd)) {
16878                         fd = open("/dev/tty", 2);       /* O_RDWR */
16879                 }
16880
16881                 if (fd >= 0) {
16882                         /* also check with standard input */
16883                         myfds.fd = fd;
16884                         myfds.events = POLLIN;
16885                         myfds.revents = 0;
16886                         ret = poll(&myfds, 1, 100);
16887                 } else {
16888                         ret = -1;
16889                 }
16890         }
16891         ${cf_cv_main_return:-return}(ret < 0);
16892 }
16893 _ACEOF
16894 rm -f conftest$ac_exeext
16895 if { (eval echo "$as_me:16895: \"$ac_link\"") >&5
16896   (eval $ac_link) 2>&5
16897   ac_status=$?
16898   echo "$as_me:16898: \$? = $ac_status" >&5
16899   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16900   { (eval echo "$as_me:16900: \"$ac_try\"") >&5
16901   (eval $ac_try) 2>&5
16902   ac_status=$?
16903   echo "$as_me:16903: \$? = $ac_status" >&5
16904   (exit $ac_status); }; }; then
16905   cf_cv_working_poll=yes
16906 else
16907   echo "$as_me: program exited with status $ac_status" >&5
16908 echo "$as_me: failed program was:" >&5
16909 cat conftest.$ac_ext >&5
16910 cf_cv_working_poll=no
16911 fi
16912 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16913 fi
16914 fi
16915 echo "$as_me:16915: result: $cf_cv_working_poll" >&5
16916 echo "${ECHO_T}$cf_cv_working_poll" >&6
16917 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16918 #define HAVE_WORKING_POLL 1
16919 EOF
16920
16921 echo "$as_me:16921: checking for va_copy" >&5
16922 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16923 if test "${cf_cv_have_va_copy+set}" = set; then
16924   echo $ECHO_N "(cached) $ECHO_C" >&6
16925 else
16926
16927 cat >conftest.$ac_ext <<_ACEOF
16928 #line 16928 "configure"
16929 #include "confdefs.h"
16930
16931 #include <stdarg.h>
16932
16933 int
16934 main ()
16935 {
16936
16937         static va_list dst;
16938         static va_list src;
16939         va_copy(dst, src)
16940   ;
16941   return 0;
16942 }
16943 _ACEOF
16944 rm -f conftest.$ac_objext conftest$ac_exeext
16945 if { (eval echo "$as_me:16945: \"$ac_link\"") >&5
16946   (eval $ac_link) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); } &&
16950          { ac_try='test -s conftest$ac_exeext'
16951   { (eval echo "$as_me:16951: \"$ac_try\"") >&5
16952   (eval $ac_try) 2>&5
16953   ac_status=$?
16954   echo "$as_me:16954: \$? = $ac_status" >&5
16955   (exit $ac_status); }; }; then
16956   cf_cv_have_va_copy=yes
16957 else
16958   echo "$as_me: failed program was:" >&5
16959 cat conftest.$ac_ext >&5
16960 cf_cv_have_va_copy=no
16961 fi
16962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16963 fi
16964 echo "$as_me:16964: result: $cf_cv_have_va_copy" >&5
16965 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16966
16967 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16968 #define HAVE_VA_COPY 1
16969 EOF
16970
16971 echo "$as_me:16971: checking for __va_copy" >&5
16972 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16973 if test "${cf_cv_have___va_copy+set}" = set; then
16974   echo $ECHO_N "(cached) $ECHO_C" >&6
16975 else
16976
16977 cat >conftest.$ac_ext <<_ACEOF
16978 #line 16978 "configure"
16979 #include "confdefs.h"
16980
16981 #include <stdarg.h>
16982
16983 int
16984 main ()
16985 {
16986
16987         static va_list dst;
16988         static va_list src;
16989         __va_copy(dst, src)
16990   ;
16991   return 0;
16992 }
16993 _ACEOF
16994 rm -f conftest.$ac_objext conftest$ac_exeext
16995 if { (eval echo "$as_me:16995: \"$ac_link\"") >&5
16996   (eval $ac_link) 2>&5
16997   ac_status=$?
16998   echo "$as_me:16998: \$? = $ac_status" >&5
16999   (exit $ac_status); } &&
17000          { ac_try='test -s conftest$ac_exeext'
17001   { (eval echo "$as_me:17001: \"$ac_try\"") >&5
17002   (eval $ac_try) 2>&5
17003   ac_status=$?
17004   echo "$as_me:17004: \$? = $ac_status" >&5
17005   (exit $ac_status); }; }; then
17006   cf_cv_have___va_copy=yes
17007 else
17008   echo "$as_me: failed program was:" >&5
17009 cat conftest.$ac_ext >&5
17010 cf_cv_have___va_copy=no
17011 fi
17012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17013 fi
17014 echo "$as_me:17014: result: $cf_cv_have___va_copy" >&5
17015 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17016
17017 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
17018 #define HAVE___VA_COPY 1
17019 EOF
17020
17021 echo "$as_me:17021: checking for pid_t" >&5
17022 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17023 if test "${ac_cv_type_pid_t+set}" = set; then
17024   echo $ECHO_N "(cached) $ECHO_C" >&6
17025 else
17026   cat >conftest.$ac_ext <<_ACEOF
17027 #line 17027 "configure"
17028 #include "confdefs.h"
17029 $ac_includes_default
17030 int
17031 main ()
17032 {
17033 if ((pid_t *) 0)
17034   return 0;
17035 if (sizeof (pid_t))
17036   return 0;
17037   ;
17038   return 0;
17039 }
17040 _ACEOF
17041 rm -f conftest.$ac_objext
17042 if { (eval echo "$as_me:17042: \"$ac_compile\"") >&5
17043   (eval $ac_compile) 2>&5
17044   ac_status=$?
17045   echo "$as_me:17045: \$? = $ac_status" >&5
17046   (exit $ac_status); } &&
17047          { ac_try='test -s conftest.$ac_objext'
17048   { (eval echo "$as_me:17048: \"$ac_try\"") >&5
17049   (eval $ac_try) 2>&5
17050   ac_status=$?
17051   echo "$as_me:17051: \$? = $ac_status" >&5
17052   (exit $ac_status); }; }; then
17053   ac_cv_type_pid_t=yes
17054 else
17055   echo "$as_me: failed program was:" >&5
17056 cat conftest.$ac_ext >&5
17057 ac_cv_type_pid_t=no
17058 fi
17059 rm -f conftest.$ac_objext conftest.$ac_ext
17060 fi
17061 echo "$as_me:17061: result: $ac_cv_type_pid_t" >&5
17062 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17063 if test $ac_cv_type_pid_t = yes; then
17064   :
17065 else
17066
17067 cat >>confdefs.h <<EOF
17068 #define pid_t int
17069 EOF
17070
17071 fi
17072
17073 for ac_header in unistd.h vfork.h
17074 do
17075 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17076 echo "$as_me:17076: checking for $ac_header" >&5
17077 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17078 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17079   echo $ECHO_N "(cached) $ECHO_C" >&6
17080 else
17081   cat >conftest.$ac_ext <<_ACEOF
17082 #line 17082 "configure"
17083 #include "confdefs.h"
17084 #include <$ac_header>
17085 _ACEOF
17086 if { (eval echo "$as_me:17086: \"$ac_cpp conftest.$ac_ext\"") >&5
17087   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17088   ac_status=$?
17089   egrep -v '^ *\+' conftest.er1 >conftest.err
17090   rm -f conftest.er1
17091   cat conftest.err >&5
17092   echo "$as_me:17092: \$? = $ac_status" >&5
17093   (exit $ac_status); } >/dev/null; then
17094   if test -s conftest.err; then
17095     ac_cpp_err=$ac_c_preproc_warn_flag
17096   else
17097     ac_cpp_err=
17098   fi
17099 else
17100   ac_cpp_err=yes
17101 fi
17102 if test -z "$ac_cpp_err"; then
17103   eval "$as_ac_Header=yes"
17104 else
17105   echo "$as_me: failed program was:" >&5
17106   cat conftest.$ac_ext >&5
17107   eval "$as_ac_Header=no"
17108 fi
17109 rm -f conftest.err conftest.$ac_ext
17110 fi
17111 echo "$as_me:17111: result: `eval echo '${'$as_ac_Header'}'`" >&5
17112 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17113 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17114   cat >>confdefs.h <<EOF
17115 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17116 EOF
17117
17118 fi
17119 done
17120
17121 for ac_func in fork vfork
17122 do
17123 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17124 echo "$as_me:17124: checking for $ac_func" >&5
17125 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17126 if eval "test \"\${$as_ac_var+set}\" = set"; then
17127   echo $ECHO_N "(cached) $ECHO_C" >&6
17128 else
17129   cat >conftest.$ac_ext <<_ACEOF
17130 #line 17130 "configure"
17131 #include "confdefs.h"
17132 /* System header to define __stub macros and hopefully few prototypes,
17133     which can conflict with char $ac_func (); below.  */
17134 #include <assert.h>
17135 /* Override any gcc2 internal prototype to avoid an error.  */
17136 #ifdef __cplusplus
17137 extern "C"
17138 #endif
17139 /* We use char because int might match the return type of a gcc2
17140    builtin and then its argument prototype would still apply.  */
17141 char $ac_func ();
17142 char (*f) ();
17143
17144 int
17145 main ()
17146 {
17147 /* The GNU C library defines this for functions which it implements
17148     to always fail with ENOSYS.  Some functions are actually named
17149     something starting with __ and the normal name is an alias.  */
17150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17151 choke me
17152 #else
17153 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17154 #endif
17155
17156   ;
17157   return 0;
17158 }
17159 _ACEOF
17160 rm -f conftest.$ac_objext conftest$ac_exeext
17161 if { (eval echo "$as_me:17161: \"$ac_link\"") >&5
17162   (eval $ac_link) 2>&5
17163   ac_status=$?
17164   echo "$as_me:17164: \$? = $ac_status" >&5
17165   (exit $ac_status); } &&
17166          { ac_try='test -s conftest$ac_exeext'
17167   { (eval echo "$as_me:17167: \"$ac_try\"") >&5
17168   (eval $ac_try) 2>&5
17169   ac_status=$?
17170   echo "$as_me:17170: \$? = $ac_status" >&5
17171   (exit $ac_status); }; }; then
17172   eval "$as_ac_var=yes"
17173 else
17174   echo "$as_me: failed program was:" >&5
17175 cat conftest.$ac_ext >&5
17176 eval "$as_ac_var=no"
17177 fi
17178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17179 fi
17180 echo "$as_me:17180: result: `eval echo '${'$as_ac_var'}'`" >&5
17181 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17182 if test `eval echo '${'$as_ac_var'}'` = yes; then
17183   cat >>confdefs.h <<EOF
17184 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17185 EOF
17186
17187 fi
17188 done
17189
17190 ac_cv_func_fork_works=$ac_cv_func_fork
17191 if test "x$ac_cv_func_fork" = xyes; then
17192   echo "$as_me:17192: checking for working fork" >&5
17193 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17194 if test "${ac_cv_func_fork_works+set}" = set; then
17195   echo $ECHO_N "(cached) $ECHO_C" >&6
17196 else
17197   if test "$cross_compiling" = yes; then
17198   ac_cv_func_fork_works=cross
17199 else
17200   cat >conftest.$ac_ext <<_ACEOF
17201 /* By Rüdiger Kuhlmann. */
17202       #include <sys/types.h>
17203       #if HAVE_UNISTD_H
17204       # include <unistd.h>
17205       #endif
17206       /* Some systems only have a dummy stub for fork() */
17207       int main ()
17208       {
17209         if (fork() < 0)
17210           $ac_main_return (1);
17211         $ac_main_return (0);
17212       }
17213 _ACEOF
17214 rm -f conftest$ac_exeext
17215 if { (eval echo "$as_me:17215: \"$ac_link\"") >&5
17216   (eval $ac_link) 2>&5
17217   ac_status=$?
17218   echo "$as_me:17218: \$? = $ac_status" >&5
17219   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17220   { (eval echo "$as_me:17220: \"$ac_try\"") >&5
17221   (eval $ac_try) 2>&5
17222   ac_status=$?
17223   echo "$as_me:17223: \$? = $ac_status" >&5
17224   (exit $ac_status); }; }; then
17225   ac_cv_func_fork_works=yes
17226 else
17227   echo "$as_me: program exited with status $ac_status" >&5
17228 echo "$as_me: failed program was:" >&5
17229 cat conftest.$ac_ext >&5
17230 ac_cv_func_fork_works=no
17231 fi
17232 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17233 fi
17234 fi
17235 echo "$as_me:17235: result: $ac_cv_func_fork_works" >&5
17236 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17237
17238 fi
17239 if test "x$ac_cv_func_fork_works" = xcross; then
17240   case $host in
17241     *-*-amigaos* | *-*-msdosdjgpp*)
17242       # Override, as these systems have only a dummy fork() stub
17243       ac_cv_func_fork_works=no
17244       ;;
17245     *)
17246       ac_cv_func_fork_works=yes
17247       ;;
17248   esac
17249   { echo "$as_me:17249: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17250 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17251 fi
17252 ac_cv_func_vfork_works=$ac_cv_func_vfork
17253 if test "x$ac_cv_func_vfork" = xyes; then
17254   echo "$as_me:17254: checking for working vfork" >&5
17255 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17256 if test "${ac_cv_func_vfork_works+set}" = set; then
17257   echo $ECHO_N "(cached) $ECHO_C" >&6
17258 else
17259   if test "$cross_compiling" = yes; then
17260   ac_cv_func_vfork_works=cross
17261 else
17262   cat >conftest.$ac_ext <<_ACEOF
17263 #line 17263 "configure"
17264 #include "confdefs.h"
17265 /* Thanks to Paul Eggert for this test.  */
17266 #include <stdio.h>
17267 #include <sys/types.h>
17268 #include <sys/stat.h>
17269 #if HAVE_UNISTD_H
17270 # include <unistd.h>
17271 #endif
17272 #if HAVE_VFORK_H
17273 # include <vfork.h>
17274 #endif
17275 /* On some sparc systems, changes by the child to local and incoming
17276    argument registers are propagated back to the parent.  The compiler
17277    is told about this with #include <vfork.h>, but some compilers
17278    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17279    static variable whose address is put into a register that is
17280    clobbered by the vfork.  */
17281 static
17282 #ifdef __cplusplus
17283 sparc_address_test (int arg)
17284 # else
17285 sparc_address_test (arg) int arg;
17286 #endif
17287 {
17288   static pid_t child;
17289   if (!child) {
17290     child = vfork ();
17291     if (child < 0) {
17292       perror ("vfork");
17293       _exit(2);
17294     }
17295     if (!child) {
17296       arg = getpid();
17297       write(-1, "", 0);
17298       _exit (arg);
17299     }
17300   }
17301 }
17302
17303 int
17304 main ()
17305 {
17306   pid_t parent = getpid ();
17307   pid_t child;
17308
17309   sparc_address_test ();
17310
17311   child = vfork ();
17312
17313   if (child == 0) {
17314     /* Here is another test for sparc vfork register problems.  This
17315        test uses lots of local variables, at least as many local
17316        variables as main has allocated so far including compiler
17317        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17318        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17319        reuse the register of parent for one of the local variables,
17320        since it will think that parent can't possibly be used any more
17321        in this routine.  Assigning to the local variable will thus
17322        munge parent in the parent process.  */
17323     pid_t
17324       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17325       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17326     /* Convince the compiler that p..p7 are live; otherwise, it might
17327        use the same hardware register for all 8 local variables.  */
17328     if (p != p1 || p != p2 || p != p3 || p != p4
17329         || p != p5 || p != p6 || p != p7)
17330       _exit(1);
17331
17332     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17333        from child file descriptors.  If the child closes a descriptor
17334        before it execs or exits, this munges the parent's descriptor
17335        as well.  Test for this by closing stdout in the child.  */
17336     _exit(close(fileno(stdout)) != 0);
17337   } else {
17338     int status;
17339     struct stat st;
17340
17341     while (wait(&status) != child)
17342       ;
17343     $ac_main_return(
17344          /* Was there some problem with vforking?  */
17345          child < 0
17346
17347          /* Did the child fail?  (This shouldn't happen.)  */
17348          || status
17349
17350          /* Did the vfork/compiler bug occur?  */
17351          || parent != getpid()
17352
17353          /* Did the file descriptor bug occur?  */
17354          || fstat(fileno(stdout), &st) != 0
17355          );
17356   }
17357 }
17358 _ACEOF
17359 rm -f conftest$ac_exeext
17360 if { (eval echo "$as_me:17360: \"$ac_link\"") >&5
17361   (eval $ac_link) 2>&5
17362   ac_status=$?
17363   echo "$as_me:17363: \$? = $ac_status" >&5
17364   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17365   { (eval echo "$as_me:17365: \"$ac_try\"") >&5
17366   (eval $ac_try) 2>&5
17367   ac_status=$?
17368   echo "$as_me:17368: \$? = $ac_status" >&5
17369   (exit $ac_status); }; }; then
17370   ac_cv_func_vfork_works=yes
17371 else
17372   echo "$as_me: program exited with status $ac_status" >&5
17373 echo "$as_me: failed program was:" >&5
17374 cat conftest.$ac_ext >&5
17375 ac_cv_func_vfork_works=no
17376 fi
17377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17378 fi
17379 fi
17380 echo "$as_me:17380: result: $ac_cv_func_vfork_works" >&5
17381 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17382
17383 fi;
17384 if test "x$ac_cv_func_fork_works" = xcross; then
17385   ac_cv_func_vfork_works=ac_cv_func_vfork
17386   { echo "$as_me:17386: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17387 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17388 fi
17389
17390 if test "x$ac_cv_func_vfork_works" = xyes; then
17391
17392 cat >>confdefs.h <<\EOF
17393 #define HAVE_WORKING_VFORK 1
17394 EOF
17395
17396 else
17397
17398 cat >>confdefs.h <<\EOF
17399 #define vfork fork
17400 EOF
17401
17402 fi
17403 if test "x$ac_cv_func_fork_works" = xyes; then
17404
17405 cat >>confdefs.h <<\EOF
17406 #define HAVE_WORKING_FORK 1
17407 EOF
17408
17409 fi
17410
17411 # special check for test/ditto.c
17412
17413 echo "$as_me:17413: checking for openpty in -lutil" >&5
17414 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17415 if test "${ac_cv_lib_util_openpty+set}" = set; then
17416   echo $ECHO_N "(cached) $ECHO_C" >&6
17417 else
17418   ac_check_lib_save_LIBS=$LIBS
17419 LIBS="-lutil  $LIBS"
17420 cat >conftest.$ac_ext <<_ACEOF
17421 #line 17421 "configure"
17422 #include "confdefs.h"
17423
17424 /* Override any gcc2 internal prototype to avoid an error.  */
17425 #ifdef __cplusplus
17426 extern "C"
17427 #endif
17428 /* We use char because int might match the return type of a gcc2
17429    builtin and then its argument prototype would still apply.  */
17430 char openpty ();
17431 int
17432 main ()
17433 {
17434 openpty ();
17435   ;
17436   return 0;
17437 }
17438 _ACEOF
17439 rm -f conftest.$ac_objext conftest$ac_exeext
17440 if { (eval echo "$as_me:17440: \"$ac_link\"") >&5
17441   (eval $ac_link) 2>&5
17442   ac_status=$?
17443   echo "$as_me:17443: \$? = $ac_status" >&5
17444   (exit $ac_status); } &&
17445          { ac_try='test -s conftest$ac_exeext'
17446   { (eval echo "$as_me:17446: \"$ac_try\"") >&5
17447   (eval $ac_try) 2>&5
17448   ac_status=$?
17449   echo "$as_me:17449: \$? = $ac_status" >&5
17450   (exit $ac_status); }; }; then
17451   ac_cv_lib_util_openpty=yes
17452 else
17453   echo "$as_me: failed program was:" >&5
17454 cat conftest.$ac_ext >&5
17455 ac_cv_lib_util_openpty=no
17456 fi
17457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17458 LIBS=$ac_check_lib_save_LIBS
17459 fi
17460 echo "$as_me:17460: result: $ac_cv_lib_util_openpty" >&5
17461 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17462 if test $ac_cv_lib_util_openpty = yes; then
17463   cf_cv_lib_util=yes
17464 else
17465   cf_cv_lib_util=no
17466 fi
17467
17468 echo "$as_me:17468: checking for openpty header" >&5
17469 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17470 if test "${cf_cv_func_openpty+set}" = set; then
17471   echo $ECHO_N "(cached) $ECHO_C" >&6
17472 else
17473
17474     cf_save_LIBS="$LIBS"
17475     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17476     for cf_header in pty.h libutil.h util.h
17477     do
17478     cat >conftest.$ac_ext <<_ACEOF
17479 #line 17479 "configure"
17480 #include "confdefs.h"
17481
17482 #include <$cf_header>
17483
17484 int
17485 main ()
17486 {
17487
17488     int x = openpty((int *)0, (int *)0, (char *)0,
17489                    (struct termios *)0, (struct winsize *)0);
17490
17491   ;
17492   return 0;
17493 }
17494 _ACEOF
17495 rm -f conftest.$ac_objext conftest$ac_exeext
17496 if { (eval echo "$as_me:17496: \"$ac_link\"") >&5
17497   (eval $ac_link) 2>&5
17498   ac_status=$?
17499   echo "$as_me:17499: \$? = $ac_status" >&5
17500   (exit $ac_status); } &&
17501          { ac_try='test -s conftest$ac_exeext'
17502   { (eval echo "$as_me:17502: \"$ac_try\"") >&5
17503   (eval $ac_try) 2>&5
17504   ac_status=$?
17505   echo "$as_me:17505: \$? = $ac_status" >&5
17506   (exit $ac_status); }; }; then
17507
17508         cf_cv_func_openpty=$cf_header
17509         break
17510
17511 else
17512   echo "$as_me: failed program was:" >&5
17513 cat conftest.$ac_ext >&5
17514
17515         cf_cv_func_openpty=no
17516
17517 fi
17518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17519     done
17520     LIBS="$cf_save_LIBS"
17521
17522 fi
17523 echo "$as_me:17523: result: $cf_cv_func_openpty" >&5
17524 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17525
17526 if test "$cf_cv_func_openpty" != no ; then
17527     cat >>confdefs.h <<EOF
17528 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17529 EOF
17530
17531     cat >>confdefs.h <<\EOF
17532 #define USE_XTERM_PTY 1
17533 EOF
17534
17535     if test "$cf_cv_lib_util" = yes ; then
17536         TEST_LIBS="-lutil $TEST_LIBS"
17537     fi
17538 fi
17539
17540 if test "$with_hashed_db" != no ; then
17541         cat >>confdefs.h <<\EOF
17542 #define USE_HASHED_DB 1
17543 EOF
17544
17545 case $with_hashed_db in #(vi
17546 yes|*able*) #(vi
17547     ;;
17548 *)
17549     if test -d "$with_hashed_db" ; then
17550
17551 if test -n "$with_hashed_db/include" ; then
17552   for cf_add_incdir in $with_hashed_db/include
17553   do
17554         while test $cf_add_incdir != /usr/include
17555         do
17556           if test -d $cf_add_incdir
17557           then
17558                 cf_have_incdir=no
17559                 if test -n "$CFLAGS$CPPFLAGS" ; then
17560                   # a loop is needed to ensure we can add subdirs of existing dirs
17561                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17562                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17563                           cf_have_incdir=yes; break
17564                         fi
17565                   done
17566                 fi
17567
17568                 if test "$cf_have_incdir" = no ; then
17569                   if test "$cf_add_incdir" = /usr/local/include ; then
17570                         if test "$GCC" = yes
17571                         then
17572                           cf_save_CPPFLAGS=$CPPFLAGS
17573                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17574                           cat >conftest.$ac_ext <<_ACEOF
17575 #line 17575 "configure"
17576 #include "confdefs.h"
17577 #include <stdio.h>
17578 int
17579 main ()
17580 {
17581 printf("Hello")
17582   ;
17583   return 0;
17584 }
17585 _ACEOF
17586 rm -f conftest.$ac_objext
17587 if { (eval echo "$as_me:17587: \"$ac_compile\"") >&5
17588   (eval $ac_compile) 2>&5
17589   ac_status=$?
17590   echo "$as_me:17590: \$? = $ac_status" >&5
17591   (exit $ac_status); } &&
17592          { ac_try='test -s conftest.$ac_objext'
17593   { (eval echo "$as_me:17593: \"$ac_try\"") >&5
17594   (eval $ac_try) 2>&5
17595   ac_status=$?
17596   echo "$as_me:17596: \$? = $ac_status" >&5
17597   (exit $ac_status); }; }; then
17598   :
17599 else
17600   echo "$as_me: failed program was:" >&5
17601 cat conftest.$ac_ext >&5
17602 cf_have_incdir=yes
17603 fi
17604 rm -f conftest.$ac_objext conftest.$ac_ext
17605                           CPPFLAGS=$cf_save_CPPFLAGS
17606                         fi
17607                   fi
17608                 fi
17609
17610                 if test "$cf_have_incdir" = no ; then
17611                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17612
17613 echo "${as_me:-configure}:17613: testing adding $cf_add_incdir to include-path ..." 1>&5
17614
17615                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17616
17617                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17618                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17619                   cf_add_incdir="$cf_top_incdir"
17620                 else
17621                   break
17622                 fi
17623           fi
17624         done
17625   done
17626 fi
17627
17628 if test -n "$with_hashed_db/lib" ; then
17629   for cf_add_libdir in $with_hashed_db/lib
17630   do
17631     if test $cf_add_libdir = /usr/lib ; then
17632       :
17633     elif test -d $cf_add_libdir
17634     then
17635       cf_have_libdir=no
17636       if test -n "$LDFLAGS$LIBS" ; then
17637         # a loop is needed to ensure we can add subdirs of existing dirs
17638         for cf_test_libdir in $LDFLAGS $LIBS ; do
17639           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17640             cf_have_libdir=yes; break
17641           fi
17642         done
17643       fi
17644       if test "$cf_have_libdir" = no ; then
17645         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17646
17647 echo "${as_me:-configure}:17647: testing adding $cf_add_libdir to library-path ..." 1>&5
17648
17649         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17650       fi
17651     fi
17652   done
17653 fi
17654
17655     fi
17656 esac
17657
17658 echo "$as_me:17658: checking for db.h" >&5
17659 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17660 if test "${ac_cv_header_db_h+set}" = set; then
17661   echo $ECHO_N "(cached) $ECHO_C" >&6
17662 else
17663   cat >conftest.$ac_ext <<_ACEOF
17664 #line 17664 "configure"
17665 #include "confdefs.h"
17666 #include <db.h>
17667 _ACEOF
17668 if { (eval echo "$as_me:17668: \"$ac_cpp conftest.$ac_ext\"") >&5
17669   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17670   ac_status=$?
17671   egrep -v '^ *\+' conftest.er1 >conftest.err
17672   rm -f conftest.er1
17673   cat conftest.err >&5
17674   echo "$as_me:17674: \$? = $ac_status" >&5
17675   (exit $ac_status); } >/dev/null; then
17676   if test -s conftest.err; then
17677     ac_cpp_err=$ac_c_preproc_warn_flag
17678   else
17679     ac_cpp_err=
17680   fi
17681 else
17682   ac_cpp_err=yes
17683 fi
17684 if test -z "$ac_cpp_err"; then
17685   ac_cv_header_db_h=yes
17686 else
17687   echo "$as_me: failed program was:" >&5
17688   cat conftest.$ac_ext >&5
17689   ac_cv_header_db_h=no
17690 fi
17691 rm -f conftest.err conftest.$ac_ext
17692 fi
17693 echo "$as_me:17693: result: $ac_cv_header_db_h" >&5
17694 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17695 if test $ac_cv_header_db_h = yes; then
17696
17697 echo "$as_me:17697: checking for version of db" >&5
17698 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17699 if test "${cf_cv_hashed_db_version+set}" = set; then
17700   echo $ECHO_N "(cached) $ECHO_C" >&6
17701 else
17702
17703 cf_cv_hashed_db_version=unknown
17704
17705 for cf_db_version in 1 2 3 4 5
17706 do
17707
17708 echo "${as_me:-configure}:17708: testing checking for db version $cf_db_version ..." 1>&5
17709
17710         cat >conftest.$ac_ext <<_ACEOF
17711 #line 17711 "configure"
17712 #include "confdefs.h"
17713
17714 $ac_includes_default
17715 #include <db.h>
17716
17717 #ifdef DB_VERSION_MAJOR
17718         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17719 #if $cf_db_version == DB_VERSION_MAJOR
17720         /* ok */
17721 #else
17722         make an error
17723 #endif
17724 #else
17725 #if $cf_db_version == 1
17726         /* ok: assuming this is DB 1.8.5 */
17727 #else
17728         make an error
17729 #endif
17730 #endif
17731
17732 int
17733 main ()
17734 {
17735 DBT *foo = 0
17736   ;
17737   return 0;
17738 }
17739 _ACEOF
17740 rm -f conftest.$ac_objext
17741 if { (eval echo "$as_me:17741: \"$ac_compile\"") >&5
17742   (eval $ac_compile) 2>&5
17743   ac_status=$?
17744   echo "$as_me:17744: \$? = $ac_status" >&5
17745   (exit $ac_status); } &&
17746          { ac_try='test -s conftest.$ac_objext'
17747   { (eval echo "$as_me:17747: \"$ac_try\"") >&5
17748   (eval $ac_try) 2>&5
17749   ac_status=$?
17750   echo "$as_me:17750: \$? = $ac_status" >&5
17751   (exit $ac_status); }; }; then
17752
17753         cf_cv_hashed_db_version=$cf_db_version
17754         break
17755
17756 else
17757   echo "$as_me: failed program was:" >&5
17758 cat conftest.$ac_ext >&5
17759 fi
17760 rm -f conftest.$ac_objext conftest.$ac_ext
17761 done
17762
17763 fi
17764 echo "$as_me:17764: result: $cf_cv_hashed_db_version" >&5
17765 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17766
17767 if test "$cf_cv_hashed_db_version" = unknown ; then
17768         { { echo "$as_me:17768: error: Cannot determine version of db" >&5
17769 echo "$as_me: error: Cannot determine version of db" >&2;}
17770    { (exit 1); exit 1; }; }
17771 else
17772
17773 echo "$as_me:17773: checking for db libraries" >&5
17774 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17775 if test "${cf_cv_hashed_db_libs+set}" = set; then
17776   echo $ECHO_N "(cached) $ECHO_C" >&6
17777 else
17778
17779 cf_cv_hashed_db_libs=unknown
17780 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17781 do
17782         cf_save_libs="$LIBS"
17783         if test -n "$cf_db_libs"; then
17784                 LIBS="-l$cf_db_libs $LIBS"
17785         fi
17786
17787 echo "${as_me:-configure}:17787: testing checking for library "$cf_db_libs" ..." 1>&5
17788
17789         cat >conftest.$ac_ext <<_ACEOF
17790 #line 17790 "configure"
17791 #include "confdefs.h"
17792
17793 $ac_includes_default
17794 #include <db.h>
17795
17796 int
17797 main ()
17798 {
17799
17800         char *path = "/tmp/foo";
17801 #ifdef DB_VERSION_MAJOR
17802 #if DB_VERSION_MAJOR >= 4
17803         DB *result = 0;
17804         db_create(&result, NULL, 0);
17805         result->open(result,
17806                 NULL,
17807                 path,
17808                 path,
17809                 DB_HASH,
17810                 DB_CREATE,
17811                 0644);
17812 #elif DB_VERSION_MAJOR >= 3
17813         DB *result = 0;
17814         db_create(&result, NULL, 0);
17815         result->open(result,
17816                 path,
17817                 path,
17818                 DB_HASH,
17819                 DB_CREATE,
17820                 0644);
17821 #elif DB_VERSION_MAJOR >= 2
17822         DB *result = 0;
17823         db_open(path,
17824                 DB_HASH,
17825                 DB_CREATE,
17826                 0644,
17827                 (DB_ENV *) 0,
17828                 (DB_INFO *) 0,
17829                 &result);
17830 #endif /* DB_VERSION_MAJOR */
17831 #else
17832         DB *result = dbopen(path,
17833                      2,
17834                      0644,
17835                      DB_HASH,
17836                      0);
17837 #endif
17838         ${cf_cv_main_return:-return}(result != 0)
17839
17840   ;
17841   return 0;
17842 }
17843 _ACEOF
17844 rm -f conftest.$ac_objext conftest$ac_exeext
17845 if { (eval echo "$as_me:17845: \"$ac_link\"") >&5
17846   (eval $ac_link) 2>&5
17847   ac_status=$?
17848   echo "$as_me:17848: \$? = $ac_status" >&5
17849   (exit $ac_status); } &&
17850          { ac_try='test -s conftest$ac_exeext'
17851   { (eval echo "$as_me:17851: \"$ac_try\"") >&5
17852   (eval $ac_try) 2>&5
17853   ac_status=$?
17854   echo "$as_me:17854: \$? = $ac_status" >&5
17855   (exit $ac_status); }; }; then
17856
17857         if test -n "$cf_db_libs" ; then
17858                 cf_cv_hashed_db_libs=$cf_db_libs
17859         else
17860                 cf_cv_hashed_db_libs=default
17861         fi
17862         LIBS="$cf_save_libs"
17863         break
17864
17865 else
17866   echo "$as_me: failed program was:" >&5
17867 cat conftest.$ac_ext >&5
17868 fi
17869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17870         LIBS="$cf_save_libs"
17871 done
17872
17873 fi
17874 echo "$as_me:17874: result: $cf_cv_hashed_db_libs" >&5
17875 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17876
17877         if test "$cf_cv_hashed_db_libs" = unknown ; then
17878                 { { echo "$as_me:17878: error: Cannot determine library for db" >&5
17879 echo "$as_me: error: Cannot determine library for db" >&2;}
17880    { (exit 1); exit 1; }; }
17881         elif test "$cf_cv_hashed_db_libs" != default ; then
17882                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17883         fi
17884 fi
17885
17886 else
17887
17888         { { echo "$as_me:17888: error: Cannot find db.h" >&5
17889 echo "$as_me: error: Cannot find db.h" >&2;}
17890    { (exit 1); exit 1; }; }
17891
17892 fi
17893
17894 fi
17895
17896 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17897         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17898         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17899 fi
17900
17901 # Just in case, check if the C compiler has a bool type.
17902
17903 echo "$as_me:17903: checking if we should include stdbool.h" >&5
17904 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17905
17906 if test "${cf_cv_header_stdbool_h+set}" = set; then
17907   echo $ECHO_N "(cached) $ECHO_C" >&6
17908 else
17909
17910         cat >conftest.$ac_ext <<_ACEOF
17911 #line 17911 "configure"
17912 #include "confdefs.h"
17913
17914 int
17915 main ()
17916 {
17917 bool foo = false
17918   ;
17919   return 0;
17920 }
17921 _ACEOF
17922 rm -f conftest.$ac_objext
17923 if { (eval echo "$as_me:17923: \"$ac_compile\"") >&5
17924   (eval $ac_compile) 2>&5
17925   ac_status=$?
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit $ac_status); } &&
17928          { ac_try='test -s conftest.$ac_objext'
17929   { (eval echo "$as_me:17929: \"$ac_try\"") >&5
17930   (eval $ac_try) 2>&5
17931   ac_status=$?
17932   echo "$as_me:17932: \$? = $ac_status" >&5
17933   (exit $ac_status); }; }; then
17934   cf_cv_header_stdbool_h=0
17935 else
17936   echo "$as_me: failed program was:" >&5
17937 cat conftest.$ac_ext >&5
17938 cat >conftest.$ac_ext <<_ACEOF
17939 #line 17939 "configure"
17940 #include "confdefs.h"
17941
17942 #ifndef __BEOS__
17943 #include <stdbool.h>
17944 #endif
17945
17946 int
17947 main ()
17948 {
17949 bool foo = false
17950   ;
17951   return 0;
17952 }
17953 _ACEOF
17954 rm -f conftest.$ac_objext
17955 if { (eval echo "$as_me:17955: \"$ac_compile\"") >&5
17956   (eval $ac_compile) 2>&5
17957   ac_status=$?
17958   echo "$as_me:17958: \$? = $ac_status" >&5
17959   (exit $ac_status); } &&
17960          { ac_try='test -s conftest.$ac_objext'
17961   { (eval echo "$as_me:17961: \"$ac_try\"") >&5
17962   (eval $ac_try) 2>&5
17963   ac_status=$?
17964   echo "$as_me:17964: \$? = $ac_status" >&5
17965   (exit $ac_status); }; }; then
17966   cf_cv_header_stdbool_h=1
17967 else
17968   echo "$as_me: failed program was:" >&5
17969 cat conftest.$ac_ext >&5
17970 cf_cv_header_stdbool_h=0
17971 fi
17972 rm -f conftest.$ac_objext conftest.$ac_ext
17973 fi
17974 rm -f conftest.$ac_objext conftest.$ac_ext
17975 fi
17976
17977 if test "$cf_cv_header_stdbool_h" = 1
17978 then    echo "$as_me:17978: result: yes" >&5
17979 echo "${ECHO_T}yes" >&6
17980 else    echo "$as_me:17980: result: no" >&5
17981 echo "${ECHO_T}no" >&6
17982 fi
17983
17984 echo "$as_me:17984: checking for builtin bool type" >&5
17985 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17986
17987 if test "${cf_cv_cc_bool_type+set}" = set; then
17988   echo $ECHO_N "(cached) $ECHO_C" >&6
17989 else
17990
17991         cat >conftest.$ac_ext <<_ACEOF
17992 #line 17992 "configure"
17993 #include "confdefs.h"
17994
17995 #include <stdio.h>
17996 #include <sys/types.h>
17997
17998 int
17999 main ()
18000 {
18001 bool x = false
18002   ;
18003   return 0;
18004 }
18005 _ACEOF
18006 rm -f conftest.$ac_objext
18007 if { (eval echo "$as_me:18007: \"$ac_compile\"") >&5
18008   (eval $ac_compile) 2>&5
18009   ac_status=$?
18010   echo "$as_me:18010: \$? = $ac_status" >&5
18011   (exit $ac_status); } &&
18012          { ac_try='test -s conftest.$ac_objext'
18013   { (eval echo "$as_me:18013: \"$ac_try\"") >&5
18014   (eval $ac_try) 2>&5
18015   ac_status=$?
18016   echo "$as_me:18016: \$? = $ac_status" >&5
18017   (exit $ac_status); }; }; then
18018   cf_cv_cc_bool_type=1
18019 else
18020   echo "$as_me: failed program was:" >&5
18021 cat conftest.$ac_ext >&5
18022 cf_cv_cc_bool_type=0
18023 fi
18024 rm -f conftest.$ac_objext conftest.$ac_ext
18025
18026 fi
18027
18028 if test "$cf_cv_cc_bool_type" = 1
18029 then    echo "$as_me:18029: result: yes" >&5
18030 echo "${ECHO_T}yes" >&6
18031 else    echo "$as_me:18031: result: no" >&5
18032 echo "${ECHO_T}no" >&6
18033 fi
18034
18035 # Check for C++ compiler characteristics (and ensure that it's there!)
18036 if test -n "$CXX" ; then
18037         ac_ext=cc
18038 ac_cpp='$CXXCPP $CPPFLAGS'
18039 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18040 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18041 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18042 ac_main_return=return
18043
18044 if test -n "$GXX" ; then
18045 case $cf_cv_system_name in #(vi
18046 os2*) #(vi
18047         cf_stdcpp_libname=stdcpp
18048         ;;
18049 *)
18050         cf_stdcpp_libname=stdc++
18051         ;;
18052 esac
18053 echo "$as_me:18053: checking for library $cf_stdcpp_libname" >&5
18054 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18055 if test "${cf_cv_libstdcpp+set}" = set; then
18056   echo $ECHO_N "(cached) $ECHO_C" >&6
18057 else
18058
18059         cf_save="$LIBS"
18060         LIBS="-l$cf_stdcpp_libname $LIBS"
18061 cat >conftest.$ac_ext <<_ACEOF
18062 #line 18062 "configure"
18063 #include "confdefs.h"
18064
18065 #include <strstream.h>
18066 int
18067 main ()
18068 {
18069
18070 char buf[80];
18071 strstreambuf foo(buf, sizeof(buf))
18072
18073   ;
18074   return 0;
18075 }
18076 _ACEOF
18077 rm -f conftest.$ac_objext conftest$ac_exeext
18078 if { (eval echo "$as_me:18078: \"$ac_link\"") >&5
18079   (eval $ac_link) 2>&5
18080   ac_status=$?
18081   echo "$as_me:18081: \$? = $ac_status" >&5
18082   (exit $ac_status); } &&
18083          { ac_try='test -s conftest$ac_exeext'
18084   { (eval echo "$as_me:18084: \"$ac_try\"") >&5
18085   (eval $ac_try) 2>&5
18086   ac_status=$?
18087   echo "$as_me:18087: \$? = $ac_status" >&5
18088   (exit $ac_status); }; }; then
18089   cf_cv_libstdcpp=yes
18090 else
18091   echo "$as_me: failed program was:" >&5
18092 cat conftest.$ac_ext >&5
18093 cf_cv_libstdcpp=no
18094 fi
18095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18096         LIBS="$cf_save"
18097
18098 fi
18099 echo "$as_me:18099: result: $cf_cv_libstdcpp" >&5
18100 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18101 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18102 fi
18103
18104         echo "$as_me:18104: checking whether $CXX understands -c and -o together" >&5
18105 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18106 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18107   echo $ECHO_N "(cached) $ECHO_C" >&6
18108 else
18109
18110 cat > conftest.$ac_ext <<CF_EOF
18111 #include <stdio.h>
18112 int main()
18113 {
18114         ${cf_cv_main_return:-return}(0);
18115 }
18116 CF_EOF
18117 # We do the test twice because some compilers refuse to overwrite an
18118 # existing .o file with -o, though they will create one.
18119 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18120 if { (eval echo "$as_me:18120: \"$ac_try\"") >&5
18121   (eval $ac_try) 2>&5
18122   ac_status=$?
18123   echo "$as_me:18123: \$? = $ac_status" >&5
18124   (exit $ac_status); } &&
18125   test -f conftest2.$ac_objext && { (eval echo "$as_me:18125: \"$ac_try\"") >&5
18126   (eval $ac_try) 2>&5
18127   ac_status=$?
18128   echo "$as_me:18128: \$? = $ac_status" >&5
18129   (exit $ac_status); };
18130 then
18131   eval cf_cv_prog_CXX_c_o=yes
18132 else
18133   eval cf_cv_prog_CXX_c_o=no
18134 fi
18135 rm -rf conftest*
18136
18137 fi
18138 if test $cf_cv_prog_CXX_c_o = yes; then
18139   echo "$as_me:18139: result: yes" >&5
18140 echo "${ECHO_T}yes" >&6
18141 else
18142   echo "$as_me:18142: result: no" >&5
18143 echo "${ECHO_T}no" >&6
18144 fi
18145
18146         case $GXX_VERSION in
18147         1*|2.0-6*)
18148                 cf_cxx_library=yes
18149                 ;;
18150         *-2.7*|2.7*)
18151
18152 cf_cxx_library=unknown
18153 case $cf_cv_system_name in #(vi
18154 os2*) #(vi
18155         cf_gpp_libname=gpp
18156         ;;
18157 *)
18158         cf_gpp_libname=g++
18159         ;;
18160 esac
18161 if test "$GXX" = yes; then
18162         echo "$as_me:18162: checking for lib$cf_gpp_libname" >&5
18163 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18164         cf_save="$LIBS"
18165         LIBS="-l$cf_gpp_libname $LIBS"
18166         cat >conftest.$ac_ext <<_ACEOF
18167 #line 18167 "configure"
18168 #include "confdefs.h"
18169
18170 #include <$cf_gpp_libname/builtin.h>
18171
18172 int
18173 main ()
18174 {
18175 two_arg_error_handler_t foo2 = lib_error_handler
18176   ;
18177   return 0;
18178 }
18179 _ACEOF
18180 rm -f conftest.$ac_objext conftest$ac_exeext
18181 if { (eval echo "$as_me:18181: \"$ac_link\"") >&5
18182   (eval $ac_link) 2>&5
18183   ac_status=$?
18184   echo "$as_me:18184: \$? = $ac_status" >&5
18185   (exit $ac_status); } &&
18186          { ac_try='test -s conftest$ac_exeext'
18187   { (eval echo "$as_me:18187: \"$ac_try\"") >&5
18188   (eval $ac_try) 2>&5
18189   ac_status=$?
18190   echo "$as_me:18190: \$? = $ac_status" >&5
18191   (exit $ac_status); }; }; then
18192   cf_cxx_library=yes
18193          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18194          if test "$cf_gpp_libname" = cpp ; then
18195             cat >>confdefs.h <<\EOF
18196 #define HAVE_GPP_BUILTIN_H 1
18197 EOF
18198
18199          else
18200             cat >>confdefs.h <<\EOF
18201 #define HAVE_GXX_BUILTIN_H 1
18202 EOF
18203
18204          fi
18205 else
18206   echo "$as_me: failed program was:" >&5
18207 cat conftest.$ac_ext >&5
18208 cat >conftest.$ac_ext <<_ACEOF
18209 #line 18209 "configure"
18210 #include "confdefs.h"
18211
18212 #include <builtin.h>
18213
18214 int
18215 main ()
18216 {
18217 two_arg_error_handler_t foo2 = lib_error_handler
18218   ;
18219   return 0;
18220 }
18221 _ACEOF
18222 rm -f conftest.$ac_objext conftest$ac_exeext
18223 if { (eval echo "$as_me:18223: \"$ac_link\"") >&5
18224   (eval $ac_link) 2>&5
18225   ac_status=$?
18226   echo "$as_me:18226: \$? = $ac_status" >&5
18227   (exit $ac_status); } &&
18228          { ac_try='test -s conftest$ac_exeext'
18229   { (eval echo "$as_me:18229: \"$ac_try\"") >&5
18230   (eval $ac_try) 2>&5
18231   ac_status=$?
18232   echo "$as_me:18232: \$? = $ac_status" >&5
18233   (exit $ac_status); }; }; then
18234   cf_cxx_library=yes
18235          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18236          cat >>confdefs.h <<\EOF
18237 #define HAVE_BUILTIN_H 1
18238 EOF
18239
18240 else
18241   echo "$as_me: failed program was:" >&5
18242 cat conftest.$ac_ext >&5
18243 cf_cxx_library=no
18244 fi
18245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18246 fi
18247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18248         LIBS="$cf_save"
18249         echo "$as_me:18249: result: $cf_cxx_library" >&5
18250 echo "${ECHO_T}$cf_cxx_library" >&6
18251 fi
18252
18253                 ;;
18254         *)
18255                 cf_cxx_library=no
18256                 ;;
18257         esac
18258
18259         ac_ext=cc
18260 ac_cpp='$CXXCPP $CPPFLAGS'
18261 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18262 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18263 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18264 ac_main_return=return
18265 echo "$as_me:18265: checking how to run the C++ preprocessor" >&5
18266 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18267 if test -z "$CXXCPP"; then
18268   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18269   echo $ECHO_N "(cached) $ECHO_C" >&6
18270 else
18271       # Double quotes because CXXCPP needs to be expanded
18272     for CXXCPP in "$CXX -E" "/lib/cpp"
18273     do
18274       ac_preproc_ok=false
18275 for ac_cxx_preproc_warn_flag in '' yes
18276 do
18277   # Use a header file that comes with gcc, so configuring glibc
18278   # with a fresh cross-compiler works.
18279   # On the NeXT, cc -E runs the code through the compiler's parser,
18280   # not just through cpp. "Syntax error" is here to catch this case.
18281   cat >conftest.$ac_ext <<_ACEOF
18282 #line 18282 "configure"
18283 #include "confdefs.h"
18284 #include <assert.h>
18285                      Syntax error
18286 _ACEOF
18287 if { (eval echo "$as_me:18287: \"$ac_cpp conftest.$ac_ext\"") >&5
18288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18289   ac_status=$?
18290   egrep -v '^ *\+' conftest.er1 >conftest.err
18291   rm -f conftest.er1
18292   cat conftest.err >&5
18293   echo "$as_me:18293: \$? = $ac_status" >&5
18294   (exit $ac_status); } >/dev/null; then
18295   if test -s conftest.err; then
18296     ac_cpp_err=$ac_cxx_preproc_warn_flag
18297   else
18298     ac_cpp_err=
18299   fi
18300 else
18301   ac_cpp_err=yes
18302 fi
18303 if test -z "$ac_cpp_err"; then
18304   :
18305 else
18306   echo "$as_me: failed program was:" >&5
18307   cat conftest.$ac_ext >&5
18308   # Broken: fails on valid input.
18309 continue
18310 fi
18311 rm -f conftest.err conftest.$ac_ext
18312
18313   # OK, works on sane cases.  Now check whether non-existent headers
18314   # can be detected and how.
18315   cat >conftest.$ac_ext <<_ACEOF
18316 #line 18316 "configure"
18317 #include "confdefs.h"
18318 #include <ac_nonexistent.h>
18319 _ACEOF
18320 if { (eval echo "$as_me:18320: \"$ac_cpp conftest.$ac_ext\"") >&5
18321   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18322   ac_status=$?
18323   egrep -v '^ *\+' conftest.er1 >conftest.err
18324   rm -f conftest.er1
18325   cat conftest.err >&5
18326   echo "$as_me:18326: \$? = $ac_status" >&5
18327   (exit $ac_status); } >/dev/null; then
18328   if test -s conftest.err; then
18329     ac_cpp_err=$ac_cxx_preproc_warn_flag
18330   else
18331     ac_cpp_err=
18332   fi
18333 else
18334   ac_cpp_err=yes
18335 fi
18336 if test -z "$ac_cpp_err"; then
18337   # Broken: success on invalid input.
18338 continue
18339 else
18340   echo "$as_me: failed program was:" >&5
18341   cat conftest.$ac_ext >&5
18342   # Passes both tests.
18343 ac_preproc_ok=:
18344 break
18345 fi
18346 rm -f conftest.err conftest.$ac_ext
18347
18348 done
18349 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18350 rm -f conftest.err conftest.$ac_ext
18351 if $ac_preproc_ok; then
18352   break
18353 fi
18354
18355     done
18356     ac_cv_prog_CXXCPP=$CXXCPP
18357
18358 fi
18359   CXXCPP=$ac_cv_prog_CXXCPP
18360 else
18361   ac_cv_prog_CXXCPP=$CXXCPP
18362 fi
18363 echo "$as_me:18363: result: $CXXCPP" >&5
18364 echo "${ECHO_T}$CXXCPP" >&6
18365 ac_preproc_ok=false
18366 for ac_cxx_preproc_warn_flag in '' yes
18367 do
18368   # Use a header file that comes with gcc, so configuring glibc
18369   # with a fresh cross-compiler works.
18370   # On the NeXT, cc -E runs the code through the compiler's parser,
18371   # not just through cpp. "Syntax error" is here to catch this case.
18372   cat >conftest.$ac_ext <<_ACEOF
18373 #line 18373 "configure"
18374 #include "confdefs.h"
18375 #include <assert.h>
18376                      Syntax error
18377 _ACEOF
18378 if { (eval echo "$as_me:18378: \"$ac_cpp conftest.$ac_ext\"") >&5
18379   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18380   ac_status=$?
18381   egrep -v '^ *\+' conftest.er1 >conftest.err
18382   rm -f conftest.er1
18383   cat conftest.err >&5
18384   echo "$as_me:18384: \$? = $ac_status" >&5
18385   (exit $ac_status); } >/dev/null; then
18386   if test -s conftest.err; then
18387     ac_cpp_err=$ac_cxx_preproc_warn_flag
18388   else
18389     ac_cpp_err=
18390   fi
18391 else
18392   ac_cpp_err=yes
18393 fi
18394 if test -z "$ac_cpp_err"; then
18395   :
18396 else
18397   echo "$as_me: failed program was:" >&5
18398   cat conftest.$ac_ext >&5
18399   # Broken: fails on valid input.
18400 continue
18401 fi
18402 rm -f conftest.err conftest.$ac_ext
18403
18404   # OK, works on sane cases.  Now check whether non-existent headers
18405   # can be detected and how.
18406   cat >conftest.$ac_ext <<_ACEOF
18407 #line 18407 "configure"
18408 #include "confdefs.h"
18409 #include <ac_nonexistent.h>
18410 _ACEOF
18411 if { (eval echo "$as_me:18411: \"$ac_cpp conftest.$ac_ext\"") >&5
18412   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18413   ac_status=$?
18414   egrep -v '^ *\+' conftest.er1 >conftest.err
18415   rm -f conftest.er1
18416   cat conftest.err >&5
18417   echo "$as_me:18417: \$? = $ac_status" >&5
18418   (exit $ac_status); } >/dev/null; then
18419   if test -s conftest.err; then
18420     ac_cpp_err=$ac_cxx_preproc_warn_flag
18421   else
18422     ac_cpp_err=
18423   fi
18424 else
18425   ac_cpp_err=yes
18426 fi
18427 if test -z "$ac_cpp_err"; then
18428   # Broken: success on invalid input.
18429 continue
18430 else
18431   echo "$as_me: failed program was:" >&5
18432   cat conftest.$ac_ext >&5
18433   # Passes both tests.
18434 ac_preproc_ok=:
18435 break
18436 fi
18437 rm -f conftest.err conftest.$ac_ext
18438
18439 done
18440 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18441 rm -f conftest.err conftest.$ac_ext
18442 if $ac_preproc_ok; then
18443   :
18444 else
18445   { { echo "$as_me:18445: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18446 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18447    { (exit 1); exit 1; }; }
18448 fi
18449
18450 ac_ext=cc
18451 ac_cpp='$CXXCPP $CPPFLAGS'
18452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18453 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18455 ac_main_return=return
18456
18457 for ac_header in typeinfo
18458 do
18459 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18460 echo "$as_me:18460: checking for $ac_header" >&5
18461 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18462 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18463   echo $ECHO_N "(cached) $ECHO_C" >&6
18464 else
18465   cat >conftest.$ac_ext <<_ACEOF
18466 #line 18466 "configure"
18467 #include "confdefs.h"
18468 #include <$ac_header>
18469 _ACEOF
18470 if { (eval echo "$as_me:18470: \"$ac_cpp conftest.$ac_ext\"") >&5
18471   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18472   ac_status=$?
18473   egrep -v '^ *\+' conftest.er1 >conftest.err
18474   rm -f conftest.er1
18475   cat conftest.err >&5
18476   echo "$as_me:18476: \$? = $ac_status" >&5
18477   (exit $ac_status); } >/dev/null; then
18478   if test -s conftest.err; then
18479     ac_cpp_err=$ac_cxx_preproc_warn_flag
18480   else
18481     ac_cpp_err=
18482   fi
18483 else
18484   ac_cpp_err=yes
18485 fi
18486 if test -z "$ac_cpp_err"; then
18487   eval "$as_ac_Header=yes"
18488 else
18489   echo "$as_me: failed program was:" >&5
18490   cat conftest.$ac_ext >&5
18491   eval "$as_ac_Header=no"
18492 fi
18493 rm -f conftest.err conftest.$ac_ext
18494 fi
18495 echo "$as_me:18495: result: `eval echo '${'$as_ac_Header'}'`" >&5
18496 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18497 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18498   cat >>confdefs.h <<EOF
18499 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18500 EOF
18501
18502 fi
18503 done
18504
18505 for ac_header in iostream
18506 do
18507 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18508 echo "$as_me:18508: checking for $ac_header" >&5
18509 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18510 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18511   echo $ECHO_N "(cached) $ECHO_C" >&6
18512 else
18513   cat >conftest.$ac_ext <<_ACEOF
18514 #line 18514 "configure"
18515 #include "confdefs.h"
18516 #include <$ac_header>
18517 _ACEOF
18518 if { (eval echo "$as_me:18518: \"$ac_cpp conftest.$ac_ext\"") >&5
18519   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18520   ac_status=$?
18521   egrep -v '^ *\+' conftest.er1 >conftest.err
18522   rm -f conftest.er1
18523   cat conftest.err >&5
18524   echo "$as_me:18524: \$? = $ac_status" >&5
18525   (exit $ac_status); } >/dev/null; then
18526   if test -s conftest.err; then
18527     ac_cpp_err=$ac_cxx_preproc_warn_flag
18528   else
18529     ac_cpp_err=
18530   fi
18531 else
18532   ac_cpp_err=yes
18533 fi
18534 if test -z "$ac_cpp_err"; then
18535   eval "$as_ac_Header=yes"
18536 else
18537   echo "$as_me: failed program was:" >&5
18538   cat conftest.$ac_ext >&5
18539   eval "$as_ac_Header=no"
18540 fi
18541 rm -f conftest.err conftest.$ac_ext
18542 fi
18543 echo "$as_me:18543: result: `eval echo '${'$as_ac_Header'}'`" >&5
18544 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18545 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18546   cat >>confdefs.h <<EOF
18547 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18548 EOF
18549
18550 fi
18551 done
18552
18553 if test x"$ac_cv_header_iostream" = xyes ; then
18554         echo "$as_me:18554: checking if iostream uses std-namespace" >&5
18555 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18556         cat >conftest.$ac_ext <<_ACEOF
18557 #line 18557 "configure"
18558 #include "confdefs.h"
18559
18560 #include <iostream>
18561 using std::endl;
18562 using std::cerr;
18563 int
18564 main ()
18565 {
18566
18567 cerr << "testing" << endl;
18568
18569   ;
18570   return 0;
18571 }
18572 _ACEOF
18573 rm -f conftest.$ac_objext
18574 if { (eval echo "$as_me:18574: \"$ac_compile\"") >&5
18575   (eval $ac_compile) 2>&5
18576   ac_status=$?
18577   echo "$as_me:18577: \$? = $ac_status" >&5
18578   (exit $ac_status); } &&
18579          { ac_try='test -s conftest.$ac_objext'
18580   { (eval echo "$as_me:18580: \"$ac_try\"") >&5
18581   (eval $ac_try) 2>&5
18582   ac_status=$?
18583   echo "$as_me:18583: \$? = $ac_status" >&5
18584   (exit $ac_status); }; }; then
18585   cf_iostream_namespace=yes
18586 else
18587   echo "$as_me: failed program was:" >&5
18588 cat conftest.$ac_ext >&5
18589 cf_iostream_namespace=no
18590 fi
18591 rm -f conftest.$ac_objext conftest.$ac_ext
18592         echo "$as_me:18592: result: $cf_iostream_namespace" >&5
18593 echo "${ECHO_T}$cf_iostream_namespace" >&6
18594         if test "$cf_iostream_namespace" = yes ; then
18595                 cat >>confdefs.h <<\EOF
18596 #define IOSTREAM_NAMESPACE 1
18597 EOF
18598
18599         fi
18600 fi
18601
18602 echo "$as_me:18602: checking if we should include stdbool.h" >&5
18603 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18604
18605 if test "${cf_cv_header_stdbool_h+set}" = set; then
18606   echo $ECHO_N "(cached) $ECHO_C" >&6
18607 else
18608
18609         cat >conftest.$ac_ext <<_ACEOF
18610 #line 18610 "configure"
18611 #include "confdefs.h"
18612
18613 int
18614 main ()
18615 {
18616 bool foo = false
18617   ;
18618   return 0;
18619 }
18620 _ACEOF
18621 rm -f conftest.$ac_objext
18622 if { (eval echo "$as_me:18622: \"$ac_compile\"") >&5
18623   (eval $ac_compile) 2>&5
18624   ac_status=$?
18625   echo "$as_me:18625: \$? = $ac_status" >&5
18626   (exit $ac_status); } &&
18627          { ac_try='test -s conftest.$ac_objext'
18628   { (eval echo "$as_me:18628: \"$ac_try\"") >&5
18629   (eval $ac_try) 2>&5
18630   ac_status=$?
18631   echo "$as_me:18631: \$? = $ac_status" >&5
18632   (exit $ac_status); }; }; then
18633   cf_cv_header_stdbool_h=0
18634 else
18635   echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 cat >conftest.$ac_ext <<_ACEOF
18638 #line 18638 "configure"
18639 #include "confdefs.h"
18640
18641 #ifndef __BEOS__
18642 #include <stdbool.h>
18643 #endif
18644
18645 int
18646 main ()
18647 {
18648 bool foo = false
18649   ;
18650   return 0;
18651 }
18652 _ACEOF
18653 rm -f conftest.$ac_objext
18654 if { (eval echo "$as_me:18654: \"$ac_compile\"") >&5
18655   (eval $ac_compile) 2>&5
18656   ac_status=$?
18657   echo "$as_me:18657: \$? = $ac_status" >&5
18658   (exit $ac_status); } &&
18659          { ac_try='test -s conftest.$ac_objext'
18660   { (eval echo "$as_me:18660: \"$ac_try\"") >&5
18661   (eval $ac_try) 2>&5
18662   ac_status=$?
18663   echo "$as_me:18663: \$? = $ac_status" >&5
18664   (exit $ac_status); }; }; then
18665   cf_cv_header_stdbool_h=1
18666 else
18667   echo "$as_me: failed program was:" >&5
18668 cat conftest.$ac_ext >&5
18669 cf_cv_header_stdbool_h=0
18670 fi
18671 rm -f conftest.$ac_objext conftest.$ac_ext
18672 fi
18673 rm -f conftest.$ac_objext conftest.$ac_ext
18674 fi
18675
18676 if test "$cf_cv_header_stdbool_h" = 1
18677 then    echo "$as_me:18677: result: yes" >&5
18678 echo "${ECHO_T}yes" >&6
18679 else    echo "$as_me:18679: result: no" >&5
18680 echo "${ECHO_T}no" >&6
18681 fi
18682
18683 echo "$as_me:18683: checking for builtin bool type" >&5
18684 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18685
18686 if test "${cf_cv_builtin_bool+set}" = set; then
18687   echo $ECHO_N "(cached) $ECHO_C" >&6
18688 else
18689
18690         cat >conftest.$ac_ext <<_ACEOF
18691 #line 18691 "configure"
18692 #include "confdefs.h"
18693
18694 #include <stdio.h>
18695 #include <sys/types.h>
18696
18697 int
18698 main ()
18699 {
18700 bool x = false
18701   ;
18702   return 0;
18703 }
18704 _ACEOF
18705 rm -f conftest.$ac_objext
18706 if { (eval echo "$as_me:18706: \"$ac_compile\"") >&5
18707   (eval $ac_compile) 2>&5
18708   ac_status=$?
18709   echo "$as_me:18709: \$? = $ac_status" >&5
18710   (exit $ac_status); } &&
18711          { ac_try='test -s conftest.$ac_objext'
18712   { (eval echo "$as_me:18712: \"$ac_try\"") >&5
18713   (eval $ac_try) 2>&5
18714   ac_status=$?
18715   echo "$as_me:18715: \$? = $ac_status" >&5
18716   (exit $ac_status); }; }; then
18717   cf_cv_builtin_bool=1
18718 else
18719   echo "$as_me: failed program was:" >&5
18720 cat conftest.$ac_ext >&5
18721 cf_cv_builtin_bool=0
18722 fi
18723 rm -f conftest.$ac_objext conftest.$ac_ext
18724
18725 fi
18726
18727 if test "$cf_cv_builtin_bool" = 1
18728 then    echo "$as_me:18728: result: yes" >&5
18729 echo "${ECHO_T}yes" >&6
18730 else    echo "$as_me:18730: result: no" >&5
18731 echo "${ECHO_T}no" >&6
18732 fi
18733
18734 echo "$as_me:18734: checking for size of bool" >&5
18735 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18736 if test "${cf_cv_type_of_bool+set}" = set; then
18737   echo $ECHO_N "(cached) $ECHO_C" >&6
18738 else
18739
18740         rm -f cf_test.out
18741         if test "$cross_compiling" = yes; then
18742   cf_cv_type_of_bool=unknown
18743 else
18744   cat >conftest.$ac_ext <<_ACEOF
18745 #line 18745 "configure"
18746 #include "confdefs.h"
18747
18748 #include <stdlib.h>
18749 #include <stdio.h>
18750
18751 #if defined(__cplusplus)
18752
18753 #ifdef HAVE_GXX_BUILTIN_H
18754 #include <g++/builtin.h>
18755 #elif HAVE_GPP_BUILTIN_H
18756 #include <gpp/builtin.h>
18757 #elif HAVE_BUILTIN_H
18758 #include <builtin.h>
18759 #endif
18760
18761 #else
18762
18763 #if $cf_cv_header_stdbool_h
18764 #include <stdbool.h>
18765 #endif
18766
18767 #endif
18768
18769 main()
18770 {
18771         FILE *fp = fopen("cf_test.out", "w");
18772         if (fp != 0) {
18773                 bool x = true;
18774                 if ((bool)(-x) >= 0)
18775                         fputs("unsigned ", fp);
18776                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18777                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18778                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18779                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18780                 fclose(fp);
18781         }
18782         ${cf_cv_main_return:-return}(0);
18783 }
18784
18785 _ACEOF
18786 rm -f conftest$ac_exeext
18787 if { (eval echo "$as_me:18787: \"$ac_link\"") >&5
18788   (eval $ac_link) 2>&5
18789   ac_status=$?
18790   echo "$as_me:18790: \$? = $ac_status" >&5
18791   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18792   { (eval echo "$as_me:18792: \"$ac_try\"") >&5
18793   (eval $ac_try) 2>&5
18794   ac_status=$?
18795   echo "$as_me:18795: \$? = $ac_status" >&5
18796   (exit $ac_status); }; }; then
18797   cf_cv_type_of_bool=`cat cf_test.out`
18798                  if test -z "$cf_cv_type_of_bool"; then
18799                    cf_cv_type_of_bool=unknown
18800                  fi
18801 else
18802   echo "$as_me: program exited with status $ac_status" >&5
18803 echo "$as_me: failed program was:" >&5
18804 cat conftest.$ac_ext >&5
18805 cf_cv_type_of_bool=unknown
18806 fi
18807 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18808 fi
18809
18810 fi
18811
18812         rm -f cf_test.out
18813 echo "$as_me:18813: result: $cf_cv_type_of_bool" >&5
18814 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18815 if test "$cf_cv_type_of_bool" = unknown ; then
18816         case .$NCURSES_BOOL in #(vi
18817         .auto|.) NCURSES_BOOL=unsigned;;
18818         esac
18819         { echo "$as_me:18819: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18820 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18821         cf_cv_type_of_bool=$NCURSES_BOOL
18822 fi
18823
18824 echo "$as_me:18824: checking for special defines needed for etip.h" >&5
18825 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18826 cf_save_CXXFLAGS="$CXXFLAGS"
18827 cf_result="none"
18828
18829 # etip.h includes ncurses.h which includes ncurses_dll.h
18830 # But ncurses_dll.h is generated - fix here.
18831 test -d include || mkdir include
18832 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
18833
18834 for cf_math in "" MATH_H
18835 do
18836 for cf_excp in "" MATH_EXCEPTION
18837 do
18838         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18839         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18840         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18841 cat >conftest.$ac_ext <<_ACEOF
18842 #line 18842 "configure"
18843 #include "confdefs.h"
18844
18845 #include <etip.h.in>
18846
18847 int
18848 main ()
18849 {
18850
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 rm -f conftest.$ac_objext
18856 if { (eval echo "$as_me:18856: \"$ac_compile\"") >&5
18857   (eval $ac_compile) 2>&5
18858   ac_status=$?
18859   echo "$as_me:18859: \$? = $ac_status" >&5
18860   (exit $ac_status); } &&
18861          { ac_try='test -s conftest.$ac_objext'
18862   { (eval echo "$as_me:18862: \"$ac_try\"") >&5
18863   (eval $ac_try) 2>&5
18864   ac_status=$?
18865   echo "$as_me:18865: \$? = $ac_status" >&5
18866   (exit $ac_status); }; }; then
18867
18868         test -n "$cf_math" && cat >>confdefs.h <<EOF
18869 #define ETIP_NEEDS_${cf_math} 1
18870 EOF
18871
18872         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18873 #define ETIP_NEEDS_${cf_excp} 1
18874 EOF
18875
18876         cf_result="$cf_math $cf_excp"
18877         break 2
18878
18879 else
18880   echo "$as_me: failed program was:" >&5
18881 cat conftest.$ac_ext >&5
18882 fi
18883 rm -f conftest.$ac_objext conftest.$ac_ext
18884 done
18885 done
18886 echo "$as_me:18886: result: $cf_result" >&5
18887 echo "${ECHO_T}$cf_result" >&6
18888 CXXFLAGS="$cf_save_CXXFLAGS"
18889
18890 if test -n "$CXX"; then
18891 echo "$as_me:18891: checking if $CXX accepts parameter initialization" >&5
18892 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18893 if test "${cf_cv_cpp_param_init+set}" = set; then
18894   echo $ECHO_N "(cached) $ECHO_C" >&6
18895 else
18896
18897         ac_ext=cc
18898 ac_cpp='$CXXCPP $CPPFLAGS'
18899 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18900 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18901 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18902 ac_main_return=return
18903
18904         if test "$cross_compiling" = yes; then
18905   cf_cv_cpp_param_init=unknown
18906 else
18907   cat >conftest.$ac_ext <<_ACEOF
18908 #line 18908 "configure"
18909 #include "confdefs.h"
18910
18911 class TEST {
18912 private:
18913         int value;
18914 public:
18915         TEST(int x = 1);
18916         ~TEST();
18917 };
18918
18919 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18920 {
18921         value = x;
18922 }
18923 int main() { }
18924
18925 _ACEOF
18926 rm -f conftest$ac_exeext
18927 if { (eval echo "$as_me:18927: \"$ac_link\"") >&5
18928   (eval $ac_link) 2>&5
18929   ac_status=$?
18930   echo "$as_me:18930: \$? = $ac_status" >&5
18931   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18932   { (eval echo "$as_me:18932: \"$ac_try\"") >&5
18933   (eval $ac_try) 2>&5
18934   ac_status=$?
18935   echo "$as_me:18935: \$? = $ac_status" >&5
18936   (exit $ac_status); }; }; then
18937   cf_cv_cpp_param_init=yes
18938 else
18939   echo "$as_me: program exited with status $ac_status" >&5
18940 echo "$as_me: failed program was:" >&5
18941 cat conftest.$ac_ext >&5
18942 cf_cv_cpp_param_init=no
18943 fi
18944 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18945 fi
18946         ac_ext=cc
18947 ac_cpp='$CXXCPP $CPPFLAGS'
18948 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18949 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18950 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18951 ac_main_return=return
18952
18953 fi
18954 echo "$as_me:18954: result: $cf_cv_cpp_param_init" >&5
18955 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18956 fi
18957 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18958 #define CPP_HAS_PARAM_INIT 1
18959 EOF
18960
18961 if test -n "$CXX"; then
18962
18963 echo "$as_me:18963: checking if $CXX accepts static_cast" >&5
18964 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18965 if test "${cf_cv_cpp_static_cast+set}" = set; then
18966   echo $ECHO_N "(cached) $ECHO_C" >&6
18967 else
18968
18969         ac_ext=cc
18970 ac_cpp='$CXXCPP $CPPFLAGS'
18971 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18972 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18973 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18974 ac_main_return=return
18975
18976         cat >conftest.$ac_ext <<_ACEOF
18977 #line 18977 "configure"
18978 #include "confdefs.h"
18979
18980 class NCursesPanel
18981 {
18982 public:
18983   NCursesPanel(int nlines,
18984                int ncols,
18985                int begin_y = 0,
18986                int begin_x = 0)
18987   {
18988   }
18989
18990   ~NCursesPanel();
18991 };
18992
18993 template<class T> class NCursesUserPanel : public NCursesPanel
18994 {
18995 public:
18996   NCursesUserPanel (int nlines,
18997                     int ncols,
18998                     int begin_y = 0,
18999                     int begin_x = 0,
19000                     const T* p_UserData = static_cast<T*>(0))
19001     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19002   {
19003   };
19004   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19005   {
19006   };
19007
19008   virtual ~NCursesUserPanel() {};
19009 };
19010
19011 int
19012 main ()
19013 {
19014
19015         const char* p_UserData = static_cast<char*>(0)
19016   ;
19017   return 0;
19018 }
19019 _ACEOF
19020 rm -f conftest.$ac_objext
19021 if { (eval echo "$as_me:19021: \"$ac_compile\"") >&5
19022   (eval $ac_compile) 2>&5
19023   ac_status=$?
19024   echo "$as_me:19024: \$? = $ac_status" >&5
19025   (exit $ac_status); } &&
19026          { ac_try='test -s conftest.$ac_objext'
19027   { (eval echo "$as_me:19027: \"$ac_try\"") >&5
19028   (eval $ac_try) 2>&5
19029   ac_status=$?
19030   echo "$as_me:19030: \$? = $ac_status" >&5
19031   (exit $ac_status); }; }; then
19032   cf_cv_cpp_static_cast=yes
19033 else
19034   echo "$as_me: failed program was:" >&5
19035 cat conftest.$ac_ext >&5
19036 cf_cv_cpp_static_cast=no
19037 fi
19038 rm -f conftest.$ac_objext conftest.$ac_ext
19039
19040         ac_ext=cc
19041 ac_cpp='$CXXCPP $CPPFLAGS'
19042 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19043 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19044 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19045 ac_main_return=return
19046
19047 fi
19048 echo "$as_me:19048: result: $cf_cv_cpp_static_cast" >&5
19049 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19050
19051 fi
19052
19053 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
19054 #define CPP_HAS_STATIC_CAST 1
19055 EOF
19056
19057         CXX_AR='$(AR)'
19058         CXX_ARFLAGS='$(ARFLAGS)'
19059         case $cf_cv_system_name in #(vi
19060         irix*) #(vi
19061             if test "$GXX" != yes ; then
19062                 CXX_AR='$(CXX)'
19063                 CXX_ARFLAGS='-ar -o'
19064             fi
19065             ;;
19066         sco3.2v5*) #(vi
19067             CXXLDFLAGS="-u main"
19068             ;;
19069         solaris2*)
19070             if test "$GXX" != yes ; then
19071                 CXX_AR='$(CXX)'
19072                 CXX_ARFLAGS='-xar -o'
19073             fi
19074             ;;
19075         esac
19076
19077 else
19078         cf_cxx_library=no
19079         cf_cv_builtin_bool=1
19080
19081         # Just because we are not configuring against C++ right now does not
19082         # mean that a user will not want to use C++.  Some distributors disable
19083         # the C++ portion of this configuration as a shortcut (or just to avoid
19084         # compiling the demo in the c++ directory).  So we need a reasonable
19085         # default for the 'bool' type.
19086         #
19087         # Caveat: since the storage of the bool type is not standardized, it
19088         # may change.
19089
19090         if test "$NCURSES_BOOL" != auto ; then
19091                 cf_cv_type_of_bool=$NCURSES_BOOL
19092                 cf_cv_header_stdbool_h=0
19093         else
19094                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19095
19096 echo "$as_me:19096: checking for size of bool" >&5
19097 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19098 if test "${cf_cv_type_of_bool+set}" = set; then
19099   echo $ECHO_N "(cached) $ECHO_C" >&6
19100 else
19101
19102         rm -f cf_test.out
19103         if test "$cross_compiling" = yes; then
19104   cf_cv_type_of_bool=unknown
19105 else
19106   cat >conftest.$ac_ext <<_ACEOF
19107 #line 19107 "configure"
19108 #include "confdefs.h"
19109
19110 #include <stdlib.h>
19111 #include <stdio.h>
19112
19113 #if defined(__cplusplus)
19114
19115 #ifdef HAVE_GXX_BUILTIN_H
19116 #include <g++/builtin.h>
19117 #elif HAVE_GPP_BUILTIN_H
19118 #include <gpp/builtin.h>
19119 #elif HAVE_BUILTIN_H
19120 #include <builtin.h>
19121 #endif
19122
19123 #else
19124
19125 #if $cf_cv_header_stdbool_h
19126 #include <stdbool.h>
19127 #endif
19128
19129 #endif
19130
19131 main()
19132 {
19133         FILE *fp = fopen("cf_test.out", "w");
19134         if (fp != 0) {
19135                 bool x = true;
19136                 if ((bool)(-x) >= 0)
19137                         fputs("unsigned ", fp);
19138                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19139                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19140                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19141                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19142                 fclose(fp);
19143         }
19144         ${cf_cv_main_return:-return}(0);
19145 }
19146
19147 _ACEOF
19148 rm -f conftest$ac_exeext
19149 if { (eval echo "$as_me:19149: \"$ac_link\"") >&5
19150   (eval $ac_link) 2>&5
19151   ac_status=$?
19152   echo "$as_me:19152: \$? = $ac_status" >&5
19153   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19154   { (eval echo "$as_me:19154: \"$ac_try\"") >&5
19155   (eval $ac_try) 2>&5
19156   ac_status=$?
19157   echo "$as_me:19157: \$? = $ac_status" >&5
19158   (exit $ac_status); }; }; then
19159   cf_cv_type_of_bool=`cat cf_test.out`
19160                  if test -z "$cf_cv_type_of_bool"; then
19161                    cf_cv_type_of_bool=unknown
19162                  fi
19163 else
19164   echo "$as_me: program exited with status $ac_status" >&5
19165 echo "$as_me: failed program was:" >&5
19166 cat conftest.$ac_ext >&5
19167 cf_cv_type_of_bool=unknown
19168 fi
19169 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19170 fi
19171
19172 fi
19173
19174         rm -f cf_test.out
19175 echo "$as_me:19175: result: $cf_cv_type_of_bool" >&5
19176 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19177 if test "$cf_cv_type_of_bool" = unknown ; then
19178         case .$NCURSES_BOOL in #(vi
19179         .auto|.) NCURSES_BOOL=unsigned;;
19180         esac
19181         { echo "$as_me:19181: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19182 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19183         cf_cv_type_of_bool=$NCURSES_BOOL
19184 fi
19185
19186                 else
19187                         echo "$as_me:19187: checking for fallback type of bool" >&5
19188 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19189                         case "$host_cpu" in #(vi
19190                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19191                         *)      cf_cv_type_of_bool=int  ;;
19192                         esac
19193                         echo "$as_me:19193: result: $cf_cv_type_of_bool" >&5
19194 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19195                 fi
19196         fi
19197 fi
19198
19199 # If the C compiler did not declare bool, and we did not determine that the C++
19200 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19201 # ncurses library use the same type as C++ bool.  Note that this allows one to
19202 # specify the type of bool in a configure-script option and postpone
19203 # integration with the C++ compiler provided that the types are compatible.
19204 USE_CXX_BOOL=1
19205 if test $cf_cv_cc_bool_type = 1
19206 then
19207         # oops: C has a bool.  Unlikely, but C++ could differ.
19208         USE_CXX_BOOL=0
19209 elif test $cf_cv_builtin_bool = 0
19210 then
19211         # C++ has no bool
19212         USE_CXX_BOOL=0
19213 else
19214         # this is the normal case
19215         USE_CXX_BOOL='defined(__cplusplus)'
19216 fi
19217
19218 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19219
19220         if test "$cf_with_ada" != "no" ; then
19221                 if test "$with_libtool" != "no"; then
19222                         { echo "$as_me:19222: WARNING: libtool does not support Ada - disabling feature" >&5
19223 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19224                         cf_with_ada=no
19225                 fi
19226         fi
19227
19228         if test "$cf_with_ada" != "no" ; then
19229
19230 cf_ada_make=gnatmake
19231 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19232 set dummy $cf_ada_make; ac_word=$2
19233 echo "$as_me:19233: checking for $ac_word" >&5
19234 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19235 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19236   echo $ECHO_N "(cached) $ECHO_C" >&6
19237 else
19238   if test -n "$gnat_exists"; then
19239   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19240 else
19241   ac_save_IFS=$IFS; IFS=$ac_path_separator
19242 ac_dummy="$PATH"
19243 for ac_dir in $ac_dummy; do
19244   IFS=$ac_save_IFS
19245   test -z "$ac_dir" && ac_dir=.
19246   $as_executable_p "$ac_dir/$ac_word" || continue
19247 ac_cv_prog_gnat_exists="yes"
19248 echo "$as_me:19248: found $ac_dir/$ac_word" >&5
19249 break
19250 done
19251
19252   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19253 fi
19254 fi
19255 gnat_exists=$ac_cv_prog_gnat_exists
19256 if test -n "$gnat_exists"; then
19257   echo "$as_me:19257: result: $gnat_exists" >&5
19258 echo "${ECHO_T}$gnat_exists" >&6
19259 else
19260   echo "$as_me:19260: result: no" >&5
19261 echo "${ECHO_T}no" >&6
19262 fi
19263
19264 if test "$ac_cv_prog_gnat_exists" = no; then
19265    cf_ada_make=
19266    cf_cv_prog_gnat_correct=no
19267 else
19268
19269 echo "$as_me:19269: checking for gnat version" >&5
19270 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19271 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19272         grep '[0-9].[0-9][0-9]*' |\
19273     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19274 echo "$as_me:19274: result: $cf_gnat_version" >&5
19275 echo "${ECHO_T}$cf_gnat_version" >&6
19276
19277 case $cf_gnat_version in #(vi
19278 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19279         cf_cv_prog_gnat_correct=yes
19280         ;;
19281 *)
19282         { echo "$as_me:19282: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19283 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19284         cf_cv_prog_gnat_correct=no
19285         ;;
19286 esac
19287
19288    # Extract the first word of "m4", so it can be a program name with args.
19289 set dummy m4; ac_word=$2
19290 echo "$as_me:19290: checking for $ac_word" >&5
19291 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19292 if test "${ac_cv_prog_M4_exists+set}" = set; then
19293   echo $ECHO_N "(cached) $ECHO_C" >&6
19294 else
19295   if test -n "$M4_exists"; then
19296   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19297 else
19298   ac_save_IFS=$IFS; IFS=$ac_path_separator
19299 ac_dummy="$PATH"
19300 for ac_dir in $ac_dummy; do
19301   IFS=$ac_save_IFS
19302   test -z "$ac_dir" && ac_dir=.
19303   $as_executable_p "$ac_dir/$ac_word" || continue
19304 ac_cv_prog_M4_exists="yes"
19305 echo "$as_me:19305: found $ac_dir/$ac_word" >&5
19306 break
19307 done
19308
19309   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19310 fi
19311 fi
19312 M4_exists=$ac_cv_prog_M4_exists
19313 if test -n "$M4_exists"; then
19314   echo "$as_me:19314: result: $M4_exists" >&5
19315 echo "${ECHO_T}$M4_exists" >&6
19316 else
19317   echo "$as_me:19317: result: no" >&5
19318 echo "${ECHO_T}no" >&6
19319 fi
19320
19321    if test "$ac_cv_prog_M4_exists" = no; then
19322       cf_cv_prog_gnat_correct=no
19323       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19324    fi
19325    if test "$cf_cv_prog_gnat_correct" = yes; then
19326       echo "$as_me:19326: checking if GNAT works" >&5
19327 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19328
19329 rm -rf conftest* *~conftest*
19330 cat >>conftest.ads <<CF_EOF
19331 procedure conftest;
19332 CF_EOF
19333 cat >>conftest.adb <<CF_EOF
19334 with Text_IO;
19335 with GNAT.OS_Lib;
19336 procedure conftest is
19337 begin
19338    Text_IO.Put ("Hello World");
19339    Text_IO.New_Line;
19340    GNAT.OS_Lib.OS_Exit (0);
19341 end conftest;
19342 CF_EOF
19343 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19344    if ( ./conftest 1>&5 2>&1 ) ; then
19345       cf_cv_prog_gnat_correct=yes
19346    else
19347       cf_cv_prog_gnat_correct=no
19348    fi
19349 else
19350    cf_cv_prog_gnat_correct=no
19351 fi
19352 rm -rf conftest* *~conftest*
19353
19354       echo "$as_me:19354: result: $cf_cv_prog_gnat_correct" >&5
19355 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19356    fi
19357 fi
19358
19359                 if test "$cf_cv_prog_gnat_correct" = yes; then
19360
19361         ADAFLAGS="$ADAFLAGS -gnatpn"
19362
19363         echo "$as_me:19363: checking optimization options for ADAFLAGS" >&5
19364 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19365         case "$CFLAGS" in
19366         *-g*)
19367
19368         ADAFLAGS="$ADAFLAGS -g"
19369
19370                 ;;
19371         esac
19372         case "$CFLAGS" in
19373         *-O*)
19374                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19375
19376         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19377
19378                 ;;
19379         esac
19380         echo "$as_me:19380: result: $ADAFLAGS" >&5
19381 echo "${ECHO_T}$ADAFLAGS" >&6
19382
19383 echo "$as_me:19383: checking if GNAT supports generics" >&5
19384 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19385 case $cf_gnat_version in #(vi
19386 3.[1-9]*|[4-9].*) #(vi
19387         cf_gnat_generics=yes
19388         ;;
19389 *)
19390         cf_gnat_generics=no
19391         ;;
19392 esac
19393 echo "$as_me:19393: result: $cf_gnat_generics" >&5
19394 echo "${ECHO_T}$cf_gnat_generics" >&6
19395
19396 if test "$cf_gnat_generics" = yes
19397 then
19398         cf_compile_generics=generics
19399         cf_generic_objects="\${GENOBJS}"
19400 else
19401         cf_compile_generics=
19402         cf_generic_objects=
19403 fi
19404
19405 echo "$as_me:19405: checking if GNAT supports SIGINT" >&5
19406 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19407 if test "${cf_cv_gnat_sigint+set}" = set; then
19408   echo $ECHO_N "(cached) $ECHO_C" >&6
19409 else
19410
19411 rm -rf conftest* *~conftest*
19412 cat >>conftest.ads <<CF_EOF
19413 with Ada.Interrupts.Names;
19414
19415 package ConfTest is
19416
19417    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19418    pragma Unreserve_All_Interrupts;
19419    pragma Warnings (On);
19420
19421    protected Process is
19422       procedure Stop;
19423       function Continue return Boolean;
19424       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19425    private
19426       Done : Boolean := False;
19427    end Process;
19428
19429 end ConfTest;
19430 CF_EOF
19431 cat >>conftest.adb <<CF_EOF
19432 package body ConfTest is
19433    protected body Process is
19434       procedure Stop is
19435       begin
19436          Done := True;
19437       end Stop;
19438       function Continue return Boolean is
19439       begin
19440          return not Done;
19441       end Continue;
19442    end Process;
19443 end ConfTest;
19444 CF_EOF
19445 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19446       cf_cv_gnat_sigint=yes
19447 else
19448    cf_cv_gnat_sigint=no
19449 fi
19450 rm -rf conftest* *~conftest*
19451
19452 fi
19453 echo "$as_me:19453: result: $cf_cv_gnat_sigint" >&5
19454 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19455
19456 if test $cf_cv_gnat_sigint = yes ; then
19457         USE_GNAT_SIGINT=""
19458 else
19459         USE_GNAT_SIGINT="#"
19460 fi
19461
19462 echo "$as_me:19462: checking if GNAT pragma Unreferenced works" >&5
19463 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19464 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19465   echo $ECHO_N "(cached) $ECHO_C" >&6
19466 else
19467
19468 rm -rf conftest* *~conftest*
19469 cat >>conftest.ads <<CF_EOF
19470 procedure conftest;
19471 CF_EOF
19472 cat >>conftest.adb <<CF_EOF
19473 with Text_IO;
19474 with GNAT.OS_Lib;
19475 procedure conftest is
19476    test : Integer;
19477    pragma Unreferenced (test);
19478 begin
19479    test := 1;
19480    Text_IO.Put ("Hello World");
19481    Text_IO.New_Line;
19482    GNAT.OS_Lib.OS_Exit (0);
19483 end conftest;
19484 CF_EOF
19485 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19486       cf_cv_pragma_unreferenced=yes
19487 else
19488    cf_cv_pragma_unreferenced=no
19489 fi
19490 rm -rf conftest* *~conftest*
19491
19492 fi
19493 echo "$as_me:19493: result: $cf_cv_pragma_unreferenced" >&5
19494 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19495
19496 # if the pragma is supported, use it (needed in the Trace code).
19497 if test $cf_cv_pragma_unreferenced = yes ; then
19498         PRAGMA_UNREF=TRUE
19499 else
19500         PRAGMA_UNREF=FALSE
19501 fi
19502
19503 cf_gnat_libraries=no
19504 cf_gnat_projects=no
19505
19506 echo "$as_me:19506: checking if GNAT supports project files" >&5
19507 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19508 case $cf_gnat_version in #(vi
19509 3.[0-9]*) #(vi
19510         ;;
19511 *)
19512         case $cf_cv_system_name in #(vi
19513         cygwin*) #(vi
19514                 ;;
19515         *)
19516                 mkdir conftest.src conftest.bin conftest.lib
19517                 cd conftest.src
19518                 rm -rf conftest* *~conftest*
19519                 cat >>library.gpr <<CF_EOF
19520 project Library is
19521   Kind := External ("LIB_KIND");
19522   for Library_Name use "ConfTest";
19523   for Object_Dir use ".";
19524   for Library_ALI_Dir use External("LIBRARY_DIR");
19525   for Library_Version use External ("SONAME");
19526   for Library_Kind use Kind;
19527   for Library_Dir use External("BUILD_DIR");
19528   Source_Dir := External ("SOURCE_DIR");
19529   for Source_Dirs use (Source_Dir);
19530   package Compiler is
19531      for Default_Switches ("Ada") use
19532        ("-g",
19533         "-O2",
19534         "-gnatafno",
19535         "-gnatVa",   -- All validity checks
19536         "-gnatwa");  -- Activate all optional errors
19537   end Compiler;
19538 end Library;
19539 CF_EOF
19540                 cat >>confpackage.ads <<CF_EOF
19541 package ConfPackage is
19542    procedure conftest;
19543 end ConfPackage;
19544 CF_EOF
19545                 cat >>confpackage.adb <<CF_EOF
19546 with Text_IO;
19547 package body ConfPackage is
19548    procedure conftest is
19549    begin
19550       Text_IO.Put ("Hello World");
19551       Text_IO.New_Line;
19552    end conftest;
19553 end ConfPackage;
19554 CF_EOF
19555                 if ( $cf_ada_make $ADAFLAGS \
19556                                 -Plibrary.gpr \
19557                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19558                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19559                                 -XSOURCE_DIR=`pwd` \
19560                                 -XSONAME=libConfTest.so.1 \
19561                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19562                         cf_gnat_projects=yes
19563                 fi
19564                 cd ..
19565                 if test -f conftest.lib/confpackage.ali
19566                 then
19567                         cf_gnat_libraries=yes
19568                 fi
19569                 rm -rf conftest* *~conftest*
19570                 ;;
19571         esac
19572         ;;
19573 esac
19574 echo "$as_me:19574: result: $cf_gnat_projects" >&5
19575 echo "${ECHO_T}$cf_gnat_projects" >&6
19576
19577 if test $cf_gnat_projects = yes
19578 then
19579         echo "$as_me:19579: checking if GNAT supports libraries" >&5
19580 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19581         echo "$as_me:19581: result: $cf_gnat_libraries" >&5
19582 echo "${ECHO_T}$cf_gnat_libraries" >&6
19583 fi
19584
19585 if test "$cf_gnat_projects" = yes
19586 then
19587         USE_OLD_MAKERULES="#"
19588         USE_GNAT_PROJECTS=""
19589 else
19590         USE_OLD_MAKERULES=""
19591         USE_GNAT_PROJECTS="#"
19592 fi
19593
19594 if test "$cf_gnat_libraries" = yes
19595 then
19596         USE_GNAT_LIBRARIES=""
19597 else
19598         USE_GNAT_LIBRARIES="#"
19599 fi
19600
19601 echo "$as_me:19601: checking for ada-compiler" >&5
19602 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19603
19604 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19605 if test "${with_ada_compiler+set}" = set; then
19606   withval="$with_ada_compiler"
19607   cf_ada_compiler=$withval
19608 else
19609   cf_ada_compiler=gnatmake
19610 fi;
19611
19612 echo "$as_me:19612: result: $cf_ada_compiler" >&5
19613 echo "${ECHO_T}$cf_ada_compiler" >&6
19614
19615                         cf_ada_package=terminal_interface
19616
19617 echo "$as_me:19617: checking for ada-include" >&5
19618 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19619
19620 # Check whether --with-ada-include or --without-ada-include was given.
19621 if test "${with_ada_include+set}" = set; then
19622   withval="$with_ada_include"
19623
19624 else
19625   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19626 fi; if test -n "$prefix/share/ada/adainclude" ; then
19627
19628 if test "x$prefix" != xNONE; then
19629   cf_path_syntax="$prefix"
19630 else
19631   cf_path_syntax="$ac_default_prefix"
19632 fi
19633
19634 case ".$withval" in #(vi
19635 .\$\(*\)*|.\'*\'*) #(vi
19636   ;;
19637 ..|./*|.\\*) #(vi
19638   ;;
19639 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19640   ;;
19641 .\${*prefix}*|.\${*dir}*) #(vi
19642   eval withval="$withval"
19643   case ".$withval" in #(vi
19644   .NONE/*)
19645     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19646     ;;
19647   esac
19648   ;; #(vi
19649 .no|.NONE/*)
19650   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19651   ;;
19652 *)
19653   { { echo "$as_me:19653: error: expected a pathname, not \"$withval\"" >&5
19654 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19655    { (exit 1); exit 1; }; }
19656   ;;
19657 esac
19658
19659 fi
19660 ADA_INCLUDE="$withval"
19661
19662 echo "$as_me:19662: result: $ADA_INCLUDE" >&5
19663 echo "${ECHO_T}$ADA_INCLUDE" >&6
19664
19665 echo "$as_me:19665: checking for ada-objects" >&5
19666 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19667
19668 # Check whether --with-ada-objects or --without-ada-objects was given.
19669 if test "${with_ada_objects+set}" = set; then
19670   withval="$with_ada_objects"
19671
19672 else
19673   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19674 fi; if test -n "$prefix/lib/ada/adalib" ; then
19675
19676 if test "x$prefix" != xNONE; then
19677   cf_path_syntax="$prefix"
19678 else
19679   cf_path_syntax="$ac_default_prefix"
19680 fi
19681
19682 case ".$withval" in #(vi
19683 .\$\(*\)*|.\'*\'*) #(vi
19684   ;;
19685 ..|./*|.\\*) #(vi
19686   ;;
19687 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19688   ;;
19689 .\${*prefix}*|.\${*dir}*) #(vi
19690   eval withval="$withval"
19691   case ".$withval" in #(vi
19692   .NONE/*)
19693     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19694     ;;
19695   esac
19696   ;; #(vi
19697 .no|.NONE/*)
19698   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19699   ;;
19700 *)
19701   { { echo "$as_me:19701: error: expected a pathname, not \"$withval\"" >&5
19702 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19703    { (exit 1); exit 1; }; }
19704   ;;
19705 esac
19706
19707 fi
19708 ADA_OBJECTS="$withval"
19709
19710 echo "$as_me:19710: result: $ADA_OBJECTS" >&5
19711 echo "${ECHO_T}$ADA_OBJECTS" >&6
19712
19713 echo "$as_me:19713: checking if an Ada95 shared-library should be built" >&5
19714 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19715
19716 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19717 if test "${with_ada_sharedlib+set}" = set; then
19718   withval="$with_ada_sharedlib"
19719   with_ada_sharedlib=$withval
19720 else
19721   with_ada_sharedlib=no
19722 fi;
19723 echo "$as_me:19723: result: $with_ada_sharedlib" >&5
19724 echo "${ECHO_T}$with_ada_sharedlib" >&6
19725
19726 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19727 MAKE_ADA_SHAREDLIB="#"
19728
19729 if test "x$with_ada_sharedlib" != xno
19730 then
19731         MAKE_ADA_SHAREDLIB=
19732         if test "x$with_ada_sharedlib" != xyes
19733         then
19734                 ADA_SHAREDLIB="$with_ada_sharedlib"
19735         fi
19736 fi
19737
19738                 fi
19739         fi
19740 else
19741         cf_with_ada=no
19742 fi
19743
19744 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19745 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19746 ###
19747 ### ticlib modules may be a separate library, otherwise contained in termlib.
19748 ### termlib modules may be a separate library, otherwise contained in ncurses.
19749 ###
19750 ### The of "+" or " " between the tokens controls the way the script
19751 ### chooses to split module lists into libraries.
19752 ###
19753 ### (see CF_LIB_RULES).
19754 echo "$as_me:19754: checking for library subsets" >&5
19755 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19756 LIB_SUBSETS=
19757
19758 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19759         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19760         if test "$with_ticlib" != no ; then
19761                 LIB_SUBSETS="${LIB_SUBSETS} "
19762         else
19763                 LIB_SUBSETS="${LIB_SUBSETS}+"
19764         fi
19765 fi
19766
19767 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19768 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19769
19770 if test "$with_termlib" != no ; then
19771         LIB_SUBSETS="${LIB_SUBSETS} "
19772 else
19773         LIB_SUBSETS="${LIB_SUBSETS}+"
19774 fi
19775
19776 LIB_SUBSETS="${LIB_SUBSETS}base"
19777
19778 # Most term-driver calls are to tinfo, but some like init_pair are to the
19779 # base library (so it resides in base).
19780 if test "$with_term_driver" != no ; then
19781         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19782         case $cf_cv_system_name in #(vi
19783         *mingw32*) #(vi
19784                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19785                 ;;
19786         *) #(vi
19787                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19788                 ;;
19789         esac
19790 fi
19791
19792 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19793 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19794
19795 echo "$as_me:19795: result: $LIB_SUBSETS" >&5
19796 echo "${ECHO_T}$LIB_SUBSETS" >&6
19797
19798 ### Construct the list of include-directories to be generated
19799
19800 CPPFLAGS="$CPPFLAGS -I. -I../include"
19801 if test "$srcdir" != "."; then
19802         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19803 fi
19804 if test "$GCC" != yes; then
19805         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19806 elif test "$includedir" != "/usr/include"; then
19807         if test "$includedir" = '${prefix}/include' ; then
19808                 if test $prefix != /usr ; then
19809                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19810                 fi
19811         else
19812                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19813         fi
19814 fi
19815
19816 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19817 if test "$srcdir" != "."; then
19818         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19819 fi
19820 if test "$GCC" != yes; then
19821         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19822 elif test "$includedir" != "/usr/include"; then
19823         if test "$includedir" = '${prefix}/include' ; then
19824                 if test $prefix != /usr ; then
19825                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19826                 fi
19827         else
19828                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19829         fi
19830 fi
19831
19832 ### Build up pieces for makefile rules
19833 echo "$as_me:19833: checking default library suffix" >&5
19834 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19835
19836         case $DFT_LWR_MODEL in
19837         libtool) DFT_ARG_SUFFIX=''   ;;
19838         normal)  DFT_ARG_SUFFIX=''   ;;
19839         debug)   DFT_ARG_SUFFIX='_g' ;;
19840         profile) DFT_ARG_SUFFIX='_p' ;;
19841         shared)  DFT_ARG_SUFFIX=''   ;;
19842         esac
19843         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19844 echo "$as_me:19844: result: $DFT_ARG_SUFFIX" >&5
19845 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19846
19847 echo "$as_me:19847: checking default library-dependency suffix" >&5
19848 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19849
19850         case $DFT_LWR_MODEL in #(vi
19851         libtool) #(vi
19852                 DFT_LIB_SUFFIX='.la'
19853                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19854                 ;;
19855         normal) #(vi
19856                 DFT_LIB_SUFFIX='.a'
19857                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19858                 ;;
19859         debug) #(vi
19860                 DFT_LIB_SUFFIX='_g.a'
19861                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19862                 ;;
19863         profile) #(vi
19864                 DFT_LIB_SUFFIX='_p.a'
19865                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19866                 ;;
19867         shared) #(vi
19868                 case $cf_cv_system_name in
19869                 aix[5-7]*) #(vi
19870                         DFT_LIB_SUFFIX='.a'
19871                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19872                         ;;
19873                 cygwin*|mingw*) #(vi
19874                         DFT_LIB_SUFFIX='.dll'
19875                         DFT_DEP_SUFFIX='.dll.a'
19876                         ;;
19877                 darwin*) #(vi
19878                         DFT_LIB_SUFFIX='.dylib'
19879                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19880                         ;;
19881                 hpux*) #(vi
19882                         case $target in
19883                         ia64*) #(vi
19884                                 DFT_LIB_SUFFIX='.so'
19885                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19886                                 ;;
19887                         *) #(vi
19888                                 DFT_LIB_SUFFIX='.sl'
19889                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19890                                 ;;
19891                         esac
19892                         ;;
19893                 *)      DFT_LIB_SUFFIX='.so'
19894                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19895                         ;;
19896                 esac
19897         esac
19898         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19899         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19900 echo "$as_me:19900: result: $DFT_DEP_SUFFIX" >&5
19901 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19902
19903 echo "$as_me:19903: checking default object directory" >&5
19904 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19905
19906         case $DFT_LWR_MODEL in
19907         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19908         normal)  DFT_OBJ_SUBDIR='objects' ;;
19909         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19910         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19911         shared)
19912                 case $cf_cv_system_name in #(vi
19913                 cygwin) #(vi
19914                         DFT_OBJ_SUBDIR='objects' ;;
19915                 *)
19916                         DFT_OBJ_SUBDIR='obj_s' ;;
19917                 esac
19918         esac
19919 echo "$as_me:19919: result: $DFT_OBJ_SUBDIR" >&5
19920 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19921
19922 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19923 if test "$cf_with_cxx" = yes ; then
19924 echo "$as_me:19924: checking c++ library-dependency suffix" >&5
19925 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19926 if test "$with_libtool" != "no"; then
19927         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19928 else
19929
19930         case normal in #(vi
19931         libtool) #(vi
19932                 CXX_LIB_SUFFIX='.la'
19933                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19934                 ;;
19935         normal) #(vi
19936                 CXX_LIB_SUFFIX='.a'
19937                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19938                 ;;
19939         debug) #(vi
19940                 CXX_LIB_SUFFIX='_g.a'
19941                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19942                 ;;
19943         profile) #(vi
19944                 CXX_LIB_SUFFIX='_p.a'
19945                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19946                 ;;
19947         shared) #(vi
19948                 case $cf_cv_system_name in
19949                 aix[5-7]*) #(vi
19950                         CXX_LIB_SUFFIX='.a'
19951                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19952                         ;;
19953                 cygwin*|mingw*) #(vi
19954                         CXX_LIB_SUFFIX='.dll'
19955                         CXX_DEP_SUFFIX='.dll.a'
19956                         ;;
19957                 darwin*) #(vi
19958                         CXX_LIB_SUFFIX='.dylib'
19959                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19960                         ;;
19961                 hpux*) #(vi
19962                         case $target in
19963                         ia64*) #(vi
19964                                 CXX_LIB_SUFFIX='.so'
19965                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19966                                 ;;
19967                         *) #(vi
19968                                 CXX_LIB_SUFFIX='.sl'
19969                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19970                                 ;;
19971                         esac
19972                         ;;
19973                 *)      CXX_LIB_SUFFIX='.so'
19974                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19975                         ;;
19976                 esac
19977         esac
19978         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19979         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19980 fi
19981 echo "$as_me:19981: result: $CXX_LIB_SUFFIX" >&5
19982 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19983
19984 fi
19985
19986 # do not want -ldl in build except as needed for -lncurses dependency
19987 if test "$with_dlsym" = yes ; then
19988 if test $DFT_LWR_MODEL = shared || \
19989    test $DFT_LWR_MODEL = libtool ; then
19990
19991 # remove dl library from $LIBS
19992 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19993
19994 fi
19995 fi
19996 ### Set up low-level terminfo dependencies for makefiles.
19997
19998 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19999 # do not need libdl
20000 TICS_LIST=
20001 if test "$with_dlsym" = yes ; then
20002
20003 # remove dl library from $SHLIB_LIST
20004 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20005
20006 fi
20007
20008 if test "$with_ticlib" != no ; then
20009
20010         if test "$with_ticlib" != yes ; then
20011                 TICS_NAME=$with_ticlib
20012                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20013                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20014                 TICS_LIB_SUFFIX="${with_ticlib}"
20015         else
20016                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20017                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20018                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20019         fi
20020         TICS_LDFLAGS="-L${LIB_DIR}"
20021         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20022 else
20023         TICS_LDFLAGS="-L${LIB_DIR}"
20024         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20025 fi
20026
20027 if test "$with_termlib" != no ; then
20028
20029         if test "$with_termlib" != yes ; then
20030                 TINFO_NAME=$with_termlib
20031                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20032                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20033                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20034                 TINFO_LIB_SUFFIX="${with_termlib}"
20035         else
20036                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20037                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20038                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20039                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20040         fi
20041
20042         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20043         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20044         if test "$DFT_LWR_MODEL" = "libtool"; then
20045                 TEST_ARGS="${TEST_DEPS}"
20046                 TEST_ARG2="${TEST_DEP2}"
20047                 TINFO_LDFLAGS="-L${LIB_DIR}"
20048                 TINFO_LIBS="$TEST_ARGS"
20049                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20050                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20051         else
20052                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20053                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20054                 if test "x$with_term_driver" != xno ; then
20055                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20056                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20057                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20058                 else
20059                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20060                         TINFO_LIBS="$TEST_ARGS"
20061                 fi
20062                 TINFO_LDFLAGS="-L${LIB_DIR}"
20063                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20064         fi
20065 else
20066         # the next lines are needed for linking libtic over libncurses
20067         TINFO_NAME=${LIB_NAME}
20068         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20069         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20070         if test "$with_tic_depends" = yes ; then
20071                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20072         else
20073                 TICS_LIST="$SHLIB_LIST"
20074         fi
20075
20076         TINFO_LDFLAGS="-L${LIB_DIR}"
20077         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20078 fi
20079
20080 if test "$DFT_LWR_MODEL" = shared ; then
20081         case $cf_cv_system_name in #(vi
20082         cygwin*)
20083                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20084                 TINFO_SUFFIX=.dll
20085                 ;;
20086         esac
20087 fi
20088
20089 if test "$with_dlsym" = yes ; then
20090
20091 # remove dl library from $TICS_LIST
20092 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20093
20094 fi
20095
20096 if test "$DFT_LWR_MODEL" = "libtool"; then
20097     OBJEXT=lo
20098 fi
20099
20100 # needed for Ada95
20101 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20102
20103 case $DFT_LWR_MODEL in
20104 normal|debug|profile)
20105
20106 if test "$GCC" = yes ; then
20107         case $cf_cv_system_name in #(
20108         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20109                 LDFLAGS_STATIC=
20110                 LDFLAGS_SHARED=
20111                 ;;
20112     *)  #( normally, except when broken
20113         LDFLAGS_STATIC=-static
20114         LDFLAGS_SHARED=-dynamic
20115         ;;
20116     esac
20117 else
20118         case $cf_cv_system_name in #(
20119         aix[4-7]*)      #( from ld manpage
20120                 LDFLAGS_STATIC=-bstatic
20121                 LDFLAGS_SHARED=-bdynamic
20122                 ;;
20123         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20124                 # We could also use just "archive" and "shared".
20125                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20126                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20127                 ;;
20128         irix*)          #( from ld manpage IRIX64
20129                 LDFLAGS_STATIC=-Bstatic
20130                 LDFLAGS_SHARED=-Bdynamic
20131                 ;;
20132         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20133                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20134                 LDFLAGS_STATIC=-noso
20135                 LDFLAGS_SHARED=-so_archive
20136                 ;;
20137         solaris2*)
20138                 LDFLAGS_STATIC=-Bstatic
20139                 LDFLAGS_SHARED=-Bdynamic
20140                 ;;
20141         esac
20142 fi
20143
20144 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20145 then
20146         echo "$as_me:20146: checking if linker supports switching between static/dynamic" >&5
20147 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20148
20149         rm -f libconftest.a
20150         cat >conftest.$ac_ext <<EOF
20151 #line 20151 "configure"
20152 #include <stdio.h>
20153 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20154 EOF
20155         if { (eval echo "$as_me:20155: \"$ac_compile\"") >&5
20156   (eval $ac_compile) 2>&5
20157   ac_status=$?
20158   echo "$as_me:20158: \$? = $ac_status" >&5
20159   (exit $ac_status); } ; then
20160                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20161                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20162         fi
20163         rm -f conftest.*
20164
20165         cf_save_LIBS="$LIBS"
20166
20167         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20168         cat >conftest.$ac_ext <<_ACEOF
20169 #line 20169 "configure"
20170 #include "confdefs.h"
20171
20172 #line 20172 "configure"
20173 #include <stdio.h>
20174 int cf_ldflags_static(FILE *fp);
20175
20176 int
20177 main ()
20178 {
20179
20180         return cf_ldflags_static(stdin);
20181
20182   ;
20183   return 0;
20184 }
20185 _ACEOF
20186 rm -f conftest.$ac_objext conftest$ac_exeext
20187 if { (eval echo "$as_me:20187: \"$ac_link\"") >&5
20188   (eval $ac_link) 2>&5
20189   ac_status=$?
20190   echo "$as_me:20190: \$? = $ac_status" >&5
20191   (exit $ac_status); } &&
20192          { ac_try='test -s conftest$ac_exeext'
20193   { (eval echo "$as_me:20193: \"$ac_try\"") >&5
20194   (eval $ac_try) 2>&5
20195   ac_status=$?
20196   echo "$as_me:20196: \$? = $ac_status" >&5
20197   (exit $ac_status); }; }; then
20198
20199         # some linkers simply ignore the -dynamic
20200         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20201         *static*) # (vi
20202                 cf_ldflags_static=no
20203                 ;;
20204         *)
20205                 cf_ldflags_static=yes
20206                 ;;
20207         esac
20208
20209 else
20210   echo "$as_me: failed program was:" >&5
20211 cat conftest.$ac_ext >&5
20212 cf_ldflags_static=no
20213 fi
20214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20215
20216         rm -f libconftest.*
20217         LIBS="$cf_save_LIBS"
20218
20219         echo "$as_me:20219: result: $cf_ldflags_static" >&5
20220 echo "${ECHO_T}$cf_ldflags_static" >&6
20221
20222         if test $cf_ldflags_static != yes
20223         then
20224                 LDFLAGS_STATIC=
20225                 LDFLAGS_SHARED=
20226         fi
20227 else
20228         LDFLAGS_STATIC=
20229         LDFLAGS_SHARED=
20230 fi
20231
20232         ;;
20233 esac
20234
20235 echo "$as_me:20235: checking where we will install curses.h" >&5
20236 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20237 test "$with_overwrite" = no && \
20238 test "x$includedir" = 'x${prefix}/include' && \
20239         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20240 echo "$as_me:20240: result: $includedir" >&5
20241 echo "${ECHO_T}$includedir" >&6
20242
20243 ### Resolve a conflict between normal and wide-curses by forcing applications
20244 ### that will need libutf8 to add it to their configure script.
20245 if test "$with_overwrite" != no ; then
20246 if test "$NCURSES_LIBUTF8" = 1 ; then
20247         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20248         { echo "$as_me:20248: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20249 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20250 fi
20251 fi
20252 WITH_OVERWRITE=$with_overwrite
20253
20254 # used to separate tack out of the tree
20255 NCURSES_TREE=
20256
20257 ### predefined stuff for the test programs
20258 cat >>confdefs.h <<\EOF
20259 #define HAVE_SLK_COLOR 1
20260 EOF
20261
20262 ### Construct the list of subdirectories for which we'll customize makefiles
20263 ### with the appropriate compile-rules.
20264
20265 echo "$as_me:20265: checking for src modules" >&5
20266 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20267
20268 # dependencies and linker-arguments for test-programs
20269 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20270 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20271 if test "$DFT_LWR_MODEL" = "libtool"; then
20272         TEST_ARGS="${TEST_DEPS}"
20273         TEST_ARG2="${TEST_DEP2}"
20274 else
20275         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20276         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20277 fi
20278
20279 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20280 cf_cv_src_modules=
20281 for cf_dir in $modules_to_build
20282 do
20283         if test -f $srcdir/$cf_dir/modules; then
20284
20285                 # We may/may not have tack in the distribution, though the
20286                 # makefile is.
20287                 if test $cf_dir = tack ; then
20288                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20289                                 continue
20290                         fi
20291                 fi
20292
20293                 if test -z "$cf_cv_src_modules"; then
20294                         cf_cv_src_modules=$cf_dir
20295                 else
20296                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20297                 fi
20298
20299                 # Make the ncurses_cfg.h file record the library interface files as
20300                 # well.  These are header files that are the same name as their
20301                 # directory.  Ncurses is the only library that does not follow
20302                 # that pattern.
20303                 if test $cf_dir = tack ; then
20304                         continue
20305                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20306
20307 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20308
20309                         cat >>confdefs.h <<EOF
20310 #define HAVE_${cf_have_include}_H 1
20311 EOF
20312
20313                         cat >>confdefs.h <<EOF
20314 #define HAVE_LIB${cf_have_include} 1
20315 EOF
20316
20317                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20318                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20319                         if test "$DFT_LWR_MODEL" = "libtool"; then
20320                                 TEST_ARGS="${TEST_DEPS}"
20321                                 TEST_ARG2="${TEST_DEP2}"
20322                         else
20323                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20324                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20325                         fi
20326                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20327                 fi
20328         fi
20329 done
20330 echo "$as_me:20330: result: $cf_cv_src_modules" >&5
20331 echo "${ECHO_T}$cf_cv_src_modules" >&6
20332
20333 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20334 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20335
20336 SRC_SUBDIRS=
20337 if test "x$cf_with_manpages" != xno ; then
20338         SRC_SUBDIRS="$SRC_SUBDIRS man"
20339 fi
20340 SRC_SUBDIRS="$SRC_SUBDIRS include"
20341 for cf_dir in $cf_cv_src_modules
20342 do
20343         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20344 done
20345 if test "x$cf_with_tests" != "xno" ; then
20346         SRC_SUBDIRS="$SRC_SUBDIRS test"
20347 fi
20348 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20349 if test "$cf_with_cxx_binding" != no; then
20350         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20351         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20352 fi
20353
20354 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20355 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20356
20357 ADA_SUBDIRS=
20358 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20359         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20360         ADA_SUBDIRS="gen src"
20361         if test "x$cf_with_tests" != "xno" ; then
20362                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20363         fi
20364 fi
20365
20366 SUB_MAKEFILES=
20367 for cf_dir in $SRC_SUBDIRS
20368 do
20369         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20370 done
20371
20372 if test -n "$ADA_SUBDIRS"; then
20373         for cf_dir in $ADA_SUBDIRS
20374         do
20375                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20376         done
20377
20378 fi
20379
20380 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20381    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20382    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20383 fi
20384
20385 DIRS_TO_MAKE="lib"
20386 for cf_item in $cf_list_models
20387 do
20388
20389         case $cf_item in
20390         libtool) cf_subdir='obj_lo'  ;;
20391         normal)  cf_subdir='objects' ;;
20392         debug)   cf_subdir='obj_g' ;;
20393         profile) cf_subdir='obj_p' ;;
20394         shared)
20395                 case $cf_cv_system_name in #(vi
20396                 cygwin) #(vi
20397                         cf_subdir='objects' ;;
20398                 *)
20399                         cf_subdir='obj_s' ;;
20400                 esac
20401         esac
20402
20403         for cf_item2 in $DIRS_TO_MAKE
20404         do
20405                 test $cf_item2 = $cf_subdir && break
20406         done
20407         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20408 done
20409 for cf_dir in $DIRS_TO_MAKE
20410 do
20411         test ! -d $cf_dir && mkdir $cf_dir
20412 done
20413
20414 # symbols that differ when compiling Ada95 by itself.
20415 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20416
20417 # values to use as strings
20418 cat >>confdefs.h <<EOF
20419 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20420 EOF
20421
20422 cat >>confdefs.h <<EOF
20423 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20424 EOF
20425
20426 ### Now that we're done running tests, add the compiler-warnings, if any
20427
20428 cf_fix_cppflags=no
20429 cf_new_cflags=
20430 cf_new_cppflags=
20431 cf_new_extra_cppflags=
20432
20433 for cf_add_cflags in $EXTRA_CFLAGS
20434 do
20435 case $cf_fix_cppflags in
20436 no)
20437         case $cf_add_cflags in #(vi
20438         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20439                 case $cf_add_cflags in
20440                 -D*)
20441                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20442
20443                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20444                                 && test -z "${cf_tst_cflags}" \
20445                                 && cf_fix_cppflags=yes
20446
20447                         if test $cf_fix_cppflags = yes ; then
20448                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20449                                 continue
20450                         elif test "${cf_tst_cflags}" = "\"'" ; then
20451                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20452                                 continue
20453                         fi
20454                         ;;
20455                 esac
20456                 case "$CPPFLAGS" in
20457                 *$cf_add_cflags) #(vi
20458                         ;;
20459                 *) #(vi
20460                         case $cf_add_cflags in #(vi
20461                         -D*)
20462                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20463
20464 CPPFLAGS=`echo "$CPPFLAGS" | \
20465         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20466                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20467
20468                                 ;;
20469                         esac
20470                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20471                         ;;
20472                 esac
20473                 ;;
20474         *)
20475                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20476                 ;;
20477         esac
20478         ;;
20479 yes)
20480         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20481
20482         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20483
20484         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20485                 && test -z "${cf_tst_cflags}" \
20486                 && cf_fix_cppflags=no
20487         ;;
20488 esac
20489 done
20490
20491 if test -n "$cf_new_cflags" ; then
20492
20493         CFLAGS="$CFLAGS $cf_new_cflags"
20494 fi
20495
20496 if test -n "$cf_new_cppflags" ; then
20497
20498         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20499 fi
20500
20501 if test -n "$cf_new_extra_cppflags" ; then
20502
20503         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20504 fi
20505
20506 ### Define substitutions for header files to avoid name-pollution
20507
20508 if test "$cf_cv_have_tcgetattr" = yes ; then
20509         HAVE_TCGETATTR=1
20510 else
20511         HAVE_TCGETATTR=0
20512 fi
20513
20514 if test "$ac_cv_header_termio_h" = yes ; then
20515         HAVE_TERMIO_H=1
20516 else
20517         HAVE_TERMIO_H=0
20518 fi
20519
20520 if test "$ac_cv_header_termios_h" = yes ; then
20521         HAVE_TERMIOS_H=1
20522 else
20523         HAVE_TERMIOS_H=0
20524 fi
20525
20526 ################################################################################
20527 test "$use_database" = yes && \
20528 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20529
20530 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20531 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20532
20533 if test x"$enable_pc_files" = xyes ; then \
20534 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20535 MAKE_PC_FILES=
20536 else
20537 MAKE_PC_FILES="#"
20538 fi
20539
20540 # Extract the first word of "tic", so it can be a program name with args.
20541 set dummy tic; ac_word=$2
20542 echo "$as_me:20542: checking for $ac_word" >&5
20543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20544 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20545   echo $ECHO_N "(cached) $ECHO_C" >&6
20546 else
20547   case $TIC_PATH in
20548   [\\/]* | ?:[\\/]*)
20549   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20550   ;;
20551   *)
20552   ac_save_IFS=$IFS; IFS=$ac_path_separator
20553 ac_dummy="$PATH:/usr/local/ncurses/bin"
20554 for ac_dir in $ac_dummy; do
20555   IFS=$ac_save_IFS
20556   test -z "$ac_dir" && ac_dir=.
20557   if $as_executable_p "$ac_dir/$ac_word"; then
20558    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20559    echo "$as_me:20559: found $ac_dir/$ac_word" >&5
20560    break
20561 fi
20562 done
20563
20564   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20565   ;;
20566 esac
20567 fi
20568 TIC_PATH=$ac_cv_path_TIC_PATH
20569
20570 if test -n "$TIC_PATH"; then
20571   echo "$as_me:20571: result: $TIC_PATH" >&5
20572 echo "${ECHO_T}$TIC_PATH" >&6
20573 else
20574   echo "$as_me:20574: result: no" >&5
20575 echo "${ECHO_T}no" >&6
20576 fi
20577
20578 if test -n "$FALLBACK_LIST"
20579 then
20580         if test "$TIC_PATH" = unknown
20581         then
20582                 { echo "$as_me:20582: WARNING: no tic program found for fallbacks" >&5
20583 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20584         fi
20585 fi
20586
20587 if test "x$cf_with_tests" != xno ; then
20588         MAKE_TESTS=
20589 else
20590         MAKE_TESTS="#"
20591 fi
20592
20593 ADAHTML_DIR=../../doc/html/ada
20594
20595 SUB_SCRIPTS=
20596
20597 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"
20598 ac_config_commands="$ac_config_commands default"
20599 cat >confcache <<\_ACEOF
20600 # This file is a shell script that caches the results of configure
20601 # tests run on this system so they can be shared between configure
20602 # scripts and configure runs, see configure's option --config-cache.
20603 # It is not useful on other systems.  If it contains results you don't
20604 # want to keep, you may remove or edit it.
20605 #
20606 # config.status only pays attention to the cache file if you give it
20607 # the --recheck option to rerun configure.
20608 #
20609 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20610 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20611 # following values.
20612
20613 _ACEOF
20614
20615 # The following way of writing the cache mishandles newlines in values,
20616 # but we know of no workaround that is simple, portable, and efficient.
20617 # So, don't put newlines in cache variables' values.
20618 # Ultrix sh set writes to stderr and can't be redirected directly,
20619 # and sets the high bit in the cache file unless we assign to the vars.
20620 {
20621   (set) 2>&1 |
20622     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20623     *ac_space=\ *)
20624       # `set' does not quote correctly, so add quotes (double-quote
20625       # substitution turns \\\\ into \\, and sed turns \\ into \).
20626       sed -n \
20627         "s/'/'\\\\''/g;
20628           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20629       ;;
20630     *)
20631       # `set' quotes correctly as required by POSIX, so do not add quotes.
20632       sed -n \
20633         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20634       ;;
20635     esac;
20636 } |
20637   sed '
20638      t clear
20639      : clear
20640      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20641      t end
20642      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20643      : end' >>confcache
20644 if cmp -s $cache_file confcache; then :; else
20645   if test -w $cache_file; then
20646     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20647     cat confcache >$cache_file
20648   else
20649     echo "not updating unwritable cache $cache_file"
20650   fi
20651 fi
20652 rm -f confcache
20653
20654 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20655 # Let make expand exec_prefix.
20656 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20657
20658 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20659 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20660 # trailing colons and then remove the whole line if VPATH becomes empty
20661 # (actually we leave an empty line to preserve line numbers).
20662 if test "x$srcdir" = x.; then
20663   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20664 s/:*\$(srcdir):*/:/;
20665 s/:*\${srcdir}:*/:/;
20666 s/:*@srcdir@:*/:/;
20667 s/^\([^=]*=[    ]*\):*/\1/;
20668 s/:*$//;
20669 s/^[^=]*=[      ]*$//;
20670 }'
20671 fi
20672
20673 DEFS=-DHAVE_CONFIG_H
20674
20675 : ${CONFIG_STATUS=./config.status}
20676 ac_clean_files_save=$ac_clean_files
20677 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20678 { echo "$as_me:20678: creating $CONFIG_STATUS" >&5
20679 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20680 cat >$CONFIG_STATUS <<_ACEOF
20681 #! $SHELL
20682 # Generated automatically by configure.
20683 # Run this file to recreate the current configuration.
20684 # Compiler output produced by configure, useful for debugging
20685 # configure, is in config.log if it exists.
20686
20687 debug=false
20688 SHELL=\${CONFIG_SHELL-$SHELL}
20689 ac_cs_invocation="\$0 \$@"
20690
20691 _ACEOF
20692
20693 cat >>$CONFIG_STATUS <<\_ACEOF
20694 # Be Bourne compatible
20695 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20696   emulate sh
20697   NULLCMD=:
20698 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20699   set -o posix
20700 fi
20701
20702 # Name of the executable.
20703 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20704
20705 if expr a : '\(a\)' >/dev/null 2>&1; then
20706   as_expr=expr
20707 else
20708   as_expr=false
20709 fi
20710
20711 rm -f conf$$ conf$$.exe conf$$.file
20712 echo >conf$$.file
20713 if ln -s conf$$.file conf$$ 2>/dev/null; then
20714   # We could just check for DJGPP; but this test a) works b) is more generic
20715   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20716   if test -f conf$$.exe; then
20717     # Don't use ln at all; we don't have any links
20718     as_ln_s='cp -p'
20719   else
20720     as_ln_s='ln -s'
20721   fi
20722 elif ln conf$$.file conf$$ 2>/dev/null; then
20723   as_ln_s=ln
20724 else
20725   as_ln_s='cp -p'
20726 fi
20727 rm -f conf$$ conf$$.exe conf$$.file
20728
20729 as_executable_p="test -f"
20730
20731 # Support unset when possible.
20732 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20733   as_unset=unset
20734 else
20735   as_unset=false
20736 fi
20737
20738 # NLS nuisances.
20739 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20740 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20741 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20742 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20743 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20744 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20745 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20746 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20747
20748 # IFS
20749 # We need space, tab and new line, in precisely that order.
20750 as_nl='
20751 '
20752 IFS="   $as_nl"
20753
20754 # CDPATH.
20755 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20756
20757 exec 6>&1
20758
20759 _ACEOF
20760
20761 # Files that config.status was made for.
20762 if test -n "$ac_config_files"; then
20763   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20764 fi
20765
20766 if test -n "$ac_config_headers"; then
20767   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20768 fi
20769
20770 if test -n "$ac_config_links"; then
20771   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20772 fi
20773
20774 if test -n "$ac_config_commands"; then
20775   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20776 fi
20777
20778 cat >>$CONFIG_STATUS <<\EOF
20779
20780 ac_cs_usage="\
20781 \`$as_me' instantiates files from templates according to the
20782 current configuration.
20783
20784 Usage: $0 [OPTIONS] [FILE]...
20785
20786   -h, --help       print this help, then exit
20787   -V, --version    print version number, then exit
20788   -d, --debug      don't remove temporary files
20789       --recheck    update $as_me by reconfiguring in the same conditions
20790   --file=FILE[:TEMPLATE]
20791                    instantiate the configuration file FILE
20792   --header=FILE[:TEMPLATE]
20793                    instantiate the configuration header FILE
20794
20795 Configuration files:
20796 $config_files
20797
20798 Configuration headers:
20799 $config_headers
20800
20801 Configuration commands:
20802 $config_commands
20803
20804 Report bugs to <dickey@invisible-island.net>."
20805 EOF
20806
20807 cat >>$CONFIG_STATUS <<EOF
20808 ac_cs_version="\\
20809 config.status
20810 configured by $0, generated by GNU Autoconf 2.52.20120310,
20811   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20812
20813 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20814 Free Software Foundation, Inc.
20815 This config.status script is free software; the Free Software Foundation
20816 gives unlimited permission to copy, distribute and modify it."
20817 srcdir=$srcdir
20818 INSTALL="$INSTALL"
20819 EOF
20820
20821 cat >>$CONFIG_STATUS <<\EOF
20822 # If no file are specified by the user, then we need to provide default
20823 # value.  By we need to know if files were specified by the user.
20824 ac_need_defaults=:
20825 while test $# != 0
20826 do
20827   case $1 in
20828   --*=*)
20829     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20830     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20831     shift
20832     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20833     shift
20834     ;;
20835   -*);;
20836   *) # This is not an option, so the user has probably given explicit
20837      # arguments.
20838      ac_need_defaults=false;;
20839   esac
20840
20841   case $1 in
20842   # Handling of the options.
20843 EOF
20844 cat >>$CONFIG_STATUS <<EOF
20845   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20846     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20847     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20848 EOF
20849 cat >>$CONFIG_STATUS <<\EOF
20850   --version | --vers* | -V )
20851     echo "$ac_cs_version"; exit 0 ;;
20852   --he | --h)
20853     # Conflict between --help and --header
20854     { { echo "$as_me:20854: error: ambiguous option: $1
20855 Try \`$0 --help' for more information." >&5
20856 echo "$as_me: error: ambiguous option: $1
20857 Try \`$0 --help' for more information." >&2;}
20858    { (exit 1); exit 1; }; };;
20859   --help | --hel | -h )
20860     echo "$ac_cs_usage"; exit 0 ;;
20861   --debug | --d* | -d )
20862     debug=: ;;
20863   --file | --fil | --fi | --f )
20864     shift
20865     CONFIG_FILES="$CONFIG_FILES $1"
20866     ac_need_defaults=false;;
20867   --header | --heade | --head | --hea )
20868     shift
20869     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20870     ac_need_defaults=false;;
20871
20872   # This is an error.
20873   -*) { { echo "$as_me:20873: error: unrecognized option: $1
20874 Try \`$0 --help' for more information." >&5
20875 echo "$as_me: error: unrecognized option: $1
20876 Try \`$0 --help' for more information." >&2;}
20877    { (exit 1); exit 1; }; } ;;
20878
20879   *) ac_config_targets="$ac_config_targets $1" ;;
20880
20881   esac
20882   shift
20883 done
20884
20885 exec 5>>config.log
20886 cat >&5 << _ACEOF
20887
20888 ## ----------------------- ##
20889 ## Running config.status.  ##
20890 ## ----------------------- ##
20891
20892 This file was extended by $as_me 2.52.20120310, executed with
20893   CONFIG_FILES    = $CONFIG_FILES
20894   CONFIG_HEADERS  = $CONFIG_HEADERS
20895   CONFIG_LINKS    = $CONFIG_LINKS
20896   CONFIG_COMMANDS = $CONFIG_COMMANDS
20897   > $ac_cs_invocation
20898 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20899
20900 _ACEOF
20901 EOF
20902
20903 cat >>$CONFIG_STATUS <<EOF
20904 #
20905 # INIT-COMMANDS section.
20906 #
20907
20908 ### Special initialization commands, used to pass information from the
20909 ### configuration-run into config.status
20910
20911 AWK="$AWK"
20912 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20913 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20914 ECHO_LD="$ECHO_LD"
20915 LDCONFIG="$LDCONFIG"
20916 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20917 LIB_NAME="$LIB_NAME"
20918 LIB_PREFIX="$LIB_PREFIX"
20919 LIB_SUBSETS="$LIB_SUBSETS"
20920 LIB_SUFFIX="$LIB_SUFFIX"
20921 LIB_TRACING="$LIB_TRACING"
20922 LN_S="$LN_S"
20923 MAKE_TERMINFO="$MAKE_TERMINFO"
20924 NCURSES_MAJOR="$NCURSES_MAJOR"
20925 NCURSES_MINOR="$NCURSES_MINOR"
20926 NCURSES_OSPEED="$NCURSES_OSPEED"
20927 NCURSES_PATCH="$NCURSES_PATCH"
20928 SRC_SUBDIRS="$SRC_SUBDIRS"
20929 TERMINFO="$TERMINFO"
20930 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20931 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20932 TICS_NAME="$TICS_NAME"
20933 TIC_PATH="$TIC_PATH"
20934 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20935 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20936 TINFO_NAME="$TINFO_NAME"
20937 TINFO_SUFFIX="$TINFO_SUFFIX"
20938 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20939 WITH_CURSES_H="$with_curses_h"
20940 WITH_ECHO="${enable_echo:=yes}"
20941 WITH_OVERWRITE="$with_overwrite"
20942 cf_LIST_MODELS="$cf_list_models"
20943 cf_cv_abi_version="$cf_cv_abi_version"
20944 cf_cv_do_relink="$cf_cv_do_relink"
20945 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20946 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20947 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20948 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20949 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20950 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20951 cf_cv_rel_version="$cf_cv_rel_version"
20952 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20953 cf_cv_shared_soname='$cf_cv_shared_soname'
20954 cf_cv_shlib_version="$cf_cv_shlib_version"
20955 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20956 cf_cv_system_name="$cf_cv_system_name"
20957 cf_cv_term_driver="$with_term_driver"
20958 cf_with_ada="$cf_with_ada"
20959 cf_with_cxx_binding="$cf_with_cxx_binding"
20960 cf_with_manpages="$cf_with_manpages"
20961 cf_with_tests="$cf_with_tests"
20962 host="$host"
20963 target="$target"
20964
20965 EOF
20966
20967 cat >>$CONFIG_STATUS <<\EOF
20968 for ac_config_target in $ac_config_targets
20969 do
20970   case "$ac_config_target" in
20971   # Handling of arguments.
20972   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20973   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20974   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20975   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20976   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20977   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20978   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20979   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20980   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20981   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20982   *) { { echo "$as_me:20982: error: invalid argument: $ac_config_target" >&5
20983 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20984    { (exit 1); exit 1; }; };;
20985   esac
20986 done
20987
20988 # If the user did not use the arguments to specify the items to instantiate,
20989 # then the envvar interface is used.  Set only those that are not.
20990 # We use the long form for the default assignment because of an extremely
20991 # bizarre bug on SunOS 4.1.3.
20992 if $ac_need_defaults; then
20993   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20994   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20995   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20996 fi
20997
20998 # Create a temporary directory, and hook for its removal unless debugging.
20999 $debug ||
21000 {
21001   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21002   trap '{ (exit 1); exit 1; }' 1 2 13 15
21003 }
21004
21005 # Create a (secure) tmp directory for tmp files.
21006 : ${TMPDIR=/tmp}
21007 {
21008   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21009   test -n "$tmp" && test -d "$tmp"
21010 }  ||
21011 {
21012   tmp=$TMPDIR/cs$$-$RANDOM
21013   (umask 077 && mkdir $tmp)
21014 } ||
21015 {
21016    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21017    { (exit 1); exit 1; }
21018 }
21019
21020 EOF
21021
21022 cat >>$CONFIG_STATUS <<EOF
21023
21024 #
21025 # CONFIG_FILES section.
21026 #
21027
21028 # No need to generate the scripts if there are no CONFIG_FILES.
21029 # This happens for instance when ./config.status config.h
21030 if test -n "\$CONFIG_FILES"; then
21031   # Protect against being on the right side of a sed subst in config.status.
21032   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21033    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21034 s,@SHELL@,$SHELL,;t t
21035 s,@exec_prefix@,$exec_prefix,;t t
21036 s,@prefix@,$prefix,;t t
21037 s,@program_transform_name@,$program_transform_name,;t t
21038 s,@bindir@,$bindir,;t t
21039 s,@sbindir@,$sbindir,;t t
21040 s,@libexecdir@,$libexecdir,;t t
21041 s,@datadir@,$datadir,;t t
21042 s,@sysconfdir@,$sysconfdir,;t t
21043 s,@sharedstatedir@,$sharedstatedir,;t t
21044 s,@localstatedir@,$localstatedir,;t t
21045 s,@libdir@,$libdir,;t t
21046 s,@includedir@,$includedir,;t t
21047 s,@oldincludedir@,$oldincludedir,;t t
21048 s,@infodir@,$infodir,;t t
21049 s,@mandir@,$mandir,;t t
21050 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21051 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21052 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21053 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21054 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21055 s,@build_alias@,$build_alias,;t t
21056 s,@host_alias@,$host_alias,;t t
21057 s,@target_alias@,$target_alias,;t t
21058 s,@ECHO_C@,$ECHO_C,;t t
21059 s,@ECHO_N@,$ECHO_N,;t t
21060 s,@ECHO_T@,$ECHO_T,;t t
21061 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21062 s,@DEFS@,$DEFS,;t t
21063 s,@LIBS@,$LIBS,;t t
21064 s,@top_builddir@,$top_builddir,;t t
21065 s,@EGREP@,$EGREP,;t t
21066 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21067 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21068 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21069 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21070 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21071 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21072 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21073 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21074 s,@build@,$build,;t t
21075 s,@build_cpu@,$build_cpu,;t t
21076 s,@build_vendor@,$build_vendor,;t t
21077 s,@build_os@,$build_os,;t t
21078 s,@host@,$host,;t t
21079 s,@host_cpu@,$host_cpu,;t t
21080 s,@host_vendor@,$host_vendor,;t t
21081 s,@host_os@,$host_os,;t t
21082 s,@target@,$target,;t t
21083 s,@target_cpu@,$target_cpu,;t t
21084 s,@target_vendor@,$target_vendor,;t t
21085 s,@target_os@,$target_os,;t t
21086 s,@CC@,$CC,;t t
21087 s,@CFLAGS@,$CFLAGS,;t t
21088 s,@LDFLAGS@,$LDFLAGS,;t t
21089 s,@CPPFLAGS@,$CPPFLAGS,;t t
21090 s,@ac_ct_CC@,$ac_ct_CC,;t t
21091 s,@EXEEXT@,$EXEEXT,;t t
21092 s,@OBJEXT@,$OBJEXT,;t t
21093 s,@CPP@,$CPP,;t t
21094 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21095 s,@PROG_EXT@,$PROG_EXT,;t t
21096 s,@LDCONFIG@,$LDCONFIG,;t t
21097 s,@CXX@,$CXX,;t t
21098 s,@CXXFLAGS@,$CXXFLAGS,;t t
21099 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21100 s,@AWK@,$AWK,;t t
21101 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21102 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21103 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21104 s,@LINT@,$LINT,;t t
21105 s,@LINT_OPTS@,$LINT_OPTS,;t t
21106 s,@LN_S@,$LN_S,;t t
21107 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21108 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21109 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21110 s,@SET_MAKE@,$SET_MAKE,;t t
21111 s,@CTAGS@,$CTAGS,;t t
21112 s,@ETAGS@,$ETAGS,;t t
21113 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21114 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21115 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21116 s,@RANLIB@,$RANLIB,;t t
21117 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21118 s,@LD@,$LD,;t t
21119 s,@ac_ct_LD@,$ac_ct_LD,;t t
21120 s,@AR@,$AR,;t t
21121 s,@ac_ct_AR@,$ac_ct_AR,;t t
21122 s,@ARFLAGS@,$ARFLAGS,;t t
21123 s,@DESTDIR@,$DESTDIR,;t t
21124 s,@BUILD_CC@,$BUILD_CC,;t t
21125 s,@BUILD_CPP@,$BUILD_CPP,;t t
21126 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21127 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21128 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21129 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21130 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21131 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21132 s,@cf_list_models@,$cf_list_models,;t t
21133 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21134 s,@LIBTOOL@,$LIBTOOL,;t t
21135 s,@LT_UNDEF@,$LT_UNDEF,;t t
21136 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21137 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21138 s,@LIB_CREATE@,$LIB_CREATE,;t t
21139 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21140 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21141 s,@LIB_PREP@,$LIB_PREP,;t t
21142 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21143 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21144 s,@LIB_LINK@,$LIB_LINK,;t t
21145 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21146 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21147 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21148 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21149 s,@TICS_NAME@,$TICS_NAME,;t t
21150 s,@TINFO_NAME@,$TINFO_NAME,;t t
21151 s,@LIB_NAME@,$LIB_NAME,;t t
21152 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21153 s,@CC_G_OPT@,$CC_G_OPT,;t t
21154 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21155 s,@LD_MODEL@,$LD_MODEL,;t t
21156 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21157 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21158 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21159 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21160 s,@LINK_PROGS@,$LINK_PROGS,;t t
21161 s,@LINK_TESTS@,$LINK_TESTS,;t t
21162 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21163 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21164 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21165 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21166 s,@RPATH_LIST@,$RPATH_LIST,;t t
21167 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21168 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21169 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21170 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21171 s,@XTERM_KBS@,$XTERM_KBS,;t t
21172 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21173 s,@TERMINFO@,$TERMINFO,;t t
21174 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21175 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21176 s,@TERMPATH@,$TERMPATH,;t t
21177 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21178 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21179 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21180 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21181 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21182 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21183 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21184 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21185 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21186 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21187 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21188 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21189 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21190 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21191 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21192 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21193 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21194 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21195 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21196 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21197 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21198 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21199 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21200 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21201 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21202 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21203 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21204 s,@PTHREAD@,$PTHREAD,;t t
21205 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21206 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21207 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21208 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21209 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21210 s,@ECHO_LT@,$ECHO_LT,;t t
21211 s,@ECHO_LD@,$ECHO_LD,;t t
21212 s,@RULE_CC@,$RULE_CC,;t t
21213 s,@SHOW_CC@,$SHOW_CC,;t t
21214 s,@ECHO_CC@,$ECHO_CC,;t t
21215 s,@ECHO_LINK@,$ECHO_LINK,;t t
21216 s,@ADAFLAGS@,$ADAFLAGS,;t t
21217 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21218 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21219 s,@ADA_TRACE@,$ADA_TRACE,;t t
21220 s,@MATH_LIB@,$MATH_LIB,;t t
21221 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21222 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21223 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21224 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21225 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21226 s,@TEST_LIBS@,$TEST_LIBS,;t t
21227 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21228 s,@CXXCPP@,$CXXCPP,;t t
21229 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21230 s,@CXX_AR@,$CXX_AR,;t t
21231 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21232 s,@CXXLIBS@,$CXXLIBS,;t t
21233 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21234 s,@gnat_exists@,$gnat_exists,;t t
21235 s,@M4_exists@,$M4_exists,;t t
21236 s,@cf_ada_make@,$cf_ada_make,;t t
21237 s,@cf_compile_generics@,$cf_compile_generics,;t t
21238 s,@cf_generic_objects@,$cf_generic_objects,;t t
21239 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21240 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21241 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21242 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21243 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21244 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21245 s,@cf_ada_package@,$cf_ada_package,;t t
21246 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21247 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21248 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21249 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21250 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21251 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21252 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21253 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21254 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21255 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21256 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21257 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21258 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21259 s,@TICS_LIBS@,$TICS_LIBS,;t t
21260 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21261 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21262 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21263 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21264 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21265 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21266 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21267 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21268 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21269 s,@TICS_LIST@,$TICS_LIST,;t t
21270 s,@TINFO_LIST@,$TINFO_LIST,;t t
21271 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21272 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21273 s,@TEST_ARGS@,$TEST_ARGS,;t t
21274 s,@TEST_DEPS@,$TEST_DEPS,;t t
21275 s,@TEST_ARG2@,$TEST_ARG2,;t t
21276 s,@TEST_DEP2@,$TEST_DEP2,;t t
21277 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21278 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21279 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21280 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21281 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21282 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21283 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21284 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21285 s,@cross_compiling@,$cross_compiling,;t t
21286 s,@TIC_PATH@,$TIC_PATH,;t t
21287 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21288 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21289 CEOF
21290
21291 EOF
21292
21293   cat >>$CONFIG_STATUS <<\EOF
21294   # Split the substitutions into bite-sized pieces for seds with
21295   # small command number limits, like on Digital OSF/1 and HP-UX.
21296   ac_max_sed_lines=48
21297   ac_sed_frag=1 # Number of current file.
21298   ac_beg=1 # First line for current file.
21299   ac_end=$ac_max_sed_lines # Line after last line for current file.
21300   ac_more_lines=:
21301   ac_sed_cmds=
21302   while $ac_more_lines; do
21303     if test $ac_beg -gt 1; then
21304       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21305     else
21306       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21307     fi
21308     if test ! -s $tmp/subs.frag; then
21309       ac_more_lines=false
21310     else
21311       # The purpose of the label and of the branching condition is to
21312       # speed up the sed processing (if there are no `@' at all, there
21313       # is no need to browse any of the substitutions).
21314       # These are the two extra sed commands mentioned above.
21315       (echo ':t
21316   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21317       if test -z "$ac_sed_cmds"; then
21318         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21319       else
21320         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21321       fi
21322       ac_sed_frag=`expr $ac_sed_frag + 1`
21323       ac_beg=$ac_end
21324       ac_end=`expr $ac_end + $ac_max_sed_lines`
21325     fi
21326   done
21327   if test -z "$ac_sed_cmds"; then
21328     ac_sed_cmds=cat
21329   fi
21330 fi # test -n "$CONFIG_FILES"
21331
21332 EOF
21333 cat >>$CONFIG_STATUS <<\EOF
21334 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21335   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21336   case $ac_file in
21337   - | *:- | *:-:* ) # input from stdin
21338         cat >$tmp/stdin
21339         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21340         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21341   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21342         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21343   * )   ac_file_in=$ac_file.in ;;
21344   esac
21345
21346   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21347   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21348          X"$ac_file" : 'X\(//\)[^/]' \| \
21349          X"$ac_file" : 'X\(//\)$' \| \
21350          X"$ac_file" : 'X\(/\)' \| \
21351          .     : '\(.\)' 2>/dev/null ||
21352 echo X"$ac_file" |
21353     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21354           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21355           /^X\(\/\/\)$/{ s//\1/; q; }
21356           /^X\(\/\).*/{ s//\1/; q; }
21357           s/.*/./; q'`
21358   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21359     { case "$ac_dir" in
21360   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21361   *)                      as_incr_dir=.;;
21362 esac
21363 as_dummy="$ac_dir"
21364 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21365   case $as_mkdir_dir in
21366     # Skip DOS drivespec
21367     ?:) as_incr_dir=$as_mkdir_dir ;;
21368     *)
21369       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21370       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21371     ;;
21372   esac
21373 done; }
21374
21375     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21376     # A "../" for each directory in $ac_dir_suffix.
21377     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21378   else
21379     ac_dir_suffix= ac_dots=
21380   fi
21381
21382   case $srcdir in
21383   .)  ac_srcdir=.
21384       if test -z "$ac_dots"; then
21385          ac_top_srcdir=.
21386       else
21387          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21388       fi ;;
21389   [\\/]* | ?:[\\/]* )
21390       ac_srcdir=$srcdir$ac_dir_suffix;
21391       ac_top_srcdir=$srcdir ;;
21392   *) # Relative path.
21393     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21394     ac_top_srcdir=$ac_dots$srcdir ;;
21395   esac
21396
21397   case $INSTALL in
21398   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21399   *) ac_INSTALL=$ac_dots$INSTALL ;;
21400   esac
21401
21402   if test x"$ac_file" != x-; then
21403     { echo "$as_me:21403: creating $ac_file" >&5
21404 echo "$as_me: creating $ac_file" >&6;}
21405     rm -f "$ac_file"
21406   fi
21407   # Let's still pretend it is `configure' which instantiates (i.e., don't
21408   # use $as_me), people would be surprised to read:
21409   #    /* config.h.  Generated automatically by config.status.  */
21410   configure_input="Generated automatically from `echo $ac_file_in |
21411                                                  sed 's,.*/,,'` by configure."
21412
21413   # First look for the input files in the build tree, otherwise in the
21414   # src tree.
21415   ac_file_inputs=`IFS=:
21416     for f in $ac_file_in; do
21417       case $f in
21418       -) echo $tmp/stdin ;;
21419       [\\/$]*)
21420          # Absolute (can't be DOS-style, as IFS=:)
21421          test -f "$f" || { { echo "$as_me:21421: error: cannot find input file: $f" >&5
21422 echo "$as_me: error: cannot find input file: $f" >&2;}
21423    { (exit 1); exit 1; }; }
21424          echo $f;;
21425       *) # Relative
21426          if test -f "$f"; then
21427            # Build tree
21428            echo $f
21429          elif test -f "$srcdir/$f"; then
21430            # Source tree
21431            echo $srcdir/$f
21432          else
21433            # /dev/null tree
21434            { { echo "$as_me:21434: error: cannot find input file: $f" >&5
21435 echo "$as_me: error: cannot find input file: $f" >&2;}
21436    { (exit 1); exit 1; }; }
21437          fi;;
21438       esac
21439     done` || { (exit 1); exit 1; }
21440 EOF
21441 cat >>$CONFIG_STATUS <<EOF
21442   sed "$ac_vpsub
21443 $extrasub
21444 EOF
21445 cat >>$CONFIG_STATUS <<\EOF
21446 :t
21447 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21448 s,@configure_input@,$configure_input,;t t
21449 s,@srcdir@,$ac_srcdir,;t t
21450 s,@top_srcdir@,$ac_top_srcdir,;t t
21451 s,@INSTALL@,$ac_INSTALL,;t t
21452 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21453   rm -f $tmp/stdin
21454   if test x"$ac_file" != x-; then
21455     mv $tmp/out $ac_file
21456   else
21457     cat $tmp/out
21458     rm -f $tmp/out
21459   fi
21460
21461 done
21462 EOF
21463 cat >>$CONFIG_STATUS <<\EOF
21464
21465 #
21466 # CONFIG_HEADER section.
21467 #
21468
21469 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21470 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21471 #
21472 # ac_d sets the value in "#define NAME VALUE" lines.
21473 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21474 ac_dB='[        ].*$,\1#\2'
21475 ac_dC=' '
21476 ac_dD=',;t'
21477 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21478 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21479 ac_iB='\([      ]\),\1#\2define\3'
21480 ac_iC=' '
21481 ac_iD='\4,;t'
21482 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21483 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21484 ac_uB='$,\1#\2define\3'
21485 ac_uC=' '
21486 ac_uD=',;t'
21487
21488 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21489   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21490   case $ac_file in
21491   - | *:- | *:-:* ) # input from stdin
21492         cat >$tmp/stdin
21493         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21494         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21495   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21496         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21497   * )   ac_file_in=$ac_file.in ;;
21498   esac
21499
21500   test x"$ac_file" != x- && { echo "$as_me:21500: creating $ac_file" >&5
21501 echo "$as_me: creating $ac_file" >&6;}
21502
21503   # First look for the input files in the build tree, otherwise in the
21504   # src tree.
21505   ac_file_inputs=`IFS=:
21506     for f in $ac_file_in; do
21507       case $f in
21508       -) echo $tmp/stdin ;;
21509       [\\/$]*)
21510          # Absolute (can't be DOS-style, as IFS=:)
21511          test -f "$f" || { { echo "$as_me:21511: error: cannot find input file: $f" >&5
21512 echo "$as_me: error: cannot find input file: $f" >&2;}
21513    { (exit 1); exit 1; }; }
21514          echo $f;;
21515       *) # Relative
21516          if test -f "$f"; then
21517            # Build tree
21518            echo $f
21519          elif test -f "$srcdir/$f"; then
21520            # Source tree
21521            echo $srcdir/$f
21522          else
21523            # /dev/null tree
21524            { { echo "$as_me:21524: error: cannot find input file: $f" >&5
21525 echo "$as_me: error: cannot find input file: $f" >&2;}
21526    { (exit 1); exit 1; }; }
21527          fi;;
21528       esac
21529     done` || { (exit 1); exit 1; }
21530   # Remove the trailing spaces.
21531   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21532
21533 EOF
21534
21535 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21536 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21537 # be either 'cat' or 'sort'.
21538 cat confdefs.h | uniq >conftest.vals
21539
21540 # Break up conftest.vals because some shells have a limit on
21541 # the size of here documents, and old seds have small limits too.
21542
21543 rm -f conftest.tail
21544 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21545 while grep . conftest.vals >/dev/null
21546 do
21547   # Write chunks of a limited-size here document to conftest.frag.
21548   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21549   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21550   echo 'CEOF' >> $CONFIG_STATUS
21551   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21552   rm -f conftest.vals
21553   mv conftest.tail conftest.vals
21554 done
21555 rm -f conftest.vals
21556
21557 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21558 # marker @DEFS@.
21559 echo '  cat >> conftest.edit <<CEOF
21560 /@DEFS@/r conftest.frag
21561 /@DEFS@/d
21562 CEOF
21563 sed -f conftest.edit $tmp/in > $tmp/out
21564 rm -f $tmp/in
21565 mv $tmp/out $tmp/in
21566 rm -f conftest.edit conftest.frag
21567 ' >> $CONFIG_STATUS
21568
21569 cat >>$CONFIG_STATUS <<\EOF
21570   # Let's still pretend it is `configure' which instantiates (i.e., don't
21571   # use $as_me), people would be surprised to read:
21572   #    /* config.h.  Generated automatically by config.status.  */
21573   if test x"$ac_file" = x-; then
21574     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21575   else
21576     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21577   fi
21578   cat $tmp/in >>$tmp/config.h
21579   rm -f $tmp/in
21580   if test x"$ac_file" != x-; then
21581     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21582       { echo "$as_me:21582: $ac_file is unchanged" >&5
21583 echo "$as_me: $ac_file is unchanged" >&6;}
21584     else
21585       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21586          X"$ac_file" : 'X\(//\)[^/]' \| \
21587          X"$ac_file" : 'X\(//\)$' \| \
21588          X"$ac_file" : 'X\(/\)' \| \
21589          .     : '\(.\)' 2>/dev/null ||
21590 echo X"$ac_file" |
21591     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21592           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21593           /^X\(\/\/\)$/{ s//\1/; q; }
21594           /^X\(\/\).*/{ s//\1/; q; }
21595           s/.*/./; q'`
21596       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21597         { case "$ac_dir" in
21598   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21599   *)                      as_incr_dir=.;;
21600 esac
21601 as_dummy="$ac_dir"
21602 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21603   case $as_mkdir_dir in
21604     # Skip DOS drivespec
21605     ?:) as_incr_dir=$as_mkdir_dir ;;
21606     *)
21607       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21608       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21609     ;;
21610   esac
21611 done; }
21612
21613       fi
21614       rm -f $ac_file
21615       mv $tmp/config.h $ac_file
21616     fi
21617   else
21618     cat $tmp/config.h
21619     rm -f $tmp/config.h
21620   fi
21621 done
21622 EOF
21623 cat >>$CONFIG_STATUS <<\EOF
21624 #
21625 # CONFIG_COMMANDS section.
21626 #
21627 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21628   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21629   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21630
21631   case $ac_dest in
21632     default )
21633 if test "x$cf_with_tests" != xno ; then
21634
21635 for cf_dir in test
21636 do
21637         if test ! -d $srcdir/$cf_dir; then
21638                 continue
21639         elif test -f $srcdir/$cf_dir/programs; then
21640                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21641         fi
21642 done
21643
21644 fi
21645
21646 cf_prefix=$LIB_PREFIX
21647
21648 case $cf_cv_shlib_version in #(vi
21649 cygdll|mingw)
21650         TINFO_NAME=$TINFO_ARG_SUFFIX
21651         TINFO_SUFFIX=.dll
21652         ;;
21653 esac
21654
21655 if test -n "$TINFO_SUFFIX" ; then
21656         case $TINFO_SUFFIX in
21657         tw*)
21658                 TINFO_NAME="${TINFO_NAME}tw"
21659                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21660                 ;;
21661         t*)
21662                 TINFO_NAME="${TINFO_NAME}t"
21663                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21664                 ;;
21665         w*)
21666                 TINFO_NAME="${TINFO_NAME}w"
21667                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21668                 ;;
21669         esac
21670 fi
21671
21672 for cf_dir in $SRC_SUBDIRS
21673 do
21674         if test ! -d $srcdir/$cf_dir ; then
21675                 continue
21676         elif test -f $srcdir/$cf_dir/modules; then
21677
21678                 SHARED_LIB=
21679                 LIBS_TO_MAKE=
21680                 for cf_item in $cf_LIST_MODELS
21681                 do
21682
21683         case $cf_item in #(vi
21684         libtool) #(vi
21685                 cf_suffix='.la'
21686                 cf_depsuf=$cf_suffix
21687                 ;;
21688         normal) #(vi
21689                 cf_suffix='.a'
21690                 cf_depsuf=$cf_suffix
21691                 ;;
21692         debug) #(vi
21693                 cf_suffix='_g.a'
21694                 cf_depsuf=$cf_suffix
21695                 ;;
21696         profile) #(vi
21697                 cf_suffix='_p.a'
21698                 cf_depsuf=$cf_suffix
21699                 ;;
21700         shared) #(vi
21701                 case $cf_cv_system_name in
21702                 aix[5-7]*) #(vi
21703                         cf_suffix='.a'
21704                         cf_depsuf=$cf_suffix
21705                         ;;
21706                 cygwin*|mingw*) #(vi
21707                         cf_suffix='.dll'
21708                         cf_depsuf='.dll.a'
21709                         ;;
21710                 darwin*) #(vi
21711                         cf_suffix='.dylib'
21712                         cf_depsuf=$cf_suffix
21713                         ;;
21714                 hpux*) #(vi
21715                         case $target in
21716                         ia64*) #(vi
21717                                 cf_suffix='.so'
21718                                 cf_depsuf=$cf_suffix
21719                                 ;;
21720                         *) #(vi
21721                                 cf_suffix='.sl'
21722                                 cf_depsuf=$cf_suffix
21723                                 ;;
21724                         esac
21725                         ;;
21726                 *)      cf_suffix='.so'
21727                         cf_depsuf=$cf_suffix
21728                         ;;
21729                 esac
21730         esac
21731         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21732         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21733
21734                         if test $cf_item = shared ; then
21735                         if test "$cf_cv_do_symlinks" = yes ; then
21736                                 case "$cf_cv_shlib_version" in #(vi
21737                                 rel) #(vi
21738                                         case "$cf_cv_system_name" in #(vi
21739                                         darwin*)
21740                                         case .${LIB_SUFFIX} in
21741                                         .tw*)
21742                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21743                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21744                                                 ;;
21745                                         .t*)
21746                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21747                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21748                                                 ;;
21749                                         .w*)
21750                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21751                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21752                                                 ;;
21753                                         *)
21754                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21755                                                 ;;
21756                                         esac
21757                                         ;; #(vi
21758                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21759                                         esac
21760                                         ;;
21761                                 abi)
21762                                         case "$cf_cv_system_name" in #(vi
21763                                         darwin*)
21764                                         case .${LIB_SUFFIX} in
21765                                         .tw*)
21766                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21767                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21768                                                 ;;
21769                                         .t*)
21770                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21771                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21772                                                 ;;
21773                                         .w*)
21774                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21775                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21776                                                 ;;
21777                                         *)
21778                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21779                                                 ;;
21780                                         esac
21781                                         ;; #(vi
21782                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21783                                         esac
21784                                         ;;
21785                                 esac
21786                         fi
21787                         # cygwin needs import library, and has unique naming convention
21788                         # use autodetected ${cf_prefix} for import lib and static lib, but
21789                         # use 'cyg' prefix for shared lib.
21790                         case $cf_cv_shlib_version in #(vi
21791                         cygdll) #(vi
21792                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21793                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21794                                 continue
21795                                 ;;
21796                         mingw)
21797                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21798                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/lib${cf_dir}${cf_cygsuf}"
21799                                 continue
21800                                 ;;
21801                         esac
21802                         fi
21803                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21804                 done
21805
21806                 if test $cf_dir = ncurses ; then
21807                         cf_subsets="$LIB_SUBSETS"
21808                         cf_r_parts="$cf_subsets"
21809                         cf_liblist="$LIBS_TO_MAKE"
21810
21811                         while test -n "$cf_r_parts"
21812                         do
21813                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21814                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21815                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21816                                         cf_item=
21817                                         case $cf_l_parts in #(vi
21818                                         *termlib*) #(vi
21819                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21820                                                 ;;
21821                                         *ticlib*)
21822                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21823                                                 ;;
21824                                         *)
21825                                                 break
21826                                                 ;;
21827                                         esac
21828                                         if test -n "$cf_item"; then
21829                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21830                                         fi
21831                                 else
21832                                         break
21833                                 fi
21834                         done
21835                 else
21836                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21837                 fi
21838
21839                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21840                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21841                         $cf_dir/Makefile >$cf_dir/Makefile.out
21842                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21843
21844                 $AWK -f $srcdir/mk-0th.awk \
21845                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21846                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21847
21848                 for cf_subset in $cf_subsets
21849                 do
21850                         cf_subdirs=
21851                         for cf_item in $cf_LIST_MODELS
21852                         do
21853                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21854
21855 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21856
21857         case $cf_item in #(vi
21858         libtool) #(vi
21859                 cf_suffix='.la'
21860                 cf_depsuf=$cf_suffix
21861                 ;;
21862         normal) #(vi
21863                 cf_suffix='.a'
21864                 cf_depsuf=$cf_suffix
21865                 ;;
21866         debug) #(vi
21867                 cf_suffix='_g.a'
21868                 cf_depsuf=$cf_suffix
21869                 ;;
21870         profile) #(vi
21871                 cf_suffix='_p.a'
21872                 cf_depsuf=$cf_suffix
21873                 ;;
21874         shared) #(vi
21875                 case $cf_cv_system_name in
21876                 aix[5-7]*) #(vi
21877                         cf_suffix='.a'
21878                         cf_depsuf=$cf_suffix
21879                         ;;
21880                 cygwin*|mingw*) #(vi
21881                         cf_suffix='.dll'
21882                         cf_depsuf='.dll.a'
21883                         ;;
21884                 darwin*) #(vi
21885                         cf_suffix='.dylib'
21886                         cf_depsuf=$cf_suffix
21887                         ;;
21888                 hpux*) #(vi
21889                         case $target in
21890                         ia64*) #(vi
21891                                 cf_suffix='.so'
21892                                 cf_depsuf=$cf_suffix
21893                                 ;;
21894                         *) #(vi
21895                                 cf_suffix='.sl'
21896                                 cf_depsuf=$cf_suffix
21897                                 ;;
21898                         esac
21899                         ;;
21900                 *)      cf_suffix='.so'
21901                         cf_depsuf=$cf_suffix
21902                         ;;
21903                 esac
21904         esac
21905         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21906         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21907
21908         case $cf_item in
21909         libtool) cf_subdir='obj_lo'  ;;
21910         normal)  cf_subdir='objects' ;;
21911         debug)   cf_subdir='obj_g' ;;
21912         profile) cf_subdir='obj_p' ;;
21913         shared)
21914                 case $cf_cv_system_name in #(vi
21915                 cygwin) #(vi
21916                         cf_subdir='objects' ;;
21917                 *)
21918                         cf_subdir='obj_s' ;;
21919                 esac
21920         esac
21921
21922                         # Test for case where we build libtinfo with a different name.
21923                         cf_libname=$cf_dir
21924                         if test $cf_dir = ncurses ; then
21925                                 case $cf_subset in
21926                                 *base*)
21927                                         cf_libname=${cf_libname}$LIB_SUFFIX
21928                                         ;;
21929                                 *termlib*)
21930                                         cf_libname=$TINFO_LIB_SUFFIX
21931                                         ;;
21932                                 ticlib*)
21933                                         cf_libname=$TICS_LIB_SUFFIX
21934                                         ;;
21935                                 esac
21936                         else
21937                                 cf_libname=${cf_libname}$LIB_SUFFIX
21938                         fi
21939                         if test -n "${DFT_ARG_SUFFIX}" ; then
21940                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21941                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21942                         fi
21943
21944                         # These dependencies really are for development, not
21945                         # builds, but they are useful in porting, too.
21946                         cf_depend="../include/ncurses_cfg.h"
21947                         if test "$srcdir" = "."; then
21948                                 cf_reldir="."
21949                         else
21950                                 cf_reldir="\${srcdir}"
21951                         fi
21952
21953                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21954                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21955                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21956                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21957                         fi
21958
21959                         cf_dir_suffix=
21960                         old_cf_suffix="$cf_suffix"
21961                         if test "$cf_cv_shlib_version_infix" = yes ; then
21962                         if test -n "$LIB_SUFFIX" ; then
21963                                 case $LIB_SUFFIX in
21964                                 tw*)
21965                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21966                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21967                                         cf_dir_suffix=tw
21968                                         ;;
21969                                 t*)
21970                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21971                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21972                                         cf_dir_suffix=t
21973                                         ;;
21974                                 w*)
21975                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21976                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21977                                         cf_dir_suffix=w
21978                                         ;;
21979                                 esac
21980                         fi
21981                         fi
21982
21983                         $AWK -f $srcdir/mk-1st.awk \
21984                                 name=${cf_libname}${cf_dir_suffix} \
21985                                 traces=$LIB_TRACING \
21986                                 MODEL=$cf_ITEM \
21987                                 model=$cf_subdir \
21988                                 prefix=$cf_prefix \
21989                                 suffix=$cf_suffix \
21990                                 subset=$cf_subset \
21991                                 driver=$cf_cv_term_driver \
21992                                 SymLink="$LN_S" \
21993                                 TermlibRoot=$TINFO_NAME \
21994                                 TermlibSuffix=$TINFO_SUFFIX \
21995                                 ShlibVer=$cf_cv_shlib_version \
21996                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21997                                 ReLink=${cf_cv_do_relink:-no} \
21998                                 DoLinks=$cf_cv_do_symlinks \
21999                                 rmSoLocs=$cf_cv_rm_so_locs \
22000                                 ldconfig="$LDCONFIG" \
22001                                 overwrite=$WITH_OVERWRITE \
22002                                 depend="$cf_depend" \
22003                                 host="$host" \
22004                                 libtool_version="$LIBTOOL_VERSION" \
22005                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22006
22007                         cf_suffix="$old_cf_suffix"
22008
22009                         for cf_subdir2 in $cf_subdirs lib
22010                         do
22011                                 test $cf_subdir = $cf_subdir2 && break
22012                         done
22013                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22014                         $AWK -f $srcdir/mk-2nd.awk \
22015                                 name=$cf_dir \
22016                                 traces=$LIB_TRACING \
22017                                 MODEL=$cf_ITEM \
22018                                 model=$cf_subdir \
22019                                 subset=$cf_subset \
22020                                 srcdir=$srcdir \
22021                                 echo=$WITH_ECHO \
22022                                 crenames=$cf_cv_prog_CC_c_o \
22023                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22024                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22025                         cf_subdirs="$cf_subdirs $cf_subdir"
22026                         done
22027                 done
22028         fi
22029
22030         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
22031 done
22032
22033 for cf_dir in $SRC_SUBDIRS
22034 do
22035         if test ! -d $srcdir/$cf_dir ; then
22036                 continue
22037         fi
22038
22039         if test -f $cf_dir/Makefile ; then
22040                 case "$cf_dir" in
22041                 Ada95) #(vi
22042                         echo 'libs \' >> Makefile
22043                         echo 'install.libs \' >> Makefile
22044                         echo 'uninstall.libs ::' >> Makefile
22045                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
22046                         ;;
22047                 esac
22048         fi
22049
22050         if test -f $srcdir/$cf_dir/modules; then
22051                 echo >> Makefile
22052                 if test -f $srcdir/$cf_dir/headers; then
22053 cat >> Makefile <<CF_EOF
22054 install.includes \\
22055 uninstall.includes \\
22056 CF_EOF
22057                 fi
22058 if test "$cf_dir" != "c++" ; then
22059 echo 'lint \' >> Makefile
22060 fi
22061 cat >> Makefile <<CF_EOF
22062 libs \\
22063 lintlib \\
22064 install.libs \\
22065 uninstall.libs \\
22066 install.$cf_dir \\
22067 uninstall.$cf_dir ::
22068         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22069 CF_EOF
22070         elif test -f $srcdir/$cf_dir/headers; then
22071 cat >> Makefile <<CF_EOF
22072
22073 libs \\
22074 install.libs \\
22075 uninstall.libs \\
22076 install.includes \\
22077 uninstall.includes ::
22078         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
22079 CF_EOF
22080 fi
22081 done
22082
22083 cat >> Makefile <<CF_EOF
22084
22085 install.libs uninstall.libs \\
22086 install.data uninstall.data ::
22087 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
22088 CF_EOF
22089
22090 if test "x$cf_with_manpages" = xyes; then
22091 cat >> Makefile <<CF_EOF
22092
22093 install.man \\
22094 uninstall.man ::
22095         cd man && \${MAKE} \${CF_MFLAGS} \$@
22096 CF_EOF
22097 fi
22098
22099 cat >> Makefile <<CF_EOF
22100
22101 distclean ::
22102         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22103         rm -f headers.sh headers.sed mk_shared_lib.sh
22104         rm -f edit_man.* man_alias.*
22105         rm -rf \${DIRS_TO_MAKE}
22106 CF_EOF
22107
22108 # Special case: tack's manpage lives in its own directory.
22109 if test "x$cf_with_manpages" = xyes; then
22110 if test -d tack ; then
22111 if test -f $srcdir/$tack.h; then
22112 cat >> Makefile <<CF_EOF
22113
22114 install.man \\
22115 uninstall.man ::
22116         cd tack && \${MAKE} \${CF_MFLAGS} \$@
22117 CF_EOF
22118 fi
22119 fi
22120 fi
22121
22122 rm -f headers.sed headers.sh
22123
22124 echo creating headers.sh
22125 cat >headers.sh <<CF_EOF
22126 #! /bin/sh
22127 # This shell script is generated by the 'configure' script.  It is invoked in a
22128 # subdirectory of the build tree.  It generates a sed-script in the parent
22129 # directory that is used to adjust includes for header files that reside in a
22130 # subdirectory of /usr/include, etc.
22131 PRG=""
22132 while test \$# != 3
22133 do
22134 PRG="\$PRG \$1"; shift
22135 done
22136 DST=\$1
22137 REF=\$2
22138 SRC=\$3
22139 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22140 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22141 echo installing \$SRC in \$DST
22142 CF_EOF
22143
22144 if test $WITH_CURSES_H = yes; then
22145         cat >>headers.sh <<CF_EOF
22146 case \$DST in
22147 /*/include/*)
22148         END=\`basename \$DST\`
22149         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22150         do
22151                 NAME=\`basename \$i\`
22152                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22153         done
22154         ;;
22155 *)
22156         echo "" >> \$TMPSED
22157         ;;
22158 esac
22159 CF_EOF
22160
22161 else
22162         cat >>headers.sh <<CF_EOF
22163 case \$DST in
22164 /*/include/*)
22165         END=\`basename \$DST\`
22166         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22167         do
22168                 NAME=\`basename \$i\`
22169                 if test "\$NAME" = "curses.h"
22170                 then
22171                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22172                         NAME=ncurses.h
22173                 fi
22174                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22175         done
22176         ;;
22177 *)
22178         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22179         ;;
22180 esac
22181 CF_EOF
22182 fi
22183 cat >>headers.sh <<CF_EOF
22184 rm -f \$TMPSRC
22185 sed -f \$TMPSED \$SRC > \$TMPSRC
22186 NAME=\`basename \$SRC\`
22187 CF_EOF
22188 if test $WITH_CURSES_H != yes; then
22189         cat >>headers.sh <<CF_EOF
22190 test "\$NAME" = "curses.h" && NAME=ncurses.h
22191 CF_EOF
22192 fi
22193 cat >>headers.sh <<CF_EOF
22194 # Just in case someone gzip'd manpages, remove the conflicting copy.
22195 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22196
22197 eval \$PRG \$TMPSRC \$DST/\$NAME
22198 rm -f \$TMPSRC \$TMPSED
22199 CF_EOF
22200
22201 chmod 0755 headers.sh
22202
22203 for cf_dir in $SRC_SUBDIRS
22204 do
22205         if test ! -d $srcdir/$cf_dir ; then
22206                 continue
22207         fi
22208
22209         if test -f $srcdir/$cf_dir/headers; then
22210                 $AWK -f $srcdir/mk-hdr.awk \
22211                         subset="$LIB_SUBSETS" \
22212                         compat="$WITH_CURSES_H" \
22213                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22214         fi
22215
22216         if test -f $srcdir/$cf_dir/modules; then
22217                 if test "$cf_dir" != "c++" ; then
22218                         cat >>$cf_dir/Makefile <<"CF_EOF"
22219 depend : ${AUTO_SRC}
22220         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22221
22222 # DO NOT DELETE THIS LINE -- make depend depends on it.
22223 CF_EOF
22224                 fi
22225         fi
22226 done
22227
22228 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22229 if test -z "$USE_OLD_MAKERULES" ; then
22230         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22231 fi
22232 fi
22233  ;;
22234   esac
22235 done
22236 EOF
22237
22238 cat >>$CONFIG_STATUS <<\EOF
22239
22240 { (exit 0); exit 0; }
22241 EOF
22242 chmod +x $CONFIG_STATUS
22243 ac_clean_files=$ac_clean_files_save
22244
22245 # configure is writing to config.log, and then calls config.status.
22246 # config.status does its own redirection, appending to config.log.
22247 # Unfortunately, on DOS this fails, as config.log is still kept open
22248 # by configure, so config.status won't be able to write to it; its
22249 # output is simply discarded.  So we exec the FD to /dev/null,
22250 # effectively closing config.log, so it can be properly (re)opened and
22251 # appended to by config.status.  When coming back to configure, we
22252 # need to make the FD available again.
22253 if test "$no_create" != yes; then
22254   ac_cs_success=:
22255   exec 5>/dev/null
22256   $SHELL $CONFIG_STATUS || ac_cs_success=false
22257   exec 5>>config.log
22258   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22259   # would make configure fail if this is the last instruction.
22260   $ac_cs_success || { (exit 1); exit 1; }
22261 fi
22262 ${MAKE:-make} preinstall