]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20130323
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.564 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
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 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
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     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --without-manpages      suppress install of manpages
710   --without-progs         suppress build with programs (e.g., tic)
711   --without-tests         suppress build with test-programs
712   --without-curses-h      install curses.h as ncurses.h only
713   --with-pkg-config{=path} enable/disable use of pkg-config
714   --with-pkg-config-libdir=XXX use given directory for installing pc-files
715   --enable-pc-files       generate and install .pc files for pkg-config
716   --enable-mixed-case     tic should assume mixed-case filenames
717   --with-install-prefix   prefixes actual install-location ($DESTDIR)
718 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
719   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
720   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
721   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
722   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
723   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
724   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
725 Options to Specify the Libraries Built/Used:
726   --disable-libtool-version  enable to use libtool's incompatible naming scheme
727   --with-libtool          generate libraries with libtool
728   --with-shared           generate shared-libraries
729   --with-normal           generate normal-libraries (default)
730   --with-debug            generate debug-libraries (default)
731   --with-profile          generate profile-libraries
732   --with-cxx-shared       generate C++ shared-libraries
733   --with-lib-prefix       override library-prefix
734   --with-termlib          generate separate terminfo library
735   --with-ticlib           generate separate tic library
736   --with-gpm              use Alessandro Rubini's GPM library
737   --without-dlsym         do not use dlsym() to load GPM dynamically
738   --with-sysmouse         use sysmouse (FreeBSD console)
739   --enable-rpath          use rpath option when generating shared libraries
740   --disable-relink        relink shared libraries during install
741   --with-shlib-version=X  Specify rel or abi version for shared libs
742   --disable-rpath-hack    don't add rpath options for additional libraries
743 Fine-Tuning Your Configuration:
744   --disable-overwrite     leave out the link to -lcurses
745   --disable-database      do not use terminfo, only fallbacks/termcap
746   --with-database=XXX     specify terminfo source to install
747   --with-hashed-db        specify hashed-database library
748   --with-fallbacks=XXX    specify list of fallback terminal descriptions
749   --without-xterm-new     specify if xterm terminfo should be old version
750   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
751   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
752   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
753   --disable-big-core      assume machine has little memory
754   --disable-big-strings   assume compiler has only standard-size strings
755   --enable-termcap        compile in termcap fallback support
756   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
757   --enable-getcap         fast termcap load, no xrefs to terminfo
758   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
759   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
760   --disable-root-environ  restrict environment when running as root
761   --enable-symlinks       make tic use symbolic links not hard links
762   --enable-broken_linker  compile with broken-linker support code
763   --enable-bsdpad         recognize BSD-style prefix padding
764   --enable-widec          compile with wide-char/UTF-8 code
765   --disable-lp64          allow chtype to be long (ignore _LP64)
766   --disable-largefile     omit support for large files
767   --disable-tparm-varargs compile tparm() without varargs interface
768   --disable-tic-depends   link tic library without explicit dependency on ncurses library
769   --with-bool=TYPE        override fallback type of bool variable
770   --with-caps=alt         compile with alternate Caps file
771   --with-chtype=TYPE      override type of chtype
772   --with-ospeed=TYPE      override type of ospeed variable
773   --with-mmask-t=TYPE     override type of mmask_t
774   --with-ccharw-max=XXX   override size CCHARW_MAX
775   --with-tparm-arg=TYPE   override parameter type of tparm
776   --with-rcs-ids          compile-in RCS identifiers
777 Options to Specify How Manpages are Installed:
778   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
779                           optionally formatted/catonly, e.g., gzip,formatted
780   --with-manpage-renames  specify manpage-renaming
781   --with-manpage-aliases  specify manpage-aliases using .so
782   --with-manpage-symlinks specify manpage-aliases using symlinks
783   --with-manpage-tbl      specify manpage processing with tbl
784 Extensions:
785   --disable-ext-funcs     disable function-extensions
786   --enable-sp-funcs       enable experimental SCREEN-extensions
787   --enable-term-driver    enable experimental terminal-driver
788   --enable-const          compile with extra/non-standard const
789   --enable-ext-colors     compile for 256-color support
790   --enable-ext-mouse      compile for extended mouse-encoding
791   --enable-no-padding     compile with $NCURSES_NO_PADDING code
792   --enable-signed-char    compile using signed Boolean's in term.h
793   --enable-sigwinch       compile with SIGWINCH handler
794   --enable-tcap-names     compile with user-definable terminal capabilities
795 Development Code:
796   --without-develop       disable development options
797   --enable-hard-tabs      compile with hard-tabs code
798   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
799 Experimental Code:
800   --disable-assumed-color do not assume anything about default-colors
801   --disable-hashmap       compile without hashmap scrolling-optimization
802   --enable-colorfgbg      compile-in experimental $COLORFGBG code
803   --enable-interop        compile-in experimental interop bindings
804   --with-pthread          use POSIX thread library
805   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
806   --enable-weak-symbols   enable weak-symbols for pthreads
807   --enable-reentrant      compile with experimental reentrant code
808   --with-wrap-prefix=XXX  override prefix used for public variables
809   --enable-safe-sprintf   compile with experimental safe-sprintf code
810   --disable-scroll-hints  compile without scroll-hints code
811   --enable-wgetch-events  compile with experimental wgetch-events code
812 Testing/development Options:
813   --disable-echo          do not display "compiling" commands
814   --enable-warnings       build: turn on GCC compiler warnings
815   --enable-string-hacks   work around bogus compiler/loader warnings
816   --enable-assertions     test: turn on generation of assertion code
817   --with-dmalloc          test: use Gray Watson's dmalloc library
818   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
819   --with-valgrind         test: use valgrind
820   --disable-leaks         test: free permanent memory, analyze leaks
821   --enable-expanded       test: generate functions for certain macros
822   --disable-macros        test: use functions rather than macros
823   --with-trace            test: add trace() function to all models of ncurses
824 Ada95 Binding Options:
825   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
826   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
827   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
828   --with-ada-sharedlib=XX build Ada95 shared-library
829
830 Some influential environment variables:
831   CC          C compiler command
832   CFLAGS      C compiler flags
833   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
834               nonstandard directory <lib dir>
835   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
836               headers in a nonstandard directory <include dir>
837   CPP         C preprocessor
838   CXX         C++ compiler command
839   CXXFLAGS    C++ compiler flags
840   CXXCPP      C++ preprocessor
841
842 Use these variables to override the choices made by `configure' or to help
843 it to find libraries and programs with nonstandard names/locations.
844
845 EOF
846 fi
847
848 if test "$ac_init_help" = "recursive"; then
849   # If there are subdirs, report their specific --help.
850   ac_popdir=`pwd`
851   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
852     cd $ac_subdir
853     # A "../" for each directory in /$ac_subdir.
854     ac_dots=`echo $ac_subdir |
855              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
856
857     case $srcdir in
858     .) # No --srcdir option.  We are building in place.
859       ac_sub_srcdir=$srcdir ;;
860     [\\/]* | ?:[\\/]* ) # Absolute path.
861       ac_sub_srcdir=$srcdir/$ac_subdir ;;
862     *) # Relative path.
863       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
864     esac
865
866     # Check for guested configure; otherwise get Cygnus style configure.
867     if test -f $ac_sub_srcdir/configure.gnu; then
868       echo
869       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
870     elif test -f $ac_sub_srcdir/configure; then
871       echo
872       $SHELL $ac_sub_srcdir/configure  --help=recursive
873     elif test -f $ac_sub_srcdir/configure.ac ||
874            test -f $ac_sub_srcdir/configure.in; then
875       echo
876       $ac_configure --help
877     else
878       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
879     fi
880     cd $ac_popdir
881   done
882 fi
883
884 test -n "$ac_init_help" && exit 0
885 if $ac_init_version; then
886   cat <<\EOF
887
888 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
889 Free Software Foundation, Inc.
890 This configure script is free software; the Free Software Foundation
891 gives unlimited permission to copy, distribute and modify it.
892 EOF
893   exit 0
894 fi
895 exec 5>config.log
896 cat >&5 <<EOF
897 This file contains any messages produced by compilers while
898 running configure, to aid debugging if configure makes a mistake.
899
900 It was created by $as_me, which was
901 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
902
903   $ $0 $@
904
905 EOF
906 {
907 cat <<_ASUNAME
908 ## ---------- ##
909 ## Platform.  ##
910 ## ---------- ##
911
912 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
913 uname -m = `(uname -m) 2>/dev/null || echo unknown`
914 uname -r = `(uname -r) 2>/dev/null || echo unknown`
915 uname -s = `(uname -s) 2>/dev/null || echo unknown`
916 uname -v = `(uname -v) 2>/dev/null || echo unknown`
917
918 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
919 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
920
921 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
922 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
923 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
924 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
925 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
926 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
927 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
928
929 PATH = $PATH
930
931 _ASUNAME
932 } >&5
933
934 cat >&5 <<EOF
935 ## ------------ ##
936 ## Core tests.  ##
937 ## ------------ ##
938
939 EOF
940
941 # Keep a trace of the command line.
942 # Strip out --no-create and --no-recursion so they do not pile up.
943 # Also quote any args containing shell meta-characters.
944 ac_configure_args=
945 ac_sep=
946 for ac_arg
947 do
948   case $ac_arg in
949   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
950   | --no-cr | --no-c) ;;
951   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
952   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
953   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
955     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
956     ac_sep=" " ;;
957   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
958      ac_sep=" " ;;
959   esac
960   # Get rid of the leading space.
961 done
962
963 # When interrupted or exit'd, cleanup temporary files, and complete
964 # config.log.  We remove comments because anyway the quotes in there
965 # would cause problems or look ugly.
966 trap 'exit_status=$?
967   # Save into config.log some information that might help in debugging.
968   echo >&5
969   echo "## ----------------- ##" >&5
970   echo "## Cache variables.  ##" >&5
971   echo "## ----------------- ##" >&5
972   echo >&5
973   # The following way of writing the cache mishandles newlines in values,
974 {
975   (set) 2>&1 |
976     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
977     *ac_space=\ *)
978       sed -n \
979         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
980           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
981       ;;
982     *)
983       sed -n \
984         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
985       ;;
986     esac;
987 } >&5
988   sed "/^$/d" confdefs.h >conftest.log
989   if test -s conftest.log; then
990     echo >&5
991     echo "## ------------ ##" >&5
992     echo "## confdefs.h.  ##" >&5
993     echo "## ------------ ##" >&5
994     echo >&5
995     cat conftest.log >&5
996   fi
997   (echo; echo) >&5
998   test "$ac_signal" != 0 &&
999     echo "$as_me: caught signal $ac_signal" >&5
1000   echo "$as_me: exit $exit_status" >&5
1001   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1002     exit $exit_status
1003      ' 0
1004 for ac_signal in 1 2 13 15; do
1005   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1006 done
1007 ac_signal=0
1008
1009 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1010 rm -rf conftest* confdefs.h
1011 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1012 echo >confdefs.h
1013
1014 # Let the site file select an alternate cache file if it wants to.
1015 # Prefer explicitly selected file to automatically selected ones.
1016 if test -z "$CONFIG_SITE"; then
1017   if test "x$prefix" != xNONE; then
1018     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1019   else
1020     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1021   fi
1022 fi
1023 for ac_site_file in $CONFIG_SITE; do
1024   if test -r "$ac_site_file"; then
1025     { echo "$as_me:1025: loading site script $ac_site_file" >&5
1026 echo "$as_me: loading site script $ac_site_file" >&6;}
1027     cat "$ac_site_file" >&5
1028     . "$ac_site_file"
1029   fi
1030 done
1031
1032 if test -r "$cache_file"; then
1033   # Some versions of bash will fail to source /dev/null (special
1034   # files actually), so we avoid doing that.
1035   if test -f "$cache_file"; then
1036     { echo "$as_me:1036: loading cache $cache_file" >&5
1037 echo "$as_me: loading cache $cache_file" >&6;}
1038     case $cache_file in
1039       [\\/]* | ?:[\\/]* ) . $cache_file;;
1040       *)                      . ./$cache_file;;
1041     esac
1042   fi
1043 else
1044   { echo "$as_me:1044: creating cache $cache_file" >&5
1045 echo "$as_me: creating cache $cache_file" >&6;}
1046   >$cache_file
1047 fi
1048
1049 # Check that the precious variables saved in the cache have kept the same
1050 # value.
1051 ac_cache_corrupted=false
1052 for ac_var in `(set) 2>&1 |
1053                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1054   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1055   eval ac_new_set=\$ac_env_${ac_var}_set
1056   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1057   eval ac_new_val="\$ac_env_${ac_var}_value"
1058   case $ac_old_set,$ac_new_set in
1059     set,)
1060       { echo "$as_me:1060: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1061 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1062       ac_cache_corrupted=: ;;
1063     ,set)
1064       { echo "$as_me:1064: error: \`$ac_var' was not set in the previous run" >&5
1065 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1066       ac_cache_corrupted=: ;;
1067     ,);;
1068     *)
1069       if test "x$ac_old_val" != "x$ac_new_val"; then
1070         { echo "$as_me:1070: error: \`$ac_var' has changed since the previous run:" >&5
1071 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1072         { echo "$as_me:1072:   former value:  $ac_old_val" >&5
1073 echo "$as_me:   former value:  $ac_old_val" >&2;}
1074         { echo "$as_me:1074:   current value: $ac_new_val" >&5
1075 echo "$as_me:   current value: $ac_new_val" >&2;}
1076         ac_cache_corrupted=:
1077       fi;;
1078   esac
1079   # Pass precious variables to config.status.  It doesn't matter if
1080   # we pass some twice (in addition to the command line arguments).
1081   if test "$ac_new_set" = set; then
1082     case $ac_new_val in
1083     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1084       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1085       ac_configure_args="$ac_configure_args '$ac_arg'"
1086       ;;
1087     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1088        ;;
1089     esac
1090   fi
1091 done
1092 if $ac_cache_corrupted; then
1093   { echo "$as_me:1093: error: changes in the environment can compromise the build" >&5
1094 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1095   { { echo "$as_me:1095: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1096 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1097    { (exit 1); exit 1; }; }
1098 fi
1099
1100 ac_ext=c
1101 ac_cpp='$CPP $CPPFLAGS'
1102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1105 ac_main_return=return
1106
1107 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1108   *c*,-n*) ECHO_N= ECHO_C='
1109 ' ECHO_T='      ' ;;
1110   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1111   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1112 esac
1113 echo "#! $SHELL" >conftest.sh
1114 echo  "exit 0"   >>conftest.sh
1115 chmod +x conftest.sh
1116 if { (echo "$as_me:1116: PATH=\".;.\"; conftest.sh") >&5
1117   (PATH=".;."; conftest.sh) 2>&5
1118   ac_status=$?
1119   echo "$as_me:1119: \$? = $ac_status" >&5
1120   (exit $ac_status); }; then
1121   ac_path_separator=';'
1122 else
1123   ac_path_separator=:
1124 fi
1125 PATH_SEPARATOR="$ac_path_separator"
1126 rm -f conftest.sh
1127
1128 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1129
1130 top_builddir=`pwd`
1131
1132 echo "$as_me:1132: checking for egrep" >&5
1133 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1134 if test "${ac_cv_prog_egrep+set}" = set; then
1135   echo $ECHO_N "(cached) $ECHO_C" >&6
1136 else
1137   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1138     then ac_cv_prog_egrep='grep -E'
1139     else ac_cv_prog_egrep='egrep'
1140     fi
1141 fi
1142 echo "$as_me:1142: result: $ac_cv_prog_egrep" >&5
1143 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1144  EGREP=$ac_cv_prog_egrep
1145
1146 test -z "$EGREP" && { { echo "$as_me:1146: error: No egrep program found" >&5
1147 echo "$as_me: error: No egrep program found" >&2;}
1148    { (exit 1); exit 1; }; }
1149
1150 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1151 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1153 cf_cv_abi_version=${NCURSES_MAJOR}
1154 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1155 cf_cv_timestamp=`date`
1156 echo "$as_me:1156: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1157 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1158
1159 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1160
1161 # Check whether --with-rel-version or --without-rel-version was given.
1162 if test "${with_rel_version+set}" = set; then
1163   withval="$with_rel_version"
1164   { echo "$as_me:1164: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1165 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1166  cf_cv_rel_version=$withval
1167 fi;
1168
1169  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1170  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1171
1172 if test -n "$NCURSES_MAJOR" ; then
1173   case $NCURSES_MAJOR in #(vi
1174   [0-9]*) #(vi
1175         ;;
1176   *)
1177         { { echo "$as_me:1177: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1178 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1179    { (exit 1); exit 1; }; }
1180         ;;
1181   esac
1182 else
1183   { { echo "$as_me:1183: error: Release major-version value is empty" >&5
1184 echo "$as_me: error: Release major-version value is empty" >&2;}
1185    { (exit 1); exit 1; }; }
1186 fi
1187
1188 if test -n "$NCURSES_MINOR" ; then
1189   case $NCURSES_MINOR in #(vi
1190   [0-9]*) #(vi
1191         ;;
1192   *)
1193         { { echo "$as_me:1193: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1194 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1195    { (exit 1); exit 1; }; }
1196         ;;
1197   esac
1198 else
1199   { { echo "$as_me:1199: error: Release minor-version value is empty" >&5
1200 echo "$as_me: error: Release minor-version value is empty" >&2;}
1201    { (exit 1); exit 1; }; }
1202 fi
1203
1204 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1205
1206 # Check whether --with-abi-version or --without-abi-version was given.
1207 if test "${with_abi_version+set}" = set; then
1208   withval="$with_abi_version"
1209   { echo "$as_me:1209: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1210 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1211  cf_cv_abi_version=$withval
1212 fi;
1213
1214 if test -n "$cf_cv_abi_version" ; then
1215   case $cf_cv_abi_version in #(vi
1216   [0-9]*) #(vi
1217         ;;
1218   *)
1219         { { echo "$as_me:1219: error: ABI version is not a number: $cf_cv_abi_version" >&5
1220 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1221    { (exit 1); exit 1; }; }
1222         ;;
1223   esac
1224 else
1225   { { echo "$as_me:1225: error: ABI version value is empty" >&5
1226 echo "$as_me: error: ABI version value is empty" >&2;}
1227    { (exit 1); exit 1; }; }
1228 fi
1229
1230 ac_aux_dir=
1231 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1232   if test -f $ac_dir/install-sh; then
1233     ac_aux_dir=$ac_dir
1234     ac_install_sh="$ac_aux_dir/install-sh -c"
1235     break
1236   elif test -f $ac_dir/install.sh; then
1237     ac_aux_dir=$ac_dir
1238     ac_install_sh="$ac_aux_dir/install.sh -c"
1239     break
1240   elif test -f $ac_dir/shtool; then
1241     ac_aux_dir=$ac_dir
1242     ac_install_sh="$ac_aux_dir/shtool install -c"
1243     break
1244   fi
1245 done
1246 if test -z "$ac_aux_dir"; then
1247   { { echo "$as_me:1247: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1248 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1249    { (exit 1); exit 1; }; }
1250 fi
1251 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1252 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1253 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1254
1255 # Make sure we can run config.sub.
1256 $ac_config_sub sun4 >/dev/null 2>&1 ||
1257   { { echo "$as_me:1257: error: cannot run $ac_config_sub" >&5
1258 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1259    { (exit 1); exit 1; }; }
1260
1261 echo "$as_me:1261: checking build system type" >&5
1262 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1263 if test "${ac_cv_build+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   ac_cv_build_alias=$build_alias
1267 test -z "$ac_cv_build_alias" &&
1268   ac_cv_build_alias=`$ac_config_guess`
1269 test -z "$ac_cv_build_alias" &&
1270   { { echo "$as_me:1270: error: cannot guess build type; you must specify one" >&5
1271 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1272    { (exit 1); exit 1; }; }
1273 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1274   { { echo "$as_me:1274: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1275 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1276    { (exit 1); exit 1; }; }
1277
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_build" >&5
1280 echo "${ECHO_T}$ac_cv_build" >&6
1281 build=$ac_cv_build
1282 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1283 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1284 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1285
1286 echo "$as_me:1286: checking host system type" >&5
1287 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1288 if test "${ac_cv_host+set}" = set; then
1289   echo $ECHO_N "(cached) $ECHO_C" >&6
1290 else
1291   ac_cv_host_alias=$host_alias
1292 test -z "$ac_cv_host_alias" &&
1293   ac_cv_host_alias=$ac_cv_build_alias
1294 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1295   { { echo "$as_me:1295: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1296 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1297    { (exit 1); exit 1; }; }
1298
1299 fi
1300 echo "$as_me:1300: result: $ac_cv_host" >&5
1301 echo "${ECHO_T}$ac_cv_host" >&6
1302 host=$ac_cv_host
1303 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1304 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1305 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1306
1307 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1308         echo "$as_me:1308: checking target system type" >&5
1309 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1310 if test "${ac_cv_target+set}" = set; then
1311   echo $ECHO_N "(cached) $ECHO_C" >&6
1312 else
1313   ac_cv_target_alias=$target_alias
1314 test "x$ac_cv_target_alias" = "x" &&
1315   ac_cv_target_alias=$ac_cv_host_alias
1316 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1317   { { echo "$as_me:1317: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1318 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1319    { (exit 1); exit 1; }; }
1320
1321 fi
1322 echo "$as_me:1322: result: $ac_cv_target" >&5
1323 echo "${ECHO_T}$ac_cv_target" >&6
1324 target=$ac_cv_target
1325 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1326 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1327 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1328
1329 # The aliases save the names the user supplied, while $host etc.
1330 # will get canonicalized.
1331 test -n "$target_alias" &&
1332   test "$program_prefix$program_suffix$program_transform_name" = \
1333     NONENONEs,x,x, &&
1334   program_prefix=${target_alias}-
1335         system_name="$host_os"
1336 else
1337         system_name="`(uname -s -r) 2>/dev/null`"
1338         if test -z "$system_name" ; then
1339                 system_name="`(hostname) 2>/dev/null`"
1340         fi
1341 fi
1342 test -n "$system_name" &&
1343 cat >>confdefs.h <<EOF
1344 #define SYSTEM_NAME "$system_name"
1345 EOF
1346
1347 if test "${cf_cv_system_name+set}" = set; then
1348   echo $ECHO_N "(cached) $ECHO_C" >&6
1349 else
1350   cf_cv_system_name="$system_name"
1351 fi
1352
1353 test -z "$system_name" && system_name="$cf_cv_system_name"
1354 test -n "$cf_cv_system_name" && echo "$as_me:1354: result: Configuring for $cf_cv_system_name" >&5
1355 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1356
1357 if test ".$system_name" != ".$cf_cv_system_name" ; then
1358         echo "$as_me:1358: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1359 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1360         { { echo "$as_me:1360: error: \"Please remove config.cache and try again.\"" >&5
1361 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1362    { (exit 1); exit 1; }; }
1363 fi
1364
1365 # Check whether --with-system-type or --without-system-type was given.
1366 if test "${with_system_type+set}" = set; then
1367   withval="$with_system_type"
1368   { echo "$as_me:1368: WARNING: overriding system type to $withval" >&5
1369 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1370         cf_cv_system_name=$withval
1371         host_os=$withval
1372
1373 fi;
1374
1375 ###     Save the given $CFLAGS to allow user-override.
1376 cf_user_CFLAGS="$CFLAGS"
1377
1378 ###     Default install-location
1379
1380 echo "$as_me:1380: checking for prefix" >&5
1381 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1382 if test "x$prefix" = "xNONE" ; then
1383         case "$cf_cv_system_name" in
1384                 # non-vendor systems don't have a conflict
1385         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1386                 prefix=/usr
1387                 ;;
1388         *)      prefix=$ac_default_prefix
1389                 ;;
1390         esac
1391 fi
1392 echo "$as_me:1392: result: $prefix" >&5
1393 echo "${ECHO_T}$prefix" >&6
1394
1395 if test "x$prefix" = "xNONE" ; then
1396 echo "$as_me:1396: checking for default include-directory" >&5
1397 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1398 test -n "$verbose" && echo 1>&6
1399 for cf_symbol in \
1400         $includedir \
1401         $includedir/ncurses \
1402         $prefix/include \
1403         $prefix/include/ncurses \
1404         /usr/local/include \
1405         /usr/local/include/ncurses \
1406         /usr/include \
1407         /usr/include/ncurses
1408 do
1409         cf_dir=`eval echo $cf_symbol`
1410         if test -f $cf_dir/curses.h ; then
1411         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1412                 includedir="$cf_symbol"
1413                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1414                 break
1415         fi
1416         fi
1417         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1418 done
1419 echo "$as_me:1419: result: $includedir" >&5
1420 echo "${ECHO_T}$includedir" >&6
1421 fi
1422
1423 ###     Checks for programs.
1424
1425 # Check whether --with-ada or --without-ada was given.
1426 if test "${with_ada+set}" = set; then
1427   withval="$with_ada"
1428   cf_with_ada=$withval
1429 else
1430   cf_with_ada=yes
1431 fi;
1432 if test "x$cf_with_ada" = xyes
1433 then
1434         cf_PROG_CC="gnatgcc gcc cc"
1435 else
1436         cf_PROG_CC="gcc cc"
1437 fi
1438
1439 ac_ext=c
1440 ac_cpp='$CPP $CPPFLAGS'
1441 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1442 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1444 ac_main_return=return
1445 if test -n "$ac_tool_prefix"; then
1446   for ac_prog in $cf_PROG_CC
1447   do
1448     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1449 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$CC"; then
1456   ac_cv_prog_CC="$CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 CC=$ac_cv_prog_CC
1472 if test -n "$CC"; then
1473   echo "$as_me:1473: result: $CC" >&5
1474 echo "${ECHO_T}$CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480     test -n "$CC" && break
1481   done
1482 fi
1483 if test -z "$CC"; then
1484   ac_ct_CC=$CC
1485   for ac_prog in $cf_PROG_CC
1486 do
1487   # Extract the first word of "$ac_prog", so it can be a program name with args.
1488 set dummy $ac_prog; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$ac_ct_CC"; then
1495   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_ac_ct_CC="$ac_prog"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1511 if test -n "$ac_ct_CC"; then
1512   echo "$as_me:1512: result: $ac_ct_CC" >&5
1513 echo "${ECHO_T}$ac_ct_CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519   test -n "$ac_ct_CC" && break
1520 done
1521
1522   CC=$ac_ct_CC
1523 fi
1524
1525 test -z "$CC" && { { echo "$as_me:1525: error: no acceptable cc found in \$PATH" >&5
1526 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1527    { (exit 1); exit 1; }; }
1528
1529 # Provide some information about the compiler.
1530 echo "$as_me:1530:" \
1531      "checking for C compiler version" >&5
1532 ac_compiler=`set X $ac_compile; echo $2`
1533 { (eval echo "$as_me:1533: \"$ac_compiler --version </dev/null >&5\"") >&5
1534   (eval $ac_compiler --version </dev/null >&5) 2>&5
1535   ac_status=$?
1536   echo "$as_me:1536: \$? = $ac_status" >&5
1537   (exit $ac_status); }
1538 { (eval echo "$as_me:1538: \"$ac_compiler -v </dev/null >&5\"") >&5
1539   (eval $ac_compiler -v </dev/null >&5) 2>&5
1540   ac_status=$?
1541   echo "$as_me:1541: \$? = $ac_status" >&5
1542   (exit $ac_status); }
1543 { (eval echo "$as_me:1543: \"$ac_compiler -V </dev/null >&5\"") >&5
1544   (eval $ac_compiler -V </dev/null >&5) 2>&5
1545   ac_status=$?
1546   echo "$as_me:1546: \$? = $ac_status" >&5
1547   (exit $ac_status); }
1548
1549 cat >conftest.$ac_ext <<_ACEOF
1550 #line 1550 "configure"
1551 #include "confdefs.h"
1552
1553 int
1554 main ()
1555 {
1556
1557   ;
1558   return 0;
1559 }
1560 _ACEOF
1561 ac_clean_files_save=$ac_clean_files
1562 ac_clean_files="$ac_clean_files a.out a.exe"
1563 # Try to create an executable without -o first, disregard a.out.
1564 # It will help us diagnose broken compilers, and finding out an intuition
1565 # of exeext.
1566 echo "$as_me:1566: checking for C compiler default output" >&5
1567 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1568 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1569 if { (eval echo "$as_me:1569: \"$ac_link_default\"") >&5
1570   (eval $ac_link_default) 2>&5
1571   ac_status=$?
1572   echo "$as_me:1572: \$? = $ac_status" >&5
1573   (exit $ac_status); }; then
1574   # Find the output, starting from the most likely.  This scheme is
1575 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1576 # resort.
1577 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1578                 ls a.out conftest 2>/dev/null;
1579                 ls a.* conftest.* 2>/dev/null`; do
1580   case $ac_file in
1581     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1582     a.out ) # We found the default executable, but exeext='' is most
1583             # certainly right.
1584             break;;
1585     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1586           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1587           export ac_cv_exeext
1588           break;;
1589     * ) break;;
1590   esac
1591 done
1592 else
1593   echo "$as_me: failed program was:" >&5
1594 cat conftest.$ac_ext >&5
1595 { { echo "$as_me:1595: error: C compiler cannot create executables" >&5
1596 echo "$as_me: error: C compiler cannot create executables" >&2;}
1597    { (exit 77); exit 77; }; }
1598 fi
1599
1600 ac_exeext=$ac_cv_exeext
1601 echo "$as_me:1601: result: $ac_file" >&5
1602 echo "${ECHO_T}$ac_file" >&6
1603
1604 # Check the compiler produces executables we can run.  If not, either
1605 # the compiler is broken, or we cross compile.
1606 echo "$as_me:1606: checking whether the C compiler works" >&5
1607 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1608 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1609 # If not cross compiling, check that we can run a simple program.
1610 if test "$cross_compiling" != yes; then
1611   if { ac_try='./$ac_file'
1612   { (eval echo "$as_me:1612: \"$ac_try\"") >&5
1613   (eval $ac_try) 2>&5
1614   ac_status=$?
1615   echo "$as_me:1615: \$? = $ac_status" >&5
1616   (exit $ac_status); }; }; then
1617     cross_compiling=no
1618   else
1619     if test "$cross_compiling" = maybe; then
1620         cross_compiling=yes
1621     else
1622         { { echo "$as_me:1622: error: cannot run C compiled programs.
1623 If you meant to cross compile, use \`--host'." >&5
1624 echo "$as_me: error: cannot run C compiled programs.
1625 If you meant to cross compile, use \`--host'." >&2;}
1626    { (exit 1); exit 1; }; }
1627     fi
1628   fi
1629 fi
1630 echo "$as_me:1630: result: yes" >&5
1631 echo "${ECHO_T}yes" >&6
1632
1633 rm -f a.out a.exe conftest$ac_cv_exeext
1634 ac_clean_files=$ac_clean_files_save
1635 # Check the compiler produces executables we can run.  If not, either
1636 # the compiler is broken, or we cross compile.
1637 echo "$as_me:1637: checking whether we are cross compiling" >&5
1638 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1639 echo "$as_me:1639: result: $cross_compiling" >&5
1640 echo "${ECHO_T}$cross_compiling" >&6
1641
1642 echo "$as_me:1642: checking for executable suffix" >&5
1643 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1644 if { (eval echo "$as_me:1644: \"$ac_link\"") >&5
1645   (eval $ac_link) 2>&5
1646   ac_status=$?
1647   echo "$as_me:1647: \$? = $ac_status" >&5
1648   (exit $ac_status); }; then
1649   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1650 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1651 # work properly (i.e., refer to `conftest.exe'), while it won't with
1652 # `rm'.
1653 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1654   case $ac_file in
1655     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1656     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1657           export ac_cv_exeext
1658           break;;
1659     * ) break;;
1660   esac
1661 done
1662 else
1663   { { echo "$as_me:1663: error: cannot compute EXEEXT: cannot compile and link" >&5
1664 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1665    { (exit 1); exit 1; }; }
1666 fi
1667
1668 rm -f conftest$ac_cv_exeext
1669 echo "$as_me:1669: result: $ac_cv_exeext" >&5
1670 echo "${ECHO_T}$ac_cv_exeext" >&6
1671
1672 rm -f conftest.$ac_ext
1673 EXEEXT=$ac_cv_exeext
1674 ac_exeext=$EXEEXT
1675 echo "$as_me:1675: checking for object suffix" >&5
1676 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1677 if test "${ac_cv_objext+set}" = set; then
1678   echo $ECHO_N "(cached) $ECHO_C" >&6
1679 else
1680   cat >conftest.$ac_ext <<_ACEOF
1681 #line 1681 "configure"
1682 #include "confdefs.h"
1683
1684 int
1685 main ()
1686 {
1687
1688   ;
1689   return 0;
1690 }
1691 _ACEOF
1692 rm -f conftest.o conftest.obj
1693 if { (eval echo "$as_me:1693: \"$ac_compile\"") >&5
1694   (eval $ac_compile) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; then
1698   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1699   case $ac_file in
1700     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1701     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1702        break;;
1703   esac
1704 done
1705 else
1706   echo "$as_me: failed program was:" >&5
1707 cat conftest.$ac_ext >&5
1708 { { echo "$as_me:1708: error: cannot compute OBJEXT: cannot compile" >&5
1709 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1710    { (exit 1); exit 1; }; }
1711 fi
1712
1713 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1714 fi
1715 echo "$as_me:1715: result: $ac_cv_objext" >&5
1716 echo "${ECHO_T}$ac_cv_objext" >&6
1717 OBJEXT=$ac_cv_objext
1718 ac_objext=$OBJEXT
1719 echo "$as_me:1719: checking whether we are using the GNU C compiler" >&5
1720 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1721 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1722   echo $ECHO_N "(cached) $ECHO_C" >&6
1723 else
1724   cat >conftest.$ac_ext <<_ACEOF
1725 #line 1725 "configure"
1726 #include "confdefs.h"
1727
1728 int
1729 main ()
1730 {
1731 #ifndef __GNUC__
1732        choke me
1733 #endif
1734
1735   ;
1736   return 0;
1737 }
1738 _ACEOF
1739 rm -f conftest.$ac_objext
1740 if { (eval echo "$as_me:1740: \"$ac_compile\"") >&5
1741   (eval $ac_compile) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); } &&
1745          { ac_try='test -s conftest.$ac_objext'
1746   { (eval echo "$as_me:1746: \"$ac_try\"") >&5
1747   (eval $ac_try) 2>&5
1748   ac_status=$?
1749   echo "$as_me:1749: \$? = $ac_status" >&5
1750   (exit $ac_status); }; }; then
1751   ac_compiler_gnu=yes
1752 else
1753   echo "$as_me: failed program was:" >&5
1754 cat conftest.$ac_ext >&5
1755 ac_compiler_gnu=no
1756 fi
1757 rm -f conftest.$ac_objext conftest.$ac_ext
1758 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1759
1760 fi
1761 echo "$as_me:1761: result: $ac_cv_c_compiler_gnu" >&5
1762 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1763 GCC=`test $ac_compiler_gnu = yes && echo yes`
1764 ac_test_CFLAGS=${CFLAGS+set}
1765 ac_save_CFLAGS=$CFLAGS
1766 CFLAGS="-g"
1767 echo "$as_me:1767: checking whether $CC accepts -g" >&5
1768 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1769 if test "${ac_cv_prog_cc_g+set}" = set; then
1770   echo $ECHO_N "(cached) $ECHO_C" >&6
1771 else
1772   cat >conftest.$ac_ext <<_ACEOF
1773 #line 1773 "configure"
1774 #include "confdefs.h"
1775
1776 int
1777 main ()
1778 {
1779
1780   ;
1781   return 0;
1782 }
1783 _ACEOF
1784 rm -f conftest.$ac_objext
1785 if { (eval echo "$as_me:1785: \"$ac_compile\"") >&5
1786   (eval $ac_compile) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); } &&
1790          { ac_try='test -s conftest.$ac_objext'
1791   { (eval echo "$as_me:1791: \"$ac_try\"") >&5
1792   (eval $ac_try) 2>&5
1793   ac_status=$?
1794   echo "$as_me:1794: \$? = $ac_status" >&5
1795   (exit $ac_status); }; }; then
1796   ac_cv_prog_cc_g=yes
1797 else
1798   echo "$as_me: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1800 ac_cv_prog_cc_g=no
1801 fi
1802 rm -f conftest.$ac_objext conftest.$ac_ext
1803 fi
1804 echo "$as_me:1804: result: $ac_cv_prog_cc_g" >&5
1805 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1806 if test "$ac_test_CFLAGS" = set; then
1807   CFLAGS=$ac_save_CFLAGS
1808 elif test $ac_cv_prog_cc_g = yes; then
1809   if test "$GCC" = yes; then
1810     CFLAGS="-g -O2"
1811   else
1812     CFLAGS="-g"
1813   fi
1814 else
1815   if test "$GCC" = yes; then
1816     CFLAGS="-O2"
1817   else
1818     CFLAGS=
1819   fi
1820 fi
1821 # Some people use a C++ compiler to compile C.  Since we use `exit',
1822 # in C++ we need to declare it.  In case someone uses the same compiler
1823 # for both compiling C and C++ we need to have the C++ compiler decide
1824 # the declaration of exit, since it's the most demanding environment.
1825 cat >conftest.$ac_ext <<_ACEOF
1826 #ifndef __cplusplus
1827   choke me
1828 #endif
1829 _ACEOF
1830 rm -f conftest.$ac_objext
1831 if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
1832   (eval $ac_compile) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -s conftest.$ac_objext'
1837   { (eval echo "$as_me:1837: \"$ac_try\"") >&5
1838   (eval $ac_try) 2>&5
1839   ac_status=$?
1840   echo "$as_me:1840: \$? = $ac_status" >&5
1841   (exit $ac_status); }; }; then
1842   for ac_declaration in \
1843    ''\
1844    '#include <stdlib.h>' \
1845    'extern "C" void std::exit (int) throw (); using std::exit;' \
1846    'extern "C" void std::exit (int); using std::exit;' \
1847    'extern "C" void exit (int) throw ();' \
1848    'extern "C" void exit (int);' \
1849    'void exit (int);'
1850 do
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854 #include <stdlib.h>
1855 $ac_declaration
1856 int
1857 main ()
1858 {
1859 exit (42);
1860   ;
1861   return 0;
1862 }
1863 _ACEOF
1864 rm -f conftest.$ac_objext
1865 if { (eval echo "$as_me:1865: \"$ac_compile\"") >&5
1866   (eval $ac_compile) 2>&5
1867   ac_status=$?
1868   echo "$as_me:1868: \$? = $ac_status" >&5
1869   (exit $ac_status); } &&
1870          { ac_try='test -s conftest.$ac_objext'
1871   { (eval echo "$as_me:1871: \"$ac_try\"") >&5
1872   (eval $ac_try) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit $ac_status); }; }; then
1876   :
1877 else
1878   echo "$as_me: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1880 continue
1881 fi
1882 rm -f conftest.$ac_objext conftest.$ac_ext
1883   cat >conftest.$ac_ext <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1886 $ac_declaration
1887 int
1888 main ()
1889 {
1890 exit (42);
1891   ;
1892   return 0;
1893 }
1894 _ACEOF
1895 rm -f conftest.$ac_objext
1896 if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
1897   (eval $ac_compile) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); } &&
1901          { ac_try='test -s conftest.$ac_objext'
1902   { (eval echo "$as_me:1902: \"$ac_try\"") >&5
1903   (eval $ac_try) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); }; }; then
1907   break
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 done
1914 rm -rf conftest*
1915 if test -n "$ac_declaration"; then
1916   echo '#ifdef __cplusplus' >>confdefs.h
1917   echo $ac_declaration      >>confdefs.h
1918   echo '#endif'             >>confdefs.h
1919 fi
1920
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1924 fi
1925 rm -f conftest.$ac_objext conftest.$ac_ext
1926 ac_ext=c
1927 ac_cpp='$CPP $CPPFLAGS'
1928 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1929 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1931 ac_main_return=return
1932
1933 GCC_VERSION=none
1934 if test "$GCC" = yes ; then
1935         echo "$as_me:1935: checking version of $CC" >&5
1936 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1937         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1938         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1939         echo "$as_me:1939: result: $GCC_VERSION" >&5
1940 echo "${ECHO_T}$GCC_VERSION" >&6
1941 fi
1942
1943 echo "$as_me:1943: checking for $CC option to accept ANSI C" >&5
1944 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1945 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1946   echo $ECHO_N "(cached) $ECHO_C" >&6
1947 else
1948   ac_cv_prog_cc_stdc=no
1949 ac_save_CC=$CC
1950 cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953 #include <stdarg.h>
1954 #include <stdio.h>
1955 #include <sys/types.h>
1956 #include <sys/stat.h>
1957 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1958 struct buf { int x; };
1959 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1960 static char *e (p, i)
1961      char **p;
1962      int i;
1963 {
1964   return p[i];
1965 }
1966 static char *f (char * (*g) (char **, int), char **p, ...)
1967 {
1968   char *s;
1969   va_list v;
1970   va_start (v,p);
1971   s = g (p, va_arg (v,int));
1972   va_end (v);
1973   return s;
1974 }
1975 int test (int i, double x);
1976 struct s1 {int (*f) (int a);};
1977 struct s2 {int (*f) (double a);};
1978 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1979 int argc;
1980 char **argv;
1981 int
1982 main ()
1983 {
1984 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1985   ;
1986   return 0;
1987 }
1988 _ACEOF
1989 # Don't try gcc -ansi; that turns off useful extensions and
1990 # breaks some systems' header files.
1991 # AIX                   -qlanglvl=ansi
1992 # Ultrix and OSF/1      -std1
1993 # HP-UX 10.20 and later -Ae
1994 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1995 # SVR4                  -Xc -D__EXTENSIONS__
1996 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1997 do
1998   CC="$ac_save_CC $ac_arg"
1999   rm -f conftest.$ac_objext
2000 if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5
2001   (eval $ac_compile) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit $ac_status); } &&
2005          { ac_try='test -s conftest.$ac_objext'
2006   { (eval echo "$as_me:2006: \"$ac_try\"") >&5
2007   (eval $ac_try) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); }; }; then
2011   ac_cv_prog_cc_stdc=$ac_arg
2012 break
2013 else
2014   echo "$as_me: failed program was:" >&5
2015 cat conftest.$ac_ext >&5
2016 fi
2017 rm -f conftest.$ac_objext
2018 done
2019 rm -f conftest.$ac_ext conftest.$ac_objext
2020 CC=$ac_save_CC
2021
2022 fi
2023
2024 case "x$ac_cv_prog_cc_stdc" in
2025   x|xno)
2026     echo "$as_me:2026: result: none needed" >&5
2027 echo "${ECHO_T}none needed" >&6 ;;
2028   *)
2029     echo "$as_me:2029: result: $ac_cv_prog_cc_stdc" >&5
2030 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2031     CC="$CC $ac_cv_prog_cc_stdc" ;;
2032 esac
2033
2034 # This should have been defined by AC_PROG_CC
2035 : ${CC:=cc}
2036
2037 echo "$as_me:2037: checking \$CC variable" >&5
2038 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2039 case "$CC" in #(vi
2040 *[\ \   ]-[IUD]*)
2041         echo "$as_me:2041: result: broken" >&5
2042 echo "${ECHO_T}broken" >&6
2043         { echo "$as_me:2043: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2044 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2045         # humor him...
2046         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2047         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2048
2049 cf_fix_cppflags=no
2050 cf_new_cflags=
2051 cf_new_cppflags=
2052 cf_new_extra_cppflags=
2053
2054 for cf_add_cflags in $cf_flags
2055 do
2056 case $cf_fix_cppflags in
2057 no)
2058         case $cf_add_cflags in #(vi
2059         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2060                 case $cf_add_cflags in
2061                 -D*)
2062                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2063
2064                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2065                                 && test -z "${cf_tst_cflags}" \
2066                                 && cf_fix_cppflags=yes
2067
2068                         if test $cf_fix_cppflags = yes ; then
2069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2070                                 continue
2071                         elif test "${cf_tst_cflags}" = "\"'" ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         fi
2075                         ;;
2076                 esac
2077                 case "$CPPFLAGS" in
2078                 *$cf_add_cflags) #(vi
2079                         ;;
2080                 *) #(vi
2081                         case $cf_add_cflags in #(vi
2082                         -D*)
2083                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2084
2085 CPPFLAGS=`echo "$CPPFLAGS" | \
2086         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2087                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2088
2089                                 ;;
2090                         esac
2091                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2092                         ;;
2093                 esac
2094                 ;;
2095         *)
2096                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2097                 ;;
2098         esac
2099         ;;
2100 yes)
2101         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2102
2103         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2104
2105         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2106                 && test -z "${cf_tst_cflags}" \
2107                 && cf_fix_cppflags=no
2108         ;;
2109 esac
2110 done
2111
2112 if test -n "$cf_new_cflags" ; then
2113
2114         CFLAGS="$CFLAGS $cf_new_cflags"
2115 fi
2116
2117 if test -n "$cf_new_cppflags" ; then
2118
2119         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2120 fi
2121
2122 if test -n "$cf_new_extra_cppflags" ; then
2123
2124         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2125 fi
2126
2127         ;;
2128 *)
2129         echo "$as_me:2129: result: ok" >&5
2130 echo "${ECHO_T}ok" >&6
2131         ;;
2132 esac
2133
2134 ac_ext=c
2135 ac_cpp='$CPP $CPPFLAGS'
2136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2139 ac_main_return=return
2140 echo "$as_me:2140: checking how to run the C preprocessor" >&5
2141 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2142 # On Suns, sometimes $CPP names a directory.
2143 if test -n "$CPP" && test -d "$CPP"; then
2144   CPP=
2145 fi
2146 if test -z "$CPP"; then
2147   if test "${ac_cv_prog_CPP+set}" = set; then
2148   echo $ECHO_N "(cached) $ECHO_C" >&6
2149 else
2150       # Double quotes because CPP needs to be expanded
2151     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2152     do
2153       ac_preproc_ok=false
2154 for ac_c_preproc_warn_flag in '' yes
2155 do
2156   # Use a header file that comes with gcc, so configuring glibc
2157   # with a fresh cross-compiler works.
2158   # On the NeXT, cc -E runs the code through the compiler's parser,
2159   # not just through cpp. "Syntax error" is here to catch this case.
2160   cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2163 #include <assert.h>
2164                      Syntax error
2165 _ACEOF
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2168   ac_status=$?
2169   egrep -v '^ *\+' conftest.er1 >conftest.err
2170   rm -f conftest.er1
2171   cat conftest.err >&5
2172   echo "$as_me:2172: \$? = $ac_status" >&5
2173   (exit $ac_status); } >/dev/null; then
2174   if test -s conftest.err; then
2175     ac_cpp_err=$ac_c_preproc_warn_flag
2176   else
2177     ac_cpp_err=
2178   fi
2179 else
2180   ac_cpp_err=yes
2181 fi
2182 if test -z "$ac_cpp_err"; then
2183   :
2184 else
2185   echo "$as_me: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   # Broken: fails on valid input.
2188 continue
2189 fi
2190 rm -f conftest.err conftest.$ac_ext
2191
2192   # OK, works on sane cases.  Now check whether non-existent headers
2193   # can be detected and how.
2194   cat >conftest.$ac_ext <<_ACEOF
2195 #line 2195 "configure"
2196 #include "confdefs.h"
2197 #include <ac_nonexistent.h>
2198 _ACEOF
2199 if { (eval echo "$as_me:2199: \"$ac_cpp conftest.$ac_ext\"") >&5
2200   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2201   ac_status=$?
2202   egrep -v '^ *\+' conftest.er1 >conftest.err
2203   rm -f conftest.er1
2204   cat conftest.err >&5
2205   echo "$as_me:2205: \$? = $ac_status" >&5
2206   (exit $ac_status); } >/dev/null; then
2207   if test -s conftest.err; then
2208     ac_cpp_err=$ac_c_preproc_warn_flag
2209   else
2210     ac_cpp_err=
2211   fi
2212 else
2213   ac_cpp_err=yes
2214 fi
2215 if test -z "$ac_cpp_err"; then
2216   # Broken: success on invalid input.
2217 continue
2218 else
2219   echo "$as_me: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   # Passes both tests.
2222 ac_preproc_ok=:
2223 break
2224 fi
2225 rm -f conftest.err conftest.$ac_ext
2226
2227 done
2228 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2229 rm -f conftest.err conftest.$ac_ext
2230 if $ac_preproc_ok; then
2231   break
2232 fi
2233
2234     done
2235     ac_cv_prog_CPP=$CPP
2236
2237 fi
2238   CPP=$ac_cv_prog_CPP
2239 else
2240   ac_cv_prog_CPP=$CPP
2241 fi
2242 echo "$as_me:2242: result: $CPP" >&5
2243 echo "${ECHO_T}$CPP" >&6
2244 ac_preproc_ok=false
2245 for ac_c_preproc_warn_flag in '' yes
2246 do
2247   # Use a header file that comes with gcc, so configuring glibc
2248   # with a fresh cross-compiler works.
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp. "Syntax error" is here to catch this case.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255                      Syntax error
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   :
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Broken: fails on valid input.
2279 continue
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283   # OK, works on sane cases.  Now check whether non-existent headers
2284   # can be detected and how.
2285   cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2289 _ACEOF
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2292   ac_status=$?
2293   egrep -v '^ *\+' conftest.er1 >conftest.err
2294   rm -f conftest.er1
2295   cat conftest.err >&5
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); } >/dev/null; then
2298   if test -s conftest.err; then
2299     ac_cpp_err=$ac_c_preproc_warn_flag
2300   else
2301     ac_cpp_err=
2302   fi
2303 else
2304   ac_cpp_err=yes
2305 fi
2306 if test -z "$ac_cpp_err"; then
2307   # Broken: success on invalid input.
2308 continue
2309 else
2310   echo "$as_me: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   # Passes both tests.
2313 ac_preproc_ok=:
2314 break
2315 fi
2316 rm -f conftest.err conftest.$ac_ext
2317
2318 done
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2322   :
2323 else
2324   { { echo "$as_me:2324: error: C preprocessor \"$CPP\" fails sanity check" >&5
2325 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2326    { (exit 1); exit 1; }; }
2327 fi
2328
2329 ac_ext=c
2330 ac_cpp='$CPP $CPPFLAGS'
2331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334 ac_main_return=return
2335
2336 if test $ac_cv_c_compiler_gnu = yes; then
2337     echo "$as_me:2337: checking whether $CC needs -traditional" >&5
2338 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2339 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2340   echo $ECHO_N "(cached) $ECHO_C" >&6
2341 else
2342     ac_pattern="Autoconf.*'x'"
2343   cat >conftest.$ac_ext <<_ACEOF
2344 #line 2344 "configure"
2345 #include "confdefs.h"
2346 #include <sgtty.h>
2347 int Autoconf = TIOCGETP;
2348 _ACEOF
2349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2350   egrep "$ac_pattern" >/dev/null 2>&1; then
2351   ac_cv_prog_gcc_traditional=yes
2352 else
2353   ac_cv_prog_gcc_traditional=no
2354 fi
2355 rm -rf conftest*
2356
2357   if test $ac_cv_prog_gcc_traditional = no; then
2358     cat >conftest.$ac_ext <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2361 #include <termio.h>
2362 int Autoconf = TCGETA;
2363 _ACEOF
2364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2365   egrep "$ac_pattern" >/dev/null 2>&1; then
2366   ac_cv_prog_gcc_traditional=yes
2367 fi
2368 rm -rf conftest*
2369
2370   fi
2371 fi
2372 echo "$as_me:2372: result: $ac_cv_prog_gcc_traditional" >&5
2373 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2374   if test $ac_cv_prog_gcc_traditional = yes; then
2375     CC="$CC -traditional"
2376   fi
2377 fi
2378
2379 echo "$as_me:2379: checking whether $CC understands -c and -o together" >&5
2380 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2381 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2382   echo $ECHO_N "(cached) $ECHO_C" >&6
2383 else
2384
2385 cat > conftest.$ac_ext <<CF_EOF
2386 #include <stdio.h>
2387 int main()
2388 {
2389         ${cf_cv_main_return:-return}(0);
2390 }
2391 CF_EOF
2392 # We do the test twice because some compilers refuse to overwrite an
2393 # existing .o file with -o, though they will create one.
2394 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2395 if { (eval echo "$as_me:2395: \"$ac_try\"") >&5
2396   (eval $ac_try) 2>&5
2397   ac_status=$?
2398   echo "$as_me:2398: \$? = $ac_status" >&5
2399   (exit $ac_status); } &&
2400   test -f conftest2.$ac_objext && { (eval echo "$as_me:2400: \"$ac_try\"") >&5
2401   (eval $ac_try) 2>&5
2402   ac_status=$?
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); };
2405 then
2406   eval cf_cv_prog_CC_c_o=yes
2407 else
2408   eval cf_cv_prog_CC_c_o=no
2409 fi
2410 rm -rf conftest*
2411
2412 fi
2413 if test $cf_cv_prog_CC_c_o = yes; then
2414   echo "$as_me:2414: result: yes" >&5
2415 echo "${ECHO_T}yes" >&6
2416 else
2417   echo "$as_me:2417: result: no" >&5
2418 echo "${ECHO_T}no" >&6
2419 fi
2420
2421 if test "$cross_compiling" = yes ; then
2422   LDCONFIG=:
2423 else
2424 case "$cf_cv_system_name" in #(vi
2425 dragonfly*|mirbsd*|freebsd*) #(vi
2426   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2427   ;;
2428 *) LDPATH=$PATH:/sbin:/usr/sbin
2429   # Extract the first word of "ldconfig", so it can be a program name with args.
2430 set dummy ldconfig; ac_word=$2
2431 echo "$as_me:2431: checking for $ac_word" >&5
2432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2433 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2434   echo $ECHO_N "(cached) $ECHO_C" >&6
2435 else
2436   case $LDCONFIG in
2437   [\\/]* | ?:[\\/]*)
2438   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2439   ;;
2440   *)
2441   ac_save_IFS=$IFS; IFS=$ac_path_separator
2442 ac_dummy="$LDPATH"
2443 for ac_dir in $ac_dummy; do
2444   IFS=$ac_save_IFS
2445   test -z "$ac_dir" && ac_dir=.
2446   if $as_executable_p "$ac_dir/$ac_word"; then
2447    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2448    echo "$as_me:2448: found $ac_dir/$ac_word" >&5
2449    break
2450 fi
2451 done
2452
2453   ;;
2454 esac
2455 fi
2456 LDCONFIG=$ac_cv_path_LDCONFIG
2457
2458 if test -n "$LDCONFIG"; then
2459   echo "$as_me:2459: result: $LDCONFIG" >&5
2460 echo "${ECHO_T}$LDCONFIG" >&6
2461 else
2462   echo "$as_me:2462: result: no" >&5
2463 echo "${ECHO_T}no" >&6
2464 fi
2465
2466   ;;
2467 esac
2468 fi
2469
2470 echo "$as_me:2470: checking if you want to ensure bool is consistent with C++" >&5
2471 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2472
2473 # Check whether --with-cxx or --without-cxx was given.
2474 if test "${with_cxx+set}" = set; then
2475   withval="$with_cxx"
2476   cf_with_cxx=$withval
2477 else
2478   cf_with_cxx=yes
2479 fi;
2480 echo "$as_me:2480: result: $cf_with_cxx" >&5
2481 echo "${ECHO_T}$cf_with_cxx" >&6
2482 if test "X$cf_with_cxx" = Xno ; then
2483         CXX=""
2484         GXX=""
2485 else
2486         # with autoconf 2.13, we can change the error to a warning:
2487                 ac_ext=cc
2488 ac_cpp='$CXXCPP $CPPFLAGS'
2489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2492 ac_main_return=return
2493 if test -n "$ac_tool_prefix"; then
2494   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2495   do
2496     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2497 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2498 echo "$as_me:2498: checking for $ac_word" >&5
2499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2500 if test "${ac_cv_prog_CXX+set}" = set; then
2501   echo $ECHO_N "(cached) $ECHO_C" >&6
2502 else
2503   if test -n "$CXX"; then
2504   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2505 else
2506   ac_save_IFS=$IFS; IFS=$ac_path_separator
2507 ac_dummy="$PATH"
2508 for ac_dir in $ac_dummy; do
2509   IFS=$ac_save_IFS
2510   test -z "$ac_dir" && ac_dir=.
2511   $as_executable_p "$ac_dir/$ac_word" || continue
2512 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2513 echo "$as_me:2513: found $ac_dir/$ac_word" >&5
2514 break
2515 done
2516
2517 fi
2518 fi
2519 CXX=$ac_cv_prog_CXX
2520 if test -n "$CXX"; then
2521   echo "$as_me:2521: result: $CXX" >&5
2522 echo "${ECHO_T}$CXX" >&6
2523 else
2524   echo "$as_me:2524: result: no" >&5
2525 echo "${ECHO_T}no" >&6
2526 fi
2527
2528     test -n "$CXX" && break
2529   done
2530 fi
2531 if test -z "$CXX"; then
2532   ac_ct_CXX=$CXX
2533   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2534 do
2535   # Extract the first word of "$ac_prog", so it can be a program name with args.
2536 set dummy $ac_prog; ac_word=$2
2537 echo "$as_me:2537: checking for $ac_word" >&5
2538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2539 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2540   echo $ECHO_N "(cached) $ECHO_C" >&6
2541 else
2542   if test -n "$ac_ct_CXX"; then
2543   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2544 else
2545   ac_save_IFS=$IFS; IFS=$ac_path_separator
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548   IFS=$ac_save_IFS
2549   test -z "$ac_dir" && ac_dir=.
2550   $as_executable_p "$ac_dir/$ac_word" || continue
2551 ac_cv_prog_ac_ct_CXX="$ac_prog"
2552 echo "$as_me:2552: found $ac_dir/$ac_word" >&5
2553 break
2554 done
2555
2556 fi
2557 fi
2558 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2559 if test -n "$ac_ct_CXX"; then
2560   echo "$as_me:2560: result: $ac_ct_CXX" >&5
2561 echo "${ECHO_T}$ac_ct_CXX" >&6
2562 else
2563   echo "$as_me:2563: result: no" >&5
2564 echo "${ECHO_T}no" >&6
2565 fi
2566
2567   test -n "$ac_ct_CXX" && break
2568 done
2569 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2570
2571   CXX=$ac_ct_CXX
2572 fi
2573
2574 # Provide some information about the compiler.
2575 echo "$as_me:2575:" \
2576      "checking for C++ compiler version" >&5
2577 ac_compiler=`set X $ac_compile; echo $2`
2578 { (eval echo "$as_me:2578: \"$ac_compiler --version </dev/null >&5\"") >&5
2579   (eval $ac_compiler --version </dev/null >&5) 2>&5
2580   ac_status=$?
2581   echo "$as_me:2581: \$? = $ac_status" >&5
2582   (exit $ac_status); }
2583 { (eval echo "$as_me:2583: \"$ac_compiler -v </dev/null >&5\"") >&5
2584   (eval $ac_compiler -v </dev/null >&5) 2>&5
2585   ac_status=$?
2586   echo "$as_me:2586: \$? = $ac_status" >&5
2587   (exit $ac_status); }
2588 { (eval echo "$as_me:2588: \"$ac_compiler -V </dev/null >&5\"") >&5
2589   (eval $ac_compiler -V </dev/null >&5) 2>&5
2590   ac_status=$?
2591   echo "$as_me:2591: \$? = $ac_status" >&5
2592   (exit $ac_status); }
2593
2594 echo "$as_me:2594: checking whether we are using the GNU C++ compiler" >&5
2595 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2596 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2597   echo $ECHO_N "(cached) $ECHO_C" >&6
2598 else
2599   cat >conftest.$ac_ext <<_ACEOF
2600 #line 2600 "configure"
2601 #include "confdefs.h"
2602
2603 int
2604 main ()
2605 {
2606 #ifndef __GNUC__
2607        choke me
2608 #endif
2609
2610   ;
2611   return 0;
2612 }
2613 _ACEOF
2614 rm -f conftest.$ac_objext
2615 if { (eval echo "$as_me:2615: \"$ac_compile\"") >&5
2616   (eval $ac_compile) 2>&5
2617   ac_status=$?
2618   echo "$as_me:2618: \$? = $ac_status" >&5
2619   (exit $ac_status); } &&
2620          { ac_try='test -s conftest.$ac_objext'
2621   { (eval echo "$as_me:2621: \"$ac_try\"") >&5
2622   (eval $ac_try) 2>&5
2623   ac_status=$?
2624   echo "$as_me:2624: \$? = $ac_status" >&5
2625   (exit $ac_status); }; }; then
2626   ac_compiler_gnu=yes
2627 else
2628   echo "$as_me: failed program was:" >&5
2629 cat conftest.$ac_ext >&5
2630 ac_compiler_gnu=no
2631 fi
2632 rm -f conftest.$ac_objext conftest.$ac_ext
2633 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2634
2635 fi
2636 echo "$as_me:2636: result: $ac_cv_cxx_compiler_gnu" >&5
2637 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2638 GXX=`test $ac_compiler_gnu = yes && echo yes`
2639 ac_test_CXXFLAGS=${CXXFLAGS+set}
2640 ac_save_CXXFLAGS=$CXXFLAGS
2641 CXXFLAGS="-g"
2642 echo "$as_me:2642: checking whether $CXX accepts -g" >&5
2643 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2644 if test "${ac_cv_prog_cxx_g+set}" = set; then
2645   echo $ECHO_N "(cached) $ECHO_C" >&6
2646 else
2647   cat >conftest.$ac_ext <<_ACEOF
2648 #line 2648 "configure"
2649 #include "confdefs.h"
2650
2651 int
2652 main ()
2653 {
2654
2655   ;
2656   return 0;
2657 }
2658 _ACEOF
2659 rm -f conftest.$ac_objext
2660 if { (eval echo "$as_me:2660: \"$ac_compile\"") >&5
2661   (eval $ac_compile) 2>&5
2662   ac_status=$?
2663   echo "$as_me:2663: \$? = $ac_status" >&5
2664   (exit $ac_status); } &&
2665          { ac_try='test -s conftest.$ac_objext'
2666   { (eval echo "$as_me:2666: \"$ac_try\"") >&5
2667   (eval $ac_try) 2>&5
2668   ac_status=$?
2669   echo "$as_me:2669: \$? = $ac_status" >&5
2670   (exit $ac_status); }; }; then
2671   ac_cv_prog_cxx_g=yes
2672 else
2673   echo "$as_me: failed program was:" >&5
2674 cat conftest.$ac_ext >&5
2675 ac_cv_prog_cxx_g=no
2676 fi
2677 rm -f conftest.$ac_objext conftest.$ac_ext
2678 fi
2679 echo "$as_me:2679: result: $ac_cv_prog_cxx_g" >&5
2680 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2681 if test "$ac_test_CXXFLAGS" = set; then
2682   CXXFLAGS=$ac_save_CXXFLAGS
2683 elif test $ac_cv_prog_cxx_g = yes; then
2684   if test "$GXX" = yes; then
2685     CXXFLAGS="-g -O2"
2686   else
2687     CXXFLAGS="-g"
2688   fi
2689 else
2690   if test "$GXX" = yes; then
2691     CXXFLAGS="-O2"
2692   else
2693     CXXFLAGS=
2694   fi
2695 fi
2696 for ac_declaration in \
2697    ''\
2698    '#include <stdlib.h>' \
2699    'extern "C" void std::exit (int) throw (); using std::exit;' \
2700    'extern "C" void std::exit (int); using std::exit;' \
2701    'extern "C" void exit (int) throw ();' \
2702    'extern "C" void exit (int);' \
2703    'void exit (int);'
2704 do
2705   cat >conftest.$ac_ext <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2708 #include <stdlib.h>
2709 $ac_declaration
2710 int
2711 main ()
2712 {
2713 exit (42);
2714   ;
2715   return 0;
2716 }
2717 _ACEOF
2718 rm -f conftest.$ac_objext
2719 if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5
2720   (eval $ac_compile) 2>&5
2721   ac_status=$?
2722   echo "$as_me:2722: \$? = $ac_status" >&5
2723   (exit $ac_status); } &&
2724          { ac_try='test -s conftest.$ac_objext'
2725   { (eval echo "$as_me:2725: \"$ac_try\"") >&5
2726   (eval $ac_try) 2>&5
2727   ac_status=$?
2728   echo "$as_me:2728: \$? = $ac_status" >&5
2729   (exit $ac_status); }; }; then
2730   :
2731 else
2732   echo "$as_me: failed program was:" >&5
2733 cat conftest.$ac_ext >&5
2734 continue
2735 fi
2736 rm -f conftest.$ac_objext conftest.$ac_ext
2737   cat >conftest.$ac_ext <<_ACEOF
2738 #line 2738 "configure"
2739 #include "confdefs.h"
2740 $ac_declaration
2741 int
2742 main ()
2743 {
2744 exit (42);
2745   ;
2746   return 0;
2747 }
2748 _ACEOF
2749 rm -f conftest.$ac_objext
2750 if { (eval echo "$as_me:2750: \"$ac_compile\"") >&5
2751   (eval $ac_compile) 2>&5
2752   ac_status=$?
2753   echo "$as_me:2753: \$? = $ac_status" >&5
2754   (exit $ac_status); } &&
2755          { ac_try='test -s conftest.$ac_objext'
2756   { (eval echo "$as_me:2756: \"$ac_try\"") >&5
2757   (eval $ac_try) 2>&5
2758   ac_status=$?
2759   echo "$as_me:2759: \$? = $ac_status" >&5
2760   (exit $ac_status); }; }; then
2761   break
2762 else
2763   echo "$as_me: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 fi
2766 rm -f conftest.$ac_objext conftest.$ac_ext
2767 done
2768 rm -rf conftest*
2769 if test -n "$ac_declaration"; then
2770   echo '#ifdef __cplusplus' >>confdefs.h
2771   echo $ac_declaration      >>confdefs.h
2772   echo '#endif'             >>confdefs.h
2773 fi
2774
2775 ac_ext=c
2776 ac_cpp='$CPP $CPPFLAGS'
2777 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2780 ac_main_return=return
2781
2782                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2783         if test "$CXX" = "g++" ; then
2784                 # Extract the first word of "g++", so it can be a program name with args.
2785 set dummy g++; ac_word=$2
2786 echo "$as_me:2786: checking for $ac_word" >&5
2787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2788 if test "${ac_cv_path_CXX+set}" = set; then
2789   echo $ECHO_N "(cached) $ECHO_C" >&6
2790 else
2791   case $CXX in
2792   [\\/]* | ?:[\\/]*)
2793   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2794   ;;
2795   *)
2796   ac_save_IFS=$IFS; IFS=$ac_path_separator
2797 ac_dummy="$PATH"
2798 for ac_dir in $ac_dummy; do
2799   IFS=$ac_save_IFS
2800   test -z "$ac_dir" && ac_dir=.
2801   if $as_executable_p "$ac_dir/$ac_word"; then
2802    ac_cv_path_CXX="$ac_dir/$ac_word"
2803    echo "$as_me:2803: found $ac_dir/$ac_word" >&5
2804    break
2805 fi
2806 done
2807
2808   ;;
2809 esac
2810 fi
2811 CXX=$ac_cv_path_CXX
2812
2813 if test -n "$CXX"; then
2814   echo "$as_me:2814: result: $CXX" >&5
2815 echo "${ECHO_T}$CXX" >&6
2816 else
2817   echo "$as_me:2817: result: no" >&5
2818 echo "${ECHO_T}no" >&6
2819 fi
2820
2821         fi
2822         case "x$CXX" in #(vi
2823         x|xg++)
2824                 { echo "$as_me:2824: WARNING: You don't have any C++ compiler, too bad" >&5
2825 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2826                 cf_with_cxx=no; CXX=""; GXX="";
2827                 ;;
2828         esac
2829 fi
2830
2831 GXX_VERSION=none
2832 if test "$GXX" = yes; then
2833         echo "$as_me:2833: checking version of ${CXX:-g++}" >&5
2834 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2835         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2836         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2837         echo "$as_me:2837: result: $GXX_VERSION" >&5
2838 echo "${ECHO_T}$GXX_VERSION" >&6
2839 fi
2840
2841 case $GXX_VERSION in
2842 1*|2.[0-6]*)
2843         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2844         # cf_cxx_library=no
2845         { echo "$as_me:2845: WARNING: templates do not work" >&5
2846 echo "$as_me: WARNING: templates do not work" >&2;}
2847         ;;
2848 esac
2849
2850 echo "$as_me:2850: checking if you want to build C++ binding and demo" >&5
2851 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2852
2853 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2854 if test "${with_cxx_binding+set}" = set; then
2855   withval="$with_cxx_binding"
2856   cf_with_cxx_binding=$withval
2857 else
2858   cf_with_cxx_binding=$cf_with_cxx
2859 fi;
2860 echo "$as_me:2860: result: $cf_with_cxx_binding" >&5
2861 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2862
2863 echo "$as_me:2863: checking if you want to build with Ada95" >&5
2864 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2865 echo "$as_me:2865: result: $cf_with_ada" >&5
2866 echo "${ECHO_T}$cf_with_ada" >&6
2867
2868 echo "$as_me:2868: checking if you want to install manpages" >&5
2869 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2870
2871 # Check whether --with-manpages or --without-manpages was given.
2872 if test "${with_manpages+set}" = set; then
2873   withval="$with_manpages"
2874   cf_with_manpages=$withval
2875 else
2876   cf_with_manpages=yes
2877 fi;
2878 echo "$as_me:2878: result: $cf_with_manpages" >&5
2879 echo "${ECHO_T}$cf_with_manpages" >&6
2880
2881 echo "$as_me:2881: checking if you want to build programs such as tic" >&5
2882 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2883
2884 # Check whether --with-progs or --without-progs was given.
2885 if test "${with_progs+set}" = set; then
2886   withval="$with_progs"
2887   cf_with_progs=$withval
2888 else
2889   cf_with_progs=yes
2890 fi;
2891 echo "$as_me:2891: result: $cf_with_progs" >&5
2892 echo "${ECHO_T}$cf_with_progs" >&6
2893
2894 echo "$as_me:2894: checking if you want to build test-programs" >&5
2895 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2896
2897 # Check whether --with-tests or --without-tests was given.
2898 if test "${with_tests+set}" = set; then
2899   withval="$with_tests"
2900   cf_with_tests=$withval
2901 else
2902   cf_with_tests=yes
2903 fi;
2904 echo "$as_me:2904: result: $cf_with_tests" >&5
2905 echo "${ECHO_T}$cf_with_tests" >&6
2906
2907 echo "$as_me:2907: checking if you wish to install curses.h" >&5
2908 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2909
2910 # Check whether --with-curses-h or --without-curses-h was given.
2911 if test "${with_curses_h+set}" = set; then
2912   withval="$with_curses_h"
2913   with_curses_h=$withval
2914 else
2915   with_curses_h=yes
2916 fi;
2917 echo "$as_me:2917: result: $with_curses_h" >&5
2918 echo "${ECHO_T}$with_curses_h" >&6
2919
2920 modules_to_build="ncurses"
2921 if test "X$cf_with_progs" != Xno ; then
2922 modules_to_build="$modules_to_build progs tack"
2923 fi
2924 modules_to_build="$modules_to_build panel menu form"
2925
2926 test "$program_prefix" != NONE &&
2927   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2928 # Use a double $ so make ignores it.
2929 test "$program_suffix" != NONE &&
2930   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2931 # Double any \ or $.  echo might interpret backslashes.
2932 # By default was `s,x,x', remove it if useless.
2933 cat <<\_ACEOF >conftest.sed
2934 s/[\\$]/&&/g;s/;s,x,x,$//
2935 _ACEOF
2936 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2937 rm conftest.sed
2938
2939 for ac_prog in mawk gawk nawk awk
2940 do
2941   # Extract the first word of "$ac_prog", so it can be a program name with args.
2942 set dummy $ac_prog; ac_word=$2
2943 echo "$as_me:2943: checking for $ac_word" >&5
2944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2945 if test "${ac_cv_prog_AWK+set}" = set; then
2946   echo $ECHO_N "(cached) $ECHO_C" >&6
2947 else
2948   if test -n "$AWK"; then
2949   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2950 else
2951   ac_save_IFS=$IFS; IFS=$ac_path_separator
2952 ac_dummy="$PATH"
2953 for ac_dir in $ac_dummy; do
2954   IFS=$ac_save_IFS
2955   test -z "$ac_dir" && ac_dir=.
2956   $as_executable_p "$ac_dir/$ac_word" || continue
2957 ac_cv_prog_AWK="$ac_prog"
2958 echo "$as_me:2958: found $ac_dir/$ac_word" >&5
2959 break
2960 done
2961
2962 fi
2963 fi
2964 AWK=$ac_cv_prog_AWK
2965 if test -n "$AWK"; then
2966   echo "$as_me:2966: result: $AWK" >&5
2967 echo "${ECHO_T}$AWK" >&6
2968 else
2969   echo "$as_me:2969: result: no" >&5
2970 echo "${ECHO_T}no" >&6
2971 fi
2972
2973   test -n "$AWK" && break
2974 done
2975
2976 test -z "$AWK" && { { echo "$as_me:2976: error: No awk program found" >&5
2977 echo "$as_me: error: No awk program found" >&2;}
2978    { (exit 1); exit 1; }; }
2979
2980 echo "$as_me:2980: checking for egrep" >&5
2981 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2982 if test "${ac_cv_prog_egrep+set}" = set; then
2983   echo $ECHO_N "(cached) $ECHO_C" >&6
2984 else
2985   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2986     then ac_cv_prog_egrep='grep -E'
2987     else ac_cv_prog_egrep='egrep'
2988     fi
2989 fi
2990 echo "$as_me:2990: result: $ac_cv_prog_egrep" >&5
2991 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2992  EGREP=$ac_cv_prog_egrep
2993
2994 test -z "$EGREP" && { { echo "$as_me:2994: error: No egrep program found" >&5
2995 echo "$as_me: error: No egrep program found" >&2;}
2996    { (exit 1); exit 1; }; }
2997
2998 # Find a good install program.  We prefer a C program (faster),
2999 # so one script is as good as another.  But avoid the broken or
3000 # incompatible versions:
3001 # SysV /etc/install, /usr/sbin/install
3002 # SunOS /usr/etc/install
3003 # IRIX /sbin/install
3004 # AIX /bin/install
3005 # AmigaOS /C/install, which installs bootblocks on floppy discs
3006 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3007 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3008 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3009 # ./install, which can be erroneously created by make from ./install.sh.
3010 echo "$as_me:3010: checking for a BSD compatible install" >&5
3011 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3012 if test -z "$INSTALL"; then
3013 if test "${ac_cv_path_install+set}" = set; then
3014   echo $ECHO_N "(cached) $ECHO_C" >&6
3015 else
3016     ac_save_IFS=$IFS; IFS=$ac_path_separator
3017   for ac_dir in $PATH; do
3018     IFS=$ac_save_IFS
3019     # Account for people who put trailing slashes in PATH elements.
3020     case $ac_dir/ in
3021     / | ./ | .// | /cC/* \
3022     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3023     | /usr/ucb/* ) ;;
3024     *)
3025       # OSF1 and SCO ODT 3.0 have their own names for install.
3026       # Don't use installbsd from OSF since it installs stuff as root
3027       # by default.
3028       for ac_prog in ginstall scoinst install; do
3029         if $as_executable_p "$ac_dir/$ac_prog"; then
3030           if test $ac_prog = install &&
3031             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3032             # AIX install.  It has an incompatible calling convention.
3033             :
3034           elif test $ac_prog = install &&
3035             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3036             # program-specific install script used by HP pwplus--don't use.
3037             :
3038           else
3039             ac_cv_path_install="$ac_dir/$ac_prog -c"
3040             break 2
3041           fi
3042         fi
3043       done
3044       ;;
3045     esac
3046   done
3047
3048 fi
3049   if test "${ac_cv_path_install+set}" = set; then
3050     INSTALL=$ac_cv_path_install
3051   else
3052     # As a last resort, use the slow shell script.  We don't cache a
3053     # path for INSTALL within a source directory, because that will
3054     # break other packages using the cache if that directory is
3055     # removed, or if the path is relative.
3056     INSTALL=$ac_install_sh
3057   fi
3058 fi
3059 echo "$as_me:3059: result: $INSTALL" >&5
3060 echo "${ECHO_T}$INSTALL" >&6
3061
3062 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3063 # It thinks the first close brace ends the variable substitution.
3064 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3065
3066 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3067
3068 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3069
3070 case $INSTALL in
3071 /*)
3072   ;;
3073 *)
3074   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3075   test -z "$cf_dir" && cf_dir=.
3076   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3077   ;;
3078 esac
3079
3080 for ac_prog in tdlint lint alint splint lclint
3081 do
3082   # Extract the first word of "$ac_prog", so it can be a program name with args.
3083 set dummy $ac_prog; ac_word=$2
3084 echo "$as_me:3084: checking for $ac_word" >&5
3085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3086 if test "${ac_cv_prog_LINT+set}" = set; then
3087   echo $ECHO_N "(cached) $ECHO_C" >&6
3088 else
3089   if test -n "$LINT"; then
3090   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3091 else
3092   ac_save_IFS=$IFS; IFS=$ac_path_separator
3093 ac_dummy="$PATH"
3094 for ac_dir in $ac_dummy; do
3095   IFS=$ac_save_IFS
3096   test -z "$ac_dir" && ac_dir=.
3097   $as_executable_p "$ac_dir/$ac_word" || continue
3098 ac_cv_prog_LINT="$ac_prog"
3099 echo "$as_me:3099: found $ac_dir/$ac_word" >&5
3100 break
3101 done
3102
3103 fi
3104 fi
3105 LINT=$ac_cv_prog_LINT
3106 if test -n "$LINT"; then
3107   echo "$as_me:3107: result: $LINT" >&5
3108 echo "${ECHO_T}$LINT" >&6
3109 else
3110   echo "$as_me:3110: result: no" >&5
3111 echo "${ECHO_T}no" >&6
3112 fi
3113
3114   test -n "$LINT" && break
3115 done
3116
3117 echo "$as_me:3117: checking whether ln -s works" >&5
3118 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3119 LN_S=$as_ln_s
3120 if test "$LN_S" = "ln -s"; then
3121   echo "$as_me:3121: result: yes" >&5
3122 echo "${ECHO_T}yes" >&6
3123 else
3124   echo "$as_me:3124: result: no, using $LN_S" >&5
3125 echo "${ECHO_T}no, using $LN_S" >&6
3126 fi
3127
3128 echo "$as_me:3128: checking if $LN_S -f options work" >&5
3129 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3130
3131 rm -f conf$$.src conf$$dst
3132 echo >conf$$.dst
3133 echo first >conf$$.src
3134 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3135         cf_prog_ln_sf=yes
3136 else
3137         cf_prog_ln_sf=no
3138 fi
3139 rm -f conf$$.dst conf$$src
3140 echo "$as_me:3140: result: $cf_prog_ln_sf" >&5
3141 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3142
3143 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3144
3145 echo "$as_me:3145: checking for long file names" >&5
3146 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3147 if test "${ac_cv_sys_long_file_names+set}" = set; then
3148   echo $ECHO_N "(cached) $ECHO_C" >&6
3149 else
3150   ac_cv_sys_long_file_names=yes
3151 # Test for long file names in all the places we know might matter:
3152 #      .                the current directory, where building will happen
3153 #      $prefix/lib      where we will be installing things
3154 #      $exec_prefix/lib likewise
3155 # eval it to expand exec_prefix.
3156 #      $TMPDIR          if set, where it might want to write temporary files
3157 # if $TMPDIR is not set:
3158 #      /tmp             where it might want to write temporary files
3159 #      /var/tmp         likewise
3160 #      /usr/tmp         likewise
3161 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3162   ac_tmpdirs=$TMPDIR
3163 else
3164   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3165 fi
3166 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3167   test -d $ac_dir || continue
3168   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3169   ac_xdir=$ac_dir/cf$$
3170   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3171   ac_tf1=$ac_xdir/conftest9012345
3172   ac_tf2=$ac_xdir/conftest9012346
3173   (echo 1 >$ac_tf1) 2>/dev/null
3174   (echo 2 >$ac_tf2) 2>/dev/null
3175   ac_val=`cat $ac_tf1 2>/dev/null`
3176   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3177     ac_cv_sys_long_file_names=no
3178     rm -rf $ac_xdir 2>/dev/null
3179     break
3180   fi
3181   rm -rf $ac_xdir 2>/dev/null
3182 done
3183 fi
3184 echo "$as_me:3184: result: $ac_cv_sys_long_file_names" >&5
3185 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3186 if test $ac_cv_sys_long_file_names = yes; then
3187
3188 cat >>confdefs.h <<\EOF
3189 #define HAVE_LONG_FILE_NAMES 1
3190 EOF
3191
3192 fi
3193
3194 # if we find pkg-config, check if we should install the ".pc" files.
3195
3196 echo "$as_me:3196: checking if you want to use pkg-config" >&5
3197 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3198
3199 # Check whether --with-pkg-config or --without-pkg-config was given.
3200 if test "${with_pkg_config+set}" = set; then
3201   withval="$with_pkg_config"
3202   cf_pkg_config=$withval
3203 else
3204   cf_pkg_config=yes
3205 fi;
3206 echo "$as_me:3206: result: $cf_pkg_config" >&5
3207 echo "${ECHO_T}$cf_pkg_config" >&6
3208
3209 case $cf_pkg_config in #(vi
3210 no) #(vi
3211         PKG_CONFIG=none
3212         ;;
3213 yes) #(vi
3214
3215 if test -n "$ac_tool_prefix"; then
3216   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3217 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3218 echo "$as_me:3218: checking for $ac_word" >&5
3219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3220 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223   case $PKG_CONFIG in
3224   [\\/]* | ?:[\\/]*)
3225   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3226   ;;
3227   *)
3228   ac_save_IFS=$IFS; IFS=$ac_path_separator
3229 ac_dummy="$PATH"
3230 for ac_dir in $ac_dummy; do
3231   IFS=$ac_save_IFS
3232   test -z "$ac_dir" && ac_dir=.
3233   if $as_executable_p "$ac_dir/$ac_word"; then
3234    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3235    echo "$as_me:3235: found $ac_dir/$ac_word" >&5
3236    break
3237 fi
3238 done
3239
3240   ;;
3241 esac
3242 fi
3243 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3244
3245 if test -n "$PKG_CONFIG"; then
3246   echo "$as_me:3246: result: $PKG_CONFIG" >&5
3247 echo "${ECHO_T}$PKG_CONFIG" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253 fi
3254 if test -z "$ac_cv_path_PKG_CONFIG"; then
3255   ac_pt_PKG_CONFIG=$PKG_CONFIG
3256   # Extract the first word of "pkg-config", so it can be a program name with args.
3257 set dummy pkg-config; ac_word=$2
3258 echo "$as_me:3258: checking for $ac_word" >&5
3259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3260 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3261   echo $ECHO_N "(cached) $ECHO_C" >&6
3262 else
3263   case $ac_pt_PKG_CONFIG in
3264   [\\/]* | ?:[\\/]*)
3265   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3266   ;;
3267   *)
3268   ac_save_IFS=$IFS; IFS=$ac_path_separator
3269 ac_dummy="$PATH"
3270 for ac_dir in $ac_dummy; do
3271   IFS=$ac_save_IFS
3272   test -z "$ac_dir" && ac_dir=.
3273   if $as_executable_p "$ac_dir/$ac_word"; then
3274    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3275    echo "$as_me:3275: found $ac_dir/$ac_word" >&5
3276    break
3277 fi
3278 done
3279
3280   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3281   ;;
3282 esac
3283 fi
3284 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3285
3286 if test -n "$ac_pt_PKG_CONFIG"; then
3287   echo "$as_me:3287: result: $ac_pt_PKG_CONFIG" >&5
3288 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3289 else
3290   echo "$as_me:3290: result: no" >&5
3291 echo "${ECHO_T}no" >&6
3292 fi
3293
3294   PKG_CONFIG=$ac_pt_PKG_CONFIG
3295 else
3296   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3297 fi
3298
3299         ;;
3300 *)
3301         PKG_CONFIG=$withval
3302         ;;
3303 esac
3304
3305 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3306 if test "$PKG_CONFIG" != none ; then
3307
3308 if test "x$prefix" != xNONE; then
3309   cf_path_syntax="$prefix"
3310 else
3311   cf_path_syntax="$ac_default_prefix"
3312 fi
3313
3314 case ".$PKG_CONFIG" in #(vi
3315 .\$\(*\)*|.\'*\'*) #(vi
3316   ;;
3317 ..|./*|.\\*) #(vi
3318   ;;
3319 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3320   ;;
3321 .\${*prefix}*|.\${*dir}*) #(vi
3322   eval PKG_CONFIG="$PKG_CONFIG"
3323   case ".$PKG_CONFIG" in #(vi
3324   .NONE/*)
3325     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3326     ;;
3327   esac
3328   ;; #(vi
3329 .no|.NONE/*)
3330   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3331   ;;
3332 *)
3333   { { echo "$as_me:3333: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3334 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3335    { (exit 1); exit 1; }; }
3336   ;;
3337 esac
3338
3339 fi
3340
3341 if test "$PKG_CONFIG" != none ; then
3342         echo "$as_me:3342: checking for $PKG_CONFIG library directory" >&5
3343 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3344
3345 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3346 if test "${with_pkg_config_libdir+set}" = set; then
3347   withval="$with_pkg_config_libdir"
3348   PKG_CONFIG_LIBDIR=$withval
3349 else
3350   PKG_CONFIG_LIBDIR=yes
3351 fi;
3352
3353         case x$PKG_CONFIG_LIBDIR in #(vi
3354         x/*) #(vi
3355                 ;;
3356         xyes) #(vi
3357                 # look for the library directory using the same prefix as the executable
3358                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3359                 case x`(arch) 2>/dev/null` in #(vi
3360                 *64) #(vi
3361                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3362                         do
3363                                 if test -d $cf_config/pkgconfig
3364                                 then
3365                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3366                                         break
3367                                 fi
3368                         done
3369                         ;;
3370                 *)
3371                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3372                         ;;
3373                 esac
3374                 ;;
3375         *)
3376                 ;;
3377         esac
3378
3379         echo "$as_me:3379: result: $PKG_CONFIG_LIBDIR" >&5
3380 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3381 fi
3382
3383 if test "$PKG_CONFIG" != none ; then
3384         echo "$as_me:3384: checking if we should install .pc files for $PKG_CONFIG" >&5
3385 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3386
3387 # Check whether --enable-pc-files or --disable-pc-files was given.
3388 if test "${enable_pc_files+set}" = set; then
3389   enableval="$enable_pc_files"
3390   enable_pc_files=$enableval
3391 else
3392   enable_pc_files=no
3393 fi;
3394         echo "$as_me:3394: result: $enable_pc_files" >&5
3395 echo "${ECHO_T}$enable_pc_files" >&6
3396         if test "$enable_pc_files" != no
3397         then
3398
3399 if test "x$prefix" != xNONE; then
3400   cf_path_syntax="$prefix"
3401 else
3402   cf_path_syntax="$ac_default_prefix"
3403 fi
3404
3405 case ".$PKG_CONFIG_LIBDIR" in #(vi
3406 .\$\(*\)*|.\'*\'*) #(vi
3407   ;;
3408 ..|./*|.\\*) #(vi
3409   ;;
3410 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3411   ;;
3412 .\${*prefix}*|.\${*dir}*) #(vi
3413   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3414   case ".$PKG_CONFIG_LIBDIR" in #(vi
3415   .NONE/*)
3416     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3417     ;;
3418   esac
3419   ;; #(vi
3420 .no|.NONE/*)
3421   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3422   ;;
3423 *)
3424   { { echo "$as_me:3424: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3425 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3426    { (exit 1); exit 1; }; }
3427   ;;
3428 esac
3429
3430         fi
3431 else
3432         enable_pc_files=no
3433 fi
3434
3435 echo "$as_me:3435: checking if we should assume mixed-case filenames" >&5
3436 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3437
3438 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3439 if test "${enable_mixed_case+set}" = set; then
3440   enableval="$enable_mixed_case"
3441   enable_mixedcase=$enableval
3442 else
3443   enable_mixedcase=auto
3444 fi;
3445 echo "$as_me:3445: result: $enable_mixedcase" >&5
3446 echo "${ECHO_T}$enable_mixedcase" >&6
3447 if test "$enable_mixedcase" = "auto" ; then
3448
3449 echo "$as_me:3449: checking if filesystem supports mixed-case filenames" >&5
3450 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3451 if test "${cf_cv_mixedcase+set}" = set; then
3452   echo $ECHO_N "(cached) $ECHO_C" >&6
3453 else
3454
3455 if test "$cross_compiling" = yes ; then
3456         case $target_alias in #(vi
3457         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3458                 cf_cv_mixedcase=no
3459                 ;;
3460         *)
3461                 cf_cv_mixedcase=yes
3462                 ;;
3463         esac
3464 else
3465         rm -f conftest CONFTEST
3466         echo test >conftest
3467         if test -f CONFTEST ; then
3468                 cf_cv_mixedcase=no
3469         else
3470                 cf_cv_mixedcase=yes
3471         fi
3472         rm -f conftest CONFTEST
3473 fi
3474
3475 fi
3476 echo "$as_me:3476: result: $cf_cv_mixedcase" >&5
3477 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3478 test "$cf_cv_mixedcase" = yes &&
3479 cat >>confdefs.h <<\EOF
3480 #define MIXEDCASE_FILENAMES 1
3481 EOF
3482
3483 else
3484     cf_cv_mixedcase=$enable_mixedcase
3485     if test "x$enable_mixedcase" = "xyes" ; then
3486
3487 cat >>confdefs.h <<\EOF
3488 #define MIXEDCASE_FILENAMES 1
3489 EOF
3490
3491     fi
3492 fi
3493
3494 # do this after mixed-case option (tags/TAGS is not as important as tic).
3495 echo "$as_me:3495: checking whether ${MAKE-make} sets \${MAKE}" >&5
3496 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3497 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3498 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   cat >conftest.make <<\EOF
3502 all:
3503         @echo 'ac_maketemp="${MAKE}"'
3504 EOF
3505 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3506 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3507 if test -n "$ac_maketemp"; then
3508   eval ac_cv_prog_make_${ac_make}_set=yes
3509 else
3510   eval ac_cv_prog_make_${ac_make}_set=no
3511 fi
3512 rm -f conftest.make
3513 fi
3514 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3515   echo "$as_me:3515: result: yes" >&5
3516 echo "${ECHO_T}yes" >&6
3517   SET_MAKE=
3518 else
3519   echo "$as_me:3519: result: no" >&5
3520 echo "${ECHO_T}no" >&6
3521   SET_MAKE="MAKE=${MAKE-make}"
3522 fi
3523
3524 for ac_prog in exctags ctags
3525 do
3526   # Extract the first word of "$ac_prog", so it can be a program name with args.
3527 set dummy $ac_prog; ac_word=$2
3528 echo "$as_me:3528: checking for $ac_word" >&5
3529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3530 if test "${ac_cv_prog_CTAGS+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   if test -n "$CTAGS"; then
3534   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3535 else
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   $as_executable_p "$ac_dir/$ac_word" || continue
3542 ac_cv_prog_CTAGS="$ac_prog"
3543 echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544 break
3545 done
3546
3547 fi
3548 fi
3549 CTAGS=$ac_cv_prog_CTAGS
3550 if test -n "$CTAGS"; then
3551   echo "$as_me:3551: result: $CTAGS" >&5
3552 echo "${ECHO_T}$CTAGS" >&6
3553 else
3554   echo "$as_me:3554: result: no" >&5
3555 echo "${ECHO_T}no" >&6
3556 fi
3557
3558   test -n "$CTAGS" && break
3559 done
3560
3561 for ac_prog in exetags etags
3562 do
3563   # Extract the first word of "$ac_prog", so it can be a program name with args.
3564 set dummy $ac_prog; ac_word=$2
3565 echo "$as_me:3565: checking for $ac_word" >&5
3566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3567 if test "${ac_cv_prog_ETAGS+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570   if test -n "$ETAGS"; then
3571   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3572 else
3573   ac_save_IFS=$IFS; IFS=$ac_path_separator
3574 ac_dummy="$PATH"
3575 for ac_dir in $ac_dummy; do
3576   IFS=$ac_save_IFS
3577   test -z "$ac_dir" && ac_dir=.
3578   $as_executable_p "$ac_dir/$ac_word" || continue
3579 ac_cv_prog_ETAGS="$ac_prog"
3580 echo "$as_me:3580: found $ac_dir/$ac_word" >&5
3581 break
3582 done
3583
3584 fi
3585 fi
3586 ETAGS=$ac_cv_prog_ETAGS
3587 if test -n "$ETAGS"; then
3588   echo "$as_me:3588: result: $ETAGS" >&5
3589 echo "${ECHO_T}$ETAGS" >&6
3590 else
3591   echo "$as_me:3591: result: no" >&5
3592 echo "${ECHO_T}no" >&6
3593 fi
3594
3595   test -n "$ETAGS" && break
3596 done
3597
3598 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3599 set dummy ${CTAGS:-ctags}; ac_word=$2
3600 echo "$as_me:3600: checking for $ac_word" >&5
3601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3602 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3603   echo $ECHO_N "(cached) $ECHO_C" >&6
3604 else
3605   if test -n "$MAKE_LOWER_TAGS"; then
3606   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3607 else
3608   ac_save_IFS=$IFS; IFS=$ac_path_separator
3609 ac_dummy="$PATH"
3610 for ac_dir in $ac_dummy; do
3611   IFS=$ac_save_IFS
3612   test -z "$ac_dir" && ac_dir=.
3613   $as_executable_p "$ac_dir/$ac_word" || continue
3614 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3615 echo "$as_me:3615: found $ac_dir/$ac_word" >&5
3616 break
3617 done
3618
3619   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3620 fi
3621 fi
3622 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3623 if test -n "$MAKE_LOWER_TAGS"; then
3624   echo "$as_me:3624: result: $MAKE_LOWER_TAGS" >&5
3625 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3626 else
3627   echo "$as_me:3627: result: no" >&5
3628 echo "${ECHO_T}no" >&6
3629 fi
3630
3631 if test "$cf_cv_mixedcase" = yes ; then
3632         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3633 set dummy ${ETAGS:-etags}; ac_word=$2
3634 echo "$as_me:3634: checking for $ac_word" >&5
3635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3636 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3637   echo $ECHO_N "(cached) $ECHO_C" >&6
3638 else
3639   if test -n "$MAKE_UPPER_TAGS"; then
3640   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3641 else
3642   ac_save_IFS=$IFS; IFS=$ac_path_separator
3643 ac_dummy="$PATH"
3644 for ac_dir in $ac_dummy; do
3645   IFS=$ac_save_IFS
3646   test -z "$ac_dir" && ac_dir=.
3647   $as_executable_p "$ac_dir/$ac_word" || continue
3648 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3649 echo "$as_me:3649: found $ac_dir/$ac_word" >&5
3650 break
3651 done
3652
3653   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3654 fi
3655 fi
3656 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3657 if test -n "$MAKE_UPPER_TAGS"; then
3658   echo "$as_me:3658: result: $MAKE_UPPER_TAGS" >&5
3659 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3660 else
3661   echo "$as_me:3661: result: no" >&5
3662 echo "${ECHO_T}no" >&6
3663 fi
3664
3665 else
3666         MAKE_UPPER_TAGS=no
3667 fi
3668
3669 if test "$MAKE_UPPER_TAGS" = yes ; then
3670         MAKE_UPPER_TAGS=
3671 else
3672         MAKE_UPPER_TAGS="#"
3673 fi
3674
3675 if test "$MAKE_LOWER_TAGS" = yes ; then
3676         MAKE_LOWER_TAGS=
3677 else
3678         MAKE_LOWER_TAGS="#"
3679 fi
3680
3681 echo "$as_me:3681: checking for makeflags variable" >&5
3682 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3683 if test "${cf_cv_makeflags+set}" = set; then
3684   echo $ECHO_N "(cached) $ECHO_C" >&6
3685 else
3686
3687         cf_cv_makeflags=''
3688         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3689         do
3690                 cat >cf_makeflags.tmp <<CF_EOF
3691 SHELL = /bin/sh
3692 all :
3693         @ echo '.$cf_option'
3694 CF_EOF
3695                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3696                 case "$cf_result" in
3697                 .*k)
3698                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3699                         case "$cf_result" in
3700                         .*CC=*) cf_cv_makeflags=
3701                                 ;;
3702                         *)      cf_cv_makeflags=$cf_option
3703                                 ;;
3704                         esac
3705                         break
3706                         ;;
3707                 .-)     ;;
3708                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3709                         ;;
3710                 esac
3711         done
3712         rm -f cf_makeflags.tmp
3713
3714 fi
3715 echo "$as_me:3715: result: $cf_cv_makeflags" >&5
3716 echo "${ECHO_T}$cf_cv_makeflags" >&6
3717
3718 if test -n "$ac_tool_prefix"; then
3719   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3720 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3721 echo "$as_me:3721: checking for $ac_word" >&5
3722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3723 if test "${ac_cv_prog_RANLIB+set}" = set; then
3724   echo $ECHO_N "(cached) $ECHO_C" >&6
3725 else
3726   if test -n "$RANLIB"; then
3727   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3728 else
3729   ac_save_IFS=$IFS; IFS=$ac_path_separator
3730 ac_dummy="$PATH"
3731 for ac_dir in $ac_dummy; do
3732   IFS=$ac_save_IFS
3733   test -z "$ac_dir" && ac_dir=.
3734   $as_executable_p "$ac_dir/$ac_word" || continue
3735 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3736 echo "$as_me:3736: found $ac_dir/$ac_word" >&5
3737 break
3738 done
3739
3740 fi
3741 fi
3742 RANLIB=$ac_cv_prog_RANLIB
3743 if test -n "$RANLIB"; then
3744   echo "$as_me:3744: result: $RANLIB" >&5
3745 echo "${ECHO_T}$RANLIB" >&6
3746 else
3747   echo "$as_me:3747: result: no" >&5
3748 echo "${ECHO_T}no" >&6
3749 fi
3750
3751 fi
3752 if test -z "$ac_cv_prog_RANLIB"; then
3753   ac_ct_RANLIB=$RANLIB
3754   # Extract the first word of "ranlib", so it can be a program name with args.
3755 set dummy ranlib; 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_ac_ct_RANLIB+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$ac_ct_RANLIB"; then
3762   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_ac_ct_RANLIB="ranlib"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3776 fi
3777 fi
3778 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3779 if test -n "$ac_ct_RANLIB"; then
3780   echo "$as_me:3780: result: $ac_ct_RANLIB" >&5
3781 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3782 else
3783   echo "$as_me:3783: result: no" >&5
3784 echo "${ECHO_T}no" >&6
3785 fi
3786
3787   RANLIB=$ac_ct_RANLIB
3788 else
3789   RANLIB="$ac_cv_prog_RANLIB"
3790 fi
3791
3792 if test -n "$ac_tool_prefix"; then
3793   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3794 set dummy ${ac_tool_prefix}ld; ac_word=$2
3795 echo "$as_me:3795: checking for $ac_word" >&5
3796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797 if test "${ac_cv_prog_LD+set}" = set; then
3798   echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800   if test -n "$LD"; then
3801   ac_cv_prog_LD="$LD" # Let the user override the test.
3802 else
3803   ac_save_IFS=$IFS; IFS=$ac_path_separator
3804 ac_dummy="$PATH"
3805 for ac_dir in $ac_dummy; do
3806   IFS=$ac_save_IFS
3807   test -z "$ac_dir" && ac_dir=.
3808   $as_executable_p "$ac_dir/$ac_word" || continue
3809 ac_cv_prog_LD="${ac_tool_prefix}ld"
3810 echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811 break
3812 done
3813
3814 fi
3815 fi
3816 LD=$ac_cv_prog_LD
3817 if test -n "$LD"; then
3818   echo "$as_me:3818: result: $LD" >&5
3819 echo "${ECHO_T}$LD" >&6
3820 else
3821   echo "$as_me:3821: result: no" >&5
3822 echo "${ECHO_T}no" >&6
3823 fi
3824
3825 fi
3826 if test -z "$ac_cv_prog_LD"; then
3827   ac_ct_LD=$LD
3828   # Extract the first word of "ld", so it can be a program name with args.
3829 set dummy ld; ac_word=$2
3830 echo "$as_me:3830: checking for $ac_word" >&5
3831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3832 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3833   echo $ECHO_N "(cached) $ECHO_C" >&6
3834 else
3835   if test -n "$ac_ct_LD"; then
3836   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3837 else
3838   ac_save_IFS=$IFS; IFS=$ac_path_separator
3839 ac_dummy="$PATH"
3840 for ac_dir in $ac_dummy; do
3841   IFS=$ac_save_IFS
3842   test -z "$ac_dir" && ac_dir=.
3843   $as_executable_p "$ac_dir/$ac_word" || continue
3844 ac_cv_prog_ac_ct_LD="ld"
3845 echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846 break
3847 done
3848
3849   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3850 fi
3851 fi
3852 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3853 if test -n "$ac_ct_LD"; then
3854   echo "$as_me:3854: result: $ac_ct_LD" >&5
3855 echo "${ECHO_T}$ac_ct_LD" >&6
3856 else
3857   echo "$as_me:3857: result: no" >&5
3858 echo "${ECHO_T}no" >&6
3859 fi
3860
3861   LD=$ac_ct_LD
3862 else
3863   LD="$ac_cv_prog_LD"
3864 fi
3865
3866 if test -n "$ac_tool_prefix"; then
3867   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3868 set dummy ${ac_tool_prefix}ar; ac_word=$2
3869 echo "$as_me:3869: checking for $ac_word" >&5
3870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3871 if test "${ac_cv_prog_AR+set}" = set; then
3872   echo $ECHO_N "(cached) $ECHO_C" >&6
3873 else
3874   if test -n "$AR"; then
3875   ac_cv_prog_AR="$AR" # Let the user override the test.
3876 else
3877   ac_save_IFS=$IFS; IFS=$ac_path_separator
3878 ac_dummy="$PATH"
3879 for ac_dir in $ac_dummy; do
3880   IFS=$ac_save_IFS
3881   test -z "$ac_dir" && ac_dir=.
3882   $as_executable_p "$ac_dir/$ac_word" || continue
3883 ac_cv_prog_AR="${ac_tool_prefix}ar"
3884 echo "$as_me:3884: found $ac_dir/$ac_word" >&5
3885 break
3886 done
3887
3888 fi
3889 fi
3890 AR=$ac_cv_prog_AR
3891 if test -n "$AR"; then
3892   echo "$as_me:3892: result: $AR" >&5
3893 echo "${ECHO_T}$AR" >&6
3894 else
3895   echo "$as_me:3895: result: no" >&5
3896 echo "${ECHO_T}no" >&6
3897 fi
3898
3899 fi
3900 if test -z "$ac_cv_prog_AR"; then
3901   ac_ct_AR=$AR
3902   # Extract the first word of "ar", so it can be a program name with args.
3903 set dummy ar; ac_word=$2
3904 echo "$as_me:3904: checking for $ac_word" >&5
3905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3906 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3907   echo $ECHO_N "(cached) $ECHO_C" >&6
3908 else
3909   if test -n "$ac_ct_AR"; then
3910   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3911 else
3912   ac_save_IFS=$IFS; IFS=$ac_path_separator
3913 ac_dummy="$PATH"
3914 for ac_dir in $ac_dummy; do
3915   IFS=$ac_save_IFS
3916   test -z "$ac_dir" && ac_dir=.
3917   $as_executable_p "$ac_dir/$ac_word" || continue
3918 ac_cv_prog_ac_ct_AR="ar"
3919 echo "$as_me:3919: found $ac_dir/$ac_word" >&5
3920 break
3921 done
3922
3923   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3924 fi
3925 fi
3926 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3927 if test -n "$ac_ct_AR"; then
3928   echo "$as_me:3928: result: $ac_ct_AR" >&5
3929 echo "${ECHO_T}$ac_ct_AR" >&6
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933 fi
3934
3935   AR=$ac_ct_AR
3936 else
3937   AR="$ac_cv_prog_AR"
3938 fi
3939
3940 if test -n "$ac_tool_prefix"; then
3941   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3942 set dummy ${ac_tool_prefix}ar; ac_word=$2
3943 echo "$as_me:3943: checking for $ac_word" >&5
3944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3945 if test "${ac_cv_prog_AR+set}" = set; then
3946   echo $ECHO_N "(cached) $ECHO_C" >&6
3947 else
3948   if test -n "$AR"; then
3949   ac_cv_prog_AR="$AR" # Let the user override the test.
3950 else
3951   ac_save_IFS=$IFS; IFS=$ac_path_separator
3952 ac_dummy="$PATH"
3953 for ac_dir in $ac_dummy; do
3954   IFS=$ac_save_IFS
3955   test -z "$ac_dir" && ac_dir=.
3956   $as_executable_p "$ac_dir/$ac_word" || continue
3957 ac_cv_prog_AR="${ac_tool_prefix}ar"
3958 echo "$as_me:3958: found $ac_dir/$ac_word" >&5
3959 break
3960 done
3961
3962 fi
3963 fi
3964 AR=$ac_cv_prog_AR
3965 if test -n "$AR"; then
3966   echo "$as_me:3966: result: $AR" >&5
3967 echo "${ECHO_T}$AR" >&6
3968 else
3969   echo "$as_me:3969: result: no" >&5
3970 echo "${ECHO_T}no" >&6
3971 fi
3972
3973 fi
3974 if test -z "$ac_cv_prog_AR"; then
3975   ac_ct_AR=$AR
3976   # Extract the first word of "ar", so it can be a program name with args.
3977 set dummy ar; ac_word=$2
3978 echo "$as_me:3978: checking for $ac_word" >&5
3979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3980 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3981   echo $ECHO_N "(cached) $ECHO_C" >&6
3982 else
3983   if test -n "$ac_ct_AR"; then
3984   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3985 else
3986   ac_save_IFS=$IFS; IFS=$ac_path_separator
3987 ac_dummy="$PATH"
3988 for ac_dir in $ac_dummy; do
3989   IFS=$ac_save_IFS
3990   test -z "$ac_dir" && ac_dir=.
3991   $as_executable_p "$ac_dir/$ac_word" || continue
3992 ac_cv_prog_ac_ct_AR="ar"
3993 echo "$as_me:3993: found $ac_dir/$ac_word" >&5
3994 break
3995 done
3996
3997   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3998 fi
3999 fi
4000 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4001 if test -n "$ac_ct_AR"; then
4002   echo "$as_me:4002: result: $ac_ct_AR" >&5
4003 echo "${ECHO_T}$ac_ct_AR" >&6
4004 else
4005   echo "$as_me:4005: result: no" >&5
4006 echo "${ECHO_T}no" >&6
4007 fi
4008
4009   AR=$ac_ct_AR
4010 else
4011   AR="$ac_cv_prog_AR"
4012 fi
4013
4014 echo "$as_me:4014: checking for options to update archives" >&5
4015 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4016 if test "${cf_cv_ar_flags+set}" = set; then
4017   echo $ECHO_N "(cached) $ECHO_C" >&6
4018 else
4019
4020         cf_cv_ar_flags=unknown
4021         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4022         do
4023
4024                 # check if $ARFLAGS already contains this choice
4025                 if test "x$ARFLAGS" != "x" ; then
4026                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4027                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4028                                 cf_cv_ar_flags=
4029                                 break
4030                         fi
4031                 fi
4032
4033                 rm -f conftest.$ac_cv_objext
4034                 rm -f conftest.a
4035
4036                 cat >conftest.$ac_ext <<EOF
4037 #line 4037 "configure"
4038 int     testdata[3] = { 123, 456, 789 };
4039 EOF
4040                 if { (eval echo "$as_me:4040: \"$ac_compile\"") >&5
4041   (eval $ac_compile) 2>&5
4042   ac_status=$?
4043   echo "$as_me:4043: \$? = $ac_status" >&5
4044   (exit $ac_status); } ; then
4045                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4046                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4047                         if test -f conftest.a ; then
4048                                 cf_cv_ar_flags=$cf_ar_flags
4049                                 break
4050                         fi
4051                 else
4052                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4053
4054 echo "${as_me:-configure}:4054: testing cannot compile test-program ..." 1>&5
4055
4056                         break
4057                 fi
4058         done
4059         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4060
4061 fi
4062 echo "$as_me:4062: result: $cf_cv_ar_flags" >&5
4063 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4064
4065 if test -n "$ARFLAGS" ; then
4066         if test -n "$cf_cv_ar_flags" ; then
4067                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4068         fi
4069 else
4070         ARFLAGS=$cf_cv_ar_flags
4071 fi
4072
4073 echo "$as_me:4073: checking if you have specified an install-prefix" >&5
4074 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4075
4076 # Check whether --with-install-prefix or --without-install-prefix was given.
4077 if test "${with_install_prefix+set}" = set; then
4078   withval="$with_install_prefix"
4079   case "x$withval" in #(vi
4080         xyes|xno) #(vi
4081                 ;;
4082         *)      DESTDIR="$withval"
4083                 ;;
4084         esac
4085 fi;
4086 echo "$as_me:4086: result: $DESTDIR" >&5
4087 echo "${ECHO_T}$DESTDIR" >&6
4088
4089 ###############################################################################
4090
4091 # If we're cross-compiling, allow the user to override the tools and their
4092 # options.  The configure script is oriented toward identifying the host
4093 # compiler, etc., but we need a build compiler to generate parts of the source.
4094
4095 if test "$cross_compiling" = yes ; then
4096
4097         # defaults that we might want to override
4098         : ${BUILD_CFLAGS:=''}
4099         : ${BUILD_CPPFLAGS:=''}
4100         : ${BUILD_LDFLAGS:=''}
4101         : ${BUILD_LIBS:=''}
4102         : ${BUILD_EXEEXT:='$x'}
4103         : ${BUILD_OBJEXT:='o'}
4104
4105 # Check whether --with-build-cc or --without-build-cc was given.
4106 if test "${with_build_cc+set}" = set; then
4107   withval="$with_build_cc"
4108   BUILD_CC="$withval"
4109 else
4110   for ac_prog in gcc cc cl
4111 do
4112   # Extract the first word of "$ac_prog", so it can be a program name with args.
4113 set dummy $ac_prog; ac_word=$2
4114 echo "$as_me:4114: checking for $ac_word" >&5
4115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4116 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4117   echo $ECHO_N "(cached) $ECHO_C" >&6
4118 else
4119   if test -n "$BUILD_CC"; then
4120   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4121 else
4122   ac_save_IFS=$IFS; IFS=$ac_path_separator
4123 ac_dummy="$PATH"
4124 for ac_dir in $ac_dummy; do
4125   IFS=$ac_save_IFS
4126   test -z "$ac_dir" && ac_dir=.
4127   $as_executable_p "$ac_dir/$ac_word" || continue
4128 ac_cv_prog_BUILD_CC="$ac_prog"
4129 echo "$as_me:4129: found $ac_dir/$ac_word" >&5
4130 break
4131 done
4132
4133 fi
4134 fi
4135 BUILD_CC=$ac_cv_prog_BUILD_CC
4136 if test -n "$BUILD_CC"; then
4137   echo "$as_me:4137: result: $BUILD_CC" >&5
4138 echo "${ECHO_T}$BUILD_CC" >&6
4139 else
4140   echo "$as_me:4140: result: no" >&5
4141 echo "${ECHO_T}no" >&6
4142 fi
4143
4144   test -n "$BUILD_CC" && break
4145 done
4146
4147 fi;
4148         echo "$as_me:4148: checking for native build C compiler" >&5
4149 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4150         echo "$as_me:4150: result: $BUILD_CC" >&5
4151 echo "${ECHO_T}$BUILD_CC" >&6
4152
4153         echo "$as_me:4153: checking for native build C preprocessor" >&5
4154 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4155
4156 # Check whether --with-build-cpp or --without-build-cpp was given.
4157 if test "${with_build_cpp+set}" = set; then
4158   withval="$with_build_cpp"
4159   BUILD_CPP="$withval"
4160 else
4161   BUILD_CPP='${BUILD_CC} -E'
4162 fi;
4163         echo "$as_me:4163: result: $BUILD_CPP" >&5
4164 echo "${ECHO_T}$BUILD_CPP" >&6
4165
4166         echo "$as_me:4166: checking for native build C flags" >&5
4167 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4168
4169 # Check whether --with-build-cflags or --without-build-cflags was given.
4170 if test "${with_build_cflags+set}" = set; then
4171   withval="$with_build_cflags"
4172   BUILD_CFLAGS="$withval"
4173 fi;
4174         echo "$as_me:4174: result: $BUILD_CFLAGS" >&5
4175 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4176
4177         echo "$as_me:4177: checking for native build C preprocessor-flags" >&5
4178 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4179
4180 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4181 if test "${with_build_cppflags+set}" = set; then
4182   withval="$with_build_cppflags"
4183   BUILD_CPPFLAGS="$withval"
4184 fi;
4185         echo "$as_me:4185: result: $BUILD_CPPFLAGS" >&5
4186 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4187
4188         echo "$as_me:4188: checking for native build linker-flags" >&5
4189 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4190
4191 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4192 if test "${with_build_ldflags+set}" = set; then
4193   withval="$with_build_ldflags"
4194   BUILD_LDFLAGS="$withval"
4195 fi;
4196         echo "$as_me:4196: result: $BUILD_LDFLAGS" >&5
4197 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4198
4199         echo "$as_me:4199: checking for native build linker-libraries" >&5
4200 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-build-libs or --without-build-libs was given.
4203 if test "${with_build_libs+set}" = set; then
4204   withval="$with_build_libs"
4205   BUILD_LIBS="$withval"
4206 fi;
4207         echo "$as_me:4207: result: $BUILD_LIBS" >&5
4208 echo "${ECHO_T}$BUILD_LIBS" >&6
4209
4210         # this assumes we're on Unix.
4211         BUILD_EXEEXT=
4212         BUILD_OBJEXT=o
4213
4214         : ${BUILD_CC:='${CC}'}
4215
4216         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4217                 { { echo "$as_me:4217: error: Cross-build requires two compilers.
4218 Use --with-build-cc to specify the native compiler." >&5
4219 echo "$as_me: error: Cross-build requires two compilers.
4220 Use --with-build-cc to specify the native compiler." >&2;}
4221    { (exit 1); exit 1; }; }
4222         fi
4223
4224 else
4225         : ${BUILD_CC:='${CC}'}
4226         : ${BUILD_CPP:='${CPP}'}
4227         : ${BUILD_CFLAGS:='${CFLAGS}'}
4228         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4229         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4230         : ${BUILD_LIBS:='${LIBS}'}
4231         : ${BUILD_EXEEXT:='$x'}
4232         : ${BUILD_OBJEXT:='o'}
4233 fi
4234
4235 ###############################################################################
4236
4237 ### Options to allow the user to specify the set of libraries which are used.
4238 ### Use "--without-normal --with-shared" to allow the default model to be
4239 ### shared, for example.
4240 cf_list_models=""
4241
4242 echo "$as_me:4242: checking if libtool -version-number should be used" >&5
4243 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4244
4245 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4246 if test "${enable_libtool_version+set}" = set; then
4247   enableval="$enable_libtool_version"
4248   test "$enableval" != no && enableval=yes
4249   if test "$enableval" != "yes" ; then
4250     cf_libtool_version=no
4251   else
4252     cf_libtool_version=yes
4253   fi
4254 else
4255   enableval=yes
4256   cf_libtool_version=yes
4257
4258 fi;
4259 echo "$as_me:4259: result: $cf_libtool_version" >&5
4260 echo "${ECHO_T}$cf_libtool_version" >&6
4261
4262 if test "$cf_libtool_version" = yes ; then
4263         LIBTOOL_VERSION="-version-number"
4264 else
4265         LIBTOOL_VERSION="-version-info"
4266 fi
4267
4268 LIBTOOL=
4269
4270 # common library maintenance symbols that are convenient for libtool scripts:
4271 LIB_CREATE='${AR} -cr'
4272 LIB_OBJECT='${OBJECTS}'
4273 LIB_SUFFIX=.a
4274 LIB_PREP="$RANLIB"
4275
4276 # symbols used to prop libtool up to enable it to determine what it should be
4277 # doing:
4278 LIB_CLEAN=
4279 LIB_COMPILE=
4280 LIB_LINK='${CC}'
4281 LIB_INSTALL=
4282 LIB_UNINSTALL=
4283
4284 echo "$as_me:4284: checking if you want to build libraries with libtool" >&5
4285 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4286
4287 # Check whether --with-libtool or --without-libtool was given.
4288 if test "${with_libtool+set}" = set; then
4289   withval="$with_libtool"
4290   with_libtool=$withval
4291 else
4292   with_libtool=no
4293 fi;
4294 echo "$as_me:4294: result: $with_libtool" >&5
4295 echo "${ECHO_T}$with_libtool" >&6
4296 if test "$with_libtool" != "no"; then
4297
4298         if test "$with_libtool" != "yes" ; then
4299
4300 if test "x$prefix" != xNONE; then
4301   cf_path_syntax="$prefix"
4302 else
4303   cf_path_syntax="$ac_default_prefix"
4304 fi
4305
4306 case ".$with_libtool" in #(vi
4307 .\$\(*\)*|.\'*\'*) #(vi
4308   ;;
4309 ..|./*|.\\*) #(vi
4310   ;;
4311 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4312   ;;
4313 .\${*prefix}*|.\${*dir}*) #(vi
4314   eval with_libtool="$with_libtool"
4315   case ".$with_libtool" in #(vi
4316   .NONE/*)
4317     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4318     ;;
4319   esac
4320   ;; #(vi
4321 .no|.NONE/*)
4322   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4323   ;;
4324 *)
4325   { { echo "$as_me:4325: error: expected a pathname, not \"$with_libtool\"" >&5
4326 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4327    { (exit 1); exit 1; }; }
4328   ;;
4329 esac
4330
4331                 LIBTOOL=$with_libtool
4332         else
4333                 # Extract the first word of "libtool", so it can be a program name with args.
4334 set dummy libtool; ac_word=$2
4335 echo "$as_me:4335: checking for $ac_word" >&5
4336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4337 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4338   echo $ECHO_N "(cached) $ECHO_C" >&6
4339 else
4340   case $LIBTOOL in
4341   [\\/]* | ?:[\\/]*)
4342   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4343   ;;
4344   *)
4345   ac_save_IFS=$IFS; IFS=$ac_path_separator
4346 ac_dummy="$PATH"
4347 for ac_dir in $ac_dummy; do
4348   IFS=$ac_save_IFS
4349   test -z "$ac_dir" && ac_dir=.
4350   if $as_executable_p "$ac_dir/$ac_word"; then
4351    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4352    echo "$as_me:4352: found $ac_dir/$ac_word" >&5
4353    break
4354 fi
4355 done
4356
4357   ;;
4358 esac
4359 fi
4360 LIBTOOL=$ac_cv_path_LIBTOOL
4361
4362 if test -n "$LIBTOOL"; then
4363   echo "$as_me:4363: result: $LIBTOOL" >&5
4364 echo "${ECHO_T}$LIBTOOL" >&6
4365 else
4366   echo "$as_me:4366: result: no" >&5
4367 echo "${ECHO_T}no" >&6
4368 fi
4369
4370         fi
4371         if test -z "$LIBTOOL" ; then
4372                 { { echo "$as_me:4372: error: Cannot find libtool" >&5
4373 echo "$as_me: error: Cannot find libtool" >&2;}
4374    { (exit 1); exit 1; }; }
4375         fi
4376         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4377         LIB_OBJECT='${OBJECTS:.o=.lo}'
4378         LIB_SUFFIX=.la
4379         LIB_CLEAN='${LIBTOOL} --mode=clean'
4380         LIB_COMPILE='${LIBTOOL} --mode=compile'
4381         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4382         LIB_INSTALL='${LIBTOOL} --mode=install'
4383         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4384         LIB_PREP=:
4385
4386         # Show the version of libtool
4387         echo "$as_me:4387: checking version of libtool" >&5
4388 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4389
4390         # Save the version in a cache variable - this is not entirely a good
4391         # thing, but the version string from libtool is very ugly, and for
4392         # bug reports it might be useful to have the original string. "("
4393         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.].*//'`
4394         echo "$as_me:4394: result: $cf_cv_libtool_version" >&5
4395 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4396         if test -z "$cf_cv_libtool_version" ; then
4397                 { { echo "$as_me:4397: error: This is not GNU libtool" >&5
4398 echo "$as_me: error: This is not GNU libtool" >&2;}
4399    { (exit 1); exit 1; }; }
4400         fi
4401
4402         # special hack to add -no-undefined (which libtool should do for itself)
4403         LT_UNDEF=
4404         case "$cf_cv_system_name" in #(vi
4405         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4406                 LT_UNDEF=-no-undefined
4407                 ;;
4408         esac
4409
4410         # special hack to add --tag option for C++ compiler
4411         case $cf_cv_libtool_version in #(vi
4412         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4413                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4414                 LIBTOOL="$LIBTOOL --tag=CC"
4415                 ;;
4416         *)
4417                 LIBTOOL_CXX="$LIBTOOL"
4418                 ;;
4419         esac
4420 else
4421         LIBTOOL=""
4422         LIBTOOL_CXX=""
4423 fi
4424
4425 test -z "$LIBTOOL" && ECHO_LT=
4426
4427 if test "$with_libtool" != "no" ; then
4428
4429 cf_list_models="$cf_list_models libtool"
4430
4431 else
4432
4433 echo "$as_me:4433: checking if you want to build shared libraries" >&5
4434 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4435
4436 # Check whether --with-shared or --without-shared was given.
4437 if test "${with_shared+set}" = set; then
4438   withval="$with_shared"
4439   with_shared=$withval
4440 else
4441   with_shared=no
4442 fi;
4443 echo "$as_me:4443: result: $with_shared" >&5
4444 echo "${ECHO_T}$with_shared" >&6
4445 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4446
4447 echo "$as_me:4447: checking if you want to build static libraries" >&5
4448 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4449
4450 # Check whether --with-normal or --without-normal was given.
4451 if test "${with_normal+set}" = set; then
4452   withval="$with_normal"
4453   with_normal=$withval
4454 else
4455   with_normal=yes
4456 fi;
4457 echo "$as_me:4457: result: $with_normal" >&5
4458 echo "${ECHO_T}$with_normal" >&6
4459 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4460
4461 echo "$as_me:4461: checking if you want to build debug libraries" >&5
4462 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4463
4464 # Check whether --with-debug or --without-debug was given.
4465 if test "${with_debug+set}" = set; then
4466   withval="$with_debug"
4467   with_debug=$withval
4468 else
4469   with_debug=yes
4470 fi;
4471 echo "$as_me:4471: result: $with_debug" >&5
4472 echo "${ECHO_T}$with_debug" >&6
4473 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4474
4475 echo "$as_me:4475: checking if you want to build profiling libraries" >&5
4476 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4477
4478 # Check whether --with-profile or --without-profile was given.
4479 if test "${with_profile+set}" = set; then
4480   withval="$with_profile"
4481   with_profile=$withval
4482 else
4483   with_profile=no
4484 fi;
4485 echo "$as_me:4485: result: $with_profile" >&5
4486 echo "${ECHO_T}$with_profile" >&6
4487 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4488
4489 fi
4490
4491 if test "X$cf_with_cxx_binding" != Xno; then
4492 if test "x$with_shared" = "xyes"; then
4493 echo "$as_me:4493: checking if you want to build C++ shared libraries" >&5
4494 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4495
4496 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4497 if test "${with_cxx_shared+set}" = set; then
4498   withval="$with_cxx_shared"
4499   with_shared_cxx=$withval
4500 else
4501   with_shared_cxx=no
4502 fi;
4503 echo "$as_me:4503: result: $with_shared_cxx" >&5
4504 echo "${ECHO_T}$with_shared_cxx" >&6
4505 fi
4506 fi
4507
4508 ###############################################################################
4509
4510 echo "$as_me:4510: checking for specified models" >&5
4511 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4512 test -z "$cf_list_models" && cf_list_models=normal
4513 test "$with_libtool" != "no" && cf_list_models=libtool
4514 echo "$as_me:4514: result: $cf_list_models" >&5
4515 echo "${ECHO_T}$cf_list_models" >&6
4516
4517 ### Use the first model as the default, and save its suffix for use in building
4518 ### up test-applications.
4519 echo "$as_me:4519: checking for default model" >&5
4520 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4521 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4522 echo "$as_me:4522: result: $DFT_LWR_MODEL" >&5
4523 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4524
4525 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4526
4527 TICS_NAME=tic
4528
4529 TINFO_NAME=tinfo
4530
4531 LIB_NAME=ncurses
4532
4533 LIB_DIR=../lib
4534 LIB_2ND=../../lib
4535
4536 echo "$as_me:4536: checking if you want to have a library-prefix" >&5
4537 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4538
4539 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4540 if test "${with_lib_prefix+set}" = set; then
4541   withval="$with_lib_prefix"
4542   with_lib_prefix=$withval
4543 else
4544   with_lib_prefix=auto
4545 fi;
4546 echo "$as_me:4546: result: $with_lib_prefix" >&5
4547 echo "${ECHO_T}$with_lib_prefix" >&6
4548
4549 if test $with_lib_prefix = auto
4550 then
4551
4552         case $cf_cv_system_name in #(vi
4553         OS/2*|os2*) #(vi
4554         LIB_PREFIX=''
4555         ;;
4556         *)      LIB_PREFIX='lib'
4557         ;;
4558         esac
4559 cf_prefix=$LIB_PREFIX
4560
4561 elif test $with_lib_prefix = no
4562 then
4563         LIB_PREFIX=
4564 else
4565         LIB_PREFIX=$with_lib_prefix
4566 fi
4567
4568 LIB_SUFFIX=
4569
4570         echo "$as_me:4570: checking for PATH separator" >&5
4571 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4572         case $cf_cv_system_name in
4573         os2*)   PATH_SEPARATOR=';'  ;;
4574         *)      ${PATH_SEPARATOR:=':'}  ;;
4575         esac
4576
4577         echo "$as_me:4577: result: $PATH_SEPARATOR" >&5
4578 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4579
4580 ###############################################################################
4581
4582 echo "$as_me:4582: checking if you want to build a separate terminfo library" >&5
4583 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4584
4585 # Check whether --with-termlib or --without-termlib was given.
4586 if test "${with_termlib+set}" = set; then
4587   withval="$with_termlib"
4588   with_termlib=$withval
4589 else
4590   with_termlib=no
4591 fi;
4592 echo "$as_me:4592: result: $with_termlib" >&5
4593 echo "${ECHO_T}$with_termlib" >&6
4594
4595 echo "$as_me:4595: checking if you want to build a separate tic library" >&5
4596 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4597
4598 # Check whether --with-ticlib or --without-ticlib was given.
4599 if test "${with_ticlib+set}" = set; then
4600   withval="$with_ticlib"
4601   with_ticlib=$withval
4602 else
4603   with_ticlib=no
4604 fi;
4605 echo "$as_me:4605: result: $with_ticlib" >&5
4606 echo "${ECHO_T}$with_ticlib" >&6
4607
4608 ### Checks for special libraries, must be done up-front.
4609 SHLIB_LIST=""
4610
4611 echo "$as_me:4611: checking if you want to link with the GPM mouse library" >&5
4612 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4613
4614 # Check whether --with-gpm or --without-gpm was given.
4615 if test "${with_gpm+set}" = set; then
4616   withval="$with_gpm"
4617   with_gpm=$withval
4618 else
4619   with_gpm=maybe
4620 fi;
4621 echo "$as_me:4621: result: $with_gpm" >&5
4622 echo "${ECHO_T}$with_gpm" >&6
4623
4624 if test "$with_gpm" != no ; then
4625         echo "$as_me:4625: checking for gpm.h" >&5
4626 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4627 if test "${ac_cv_header_gpm_h+set}" = set; then
4628   echo $ECHO_N "(cached) $ECHO_C" >&6
4629 else
4630   cat >conftest.$ac_ext <<_ACEOF
4631 #line 4631 "configure"
4632 #include "confdefs.h"
4633 #include <gpm.h>
4634 _ACEOF
4635 if { (eval echo "$as_me:4635: \"$ac_cpp conftest.$ac_ext\"") >&5
4636   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4637   ac_status=$?
4638   egrep -v '^ *\+' conftest.er1 >conftest.err
4639   rm -f conftest.er1
4640   cat conftest.err >&5
4641   echo "$as_me:4641: \$? = $ac_status" >&5
4642   (exit $ac_status); } >/dev/null; then
4643   if test -s conftest.err; then
4644     ac_cpp_err=$ac_c_preproc_warn_flag
4645   else
4646     ac_cpp_err=
4647   fi
4648 else
4649   ac_cpp_err=yes
4650 fi
4651 if test -z "$ac_cpp_err"; then
4652   ac_cv_header_gpm_h=yes
4653 else
4654   echo "$as_me: failed program was:" >&5
4655   cat conftest.$ac_ext >&5
4656   ac_cv_header_gpm_h=no
4657 fi
4658 rm -f conftest.err conftest.$ac_ext
4659 fi
4660 echo "$as_me:4660: result: $ac_cv_header_gpm_h" >&5
4661 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4662 if test $ac_cv_header_gpm_h = yes; then
4663
4664 cat >>confdefs.h <<\EOF
4665 #define HAVE_GPM_H 1
4666 EOF
4667
4668                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4669                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4670
4671 echo "${as_me:-configure}:4671: testing assuming we really have GPM library ..." 1>&5
4672
4673 cat >>confdefs.h <<\EOF
4674 #define HAVE_LIBGPM 1
4675 EOF
4676
4677                 else
4678                         echo "$as_me:4678: checking for Gpm_Open in -lgpm" >&5
4679 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4680 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4681   echo $ECHO_N "(cached) $ECHO_C" >&6
4682 else
4683   ac_check_lib_save_LIBS=$LIBS
4684 LIBS="-lgpm  $LIBS"
4685 cat >conftest.$ac_ext <<_ACEOF
4686 #line 4686 "configure"
4687 #include "confdefs.h"
4688
4689 /* Override any gcc2 internal prototype to avoid an error.  */
4690 #ifdef __cplusplus
4691 extern "C"
4692 #endif
4693 /* We use char because int might match the return type of a gcc2
4694    builtin and then its argument prototype would still apply.  */
4695 char Gpm_Open ();
4696 int
4697 main ()
4698 {
4699 Gpm_Open ();
4700   ;
4701   return 0;
4702 }
4703 _ACEOF
4704 rm -f conftest.$ac_objext conftest$ac_exeext
4705 if { (eval echo "$as_me:4705: \"$ac_link\"") >&5
4706   (eval $ac_link) 2>&5
4707   ac_status=$?
4708   echo "$as_me:4708: \$? = $ac_status" >&5
4709   (exit $ac_status); } &&
4710          { ac_try='test -s conftest$ac_exeext'
4711   { (eval echo "$as_me:4711: \"$ac_try\"") >&5
4712   (eval $ac_try) 2>&5
4713   ac_status=$?
4714   echo "$as_me:4714: \$? = $ac_status" >&5
4715   (exit $ac_status); }; }; then
4716   ac_cv_lib_gpm_Gpm_Open=yes
4717 else
4718   echo "$as_me: failed program was:" >&5
4719 cat conftest.$ac_ext >&5
4720 ac_cv_lib_gpm_Gpm_Open=no
4721 fi
4722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4723 LIBS=$ac_check_lib_save_LIBS
4724 fi
4725 echo "$as_me:4725: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4726 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4727 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4728   :
4729 else
4730
4731                                 { { echo "$as_me:4731: error: Cannot link with GPM library" >&5
4732 echo "$as_me: error: Cannot link with GPM library" >&2;}
4733    { (exit 1); exit 1; }; }
4734                 fi
4735                 with_gpm=yes
4736
4737 fi
4738
4739 else
4740
4741                 test "$with_gpm" != maybe && { echo "$as_me:4741: WARNING: Cannot find GPM header" >&5
4742 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4743                 with_gpm=no
4744
4745 fi
4746
4747 fi
4748
4749 if test "$with_gpm" != no ; then
4750         echo "$as_me:4750: checking if you want to load GPM dynamically" >&5
4751 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4752
4753 # Check whether --with-dlsym or --without-dlsym was given.
4754 if test "${with_dlsym+set}" = set; then
4755   withval="$with_dlsym"
4756   with_dlsym=$withval
4757 else
4758   with_dlsym=yes
4759 fi;
4760         echo "$as_me:4760: result: $with_dlsym" >&5
4761 echo "${ECHO_T}$with_dlsym" >&6
4762         if test "x$with_dlsym" = xyes ; then
4763
4764 cf_have_dlsym=no
4765 echo "$as_me:4765: checking for dlsym" >&5
4766 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4767 if test "${ac_cv_func_dlsym+set}" = set; then
4768   echo $ECHO_N "(cached) $ECHO_C" >&6
4769 else
4770   cat >conftest.$ac_ext <<_ACEOF
4771 #line 4771 "configure"
4772 #include "confdefs.h"
4773 /* System header to define __stub macros and hopefully few prototypes,
4774     which can conflict with char dlsym (); below.  */
4775 #include <assert.h>
4776 /* Override any gcc2 internal prototype to avoid an error.  */
4777 #ifdef __cplusplus
4778 extern "C"
4779 #endif
4780 /* We use char because int might match the return type of a gcc2
4781    builtin and then its argument prototype would still apply.  */
4782 char dlsym ();
4783 char (*f) ();
4784
4785 int
4786 main ()
4787 {
4788 /* The GNU C library defines this for functions which it implements
4789     to always fail with ENOSYS.  Some functions are actually named
4790     something starting with __ and the normal name is an alias.  */
4791 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4792 choke me
4793 #else
4794 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4795 #endif
4796
4797   ;
4798   return 0;
4799 }
4800 _ACEOF
4801 rm -f conftest.$ac_objext conftest$ac_exeext
4802 if { (eval echo "$as_me:4802: \"$ac_link\"") >&5
4803   (eval $ac_link) 2>&5
4804   ac_status=$?
4805   echo "$as_me:4805: \$? = $ac_status" >&5
4806   (exit $ac_status); } &&
4807          { ac_try='test -s conftest$ac_exeext'
4808   { (eval echo "$as_me:4808: \"$ac_try\"") >&5
4809   (eval $ac_try) 2>&5
4810   ac_status=$?
4811   echo "$as_me:4811: \$? = $ac_status" >&5
4812   (exit $ac_status); }; }; then
4813   ac_cv_func_dlsym=yes
4814 else
4815   echo "$as_me: failed program was:" >&5
4816 cat conftest.$ac_ext >&5
4817 ac_cv_func_dlsym=no
4818 fi
4819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4820 fi
4821 echo "$as_me:4821: result: $ac_cv_func_dlsym" >&5
4822 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4823 if test $ac_cv_func_dlsym = yes; then
4824   cf_have_dlsym=yes
4825 else
4826
4827 cf_have_libdl=no
4828 echo "$as_me:4828: checking for dlsym in -ldl" >&5
4829 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4830 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4831   echo $ECHO_N "(cached) $ECHO_C" >&6
4832 else
4833   ac_check_lib_save_LIBS=$LIBS
4834 LIBS="-ldl  $LIBS"
4835 cat >conftest.$ac_ext <<_ACEOF
4836 #line 4836 "configure"
4837 #include "confdefs.h"
4838
4839 /* Override any gcc2 internal prototype to avoid an error.  */
4840 #ifdef __cplusplus
4841 extern "C"
4842 #endif
4843 /* We use char because int might match the return type of a gcc2
4844    builtin and then its argument prototype would still apply.  */
4845 char dlsym ();
4846 int
4847 main ()
4848 {
4849 dlsym ();
4850   ;
4851   return 0;
4852 }
4853 _ACEOF
4854 rm -f conftest.$ac_objext conftest$ac_exeext
4855 if { (eval echo "$as_me:4855: \"$ac_link\"") >&5
4856   (eval $ac_link) 2>&5
4857   ac_status=$?
4858   echo "$as_me:4858: \$? = $ac_status" >&5
4859   (exit $ac_status); } &&
4860          { ac_try='test -s conftest$ac_exeext'
4861   { (eval echo "$as_me:4861: \"$ac_try\"") >&5
4862   (eval $ac_try) 2>&5
4863   ac_status=$?
4864   echo "$as_me:4864: \$? = $ac_status" >&5
4865   (exit $ac_status); }; }; then
4866   ac_cv_lib_dl_dlsym=yes
4867 else
4868   echo "$as_me: failed program was:" >&5
4869 cat conftest.$ac_ext >&5
4870 ac_cv_lib_dl_dlsym=no
4871 fi
4872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4873 LIBS=$ac_check_lib_save_LIBS
4874 fi
4875 echo "$as_me:4875: result: $ac_cv_lib_dl_dlsym" >&5
4876 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4877 if test $ac_cv_lib_dl_dlsym = yes; then
4878
4879         cf_have_dlsym=yes
4880         cf_have_libdl=yes
4881 fi
4882
4883 fi
4884
4885 if test "$cf_have_dlsym" = yes ; then
4886         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4887
4888         echo "$as_me:4888: checking whether able to link to dl*() functions" >&5
4889 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4890         cat >conftest.$ac_ext <<_ACEOF
4891 #line 4891 "configure"
4892 #include "confdefs.h"
4893 #include <dlfcn.h>
4894 int
4895 main ()
4896 {
4897
4898                 void *obj;
4899                 if ((obj = dlopen("filename", 0)) != 0) {
4900                         if (dlsym(obj, "symbolname") == 0) {
4901                         dlclose(obj);
4902                         }
4903                 }
4904   ;
4905   return 0;
4906 }
4907 _ACEOF
4908 rm -f conftest.$ac_objext conftest$ac_exeext
4909 if { (eval echo "$as_me:4909: \"$ac_link\"") >&5
4910   (eval $ac_link) 2>&5
4911   ac_status=$?
4912   echo "$as_me:4912: \$? = $ac_status" >&5
4913   (exit $ac_status); } &&
4914          { ac_try='test -s conftest$ac_exeext'
4915   { (eval echo "$as_me:4915: \"$ac_try\"") >&5
4916   (eval $ac_try) 2>&5
4917   ac_status=$?
4918   echo "$as_me:4918: \$? = $ac_status" >&5
4919   (exit $ac_status); }; }; then
4920
4921 cat >>confdefs.h <<\EOF
4922 #define HAVE_LIBDL 1
4923 EOF
4924
4925 else
4926   echo "$as_me: failed program was:" >&5
4927 cat conftest.$ac_ext >&5
4928
4929                 { { echo "$as_me:4929: error: Cannot link test program for libdl" >&5
4930 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4931    { (exit 1); exit 1; }; }
4932 fi
4933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4934         echo "$as_me:4934: result: ok" >&5
4935 echo "${ECHO_T}ok" >&6
4936 else
4937         { { echo "$as_me:4937: error: Cannot find dlsym function" >&5
4938 echo "$as_me: error: Cannot find dlsym function" >&2;}
4939    { (exit 1); exit 1; }; }
4940 fi
4941
4942                 if test "x$with_gpm" != xyes ; then
4943                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4944
4945 echo "${as_me:-configure}:4945: testing assuming soname for gpm is $with_gpm ..." 1>&5
4946
4947                         cf_cv_gpm_soname="$with_gpm"
4948                 else
4949
4950 echo "$as_me:4950: checking for soname of gpm library" >&5
4951 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4952 if test "${cf_cv_gpm_soname+set}" = set; then
4953   echo $ECHO_N "(cached) $ECHO_C" >&6
4954 else
4955
4956 cf_cv_gpm_soname=unknown
4957 if test "$cross_compiling" != yes ; then
4958 cat >conftest.$ac_ext <<CF_EOF
4959 #include <gpm.h>
4960 int main()
4961 {
4962 if (Gpm_Open(0,0)) Gpm_Close();
4963         ${cf_cv_main_return:-return}(0);
4964 }
4965 CF_EOF
4966 cf_save_LIBS="$LIBS"
4967         LIBS="-lgpm $LIBS"
4968         if { (eval echo "$as_me:4968: \"$ac_compile\"") >&5
4969   (eval $ac_compile) 2>&5
4970   ac_status=$?
4971   echo "$as_me:4971: \$? = $ac_status" >&5
4972   (exit $ac_status); } ; then
4973                 if { (eval echo "$as_me:4973: \"$ac_link\"") >&5
4974   (eval $ac_link) 2>&5
4975   ac_status=$?
4976   echo "$as_me:4976: \$? = $ac_status" >&5
4977   (exit $ac_status); } ; then
4978                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4979                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4980                 fi
4981         fi
4982 rm -rf conftest*
4983 LIBS="$cf_save_LIBS"
4984 fi
4985
4986 fi
4987 echo "$as_me:4987: result: $cf_cv_gpm_soname" >&5
4988 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4989
4990                 fi
4991                 test "$cf_cv_gpm_soname" != "unknown" &&
4992 cat >>confdefs.h <<EOF
4993 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4994 EOF
4995
4996                 SHLIB_LIST="-ldl $SHLIB_LIST"
4997         else
4998                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4999                 TEST_LIBS="-lgpm $TEST_LIBS"
5000         fi
5001
5002 cat >>confdefs.h <<\EOF
5003 #define HAVE_LIBGPM 1
5004 EOF
5005
5006 echo "$as_me:5006: checking for Gpm_Wgetch in -lgpm" >&5
5007 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5008 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5009   echo $ECHO_N "(cached) $ECHO_C" >&6
5010 else
5011   ac_check_lib_save_LIBS=$LIBS
5012 LIBS="-lgpm  $LIBS"
5013 cat >conftest.$ac_ext <<_ACEOF
5014 #line 5014 "configure"
5015 #include "confdefs.h"
5016
5017 /* Override any gcc2 internal prototype to avoid an error.  */
5018 #ifdef __cplusplus
5019 extern "C"
5020 #endif
5021 /* We use char because int might match the return type of a gcc2
5022    builtin and then its argument prototype would still apply.  */
5023 char Gpm_Wgetch ();
5024 int
5025 main ()
5026 {
5027 Gpm_Wgetch ();
5028   ;
5029   return 0;
5030 }
5031 _ACEOF
5032 rm -f conftest.$ac_objext conftest$ac_exeext
5033 if { (eval echo "$as_me:5033: \"$ac_link\"") >&5
5034   (eval $ac_link) 2>&5
5035   ac_status=$?
5036   echo "$as_me:5036: \$? = $ac_status" >&5
5037   (exit $ac_status); } &&
5038          { ac_try='test -s conftest$ac_exeext'
5039   { (eval echo "$as_me:5039: \"$ac_try\"") >&5
5040   (eval $ac_try) 2>&5
5041   ac_status=$?
5042   echo "$as_me:5042: \$? = $ac_status" >&5
5043   (exit $ac_status); }; }; then
5044   ac_cv_lib_gpm_Gpm_Wgetch=yes
5045 else
5046   echo "$as_me: failed program was:" >&5
5047 cat conftest.$ac_ext >&5
5048 ac_cv_lib_gpm_Gpm_Wgetch=no
5049 fi
5050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5051 LIBS=$ac_check_lib_save_LIBS
5052 fi
5053 echo "$as_me:5053: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5054 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5055 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5056
5057 echo "$as_me:5057: checking if GPM is weakly bound to curses library" >&5
5058 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5059 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5060   echo $ECHO_N "(cached) $ECHO_C" >&6
5061 else
5062
5063 cf_cv_check_gpm_wgetch=unknown
5064 if test "$cross_compiling" != yes ; then
5065
5066 cat >conftest.$ac_ext <<CF_EOF
5067 #include <gpm.h>
5068 int main()
5069 {
5070         Gpm_Wgetch();
5071         ${cf_cv_main_return:-return}(0);
5072 }
5073 CF_EOF
5074
5075         cf_save_LIBS="$LIBS"
5076         # This only works if we can look at the symbol table.  If a shared
5077         # library is stripped for install, we cannot use that.  So we're forced
5078         # to rely on the static library, noting that some packagers may not
5079         # include it.
5080         LIBS="-static -lgpm -dynamic $LIBS"
5081         if { (eval echo "$as_me:5081: \"$ac_compile\"") >&5
5082   (eval $ac_compile) 2>&5
5083   ac_status=$?
5084   echo "$as_me:5084: \$? = $ac_status" >&5
5085   (exit $ac_status); } ; then
5086                 if { (eval echo "$as_me:5086: \"$ac_link\"") >&5
5087   (eval $ac_link) 2>&5
5088   ac_status=$?
5089   echo "$as_me:5089: \$? = $ac_status" >&5
5090   (exit $ac_status); } ; then
5091                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5092                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5093                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5094                 fi
5095         fi
5096         rm -rf conftest*
5097         LIBS="$cf_save_LIBS"
5098 fi
5099
5100 fi
5101 echo "$as_me:5101: result: $cf_cv_check_gpm_wgetch" >&5
5102 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5103
5104 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5105         { echo "$as_me:5105: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5106 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5107 fi
5108
5109 fi
5110
5111 fi
5112
5113 # not everyone has "test -c"
5114 if test -c /dev/sysmouse 2>/dev/null ; then
5115 echo "$as_me:5115: checking if you want to use sysmouse" >&5
5116 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5117
5118 # Check whether --with-sysmouse or --without-sysmouse was given.
5119 if test "${with_sysmouse+set}" = set; then
5120   withval="$with_sysmouse"
5121   cf_with_sysmouse=$withval
5122 else
5123   cf_with_sysmouse=maybe
5124 fi;
5125         if test "$cf_with_sysmouse" != no ; then
5126         cat >conftest.$ac_ext <<_ACEOF
5127 #line 5127 "configure"
5128 #include "confdefs.h"
5129
5130 #include <osreldate.h>
5131 #if (__FreeBSD_version >= 400017)
5132 #include <sys/consio.h>
5133 #include <sys/fbio.h>
5134 #else
5135 #include <machine/console.h>
5136 #endif
5137
5138 int
5139 main ()
5140 {
5141
5142         struct mouse_info the_mouse;
5143         ioctl(0, CONS_MOUSECTL, &the_mouse);
5144
5145   ;
5146   return 0;
5147 }
5148 _ACEOF
5149 rm -f conftest.$ac_objext
5150 if { (eval echo "$as_me:5150: \"$ac_compile\"") >&5
5151   (eval $ac_compile) 2>&5
5152   ac_status=$?
5153   echo "$as_me:5153: \$? = $ac_status" >&5
5154   (exit $ac_status); } &&
5155          { ac_try='test -s conftest.$ac_objext'
5156   { (eval echo "$as_me:5156: \"$ac_try\"") >&5
5157   (eval $ac_try) 2>&5
5158   ac_status=$?
5159   echo "$as_me:5159: \$? = $ac_status" >&5
5160   (exit $ac_status); }; }; then
5161   cf_with_sysmouse=yes
5162 else
5163   echo "$as_me: failed program was:" >&5
5164 cat conftest.$ac_ext >&5
5165 cf_with_sysmouse=no
5166 fi
5167 rm -f conftest.$ac_objext conftest.$ac_ext
5168         fi
5169 echo "$as_me:5169: result: $cf_with_sysmouse" >&5
5170 echo "${ECHO_T}$cf_with_sysmouse" >&6
5171 test "$cf_with_sysmouse" = yes &&
5172 cat >>confdefs.h <<\EOF
5173 #define USE_SYSMOUSE 1
5174 EOF
5175
5176 fi
5177
5178 if test X"$CC_G_OPT" = X"" ; then
5179         CC_G_OPT='-g'
5180         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5181 fi
5182
5183 if test X"$CXX_G_OPT" = X"" ; then
5184         CXX_G_OPT='-g'
5185         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5186 fi
5187
5188 echo "$as_me:5188: checking for default loader flags" >&5
5189 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5190 case $DFT_LWR_MODEL in
5191 libtool) LD_MODEL=''   ;;
5192 normal)  LD_MODEL=''   ;;
5193 debug)   LD_MODEL=$CC_G_OPT ;;
5194 profile) LD_MODEL='-pg';;
5195 shared)  LD_MODEL=''   ;;
5196 esac
5197 echo "$as_me:5197: result: $LD_MODEL" >&5
5198 echo "${ECHO_T}$LD_MODEL" >&6
5199
5200 case $DFT_LWR_MODEL in
5201 shared)
5202
5203 echo "$as_me:5203: checking if rpath option should be used" >&5
5204 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5205
5206 # Check whether --enable-rpath or --disable-rpath was given.
5207 if test "${enable_rpath+set}" = set; then
5208   enableval="$enable_rpath"
5209   cf_cv_enable_rpath=$enableval
5210 else
5211   cf_cv_enable_rpath=no
5212 fi;
5213 echo "$as_me:5213: result: $cf_cv_enable_rpath" >&5
5214 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5215
5216 echo "$as_me:5216: checking if shared libraries should be relinked during install" >&5
5217 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5218
5219 # Check whether --enable-relink or --disable-relink was given.
5220 if test "${enable_relink+set}" = set; then
5221   enableval="$enable_relink"
5222   cf_cv_do_relink=$enableval
5223 else
5224   cf_cv_do_relink=yes
5225 fi;
5226 echo "$as_me:5226: result: $cf_cv_do_relink" >&5
5227 echo "${ECHO_T}$cf_cv_do_relink" >&6
5228         ;;
5229 esac
5230
5231 LD_RPATH_OPT=
5232 echo "$as_me:5232: checking for an rpath option" >&5
5233 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5234 case $cf_cv_system_name in #(vi
5235 irix*) #(vi
5236         if test "$GCC" = yes; then
5237                 LD_RPATH_OPT="-Wl,-rpath,"
5238         else
5239                 LD_RPATH_OPT="-rpath "
5240         fi
5241         ;;
5242 linux*|gnu*|k*bsd*-gnu) #(vi
5243         LD_RPATH_OPT="-Wl,-rpath,"
5244         ;;
5245 openbsd[2-9].*|mirbsd*) #(vi
5246         LD_RPATH_OPT="-Wl,-rpath,"
5247         ;;
5248 dragonfly*|freebsd*) #(vi
5249         LD_RPATH_OPT="-rpath "
5250         ;;
5251 netbsd*) #(vi
5252         LD_RPATH_OPT="-Wl,-rpath,"
5253         ;;
5254 osf*|mls+*) #(vi
5255         LD_RPATH_OPT="-rpath "
5256         ;;
5257 solaris2*) #(vi
5258         LD_RPATH_OPT="-R"
5259         ;;
5260 *)
5261         ;;
5262 esac
5263 echo "$as_me:5263: result: $LD_RPATH_OPT" >&5
5264 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5265
5266 case "x$LD_RPATH_OPT" in #(vi
5267 x-R*)
5268         echo "$as_me:5268: checking if we need a space after rpath option" >&5
5269 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5270         cf_save_LIBS="$LIBS"
5271         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5272         cat >conftest.$ac_ext <<_ACEOF
5273 #line 5273 "configure"
5274 #include "confdefs.h"
5275
5276 int
5277 main ()
5278 {
5279
5280   ;
5281   return 0;
5282 }
5283 _ACEOF
5284 rm -f conftest.$ac_objext conftest$ac_exeext
5285 if { (eval echo "$as_me:5285: \"$ac_link\"") >&5
5286   (eval $ac_link) 2>&5
5287   ac_status=$?
5288   echo "$as_me:5288: \$? = $ac_status" >&5
5289   (exit $ac_status); } &&
5290          { ac_try='test -s conftest$ac_exeext'
5291   { (eval echo "$as_me:5291: \"$ac_try\"") >&5
5292   (eval $ac_try) 2>&5
5293   ac_status=$?
5294   echo "$as_me:5294: \$? = $ac_status" >&5
5295   (exit $ac_status); }; }; then
5296   cf_rpath_space=no
5297 else
5298   echo "$as_me: failed program was:" >&5
5299 cat conftest.$ac_ext >&5
5300 cf_rpath_space=yes
5301 fi
5302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5303         LIBS="$cf_save_LIBS"
5304         echo "$as_me:5304: result: $cf_rpath_space" >&5
5305 echo "${ECHO_T}$cf_rpath_space" >&6
5306         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5307         ;;
5308 esac
5309
5310         LOCAL_LDFLAGS=
5311         LOCAL_LDFLAGS2=
5312         LD_SHARED_OPTS=
5313         INSTALL_LIB="-m 644"
5314
5315         cf_cv_do_symlinks=no
5316         cf_ld_rpath_opt=
5317         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5318
5319         echo "$as_me:5319: checking if release/abi version should be used for shared libs" >&5
5320 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5321
5322 # Check whether --with-shlib-version or --without-shlib-version was given.
5323 if test "${with_shlib_version+set}" = set; then
5324   withval="$with_shlib_version"
5325   test -z "$withval" && withval=auto
5326         case $withval in #(vi
5327         yes) #(vi
5328                 cf_cv_shlib_version=auto
5329                 ;;
5330         rel|abi|auto|no) #(vi
5331                 cf_cv_shlib_version=$withval
5332                 ;;
5333         *)
5334                 { { echo "$as_me:5334: error: option value must be one of: rel, abi, auto or no" >&5
5335 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5336    { (exit 1); exit 1; }; }
5337                 ;;
5338         esac
5339
5340 else
5341   cf_cv_shlib_version=auto
5342 fi;
5343         echo "$as_me:5343: result: $cf_cv_shlib_version" >&5
5344 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5345
5346         cf_cv_rm_so_locs=no
5347         cf_try_cflags=
5348
5349         # Some less-capable ports of gcc support only -fpic
5350         CC_SHARED_OPTS=
5351         if test "$GCC" = yes
5352         then
5353                 echo "$as_me:5353: checking which $CC option to use" >&5
5354 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5355                 cf_save_CFLAGS="$CFLAGS"
5356                 for CC_SHARED_OPTS in -fPIC -fpic ''
5357                 do
5358                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5359                         cat >conftest.$ac_ext <<_ACEOF
5360 #line 5360 "configure"
5361 #include "confdefs.h"
5362 #include <stdio.h>
5363 int
5364 main ()
5365 {
5366 int x = 1
5367   ;
5368   return 0;
5369 }
5370 _ACEOF
5371 rm -f conftest.$ac_objext
5372 if { (eval echo "$as_me:5372: \"$ac_compile\"") >&5
5373   (eval $ac_compile) 2>&5
5374   ac_status=$?
5375   echo "$as_me:5375: \$? = $ac_status" >&5
5376   (exit $ac_status); } &&
5377          { ac_try='test -s conftest.$ac_objext'
5378   { (eval echo "$as_me:5378: \"$ac_try\"") >&5
5379   (eval $ac_try) 2>&5
5380   ac_status=$?
5381   echo "$as_me:5381: \$? = $ac_status" >&5
5382   (exit $ac_status); }; }; then
5383   break
5384 else
5385   echo "$as_me: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
5387 fi
5388 rm -f conftest.$ac_objext conftest.$ac_ext
5389                 done
5390                 echo "$as_me:5390: result: $CC_SHARED_OPTS" >&5
5391 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5392                 CFLAGS="$cf_save_CFLAGS"
5393         fi
5394
5395         cf_cv_shlib_version_infix=no
5396
5397         case $cf_cv_system_name in #(vi
5398         aix4.3-9*|aix[5-7]*) #(vi
5399                 if test "$GCC" = yes; then
5400                         CC_SHARED_OPTS=
5401                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5402                 else
5403                         # CC_SHARED_OPTS='-qpic=large -G'
5404                         # perhaps "-bM:SRE -bnoentry -bexpall"
5405                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5406                 fi
5407                 ;;
5408         beos*) #(vi
5409                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5410                 ;;
5411         cygwin*) #(vi
5412                 CC_SHARED_OPTS=
5413                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5414                 cf_cv_shlib_version=cygdll
5415                 cf_cv_shlib_version_infix=cygdll
5416                 cat >mk_shared_lib.sh <<-CF_EOF
5417                 #!/bin/sh
5418                 SHARED_LIB=\$1
5419                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5420                 shift
5421                 cat <<-EOF
5422                 Linking shared library
5423                 ** SHARED_LIB \$SHARED_LIB
5424                 ** IMPORT_LIB \$IMPORT_LIB
5425 EOF
5426                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5427 CF_EOF
5428                 chmod +x mk_shared_lib.sh
5429                 ;;
5430         darwin*) #(vi
5431                 cf_try_cflags="no-cpp-precomp"
5432                 CC_SHARED_OPTS="-dynamic"
5433                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5434                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5435                 cf_cv_shlib_version_infix=yes
5436                 echo "$as_me:5436: checking if ld -search_paths_first works" >&5
5437 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5438 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5439   echo $ECHO_N "(cached) $ECHO_C" >&6
5440 else
5441
5442                         cf_save_LDFLAGS=$LDFLAGS
5443                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5444                         cat >conftest.$ac_ext <<_ACEOF
5445 #line 5445 "configure"
5446 #include "confdefs.h"
5447
5448 int
5449 main ()
5450 {
5451 int i;
5452   ;
5453   return 0;
5454 }
5455 _ACEOF
5456 rm -f conftest.$ac_objext conftest$ac_exeext
5457 if { (eval echo "$as_me:5457: \"$ac_link\"") >&5
5458   (eval $ac_link) 2>&5
5459   ac_status=$?
5460   echo "$as_me:5460: \$? = $ac_status" >&5
5461   (exit $ac_status); } &&
5462          { ac_try='test -s conftest$ac_exeext'
5463   { (eval echo "$as_me:5463: \"$ac_try\"") >&5
5464   (eval $ac_try) 2>&5
5465   ac_status=$?
5466   echo "$as_me:5466: \$? = $ac_status" >&5
5467   (exit $ac_status); }; }; then
5468   cf_cv_ldflags_search_paths_first=yes
5469 else
5470   echo "$as_me: failed program was:" >&5
5471 cat conftest.$ac_ext >&5
5472 cf_cv_ldflags_search_paths_first=no
5473 fi
5474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5475                                 LDFLAGS=$cf_save_LDFLAGS
5476 fi
5477 echo "$as_me:5477: result: $cf_cv_ldflags_search_paths_first" >&5
5478 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5479                 if test $cf_cv_ldflags_search_paths_first = yes; then
5480                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5481                 fi
5482                 ;;
5483         hpux[7-8]*) #(vi
5484                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5485                 if test "$GCC" != yes; then
5486                         CC_SHARED_OPTS='+Z'
5487                 fi
5488                 MK_SHARED_LIB='${LD} -b -o $@'
5489                 INSTALL_LIB="-m 555"
5490                 ;;
5491         hpux*) #(vi
5492                 # (tested with gcc 2.7.2 -- I don't have c89)
5493                 if test "$GCC" = yes; then
5494                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5495                 else
5496                         CC_SHARED_OPTS='+Z'
5497                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5498                 fi
5499                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5500                 # HP-UX shared libraries must be executable, and should be
5501                 # readonly to exploit a quirk in the memory manager.
5502                 INSTALL_LIB="-m 555"
5503                 ;;
5504         interix*)
5505                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5506                 if test "$cf_cv_shlib_version" = rel; then
5507                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5508                 else
5509                         cf_shared_soname='`basename `'
5510                 fi
5511                 CC_SHARED_OPTS=
5512                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5513                 ;;
5514         irix*) #(vi
5515                 if test "$cf_cv_enable_rpath" = yes ; then
5516                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5517                 fi
5518                 # tested with IRIX 5.2 and 'cc'.
5519                 if test "$GCC" != yes; then
5520                         CC_SHARED_OPTS='-KPIC'
5521                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5522                 else
5523                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5524                 fi
5525                 cf_cv_rm_so_locs=yes
5526                 ;;
5527         linux*|gnu*|k*bsd*-gnu) #(vi
5528                 if test "$DFT_LWR_MODEL" = "shared" ; then
5529                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5530                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5531                 fi
5532                 if test "$cf_cv_enable_rpath" = yes ; then
5533                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5534                 fi
5535
5536         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5537         if test "$cf_cv_shlib_version" = rel; then
5538                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5539         else
5540                 cf_cv_shared_soname='`basename $@`'
5541         fi
5542
5543                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5544                 ;;
5545         mingw*) #(vi
5546                 cf_cv_shlib_version=mingw
5547                 cf_cv_shlib_version_infix=mingw
5548                 CC_SHARED_OPTS=
5549                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5550                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5551                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5552                 cat >mk_shared_lib.sh <<-CF_EOF
5553                 #!/bin/sh
5554                 SHARED_LIB=\$1
5555                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5556                 shift
5557                 cat <<-EOF
5558                 Linking shared library
5559                 ** SHARED_LIB \$SHARED_LIB
5560                 ** IMPORT_LIB \$IMPORT_LIB
5561 EOF
5562                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5563 CF_EOF
5564                 chmod +x mk_shared_lib.sh
5565                 ;;
5566         openbsd[2-9].*|mirbsd*) #(vi
5567                 if test "$DFT_LWR_MODEL" = "shared" ; then
5568                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5569                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5570                 fi
5571                 if test "$cf_cv_enable_rpath" = yes ; then
5572                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5573                 fi
5574                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5575
5576         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5577         if test "$cf_cv_shlib_version" = rel; then
5578                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5579         else
5580                 cf_cv_shared_soname='`basename $@`'
5581         fi
5582
5583                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5584                 ;;
5585         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5586                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5587                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5588                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5589                 ;;
5590         dragonfly*|freebsd*) #(vi
5591                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5592                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5593                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5594                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5595                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5596                 fi
5597
5598         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5599         if test "$cf_cv_shlib_version" = rel; then
5600                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5601         else
5602                 cf_cv_shared_soname='`basename $@`'
5603         fi
5604
5605                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5606                 ;;
5607         netbsd*) #(vi
5608                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5609                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5610                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5611                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5612                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5613                         if test "$cf_cv_shlib_version" = auto; then
5614                         if test -f /usr/libexec/ld.elf_so; then
5615                                 cf_cv_shlib_version=abi
5616                         else
5617                                 cf_cv_shlib_version=rel
5618                         fi
5619                         fi
5620
5621         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5622         if test "$cf_cv_shlib_version" = rel; then
5623                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5624         else
5625                 cf_cv_shared_soname='`basename $@`'
5626         fi
5627
5628                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5629                 else
5630                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5631                 fi
5632                 ;;
5633         osf*|mls+*) #(vi
5634                 # tested with OSF/1 V3.2 and 'cc'
5635                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5636                 # link with shared libs).
5637                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5638                 case $host_os in #(vi
5639                 osf4*)
5640                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5641                         ;;
5642                 esac
5643                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5644                 if test "$DFT_LWR_MODEL" = "shared" ; then
5645                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5646                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5647                 fi
5648                 cf_cv_rm_so_locs=yes
5649                 ;;
5650         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5651                 # tested with osr5.0.5
5652                 if test "$GCC" != yes; then
5653                         CC_SHARED_OPTS='-belf -KPIC'
5654                 fi
5655                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5656                 if test "$cf_cv_enable_rpath" = yes ; then
5657                         # only way is to set LD_RUN_PATH but no switch for it
5658                         RUN_PATH=$libdir
5659                 fi
5660                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5661                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5662                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5663                 ;;
5664         sunos4*) #(vi
5665                 # tested with SunOS 4.1.1 and gcc 2.7.0
5666                 if test "$GCC" != yes; then
5667                         CC_SHARED_OPTS='-KPIC'
5668                 fi
5669                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5670                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5671                 ;;
5672         solaris2*) #(vi
5673                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5674                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5675                 if test "$DFT_LWR_MODEL" = "shared" ; then
5676                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5677                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5678                 fi
5679                 if test "$cf_cv_enable_rpath" = yes ; then
5680                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5681                 fi
5682
5683         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5684         if test "$cf_cv_shlib_version" = rel; then
5685                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5686         else
5687                 cf_cv_shared_soname='`basename $@`'
5688         fi
5689
5690                 if test "$GCC" != yes; then
5691                         cf_save_CFLAGS="$CFLAGS"
5692                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5693                         do
5694                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5695                                 cat >conftest.$ac_ext <<_ACEOF
5696 #line 5696 "configure"
5697 #include "confdefs.h"
5698 #include <stdio.h>
5699 int
5700 main ()
5701 {
5702 printf("Hello\n");
5703   ;
5704   return 0;
5705 }
5706 _ACEOF
5707 rm -f conftest.$ac_objext
5708 if { (eval echo "$as_me:5708: \"$ac_compile\"") >&5
5709   (eval $ac_compile) 2>&5
5710   ac_status=$?
5711   echo "$as_me:5711: \$? = $ac_status" >&5
5712   (exit $ac_status); } &&
5713          { ac_try='test -s conftest.$ac_objext'
5714   { (eval echo "$as_me:5714: \"$ac_try\"") >&5
5715   (eval $ac_try) 2>&5
5716   ac_status=$?
5717   echo "$as_me:5717: \$? = $ac_status" >&5
5718   (exit $ac_status); }; }; then
5719   break
5720 else
5721   echo "$as_me: failed program was:" >&5
5722 cat conftest.$ac_ext >&5
5723 fi
5724 rm -f conftest.$ac_objext conftest.$ac_ext
5725                         done
5726                         CFLAGS="$cf_save_CFLAGS"
5727                         CC_SHARED_OPTS=$cf_shared_opts
5728                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5729                 else
5730                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5731                 fi
5732                 ;;
5733         sysv5uw7*|unix_sv*) #(vi
5734                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5735                 if test "$GCC" != yes; then
5736                         CC_SHARED_OPTS='-KPIC'
5737                 fi
5738                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5739                 ;;
5740         *)
5741                 CC_SHARED_OPTS='unknown'
5742                 MK_SHARED_LIB='echo unknown'
5743                 ;;
5744         esac
5745
5746         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5747         case "$cf_cv_shlib_version" in #(vi
5748         rel|abi)
5749                 case "$MK_SHARED_LIB" in #(vi
5750                 *'-o $@') #(vi
5751                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5752                         ;;
5753                 *)
5754                         { echo "$as_me:5754: WARNING: ignored --with-shlib-version" >&5
5755 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5756                         ;;
5757                 esac
5758                 ;;
5759         esac
5760
5761         if test -n "$cf_try_cflags"
5762         then
5763 cat > conftest.$ac_ext <<EOF
5764 #line 5764 "${as_me:-configure}"
5765 #include <stdio.h>
5766 int main(int argc, char *argv[])
5767 {
5768         printf("hello\n");
5769         return (argv[argc-1] == 0) ;
5770 }
5771 EOF
5772                 cf_save_CFLAGS="$CFLAGS"
5773                 for cf_opt in $cf_try_cflags
5774                 do
5775                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5776                         echo "$as_me:5776: checking if CFLAGS option -$cf_opt works" >&5
5777 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5778                         if { (eval echo "$as_me:5778: \"$ac_compile\"") >&5
5779   (eval $ac_compile) 2>&5
5780   ac_status=$?
5781   echo "$as_me:5781: \$? = $ac_status" >&5
5782   (exit $ac_status); }; then
5783                                 echo "$as_me:5783: result: yes" >&5
5784 echo "${ECHO_T}yes" >&6
5785                                 cf_save_CFLAGS="$CFLAGS"
5786                         else
5787                                 echo "$as_me:5787: result: no" >&5
5788 echo "${ECHO_T}no" >&6
5789                         fi
5790                 done
5791                 CFLAGS="$cf_save_CFLAGS"
5792         fi
5793
5794         # RPATH_LIST is a colon-separated list of directories
5795         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5796         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5797
5798         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5799
5800 echo "${as_me:-configure}:5800: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5801
5802         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5803
5804 echo "${as_me:-configure}:5804: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5805
5806 if test "$CC_SHARED_OPTS" = "unknown"; then
5807         for model in $cf_list_models; do
5808                 if test "$model" = "shared"; then
5809                         { { echo "$as_me:5809: error: Shared libraries are not supported in this version" >&5
5810 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5811    { (exit 1); exit 1; }; }
5812                 fi
5813         done
5814 fi
5815
5816 ### If we're building with rpath, try to link non-standard libs that way too.
5817 if test "$DFT_LWR_MODEL" = "shared"; then
5818
5819 echo "$as_me:5819: checking if rpath-hack should be disabled" >&5
5820 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5821
5822 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5823 if test "${enable_rpath_hack+set}" = set; then
5824   enableval="$enable_rpath_hack"
5825   test "$enableval" != no && enableval=yes
5826   if test "$enableval" != "yes" ; then
5827     cf_disable_rpath_hack=yes
5828   else
5829     cf_disable_rpath_hack=no
5830   fi
5831 else
5832   enableval=yes
5833   cf_disable_rpath_hack=no
5834
5835 fi;
5836 echo "$as_me:5836: result: $cf_disable_rpath_hack" >&5
5837 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5838 if test "$cf_disable_rpath_hack" = no ; then
5839
5840 echo "$as_me:5840: checking for updated LDFLAGS" >&5
5841 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5842 if test -n "$LD_RPATH_OPT" ; then
5843         echo "$as_me:5843: result: maybe" >&5
5844 echo "${ECHO_T}maybe" >&6
5845
5846         for ac_prog in ldd
5847 do
5848   # Extract the first word of "$ac_prog", so it can be a program name with args.
5849 set dummy $ac_prog; ac_word=$2
5850 echo "$as_me:5850: checking for $ac_word" >&5
5851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5852 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5853   echo $ECHO_N "(cached) $ECHO_C" >&6
5854 else
5855   if test -n "$cf_ldd_prog"; then
5856   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5857 else
5858   ac_save_IFS=$IFS; IFS=$ac_path_separator
5859 ac_dummy="$PATH"
5860 for ac_dir in $ac_dummy; do
5861   IFS=$ac_save_IFS
5862   test -z "$ac_dir" && ac_dir=.
5863   $as_executable_p "$ac_dir/$ac_word" || continue
5864 ac_cv_prog_cf_ldd_prog="$ac_prog"
5865 echo "$as_me:5865: found $ac_dir/$ac_word" >&5
5866 break
5867 done
5868
5869 fi
5870 fi
5871 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5872 if test -n "$cf_ldd_prog"; then
5873   echo "$as_me:5873: result: $cf_ldd_prog" >&5
5874 echo "${ECHO_T}$cf_ldd_prog" >&6
5875 else
5876   echo "$as_me:5876: result: no" >&5
5877 echo "${ECHO_T}no" >&6
5878 fi
5879
5880   test -n "$cf_ldd_prog" && break
5881 done
5882 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5883
5884         cf_rpath_list="/usr/lib /lib"
5885         if test "$cf_ldd_prog" != no
5886         then
5887                 cf_rpath_oops=
5888
5889 cat >conftest.$ac_ext <<_ACEOF
5890 #line 5890 "configure"
5891 #include "confdefs.h"
5892 #include <stdio.h>
5893 int
5894 main ()
5895 {
5896 printf("Hello");
5897   ;
5898   return 0;
5899 }
5900 _ACEOF
5901 rm -f conftest.$ac_objext conftest$ac_exeext
5902 if { (eval echo "$as_me:5902: \"$ac_link\"") >&5
5903   (eval $ac_link) 2>&5
5904   ac_status=$?
5905   echo "$as_me:5905: \$? = $ac_status" >&5
5906   (exit $ac_status); } &&
5907          { ac_try='test -s conftest$ac_exeext'
5908   { (eval echo "$as_me:5908: \"$ac_try\"") >&5
5909   (eval $ac_try) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); }; }; then
5913   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
5914                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5915 else
5916   echo "$as_me: failed program was:" >&5
5917 cat conftest.$ac_ext >&5
5918 fi
5919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5920
5921                 # If we passed the link-test, but get a "not found" on a given library,
5922                 # this could be due to inept reconfiguration of gcc to make it only
5923                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
5924                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
5925                 # /usr/local libraries.
5926                 if test -n "$cf_rpath_oops"
5927                 then
5928                         for cf_rpath_src in $cf_rpath_oops
5929                         do
5930                                 for cf_rpath_dir in \
5931                                         /usr/local \
5932                                         /usr/pkg \
5933                                         /opt/sfw
5934                                 do
5935                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
5936                                         then
5937                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
5938
5939 echo "${as_me:-configure}:5939: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
5940
5941                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
5942                                                 break
5943                                         fi
5944                                 done
5945                         done
5946                 fi
5947         fi
5948
5949         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5950
5951 echo "${as_me:-configure}:5951: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5952
5953 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5954
5955 echo "${as_me:-configure}:5955: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5956
5957 cf_rpath_dst=
5958 for cf_rpath_src in $LDFLAGS
5959 do
5960         case $cf_rpath_src in #(vi
5961         -L*) #(vi
5962
5963                 # check if this refers to a directory which we will ignore
5964                 cf_rpath_skip=no
5965                 if test -n "$cf_rpath_list"
5966                 then
5967                         for cf_rpath_item in $cf_rpath_list
5968                         do
5969                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5970                                 then
5971                                         cf_rpath_skip=yes
5972                                         break
5973                                 fi
5974                         done
5975                 fi
5976
5977                 if test "$cf_rpath_skip" = no
5978                 then
5979                         # transform the option
5980                         if test "$LD_RPATH_OPT" = "-R " ; then
5981                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5982                         else
5983                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5984                         fi
5985
5986                         # if we have not already added this, add it now
5987                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5988                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5989                         then
5990                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5991
5992 echo "${as_me:-configure}:5992: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5993
5994                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5995                         fi
5996                 fi
5997                 ;;
5998         esac
5999         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6000 done
6001 LDFLAGS=$cf_rpath_dst
6002
6003 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6004
6005 echo "${as_me:-configure}:6005: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6006
6007 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6008
6009 echo "${as_me:-configure}:6009: testing ...checking LIBS $LIBS ..." 1>&5
6010
6011 cf_rpath_dst=
6012 for cf_rpath_src in $LIBS
6013 do
6014         case $cf_rpath_src in #(vi
6015         -L*) #(vi
6016
6017                 # check if this refers to a directory which we will ignore
6018                 cf_rpath_skip=no
6019                 if test -n "$cf_rpath_list"
6020                 then
6021                         for cf_rpath_item in $cf_rpath_list
6022                         do
6023                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6024                                 then
6025                                         cf_rpath_skip=yes
6026                                         break
6027                                 fi
6028                         done
6029                 fi
6030
6031                 if test "$cf_rpath_skip" = no
6032                 then
6033                         # transform the option
6034                         if test "$LD_RPATH_OPT" = "-R " ; then
6035                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6036                         else
6037                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6038                         fi
6039
6040                         # if we have not already added this, add it now
6041                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6042                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6043                         then
6044                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6045
6046 echo "${as_me:-configure}:6046: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6047
6048                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6049                         fi
6050                 fi
6051                 ;;
6052         esac
6053         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6054 done
6055 LIBS=$cf_rpath_dst
6056
6057 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6058
6059 echo "${as_me:-configure}:6059: testing ...checked LIBS $LIBS ..." 1>&5
6060
6061         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6062
6063 echo "${as_me:-configure}:6063: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6064
6065 fi
6066
6067 fi
6068
6069 fi
6070
6071 ###############################################################################
6072
6073 ###     use option --disable-overwrite to leave out the link to -lcurses
6074 echo "$as_me:6074: checking if you wish to install ncurses overwriting curses" >&5
6075 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6076
6077 # Check whether --enable-overwrite or --disable-overwrite was given.
6078 if test "${enable_overwrite+set}" = set; then
6079   enableval="$enable_overwrite"
6080   with_overwrite=$enableval
6081 else
6082   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6083 fi;
6084 echo "$as_me:6084: result: $with_overwrite" >&5
6085 echo "${ECHO_T}$with_overwrite" >&6
6086
6087 echo "$as_me:6087: checking if external terminfo-database is used" >&5
6088 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6089
6090 # Check whether --enable-database or --disable-database was given.
6091 if test "${enable_database+set}" = set; then
6092   enableval="$enable_database"
6093   use_database=$enableval
6094 else
6095   use_database=yes
6096 fi;
6097 echo "$as_me:6097: result: $use_database" >&5
6098 echo "${ECHO_T}$use_database" >&6
6099
6100 case $host_os in #(vi
6101 os2*) #(vi
6102         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6103         ;;
6104 *) #(vi
6105         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6106         ;;
6107 esac
6108
6109 if test "$use_database" != no ; then
6110
6111 cat >>confdefs.h <<\EOF
6112 #define USE_DATABASE 1
6113 EOF
6114
6115         echo "$as_me:6115: checking which terminfo source-file will be installed" >&5
6116 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6117
6118 # Check whether --with-database or --without-database was given.
6119 if test "${with_database+set}" = set; then
6120   withval="$with_database"
6121   TERMINFO_SRC=$withval
6122 fi;
6123         echo "$as_me:6123: result: $TERMINFO_SRC" >&5
6124 echo "${ECHO_T}$TERMINFO_SRC" >&6
6125
6126         echo "$as_me:6126: checking whether to use hashed database instead of directory/tree" >&5
6127 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6128
6129 # Check whether --with-hashed-db or --without-hashed-db was given.
6130 if test "${with_hashed_db+set}" = set; then
6131   withval="$with_hashed_db"
6132
6133 else
6134   with_hashed_db=no
6135 fi;
6136         echo "$as_me:6136: result: $with_hashed_db" >&5
6137 echo "${ECHO_T}$with_hashed_db" >&6
6138 else
6139         with_hashed_db=no
6140 fi
6141
6142 echo "$as_me:6142: checking for list of fallback descriptions" >&5
6143 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6144
6145 # Check whether --with-fallbacks or --without-fallbacks was given.
6146 if test "${with_fallbacks+set}" = set; then
6147   withval="$with_fallbacks"
6148   with_fallback=$withval
6149 else
6150   with_fallback=
6151 fi;
6152 echo "$as_me:6152: result: $with_fallback" >&5
6153 echo "${ECHO_T}$with_fallback" >&6
6154 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6155
6156 echo "$as_me:6156: checking if you want modern xterm or antique" >&5
6157 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6158
6159 # Check whether --with-xterm-new or --without-xterm-new was given.
6160 if test "${with_xterm_new+set}" = set; then
6161   withval="$with_xterm_new"
6162   with_xterm_new=$withval
6163 else
6164   with_xterm_new=yes
6165 fi;
6166 case $with_xterm_new in
6167 no)     with_xterm_new=xterm-old;;
6168 *)      with_xterm_new=xterm-new;;
6169 esac
6170 echo "$as_me:6170: result: $with_xterm_new" >&5
6171 echo "${ECHO_T}$with_xterm_new" >&6
6172 WHICH_XTERM=$with_xterm_new
6173
6174 echo "$as_me:6174: checking if xterm backspace sends BS or DEL" >&5
6175 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6176
6177 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6178 if test "${with_xterm_kbs+set}" = set; then
6179   withval="$with_xterm_kbs"
6180   with_xterm_kbs=$withval
6181 else
6182   with_xterm_kbs=BS
6183 fi;
6184 case x$with_xterm_kbs in
6185 xyes|xno|xBS|xbs|x8)
6186         with_xterm_kbs=BS
6187         ;;
6188 xDEL|xdel|x127)
6189         with_xterm_kbs=DEL
6190         ;;
6191 *)
6192         with_xterm_kbs=$withval
6193         ;;
6194 esac
6195 echo "$as_me:6195: result: $with_xterm_kbs" >&5
6196 echo "${ECHO_T}$with_xterm_kbs" >&6
6197 XTERM_KBS=$with_xterm_kbs
6198
6199 MAKE_TERMINFO=
6200 if test "$use_database" = no ; then
6201         TERMINFO="${datadir}/terminfo"
6202         MAKE_TERMINFO="#"
6203 else
6204
6205 echo "$as_me:6205: checking for list of terminfo directories" >&5
6206 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6207
6208 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6209 if test "${with_terminfo_dirs+set}" = set; then
6210   withval="$with_terminfo_dirs"
6211
6212 else
6213   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6214 fi;
6215 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6216 cf_dst_path=
6217 for cf_src_path in $withval
6218 do
6219
6220 if test "x$prefix" != xNONE; then
6221   cf_path_syntax="$prefix"
6222 else
6223   cf_path_syntax="$ac_default_prefix"
6224 fi
6225
6226 case ".$cf_src_path" in #(vi
6227 .\$\(*\)*|.\'*\'*) #(vi
6228   ;;
6229 ..|./*|.\\*) #(vi
6230   ;;
6231 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6232   ;;
6233 .\${*prefix}*|.\${*dir}*) #(vi
6234   eval cf_src_path="$cf_src_path"
6235   case ".$cf_src_path" in #(vi
6236   .NONE/*)
6237     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6238     ;;
6239   esac
6240   ;; #(vi
6241 .no|.NONE/*)
6242   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6243   ;;
6244 *)
6245   { { echo "$as_me:6245: error: expected a pathname, not \"$cf_src_path\"" >&5
6246 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6247    { (exit 1); exit 1; }; }
6248   ;;
6249 esac
6250
6251   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6252   cf_dst_path="${cf_dst_path}${cf_src_path}"
6253 done
6254 IFS="$ac_save_ifs"
6255
6256 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6257 # so we have to check/work around.  We do prefer the result of "eval"...
6258 eval cf_dst_eval="$cf_dst_path"
6259 case "x$cf_dst_eval" in #(vi
6260 xNONE*) #(vi
6261         TERMINFO_DIRS=$cf_dst_path
6262         ;;
6263 *)
6264         TERMINFO_DIRS="$cf_dst_eval"
6265         ;;
6266 esac
6267
6268 echo "$as_me:6268: result: $TERMINFO_DIRS" >&5
6269 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6270 test -n "$TERMINFO_DIRS" &&
6271 cat >>confdefs.h <<EOF
6272 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6273 EOF
6274
6275 echo "$as_me:6275: checking for default terminfo directory" >&5
6276 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6277
6278 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6279 if test "${with_default_terminfo_dir+set}" = set; then
6280   withval="$with_default_terminfo_dir"
6281
6282 else
6283   withval="${TERMINFO:-${datadir}/terminfo}"
6284 fi; if test -n "${datadir}/terminfo" ; then
6285
6286 if test "x$prefix" != xNONE; then
6287   cf_path_syntax="$prefix"
6288 else
6289   cf_path_syntax="$ac_default_prefix"
6290 fi
6291
6292 case ".$withval" in #(vi
6293 .\$\(*\)*|.\'*\'*) #(vi
6294   ;;
6295 ..|./*|.\\*) #(vi
6296   ;;
6297 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6298   ;;
6299 .\${*prefix}*|.\${*dir}*) #(vi
6300   eval withval="$withval"
6301   case ".$withval" in #(vi
6302   .NONE/*)
6303     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6304     ;;
6305   esac
6306   ;; #(vi
6307 .no|.NONE/*)
6308   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6309   ;;
6310 *)
6311   { { echo "$as_me:6311: error: expected a pathname, not \"$withval\"" >&5
6312 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6313    { (exit 1); exit 1; }; }
6314   ;;
6315 esac
6316
6317 fi
6318 eval TERMINFO="$withval"
6319
6320 echo "$as_me:6320: result: $TERMINFO" >&5
6321 echo "${ECHO_T}$TERMINFO" >&6
6322
6323 cat >>confdefs.h <<EOF
6324 #define TERMINFO "$TERMINFO"
6325 EOF
6326
6327 fi
6328
6329 ###     use option --disable-big-core to make tic run on small machines
6330 ###     We need 4Mb, check if we can allocate 50% more than that.
6331 echo "$as_me:6331: checking if big-core option selected" >&5
6332 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6333
6334 # Check whether --enable-big-core or --disable-big-core was given.
6335 if test "${enable_big_core+set}" = set; then
6336   enableval="$enable_big_core"
6337   with_big_core=$enableval
6338 else
6339   if test "$cross_compiling" = yes; then
6340   with_big_core=no
6341 else
6342   cat >conftest.$ac_ext <<_ACEOF
6343 #line 6343 "configure"
6344 #include "confdefs.h"
6345
6346 #include <stdlib.h>
6347 #include <string.h>
6348 int main() {
6349         unsigned long n = 6000000L;
6350         char *s = malloc(n);
6351         if (s != 0)
6352                 s[0] = s[n-1] = 0;
6353         ${cf_cv_main_return:-return}(s == 0);
6354 }
6355 _ACEOF
6356 rm -f conftest$ac_exeext
6357 if { (eval echo "$as_me:6357: \"$ac_link\"") >&5
6358   (eval $ac_link) 2>&5
6359   ac_status=$?
6360   echo "$as_me:6360: \$? = $ac_status" >&5
6361   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6362   { (eval echo "$as_me:6362: \"$ac_try\"") >&5
6363   (eval $ac_try) 2>&5
6364   ac_status=$?
6365   echo "$as_me:6365: \$? = $ac_status" >&5
6366   (exit $ac_status); }; }; then
6367   with_big_core=yes
6368 else
6369   echo "$as_me: program exited with status $ac_status" >&5
6370 echo "$as_me: failed program was:" >&5
6371 cat conftest.$ac_ext >&5
6372 with_big_core=no
6373 fi
6374 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6375 fi
6376 fi;
6377 echo "$as_me:6377: result: $with_big_core" >&5
6378 echo "${ECHO_T}$with_big_core" >&6
6379 test "x$with_big_core" = "xyes" &&
6380 cat >>confdefs.h <<\EOF
6381 #define HAVE_BIG_CORE 1
6382 EOF
6383
6384 ### ISO C only guarantees 512-char strings, we have tables which load faster
6385 ### when constructed using "big" strings.  More than the C compiler, the awk
6386 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6387 echo "$as_me:6387: checking if big-strings option selected" >&5
6388 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6389
6390 # Check whether --enable-big-strings or --disable-big-strings was given.
6391 if test "${enable_big_strings+set}" = set; then
6392   enableval="$enable_big_strings"
6393   with_big_strings=$enableval
6394 else
6395
6396         case x$AWK in #(vi
6397         x)
6398                 eval with_big_strings=no
6399                 ;;
6400         *) #(vi
6401                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6402                         | $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
6403                         eval with_big_strings=yes
6404                 else
6405                         eval with_big_strings=no
6406                 fi
6407                 ;;
6408         esac
6409
6410 fi;
6411 echo "$as_me:6411: result: $with_big_strings" >&5
6412 echo "${ECHO_T}$with_big_strings" >&6
6413
6414 USE_BIG_STRINGS=0
6415 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6416
6417 ###     use option --enable-termcap to compile in the termcap fallback support
6418 echo "$as_me:6418: checking if you want termcap-fallback support" >&5
6419 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6420
6421 # Check whether --enable-termcap or --disable-termcap was given.
6422 if test "${enable_termcap+set}" = set; then
6423   enableval="$enable_termcap"
6424   with_termcap=$enableval
6425 else
6426   with_termcap=no
6427 fi;
6428 echo "$as_me:6428: result: $with_termcap" >&5
6429 echo "${ECHO_T}$with_termcap" >&6
6430
6431 if test "x$with_termcap" != "xyes" ; then
6432         if test "$use_database" = no ; then
6433                 if test -z "$with_fallback" ; then
6434                         { { echo "$as_me:6434: error: You have disabled the database w/o specifying fallbacks" >&5
6435 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6436    { (exit 1); exit 1; }; }
6437                 fi
6438         fi
6439
6440 cat >>confdefs.h <<\EOF
6441 #define PURE_TERMINFO 1
6442 EOF
6443
6444 else
6445
6446 if test "$with_ticlib" != no ; then
6447         { { echo "$as_me:6447: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6448 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6449    { (exit 1); exit 1; }; }
6450 fi
6451
6452 cat >>confdefs.h <<\EOF
6453 #define USE_TERMCAP 1
6454 EOF
6455
6456 echo "$as_me:6456: checking for list of termcap files" >&5
6457 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6458
6459 # Check whether --with-termpath or --without-termpath was given.
6460 if test "${with_termpath+set}" = set; then
6461   withval="$with_termpath"
6462
6463 else
6464   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6465 fi;
6466 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6467 cf_dst_path=
6468 for cf_src_path in $withval
6469 do
6470
6471 if test "x$prefix" != xNONE; then
6472   cf_path_syntax="$prefix"
6473 else
6474   cf_path_syntax="$ac_default_prefix"
6475 fi
6476
6477 case ".$cf_src_path" in #(vi
6478 .\$\(*\)*|.\'*\'*) #(vi
6479   ;;
6480 ..|./*|.\\*) #(vi
6481   ;;
6482 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6483   ;;
6484 .\${*prefix}*|.\${*dir}*) #(vi
6485   eval cf_src_path="$cf_src_path"
6486   case ".$cf_src_path" in #(vi
6487   .NONE/*)
6488     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6489     ;;
6490   esac
6491   ;; #(vi
6492 .no|.NONE/*)
6493   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6494   ;;
6495 *)
6496   { { echo "$as_me:6496: error: expected a pathname, not \"$cf_src_path\"" >&5
6497 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6498    { (exit 1); exit 1; }; }
6499   ;;
6500 esac
6501
6502   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6503   cf_dst_path="${cf_dst_path}${cf_src_path}"
6504 done
6505 IFS="$ac_save_ifs"
6506
6507 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6508 # so we have to check/work around.  We do prefer the result of "eval"...
6509 eval cf_dst_eval="$cf_dst_path"
6510 case "x$cf_dst_eval" in #(vi
6511 xNONE*) #(vi
6512         TERMPATH=$cf_dst_path
6513         ;;
6514 *)
6515         TERMPATH="$cf_dst_eval"
6516         ;;
6517 esac
6518
6519 echo "$as_me:6519: result: $TERMPATH" >&5
6520 echo "${ECHO_T}$TERMPATH" >&6
6521 test -n "$TERMPATH" &&
6522 cat >>confdefs.h <<EOF
6523 #define TERMPATH "$TERMPATH"
6524 EOF
6525
6526 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6527 echo "$as_me:6527: checking if fast termcap-loader is needed" >&5
6528 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6529
6530 # Check whether --enable-getcap or --disable-getcap was given.
6531 if test "${enable_getcap+set}" = set; then
6532   enableval="$enable_getcap"
6533   with_getcap=$enableval
6534 else
6535   with_getcap=no
6536 fi;
6537 echo "$as_me:6537: result: $with_getcap" >&5
6538 echo "${ECHO_T}$with_getcap" >&6
6539 test "x$with_getcap" = "xyes" &&
6540 cat >>confdefs.h <<\EOF
6541 #define USE_GETCAP 1
6542 EOF
6543
6544 echo "$as_me:6544: checking if translated termcaps will be cached in ~/.terminfo" >&5
6545 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6546
6547 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6548 if test "${enable_getcap_cache+set}" = set; then
6549   enableval="$enable_getcap_cache"
6550   with_getcap_cache=$enableval
6551 else
6552   with_getcap_cache=no
6553 fi;
6554 echo "$as_me:6554: result: $with_getcap_cache" >&5
6555 echo "${ECHO_T}$with_getcap_cache" >&6
6556 test "x$with_getcap_cache" = "xyes" &&
6557 cat >>confdefs.h <<\EOF
6558 #define USE_GETCAP_CACHE 1
6559 EOF
6560
6561 fi
6562
6563 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6564 echo "$as_me:6564: checking if ~/.terminfo is wanted" >&5
6565 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6566
6567 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6568 if test "${enable_home_terminfo+set}" = set; then
6569   enableval="$enable_home_terminfo"
6570   with_home_terminfo=$enableval
6571 else
6572   with_home_terminfo=yes
6573 fi;
6574 echo "$as_me:6574: result: $with_home_terminfo" >&5
6575 echo "${ECHO_T}$with_home_terminfo" >&6
6576 test "x$with_home_terminfo" = "xyes" &&
6577 cat >>confdefs.h <<\EOF
6578 #define USE_HOME_TERMINFO 1
6579 EOF
6580
6581 echo "$as_me:6581: checking if you want to use restricted environment when running as root" >&5
6582 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6583
6584 # Check whether --enable-root-environ or --disable-root-environ was given.
6585 if test "${enable_root_environ+set}" = set; then
6586   enableval="$enable_root_environ"
6587   with_root_environ=$enableval
6588 else
6589   with_root_environ=yes
6590 fi;
6591 echo "$as_me:6591: result: $with_root_environ" >&5
6592 echo "${ECHO_T}$with_root_environ" >&6
6593 test "x$with_root_environ" = xyes &&
6594 cat >>confdefs.h <<\EOF
6595 #define USE_ROOT_ENVIRON 1
6596 EOF
6597
6598 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6599 ###   to reduce storage requirements for the terminfo database.
6600
6601 for ac_func in \
6602         remove \
6603         unlink
6604 do
6605 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6606 echo "$as_me:6606: checking for $ac_func" >&5
6607 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6608 if eval "test \"\${$as_ac_var+set}\" = set"; then
6609   echo $ECHO_N "(cached) $ECHO_C" >&6
6610 else
6611   cat >conftest.$ac_ext <<_ACEOF
6612 #line 6612 "configure"
6613 #include "confdefs.h"
6614 /* System header to define __stub macros and hopefully few prototypes,
6615     which can conflict with char $ac_func (); below.  */
6616 #include <assert.h>
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 #ifdef __cplusplus
6619 extern "C"
6620 #endif
6621 /* We use char because int might match the return type of a gcc2
6622    builtin and then its argument prototype would still apply.  */
6623 char $ac_func ();
6624 char (*f) ();
6625
6626 int
6627 main ()
6628 {
6629 /* The GNU C library defines this for functions which it implements
6630     to always fail with ENOSYS.  Some functions are actually named
6631     something starting with __ and the normal name is an alias.  */
6632 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6633 choke me
6634 #else
6635 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6636 #endif
6637
6638   ;
6639   return 0;
6640 }
6641 _ACEOF
6642 rm -f conftest.$ac_objext conftest$ac_exeext
6643 if { (eval echo "$as_me:6643: \"$ac_link\"") >&5
6644   (eval $ac_link) 2>&5
6645   ac_status=$?
6646   echo "$as_me:6646: \$? = $ac_status" >&5
6647   (exit $ac_status); } &&
6648          { ac_try='test -s conftest$ac_exeext'
6649   { (eval echo "$as_me:6649: \"$ac_try\"") >&5
6650   (eval $ac_try) 2>&5
6651   ac_status=$?
6652   echo "$as_me:6652: \$? = $ac_status" >&5
6653   (exit $ac_status); }; }; then
6654   eval "$as_ac_var=yes"
6655 else
6656   echo "$as_me: failed program was:" >&5
6657 cat conftest.$ac_ext >&5
6658 eval "$as_ac_var=no"
6659 fi
6660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6661 fi
6662 echo "$as_me:6662: result: `eval echo '${'$as_ac_var'}'`" >&5
6663 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6664 if test `eval echo '${'$as_ac_var'}'` = yes; then
6665   cat >>confdefs.h <<EOF
6666 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6667 EOF
6668
6669 fi
6670 done
6671
6672 if test "$cross_compiling" = yes ; then
6673
6674 for ac_func in \
6675                 link \
6676                 symlink
6677 do
6678 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6679 echo "$as_me:6679: checking for $ac_func" >&5
6680 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6681 if eval "test \"\${$as_ac_var+set}\" = set"; then
6682   echo $ECHO_N "(cached) $ECHO_C" >&6
6683 else
6684   cat >conftest.$ac_ext <<_ACEOF
6685 #line 6685 "configure"
6686 #include "confdefs.h"
6687 /* System header to define __stub macros and hopefully few prototypes,
6688     which can conflict with char $ac_func (); below.  */
6689 #include <assert.h>
6690 /* Override any gcc2 internal prototype to avoid an error.  */
6691 #ifdef __cplusplus
6692 extern "C"
6693 #endif
6694 /* We use char because int might match the return type of a gcc2
6695    builtin and then its argument prototype would still apply.  */
6696 char $ac_func ();
6697 char (*f) ();
6698
6699 int
6700 main ()
6701 {
6702 /* The GNU C library defines this for functions which it implements
6703     to always fail with ENOSYS.  Some functions are actually named
6704     something starting with __ and the normal name is an alias.  */
6705 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6706 choke me
6707 #else
6708 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6709 #endif
6710
6711   ;
6712   return 0;
6713 }
6714 _ACEOF
6715 rm -f conftest.$ac_objext conftest$ac_exeext
6716 if { (eval echo "$as_me:6716: \"$ac_link\"") >&5
6717   (eval $ac_link) 2>&5
6718   ac_status=$?
6719   echo "$as_me:6719: \$? = $ac_status" >&5
6720   (exit $ac_status); } &&
6721          { ac_try='test -s conftest$ac_exeext'
6722   { (eval echo "$as_me:6722: \"$ac_try\"") >&5
6723   (eval $ac_try) 2>&5
6724   ac_status=$?
6725   echo "$as_me:6725: \$? = $ac_status" >&5
6726   (exit $ac_status); }; }; then
6727   eval "$as_ac_var=yes"
6728 else
6729   echo "$as_me: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6731 eval "$as_ac_var=no"
6732 fi
6733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6734 fi
6735 echo "$as_me:6735: result: `eval echo '${'$as_ac_var'}'`" >&5
6736 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6737 if test `eval echo '${'$as_ac_var'}'` = yes; then
6738   cat >>confdefs.h <<EOF
6739 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6740 EOF
6741
6742 fi
6743 done
6744
6745 else
6746         echo "$as_me:6746: checking if link/symlink functions work" >&5
6747 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6748 if test "${cf_cv_link_funcs+set}" = set; then
6749   echo $ECHO_N "(cached) $ECHO_C" >&6
6750 else
6751
6752                 cf_cv_link_funcs=
6753                 for cf_func in link symlink ; do
6754                         if test "$cross_compiling" = yes; then
6755
6756                         eval 'ac_cv_func_'$cf_func'=error'
6757 else
6758   cat >conftest.$ac_ext <<_ACEOF
6759 #line 6759 "configure"
6760 #include "confdefs.h"
6761
6762 #include <sys/types.h>
6763 #include <sys/stat.h>
6764 #ifdef HAVE_UNISTD_H
6765 #include <unistd.h>
6766 #endif
6767 int main()
6768 {
6769         int fail = 0;
6770         char *src = "config.log";
6771         char *dst = "conftest.chk";
6772         struct stat src_sb;
6773         struct stat dst_sb;
6774
6775         stat(src, &src_sb);
6776         fail = ($cf_func("config.log", "conftest.chk") < 0)
6777             || (stat(dst, &dst_sb) < 0)
6778             || (dst_sb.st_mtime != src_sb.st_mtime);
6779 #ifdef HAVE_UNLINK
6780         unlink(dst);
6781 #else
6782         remove(dst);
6783 #endif
6784         ${cf_cv_main_return:-return} (fail);
6785 }
6786
6787 _ACEOF
6788 rm -f conftest$ac_exeext
6789 if { (eval echo "$as_me:6789: \"$ac_link\"") >&5
6790   (eval $ac_link) 2>&5
6791   ac_status=$?
6792   echo "$as_me:6792: \$? = $ac_status" >&5
6793   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6794   { (eval echo "$as_me:6794: \"$ac_try\"") >&5
6795   (eval $ac_try) 2>&5
6796   ac_status=$?
6797   echo "$as_me:6797: \$? = $ac_status" >&5
6798   (exit $ac_status); }; }; then
6799
6800                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6801                         eval 'ac_cv_func_'$cf_func'=yes'
6802 else
6803   echo "$as_me: program exited with status $ac_status" >&5
6804 echo "$as_me: failed program was:" >&5
6805 cat conftest.$ac_ext >&5
6806
6807                         eval 'ac_cv_func_'$cf_func'=no'
6808 fi
6809 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6810 fi
6811                 done
6812                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6813
6814 fi
6815 echo "$as_me:6815: result: $cf_cv_link_funcs" >&5
6816 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6817         test "$ac_cv_func_link"    = yes &&
6818 cat >>confdefs.h <<\EOF
6819 #define HAVE_LINK 1
6820 EOF
6821
6822         test "$ac_cv_func_symlink" = yes &&
6823 cat >>confdefs.h <<\EOF
6824 #define HAVE_SYMLINK 1
6825 EOF
6826
6827 fi
6828
6829 with_links=no
6830 with_symlinks=no
6831
6832 # soft links (symbolic links) are useful for some systems where hard links do
6833 # not work, or to make it simpler to copy terminfo trees around.
6834 if test "x$ac_cv_func_symlink" = xyes ; then
6835     echo "$as_me:6835: checking if tic should use symbolic links" >&5
6836 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6837
6838 # Check whether --enable-symlinks or --disable-symlinks was given.
6839 if test "${enable_symlinks+set}" = set; then
6840   enableval="$enable_symlinks"
6841   with_symlinks=$enableval
6842 else
6843   with_symlinks=no
6844 fi;
6845     echo "$as_me:6845: result: $with_symlinks" >&5
6846 echo "${ECHO_T}$with_symlinks" >&6
6847 fi
6848
6849 # If we have hard links and did not choose to use soft links instead, there is
6850 # no reason to make this choice optional - use the hard links.
6851 if test "$with_symlinks" = no ; then
6852     echo "$as_me:6852: checking if tic should use hard links" >&5
6853 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6854     if test "x$ac_cv_func_link" = xyes ; then
6855         with_links=yes
6856     else
6857         with_links=no
6858     fi
6859     echo "$as_me:6859: result: $with_links" >&5
6860 echo "${ECHO_T}$with_links" >&6
6861 fi
6862
6863 test "x$with_links" = xyes &&
6864 cat >>confdefs.h <<\EOF
6865 #define USE_LINKS 1
6866 EOF
6867
6868 test "x$with_symlinks" = xyes &&
6869 cat >>confdefs.h <<\EOF
6870 #define USE_SYMLINKS 1
6871 EOF
6872
6873 ###   use option --enable-broken-linker to force on use of broken-linker support
6874 echo "$as_me:6874: checking if you want broken-linker support code" >&5
6875 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6876
6877 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6878 if test "${enable_broken_linker+set}" = set; then
6879   enableval="$enable_broken_linker"
6880   with_broken_linker=$enableval
6881 else
6882   with_broken_linker=${BROKEN_LINKER:-no}
6883 fi;
6884 echo "$as_me:6884: result: $with_broken_linker" >&5
6885 echo "${ECHO_T}$with_broken_linker" >&6
6886
6887 BROKEN_LINKER=0
6888 if test "x$with_broken_linker" = xyes ; then
6889
6890 cat >>confdefs.h <<\EOF
6891 #define BROKEN_LINKER 1
6892 EOF
6893
6894         BROKEN_LINKER=1
6895 elif test "$DFT_LWR_MODEL" = shared ; then
6896         case $cf_cv_system_name in #(vi
6897         cygwin*)
6898
6899 cat >>confdefs.h <<\EOF
6900 #define BROKEN_LINKER 1
6901 EOF
6902
6903                 BROKEN_LINKER=1
6904                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6905
6906 echo "${as_me:-configure}:6906: testing cygwin linker is broken anyway ..." 1>&5
6907
6908                 ;;
6909         esac
6910 fi
6911
6912 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6913 echo "$as_me:6913: checking if tputs should process BSD-style prefix padding" >&5
6914 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6915
6916 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6917 if test "${enable_bsdpad+set}" = set; then
6918   enableval="$enable_bsdpad"
6919   with_bsdpad=$enableval
6920 else
6921   with_bsdpad=no
6922 fi;
6923 echo "$as_me:6923: result: $with_bsdpad" >&5
6924 echo "${ECHO_T}$with_bsdpad" >&6
6925 test "x$with_bsdpad" = xyes &&
6926 cat >>confdefs.h <<\EOF
6927 #define BSD_TPUTS 1
6928 EOF
6929
6930 ###   use option --enable-widec to turn on use of wide-character support
6931 NCURSES_CH_T=chtype
6932 NCURSES_LIBUTF8=0
6933
6934 NEED_WCHAR_H=0
6935 NCURSES_MBSTATE_T=0
6936 NCURSES_WCHAR_T=0
6937 NCURSES_WINT_T=0
6938
6939 # Check to define _XOPEN_SOURCE "automatically"
6940
6941 cf_XOPEN_SOURCE=500
6942 cf_POSIX_C_SOURCE=199506L
6943 cf_xopen_source=
6944
6945 case $host_os in #(vi
6946 aix[4-7]*) #(vi
6947         cf_xopen_source="-D_ALL_SOURCE"
6948         ;;
6949 cygwin) #(vi
6950         cf_XOPEN_SOURCE=600
6951         ;;
6952 darwin[0-8].*) #(vi
6953         cf_xopen_source="-D_APPLE_C_SOURCE"
6954         ;;
6955 darwin*) #(vi
6956         cf_xopen_source="-D_DARWIN_C_SOURCE"
6957         cf_XOPEN_SOURCE=
6958         ;;
6959 freebsd*|dragonfly*) #(vi
6960         # 5.x headers associate
6961         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6962         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6963         cf_POSIX_C_SOURCE=200112L
6964         cf_XOPEN_SOURCE=600
6965         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6966         ;;
6967 hpux11*) #(vi
6968         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6969         ;;
6970 hpux*) #(vi
6971         cf_xopen_source="-D_HPUX_SOURCE"
6972         ;;
6973 irix[56].*) #(vi
6974         cf_xopen_source="-D_SGI_SOURCE"
6975         cf_XOPEN_SOURCE=
6976         ;;
6977 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6978
6979 echo "$as_me:6979: checking if we must define _GNU_SOURCE" >&5
6980 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6981 if test "${cf_cv_gnu_source+set}" = set; then
6982   echo $ECHO_N "(cached) $ECHO_C" >&6
6983 else
6984
6985 cat >conftest.$ac_ext <<_ACEOF
6986 #line 6986 "configure"
6987 #include "confdefs.h"
6988 #include <sys/types.h>
6989 int
6990 main ()
6991 {
6992
6993 #ifndef _XOPEN_SOURCE
6994 make an error
6995 #endif
6996   ;
6997   return 0;
6998 }
6999 _ACEOF
7000 rm -f conftest.$ac_objext
7001 if { (eval echo "$as_me:7001: \"$ac_compile\"") >&5
7002   (eval $ac_compile) 2>&5
7003   ac_status=$?
7004   echo "$as_me:7004: \$? = $ac_status" >&5
7005   (exit $ac_status); } &&
7006          { ac_try='test -s conftest.$ac_objext'
7007   { (eval echo "$as_me:7007: \"$ac_try\"") >&5
7008   (eval $ac_try) 2>&5
7009   ac_status=$?
7010   echo "$as_me:7010: \$? = $ac_status" >&5
7011   (exit $ac_status); }; }; then
7012   cf_cv_gnu_source=no
7013 else
7014   echo "$as_me: failed program was:" >&5
7015 cat conftest.$ac_ext >&5
7016 cf_save="$CPPFLAGS"
7017          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7018          cat >conftest.$ac_ext <<_ACEOF
7019 #line 7019 "configure"
7020 #include "confdefs.h"
7021 #include <sys/types.h>
7022 int
7023 main ()
7024 {
7025
7026 #ifdef _XOPEN_SOURCE
7027 make an error
7028 #endif
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext
7034 if { (eval echo "$as_me:7034: \"$ac_compile\"") >&5
7035   (eval $ac_compile) 2>&5
7036   ac_status=$?
7037   echo "$as_me:7037: \$? = $ac_status" >&5
7038   (exit $ac_status); } &&
7039          { ac_try='test -s conftest.$ac_objext'
7040   { (eval echo "$as_me:7040: \"$ac_try\"") >&5
7041   (eval $ac_try) 2>&5
7042   ac_status=$?
7043   echo "$as_me:7043: \$? = $ac_status" >&5
7044   (exit $ac_status); }; }; then
7045   cf_cv_gnu_source=no
7046 else
7047   echo "$as_me: failed program was:" >&5
7048 cat conftest.$ac_ext >&5
7049 cf_cv_gnu_source=yes
7050 fi
7051 rm -f conftest.$ac_objext conftest.$ac_ext
7052         CPPFLAGS="$cf_save"
7053
7054 fi
7055 rm -f conftest.$ac_objext conftest.$ac_ext
7056
7057 fi
7058 echo "$as_me:7058: result: $cf_cv_gnu_source" >&5
7059 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7060 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7061
7062         ;;
7063 mirbsd*) #(vi
7064         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7065         cf_XOPEN_SOURCE=
7066
7067 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7068
7069 cf_save_CFLAGS="$CFLAGS"
7070 cf_save_CPPFLAGS="$CPPFLAGS"
7071
7072 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7073         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7074                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7075
7076 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7077         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7078                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7079
7080 echo "$as_me:7080: checking if we should define _POSIX_C_SOURCE" >&5
7081 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7082 if test "${cf_cv_posix_c_source+set}" = set; then
7083   echo $ECHO_N "(cached) $ECHO_C" >&6
7084 else
7085
7086 echo "${as_me:-configure}:7086: testing if the symbol is already defined go no further ..." 1>&5
7087
7088         cat >conftest.$ac_ext <<_ACEOF
7089 #line 7089 "configure"
7090 #include "confdefs.h"
7091 #include <sys/types.h>
7092 int
7093 main ()
7094 {
7095
7096 #ifndef _POSIX_C_SOURCE
7097 make an error
7098 #endif
7099   ;
7100   return 0;
7101 }
7102 _ACEOF
7103 rm -f conftest.$ac_objext
7104 if { (eval echo "$as_me:7104: \"$ac_compile\"") >&5
7105   (eval $ac_compile) 2>&5
7106   ac_status=$?
7107   echo "$as_me:7107: \$? = $ac_status" >&5
7108   (exit $ac_status); } &&
7109          { ac_try='test -s conftest.$ac_objext'
7110   { (eval echo "$as_me:7110: \"$ac_try\"") >&5
7111   (eval $ac_try) 2>&5
7112   ac_status=$?
7113   echo "$as_me:7113: \$? = $ac_status" >&5
7114   (exit $ac_status); }; }; then
7115   cf_cv_posix_c_source=no
7116 else
7117   echo "$as_me: failed program was:" >&5
7118 cat conftest.$ac_ext >&5
7119 cf_want_posix_source=no
7120          case .$cf_POSIX_C_SOURCE in #(vi
7121          .[12]??*) #(vi
7122                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7123                 ;;
7124          .2) #(vi
7125                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7126                 cf_want_posix_source=yes
7127                 ;;
7128          .*)
7129                 cf_want_posix_source=yes
7130                 ;;
7131          esac
7132          if test "$cf_want_posix_source" = yes ; then
7133                 cat >conftest.$ac_ext <<_ACEOF
7134 #line 7134 "configure"
7135 #include "confdefs.h"
7136 #include <sys/types.h>
7137 int
7138 main ()
7139 {
7140
7141 #ifdef _POSIX_SOURCE
7142 make an error
7143 #endif
7144   ;
7145   return 0;
7146 }
7147 _ACEOF
7148 rm -f conftest.$ac_objext
7149 if { (eval echo "$as_me:7149: \"$ac_compile\"") >&5
7150   (eval $ac_compile) 2>&5
7151   ac_status=$?
7152   echo "$as_me:7152: \$? = $ac_status" >&5
7153   (exit $ac_status); } &&
7154          { ac_try='test -s conftest.$ac_objext'
7155   { (eval echo "$as_me:7155: \"$ac_try\"") >&5
7156   (eval $ac_try) 2>&5
7157   ac_status=$?
7158   echo "$as_me:7158: \$? = $ac_status" >&5
7159   (exit $ac_status); }; }; then
7160   :
7161 else
7162   echo "$as_me: failed program was:" >&5
7163 cat conftest.$ac_ext >&5
7164 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7165 fi
7166 rm -f conftest.$ac_objext conftest.$ac_ext
7167          fi
7168
7169 echo "${as_me:-configure}:7169: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7170
7171          CFLAGS="$cf_trim_CFLAGS"
7172          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7173
7174 echo "${as_me:-configure}:7174: testing if the second compile does not leave our definition intact error ..." 1>&5
7175
7176          cat >conftest.$ac_ext <<_ACEOF
7177 #line 7177 "configure"
7178 #include "confdefs.h"
7179 #include <sys/types.h>
7180 int
7181 main ()
7182 {
7183
7184 #ifndef _POSIX_C_SOURCE
7185 make an error
7186 #endif
7187   ;
7188   return 0;
7189 }
7190 _ACEOF
7191 rm -f conftest.$ac_objext
7192 if { (eval echo "$as_me:7192: \"$ac_compile\"") >&5
7193   (eval $ac_compile) 2>&5
7194   ac_status=$?
7195   echo "$as_me:7195: \$? = $ac_status" >&5
7196   (exit $ac_status); } &&
7197          { ac_try='test -s conftest.$ac_objext'
7198   { (eval echo "$as_me:7198: \"$ac_try\"") >&5
7199   (eval $ac_try) 2>&5
7200   ac_status=$?
7201   echo "$as_me:7201: \$? = $ac_status" >&5
7202   (exit $ac_status); }; }; then
7203   :
7204 else
7205   echo "$as_me: failed program was:" >&5
7206 cat conftest.$ac_ext >&5
7207 cf_cv_posix_c_source=no
7208 fi
7209 rm -f conftest.$ac_objext conftest.$ac_ext
7210          CFLAGS="$cf_save_CFLAGS"
7211          CPPFLAGS="$cf_save_CPPFLAGS"
7212
7213 fi
7214 rm -f conftest.$ac_objext conftest.$ac_ext
7215
7216 fi
7217 echo "$as_me:7217: result: $cf_cv_posix_c_source" >&5
7218 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7219
7220 if test "$cf_cv_posix_c_source" != no ; then
7221         CFLAGS="$cf_trim_CFLAGS"
7222         CPPFLAGS="$cf_trim_CPPFLAGS"
7223
7224 cf_fix_cppflags=no
7225 cf_new_cflags=
7226 cf_new_cppflags=
7227 cf_new_extra_cppflags=
7228
7229 for cf_add_cflags in $cf_cv_posix_c_source
7230 do
7231 case $cf_fix_cppflags in
7232 no)
7233         case $cf_add_cflags in #(vi
7234         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7235                 case $cf_add_cflags in
7236                 -D*)
7237                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7238
7239                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7240                                 && test -z "${cf_tst_cflags}" \
7241                                 && cf_fix_cppflags=yes
7242
7243                         if test $cf_fix_cppflags = yes ; then
7244                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7245                                 continue
7246                         elif test "${cf_tst_cflags}" = "\"'" ; then
7247                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7248                                 continue
7249                         fi
7250                         ;;
7251                 esac
7252                 case "$CPPFLAGS" in
7253                 *$cf_add_cflags) #(vi
7254                         ;;
7255                 *) #(vi
7256                         case $cf_add_cflags in #(vi
7257                         -D*)
7258                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7259
7260 CPPFLAGS=`echo "$CPPFLAGS" | \
7261         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7262                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7263
7264                                 ;;
7265                         esac
7266                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7267                         ;;
7268                 esac
7269                 ;;
7270         *)
7271                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7272                 ;;
7273         esac
7274         ;;
7275 yes)
7276         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7277
7278         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7279
7280         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7281                 && test -z "${cf_tst_cflags}" \
7282                 && cf_fix_cppflags=no
7283         ;;
7284 esac
7285 done
7286
7287 if test -n "$cf_new_cflags" ; then
7288
7289         CFLAGS="$CFLAGS $cf_new_cflags"
7290 fi
7291
7292 if test -n "$cf_new_cppflags" ; then
7293
7294         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7295 fi
7296
7297 if test -n "$cf_new_extra_cppflags" ; then
7298
7299         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7300 fi
7301
7302 fi
7303
7304         ;;
7305 netbsd*) #(vi
7306         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7307         ;;
7308 openbsd[4-9]*) #(vi
7309         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7310         cf_xopen_source="-D_BSD_SOURCE"
7311         cf_XOPEN_SOURCE=600
7312         ;;
7313 openbsd*) #(vi
7314         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7315         ;;
7316 osf[45]*) #(vi
7317         cf_xopen_source="-D_OSF_SOURCE"
7318         ;;
7319 nto-qnx*) #(vi
7320         cf_xopen_source="-D_QNX_SOURCE"
7321         ;;
7322 sco*) #(vi
7323         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7324         ;;
7325 solaris2.*) #(vi
7326         cf_xopen_source="-D__EXTENSIONS__"
7327         ;;
7328 *)
7329
7330 echo "$as_me:7330: checking if we should define _XOPEN_SOURCE" >&5
7331 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7332 if test "${cf_cv_xopen_source+set}" = set; then
7333   echo $ECHO_N "(cached) $ECHO_C" >&6
7334 else
7335
7336         cat >conftest.$ac_ext <<_ACEOF
7337 #line 7337 "configure"
7338 #include "confdefs.h"
7339
7340 #include <stdlib.h>
7341 #include <string.h>
7342 #include <sys/types.h>
7343
7344 int
7345 main ()
7346 {
7347
7348 #ifndef _XOPEN_SOURCE
7349 make an error
7350 #endif
7351   ;
7352   return 0;
7353 }
7354 _ACEOF
7355 rm -f conftest.$ac_objext
7356 if { (eval echo "$as_me:7356: \"$ac_compile\"") >&5
7357   (eval $ac_compile) 2>&5
7358   ac_status=$?
7359   echo "$as_me:7359: \$? = $ac_status" >&5
7360   (exit $ac_status); } &&
7361          { ac_try='test -s conftest.$ac_objext'
7362   { (eval echo "$as_me:7362: \"$ac_try\"") >&5
7363   (eval $ac_try) 2>&5
7364   ac_status=$?
7365   echo "$as_me:7365: \$? = $ac_status" >&5
7366   (exit $ac_status); }; }; then
7367   cf_cv_xopen_source=no
7368 else
7369   echo "$as_me: failed program was:" >&5
7370 cat conftest.$ac_ext >&5
7371 cf_save="$CPPFLAGS"
7372          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7373          cat >conftest.$ac_ext <<_ACEOF
7374 #line 7374 "configure"
7375 #include "confdefs.h"
7376
7377 #include <stdlib.h>
7378 #include <string.h>
7379 #include <sys/types.h>
7380
7381 int
7382 main ()
7383 {
7384
7385 #ifdef _XOPEN_SOURCE
7386 make an error
7387 #endif
7388   ;
7389   return 0;
7390 }
7391 _ACEOF
7392 rm -f conftest.$ac_objext
7393 if { (eval echo "$as_me:7393: \"$ac_compile\"") >&5
7394   (eval $ac_compile) 2>&5
7395   ac_status=$?
7396   echo "$as_me:7396: \$? = $ac_status" >&5
7397   (exit $ac_status); } &&
7398          { ac_try='test -s conftest.$ac_objext'
7399   { (eval echo "$as_me:7399: \"$ac_try\"") >&5
7400   (eval $ac_try) 2>&5
7401   ac_status=$?
7402   echo "$as_me:7402: \$? = $ac_status" >&5
7403   (exit $ac_status); }; }; then
7404   cf_cv_xopen_source=no
7405 else
7406   echo "$as_me: failed program was:" >&5
7407 cat conftest.$ac_ext >&5
7408 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7409 fi
7410 rm -f conftest.$ac_objext conftest.$ac_ext
7411         CPPFLAGS="$cf_save"
7412
7413 fi
7414 rm -f conftest.$ac_objext conftest.$ac_ext
7415
7416 fi
7417 echo "$as_me:7417: result: $cf_cv_xopen_source" >&5
7418 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7419
7420 if test "$cf_cv_xopen_source" != no ; then
7421
7422 CFLAGS=`echo "$CFLAGS" | \
7423         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7424                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7425
7426 CPPFLAGS=`echo "$CPPFLAGS" | \
7427         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7428                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7429
7430         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7431
7432 cf_fix_cppflags=no
7433 cf_new_cflags=
7434 cf_new_cppflags=
7435 cf_new_extra_cppflags=
7436
7437 for cf_add_cflags in $cf_temp_xopen_source
7438 do
7439 case $cf_fix_cppflags in
7440 no)
7441         case $cf_add_cflags in #(vi
7442         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7443                 case $cf_add_cflags in
7444                 -D*)
7445                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7446
7447                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7448                                 && test -z "${cf_tst_cflags}" \
7449                                 && cf_fix_cppflags=yes
7450
7451                         if test $cf_fix_cppflags = yes ; then
7452                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7453                                 continue
7454                         elif test "${cf_tst_cflags}" = "\"'" ; then
7455                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7456                                 continue
7457                         fi
7458                         ;;
7459                 esac
7460                 case "$CPPFLAGS" in
7461                 *$cf_add_cflags) #(vi
7462                         ;;
7463                 *) #(vi
7464                         case $cf_add_cflags in #(vi
7465                         -D*)
7466                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7467
7468 CPPFLAGS=`echo "$CPPFLAGS" | \
7469         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7470                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7471
7472                                 ;;
7473                         esac
7474                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7475                         ;;
7476                 esac
7477                 ;;
7478         *)
7479                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7480                 ;;
7481         esac
7482         ;;
7483 yes)
7484         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7485
7486         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7487
7488         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7489                 && test -z "${cf_tst_cflags}" \
7490                 && cf_fix_cppflags=no
7491         ;;
7492 esac
7493 done
7494
7495 if test -n "$cf_new_cflags" ; then
7496
7497         CFLAGS="$CFLAGS $cf_new_cflags"
7498 fi
7499
7500 if test -n "$cf_new_cppflags" ; then
7501
7502         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7503 fi
7504
7505 if test -n "$cf_new_extra_cppflags" ; then
7506
7507         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7508 fi
7509
7510 fi
7511
7512 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7513
7514 cf_save_CFLAGS="$CFLAGS"
7515 cf_save_CPPFLAGS="$CPPFLAGS"
7516
7517 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7518         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7519                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7520
7521 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7522         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7523                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7524
7525 echo "$as_me:7525: checking if we should define _POSIX_C_SOURCE" >&5
7526 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7527 if test "${cf_cv_posix_c_source+set}" = set; then
7528   echo $ECHO_N "(cached) $ECHO_C" >&6
7529 else
7530
7531 echo "${as_me:-configure}:7531: testing if the symbol is already defined go no further ..." 1>&5
7532
7533         cat >conftest.$ac_ext <<_ACEOF
7534 #line 7534 "configure"
7535 #include "confdefs.h"
7536 #include <sys/types.h>
7537 int
7538 main ()
7539 {
7540
7541 #ifndef _POSIX_C_SOURCE
7542 make an error
7543 #endif
7544   ;
7545   return 0;
7546 }
7547 _ACEOF
7548 rm -f conftest.$ac_objext
7549 if { (eval echo "$as_me:7549: \"$ac_compile\"") >&5
7550   (eval $ac_compile) 2>&5
7551   ac_status=$?
7552   echo "$as_me:7552: \$? = $ac_status" >&5
7553   (exit $ac_status); } &&
7554          { ac_try='test -s conftest.$ac_objext'
7555   { (eval echo "$as_me:7555: \"$ac_try\"") >&5
7556   (eval $ac_try) 2>&5
7557   ac_status=$?
7558   echo "$as_me:7558: \$? = $ac_status" >&5
7559   (exit $ac_status); }; }; then
7560   cf_cv_posix_c_source=no
7561 else
7562   echo "$as_me: failed program was:" >&5
7563 cat conftest.$ac_ext >&5
7564 cf_want_posix_source=no
7565          case .$cf_POSIX_C_SOURCE in #(vi
7566          .[12]??*) #(vi
7567                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7568                 ;;
7569          .2) #(vi
7570                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7571                 cf_want_posix_source=yes
7572                 ;;
7573          .*)
7574                 cf_want_posix_source=yes
7575                 ;;
7576          esac
7577          if test "$cf_want_posix_source" = yes ; then
7578                 cat >conftest.$ac_ext <<_ACEOF
7579 #line 7579 "configure"
7580 #include "confdefs.h"
7581 #include <sys/types.h>
7582 int
7583 main ()
7584 {
7585
7586 #ifdef _POSIX_SOURCE
7587 make an error
7588 #endif
7589   ;
7590   return 0;
7591 }
7592 _ACEOF
7593 rm -f conftest.$ac_objext
7594 if { (eval echo "$as_me:7594: \"$ac_compile\"") >&5
7595   (eval $ac_compile) 2>&5
7596   ac_status=$?
7597   echo "$as_me:7597: \$? = $ac_status" >&5
7598   (exit $ac_status); } &&
7599          { ac_try='test -s conftest.$ac_objext'
7600   { (eval echo "$as_me:7600: \"$ac_try\"") >&5
7601   (eval $ac_try) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); }; }; then
7605   :
7606 else
7607   echo "$as_me: failed program was:" >&5
7608 cat conftest.$ac_ext >&5
7609 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7610 fi
7611 rm -f conftest.$ac_objext conftest.$ac_ext
7612          fi
7613
7614 echo "${as_me:-configure}:7614: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7615
7616          CFLAGS="$cf_trim_CFLAGS"
7617          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7618
7619 echo "${as_me:-configure}:7619: testing if the second compile does not leave our definition intact error ..." 1>&5
7620
7621          cat >conftest.$ac_ext <<_ACEOF
7622 #line 7622 "configure"
7623 #include "confdefs.h"
7624 #include <sys/types.h>
7625 int
7626 main ()
7627 {
7628
7629 #ifndef _POSIX_C_SOURCE
7630 make an error
7631 #endif
7632   ;
7633   return 0;
7634 }
7635 _ACEOF
7636 rm -f conftest.$ac_objext
7637 if { (eval echo "$as_me:7637: \"$ac_compile\"") >&5
7638   (eval $ac_compile) 2>&5
7639   ac_status=$?
7640   echo "$as_me:7640: \$? = $ac_status" >&5
7641   (exit $ac_status); } &&
7642          { ac_try='test -s conftest.$ac_objext'
7643   { (eval echo "$as_me:7643: \"$ac_try\"") >&5
7644   (eval $ac_try) 2>&5
7645   ac_status=$?
7646   echo "$as_me:7646: \$? = $ac_status" >&5
7647   (exit $ac_status); }; }; then
7648   :
7649 else
7650   echo "$as_me: failed program was:" >&5
7651 cat conftest.$ac_ext >&5
7652 cf_cv_posix_c_source=no
7653 fi
7654 rm -f conftest.$ac_objext conftest.$ac_ext
7655          CFLAGS="$cf_save_CFLAGS"
7656          CPPFLAGS="$cf_save_CPPFLAGS"
7657
7658 fi
7659 rm -f conftest.$ac_objext conftest.$ac_ext
7660
7661 fi
7662 echo "$as_me:7662: result: $cf_cv_posix_c_source" >&5
7663 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7664
7665 if test "$cf_cv_posix_c_source" != no ; then
7666         CFLAGS="$cf_trim_CFLAGS"
7667         CPPFLAGS="$cf_trim_CPPFLAGS"
7668
7669 cf_fix_cppflags=no
7670 cf_new_cflags=
7671 cf_new_cppflags=
7672 cf_new_extra_cppflags=
7673
7674 for cf_add_cflags in $cf_cv_posix_c_source
7675 do
7676 case $cf_fix_cppflags in
7677 no)
7678         case $cf_add_cflags in #(vi
7679         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7680                 case $cf_add_cflags in
7681                 -D*)
7682                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7683
7684                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7685                                 && test -z "${cf_tst_cflags}" \
7686                                 && cf_fix_cppflags=yes
7687
7688                         if test $cf_fix_cppflags = yes ; then
7689                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7690                                 continue
7691                         elif test "${cf_tst_cflags}" = "\"'" ; then
7692                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7693                                 continue
7694                         fi
7695                         ;;
7696                 esac
7697                 case "$CPPFLAGS" in
7698                 *$cf_add_cflags) #(vi
7699                         ;;
7700                 *) #(vi
7701                         case $cf_add_cflags in #(vi
7702                         -D*)
7703                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7704
7705 CPPFLAGS=`echo "$CPPFLAGS" | \
7706         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7707                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7708
7709                                 ;;
7710                         esac
7711                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7712                         ;;
7713                 esac
7714                 ;;
7715         *)
7716                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7717                 ;;
7718         esac
7719         ;;
7720 yes)
7721         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7722
7723         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7724
7725         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7726                 && test -z "${cf_tst_cflags}" \
7727                 && cf_fix_cppflags=no
7728         ;;
7729 esac
7730 done
7731
7732 if test -n "$cf_new_cflags" ; then
7733
7734         CFLAGS="$CFLAGS $cf_new_cflags"
7735 fi
7736
7737 if test -n "$cf_new_cppflags" ; then
7738
7739         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7740 fi
7741
7742 if test -n "$cf_new_extra_cppflags" ; then
7743
7744         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7745 fi
7746
7747 fi
7748
7749         ;;
7750 esac
7751
7752 if test -n "$cf_xopen_source" ; then
7753
7754 cf_fix_cppflags=no
7755 cf_new_cflags=
7756 cf_new_cppflags=
7757 cf_new_extra_cppflags=
7758
7759 for cf_add_cflags in $cf_xopen_source
7760 do
7761 case $cf_fix_cppflags in
7762 no)
7763         case $cf_add_cflags in #(vi
7764         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7765                 case $cf_add_cflags in
7766                 -D*)
7767                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7768
7769                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7770                                 && test -z "${cf_tst_cflags}" \
7771                                 && cf_fix_cppflags=yes
7772
7773                         if test $cf_fix_cppflags = yes ; then
7774                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7775                                 continue
7776                         elif test "${cf_tst_cflags}" = "\"'" ; then
7777                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7778                                 continue
7779                         fi
7780                         ;;
7781                 esac
7782                 case "$CPPFLAGS" in
7783                 *$cf_add_cflags) #(vi
7784                         ;;
7785                 *) #(vi
7786                         case $cf_add_cflags in #(vi
7787                         -D*)
7788                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7789
7790 CPPFLAGS=`echo "$CPPFLAGS" | \
7791         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7792                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7793
7794                                 ;;
7795                         esac
7796                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7797                         ;;
7798                 esac
7799                 ;;
7800         *)
7801                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7802                 ;;
7803         esac
7804         ;;
7805 yes)
7806         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7807
7808         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7809
7810         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7811                 && test -z "${cf_tst_cflags}" \
7812                 && cf_fix_cppflags=no
7813         ;;
7814 esac
7815 done
7816
7817 if test -n "$cf_new_cflags" ; then
7818
7819         CFLAGS="$CFLAGS $cf_new_cflags"
7820 fi
7821
7822 if test -n "$cf_new_cppflags" ; then
7823
7824         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7825 fi
7826
7827 if test -n "$cf_new_extra_cppflags" ; then
7828
7829         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7830 fi
7831
7832 fi
7833
7834 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7835         echo "$as_me:7835: checking if _XOPEN_SOURCE really is set" >&5
7836 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7837         cat >conftest.$ac_ext <<_ACEOF
7838 #line 7838 "configure"
7839 #include "confdefs.h"
7840 #include <stdlib.h>
7841 int
7842 main ()
7843 {
7844
7845 #ifndef _XOPEN_SOURCE
7846 make an error
7847 #endif
7848   ;
7849   return 0;
7850 }
7851 _ACEOF
7852 rm -f conftest.$ac_objext
7853 if { (eval echo "$as_me:7853: \"$ac_compile\"") >&5
7854   (eval $ac_compile) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit $ac_status); } &&
7858          { ac_try='test -s conftest.$ac_objext'
7859   { (eval echo "$as_me:7859: \"$ac_try\"") >&5
7860   (eval $ac_try) 2>&5
7861   ac_status=$?
7862   echo "$as_me:7862: \$? = $ac_status" >&5
7863   (exit $ac_status); }; }; then
7864   cf_XOPEN_SOURCE_set=yes
7865 else
7866   echo "$as_me: failed program was:" >&5
7867 cat conftest.$ac_ext >&5
7868 cf_XOPEN_SOURCE_set=no
7869 fi
7870 rm -f conftest.$ac_objext conftest.$ac_ext
7871         echo "$as_me:7871: result: $cf_XOPEN_SOURCE_set" >&5
7872 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7873         if test $cf_XOPEN_SOURCE_set = yes
7874         then
7875                 cat >conftest.$ac_ext <<_ACEOF
7876 #line 7876 "configure"
7877 #include "confdefs.h"
7878 #include <stdlib.h>
7879 int
7880 main ()
7881 {
7882
7883 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7884 make an error
7885 #endif
7886   ;
7887   return 0;
7888 }
7889 _ACEOF
7890 rm -f conftest.$ac_objext
7891 if { (eval echo "$as_me:7891: \"$ac_compile\"") >&5
7892   (eval $ac_compile) 2>&5
7893   ac_status=$?
7894   echo "$as_me:7894: \$? = $ac_status" >&5
7895   (exit $ac_status); } &&
7896          { ac_try='test -s conftest.$ac_objext'
7897   { (eval echo "$as_me:7897: \"$ac_try\"") >&5
7898   (eval $ac_try) 2>&5
7899   ac_status=$?
7900   echo "$as_me:7900: \$? = $ac_status" >&5
7901   (exit $ac_status); }; }; then
7902   cf_XOPEN_SOURCE_set_ok=yes
7903 else
7904   echo "$as_me: failed program was:" >&5
7905 cat conftest.$ac_ext >&5
7906 cf_XOPEN_SOURCE_set_ok=no
7907 fi
7908 rm -f conftest.$ac_objext conftest.$ac_ext
7909                 if test $cf_XOPEN_SOURCE_set_ok = no
7910                 then
7911                         { echo "$as_me:7911: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7912 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
7913                 fi
7914         else
7915
7916 echo "$as_me:7916: checking if we should define _XOPEN_SOURCE" >&5
7917 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7918 if test "${cf_cv_xopen_source+set}" = set; then
7919   echo $ECHO_N "(cached) $ECHO_C" >&6
7920 else
7921
7922         cat >conftest.$ac_ext <<_ACEOF
7923 #line 7923 "configure"
7924 #include "confdefs.h"
7925
7926 #include <stdlib.h>
7927 #include <string.h>
7928 #include <sys/types.h>
7929
7930 int
7931 main ()
7932 {
7933
7934 #ifndef _XOPEN_SOURCE
7935 make an error
7936 #endif
7937   ;
7938   return 0;
7939 }
7940 _ACEOF
7941 rm -f conftest.$ac_objext
7942 if { (eval echo "$as_me:7942: \"$ac_compile\"") >&5
7943   (eval $ac_compile) 2>&5
7944   ac_status=$?
7945   echo "$as_me:7945: \$? = $ac_status" >&5
7946   (exit $ac_status); } &&
7947          { ac_try='test -s conftest.$ac_objext'
7948   { (eval echo "$as_me:7948: \"$ac_try\"") >&5
7949   (eval $ac_try) 2>&5
7950   ac_status=$?
7951   echo "$as_me:7951: \$? = $ac_status" >&5
7952   (exit $ac_status); }; }; then
7953   cf_cv_xopen_source=no
7954 else
7955   echo "$as_me: failed program was:" >&5
7956 cat conftest.$ac_ext >&5
7957 cf_save="$CPPFLAGS"
7958          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7959          cat >conftest.$ac_ext <<_ACEOF
7960 #line 7960 "configure"
7961 #include "confdefs.h"
7962
7963 #include <stdlib.h>
7964 #include <string.h>
7965 #include <sys/types.h>
7966
7967 int
7968 main ()
7969 {
7970
7971 #ifdef _XOPEN_SOURCE
7972 make an error
7973 #endif
7974   ;
7975   return 0;
7976 }
7977 _ACEOF
7978 rm -f conftest.$ac_objext
7979 if { (eval echo "$as_me:7979: \"$ac_compile\"") >&5
7980   (eval $ac_compile) 2>&5
7981   ac_status=$?
7982   echo "$as_me:7982: \$? = $ac_status" >&5
7983   (exit $ac_status); } &&
7984          { ac_try='test -s conftest.$ac_objext'
7985   { (eval echo "$as_me:7985: \"$ac_try\"") >&5
7986   (eval $ac_try) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit $ac_status); }; }; then
7990   cf_cv_xopen_source=no
7991 else
7992   echo "$as_me: failed program was:" >&5
7993 cat conftest.$ac_ext >&5
7994 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7995 fi
7996 rm -f conftest.$ac_objext conftest.$ac_ext
7997         CPPFLAGS="$cf_save"
7998
7999 fi
8000 rm -f conftest.$ac_objext conftest.$ac_ext
8001
8002 fi
8003 echo "$as_me:8003: result: $cf_cv_xopen_source" >&5
8004 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8005
8006 if test "$cf_cv_xopen_source" != no ; then
8007
8008 CFLAGS=`echo "$CFLAGS" | \
8009         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8010                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8011
8012 CPPFLAGS=`echo "$CPPFLAGS" | \
8013         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8014                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8015
8016         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8017
8018 cf_fix_cppflags=no
8019 cf_new_cflags=
8020 cf_new_cppflags=
8021 cf_new_extra_cppflags=
8022
8023 for cf_add_cflags in $cf_temp_xopen_source
8024 do
8025 case $cf_fix_cppflags in
8026 no)
8027         case $cf_add_cflags in #(vi
8028         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8029                 case $cf_add_cflags in
8030                 -D*)
8031                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8032
8033                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8034                                 && test -z "${cf_tst_cflags}" \
8035                                 && cf_fix_cppflags=yes
8036
8037                         if test $cf_fix_cppflags = yes ; then
8038                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8039                                 continue
8040                         elif test "${cf_tst_cflags}" = "\"'" ; then
8041                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8042                                 continue
8043                         fi
8044                         ;;
8045                 esac
8046                 case "$CPPFLAGS" in
8047                 *$cf_add_cflags) #(vi
8048                         ;;
8049                 *) #(vi
8050                         case $cf_add_cflags in #(vi
8051                         -D*)
8052                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8053
8054 CPPFLAGS=`echo "$CPPFLAGS" | \
8055         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8056                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8057
8058                                 ;;
8059                         esac
8060                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8061                         ;;
8062                 esac
8063                 ;;
8064         *)
8065                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8066                 ;;
8067         esac
8068         ;;
8069 yes)
8070         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8071
8072         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8073
8074         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8075                 && test -z "${cf_tst_cflags}" \
8076                 && cf_fix_cppflags=no
8077         ;;
8078 esac
8079 done
8080
8081 if test -n "$cf_new_cflags" ; then
8082
8083         CFLAGS="$CFLAGS $cf_new_cflags"
8084 fi
8085
8086 if test -n "$cf_new_cppflags" ; then
8087
8088         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8089 fi
8090
8091 if test -n "$cf_new_extra_cppflags" ; then
8092
8093         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8094 fi
8095
8096 fi
8097
8098         fi
8099 fi
8100
8101 # Work around breakage on OS X
8102
8103 echo "$as_me:8103: checking if SIGWINCH is defined" >&5
8104 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8105 if test "${cf_cv_define_sigwinch+set}" = set; then
8106   echo $ECHO_N "(cached) $ECHO_C" >&6
8107 else
8108
8109         cat >conftest.$ac_ext <<_ACEOF
8110 #line 8110 "configure"
8111 #include "confdefs.h"
8112
8113 #include <sys/types.h>
8114 #include <sys/signal.h>
8115
8116 int
8117 main ()
8118 {
8119 int x = SIGWINCH
8120   ;
8121   return 0;
8122 }
8123 _ACEOF
8124 rm -f conftest.$ac_objext
8125 if { (eval echo "$as_me:8125: \"$ac_compile\"") >&5
8126   (eval $ac_compile) 2>&5
8127   ac_status=$?
8128   echo "$as_me:8128: \$? = $ac_status" >&5
8129   (exit $ac_status); } &&
8130          { ac_try='test -s conftest.$ac_objext'
8131   { (eval echo "$as_me:8131: \"$ac_try\"") >&5
8132   (eval $ac_try) 2>&5
8133   ac_status=$?
8134   echo "$as_me:8134: \$? = $ac_status" >&5
8135   (exit $ac_status); }; }; then
8136   cf_cv_define_sigwinch=yes
8137 else
8138   echo "$as_me: failed program was:" >&5
8139 cat conftest.$ac_ext >&5
8140 cat >conftest.$ac_ext <<_ACEOF
8141 #line 8141 "configure"
8142 #include "confdefs.h"
8143
8144 #undef _XOPEN_SOURCE
8145 #undef _POSIX_SOURCE
8146 #undef _POSIX_C_SOURCE
8147 #include <sys/types.h>
8148 #include <sys/signal.h>
8149
8150 int
8151 main ()
8152 {
8153 int x = SIGWINCH
8154   ;
8155   return 0;
8156 }
8157 _ACEOF
8158 rm -f conftest.$ac_objext
8159 if { (eval echo "$as_me:8159: \"$ac_compile\"") >&5
8160   (eval $ac_compile) 2>&5
8161   ac_status=$?
8162   echo "$as_me:8162: \$? = $ac_status" >&5
8163   (exit $ac_status); } &&
8164          { ac_try='test -s conftest.$ac_objext'
8165   { (eval echo "$as_me:8165: \"$ac_try\"") >&5
8166   (eval $ac_try) 2>&5
8167   ac_status=$?
8168   echo "$as_me:8168: \$? = $ac_status" >&5
8169   (exit $ac_status); }; }; then
8170   cf_cv_define_sigwinch=maybe
8171 else
8172   echo "$as_me: failed program was:" >&5
8173 cat conftest.$ac_ext >&5
8174 cf_cv_define_sigwinch=no
8175 fi
8176 rm -f conftest.$ac_objext conftest.$ac_ext
8177
8178 fi
8179 rm -f conftest.$ac_objext conftest.$ac_ext
8180
8181 fi
8182 echo "$as_me:8182: result: $cf_cv_define_sigwinch" >&5
8183 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8184
8185 if test "$cf_cv_define_sigwinch" = maybe ; then
8186 echo "$as_me:8186: checking for actual SIGWINCH definition" >&5
8187 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8188 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8189   echo $ECHO_N "(cached) $ECHO_C" >&6
8190 else
8191
8192 cf_cv_fixup_sigwinch=unknown
8193 cf_sigwinch=32
8194 while test $cf_sigwinch != 1
8195 do
8196         cat >conftest.$ac_ext <<_ACEOF
8197 #line 8197 "configure"
8198 #include "confdefs.h"
8199
8200 #undef _XOPEN_SOURCE
8201 #undef _POSIX_SOURCE
8202 #undef _POSIX_C_SOURCE
8203 #include <sys/types.h>
8204 #include <sys/signal.h>
8205
8206 int
8207 main ()
8208 {
8209
8210 #if SIGWINCH != $cf_sigwinch
8211 make an error
8212 #endif
8213 int x = SIGWINCH
8214   ;
8215   return 0;
8216 }
8217 _ACEOF
8218 rm -f conftest.$ac_objext
8219 if { (eval echo "$as_me:8219: \"$ac_compile\"") >&5
8220   (eval $ac_compile) 2>&5
8221   ac_status=$?
8222   echo "$as_me:8222: \$? = $ac_status" >&5
8223   (exit $ac_status); } &&
8224          { ac_try='test -s conftest.$ac_objext'
8225   { (eval echo "$as_me:8225: \"$ac_try\"") >&5
8226   (eval $ac_try) 2>&5
8227   ac_status=$?
8228   echo "$as_me:8228: \$? = $ac_status" >&5
8229   (exit $ac_status); }; }; then
8230   cf_cv_fixup_sigwinch=$cf_sigwinch
8231          break
8232 else
8233   echo "$as_me: failed program was:" >&5
8234 cat conftest.$ac_ext >&5
8235 fi
8236 rm -f conftest.$ac_objext conftest.$ac_ext
8237
8238 cf_sigwinch=`expr $cf_sigwinch - 1`
8239 done
8240
8241 fi
8242 echo "$as_me:8242: result: $cf_cv_fixup_sigwinch" >&5
8243 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8244
8245         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8246                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8247         fi
8248 fi
8249
8250 # Checks for CODESET support.
8251
8252   echo "$as_me:8252: checking for nl_langinfo and CODESET" >&5
8253 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8254 if test "${am_cv_langinfo_codeset+set}" = set; then
8255   echo $ECHO_N "(cached) $ECHO_C" >&6
8256 else
8257   cat >conftest.$ac_ext <<_ACEOF
8258 #line 8258 "configure"
8259 #include "confdefs.h"
8260 #include <langinfo.h>
8261 int
8262 main ()
8263 {
8264 char* cs = nl_langinfo(CODESET);
8265   ;
8266   return 0;
8267 }
8268 _ACEOF
8269 rm -f conftest.$ac_objext conftest$ac_exeext
8270 if { (eval echo "$as_me:8270: \"$ac_link\"") >&5
8271   (eval $ac_link) 2>&5
8272   ac_status=$?
8273   echo "$as_me:8273: \$? = $ac_status" >&5
8274   (exit $ac_status); } &&
8275          { ac_try='test -s conftest$ac_exeext'
8276   { (eval echo "$as_me:8276: \"$ac_try\"") >&5
8277   (eval $ac_try) 2>&5
8278   ac_status=$?
8279   echo "$as_me:8279: \$? = $ac_status" >&5
8280   (exit $ac_status); }; }; then
8281   am_cv_langinfo_codeset=yes
8282 else
8283   echo "$as_me: failed program was:" >&5
8284 cat conftest.$ac_ext >&5
8285 am_cv_langinfo_codeset=no
8286 fi
8287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8288
8289 fi
8290 echo "$as_me:8290: result: $am_cv_langinfo_codeset" >&5
8291 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8292   if test $am_cv_langinfo_codeset = yes; then
8293
8294 cat >>confdefs.h <<\EOF
8295 #define HAVE_LANGINFO_CODESET 1
8296 EOF
8297
8298   fi
8299
8300 # use these variables to work around a defect in gcc's fixincludes.
8301 NCURSES_OK_WCHAR_T=
8302 NCURSES_OK_WINT_T=
8303
8304 echo "$as_me:8304: checking if you want wide-character code" >&5
8305 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8306
8307 # Check whether --enable-widec or --disable-widec was given.
8308 if test "${enable_widec+set}" = set; then
8309   enableval="$enable_widec"
8310   with_widec=$enableval
8311 else
8312   with_widec=no
8313 fi;
8314 echo "$as_me:8314: result: $with_widec" >&5
8315 echo "${ECHO_T}$with_widec" >&6
8316 if test "x$with_widec" = xyes ; then
8317         LIB_SUFFIX="w${LIB_SUFFIX}"
8318
8319 cat >>confdefs.h <<\EOF
8320 #define USE_WIDEC_SUPPORT 1
8321 EOF
8322
8323 cat >>confdefs.h <<\EOF
8324 #define NCURSES_WIDECHAR 1
8325 EOF
8326
8327 echo "$as_me:8327: checking if wchar.h can be used as is" >&5
8328 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8329 if test "${cf_cv_wchar_h_okay+set}" = set; then
8330   echo $ECHO_N "(cached) $ECHO_C" >&6
8331 else
8332
8333 cat >conftest.$ac_ext <<_ACEOF
8334 #line 8334 "configure"
8335 #include "confdefs.h"
8336
8337 #include <stdlib.h>
8338 #include <wchar.h>
8339
8340 int
8341 main ()
8342 {
8343
8344         wint_t foo = 0;
8345         int bar = iswpunct(foo)
8346   ;
8347   return 0;
8348 }
8349 _ACEOF
8350 rm -f conftest.$ac_objext
8351 if { (eval echo "$as_me:8351: \"$ac_compile\"") >&5
8352   (eval $ac_compile) 2>&5
8353   ac_status=$?
8354   echo "$as_me:8354: \$? = $ac_status" >&5
8355   (exit $ac_status); } &&
8356          { ac_try='test -s conftest.$ac_objext'
8357   { (eval echo "$as_me:8357: \"$ac_try\"") >&5
8358   (eval $ac_try) 2>&5
8359   ac_status=$?
8360   echo "$as_me:8360: \$? = $ac_status" >&5
8361   (exit $ac_status); }; }; then
8362   cf_cv_wchar_h_okay=yes
8363 else
8364   echo "$as_me: failed program was:" >&5
8365 cat conftest.$ac_ext >&5
8366 cf_cv_wchar_h_okay=no
8367 fi
8368 rm -f conftest.$ac_objext conftest.$ac_ext
8369 fi
8370 echo "$as_me:8370: result: $cf_cv_wchar_h_okay" >&5
8371 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8372
8373 if test $cf_cv_wchar_h_okay = no
8374 then
8375
8376 echo "$as_me:8376: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8377 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8378 cat >conftest.$ac_ext <<_ACEOF
8379 #line 8379 "configure"
8380 #include "confdefs.h"
8381 #include <sys/types.h>
8382
8383 int
8384 main ()
8385 {
8386
8387 #ifndef _XOPEN_SOURCE_EXTENDED
8388 make an error
8389 #endif
8390   ;
8391   return 0;
8392 }
8393 _ACEOF
8394 rm -f conftest.$ac_objext
8395 if { (eval echo "$as_me:8395: \"$ac_compile\"") >&5
8396   (eval $ac_compile) 2>&5
8397   ac_status=$?
8398   echo "$as_me:8398: \$? = $ac_status" >&5
8399   (exit $ac_status); } &&
8400          { ac_try='test -s conftest.$ac_objext'
8401   { (eval echo "$as_me:8401: \"$ac_try\"") >&5
8402   (eval $ac_try) 2>&5
8403   ac_status=$?
8404   echo "$as_me:8404: \$? = $ac_status" >&5
8405   (exit $ac_status); }; }; then
8406   cf_result=no
8407 else
8408   echo "$as_me: failed program was:" >&5
8409 cat conftest.$ac_ext >&5
8410 cf_result=yes
8411 fi
8412 rm -f conftest.$ac_objext conftest.$ac_ext
8413 echo "$as_me:8413: result: $cf_result" >&5
8414 echo "${ECHO_T}$cf_result" >&6
8415
8416 if test "$cf_result" = yes ; then
8417         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8418 elif test "x" != "x" ; then
8419         echo "$as_me:8419: checking checking for compatible value versus " >&5
8420 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8421         cat >conftest.$ac_ext <<_ACEOF
8422 #line 8422 "configure"
8423 #include "confdefs.h"
8424 #include <sys/types.h>
8425
8426 int
8427 main ()
8428 {
8429
8430 #if _XOPEN_SOURCE_EXTENDED- < 0
8431 make an error
8432 #endif
8433   ;
8434   return 0;
8435 }
8436 _ACEOF
8437 rm -f conftest.$ac_objext
8438 if { (eval echo "$as_me:8438: \"$ac_compile\"") >&5
8439   (eval $ac_compile) 2>&5
8440   ac_status=$?
8441   echo "$as_me:8441: \$? = $ac_status" >&5
8442   (exit $ac_status); } &&
8443          { ac_try='test -s conftest.$ac_objext'
8444   { (eval echo "$as_me:8444: \"$ac_try\"") >&5
8445   (eval $ac_try) 2>&5
8446   ac_status=$?
8447   echo "$as_me:8447: \$? = $ac_status" >&5
8448   (exit $ac_status); }; }; then
8449   cf_result=yes
8450 else
8451   echo "$as_me: failed program was:" >&5
8452 cat conftest.$ac_ext >&5
8453 cf_result=no
8454 fi
8455 rm -f conftest.$ac_objext conftest.$ac_ext
8456         echo "$as_me:8456: result: $cf_result" >&5
8457 echo "${ECHO_T}$cf_result" >&6
8458         if test "$cf_result" = no ; then
8459                 # perhaps we can override it - try...
8460                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8461         fi
8462 fi
8463
8464 fi
8465
8466         # with_overwrite=no
8467         NCURSES_CH_T=cchar_t
8468
8469 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8470 do
8471 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8472 echo "$as_me:8472: checking for $ac_func" >&5
8473 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8474 if eval "test \"\${$as_ac_var+set}\" = set"; then
8475   echo $ECHO_N "(cached) $ECHO_C" >&6
8476 else
8477   cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8480 /* System header to define __stub macros and hopefully few prototypes,
8481     which can conflict with char $ac_func (); below.  */
8482 #include <assert.h>
8483 /* Override any gcc2 internal prototype to avoid an error.  */
8484 #ifdef __cplusplus
8485 extern "C"
8486 #endif
8487 /* We use char because int might match the return type of a gcc2
8488    builtin and then its argument prototype would still apply.  */
8489 char $ac_func ();
8490 char (*f) ();
8491
8492 int
8493 main ()
8494 {
8495 /* The GNU C library defines this for functions which it implements
8496     to always fail with ENOSYS.  Some functions are actually named
8497     something starting with __ and the normal name is an alias.  */
8498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8499 choke me
8500 #else
8501 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8502 #endif
8503
8504   ;
8505   return 0;
8506 }
8507 _ACEOF
8508 rm -f conftest.$ac_objext conftest$ac_exeext
8509 if { (eval echo "$as_me:8509: \"$ac_link\"") >&5
8510   (eval $ac_link) 2>&5
8511   ac_status=$?
8512   echo "$as_me:8512: \$? = $ac_status" >&5
8513   (exit $ac_status); } &&
8514          { ac_try='test -s conftest$ac_exeext'
8515   { (eval echo "$as_me:8515: \"$ac_try\"") >&5
8516   (eval $ac_try) 2>&5
8517   ac_status=$?
8518   echo "$as_me:8518: \$? = $ac_status" >&5
8519   (exit $ac_status); }; }; then
8520   eval "$as_ac_var=yes"
8521 else
8522   echo "$as_me: failed program was:" >&5
8523 cat conftest.$ac_ext >&5
8524 eval "$as_ac_var=no"
8525 fi
8526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8527 fi
8528 echo "$as_me:8528: result: `eval echo '${'$as_ac_var'}'`" >&5
8529 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8530 if test `eval echo '${'$as_ac_var'}'` = yes; then
8531   cat >>confdefs.h <<EOF
8532 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8533 EOF
8534
8535 fi
8536 done
8537
8538         if test "x$ac_cv_func_putwc" != xyes ; then
8539
8540 echo "$as_me:8540: checking for multibyte character support" >&5
8541 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8542 if test "${cf_cv_utf8_lib+set}" = set; then
8543   echo $ECHO_N "(cached) $ECHO_C" >&6
8544 else
8545
8546         cf_save_LIBS="$LIBS"
8547         cat >conftest.$ac_ext <<_ACEOF
8548 #line 8548 "configure"
8549 #include "confdefs.h"
8550
8551 #include <stdlib.h>
8552 int
8553 main ()
8554 {
8555 putwc(0,0);
8556   ;
8557   return 0;
8558 }
8559 _ACEOF
8560 rm -f conftest.$ac_objext conftest$ac_exeext
8561 if { (eval echo "$as_me:8561: \"$ac_link\"") >&5
8562   (eval $ac_link) 2>&5
8563   ac_status=$?
8564   echo "$as_me:8564: \$? = $ac_status" >&5
8565   (exit $ac_status); } &&
8566          { ac_try='test -s conftest$ac_exeext'
8567   { (eval echo "$as_me:8567: \"$ac_try\"") >&5
8568   (eval $ac_try) 2>&5
8569   ac_status=$?
8570   echo "$as_me:8570: \$? = $ac_status" >&5
8571   (exit $ac_status); }; }; then
8572   cf_cv_utf8_lib=yes
8573 else
8574   echo "$as_me: failed program was:" >&5
8575 cat conftest.$ac_ext >&5
8576
8577 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8578 # will be set on completion of the AC_TRY_LINK below.
8579 cf_cv_header_path_utf8=
8580 cf_cv_library_path_utf8=
8581
8582 echo "${as_me:-configure}:8582: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8583
8584 cf_save_LIBS="$LIBS"
8585
8586 cat >conftest.$ac_ext <<_ACEOF
8587 #line 8587 "configure"
8588 #include "confdefs.h"
8589
8590 #include <libutf8.h>
8591 int
8592 main ()
8593 {
8594 putwc(0,0);
8595   ;
8596   return 0;
8597 }
8598 _ACEOF
8599 rm -f conftest.$ac_objext conftest$ac_exeext
8600 if { (eval echo "$as_me:8600: \"$ac_link\"") >&5
8601   (eval $ac_link) 2>&5
8602   ac_status=$?
8603   echo "$as_me:8603: \$? = $ac_status" >&5
8604   (exit $ac_status); } &&
8605          { ac_try='test -s conftest$ac_exeext'
8606   { (eval echo "$as_me:8606: \"$ac_try\"") >&5
8607   (eval $ac_try) 2>&5
8608   ac_status=$?
8609   echo "$as_me:8609: \$? = $ac_status" >&5
8610   (exit $ac_status); }; }; then
8611
8612         cf_cv_find_linkage_utf8=yes
8613         cf_cv_header_path_utf8=/usr/include
8614         cf_cv_library_path_utf8=/usr/lib
8615
8616 else
8617   echo "$as_me: failed program was:" >&5
8618 cat conftest.$ac_ext >&5
8619
8620 LIBS="-lutf8  $cf_save_LIBS"
8621
8622 cat >conftest.$ac_ext <<_ACEOF
8623 #line 8623 "configure"
8624 #include "confdefs.h"
8625
8626 #include <libutf8.h>
8627 int
8628 main ()
8629 {
8630 putwc(0,0);
8631   ;
8632   return 0;
8633 }
8634 _ACEOF
8635 rm -f conftest.$ac_objext conftest$ac_exeext
8636 if { (eval echo "$as_me:8636: \"$ac_link\"") >&5
8637   (eval $ac_link) 2>&5
8638   ac_status=$?
8639   echo "$as_me:8639: \$? = $ac_status" >&5
8640   (exit $ac_status); } &&
8641          { ac_try='test -s conftest$ac_exeext'
8642   { (eval echo "$as_me:8642: \"$ac_try\"") >&5
8643   (eval $ac_try) 2>&5
8644   ac_status=$?
8645   echo "$as_me:8645: \$? = $ac_status" >&5
8646   (exit $ac_status); }; }; then
8647
8648         cf_cv_find_linkage_utf8=yes
8649         cf_cv_header_path_utf8=/usr/include
8650         cf_cv_library_path_utf8=/usr/lib
8651         cf_cv_library_file_utf8="-lutf8"
8652
8653 else
8654   echo "$as_me: failed program was:" >&5
8655 cat conftest.$ac_ext >&5
8656
8657         cf_cv_find_linkage_utf8=no
8658         LIBS="$cf_save_LIBS"
8659
8660     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8661
8662 echo "${as_me:-configure}:8662: testing find linkage for utf8 library ..." 1>&5
8663
8664 echo "${as_me:-configure}:8664: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8665
8666     cf_save_CPPFLAGS="$CPPFLAGS"
8667     cf_test_CPPFLAGS="$CPPFLAGS"
8668
8669 cf_search=
8670
8671 # collect the current set of include-directories from compiler flags
8672 cf_header_path_list=""
8673 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8674         for cf_header_path in $CPPFLAGS $CFLAGS
8675         do
8676                 case $cf_header_path in #(vi
8677                 -I*)
8678                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8679
8680 test "$cf_header_path" != "NONE" && \
8681 test -d "$cf_header_path" && \
8682  {
8683         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8684         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8685         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8686         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8687         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8688         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8689 }
8690
8691                         cf_header_path_list="$cf_header_path_list $cf_search"
8692                         ;;
8693                 esac
8694         done
8695 fi
8696
8697 # add the variations for the package we are looking for
8698
8699 cf_search=
8700
8701 test "/usr" != "$prefix" && \
8702 test -d "/usr" && \
8703 (test $prefix = NONE || test "/usr" != "$prefix") && {
8704         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8705         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8706         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8707         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8708         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8709         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8710 }
8711
8712 test "$prefix" != "NONE" && \
8713 test -d "$prefix" && \
8714  {
8715         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8716         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8717         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8718         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8719         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8720         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8721 }
8722
8723 test "/usr/local" != "$prefix" && \
8724 test -d "/usr/local" && \
8725 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8726         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8727         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8728         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8729         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8730         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8731         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8732 }
8733
8734 test "/opt" != "$prefix" && \
8735 test -d "/opt" && \
8736 (test $prefix = NONE || test "/opt" != "$prefix") && {
8737         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8738         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8739         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8740         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8741         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8742         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8743 }
8744
8745 test "$HOME" != "$prefix" && \
8746 test -d "$HOME" && \
8747 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8748         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8749         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8750         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8751         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8752         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8753         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8754 }
8755
8756 test "$includedir" != NONE && \
8757 test "$includedir" != "/usr/include" && \
8758 test -d "$includedir" && {
8759         test -d $includedir &&    cf_search="$cf_search $includedir"
8760         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8761 }
8762
8763 test "$oldincludedir" != NONE && \
8764 test "$oldincludedir" != "/usr/include" && \
8765 test -d "$oldincludedir" && {
8766         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8767         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8768 }
8769
8770 cf_search="$cf_search $cf_header_path_list"
8771
8772     for cf_cv_header_path_utf8 in $cf_search
8773     do
8774       if test -d $cf_cv_header_path_utf8 ; then
8775         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8776
8777 echo "${as_me:-configure}:8777: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8778
8779         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8780         cat >conftest.$ac_ext <<_ACEOF
8781 #line 8781 "configure"
8782 #include "confdefs.h"
8783
8784 #include <libutf8.h>
8785 int
8786 main ()
8787 {
8788 putwc(0,0);
8789   ;
8790   return 0;
8791 }
8792 _ACEOF
8793 rm -f conftest.$ac_objext
8794 if { (eval echo "$as_me:8794: \"$ac_compile\"") >&5
8795   (eval $ac_compile) 2>&5
8796   ac_status=$?
8797   echo "$as_me:8797: \$? = $ac_status" >&5
8798   (exit $ac_status); } &&
8799          { ac_try='test -s conftest.$ac_objext'
8800   { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8801   (eval $ac_try) 2>&5
8802   ac_status=$?
8803   echo "$as_me:8803: \$? = $ac_status" >&5
8804   (exit $ac_status); }; }; then
8805
8806             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8807
8808 echo "${as_me:-configure}:8808: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8809
8810             cf_cv_find_linkage_utf8=maybe
8811             cf_test_CPPFLAGS="$CPPFLAGS"
8812             break
8813 else
8814   echo "$as_me: failed program was:" >&5
8815 cat conftest.$ac_ext >&5
8816
8817             CPPFLAGS="$cf_save_CPPFLAGS"
8818
8819 fi
8820 rm -f conftest.$ac_objext conftest.$ac_ext
8821       fi
8822     done
8823
8824     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8825
8826 echo "${as_me:-configure}:8826: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8827
8828       cf_save_LIBS="$LIBS"
8829       cf_save_LDFLAGS="$LDFLAGS"
8830
8831       if test "$cf_cv_find_linkage_utf8" != yes ; then
8832
8833 cf_search=
8834 cf_library_path_list=""
8835 if test -n "${LDFLAGS}${LIBS}" ; then
8836         for cf_library_path in $LDFLAGS $LIBS
8837         do
8838                 case $cf_library_path in #(vi
8839                 -L*)
8840                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8841
8842 test "$cf_library_path" != "NONE" && \
8843 test -d "$cf_library_path" && \
8844  {
8845         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8846         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8847         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8848         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8849         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8850         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8851 }
8852
8853                         cf_library_path_list="$cf_library_path_list $cf_search"
8854                         ;;
8855                 esac
8856         done
8857 fi
8858
8859 cf_search=
8860
8861 test "/usr" != "$prefix" && \
8862 test -d "/usr" && \
8863 (test $prefix = NONE || test "/usr" != "$prefix") && {
8864         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8865         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8866         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8867         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8868         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8869         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8870 }
8871
8872 test "$prefix" != "NONE" && \
8873 test -d "$prefix" && \
8874  {
8875         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8876         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8877         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8878         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8879         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8880         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8881 }
8882
8883 test "/usr/local" != "$prefix" && \
8884 test -d "/usr/local" && \
8885 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8886         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8887         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8888         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8889         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8890         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8891         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8892 }
8893
8894 test "/opt" != "$prefix" && \
8895 test -d "/opt" && \
8896 (test $prefix = NONE || test "/opt" != "$prefix") && {
8897         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8898         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8899         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8900         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8901         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8902         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8903 }
8904
8905 test "$HOME" != "$prefix" && \
8906 test -d "$HOME" && \
8907 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8908         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8909         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8910         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8911         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8912         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8913         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8914 }
8915
8916 cf_search="$cf_library_path_list $cf_search"
8917
8918         for cf_cv_library_path_utf8 in $cf_search
8919         do
8920           if test -d $cf_cv_library_path_utf8 ; then
8921             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8922
8923 echo "${as_me:-configure}:8923: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8924
8925             CPPFLAGS="$cf_test_CPPFLAGS"
8926             LIBS="-lutf8  $cf_save_LIBS"
8927             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8928             cat >conftest.$ac_ext <<_ACEOF
8929 #line 8929 "configure"
8930 #include "confdefs.h"
8931
8932 #include <libutf8.h>
8933 int
8934 main ()
8935 {
8936 putwc(0,0);
8937   ;
8938   return 0;
8939 }
8940 _ACEOF
8941 rm -f conftest.$ac_objext conftest$ac_exeext
8942 if { (eval echo "$as_me:8942: \"$ac_link\"") >&5
8943   (eval $ac_link) 2>&5
8944   ac_status=$?
8945   echo "$as_me:8945: \$? = $ac_status" >&5
8946   (exit $ac_status); } &&
8947          { ac_try='test -s conftest$ac_exeext'
8948   { (eval echo "$as_me:8948: \"$ac_try\"") >&5
8949   (eval $ac_try) 2>&5
8950   ac_status=$?
8951   echo "$as_me:8951: \$? = $ac_status" >&5
8952   (exit $ac_status); }; }; then
8953
8954                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8955
8956 echo "${as_me:-configure}:8956: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8957
8958                 cf_cv_find_linkage_utf8=yes
8959                 cf_cv_library_file_utf8="-lutf8"
8960                 break
8961 else
8962   echo "$as_me: failed program was:" >&5
8963 cat conftest.$ac_ext >&5
8964
8965                 CPPFLAGS="$cf_save_CPPFLAGS"
8966                 LIBS="$cf_save_LIBS"
8967                 LDFLAGS="$cf_save_LDFLAGS"
8968
8969 fi
8970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8971           fi
8972         done
8973         CPPFLAGS="$cf_save_CPPFLAGS"
8974         LDFLAGS="$cf_save_LDFLAGS"
8975       fi
8976
8977     else
8978       cf_cv_find_linkage_utf8=no
8979     fi
8980
8981 fi
8982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8983
8984 fi
8985 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8986
8987 LIBS="$cf_save_LIBS"
8988
8989 if test "$cf_cv_find_linkage_utf8" = yes ; then
8990 cf_cv_utf8_lib=add-on
8991 else
8992 cf_cv_utf8_lib=no
8993 fi
8994
8995 fi
8996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8997 fi
8998 echo "$as_me:8998: result: $cf_cv_utf8_lib" >&5
8999 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9000
9001 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9002 # ncurses/ncursesw:
9003 if test "$cf_cv_utf8_lib" = "add-on" ; then
9004
9005 cat >>confdefs.h <<\EOF
9006 #define HAVE_LIBUTF8_H 1
9007 EOF
9008
9009 if test -n "$cf_cv_header_path_utf8" ; then
9010   for cf_add_incdir in $cf_cv_header_path_utf8
9011   do
9012         while test $cf_add_incdir != /usr/include
9013         do
9014           if test -d $cf_add_incdir
9015           then
9016                 cf_have_incdir=no
9017                 if test -n "$CFLAGS$CPPFLAGS" ; then
9018                   # a loop is needed to ensure we can add subdirs of existing dirs
9019                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9020                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9021                           cf_have_incdir=yes; break
9022                         fi
9023                   done
9024                 fi
9025
9026                 if test "$cf_have_incdir" = no ; then
9027                   if test "$cf_add_incdir" = /usr/local/include ; then
9028                         if test "$GCC" = yes
9029                         then
9030                           cf_save_CPPFLAGS=$CPPFLAGS
9031                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9032                           cat >conftest.$ac_ext <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9035 #include <stdio.h>
9036 int
9037 main ()
9038 {
9039 printf("Hello")
9040   ;
9041   return 0;
9042 }
9043 _ACEOF
9044 rm -f conftest.$ac_objext
9045 if { (eval echo "$as_me:9045: \"$ac_compile\"") >&5
9046   (eval $ac_compile) 2>&5
9047   ac_status=$?
9048   echo "$as_me:9048: \$? = $ac_status" >&5
9049   (exit $ac_status); } &&
9050          { ac_try='test -s conftest.$ac_objext'
9051   { (eval echo "$as_me:9051: \"$ac_try\"") >&5
9052   (eval $ac_try) 2>&5
9053   ac_status=$?
9054   echo "$as_me:9054: \$? = $ac_status" >&5
9055   (exit $ac_status); }; }; then
9056   :
9057 else
9058   echo "$as_me: failed program was:" >&5
9059 cat conftest.$ac_ext >&5
9060 cf_have_incdir=yes
9061 fi
9062 rm -f conftest.$ac_objext conftest.$ac_ext
9063                           CPPFLAGS=$cf_save_CPPFLAGS
9064                         fi
9065                   fi
9066                 fi
9067
9068                 if test "$cf_have_incdir" = no ; then
9069                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9070
9071 echo "${as_me:-configure}:9071: testing adding $cf_add_incdir to include-path ..." 1>&5
9072
9073                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9074
9075                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9076                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9077                   cf_add_incdir="$cf_top_incdir"
9078                 else
9079                   break
9080                 fi
9081           fi
9082         done
9083   done
9084 fi
9085
9086 if test -n "$cf_cv_library_path_utf8" ; then
9087   for cf_add_libdir in $cf_cv_library_path_utf8
9088   do
9089     if test $cf_add_libdir = /usr/lib ; then
9090       :
9091     elif test -d $cf_add_libdir
9092     then
9093       cf_have_libdir=no
9094       if test -n "$LDFLAGS$LIBS" ; then
9095         # a loop is needed to ensure we can add subdirs of existing dirs
9096         for cf_test_libdir in $LDFLAGS $LIBS ; do
9097           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9098             cf_have_libdir=yes; break
9099           fi
9100         done
9101       fi
9102       if test "$cf_have_libdir" = no ; then
9103         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9104
9105 echo "${as_me:-configure}:9105: testing adding $cf_add_libdir to library-path ..." 1>&5
9106
9107         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9108       fi
9109     fi
9110   done
9111 fi
9112
9113         LIBS="$cf_cv_library_file_utf8 $LIBS"
9114 fi
9115
9116                 if test "$cf_cv_utf8_lib" != no ; then
9117                         NCURSES_LIBUTF8=1
9118                 fi
9119         fi
9120
9121 # This is needed on Tru64 5.0 to declare mbstate_t
9122 echo "$as_me:9122: checking if we must include wchar.h to declare mbstate_t" >&5
9123 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9124 if test "${cf_cv_mbstate_t+set}" = set; then
9125   echo $ECHO_N "(cached) $ECHO_C" >&6
9126 else
9127
9128 cat >conftest.$ac_ext <<_ACEOF
9129 #line 9129 "configure"
9130 #include "confdefs.h"
9131
9132 #include <stdlib.h>
9133 #include <stdarg.h>
9134 #include <stdio.h>
9135 #ifdef HAVE_LIBUTF8_H
9136 #include <libutf8.h>
9137 #endif
9138 int
9139 main ()
9140 {
9141 mbstate_t state
9142   ;
9143   return 0;
9144 }
9145 _ACEOF
9146 rm -f conftest.$ac_objext
9147 if { (eval echo "$as_me:9147: \"$ac_compile\"") >&5
9148   (eval $ac_compile) 2>&5
9149   ac_status=$?
9150   echo "$as_me:9150: \$? = $ac_status" >&5
9151   (exit $ac_status); } &&
9152          { ac_try='test -s conftest.$ac_objext'
9153   { (eval echo "$as_me:9153: \"$ac_try\"") >&5
9154   (eval $ac_try) 2>&5
9155   ac_status=$?
9156   echo "$as_me:9156: \$? = $ac_status" >&5
9157   (exit $ac_status); }; }; then
9158   cf_cv_mbstate_t=no
9159 else
9160   echo "$as_me: failed program was:" >&5
9161 cat conftest.$ac_ext >&5
9162 cat >conftest.$ac_ext <<_ACEOF
9163 #line 9163 "configure"
9164 #include "confdefs.h"
9165
9166 #include <stdlib.h>
9167 #include <stdarg.h>
9168 #include <stdio.h>
9169 #include <wchar.h>
9170 #ifdef HAVE_LIBUTF8_H
9171 #include <libutf8.h>
9172 #endif
9173 int
9174 main ()
9175 {
9176 mbstate_t value
9177   ;
9178   return 0;
9179 }
9180 _ACEOF
9181 rm -f conftest.$ac_objext
9182 if { (eval echo "$as_me:9182: \"$ac_compile\"") >&5
9183   (eval $ac_compile) 2>&5
9184   ac_status=$?
9185   echo "$as_me:9185: \$? = $ac_status" >&5
9186   (exit $ac_status); } &&
9187          { ac_try='test -s conftest.$ac_objext'
9188   { (eval echo "$as_me:9188: \"$ac_try\"") >&5
9189   (eval $ac_try) 2>&5
9190   ac_status=$?
9191   echo "$as_me:9191: \$? = $ac_status" >&5
9192   (exit $ac_status); }; }; then
9193   cf_cv_mbstate_t=yes
9194 else
9195   echo "$as_me: failed program was:" >&5
9196 cat conftest.$ac_ext >&5
9197 cf_cv_mbstate_t=unknown
9198 fi
9199 rm -f conftest.$ac_objext conftest.$ac_ext
9200 fi
9201 rm -f conftest.$ac_objext conftest.$ac_ext
9202 fi
9203 echo "$as_me:9203: result: $cf_cv_mbstate_t" >&5
9204 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9205
9206 if test "$cf_cv_mbstate_t" = yes ; then
9207
9208 cat >>confdefs.h <<\EOF
9209 #define NEED_WCHAR_H 1
9210 EOF
9211
9212         NEED_WCHAR_H=1
9213 fi
9214
9215 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9216 if test "$cf_cv_mbstate_t" = unknown ; then
9217         NCURSES_MBSTATE_T=1
9218 fi
9219
9220 # This is needed on Tru64 5.0 to declare wchar_t
9221 echo "$as_me:9221: checking if we must include wchar.h to declare wchar_t" >&5
9222 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9223 if test "${cf_cv_wchar_t+set}" = set; then
9224   echo $ECHO_N "(cached) $ECHO_C" >&6
9225 else
9226
9227 cat >conftest.$ac_ext <<_ACEOF
9228 #line 9228 "configure"
9229 #include "confdefs.h"
9230
9231 #include <stdlib.h>
9232 #include <stdarg.h>
9233 #include <stdio.h>
9234 #ifdef HAVE_LIBUTF8_H
9235 #include <libutf8.h>
9236 #endif
9237 int
9238 main ()
9239 {
9240 wchar_t state
9241   ;
9242   return 0;
9243 }
9244 _ACEOF
9245 rm -f conftest.$ac_objext
9246 if { (eval echo "$as_me:9246: \"$ac_compile\"") >&5
9247   (eval $ac_compile) 2>&5
9248   ac_status=$?
9249   echo "$as_me:9249: \$? = $ac_status" >&5
9250   (exit $ac_status); } &&
9251          { ac_try='test -s conftest.$ac_objext'
9252   { (eval echo "$as_me:9252: \"$ac_try\"") >&5
9253   (eval $ac_try) 2>&5
9254   ac_status=$?
9255   echo "$as_me:9255: \$? = $ac_status" >&5
9256   (exit $ac_status); }; }; then
9257   cf_cv_wchar_t=no
9258 else
9259   echo "$as_me: failed program was:" >&5
9260 cat conftest.$ac_ext >&5
9261 cat >conftest.$ac_ext <<_ACEOF
9262 #line 9262 "configure"
9263 #include "confdefs.h"
9264
9265 #include <stdlib.h>
9266 #include <stdarg.h>
9267 #include <stdio.h>
9268 #include <wchar.h>
9269 #ifdef HAVE_LIBUTF8_H
9270 #include <libutf8.h>
9271 #endif
9272 int
9273 main ()
9274 {
9275 wchar_t value
9276   ;
9277   return 0;
9278 }
9279 _ACEOF
9280 rm -f conftest.$ac_objext
9281 if { (eval echo "$as_me:9281: \"$ac_compile\"") >&5
9282   (eval $ac_compile) 2>&5
9283   ac_status=$?
9284   echo "$as_me:9284: \$? = $ac_status" >&5
9285   (exit $ac_status); } &&
9286          { ac_try='test -s conftest.$ac_objext'
9287   { (eval echo "$as_me:9287: \"$ac_try\"") >&5
9288   (eval $ac_try) 2>&5
9289   ac_status=$?
9290   echo "$as_me:9290: \$? = $ac_status" >&5
9291   (exit $ac_status); }; }; then
9292   cf_cv_wchar_t=yes
9293 else
9294   echo "$as_me: failed program was:" >&5
9295 cat conftest.$ac_ext >&5
9296 cf_cv_wchar_t=unknown
9297 fi
9298 rm -f conftest.$ac_objext conftest.$ac_ext
9299 fi
9300 rm -f conftest.$ac_objext conftest.$ac_ext
9301 fi
9302 echo "$as_me:9302: result: $cf_cv_wchar_t" >&5
9303 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9304
9305 if test "$cf_cv_wchar_t" = yes ; then
9306
9307 cat >>confdefs.h <<\EOF
9308 #define NEED_WCHAR_H 1
9309 EOF
9310
9311         NEED_WCHAR_H=1
9312 fi
9313
9314 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9315 if test "$cf_cv_wchar_t" = unknown ; then
9316         NCURSES_WCHAR_T=1
9317 fi
9318
9319 # if we find wchar_t in either place, use substitution to provide a fallback.
9320 if test "$cf_cv_wchar_t" != unknown ; then
9321         NCURSES_OK_WCHAR_T=1
9322 fi
9323
9324 # This is needed on Tru64 5.0 to declare wint_t
9325 echo "$as_me:9325: checking if we must include wchar.h to declare wint_t" >&5
9326 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9327 if test "${cf_cv_wint_t+set}" = set; then
9328   echo $ECHO_N "(cached) $ECHO_C" >&6
9329 else
9330
9331 cat >conftest.$ac_ext <<_ACEOF
9332 #line 9332 "configure"
9333 #include "confdefs.h"
9334
9335 #include <stdlib.h>
9336 #include <stdarg.h>
9337 #include <stdio.h>
9338 #ifdef HAVE_LIBUTF8_H
9339 #include <libutf8.h>
9340 #endif
9341 int
9342 main ()
9343 {
9344 wint_t state
9345   ;
9346   return 0;
9347 }
9348 _ACEOF
9349 rm -f conftest.$ac_objext
9350 if { (eval echo "$as_me:9350: \"$ac_compile\"") >&5
9351   (eval $ac_compile) 2>&5
9352   ac_status=$?
9353   echo "$as_me:9353: \$? = $ac_status" >&5
9354   (exit $ac_status); } &&
9355          { ac_try='test -s conftest.$ac_objext'
9356   { (eval echo "$as_me:9356: \"$ac_try\"") >&5
9357   (eval $ac_try) 2>&5
9358   ac_status=$?
9359   echo "$as_me:9359: \$? = $ac_status" >&5
9360   (exit $ac_status); }; }; then
9361   cf_cv_wint_t=no
9362 else
9363   echo "$as_me: failed program was:" >&5
9364 cat conftest.$ac_ext >&5
9365 cat >conftest.$ac_ext <<_ACEOF
9366 #line 9366 "configure"
9367 #include "confdefs.h"
9368
9369 #include <stdlib.h>
9370 #include <stdarg.h>
9371 #include <stdio.h>
9372 #include <wchar.h>
9373 #ifdef HAVE_LIBUTF8_H
9374 #include <libutf8.h>
9375 #endif
9376 int
9377 main ()
9378 {
9379 wint_t value
9380   ;
9381   return 0;
9382 }
9383 _ACEOF
9384 rm -f conftest.$ac_objext
9385 if { (eval echo "$as_me:9385: \"$ac_compile\"") >&5
9386   (eval $ac_compile) 2>&5
9387   ac_status=$?
9388   echo "$as_me:9388: \$? = $ac_status" >&5
9389   (exit $ac_status); } &&
9390          { ac_try='test -s conftest.$ac_objext'
9391   { (eval echo "$as_me:9391: \"$ac_try\"") >&5
9392   (eval $ac_try) 2>&5
9393   ac_status=$?
9394   echo "$as_me:9394: \$? = $ac_status" >&5
9395   (exit $ac_status); }; }; then
9396   cf_cv_wint_t=yes
9397 else
9398   echo "$as_me: failed program was:" >&5
9399 cat conftest.$ac_ext >&5
9400 cf_cv_wint_t=unknown
9401 fi
9402 rm -f conftest.$ac_objext conftest.$ac_ext
9403 fi
9404 rm -f conftest.$ac_objext conftest.$ac_ext
9405 fi
9406 echo "$as_me:9406: result: $cf_cv_wint_t" >&5
9407 echo "${ECHO_T}$cf_cv_wint_t" >&6
9408
9409 if test "$cf_cv_wint_t" = yes ; then
9410
9411 cat >>confdefs.h <<\EOF
9412 #define NEED_WCHAR_H 1
9413 EOF
9414
9415         NEED_WCHAR_H=1
9416 fi
9417
9418 # if we do not find wint_t in either place, use substitution to provide a fallback.
9419 if test "$cf_cv_wint_t" = unknown ; then
9420         NCURSES_WINT_T=1
9421 fi
9422
9423 # if we find wint_t in either place, use substitution to provide a fallback.
9424 if test "$cf_cv_wint_t" != unknown ; then
9425         NCURSES_OK_WINT_T=1
9426 fi
9427
9428         if test "$NCURSES_MBSTATE_T" != 0; then
9429
9430 cat >>confdefs.h <<\EOF
9431 #define NEED_MBSTATE_T_DEF 1
9432 EOF
9433
9434         fi
9435 fi
9436
9437 ###   use option --disable-lp64 to allow long chtype
9438 case $cf_cv_abi_version in
9439 [345]*)
9440         default_with_lp64=no
9441         ;;
9442 *)
9443         default_with_lp64=yes
9444         ;;
9445 esac
9446
9447 echo "$as_me:9447: checking whether to enable _LP64 definition in curses.h" >&5
9448 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9449
9450 # Check whether --enable-lp64 or --disable-lp64 was given.
9451 if test "${enable_lp64+set}" = set; then
9452   enableval="$enable_lp64"
9453   with_lp64=$enableval
9454 else
9455   with_lp64=$default_with_lp64
9456 fi;
9457 echo "$as_me:9457: result: $with_lp64" >&5
9458 echo "${ECHO_T}$with_lp64" >&6
9459
9460 if test "x$with_lp64" = xyes ; then
9461         cf_cv_enable_lp64=1
9462 else
9463         cf_cv_enable_lp64=0
9464 fi
9465
9466 # Check whether --enable-largefile or --disable-largefile was given.
9467 if test "${enable_largefile+set}" = set; then
9468   enableval="$enable_largefile"
9469
9470 fi;
9471 if test "$enable_largefile" != no; then
9472
9473   echo "$as_me:9473: checking for special C compiler options needed for large files" >&5
9474 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9475 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9476   echo $ECHO_N "(cached) $ECHO_C" >&6
9477 else
9478   ac_cv_sys_largefile_CC=no
9479      if test "$GCC" != yes; then
9480        ac_save_CC=$CC
9481        while :; do
9482          # IRIX 6.2 and later do not support large files by default,
9483          # so use the C compiler's -n32 option if that helps.
9484          cat >conftest.$ac_ext <<_ACEOF
9485 #line 9485 "configure"
9486 #include "confdefs.h"
9487 #include <sys/types.h>
9488  /* Check that off_t can represent 2**63 - 1 correctly.
9489     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9490     since some C++ compilers masquerading as C compilers
9491     incorrectly reject 9223372036854775807.  */
9492 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9493   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9494                        && LARGE_OFF_T % 2147483647 == 1)
9495                       ? 1 : -1];
9496 int
9497 main ()
9498 {
9499
9500   ;
9501   return 0;
9502 }
9503 _ACEOF
9504          rm -f conftest.$ac_objext
9505 if { (eval echo "$as_me:9505: \"$ac_compile\"") >&5
9506   (eval $ac_compile) 2>&5
9507   ac_status=$?
9508   echo "$as_me:9508: \$? = $ac_status" >&5
9509   (exit $ac_status); } &&
9510          { ac_try='test -s conftest.$ac_objext'
9511   { (eval echo "$as_me:9511: \"$ac_try\"") >&5
9512   (eval $ac_try) 2>&5
9513   ac_status=$?
9514   echo "$as_me:9514: \$? = $ac_status" >&5
9515   (exit $ac_status); }; }; then
9516   break
9517 else
9518   echo "$as_me: failed program was:" >&5
9519 cat conftest.$ac_ext >&5
9520 fi
9521 rm -f conftest.$ac_objext
9522          CC="$CC -n32"
9523          rm -f conftest.$ac_objext
9524 if { (eval echo "$as_me:9524: \"$ac_compile\"") >&5
9525   (eval $ac_compile) 2>&5
9526   ac_status=$?
9527   echo "$as_me:9527: \$? = $ac_status" >&5
9528   (exit $ac_status); } &&
9529          { ac_try='test -s conftest.$ac_objext'
9530   { (eval echo "$as_me:9530: \"$ac_try\"") >&5
9531   (eval $ac_try) 2>&5
9532   ac_status=$?
9533   echo "$as_me:9533: \$? = $ac_status" >&5
9534   (exit $ac_status); }; }; then
9535   ac_cv_sys_largefile_CC=' -n32'; break
9536 else
9537   echo "$as_me: failed program was:" >&5
9538 cat conftest.$ac_ext >&5
9539 fi
9540 rm -f conftest.$ac_objext
9541          break
9542        done
9543        CC=$ac_save_CC
9544        rm -f conftest.$ac_ext
9545     fi
9546 fi
9547 echo "$as_me:9547: result: $ac_cv_sys_largefile_CC" >&5
9548 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9549   if test "$ac_cv_sys_largefile_CC" != no; then
9550     CC=$CC$ac_cv_sys_largefile_CC
9551   fi
9552
9553   echo "$as_me:9553: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9554 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9555 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9556   echo $ECHO_N "(cached) $ECHO_C" >&6
9557 else
9558   while :; do
9559   ac_cv_sys_file_offset_bits=no
9560   cat >conftest.$ac_ext <<_ACEOF
9561 #line 9561 "configure"
9562 #include "confdefs.h"
9563 #include <sys/types.h>
9564  /* Check that off_t can represent 2**63 - 1 correctly.
9565     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9566     since some C++ compilers masquerading as C compilers
9567     incorrectly reject 9223372036854775807.  */
9568 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9569   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9570                        && LARGE_OFF_T % 2147483647 == 1)
9571                       ? 1 : -1];
9572 int
9573 main ()
9574 {
9575
9576   ;
9577   return 0;
9578 }
9579 _ACEOF
9580 rm -f conftest.$ac_objext
9581 if { (eval echo "$as_me:9581: \"$ac_compile\"") >&5
9582   (eval $ac_compile) 2>&5
9583   ac_status=$?
9584   echo "$as_me:9584: \$? = $ac_status" >&5
9585   (exit $ac_status); } &&
9586          { ac_try='test -s conftest.$ac_objext'
9587   { (eval echo "$as_me:9587: \"$ac_try\"") >&5
9588   (eval $ac_try) 2>&5
9589   ac_status=$?
9590   echo "$as_me:9590: \$? = $ac_status" >&5
9591   (exit $ac_status); }; }; then
9592   break
9593 else
9594   echo "$as_me: failed program was:" >&5
9595 cat conftest.$ac_ext >&5
9596 fi
9597 rm -f conftest.$ac_objext conftest.$ac_ext
9598   cat >conftest.$ac_ext <<_ACEOF
9599 #line 9599 "configure"
9600 #include "confdefs.h"
9601 #define _FILE_OFFSET_BITS 64
9602 #include <sys/types.h>
9603  /* Check that off_t can represent 2**63 - 1 correctly.
9604     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9605     since some C++ compilers masquerading as C compilers
9606     incorrectly reject 9223372036854775807.  */
9607 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9608   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9609                        && LARGE_OFF_T % 2147483647 == 1)
9610                       ? 1 : -1];
9611 int
9612 main ()
9613 {
9614
9615   ;
9616   return 0;
9617 }
9618 _ACEOF
9619 rm -f conftest.$ac_objext
9620 if { (eval echo "$as_me:9620: \"$ac_compile\"") >&5
9621   (eval $ac_compile) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit $ac_status); } &&
9625          { ac_try='test -s conftest.$ac_objext'
9626   { (eval echo "$as_me:9626: \"$ac_try\"") >&5
9627   (eval $ac_try) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit $ac_status); }; }; then
9631   ac_cv_sys_file_offset_bits=64; break
9632 else
9633   echo "$as_me: failed program was:" >&5
9634 cat conftest.$ac_ext >&5
9635 fi
9636 rm -f conftest.$ac_objext conftest.$ac_ext
9637   break
9638 done
9639 fi
9640 echo "$as_me:9640: result: $ac_cv_sys_file_offset_bits" >&5
9641 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9642 if test "$ac_cv_sys_file_offset_bits" != no; then
9643
9644 cat >>confdefs.h <<EOF
9645 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9646 EOF
9647
9648 fi
9649 rm -rf conftest*
9650   echo "$as_me:9650: checking for _LARGE_FILES value needed for large files" >&5
9651 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9652 if test "${ac_cv_sys_large_files+set}" = set; then
9653   echo $ECHO_N "(cached) $ECHO_C" >&6
9654 else
9655   while :; do
9656   ac_cv_sys_large_files=no
9657   cat >conftest.$ac_ext <<_ACEOF
9658 #line 9658 "configure"
9659 #include "confdefs.h"
9660 #include <sys/types.h>
9661  /* Check that off_t can represent 2**63 - 1 correctly.
9662     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9663     since some C++ compilers masquerading as C compilers
9664     incorrectly reject 9223372036854775807.  */
9665 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9666   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9667                        && LARGE_OFF_T % 2147483647 == 1)
9668                       ? 1 : -1];
9669 int
9670 main ()
9671 {
9672
9673   ;
9674   return 0;
9675 }
9676 _ACEOF
9677 rm -f conftest.$ac_objext
9678 if { (eval echo "$as_me:9678: \"$ac_compile\"") >&5
9679   (eval $ac_compile) 2>&5
9680   ac_status=$?
9681   echo "$as_me:9681: \$? = $ac_status" >&5
9682   (exit $ac_status); } &&
9683          { ac_try='test -s conftest.$ac_objext'
9684   { (eval echo "$as_me:9684: \"$ac_try\"") >&5
9685   (eval $ac_try) 2>&5
9686   ac_status=$?
9687   echo "$as_me:9687: \$? = $ac_status" >&5
9688   (exit $ac_status); }; }; then
9689   break
9690 else
9691   echo "$as_me: failed program was:" >&5
9692 cat conftest.$ac_ext >&5
9693 fi
9694 rm -f conftest.$ac_objext conftest.$ac_ext
9695   cat >conftest.$ac_ext <<_ACEOF
9696 #line 9696 "configure"
9697 #include "confdefs.h"
9698 #define _LARGE_FILES 1
9699 #include <sys/types.h>
9700  /* Check that off_t can represent 2**63 - 1 correctly.
9701     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9702     since some C++ compilers masquerading as C compilers
9703     incorrectly reject 9223372036854775807.  */
9704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9705   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9706                        && LARGE_OFF_T % 2147483647 == 1)
9707                       ? 1 : -1];
9708 int
9709 main ()
9710 {
9711
9712   ;
9713   return 0;
9714 }
9715 _ACEOF
9716 rm -f conftest.$ac_objext
9717 if { (eval echo "$as_me:9717: \"$ac_compile\"") >&5
9718   (eval $ac_compile) 2>&5
9719   ac_status=$?
9720   echo "$as_me:9720: \$? = $ac_status" >&5
9721   (exit $ac_status); } &&
9722          { ac_try='test -s conftest.$ac_objext'
9723   { (eval echo "$as_me:9723: \"$ac_try\"") >&5
9724   (eval $ac_try) 2>&5
9725   ac_status=$?
9726   echo "$as_me:9726: \$? = $ac_status" >&5
9727   (exit $ac_status); }; }; then
9728   ac_cv_sys_large_files=1; break
9729 else
9730   echo "$as_me: failed program was:" >&5
9731 cat conftest.$ac_ext >&5
9732 fi
9733 rm -f conftest.$ac_objext conftest.$ac_ext
9734   break
9735 done
9736 fi
9737 echo "$as_me:9737: result: $ac_cv_sys_large_files" >&5
9738 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9739 if test "$ac_cv_sys_large_files" != no; then
9740
9741 cat >>confdefs.h <<EOF
9742 #define _LARGE_FILES $ac_cv_sys_large_files
9743 EOF
9744
9745 fi
9746 rm -rf conftest*
9747 fi
9748
9749     if test "$enable_largefile" != no ; then
9750         echo "$as_me:9750: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9751 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9752 if test "${ac_cv_sys_largefile_source+set}" = set; then
9753   echo $ECHO_N "(cached) $ECHO_C" >&6
9754 else
9755   while :; do
9756   ac_cv_sys_largefile_source=no
9757   cat >conftest.$ac_ext <<_ACEOF
9758 #line 9758 "configure"
9759 #include "confdefs.h"
9760 #include <stdio.h>
9761 int
9762 main ()
9763 {
9764 return !fseeko;
9765   ;
9766   return 0;
9767 }
9768 _ACEOF
9769 rm -f conftest.$ac_objext
9770 if { (eval echo "$as_me:9770: \"$ac_compile\"") >&5
9771   (eval $ac_compile) 2>&5
9772   ac_status=$?
9773   echo "$as_me:9773: \$? = $ac_status" >&5
9774   (exit $ac_status); } &&
9775          { ac_try='test -s conftest.$ac_objext'
9776   { (eval echo "$as_me:9776: \"$ac_try\"") >&5
9777   (eval $ac_try) 2>&5
9778   ac_status=$?
9779   echo "$as_me:9779: \$? = $ac_status" >&5
9780   (exit $ac_status); }; }; then
9781   break
9782 else
9783   echo "$as_me: failed program was:" >&5
9784 cat conftest.$ac_ext >&5
9785 fi
9786 rm -f conftest.$ac_objext conftest.$ac_ext
9787   cat >conftest.$ac_ext <<_ACEOF
9788 #line 9788 "configure"
9789 #include "confdefs.h"
9790 #define _LARGEFILE_SOURCE 1
9791 #include <stdio.h>
9792 int
9793 main ()
9794 {
9795 return !fseeko;
9796   ;
9797   return 0;
9798 }
9799 _ACEOF
9800 rm -f conftest.$ac_objext
9801 if { (eval echo "$as_me:9801: \"$ac_compile\"") >&5
9802   (eval $ac_compile) 2>&5
9803   ac_status=$?
9804   echo "$as_me:9804: \$? = $ac_status" >&5
9805   (exit $ac_status); } &&
9806          { ac_try='test -s conftest.$ac_objext'
9807   { (eval echo "$as_me:9807: \"$ac_try\"") >&5
9808   (eval $ac_try) 2>&5
9809   ac_status=$?
9810   echo "$as_me:9810: \$? = $ac_status" >&5
9811   (exit $ac_status); }; }; then
9812   ac_cv_sys_largefile_source=1; break
9813 else
9814   echo "$as_me: failed program was:" >&5
9815 cat conftest.$ac_ext >&5
9816 fi
9817 rm -f conftest.$ac_objext conftest.$ac_ext
9818   break
9819 done
9820 fi
9821 echo "$as_me:9821: result: $ac_cv_sys_largefile_source" >&5
9822 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9823 if test "$ac_cv_sys_largefile_source" != no; then
9824
9825 cat >>confdefs.h <<EOF
9826 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9827 EOF
9828
9829 fi
9830 rm -rf conftest*
9831
9832 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9833 # in glibc 2.1.3, but that breaks too many other things.
9834 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9835 echo "$as_me:9835: checking for fseeko" >&5
9836 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9837 if test "${ac_cv_func_fseeko+set}" = set; then
9838   echo $ECHO_N "(cached) $ECHO_C" >&6
9839 else
9840   cat >conftest.$ac_ext <<_ACEOF
9841 #line 9841 "configure"
9842 #include "confdefs.h"
9843 #include <stdio.h>
9844 int
9845 main ()
9846 {
9847 return fseeko && fseeko (stdin, 0, 0);
9848   ;
9849   return 0;
9850 }
9851 _ACEOF
9852 rm -f conftest.$ac_objext conftest$ac_exeext
9853 if { (eval echo "$as_me:9853: \"$ac_link\"") >&5
9854   (eval $ac_link) 2>&5
9855   ac_status=$?
9856   echo "$as_me:9856: \$? = $ac_status" >&5
9857   (exit $ac_status); } &&
9858          { ac_try='test -s conftest$ac_exeext'
9859   { (eval echo "$as_me:9859: \"$ac_try\"") >&5
9860   (eval $ac_try) 2>&5
9861   ac_status=$?
9862   echo "$as_me:9862: \$? = $ac_status" >&5
9863   (exit $ac_status); }; }; then
9864   ac_cv_func_fseeko=yes
9865 else
9866   echo "$as_me: failed program was:" >&5
9867 cat conftest.$ac_ext >&5
9868 ac_cv_func_fseeko=no
9869 fi
9870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9871 fi
9872 echo "$as_me:9872: result: $ac_cv_func_fseeko" >&5
9873 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9874 if test $ac_cv_func_fseeko = yes; then
9875
9876 cat >>confdefs.h <<\EOF
9877 #define HAVE_FSEEKO 1
9878 EOF
9879
9880 fi
9881
9882         # Normally we would collect these definitions in the config.h,
9883         # but (like _XOPEN_SOURCE), some environments rely on having these
9884         # defined before any of the system headers are included.  Another
9885         # case comes up with C++, e.g., on AIX the compiler compiles the
9886         # header files by themselves before looking at the body files it is
9887         # told to compile.  For ncurses, those header files do not include
9888         # the config.h
9889         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9890         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9891         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9892
9893         echo "$as_me:9893: checking whether to use struct dirent64" >&5
9894 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9895 if test "${cf_cv_struct_dirent64+set}" = set; then
9896   echo $ECHO_N "(cached) $ECHO_C" >&6
9897 else
9898
9899                 cat >conftest.$ac_ext <<_ACEOF
9900 #line 9900 "configure"
9901 #include "confdefs.h"
9902
9903 #include <sys/types.h>
9904 #include <dirent.h>
9905
9906 int
9907 main ()
9908 {
9909
9910                 /* if transitional largefile support is setup, this is true */
9911                 extern struct dirent64 * readdir(DIR *);
9912                 struct dirent64 *x = readdir((DIR *)0);
9913                 struct dirent *y = readdir((DIR *)0);
9914                 int z = x - y;
9915
9916   ;
9917   return 0;
9918 }
9919 _ACEOF
9920 rm -f conftest.$ac_objext
9921 if { (eval echo "$as_me:9921: \"$ac_compile\"") >&5
9922   (eval $ac_compile) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit $ac_status); } &&
9926          { ac_try='test -s conftest.$ac_objext'
9927   { (eval echo "$as_me:9927: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit $ac_status); }; }; then
9932   cf_cv_struct_dirent64=yes
9933 else
9934   echo "$as_me: failed program was:" >&5
9935 cat conftest.$ac_ext >&5
9936 cf_cv_struct_dirent64=no
9937 fi
9938 rm -f conftest.$ac_objext conftest.$ac_ext
9939
9940 fi
9941 echo "$as_me:9941: result: $cf_cv_struct_dirent64" >&5
9942 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9943         test "$cf_cv_struct_dirent64" = yes &&
9944 cat >>confdefs.h <<\EOF
9945 #define HAVE_STRUCT_DIRENT64 1
9946 EOF
9947
9948     fi
9949
9950 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9951 echo "$as_me:9951: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9952 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9953
9954 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9955 if test "${enable_tparm_varargs+set}" = set; then
9956   enableval="$enable_tparm_varargs"
9957   with_tparm_varargs=$enableval
9958 else
9959   with_tparm_varargs=yes
9960 fi;
9961 echo "$as_me:9961: result: $with_tparm_varargs" >&5
9962 echo "${ECHO_T}$with_tparm_varargs" >&6
9963 NCURSES_TPARM_VARARGS=0
9964 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
9965
9966 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9967 if test "$with_ticlib" != no ; then
9968 echo "$as_me:9968: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9969 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9970
9971 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9972 if test "${enable_tic_depends+set}" = set; then
9973   enableval="$enable_tic_depends"
9974   with_tic_depends=$enableval
9975 else
9976   with_tic_depends=yes
9977 fi;
9978 echo "$as_me:9978: result: $with_tic_depends" >&5
9979 echo "${ECHO_T}$with_tic_depends" >&6
9980 else
9981         with_tic_depends=no
9982 fi
9983
9984 ###   use option --with-bool to override bool's type
9985 echo "$as_me:9985: checking for type of bool" >&5
9986 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9987
9988 # Check whether --with-bool or --without-bool was given.
9989 if test "${with_bool+set}" = set; then
9990   withval="$with_bool"
9991   NCURSES_BOOL="$withval"
9992 else
9993   NCURSES_BOOL=auto
9994 fi;
9995 echo "$as_me:9995: result: $NCURSES_BOOL" >&5
9996 echo "${ECHO_T}$NCURSES_BOOL" >&6
9997
9998 echo "$as_me:9998: checking for alternate terminal capabilities file" >&5
9999 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10000
10001 # Check whether --with-caps or --without-caps was given.
10002 if test "${with_caps+set}" = set; then
10003   withval="$with_caps"
10004   TERMINFO_CAPS=Caps.$withval
10005 else
10006   TERMINFO_CAPS=Caps
10007 fi;
10008 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10009 echo "$as_me:10009: result: $TERMINFO_CAPS" >&5
10010 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10011
10012 ###   use option --with-chtype to override chtype's type
10013 echo "$as_me:10013: checking for type of chtype" >&5
10014 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10015
10016 # Check whether --with-chtype or --without-chtype was given.
10017 if test "${with_chtype+set}" = set; then
10018   withval="$with_chtype"
10019   NCURSES_CHTYPE="$withval"
10020 else
10021   NCURSES_CHTYPE=auto
10022 fi;
10023 echo "$as_me:10023: result: $NCURSES_CHTYPE" >&5
10024 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10025
10026 ###   use option --with-ospeed to override ospeed's type
10027 echo "$as_me:10027: checking for type of ospeed" >&5
10028 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10029
10030 # Check whether --with-ospeed or --without-ospeed was given.
10031 if test "${with_ospeed+set}" = set; then
10032   withval="$with_ospeed"
10033   NCURSES_OSPEED="$withval"
10034 else
10035   NCURSES_OSPEED=short
10036 fi;
10037 echo "$as_me:10037: result: $NCURSES_OSPEED" >&5
10038 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10039
10040 ###   use option --with-mmask-t to override mmask_t's type
10041 echo "$as_me:10041: checking for type of mmask_t" >&5
10042 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10043
10044 # Check whether --with-mmask-t or --without-mmask-t was given.
10045 if test "${with_mmask_t+set}" = set; then
10046   withval="$with_mmask_t"
10047   NCURSES_MMASK_T="$withval"
10048 else
10049   NCURSES_MMASK_T=auto
10050 fi;
10051 echo "$as_me:10051: result: $NCURSES_MMASK_T" >&5
10052 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10053
10054 ###   use option --with-ccharw-max to override CCHARW_MAX size
10055 echo "$as_me:10055: checking for size CCHARW_MAX" >&5
10056 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10057
10058 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10059 if test "${with_ccharw_max+set}" = set; then
10060   withval="$with_ccharw_max"
10061   NCURSES_CCHARW_MAX="$withval"
10062 else
10063   NCURSES_CCHARW_MAX=5
10064 fi;
10065 echo "$as_me:10065: result: $NCURSES_CCHARW_MAX" >&5
10066 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10067
10068 ###   use option --with-tparm-arg to override tparm's argument type
10069 echo "$as_me:10069: checking for type of tparm args" >&5
10070 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10071
10072 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10073 if test "${with_tparm_arg+set}" = set; then
10074   withval="$with_tparm_arg"
10075   NCURSES_TPARM_ARG="$withval"
10076 else
10077   NCURSES_TPARM_ARG=long
10078 fi;
10079 echo "$as_me:10079: result: $NCURSES_TPARM_ARG" >&5
10080 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10081
10082 ### Enable compiling-in rcs id's
10083 echo "$as_me:10083: checking if RCS identifiers should be compiled-in" >&5
10084 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10085
10086 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10087 if test "${with_rcs_ids+set}" = set; then
10088   withval="$with_rcs_ids"
10089   with_rcs_ids=$withval
10090 else
10091   with_rcs_ids=no
10092 fi;
10093 echo "$as_me:10093: result: $with_rcs_ids" >&5
10094 echo "${ECHO_T}$with_rcs_ids" >&6
10095 test "x$with_rcs_ids" = xyes &&
10096 cat >>confdefs.h <<\EOF
10097 #define USE_RCS_IDS 1
10098 EOF
10099
10100 ###############################################################################
10101
10102 echo "$as_me:10102: checking format of man-pages" >&5
10103 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10104
10105 # Check whether --with-manpage-format or --without-manpage-format was given.
10106 if test "${with_manpage_format+set}" = set; then
10107   withval="$with_manpage_format"
10108   MANPAGE_FORMAT=$withval
10109 else
10110   MANPAGE_FORMAT=unknown
10111 fi;
10112
10113 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10114 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10115
10116 cf_unknown=
10117
10118 case $MANPAGE_FORMAT in
10119 unknown)
10120   if test -z "$MANPATH" ; then
10121     MANPATH="/usr/man:/usr/share/man"
10122   fi
10123
10124   # look for the 'date' man-page (it's most likely to be installed!)
10125   MANPAGE_FORMAT=
10126   cf_preform=no
10127   cf_catonly=yes
10128   cf_example=date
10129
10130   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10131   for cf_dir in $MANPATH; do
10132     test -z "$cf_dir" && cf_dir=/usr/man
10133     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
10134     do
10135       cf_test=`echo $cf_name | sed -e 's/*//'`
10136       if test "x$cf_test" = "x$cf_name" ; then
10137
10138         case "$cf_name" in
10139         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10140         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10141         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10142         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10143         esac
10144
10145         case "$cf_name" in
10146         $cf_dir/man*)
10147           cf_catonly=no
10148           ;;
10149         $cf_dir/cat*)
10150           cf_preform=yes
10151           ;;
10152         esac
10153         break
10154       fi
10155
10156       # if we found a match in either man* or cat*, stop looking
10157       if test -n "$MANPAGE_FORMAT" ; then
10158         cf_found=no
10159         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10160         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10161         case "$cf_name" in
10162         $cf_dir/cat*)
10163           cf_found=yes
10164           ;;
10165         esac
10166         test $cf_found=yes && break
10167       fi
10168     done
10169     # only check the first directory in $MANPATH where we find manpages
10170     if test -n "$MANPAGE_FORMAT" ; then
10171        break
10172     fi
10173   done
10174   # if we did not find the example, just assume it is normal
10175   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10176   IFS="$ac_save_ifs"
10177   ;;
10178 *)
10179   for cf_option in $MANPAGE_FORMAT; do
10180      case $cf_option in #(vi
10181      gzip|compress|BSDI|normal|formatted|catonly)
10182        ;;
10183      *)
10184        cf_unknown="$cf_unknown $cf_option"
10185        ;;
10186      esac
10187   done
10188   ;;
10189 esac
10190
10191 echo "$as_me:10191: result: $MANPAGE_FORMAT" >&5
10192 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10193 if test -n "$cf_unknown" ; then
10194   { echo "$as_me:10194: WARNING: Unexpected manpage-format $cf_unknown" >&5
10195 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10196 fi
10197
10198 echo "$as_me:10198: checking for manpage renaming" >&5
10199 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10200
10201 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10202 if test "${with_manpage_renames+set}" = set; then
10203   withval="$with_manpage_renames"
10204   MANPAGE_RENAMES=$withval
10205 else
10206   MANPAGE_RENAMES=yes
10207 fi;
10208
10209 case ".$MANPAGE_RENAMES" in #(vi
10210 .no) #(vi
10211   ;;
10212 .|.yes)
10213   # Debian 'man' program?
10214   if test -f /etc/debian_version ; then
10215     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10216   else
10217     MANPAGE_RENAMES=no
10218   fi
10219   ;;
10220 esac
10221
10222 if test "$MANPAGE_RENAMES" != no ; then
10223   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10224     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10225   elif test ! -f $MANPAGE_RENAMES ; then
10226     { { echo "$as_me:10226: error: not a filename: $MANPAGE_RENAMES" >&5
10227 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10228    { (exit 1); exit 1; }; }
10229   fi
10230
10231   test ! -d man && mkdir man
10232
10233   # Construct a sed-script to perform renaming within man-pages
10234   if test -n "$MANPAGE_RENAMES" ; then
10235     test ! -d man && mkdir man
10236     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10237   fi
10238 fi
10239
10240 echo "$as_me:10240: result: $MANPAGE_RENAMES" >&5
10241 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10242
10243 echo "$as_me:10243: checking if manpage aliases will be installed" >&5
10244 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10245
10246 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10247 if test "${with_manpage_aliases+set}" = set; then
10248   withval="$with_manpage_aliases"
10249   MANPAGE_ALIASES=$withval
10250 else
10251   MANPAGE_ALIASES=yes
10252 fi;
10253
10254 echo "$as_me:10254: result: $MANPAGE_ALIASES" >&5
10255 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10256
10257 case "x$LN_S" in #(vi
10258 xln*) #(vi
10259         cf_use_symlinks=yes
10260         ;;
10261 *)
10262         cf_use_symlinks=no
10263         ;;
10264 esac
10265
10266 MANPAGE_SYMLINKS=no
10267 if test "$MANPAGE_ALIASES" = yes ; then
10268 echo "$as_me:10268: checking if manpage symlinks should be used" >&5
10269 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10270
10271 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10272 if test "${with_manpage_symlinks+set}" = set; then
10273   withval="$with_manpage_symlinks"
10274   MANPAGE_SYMLINKS=$withval
10275 else
10276   MANPAGE_SYMLINKS=$cf_use_symlinks
10277 fi;
10278
10279 if test "$$cf_use_symlinks" = no; then
10280 if test "$MANPAGE_SYMLINKS" = yes ; then
10281         { echo "$as_me:10281: WARNING: cannot make symlinks" >&5
10282 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10283         MANPAGE_SYMLINKS=no
10284 fi
10285 fi
10286
10287 echo "$as_me:10287: result: $MANPAGE_SYMLINKS" >&5
10288 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10289 fi
10290
10291 echo "$as_me:10291: checking for manpage tbl" >&5
10292 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10293
10294 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10295 if test "${with_manpage_tbl+set}" = set; then
10296   withval="$with_manpage_tbl"
10297   MANPAGE_TBL=$withval
10298 else
10299   MANPAGE_TBL=no
10300 fi;
10301
10302 echo "$as_me:10302: result: $MANPAGE_TBL" >&5
10303 echo "${ECHO_T}$MANPAGE_TBL" >&6
10304
10305   if test "$prefix" = "NONE" ; then
10306      cf_prefix="$ac_default_prefix"
10307   else
10308      cf_prefix="$prefix"
10309   fi
10310
10311   case "$MANPAGE_FORMAT" in # (vi
10312   *catonly*) # (vi
10313     cf_format=yes
10314     cf_inboth=no
10315     ;;
10316   *formatted*) # (vi
10317     cf_format=yes
10318     cf_inboth=yes
10319     ;;
10320   *)
10321     cf_format=no
10322     cf_inboth=no
10323     ;;
10324   esac
10325
10326 test ! -d man && mkdir man
10327
10328 cf_so_strip=
10329 cf_compress=
10330 case "$MANPAGE_FORMAT" in #(vi
10331 *compress*) #(vi
10332         cf_so_strip="Z"
10333         cf_compress=compress
10334   ;;
10335 *gzip*)
10336         cf_so_strip="gz"
10337         cf_compress=gzip
10338   ;;
10339 esac
10340
10341 cf_edit_man=./edit_man.sh
10342 cf_man_alias=`pwd`/man_alias.sed
10343
10344 cat >$cf_edit_man <<CF_EOF
10345 #! /bin/sh
10346 # this script is generated by the configure-script CF_MAN_PAGES macro.
10347
10348 prefix="$cf_prefix"
10349 datarootdir="$datarootdir"
10350 datadir="$datadir"
10351
10352 NCURSES_MAJOR="$NCURSES_MAJOR"
10353 NCURSES_MINOR="$NCURSES_MINOR"
10354 NCURSES_PATCH="$NCURSES_PATCH"
10355
10356 NCURSES_OSPEED="$NCURSES_OSPEED"
10357 TERMINFO="$TERMINFO"
10358
10359 INSTALL="$INSTALL"
10360 INSTALL_DATA="$INSTALL_DATA"
10361
10362 transform="$program_transform_name"
10363
10364 TMP=\${TMPDIR:=/tmp}/man\$\$
10365 trap "rm -f \$TMP" 0 1 2 5 15
10366
10367 form=\$1
10368 shift || exit 1
10369
10370 verb=\$1
10371 shift || exit 1
10372
10373 mandir=\$1
10374 shift || exit 1
10375
10376 srcdir=\$1
10377 top_srcdir=\$srcdir/..
10378 shift || exit 1
10379
10380 if test "\$form" = normal ; then
10381         if test "$cf_format" = yes ; then
10382         if test "$cf_inboth" = no ; then
10383                 sh \$0 format \$verb \$mandir \$srcdir \$*
10384                 exit $?
10385         fi
10386         fi
10387         cf_subdir=\$mandir/man
10388         cf_tables=$MANPAGE_TBL
10389 else
10390         cf_subdir=\$mandir/cat
10391         cf_tables=yes
10392 fi
10393
10394 # process the list of source-files
10395 for i in \$* ; do
10396 case \$i in #(vi
10397 *.orig|*.rej) ;; #(vi
10398 *.[0-9]*)
10399         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10400         if test \$verb = installing ; then
10401         if test ! -d \$cf_subdir\${section} ; then
10402                 mkdir -p \$cf_subdir\$section
10403         fi
10404         fi
10405
10406         # replace variables in man page
10407         if test ! -f $cf_man_alias ; then
10408 cat >>$cf_man_alias <<-CF_EOF2
10409                 s,@DATADIR@,\$datadir,g
10410                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10411                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10412                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10413                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10414                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10415                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10416 CF_EOF
10417
10418         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10419         do
10420                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10421                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10422 cat >>$cf_edit_man <<-CF_EOF
10423                 s,@$cf_NAME@,$cf_name,g
10424 CF_EOF
10425         done
10426
10427 cat >>$cf_edit_man <<CF_EOF
10428 CF_EOF2
10429                 echo "...made $cf_man_alias"
10430         fi
10431
10432         aliases=
10433         cf_source=\`basename \$i\`
10434         inalias=\$cf_source
10435         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10436         if test ! -f \$inalias ; then
10437                 echo .. skipped \$cf_source
10438                 continue
10439         fi
10440 CF_EOF
10441
10442 if test "$MANPAGE_ALIASES" != no ; then
10443 cat >>$cf_edit_man <<CF_EOF
10444         nCurses=ignore.3x
10445         test $with_curses_h = yes && nCurses=ncurses.3x
10446         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10447 CF_EOF
10448 fi
10449
10450 if test "$MANPAGE_RENAMES" = no ; then
10451 cat >>$cf_edit_man <<CF_EOF
10452         # perform program transformations for section 1 man pages
10453         if test \$section = 1 ; then
10454                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10455         else
10456                 cf_target=\$cf_subdir\${section}/\$cf_source
10457         fi
10458 CF_EOF
10459 else
10460 cat >>$cf_edit_man <<CF_EOF
10461         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10462         if test -z "\$cf_target" ; then
10463                 echo '? missing rename for '\$cf_source
10464                 cf_target="\$cf_source"
10465         fi
10466         cf_target="\$cf_subdir\${section}/\${cf_target}"
10467
10468 CF_EOF
10469 fi
10470
10471 cat >>$cf_edit_man <<CF_EOF
10472         sed     -f $cf_man_alias \\
10473 CF_EOF
10474
10475 if test -f $MANPAGE_RENAMES ; then
10476 cat >>$cf_edit_man <<CF_EOF
10477                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10478 CF_EOF
10479 else
10480 cat >>$cf_edit_man <<CF_EOF
10481                 < \$i >\$TMP
10482 CF_EOF
10483 fi
10484
10485 cat >>$cf_edit_man <<CF_EOF
10486 if test \$cf_tables = yes ; then
10487         tbl \$TMP >\$TMP.out
10488         mv \$TMP.out \$TMP
10489 fi
10490 CF_EOF
10491
10492 if test $with_overwrite != yes ; then
10493 cat >>$cf_edit_man <<CF_EOF
10494         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10495         mv \$TMP.out \$TMP
10496 CF_EOF
10497 fi
10498
10499 if test $with_curses_h != yes ; then
10500 cat >>$cf_edit_man <<CF_EOF
10501         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10502         mv \$TMP.out \$TMP
10503 CF_EOF
10504 fi
10505
10506 cat >>$cf_edit_man <<CF_EOF
10507         if test \$form = format ; then
10508                 nroff -man \$TMP >\$TMP.out
10509                 mv \$TMP.out \$TMP
10510         fi
10511 CF_EOF
10512
10513 if test -n "$cf_compress" ; then
10514 cat >>$cf_edit_man <<CF_EOF
10515         if test \$verb = installing ; then
10516         if ( $cf_compress -f \$TMP )
10517         then
10518                 mv \$TMP.$cf_so_strip \$TMP
10519         fi
10520         fi
10521         cf_target="\$cf_target.$cf_so_strip"
10522 CF_EOF
10523 fi
10524
10525 case "$MANPAGE_FORMAT" in #(vi
10526 *BSDI*)
10527 cat >>$cf_edit_man <<CF_EOF
10528         if test \$form = format ; then
10529                 # BSDI installs only .0 suffixes in the cat directories
10530                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10531         fi
10532 CF_EOF
10533   ;;
10534 esac
10535
10536 cat >>$cf_edit_man <<CF_EOF
10537         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10538         if test \$verb = installing ; then
10539                 echo \$verb \$cf_target
10540                 \$INSTALL_DATA \$TMP \$cf_target
10541                 test -d \$cf_subdir\${section} &&
10542                 test -n "\$aliases" && (
10543                         cd \$cf_subdir\${section} && (
10544                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10545                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10546                                 cf_target=\`basename \$cf_target\`
10547                                 for cf_alias in \$aliases
10548                                 do
10549                                         if test \$section = 1 ; then
10550                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10551                                         fi
10552
10553                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10554                                                 if test -f \$cf_alias\${suffix} ; then
10555                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10556                                                         then
10557                                                                 continue
10558                                                         fi
10559                                                 fi
10560                                                 echo .. \$verb alias \$cf_alias\${suffix}
10561 CF_EOF
10562 case "x$LN_S" in #(vi
10563 *-f) #(vi
10564 cat >>$cf_edit_man <<CF_EOF
10565                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10566 CF_EOF
10567         ;;
10568 *)
10569 cat >>$cf_edit_man <<CF_EOF
10570                                                 rm -f \$cf_alias\${suffix}
10571                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10572 CF_EOF
10573         ;;
10574 esac
10575 cat >>$cf_edit_man <<CF_EOF
10576                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10577                                                 echo ".so \$cf_source" >\$TMP
10578 CF_EOF
10579 if test -n "$cf_compress" ; then
10580 cat >>$cf_edit_man <<CF_EOF
10581                                                 if test -n "$cf_so_strip" ; then
10582                                                         $cf_compress -f \$TMP
10583                                                         mv \$TMP.$cf_so_strip \$TMP
10584                                                 fi
10585 CF_EOF
10586 fi
10587 cat >>$cf_edit_man <<CF_EOF
10588                                                 echo .. \$verb alias \$cf_alias\${suffix}
10589                                                 rm -f \$cf_alias\${suffix}
10590                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10591                                         fi
10592                                 done
10593                         )
10594                 )
10595         elif test \$verb = removing ; then
10596                 test -f \$cf_target && (
10597                         echo \$verb \$cf_target
10598                         rm -f \$cf_target
10599                 )
10600                 test -d \$cf_subdir\${section} &&
10601                 test -n "\$aliases" && (
10602                         cd \$cf_subdir\${section} && (
10603                                 for cf_alias in \$aliases
10604                                 do
10605                                         if test \$section = 1 ; then
10606                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10607                                         fi
10608
10609                                         echo .. \$verb alias \$cf_alias\${suffix}
10610                                         rm -f \$cf_alias\${suffix}
10611                                 done
10612                         )
10613                 )
10614         else
10615 #               echo ".hy 0"
10616                 cat \$TMP
10617         fi
10618         ;;
10619 esac
10620 done
10621
10622 if test $cf_inboth = yes ; then
10623 if test \$form != format ; then
10624         sh \$0 format \$verb \$mandir \$srcdir \$*
10625 fi
10626 fi
10627
10628 exit 0
10629 CF_EOF
10630 chmod 755 $cf_edit_man
10631
10632 ###############################################################################
10633
10634 ### Note that some functions (such as const) are normally disabled anyway.
10635 echo "$as_me:10635: checking if you want to build with function extensions" >&5
10636 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10637
10638 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10639 if test "${enable_ext_funcs+set}" = set; then
10640   enableval="$enable_ext_funcs"
10641   with_ext_funcs=$enableval
10642 else
10643   with_ext_funcs=yes
10644 fi;
10645 echo "$as_me:10645: result: $with_ext_funcs" >&5
10646 echo "${ECHO_T}$with_ext_funcs" >&6
10647 if test "x$with_ext_funcs" = xyes ; then
10648         NCURSES_EXT_FUNCS=1
10649
10650 cat >>confdefs.h <<\EOF
10651 #define HAVE_ASSUME_DEFAULT_COLORS 1
10652 EOF
10653
10654 cat >>confdefs.h <<\EOF
10655 #define HAVE_CURSES_VERSION 1
10656 EOF
10657
10658 cat >>confdefs.h <<\EOF
10659 #define HAVE_HAS_KEY 1
10660 EOF
10661
10662 cat >>confdefs.h <<\EOF
10663 #define HAVE_RESIZETERM 1
10664 EOF
10665
10666 cat >>confdefs.h <<\EOF
10667 #define HAVE_RESIZE_TERM 1
10668 EOF
10669
10670 cat >>confdefs.h <<\EOF
10671 #define HAVE_TERM_ENTRY_H 1
10672 EOF
10673
10674 cat >>confdefs.h <<\EOF
10675 #define HAVE_USE_DEFAULT_COLORS 1
10676 EOF
10677
10678 cat >>confdefs.h <<\EOF
10679 #define HAVE_USE_SCREEN 1
10680 EOF
10681
10682 cat >>confdefs.h <<\EOF
10683 #define HAVE_USE_WINDOW 1
10684 EOF
10685
10686 cat >>confdefs.h <<\EOF
10687 #define HAVE_WRESIZE 1
10688 EOF
10689
10690 cat >>confdefs.h <<\EOF
10691 #define NCURSES_EXT_FUNCS 1
10692 EOF
10693
10694         GENERATED_EXT_FUNCS=generated
10695 else
10696         NCURSES_EXT_FUNCS=0
10697         GENERATED_EXT_FUNCS=
10698 fi
10699
10700 echo "$as_me:10700: checking if you want to build with experimental SCREEN extensions" >&5
10701 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10702
10703 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10704 if test "${enable_sp_funcs+set}" = set; then
10705   enableval="$enable_sp_funcs"
10706   with_sp_funcs=$enableval
10707 else
10708   with_sp_funcs=no
10709 fi;
10710 echo "$as_me:10710: result: $with_sp_funcs" >&5
10711 echo "${ECHO_T}$with_sp_funcs" >&6
10712 if test "x$with_sp_funcs" = xyes ; then
10713         NCURSES_SP_FUNCS=1
10714
10715 cat >>confdefs.h <<\EOF
10716 #define NCURSES_SP_FUNCS 1
10717 EOF
10718
10719         GENERATED_SP_FUNCS=generated
10720 else
10721         NCURSES_SP_FUNCS=0
10722         GENERATED_SP_FUNCS=
10723 fi
10724
10725 echo "$as_me:10725: checking if you want to build with experimental terminal-driver" >&5
10726 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10727
10728 # Check whether --enable-term-driver or --disable-term-driver was given.
10729 if test "${enable_term_driver+set}" = set; then
10730   enableval="$enable_term_driver"
10731   with_term_driver=$enableval
10732 else
10733   with_term_driver=no
10734 fi;
10735 echo "$as_me:10735: result: $with_term_driver" >&5
10736 echo "${ECHO_T}$with_term_driver" >&6
10737 if test "x$with_term_driver" = xyes ; then
10738
10739 cat >>confdefs.h <<\EOF
10740 #define USE_TERM_DRIVER 1
10741 EOF
10742
10743         if test "x$with_sp_funcs" != xyes ; then
10744                 { { echo "$as_me:10744: error: The term-driver option relies upon sp-funcs" >&5
10745 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10746    { (exit 1); exit 1; }; }
10747         fi
10748 fi
10749
10750 ###   use option --enable-const to turn on use of const beyond that in XSI.
10751 echo "$as_me:10751: checking for extended use of const keyword" >&5
10752 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10753
10754 # Check whether --enable-const or --disable-const was given.
10755 if test "${enable_const+set}" = set; then
10756   enableval="$enable_const"
10757   with_ext_const=$enableval
10758 else
10759   with_ext_const=no
10760 fi;
10761 echo "$as_me:10761: result: $with_ext_const" >&5
10762 echo "${ECHO_T}$with_ext_const" >&6
10763 NCURSES_CONST='/*nothing*/'
10764 if test "x$with_ext_const" = xyes ; then
10765         NCURSES_CONST=const
10766 fi
10767
10768 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10769 echo "$as_me:10769: checking if you want to use extended colors" >&5
10770 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10771
10772 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10773 if test "${enable_ext_colors+set}" = set; then
10774   enableval="$enable_ext_colors"
10775   with_ext_colors=$enableval
10776 else
10777   with_ext_colors=no
10778 fi;
10779 echo "$as_me:10779: result: $with_ext_colors" >&5
10780 echo "${ECHO_T}$with_ext_colors" >&6
10781 NCURSES_EXT_COLORS=0
10782 if test "x$with_ext_colors" = xyes ; then
10783         if test "x$with_widec" != xyes ; then
10784                 { { echo "$as_me:10784: error: This option applies only to wide-character library" >&5
10785 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10786    { (exit 1); exit 1; }; }
10787         else
10788                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10789
10790 if test "${with_abi_version+set}" != set; then
10791         case $cf_cv_rel_version in
10792         5.*)
10793                 cf_cv_rel_version=6.0
10794                 cf_cv_abi_version=6
10795                 { echo "$as_me:10795: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10796 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10797                 ;;
10798         esac
10799 fi
10800
10801         fi
10802         NCURSES_EXT_COLORS=1
10803
10804 cat >>confdefs.h <<\EOF
10805 #define NCURSES_EXT_COLORS 1
10806 EOF
10807
10808 fi
10809
10810 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10811 echo "$as_me:10811: checking if you want to use extended mouse encoding" >&5
10812 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10813
10814 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10815 if test "${enable_ext_mouse+set}" = set; then
10816   enableval="$enable_ext_mouse"
10817   with_ext_mouse=$enableval
10818 else
10819   with_ext_mouse=no
10820 fi;
10821 echo "$as_me:10821: result: $with_ext_mouse" >&5
10822 echo "${ECHO_T}$with_ext_mouse" >&6
10823 NCURSES_MOUSE_VERSION=1
10824 if test "x$with_ext_mouse" = xyes ; then
10825         NCURSES_MOUSE_VERSION=2
10826
10827 if test "${with_abi_version+set}" != set; then
10828         case $cf_cv_rel_version in
10829         5.*)
10830                 cf_cv_rel_version=6.0
10831                 cf_cv_abi_version=6
10832                 { echo "$as_me:10832: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10833 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10834                 ;;
10835         esac
10836 fi
10837
10838 fi
10839
10840 echo "$as_me:10840: checking if you want \$NCURSES_NO_PADDING code" >&5
10841 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10842
10843 # Check whether --enable-no-padding or --disable-no-padding was given.
10844 if test "${enable_no_padding+set}" = set; then
10845   enableval="$enable_no_padding"
10846   with_no_padding=$enableval
10847 else
10848   with_no_padding=$with_ext_funcs
10849 fi;
10850 echo "$as_me:10850: result: $with_no_padding" >&5
10851 echo "${ECHO_T}$with_no_padding" >&6
10852 test "x$with_no_padding" = xyes &&
10853 cat >>confdefs.h <<\EOF
10854 #define NCURSES_NO_PADDING 1
10855 EOF
10856
10857 echo "$as_me:10857: checking for ANSI C header files" >&5
10858 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10859 if test "${ac_cv_header_stdc+set}" = set; then
10860   echo $ECHO_N "(cached) $ECHO_C" >&6
10861 else
10862   cat >conftest.$ac_ext <<_ACEOF
10863 #line 10863 "configure"
10864 #include "confdefs.h"
10865 #include <stdlib.h>
10866 #include <stdarg.h>
10867 #include <string.h>
10868 #include <float.h>
10869
10870 _ACEOF
10871 if { (eval echo "$as_me:10871: \"$ac_cpp conftest.$ac_ext\"") >&5
10872   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10873   ac_status=$?
10874   egrep -v '^ *\+' conftest.er1 >conftest.err
10875   rm -f conftest.er1
10876   cat conftest.err >&5
10877   echo "$as_me:10877: \$? = $ac_status" >&5
10878   (exit $ac_status); } >/dev/null; then
10879   if test -s conftest.err; then
10880     ac_cpp_err=$ac_c_preproc_warn_flag
10881   else
10882     ac_cpp_err=
10883   fi
10884 else
10885   ac_cpp_err=yes
10886 fi
10887 if test -z "$ac_cpp_err"; then
10888   ac_cv_header_stdc=yes
10889 else
10890   echo "$as_me: failed program was:" >&5
10891   cat conftest.$ac_ext >&5
10892   ac_cv_header_stdc=no
10893 fi
10894 rm -f conftest.err conftest.$ac_ext
10895
10896 if test $ac_cv_header_stdc = yes; then
10897   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10898   cat >conftest.$ac_ext <<_ACEOF
10899 #line 10899 "configure"
10900 #include "confdefs.h"
10901 #include <string.h>
10902
10903 _ACEOF
10904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10905   egrep "memchr" >/dev/null 2>&1; then
10906   :
10907 else
10908   ac_cv_header_stdc=no
10909 fi
10910 rm -rf conftest*
10911
10912 fi
10913
10914 if test $ac_cv_header_stdc = yes; then
10915   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10916   cat >conftest.$ac_ext <<_ACEOF
10917 #line 10917 "configure"
10918 #include "confdefs.h"
10919 #include <stdlib.h>
10920
10921 _ACEOF
10922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10923   egrep "free" >/dev/null 2>&1; then
10924   :
10925 else
10926   ac_cv_header_stdc=no
10927 fi
10928 rm -rf conftest*
10929
10930 fi
10931
10932 if test $ac_cv_header_stdc = yes; then
10933   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10934   if test "$cross_compiling" = yes; then
10935   :
10936 else
10937   cat >conftest.$ac_ext <<_ACEOF
10938 #line 10938 "configure"
10939 #include "confdefs.h"
10940 #include <ctype.h>
10941 #if ((' ' & 0x0FF) == 0x020)
10942 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10943 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10944 #else
10945 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10946                      || ('j' <= (c) && (c) <= 'r') \
10947                      || ('s' <= (c) && (c) <= 'z'))
10948 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10949 #endif
10950
10951 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10952 int
10953 main ()
10954 {
10955   int i;
10956   for (i = 0; i < 256; i++)
10957     if (XOR (islower (i), ISLOWER (i))
10958         || toupper (i) != TOUPPER (i))
10959       $ac_main_return(2);
10960   $ac_main_return (0);
10961 }
10962 _ACEOF
10963 rm -f conftest$ac_exeext
10964 if { (eval echo "$as_me:10964: \"$ac_link\"") >&5
10965   (eval $ac_link) 2>&5
10966   ac_status=$?
10967   echo "$as_me:10967: \$? = $ac_status" >&5
10968   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10969   { (eval echo "$as_me:10969: \"$ac_try\"") >&5
10970   (eval $ac_try) 2>&5
10971   ac_status=$?
10972   echo "$as_me:10972: \$? = $ac_status" >&5
10973   (exit $ac_status); }; }; then
10974   :
10975 else
10976   echo "$as_me: program exited with status $ac_status" >&5
10977 echo "$as_me: failed program was:" >&5
10978 cat conftest.$ac_ext >&5
10979 ac_cv_header_stdc=no
10980 fi
10981 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10982 fi
10983 fi
10984 fi
10985 echo "$as_me:10985: result: $ac_cv_header_stdc" >&5
10986 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10987 if test $ac_cv_header_stdc = yes; then
10988
10989 cat >>confdefs.h <<\EOF
10990 #define STDC_HEADERS 1
10991 EOF
10992
10993 fi
10994
10995 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10996
10997 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10998                   inttypes.h stdint.h unistd.h
10999 do
11000 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11001 echo "$as_me:11001: checking for $ac_header" >&5
11002 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11003 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11004   echo $ECHO_N "(cached) $ECHO_C" >&6
11005 else
11006   cat >conftest.$ac_ext <<_ACEOF
11007 #line 11007 "configure"
11008 #include "confdefs.h"
11009 $ac_includes_default
11010 #include <$ac_header>
11011 _ACEOF
11012 rm -f conftest.$ac_objext
11013 if { (eval echo "$as_me:11013: \"$ac_compile\"") >&5
11014   (eval $ac_compile) 2>&5
11015   ac_status=$?
11016   echo "$as_me:11016: \$? = $ac_status" >&5
11017   (exit $ac_status); } &&
11018          { ac_try='test -s conftest.$ac_objext'
11019   { (eval echo "$as_me:11019: \"$ac_try\"") >&5
11020   (eval $ac_try) 2>&5
11021   ac_status=$?
11022   echo "$as_me:11022: \$? = $ac_status" >&5
11023   (exit $ac_status); }; }; then
11024   eval "$as_ac_Header=yes"
11025 else
11026   echo "$as_me: failed program was:" >&5
11027 cat conftest.$ac_ext >&5
11028 eval "$as_ac_Header=no"
11029 fi
11030 rm -f conftest.$ac_objext conftest.$ac_ext
11031 fi
11032 echo "$as_me:11032: result: `eval echo '${'$as_ac_Header'}'`" >&5
11033 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11034 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11035   cat >>confdefs.h <<EOF
11036 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11037 EOF
11038
11039 fi
11040 done
11041
11042 echo "$as_me:11042: checking for signed char" >&5
11043 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11044 if test "${ac_cv_type_signed_char+set}" = set; then
11045   echo $ECHO_N "(cached) $ECHO_C" >&6
11046 else
11047   cat >conftest.$ac_ext <<_ACEOF
11048 #line 11048 "configure"
11049 #include "confdefs.h"
11050 $ac_includes_default
11051 int
11052 main ()
11053 {
11054 if ((signed char *) 0)
11055   return 0;
11056 if (sizeof (signed char))
11057   return 0;
11058   ;
11059   return 0;
11060 }
11061 _ACEOF
11062 rm -f conftest.$ac_objext
11063 if { (eval echo "$as_me:11063: \"$ac_compile\"") >&5
11064   (eval $ac_compile) 2>&5
11065   ac_status=$?
11066   echo "$as_me:11066: \$? = $ac_status" >&5
11067   (exit $ac_status); } &&
11068          { ac_try='test -s conftest.$ac_objext'
11069   { (eval echo "$as_me:11069: \"$ac_try\"") >&5
11070   (eval $ac_try) 2>&5
11071   ac_status=$?
11072   echo "$as_me:11072: \$? = $ac_status" >&5
11073   (exit $ac_status); }; }; then
11074   ac_cv_type_signed_char=yes
11075 else
11076   echo "$as_me: failed program was:" >&5
11077 cat conftest.$ac_ext >&5
11078 ac_cv_type_signed_char=no
11079 fi
11080 rm -f conftest.$ac_objext conftest.$ac_ext
11081 fi
11082 echo "$as_me:11082: result: $ac_cv_type_signed_char" >&5
11083 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11084
11085 echo "$as_me:11085: checking size of signed char" >&5
11086 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11087 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11088   echo $ECHO_N "(cached) $ECHO_C" >&6
11089 else
11090   if test "$ac_cv_type_signed_char" = yes; then
11091   if test "$cross_compiling" = yes; then
11092   # Depending upon the size, compute the lo and hi bounds.
11093 cat >conftest.$ac_ext <<_ACEOF
11094 #line 11094 "configure"
11095 #include "confdefs.h"
11096 $ac_includes_default
11097 int
11098 main ()
11099 {
11100 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11101   ;
11102   return 0;
11103 }
11104 _ACEOF
11105 rm -f conftest.$ac_objext
11106 if { (eval echo "$as_me:11106: \"$ac_compile\"") >&5
11107   (eval $ac_compile) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); } &&
11111          { ac_try='test -s conftest.$ac_objext'
11112   { (eval echo "$as_me:11112: \"$ac_try\"") >&5
11113   (eval $ac_try) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); }; }; then
11117   ac_lo=0 ac_mid=0
11118   while :; do
11119     cat >conftest.$ac_ext <<_ACEOF
11120 #line 11120 "configure"
11121 #include "confdefs.h"
11122 $ac_includes_default
11123 int
11124 main ()
11125 {
11126 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11127   ;
11128   return 0;
11129 }
11130 _ACEOF
11131 rm -f conftest.$ac_objext
11132 if { (eval echo "$as_me:11132: \"$ac_compile\"") >&5
11133   (eval $ac_compile) 2>&5
11134   ac_status=$?
11135   echo "$as_me:11135: \$? = $ac_status" >&5
11136   (exit $ac_status); } &&
11137          { ac_try='test -s conftest.$ac_objext'
11138   { (eval echo "$as_me:11138: \"$ac_try\"") >&5
11139   (eval $ac_try) 2>&5
11140   ac_status=$?
11141   echo "$as_me:11141: \$? = $ac_status" >&5
11142   (exit $ac_status); }; }; then
11143   ac_hi=$ac_mid; break
11144 else
11145   echo "$as_me: failed program was:" >&5
11146 cat conftest.$ac_ext >&5
11147 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11148 fi
11149 rm -f conftest.$ac_objext conftest.$ac_ext
11150   done
11151 else
11152   echo "$as_me: failed program was:" >&5
11153 cat conftest.$ac_ext >&5
11154 ac_hi=-1 ac_mid=-1
11155   while :; do
11156     cat >conftest.$ac_ext <<_ACEOF
11157 #line 11157 "configure"
11158 #include "confdefs.h"
11159 $ac_includes_default
11160 int
11161 main ()
11162 {
11163 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11164   ;
11165   return 0;
11166 }
11167 _ACEOF
11168 rm -f conftest.$ac_objext
11169 if { (eval echo "$as_me:11169: \"$ac_compile\"") >&5
11170   (eval $ac_compile) 2>&5
11171   ac_status=$?
11172   echo "$as_me:11172: \$? = $ac_status" >&5
11173   (exit $ac_status); } &&
11174          { ac_try='test -s conftest.$ac_objext'
11175   { (eval echo "$as_me:11175: \"$ac_try\"") >&5
11176   (eval $ac_try) 2>&5
11177   ac_status=$?
11178   echo "$as_me:11178: \$? = $ac_status" >&5
11179   (exit $ac_status); }; }; then
11180   ac_lo=$ac_mid; break
11181 else
11182   echo "$as_me: failed program was:" >&5
11183 cat conftest.$ac_ext >&5
11184 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11185 fi
11186 rm -f conftest.$ac_objext conftest.$ac_ext
11187   done
11188 fi
11189 rm -f conftest.$ac_objext conftest.$ac_ext
11190 # Binary search between lo and hi bounds.
11191 while test "x$ac_lo" != "x$ac_hi"; do
11192   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11193   cat >conftest.$ac_ext <<_ACEOF
11194 #line 11194 "configure"
11195 #include "confdefs.h"
11196 $ac_includes_default
11197 int
11198 main ()
11199 {
11200 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11201   ;
11202   return 0;
11203 }
11204 _ACEOF
11205 rm -f conftest.$ac_objext
11206 if { (eval echo "$as_me:11206: \"$ac_compile\"") >&5
11207   (eval $ac_compile) 2>&5
11208   ac_status=$?
11209   echo "$as_me:11209: \$? = $ac_status" >&5
11210   (exit $ac_status); } &&
11211          { ac_try='test -s conftest.$ac_objext'
11212   { (eval echo "$as_me:11212: \"$ac_try\"") >&5
11213   (eval $ac_try) 2>&5
11214   ac_status=$?
11215   echo "$as_me:11215: \$? = $ac_status" >&5
11216   (exit $ac_status); }; }; then
11217   ac_hi=$ac_mid
11218 else
11219   echo "$as_me: failed program was:" >&5
11220 cat conftest.$ac_ext >&5
11221 ac_lo=`expr $ac_mid + 1`
11222 fi
11223 rm -f conftest.$ac_objext conftest.$ac_ext
11224 done
11225 ac_cv_sizeof_signed_char=$ac_lo
11226 else
11227   if test "$cross_compiling" = yes; then
11228   { { echo "$as_me:11228: error: cannot run test program while cross compiling" >&5
11229 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11230    { (exit 1); exit 1; }; }
11231 else
11232   cat >conftest.$ac_ext <<_ACEOF
11233 #line 11233 "configure"
11234 #include "confdefs.h"
11235 $ac_includes_default
11236 int
11237 main ()
11238 {
11239 FILE *f = fopen ("conftest.val", "w");
11240 if (!f)
11241   $ac_main_return (1);
11242 fprintf (f, "%d", (sizeof (signed char)));
11243 fclose (f);
11244   ;
11245   return 0;
11246 }
11247 _ACEOF
11248 rm -f conftest$ac_exeext
11249 if { (eval echo "$as_me:11249: \"$ac_link\"") >&5
11250   (eval $ac_link) 2>&5
11251   ac_status=$?
11252   echo "$as_me:11252: \$? = $ac_status" >&5
11253   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11254   { (eval echo "$as_me:11254: \"$ac_try\"") >&5
11255   (eval $ac_try) 2>&5
11256   ac_status=$?
11257   echo "$as_me:11257: \$? = $ac_status" >&5
11258   (exit $ac_status); }; }; then
11259   ac_cv_sizeof_signed_char=`cat conftest.val`
11260 else
11261   echo "$as_me: program exited with status $ac_status" >&5
11262 echo "$as_me: failed program was:" >&5
11263 cat conftest.$ac_ext >&5
11264 fi
11265 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11266 fi
11267 fi
11268 rm -f conftest.val
11269 else
11270   ac_cv_sizeof_signed_char=0
11271 fi
11272 fi
11273 echo "$as_me:11273: result: $ac_cv_sizeof_signed_char" >&5
11274 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11275 cat >>confdefs.h <<EOF
11276 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11277 EOF
11278
11279 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11280         NCURSES_SBOOL="signed char"
11281 else
11282         NCURSES_SBOOL="char"
11283 fi
11284 echo "$as_me:11284: checking if you want to use signed Boolean array in term.h" >&5
11285 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11286
11287 # Check whether --enable-signed-char or --disable-signed-char was given.
11288 if test "${enable_signed_char+set}" = set; then
11289   enableval="$enable_signed_char"
11290   with_signed_char=$enableval
11291 else
11292   with_signed_char=no
11293 fi;
11294 echo "$as_me:11294: result: $with_signed_char" >&5
11295 echo "${ECHO_T}$with_signed_char" >&6
11296 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11297
11298 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11299 echo "$as_me:11299: checking if you want SIGWINCH handler" >&5
11300 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11301
11302 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11303 if test "${enable_sigwinch+set}" = set; then
11304   enableval="$enable_sigwinch"
11305   with_sigwinch=$enableval
11306 else
11307   with_sigwinch=$with_ext_funcs
11308 fi;
11309 echo "$as_me:11309: result: $with_sigwinch" >&5
11310 echo "${ECHO_T}$with_sigwinch" >&6
11311 test "x$with_sigwinch" = xyes &&
11312 cat >>confdefs.h <<\EOF
11313 #define USE_SIGWINCH 1
11314 EOF
11315
11316 ###   use option --enable-tcap-names to allow user to define new capabilities
11317 echo "$as_me:11317: checking if you want user-definable terminal capabilities like termcap" >&5
11318 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11319
11320 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11321 if test "${enable_tcap_names+set}" = set; then
11322   enableval="$enable_tcap_names"
11323   with_tcap_names=$enableval
11324 else
11325   with_tcap_names=$with_ext_funcs
11326 fi;
11327 echo "$as_me:11327: result: $with_tcap_names" >&5
11328 echo "${ECHO_T}$with_tcap_names" >&6
11329 NCURSES_XNAMES=0
11330 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11331
11332 ###############################################################################
11333 # These options are relatively safe to experiment with.
11334
11335 echo "$as_me:11335: checking if you want all development code" >&5
11336 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11337
11338 # Check whether --with-develop or --without-develop was given.
11339 if test "${with_develop+set}" = set; then
11340   withval="$with_develop"
11341   with_develop=$withval
11342 else
11343   with_develop=no
11344 fi;
11345 echo "$as_me:11345: result: $with_develop" >&5
11346 echo "${ECHO_T}$with_develop" >&6
11347
11348 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11349 echo "$as_me:11349: checking if you want hard-tabs code" >&5
11350 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11351
11352 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11353 if test "${enable_hard_tabs+set}" = set; then
11354   enableval="$enable_hard_tabs"
11355
11356 else
11357   enable_hard_tabs=$with_develop
11358 fi;
11359 echo "$as_me:11359: result: $enable_hard_tabs" >&5
11360 echo "${ECHO_T}$enable_hard_tabs" >&6
11361 test "x$enable_hard_tabs" = xyes &&
11362 cat >>confdefs.h <<\EOF
11363 #define USE_HARD_TABS 1
11364 EOF
11365
11366 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11367 echo "$as_me:11367: checking if you want limited support for xmc" >&5
11368 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11369
11370 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11371 if test "${enable_xmc_glitch+set}" = set; then
11372   enableval="$enable_xmc_glitch"
11373
11374 else
11375   enable_xmc_glitch=$with_develop
11376 fi;
11377 echo "$as_me:11377: result: $enable_xmc_glitch" >&5
11378 echo "${ECHO_T}$enable_xmc_glitch" >&6
11379 test "x$enable_xmc_glitch" = xyes &&
11380 cat >>confdefs.h <<\EOF
11381 #define USE_XMC_SUPPORT 1
11382 EOF
11383
11384 ###############################################################################
11385 # These are just experimental, probably should not be in a package:
11386
11387 echo "$as_me:11387: checking if you do not want to assume colors are white-on-black" >&5
11388 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11389
11390 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11391 if test "${enable_assumed_color+set}" = set; then
11392   enableval="$enable_assumed_color"
11393   with_assumed_color=$enableval
11394 else
11395   with_assumed_color=yes
11396 fi;
11397 echo "$as_me:11397: result: $with_assumed_color" >&5
11398 echo "${ECHO_T}$with_assumed_color" >&6
11399 test "x$with_assumed_color" = xyes &&
11400 cat >>confdefs.h <<\EOF
11401 #define USE_ASSUMED_COLOR 1
11402 EOF
11403
11404 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11405 echo "$as_me:11405: checking if you want hashmap scrolling-optimization code" >&5
11406 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11407
11408 # Check whether --enable-hashmap or --disable-hashmap was given.
11409 if test "${enable_hashmap+set}" = set; then
11410   enableval="$enable_hashmap"
11411   with_hashmap=$enableval
11412 else
11413   with_hashmap=yes
11414 fi;
11415 echo "$as_me:11415: result: $with_hashmap" >&5
11416 echo "${ECHO_T}$with_hashmap" >&6
11417 test "x$with_hashmap" = xyes &&
11418 cat >>confdefs.h <<\EOF
11419 #define USE_HASHMAP 1
11420 EOF
11421
11422 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11423 echo "$as_me:11423: checking if you want colorfgbg code" >&5
11424 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11425
11426 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11427 if test "${enable_colorfgbg+set}" = set; then
11428   enableval="$enable_colorfgbg"
11429   with_colorfgbg=$enableval
11430 else
11431   with_colorfgbg=no
11432 fi;
11433 echo "$as_me:11433: result: $with_colorfgbg" >&5
11434 echo "${ECHO_T}$with_colorfgbg" >&6
11435 test "x$with_colorfgbg" = xyes &&
11436 cat >>confdefs.h <<\EOF
11437 #define USE_COLORFGBG 1
11438 EOF
11439
11440 ###   use option --enable-interop to turn on use of bindings used for interop
11441 echo "$as_me:11441: checking if you want interop bindings" >&5
11442 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11443
11444 # Check whether --enable-interop or --disable-interop was given.
11445 if test "${enable_interop+set}" = set; then
11446   enableval="$enable_interop"
11447   with_exp_interop=$enableval
11448 else
11449   with_exp_interop=no
11450 fi;
11451 echo "$as_me:11451: result: $with_exp_interop" >&5
11452 echo "${ECHO_T}$with_exp_interop" >&6
11453
11454 NCURSES_INTEROP_FUNCS=0
11455 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11456
11457 # This is still experimental (20080329), but should ultimately be moved to
11458 # the script-block --with-normal, etc.
11459
11460 echo "$as_me:11460: checking if you want to link with the pthread library" >&5
11461 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11462
11463 # Check whether --with-pthread or --without-pthread was given.
11464 if test "${with_pthread+set}" = set; then
11465   withval="$with_pthread"
11466   with_pthread=$withval
11467 else
11468   with_pthread=no
11469 fi;
11470 echo "$as_me:11470: result: $with_pthread" >&5
11471 echo "${ECHO_T}$with_pthread" >&6
11472
11473 if test "$with_pthread" != no ; then
11474     echo "$as_me:11474: checking for pthread.h" >&5
11475 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11476 if test "${ac_cv_header_pthread_h+set}" = set; then
11477   echo $ECHO_N "(cached) $ECHO_C" >&6
11478 else
11479   cat >conftest.$ac_ext <<_ACEOF
11480 #line 11480 "configure"
11481 #include "confdefs.h"
11482 #include <pthread.h>
11483 _ACEOF
11484 if { (eval echo "$as_me:11484: \"$ac_cpp conftest.$ac_ext\"") >&5
11485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11486   ac_status=$?
11487   egrep -v '^ *\+' conftest.er1 >conftest.err
11488   rm -f conftest.er1
11489   cat conftest.err >&5
11490   echo "$as_me:11490: \$? = $ac_status" >&5
11491   (exit $ac_status); } >/dev/null; then
11492   if test -s conftest.err; then
11493     ac_cpp_err=$ac_c_preproc_warn_flag
11494   else
11495     ac_cpp_err=
11496   fi
11497 else
11498   ac_cpp_err=yes
11499 fi
11500 if test -z "$ac_cpp_err"; then
11501   ac_cv_header_pthread_h=yes
11502 else
11503   echo "$as_me: failed program was:" >&5
11504   cat conftest.$ac_ext >&5
11505   ac_cv_header_pthread_h=no
11506 fi
11507 rm -f conftest.err conftest.$ac_ext
11508 fi
11509 echo "$as_me:11509: result: $ac_cv_header_pthread_h" >&5
11510 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11511 if test $ac_cv_header_pthread_h = yes; then
11512
11513 cat >>confdefs.h <<\EOF
11514 #define HAVE_PTHREADS_H 1
11515 EOF
11516
11517         for cf_lib_pthread in pthread c_r
11518         do
11519             echo "$as_me:11519: checking if we can link with the $cf_lib_pthread library" >&5
11520 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11521             cf_save_LIBS="$LIBS"
11522             LIBS="-l$cf_lib_pthread $LIBS"
11523             cat >conftest.$ac_ext <<_ACEOF
11524 #line 11524 "configure"
11525 #include "confdefs.h"
11526
11527 #include <pthread.h>
11528
11529 int
11530 main ()
11531 {
11532
11533                 int rc = pthread_create(0,0,0,0);
11534                 int r2 = pthread_mutexattr_settype(0, 0);
11535
11536   ;
11537   return 0;
11538 }
11539 _ACEOF
11540 rm -f conftest.$ac_objext conftest$ac_exeext
11541 if { (eval echo "$as_me:11541: \"$ac_link\"") >&5
11542   (eval $ac_link) 2>&5
11543   ac_status=$?
11544   echo "$as_me:11544: \$? = $ac_status" >&5
11545   (exit $ac_status); } &&
11546          { ac_try='test -s conftest$ac_exeext'
11547   { (eval echo "$as_me:11547: \"$ac_try\"") >&5
11548   (eval $ac_try) 2>&5
11549   ac_status=$?
11550   echo "$as_me:11550: \$? = $ac_status" >&5
11551   (exit $ac_status); }; }; then
11552   with_pthread=yes
11553 else
11554   echo "$as_me: failed program was:" >&5
11555 cat conftest.$ac_ext >&5
11556 with_pthread=no
11557 fi
11558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11559             LIBS="$cf_save_LIBS"
11560             echo "$as_me:11560: result: $with_pthread" >&5
11561 echo "${ECHO_T}$with_pthread" >&6
11562             test "$with_pthread" = yes && break
11563         done
11564
11565         if test "$with_pthread" = yes ; then
11566             LIBS="-l$cf_lib_pthread $LIBS"
11567
11568 cat >>confdefs.h <<\EOF
11569 #define HAVE_LIBPTHREADS 1
11570 EOF
11571
11572         else
11573             { { echo "$as_me:11573: error: Cannot link with pthread library" >&5
11574 echo "$as_me: error: Cannot link with pthread library" >&2;}
11575    { (exit 1); exit 1; }; }
11576         fi
11577
11578 fi
11579
11580 fi
11581
11582 if test "x$with_pthread" != xno; then
11583         echo "$as_me:11583: checking for pthread_kill" >&5
11584 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11585 if test "${ac_cv_func_pthread_kill+set}" = set; then
11586   echo $ECHO_N "(cached) $ECHO_C" >&6
11587 else
11588   cat >conftest.$ac_ext <<_ACEOF
11589 #line 11589 "configure"
11590 #include "confdefs.h"
11591 /* System header to define __stub macros and hopefully few prototypes,
11592     which can conflict with char pthread_kill (); below.  */
11593 #include <assert.h>
11594 /* Override any gcc2 internal prototype to avoid an error.  */
11595 #ifdef __cplusplus
11596 extern "C"
11597 #endif
11598 /* We use char because int might match the return type of a gcc2
11599    builtin and then its argument prototype would still apply.  */
11600 char pthread_kill ();
11601 char (*f) ();
11602
11603 int
11604 main ()
11605 {
11606 /* The GNU C library defines this for functions which it implements
11607     to always fail with ENOSYS.  Some functions are actually named
11608     something starting with __ and the normal name is an alias.  */
11609 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11610 choke me
11611 #else
11612 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11613 #endif
11614
11615   ;
11616   return 0;
11617 }
11618 _ACEOF
11619 rm -f conftest.$ac_objext conftest$ac_exeext
11620 if { (eval echo "$as_me:11620: \"$ac_link\"") >&5
11621   (eval $ac_link) 2>&5
11622   ac_status=$?
11623   echo "$as_me:11623: \$? = $ac_status" >&5
11624   (exit $ac_status); } &&
11625          { ac_try='test -s conftest$ac_exeext'
11626   { (eval echo "$as_me:11626: \"$ac_try\"") >&5
11627   (eval $ac_try) 2>&5
11628   ac_status=$?
11629   echo "$as_me:11629: \$? = $ac_status" >&5
11630   (exit $ac_status); }; }; then
11631   ac_cv_func_pthread_kill=yes
11632 else
11633   echo "$as_me: failed program was:" >&5
11634 cat conftest.$ac_ext >&5
11635 ac_cv_func_pthread_kill=no
11636 fi
11637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11638 fi
11639 echo "$as_me:11639: result: $ac_cv_func_pthread_kill" >&5
11640 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11641 if test $ac_cv_func_pthread_kill = yes; then
11642
11643                 echo "$as_me:11643: checking if you want to allow EINTR in wgetch with pthreads" >&5
11644 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11645
11646 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11647 if test "${enable_pthreads_eintr+set}" = set; then
11648   enableval="$enable_pthreads_eintr"
11649   use_pthreads_eintr=$enableval
11650 else
11651   use_pthreads_eintr=no
11652 fi;
11653                 echo "$as_me:11653: result: $use_pthreads_eintr" >&5
11654 echo "${ECHO_T}$use_pthreads_eintr" >&6
11655                 if test "x$use_pthreads_eintr" = xyes ; then
11656
11657 cat >>confdefs.h <<\EOF
11658 #define USE_PTHREADS_EINTR 1
11659 EOF
11660
11661                 fi
11662 fi
11663
11664         echo "$as_me:11664: checking if you want to use weak-symbols for pthreads" >&5
11665 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11666
11667 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11668 if test "${enable_weak_symbols+set}" = set; then
11669   enableval="$enable_weak_symbols"
11670   use_weak_symbols=$enableval
11671 else
11672   use_weak_symbols=no
11673 fi;
11674         echo "$as_me:11674: result: $use_weak_symbols" >&5
11675 echo "${ECHO_T}$use_weak_symbols" >&6
11676         if test "x$use_weak_symbols" = xyes ; then
11677
11678 echo "$as_me:11678: checking if $CC supports weak symbols" >&5
11679 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11680 if test "${cf_cv_weak_symbols+set}" = set; then
11681   echo $ECHO_N "(cached) $ECHO_C" >&6
11682 else
11683
11684 cat >conftest.$ac_ext <<_ACEOF
11685 #line 11685 "configure"
11686 #include "confdefs.h"
11687
11688 #include <stdio.h>
11689 int
11690 main ()
11691 {
11692
11693 #if defined(__GNUC__)
11694 #  if defined __USE_ISOC99
11695 #    define _cat_pragma(exp)    _Pragma(#exp)
11696 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11697 #  else
11698 #    define _weak_pragma(exp)
11699 #  endif
11700 #  define _declare(name)        __extension__ extern __typeof__(name) name
11701 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11702 #endif
11703
11704 weak_symbol(fopen);
11705
11706   ;
11707   return 0;
11708 }
11709 _ACEOF
11710 rm -f conftest.$ac_objext
11711 if { (eval echo "$as_me:11711: \"$ac_compile\"") >&5
11712   (eval $ac_compile) 2>&5
11713   ac_status=$?
11714   echo "$as_me:11714: \$? = $ac_status" >&5
11715   (exit $ac_status); } &&
11716          { ac_try='test -s conftest.$ac_objext'
11717   { (eval echo "$as_me:11717: \"$ac_try\"") >&5
11718   (eval $ac_try) 2>&5
11719   ac_status=$?
11720   echo "$as_me:11720: \$? = $ac_status" >&5
11721   (exit $ac_status); }; }; then
11722   cf_cv_weak_symbols=yes
11723 else
11724   echo "$as_me: failed program was:" >&5
11725 cat conftest.$ac_ext >&5
11726 cf_cv_weak_symbols=no
11727 fi
11728 rm -f conftest.$ac_objext conftest.$ac_ext
11729
11730 fi
11731 echo "$as_me:11731: result: $cf_cv_weak_symbols" >&5
11732 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11733
11734         else
11735                 cf_cv_weak_symbols=no
11736         fi
11737
11738         if test "x$cf_cv_weak_symbols" = xyes ; then
11739
11740 cat >>confdefs.h <<\EOF
11741 #define USE_WEAK_SYMBOLS 1
11742 EOF
11743
11744         fi
11745 fi
11746
11747 PTHREAD=
11748 if test "x$with_pthread" = "xyes" ; then
11749
11750 cat >>confdefs.h <<\EOF
11751 #define USE_PTHREADS 1
11752 EOF
11753
11754     enable_reentrant=yes
11755     if test "x$cf_cv_weak_symbols" = xyes ; then
11756         PTHREAD=-lpthread
11757     fi
11758 fi
11759
11760 # Reentrant code has to be opaque; there's little advantage to making ncurses
11761 # opaque outside of that, so there is no --enable-opaque option.  We can use
11762 # this option without --with-pthreads, but this will be always set for
11763 # pthreads.
11764 echo "$as_me:11764: checking if you want experimental reentrant code" >&5
11765 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11766
11767 # Check whether --enable-reentrant or --disable-reentrant was given.
11768 if test "${enable_reentrant+set}" = set; then
11769   enableval="$enable_reentrant"
11770   with_reentrant=$enableval
11771 else
11772   with_reentrant=no
11773 fi;
11774 echo "$as_me:11774: result: $with_reentrant" >&5
11775 echo "${ECHO_T}$with_reentrant" >&6
11776 if test "x$with_reentrant" = xyes ; then
11777         cf_cv_enable_reentrant=1
11778         cf_cv_enable_opaque="NCURSES_INTERNALS"
11779         NCURSES_OPAQUE=1
11780         NCURSES_SIZE_T=int
11781         if test "x$cf_cv_weak_symbols" = xyes ; then
11782
11783 # remove pthread library from $LIBS
11784 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11785
11786                 TEST_LIBS="-lpthread $TEST_LIBS"
11787                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11788         else
11789                 LIB_SUFFIX="t${LIB_SUFFIX}"
11790         fi
11791
11792 cat >>confdefs.h <<\EOF
11793 #define USE_REENTRANT 1
11794 EOF
11795
11796 if test "${with_abi_version+set}" != set; then
11797         case $cf_cv_rel_version in
11798         5.*)
11799                 cf_cv_rel_version=6.0
11800                 cf_cv_abi_version=6
11801                 { echo "$as_me:11801: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11802 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11803                 ;;
11804         esac
11805 fi
11806
11807 else
11808         cf_cv_enable_reentrant=0
11809         cf_cv_enable_opaque="NCURSES_OPAQUE"
11810         NCURSES_OPAQUE=0
11811         NCURSES_SIZE_T=short
11812 fi
11813
11814 ### Allow using a different wrap-prefix
11815 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11816         echo "$as_me:11816: checking for prefix used to wrap public variables" >&5
11817 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11818
11819 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11820 if test "${with_wrap_prefix+set}" = set; then
11821   withval="$with_wrap_prefix"
11822   NCURSES_WRAP_PREFIX=$withval
11823 else
11824   NCURSES_WRAP_PREFIX=_nc_
11825 fi;
11826         echo "$as_me:11826: result: $NCURSES_WRAP_PREFIX" >&5
11827 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11828 else
11829         NCURSES_WRAP_PREFIX=_nc_
11830 fi
11831
11832 cat >>confdefs.h <<EOF
11833 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11834 EOF
11835
11836 echo "$as_me:11836: checking if you want experimental safe-sprintf code" >&5
11837 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11838
11839 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11840 if test "${enable_safe_sprintf+set}" = set; then
11841   enableval="$enable_safe_sprintf"
11842   with_safe_sprintf=$enableval
11843 else
11844   with_safe_sprintf=no
11845 fi;
11846 echo "$as_me:11846: result: $with_safe_sprintf" >&5
11847 echo "${ECHO_T}$with_safe_sprintf" >&6
11848 test "x$with_safe_sprintf" = xyes &&
11849 cat >>confdefs.h <<\EOF
11850 #define USE_SAFE_SPRINTF 1
11851 EOF
11852
11853 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11854 # when hashmap is used scroll hints are useless
11855 if test "$with_hashmap" = no ; then
11856 echo "$as_me:11856: checking if you want to experiment without scrolling-hints code" >&5
11857 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11858
11859 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11860 if test "${enable_scroll_hints+set}" = set; then
11861   enableval="$enable_scroll_hints"
11862   with_scroll_hints=$enableval
11863 else
11864   with_scroll_hints=yes
11865 fi;
11866 echo "$as_me:11866: result: $with_scroll_hints" >&5
11867 echo "${ECHO_T}$with_scroll_hints" >&6
11868 test "x$with_scroll_hints" = xyes &&
11869 cat >>confdefs.h <<\EOF
11870 #define USE_SCROLL_HINTS 1
11871 EOF
11872
11873 fi
11874
11875 echo "$as_me:11875: checking if you want experimental wgetch-events code" >&5
11876 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11877
11878 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11879 if test "${enable_wgetch_events+set}" = set; then
11880   enableval="$enable_wgetch_events"
11881   with_wgetch_events=$enableval
11882 else
11883   with_wgetch_events=no
11884 fi;
11885 echo "$as_me:11885: result: $with_wgetch_events" >&5
11886 echo "${ECHO_T}$with_wgetch_events" >&6
11887 test "x$with_wgetch_events" = xyes &&
11888 cat >>confdefs.h <<\EOF
11889 #define NCURSES_WGETCH_EVENTS 1
11890 EOF
11891
11892 ###############################################################################
11893
11894 ###     use option --disable-echo to suppress full display compiling commands
11895
11896 echo "$as_me:11896: checking if you want to see long compiling messages" >&5
11897 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11898
11899 # Check whether --enable-echo or --disable-echo was given.
11900 if test "${enable_echo+set}" = set; then
11901   enableval="$enable_echo"
11902   test "$enableval" != no && enableval=yes
11903   if test "$enableval" != "yes" ; then
11904
11905     ECHO_LT='--silent'
11906     ECHO_LD='@echo linking $@;'
11907     RULE_CC='@echo compiling $<'
11908     SHOW_CC='@echo compiling $@'
11909     ECHO_CC='@'
11910
11911   else
11912
11913     ECHO_LT=''
11914     ECHO_LD=''
11915     RULE_CC=''
11916     SHOW_CC=''
11917     ECHO_CC=''
11918
11919   fi
11920 else
11921   enableval=yes
11922
11923     ECHO_LT=''
11924     ECHO_LD=''
11925     RULE_CC=''
11926     SHOW_CC=''
11927     ECHO_CC=''
11928
11929 fi;
11930 echo "$as_me:11930: result: $enableval" >&5
11931 echo "${ECHO_T}$enableval" >&6
11932
11933 if test "x$enable_echo" = xyes; then
11934         ECHO_LINK=
11935 else
11936         ECHO_LINK='@ echo linking $@ ... ;'
11937         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11938         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11939 fi
11940
11941 ###     use option --enable-warnings to turn on all gcc warnings
11942 echo "$as_me:11942: checking if you want to see compiler warnings" >&5
11943 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11944
11945 # Check whether --enable-warnings or --disable-warnings was given.
11946 if test "${enable_warnings+set}" = set; then
11947   enableval="$enable_warnings"
11948   with_warnings=$enableval
11949 fi;
11950 echo "$as_me:11950: result: $with_warnings" >&5
11951 echo "${ECHO_T}$with_warnings" >&6
11952
11953 if test "x$with_warnings" = "xyes"; then
11954
11955         ADAFLAGS="$ADAFLAGS -gnatg"
11956
11957 INTEL_COMPILER=no
11958
11959 if test "$GCC" = yes ; then
11960         case $host_os in
11961         linux*|gnu*)
11962                 echo "$as_me:11962: checking if this is really Intel C compiler" >&5
11963 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11964                 cf_save_CFLAGS="$CFLAGS"
11965                 CFLAGS="$CFLAGS -no-gcc"
11966                 cat >conftest.$ac_ext <<_ACEOF
11967 #line 11967 "configure"
11968 #include "confdefs.h"
11969
11970 int
11971 main ()
11972 {
11973
11974 #ifdef __INTEL_COMPILER
11975 #else
11976 make an error
11977 #endif
11978
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f conftest.$ac_objext
11984 if { (eval echo "$as_me:11984: \"$ac_compile\"") >&5
11985   (eval $ac_compile) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); } &&
11989          { ac_try='test -s conftest.$ac_objext'
11990   { (eval echo "$as_me:11990: \"$ac_try\"") >&5
11991   (eval $ac_try) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit $ac_status); }; }; then
11995   INTEL_COMPILER=yes
11996 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11997
11998 else
11999   echo "$as_me: failed program was:" >&5
12000 cat conftest.$ac_ext >&5
12001 fi
12002 rm -f conftest.$ac_objext conftest.$ac_ext
12003                 CFLAGS="$cf_save_CFLAGS"
12004                 echo "$as_me:12004: result: $INTEL_COMPILER" >&5
12005 echo "${ECHO_T}$INTEL_COMPILER" >&6
12006                 ;;
12007         esac
12008 fi
12009
12010 CLANG_COMPILER=no
12011
12012 if test "$GCC" = yes ; then
12013         echo "$as_me:12013: checking if this is really Clang C compiler" >&5
12014 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12015         cf_save_CFLAGS="$CFLAGS"
12016         CFLAGS="$CFLAGS -Qunused-arguments"
12017         cat >conftest.$ac_ext <<_ACEOF
12018 #line 12018 "configure"
12019 #include "confdefs.h"
12020
12021 int
12022 main ()
12023 {
12024
12025 #ifdef __clang__
12026 #else
12027 make an error
12028 #endif
12029
12030   ;
12031   return 0;
12032 }
12033 _ACEOF
12034 rm -f conftest.$ac_objext
12035 if { (eval echo "$as_me:12035: \"$ac_compile\"") >&5
12036   (eval $ac_compile) 2>&5
12037   ac_status=$?
12038   echo "$as_me:12038: \$? = $ac_status" >&5
12039   (exit $ac_status); } &&
12040          { ac_try='test -s conftest.$ac_objext'
12041   { (eval echo "$as_me:12041: \"$ac_try\"") >&5
12042   (eval $ac_try) 2>&5
12043   ac_status=$?
12044   echo "$as_me:12044: \$? = $ac_status" >&5
12045   (exit $ac_status); }; }; then
12046   CLANG_COMPILER=yes
12047 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12048
12049 else
12050   echo "$as_me: failed program was:" >&5
12051 cat conftest.$ac_ext >&5
12052 fi
12053 rm -f conftest.$ac_objext conftest.$ac_ext
12054         CFLAGS="$cf_save_CFLAGS"
12055         echo "$as_me:12055: result: $CLANG_COMPILER" >&5
12056 echo "${ECHO_T}$CLANG_COMPILER" >&6
12057 fi
12058
12059 cat > conftest.$ac_ext <<EOF
12060 #line 12060 "${as_me:-configure}"
12061 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12062 EOF
12063
12064 if test "$INTEL_COMPILER" = yes
12065 then
12066 # The "-wdXXX" options suppress warnings:
12067 # remark #1419: external declaration in primary source file
12068 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12069 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12070 # remark #193: zero used for undefined preprocessing identifier
12071 # remark #593: variable "curs_sb_left_arrow" was set but never used
12072 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12073 # remark #869: parameter "tw" was never referenced
12074 # remark #981: operands are evaluated in unspecified order
12075 # warning #279: controlling expression is constant
12076
12077         { echo "$as_me:12077: checking for $CC warning options..." >&5
12078 echo "$as_me: checking for $CC warning options..." >&6;}
12079         cf_save_CFLAGS="$CFLAGS"
12080         EXTRA_CFLAGS="-Wall"
12081         for cf_opt in \
12082                 wd1419 \
12083                 wd1683 \
12084                 wd1684 \
12085                 wd193 \
12086                 wd593 \
12087                 wd279 \
12088                 wd810 \
12089                 wd869 \
12090                 wd981
12091         do
12092                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
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); }; then
12098                         test -n "$verbose" && echo "$as_me:12098: result: ... -$cf_opt" >&5
12099 echo "${ECHO_T}... -$cf_opt" >&6
12100                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12101                 fi
12102         done
12103         CFLAGS="$cf_save_CFLAGS"
12104
12105 elif test "$GCC" = yes
12106 then
12107         { echo "$as_me:12107: checking for $CC warning options..." >&5
12108 echo "$as_me: checking for $CC warning options..." >&6;}
12109         cf_save_CFLAGS="$CFLAGS"
12110         EXTRA_CFLAGS=
12111         cf_warn_CONST=""
12112         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12113         for cf_opt in W Wall \
12114                 Wbad-function-cast \
12115                 Wcast-align \
12116                 Wcast-qual \
12117                 Winline \
12118                 Wmissing-declarations \
12119                 Wmissing-prototypes \
12120                 Wnested-externs \
12121                 Wpointer-arith \
12122                 Wshadow \
12123                 Wstrict-prototypes \
12124                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12125         do
12126                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12127                 if { (eval echo "$as_me:12127: \"$ac_compile\"") >&5
12128   (eval $ac_compile) 2>&5
12129   ac_status=$?
12130   echo "$as_me:12130: \$? = $ac_status" >&5
12131   (exit $ac_status); }; then
12132                         test -n "$verbose" && echo "$as_me:12132: result: ... -$cf_opt" >&5
12133 echo "${ECHO_T}... -$cf_opt" >&6
12134                         case $cf_opt in #(vi
12135                         Wcast-qual) #(vi
12136                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12137                                 ;;
12138                         Winline) #(vi
12139                                 case $GCC_VERSION in
12140                                 [34].*)
12141                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12142
12143 echo "${as_me:-configure}:12143: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12144
12145                                         continue;;
12146                                 esac
12147                                 ;;
12148                         Wpointer-arith) #(vi
12149                                 case $GCC_VERSION in
12150                                 [12].*)
12151                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12152
12153 echo "${as_me:-configure}:12153: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12154
12155                                         continue;;
12156                                 esac
12157                                 ;;
12158                         esac
12159                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12160                 fi
12161         done
12162         CFLAGS="$cf_save_CFLAGS"
12163 fi
12164 rm -rf conftest*
12165
12166         if test "x$cf_with_cxx" = xyes ; then
12167
12168 INTEL_CPLUSPLUS=no
12169
12170 if test "$GCC" = yes ; then
12171         case $host_os in
12172         linux*|gnu*)
12173                 echo "$as_me:12173: checking if this is really Intel C++ compiler" >&5
12174 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12175                 cf_save_CFLAGS="$CXXFLAGS"
12176                 CXXFLAGS="$CXXFLAGS -no-gcc"
12177                 cat >conftest.$ac_ext <<_ACEOF
12178 #line 12178 "configure"
12179 #include "confdefs.h"
12180
12181 int
12182 main ()
12183 {
12184
12185 #ifdef __INTEL_COMPILER
12186 #else
12187 make an error
12188 #endif
12189
12190   ;
12191   return 0;
12192 }
12193 _ACEOF
12194 rm -f conftest.$ac_objext
12195 if { (eval echo "$as_me:12195: \"$ac_compile\"") >&5
12196   (eval $ac_compile) 2>&5
12197   ac_status=$?
12198   echo "$as_me:12198: \$? = $ac_status" >&5
12199   (exit $ac_status); } &&
12200          { ac_try='test -s conftest.$ac_objext'
12201   { (eval echo "$as_me:12201: \"$ac_try\"") >&5
12202   (eval $ac_try) 2>&5
12203   ac_status=$?
12204   echo "$as_me:12204: \$? = $ac_status" >&5
12205   (exit $ac_status); }; }; then
12206   INTEL_CPLUSPLUS=yes
12207 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12208
12209 else
12210   echo "$as_me: failed program was:" >&5
12211 cat conftest.$ac_ext >&5
12212 fi
12213 rm -f conftest.$ac_objext conftest.$ac_ext
12214                 CXXFLAGS="$cf_save_CFLAGS"
12215                 echo "$as_me:12215: result: $INTEL_CPLUSPLUS" >&5
12216 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12217                 ;;
12218         esac
12219 fi
12220
12221 CLANG_CPLUSPLUS=no
12222
12223 if test "$GCC" = yes ; then
12224         echo "$as_me:12224: checking if this is really Clang C++ compiler" >&5
12225 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12226         cf_save_CFLAGS="$CXXFLAGS"
12227         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12228         cat >conftest.$ac_ext <<_ACEOF
12229 #line 12229 "configure"
12230 #include "confdefs.h"
12231
12232 int
12233 main ()
12234 {
12235
12236 #ifdef __clang__
12237 #else
12238 make an error
12239 #endif
12240
12241   ;
12242   return 0;
12243 }
12244 _ACEOF
12245 rm -f conftest.$ac_objext
12246 if { (eval echo "$as_me:12246: \"$ac_compile\"") >&5
12247   (eval $ac_compile) 2>&5
12248   ac_status=$?
12249   echo "$as_me:12249: \$? = $ac_status" >&5
12250   (exit $ac_status); } &&
12251          { ac_try='test -s conftest.$ac_objext'
12252   { (eval echo "$as_me:12252: \"$ac_try\"") >&5
12253   (eval $ac_try) 2>&5
12254   ac_status=$?
12255   echo "$as_me:12255: \$? = $ac_status" >&5
12256   (exit $ac_status); }; }; then
12257   CLANG_CPLUSPLUS=yes
12258 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12259
12260 else
12261   echo "$as_me: failed program was:" >&5
12262 cat conftest.$ac_ext >&5
12263 fi
12264 rm -f conftest.$ac_objext conftest.$ac_ext
12265         CXXFLAGS="$cf_save_CFLAGS"
12266         echo "$as_me:12266: result: $CLANG_CPLUSPLUS" >&5
12267 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12268 fi
12269
12270 ac_ext=cc
12271 ac_cpp='$CXXCPP $CPPFLAGS'
12272 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12273 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12274 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12275 ac_main_return=return
12276
12277 cat > conftest.$ac_ext <<EOF
12278 #line 12278 "configure"
12279 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12280 EOF
12281
12282 if test "$INTEL_CPLUSPLUS" = yes
12283 then
12284 # The "-wdXXX" options suppress warnings:
12285 # remark #1419: external declaration in primary source file
12286 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12287 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12288 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12289 # remark #193: zero used for undefined preprocessing identifier
12290 # remark #593: variable "curs_sb_left_arrow" was set but never used
12291 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12292 # remark #869: parameter "tw" was never referenced
12293 # remark #981: operands are evaluated in unspecified order
12294 # warning #269: invalid format string conversion
12295
12296         { echo "$as_me:12296: checking for $CC warning options..." >&5
12297 echo "$as_me: checking for $CC warning options..." >&6;}
12298         cf_save_CXXFLAGS="$CXXFLAGS"
12299         EXTRA_CXXFLAGS="-Wall"
12300         for cf_opt in \
12301                 wd1419 \
12302                 wd1682 \
12303                 wd1683 \
12304                 wd1684 \
12305                 wd193 \
12306                 wd279 \
12307                 wd593 \
12308                 wd810 \
12309                 wd869 \
12310                 wd981
12311         do
12312                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12313                 if { (eval echo "$as_me:12313: \"$ac_compile\"") >&5
12314   (eval $ac_compile) 2>&5
12315   ac_status=$?
12316   echo "$as_me:12316: \$? = $ac_status" >&5
12317   (exit $ac_status); }; then
12318                         test -n "$verbose" && echo "$as_me:12318: result: ... -$cf_opt" >&5
12319 echo "${ECHO_T}... -$cf_opt" >&6
12320                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12321                 fi
12322         done
12323         CXXFLAGS="$cf_save_CXXFLAGS"
12324
12325 elif test "$GXX" = yes
12326 then
12327         { echo "$as_me:12327: checking for $CXX warning options..." >&5
12328 echo "$as_me: checking for $CXX warning options..." >&6;}
12329         cf_save_CXXFLAGS="$CXXFLAGS"
12330         EXTRA_CXXFLAGS="-W -Wall"
12331         cf_gxx_extra_warnings=""
12332         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12333         case "$GCC_VERSION" in
12334         [1-2].*)
12335                 ;;
12336         *)
12337                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12338                 ;;
12339         esac
12340         for cf_opt in \
12341                 Wabi \
12342                 fabi-version=0 \
12343                 Woverloaded-virtual \
12344                 Wsign-promo \
12345                 Wsynth \
12346                 Wold-style-cast \
12347                 Wcast-align \
12348                 Wcast-qual \
12349                 Wmissing-prototypes \
12350                 Wpointer-arith \
12351                 Wshadow \
12352                 Wstrict-prototypes \
12353                 Wundef $cf_gxx_extra_warnings Wno-unused
12354         do
12355                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12356                 if { (eval echo "$as_me:12356: \"$ac_compile\"") >&5
12357   (eval $ac_compile) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; then
12361                         test -n "$verbose" && echo "$as_me:12361: result: ... -$cf_opt" >&5
12362 echo "${ECHO_T}... -$cf_opt" >&6
12363                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12364                 else
12365                         test -n "$verbose" && echo "$as_me:12365: result: ... no -$cf_opt" >&5
12366 echo "${ECHO_T}... no -$cf_opt" >&6
12367                 fi
12368         done
12369         CXXFLAGS="$cf_save_CXXFLAGS"
12370 fi
12371
12372 rm -rf conftest*
12373 ac_ext=c
12374 ac_cpp='$CPP $CPPFLAGS'
12375 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12376 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12377 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12378 ac_main_return=return
12379
12380         fi
12381 fi
12382
12383 if test "$GCC" = yes
12384 then
12385 cat > conftest.i <<EOF
12386 #ifndef GCC_PRINTF
12387 #define GCC_PRINTF 0
12388 #endif
12389 #ifndef GCC_SCANF
12390 #define GCC_SCANF 0
12391 #endif
12392 #ifndef GCC_NORETURN
12393 #define GCC_NORETURN /* nothing */
12394 #endif
12395 #ifndef GCC_UNUSED
12396 #define GCC_UNUSED /* nothing */
12397 #endif
12398 EOF
12399 if test "$GCC" = yes
12400 then
12401         { echo "$as_me:12401: checking for $CC __attribute__ directives..." >&5
12402 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12403 cat > conftest.$ac_ext <<EOF
12404 #line 12404 "${as_me:-configure}"
12405 #include "confdefs.h"
12406 #include "conftest.h"
12407 #include "conftest.i"
12408 #if     GCC_PRINTF
12409 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12410 #else
12411 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12412 #endif
12413 #if     GCC_SCANF
12414 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12415 #else
12416 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12417 #endif
12418 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12419 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12420 extern void foo(void) GCC_NORETURN;
12421 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12422 EOF
12423         cf_printf_attribute=no
12424         cf_scanf_attribute=no
12425         for cf_attribute in scanf printf unused noreturn
12426         do
12427
12428 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12429
12430                 cf_directive="__attribute__(($cf_attribute))"
12431                 echo "checking for $CC $cf_directive" 1>&5
12432
12433                 case $cf_attribute in #(vi
12434                 printf) #(vi
12435                         cf_printf_attribute=yes
12436                         cat >conftest.h <<EOF
12437 #define GCC_$cf_ATTRIBUTE 1
12438 EOF
12439                         ;;
12440                 scanf) #(vi
12441                         cf_scanf_attribute=yes
12442                         cat >conftest.h <<EOF
12443 #define GCC_$cf_ATTRIBUTE 1
12444 EOF
12445                         ;;
12446                 *) #(vi
12447                         cat >conftest.h <<EOF
12448 #define GCC_$cf_ATTRIBUTE $cf_directive
12449 EOF
12450                         ;;
12451                 esac
12452
12453                 if { (eval echo "$as_me:12453: \"$ac_compile\"") >&5
12454   (eval $ac_compile) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); }; then
12458                         test -n "$verbose" && echo "$as_me:12458: result: ... $cf_attribute" >&5
12459 echo "${ECHO_T}... $cf_attribute" >&6
12460                         cat conftest.h >>confdefs.h
12461                         case $cf_attribute in #(vi
12462                         noreturn) #(vi
12463
12464 cat >>confdefs.h <<EOF
12465 #define GCC_NORETURN $cf_directive
12466 EOF
12467
12468                                 ;;
12469                         printf) #(vi
12470                                 cf_value='/* nothing */'
12471                                 if test "$cf_printf_attribute" != no ; then
12472                                         cf_value='__attribute__((format(printf,fmt,var)))'
12473
12474 cat >>confdefs.h <<\EOF
12475 #define GCC_PRINTF 1
12476 EOF
12477
12478                                 fi
12479
12480 cat >>confdefs.h <<EOF
12481 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12482 EOF
12483
12484                                 ;;
12485                         scanf) #(vi
12486                                 cf_value='/* nothing */'
12487                                 if test "$cf_scanf_attribute" != no ; then
12488                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12489
12490 cat >>confdefs.h <<\EOF
12491 #define GCC_SCANF 1
12492 EOF
12493
12494                                 fi
12495
12496 cat >>confdefs.h <<EOF
12497 #define GCC_SCANFLIKE(fmt,var) $cf_value
12498 EOF
12499
12500                                 ;;
12501                         unused) #(vi
12502
12503 cat >>confdefs.h <<EOF
12504 #define GCC_UNUSED $cf_directive
12505 EOF
12506
12507                                 ;;
12508                         esac
12509                 fi
12510         done
12511 else
12512         fgrep define conftest.i >>confdefs.h
12513 fi
12514 rm -rf conftest*
12515 fi
12516
12517 echo "$as_me:12517: checking if you want to work around bogus compiler/loader warnings" >&5
12518 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12519
12520 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12521 if test "${enable_string_hacks+set}" = set; then
12522   enableval="$enable_string_hacks"
12523   with_string_hacks=$enableval
12524 else
12525   with_string_hacks=no
12526 fi;
12527 echo "$as_me:12527: result: $with_string_hacks" >&5
12528 echo "${ECHO_T}$with_string_hacks" >&6
12529
12530 if test "x$with_string_hacks" = "xyes"; then
12531
12532 cat >>confdefs.h <<\EOF
12533 #define USE_STRING_HACKS 1
12534 EOF
12535
12536         { echo "$as_me:12536: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12537 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12538
12539 for ac_func in strlcat strlcpy snprintf
12540 do
12541 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12542 echo "$as_me:12542: checking for $ac_func" >&5
12543 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12544 if eval "test \"\${$as_ac_var+set}\" = set"; then
12545   echo $ECHO_N "(cached) $ECHO_C" >&6
12546 else
12547   cat >conftest.$ac_ext <<_ACEOF
12548 #line 12548 "configure"
12549 #include "confdefs.h"
12550 /* System header to define __stub macros and hopefully few prototypes,
12551     which can conflict with char $ac_func (); below.  */
12552 #include <assert.h>
12553 /* Override any gcc2 internal prototype to avoid an error.  */
12554 #ifdef __cplusplus
12555 extern "C"
12556 #endif
12557 /* We use char because int might match the return type of a gcc2
12558    builtin and then its argument prototype would still apply.  */
12559 char $ac_func ();
12560 char (*f) ();
12561
12562 int
12563 main ()
12564 {
12565 /* The GNU C library defines this for functions which it implements
12566     to always fail with ENOSYS.  Some functions are actually named
12567     something starting with __ and the normal name is an alias.  */
12568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12569 choke me
12570 #else
12571 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12572 #endif
12573
12574   ;
12575   return 0;
12576 }
12577 _ACEOF
12578 rm -f conftest.$ac_objext conftest$ac_exeext
12579 if { (eval echo "$as_me:12579: \"$ac_link\"") >&5
12580   (eval $ac_link) 2>&5
12581   ac_status=$?
12582   echo "$as_me:12582: \$? = $ac_status" >&5
12583   (exit $ac_status); } &&
12584          { ac_try='test -s conftest$ac_exeext'
12585   { (eval echo "$as_me:12585: \"$ac_try\"") >&5
12586   (eval $ac_try) 2>&5
12587   ac_status=$?
12588   echo "$as_me:12588: \$? = $ac_status" >&5
12589   (exit $ac_status); }; }; then
12590   eval "$as_ac_var=yes"
12591 else
12592   echo "$as_me: failed program was:" >&5
12593 cat conftest.$ac_ext >&5
12594 eval "$as_ac_var=no"
12595 fi
12596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12597 fi
12598 echo "$as_me:12598: result: `eval echo '${'$as_ac_var'}'`" >&5
12599 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12600 if test `eval echo '${'$as_ac_var'}'` = yes; then
12601   cat >>confdefs.h <<EOF
12602 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12603 EOF
12604
12605 fi
12606 done
12607
12608 fi
12609
12610 ###     use option --enable-assertions to turn on generation of assertion code
12611 echo "$as_me:12611: checking if you want to enable runtime assertions" >&5
12612 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12613
12614 # Check whether --enable-assertions or --disable-assertions was given.
12615 if test "${enable_assertions+set}" = set; then
12616   enableval="$enable_assertions"
12617   with_assertions=$enableval
12618 else
12619   with_assertions=no
12620 fi;
12621 echo "$as_me:12621: result: $with_assertions" >&5
12622 echo "${ECHO_T}$with_assertions" >&6
12623 if test -n "$GCC"
12624 then
12625         if test "$with_assertions" = no
12626         then
12627                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12628         else
12629
12630         ADAFLAGS="$ADAFLAGS -gnata"
12631
12632         fi
12633 fi
12634
12635 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12636
12637 echo "$as_me:12637: checking if you want to use dmalloc for testing" >&5
12638 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12639
12640 # Check whether --with-dmalloc or --without-dmalloc was given.
12641 if test "${with_dmalloc+set}" = set; then
12642   withval="$with_dmalloc"
12643
12644 cat >>confdefs.h <<EOF
12645 #define USE_DMALLOC 1
12646 EOF
12647
12648         : ${with_cflags:=-g}
12649         : ${with_no_leaks:=yes}
12650          with_dmalloc=yes
12651 else
12652   with_dmalloc=
12653 fi;
12654 echo "$as_me:12654: result: ${with_dmalloc:-no}" >&5
12655 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12656
12657 case .$with_cflags in #(vi
12658 .*-g*)
12659         case .$CFLAGS in #(vi
12660         .*-g*) #(vi
12661                 ;;
12662         *)
12663
12664 cf_fix_cppflags=no
12665 cf_new_cflags=
12666 cf_new_cppflags=
12667 cf_new_extra_cppflags=
12668
12669 for cf_add_cflags in -g
12670 do
12671 case $cf_fix_cppflags in
12672 no)
12673         case $cf_add_cflags in #(vi
12674         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12675                 case $cf_add_cflags in
12676                 -D*)
12677                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12678
12679                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12680                                 && test -z "${cf_tst_cflags}" \
12681                                 && cf_fix_cppflags=yes
12682
12683                         if test $cf_fix_cppflags = yes ; then
12684                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12685                                 continue
12686                         elif test "${cf_tst_cflags}" = "\"'" ; then
12687                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12688                                 continue
12689                         fi
12690                         ;;
12691                 esac
12692                 case "$CPPFLAGS" in
12693                 *$cf_add_cflags) #(vi
12694                         ;;
12695                 *) #(vi
12696                         case $cf_add_cflags in #(vi
12697                         -D*)
12698                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12699
12700 CPPFLAGS=`echo "$CPPFLAGS" | \
12701         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12702                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12703
12704                                 ;;
12705                         esac
12706                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12707                         ;;
12708                 esac
12709                 ;;
12710         *)
12711                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12712                 ;;
12713         esac
12714         ;;
12715 yes)
12716         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12717
12718         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12719
12720         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12721                 && test -z "${cf_tst_cflags}" \
12722                 && cf_fix_cppflags=no
12723         ;;
12724 esac
12725 done
12726
12727 if test -n "$cf_new_cflags" ; then
12728
12729         CFLAGS="$CFLAGS $cf_new_cflags"
12730 fi
12731
12732 if test -n "$cf_new_cppflags" ; then
12733
12734         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12735 fi
12736
12737 if test -n "$cf_new_extra_cppflags" ; then
12738
12739         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12740 fi
12741
12742                 ;;
12743         esac
12744         ;;
12745 esac
12746
12747 if test "$with_dmalloc" = yes ; then
12748         echo "$as_me:12748: checking for dmalloc.h" >&5
12749 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12750 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12751   echo $ECHO_N "(cached) $ECHO_C" >&6
12752 else
12753   cat >conftest.$ac_ext <<_ACEOF
12754 #line 12754 "configure"
12755 #include "confdefs.h"
12756 #include <dmalloc.h>
12757 _ACEOF
12758 if { (eval echo "$as_me:12758: \"$ac_cpp conftest.$ac_ext\"") >&5
12759   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12760   ac_status=$?
12761   egrep -v '^ *\+' conftest.er1 >conftest.err
12762   rm -f conftest.er1
12763   cat conftest.err >&5
12764   echo "$as_me:12764: \$? = $ac_status" >&5
12765   (exit $ac_status); } >/dev/null; then
12766   if test -s conftest.err; then
12767     ac_cpp_err=$ac_c_preproc_warn_flag
12768   else
12769     ac_cpp_err=
12770   fi
12771 else
12772   ac_cpp_err=yes
12773 fi
12774 if test -z "$ac_cpp_err"; then
12775   ac_cv_header_dmalloc_h=yes
12776 else
12777   echo "$as_me: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   ac_cv_header_dmalloc_h=no
12780 fi
12781 rm -f conftest.err conftest.$ac_ext
12782 fi
12783 echo "$as_me:12783: result: $ac_cv_header_dmalloc_h" >&5
12784 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12785 if test $ac_cv_header_dmalloc_h = yes; then
12786
12787 echo "$as_me:12787: checking for dmalloc_debug in -ldmalloc" >&5
12788 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12789 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12790   echo $ECHO_N "(cached) $ECHO_C" >&6
12791 else
12792   ac_check_lib_save_LIBS=$LIBS
12793 LIBS="-ldmalloc  $LIBS"
12794 cat >conftest.$ac_ext <<_ACEOF
12795 #line 12795 "configure"
12796 #include "confdefs.h"
12797
12798 /* Override any gcc2 internal prototype to avoid an error.  */
12799 #ifdef __cplusplus
12800 extern "C"
12801 #endif
12802 /* We use char because int might match the return type of a gcc2
12803    builtin and then its argument prototype would still apply.  */
12804 char dmalloc_debug ();
12805 int
12806 main ()
12807 {
12808 dmalloc_debug ();
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 rm -f conftest.$ac_objext conftest$ac_exeext
12814 if { (eval echo "$as_me:12814: \"$ac_link\"") >&5
12815   (eval $ac_link) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit $ac_status); } &&
12819          { ac_try='test -s conftest$ac_exeext'
12820   { (eval echo "$as_me:12820: \"$ac_try\"") >&5
12821   (eval $ac_try) 2>&5
12822   ac_status=$?
12823   echo "$as_me:12823: \$? = $ac_status" >&5
12824   (exit $ac_status); }; }; then
12825   ac_cv_lib_dmalloc_dmalloc_debug=yes
12826 else
12827   echo "$as_me: failed program was:" >&5
12828 cat conftest.$ac_ext >&5
12829 ac_cv_lib_dmalloc_dmalloc_debug=no
12830 fi
12831 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12832 LIBS=$ac_check_lib_save_LIBS
12833 fi
12834 echo "$as_me:12834: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12835 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12836 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12837   cat >>confdefs.h <<EOF
12838 #define HAVE_LIBDMALLOC 1
12839 EOF
12840
12841   LIBS="-ldmalloc $LIBS"
12842
12843 fi
12844
12845 fi
12846
12847 fi
12848
12849 echo "$as_me:12849: checking if you want to use dbmalloc for testing" >&5
12850 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12851
12852 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12853 if test "${with_dbmalloc+set}" = set; then
12854   withval="$with_dbmalloc"
12855
12856 cat >>confdefs.h <<EOF
12857 #define USE_DBMALLOC 1
12858 EOF
12859
12860         : ${with_cflags:=-g}
12861         : ${with_no_leaks:=yes}
12862          with_dbmalloc=yes
12863 else
12864   with_dbmalloc=
12865 fi;
12866 echo "$as_me:12866: result: ${with_dbmalloc:-no}" >&5
12867 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12868
12869 case .$with_cflags in #(vi
12870 .*-g*)
12871         case .$CFLAGS in #(vi
12872         .*-g*) #(vi
12873                 ;;
12874         *)
12875
12876 cf_fix_cppflags=no
12877 cf_new_cflags=
12878 cf_new_cppflags=
12879 cf_new_extra_cppflags=
12880
12881 for cf_add_cflags in -g
12882 do
12883 case $cf_fix_cppflags in
12884 no)
12885         case $cf_add_cflags in #(vi
12886         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12887                 case $cf_add_cflags in
12888                 -D*)
12889                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12890
12891                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12892                                 && test -z "${cf_tst_cflags}" \
12893                                 && cf_fix_cppflags=yes
12894
12895                         if test $cf_fix_cppflags = yes ; then
12896                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12897                                 continue
12898                         elif test "${cf_tst_cflags}" = "\"'" ; then
12899                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12900                                 continue
12901                         fi
12902                         ;;
12903                 esac
12904                 case "$CPPFLAGS" in
12905                 *$cf_add_cflags) #(vi
12906                         ;;
12907                 *) #(vi
12908                         case $cf_add_cflags in #(vi
12909                         -D*)
12910                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12911
12912 CPPFLAGS=`echo "$CPPFLAGS" | \
12913         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12914                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12915
12916                                 ;;
12917                         esac
12918                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12919                         ;;
12920                 esac
12921                 ;;
12922         *)
12923                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12924                 ;;
12925         esac
12926         ;;
12927 yes)
12928         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12929
12930         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12931
12932         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12933                 && test -z "${cf_tst_cflags}" \
12934                 && cf_fix_cppflags=no
12935         ;;
12936 esac
12937 done
12938
12939 if test -n "$cf_new_cflags" ; then
12940
12941         CFLAGS="$CFLAGS $cf_new_cflags"
12942 fi
12943
12944 if test -n "$cf_new_cppflags" ; then
12945
12946         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12947 fi
12948
12949 if test -n "$cf_new_extra_cppflags" ; then
12950
12951         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12952 fi
12953
12954                 ;;
12955         esac
12956         ;;
12957 esac
12958
12959 if test "$with_dbmalloc" = yes ; then
12960         echo "$as_me:12960: checking for dbmalloc.h" >&5
12961 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12962 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12963   echo $ECHO_N "(cached) $ECHO_C" >&6
12964 else
12965   cat >conftest.$ac_ext <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12968 #include <dbmalloc.h>
12969 _ACEOF
12970 if { (eval echo "$as_me:12970: \"$ac_cpp conftest.$ac_ext\"") >&5
12971   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12972   ac_status=$?
12973   egrep -v '^ *\+' conftest.er1 >conftest.err
12974   rm -f conftest.er1
12975   cat conftest.err >&5
12976   echo "$as_me:12976: \$? = $ac_status" >&5
12977   (exit $ac_status); } >/dev/null; then
12978   if test -s conftest.err; then
12979     ac_cpp_err=$ac_c_preproc_warn_flag
12980   else
12981     ac_cpp_err=
12982   fi
12983 else
12984   ac_cpp_err=yes
12985 fi
12986 if test -z "$ac_cpp_err"; then
12987   ac_cv_header_dbmalloc_h=yes
12988 else
12989   echo "$as_me: failed program was:" >&5
12990   cat conftest.$ac_ext >&5
12991   ac_cv_header_dbmalloc_h=no
12992 fi
12993 rm -f conftest.err conftest.$ac_ext
12994 fi
12995 echo "$as_me:12995: result: $ac_cv_header_dbmalloc_h" >&5
12996 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12997 if test $ac_cv_header_dbmalloc_h = yes; then
12998
12999 echo "$as_me:12999: checking for debug_malloc in -ldbmalloc" >&5
13000 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13001 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13002   echo $ECHO_N "(cached) $ECHO_C" >&6
13003 else
13004   ac_check_lib_save_LIBS=$LIBS
13005 LIBS="-ldbmalloc  $LIBS"
13006 cat >conftest.$ac_ext <<_ACEOF
13007 #line 13007 "configure"
13008 #include "confdefs.h"
13009
13010 /* Override any gcc2 internal prototype to avoid an error.  */
13011 #ifdef __cplusplus
13012 extern "C"
13013 #endif
13014 /* We use char because int might match the return type of a gcc2
13015    builtin and then its argument prototype would still apply.  */
13016 char debug_malloc ();
13017 int
13018 main ()
13019 {
13020 debug_malloc ();
13021   ;
13022   return 0;
13023 }
13024 _ACEOF
13025 rm -f conftest.$ac_objext conftest$ac_exeext
13026 if { (eval echo "$as_me:13026: \"$ac_link\"") >&5
13027   (eval $ac_link) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); } &&
13031          { ac_try='test -s conftest$ac_exeext'
13032   { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033   (eval $ac_try) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); }; }; then
13037   ac_cv_lib_dbmalloc_debug_malloc=yes
13038 else
13039   echo "$as_me: failed program was:" >&5
13040 cat conftest.$ac_ext >&5
13041 ac_cv_lib_dbmalloc_debug_malloc=no
13042 fi
13043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13044 LIBS=$ac_check_lib_save_LIBS
13045 fi
13046 echo "$as_me:13046: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13047 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13048 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13049   cat >>confdefs.h <<EOF
13050 #define HAVE_LIBDBMALLOC 1
13051 EOF
13052
13053   LIBS="-ldbmalloc $LIBS"
13054
13055 fi
13056
13057 fi
13058
13059 fi
13060
13061 echo "$as_me:13061: checking if you want to use valgrind for testing" >&5
13062 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13063
13064 # Check whether --with-valgrind or --without-valgrind was given.
13065 if test "${with_valgrind+set}" = set; then
13066   withval="$with_valgrind"
13067
13068 cat >>confdefs.h <<EOF
13069 #define USE_VALGRIND 1
13070 EOF
13071
13072         : ${with_cflags:=-g}
13073         : ${with_no_leaks:=yes}
13074          with_valgrind=yes
13075 else
13076   with_valgrind=
13077 fi;
13078 echo "$as_me:13078: result: ${with_valgrind:-no}" >&5
13079 echo "${ECHO_T}${with_valgrind:-no}" >&6
13080
13081 case .$with_cflags in #(vi
13082 .*-g*)
13083         case .$CFLAGS in #(vi
13084         .*-g*) #(vi
13085                 ;;
13086         *)
13087
13088 cf_fix_cppflags=no
13089 cf_new_cflags=
13090 cf_new_cppflags=
13091 cf_new_extra_cppflags=
13092
13093 for cf_add_cflags in -g
13094 do
13095 case $cf_fix_cppflags in
13096 no)
13097         case $cf_add_cflags in #(vi
13098         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13099                 case $cf_add_cflags in
13100                 -D*)
13101                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13102
13103                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13104                                 && test -z "${cf_tst_cflags}" \
13105                                 && cf_fix_cppflags=yes
13106
13107                         if test $cf_fix_cppflags = yes ; then
13108                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13109                                 continue
13110                         elif test "${cf_tst_cflags}" = "\"'" ; then
13111                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13112                                 continue
13113                         fi
13114                         ;;
13115                 esac
13116                 case "$CPPFLAGS" in
13117                 *$cf_add_cflags) #(vi
13118                         ;;
13119                 *) #(vi
13120                         case $cf_add_cflags in #(vi
13121                         -D*)
13122                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13123
13124 CPPFLAGS=`echo "$CPPFLAGS" | \
13125         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13126                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13127
13128                                 ;;
13129                         esac
13130                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13131                         ;;
13132                 esac
13133                 ;;
13134         *)
13135                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13136                 ;;
13137         esac
13138         ;;
13139 yes)
13140         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13141
13142         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13143
13144         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13145                 && test -z "${cf_tst_cflags}" \
13146                 && cf_fix_cppflags=no
13147         ;;
13148 esac
13149 done
13150
13151 if test -n "$cf_new_cflags" ; then
13152
13153         CFLAGS="$CFLAGS $cf_new_cflags"
13154 fi
13155
13156 if test -n "$cf_new_cppflags" ; then
13157
13158         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13159 fi
13160
13161 if test -n "$cf_new_extra_cppflags" ; then
13162
13163         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13164 fi
13165
13166                 ;;
13167         esac
13168         ;;
13169 esac
13170
13171 echo "$as_me:13171: checking if you want to perform memory-leak testing" >&5
13172 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13173
13174 # Check whether --enable-leaks or --disable-leaks was given.
13175 if test "${enable_leaks+set}" = set; then
13176   enableval="$enable_leaks"
13177   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13178 else
13179   : ${with_no_leaks:=no}
13180 fi;
13181 echo "$as_me:13181: result: $with_no_leaks" >&5
13182 echo "${ECHO_T}$with_no_leaks" >&6
13183
13184 if test "$with_no_leaks" = yes ; then
13185
13186 cat >>confdefs.h <<\EOF
13187 #define NO_LEAKS 1
13188 EOF
13189
13190 cat >>confdefs.h <<\EOF
13191 #define YY_NO_LEAKS 1
13192 EOF
13193
13194 fi
13195
13196 cat >>confdefs.h <<\EOF
13197 #define HAVE_NC_ALLOC_H 1
13198 EOF
13199
13200 ###     use option --enable-expanded to generate certain macros as functions
13201
13202 # Check whether --enable-expanded or --disable-expanded was given.
13203 if test "${enable_expanded+set}" = set; then
13204   enableval="$enable_expanded"
13205   test "x$enableval" = xyes &&
13206 cat >>confdefs.h <<\EOF
13207 #define NCURSES_EXPANDED 1
13208 EOF
13209
13210 fi;
13211
13212 ###     use option --disable-macros to suppress macros in favor of functions
13213
13214 # Check whether --enable-macros or --disable-macros was given.
13215 if test "${enable_macros+set}" = set; then
13216   enableval="$enable_macros"
13217   test "$enableval" = no &&
13218 cat >>confdefs.h <<\EOF
13219 #define NCURSES_NOMACROS 1
13220 EOF
13221
13222 fi;
13223
13224 # Normally we only add trace() to the debug-library.  Allow this to be
13225 # extended to all models of the ncurses library:
13226 cf_all_traces=no
13227 case "$CFLAGS $CPPFLAGS" in
13228 *-DTRACE*)
13229         cf_all_traces=yes
13230         ;;
13231 esac
13232
13233 echo "$as_me:13233: checking whether to add trace feature to all models" >&5
13234 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13235
13236 # Check whether --with-trace or --without-trace was given.
13237 if test "${with_trace+set}" = set; then
13238   withval="$with_trace"
13239   cf_with_trace=$withval
13240 else
13241   cf_with_trace=$cf_all_traces
13242 fi;
13243 echo "$as_me:13243: result: $cf_with_trace" >&5
13244 echo "${ECHO_T}$cf_with_trace" >&6
13245
13246 if test "x$cf_with_trace" = xyes ; then
13247         LIB_TRACING=all
13248         ADA_TRACE=TRUE
13249
13250 cf_fix_cppflags=no
13251 cf_new_cflags=
13252 cf_new_cppflags=
13253 cf_new_extra_cppflags=
13254
13255 for cf_add_cflags in -DTRACE
13256 do
13257 case $cf_fix_cppflags in
13258 no)
13259         case $cf_add_cflags in #(vi
13260         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13261                 case $cf_add_cflags in
13262                 -D*)
13263                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13264
13265                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13266                                 && test -z "${cf_tst_cflags}" \
13267                                 && cf_fix_cppflags=yes
13268
13269                         if test $cf_fix_cppflags = yes ; then
13270                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13271                                 continue
13272                         elif test "${cf_tst_cflags}" = "\"'" ; then
13273                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13274                                 continue
13275                         fi
13276                         ;;
13277                 esac
13278                 case "$CPPFLAGS" in
13279                 *$cf_add_cflags) #(vi
13280                         ;;
13281                 *) #(vi
13282                         case $cf_add_cflags in #(vi
13283                         -D*)
13284                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13285
13286 CPPFLAGS=`echo "$CPPFLAGS" | \
13287         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13288                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13289
13290                                 ;;
13291                         esac
13292                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13293                         ;;
13294                 esac
13295                 ;;
13296         *)
13297                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13298                 ;;
13299         esac
13300         ;;
13301 yes)
13302         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13303
13304         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13305
13306         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13307                 && test -z "${cf_tst_cflags}" \
13308                 && cf_fix_cppflags=no
13309         ;;
13310 esac
13311 done
13312
13313 if test -n "$cf_new_cflags" ; then
13314
13315         CFLAGS="$CFLAGS $cf_new_cflags"
13316 fi
13317
13318 if test -n "$cf_new_cppflags" ; then
13319
13320         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13321 fi
13322
13323 if test -n "$cf_new_extra_cppflags" ; then
13324
13325         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13326 fi
13327
13328 else
13329         LIB_TRACING=DEBUG
13330         ADA_TRACE=FALSE
13331 fi
13332
13333 ###     Checks for libraries.
13334 case $cf_cv_system_name in #(vi
13335 *mingw32*) #(vi
13336         ;;
13337 *)
13338 echo "$as_me:13338: checking for gettimeofday" >&5
13339 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13340 if test "${ac_cv_func_gettimeofday+set}" = set; then
13341   echo $ECHO_N "(cached) $ECHO_C" >&6
13342 else
13343   cat >conftest.$ac_ext <<_ACEOF
13344 #line 13344 "configure"
13345 #include "confdefs.h"
13346 /* System header to define __stub macros and hopefully few prototypes,
13347     which can conflict with char gettimeofday (); below.  */
13348 #include <assert.h>
13349 /* Override any gcc2 internal prototype to avoid an error.  */
13350 #ifdef __cplusplus
13351 extern "C"
13352 #endif
13353 /* We use char because int might match the return type of a gcc2
13354    builtin and then its argument prototype would still apply.  */
13355 char gettimeofday ();
13356 char (*f) ();
13357
13358 int
13359 main ()
13360 {
13361 /* The GNU C library defines this for functions which it implements
13362     to always fail with ENOSYS.  Some functions are actually named
13363     something starting with __ and the normal name is an alias.  */
13364 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13365 choke me
13366 #else
13367 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13368 #endif
13369
13370   ;
13371   return 0;
13372 }
13373 _ACEOF
13374 rm -f conftest.$ac_objext conftest$ac_exeext
13375 if { (eval echo "$as_me:13375: \"$ac_link\"") >&5
13376   (eval $ac_link) 2>&5
13377   ac_status=$?
13378   echo "$as_me:13378: \$? = $ac_status" >&5
13379   (exit $ac_status); } &&
13380          { ac_try='test -s conftest$ac_exeext'
13381   { (eval echo "$as_me:13381: \"$ac_try\"") >&5
13382   (eval $ac_try) 2>&5
13383   ac_status=$?
13384   echo "$as_me:13384: \$? = $ac_status" >&5
13385   (exit $ac_status); }; }; then
13386   ac_cv_func_gettimeofday=yes
13387 else
13388   echo "$as_me: failed program was:" >&5
13389 cat conftest.$ac_ext >&5
13390 ac_cv_func_gettimeofday=no
13391 fi
13392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13393 fi
13394 echo "$as_me:13394: result: $ac_cv_func_gettimeofday" >&5
13395 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13396 if test $ac_cv_func_gettimeofday = yes; then
13397
13398 cat >>confdefs.h <<\EOF
13399 #define HAVE_GETTIMEOFDAY 1
13400 EOF
13401
13402 else
13403
13404 echo "$as_me:13404: checking for gettimeofday in -lbsd" >&5
13405 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13406 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13407   echo $ECHO_N "(cached) $ECHO_C" >&6
13408 else
13409   ac_check_lib_save_LIBS=$LIBS
13410 LIBS="-lbsd  $LIBS"
13411 cat >conftest.$ac_ext <<_ACEOF
13412 #line 13412 "configure"
13413 #include "confdefs.h"
13414
13415 /* Override any gcc2 internal prototype to avoid an error.  */
13416 #ifdef __cplusplus
13417 extern "C"
13418 #endif
13419 /* We use char because int might match the return type of a gcc2
13420    builtin and then its argument prototype would still apply.  */
13421 char gettimeofday ();
13422 int
13423 main ()
13424 {
13425 gettimeofday ();
13426   ;
13427   return 0;
13428 }
13429 _ACEOF
13430 rm -f conftest.$ac_objext conftest$ac_exeext
13431 if { (eval echo "$as_me:13431: \"$ac_link\"") >&5
13432   (eval $ac_link) 2>&5
13433   ac_status=$?
13434   echo "$as_me:13434: \$? = $ac_status" >&5
13435   (exit $ac_status); } &&
13436          { ac_try='test -s conftest$ac_exeext'
13437   { (eval echo "$as_me:13437: \"$ac_try\"") >&5
13438   (eval $ac_try) 2>&5
13439   ac_status=$?
13440   echo "$as_me:13440: \$? = $ac_status" >&5
13441   (exit $ac_status); }; }; then
13442   ac_cv_lib_bsd_gettimeofday=yes
13443 else
13444   echo "$as_me: failed program was:" >&5
13445 cat conftest.$ac_ext >&5
13446 ac_cv_lib_bsd_gettimeofday=no
13447 fi
13448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13449 LIBS=$ac_check_lib_save_LIBS
13450 fi
13451 echo "$as_me:13451: result: $ac_cv_lib_bsd_gettimeofday" >&5
13452 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13453 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13454
13455 cat >>confdefs.h <<\EOF
13456 #define HAVE_GETTIMEOFDAY 1
13457 EOF
13458
13459         LIBS="-lbsd $LIBS"
13460 fi
13461
13462 fi
13463         ;;
13464 esac
13465
13466 echo "$as_me:13466: checking if -lm needed for math functions" >&5
13467 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13468 if test "${cf_cv_need_libm+set}" = set; then
13469   echo $ECHO_N "(cached) $ECHO_C" >&6
13470 else
13471
13472         cat >conftest.$ac_ext <<_ACEOF
13473 #line 13473 "configure"
13474 #include "confdefs.h"
13475
13476         #include <stdio.h>
13477         #include <math.h>
13478
13479 int
13480 main ()
13481 {
13482 double x = rand(); printf("result = %g\n", sin(x))
13483   ;
13484   return 0;
13485 }
13486 _ACEOF
13487 rm -f conftest.$ac_objext conftest$ac_exeext
13488 if { (eval echo "$as_me:13488: \"$ac_link\"") >&5
13489   (eval $ac_link) 2>&5
13490   ac_status=$?
13491   echo "$as_me:13491: \$? = $ac_status" >&5
13492   (exit $ac_status); } &&
13493          { ac_try='test -s conftest$ac_exeext'
13494   { (eval echo "$as_me:13494: \"$ac_try\"") >&5
13495   (eval $ac_try) 2>&5
13496   ac_status=$?
13497   echo "$as_me:13497: \$? = $ac_status" >&5
13498   (exit $ac_status); }; }; then
13499   cf_cv_need_libm=no
13500 else
13501   echo "$as_me: failed program was:" >&5
13502 cat conftest.$ac_ext >&5
13503 cf_cv_need_libm=yes
13504 fi
13505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13506 fi
13507 echo "$as_me:13507: result: $cf_cv_need_libm" >&5
13508 echo "${ECHO_T}$cf_cv_need_libm" >&6
13509 if test "$cf_cv_need_libm" = yes
13510 then
13511 MATH_LIB=-lm
13512 fi
13513
13514 ###     Checks for header files.
13515 echo "$as_me:13515: checking for ANSI C header files" >&5
13516 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13517 if test "${ac_cv_header_stdc+set}" = set; then
13518   echo $ECHO_N "(cached) $ECHO_C" >&6
13519 else
13520   cat >conftest.$ac_ext <<_ACEOF
13521 #line 13521 "configure"
13522 #include "confdefs.h"
13523 #include <stdlib.h>
13524 #include <stdarg.h>
13525 #include <string.h>
13526 #include <float.h>
13527
13528 _ACEOF
13529 if { (eval echo "$as_me:13529: \"$ac_cpp conftest.$ac_ext\"") >&5
13530   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13531   ac_status=$?
13532   egrep -v '^ *\+' conftest.er1 >conftest.err
13533   rm -f conftest.er1
13534   cat conftest.err >&5
13535   echo "$as_me:13535: \$? = $ac_status" >&5
13536   (exit $ac_status); } >/dev/null; then
13537   if test -s conftest.err; then
13538     ac_cpp_err=$ac_c_preproc_warn_flag
13539   else
13540     ac_cpp_err=
13541   fi
13542 else
13543   ac_cpp_err=yes
13544 fi
13545 if test -z "$ac_cpp_err"; then
13546   ac_cv_header_stdc=yes
13547 else
13548   echo "$as_me: failed program was:" >&5
13549   cat conftest.$ac_ext >&5
13550   ac_cv_header_stdc=no
13551 fi
13552 rm -f conftest.err conftest.$ac_ext
13553
13554 if test $ac_cv_header_stdc = yes; then
13555   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13556   cat >conftest.$ac_ext <<_ACEOF
13557 #line 13557 "configure"
13558 #include "confdefs.h"
13559 #include <string.h>
13560
13561 _ACEOF
13562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13563   egrep "memchr" >/dev/null 2>&1; then
13564   :
13565 else
13566   ac_cv_header_stdc=no
13567 fi
13568 rm -rf conftest*
13569
13570 fi
13571
13572 if test $ac_cv_header_stdc = yes; then
13573   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13574   cat >conftest.$ac_ext <<_ACEOF
13575 #line 13575 "configure"
13576 #include "confdefs.h"
13577 #include <stdlib.h>
13578
13579 _ACEOF
13580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13581   egrep "free" >/dev/null 2>&1; then
13582   :
13583 else
13584   ac_cv_header_stdc=no
13585 fi
13586 rm -rf conftest*
13587
13588 fi
13589
13590 if test $ac_cv_header_stdc = yes; then
13591   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13592   if test "$cross_compiling" = yes; then
13593   :
13594 else
13595   cat >conftest.$ac_ext <<_ACEOF
13596 #line 13596 "configure"
13597 #include "confdefs.h"
13598 #include <ctype.h>
13599 #if ((' ' & 0x0FF) == 0x020)
13600 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13601 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13602 #else
13603 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13604                      || ('j' <= (c) && (c) <= 'r') \
13605                      || ('s' <= (c) && (c) <= 'z'))
13606 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13607 #endif
13608
13609 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13610 int
13611 main ()
13612 {
13613   int i;
13614   for (i = 0; i < 256; i++)
13615     if (XOR (islower (i), ISLOWER (i))
13616         || toupper (i) != TOUPPER (i))
13617       $ac_main_return(2);
13618   $ac_main_return (0);
13619 }
13620 _ACEOF
13621 rm -f conftest$ac_exeext
13622 if { (eval echo "$as_me:13622: \"$ac_link\"") >&5
13623   (eval $ac_link) 2>&5
13624   ac_status=$?
13625   echo "$as_me:13625: \$? = $ac_status" >&5
13626   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13627   { (eval echo "$as_me:13627: \"$ac_try\"") >&5
13628   (eval $ac_try) 2>&5
13629   ac_status=$?
13630   echo "$as_me:13630: \$? = $ac_status" >&5
13631   (exit $ac_status); }; }; then
13632   :
13633 else
13634   echo "$as_me: program exited with status $ac_status" >&5
13635 echo "$as_me: failed program was:" >&5
13636 cat conftest.$ac_ext >&5
13637 ac_cv_header_stdc=no
13638 fi
13639 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13640 fi
13641 fi
13642 fi
13643 echo "$as_me:13643: result: $ac_cv_header_stdc" >&5
13644 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13645 if test $ac_cv_header_stdc = yes; then
13646
13647 cat >>confdefs.h <<\EOF
13648 #define STDC_HEADERS 1
13649 EOF
13650
13651 fi
13652
13653 ac_header_dirent=no
13654 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13655   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13656 echo "$as_me:13656: checking for $ac_hdr that defines DIR" >&5
13657 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13658 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13659   echo $ECHO_N "(cached) $ECHO_C" >&6
13660 else
13661   cat >conftest.$ac_ext <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13664 #include <sys/types.h>
13665 #include <$ac_hdr>
13666
13667 int
13668 main ()
13669 {
13670 if ((DIR *) 0)
13671 return 0;
13672   ;
13673   return 0;
13674 }
13675 _ACEOF
13676 rm -f conftest.$ac_objext
13677 if { (eval echo "$as_me:13677: \"$ac_compile\"") >&5
13678   (eval $ac_compile) 2>&5
13679   ac_status=$?
13680   echo "$as_me:13680: \$? = $ac_status" >&5
13681   (exit $ac_status); } &&
13682          { ac_try='test -s conftest.$ac_objext'
13683   { (eval echo "$as_me:13683: \"$ac_try\"") >&5
13684   (eval $ac_try) 2>&5
13685   ac_status=$?
13686   echo "$as_me:13686: \$? = $ac_status" >&5
13687   (exit $ac_status); }; }; then
13688   eval "$as_ac_Header=yes"
13689 else
13690   echo "$as_me: failed program was:" >&5
13691 cat conftest.$ac_ext >&5
13692 eval "$as_ac_Header=no"
13693 fi
13694 rm -f conftest.$ac_objext conftest.$ac_ext
13695 fi
13696 echo "$as_me:13696: result: `eval echo '${'$as_ac_Header'}'`" >&5
13697 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13698 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13699   cat >>confdefs.h <<EOF
13700 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13701 EOF
13702
13703 ac_header_dirent=$ac_hdr; break
13704 fi
13705
13706 done
13707 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13708 if test $ac_header_dirent = dirent.h; then
13709   echo "$as_me:13709: checking for opendir in -ldir" >&5
13710 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13711 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13712   echo $ECHO_N "(cached) $ECHO_C" >&6
13713 else
13714   ac_check_lib_save_LIBS=$LIBS
13715 LIBS="-ldir  $LIBS"
13716 cat >conftest.$ac_ext <<_ACEOF
13717 #line 13717 "configure"
13718 #include "confdefs.h"
13719
13720 /* Override any gcc2 internal prototype to avoid an error.  */
13721 #ifdef __cplusplus
13722 extern "C"
13723 #endif
13724 /* We use char because int might match the return type of a gcc2
13725    builtin and then its argument prototype would still apply.  */
13726 char opendir ();
13727 int
13728 main ()
13729 {
13730 opendir ();
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 rm -f conftest.$ac_objext conftest$ac_exeext
13736 if { (eval echo "$as_me:13736: \"$ac_link\"") >&5
13737   (eval $ac_link) 2>&5
13738   ac_status=$?
13739   echo "$as_me:13739: \$? = $ac_status" >&5
13740   (exit $ac_status); } &&
13741          { ac_try='test -s conftest$ac_exeext'
13742   { (eval echo "$as_me:13742: \"$ac_try\"") >&5
13743   (eval $ac_try) 2>&5
13744   ac_status=$?
13745   echo "$as_me:13745: \$? = $ac_status" >&5
13746   (exit $ac_status); }; }; then
13747   ac_cv_lib_dir_opendir=yes
13748 else
13749   echo "$as_me: failed program was:" >&5
13750 cat conftest.$ac_ext >&5
13751 ac_cv_lib_dir_opendir=no
13752 fi
13753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13754 LIBS=$ac_check_lib_save_LIBS
13755 fi
13756 echo "$as_me:13756: result: $ac_cv_lib_dir_opendir" >&5
13757 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13758 if test $ac_cv_lib_dir_opendir = yes; then
13759   LIBS="$LIBS -ldir"
13760 fi
13761
13762 else
13763   echo "$as_me:13763: checking for opendir in -lx" >&5
13764 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13765 if test "${ac_cv_lib_x_opendir+set}" = set; then
13766   echo $ECHO_N "(cached) $ECHO_C" >&6
13767 else
13768   ac_check_lib_save_LIBS=$LIBS
13769 LIBS="-lx  $LIBS"
13770 cat >conftest.$ac_ext <<_ACEOF
13771 #line 13771 "configure"
13772 #include "confdefs.h"
13773
13774 /* Override any gcc2 internal prototype to avoid an error.  */
13775 #ifdef __cplusplus
13776 extern "C"
13777 #endif
13778 /* We use char because int might match the return type of a gcc2
13779    builtin and then its argument prototype would still apply.  */
13780 char opendir ();
13781 int
13782 main ()
13783 {
13784 opendir ();
13785   ;
13786   return 0;
13787 }
13788 _ACEOF
13789 rm -f conftest.$ac_objext conftest$ac_exeext
13790 if { (eval echo "$as_me:13790: \"$ac_link\"") >&5
13791   (eval $ac_link) 2>&5
13792   ac_status=$?
13793   echo "$as_me:13793: \$? = $ac_status" >&5
13794   (exit $ac_status); } &&
13795          { ac_try='test -s conftest$ac_exeext'
13796   { (eval echo "$as_me:13796: \"$ac_try\"") >&5
13797   (eval $ac_try) 2>&5
13798   ac_status=$?
13799   echo "$as_me:13799: \$? = $ac_status" >&5
13800   (exit $ac_status); }; }; then
13801   ac_cv_lib_x_opendir=yes
13802 else
13803   echo "$as_me: failed program was:" >&5
13804 cat conftest.$ac_ext >&5
13805 ac_cv_lib_x_opendir=no
13806 fi
13807 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13808 LIBS=$ac_check_lib_save_LIBS
13809 fi
13810 echo "$as_me:13810: result: $ac_cv_lib_x_opendir" >&5
13811 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13812 if test $ac_cv_lib_x_opendir = yes; then
13813   LIBS="$LIBS -lx"
13814 fi
13815
13816 fi
13817
13818 echo "$as_me:13818: checking whether time.h and sys/time.h may both be included" >&5
13819 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13820 if test "${ac_cv_header_time+set}" = set; then
13821   echo $ECHO_N "(cached) $ECHO_C" >&6
13822 else
13823   cat >conftest.$ac_ext <<_ACEOF
13824 #line 13824 "configure"
13825 #include "confdefs.h"
13826 #include <sys/types.h>
13827 #include <sys/time.h>
13828 #include <time.h>
13829
13830 int
13831 main ()
13832 {
13833 if ((struct tm *) 0)
13834 return 0;
13835   ;
13836   return 0;
13837 }
13838 _ACEOF
13839 rm -f conftest.$ac_objext
13840 if { (eval echo "$as_me:13840: \"$ac_compile\"") >&5
13841   (eval $ac_compile) 2>&5
13842   ac_status=$?
13843   echo "$as_me:13843: \$? = $ac_status" >&5
13844   (exit $ac_status); } &&
13845          { ac_try='test -s conftest.$ac_objext'
13846   { (eval echo "$as_me:13846: \"$ac_try\"") >&5
13847   (eval $ac_try) 2>&5
13848   ac_status=$?
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit $ac_status); }; }; then
13851   ac_cv_header_time=yes
13852 else
13853   echo "$as_me: failed program was:" >&5
13854 cat conftest.$ac_ext >&5
13855 ac_cv_header_time=no
13856 fi
13857 rm -f conftest.$ac_objext conftest.$ac_ext
13858 fi
13859 echo "$as_me:13859: result: $ac_cv_header_time" >&5
13860 echo "${ECHO_T}$ac_cv_header_time" >&6
13861 if test $ac_cv_header_time = yes; then
13862
13863 cat >>confdefs.h <<\EOF
13864 #define TIME_WITH_SYS_TIME 1
13865 EOF
13866
13867 fi
13868
13869 cf_regex_func=no
13870
13871 cf_regex_libs="regex re"
13872 case $host_os in #(vi
13873 mingw*)
13874         cf_regex_libs="gnurx $cf_regex_libs"
13875         ;;
13876 esac
13877
13878 echo "$as_me:13878: checking for regcomp" >&5
13879 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13880 if test "${ac_cv_func_regcomp+set}" = set; then
13881   echo $ECHO_N "(cached) $ECHO_C" >&6
13882 else
13883   cat >conftest.$ac_ext <<_ACEOF
13884 #line 13884 "configure"
13885 #include "confdefs.h"
13886 /* System header to define __stub macros and hopefully few prototypes,
13887     which can conflict with char regcomp (); below.  */
13888 #include <assert.h>
13889 /* Override any gcc2 internal prototype to avoid an error.  */
13890 #ifdef __cplusplus
13891 extern "C"
13892 #endif
13893 /* We use char because int might match the return type of a gcc2
13894    builtin and then its argument prototype would still apply.  */
13895 char regcomp ();
13896 char (*f) ();
13897
13898 int
13899 main ()
13900 {
13901 /* The GNU C library defines this for functions which it implements
13902     to always fail with ENOSYS.  Some functions are actually named
13903     something starting with __ and the normal name is an alias.  */
13904 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13905 choke me
13906 #else
13907 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13908 #endif
13909
13910   ;
13911   return 0;
13912 }
13913 _ACEOF
13914 rm -f conftest.$ac_objext conftest$ac_exeext
13915 if { (eval echo "$as_me:13915: \"$ac_link\"") >&5
13916   (eval $ac_link) 2>&5
13917   ac_status=$?
13918   echo "$as_me:13918: \$? = $ac_status" >&5
13919   (exit $ac_status); } &&
13920          { ac_try='test -s conftest$ac_exeext'
13921   { (eval echo "$as_me:13921: \"$ac_try\"") >&5
13922   (eval $ac_try) 2>&5
13923   ac_status=$?
13924   echo "$as_me:13924: \$? = $ac_status" >&5
13925   (exit $ac_status); }; }; then
13926   ac_cv_func_regcomp=yes
13927 else
13928   echo "$as_me: failed program was:" >&5
13929 cat conftest.$ac_ext >&5
13930 ac_cv_func_regcomp=no
13931 fi
13932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13933 fi
13934 echo "$as_me:13934: result: $ac_cv_func_regcomp" >&5
13935 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13936 if test $ac_cv_func_regcomp = yes; then
13937   cf_regex_func=regcomp
13938 else
13939
13940         for cf_regex_lib in $cf_regex_libs
13941         do
13942                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13943 echo "$as_me:13943: checking for regcomp in -l$cf_regex_lib" >&5
13944 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13945 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13946   echo $ECHO_N "(cached) $ECHO_C" >&6
13947 else
13948   ac_check_lib_save_LIBS=$LIBS
13949 LIBS="-l$cf_regex_lib  $LIBS"
13950 cat >conftest.$ac_ext <<_ACEOF
13951 #line 13951 "configure"
13952 #include "confdefs.h"
13953
13954 /* Override any gcc2 internal prototype to avoid an error.  */
13955 #ifdef __cplusplus
13956 extern "C"
13957 #endif
13958 /* We use char because int might match the return type of a gcc2
13959    builtin and then its argument prototype would still apply.  */
13960 char regcomp ();
13961 int
13962 main ()
13963 {
13964 regcomp ();
13965   ;
13966   return 0;
13967 }
13968 _ACEOF
13969 rm -f conftest.$ac_objext conftest$ac_exeext
13970 if { (eval echo "$as_me:13970: \"$ac_link\"") >&5
13971   (eval $ac_link) 2>&5
13972   ac_status=$?
13973   echo "$as_me:13973: \$? = $ac_status" >&5
13974   (exit $ac_status); } &&
13975          { ac_try='test -s conftest$ac_exeext'
13976   { (eval echo "$as_me:13976: \"$ac_try\"") >&5
13977   (eval $ac_try) 2>&5
13978   ac_status=$?
13979   echo "$as_me:13979: \$? = $ac_status" >&5
13980   (exit $ac_status); }; }; then
13981   eval "$as_ac_Lib=yes"
13982 else
13983   echo "$as_me: failed program was:" >&5
13984 cat conftest.$ac_ext >&5
13985 eval "$as_ac_Lib=no"
13986 fi
13987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13988 LIBS=$ac_check_lib_save_LIBS
13989 fi
13990 echo "$as_me:13990: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13991 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13992 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13993
13994                                 LIBS="-l$cf_regex_lib $LIBS"
13995                                 cf_regex_func=regcomp
13996                                 break
13997 fi
13998
13999         done
14000
14001 fi
14002
14003 if test "$cf_regex_func" = no ; then
14004         echo "$as_me:14004: checking for compile" >&5
14005 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14006 if test "${ac_cv_func_compile+set}" = set; then
14007   echo $ECHO_N "(cached) $ECHO_C" >&6
14008 else
14009   cat >conftest.$ac_ext <<_ACEOF
14010 #line 14010 "configure"
14011 #include "confdefs.h"
14012 /* System header to define __stub macros and hopefully few prototypes,
14013     which can conflict with char compile (); below.  */
14014 #include <assert.h>
14015 /* Override any gcc2 internal prototype to avoid an error.  */
14016 #ifdef __cplusplus
14017 extern "C"
14018 #endif
14019 /* We use char because int might match the return type of a gcc2
14020    builtin and then its argument prototype would still apply.  */
14021 char compile ();
14022 char (*f) ();
14023
14024 int
14025 main ()
14026 {
14027 /* The GNU C library defines this for functions which it implements
14028     to always fail with ENOSYS.  Some functions are actually named
14029     something starting with __ and the normal name is an alias.  */
14030 #if defined (__stub_compile) || defined (__stub___compile)
14031 choke me
14032 #else
14033 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14034 #endif
14035
14036   ;
14037   return 0;
14038 }
14039 _ACEOF
14040 rm -f conftest.$ac_objext conftest$ac_exeext
14041 if { (eval echo "$as_me:14041: \"$ac_link\"") >&5
14042   (eval $ac_link) 2>&5
14043   ac_status=$?
14044   echo "$as_me:14044: \$? = $ac_status" >&5
14045   (exit $ac_status); } &&
14046          { ac_try='test -s conftest$ac_exeext'
14047   { (eval echo "$as_me:14047: \"$ac_try\"") >&5
14048   (eval $ac_try) 2>&5
14049   ac_status=$?
14050   echo "$as_me:14050: \$? = $ac_status" >&5
14051   (exit $ac_status); }; }; then
14052   ac_cv_func_compile=yes
14053 else
14054   echo "$as_me: failed program was:" >&5
14055 cat conftest.$ac_ext >&5
14056 ac_cv_func_compile=no
14057 fi
14058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14059 fi
14060 echo "$as_me:14060: result: $ac_cv_func_compile" >&5
14061 echo "${ECHO_T}$ac_cv_func_compile" >&6
14062 if test $ac_cv_func_compile = yes; then
14063   cf_regex_func=compile
14064 else
14065
14066                 echo "$as_me:14066: checking for compile in -lgen" >&5
14067 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14068 if test "${ac_cv_lib_gen_compile+set}" = set; then
14069   echo $ECHO_N "(cached) $ECHO_C" >&6
14070 else
14071   ac_check_lib_save_LIBS=$LIBS
14072 LIBS="-lgen  $LIBS"
14073 cat >conftest.$ac_ext <<_ACEOF
14074 #line 14074 "configure"
14075 #include "confdefs.h"
14076
14077 /* Override any gcc2 internal prototype to avoid an error.  */
14078 #ifdef __cplusplus
14079 extern "C"
14080 #endif
14081 /* We use char because int might match the return type of a gcc2
14082    builtin and then its argument prototype would still apply.  */
14083 char compile ();
14084 int
14085 main ()
14086 {
14087 compile ();
14088   ;
14089   return 0;
14090 }
14091 _ACEOF
14092 rm -f conftest.$ac_objext conftest$ac_exeext
14093 if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
14094   (eval $ac_link) 2>&5
14095   ac_status=$?
14096   echo "$as_me:14096: \$? = $ac_status" >&5
14097   (exit $ac_status); } &&
14098          { ac_try='test -s conftest$ac_exeext'
14099   { (eval echo "$as_me:14099: \"$ac_try\"") >&5
14100   (eval $ac_try) 2>&5
14101   ac_status=$?
14102   echo "$as_me:14102: \$? = $ac_status" >&5
14103   (exit $ac_status); }; }; then
14104   ac_cv_lib_gen_compile=yes
14105 else
14106   echo "$as_me: failed program was:" >&5
14107 cat conftest.$ac_ext >&5
14108 ac_cv_lib_gen_compile=no
14109 fi
14110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14111 LIBS=$ac_check_lib_save_LIBS
14112 fi
14113 echo "$as_me:14113: result: $ac_cv_lib_gen_compile" >&5
14114 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14115 if test $ac_cv_lib_gen_compile = yes; then
14116
14117                                 LIBS="-lgen $LIBS"
14118                                 cf_regex_func=compile
14119 fi
14120
14121 fi
14122
14123 fi
14124
14125 if test "$cf_regex_func" = no ; then
14126         { echo "$as_me:14126: WARNING: cannot find regular expression library" >&5
14127 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14128 fi
14129
14130 echo "$as_me:14130: checking for regular-expression headers" >&5
14131 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14132 if test "${cf_cv_regex_hdrs+set}" = set; then
14133   echo $ECHO_N "(cached) $ECHO_C" >&6
14134 else
14135
14136 cf_cv_regex_hdrs=no
14137 case $cf_regex_func in #(vi
14138 compile) #(vi
14139         for cf_regex_hdr in regexp.h regexpr.h
14140         do
14141                 cat >conftest.$ac_ext <<_ACEOF
14142 #line 14142 "configure"
14143 #include "confdefs.h"
14144 #include <$cf_regex_hdr>
14145 int
14146 main ()
14147 {
14148
14149                         char *p = compile("", "", "", 0);
14150                         int x = step("", "");
14151
14152   ;
14153   return 0;
14154 }
14155 _ACEOF
14156 rm -f conftest.$ac_objext conftest$ac_exeext
14157 if { (eval echo "$as_me:14157: \"$ac_link\"") >&5
14158   (eval $ac_link) 2>&5
14159   ac_status=$?
14160   echo "$as_me:14160: \$? = $ac_status" >&5
14161   (exit $ac_status); } &&
14162          { ac_try='test -s conftest$ac_exeext'
14163   { (eval echo "$as_me:14163: \"$ac_try\"") >&5
14164   (eval $ac_try) 2>&5
14165   ac_status=$?
14166   echo "$as_me:14166: \$? = $ac_status" >&5
14167   (exit $ac_status); }; }; then
14168
14169                         cf_cv_regex_hdrs=$cf_regex_hdr
14170                         break
14171
14172 else
14173   echo "$as_me: failed program was:" >&5
14174 cat conftest.$ac_ext >&5
14175 fi
14176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14177         done
14178         ;;
14179 *)
14180         for cf_regex_hdr in regex.h
14181         do
14182                 cat >conftest.$ac_ext <<_ACEOF
14183 #line 14183 "configure"
14184 #include "confdefs.h"
14185 #include <sys/types.h>
14186 #include <$cf_regex_hdr>
14187 int
14188 main ()
14189 {
14190
14191                         regex_t *p;
14192                         int x = regcomp(p, "", 0);
14193                         int y = regexec(p, "", 0, 0, 0);
14194                         regfree(p);
14195
14196   ;
14197   return 0;
14198 }
14199 _ACEOF
14200 rm -f conftest.$ac_objext conftest$ac_exeext
14201 if { (eval echo "$as_me:14201: \"$ac_link\"") >&5
14202   (eval $ac_link) 2>&5
14203   ac_status=$?
14204   echo "$as_me:14204: \$? = $ac_status" >&5
14205   (exit $ac_status); } &&
14206          { ac_try='test -s conftest$ac_exeext'
14207   { (eval echo "$as_me:14207: \"$ac_try\"") >&5
14208   (eval $ac_try) 2>&5
14209   ac_status=$?
14210   echo "$as_me:14210: \$? = $ac_status" >&5
14211   (exit $ac_status); }; }; then
14212
14213                         cf_cv_regex_hdrs=$cf_regex_hdr
14214                         break
14215
14216 else
14217   echo "$as_me: failed program was:" >&5
14218 cat conftest.$ac_ext >&5
14219 fi
14220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14221         done
14222         ;;
14223 esac
14224
14225 fi
14226 echo "$as_me:14226: result: $cf_cv_regex_hdrs" >&5
14227 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14228
14229 case $cf_cv_regex_hdrs in #(vi
14230     no)        { echo "$as_me:14230: WARNING: no regular expression header found" >&5
14231 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14232     regex.h)
14233 cat >>confdefs.h <<\EOF
14234 #define HAVE_REGEX_H_FUNCS 1
14235 EOF
14236  ;; #(vi
14237     regexp.h)
14238 cat >>confdefs.h <<\EOF
14239 #define HAVE_REGEXP_H_FUNCS 1
14240 EOF
14241  ;; #(vi
14242     regexpr.h)
14243 cat >>confdefs.h <<\EOF
14244 #define HAVE_REGEXPR_H_FUNCS 1
14245 EOF
14246  ;;
14247 esac
14248
14249 for ac_header in \
14250 fcntl.h \
14251 getopt.h \
14252 limits.h \
14253 locale.h \
14254 math.h \
14255 poll.h \
14256 sys/bsdtypes.h \
14257 sys/ioctl.h \
14258 sys/param.h \
14259 sys/poll.h \
14260 sys/select.h \
14261 sys/time.h \
14262 sys/times.h \
14263 ttyent.h \
14264 unistd.h \
14265 wctype.h \
14266
14267 do
14268 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14269 echo "$as_me:14269: checking for $ac_header" >&5
14270 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14271 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14272   echo $ECHO_N "(cached) $ECHO_C" >&6
14273 else
14274   cat >conftest.$ac_ext <<_ACEOF
14275 #line 14275 "configure"
14276 #include "confdefs.h"
14277 #include <$ac_header>
14278 _ACEOF
14279 if { (eval echo "$as_me:14279: \"$ac_cpp conftest.$ac_ext\"") >&5
14280   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14281   ac_status=$?
14282   egrep -v '^ *\+' conftest.er1 >conftest.err
14283   rm -f conftest.er1
14284   cat conftest.err >&5
14285   echo "$as_me:14285: \$? = $ac_status" >&5
14286   (exit $ac_status); } >/dev/null; then
14287   if test -s conftest.err; then
14288     ac_cpp_err=$ac_c_preproc_warn_flag
14289   else
14290     ac_cpp_err=
14291   fi
14292 else
14293   ac_cpp_err=yes
14294 fi
14295 if test -z "$ac_cpp_err"; then
14296   eval "$as_ac_Header=yes"
14297 else
14298   echo "$as_me: failed program was:" >&5
14299   cat conftest.$ac_ext >&5
14300   eval "$as_ac_Header=no"
14301 fi
14302 rm -f conftest.err conftest.$ac_ext
14303 fi
14304 echo "$as_me:14304: result: `eval echo '${'$as_ac_Header'}'`" >&5
14305 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14306 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14307   cat >>confdefs.h <<EOF
14308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14309 EOF
14310
14311 fi
14312 done
14313
14314 for ac_header in unistd.h getopt.h
14315 do
14316 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14317 echo "$as_me:14317: checking for $ac_header" >&5
14318 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14319 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14320   echo $ECHO_N "(cached) $ECHO_C" >&6
14321 else
14322   cat >conftest.$ac_ext <<_ACEOF
14323 #line 14323 "configure"
14324 #include "confdefs.h"
14325 #include <$ac_header>
14326 _ACEOF
14327 if { (eval echo "$as_me:14327: \"$ac_cpp conftest.$ac_ext\"") >&5
14328   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14329   ac_status=$?
14330   egrep -v '^ *\+' conftest.er1 >conftest.err
14331   rm -f conftest.er1
14332   cat conftest.err >&5
14333   echo "$as_me:14333: \$? = $ac_status" >&5
14334   (exit $ac_status); } >/dev/null; then
14335   if test -s conftest.err; then
14336     ac_cpp_err=$ac_c_preproc_warn_flag
14337   else
14338     ac_cpp_err=
14339   fi
14340 else
14341   ac_cpp_err=yes
14342 fi
14343 if test -z "$ac_cpp_err"; then
14344   eval "$as_ac_Header=yes"
14345 else
14346   echo "$as_me: failed program was:" >&5
14347   cat conftest.$ac_ext >&5
14348   eval "$as_ac_Header=no"
14349 fi
14350 rm -f conftest.err conftest.$ac_ext
14351 fi
14352 echo "$as_me:14352: result: `eval echo '${'$as_ac_Header'}'`" >&5
14353 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14354 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14355   cat >>confdefs.h <<EOF
14356 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14357 EOF
14358
14359 fi
14360 done
14361
14362 echo "$as_me:14362: checking for header declaring getopt variables" >&5
14363 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14364 if test "${cf_cv_getopt_header+set}" = set; then
14365   echo $ECHO_N "(cached) $ECHO_C" >&6
14366 else
14367
14368 cf_cv_getopt_header=none
14369 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14370 do
14371 cat >conftest.$ac_ext <<_ACEOF
14372 #line 14372 "configure"
14373 #include "confdefs.h"
14374
14375 #include <$cf_header>
14376 int
14377 main ()
14378 {
14379 int x = optind; char *y = optarg
14380   ;
14381   return 0;
14382 }
14383 _ACEOF
14384 rm -f conftest.$ac_objext
14385 if { (eval echo "$as_me:14385: \"$ac_compile\"") >&5
14386   (eval $ac_compile) 2>&5
14387   ac_status=$?
14388   echo "$as_me:14388: \$? = $ac_status" >&5
14389   (exit $ac_status); } &&
14390          { ac_try='test -s conftest.$ac_objext'
14391   { (eval echo "$as_me:14391: \"$ac_try\"") >&5
14392   (eval $ac_try) 2>&5
14393   ac_status=$?
14394   echo "$as_me:14394: \$? = $ac_status" >&5
14395   (exit $ac_status); }; }; then
14396   cf_cv_getopt_header=$cf_header
14397  break
14398 else
14399   echo "$as_me: failed program was:" >&5
14400 cat conftest.$ac_ext >&5
14401 fi
14402 rm -f conftest.$ac_objext conftest.$ac_ext
14403 done
14404
14405 fi
14406 echo "$as_me:14406: result: $cf_cv_getopt_header" >&5
14407 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14408 if test $cf_cv_getopt_header != none ; then
14409
14410 cat >>confdefs.h <<\EOF
14411 #define HAVE_GETOPT_HEADER 1
14412 EOF
14413
14414 fi
14415
14416 # check for ISC (this may also define _POSIX_SOURCE)
14417 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14418 if test "x$ISC" = xyes ; then
14419
14420 echo "$as_me:14420: checking for main in -lcposix" >&5
14421 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14422 if test "${ac_cv_lib_cposix_main+set}" = set; then
14423   echo $ECHO_N "(cached) $ECHO_C" >&6
14424 else
14425   ac_check_lib_save_LIBS=$LIBS
14426 LIBS="-lcposix  $LIBS"
14427 cat >conftest.$ac_ext <<_ACEOF
14428 #line 14428 "configure"
14429 #include "confdefs.h"
14430
14431 int
14432 main ()
14433 {
14434 main ();
14435   ;
14436   return 0;
14437 }
14438 _ACEOF
14439 rm -f conftest.$ac_objext conftest$ac_exeext
14440 if { (eval echo "$as_me:14440: \"$ac_link\"") >&5
14441   (eval $ac_link) 2>&5
14442   ac_status=$?
14443   echo "$as_me:14443: \$? = $ac_status" >&5
14444   (exit $ac_status); } &&
14445          { ac_try='test -s conftest$ac_exeext'
14446   { (eval echo "$as_me:14446: \"$ac_try\"") >&5
14447   (eval $ac_try) 2>&5
14448   ac_status=$?
14449   echo "$as_me:14449: \$? = $ac_status" >&5
14450   (exit $ac_status); }; }; then
14451   ac_cv_lib_cposix_main=yes
14452 else
14453   echo "$as_me: failed program was:" >&5
14454 cat conftest.$ac_ext >&5
14455 ac_cv_lib_cposix_main=no
14456 fi
14457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14458 LIBS=$ac_check_lib_save_LIBS
14459 fi
14460 echo "$as_me:14460: result: $ac_cv_lib_cposix_main" >&5
14461 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14462 if test $ac_cv_lib_cposix_main = yes; then
14463   cat >>confdefs.h <<EOF
14464 #define HAVE_LIBCPOSIX 1
14465 EOF
14466
14467   LIBS="-lcposix $LIBS"
14468
14469 fi
14470
14471         echo "$as_me:14471: checking for bzero in -linet" >&5
14472 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14473 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14474   echo $ECHO_N "(cached) $ECHO_C" >&6
14475 else
14476   ac_check_lib_save_LIBS=$LIBS
14477 LIBS="-linet  $LIBS"
14478 cat >conftest.$ac_ext <<_ACEOF
14479 #line 14479 "configure"
14480 #include "confdefs.h"
14481
14482 /* Override any gcc2 internal prototype to avoid an error.  */
14483 #ifdef __cplusplus
14484 extern "C"
14485 #endif
14486 /* We use char because int might match the return type of a gcc2
14487    builtin and then its argument prototype would still apply.  */
14488 char bzero ();
14489 int
14490 main ()
14491 {
14492 bzero ();
14493   ;
14494   return 0;
14495 }
14496 _ACEOF
14497 rm -f conftest.$ac_objext conftest$ac_exeext
14498 if { (eval echo "$as_me:14498: \"$ac_link\"") >&5
14499   (eval $ac_link) 2>&5
14500   ac_status=$?
14501   echo "$as_me:14501: \$? = $ac_status" >&5
14502   (exit $ac_status); } &&
14503          { ac_try='test -s conftest$ac_exeext'
14504   { (eval echo "$as_me:14504: \"$ac_try\"") >&5
14505   (eval $ac_try) 2>&5
14506   ac_status=$?
14507   echo "$as_me:14507: \$? = $ac_status" >&5
14508   (exit $ac_status); }; }; then
14509   ac_cv_lib_inet_bzero=yes
14510 else
14511   echo "$as_me: failed program was:" >&5
14512 cat conftest.$ac_ext >&5
14513 ac_cv_lib_inet_bzero=no
14514 fi
14515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14516 LIBS=$ac_check_lib_save_LIBS
14517 fi
14518 echo "$as_me:14518: result: $ac_cv_lib_inet_bzero" >&5
14519 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14520 if test $ac_cv_lib_inet_bzero = yes; then
14521   LIBS="-linet $LIBS"
14522 fi
14523 fi
14524
14525 echo "$as_me:14525: checking if sys/time.h works with sys/select.h" >&5
14526 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14527 if test "${cf_cv_sys_time_select+set}" = set; then
14528   echo $ECHO_N "(cached) $ECHO_C" >&6
14529 else
14530
14531 cat >conftest.$ac_ext <<_ACEOF
14532 #line 14532 "configure"
14533 #include "confdefs.h"
14534
14535 #include <sys/types.h>
14536 #ifdef HAVE_SYS_TIME_H
14537 #include <sys/time.h>
14538 #endif
14539 #ifdef HAVE_SYS_SELECT_H
14540 #include <sys/select.h>
14541 #endif
14542
14543 int
14544 main ()
14545 {
14546
14547   ;
14548   return 0;
14549 }
14550 _ACEOF
14551 rm -f conftest.$ac_objext
14552 if { (eval echo "$as_me:14552: \"$ac_compile\"") >&5
14553   (eval $ac_compile) 2>&5
14554   ac_status=$?
14555   echo "$as_me:14555: \$? = $ac_status" >&5
14556   (exit $ac_status); } &&
14557          { ac_try='test -s conftest.$ac_objext'
14558   { (eval echo "$as_me:14558: \"$ac_try\"") >&5
14559   (eval $ac_try) 2>&5
14560   ac_status=$?
14561   echo "$as_me:14561: \$? = $ac_status" >&5
14562   (exit $ac_status); }; }; then
14563   cf_cv_sys_time_select=yes
14564 else
14565   echo "$as_me: failed program was:" >&5
14566 cat conftest.$ac_ext >&5
14567 cf_cv_sys_time_select=no
14568 fi
14569 rm -f conftest.$ac_objext conftest.$ac_ext
14570
14571 fi
14572
14573 echo "$as_me:14573: result: $cf_cv_sys_time_select" >&5
14574 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14575 test "$cf_cv_sys_time_select" = yes &&
14576 cat >>confdefs.h <<\EOF
14577 #define HAVE_SYS_TIME_SELECT 1
14578 EOF
14579
14580 ###     checks for compiler characteristics
14581 ac_ext=c
14582 ac_cpp='$CPP $CPPFLAGS'
14583 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14584 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14585 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14586 ac_main_return=return
14587
14588 echo "$as_me:14588: checking for an ANSI C-conforming const" >&5
14589 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14590 if test "${ac_cv_c_const+set}" = set; then
14591   echo $ECHO_N "(cached) $ECHO_C" >&6
14592 else
14593   cat >conftest.$ac_ext <<_ACEOF
14594 #line 14594 "configure"
14595 #include "confdefs.h"
14596
14597 int
14598 main ()
14599 {
14600 /* FIXME: Include the comments suggested by Paul. */
14601 #ifndef __cplusplus
14602   /* Ultrix mips cc rejects this.  */
14603   typedef int charset[2];
14604   const charset x;
14605   /* SunOS 4.1.1 cc rejects this.  */
14606   char const *const *ccp;
14607   char **p;
14608   /* NEC SVR4.0.2 mips cc rejects this.  */
14609   struct point {int x, y;};
14610   static struct point const zero = {0,0};
14611   /* AIX XL C 1.02.0.0 rejects this.
14612      It does not let you subtract one const X* pointer from another in
14613      an arm of an if-expression whose if-part is not a constant
14614      expression */
14615   const char *g = "string";
14616   ccp = &g + (g ? g-g : 0);
14617   /* HPUX 7.0 cc rejects these. */
14618   ++ccp;
14619   p = (char**) ccp;
14620   ccp = (char const *const *) p;
14621   { /* SCO 3.2v4 cc rejects this.  */
14622     char *t;
14623     char const *s = 0 ? (char *) 0 : (char const *) 0;
14624
14625     *t++ = 0;
14626   }
14627   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14628     int x[] = {25, 17};
14629     const int *foo = &x[0];
14630     ++foo;
14631   }
14632   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14633     typedef const int *iptr;
14634     iptr p = 0;
14635     ++p;
14636   }
14637   { /* AIX XL C 1.02.0.0 rejects this saying
14638        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14639     struct s { int j; const int *ap[3]; };
14640     struct s *b; b->j = 5;
14641   }
14642   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14643     const int foo = 10;
14644   }
14645 #endif
14646
14647   ;
14648   return 0;
14649 }
14650 _ACEOF
14651 rm -f conftest.$ac_objext
14652 if { (eval echo "$as_me:14652: \"$ac_compile\"") >&5
14653   (eval $ac_compile) 2>&5
14654   ac_status=$?
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit $ac_status); } &&
14657          { ac_try='test -s conftest.$ac_objext'
14658   { (eval echo "$as_me:14658: \"$ac_try\"") >&5
14659   (eval $ac_try) 2>&5
14660   ac_status=$?
14661   echo "$as_me:14661: \$? = $ac_status" >&5
14662   (exit $ac_status); }; }; then
14663   ac_cv_c_const=yes
14664 else
14665   echo "$as_me: failed program was:" >&5
14666 cat conftest.$ac_ext >&5
14667 ac_cv_c_const=no
14668 fi
14669 rm -f conftest.$ac_objext conftest.$ac_ext
14670 fi
14671 echo "$as_me:14671: result: $ac_cv_c_const" >&5
14672 echo "${ECHO_T}$ac_cv_c_const" >&6
14673 if test $ac_cv_c_const = no; then
14674
14675 cat >>confdefs.h <<\EOF
14676 #define const
14677 EOF
14678
14679 fi
14680
14681 echo "$as_me:14681: checking for inline" >&5
14682 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14683 if test "${ac_cv_c_inline+set}" = set; then
14684   echo $ECHO_N "(cached) $ECHO_C" >&6
14685 else
14686   ac_cv_c_inline=no
14687 for ac_kw in inline __inline__ __inline; do
14688   cat >conftest.$ac_ext <<_ACEOF
14689 #line 14689 "configure"
14690 #include "confdefs.h"
14691 #ifndef __cplusplus
14692 static $ac_kw int static_foo () {return 0; }
14693 $ac_kw int foo () {return 0; }
14694 #endif
14695
14696 _ACEOF
14697 rm -f conftest.$ac_objext
14698 if { (eval echo "$as_me:14698: \"$ac_compile\"") >&5
14699   (eval $ac_compile) 2>&5
14700   ac_status=$?
14701   echo "$as_me:14701: \$? = $ac_status" >&5
14702   (exit $ac_status); } &&
14703          { ac_try='test -s conftest.$ac_objext'
14704   { (eval echo "$as_me:14704: \"$ac_try\"") >&5
14705   (eval $ac_try) 2>&5
14706   ac_status=$?
14707   echo "$as_me:14707: \$? = $ac_status" >&5
14708   (exit $ac_status); }; }; then
14709   ac_cv_c_inline=$ac_kw; break
14710 else
14711   echo "$as_me: failed program was:" >&5
14712 cat conftest.$ac_ext >&5
14713 fi
14714 rm -f conftest.$ac_objext conftest.$ac_ext
14715 done
14716
14717 fi
14718 echo "$as_me:14718: result: $ac_cv_c_inline" >&5
14719 echo "${ECHO_T}$ac_cv_c_inline" >&6
14720 case $ac_cv_c_inline in
14721   inline | yes) ;;
14722   no)
14723 cat >>confdefs.h <<\EOF
14724 #define inline
14725 EOF
14726  ;;
14727   *)  cat >>confdefs.h <<EOF
14728 #define inline $ac_cv_c_inline
14729 EOF
14730  ;;
14731 esac
14732
14733 NCURSES_INLINE=
14734 if test "$ac_cv_c_inline" != no ; then
14735   NCURSES_INLINE=inline
14736   if test "$INTEL_COMPILER" = yes
14737   then
14738     :
14739   elif test "$CLANG_COMPILER" = yes
14740   then
14741     :
14742   elif test "$GCC" = yes
14743   then
14744     echo "$as_me:14744: checking if $CC supports options to tune inlining" >&5
14745 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14746 if test "${cf_cv_gcc_inline+set}" = set; then
14747   echo $ECHO_N "(cached) $ECHO_C" >&6
14748 else
14749
14750       cf_save_CFLAGS=$CFLAGS
14751       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14752       cat >conftest.$ac_ext <<_ACEOF
14753 #line 14753 "configure"
14754 #include "confdefs.h"
14755 inline int foo(void) { return 1; }
14756 int
14757 main ()
14758 {
14759 ${cf_cv_main_return:-return} foo()
14760   ;
14761   return 0;
14762 }
14763 _ACEOF
14764 rm -f conftest.$ac_objext
14765 if { (eval echo "$as_me:14765: \"$ac_compile\"") >&5
14766   (eval $ac_compile) 2>&5
14767   ac_status=$?
14768   echo "$as_me:14768: \$? = $ac_status" >&5
14769   (exit $ac_status); } &&
14770          { ac_try='test -s conftest.$ac_objext'
14771   { (eval echo "$as_me:14771: \"$ac_try\"") >&5
14772   (eval $ac_try) 2>&5
14773   ac_status=$?
14774   echo "$as_me:14774: \$? = $ac_status" >&5
14775   (exit $ac_status); }; }; then
14776   cf_cv_gcc_inline=yes
14777 else
14778   echo "$as_me: failed program was:" >&5
14779 cat conftest.$ac_ext >&5
14780 cf_cv_gcc_inline=no
14781 fi
14782 rm -f conftest.$ac_objext conftest.$ac_ext
14783       CFLAGS=$cf_save_CFLAGS
14784
14785 fi
14786 echo "$as_me:14786: result: $cf_cv_gcc_inline" >&5
14787 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14788     if test "$cf_cv_gcc_inline" = yes ; then
14789
14790 cf_fix_cppflags=no
14791 cf_new_cflags=
14792 cf_new_cppflags=
14793 cf_new_extra_cppflags=
14794
14795 for cf_add_cflags in --param max-inline-insns-single=1200
14796 do
14797 case $cf_fix_cppflags in
14798 no)
14799         case $cf_add_cflags in #(vi
14800         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14801                 case $cf_add_cflags in
14802                 -D*)
14803                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14804
14805                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14806                                 && test -z "${cf_tst_cflags}" \
14807                                 && cf_fix_cppflags=yes
14808
14809                         if test $cf_fix_cppflags = yes ; then
14810                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14811                                 continue
14812                         elif test "${cf_tst_cflags}" = "\"'" ; then
14813                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14814                                 continue
14815                         fi
14816                         ;;
14817                 esac
14818                 case "$CPPFLAGS" in
14819                 *$cf_add_cflags) #(vi
14820                         ;;
14821                 *) #(vi
14822                         case $cf_add_cflags in #(vi
14823                         -D*)
14824                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14825
14826 CPPFLAGS=`echo "$CPPFLAGS" | \
14827         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14828                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14829
14830                                 ;;
14831                         esac
14832                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14833                         ;;
14834                 esac
14835                 ;;
14836         *)
14837                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14838                 ;;
14839         esac
14840         ;;
14841 yes)
14842         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14843
14844         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14845
14846         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14847                 && test -z "${cf_tst_cflags}" \
14848                 && cf_fix_cppflags=no
14849         ;;
14850 esac
14851 done
14852
14853 if test -n "$cf_new_cflags" ; then
14854
14855         CFLAGS="$CFLAGS $cf_new_cflags"
14856 fi
14857
14858 if test -n "$cf_new_cppflags" ; then
14859
14860         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14861 fi
14862
14863 if test -n "$cf_new_extra_cppflags" ; then
14864
14865         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14866 fi
14867
14868     fi
14869   fi
14870 fi
14871
14872 echo "$as_me:14872: checking for signal global datatype" >&5
14873 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14874 if test "${cf_cv_sig_atomic_t+set}" = set; then
14875   echo $ECHO_N "(cached) $ECHO_C" >&6
14876 else
14877
14878         for cf_type in \
14879                 "volatile sig_atomic_t" \
14880                 "sig_atomic_t" \
14881                 "int"
14882         do
14883         cat >conftest.$ac_ext <<_ACEOF
14884 #line 14884 "configure"
14885 #include "confdefs.h"
14886
14887 #include <sys/types.h>
14888 #include <signal.h>
14889 #include <stdio.h>
14890
14891 extern $cf_type x;
14892 $cf_type x;
14893 static void handler(int sig)
14894 {
14895         x = 5;
14896 }
14897 int
14898 main ()
14899 {
14900 signal(SIGINT, handler);
14901                  x = 1
14902   ;
14903   return 0;
14904 }
14905 _ACEOF
14906 rm -f conftest.$ac_objext
14907 if { (eval echo "$as_me:14907: \"$ac_compile\"") >&5
14908   (eval $ac_compile) 2>&5
14909   ac_status=$?
14910   echo "$as_me:14910: \$? = $ac_status" >&5
14911   (exit $ac_status); } &&
14912          { ac_try='test -s conftest.$ac_objext'
14913   { (eval echo "$as_me:14913: \"$ac_try\"") >&5
14914   (eval $ac_try) 2>&5
14915   ac_status=$?
14916   echo "$as_me:14916: \$? = $ac_status" >&5
14917   (exit $ac_status); }; }; then
14918   cf_cv_sig_atomic_t=$cf_type
14919 else
14920   echo "$as_me: failed program was:" >&5
14921 cat conftest.$ac_ext >&5
14922 cf_cv_sig_atomic_t=no
14923 fi
14924 rm -f conftest.$ac_objext conftest.$ac_ext
14925                 test "$cf_cv_sig_atomic_t" != no && break
14926         done
14927
14928 fi
14929
14930 echo "$as_me:14930: result: $cf_cv_sig_atomic_t" >&5
14931 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14932 test "$cf_cv_sig_atomic_t" != no &&
14933 cat >>confdefs.h <<EOF
14934 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14935 EOF
14936
14937 if test $NCURSES_CHTYPE = auto ; then
14938
14939 echo "$as_me:14939: checking for type of chtype" >&5
14940 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14941 if test "${cf_cv_typeof_chtype+set}" = set; then
14942   echo $ECHO_N "(cached) $ECHO_C" >&6
14943 else
14944
14945                 if test "$cross_compiling" = yes; then
14946   cf_cv_typeof_chtype=long
14947 else
14948   cat >conftest.$ac_ext <<_ACEOF
14949 #line 14949 "configure"
14950 #include "confdefs.h"
14951
14952 #define WANT_BITS 31
14953 #include <stdio.h>
14954 int main()
14955 {
14956         FILE *fp = fopen("cf_test.out", "w");
14957         if (fp != 0) {
14958                 char *result = "long";
14959                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14960                         int n;
14961                         unsigned int x, y;
14962                         for (n = 0; n < WANT_BITS; n++) {
14963                                 x = (1 << n);
14964                                 y = (x >> n);
14965                                 if (y != 1 || x == 0) {
14966                                         x = 0;
14967                                         break;
14968                                 }
14969                         }
14970                         /*
14971                          * If x is nonzero, an int is big enough for the bits
14972                          * that we want.
14973                          */
14974                         result = (x != 0) ? "int" : "long";
14975                 }
14976                 fputs(result, fp);
14977                 fclose(fp);
14978         }
14979         ${cf_cv_main_return:-return}(0);
14980 }
14981
14982 _ACEOF
14983 rm -f conftest$ac_exeext
14984 if { (eval echo "$as_me:14984: \"$ac_link\"") >&5
14985   (eval $ac_link) 2>&5
14986   ac_status=$?
14987   echo "$as_me:14987: \$? = $ac_status" >&5
14988   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14989   { (eval echo "$as_me:14989: \"$ac_try\"") >&5
14990   (eval $ac_try) 2>&5
14991   ac_status=$?
14992   echo "$as_me:14992: \$? = $ac_status" >&5
14993   (exit $ac_status); }; }; then
14994   cf_cv_typeof_chtype=`cat cf_test.out`
14995 else
14996   echo "$as_me: program exited with status $ac_status" >&5
14997 echo "$as_me: failed program was:" >&5
14998 cat conftest.$ac_ext >&5
14999 cf_cv_typeof_chtype=long
15000 fi
15001 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15002 fi
15003                 rm -f cf_test.out
15004
15005 fi
15006
15007 echo "$as_me:15007: result: $cf_cv_typeof_chtype" >&5
15008 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15009
15010 cat >>confdefs.h <<EOF
15011 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15012 EOF
15013
15014 else
15015         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15016 fi
15017 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15018
15019 echo "$as_me:15019: checking if unsigned literals are legal" >&5
15020 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15021 if test "${cf_cv_unsigned_literals+set}" = set; then
15022   echo $ECHO_N "(cached) $ECHO_C" >&6
15023 else
15024
15025         cat >conftest.$ac_ext <<_ACEOF
15026 #line 15026 "configure"
15027 #include "confdefs.h"
15028
15029 int
15030 main ()
15031 {
15032 long x = 1L + 1UL + 1U + 1
15033   ;
15034   return 0;
15035 }
15036 _ACEOF
15037 rm -f conftest.$ac_objext
15038 if { (eval echo "$as_me:15038: \"$ac_compile\"") >&5
15039   (eval $ac_compile) 2>&5
15040   ac_status=$?
15041   echo "$as_me:15041: \$? = $ac_status" >&5
15042   (exit $ac_status); } &&
15043          { ac_try='test -s conftest.$ac_objext'
15044   { (eval echo "$as_me:15044: \"$ac_try\"") >&5
15045   (eval $ac_try) 2>&5
15046   ac_status=$?
15047   echo "$as_me:15047: \$? = $ac_status" >&5
15048   (exit $ac_status); }; }; then
15049   cf_cv_unsigned_literals=yes
15050 else
15051   echo "$as_me: failed program was:" >&5
15052 cat conftest.$ac_ext >&5
15053 cf_cv_unsigned_literals=no
15054 fi
15055 rm -f conftest.$ac_objext conftest.$ac_ext
15056
15057 fi
15058
15059 echo "$as_me:15059: result: $cf_cv_unsigned_literals" >&5
15060 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15061
15062 cf_cv_1UL="1"
15063 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15064 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15065
15066 if test $NCURSES_MMASK_T = auto ; then
15067         cf_cv_typeof_mmask_t=long
15068 else
15069         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15070 fi
15071 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15072
15073 ###     Checks for external-data
15074
15075 echo "$as_me:15075: checking if external errno is declared" >&5
15076 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15077 if test "${cf_cv_dcl_errno+set}" = set; then
15078   echo $ECHO_N "(cached) $ECHO_C" >&6
15079 else
15080
15081     cat >conftest.$ac_ext <<_ACEOF
15082 #line 15082 "configure"
15083 #include "confdefs.h"
15084
15085 #ifdef HAVE_STDLIB_H
15086 #include <stdlib.h>
15087 #endif
15088 #include <stdio.h>
15089 #include <sys/types.h>
15090 #include <errno.h>
15091 int
15092 main ()
15093 {
15094 int x = (int) errno
15095   ;
15096   return 0;
15097 }
15098 _ACEOF
15099 rm -f conftest.$ac_objext
15100 if { (eval echo "$as_me:15100: \"$ac_compile\"") >&5
15101   (eval $ac_compile) 2>&5
15102   ac_status=$?
15103   echo "$as_me:15103: \$? = $ac_status" >&5
15104   (exit $ac_status); } &&
15105          { ac_try='test -s conftest.$ac_objext'
15106   { (eval echo "$as_me:15106: \"$ac_try\"") >&5
15107   (eval $ac_try) 2>&5
15108   ac_status=$?
15109   echo "$as_me:15109: \$? = $ac_status" >&5
15110   (exit $ac_status); }; }; then
15111   cf_cv_dcl_errno=yes
15112 else
15113   echo "$as_me: failed program was:" >&5
15114 cat conftest.$ac_ext >&5
15115 cf_cv_dcl_errno=no
15116 fi
15117 rm -f conftest.$ac_objext conftest.$ac_ext
15118
15119 fi
15120 echo "$as_me:15120: result: $cf_cv_dcl_errno" >&5
15121 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15122
15123 if test "$cf_cv_dcl_errno" = no ; then
15124
15125 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15126
15127     cat >>confdefs.h <<EOF
15128 #define $cf_result 1
15129 EOF
15130
15131 fi
15132
15133 # It's possible (for near-UNIX clones) that the data doesn't exist
15134
15135 echo "$as_me:15135: checking if external errno exists" >&5
15136 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15137 if test "${cf_cv_have_errno+set}" = set; then
15138   echo $ECHO_N "(cached) $ECHO_C" >&6
15139 else
15140
15141     cat >conftest.$ac_ext <<_ACEOF
15142 #line 15142 "configure"
15143 #include "confdefs.h"
15144
15145 #undef errno
15146 extern int errno;
15147
15148 int
15149 main ()
15150 {
15151 errno = 2
15152   ;
15153   return 0;
15154 }
15155 _ACEOF
15156 rm -f conftest.$ac_objext conftest$ac_exeext
15157 if { (eval echo "$as_me:15157: \"$ac_link\"") >&5
15158   (eval $ac_link) 2>&5
15159   ac_status=$?
15160   echo "$as_me:15160: \$? = $ac_status" >&5
15161   (exit $ac_status); } &&
15162          { ac_try='test -s conftest$ac_exeext'
15163   { (eval echo "$as_me:15163: \"$ac_try\"") >&5
15164   (eval $ac_try) 2>&5
15165   ac_status=$?
15166   echo "$as_me:15166: \$? = $ac_status" >&5
15167   (exit $ac_status); }; }; then
15168   cf_cv_have_errno=yes
15169 else
15170   echo "$as_me: failed program was:" >&5
15171 cat conftest.$ac_ext >&5
15172 cf_cv_have_errno=no
15173 fi
15174 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15175
15176 fi
15177 echo "$as_me:15177: result: $cf_cv_have_errno" >&5
15178 echo "${ECHO_T}$cf_cv_have_errno" >&6
15179
15180 if test "$cf_cv_have_errno" = yes ; then
15181
15182 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15183
15184     cat >>confdefs.h <<EOF
15185 #define $cf_result 1
15186 EOF
15187
15188 fi
15189
15190 echo "$as_me:15190: checking if data-only library module links" >&5
15191 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15192 if test "${cf_cv_link_dataonly+set}" = set; then
15193   echo $ECHO_N "(cached) $ECHO_C" >&6
15194 else
15195
15196         rm -f conftest.a
15197         cat >conftest.$ac_ext <<EOF
15198 #line 15198 "configure"
15199 int     testdata[3] = { 123, 456, 789 };
15200 EOF
15201         if { (eval echo "$as_me:15201: \"$ac_compile\"") >&5
15202   (eval $ac_compile) 2>&5
15203   ac_status=$?
15204   echo "$as_me:15204: \$? = $ac_status" >&5
15205   (exit $ac_status); } ; then
15206                 mv conftest.o data.o && \
15207                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15208         fi
15209         rm -f conftest.$ac_ext data.o
15210         cat >conftest.$ac_ext <<EOF
15211 #line 15211 "configure"
15212 int     testfunc()
15213 {
15214 #if defined(NeXT)
15215         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15216 #else
15217         extern int testdata[3];
15218         return testdata[0] == 123
15219            &&  testdata[1] == 456
15220            &&  testdata[2] == 789;
15221 #endif
15222 }
15223 EOF
15224         if { (eval echo "$as_me:15224: \"$ac_compile\"") >&5
15225   (eval $ac_compile) 2>&5
15226   ac_status=$?
15227   echo "$as_me:15227: \$? = $ac_status" >&5
15228   (exit $ac_status); }; then
15229                 mv conftest.o func.o && \
15230                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15231         fi
15232         rm -f conftest.$ac_ext func.o
15233         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15234         cf_saveLIBS="$LIBS"
15235         LIBS="conftest.a $LIBS"
15236         if test "$cross_compiling" = yes; then
15237   cf_cv_link_dataonly=unknown
15238 else
15239   cat >conftest.$ac_ext <<_ACEOF
15240 #line 15240 "configure"
15241 #include "confdefs.h"
15242
15243         int main()
15244         {
15245                 extern int testfunc();
15246                 ${cf_cv_main_return:-return} (!testfunc());
15247         }
15248
15249 _ACEOF
15250 rm -f conftest$ac_exeext
15251 if { (eval echo "$as_me:15251: \"$ac_link\"") >&5
15252   (eval $ac_link) 2>&5
15253   ac_status=$?
15254   echo "$as_me:15254: \$? = $ac_status" >&5
15255   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15256   { (eval echo "$as_me:15256: \"$ac_try\"") >&5
15257   (eval $ac_try) 2>&5
15258   ac_status=$?
15259   echo "$as_me:15259: \$? = $ac_status" >&5
15260   (exit $ac_status); }; }; then
15261   cf_cv_link_dataonly=yes
15262 else
15263   echo "$as_me: program exited with status $ac_status" >&5
15264 echo "$as_me: failed program was:" >&5
15265 cat conftest.$ac_ext >&5
15266 cf_cv_link_dataonly=no
15267 fi
15268 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15269 fi
15270         LIBS="$cf_saveLIBS"
15271
15272 fi
15273
15274 echo "$as_me:15274: result: $cf_cv_link_dataonly" >&5
15275 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15276
15277 if test "$cf_cv_link_dataonly" = no ; then
15278
15279 cat >>confdefs.h <<\EOF
15280 #define BROKEN_LINKER 1
15281 EOF
15282
15283         BROKEN_LINKER=1
15284 fi
15285
15286 ###     Checks for library functions.
15287
15288 for ac_func in \
15289 getcwd \
15290 getegid \
15291 geteuid \
15292 getttynam \
15293 issetugid \
15294 poll \
15295 putenv \
15296 remove \
15297 select \
15298 setbuf \
15299 setbuffer \
15300 setenv \
15301 setvbuf \
15302 sigaction \
15303 sigvec \
15304 strdup \
15305 strstr \
15306 tcgetpgrp \
15307 times \
15308 vsnprintf \
15309
15310 do
15311 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15312 echo "$as_me:15312: checking for $ac_func" >&5
15313 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15314 if eval "test \"\${$as_ac_var+set}\" = set"; then
15315   echo $ECHO_N "(cached) $ECHO_C" >&6
15316 else
15317   cat >conftest.$ac_ext <<_ACEOF
15318 #line 15318 "configure"
15319 #include "confdefs.h"
15320 /* System header to define __stub macros and hopefully few prototypes,
15321     which can conflict with char $ac_func (); below.  */
15322 #include <assert.h>
15323 /* Override any gcc2 internal prototype to avoid an error.  */
15324 #ifdef __cplusplus
15325 extern "C"
15326 #endif
15327 /* We use char because int might match the return type of a gcc2
15328    builtin and then its argument prototype would still apply.  */
15329 char $ac_func ();
15330 char (*f) ();
15331
15332 int
15333 main ()
15334 {
15335 /* The GNU C library defines this for functions which it implements
15336     to always fail with ENOSYS.  Some functions are actually named
15337     something starting with __ and the normal name is an alias.  */
15338 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15339 choke me
15340 #else
15341 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15342 #endif
15343
15344   ;
15345   return 0;
15346 }
15347 _ACEOF
15348 rm -f conftest.$ac_objext conftest$ac_exeext
15349 if { (eval echo "$as_me:15349: \"$ac_link\"") >&5
15350   (eval $ac_link) 2>&5
15351   ac_status=$?
15352   echo "$as_me:15352: \$? = $ac_status" >&5
15353   (exit $ac_status); } &&
15354          { ac_try='test -s conftest$ac_exeext'
15355   { (eval echo "$as_me:15355: \"$ac_try\"") >&5
15356   (eval $ac_try) 2>&5
15357   ac_status=$?
15358   echo "$as_me:15358: \$? = $ac_status" >&5
15359   (exit $ac_status); }; }; then
15360   eval "$as_ac_var=yes"
15361 else
15362   echo "$as_me: failed program was:" >&5
15363 cat conftest.$ac_ext >&5
15364 eval "$as_ac_var=no"
15365 fi
15366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15367 fi
15368 echo "$as_me:15368: result: `eval echo '${'$as_ac_var'}'`" >&5
15369 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15370 if test `eval echo '${'$as_ac_var'}'` = yes; then
15371   cat >>confdefs.h <<EOF
15372 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15373 EOF
15374
15375 fi
15376 done
15377
15378 if test "x$with_getcap" = "xyes" ; then
15379
15380 echo "$as_me:15380: checking for terminal-capability database functions" >&5
15381 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15382 if test "${cf_cv_cgetent+set}" = set; then
15383   echo $ECHO_N "(cached) $ECHO_C" >&6
15384 else
15385
15386 cat >conftest.$ac_ext <<_ACEOF
15387 #line 15387 "configure"
15388 #include "confdefs.h"
15389
15390 #include <stdlib.h>
15391 int
15392 main ()
15393 {
15394
15395         char temp[128];
15396         char *buf = temp;
15397         char *db_array = temp;
15398         cgetent(&buf, &db_array, "vt100");
15399         cgetcap(buf, "tc", '=');
15400         cgetmatch(buf, "tc");
15401
15402   ;
15403   return 0;
15404 }
15405 _ACEOF
15406 rm -f conftest.$ac_objext conftest$ac_exeext
15407 if { (eval echo "$as_me:15407: \"$ac_link\"") >&5
15408   (eval $ac_link) 2>&5
15409   ac_status=$?
15410   echo "$as_me:15410: \$? = $ac_status" >&5
15411   (exit $ac_status); } &&
15412          { ac_try='test -s conftest$ac_exeext'
15413   { (eval echo "$as_me:15413: \"$ac_try\"") >&5
15414   (eval $ac_try) 2>&5
15415   ac_status=$?
15416   echo "$as_me:15416: \$? = $ac_status" >&5
15417   (exit $ac_status); }; }; then
15418   cf_cv_cgetent=yes
15419 else
15420   echo "$as_me: failed program was:" >&5
15421 cat conftest.$ac_ext >&5
15422 cf_cv_cgetent=no
15423 fi
15424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15425
15426 fi
15427 echo "$as_me:15427: result: $cf_cv_cgetent" >&5
15428 echo "${ECHO_T}$cf_cv_cgetent" >&6
15429
15430 if test "$cf_cv_cgetent" = yes
15431 then
15432
15433 cat >>confdefs.h <<\EOF
15434 #define HAVE_BSD_CGETENT 1
15435 EOF
15436
15437 echo "$as_me:15437: checking if cgetent uses const parameter" >&5
15438 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15439 if test "${cf_cv_cgetent_const+set}" = set; then
15440   echo $ECHO_N "(cached) $ECHO_C" >&6
15441 else
15442
15443 cat >conftest.$ac_ext <<_ACEOF
15444 #line 15444 "configure"
15445 #include "confdefs.h"
15446
15447 #include <stdlib.h>
15448 int
15449 main ()
15450 {
15451
15452         char temp[128];
15453         char *buf = temp;
15454 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15455         const char *db_array = temp;
15456         cgetent(&buf, &db_array, "vt100");
15457 #endif
15458         cgetcap(buf, "tc", '=');
15459         cgetmatch(buf, "tc");
15460
15461   ;
15462   return 0;
15463 }
15464 _ACEOF
15465 rm -f conftest.$ac_objext conftest$ac_exeext
15466 if { (eval echo "$as_me:15466: \"$ac_link\"") >&5
15467   (eval $ac_link) 2>&5
15468   ac_status=$?
15469   echo "$as_me:15469: \$? = $ac_status" >&5
15470   (exit $ac_status); } &&
15471          { ac_try='test -s conftest$ac_exeext'
15472   { (eval echo "$as_me:15472: \"$ac_try\"") >&5
15473   (eval $ac_try) 2>&5
15474   ac_status=$?
15475   echo "$as_me:15475: \$? = $ac_status" >&5
15476   (exit $ac_status); }; }; then
15477   cf_cv_cgetent_const=yes
15478 else
15479   echo "$as_me: failed program was:" >&5
15480 cat conftest.$ac_ext >&5
15481 cf_cv_cgetent_const=no
15482 fi
15483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15484
15485 fi
15486 echo "$as_me:15486: result: $cf_cv_cgetent_const" >&5
15487 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15488         if test "$cf_cv_cgetent_const" = yes
15489         then
15490
15491 cat >>confdefs.h <<EOF
15492 #define CGETENT_CONST const
15493 EOF
15494
15495         fi
15496 fi
15497
15498 fi
15499
15500 echo "$as_me:15500: checking for isascii" >&5
15501 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15502 if test "${cf_cv_have_isascii+set}" = set; then
15503   echo $ECHO_N "(cached) $ECHO_C" >&6
15504 else
15505
15506         cat >conftest.$ac_ext <<_ACEOF
15507 #line 15507 "configure"
15508 #include "confdefs.h"
15509 #include <ctype.h>
15510 int
15511 main ()
15512 {
15513 int x = isascii(' ')
15514   ;
15515   return 0;
15516 }
15517 _ACEOF
15518 rm -f conftest.$ac_objext conftest$ac_exeext
15519 if { (eval echo "$as_me:15519: \"$ac_link\"") >&5
15520   (eval $ac_link) 2>&5
15521   ac_status=$?
15522   echo "$as_me:15522: \$? = $ac_status" >&5
15523   (exit $ac_status); } &&
15524          { ac_try='test -s conftest$ac_exeext'
15525   { (eval echo "$as_me:15525: \"$ac_try\"") >&5
15526   (eval $ac_try) 2>&5
15527   ac_status=$?
15528   echo "$as_me:15528: \$? = $ac_status" >&5
15529   (exit $ac_status); }; }; then
15530   cf_cv_have_isascii=yes
15531 else
15532   echo "$as_me: failed program was:" >&5
15533 cat conftest.$ac_ext >&5
15534 cf_cv_have_isascii=no
15535 fi
15536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15537
15538 fi
15539 echo "$as_me:15539: result: $cf_cv_have_isascii" >&5
15540 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15541 test "$cf_cv_have_isascii" = yes &&
15542 cat >>confdefs.h <<\EOF
15543 #define HAVE_ISASCII 1
15544 EOF
15545
15546 if test "$ac_cv_func_sigaction" = yes; then
15547 echo "$as_me:15547: checking whether sigaction needs _POSIX_SOURCE" >&5
15548 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15549 cat >conftest.$ac_ext <<_ACEOF
15550 #line 15550 "configure"
15551 #include "confdefs.h"
15552
15553 #include <sys/types.h>
15554 #include <signal.h>
15555 int
15556 main ()
15557 {
15558 struct sigaction act
15559   ;
15560   return 0;
15561 }
15562 _ACEOF
15563 rm -f conftest.$ac_objext
15564 if { (eval echo "$as_me:15564: \"$ac_compile\"") >&5
15565   (eval $ac_compile) 2>&5
15566   ac_status=$?
15567   echo "$as_me:15567: \$? = $ac_status" >&5
15568   (exit $ac_status); } &&
15569          { ac_try='test -s conftest.$ac_objext'
15570   { (eval echo "$as_me:15570: \"$ac_try\"") >&5
15571   (eval $ac_try) 2>&5
15572   ac_status=$?
15573   echo "$as_me:15573: \$? = $ac_status" >&5
15574   (exit $ac_status); }; }; then
15575   sigact_bad=no
15576 else
15577   echo "$as_me: failed program was:" >&5
15578 cat conftest.$ac_ext >&5
15579
15580 cat >conftest.$ac_ext <<_ACEOF
15581 #line 15581 "configure"
15582 #include "confdefs.h"
15583
15584 #define _POSIX_SOURCE
15585 #include <sys/types.h>
15586 #include <signal.h>
15587 int
15588 main ()
15589 {
15590 struct sigaction act
15591   ;
15592   return 0;
15593 }
15594 _ACEOF
15595 rm -f conftest.$ac_objext
15596 if { (eval echo "$as_me:15596: \"$ac_compile\"") >&5
15597   (eval $ac_compile) 2>&5
15598   ac_status=$?
15599   echo "$as_me:15599: \$? = $ac_status" >&5
15600   (exit $ac_status); } &&
15601          { ac_try='test -s conftest.$ac_objext'
15602   { (eval echo "$as_me:15602: \"$ac_try\"") >&5
15603   (eval $ac_try) 2>&5
15604   ac_status=$?
15605   echo "$as_me:15605: \$? = $ac_status" >&5
15606   (exit $ac_status); }; }; then
15607   sigact_bad=yes
15608
15609 cat >>confdefs.h <<\EOF
15610 #define _POSIX_SOURCE 1
15611 EOF
15612
15613 else
15614   echo "$as_me: failed program was:" >&5
15615 cat conftest.$ac_ext >&5
15616 sigact_bad=unknown
15617 fi
15618 rm -f conftest.$ac_objext conftest.$ac_ext
15619 fi
15620 rm -f conftest.$ac_objext conftest.$ac_ext
15621 echo "$as_me:15621: result: $sigact_bad" >&5
15622 echo "${ECHO_T}$sigact_bad" >&6
15623 fi
15624
15625 echo "$as_me:15625: checking if nanosleep really works" >&5
15626 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15627 if test "${cf_cv_func_nanosleep+set}" = set; then
15628   echo $ECHO_N "(cached) $ECHO_C" >&6
15629 else
15630
15631 if test "$cross_compiling" = yes; then
15632   cf_cv_func_nanosleep=unknown
15633 else
15634   cat >conftest.$ac_ext <<_ACEOF
15635 #line 15635 "configure"
15636 #include "confdefs.h"
15637
15638 #include <stdio.h>
15639 #include <errno.h>
15640 #include <time.h>
15641
15642 #ifdef HAVE_SYS_TIME_H
15643 #include <sys/time.h>
15644 #endif
15645
15646 int main() {
15647         struct timespec ts1, ts2;
15648         int code;
15649         ts1.tv_sec  = 0;
15650         ts1.tv_nsec = 750000000;
15651         ts2.tv_sec  = 0;
15652         ts2.tv_nsec = 0;
15653         errno = 0;
15654         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15655         ${cf_cv_main_return:-return}(code != 0);
15656 }
15657
15658 _ACEOF
15659 rm -f conftest$ac_exeext
15660 if { (eval echo "$as_me:15660: \"$ac_link\"") >&5
15661   (eval $ac_link) 2>&5
15662   ac_status=$?
15663   echo "$as_me:15663: \$? = $ac_status" >&5
15664   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15665   { (eval echo "$as_me:15665: \"$ac_try\"") >&5
15666   (eval $ac_try) 2>&5
15667   ac_status=$?
15668   echo "$as_me:15668: \$? = $ac_status" >&5
15669   (exit $ac_status); }; }; then
15670   cf_cv_func_nanosleep=yes
15671 else
15672   echo "$as_me: program exited with status $ac_status" >&5
15673 echo "$as_me: failed program was:" >&5
15674 cat conftest.$ac_ext >&5
15675 cf_cv_func_nanosleep=no
15676 fi
15677 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15678 fi
15679 fi
15680 echo "$as_me:15680: result: $cf_cv_func_nanosleep" >&5
15681 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15682
15683 test "$cf_cv_func_nanosleep" = "yes" &&
15684 cat >>confdefs.h <<\EOF
15685 #define HAVE_NANOSLEEP 1
15686 EOF
15687
15688 for ac_header in \
15689 termio.h \
15690 termios.h \
15691 unistd.h \
15692
15693 do
15694 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15695 echo "$as_me:15695: checking for $ac_header" >&5
15696 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15697 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15698   echo $ECHO_N "(cached) $ECHO_C" >&6
15699 else
15700   cat >conftest.$ac_ext <<_ACEOF
15701 #line 15701 "configure"
15702 #include "confdefs.h"
15703 #include <$ac_header>
15704 _ACEOF
15705 if { (eval echo "$as_me:15705: \"$ac_cpp conftest.$ac_ext\"") >&5
15706   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15707   ac_status=$?
15708   egrep -v '^ *\+' conftest.er1 >conftest.err
15709   rm -f conftest.er1
15710   cat conftest.err >&5
15711   echo "$as_me:15711: \$? = $ac_status" >&5
15712   (exit $ac_status); } >/dev/null; then
15713   if test -s conftest.err; then
15714     ac_cpp_err=$ac_c_preproc_warn_flag
15715   else
15716     ac_cpp_err=
15717   fi
15718 else
15719   ac_cpp_err=yes
15720 fi
15721 if test -z "$ac_cpp_err"; then
15722   eval "$as_ac_Header=yes"
15723 else
15724   echo "$as_me: failed program was:" >&5
15725   cat conftest.$ac_ext >&5
15726   eval "$as_ac_Header=no"
15727 fi
15728 rm -f conftest.err conftest.$ac_ext
15729 fi
15730 echo "$as_me:15730: result: `eval echo '${'$as_ac_Header'}'`" >&5
15731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15732 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15733   cat >>confdefs.h <<EOF
15734 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15735 EOF
15736
15737 fi
15738 done
15739
15740 if test "$ISC" = yes ; then
15741
15742 for ac_header in sys/termio.h
15743 do
15744 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15745 echo "$as_me:15745: checking for $ac_header" >&5
15746 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15747 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15748   echo $ECHO_N "(cached) $ECHO_C" >&6
15749 else
15750   cat >conftest.$ac_ext <<_ACEOF
15751 #line 15751 "configure"
15752 #include "confdefs.h"
15753 #include <$ac_header>
15754 _ACEOF
15755 if { (eval echo "$as_me:15755: \"$ac_cpp conftest.$ac_ext\"") >&5
15756   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15757   ac_status=$?
15758   egrep -v '^ *\+' conftest.er1 >conftest.err
15759   rm -f conftest.er1
15760   cat conftest.err >&5
15761   echo "$as_me:15761: \$? = $ac_status" >&5
15762   (exit $ac_status); } >/dev/null; then
15763   if test -s conftest.err; then
15764     ac_cpp_err=$ac_c_preproc_warn_flag
15765   else
15766     ac_cpp_err=
15767   fi
15768 else
15769   ac_cpp_err=yes
15770 fi
15771 if test -z "$ac_cpp_err"; then
15772   eval "$as_ac_Header=yes"
15773 else
15774   echo "$as_me: failed program was:" >&5
15775   cat conftest.$ac_ext >&5
15776   eval "$as_ac_Header=no"
15777 fi
15778 rm -f conftest.err conftest.$ac_ext
15779 fi
15780 echo "$as_me:15780: result: `eval echo '${'$as_ac_Header'}'`" >&5
15781 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15782 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15783   cat >>confdefs.h <<EOF
15784 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15785 EOF
15786
15787 fi
15788 done
15789
15790 fi
15791 if test "$ac_cv_header_termios_h" = yes ; then
15792         case "$CFLAGS $CPPFLAGS" in
15793         *-D_POSIX_SOURCE*)
15794                 termios_bad=dunno ;;
15795         *)      termios_bad=maybe ;;
15796         esac
15797         if test "$termios_bad" = maybe ; then
15798         echo "$as_me:15798: checking whether termios.h needs _POSIX_SOURCE" >&5
15799 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15800         cat >conftest.$ac_ext <<_ACEOF
15801 #line 15801 "configure"
15802 #include "confdefs.h"
15803 #include <termios.h>
15804 int
15805 main ()
15806 {
15807 struct termios foo; int x = foo.c_iflag
15808   ;
15809   return 0;
15810 }
15811 _ACEOF
15812 rm -f conftest.$ac_objext
15813 if { (eval echo "$as_me:15813: \"$ac_compile\"") >&5
15814   (eval $ac_compile) 2>&5
15815   ac_status=$?
15816   echo "$as_me:15816: \$? = $ac_status" >&5
15817   (exit $ac_status); } &&
15818          { ac_try='test -s conftest.$ac_objext'
15819   { (eval echo "$as_me:15819: \"$ac_try\"") >&5
15820   (eval $ac_try) 2>&5
15821   ac_status=$?
15822   echo "$as_me:15822: \$? = $ac_status" >&5
15823   (exit $ac_status); }; }; then
15824   termios_bad=no
15825 else
15826   echo "$as_me: failed program was:" >&5
15827 cat conftest.$ac_ext >&5
15828
15829                 cat >conftest.$ac_ext <<_ACEOF
15830 #line 15830 "configure"
15831 #include "confdefs.h"
15832
15833 #define _POSIX_SOURCE
15834 #include <termios.h>
15835 int
15836 main ()
15837 {
15838 struct termios foo; int x = foo.c_iflag
15839   ;
15840   return 0;
15841 }
15842 _ACEOF
15843 rm -f conftest.$ac_objext
15844 if { (eval echo "$as_me:15844: \"$ac_compile\"") >&5
15845   (eval $ac_compile) 2>&5
15846   ac_status=$?
15847   echo "$as_me:15847: \$? = $ac_status" >&5
15848   (exit $ac_status); } &&
15849          { ac_try='test -s conftest.$ac_objext'
15850   { (eval echo "$as_me:15850: \"$ac_try\"") >&5
15851   (eval $ac_try) 2>&5
15852   ac_status=$?
15853   echo "$as_me:15853: \$? = $ac_status" >&5
15854   (exit $ac_status); }; }; then
15855   termios_bad=unknown
15856 else
15857   echo "$as_me: failed program was:" >&5
15858 cat conftest.$ac_ext >&5
15859 termios_bad=yes
15860 cat >>confdefs.h <<\EOF
15861 #define _POSIX_SOURCE 1
15862 EOF
15863
15864 fi
15865 rm -f conftest.$ac_objext conftest.$ac_ext
15866
15867 fi
15868 rm -f conftest.$ac_objext conftest.$ac_ext
15869         echo "$as_me:15869: result: $termios_bad" >&5
15870 echo "${ECHO_T}$termios_bad" >&6
15871         fi
15872 fi
15873
15874 echo "$as_me:15874: checking for tcgetattr" >&5
15875 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15876 if test "${cf_cv_have_tcgetattr+set}" = set; then
15877   echo $ECHO_N "(cached) $ECHO_C" >&6
15878 else
15879
15880 cat >conftest.$ac_ext <<_ACEOF
15881 #line 15881 "configure"
15882 #include "confdefs.h"
15883
15884 #include <sys/types.h>
15885 #ifdef HAVE_UNISTD_H
15886 #include <unistd.h>
15887 #endif
15888 #ifdef HAVE_TERMIOS_H
15889 #include <termios.h>
15890 #define TTY struct termios
15891 #else
15892 #ifdef HAVE_TERMIO_H
15893 #include <termio.h>
15894 #define TTY struct termio
15895 #endif
15896 #endif
15897
15898 int
15899 main ()
15900 {
15901
15902 TTY foo;
15903 tcgetattr(1, &foo);
15904   ;
15905   return 0;
15906 }
15907 _ACEOF
15908 rm -f conftest.$ac_objext conftest$ac_exeext
15909 if { (eval echo "$as_me:15909: \"$ac_link\"") >&5
15910   (eval $ac_link) 2>&5
15911   ac_status=$?
15912   echo "$as_me:15912: \$? = $ac_status" >&5
15913   (exit $ac_status); } &&
15914          { ac_try='test -s conftest$ac_exeext'
15915   { (eval echo "$as_me:15915: \"$ac_try\"") >&5
15916   (eval $ac_try) 2>&5
15917   ac_status=$?
15918   echo "$as_me:15918: \$? = $ac_status" >&5
15919   (exit $ac_status); }; }; then
15920   cf_cv_have_tcgetattr=yes
15921 else
15922   echo "$as_me: failed program was:" >&5
15923 cat conftest.$ac_ext >&5
15924 cf_cv_have_tcgetattr=no
15925 fi
15926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15927 fi
15928 echo "$as_me:15928: result: $cf_cv_have_tcgetattr" >&5
15929 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15930 test "$cf_cv_have_tcgetattr" = yes &&
15931 cat >>confdefs.h <<\EOF
15932 #define HAVE_TCGETATTR 1
15933 EOF
15934
15935 echo "$as_me:15935: checking for vsscanf function or workaround" >&5
15936 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15937 if test "${cf_cv_func_vsscanf+set}" = set; then
15938   echo $ECHO_N "(cached) $ECHO_C" >&6
15939 else
15940
15941 cat >conftest.$ac_ext <<_ACEOF
15942 #line 15942 "configure"
15943 #include "confdefs.h"
15944
15945 #include <stdarg.h>
15946 #include <stdio.h>
15947 int
15948 main ()
15949 {
15950
15951         va_list ap;
15952         vsscanf("from", "%d", ap)
15953   ;
15954   return 0;
15955 }
15956 _ACEOF
15957 rm -f conftest.$ac_objext conftest$ac_exeext
15958 if { (eval echo "$as_me:15958: \"$ac_link\"") >&5
15959   (eval $ac_link) 2>&5
15960   ac_status=$?
15961   echo "$as_me:15961: \$? = $ac_status" >&5
15962   (exit $ac_status); } &&
15963          { ac_try='test -s conftest$ac_exeext'
15964   { (eval echo "$as_me:15964: \"$ac_try\"") >&5
15965   (eval $ac_try) 2>&5
15966   ac_status=$?
15967   echo "$as_me:15967: \$? = $ac_status" >&5
15968   (exit $ac_status); }; }; then
15969   cf_cv_func_vsscanf=vsscanf
15970 else
15971   echo "$as_me: failed program was:" >&5
15972 cat conftest.$ac_ext >&5
15973
15974 cat >conftest.$ac_ext <<_ACEOF
15975 #line 15975 "configure"
15976 #include "confdefs.h"
15977
15978 #include <stdarg.h>
15979 #include <stdio.h>
15980 int
15981 main ()
15982 {
15983
15984     FILE strbuf;
15985     char *str = "from";
15986
15987     strbuf._flag = _IOREAD;
15988     strbuf._ptr = strbuf._base = (unsigned char *) str;
15989     strbuf._cnt = strlen(str);
15990     strbuf._file = _NFILE;
15991     return (vfscanf(&strbuf, "%d", ap))
15992   ;
15993   return 0;
15994 }
15995 _ACEOF
15996 rm -f conftest.$ac_objext conftest$ac_exeext
15997 if { (eval echo "$as_me:15997: \"$ac_link\"") >&5
15998   (eval $ac_link) 2>&5
15999   ac_status=$?
16000   echo "$as_me:16000: \$? = $ac_status" >&5
16001   (exit $ac_status); } &&
16002          { ac_try='test -s conftest$ac_exeext'
16003   { (eval echo "$as_me:16003: \"$ac_try\"") >&5
16004   (eval $ac_try) 2>&5
16005   ac_status=$?
16006   echo "$as_me:16006: \$? = $ac_status" >&5
16007   (exit $ac_status); }; }; then
16008   cf_cv_func_vsscanf=vfscanf
16009 else
16010   echo "$as_me: failed program was:" >&5
16011 cat conftest.$ac_ext >&5
16012
16013 cat >conftest.$ac_ext <<_ACEOF
16014 #line 16014 "configure"
16015 #include "confdefs.h"
16016
16017 #include <stdarg.h>
16018 #include <stdio.h>
16019 int
16020 main ()
16021 {
16022
16023     FILE strbuf;
16024     char *str = "from";
16025
16026     strbuf._flag = _IOREAD;
16027     strbuf._ptr = strbuf._base = (unsigned char *) str;
16028     strbuf._cnt = strlen(str);
16029     strbuf._file = _NFILE;
16030     return (_doscan(&strbuf, "%d", ap))
16031   ;
16032   return 0;
16033 }
16034 _ACEOF
16035 rm -f conftest.$ac_objext conftest$ac_exeext
16036 if { (eval echo "$as_me:16036: \"$ac_link\"") >&5
16037   (eval $ac_link) 2>&5
16038   ac_status=$?
16039   echo "$as_me:16039: \$? = $ac_status" >&5
16040   (exit $ac_status); } &&
16041          { ac_try='test -s conftest$ac_exeext'
16042   { (eval echo "$as_me:16042: \"$ac_try\"") >&5
16043   (eval $ac_try) 2>&5
16044   ac_status=$?
16045   echo "$as_me:16045: \$? = $ac_status" >&5
16046   (exit $ac_status); }; }; then
16047   cf_cv_func_vsscanf=_doscan
16048 else
16049   echo "$as_me: failed program was:" >&5
16050 cat conftest.$ac_ext >&5
16051
16052 cf_cv_func_vsscanf=no
16053 fi
16054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16055 fi
16056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16057 fi
16058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16059 fi
16060 echo "$as_me:16060: result: $cf_cv_func_vsscanf" >&5
16061 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16062
16063 case $cf_cv_func_vsscanf in #(vi
16064 vsscanf)
16065 cat >>confdefs.h <<\EOF
16066 #define HAVE_VSSCANF 1
16067 EOF
16068 ;; #(vi
16069 vfscanf)
16070 cat >>confdefs.h <<\EOF
16071 #define HAVE_VFSCANF 1
16072 EOF
16073 ;; #(vi
16074 _doscan)
16075 cat >>confdefs.h <<\EOF
16076 #define HAVE__DOSCAN 1
16077 EOF
16078 ;;
16079 esac
16080
16081 echo "$as_me:16081: checking for working mkstemp" >&5
16082 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16083 if test "${cf_cv_func_mkstemp+set}" = set; then
16084   echo $ECHO_N "(cached) $ECHO_C" >&6
16085 else
16086
16087 rm -rf conftest*
16088 if test "$cross_compiling" = yes; then
16089   cf_cv_func_mkstemp=maybe
16090 else
16091   cat >conftest.$ac_ext <<_ACEOF
16092 #line 16092 "configure"
16093 #include "confdefs.h"
16094
16095 #include <sys/types.h>
16096 #include <stdlib.h>
16097 #include <stdio.h>
16098 #include <string.h>
16099 #include <sys/stat.h>
16100 int main()
16101 {
16102         char *tmpl = "conftestXXXXXX";
16103         char name[2][80];
16104         int n;
16105         int result = 0;
16106         int fd;
16107         struct stat sb;
16108
16109         umask(077);
16110         for (n = 0; n < 2; ++n) {
16111                 strcpy(name[n], tmpl);
16112                 if ((fd = mkstemp(name[n])) >= 0) {
16113                         if (!strcmp(name[n], tmpl)
16114                          || stat(name[n], &sb) != 0
16115                          || (sb.st_mode & S_IFMT) != S_IFREG
16116                          || (sb.st_mode & 077) != 0) {
16117                                 result = 1;
16118                         }
16119                         close(fd);
16120                 }
16121         }
16122         if (result == 0
16123          && !strcmp(name[0], name[1]))
16124                 result = 1;
16125         ${cf_cv_main_return:-return}(result);
16126 }
16127
16128 _ACEOF
16129 rm -f conftest$ac_exeext
16130 if { (eval echo "$as_me:16130: \"$ac_link\"") >&5
16131   (eval $ac_link) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16135   { (eval echo "$as_me:16135: \"$ac_try\"") >&5
16136   (eval $ac_try) 2>&5
16137   ac_status=$?
16138   echo "$as_me:16138: \$? = $ac_status" >&5
16139   (exit $ac_status); }; }; then
16140   cf_cv_func_mkstemp=yes
16141
16142 else
16143   echo "$as_me: program exited with status $ac_status" >&5
16144 echo "$as_me: failed program was:" >&5
16145 cat conftest.$ac_ext >&5
16146 cf_cv_func_mkstemp=no
16147
16148 fi
16149 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16150 fi
16151
16152 fi
16153 echo "$as_me:16153: result: $cf_cv_func_mkstemp" >&5
16154 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16155 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16156         echo "$as_me:16156: checking for mkstemp" >&5
16157 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16158 if test "${ac_cv_func_mkstemp+set}" = set; then
16159   echo $ECHO_N "(cached) $ECHO_C" >&6
16160 else
16161   cat >conftest.$ac_ext <<_ACEOF
16162 #line 16162 "configure"
16163 #include "confdefs.h"
16164 /* System header to define __stub macros and hopefully few prototypes,
16165     which can conflict with char mkstemp (); below.  */
16166 #include <assert.h>
16167 /* Override any gcc2 internal prototype to avoid an error.  */
16168 #ifdef __cplusplus
16169 extern "C"
16170 #endif
16171 /* We use char because int might match the return type of a gcc2
16172    builtin and then its argument prototype would still apply.  */
16173 char mkstemp ();
16174 char (*f) ();
16175
16176 int
16177 main ()
16178 {
16179 /* The GNU C library defines this for functions which it implements
16180     to always fail with ENOSYS.  Some functions are actually named
16181     something starting with __ and the normal name is an alias.  */
16182 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16183 choke me
16184 #else
16185 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16186 #endif
16187
16188   ;
16189   return 0;
16190 }
16191 _ACEOF
16192 rm -f conftest.$ac_objext conftest$ac_exeext
16193 if { (eval echo "$as_me:16193: \"$ac_link\"") >&5
16194   (eval $ac_link) 2>&5
16195   ac_status=$?
16196   echo "$as_me:16196: \$? = $ac_status" >&5
16197   (exit $ac_status); } &&
16198          { ac_try='test -s conftest$ac_exeext'
16199   { (eval echo "$as_me:16199: \"$ac_try\"") >&5
16200   (eval $ac_try) 2>&5
16201   ac_status=$?
16202   echo "$as_me:16202: \$? = $ac_status" >&5
16203   (exit $ac_status); }; }; then
16204   ac_cv_func_mkstemp=yes
16205 else
16206   echo "$as_me: failed program was:" >&5
16207 cat conftest.$ac_ext >&5
16208 ac_cv_func_mkstemp=no
16209 fi
16210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16211 fi
16212 echo "$as_me:16212: result: $ac_cv_func_mkstemp" >&5
16213 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16214
16215 fi
16216 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16217
16218 cat >>confdefs.h <<\EOF
16219 #define HAVE_MKSTEMP 1
16220 EOF
16221
16222 fi
16223
16224 # setup for prototype of fallback for vsscanf()
16225
16226 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16227         HAVE_VSSCANF=1
16228 else
16229         HAVE_VSSCANF=0
16230 fi
16231
16232 if test "x$cross_compiling" = xyes ; then
16233         { echo "$as_me:16233: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16234 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16235 else
16236         echo "$as_me:16236: checking whether setvbuf arguments are reversed" >&5
16237 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16238 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16239   echo $ECHO_N "(cached) $ECHO_C" >&6
16240 else
16241   if test "$cross_compiling" = yes; then
16242   { { echo "$as_me:16242: error: cannot run test program while cross compiling" >&5
16243 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16244    { (exit 1); exit 1; }; }
16245 else
16246   cat >conftest.$ac_ext <<_ACEOF
16247 #line 16247 "configure"
16248 #include "confdefs.h"
16249 #include <stdio.h>
16250 /* If setvbuf has the reversed format, exit 0. */
16251 int
16252 main ()
16253 {
16254   /* This call has the arguments reversed.
16255      A reversed system may check and see that the address of main
16256      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16257   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16258     $ac_main_return(1);
16259   putc('\r', stdout);
16260   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16261 }
16262 _ACEOF
16263 rm -f conftest$ac_exeext
16264 if { (eval echo "$as_me:16264: \"$ac_link\"") >&5
16265   (eval $ac_link) 2>&5
16266   ac_status=$?
16267   echo "$as_me:16267: \$? = $ac_status" >&5
16268   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16269   { (eval echo "$as_me:16269: \"$ac_try\"") >&5
16270   (eval $ac_try) 2>&5
16271   ac_status=$?
16272   echo "$as_me:16272: \$? = $ac_status" >&5
16273   (exit $ac_status); }; }; then
16274   ac_cv_func_setvbuf_reversed=yes
16275 else
16276   echo "$as_me: program exited with status $ac_status" >&5
16277 echo "$as_me: failed program was:" >&5
16278 cat conftest.$ac_ext >&5
16279 ac_cv_func_setvbuf_reversed=no
16280 fi
16281 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16282 fi
16283 rm -f core core.* *.core
16284 fi
16285 echo "$as_me:16285: result: $ac_cv_func_setvbuf_reversed" >&5
16286 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16287 if test $ac_cv_func_setvbuf_reversed = yes; then
16288
16289 cat >>confdefs.h <<\EOF
16290 #define SETVBUF_REVERSED 1
16291 EOF
16292
16293 fi
16294
16295 fi
16296 echo "$as_me:16296: checking return type of signal handlers" >&5
16297 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16298 if test "${ac_cv_type_signal+set}" = set; then
16299   echo $ECHO_N "(cached) $ECHO_C" >&6
16300 else
16301   cat >conftest.$ac_ext <<_ACEOF
16302 #line 16302 "configure"
16303 #include "confdefs.h"
16304 #include <sys/types.h>
16305 #include <signal.h>
16306 #ifdef signal
16307 # undef signal
16308 #endif
16309 #ifdef __cplusplus
16310 extern "C" void (*signal (int, void (*)(int)))(int);
16311 #else
16312 void (*signal ()) ();
16313 #endif
16314
16315 int
16316 main ()
16317 {
16318 int i;
16319   ;
16320   return 0;
16321 }
16322 _ACEOF
16323 rm -f conftest.$ac_objext
16324 if { (eval echo "$as_me:16324: \"$ac_compile\"") >&5
16325   (eval $ac_compile) 2>&5
16326   ac_status=$?
16327   echo "$as_me:16327: \$? = $ac_status" >&5
16328   (exit $ac_status); } &&
16329          { ac_try='test -s conftest.$ac_objext'
16330   { (eval echo "$as_me:16330: \"$ac_try\"") >&5
16331   (eval $ac_try) 2>&5
16332   ac_status=$?
16333   echo "$as_me:16333: \$? = $ac_status" >&5
16334   (exit $ac_status); }; }; then
16335   ac_cv_type_signal=void
16336 else
16337   echo "$as_me: failed program was:" >&5
16338 cat conftest.$ac_ext >&5
16339 ac_cv_type_signal=int
16340 fi
16341 rm -f conftest.$ac_objext conftest.$ac_ext
16342 fi
16343 echo "$as_me:16343: result: $ac_cv_type_signal" >&5
16344 echo "${ECHO_T}$ac_cv_type_signal" >&6
16345
16346 cat >>confdefs.h <<EOF
16347 #define RETSIGTYPE $ac_cv_type_signal
16348 EOF
16349
16350 echo "$as_me:16350: checking for intptr_t" >&5
16351 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16352 if test "${ac_cv_type_intptr_t+set}" = set; then
16353   echo $ECHO_N "(cached) $ECHO_C" >&6
16354 else
16355   cat >conftest.$ac_ext <<_ACEOF
16356 #line 16356 "configure"
16357 #include "confdefs.h"
16358 $ac_includes_default
16359 int
16360 main ()
16361 {
16362 if ((intptr_t *) 0)
16363   return 0;
16364 if (sizeof (intptr_t))
16365   return 0;
16366   ;
16367   return 0;
16368 }
16369 _ACEOF
16370 rm -f conftest.$ac_objext
16371 if { (eval echo "$as_me:16371: \"$ac_compile\"") >&5
16372   (eval $ac_compile) 2>&5
16373   ac_status=$?
16374   echo "$as_me:16374: \$? = $ac_status" >&5
16375   (exit $ac_status); } &&
16376          { ac_try='test -s conftest.$ac_objext'
16377   { (eval echo "$as_me:16377: \"$ac_try\"") >&5
16378   (eval $ac_try) 2>&5
16379   ac_status=$?
16380   echo "$as_me:16380: \$? = $ac_status" >&5
16381   (exit $ac_status); }; }; then
16382   ac_cv_type_intptr_t=yes
16383 else
16384   echo "$as_me: failed program was:" >&5
16385 cat conftest.$ac_ext >&5
16386 ac_cv_type_intptr_t=no
16387 fi
16388 rm -f conftest.$ac_objext conftest.$ac_ext
16389 fi
16390 echo "$as_me:16390: result: $ac_cv_type_intptr_t" >&5
16391 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16392 if test $ac_cv_type_intptr_t = yes; then
16393   :
16394 else
16395
16396 cat >>confdefs.h <<EOF
16397 #define intptr_t long
16398 EOF
16399
16400 fi
16401
16402 echo "$as_me:16402: checking for type sigaction_t" >&5
16403 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16404 if test "${cf_cv_type_sigaction+set}" = set; then
16405   echo $ECHO_N "(cached) $ECHO_C" >&6
16406 else
16407
16408         cat >conftest.$ac_ext <<_ACEOF
16409 #line 16409 "configure"
16410 #include "confdefs.h"
16411
16412 #include <signal.h>
16413 int
16414 main ()
16415 {
16416 sigaction_t x
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   cf_cv_type_sigaction=yes
16434 else
16435   echo "$as_me: failed program was:" >&5
16436 cat conftest.$ac_ext >&5
16437 cf_cv_type_sigaction=no
16438 fi
16439 rm -f conftest.$ac_objext conftest.$ac_ext
16440 fi
16441
16442 echo "$as_me:16442: result: $cf_cv_type_sigaction" >&5
16443 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16444 test "$cf_cv_type_sigaction" = yes &&
16445 cat >>confdefs.h <<\EOF
16446 #define HAVE_TYPE_SIGACTION 1
16447 EOF
16448
16449 echo "$as_me:16449: checking declaration of size-change" >&5
16450 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16451 if test "${cf_cv_sizechange+set}" = set; then
16452   echo $ECHO_N "(cached) $ECHO_C" >&6
16453 else
16454
16455     cf_cv_sizechange=unknown
16456     cf_save_CPPFLAGS="$CPPFLAGS"
16457
16458 for cf_opts in "" "NEED_PTEM_H"
16459 do
16460
16461     CPPFLAGS="$cf_save_CPPFLAGS"
16462     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16463     cat >conftest.$ac_ext <<_ACEOF
16464 #line 16464 "configure"
16465 #include "confdefs.h"
16466 #include <sys/types.h>
16467 #ifdef HAVE_TERMIOS_H
16468 #include <termios.h>
16469 #else
16470 #ifdef HAVE_TERMIO_H
16471 #include <termio.h>
16472 #endif
16473 #endif
16474 #ifdef NEED_PTEM_H
16475 /* This is a workaround for SCO:  they neglected to define struct winsize in
16476  * termios.h -- it's only in termio.h and ptem.h
16477  */
16478 #include        <sys/stream.h>
16479 #include        <sys/ptem.h>
16480 #endif
16481 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16482 #include <sys/ioctl.h>
16483 #endif
16484
16485 int
16486 main ()
16487 {
16488
16489 #ifdef TIOCGSIZE
16490         struct ttysize win;     /* FIXME: what system is this? */
16491         int y = win.ts_lines;
16492         int x = win.ts_cols;
16493 #else
16494 #ifdef TIOCGWINSZ
16495         struct winsize win;
16496         int y = win.ws_row;
16497         int x = win.ws_col;
16498 #else
16499         no TIOCGSIZE or TIOCGWINSZ
16500 #endif /* TIOCGWINSZ */
16501 #endif /* TIOCGSIZE */
16502
16503   ;
16504   return 0;
16505 }
16506 _ACEOF
16507 rm -f conftest.$ac_objext
16508 if { (eval echo "$as_me:16508: \"$ac_compile\"") >&5
16509   (eval $ac_compile) 2>&5
16510   ac_status=$?
16511   echo "$as_me:16511: \$? = $ac_status" >&5
16512   (exit $ac_status); } &&
16513          { ac_try='test -s conftest.$ac_objext'
16514   { (eval echo "$as_me:16514: \"$ac_try\"") >&5
16515   (eval $ac_try) 2>&5
16516   ac_status=$?
16517   echo "$as_me:16517: \$? = $ac_status" >&5
16518   (exit $ac_status); }; }; then
16519   cf_cv_sizechange=yes
16520 else
16521   echo "$as_me: failed program was:" >&5
16522 cat conftest.$ac_ext >&5
16523 cf_cv_sizechange=no
16524 fi
16525 rm -f conftest.$ac_objext conftest.$ac_ext
16526
16527         CPPFLAGS="$cf_save_CPPFLAGS"
16528         if test "$cf_cv_sizechange" = yes ; then
16529                 echo "size-change succeeded ($cf_opts)" >&5
16530                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16531                 break
16532         fi
16533 done
16534
16535 fi
16536 echo "$as_me:16536: result: $cf_cv_sizechange" >&5
16537 echo "${ECHO_T}$cf_cv_sizechange" >&6
16538 if test "$cf_cv_sizechange" != no ; then
16539
16540 cat >>confdefs.h <<\EOF
16541 #define HAVE_SIZECHANGE 1
16542 EOF
16543
16544         case $cf_cv_sizechange in #(vi
16545         NEED*)
16546                 cat >>confdefs.h <<EOF
16547 #define $cf_cv_sizechange  1
16548 EOF
16549
16550                 ;;
16551         esac
16552 fi
16553
16554 echo "$as_me:16554: checking for memmove" >&5
16555 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16556 if test "${ac_cv_func_memmove+set}" = set; then
16557   echo $ECHO_N "(cached) $ECHO_C" >&6
16558 else
16559   cat >conftest.$ac_ext <<_ACEOF
16560 #line 16560 "configure"
16561 #include "confdefs.h"
16562 /* System header to define __stub macros and hopefully few prototypes,
16563     which can conflict with char memmove (); below.  */
16564 #include <assert.h>
16565 /* Override any gcc2 internal prototype to avoid an error.  */
16566 #ifdef __cplusplus
16567 extern "C"
16568 #endif
16569 /* We use char because int might match the return type of a gcc2
16570    builtin and then its argument prototype would still apply.  */
16571 char memmove ();
16572 char (*f) ();
16573
16574 int
16575 main ()
16576 {
16577 /* The GNU C library defines this for functions which it implements
16578     to always fail with ENOSYS.  Some functions are actually named
16579     something starting with __ and the normal name is an alias.  */
16580 #if defined (__stub_memmove) || defined (__stub___memmove)
16581 choke me
16582 #else
16583 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16584 #endif
16585
16586   ;
16587   return 0;
16588 }
16589 _ACEOF
16590 rm -f conftest.$ac_objext conftest$ac_exeext
16591 if { (eval echo "$as_me:16591: \"$ac_link\"") >&5
16592   (eval $ac_link) 2>&5
16593   ac_status=$?
16594   echo "$as_me:16594: \$? = $ac_status" >&5
16595   (exit $ac_status); } &&
16596          { ac_try='test -s conftest$ac_exeext'
16597   { (eval echo "$as_me:16597: \"$ac_try\"") >&5
16598   (eval $ac_try) 2>&5
16599   ac_status=$?
16600   echo "$as_me:16600: \$? = $ac_status" >&5
16601   (exit $ac_status); }; }; then
16602   ac_cv_func_memmove=yes
16603 else
16604   echo "$as_me: failed program was:" >&5
16605 cat conftest.$ac_ext >&5
16606 ac_cv_func_memmove=no
16607 fi
16608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16609 fi
16610 echo "$as_me:16610: result: $ac_cv_func_memmove" >&5
16611 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16612 if test $ac_cv_func_memmove = yes; then
16613   :
16614 else
16615
16616 echo "$as_me:16616: checking for bcopy" >&5
16617 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16618 if test "${ac_cv_func_bcopy+set}" = set; then
16619   echo $ECHO_N "(cached) $ECHO_C" >&6
16620 else
16621   cat >conftest.$ac_ext <<_ACEOF
16622 #line 16622 "configure"
16623 #include "confdefs.h"
16624 /* System header to define __stub macros and hopefully few prototypes,
16625     which can conflict with char bcopy (); below.  */
16626 #include <assert.h>
16627 /* Override any gcc2 internal prototype to avoid an error.  */
16628 #ifdef __cplusplus
16629 extern "C"
16630 #endif
16631 /* We use char because int might match the return type of a gcc2
16632    builtin and then its argument prototype would still apply.  */
16633 char bcopy ();
16634 char (*f) ();
16635
16636 int
16637 main ()
16638 {
16639 /* The GNU C library defines this for functions which it implements
16640     to always fail with ENOSYS.  Some functions are actually named
16641     something starting with __ and the normal name is an alias.  */
16642 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16643 choke me
16644 #else
16645 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16646 #endif
16647
16648   ;
16649   return 0;
16650 }
16651 _ACEOF
16652 rm -f conftest.$ac_objext conftest$ac_exeext
16653 if { (eval echo "$as_me:16653: \"$ac_link\"") >&5
16654   (eval $ac_link) 2>&5
16655   ac_status=$?
16656   echo "$as_me:16656: \$? = $ac_status" >&5
16657   (exit $ac_status); } &&
16658          { ac_try='test -s conftest$ac_exeext'
16659   { (eval echo "$as_me:16659: \"$ac_try\"") >&5
16660   (eval $ac_try) 2>&5
16661   ac_status=$?
16662   echo "$as_me:16662: \$? = $ac_status" >&5
16663   (exit $ac_status); }; }; then
16664   ac_cv_func_bcopy=yes
16665 else
16666   echo "$as_me: failed program was:" >&5
16667 cat conftest.$ac_ext >&5
16668 ac_cv_func_bcopy=no
16669 fi
16670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16671 fi
16672 echo "$as_me:16672: result: $ac_cv_func_bcopy" >&5
16673 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16674 if test $ac_cv_func_bcopy = yes; then
16675
16676         echo "$as_me:16676: checking if bcopy does overlapping moves" >&5
16677 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16678 if test "${cf_cv_good_bcopy+set}" = set; then
16679   echo $ECHO_N "(cached) $ECHO_C" >&6
16680 else
16681
16682                 if test "$cross_compiling" = yes; then
16683   cf_cv_good_bcopy=unknown
16684 else
16685   cat >conftest.$ac_ext <<_ACEOF
16686 #line 16686 "configure"
16687 #include "confdefs.h"
16688
16689 int main() {
16690         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16691         char temp[40];
16692         bcopy(data, temp, sizeof(data));
16693         bcopy(temp+10, temp, 15);
16694         bcopy(temp+5, temp+15, 10);
16695         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16696 }
16697
16698 _ACEOF
16699 rm -f conftest$ac_exeext
16700 if { (eval echo "$as_me:16700: \"$ac_link\"") >&5
16701   (eval $ac_link) 2>&5
16702   ac_status=$?
16703   echo "$as_me:16703: \$? = $ac_status" >&5
16704   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16705   { (eval echo "$as_me:16705: \"$ac_try\"") >&5
16706   (eval $ac_try) 2>&5
16707   ac_status=$?
16708   echo "$as_me:16708: \$? = $ac_status" >&5
16709   (exit $ac_status); }; }; then
16710   cf_cv_good_bcopy=yes
16711 else
16712   echo "$as_me: program exited with status $ac_status" >&5
16713 echo "$as_me: failed program was:" >&5
16714 cat conftest.$ac_ext >&5
16715 cf_cv_good_bcopy=no
16716 fi
16717 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16718 fi
16719
16720 fi
16721 echo "$as_me:16721: result: $cf_cv_good_bcopy" >&5
16722 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16723
16724 else
16725   cf_cv_good_bcopy=no
16726 fi
16727
16728         if test "$cf_cv_good_bcopy" = yes ; then
16729
16730 cat >>confdefs.h <<\EOF
16731 #define USE_OK_BCOPY 1
16732 EOF
16733
16734         else
16735
16736 cat >>confdefs.h <<\EOF
16737 #define USE_MY_MEMMOVE 1
16738 EOF
16739
16740         fi
16741
16742 fi
16743
16744 echo "$as_me:16744: checking if poll really works" >&5
16745 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16746 if test "${cf_cv_working_poll+set}" = set; then
16747   echo $ECHO_N "(cached) $ECHO_C" >&6
16748 else
16749
16750 if test "$cross_compiling" = yes; then
16751   cf_cv_working_poll=unknown
16752 else
16753   cat >conftest.$ac_ext <<_ACEOF
16754 #line 16754 "configure"
16755 #include "confdefs.h"
16756
16757 #include <stdlib.h>
16758 #include <stdio.h>
16759 #include <unistd.h>
16760 #include <fcntl.h>
16761 #ifdef HAVE_POLL_H
16762 #include <poll.h>
16763 #else
16764 #include <sys/poll.h>
16765 #endif
16766 int main() {
16767         struct pollfd myfds;
16768         int ret;
16769
16770         /* check for Darwin bug with respect to "devices" */
16771         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16772         if (myfds.fd < 0)
16773                 myfds.fd = 0;
16774         myfds.events = POLLIN;
16775         myfds.revents = 0;
16776
16777         ret = poll(&myfds, 1, 100);
16778
16779         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16780                 ret = -1;
16781         } else {
16782                 int fd = 0;
16783                 if (!isatty(fd)) {
16784                         fd = open("/dev/tty", 2);       /* O_RDWR */
16785                 }
16786
16787                 if (fd >= 0) {
16788                         /* also check with standard input */
16789                         myfds.fd = fd;
16790                         myfds.events = POLLIN;
16791                         myfds.revents = 0;
16792                         ret = poll(&myfds, 1, 100);
16793                 } else {
16794                         ret = -1;
16795                 }
16796         }
16797         ${cf_cv_main_return:-return}(ret < 0);
16798 }
16799 _ACEOF
16800 rm -f conftest$ac_exeext
16801 if { (eval echo "$as_me:16801: \"$ac_link\"") >&5
16802   (eval $ac_link) 2>&5
16803   ac_status=$?
16804   echo "$as_me:16804: \$? = $ac_status" >&5
16805   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16806   { (eval echo "$as_me:16806: \"$ac_try\"") >&5
16807   (eval $ac_try) 2>&5
16808   ac_status=$?
16809   echo "$as_me:16809: \$? = $ac_status" >&5
16810   (exit $ac_status); }; }; then
16811   cf_cv_working_poll=yes
16812 else
16813   echo "$as_me: program exited with status $ac_status" >&5
16814 echo "$as_me: failed program was:" >&5
16815 cat conftest.$ac_ext >&5
16816 cf_cv_working_poll=no
16817 fi
16818 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16819 fi
16820 fi
16821 echo "$as_me:16821: result: $cf_cv_working_poll" >&5
16822 echo "${ECHO_T}$cf_cv_working_poll" >&6
16823 test "$cf_cv_working_poll" = "yes" &&
16824 cat >>confdefs.h <<\EOF
16825 #define HAVE_WORKING_POLL 1
16826 EOF
16827
16828 echo "$as_me:16828: checking for va_copy" >&5
16829 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16830 if test "${cf_cv_have_va_copy+set}" = set; then
16831   echo $ECHO_N "(cached) $ECHO_C" >&6
16832 else
16833
16834 cat >conftest.$ac_ext <<_ACEOF
16835 #line 16835 "configure"
16836 #include "confdefs.h"
16837
16838 #include <stdarg.h>
16839
16840 int
16841 main ()
16842 {
16843
16844         static va_list dst;
16845         static va_list src;
16846         va_copy(dst, src)
16847   ;
16848   return 0;
16849 }
16850 _ACEOF
16851 rm -f conftest.$ac_objext conftest$ac_exeext
16852 if { (eval echo "$as_me:16852: \"$ac_link\"") >&5
16853   (eval $ac_link) 2>&5
16854   ac_status=$?
16855   echo "$as_me:16855: \$? = $ac_status" >&5
16856   (exit $ac_status); } &&
16857          { ac_try='test -s conftest$ac_exeext'
16858   { (eval echo "$as_me:16858: \"$ac_try\"") >&5
16859   (eval $ac_try) 2>&5
16860   ac_status=$?
16861   echo "$as_me:16861: \$? = $ac_status" >&5
16862   (exit $ac_status); }; }; then
16863   cf_cv_have_va_copy=yes
16864 else
16865   echo "$as_me: failed program was:" >&5
16866 cat conftest.$ac_ext >&5
16867 cf_cv_have_va_copy=no
16868 fi
16869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16870 fi
16871 echo "$as_me:16871: result: $cf_cv_have_va_copy" >&5
16872 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16873
16874 test "$cf_cv_have_va_copy" = yes &&
16875 cat >>confdefs.h <<\EOF
16876 #define HAVE_VA_COPY 1
16877 EOF
16878
16879 echo "$as_me:16879: checking for __va_copy" >&5
16880 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16881 if test "${cf_cv_have___va_copy+set}" = set; then
16882   echo $ECHO_N "(cached) $ECHO_C" >&6
16883 else
16884
16885 cat >conftest.$ac_ext <<_ACEOF
16886 #line 16886 "configure"
16887 #include "confdefs.h"
16888
16889 #include <stdarg.h>
16890
16891 int
16892 main ()
16893 {
16894
16895         static va_list dst;
16896         static va_list src;
16897         __va_copy(dst, src)
16898   ;
16899   return 0;
16900 }
16901 _ACEOF
16902 rm -f conftest.$ac_objext conftest$ac_exeext
16903 if { (eval echo "$as_me:16903: \"$ac_link\"") >&5
16904   (eval $ac_link) 2>&5
16905   ac_status=$?
16906   echo "$as_me:16906: \$? = $ac_status" >&5
16907   (exit $ac_status); } &&
16908          { ac_try='test -s conftest$ac_exeext'
16909   { (eval echo "$as_me:16909: \"$ac_try\"") >&5
16910   (eval $ac_try) 2>&5
16911   ac_status=$?
16912   echo "$as_me:16912: \$? = $ac_status" >&5
16913   (exit $ac_status); }; }; then
16914   cf_cv_have___va_copy=yes
16915 else
16916   echo "$as_me: failed program was:" >&5
16917 cat conftest.$ac_ext >&5
16918 cf_cv_have___va_copy=no
16919 fi
16920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16921 fi
16922 echo "$as_me:16922: result: $cf_cv_have___va_copy" >&5
16923 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16924
16925 test "$cf_cv_have___va_copy" = yes &&
16926 cat >>confdefs.h <<\EOF
16927 #define HAVE___VA_COPY 1
16928 EOF
16929
16930 echo "$as_me:16930: checking for pid_t" >&5
16931 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16932 if test "${ac_cv_type_pid_t+set}" = set; then
16933   echo $ECHO_N "(cached) $ECHO_C" >&6
16934 else
16935   cat >conftest.$ac_ext <<_ACEOF
16936 #line 16936 "configure"
16937 #include "confdefs.h"
16938 $ac_includes_default
16939 int
16940 main ()
16941 {
16942 if ((pid_t *) 0)
16943   return 0;
16944 if (sizeof (pid_t))
16945   return 0;
16946   ;
16947   return 0;
16948 }
16949 _ACEOF
16950 rm -f conftest.$ac_objext
16951 if { (eval echo "$as_me:16951: \"$ac_compile\"") >&5
16952   (eval $ac_compile) 2>&5
16953   ac_status=$?
16954   echo "$as_me:16954: \$? = $ac_status" >&5
16955   (exit $ac_status); } &&
16956          { ac_try='test -s conftest.$ac_objext'
16957   { (eval echo "$as_me:16957: \"$ac_try\"") >&5
16958   (eval $ac_try) 2>&5
16959   ac_status=$?
16960   echo "$as_me:16960: \$? = $ac_status" >&5
16961   (exit $ac_status); }; }; then
16962   ac_cv_type_pid_t=yes
16963 else
16964   echo "$as_me: failed program was:" >&5
16965 cat conftest.$ac_ext >&5
16966 ac_cv_type_pid_t=no
16967 fi
16968 rm -f conftest.$ac_objext conftest.$ac_ext
16969 fi
16970 echo "$as_me:16970: result: $ac_cv_type_pid_t" >&5
16971 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16972 if test $ac_cv_type_pid_t = yes; then
16973   :
16974 else
16975
16976 cat >>confdefs.h <<EOF
16977 #define pid_t int
16978 EOF
16979
16980 fi
16981
16982 for ac_header in unistd.h vfork.h
16983 do
16984 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16985 echo "$as_me:16985: checking for $ac_header" >&5
16986 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16987 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16988   echo $ECHO_N "(cached) $ECHO_C" >&6
16989 else
16990   cat >conftest.$ac_ext <<_ACEOF
16991 #line 16991 "configure"
16992 #include "confdefs.h"
16993 #include <$ac_header>
16994 _ACEOF
16995 if { (eval echo "$as_me:16995: \"$ac_cpp conftest.$ac_ext\"") >&5
16996   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16997   ac_status=$?
16998   egrep -v '^ *\+' conftest.er1 >conftest.err
16999   rm -f conftest.er1
17000   cat conftest.err >&5
17001   echo "$as_me:17001: \$? = $ac_status" >&5
17002   (exit $ac_status); } >/dev/null; then
17003   if test -s conftest.err; then
17004     ac_cpp_err=$ac_c_preproc_warn_flag
17005   else
17006     ac_cpp_err=
17007   fi
17008 else
17009   ac_cpp_err=yes
17010 fi
17011 if test -z "$ac_cpp_err"; then
17012   eval "$as_ac_Header=yes"
17013 else
17014   echo "$as_me: failed program was:" >&5
17015   cat conftest.$ac_ext >&5
17016   eval "$as_ac_Header=no"
17017 fi
17018 rm -f conftest.err conftest.$ac_ext
17019 fi
17020 echo "$as_me:17020: result: `eval echo '${'$as_ac_Header'}'`" >&5
17021 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17022 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17023   cat >>confdefs.h <<EOF
17024 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17025 EOF
17026
17027 fi
17028 done
17029
17030 for ac_func in fork vfork
17031 do
17032 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17033 echo "$as_me:17033: checking for $ac_func" >&5
17034 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17035 if eval "test \"\${$as_ac_var+set}\" = set"; then
17036   echo $ECHO_N "(cached) $ECHO_C" >&6
17037 else
17038   cat >conftest.$ac_ext <<_ACEOF
17039 #line 17039 "configure"
17040 #include "confdefs.h"
17041 /* System header to define __stub macros and hopefully few prototypes,
17042     which can conflict with char $ac_func (); below.  */
17043 #include <assert.h>
17044 /* Override any gcc2 internal prototype to avoid an error.  */
17045 #ifdef __cplusplus
17046 extern "C"
17047 #endif
17048 /* We use char because int might match the return type of a gcc2
17049    builtin and then its argument prototype would still apply.  */
17050 char $ac_func ();
17051 char (*f) ();
17052
17053 int
17054 main ()
17055 {
17056 /* The GNU C library defines this for functions which it implements
17057     to always fail with ENOSYS.  Some functions are actually named
17058     something starting with __ and the normal name is an alias.  */
17059 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17060 choke me
17061 #else
17062 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17063 #endif
17064
17065   ;
17066   return 0;
17067 }
17068 _ACEOF
17069 rm -f conftest.$ac_objext conftest$ac_exeext
17070 if { (eval echo "$as_me:17070: \"$ac_link\"") >&5
17071   (eval $ac_link) 2>&5
17072   ac_status=$?
17073   echo "$as_me:17073: \$? = $ac_status" >&5
17074   (exit $ac_status); } &&
17075          { ac_try='test -s conftest$ac_exeext'
17076   { (eval echo "$as_me:17076: \"$ac_try\"") >&5
17077   (eval $ac_try) 2>&5
17078   ac_status=$?
17079   echo "$as_me:17079: \$? = $ac_status" >&5
17080   (exit $ac_status); }; }; then
17081   eval "$as_ac_var=yes"
17082 else
17083   echo "$as_me: failed program was:" >&5
17084 cat conftest.$ac_ext >&5
17085 eval "$as_ac_var=no"
17086 fi
17087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17088 fi
17089 echo "$as_me:17089: result: `eval echo '${'$as_ac_var'}'`" >&5
17090 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17091 if test `eval echo '${'$as_ac_var'}'` = yes; then
17092   cat >>confdefs.h <<EOF
17093 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17094 EOF
17095
17096 fi
17097 done
17098
17099 ac_cv_func_fork_works=$ac_cv_func_fork
17100 if test "x$ac_cv_func_fork" = xyes; then
17101   echo "$as_me:17101: checking for working fork" >&5
17102 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17103 if test "${ac_cv_func_fork_works+set}" = set; then
17104   echo $ECHO_N "(cached) $ECHO_C" >&6
17105 else
17106   if test "$cross_compiling" = yes; then
17107   ac_cv_func_fork_works=cross
17108 else
17109   cat >conftest.$ac_ext <<_ACEOF
17110 /* By Rüdiger Kuhlmann. */
17111       #include <sys/types.h>
17112       #if HAVE_UNISTD_H
17113       # include <unistd.h>
17114       #endif
17115       /* Some systems only have a dummy stub for fork() */
17116       int main ()
17117       {
17118         if (fork() < 0)
17119           $ac_main_return (1);
17120         $ac_main_return (0);
17121       }
17122 _ACEOF
17123 rm -f conftest$ac_exeext
17124 if { (eval echo "$as_me:17124: \"$ac_link\"") >&5
17125   (eval $ac_link) 2>&5
17126   ac_status=$?
17127   echo "$as_me:17127: \$? = $ac_status" >&5
17128   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17129   { (eval echo "$as_me:17129: \"$ac_try\"") >&5
17130   (eval $ac_try) 2>&5
17131   ac_status=$?
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit $ac_status); }; }; then
17134   ac_cv_func_fork_works=yes
17135 else
17136   echo "$as_me: program exited with status $ac_status" >&5
17137 echo "$as_me: failed program was:" >&5
17138 cat conftest.$ac_ext >&5
17139 ac_cv_func_fork_works=no
17140 fi
17141 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17142 fi
17143 fi
17144 echo "$as_me:17144: result: $ac_cv_func_fork_works" >&5
17145 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17146
17147 fi
17148 if test "x$ac_cv_func_fork_works" = xcross; then
17149   case $host in
17150     *-*-amigaos* | *-*-msdosdjgpp*)
17151       # Override, as these systems have only a dummy fork() stub
17152       ac_cv_func_fork_works=no
17153       ;;
17154     *)
17155       ac_cv_func_fork_works=yes
17156       ;;
17157   esac
17158   { echo "$as_me:17158: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17159 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17160 fi
17161 ac_cv_func_vfork_works=$ac_cv_func_vfork
17162 if test "x$ac_cv_func_vfork" = xyes; then
17163   echo "$as_me:17163: checking for working vfork" >&5
17164 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17165 if test "${ac_cv_func_vfork_works+set}" = set; then
17166   echo $ECHO_N "(cached) $ECHO_C" >&6
17167 else
17168   if test "$cross_compiling" = yes; then
17169   ac_cv_func_vfork_works=cross
17170 else
17171   cat >conftest.$ac_ext <<_ACEOF
17172 #line 17172 "configure"
17173 #include "confdefs.h"
17174 /* Thanks to Paul Eggert for this test.  */
17175 #include <stdio.h>
17176 #include <sys/types.h>
17177 #include <sys/stat.h>
17178 #if HAVE_UNISTD_H
17179 # include <unistd.h>
17180 #endif
17181 #if HAVE_VFORK_H
17182 # include <vfork.h>
17183 #endif
17184 /* On some sparc systems, changes by the child to local and incoming
17185    argument registers are propagated back to the parent.  The compiler
17186    is told about this with #include <vfork.h>, but some compilers
17187    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17188    static variable whose address is put into a register that is
17189    clobbered by the vfork.  */
17190 static
17191 #ifdef __cplusplus
17192 sparc_address_test (int arg)
17193 # else
17194 sparc_address_test (arg) int arg;
17195 #endif
17196 {
17197   static pid_t child;
17198   if (!child) {
17199     child = vfork ();
17200     if (child < 0) {
17201       perror ("vfork");
17202       _exit(2);
17203     }
17204     if (!child) {
17205       arg = getpid();
17206       write(-1, "", 0);
17207       _exit (arg);
17208     }
17209   }
17210 }
17211
17212 int
17213 main ()
17214 {
17215   pid_t parent = getpid ();
17216   pid_t child;
17217
17218   sparc_address_test ();
17219
17220   child = vfork ();
17221
17222   if (child == 0) {
17223     /* Here is another test for sparc vfork register problems.  This
17224        test uses lots of local variables, at least as many local
17225        variables as main has allocated so far including compiler
17226        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17227        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17228        reuse the register of parent for one of the local variables,
17229        since it will think that parent can't possibly be used any more
17230        in this routine.  Assigning to the local variable will thus
17231        munge parent in the parent process.  */
17232     pid_t
17233       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17234       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17235     /* Convince the compiler that p..p7 are live; otherwise, it might
17236        use the same hardware register for all 8 local variables.  */
17237     if (p != p1 || p != p2 || p != p3 || p != p4
17238         || p != p5 || p != p6 || p != p7)
17239       _exit(1);
17240
17241     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17242        from child file descriptors.  If the child closes a descriptor
17243        before it execs or exits, this munges the parent's descriptor
17244        as well.  Test for this by closing stdout in the child.  */
17245     _exit(close(fileno(stdout)) != 0);
17246   } else {
17247     int status;
17248     struct stat st;
17249
17250     while (wait(&status) != child)
17251       ;
17252     $ac_main_return(
17253          /* Was there some problem with vforking?  */
17254          child < 0
17255
17256          /* Did the child fail?  (This shouldn't happen.)  */
17257          || status
17258
17259          /* Did the vfork/compiler bug occur?  */
17260          || parent != getpid()
17261
17262          /* Did the file descriptor bug occur?  */
17263          || fstat(fileno(stdout), &st) != 0
17264          );
17265   }
17266 }
17267 _ACEOF
17268 rm -f conftest$ac_exeext
17269 if { (eval echo "$as_me:17269: \"$ac_link\"") >&5
17270   (eval $ac_link) 2>&5
17271   ac_status=$?
17272   echo "$as_me:17272: \$? = $ac_status" >&5
17273   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17274   { (eval echo "$as_me:17274: \"$ac_try\"") >&5
17275   (eval $ac_try) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit $ac_status); }; }; then
17279   ac_cv_func_vfork_works=yes
17280 else
17281   echo "$as_me: program exited with status $ac_status" >&5
17282 echo "$as_me: failed program was:" >&5
17283 cat conftest.$ac_ext >&5
17284 ac_cv_func_vfork_works=no
17285 fi
17286 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17287 fi
17288 fi
17289 echo "$as_me:17289: result: $ac_cv_func_vfork_works" >&5
17290 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17291
17292 fi;
17293 if test "x$ac_cv_func_fork_works" = xcross; then
17294   ac_cv_func_vfork_works=ac_cv_func_vfork
17295   { echo "$as_me:17295: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17296 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17297 fi
17298
17299 if test "x$ac_cv_func_vfork_works" = xyes; then
17300
17301 cat >>confdefs.h <<\EOF
17302 #define HAVE_WORKING_VFORK 1
17303 EOF
17304
17305 else
17306
17307 cat >>confdefs.h <<\EOF
17308 #define vfork fork
17309 EOF
17310
17311 fi
17312 if test "x$ac_cv_func_fork_works" = xyes; then
17313
17314 cat >>confdefs.h <<\EOF
17315 #define HAVE_WORKING_FORK 1
17316 EOF
17317
17318 fi
17319
17320 # special check for test/ditto.c
17321
17322 echo "$as_me:17322: checking for openpty in -lutil" >&5
17323 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17324 if test "${ac_cv_lib_util_openpty+set}" = set; then
17325   echo $ECHO_N "(cached) $ECHO_C" >&6
17326 else
17327   ac_check_lib_save_LIBS=$LIBS
17328 LIBS="-lutil  $LIBS"
17329 cat >conftest.$ac_ext <<_ACEOF
17330 #line 17330 "configure"
17331 #include "confdefs.h"
17332
17333 /* Override any gcc2 internal prototype to avoid an error.  */
17334 #ifdef __cplusplus
17335 extern "C"
17336 #endif
17337 /* We use char because int might match the return type of a gcc2
17338    builtin and then its argument prototype would still apply.  */
17339 char openpty ();
17340 int
17341 main ()
17342 {
17343 openpty ();
17344   ;
17345   return 0;
17346 }
17347 _ACEOF
17348 rm -f conftest.$ac_objext conftest$ac_exeext
17349 if { (eval echo "$as_me:17349: \"$ac_link\"") >&5
17350   (eval $ac_link) 2>&5
17351   ac_status=$?
17352   echo "$as_me:17352: \$? = $ac_status" >&5
17353   (exit $ac_status); } &&
17354          { ac_try='test -s conftest$ac_exeext'
17355   { (eval echo "$as_me:17355: \"$ac_try\"") >&5
17356   (eval $ac_try) 2>&5
17357   ac_status=$?
17358   echo "$as_me:17358: \$? = $ac_status" >&5
17359   (exit $ac_status); }; }; then
17360   ac_cv_lib_util_openpty=yes
17361 else
17362   echo "$as_me: failed program was:" >&5
17363 cat conftest.$ac_ext >&5
17364 ac_cv_lib_util_openpty=no
17365 fi
17366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17367 LIBS=$ac_check_lib_save_LIBS
17368 fi
17369 echo "$as_me:17369: result: $ac_cv_lib_util_openpty" >&5
17370 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17371 if test $ac_cv_lib_util_openpty = yes; then
17372   cf_cv_lib_util=yes
17373 else
17374   cf_cv_lib_util=no
17375 fi
17376
17377 echo "$as_me:17377: checking for openpty header" >&5
17378 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17379 if test "${cf_cv_func_openpty+set}" = set; then
17380   echo $ECHO_N "(cached) $ECHO_C" >&6
17381 else
17382
17383     cf_save_LIBS="$LIBS"
17384     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17385     for cf_header in pty.h libutil.h util.h
17386     do
17387     cat >conftest.$ac_ext <<_ACEOF
17388 #line 17388 "configure"
17389 #include "confdefs.h"
17390
17391 #include <$cf_header>
17392
17393 int
17394 main ()
17395 {
17396
17397     int x = openpty((int *)0, (int *)0, (char *)0,
17398                    (struct termios *)0, (struct winsize *)0);
17399
17400   ;
17401   return 0;
17402 }
17403 _ACEOF
17404 rm -f conftest.$ac_objext conftest$ac_exeext
17405 if { (eval echo "$as_me:17405: \"$ac_link\"") >&5
17406   (eval $ac_link) 2>&5
17407   ac_status=$?
17408   echo "$as_me:17408: \$? = $ac_status" >&5
17409   (exit $ac_status); } &&
17410          { ac_try='test -s conftest$ac_exeext'
17411   { (eval echo "$as_me:17411: \"$ac_try\"") >&5
17412   (eval $ac_try) 2>&5
17413   ac_status=$?
17414   echo "$as_me:17414: \$? = $ac_status" >&5
17415   (exit $ac_status); }; }; then
17416
17417         cf_cv_func_openpty=$cf_header
17418         break
17419
17420 else
17421   echo "$as_me: failed program was:" >&5
17422 cat conftest.$ac_ext >&5
17423
17424         cf_cv_func_openpty=no
17425
17426 fi
17427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17428     done
17429     LIBS="$cf_save_LIBS"
17430
17431 fi
17432 echo "$as_me:17432: result: $cf_cv_func_openpty" >&5
17433 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17434
17435 if test "$cf_cv_func_openpty" != no ; then
17436
17437 cat >>confdefs.h <<EOF
17438 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17439 EOF
17440
17441 cat >>confdefs.h <<\EOF
17442 #define USE_XTERM_PTY 1
17443 EOF
17444
17445     if test "x$cf_cv_lib_util" = xyes ; then
17446         TEST_LIBS="-lutil $TEST_LIBS"
17447     fi
17448 fi
17449
17450 if test "$with_hashed_db" != no ; then
17451
17452 cat >>confdefs.h <<\EOF
17453 #define USE_HASHED_DB 1
17454 EOF
17455
17456 case $with_hashed_db in #(vi
17457 yes|*able*) #(vi
17458     ;;
17459 *)
17460     if test -d "$with_hashed_db" ; then
17461
17462 if test -n "$with_hashed_db/include" ; then
17463   for cf_add_incdir in $with_hashed_db/include
17464   do
17465         while test $cf_add_incdir != /usr/include
17466         do
17467           if test -d $cf_add_incdir
17468           then
17469                 cf_have_incdir=no
17470                 if test -n "$CFLAGS$CPPFLAGS" ; then
17471                   # a loop is needed to ensure we can add subdirs of existing dirs
17472                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17473                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17474                           cf_have_incdir=yes; break
17475                         fi
17476                   done
17477                 fi
17478
17479                 if test "$cf_have_incdir" = no ; then
17480                   if test "$cf_add_incdir" = /usr/local/include ; then
17481                         if test "$GCC" = yes
17482                         then
17483                           cf_save_CPPFLAGS=$CPPFLAGS
17484                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17485                           cat >conftest.$ac_ext <<_ACEOF
17486 #line 17486 "configure"
17487 #include "confdefs.h"
17488 #include <stdio.h>
17489 int
17490 main ()
17491 {
17492 printf("Hello")
17493   ;
17494   return 0;
17495 }
17496 _ACEOF
17497 rm -f conftest.$ac_objext
17498 if { (eval echo "$as_me:17498: \"$ac_compile\"") >&5
17499   (eval $ac_compile) 2>&5
17500   ac_status=$?
17501   echo "$as_me:17501: \$? = $ac_status" >&5
17502   (exit $ac_status); } &&
17503          { ac_try='test -s conftest.$ac_objext'
17504   { (eval echo "$as_me:17504: \"$ac_try\"") >&5
17505   (eval $ac_try) 2>&5
17506   ac_status=$?
17507   echo "$as_me:17507: \$? = $ac_status" >&5
17508   (exit $ac_status); }; }; then
17509   :
17510 else
17511   echo "$as_me: failed program was:" >&5
17512 cat conftest.$ac_ext >&5
17513 cf_have_incdir=yes
17514 fi
17515 rm -f conftest.$ac_objext conftest.$ac_ext
17516                           CPPFLAGS=$cf_save_CPPFLAGS
17517                         fi
17518                   fi
17519                 fi
17520
17521                 if test "$cf_have_incdir" = no ; then
17522                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17523
17524 echo "${as_me:-configure}:17524: testing adding $cf_add_incdir to include-path ..." 1>&5
17525
17526                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17527
17528                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17529                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17530                   cf_add_incdir="$cf_top_incdir"
17531                 else
17532                   break
17533                 fi
17534           fi
17535         done
17536   done
17537 fi
17538
17539 if test -n "$with_hashed_db/lib" ; then
17540   for cf_add_libdir in $with_hashed_db/lib
17541   do
17542     if test $cf_add_libdir = /usr/lib ; then
17543       :
17544     elif test -d $cf_add_libdir
17545     then
17546       cf_have_libdir=no
17547       if test -n "$LDFLAGS$LIBS" ; then
17548         # a loop is needed to ensure we can add subdirs of existing dirs
17549         for cf_test_libdir in $LDFLAGS $LIBS ; do
17550           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17551             cf_have_libdir=yes; break
17552           fi
17553         done
17554       fi
17555       if test "$cf_have_libdir" = no ; then
17556         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17557
17558 echo "${as_me:-configure}:17558: testing adding $cf_add_libdir to library-path ..." 1>&5
17559
17560         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17561       fi
17562     fi
17563   done
17564 fi
17565
17566     fi
17567 esac
17568
17569 echo "$as_me:17569: checking for db.h" >&5
17570 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17571 if test "${ac_cv_header_db_h+set}" = set; then
17572   echo $ECHO_N "(cached) $ECHO_C" >&6
17573 else
17574   cat >conftest.$ac_ext <<_ACEOF
17575 #line 17575 "configure"
17576 #include "confdefs.h"
17577 #include <db.h>
17578 _ACEOF
17579 if { (eval echo "$as_me:17579: \"$ac_cpp conftest.$ac_ext\"") >&5
17580   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17581   ac_status=$?
17582   egrep -v '^ *\+' conftest.er1 >conftest.err
17583   rm -f conftest.er1
17584   cat conftest.err >&5
17585   echo "$as_me:17585: \$? = $ac_status" >&5
17586   (exit $ac_status); } >/dev/null; then
17587   if test -s conftest.err; then
17588     ac_cpp_err=$ac_c_preproc_warn_flag
17589   else
17590     ac_cpp_err=
17591   fi
17592 else
17593   ac_cpp_err=yes
17594 fi
17595 if test -z "$ac_cpp_err"; then
17596   ac_cv_header_db_h=yes
17597 else
17598   echo "$as_me: failed program was:" >&5
17599   cat conftest.$ac_ext >&5
17600   ac_cv_header_db_h=no
17601 fi
17602 rm -f conftest.err conftest.$ac_ext
17603 fi
17604 echo "$as_me:17604: result: $ac_cv_header_db_h" >&5
17605 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17606 if test $ac_cv_header_db_h = yes; then
17607
17608 echo "$as_me:17608: checking for version of db" >&5
17609 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17610 if test "${cf_cv_hashed_db_version+set}" = set; then
17611   echo $ECHO_N "(cached) $ECHO_C" >&6
17612 else
17613
17614 cf_cv_hashed_db_version=unknown
17615
17616 for cf_db_version in 1 2 3 4 5
17617 do
17618
17619 echo "${as_me:-configure}:17619: testing checking for db version $cf_db_version ..." 1>&5
17620
17621         cat >conftest.$ac_ext <<_ACEOF
17622 #line 17622 "configure"
17623 #include "confdefs.h"
17624
17625 $ac_includes_default
17626 #include <db.h>
17627
17628 #ifdef DB_VERSION_MAJOR
17629         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17630 #if $cf_db_version == DB_VERSION_MAJOR
17631         /* ok */
17632 #else
17633         make an error
17634 #endif
17635 #else
17636 #if $cf_db_version == 1
17637         /* ok: assuming this is DB 1.8.5 */
17638 #else
17639         make an error
17640 #endif
17641 #endif
17642
17643 int
17644 main ()
17645 {
17646 DBT *foo = 0
17647   ;
17648   return 0;
17649 }
17650 _ACEOF
17651 rm -f conftest.$ac_objext
17652 if { (eval echo "$as_me:17652: \"$ac_compile\"") >&5
17653   (eval $ac_compile) 2>&5
17654   ac_status=$?
17655   echo "$as_me:17655: \$? = $ac_status" >&5
17656   (exit $ac_status); } &&
17657          { ac_try='test -s conftest.$ac_objext'
17658   { (eval echo "$as_me:17658: \"$ac_try\"") >&5
17659   (eval $ac_try) 2>&5
17660   ac_status=$?
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit $ac_status); }; }; then
17663
17664         cf_cv_hashed_db_version=$cf_db_version
17665         break
17666
17667 else
17668   echo "$as_me: failed program was:" >&5
17669 cat conftest.$ac_ext >&5
17670 fi
17671 rm -f conftest.$ac_objext conftest.$ac_ext
17672 done
17673
17674 fi
17675 echo "$as_me:17675: result: $cf_cv_hashed_db_version" >&5
17676 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17677
17678 if test "$cf_cv_hashed_db_version" = unknown ; then
17679         { { echo "$as_me:17679: error: Cannot determine version of db" >&5
17680 echo "$as_me: error: Cannot determine version of db" >&2;}
17681    { (exit 1); exit 1; }; }
17682 else
17683
17684 echo "$as_me:17684: checking for db libraries" >&5
17685 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17686 if test "${cf_cv_hashed_db_libs+set}" = set; then
17687   echo $ECHO_N "(cached) $ECHO_C" >&6
17688 else
17689
17690 cf_cv_hashed_db_libs=unknown
17691 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17692 do
17693         cf_save_libs="$LIBS"
17694         if test -n "$cf_db_libs"; then
17695                 LIBS="-l$cf_db_libs $LIBS"
17696         fi
17697
17698 echo "${as_me:-configure}:17698: testing checking for library "$cf_db_libs" ..." 1>&5
17699
17700         cat >conftest.$ac_ext <<_ACEOF
17701 #line 17701 "configure"
17702 #include "confdefs.h"
17703
17704 $ac_includes_default
17705 #include <db.h>
17706
17707 int
17708 main ()
17709 {
17710
17711         char *path = "/tmp/foo";
17712 #ifdef DB_VERSION_MAJOR
17713 #if DB_VERSION_MAJOR >= 4
17714         DB *result = 0;
17715         db_create(&result, NULL, 0);
17716         result->open(result,
17717                 NULL,
17718                 path,
17719                 path,
17720                 DB_HASH,
17721                 DB_CREATE,
17722                 0644);
17723 #elif DB_VERSION_MAJOR >= 3
17724         DB *result = 0;
17725         db_create(&result, NULL, 0);
17726         result->open(result,
17727                 path,
17728                 path,
17729                 DB_HASH,
17730                 DB_CREATE,
17731                 0644);
17732 #elif DB_VERSION_MAJOR >= 2
17733         DB *result = 0;
17734         db_open(path,
17735                 DB_HASH,
17736                 DB_CREATE,
17737                 0644,
17738                 (DB_ENV *) 0,
17739                 (DB_INFO *) 0,
17740                 &result);
17741 #endif /* DB_VERSION_MAJOR */
17742 #else
17743         DB *result = dbopen(path,
17744                      2,
17745                      0644,
17746                      DB_HASH,
17747                      0);
17748 #endif
17749         ${cf_cv_main_return:-return}(result != 0)
17750
17751   ;
17752   return 0;
17753 }
17754 _ACEOF
17755 rm -f conftest.$ac_objext conftest$ac_exeext
17756 if { (eval echo "$as_me:17756: \"$ac_link\"") >&5
17757   (eval $ac_link) 2>&5
17758   ac_status=$?
17759   echo "$as_me:17759: \$? = $ac_status" >&5
17760   (exit $ac_status); } &&
17761          { ac_try='test -s conftest$ac_exeext'
17762   { (eval echo "$as_me:17762: \"$ac_try\"") >&5
17763   (eval $ac_try) 2>&5
17764   ac_status=$?
17765   echo "$as_me:17765: \$? = $ac_status" >&5
17766   (exit $ac_status); }; }; then
17767
17768         if test -n "$cf_db_libs" ; then
17769                 cf_cv_hashed_db_libs=$cf_db_libs
17770         else
17771                 cf_cv_hashed_db_libs=default
17772         fi
17773         LIBS="$cf_save_libs"
17774         break
17775
17776 else
17777   echo "$as_me: failed program was:" >&5
17778 cat conftest.$ac_ext >&5
17779 fi
17780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17781         LIBS="$cf_save_libs"
17782 done
17783
17784 fi
17785 echo "$as_me:17785: result: $cf_cv_hashed_db_libs" >&5
17786 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17787
17788         if test "$cf_cv_hashed_db_libs" = unknown ; then
17789                 { { echo "$as_me:17789: error: Cannot determine library for db" >&5
17790 echo "$as_me: error: Cannot determine library for db" >&2;}
17791    { (exit 1); exit 1; }; }
17792         elif test "$cf_cv_hashed_db_libs" != default ; then
17793                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17794         fi
17795 fi
17796
17797 else
17798
17799         { { echo "$as_me:17799: error: Cannot find db.h" >&5
17800 echo "$as_me: error: Cannot find db.h" >&2;}
17801    { (exit 1); exit 1; }; }
17802
17803 fi
17804
17805 fi
17806
17807 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17808         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17809         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17810 fi
17811
17812 # Just in case, check if the C compiler has a bool type.
17813
17814 echo "$as_me:17814: checking if we should include stdbool.h" >&5
17815 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17816
17817 if test "${cf_cv_header_stdbool_h+set}" = set; then
17818   echo $ECHO_N "(cached) $ECHO_C" >&6
17819 else
17820
17821         cat >conftest.$ac_ext <<_ACEOF
17822 #line 17822 "configure"
17823 #include "confdefs.h"
17824
17825 int
17826 main ()
17827 {
17828 bool foo = false
17829   ;
17830   return 0;
17831 }
17832 _ACEOF
17833 rm -f conftest.$ac_objext
17834 if { (eval echo "$as_me:17834: \"$ac_compile\"") >&5
17835   (eval $ac_compile) 2>&5
17836   ac_status=$?
17837   echo "$as_me:17837: \$? = $ac_status" >&5
17838   (exit $ac_status); } &&
17839          { ac_try='test -s conftest.$ac_objext'
17840   { (eval echo "$as_me:17840: \"$ac_try\"") >&5
17841   (eval $ac_try) 2>&5
17842   ac_status=$?
17843   echo "$as_me:17843: \$? = $ac_status" >&5
17844   (exit $ac_status); }; }; then
17845   cf_cv_header_stdbool_h=0
17846 else
17847   echo "$as_me: failed program was:" >&5
17848 cat conftest.$ac_ext >&5
17849 cat >conftest.$ac_ext <<_ACEOF
17850 #line 17850 "configure"
17851 #include "confdefs.h"
17852
17853 #ifndef __BEOS__
17854 #include <stdbool.h>
17855 #endif
17856
17857 int
17858 main ()
17859 {
17860 bool foo = false
17861   ;
17862   return 0;
17863 }
17864 _ACEOF
17865 rm -f conftest.$ac_objext
17866 if { (eval echo "$as_me:17866: \"$ac_compile\"") >&5
17867   (eval $ac_compile) 2>&5
17868   ac_status=$?
17869   echo "$as_me:17869: \$? = $ac_status" >&5
17870   (exit $ac_status); } &&
17871          { ac_try='test -s conftest.$ac_objext'
17872   { (eval echo "$as_me:17872: \"$ac_try\"") >&5
17873   (eval $ac_try) 2>&5
17874   ac_status=$?
17875   echo "$as_me:17875: \$? = $ac_status" >&5
17876   (exit $ac_status); }; }; then
17877   cf_cv_header_stdbool_h=1
17878 else
17879   echo "$as_me: failed program was:" >&5
17880 cat conftest.$ac_ext >&5
17881 cf_cv_header_stdbool_h=0
17882 fi
17883 rm -f conftest.$ac_objext conftest.$ac_ext
17884 fi
17885 rm -f conftest.$ac_objext conftest.$ac_ext
17886 fi
17887
17888 if test "$cf_cv_header_stdbool_h" = 1
17889 then    echo "$as_me:17889: result: yes" >&5
17890 echo "${ECHO_T}yes" >&6
17891 else    echo "$as_me:17891: result: no" >&5
17892 echo "${ECHO_T}no" >&6
17893 fi
17894
17895 echo "$as_me:17895: checking for builtin bool type" >&5
17896 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17897
17898 if test "${cf_cv_cc_bool_type+set}" = set; then
17899   echo $ECHO_N "(cached) $ECHO_C" >&6
17900 else
17901
17902         cat >conftest.$ac_ext <<_ACEOF
17903 #line 17903 "configure"
17904 #include "confdefs.h"
17905
17906 #include <stdio.h>
17907 #include <sys/types.h>
17908
17909 int
17910 main ()
17911 {
17912 bool x = false
17913   ;
17914   return 0;
17915 }
17916 _ACEOF
17917 rm -f conftest.$ac_objext
17918 if { (eval echo "$as_me:17918: \"$ac_compile\"") >&5
17919   (eval $ac_compile) 2>&5
17920   ac_status=$?
17921   echo "$as_me:17921: \$? = $ac_status" >&5
17922   (exit $ac_status); } &&
17923          { ac_try='test -s conftest.$ac_objext'
17924   { (eval echo "$as_me:17924: \"$ac_try\"") >&5
17925   (eval $ac_try) 2>&5
17926   ac_status=$?
17927   echo "$as_me:17927: \$? = $ac_status" >&5
17928   (exit $ac_status); }; }; then
17929   cf_cv_cc_bool_type=1
17930 else
17931   echo "$as_me: failed program was:" >&5
17932 cat conftest.$ac_ext >&5
17933 cf_cv_cc_bool_type=0
17934 fi
17935 rm -f conftest.$ac_objext conftest.$ac_ext
17936
17937 fi
17938
17939 if test "$cf_cv_cc_bool_type" = 1
17940 then    echo "$as_me:17940: result: yes" >&5
17941 echo "${ECHO_T}yes" >&6
17942 else    echo "$as_me:17942: result: no" >&5
17943 echo "${ECHO_T}no" >&6
17944 fi
17945
17946 # Check for C++ compiler characteristics (and ensure that it's there!)
17947 if test -n "$CXX" ; then
17948         ac_ext=cc
17949 ac_cpp='$CXXCPP $CPPFLAGS'
17950 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17951 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17952 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17953 ac_main_return=return
17954
17955 if test -n "$GXX" ; then
17956 case $cf_cv_system_name in #(vi
17957 os2*) #(vi
17958         cf_stdcpp_libname=stdcpp
17959         ;;
17960 *)
17961         cf_stdcpp_libname=stdc++
17962         ;;
17963 esac
17964 echo "$as_me:17964: checking for library $cf_stdcpp_libname" >&5
17965 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17966 if test "${cf_cv_libstdcpp+set}" = set; then
17967   echo $ECHO_N "(cached) $ECHO_C" >&6
17968 else
17969
17970         cf_save="$LIBS"
17971         LIBS="-l$cf_stdcpp_libname $LIBS"
17972 cat >conftest.$ac_ext <<_ACEOF
17973 #line 17973 "configure"
17974 #include "confdefs.h"
17975
17976 #include <strstream.h>
17977 int
17978 main ()
17979 {
17980
17981 char buf[80];
17982 strstreambuf foo(buf, sizeof(buf))
17983
17984   ;
17985   return 0;
17986 }
17987 _ACEOF
17988 rm -f conftest.$ac_objext conftest$ac_exeext
17989 if { (eval echo "$as_me:17989: \"$ac_link\"") >&5
17990   (eval $ac_link) 2>&5
17991   ac_status=$?
17992   echo "$as_me:17992: \$? = $ac_status" >&5
17993   (exit $ac_status); } &&
17994          { ac_try='test -s conftest$ac_exeext'
17995   { (eval echo "$as_me:17995: \"$ac_try\"") >&5
17996   (eval $ac_try) 2>&5
17997   ac_status=$?
17998   echo "$as_me:17998: \$? = $ac_status" >&5
17999   (exit $ac_status); }; }; then
18000   cf_cv_libstdcpp=yes
18001 else
18002   echo "$as_me: failed program was:" >&5
18003 cat conftest.$ac_ext >&5
18004 cf_cv_libstdcpp=no
18005 fi
18006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18007         LIBS="$cf_save"
18008
18009 fi
18010 echo "$as_me:18010: result: $cf_cv_libstdcpp" >&5
18011 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18012 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18013 fi
18014
18015         echo "$as_me:18015: checking whether $CXX understands -c and -o together" >&5
18016 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18017 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18018   echo $ECHO_N "(cached) $ECHO_C" >&6
18019 else
18020
18021 cat > conftest.$ac_ext <<CF_EOF
18022 #include <stdio.h>
18023 int main()
18024 {
18025         ${cf_cv_main_return:-return}(0);
18026 }
18027 CF_EOF
18028 # We do the test twice because some compilers refuse to overwrite an
18029 # existing .o file with -o, though they will create one.
18030 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18031 if { (eval echo "$as_me:18031: \"$ac_try\"") >&5
18032   (eval $ac_try) 2>&5
18033   ac_status=$?
18034   echo "$as_me:18034: \$? = $ac_status" >&5
18035   (exit $ac_status); } &&
18036   test -f conftest2.$ac_objext && { (eval echo "$as_me:18036: \"$ac_try\"") >&5
18037   (eval $ac_try) 2>&5
18038   ac_status=$?
18039   echo "$as_me:18039: \$? = $ac_status" >&5
18040   (exit $ac_status); };
18041 then
18042   eval cf_cv_prog_CXX_c_o=yes
18043 else
18044   eval cf_cv_prog_CXX_c_o=no
18045 fi
18046 rm -rf conftest*
18047
18048 fi
18049 if test $cf_cv_prog_CXX_c_o = yes; then
18050   echo "$as_me:18050: result: yes" >&5
18051 echo "${ECHO_T}yes" >&6
18052 else
18053   echo "$as_me:18053: result: no" >&5
18054 echo "${ECHO_T}no" >&6
18055 fi
18056
18057         case $GXX_VERSION in
18058         1*|2.0-6*)
18059                 cf_cxx_library=yes
18060                 ;;
18061         *-2.7*|2.7*)
18062
18063 cf_cxx_library=unknown
18064 case $cf_cv_system_name in #(vi
18065 os2*) #(vi
18066         cf_gpp_libname=gpp
18067         ;;
18068 *)
18069         cf_gpp_libname=g++
18070         ;;
18071 esac
18072 if test "$GXX" = yes; then
18073         echo "$as_me:18073: checking for lib$cf_gpp_libname" >&5
18074 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18075         cf_save="$LIBS"
18076         LIBS="-l$cf_gpp_libname $LIBS"
18077         cat >conftest.$ac_ext <<_ACEOF
18078 #line 18078 "configure"
18079 #include "confdefs.h"
18080
18081 #include <$cf_gpp_libname/builtin.h>
18082
18083 int
18084 main ()
18085 {
18086 two_arg_error_handler_t foo2 = lib_error_handler
18087   ;
18088   return 0;
18089 }
18090 _ACEOF
18091 rm -f conftest.$ac_objext conftest$ac_exeext
18092 if { (eval echo "$as_me:18092: \"$ac_link\"") >&5
18093   (eval $ac_link) 2>&5
18094   ac_status=$?
18095   echo "$as_me:18095: \$? = $ac_status" >&5
18096   (exit $ac_status); } &&
18097          { ac_try='test -s conftest$ac_exeext'
18098   { (eval echo "$as_me:18098: \"$ac_try\"") >&5
18099   (eval $ac_try) 2>&5
18100   ac_status=$?
18101   echo "$as_me:18101: \$? = $ac_status" >&5
18102   (exit $ac_status); }; }; then
18103   cf_cxx_library=yes
18104          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18105          if test "$cf_gpp_libname" = cpp ; then
18106
18107 cat >>confdefs.h <<\EOF
18108 #define HAVE_GPP_BUILTIN_H 1
18109 EOF
18110
18111          else
18112
18113 cat >>confdefs.h <<\EOF
18114 #define HAVE_GXX_BUILTIN_H 1
18115 EOF
18116
18117          fi
18118 else
18119   echo "$as_me: failed program was:" >&5
18120 cat conftest.$ac_ext >&5
18121 cat >conftest.$ac_ext <<_ACEOF
18122 #line 18122 "configure"
18123 #include "confdefs.h"
18124
18125 #include <builtin.h>
18126
18127 int
18128 main ()
18129 {
18130 two_arg_error_handler_t foo2 = lib_error_handler
18131   ;
18132   return 0;
18133 }
18134 _ACEOF
18135 rm -f conftest.$ac_objext conftest$ac_exeext
18136 if { (eval echo "$as_me:18136: \"$ac_link\"") >&5
18137   (eval $ac_link) 2>&5
18138   ac_status=$?
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit $ac_status); } &&
18141          { ac_try='test -s conftest$ac_exeext'
18142   { (eval echo "$as_me:18142: \"$ac_try\"") >&5
18143   (eval $ac_try) 2>&5
18144   ac_status=$?
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit $ac_status); }; }; then
18147   cf_cxx_library=yes
18148          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18149
18150 cat >>confdefs.h <<\EOF
18151 #define HAVE_BUILTIN_H 1
18152 EOF
18153
18154 else
18155   echo "$as_me: failed program was:" >&5
18156 cat conftest.$ac_ext >&5
18157 cf_cxx_library=no
18158 fi
18159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18160 fi
18161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18162         LIBS="$cf_save"
18163         echo "$as_me:18163: result: $cf_cxx_library" >&5
18164 echo "${ECHO_T}$cf_cxx_library" >&6
18165 fi
18166
18167                 ;;
18168         *)
18169                 cf_cxx_library=no
18170                 ;;
18171         esac
18172
18173         ac_ext=cc
18174 ac_cpp='$CXXCPP $CPPFLAGS'
18175 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18176 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18177 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18178 ac_main_return=return
18179 echo "$as_me:18179: checking how to run the C++ preprocessor" >&5
18180 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18181 if test -z "$CXXCPP"; then
18182   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18183   echo $ECHO_N "(cached) $ECHO_C" >&6
18184 else
18185       # Double quotes because CXXCPP needs to be expanded
18186     for CXXCPP in "$CXX -E" "/lib/cpp"
18187     do
18188       ac_preproc_ok=false
18189 for ac_cxx_preproc_warn_flag in '' yes
18190 do
18191   # Use a header file that comes with gcc, so configuring glibc
18192   # with a fresh cross-compiler works.
18193   # On the NeXT, cc -E runs the code through the compiler's parser,
18194   # not just through cpp. "Syntax error" is here to catch this case.
18195   cat >conftest.$ac_ext <<_ACEOF
18196 #line 18196 "configure"
18197 #include "confdefs.h"
18198 #include <assert.h>
18199                      Syntax error
18200 _ACEOF
18201 if { (eval echo "$as_me:18201: \"$ac_cpp conftest.$ac_ext\"") >&5
18202   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18203   ac_status=$?
18204   egrep -v '^ *\+' conftest.er1 >conftest.err
18205   rm -f conftest.er1
18206   cat conftest.err >&5
18207   echo "$as_me:18207: \$? = $ac_status" >&5
18208   (exit $ac_status); } >/dev/null; then
18209   if test -s conftest.err; then
18210     ac_cpp_err=$ac_cxx_preproc_warn_flag
18211   else
18212     ac_cpp_err=
18213   fi
18214 else
18215   ac_cpp_err=yes
18216 fi
18217 if test -z "$ac_cpp_err"; then
18218   :
18219 else
18220   echo "$as_me: failed program was:" >&5
18221   cat conftest.$ac_ext >&5
18222   # Broken: fails on valid input.
18223 continue
18224 fi
18225 rm -f conftest.err conftest.$ac_ext
18226
18227   # OK, works on sane cases.  Now check whether non-existent headers
18228   # can be detected and how.
18229   cat >conftest.$ac_ext <<_ACEOF
18230 #line 18230 "configure"
18231 #include "confdefs.h"
18232 #include <ac_nonexistent.h>
18233 _ACEOF
18234 if { (eval echo "$as_me:18234: \"$ac_cpp conftest.$ac_ext\"") >&5
18235   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18236   ac_status=$?
18237   egrep -v '^ *\+' conftest.er1 >conftest.err
18238   rm -f conftest.er1
18239   cat conftest.err >&5
18240   echo "$as_me:18240: \$? = $ac_status" >&5
18241   (exit $ac_status); } >/dev/null; then
18242   if test -s conftest.err; then
18243     ac_cpp_err=$ac_cxx_preproc_warn_flag
18244   else
18245     ac_cpp_err=
18246   fi
18247 else
18248   ac_cpp_err=yes
18249 fi
18250 if test -z "$ac_cpp_err"; then
18251   # Broken: success on invalid input.
18252 continue
18253 else
18254   echo "$as_me: failed program was:" >&5
18255   cat conftest.$ac_ext >&5
18256   # Passes both tests.
18257 ac_preproc_ok=:
18258 break
18259 fi
18260 rm -f conftest.err conftest.$ac_ext
18261
18262 done
18263 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18264 rm -f conftest.err conftest.$ac_ext
18265 if $ac_preproc_ok; then
18266   break
18267 fi
18268
18269     done
18270     ac_cv_prog_CXXCPP=$CXXCPP
18271
18272 fi
18273   CXXCPP=$ac_cv_prog_CXXCPP
18274 else
18275   ac_cv_prog_CXXCPP=$CXXCPP
18276 fi
18277 echo "$as_me:18277: result: $CXXCPP" >&5
18278 echo "${ECHO_T}$CXXCPP" >&6
18279 ac_preproc_ok=false
18280 for ac_cxx_preproc_warn_flag in '' yes
18281 do
18282   # Use a header file that comes with gcc, so configuring glibc
18283   # with a fresh cross-compiler works.
18284   # On the NeXT, cc -E runs the code through the compiler's parser,
18285   # not just through cpp. "Syntax error" is here to catch this case.
18286   cat >conftest.$ac_ext <<_ACEOF
18287 #line 18287 "configure"
18288 #include "confdefs.h"
18289 #include <assert.h>
18290                      Syntax error
18291 _ACEOF
18292 if { (eval echo "$as_me:18292: \"$ac_cpp conftest.$ac_ext\"") >&5
18293   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18294   ac_status=$?
18295   egrep -v '^ *\+' conftest.er1 >conftest.err
18296   rm -f conftest.er1
18297   cat conftest.err >&5
18298   echo "$as_me:18298: \$? = $ac_status" >&5
18299   (exit $ac_status); } >/dev/null; then
18300   if test -s conftest.err; then
18301     ac_cpp_err=$ac_cxx_preproc_warn_flag
18302   else
18303     ac_cpp_err=
18304   fi
18305 else
18306   ac_cpp_err=yes
18307 fi
18308 if test -z "$ac_cpp_err"; then
18309   :
18310 else
18311   echo "$as_me: failed program was:" >&5
18312   cat conftest.$ac_ext >&5
18313   # Broken: fails on valid input.
18314 continue
18315 fi
18316 rm -f conftest.err conftest.$ac_ext
18317
18318   # OK, works on sane cases.  Now check whether non-existent headers
18319   # can be detected and how.
18320   cat >conftest.$ac_ext <<_ACEOF
18321 #line 18321 "configure"
18322 #include "confdefs.h"
18323 #include <ac_nonexistent.h>
18324 _ACEOF
18325 if { (eval echo "$as_me:18325: \"$ac_cpp conftest.$ac_ext\"") >&5
18326   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18327   ac_status=$?
18328   egrep -v '^ *\+' conftest.er1 >conftest.err
18329   rm -f conftest.er1
18330   cat conftest.err >&5
18331   echo "$as_me:18331: \$? = $ac_status" >&5
18332   (exit $ac_status); } >/dev/null; then
18333   if test -s conftest.err; then
18334     ac_cpp_err=$ac_cxx_preproc_warn_flag
18335   else
18336     ac_cpp_err=
18337   fi
18338 else
18339   ac_cpp_err=yes
18340 fi
18341 if test -z "$ac_cpp_err"; then
18342   # Broken: success on invalid input.
18343 continue
18344 else
18345   echo "$as_me: failed program was:" >&5
18346   cat conftest.$ac_ext >&5
18347   # Passes both tests.
18348 ac_preproc_ok=:
18349 break
18350 fi
18351 rm -f conftest.err conftest.$ac_ext
18352
18353 done
18354 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18355 rm -f conftest.err conftest.$ac_ext
18356 if $ac_preproc_ok; then
18357   :
18358 else
18359   { { echo "$as_me:18359: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18360 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18361    { (exit 1); exit 1; }; }
18362 fi
18363
18364 ac_ext=cc
18365 ac_cpp='$CXXCPP $CPPFLAGS'
18366 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18367 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18368 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18369 ac_main_return=return
18370
18371 for ac_header in typeinfo
18372 do
18373 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18374 echo "$as_me:18374: checking for $ac_header" >&5
18375 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18376 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18377   echo $ECHO_N "(cached) $ECHO_C" >&6
18378 else
18379   cat >conftest.$ac_ext <<_ACEOF
18380 #line 18380 "configure"
18381 #include "confdefs.h"
18382 #include <$ac_header>
18383 _ACEOF
18384 if { (eval echo "$as_me:18384: \"$ac_cpp conftest.$ac_ext\"") >&5
18385   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18386   ac_status=$?
18387   egrep -v '^ *\+' conftest.er1 >conftest.err
18388   rm -f conftest.er1
18389   cat conftest.err >&5
18390   echo "$as_me:18390: \$? = $ac_status" >&5
18391   (exit $ac_status); } >/dev/null; then
18392   if test -s conftest.err; then
18393     ac_cpp_err=$ac_cxx_preproc_warn_flag
18394   else
18395     ac_cpp_err=
18396   fi
18397 else
18398   ac_cpp_err=yes
18399 fi
18400 if test -z "$ac_cpp_err"; then
18401   eval "$as_ac_Header=yes"
18402 else
18403   echo "$as_me: failed program was:" >&5
18404   cat conftest.$ac_ext >&5
18405   eval "$as_ac_Header=no"
18406 fi
18407 rm -f conftest.err conftest.$ac_ext
18408 fi
18409 echo "$as_me:18409: result: `eval echo '${'$as_ac_Header'}'`" >&5
18410 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18411 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18412   cat >>confdefs.h <<EOF
18413 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18414 EOF
18415
18416 fi
18417 done
18418
18419 for ac_header in iostream
18420 do
18421 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18422 echo "$as_me:18422: checking for $ac_header" >&5
18423 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18424 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18425   echo $ECHO_N "(cached) $ECHO_C" >&6
18426 else
18427   cat >conftest.$ac_ext <<_ACEOF
18428 #line 18428 "configure"
18429 #include "confdefs.h"
18430 #include <$ac_header>
18431 _ACEOF
18432 if { (eval echo "$as_me:18432: \"$ac_cpp conftest.$ac_ext\"") >&5
18433   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18434   ac_status=$?
18435   egrep -v '^ *\+' conftest.er1 >conftest.err
18436   rm -f conftest.er1
18437   cat conftest.err >&5
18438   echo "$as_me:18438: \$? = $ac_status" >&5
18439   (exit $ac_status); } >/dev/null; then
18440   if test -s conftest.err; then
18441     ac_cpp_err=$ac_cxx_preproc_warn_flag
18442   else
18443     ac_cpp_err=
18444   fi
18445 else
18446   ac_cpp_err=yes
18447 fi
18448 if test -z "$ac_cpp_err"; then
18449   eval "$as_ac_Header=yes"
18450 else
18451   echo "$as_me: failed program was:" >&5
18452   cat conftest.$ac_ext >&5
18453   eval "$as_ac_Header=no"
18454 fi
18455 rm -f conftest.err conftest.$ac_ext
18456 fi
18457 echo "$as_me:18457: result: `eval echo '${'$as_ac_Header'}'`" >&5
18458 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18459 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18460   cat >>confdefs.h <<EOF
18461 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18462 EOF
18463
18464 fi
18465 done
18466
18467 if test x"$ac_cv_header_iostream" = xyes ; then
18468         echo "$as_me:18468: checking if iostream uses std-namespace" >&5
18469 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18470         cat >conftest.$ac_ext <<_ACEOF
18471 #line 18471 "configure"
18472 #include "confdefs.h"
18473
18474 #include <iostream>
18475 using std::endl;
18476 using std::cerr;
18477 int
18478 main ()
18479 {
18480
18481 cerr << "testing" << endl;
18482
18483   ;
18484   return 0;
18485 }
18486 _ACEOF
18487 rm -f conftest.$ac_objext
18488 if { (eval echo "$as_me:18488: \"$ac_compile\"") >&5
18489   (eval $ac_compile) 2>&5
18490   ac_status=$?
18491   echo "$as_me:18491: \$? = $ac_status" >&5
18492   (exit $ac_status); } &&
18493          { ac_try='test -s conftest.$ac_objext'
18494   { (eval echo "$as_me:18494: \"$ac_try\"") >&5
18495   (eval $ac_try) 2>&5
18496   ac_status=$?
18497   echo "$as_me:18497: \$? = $ac_status" >&5
18498   (exit $ac_status); }; }; then
18499   cf_iostream_namespace=yes
18500 else
18501   echo "$as_me: failed program was:" >&5
18502 cat conftest.$ac_ext >&5
18503 cf_iostream_namespace=no
18504 fi
18505 rm -f conftest.$ac_objext conftest.$ac_ext
18506         echo "$as_me:18506: result: $cf_iostream_namespace" >&5
18507 echo "${ECHO_T}$cf_iostream_namespace" >&6
18508         if test "$cf_iostream_namespace" = yes ; then
18509
18510 cat >>confdefs.h <<\EOF
18511 #define IOSTREAM_NAMESPACE 1
18512 EOF
18513
18514         fi
18515 fi
18516
18517 echo "$as_me:18517: checking if we should include stdbool.h" >&5
18518 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18519
18520 if test "${cf_cv_header_stdbool_h+set}" = set; then
18521   echo $ECHO_N "(cached) $ECHO_C" >&6
18522 else
18523
18524         cat >conftest.$ac_ext <<_ACEOF
18525 #line 18525 "configure"
18526 #include "confdefs.h"
18527
18528 int
18529 main ()
18530 {
18531 bool foo = false
18532   ;
18533   return 0;
18534 }
18535 _ACEOF
18536 rm -f conftest.$ac_objext
18537 if { (eval echo "$as_me:18537: \"$ac_compile\"") >&5
18538   (eval $ac_compile) 2>&5
18539   ac_status=$?
18540   echo "$as_me:18540: \$? = $ac_status" >&5
18541   (exit $ac_status); } &&
18542          { ac_try='test -s conftest.$ac_objext'
18543   { (eval echo "$as_me:18543: \"$ac_try\"") >&5
18544   (eval $ac_try) 2>&5
18545   ac_status=$?
18546   echo "$as_me:18546: \$? = $ac_status" >&5
18547   (exit $ac_status); }; }; then
18548   cf_cv_header_stdbool_h=0
18549 else
18550   echo "$as_me: failed program was:" >&5
18551 cat conftest.$ac_ext >&5
18552 cat >conftest.$ac_ext <<_ACEOF
18553 #line 18553 "configure"
18554 #include "confdefs.h"
18555
18556 #ifndef __BEOS__
18557 #include <stdbool.h>
18558 #endif
18559
18560 int
18561 main ()
18562 {
18563 bool foo = false
18564   ;
18565   return 0;
18566 }
18567 _ACEOF
18568 rm -f conftest.$ac_objext
18569 if { (eval echo "$as_me:18569: \"$ac_compile\"") >&5
18570   (eval $ac_compile) 2>&5
18571   ac_status=$?
18572   echo "$as_me:18572: \$? = $ac_status" >&5
18573   (exit $ac_status); } &&
18574          { ac_try='test -s conftest.$ac_objext'
18575   { (eval echo "$as_me:18575: \"$ac_try\"") >&5
18576   (eval $ac_try) 2>&5
18577   ac_status=$?
18578   echo "$as_me:18578: \$? = $ac_status" >&5
18579   (exit $ac_status); }; }; then
18580   cf_cv_header_stdbool_h=1
18581 else
18582   echo "$as_me: failed program was:" >&5
18583 cat conftest.$ac_ext >&5
18584 cf_cv_header_stdbool_h=0
18585 fi
18586 rm -f conftest.$ac_objext conftest.$ac_ext
18587 fi
18588 rm -f conftest.$ac_objext conftest.$ac_ext
18589 fi
18590
18591 if test "$cf_cv_header_stdbool_h" = 1
18592 then    echo "$as_me:18592: result: yes" >&5
18593 echo "${ECHO_T}yes" >&6
18594 else    echo "$as_me:18594: result: no" >&5
18595 echo "${ECHO_T}no" >&6
18596 fi
18597
18598 echo "$as_me:18598: checking for builtin bool type" >&5
18599 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18600
18601 if test "${cf_cv_builtin_bool+set}" = set; then
18602   echo $ECHO_N "(cached) $ECHO_C" >&6
18603 else
18604
18605         cat >conftest.$ac_ext <<_ACEOF
18606 #line 18606 "configure"
18607 #include "confdefs.h"
18608
18609 #include <stdio.h>
18610 #include <sys/types.h>
18611
18612 int
18613 main ()
18614 {
18615 bool x = false
18616   ;
18617   return 0;
18618 }
18619 _ACEOF
18620 rm -f conftest.$ac_objext
18621 if { (eval echo "$as_me:18621: \"$ac_compile\"") >&5
18622   (eval $ac_compile) 2>&5
18623   ac_status=$?
18624   echo "$as_me:18624: \$? = $ac_status" >&5
18625   (exit $ac_status); } &&
18626          { ac_try='test -s conftest.$ac_objext'
18627   { (eval echo "$as_me:18627: \"$ac_try\"") >&5
18628   (eval $ac_try) 2>&5
18629   ac_status=$?
18630   echo "$as_me:18630: \$? = $ac_status" >&5
18631   (exit $ac_status); }; }; then
18632   cf_cv_builtin_bool=1
18633 else
18634   echo "$as_me: failed program was:" >&5
18635 cat conftest.$ac_ext >&5
18636 cf_cv_builtin_bool=0
18637 fi
18638 rm -f conftest.$ac_objext conftest.$ac_ext
18639
18640 fi
18641
18642 if test "$cf_cv_builtin_bool" = 1
18643 then    echo "$as_me:18643: result: yes" >&5
18644 echo "${ECHO_T}yes" >&6
18645 else    echo "$as_me:18645: result: no" >&5
18646 echo "${ECHO_T}no" >&6
18647 fi
18648
18649 echo "$as_me:18649: checking for size of bool" >&5
18650 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18651 if test "${cf_cv_type_of_bool+set}" = set; then
18652   echo $ECHO_N "(cached) $ECHO_C" >&6
18653 else
18654
18655         rm -f cf_test.out
18656         if test "$cross_compiling" = yes; then
18657   cf_cv_type_of_bool=unknown
18658 else
18659   cat >conftest.$ac_ext <<_ACEOF
18660 #line 18660 "configure"
18661 #include "confdefs.h"
18662
18663 #include <stdlib.h>
18664 #include <stdio.h>
18665
18666 #if defined(__cplusplus)
18667
18668 #ifdef HAVE_GXX_BUILTIN_H
18669 #include <g++/builtin.h>
18670 #elif HAVE_GPP_BUILTIN_H
18671 #include <gpp/builtin.h>
18672 #elif HAVE_BUILTIN_H
18673 #include <builtin.h>
18674 #endif
18675
18676 #else
18677
18678 #if $cf_cv_header_stdbool_h
18679 #include <stdbool.h>
18680 #endif
18681
18682 #endif
18683
18684 main()
18685 {
18686         FILE *fp = fopen("cf_test.out", "w");
18687         if (fp != 0) {
18688                 bool x = true;
18689                 if ((bool)(-x) >= 0)
18690                         fputs("unsigned ", fp);
18691                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18692                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18693                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18694                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18695                 fclose(fp);
18696         }
18697         ${cf_cv_main_return:-return}(0);
18698 }
18699
18700 _ACEOF
18701 rm -f conftest$ac_exeext
18702 if { (eval echo "$as_me:18702: \"$ac_link\"") >&5
18703   (eval $ac_link) 2>&5
18704   ac_status=$?
18705   echo "$as_me:18705: \$? = $ac_status" >&5
18706   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18707   { (eval echo "$as_me:18707: \"$ac_try\"") >&5
18708   (eval $ac_try) 2>&5
18709   ac_status=$?
18710   echo "$as_me:18710: \$? = $ac_status" >&5
18711   (exit $ac_status); }; }; then
18712   cf_cv_type_of_bool=`cat cf_test.out`
18713                  if test -z "$cf_cv_type_of_bool"; then
18714                    cf_cv_type_of_bool=unknown
18715                  fi
18716 else
18717   echo "$as_me: program exited with status $ac_status" >&5
18718 echo "$as_me: failed program was:" >&5
18719 cat conftest.$ac_ext >&5
18720 cf_cv_type_of_bool=unknown
18721 fi
18722 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18723 fi
18724
18725 fi
18726
18727         rm -f cf_test.out
18728 echo "$as_me:18728: result: $cf_cv_type_of_bool" >&5
18729 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18730 if test "$cf_cv_type_of_bool" = unknown ; then
18731         case .$NCURSES_BOOL in #(vi
18732         .auto|.) NCURSES_BOOL=unsigned;;
18733         esac
18734         { echo "$as_me:18734: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18735 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18736         cf_cv_type_of_bool=$NCURSES_BOOL
18737 fi
18738
18739 echo "$as_me:18739: checking for special defines needed for etip.h" >&5
18740 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18741 cf_save_CXXFLAGS="$CXXFLAGS"
18742 cf_result="none"
18743
18744 # etip.h includes ncurses.h which includes ncurses_dll.h
18745 # But ncurses_dll.h is generated - fix here.
18746 test -d include || mkdir include
18747 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
18748
18749 for cf_math in "" MATH_H
18750 do
18751 for cf_excp in "" MATH_EXCEPTION
18752 do
18753         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18754         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18755         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18756 cat >conftest.$ac_ext <<_ACEOF
18757 #line 18757 "configure"
18758 #include "confdefs.h"
18759
18760 #include <etip.h.in>
18761
18762 int
18763 main ()
18764 {
18765
18766   ;
18767   return 0;
18768 }
18769 _ACEOF
18770 rm -f conftest.$ac_objext
18771 if { (eval echo "$as_me:18771: \"$ac_compile\"") >&5
18772   (eval $ac_compile) 2>&5
18773   ac_status=$?
18774   echo "$as_me:18774: \$? = $ac_status" >&5
18775   (exit $ac_status); } &&
18776          { ac_try='test -s conftest.$ac_objext'
18777   { (eval echo "$as_me:18777: \"$ac_try\"") >&5
18778   (eval $ac_try) 2>&5
18779   ac_status=$?
18780   echo "$as_me:18780: \$? = $ac_status" >&5
18781   (exit $ac_status); }; }; then
18782
18783         test -n "$cf_math" && cat >>confdefs.h <<EOF
18784 #define ETIP_NEEDS_${cf_math} 1
18785 EOF
18786
18787         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18788 #define ETIP_NEEDS_${cf_excp} 1
18789 EOF
18790
18791         cf_result="$cf_math $cf_excp"
18792         break 2
18793
18794 else
18795   echo "$as_me: failed program was:" >&5
18796 cat conftest.$ac_ext >&5
18797 fi
18798 rm -f conftest.$ac_objext conftest.$ac_ext
18799 done
18800 done
18801 echo "$as_me:18801: result: $cf_result" >&5
18802 echo "${ECHO_T}$cf_result" >&6
18803 CXXFLAGS="$cf_save_CXXFLAGS"
18804
18805 if test -n "$CXX"; then
18806 echo "$as_me:18806: checking if $CXX accepts parameter initialization" >&5
18807 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18808 if test "${cf_cv_cpp_param_init+set}" = set; then
18809   echo $ECHO_N "(cached) $ECHO_C" >&6
18810 else
18811
18812         ac_ext=cc
18813 ac_cpp='$CXXCPP $CPPFLAGS'
18814 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18815 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18816 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18817 ac_main_return=return
18818
18819         if test "$cross_compiling" = yes; then
18820   cf_cv_cpp_param_init=unknown
18821 else
18822   cat >conftest.$ac_ext <<_ACEOF
18823 #line 18823 "configure"
18824 #include "confdefs.h"
18825
18826 class TEST {
18827 private:
18828         int value;
18829 public:
18830         TEST(int x = 1);
18831         ~TEST();
18832 };
18833
18834 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18835 {
18836         value = x;
18837 }
18838 int main() { }
18839
18840 _ACEOF
18841 rm -f conftest$ac_exeext
18842 if { (eval echo "$as_me:18842: \"$ac_link\"") >&5
18843   (eval $ac_link) 2>&5
18844   ac_status=$?
18845   echo "$as_me:18845: \$? = $ac_status" >&5
18846   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18847   { (eval echo "$as_me:18847: \"$ac_try\"") >&5
18848   (eval $ac_try) 2>&5
18849   ac_status=$?
18850   echo "$as_me:18850: \$? = $ac_status" >&5
18851   (exit $ac_status); }; }; then
18852   cf_cv_cpp_param_init=yes
18853 else
18854   echo "$as_me: program exited with status $ac_status" >&5
18855 echo "$as_me: failed program was:" >&5
18856 cat conftest.$ac_ext >&5
18857 cf_cv_cpp_param_init=no
18858 fi
18859 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18860 fi
18861         ac_ext=cc
18862 ac_cpp='$CXXCPP $CPPFLAGS'
18863 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18864 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18865 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18866 ac_main_return=return
18867
18868 fi
18869 echo "$as_me:18869: result: $cf_cv_cpp_param_init" >&5
18870 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18871 fi
18872 test "$cf_cv_cpp_param_init" = yes &&
18873 cat >>confdefs.h <<\EOF
18874 #define CPP_HAS_PARAM_INIT 1
18875 EOF
18876
18877 if test -n "$CXX"; then
18878
18879 echo "$as_me:18879: checking if $CXX accepts static_cast" >&5
18880 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18881 if test "${cf_cv_cpp_static_cast+set}" = set; then
18882   echo $ECHO_N "(cached) $ECHO_C" >&6
18883 else
18884
18885         ac_ext=cc
18886 ac_cpp='$CXXCPP $CPPFLAGS'
18887 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18888 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18889 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18890 ac_main_return=return
18891
18892         cat >conftest.$ac_ext <<_ACEOF
18893 #line 18893 "configure"
18894 #include "confdefs.h"
18895
18896 class NCursesPanel
18897 {
18898 public:
18899   NCursesPanel(int nlines,
18900                int ncols,
18901                int begin_y = 0,
18902                int begin_x = 0)
18903   {
18904   }
18905
18906   ~NCursesPanel();
18907 };
18908
18909 template<class T> class NCursesUserPanel : public NCursesPanel
18910 {
18911 public:
18912   NCursesUserPanel (int nlines,
18913                     int ncols,
18914                     int begin_y = 0,
18915                     int begin_x = 0,
18916                     const T* p_UserData = static_cast<T*>(0))
18917     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18918   {
18919   };
18920   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18921   {
18922   };
18923
18924   virtual ~NCursesUserPanel() {};
18925 };
18926
18927 int
18928 main ()
18929 {
18930
18931         const char* p_UserData = static_cast<char*>(0)
18932   ;
18933   return 0;
18934 }
18935 _ACEOF
18936 rm -f conftest.$ac_objext
18937 if { (eval echo "$as_me:18937: \"$ac_compile\"") >&5
18938   (eval $ac_compile) 2>&5
18939   ac_status=$?
18940   echo "$as_me:18940: \$? = $ac_status" >&5
18941   (exit $ac_status); } &&
18942          { ac_try='test -s conftest.$ac_objext'
18943   { (eval echo "$as_me:18943: \"$ac_try\"") >&5
18944   (eval $ac_try) 2>&5
18945   ac_status=$?
18946   echo "$as_me:18946: \$? = $ac_status" >&5
18947   (exit $ac_status); }; }; then
18948   cf_cv_cpp_static_cast=yes
18949 else
18950   echo "$as_me: failed program was:" >&5
18951 cat conftest.$ac_ext >&5
18952 cf_cv_cpp_static_cast=no
18953 fi
18954 rm -f conftest.$ac_objext conftest.$ac_ext
18955
18956         ac_ext=cc
18957 ac_cpp='$CXXCPP $CPPFLAGS'
18958 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18959 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18960 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18961 ac_main_return=return
18962
18963 fi
18964 echo "$as_me:18964: result: $cf_cv_cpp_static_cast" >&5
18965 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18966
18967 fi
18968
18969 test "$cf_cv_cpp_static_cast" = yes &&
18970 cat >>confdefs.h <<\EOF
18971 #define CPP_HAS_STATIC_CAST 1
18972 EOF
18973
18974         CXX_AR='$(AR)'
18975         CXX_ARFLAGS='$(ARFLAGS)'
18976         case $cf_cv_system_name in #(vi
18977         irix*) #(vi
18978             if test "$GXX" != yes ; then
18979                 CXX_AR='$(CXX)'
18980                 CXX_ARFLAGS='-ar -o'
18981             fi
18982             ;;
18983         sco3.2v5*) #(vi
18984             CXXLDFLAGS="-u main"
18985             ;;
18986         solaris2*)
18987             if test "$GXX" != yes ; then
18988                 CXX_AR='$(CXX)'
18989                 CXX_ARFLAGS='-xar -o'
18990             fi
18991             ;;
18992         esac
18993
18994 else
18995         cf_cxx_library=no
18996         cf_cv_builtin_bool=1
18997
18998         # Just because we are not configuring against C++ right now does not
18999         # mean that a user will not want to use C++.  Some distributors disable
19000         # the C++ portion of this configuration as a shortcut (or just to avoid
19001         # compiling the demo in the c++ directory).  So we need a reasonable
19002         # default for the 'bool' type.
19003         #
19004         # Caveat: since the storage of the bool type is not standardized, it
19005         # may change.
19006
19007         if test "$NCURSES_BOOL" != auto ; then
19008                 cf_cv_type_of_bool=$NCURSES_BOOL
19009                 cf_cv_header_stdbool_h=0
19010         else
19011                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19012
19013 echo "$as_me:19013: checking for size of bool" >&5
19014 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19015 if test "${cf_cv_type_of_bool+set}" = set; then
19016   echo $ECHO_N "(cached) $ECHO_C" >&6
19017 else
19018
19019         rm -f cf_test.out
19020         if test "$cross_compiling" = yes; then
19021   cf_cv_type_of_bool=unknown
19022 else
19023   cat >conftest.$ac_ext <<_ACEOF
19024 #line 19024 "configure"
19025 #include "confdefs.h"
19026
19027 #include <stdlib.h>
19028 #include <stdio.h>
19029
19030 #if defined(__cplusplus)
19031
19032 #ifdef HAVE_GXX_BUILTIN_H
19033 #include <g++/builtin.h>
19034 #elif HAVE_GPP_BUILTIN_H
19035 #include <gpp/builtin.h>
19036 #elif HAVE_BUILTIN_H
19037 #include <builtin.h>
19038 #endif
19039
19040 #else
19041
19042 #if $cf_cv_header_stdbool_h
19043 #include <stdbool.h>
19044 #endif
19045
19046 #endif
19047
19048 main()
19049 {
19050         FILE *fp = fopen("cf_test.out", "w");
19051         if (fp != 0) {
19052                 bool x = true;
19053                 if ((bool)(-x) >= 0)
19054                         fputs("unsigned ", fp);
19055                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19056                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19057                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19058                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19059                 fclose(fp);
19060         }
19061         ${cf_cv_main_return:-return}(0);
19062 }
19063
19064 _ACEOF
19065 rm -f conftest$ac_exeext
19066 if { (eval echo "$as_me:19066: \"$ac_link\"") >&5
19067   (eval $ac_link) 2>&5
19068   ac_status=$?
19069   echo "$as_me:19069: \$? = $ac_status" >&5
19070   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19071   { (eval echo "$as_me:19071: \"$ac_try\"") >&5
19072   (eval $ac_try) 2>&5
19073   ac_status=$?
19074   echo "$as_me:19074: \$? = $ac_status" >&5
19075   (exit $ac_status); }; }; then
19076   cf_cv_type_of_bool=`cat cf_test.out`
19077                  if test -z "$cf_cv_type_of_bool"; then
19078                    cf_cv_type_of_bool=unknown
19079                  fi
19080 else
19081   echo "$as_me: program exited with status $ac_status" >&5
19082 echo "$as_me: failed program was:" >&5
19083 cat conftest.$ac_ext >&5
19084 cf_cv_type_of_bool=unknown
19085 fi
19086 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19087 fi
19088
19089 fi
19090
19091         rm -f cf_test.out
19092 echo "$as_me:19092: result: $cf_cv_type_of_bool" >&5
19093 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19094 if test "$cf_cv_type_of_bool" = unknown ; then
19095         case .$NCURSES_BOOL in #(vi
19096         .auto|.) NCURSES_BOOL=unsigned;;
19097         esac
19098         { echo "$as_me:19098: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19099 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19100         cf_cv_type_of_bool=$NCURSES_BOOL
19101 fi
19102
19103                 else
19104                         echo "$as_me:19104: checking for fallback type of bool" >&5
19105 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19106                         case "$host_cpu" in #(vi
19107                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19108                         *)      cf_cv_type_of_bool=int  ;;
19109                         esac
19110                         echo "$as_me:19110: result: $cf_cv_type_of_bool" >&5
19111 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19112                 fi
19113         fi
19114 fi
19115
19116 # If the C compiler did not declare bool, and we did not determine that the C++
19117 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19118 # ncurses library use the same type as C++ bool.  Note that this allows one to
19119 # specify the type of bool in a configure-script option and postpone
19120 # integration with the C++ compiler provided that the types are compatible.
19121 USE_CXX_BOOL=1
19122 if test $cf_cv_cc_bool_type = 1
19123 then
19124         # oops: C has a bool.  Unlikely, but C++ could differ.
19125         USE_CXX_BOOL=0
19126 elif test $cf_cv_builtin_bool = 0
19127 then
19128         # C++ has no bool
19129         USE_CXX_BOOL=0
19130 else
19131         # this is the normal case
19132         USE_CXX_BOOL='defined(__cplusplus)'
19133 fi
19134
19135 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19136
19137         if test "$cf_with_ada" != "no" ; then
19138                 if test "$with_libtool" != "no"; then
19139                         { echo "$as_me:19139: WARNING: libtool does not support Ada - disabling feature" >&5
19140 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19141                         cf_with_ada=no
19142                 fi
19143         fi
19144
19145         if test "$cf_with_ada" != "no" ; then
19146
19147 cf_ada_make=gnatmake
19148 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19149 set dummy $cf_ada_make; ac_word=$2
19150 echo "$as_me:19150: checking for $ac_word" >&5
19151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19152 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19153   echo $ECHO_N "(cached) $ECHO_C" >&6
19154 else
19155   if test -n "$gnat_exists"; then
19156   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19157 else
19158   ac_save_IFS=$IFS; IFS=$ac_path_separator
19159 ac_dummy="$PATH"
19160 for ac_dir in $ac_dummy; do
19161   IFS=$ac_save_IFS
19162   test -z "$ac_dir" && ac_dir=.
19163   $as_executable_p "$ac_dir/$ac_word" || continue
19164 ac_cv_prog_gnat_exists="yes"
19165 echo "$as_me:19165: found $ac_dir/$ac_word" >&5
19166 break
19167 done
19168
19169   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19170 fi
19171 fi
19172 gnat_exists=$ac_cv_prog_gnat_exists
19173 if test -n "$gnat_exists"; then
19174   echo "$as_me:19174: result: $gnat_exists" >&5
19175 echo "${ECHO_T}$gnat_exists" >&6
19176 else
19177   echo "$as_me:19177: result: no" >&5
19178 echo "${ECHO_T}no" >&6
19179 fi
19180
19181 if test "$ac_cv_prog_gnat_exists" = no; then
19182    cf_ada_make=
19183    cf_cv_prog_gnat_correct=no
19184 else
19185
19186 echo "$as_me:19186: checking for gnat version" >&5
19187 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19188 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19189         grep '[0-9].[0-9][0-9]*' |\
19190     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19191 echo "$as_me:19191: result: $cf_gnat_version" >&5
19192 echo "${ECHO_T}$cf_gnat_version" >&6
19193
19194 case $cf_gnat_version in #(vi
19195 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19196         cf_cv_prog_gnat_correct=yes
19197         ;;
19198 *)
19199         { echo "$as_me:19199: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19200 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19201         cf_cv_prog_gnat_correct=no
19202         ;;
19203 esac
19204
19205    # Extract the first word of "m4", so it can be a program name with args.
19206 set dummy m4; ac_word=$2
19207 echo "$as_me:19207: checking for $ac_word" >&5
19208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19209 if test "${ac_cv_prog_M4_exists+set}" = set; then
19210   echo $ECHO_N "(cached) $ECHO_C" >&6
19211 else
19212   if test -n "$M4_exists"; then
19213   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19214 else
19215   ac_save_IFS=$IFS; IFS=$ac_path_separator
19216 ac_dummy="$PATH"
19217 for ac_dir in $ac_dummy; do
19218   IFS=$ac_save_IFS
19219   test -z "$ac_dir" && ac_dir=.
19220   $as_executable_p "$ac_dir/$ac_word" || continue
19221 ac_cv_prog_M4_exists="yes"
19222 echo "$as_me:19222: found $ac_dir/$ac_word" >&5
19223 break
19224 done
19225
19226   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19227 fi
19228 fi
19229 M4_exists=$ac_cv_prog_M4_exists
19230 if test -n "$M4_exists"; then
19231   echo "$as_me:19231: result: $M4_exists" >&5
19232 echo "${ECHO_T}$M4_exists" >&6
19233 else
19234   echo "$as_me:19234: result: no" >&5
19235 echo "${ECHO_T}no" >&6
19236 fi
19237
19238    if test "$ac_cv_prog_M4_exists" = no; then
19239       cf_cv_prog_gnat_correct=no
19240       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19241    fi
19242    if test "$cf_cv_prog_gnat_correct" = yes; then
19243       echo "$as_me:19243: checking if GNAT works" >&5
19244 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19245
19246 rm -rf conftest* *~conftest*
19247 cat >>conftest.ads <<CF_EOF
19248 procedure conftest;
19249 CF_EOF
19250 cat >>conftest.adb <<CF_EOF
19251 with Text_IO;
19252 with GNAT.OS_Lib;
19253 procedure conftest is
19254 begin
19255    Text_IO.Put ("Hello World");
19256    Text_IO.New_Line;
19257    GNAT.OS_Lib.OS_Exit (0);
19258 end conftest;
19259 CF_EOF
19260 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19261    if ( ./conftest 1>&5 2>&1 ) ; then
19262       cf_cv_prog_gnat_correct=yes
19263    else
19264       cf_cv_prog_gnat_correct=no
19265    fi
19266 else
19267    cf_cv_prog_gnat_correct=no
19268 fi
19269 rm -rf conftest* *~conftest*
19270
19271       echo "$as_me:19271: result: $cf_cv_prog_gnat_correct" >&5
19272 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19273    fi
19274 fi
19275
19276                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19277
19278         ADAFLAGS="$ADAFLAGS -gnatpn"
19279
19280         echo "$as_me:19280: checking optimization options for ADAFLAGS" >&5
19281 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19282         case "$CFLAGS" in
19283         *-g*)
19284
19285         ADAFLAGS="$ADAFLAGS -g"
19286
19287                 ;;
19288         esac
19289         case "$CFLAGS" in
19290         *-O*)
19291                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19292
19293         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19294
19295                 ;;
19296         esac
19297         echo "$as_me:19297: result: $ADAFLAGS" >&5
19298 echo "${ECHO_T}$ADAFLAGS" >&6
19299
19300 echo "$as_me:19300: checking if GNAT supports generics" >&5
19301 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19302 case $cf_gnat_version in #(vi
19303 3.[1-9]*|[4-9].*) #(vi
19304         cf_gnat_generics=yes
19305         ;;
19306 *)
19307         cf_gnat_generics=no
19308         ;;
19309 esac
19310 echo "$as_me:19310: result: $cf_gnat_generics" >&5
19311 echo "${ECHO_T}$cf_gnat_generics" >&6
19312
19313 if test "$cf_gnat_generics" = yes
19314 then
19315         cf_compile_generics=generics
19316         cf_generic_objects="\${GENOBJS}"
19317 else
19318         cf_compile_generics=
19319         cf_generic_objects=
19320 fi
19321
19322 echo "$as_me:19322: checking if GNAT supports SIGINT" >&5
19323 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19324 if test "${cf_cv_gnat_sigint+set}" = set; then
19325   echo $ECHO_N "(cached) $ECHO_C" >&6
19326 else
19327
19328 rm -rf conftest* *~conftest*
19329 cat >>conftest.ads <<CF_EOF
19330 with Ada.Interrupts.Names;
19331
19332 package ConfTest is
19333
19334    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19335    pragma Unreserve_All_Interrupts;
19336    pragma Warnings (On);
19337
19338    protected Process is
19339       procedure Stop;
19340       function Continue return Boolean;
19341       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19342    private
19343       Done : Boolean := False;
19344    end Process;
19345
19346 end ConfTest;
19347 CF_EOF
19348 cat >>conftest.adb <<CF_EOF
19349 package body ConfTest is
19350    protected body Process is
19351       procedure Stop is
19352       begin
19353          Done := True;
19354       end Stop;
19355       function Continue return Boolean is
19356       begin
19357          return not Done;
19358       end Continue;
19359    end Process;
19360 end ConfTest;
19361 CF_EOF
19362 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19363       cf_cv_gnat_sigint=yes
19364 else
19365    cf_cv_gnat_sigint=no
19366 fi
19367 rm -rf conftest* *~conftest*
19368
19369 fi
19370 echo "$as_me:19370: result: $cf_cv_gnat_sigint" >&5
19371 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19372
19373 if test $cf_cv_gnat_sigint = yes ; then
19374         USE_GNAT_SIGINT=""
19375 else
19376         USE_GNAT_SIGINT="#"
19377 fi
19378
19379 echo "$as_me:19379: checking if GNAT pragma Unreferenced works" >&5
19380 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19381 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19382   echo $ECHO_N "(cached) $ECHO_C" >&6
19383 else
19384
19385 rm -rf conftest* *~conftest*
19386 cat >>conftest.ads <<CF_EOF
19387 procedure conftest;
19388 CF_EOF
19389 cat >>conftest.adb <<CF_EOF
19390 with Text_IO;
19391 with GNAT.OS_Lib;
19392 procedure conftest is
19393    test : Integer;
19394    pragma Unreferenced (test);
19395 begin
19396    test := 1;
19397    Text_IO.Put ("Hello World");
19398    Text_IO.New_Line;
19399    GNAT.OS_Lib.OS_Exit (0);
19400 end conftest;
19401 CF_EOF
19402 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19403       cf_cv_pragma_unreferenced=yes
19404 else
19405    cf_cv_pragma_unreferenced=no
19406 fi
19407 rm -rf conftest* *~conftest*
19408
19409 fi
19410 echo "$as_me:19410: result: $cf_cv_pragma_unreferenced" >&5
19411 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19412
19413 # if the pragma is supported, use it (needed in the Trace code).
19414 if test $cf_cv_pragma_unreferenced = yes ; then
19415         PRAGMA_UNREF=TRUE
19416 else
19417         PRAGMA_UNREF=FALSE
19418 fi
19419
19420 cf_gnat_libraries=no
19421 cf_gnat_projects=no
19422
19423 echo "$as_me:19423: checking if GNAT supports project files" >&5
19424 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19425 case $cf_gnat_version in #(vi
19426 3.[0-9]*) #(vi
19427         ;;
19428 *)
19429         case $cf_cv_system_name in #(vi
19430         cygwin*) #(vi
19431                 ;;
19432         *)
19433                 mkdir conftest.src conftest.bin conftest.lib
19434                 cd conftest.src
19435                 rm -rf conftest* *~conftest*
19436                 cat >>library.gpr <<CF_EOF
19437 project Library is
19438   Kind := External ("LIB_KIND");
19439   for Library_Name use "ConfTest";
19440   for Object_Dir use ".";
19441   for Library_ALI_Dir use External("LIBRARY_DIR");
19442   for Library_Version use External ("SONAME");
19443   for Library_Kind use Kind;
19444   for Library_Dir use External("BUILD_DIR");
19445   Source_Dir := External ("SOURCE_DIR");
19446   for Source_Dirs use (Source_Dir);
19447   package Compiler is
19448      for Default_Switches ("Ada") use
19449        ("-g",
19450         "-O2",
19451         "-gnatafno",
19452         "-gnatVa",   -- All validity checks
19453         "-gnatwa");  -- Activate all optional errors
19454   end Compiler;
19455 end Library;
19456 CF_EOF
19457                 cat >>confpackage.ads <<CF_EOF
19458 package ConfPackage is
19459    procedure conftest;
19460 end ConfPackage;
19461 CF_EOF
19462                 cat >>confpackage.adb <<CF_EOF
19463 with Text_IO;
19464 package body ConfPackage is
19465    procedure conftest is
19466    begin
19467       Text_IO.Put ("Hello World");
19468       Text_IO.New_Line;
19469    end conftest;
19470 end ConfPackage;
19471 CF_EOF
19472                 if ( $cf_ada_make $ADAFLAGS \
19473                                 -Plibrary.gpr \
19474                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19475                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19476                                 -XSOURCE_DIR=`pwd` \
19477                                 -XSONAME=libConfTest.so.1 \
19478                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19479                         cf_gnat_projects=yes
19480                 fi
19481                 cd ..
19482                 if test -f conftest.lib/confpackage.ali
19483                 then
19484                         cf_gnat_libraries=yes
19485                 fi
19486                 rm -rf conftest* *~conftest*
19487                 ;;
19488         esac
19489         ;;
19490 esac
19491 echo "$as_me:19491: result: $cf_gnat_projects" >&5
19492 echo "${ECHO_T}$cf_gnat_projects" >&6
19493
19494 if test $cf_gnat_projects = yes
19495 then
19496         echo "$as_me:19496: checking if GNAT supports libraries" >&5
19497 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19498         echo "$as_me:19498: result: $cf_gnat_libraries" >&5
19499 echo "${ECHO_T}$cf_gnat_libraries" >&6
19500 fi
19501
19502 if test "$cf_gnat_projects" = yes
19503 then
19504         USE_OLD_MAKERULES="#"
19505         USE_GNAT_PROJECTS=""
19506 else
19507         USE_OLD_MAKERULES=""
19508         USE_GNAT_PROJECTS="#"
19509 fi
19510
19511 if test "$cf_gnat_libraries" = yes
19512 then
19513         USE_GNAT_LIBRARIES=""
19514 else
19515         USE_GNAT_LIBRARIES="#"
19516 fi
19517
19518 echo "$as_me:19518: checking for ada-compiler" >&5
19519 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19520
19521 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19522 if test "${with_ada_compiler+set}" = set; then
19523   withval="$with_ada_compiler"
19524   cf_ada_compiler=$withval
19525 else
19526   cf_ada_compiler=gnatmake
19527 fi;
19528
19529 echo "$as_me:19529: result: $cf_ada_compiler" >&5
19530 echo "${ECHO_T}$cf_ada_compiler" >&6
19531
19532                         cf_ada_package=terminal_interface
19533
19534 echo "$as_me:19534: checking for ada-include" >&5
19535 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19536
19537 # Check whether --with-ada-include or --without-ada-include was given.
19538 if test "${with_ada_include+set}" = set; then
19539   withval="$with_ada_include"
19540
19541 else
19542   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19543 fi; if test -n "$prefix/share/ada/adainclude" ; then
19544
19545 if test "x$prefix" != xNONE; then
19546   cf_path_syntax="$prefix"
19547 else
19548   cf_path_syntax="$ac_default_prefix"
19549 fi
19550
19551 case ".$withval" in #(vi
19552 .\$\(*\)*|.\'*\'*) #(vi
19553   ;;
19554 ..|./*|.\\*) #(vi
19555   ;;
19556 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19557   ;;
19558 .\${*prefix}*|.\${*dir}*) #(vi
19559   eval withval="$withval"
19560   case ".$withval" in #(vi
19561   .NONE/*)
19562     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19563     ;;
19564   esac
19565   ;; #(vi
19566 .no|.NONE/*)
19567   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19568   ;;
19569 *)
19570   { { echo "$as_me:19570: error: expected a pathname, not \"$withval\"" >&5
19571 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19572    { (exit 1); exit 1; }; }
19573   ;;
19574 esac
19575
19576 fi
19577 eval ADA_INCLUDE="$withval"
19578
19579 echo "$as_me:19579: result: $ADA_INCLUDE" >&5
19580 echo "${ECHO_T}$ADA_INCLUDE" >&6
19581
19582 echo "$as_me:19582: checking for ada-objects" >&5
19583 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19584
19585 # Check whether --with-ada-objects or --without-ada-objects was given.
19586 if test "${with_ada_objects+set}" = set; then
19587   withval="$with_ada_objects"
19588
19589 else
19590   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19591 fi; if test -n "$prefix/lib/ada/adalib" ; then
19592
19593 if test "x$prefix" != xNONE; then
19594   cf_path_syntax="$prefix"
19595 else
19596   cf_path_syntax="$ac_default_prefix"
19597 fi
19598
19599 case ".$withval" in #(vi
19600 .\$\(*\)*|.\'*\'*) #(vi
19601   ;;
19602 ..|./*|.\\*) #(vi
19603   ;;
19604 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19605   ;;
19606 .\${*prefix}*|.\${*dir}*) #(vi
19607   eval withval="$withval"
19608   case ".$withval" in #(vi
19609   .NONE/*)
19610     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19611     ;;
19612   esac
19613   ;; #(vi
19614 .no|.NONE/*)
19615   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19616   ;;
19617 *)
19618   { { echo "$as_me:19618: error: expected a pathname, not \"$withval\"" >&5
19619 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19620    { (exit 1); exit 1; }; }
19621   ;;
19622 esac
19623
19624 fi
19625 eval ADA_OBJECTS="$withval"
19626
19627 echo "$as_me:19627: result: $ADA_OBJECTS" >&5
19628 echo "${ECHO_T}$ADA_OBJECTS" >&6
19629
19630 echo "$as_me:19630: checking if an Ada95 shared-library should be built" >&5
19631 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19632
19633 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19634 if test "${with_ada_sharedlib+set}" = set; then
19635   withval="$with_ada_sharedlib"
19636   with_ada_sharedlib=$withval
19637 else
19638   with_ada_sharedlib=no
19639 fi;
19640 echo "$as_me:19640: result: $with_ada_sharedlib" >&5
19641 echo "${ECHO_T}$with_ada_sharedlib" >&6
19642
19643 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19644 MAKE_ADA_SHAREDLIB="#"
19645
19646 if test "x$with_ada_sharedlib" != xno
19647 then
19648         MAKE_ADA_SHAREDLIB=
19649         if test "x$with_ada_sharedlib" != xyes
19650         then
19651                 ADA_SHAREDLIB="$with_ada_sharedlib"
19652         fi
19653 fi
19654
19655                 fi
19656         fi
19657 else
19658         cf_with_ada=no
19659 fi
19660
19661 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19662 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19663 ###
19664 ### ticlib modules may be a separate library, otherwise contained in termlib.
19665 ### termlib modules may be a separate library, otherwise contained in ncurses.
19666 ###
19667 ### The of "+" or " " between the tokens controls the way the script
19668 ### chooses to split module lists into libraries.
19669 ###
19670 ### (see CF_LIB_RULES).
19671 echo "$as_me:19671: checking for library subsets" >&5
19672 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19673 LIB_SUBSETS=
19674
19675 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19676         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19677         if test "$with_ticlib" != no ; then
19678                 LIB_SUBSETS="${LIB_SUBSETS} "
19679         else
19680                 LIB_SUBSETS="${LIB_SUBSETS}+"
19681         fi
19682 fi
19683
19684 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19685 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19686
19687 if test "$with_termlib" != no ; then
19688         LIB_SUBSETS="${LIB_SUBSETS} "
19689 else
19690         LIB_SUBSETS="${LIB_SUBSETS}+"
19691 fi
19692
19693 LIB_SUBSETS="${LIB_SUBSETS}base"
19694
19695 # Most term-driver calls are to tinfo, but some like init_pair are to the
19696 # base library (so it resides in base).
19697 if test "$with_term_driver" != no ; then
19698         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19699         case $cf_cv_system_name in #(vi
19700         *mingw32*) #(vi
19701                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19702                 ;;
19703         *) #(vi
19704                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19705                 ;;
19706         esac
19707 fi
19708
19709 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19710 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19711
19712 echo "$as_me:19712: result: $LIB_SUBSETS" >&5
19713 echo "${ECHO_T}$LIB_SUBSETS" >&6
19714
19715 ### Construct the list of include-directories to be generated
19716
19717 if test "$GCC" != yes; then
19718         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19719 elif test "$includedir" != "/usr/include"; then
19720         if test "$includedir" = '${prefix}/include' ; then
19721                 if test $prefix != /usr ; then
19722                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19723                 fi
19724         else
19725                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
19726         fi
19727 fi
19728 if test "$srcdir" != "."; then
19729         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19730 fi
19731 CPPFLAGS="-I. -I../include $CPPFLAGS"
19732
19733 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19734 if test "$srcdir" != "."; then
19735         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19736 fi
19737 if test "$GCC" != yes; then
19738         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19739 elif test "$includedir" != "/usr/include"; then
19740         if test "$includedir" = '${prefix}/include' ; then
19741                 if test $prefix != /usr ; then
19742                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19743                 fi
19744         else
19745                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19746         fi
19747 fi
19748
19749 ### Build up pieces for makefile rules
19750 echo "$as_me:19750: checking default library suffix" >&5
19751 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19752
19753         case $DFT_LWR_MODEL in
19754         libtool) DFT_ARG_SUFFIX=''   ;;
19755         normal)  DFT_ARG_SUFFIX=''   ;;
19756         debug)   DFT_ARG_SUFFIX='_g' ;;
19757         profile) DFT_ARG_SUFFIX='_p' ;;
19758         shared)  DFT_ARG_SUFFIX=''   ;;
19759         esac
19760         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19761 echo "$as_me:19761: result: $DFT_ARG_SUFFIX" >&5
19762 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19763
19764 echo "$as_me:19764: checking default library-dependency suffix" >&5
19765 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19766
19767         case $DFT_LWR_MODEL in #(vi
19768         libtool) #(vi
19769                 DFT_LIB_SUFFIX='.la'
19770                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19771                 ;;
19772         normal) #(vi
19773                 DFT_LIB_SUFFIX='.a'
19774                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19775                 ;;
19776         debug) #(vi
19777                 DFT_LIB_SUFFIX='_g.a'
19778                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19779                 ;;
19780         profile) #(vi
19781                 DFT_LIB_SUFFIX='_p.a'
19782                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19783                 ;;
19784         shared) #(vi
19785                 case $cf_cv_system_name in
19786                 aix[5-7]*) #(vi
19787                         DFT_LIB_SUFFIX='.a'
19788                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19789                         ;;
19790                 cygwin*|mingw*) #(vi
19791                         DFT_LIB_SUFFIX='.dll'
19792                         DFT_DEP_SUFFIX='.dll.a'
19793                         ;;
19794                 darwin*) #(vi
19795                         DFT_LIB_SUFFIX='.dylib'
19796                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19797                         ;;
19798                 hpux*) #(vi
19799                         case $target in
19800                         ia64*) #(vi
19801                                 DFT_LIB_SUFFIX='.so'
19802                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19803                                 ;;
19804                         *) #(vi
19805                                 DFT_LIB_SUFFIX='.sl'
19806                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19807                                 ;;
19808                         esac
19809                         ;;
19810                 *)      DFT_LIB_SUFFIX='.so'
19811                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19812                         ;;
19813                 esac
19814         esac
19815         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19816         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19817 echo "$as_me:19817: result: $DFT_DEP_SUFFIX" >&5
19818 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19819
19820 echo "$as_me:19820: checking default object directory" >&5
19821 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19822
19823         case $DFT_LWR_MODEL in
19824         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19825         normal)  DFT_OBJ_SUBDIR='objects' ;;
19826         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19827         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19828         shared)
19829                 case $cf_cv_system_name in #(vi
19830                 cygwin) #(vi
19831                         DFT_OBJ_SUBDIR='objects' ;;
19832                 *)
19833                         DFT_OBJ_SUBDIR='obj_s' ;;
19834                 esac
19835         esac
19836 echo "$as_me:19836: result: $DFT_OBJ_SUBDIR" >&5
19837 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19838
19839 if test "x$cf_with_cxx" = xyes ; then
19840 echo "$as_me:19840: checking c++ library-dependency suffix" >&5
19841 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19842 if test "$with_libtool" != "no"; then
19843         # libtool thinks it can make c++ shared libraries (perhaps only g++)
19844         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19845 elif test "$with_shared_cxx" != "no"; then
19846         # also for g++ users...
19847         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19848 else
19849         # we normally make a static library because C/C++ library rules differ
19850
19851         case normal in #(vi
19852         libtool) #(vi
19853                 CXX_LIB_SUFFIX='.la'
19854                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19855                 ;;
19856         normal) #(vi
19857                 CXX_LIB_SUFFIX='.a'
19858                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19859                 ;;
19860         debug) #(vi
19861                 CXX_LIB_SUFFIX='_g.a'
19862                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19863                 ;;
19864         profile) #(vi
19865                 CXX_LIB_SUFFIX='_p.a'
19866                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19867                 ;;
19868         shared) #(vi
19869                 case $cf_cv_system_name in
19870                 aix[5-7]*) #(vi
19871                         CXX_LIB_SUFFIX='.a'
19872                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19873                         ;;
19874                 cygwin*|mingw*) #(vi
19875                         CXX_LIB_SUFFIX='.dll'
19876                         CXX_DEP_SUFFIX='.dll.a'
19877                         ;;
19878                 darwin*) #(vi
19879                         CXX_LIB_SUFFIX='.dylib'
19880                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19881                         ;;
19882                 hpux*) #(vi
19883                         case $target in
19884                         ia64*) #(vi
19885                                 CXX_LIB_SUFFIX='.so'
19886                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19887                                 ;;
19888                         *) #(vi
19889                                 CXX_LIB_SUFFIX='.sl'
19890                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19891                                 ;;
19892                         esac
19893                         ;;
19894                 *)      CXX_LIB_SUFFIX='.so'
19895                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19896                         ;;
19897                 esac
19898         esac
19899         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19900         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19901
19902 fi
19903 echo "$as_me:19903: result: $CXX_LIB_SUFFIX" >&5
19904 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19905
19906 fi
19907
19908 # do not want -ldl in build except as needed for -lncurses dependency
19909 if test "x$with_dlsym" = xyes ; then
19910 if test $DFT_LWR_MODEL = shared || \
19911    test $DFT_LWR_MODEL = libtool ; then
19912
19913 # remove dl library from $LIBS
19914 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19915
19916 fi
19917 fi
19918 ### Set up low-level terminfo dependencies for makefiles.
19919
19920 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19921 # do not need libdl
19922 TICS_LIST=
19923 if test "x$with_dlsym" = xyes ; then
19924
19925 # remove dl library from $SHLIB_LIST
19926 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19927
19928 fi
19929
19930 if test "$with_ticlib" != no ; then
19931
19932         if test "x$with_ticlib" != xyes ; then
19933                 TICS_NAME=$with_ticlib
19934                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19935                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19936                 TICS_LIB_SUFFIX="${with_ticlib}"
19937         else
19938                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19939                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19940                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19941         fi
19942         TICS_LDFLAGS="-L${LIB_DIR}"
19943         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19944 else
19945         TICS_LDFLAGS="-L${LIB_DIR}"
19946         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19947 fi
19948
19949 if test "$with_termlib" != no ; then
19950
19951         if test "x$with_termlib" != xyes ; then
19952                 TINFO_NAME=$with_termlib
19953                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19954                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19955                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19956                 TINFO_LIB_SUFFIX="${with_termlib}"
19957         else
19958                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19959                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19960                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19961                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19962         fi
19963
19964         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19965         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19966         if test "$DFT_LWR_MODEL" = "libtool"; then
19967                 TEST_ARGS="${TEST_DEPS}"
19968                 TEST_ARG2="${TEST_DEP2}"
19969                 TINFO_LDFLAGS="-L${LIB_DIR}"
19970                 TINFO_LIBS="$TEST_ARGS"
19971                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19972                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19973         else
19974                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19975                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19976                 if test "x$with_term_driver" != xno ; then
19977                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19978                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19979                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19980                 else
19981                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19982                         TINFO_LIBS="$TEST_ARGS"
19983                 fi
19984                 TINFO_LDFLAGS="-L${LIB_DIR}"
19985                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19986         fi
19987 else
19988         # the next lines are needed for linking libtic over libncurses
19989         TINFO_NAME=${LIB_NAME}
19990         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19991         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19992         if test "x$with_tic_depends" = xyes ; then
19993                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19994         else
19995                 TICS_LIST="$SHLIB_LIST"
19996         fi
19997
19998         TINFO_LDFLAGS="-L${LIB_DIR}"
19999         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20000 fi
20001
20002 if test "$DFT_LWR_MODEL" = shared ; then
20003         case $cf_cv_system_name in #(vi
20004         cygwin*)
20005                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20006                 TINFO_SUFFIX=.dll
20007                 ;;
20008         esac
20009 fi
20010
20011 if test "x$with_dlsym" = xyes ; then
20012
20013 # remove dl library from $TICS_LIST
20014 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20015
20016 fi
20017
20018 if test "$DFT_LWR_MODEL" = "libtool"; then
20019     OBJEXT=lo
20020 fi
20021
20022 # needed for Ada95
20023 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20024
20025 case $DFT_LWR_MODEL in
20026 normal|debug|profile)
20027
20028 if test "$GCC" = yes ; then
20029         case $cf_cv_system_name in #(
20030         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20031                 LDFLAGS_STATIC=
20032                 LDFLAGS_SHARED=
20033                 ;;
20034     *)  #( normally, except when broken
20035         LDFLAGS_STATIC=-static
20036         LDFLAGS_SHARED=-dynamic
20037         ;;
20038     esac
20039 else
20040         case $cf_cv_system_name in #(
20041         aix[4-7]*)      #( from ld manpage
20042                 LDFLAGS_STATIC=-bstatic
20043                 LDFLAGS_SHARED=-bdynamic
20044                 ;;
20045         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20046                 # We could also use just "archive" and "shared".
20047                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20048                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20049                 ;;
20050         irix*)          #( from ld manpage IRIX64
20051                 LDFLAGS_STATIC=-Bstatic
20052                 LDFLAGS_SHARED=-Bdynamic
20053                 ;;
20054         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20055                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20056                 LDFLAGS_STATIC=-noso
20057                 LDFLAGS_SHARED=-so_archive
20058                 ;;
20059         solaris2*)
20060                 LDFLAGS_STATIC=-Bstatic
20061                 LDFLAGS_SHARED=-Bdynamic
20062                 ;;
20063         esac
20064 fi
20065
20066 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20067 then
20068         echo "$as_me:20068: checking if linker supports switching between static/dynamic" >&5
20069 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20070
20071         rm -f libconftest.a
20072         cat >conftest.$ac_ext <<EOF
20073 #line 20073 "configure"
20074 #include <stdio.h>
20075 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20076 EOF
20077         if { (eval echo "$as_me:20077: \"$ac_compile\"") >&5
20078   (eval $ac_compile) 2>&5
20079   ac_status=$?
20080   echo "$as_me:20080: \$? = $ac_status" >&5
20081   (exit $ac_status); } ; then
20082                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20083                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20084         fi
20085         rm -f conftest.*
20086
20087         cf_save_LIBS="$LIBS"
20088
20089         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20090         cat >conftest.$ac_ext <<_ACEOF
20091 #line 20091 "configure"
20092 #include "confdefs.h"
20093
20094 #line 20094 "configure"
20095 #include <stdio.h>
20096 int cf_ldflags_static(FILE *fp);
20097
20098 int
20099 main ()
20100 {
20101
20102         return cf_ldflags_static(stdin);
20103
20104   ;
20105   return 0;
20106 }
20107 _ACEOF
20108 rm -f conftest.$ac_objext conftest$ac_exeext
20109 if { (eval echo "$as_me:20109: \"$ac_link\"") >&5
20110   (eval $ac_link) 2>&5
20111   ac_status=$?
20112   echo "$as_me:20112: \$? = $ac_status" >&5
20113   (exit $ac_status); } &&
20114          { ac_try='test -s conftest$ac_exeext'
20115   { (eval echo "$as_me:20115: \"$ac_try\"") >&5
20116   (eval $ac_try) 2>&5
20117   ac_status=$?
20118   echo "$as_me:20118: \$? = $ac_status" >&5
20119   (exit $ac_status); }; }; then
20120
20121         # some linkers simply ignore the -dynamic
20122         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20123         *static*) # (vi
20124                 cf_ldflags_static=no
20125                 ;;
20126         *)
20127                 cf_ldflags_static=yes
20128                 ;;
20129         esac
20130
20131 else
20132   echo "$as_me: failed program was:" >&5
20133 cat conftest.$ac_ext >&5
20134 cf_ldflags_static=no
20135 fi
20136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20137
20138         rm -f libconftest.*
20139         LIBS="$cf_save_LIBS"
20140
20141         echo "$as_me:20141: result: $cf_ldflags_static" >&5
20142 echo "${ECHO_T}$cf_ldflags_static" >&6
20143
20144         if test $cf_ldflags_static != yes
20145         then
20146                 LDFLAGS_STATIC=
20147                 LDFLAGS_SHARED=
20148         fi
20149 else
20150         LDFLAGS_STATIC=
20151         LDFLAGS_SHARED=
20152 fi
20153
20154         ;;
20155 esac
20156
20157 echo "$as_me:20157: checking where we will install curses.h" >&5
20158 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20159 test "$with_overwrite" = no && \
20160 test "x$includedir" = 'x${prefix}/include' && \
20161         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20162 echo "$as_me:20162: result: $includedir" >&5
20163 echo "${ECHO_T}$includedir" >&6
20164
20165 ### Resolve a conflict between normal and wide-curses by forcing applications
20166 ### that will need libutf8 to add it to their configure script.
20167 if test "$with_overwrite" != no ; then
20168 if test "$NCURSES_LIBUTF8" = 1 ; then
20169         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20170         { echo "$as_me:20170: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20171 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20172 fi
20173 fi
20174 WITH_OVERWRITE=$with_overwrite
20175
20176 # used to separate tack out of the tree
20177 NCURSES_TREE=
20178
20179 ### predefined stuff for the test programs
20180
20181 cat >>confdefs.h <<\EOF
20182 #define HAVE_SLK_COLOR 1
20183 EOF
20184
20185 ### Construct the list of subdirectories for which we'll customize makefiles
20186 ### with the appropriate compile-rules.
20187
20188 echo "$as_me:20188: checking for src modules" >&5
20189 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20190
20191 # dependencies and linker-arguments for test-programs
20192 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20193 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20194 if test "$DFT_LWR_MODEL" = "libtool"; then
20195         TEST_ARGS="${TEST_DEPS}"
20196         TEST_ARG2="${TEST_DEP2}"
20197 else
20198         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20199         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20200 fi
20201
20202 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20203 cf_cv_src_modules=
20204 for cf_dir in $modules_to_build
20205 do
20206         if test -f $srcdir/$cf_dir/modules; then
20207
20208                 # We may/may not have tack in the distribution, though the
20209                 # makefile is.
20210                 if test $cf_dir = tack ; then
20211                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20212                                 continue
20213                         fi
20214                 fi
20215
20216                 if test -z "$cf_cv_src_modules"; then
20217                         cf_cv_src_modules=$cf_dir
20218                 else
20219                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20220                 fi
20221
20222                 # Make the ncurses_cfg.h file record the library interface files as
20223                 # well.  These are header files that are the same name as their
20224                 # directory.  Ncurses is the only library that does not follow
20225                 # that pattern.
20226                 if test $cf_dir = tack ; then
20227                         continue
20228                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20229
20230 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20231
20232                         cat >>confdefs.h <<EOF
20233 #define HAVE_${cf_have_include}_H 1
20234 EOF
20235
20236                         cat >>confdefs.h <<EOF
20237 #define HAVE_LIB${cf_have_include} 1
20238 EOF
20239
20240                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20241                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20242                         if test "$DFT_LWR_MODEL" = "libtool"; then
20243                                 TEST_ARGS="${TEST_DEPS}"
20244                                 TEST_ARG2="${TEST_DEP2}"
20245                         else
20246                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20247                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20248                         fi
20249                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20250                 fi
20251         fi
20252 done
20253 echo "$as_me:20253: result: $cf_cv_src_modules" >&5
20254 echo "${ECHO_T}$cf_cv_src_modules" >&6
20255
20256 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20257 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20258
20259 SRC_SUBDIRS=
20260 if test "x$cf_with_manpages" != xno ; then
20261         SRC_SUBDIRS="$SRC_SUBDIRS man"
20262 fi
20263 SRC_SUBDIRS="$SRC_SUBDIRS include"
20264 for cf_dir in $cf_cv_src_modules
20265 do
20266         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20267 done
20268 if test "x$cf_with_tests" != "xno" ; then
20269         SRC_SUBDIRS="$SRC_SUBDIRS test"
20270 fi
20271 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20272 if test "$cf_with_cxx_binding" != no; then
20273         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20274         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20275 fi
20276
20277 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20278 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20279
20280 ADA_SUBDIRS=
20281 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20282         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20283         ADA_SUBDIRS="gen src"
20284         if test "x$cf_with_tests" != "xno" ; then
20285                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20286         fi
20287 fi
20288
20289 SUB_MAKEFILES=
20290 for cf_dir in $SRC_SUBDIRS
20291 do
20292         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20293 done
20294
20295 if test -n "$ADA_SUBDIRS"; then
20296         for cf_dir in $ADA_SUBDIRS
20297         do
20298                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20299         done
20300
20301 fi
20302
20303 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20304    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20305    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20306 fi
20307
20308 DIRS_TO_MAKE="lib"
20309 for cf_item in $cf_list_models
20310 do
20311
20312         case $cf_item in
20313         libtool) cf_subdir='obj_lo'  ;;
20314         normal)  cf_subdir='objects' ;;
20315         debug)   cf_subdir='obj_g' ;;
20316         profile) cf_subdir='obj_p' ;;
20317         shared)
20318                 case $cf_cv_system_name in #(vi
20319                 cygwin) #(vi
20320                         cf_subdir='objects' ;;
20321                 *)
20322                         cf_subdir='obj_s' ;;
20323                 esac
20324         esac
20325
20326         for cf_item2 in $DIRS_TO_MAKE
20327         do
20328                 test $cf_item2 = $cf_subdir && break
20329         done
20330         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20331 done
20332 for cf_dir in $DIRS_TO_MAKE
20333 do
20334         test ! -d $cf_dir && mkdir $cf_dir
20335 done
20336
20337 # symbols that differ when compiling Ada95 by itself.
20338 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20339
20340 # values to use as strings
20341
20342 cat >>confdefs.h <<EOF
20343 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20344 EOF
20345
20346 cat >>confdefs.h <<EOF
20347 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20348 EOF
20349
20350 ### Now that we're done running tests, add the compiler-warnings, if any
20351
20352 cf_fix_cppflags=no
20353 cf_new_cflags=
20354 cf_new_cppflags=
20355 cf_new_extra_cppflags=
20356
20357 for cf_add_cflags in $EXTRA_CFLAGS
20358 do
20359 case $cf_fix_cppflags in
20360 no)
20361         case $cf_add_cflags in #(vi
20362         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20363                 case $cf_add_cflags in
20364                 -D*)
20365                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20366
20367                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20368                                 && test -z "${cf_tst_cflags}" \
20369                                 && cf_fix_cppflags=yes
20370
20371                         if test $cf_fix_cppflags = yes ; then
20372                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20373                                 continue
20374                         elif test "${cf_tst_cflags}" = "\"'" ; then
20375                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20376                                 continue
20377                         fi
20378                         ;;
20379                 esac
20380                 case "$CPPFLAGS" in
20381                 *$cf_add_cflags) #(vi
20382                         ;;
20383                 *) #(vi
20384                         case $cf_add_cflags in #(vi
20385                         -D*)
20386                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20387
20388 CPPFLAGS=`echo "$CPPFLAGS" | \
20389         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20390                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20391
20392                                 ;;
20393                         esac
20394                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20395                         ;;
20396                 esac
20397                 ;;
20398         *)
20399                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20400                 ;;
20401         esac
20402         ;;
20403 yes)
20404         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20405
20406         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20407
20408         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20409                 && test -z "${cf_tst_cflags}" \
20410                 && cf_fix_cppflags=no
20411         ;;
20412 esac
20413 done
20414
20415 if test -n "$cf_new_cflags" ; then
20416
20417         CFLAGS="$CFLAGS $cf_new_cflags"
20418 fi
20419
20420 if test -n "$cf_new_cppflags" ; then
20421
20422         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20423 fi
20424
20425 if test -n "$cf_new_extra_cppflags" ; then
20426
20427         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20428 fi
20429
20430 ### Define substitutions for header files to avoid name-pollution
20431
20432 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20433         HAVE_TCGETATTR=1
20434 else
20435         HAVE_TCGETATTR=0
20436 fi
20437
20438 if test "x$ac_cv_header_termio_h" = xyes ; then
20439         HAVE_TERMIO_H=1
20440 else
20441         HAVE_TERMIO_H=0
20442 fi
20443
20444 if test "x$ac_cv_header_termios_h" = xyes ; then
20445         HAVE_TERMIOS_H=1
20446 else
20447         HAVE_TERMIOS_H=0
20448 fi
20449
20450 ################################################################################
20451 test "x$use_database" = xyes && \
20452 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20453
20454 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20455 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20456
20457 if test "x$enable_pc_files" = xyes ; then \
20458 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20459 MAKE_PC_FILES=
20460 else
20461 MAKE_PC_FILES="#"
20462 fi
20463
20464 # Extract the first word of "tic", so it can be a program name with args.
20465 set dummy tic; ac_word=$2
20466 echo "$as_me:20466: checking for $ac_word" >&5
20467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20468 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20469   echo $ECHO_N "(cached) $ECHO_C" >&6
20470 else
20471   case $TIC_PATH in
20472   [\\/]* | ?:[\\/]*)
20473   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20474   ;;
20475   *)
20476   ac_save_IFS=$IFS; IFS=$ac_path_separator
20477 ac_dummy="$PATH:/usr/local/ncurses/bin"
20478 for ac_dir in $ac_dummy; do
20479   IFS=$ac_save_IFS
20480   test -z "$ac_dir" && ac_dir=.
20481   if $as_executable_p "$ac_dir/$ac_word"; then
20482    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20483    echo "$as_me:20483: found $ac_dir/$ac_word" >&5
20484    break
20485 fi
20486 done
20487
20488   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20489   ;;
20490 esac
20491 fi
20492 TIC_PATH=$ac_cv_path_TIC_PATH
20493
20494 if test -n "$TIC_PATH"; then
20495   echo "$as_me:20495: result: $TIC_PATH" >&5
20496 echo "${ECHO_T}$TIC_PATH" >&6
20497 else
20498   echo "$as_me:20498: result: no" >&5
20499 echo "${ECHO_T}no" >&6
20500 fi
20501
20502 if test -n "$FALLBACK_LIST"
20503 then
20504         if test "$TIC_PATH" = unknown
20505         then
20506                 { echo "$as_me:20506: WARNING: no tic program found for fallbacks" >&5
20507 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20508         fi
20509 fi
20510
20511 if test "x$cf_with_tests" != xno ; then
20512         MAKE_TESTS=
20513 else
20514         MAKE_TESTS="#"
20515 fi
20516
20517 ADAHTML_DIR=../../doc/html/ada
20518
20519 # these could be configurable, but are not currently
20520 PANEL_NAME=panel
20521 MENU_NAME=menu
20522 FORM_NAME=form
20523 CXX_NAME=ncurses++
20524
20525 SUB_SCRIPTS=
20526
20527 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"
20528 ac_config_commands="$ac_config_commands default"
20529 cat >confcache <<\_ACEOF
20530 # This file is a shell script that caches the results of configure
20531 # tests run on this system so they can be shared between configure
20532 # scripts and configure runs, see configure's option --config-cache.
20533 # It is not useful on other systems.  If it contains results you don't
20534 # want to keep, you may remove or edit it.
20535 #
20536 # config.status only pays attention to the cache file if you give it
20537 # the --recheck option to rerun configure.
20538 #
20539 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20540 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20541 # following values.
20542
20543 _ACEOF
20544
20545 # The following way of writing the cache mishandles newlines in values,
20546 # but we know of no workaround that is simple, portable, and efficient.
20547 # So, don't put newlines in cache variables' values.
20548 # Ultrix sh set writes to stderr and can't be redirected directly,
20549 # and sets the high bit in the cache file unless we assign to the vars.
20550 {
20551   (set) 2>&1 |
20552     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20553     *ac_space=\ *)
20554       # `set' does not quote correctly, so add quotes (double-quote
20555       # substitution turns \\\\ into \\, and sed turns \\ into \).
20556       sed -n \
20557         "s/'/'\\\\''/g;
20558           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20559       ;;
20560     *)
20561       # `set' quotes correctly as required by POSIX, so do not add quotes.
20562       sed -n \
20563         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20564       ;;
20565     esac;
20566 } |
20567   sed '
20568      t clear
20569      : clear
20570      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20571      t end
20572      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20573      : end' >>confcache
20574 if cmp -s $cache_file confcache; then :; else
20575   if test -w $cache_file; then
20576     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20577     cat confcache >$cache_file
20578   else
20579     echo "not updating unwritable cache $cache_file"
20580   fi
20581 fi
20582 rm -f confcache
20583
20584 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20585 # Let make expand exec_prefix.
20586 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20587
20588 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20589 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20590 # trailing colons and then remove the whole line if VPATH becomes empty
20591 # (actually we leave an empty line to preserve line numbers).
20592 if test "x$srcdir" = x.; then
20593   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20594 s/:*\$(srcdir):*/:/;
20595 s/:*\${srcdir}:*/:/;
20596 s/:*@srcdir@:*/:/;
20597 s/^\([^=]*=[    ]*\):*/\1/;
20598 s/:*$//;
20599 s/^[^=]*=[      ]*$//;
20600 }'
20601 fi
20602
20603 DEFS=-DHAVE_CONFIG_H
20604
20605 : ${CONFIG_STATUS=./config.status}
20606 ac_clean_files_save=$ac_clean_files
20607 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20608 { echo "$as_me:20608: creating $CONFIG_STATUS" >&5
20609 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20610 cat >$CONFIG_STATUS <<_ACEOF
20611 #! $SHELL
20612 # Generated automatically by configure.
20613 # Run this file to recreate the current configuration.
20614 # Compiler output produced by configure, useful for debugging
20615 # configure, is in config.log if it exists.
20616
20617 debug=false
20618 SHELL=\${CONFIG_SHELL-$SHELL}
20619 ac_cs_invocation="\$0 \$@"
20620
20621 _ACEOF
20622
20623 cat >>$CONFIG_STATUS <<\_ACEOF
20624 # Be Bourne compatible
20625 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20626   emulate sh
20627   NULLCMD=:
20628 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20629   set -o posix
20630 fi
20631
20632 # Name of the executable.
20633 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20634
20635 if expr a : '\(a\)' >/dev/null 2>&1; then
20636   as_expr=expr
20637 else
20638   as_expr=false
20639 fi
20640
20641 rm -f conf$$ conf$$.exe conf$$.file
20642 echo >conf$$.file
20643 if ln -s conf$$.file conf$$ 2>/dev/null; then
20644   # We could just check for DJGPP; but this test a) works b) is more generic
20645   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20646   if test -f conf$$.exe; then
20647     # Don't use ln at all; we don't have any links
20648     as_ln_s='cp -p'
20649   else
20650     as_ln_s='ln -s'
20651   fi
20652 elif ln conf$$.file conf$$ 2>/dev/null; then
20653   as_ln_s=ln
20654 else
20655   as_ln_s='cp -p'
20656 fi
20657 rm -f conf$$ conf$$.exe conf$$.file
20658
20659 as_executable_p="test -f"
20660
20661 # Support unset when possible.
20662 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20663   as_unset=unset
20664 else
20665   as_unset=false
20666 fi
20667
20668 # NLS nuisances.
20669 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20670 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20671 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20672 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20673 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20674 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20675 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20676 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20677
20678 # IFS
20679 # We need space, tab and new line, in precisely that order.
20680 as_nl='
20681 '
20682 IFS="   $as_nl"
20683
20684 # CDPATH.
20685 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20686
20687 exec 6>&1
20688
20689 _ACEOF
20690
20691 # Files that config.status was made for.
20692 if test -n "$ac_config_files"; then
20693   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20694 fi
20695
20696 if test -n "$ac_config_headers"; then
20697   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20698 fi
20699
20700 if test -n "$ac_config_links"; then
20701   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20702 fi
20703
20704 if test -n "$ac_config_commands"; then
20705   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20706 fi
20707
20708 cat >>$CONFIG_STATUS <<\EOF
20709
20710 ac_cs_usage="\
20711 \`$as_me' instantiates files from templates according to the
20712 current configuration.
20713
20714 Usage: $0 [OPTIONS] [FILE]...
20715
20716   -h, --help       print this help, then exit
20717   -V, --version    print version number, then exit
20718   -d, --debug      don't remove temporary files
20719       --recheck    update $as_me by reconfiguring in the same conditions
20720   --file=FILE[:TEMPLATE]
20721                    instantiate the configuration file FILE
20722   --header=FILE[:TEMPLATE]
20723                    instantiate the configuration header FILE
20724
20725 Configuration files:
20726 $config_files
20727
20728 Configuration headers:
20729 $config_headers
20730
20731 Configuration commands:
20732 $config_commands
20733
20734 Report bugs to <dickey@invisible-island.net>."
20735 EOF
20736
20737 cat >>$CONFIG_STATUS <<EOF
20738 ac_cs_version="\\
20739 config.status
20740 configured by $0, generated by GNU Autoconf 2.52.20121002,
20741   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20742
20743 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20744 Free Software Foundation, Inc.
20745 This config.status script is free software; the Free Software Foundation
20746 gives unlimited permission to copy, distribute and modify it."
20747 srcdir=$srcdir
20748 INSTALL="$INSTALL"
20749 EOF
20750
20751 cat >>$CONFIG_STATUS <<\EOF
20752 # If no file are specified by the user, then we need to provide default
20753 # value.  By we need to know if files were specified by the user.
20754 ac_need_defaults=:
20755 while test $# != 0
20756 do
20757   case $1 in
20758   --*=*)
20759     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20760     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20761     shift
20762     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20763     shift
20764     ;;
20765   -*);;
20766   *) # This is not an option, so the user has probably given explicit
20767      # arguments.
20768      ac_need_defaults=false;;
20769   esac
20770
20771   case $1 in
20772   # Handling of the options.
20773 EOF
20774 cat >>$CONFIG_STATUS <<EOF
20775   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20776     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20777     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20778 EOF
20779 cat >>$CONFIG_STATUS <<\EOF
20780   --version | --vers* | -V )
20781     echo "$ac_cs_version"; exit 0 ;;
20782   --he | --h)
20783     # Conflict between --help and --header
20784     { { echo "$as_me:20784: error: ambiguous option: $1
20785 Try \`$0 --help' for more information." >&5
20786 echo "$as_me: error: ambiguous option: $1
20787 Try \`$0 --help' for more information." >&2;}
20788    { (exit 1); exit 1; }; };;
20789   --help | --hel | -h )
20790     echo "$ac_cs_usage"; exit 0 ;;
20791   --debug | --d* | -d )
20792     debug=: ;;
20793   --file | --fil | --fi | --f )
20794     shift
20795     CONFIG_FILES="$CONFIG_FILES $1"
20796     ac_need_defaults=false;;
20797   --header | --heade | --head | --hea )
20798     shift
20799     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20800     ac_need_defaults=false;;
20801
20802   # This is an error.
20803   -*) { { echo "$as_me:20803: error: unrecognized option: $1
20804 Try \`$0 --help' for more information." >&5
20805 echo "$as_me: error: unrecognized option: $1
20806 Try \`$0 --help' for more information." >&2;}
20807    { (exit 1); exit 1; }; } ;;
20808
20809   *) ac_config_targets="$ac_config_targets $1" ;;
20810
20811   esac
20812   shift
20813 done
20814
20815 exec 5>>config.log
20816 cat >&5 << _ACEOF
20817
20818 ## ----------------------- ##
20819 ## Running config.status.  ##
20820 ## ----------------------- ##
20821
20822 This file was extended by $as_me 2.52.20121002, executed with
20823   CONFIG_FILES    = $CONFIG_FILES
20824   CONFIG_HEADERS  = $CONFIG_HEADERS
20825   CONFIG_LINKS    = $CONFIG_LINKS
20826   CONFIG_COMMANDS = $CONFIG_COMMANDS
20827   > $ac_cs_invocation
20828 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20829
20830 _ACEOF
20831 EOF
20832
20833 cat >>$CONFIG_STATUS <<EOF
20834 #
20835 # INIT-COMMANDS section.
20836 #
20837
20838 ### Special initialization commands, used to pass information from the
20839 ### configuration-run into config.status
20840
20841 AWK="$AWK"
20842 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20843 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20844 ECHO_LD="$ECHO_LD"
20845 LDCONFIG="$LDCONFIG"
20846 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20847 LIB_NAME="$LIB_NAME"
20848 LIB_PREFIX="$LIB_PREFIX"
20849 LIB_SUBSETS="$LIB_SUBSETS"
20850 LIB_SUFFIX="$LIB_SUFFIX"
20851 LIB_TRACING="$LIB_TRACING"
20852 LN_S="$LN_S"
20853 MAKE_TERMINFO="$MAKE_TERMINFO"
20854 NCURSES_MAJOR="$NCURSES_MAJOR"
20855 NCURSES_MINOR="$NCURSES_MINOR"
20856 NCURSES_OSPEED="$NCURSES_OSPEED"
20857 NCURSES_PATCH="$NCURSES_PATCH"
20858 SRC_SUBDIRS="$SRC_SUBDIRS"
20859 TERMINFO="$TERMINFO"
20860 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20861 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20862 TICS_NAME="$TICS_NAME"
20863 TIC_PATH="$TIC_PATH"
20864 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20865 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20866 TINFO_NAME="$TINFO_NAME"
20867 TINFO_SUFFIX="$TINFO_SUFFIX"
20868 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20869 WITH_CURSES_H="$with_curses_h"
20870 WITH_ECHO="${enable_echo:=yes}"
20871 WITH_OVERWRITE="$with_overwrite"
20872 cf_LIST_MODELS="$cf_list_models"
20873 cf_cv_abi_version="$cf_cv_abi_version"
20874 cf_cv_do_relink="$cf_cv_do_relink"
20875 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20876 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20877 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20878 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20879 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20880 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20881 cf_cv_rel_version="$cf_cv_rel_version"
20882 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20883 cf_cv_shared_soname='$cf_cv_shared_soname'
20884 cf_cv_shlib_version="$cf_cv_shlib_version"
20885 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20886 cf_cv_system_name="$cf_cv_system_name"
20887 cf_cv_term_driver="$with_term_driver"
20888 cf_with_ada="$cf_with_ada"
20889 cf_with_cxx_binding="$cf_with_cxx_binding"
20890 cf_with_manpages="$cf_with_manpages"
20891 cf_with_tests="$cf_with_tests"
20892 with_shared_cxx="$with_shared_cxx"
20893 host="$host"
20894 target="$target"
20895
20896 EOF
20897
20898 cat >>$CONFIG_STATUS <<\EOF
20899 for ac_config_target in $ac_config_targets
20900 do
20901   case "$ac_config_target" in
20902   # Handling of arguments.
20903   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20904   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20905   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20906   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20907   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20908   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20909   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20910   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20911   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20912   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20913   *) { { echo "$as_me:20913: error: invalid argument: $ac_config_target" >&5
20914 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20915    { (exit 1); exit 1; }; };;
20916   esac
20917 done
20918
20919 # If the user did not use the arguments to specify the items to instantiate,
20920 # then the envvar interface is used.  Set only those that are not.
20921 # We use the long form for the default assignment because of an extremely
20922 # bizarre bug on SunOS 4.1.3.
20923 if $ac_need_defaults; then
20924   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20925   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20926   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20927 fi
20928
20929 # Create a temporary directory, and hook for its removal unless debugging.
20930 $debug ||
20931 {
20932   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20933   trap '{ (exit 1); exit 1; }' 1 2 13 15
20934 }
20935
20936 # Create a (secure) tmp directory for tmp files.
20937 : ${TMPDIR=/tmp}
20938 {
20939   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20940   test -n "$tmp" && test -d "$tmp"
20941 }  ||
20942 {
20943   tmp=$TMPDIR/cs$$-$RANDOM
20944   (umask 077 && mkdir $tmp)
20945 } ||
20946 {
20947    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20948    { (exit 1); exit 1; }
20949 }
20950
20951 EOF
20952
20953 cat >>$CONFIG_STATUS <<EOF
20954
20955 #
20956 # CONFIG_FILES section.
20957 #
20958
20959 # No need to generate the scripts if there are no CONFIG_FILES.
20960 # This happens for instance when ./config.status config.h
20961 if test -n "\$CONFIG_FILES"; then
20962   # Protect against being on the right side of a sed subst in config.status.
20963   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20964    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20965 s,@SHELL@,$SHELL,;t t
20966 s,@exec_prefix@,$exec_prefix,;t t
20967 s,@prefix@,$prefix,;t t
20968 s,@program_transform_name@,$program_transform_name,;t t
20969 s,@bindir@,$bindir,;t t
20970 s,@sbindir@,$sbindir,;t t
20971 s,@libexecdir@,$libexecdir,;t t
20972 s,@datarootdir@,$datarootdir,;t t
20973 s,@datadir@,$datadir,;t t
20974 s,@sysconfdir@,$sysconfdir,;t t
20975 s,@sharedstatedir@,$sharedstatedir,;t t
20976 s,@localstatedir@,$localstatedir,;t t
20977 s,@libdir@,$libdir,;t t
20978 s,@includedir@,$includedir,;t t
20979 s,@oldincludedir@,$oldincludedir,;t t
20980 s,@infodir@,$infodir,;t t
20981 s,@mandir@,$mandir,;t t
20982 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20983 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20984 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20985 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20986 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20987 s,@build_alias@,$build_alias,;t t
20988 s,@host_alias@,$host_alias,;t t
20989 s,@target_alias@,$target_alias,;t t
20990 s,@ECHO_C@,$ECHO_C,;t t
20991 s,@ECHO_N@,$ECHO_N,;t t
20992 s,@ECHO_T@,$ECHO_T,;t t
20993 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20994 s,@DEFS@,$DEFS,;t t
20995 s,@LIBS@,$LIBS,;t t
20996 s,@top_builddir@,$top_builddir,;t t
20997 s,@EGREP@,$EGREP,;t t
20998 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20999 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21000 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21001 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21002 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21003 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21004 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21005 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21006 s,@build@,$build,;t t
21007 s,@build_cpu@,$build_cpu,;t t
21008 s,@build_vendor@,$build_vendor,;t t
21009 s,@build_os@,$build_os,;t t
21010 s,@host@,$host,;t t
21011 s,@host_cpu@,$host_cpu,;t t
21012 s,@host_vendor@,$host_vendor,;t t
21013 s,@host_os@,$host_os,;t t
21014 s,@target@,$target,;t t
21015 s,@target_cpu@,$target_cpu,;t t
21016 s,@target_vendor@,$target_vendor,;t t
21017 s,@target_os@,$target_os,;t t
21018 s,@CC@,$CC,;t t
21019 s,@CFLAGS@,$CFLAGS,;t t
21020 s,@LDFLAGS@,$LDFLAGS,;t t
21021 s,@CPPFLAGS@,$CPPFLAGS,;t t
21022 s,@ac_ct_CC@,$ac_ct_CC,;t t
21023 s,@EXEEXT@,$EXEEXT,;t t
21024 s,@OBJEXT@,$OBJEXT,;t t
21025 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21026 s,@CPP@,$CPP,;t t
21027 s,@LDCONFIG@,$LDCONFIG,;t t
21028 s,@CXX@,$CXX,;t t
21029 s,@CXXFLAGS@,$CXXFLAGS,;t t
21030 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21031 s,@AWK@,$AWK,;t t
21032 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21033 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21034 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21035 s,@LINT@,$LINT,;t t
21036 s,@LINT_OPTS@,$LINT_OPTS,;t t
21037 s,@LN_S@,$LN_S,;t t
21038 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21039 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21040 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21041 s,@SET_MAKE@,$SET_MAKE,;t t
21042 s,@CTAGS@,$CTAGS,;t t
21043 s,@ETAGS@,$ETAGS,;t t
21044 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21045 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21046 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21047 s,@RANLIB@,$RANLIB,;t t
21048 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21049 s,@LD@,$LD,;t t
21050 s,@ac_ct_LD@,$ac_ct_LD,;t t
21051 s,@AR@,$AR,;t t
21052 s,@ac_ct_AR@,$ac_ct_AR,;t t
21053 s,@ARFLAGS@,$ARFLAGS,;t t
21054 s,@DESTDIR@,$DESTDIR,;t t
21055 s,@BUILD_CC@,$BUILD_CC,;t t
21056 s,@BUILD_CPP@,$BUILD_CPP,;t t
21057 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21058 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21059 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21060 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21061 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21062 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21063 s,@cf_list_models@,$cf_list_models,;t t
21064 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21065 s,@LIBTOOL@,$LIBTOOL,;t t
21066 s,@LT_UNDEF@,$LT_UNDEF,;t t
21067 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21068 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21069 s,@LIB_CREATE@,$LIB_CREATE,;t t
21070 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21071 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21072 s,@LIB_PREP@,$LIB_PREP,;t t
21073 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21074 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21075 s,@LIB_LINK@,$LIB_LINK,;t t
21076 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21077 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21078 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21079 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21080 s,@TICS_NAME@,$TICS_NAME,;t t
21081 s,@TINFO_NAME@,$TINFO_NAME,;t t
21082 s,@LIB_NAME@,$LIB_NAME,;t t
21083 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21084 s,@CC_G_OPT@,$CC_G_OPT,;t t
21085 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21086 s,@LD_MODEL@,$LD_MODEL,;t t
21087 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21088 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21089 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21090 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21091 s,@LINK_PROGS@,$LINK_PROGS,;t t
21092 s,@LINK_TESTS@,$LINK_TESTS,;t t
21093 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21094 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21095 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21096 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21097 s,@RPATH_LIST@,$RPATH_LIST,;t t
21098 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21099 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21100 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21101 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21102 s,@XTERM_KBS@,$XTERM_KBS,;t t
21103 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21104 s,@TERMINFO@,$TERMINFO,;t t
21105 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21106 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21107 s,@TERMPATH@,$TERMPATH,;t t
21108 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21109 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21110 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21111 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21112 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21113 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21114 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21115 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21116 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21117 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21118 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21119 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21120 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21121 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21122 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21123 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21124 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21125 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21126 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21127 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21128 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21129 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21130 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21131 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21132 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21133 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21134 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21135 s,@PTHREAD@,$PTHREAD,;t t
21136 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21137 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21138 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21139 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21140 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21141 s,@ECHO_LT@,$ECHO_LT,;t t
21142 s,@ECHO_LD@,$ECHO_LD,;t t
21143 s,@RULE_CC@,$RULE_CC,;t t
21144 s,@SHOW_CC@,$SHOW_CC,;t t
21145 s,@ECHO_CC@,$ECHO_CC,;t t
21146 s,@ECHO_LINK@,$ECHO_LINK,;t t
21147 s,@ADAFLAGS@,$ADAFLAGS,;t t
21148 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21149 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21150 s,@ADA_TRACE@,$ADA_TRACE,;t t
21151 s,@MATH_LIB@,$MATH_LIB,;t t
21152 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21153 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21154 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21155 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21156 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21157 s,@TEST_LIBS@,$TEST_LIBS,;t t
21158 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21159 s,@CXXCPP@,$CXXCPP,;t t
21160 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21161 s,@CXX_AR@,$CXX_AR,;t t
21162 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21163 s,@CXXLIBS@,$CXXLIBS,;t t
21164 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21165 s,@gnat_exists@,$gnat_exists,;t t
21166 s,@M4_exists@,$M4_exists,;t t
21167 s,@cf_ada_make@,$cf_ada_make,;t t
21168 s,@cf_compile_generics@,$cf_compile_generics,;t t
21169 s,@cf_generic_objects@,$cf_generic_objects,;t t
21170 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21171 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21172 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21173 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21174 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21175 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21176 s,@cf_ada_package@,$cf_ada_package,;t t
21177 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21178 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21179 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21180 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21181 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21182 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21183 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21184 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21185 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21186 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21187 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21188 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21189 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21190 s,@TICS_LIBS@,$TICS_LIBS,;t t
21191 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21192 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21193 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21194 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21195 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21196 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21197 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21198 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21199 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21200 s,@TICS_LIST@,$TICS_LIST,;t t
21201 s,@TINFO_LIST@,$TINFO_LIST,;t t
21202 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21203 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21204 s,@TEST_ARGS@,$TEST_ARGS,;t t
21205 s,@TEST_DEPS@,$TEST_DEPS,;t t
21206 s,@TEST_ARG2@,$TEST_ARG2,;t t
21207 s,@TEST_DEP2@,$TEST_DEP2,;t t
21208 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21209 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21210 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21211 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21212 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21213 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21214 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21215 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21216 s,@cross_compiling@,$cross_compiling,;t t
21217 s,@TIC_PATH@,$TIC_PATH,;t t
21218 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21219 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21220 s,@PANEL_NAME@,$PANEL_NAME,;t t
21221 s,@MENU_NAME@,$MENU_NAME,;t t
21222 s,@FORM_NAME@,$FORM_NAME,;t t
21223 s,@CXX_NAME@,$CXX_NAME,;t t
21224 CEOF
21225
21226 EOF
21227
21228   cat >>$CONFIG_STATUS <<\EOF
21229   # Split the substitutions into bite-sized pieces for seds with
21230   # small command number limits, like on Digital OSF/1 and HP-UX.
21231   ac_max_sed_lines=48
21232   ac_sed_frag=1 # Number of current file.
21233   ac_beg=1 # First line for current file.
21234   ac_end=$ac_max_sed_lines # Line after last line for current file.
21235   ac_more_lines=:
21236   ac_sed_cmds=
21237   while $ac_more_lines; do
21238     if test $ac_beg -gt 1; then
21239       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21240     else
21241       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21242     fi
21243     if test ! -s $tmp/subs.frag; then
21244       ac_more_lines=false
21245     else
21246       # The purpose of the label and of the branching condition is to
21247       # speed up the sed processing (if there are no `@' at all, there
21248       # is no need to browse any of the substitutions).
21249       # These are the two extra sed commands mentioned above.
21250       (echo ':t
21251   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21252       if test -z "$ac_sed_cmds"; then
21253         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21254       else
21255         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21256       fi
21257       ac_sed_frag=`expr $ac_sed_frag + 1`
21258       ac_beg=$ac_end
21259       ac_end=`expr $ac_end + $ac_max_sed_lines`
21260     fi
21261   done
21262   if test -z "$ac_sed_cmds"; then
21263     ac_sed_cmds=cat
21264   fi
21265 fi # test -n "$CONFIG_FILES"
21266
21267 EOF
21268 cat >>$CONFIG_STATUS <<\EOF
21269 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21270   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21271   case $ac_file in
21272   - | *:- | *:-:* ) # input from stdin
21273         cat >$tmp/stdin
21274         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21275         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21276   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21277         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21278   * )   ac_file_in=$ac_file.in ;;
21279   esac
21280
21281   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21282   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21283          X"$ac_file" : 'X\(//\)[^/]' \| \
21284          X"$ac_file" : 'X\(//\)$' \| \
21285          X"$ac_file" : 'X\(/\)' \| \
21286          .     : '\(.\)' 2>/dev/null ||
21287 echo X"$ac_file" |
21288     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21289           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21290           /^X\(\/\/\)$/{ s//\1/; q; }
21291           /^X\(\/\).*/{ s//\1/; q; }
21292           s/.*/./; q'`
21293   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21294     { case "$ac_dir" in
21295   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21296   *)                      as_incr_dir=.;;
21297 esac
21298 as_dummy="$ac_dir"
21299 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21300   case $as_mkdir_dir in
21301     # Skip DOS drivespec
21302     ?:) as_incr_dir=$as_mkdir_dir ;;
21303     *)
21304       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21305       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21306     ;;
21307   esac
21308 done; }
21309
21310     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21311     # A "../" for each directory in $ac_dir_suffix.
21312     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21313   else
21314     ac_dir_suffix= ac_dots=
21315   fi
21316
21317   case $srcdir in
21318   .)  ac_srcdir=.
21319       if test -z "$ac_dots"; then
21320          ac_top_srcdir=.
21321       else
21322          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21323       fi ;;
21324   [\\/]* | ?:[\\/]* )
21325       ac_srcdir=$srcdir$ac_dir_suffix;
21326       ac_top_srcdir=$srcdir ;;
21327   *) # Relative path.
21328     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21329     ac_top_srcdir=$ac_dots$srcdir ;;
21330   esac
21331
21332   case $INSTALL in
21333   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21334   *) ac_INSTALL=$ac_dots$INSTALL ;;
21335   esac
21336
21337   if test x"$ac_file" != x-; then
21338     { echo "$as_me:21338: creating $ac_file" >&5
21339 echo "$as_me: creating $ac_file" >&6;}
21340     rm -f "$ac_file"
21341   fi
21342   # Let's still pretend it is `configure' which instantiates (i.e., don't
21343   # use $as_me), people would be surprised to read:
21344   #    /* config.h.  Generated automatically by config.status.  */
21345   configure_input="Generated automatically from `echo $ac_file_in |
21346                                                  sed 's,.*/,,'` by configure."
21347
21348   # First look for the input files in the build tree, otherwise in the
21349   # src tree.
21350   ac_file_inputs=`IFS=:
21351     for f in $ac_file_in; do
21352       case $f in
21353       -) echo $tmp/stdin ;;
21354       [\\/$]*)
21355          # Absolute (can't be DOS-style, as IFS=:)
21356          test -f "$f" || { { echo "$as_me:21356: error: cannot find input file: $f" >&5
21357 echo "$as_me: error: cannot find input file: $f" >&2;}
21358    { (exit 1); exit 1; }; }
21359          echo $f;;
21360       *) # Relative
21361          if test -f "$f"; then
21362            # Build tree
21363            echo $f
21364          elif test -f "$srcdir/$f"; then
21365            # Source tree
21366            echo $srcdir/$f
21367          else
21368            # /dev/null tree
21369            { { echo "$as_me:21369: error: cannot find input file: $f" >&5
21370 echo "$as_me: error: cannot find input file: $f" >&2;}
21371    { (exit 1); exit 1; }; }
21372          fi;;
21373       esac
21374     done` || { (exit 1); exit 1; }
21375 EOF
21376 cat >>$CONFIG_STATUS <<\EOF
21377   ac_warn_datarootdir=no
21378   if test x"$ac_file" != x-; then
21379     for ac_item in $ac_file_inputs
21380     do
21381       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21382       if test -n "$ac_seen"; then
21383         ac_used=`grep '@datarootdir@' $ac_item`
21384         if test -z "$ac_used"; then
21385           { echo "$as_me:21385: WARNING: datarootdir was used implicitly but not set:
21386 $ac_seen" >&5
21387 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21388 $ac_seen" >&2;}
21389           ac_warn_datarootdir=yes
21390         fi
21391       fi
21392       ac_seen=`grep '${datarootdir}' $ac_item`
21393       if test -n "$ac_seen"; then
21394         { echo "$as_me:21394: WARNING: datarootdir was used explicitly but not set:
21395 $ac_seen" >&5
21396 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21397 $ac_seen" >&2;}
21398         ac_warn_datarootdir=yes
21399       fi
21400     done
21401   fi
21402
21403 if test "x$ac_warn_datarootdir" = xyes; then
21404   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21405 fi
21406
21407 EOF
21408 cat >>$CONFIG_STATUS <<EOF
21409   sed "$ac_vpsub
21410 $extrasub
21411 EOF
21412 cat >>$CONFIG_STATUS <<\EOF
21413 :t
21414 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21415 s,@configure_input@,$configure_input,;t t
21416 s,@srcdir@,$ac_srcdir,;t t
21417 s,@top_srcdir@,$ac_top_srcdir,;t t
21418 s,@INSTALL@,$ac_INSTALL,;t t
21419 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21420   rm -f $tmp/stdin
21421   if test x"$ac_file" != x-; then
21422     cp $tmp/out $ac_file
21423
21424     for ac_name in prefix exec_prefix datarootdir
21425     do
21426         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21427         if test -n "$ac_seen"; then
21428             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21429             if test -z "$ac_init"; then
21430               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21431               { echo "$as_me:21431: WARNING: Variable $ac_name is used but was not set:
21432 $ac_seen" >&5
21433 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21434 $ac_seen" >&2;}
21435             fi
21436         fi
21437     done
21438     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21439     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21440     if test -s $tmp/out; then
21441       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21442       { echo "$as_me:21442: WARNING: Some variables may not be substituted:
21443 $ac_seen" >&5
21444 echo "$as_me: WARNING: Some variables may not be substituted:
21445 $ac_seen" >&2;}
21446     fi
21447   else
21448     cat $tmp/out
21449   fi
21450   rm -f $tmp/out
21451
21452 done
21453 EOF
21454 cat >>$CONFIG_STATUS <<\EOF
21455
21456 #
21457 # CONFIG_HEADER section.
21458 #
21459
21460 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21461 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21462 #
21463 # ac_d sets the value in "#define NAME VALUE" lines.
21464 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21465 ac_dB='[        ].*$,\1#\2'
21466 ac_dC=' '
21467 ac_dD=',;t'
21468 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21469 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21470 ac_iB='\([      ]\),\1#\2define\3'
21471 ac_iC=' '
21472 ac_iD='\4,;t'
21473 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21474 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21475 ac_uB='$,\1#\2define\3'
21476 ac_uC=' '
21477 ac_uD=',;t'
21478
21479 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21480   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21481   case $ac_file in
21482   - | *:- | *:-:* ) # input from stdin
21483         cat >$tmp/stdin
21484         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21485         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21486   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21487         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21488   * )   ac_file_in=$ac_file.in ;;
21489   esac
21490
21491   test x"$ac_file" != x- && { echo "$as_me:21491: creating $ac_file" >&5
21492 echo "$as_me: creating $ac_file" >&6;}
21493
21494   # First look for the input files in the build tree, otherwise in the
21495   # src tree.
21496   ac_file_inputs=`IFS=:
21497     for f in $ac_file_in; do
21498       case $f in
21499       -) echo $tmp/stdin ;;
21500       [\\/$]*)
21501          # Absolute (can't be DOS-style, as IFS=:)
21502          test -f "$f" || { { echo "$as_me:21502: error: cannot find input file: $f" >&5
21503 echo "$as_me: error: cannot find input file: $f" >&2;}
21504    { (exit 1); exit 1; }; }
21505          echo $f;;
21506       *) # Relative
21507          if test -f "$f"; then
21508            # Build tree
21509            echo $f
21510          elif test -f "$srcdir/$f"; then
21511            # Source tree
21512            echo $srcdir/$f
21513          else
21514            # /dev/null tree
21515            { { echo "$as_me:21515: error: cannot find input file: $f" >&5
21516 echo "$as_me: error: cannot find input file: $f" >&2;}
21517    { (exit 1); exit 1; }; }
21518          fi;;
21519       esac
21520     done` || { (exit 1); exit 1; }
21521   # Remove the trailing spaces.
21522   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21523
21524 EOF
21525
21526 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21527 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21528 # be either 'cat' or 'sort'.
21529 cat confdefs.h | uniq >conftest.vals
21530
21531 # Break up conftest.vals because some shells have a limit on
21532 # the size of here documents, and old seds have small limits too.
21533
21534 rm -f conftest.tail
21535 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21536 while grep . conftest.vals >/dev/null
21537 do
21538   # Write chunks of a limited-size here document to conftest.frag.
21539   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21540   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21541   echo 'CEOF' >> $CONFIG_STATUS
21542   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21543   rm -f conftest.vals
21544   mv conftest.tail conftest.vals
21545 done
21546 rm -f conftest.vals
21547
21548 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21549 # marker @DEFS@.
21550 echo '  cat >> conftest.edit <<CEOF
21551 /@DEFS@/r conftest.frag
21552 /@DEFS@/d
21553 CEOF
21554 sed -f conftest.edit $tmp/in > $tmp/out
21555 rm -f $tmp/in
21556 mv $tmp/out $tmp/in
21557 rm -f conftest.edit conftest.frag
21558 ' >> $CONFIG_STATUS
21559
21560 cat >>$CONFIG_STATUS <<\EOF
21561   # Let's still pretend it is `configure' which instantiates (i.e., don't
21562   # use $as_me), people would be surprised to read:
21563   #    /* config.h.  Generated automatically by config.status.  */
21564   if test x"$ac_file" = x-; then
21565     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21566   else
21567     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21568   fi
21569   cat $tmp/in >>$tmp/config.h
21570   rm -f $tmp/in
21571   if test x"$ac_file" != x-; then
21572     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21573       { echo "$as_me:21573: $ac_file is unchanged" >&5
21574 echo "$as_me: $ac_file is unchanged" >&6;}
21575     else
21576       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21577          X"$ac_file" : 'X\(//\)[^/]' \| \
21578          X"$ac_file" : 'X\(//\)$' \| \
21579          X"$ac_file" : 'X\(/\)' \| \
21580          .     : '\(.\)' 2>/dev/null ||
21581 echo X"$ac_file" |
21582     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21583           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21584           /^X\(\/\/\)$/{ s//\1/; q; }
21585           /^X\(\/\).*/{ s//\1/; q; }
21586           s/.*/./; q'`
21587       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21588         { case "$ac_dir" in
21589   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21590   *)                      as_incr_dir=.;;
21591 esac
21592 as_dummy="$ac_dir"
21593 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21594   case $as_mkdir_dir in
21595     # Skip DOS drivespec
21596     ?:) as_incr_dir=$as_mkdir_dir ;;
21597     *)
21598       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21599       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21600     ;;
21601   esac
21602 done; }
21603
21604       fi
21605       rm -f $ac_file
21606       mv $tmp/config.h $ac_file
21607     fi
21608   else
21609     cat $tmp/config.h
21610     rm -f $tmp/config.h
21611   fi
21612 done
21613 EOF
21614 cat >>$CONFIG_STATUS <<\EOF
21615 #
21616 # CONFIG_COMMANDS section.
21617 #
21618 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21619   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21620   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21621
21622   case $ac_dest in
21623     default )
21624 if test "x$cf_with_tests" != xno ; then
21625
21626 for cf_dir in test
21627 do
21628         if test ! -d $srcdir/$cf_dir; then
21629                 continue
21630         elif test -f $srcdir/$cf_dir/programs; then
21631                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21632         fi
21633 done
21634
21635 fi
21636
21637 cf_prefix=$LIB_PREFIX
21638
21639 case $cf_cv_shlib_version in #(vi
21640 cygdll|mingw)
21641         TINFO_NAME=$TINFO_ARG_SUFFIX
21642         TINFO_SUFFIX=.dll
21643         ;;
21644 esac
21645
21646 if test -n "$TINFO_SUFFIX" ; then
21647         case $TINFO_SUFFIX in
21648         tw*)
21649                 TINFO_NAME="${TINFO_NAME}tw"
21650                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21651                 ;;
21652         t*)
21653                 TINFO_NAME="${TINFO_NAME}t"
21654                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21655                 ;;
21656         w*)
21657                 TINFO_NAME="${TINFO_NAME}w"
21658                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21659                 ;;
21660         esac
21661 fi
21662
21663 for cf_dir in $SRC_SUBDIRS
21664 do
21665         if test ! -d $srcdir/$cf_dir ; then
21666                 continue
21667         elif test -f $srcdir/$cf_dir/modules; then
21668
21669                 SHARED_LIB=
21670                 Libs_To_Make=
21671                 for cf_item in $cf_LIST_MODELS
21672                 do
21673
21674         case $cf_item in #(vi
21675         libtool) #(vi
21676                 cf_suffix='.la'
21677                 cf_depsuf=$cf_suffix
21678                 ;;
21679         normal) #(vi
21680                 cf_suffix='.a'
21681                 cf_depsuf=$cf_suffix
21682                 ;;
21683         debug) #(vi
21684                 cf_suffix='_g.a'
21685                 cf_depsuf=$cf_suffix
21686                 ;;
21687         profile) #(vi
21688                 cf_suffix='_p.a'
21689                 cf_depsuf=$cf_suffix
21690                 ;;
21691         shared) #(vi
21692                 case $cf_cv_system_name in
21693                 aix[5-7]*) #(vi
21694                         cf_suffix='.a'
21695                         cf_depsuf=$cf_suffix
21696                         ;;
21697                 cygwin*|mingw*) #(vi
21698                         cf_suffix='.dll'
21699                         cf_depsuf='.dll.a'
21700                         ;;
21701                 darwin*) #(vi
21702                         cf_suffix='.dylib'
21703                         cf_depsuf=$cf_suffix
21704                         ;;
21705                 hpux*) #(vi
21706                         case $target in
21707                         ia64*) #(vi
21708                                 cf_suffix='.so'
21709                                 cf_depsuf=$cf_suffix
21710                                 ;;
21711                         *) #(vi
21712                                 cf_suffix='.sl'
21713                                 cf_depsuf=$cf_suffix
21714                                 ;;
21715                         esac
21716                         ;;
21717                 *)      cf_suffix='.so'
21718                         cf_depsuf=$cf_suffix
21719                         ;;
21720                 esac
21721         esac
21722         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21723         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21724
21725                         cf_libname=$cf_dir
21726                         test "$cf_dir" = c++ && cf_libname=ncurses++
21727                         if test $cf_item = shared ; then
21728                                 if test -n "${LIB_SUFFIX}"
21729                                 then
21730                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
21731                                 else
21732                                         cf_shared_suffix="$cf_suffix"
21733                                 fi
21734                                 if test "$cf_cv_do_symlinks" = yes ; then
21735                                         cf_version_name=
21736
21737                                         case "$cf_cv_shlib_version" in #(vi
21738                                         rel) #(vi
21739                                                 cf_version_name=REL_VERSION
21740                                                 ;;
21741                                         abi)
21742                                                 cf_version_name=ABI_VERSION
21743                                                 ;;
21744                                         esac
21745
21746                                         if test -n "$cf_version_name"
21747                                         then
21748                                                 case "$cf_cv_system_name" in #(vi
21749                                                 darwin*)
21750                                                         # "w", etc?
21751                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
21752                                                         ;; #(vi
21753                                                 *)
21754                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
21755                                                         ;;
21756                                                 esac
21757                                         fi
21758                                         if test -n "${LIB_SUFFIX}"
21759                                         then
21760                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
21761                                         else
21762                                                 cf_shared_suffix="$cf_suffix"
21763                                         fi
21764                                 fi
21765                                 # cygwin needs import library, and has unique naming convention
21766                                 # use autodetected ${cf_prefix} for import lib and static lib, but
21767                                 # use 'cyg' prefix for shared lib.
21768                                 case $cf_cv_shlib_version in #(vi
21769                                 cygdll) #(vi
21770                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21771                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
21772                                         continue
21773                                         ;;
21774                                 mingw)
21775                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21776                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
21777                                         continue
21778                                         ;;
21779                                 esac
21780                         fi
21781                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
21782                 done
21783
21784                 if test $cf_dir = ncurses ; then
21785                         cf_subsets="$LIB_SUBSETS"
21786                         cf_r_parts="$cf_subsets"
21787                         cf_liblist="$Libs_To_Make"
21788
21789                         while test -n "$cf_r_parts"
21790                         do
21791                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21792                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21793                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21794                                         cf_item=
21795                                         case $cf_l_parts in #(vi
21796                                         *termlib*) #(vi
21797                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21798                                                 ;;
21799                                         *ticlib*)
21800                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21801                                                 ;;
21802                                         *)
21803                                                 break
21804                                                 ;;
21805                                         esac
21806                                         if test -n "$cf_item"; then
21807                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21808                                         fi
21809                                 else
21810                                         break
21811                                 fi
21812                         done
21813                 else
21814                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21815                 fi
21816
21817                 if test $cf_dir = c++; then
21818                         if test "x$with_shared_cxx" != xyes; then
21819                                 cf_list=
21820                                 for cf_item in $Libs_To_Make
21821                                 do
21822                                         case $cf_item in
21823                                         *.a)
21824                                                 ;;
21825                                         *)
21826                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
21827                                                 ;;
21828                                         esac
21829                                         for cf_test in $cf_list
21830                                         do
21831                                                 if test "$cf_test" = "$cf_item"
21832                                                 then
21833                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
21834                                                         cf_item=
21835                                                         break
21836                                                 fi
21837                                         done
21838                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
21839                                 done
21840                                 Libs_To_Make="$cf_list"
21841                         fi
21842                 fi
21843
21844                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21845                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21846                         $cf_dir/Makefile >$cf_dir/Makefile.out
21847                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21848
21849                 $AWK -f $srcdir/mk-0th.awk \
21850                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21851                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21852
21853                 for cf_subset in $cf_subsets
21854                 do
21855                         cf_subdirs=
21856                         for cf_item in $cf_LIST_MODELS
21857                         do
21858
21859                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21860
21861 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21862
21863                         CXX_MODEL=$cf_ITEM
21864                         if test "$CXX_MODEL" = SHARED; then
21865                                 case $cf_cv_shlib_version in #(vi
21866                                 cygdll|mingw) #(vi
21867                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
21868
21869 echo "${as_me:-configure}:21869: testing overriding CXX_MODEL to SHARED ..." 1>&5
21870
21871                                         with_shared_cxx=yes
21872                                         ;;
21873                                 *)
21874                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
21875                                         ;;
21876                                 esac
21877                         fi
21878
21879         case $cf_item in #(vi
21880         libtool) #(vi
21881                 cf_suffix='.la'
21882                 cf_depsuf=$cf_suffix
21883                 ;;
21884         normal) #(vi
21885                 cf_suffix='.a'
21886                 cf_depsuf=$cf_suffix
21887                 ;;
21888         debug) #(vi
21889                 cf_suffix='_g.a'
21890                 cf_depsuf=$cf_suffix
21891                 ;;
21892         profile) #(vi
21893                 cf_suffix='_p.a'
21894                 cf_depsuf=$cf_suffix
21895                 ;;
21896         shared) #(vi
21897                 case $cf_cv_system_name in
21898                 aix[5-7]*) #(vi
21899                         cf_suffix='.a'
21900                         cf_depsuf=$cf_suffix
21901                         ;;
21902                 cygwin*|mingw*) #(vi
21903                         cf_suffix='.dll'
21904                         cf_depsuf='.dll.a'
21905                         ;;
21906                 darwin*) #(vi
21907                         cf_suffix='.dylib'
21908                         cf_depsuf=$cf_suffix
21909                         ;;
21910                 hpux*) #(vi
21911                         case $target in
21912                         ia64*) #(vi
21913                                 cf_suffix='.so'
21914                                 cf_depsuf=$cf_suffix
21915                                 ;;
21916                         *) #(vi
21917                                 cf_suffix='.sl'
21918                                 cf_depsuf=$cf_suffix
21919                                 ;;
21920                         esac
21921                         ;;
21922                 *)      cf_suffix='.so'
21923                         cf_depsuf=$cf_suffix
21924                         ;;
21925                 esac
21926         esac
21927         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21928         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21929
21930         case $cf_item in
21931         libtool) cf_subdir='obj_lo'  ;;
21932         normal)  cf_subdir='objects' ;;
21933         debug)   cf_subdir='obj_g' ;;
21934         profile) cf_subdir='obj_p' ;;
21935         shared)
21936                 case $cf_cv_system_name in #(vi
21937                 cygwin) #(vi
21938                         cf_subdir='objects' ;;
21939                 *)
21940                         cf_subdir='obj_s' ;;
21941                 esac
21942         esac
21943
21944                         # Test for case where we build libtinfo with a different name.
21945                         cf_libname=$cf_dir
21946                         if test $cf_dir = ncurses ; then
21947                                 case $cf_subset in
21948                                 *base*)
21949                                         cf_libname=${cf_libname}$LIB_SUFFIX
21950                                         ;;
21951                                 *termlib*)
21952                                         cf_libname=$TINFO_LIB_SUFFIX
21953                                         ;;
21954                                 ticlib*)
21955                                         cf_libname=$TICS_LIB_SUFFIX
21956                                         ;;
21957                                 esac
21958                         elif test $cf_dir = c++ ; then
21959                                 cf_libname=ncurses++$LIB_SUFFIX
21960                         else
21961                                 cf_libname=${cf_libname}$LIB_SUFFIX
21962                         fi
21963                         if test -n "${DFT_ARG_SUFFIX}" ; then
21964                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21965                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21966                         fi
21967
21968                         # These dependencies really are for development, not
21969                         # builds, but they are useful in porting, too.
21970                         cf_depend="../include/ncurses_cfg.h"
21971                         if test "$srcdir" = "."; then
21972                                 cf_reldir="."
21973                         else
21974                                 cf_reldir="\${srcdir}"
21975                         fi
21976
21977                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21978                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21979                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21980                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21981                         fi
21982
21983                         cf_dir_suffix=
21984                         old_cf_suffix="$cf_suffix"
21985                         if test "$cf_cv_shlib_version_infix" = yes ; then
21986                         if test -n "$LIB_SUFFIX" ; then
21987                                 case $LIB_SUFFIX in
21988                                 tw*)
21989                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21990                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21991                                         cf_dir_suffix=tw
21992                                         ;;
21993                                 t*)
21994                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21995                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21996                                         cf_dir_suffix=t
21997                                         ;;
21998                                 w*)
21999                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22000                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22001                                         cf_dir_suffix=w
22002                                         ;;
22003                                 esac
22004                         fi
22005                         fi
22006
22007                         $AWK -f $srcdir/mk-1st.awk \
22008                                 name=${cf_libname}${cf_dir_suffix} \
22009                                 traces=$LIB_TRACING \
22010                                 MODEL=$cf_ITEM \
22011                                 CXX_MODEL=$CXX_MODEL \
22012                                 model=$cf_subdir \
22013                                 prefix=$cf_prefix \
22014                                 suffix=$cf_suffix \
22015                                 subset=$cf_subset \
22016                                 driver=$cf_cv_term_driver \
22017                                 SymLink="$LN_S" \
22018                                 TermlibRoot=$TINFO_NAME \
22019                                 TermlibSuffix=$TINFO_SUFFIX \
22020                                 ShlibVer=$cf_cv_shlib_version \
22021                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22022                                 ReLink=${cf_cv_do_relink:-no} \
22023                                 DoLinks=$cf_cv_do_symlinks \
22024                                 rmSoLocs=$cf_cv_rm_so_locs \
22025                                 ldconfig="$LDCONFIG" \
22026                                 overwrite=$WITH_OVERWRITE \
22027                                 depend="$cf_depend" \
22028                                 host="$host" \
22029                                 libtool_version="$LIBTOOL_VERSION" \
22030                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22031
22032                         cf_suffix="$old_cf_suffix"
22033
22034                         for cf_subdir2 in $cf_subdirs lib
22035                         do
22036                                 test $cf_subdir = $cf_subdir2 && break
22037                         done
22038                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22039                         $AWK -f $srcdir/mk-2nd.awk \
22040                                 name=$cf_dir \
22041                                 traces=$LIB_TRACING \
22042                                 MODEL=$cf_ITEM \
22043                                 model=$cf_subdir \
22044                                 subset=$cf_subset \
22045                                 srcdir=$srcdir \
22046                                 echo=$WITH_ECHO \
22047                                 crenames=$cf_cv_prog_CC_c_o \
22048                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22049                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22050                         cf_subdirs="$cf_subdirs $cf_subdir"
22051                         done
22052                 done
22053         fi
22054
22055         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22056 done
22057
22058 for cf_dir in $SRC_SUBDIRS
22059 do
22060         if test ! -d $srcdir/$cf_dir ; then
22061                 continue
22062         fi
22063
22064         if test -f $cf_dir/Makefile ; then
22065                 case "$cf_dir" in
22066                 Ada95) #(vi
22067                         echo 'libs \' >> Makefile
22068                         echo 'install.libs \' >> Makefile
22069                         echo 'uninstall.libs ::' >> Makefile
22070                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22071                         ;;
22072                 esac
22073         fi
22074
22075         if test -f $srcdir/$cf_dir/modules; then
22076                 echo >> Makefile
22077                 if test -f $srcdir/$cf_dir/headers; then
22078 cat >> Makefile <<CF_EOF
22079 install.includes \\
22080 uninstall.includes \\
22081 CF_EOF
22082                 fi
22083 if test "$cf_dir" != "c++" ; then
22084 echo 'lint \' >> Makefile
22085 fi
22086 cat >> Makefile <<CF_EOF
22087 libs \\
22088 lintlib \\
22089 install.libs \\
22090 uninstall.libs \\
22091 install.$cf_dir \\
22092 uninstall.$cf_dir ::
22093         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22094 CF_EOF
22095         elif test -f $srcdir/$cf_dir/headers; then
22096 cat >> Makefile <<CF_EOF
22097
22098 libs \\
22099 install.libs \\
22100 uninstall.libs \\
22101 install.includes \\
22102 uninstall.includes ::
22103         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22104 CF_EOF
22105 fi
22106 done
22107
22108 cat >> Makefile <<CF_EOF
22109
22110 install.libs uninstall.libs \\
22111 install.data uninstall.data ::
22112 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22113 CF_EOF
22114
22115 if test "x$cf_with_manpages" = xyes; then
22116 cat >> Makefile <<CF_EOF
22117
22118 install.man \\
22119 uninstall.man ::
22120         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22121 CF_EOF
22122 fi
22123
22124 cat >> Makefile <<CF_EOF
22125
22126 distclean ::
22127         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22128         rm -f headers.sh headers.sed mk_shared_lib.sh
22129         rm -f edit_man.* man_alias.*
22130         rm -rf \${DIRS_TO_MAKE}
22131 CF_EOF
22132
22133 # Special case: tack's manpage lives in its own directory.
22134 if test "x$cf_with_manpages" = xyes; then
22135 if test -d tack ; then
22136 if test -f $srcdir/$tack.h; then
22137 cat >> Makefile <<CF_EOF
22138
22139 install.man \\
22140 uninstall.man ::
22141         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22142 CF_EOF
22143 fi
22144 fi
22145 fi
22146
22147 rm -f headers.sed headers.sh
22148
22149 echo creating headers.sh
22150 cat >headers.sh <<CF_EOF
22151 #! /bin/sh
22152 # This shell script is generated by the 'configure' script.  It is invoked in a
22153 # subdirectory of the build tree.  It generates a sed-script in the parent
22154 # directory that is used to adjust includes for header files that reside in a
22155 # subdirectory of /usr/include, etc.
22156 PRG=""
22157 while test \$# != 3
22158 do
22159 PRG="\$PRG \$1"; shift
22160 done
22161 DST=\$1
22162 REF=\$2
22163 SRC=\$3
22164 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22165 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22166 echo installing \$SRC in \$DST
22167 CF_EOF
22168
22169 if test $WITH_CURSES_H = yes; then
22170         cat >>headers.sh <<CF_EOF
22171 case \$DST in
22172 /*/include/*)
22173         END=\`basename \$DST\`
22174         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22175         do
22176                 NAME=\`basename \$i\`
22177                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22178         done
22179         ;;
22180 *)
22181         echo "" >> \$TMPSED
22182         ;;
22183 esac
22184 CF_EOF
22185
22186 else
22187         cat >>headers.sh <<CF_EOF
22188 case \$DST in
22189 /*/include/*)
22190         END=\`basename \$DST\`
22191         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22192         do
22193                 NAME=\`basename \$i\`
22194                 if test "\$NAME" = "curses.h"
22195                 then
22196                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22197                         NAME=ncurses.h
22198                 fi
22199                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22200         done
22201         ;;
22202 *)
22203         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22204         ;;
22205 esac
22206 CF_EOF
22207 fi
22208 cat >>headers.sh <<CF_EOF
22209 rm -f \$TMPSRC
22210 sed -f \$TMPSED \$SRC > \$TMPSRC
22211 NAME=\`basename \$SRC\`
22212 CF_EOF
22213 if test $WITH_CURSES_H != yes; then
22214         cat >>headers.sh <<CF_EOF
22215 test "\$NAME" = "curses.h" && NAME=ncurses.h
22216 CF_EOF
22217 fi
22218 cat >>headers.sh <<CF_EOF
22219 # Just in case someone gzip'd manpages, remove the conflicting copy.
22220 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22221
22222 eval \$PRG \$TMPSRC \$DST/\$NAME
22223 rm -f \$TMPSRC \$TMPSED
22224 CF_EOF
22225
22226 chmod 0755 headers.sh
22227
22228 for cf_dir in $SRC_SUBDIRS
22229 do
22230         if test ! -d $srcdir/$cf_dir ; then
22231                 continue
22232         fi
22233
22234         if test -f $srcdir/$cf_dir/headers; then
22235                 $AWK -f $srcdir/mk-hdr.awk \
22236                         subset="$LIB_SUBSETS" \
22237                         compat="$WITH_CURSES_H" \
22238                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22239         fi
22240
22241         if test -f $srcdir/$cf_dir/modules; then
22242                 if test "$cf_dir" != "c++" ; then
22243                         cat >>$cf_dir/Makefile <<"CF_EOF"
22244 depend : ${AUTO_SRC}
22245         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22246
22247 # DO NOT DELETE THIS LINE -- make depend depends on it.
22248 CF_EOF
22249                 fi
22250         fi
22251 done
22252
22253 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22254 if test -z "$USE_OLD_MAKERULES" ; then
22255         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22256 fi
22257 fi
22258  ;;
22259   esac
22260 done
22261 EOF
22262
22263 cat >>$CONFIG_STATUS <<\EOF
22264
22265 { (exit 0); exit 0; }
22266 EOF
22267 chmod +x $CONFIG_STATUS
22268 ac_clean_files=$ac_clean_files_save
22269
22270 # configure is writing to config.log, and then calls config.status.
22271 # config.status does its own redirection, appending to config.log.
22272 # Unfortunately, on DOS this fails, as config.log is still kept open
22273 # by configure, so config.status won't be able to write to it; its
22274 # output is simply discarded.  So we exec the FD to /dev/null,
22275 # effectively closing config.log, so it can be properly (re)opened and
22276 # appended to by config.status.  When coming back to configure, we
22277 # need to make the FD available again.
22278 if test "$no_create" != yes; then
22279   ac_cs_success=:
22280   exec 5>/dev/null
22281   $SHELL $CONFIG_STATUS || ac_cs_success=false
22282   exec 5>>config.log
22283   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22284   # would make configure fail if this is the last instruction.
22285   $ac_cs_success || { (exit 1); exit 1; }
22286 fi
22287 ${MAKE:-make} preinstall