]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
928b248b28e9fa88196c5ecdb2cca1ef24464a9c
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.567 .
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|mingw*)
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                 if test -n "$ac_tool_prefix"; then
4334   for ac_prog in libtool glibtool
4335   do
4336     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4337 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4338 echo "$as_me:4338: checking for $ac_word" >&5
4339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4340 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343   if test -n "$LIBTOOL"; then
4344   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4345 else
4346   ac_save_IFS=$IFS; IFS=$ac_path_separator
4347 ac_dummy="$PATH"
4348 for ac_dir in $ac_dummy; do
4349   IFS=$ac_save_IFS
4350   test -z "$ac_dir" && ac_dir=.
4351   $as_executable_p "$ac_dir/$ac_word" || continue
4352 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4353 echo "$as_me:4353: found $ac_dir/$ac_word" >&5
4354 break
4355 done
4356
4357 fi
4358 fi
4359 LIBTOOL=$ac_cv_prog_LIBTOOL
4360 if test -n "$LIBTOOL"; then
4361   echo "$as_me:4361: result: $LIBTOOL" >&5
4362 echo "${ECHO_T}$LIBTOOL" >&6
4363 else
4364   echo "$as_me:4364: result: no" >&5
4365 echo "${ECHO_T}no" >&6
4366 fi
4367
4368     test -n "$LIBTOOL" && break
4369   done
4370 fi
4371 if test -z "$LIBTOOL"; then
4372   ac_ct_LIBTOOL=$LIBTOOL
4373   for ac_prog in libtool glibtool
4374 do
4375   # Extract the first word of "$ac_prog", so it can be a program name with args.
4376 set dummy $ac_prog; ac_word=$2
4377 echo "$as_me:4377: checking for $ac_word" >&5
4378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4379 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4380   echo $ECHO_N "(cached) $ECHO_C" >&6
4381 else
4382   if test -n "$ac_ct_LIBTOOL"; then
4383   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4384 else
4385   ac_save_IFS=$IFS; IFS=$ac_path_separator
4386 ac_dummy="$PATH"
4387 for ac_dir in $ac_dummy; do
4388   IFS=$ac_save_IFS
4389   test -z "$ac_dir" && ac_dir=.
4390   $as_executable_p "$ac_dir/$ac_word" || continue
4391 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4392 echo "$as_me:4392: found $ac_dir/$ac_word" >&5
4393 break
4394 done
4395
4396 fi
4397 fi
4398 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4399 if test -n "$ac_ct_LIBTOOL"; then
4400   echo "$as_me:4400: result: $ac_ct_LIBTOOL" >&5
4401 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4402 else
4403   echo "$as_me:4403: result: no" >&5
4404 echo "${ECHO_T}no" >&6
4405 fi
4406
4407   test -n "$ac_ct_LIBTOOL" && break
4408 done
4409 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4410
4411   LIBTOOL=$ac_ct_LIBTOOL
4412 fi
4413
4414 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4415 then
4416         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.].*//'`
4417 else
4418         cf_cv_libtool_version=
4419 fi
4420 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4421
4422                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4423                 then
4424
4425 unset ac_cv_prog_ac_ct_LIBTOOL
4426 unset ac_ct_LIBTOOL
4427 unset LIBTOOL
4428
4429                         if test -n "$ac_tool_prefix"; then
4430   for ac_prog in glibtool
4431   do
4432     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4433 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4434 echo "$as_me:4434: checking for $ac_word" >&5
4435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4436 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   if test -n "$LIBTOOL"; then
4440   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4441 else
4442   ac_save_IFS=$IFS; IFS=$ac_path_separator
4443 ac_dummy="$PATH"
4444 for ac_dir in $ac_dummy; do
4445   IFS=$ac_save_IFS
4446   test -z "$ac_dir" && ac_dir=.
4447   $as_executable_p "$ac_dir/$ac_word" || continue
4448 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4449 echo "$as_me:4449: found $ac_dir/$ac_word" >&5
4450 break
4451 done
4452
4453 fi
4454 fi
4455 LIBTOOL=$ac_cv_prog_LIBTOOL
4456 if test -n "$LIBTOOL"; then
4457   echo "$as_me:4457: result: $LIBTOOL" >&5
4458 echo "${ECHO_T}$LIBTOOL" >&6
4459 else
4460   echo "$as_me:4460: result: no" >&5
4461 echo "${ECHO_T}no" >&6
4462 fi
4463
4464     test -n "$LIBTOOL" && break
4465   done
4466 fi
4467 if test -z "$LIBTOOL"; then
4468   ac_ct_LIBTOOL=$LIBTOOL
4469   for ac_prog in glibtool
4470 do
4471   # Extract the first word of "$ac_prog", so it can be a program name with args.
4472 set dummy $ac_prog; ac_word=$2
4473 echo "$as_me:4473: checking for $ac_word" >&5
4474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4475 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4476   echo $ECHO_N "(cached) $ECHO_C" >&6
4477 else
4478   if test -n "$ac_ct_LIBTOOL"; then
4479   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4480 else
4481   ac_save_IFS=$IFS; IFS=$ac_path_separator
4482 ac_dummy="$PATH"
4483 for ac_dir in $ac_dummy; do
4484   IFS=$ac_save_IFS
4485   test -z "$ac_dir" && ac_dir=.
4486   $as_executable_p "$ac_dir/$ac_word" || continue
4487 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4488 echo "$as_me:4488: found $ac_dir/$ac_word" >&5
4489 break
4490 done
4491
4492 fi
4493 fi
4494 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4495 if test -n "$ac_ct_LIBTOOL"; then
4496   echo "$as_me:4496: result: $ac_ct_LIBTOOL" >&5
4497 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4498 else
4499   echo "$as_me:4499: result: no" >&5
4500 echo "${ECHO_T}no" >&6
4501 fi
4502
4503   test -n "$ac_ct_LIBTOOL" && break
4504 done
4505 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4506
4507   LIBTOOL=$ac_ct_LIBTOOL
4508 fi
4509
4510 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4511 then
4512         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.].*//'`
4513 else
4514         cf_cv_libtool_version=
4515 fi
4516 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4517
4518                 fi
4519         fi
4520         if test -z "$LIBTOOL" ; then
4521                 { { echo "$as_me:4521: error: Cannot find libtool" >&5
4522 echo "$as_me: error: Cannot find libtool" >&2;}
4523    { (exit 1); exit 1; }; }
4524         fi
4525         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4526         LIB_OBJECT='${OBJECTS:.o=.lo}'
4527         LIB_SUFFIX=.la
4528         LIB_CLEAN='${LIBTOOL} --mode=clean'
4529         LIB_COMPILE='${LIBTOOL} --mode=compile'
4530         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4531         LIB_INSTALL='${LIBTOOL} --mode=install'
4532         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4533         LIB_PREP=:
4534
4535 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4536 then
4537         echo "$as_me:4537: checking version of $LIBTOOL" >&5
4538 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4539
4540 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4541 then
4542         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.].*//'`
4543 else
4544         cf_cv_libtool_version=
4545 fi
4546 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4547
4548         echo "$as_me:4548: result: $cf_cv_libtool_version" >&5
4549 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4550         if test -z "$cf_cv_libtool_version" ; then
4551                 { { echo "$as_me:4551: error: This is not GNU libtool" >&5
4552 echo "$as_me: error: This is not GNU libtool" >&2;}
4553    { (exit 1); exit 1; }; }
4554         fi
4555 else
4556         { { echo "$as_me:4556: error: GNU libtool has not been found" >&5
4557 echo "$as_me: error: GNU libtool has not been found" >&2;}
4558    { (exit 1); exit 1; }; }
4559 fi
4560
4561         # special hack to add -no-undefined (which libtool should do for itself)
4562         LT_UNDEF=
4563         case "$cf_cv_system_name" in #(vi
4564         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4565                 LT_UNDEF=-no-undefined
4566                 ;;
4567         esac
4568
4569         # special hack to add --tag option for C++ compiler
4570         case $cf_cv_libtool_version in #(vi
4571         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4572                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4573                 LIBTOOL="$LIBTOOL --tag=CC"
4574                 ;;
4575         *)
4576                 LIBTOOL_CXX="$LIBTOOL"
4577                 ;;
4578         esac
4579 else
4580         LIBTOOL=""
4581         LIBTOOL_CXX=""
4582 fi
4583
4584 test -z "$LIBTOOL" && ECHO_LT=
4585
4586 if test "$with_libtool" != "no" ; then
4587
4588 cf_list_models="$cf_list_models libtool"
4589
4590 else
4591
4592 echo "$as_me:4592: checking if you want to build shared libraries" >&5
4593 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4594
4595 # Check whether --with-shared or --without-shared was given.
4596 if test "${with_shared+set}" = set; then
4597   withval="$with_shared"
4598   with_shared=$withval
4599 else
4600   with_shared=no
4601 fi;
4602 echo "$as_me:4602: result: $with_shared" >&5
4603 echo "${ECHO_T}$with_shared" >&6
4604 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4605
4606 echo "$as_me:4606: checking if you want to build static libraries" >&5
4607 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4608
4609 # Check whether --with-normal or --without-normal was given.
4610 if test "${with_normal+set}" = set; then
4611   withval="$with_normal"
4612   with_normal=$withval
4613 else
4614   with_normal=yes
4615 fi;
4616 echo "$as_me:4616: result: $with_normal" >&5
4617 echo "${ECHO_T}$with_normal" >&6
4618 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4619
4620 echo "$as_me:4620: checking if you want to build debug libraries" >&5
4621 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4622
4623 # Check whether --with-debug or --without-debug was given.
4624 if test "${with_debug+set}" = set; then
4625   withval="$with_debug"
4626   with_debug=$withval
4627 else
4628   with_debug=yes
4629 fi;
4630 echo "$as_me:4630: result: $with_debug" >&5
4631 echo "${ECHO_T}$with_debug" >&6
4632 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4633
4634 echo "$as_me:4634: checking if you want to build profiling libraries" >&5
4635 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4636
4637 # Check whether --with-profile or --without-profile was given.
4638 if test "${with_profile+set}" = set; then
4639   withval="$with_profile"
4640   with_profile=$withval
4641 else
4642   with_profile=no
4643 fi;
4644 echo "$as_me:4644: result: $with_profile" >&5
4645 echo "${ECHO_T}$with_profile" >&6
4646 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4647
4648 fi
4649
4650 if test "X$cf_with_cxx_binding" != Xno; then
4651 if test "x$with_shared" = "xyes"; then
4652 echo "$as_me:4652: checking if you want to build C++ shared libraries" >&5
4653 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4654
4655 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4656 if test "${with_cxx_shared+set}" = set; then
4657   withval="$with_cxx_shared"
4658   with_shared_cxx=$withval
4659 else
4660   with_shared_cxx=no
4661 fi;
4662 echo "$as_me:4662: result: $with_shared_cxx" >&5
4663 echo "${ECHO_T}$with_shared_cxx" >&6
4664 fi
4665 fi
4666
4667 ###############################################################################
4668
4669 echo "$as_me:4669: checking for specified models" >&5
4670 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4671 test -z "$cf_list_models" && cf_list_models=normal
4672 test "$with_libtool" != "no" && cf_list_models=libtool
4673 echo "$as_me:4673: result: $cf_list_models" >&5
4674 echo "${ECHO_T}$cf_list_models" >&6
4675
4676 ### Use the first model as the default, and save its suffix for use in building
4677 ### up test-applications.
4678 echo "$as_me:4678: checking for default model" >&5
4679 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4680 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4681 echo "$as_me:4681: result: $DFT_LWR_MODEL" >&5
4682 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4683
4684 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4685
4686 TICS_NAME=tic
4687
4688 TINFO_NAME=tinfo
4689
4690 LIB_NAME=ncurses
4691
4692 LIB_DIR=../lib
4693 LIB_2ND=../../lib
4694
4695 echo "$as_me:4695: checking if you want to have a library-prefix" >&5
4696 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4697
4698 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4699 if test "${with_lib_prefix+set}" = set; then
4700   withval="$with_lib_prefix"
4701   with_lib_prefix=$withval
4702 else
4703   with_lib_prefix=auto
4704 fi;
4705 echo "$as_me:4705: result: $with_lib_prefix" >&5
4706 echo "${ECHO_T}$with_lib_prefix" >&6
4707
4708 if test $with_lib_prefix = auto
4709 then
4710
4711         case $cf_cv_system_name in #(vi
4712         OS/2*|os2*) #(vi
4713         LIB_PREFIX=''
4714         ;;
4715         *)      LIB_PREFIX='lib'
4716         ;;
4717         esac
4718 cf_prefix=$LIB_PREFIX
4719
4720 elif test $with_lib_prefix = no
4721 then
4722         LIB_PREFIX=
4723 else
4724         LIB_PREFIX=$with_lib_prefix
4725 fi
4726
4727 LIB_SUFFIX=
4728
4729         echo "$as_me:4729: checking for PATH separator" >&5
4730 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4731         case $cf_cv_system_name in
4732         os2*)   PATH_SEPARATOR=';'  ;;
4733         *)      ${PATH_SEPARATOR:=':'}  ;;
4734         esac
4735
4736         echo "$as_me:4736: result: $PATH_SEPARATOR" >&5
4737 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4738
4739 ###############################################################################
4740
4741 echo "$as_me:4741: checking if you want to build a separate terminfo library" >&5
4742 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4743
4744 # Check whether --with-termlib or --without-termlib was given.
4745 if test "${with_termlib+set}" = set; then
4746   withval="$with_termlib"
4747   with_termlib=$withval
4748 else
4749   with_termlib=no
4750 fi;
4751 echo "$as_me:4751: result: $with_termlib" >&5
4752 echo "${ECHO_T}$with_termlib" >&6
4753
4754 echo "$as_me:4754: checking if you want to build a separate tic library" >&5
4755 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4756
4757 # Check whether --with-ticlib or --without-ticlib was given.
4758 if test "${with_ticlib+set}" = set; then
4759   withval="$with_ticlib"
4760   with_ticlib=$withval
4761 else
4762   with_ticlib=no
4763 fi;
4764 echo "$as_me:4764: result: $with_ticlib" >&5
4765 echo "${ECHO_T}$with_ticlib" >&6
4766
4767 ### Checks for special libraries, must be done up-front.
4768 SHLIB_LIST=""
4769
4770 echo "$as_me:4770: checking if you want to link with the GPM mouse library" >&5
4771 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4772
4773 # Check whether --with-gpm or --without-gpm was given.
4774 if test "${with_gpm+set}" = set; then
4775   withval="$with_gpm"
4776   with_gpm=$withval
4777 else
4778   with_gpm=maybe
4779 fi;
4780 echo "$as_me:4780: result: $with_gpm" >&5
4781 echo "${ECHO_T}$with_gpm" >&6
4782
4783 if test "$with_gpm" != no ; then
4784         echo "$as_me:4784: checking for gpm.h" >&5
4785 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4786 if test "${ac_cv_header_gpm_h+set}" = set; then
4787   echo $ECHO_N "(cached) $ECHO_C" >&6
4788 else
4789   cat >conftest.$ac_ext <<_ACEOF
4790 #line 4790 "configure"
4791 #include "confdefs.h"
4792 #include <gpm.h>
4793 _ACEOF
4794 if { (eval echo "$as_me:4794: \"$ac_cpp conftest.$ac_ext\"") >&5
4795   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4796   ac_status=$?
4797   egrep -v '^ *\+' conftest.er1 >conftest.err
4798   rm -f conftest.er1
4799   cat conftest.err >&5
4800   echo "$as_me:4800: \$? = $ac_status" >&5
4801   (exit $ac_status); } >/dev/null; then
4802   if test -s conftest.err; then
4803     ac_cpp_err=$ac_c_preproc_warn_flag
4804   else
4805     ac_cpp_err=
4806   fi
4807 else
4808   ac_cpp_err=yes
4809 fi
4810 if test -z "$ac_cpp_err"; then
4811   ac_cv_header_gpm_h=yes
4812 else
4813   echo "$as_me: failed program was:" >&5
4814   cat conftest.$ac_ext >&5
4815   ac_cv_header_gpm_h=no
4816 fi
4817 rm -f conftest.err conftest.$ac_ext
4818 fi
4819 echo "$as_me:4819: result: $ac_cv_header_gpm_h" >&5
4820 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4821 if test $ac_cv_header_gpm_h = yes; then
4822
4823 cat >>confdefs.h <<\EOF
4824 #define HAVE_GPM_H 1
4825 EOF
4826
4827                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4828                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4829
4830 echo "${as_me:-configure}:4830: testing assuming we really have GPM library ..." 1>&5
4831
4832 cat >>confdefs.h <<\EOF
4833 #define HAVE_LIBGPM 1
4834 EOF
4835
4836                 else
4837                         echo "$as_me:4837: checking for Gpm_Open in -lgpm" >&5
4838 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4839 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4840   echo $ECHO_N "(cached) $ECHO_C" >&6
4841 else
4842   ac_check_lib_save_LIBS=$LIBS
4843 LIBS="-lgpm  $LIBS"
4844 cat >conftest.$ac_ext <<_ACEOF
4845 #line 4845 "configure"
4846 #include "confdefs.h"
4847
4848 /* Override any gcc2 internal prototype to avoid an error.  */
4849 #ifdef __cplusplus
4850 extern "C"
4851 #endif
4852 /* We use char because int might match the return type of a gcc2
4853    builtin and then its argument prototype would still apply.  */
4854 char Gpm_Open ();
4855 int
4856 main ()
4857 {
4858 Gpm_Open ();
4859   ;
4860   return 0;
4861 }
4862 _ACEOF
4863 rm -f conftest.$ac_objext conftest$ac_exeext
4864 if { (eval echo "$as_me:4864: \"$ac_link\"") >&5
4865   (eval $ac_link) 2>&5
4866   ac_status=$?
4867   echo "$as_me:4867: \$? = $ac_status" >&5
4868   (exit $ac_status); } &&
4869          { ac_try='test -s conftest$ac_exeext'
4870   { (eval echo "$as_me:4870: \"$ac_try\"") >&5
4871   (eval $ac_try) 2>&5
4872   ac_status=$?
4873   echo "$as_me:4873: \$? = $ac_status" >&5
4874   (exit $ac_status); }; }; then
4875   ac_cv_lib_gpm_Gpm_Open=yes
4876 else
4877   echo "$as_me: failed program was:" >&5
4878 cat conftest.$ac_ext >&5
4879 ac_cv_lib_gpm_Gpm_Open=no
4880 fi
4881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4882 LIBS=$ac_check_lib_save_LIBS
4883 fi
4884 echo "$as_me:4884: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4885 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4886 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4887   :
4888 else
4889
4890                                 { { echo "$as_me:4890: error: Cannot link with GPM library" >&5
4891 echo "$as_me: error: Cannot link with GPM library" >&2;}
4892    { (exit 1); exit 1; }; }
4893                 fi
4894                 with_gpm=yes
4895
4896 fi
4897
4898 else
4899
4900                 test "$with_gpm" != maybe && { echo "$as_me:4900: WARNING: Cannot find GPM header" >&5
4901 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4902                 with_gpm=no
4903
4904 fi
4905
4906 fi
4907
4908 if test "$with_gpm" != no ; then
4909         echo "$as_me:4909: checking if you want to load GPM dynamically" >&5
4910 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4911
4912 # Check whether --with-dlsym or --without-dlsym was given.
4913 if test "${with_dlsym+set}" = set; then
4914   withval="$with_dlsym"
4915   with_dlsym=$withval
4916 else
4917   with_dlsym=yes
4918 fi;
4919         echo "$as_me:4919: result: $with_dlsym" >&5
4920 echo "${ECHO_T}$with_dlsym" >&6
4921         if test "x$with_dlsym" = xyes ; then
4922
4923 cf_have_dlsym=no
4924 echo "$as_me:4924: checking for dlsym" >&5
4925 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4926 if test "${ac_cv_func_dlsym+set}" = set; then
4927   echo $ECHO_N "(cached) $ECHO_C" >&6
4928 else
4929   cat >conftest.$ac_ext <<_ACEOF
4930 #line 4930 "configure"
4931 #include "confdefs.h"
4932 /* System header to define __stub macros and hopefully few prototypes,
4933     which can conflict with char dlsym (); below.  */
4934 #include <assert.h>
4935 /* Override any gcc2 internal prototype to avoid an error.  */
4936 #ifdef __cplusplus
4937 extern "C"
4938 #endif
4939 /* We use char because int might match the return type of a gcc2
4940    builtin and then its argument prototype would still apply.  */
4941 char dlsym ();
4942 char (*f) ();
4943
4944 int
4945 main ()
4946 {
4947 /* The GNU C library defines this for functions which it implements
4948     to always fail with ENOSYS.  Some functions are actually named
4949     something starting with __ and the normal name is an alias.  */
4950 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4951 choke me
4952 #else
4953 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4954 #endif
4955
4956   ;
4957   return 0;
4958 }
4959 _ACEOF
4960 rm -f conftest.$ac_objext conftest$ac_exeext
4961 if { (eval echo "$as_me:4961: \"$ac_link\"") >&5
4962   (eval $ac_link) 2>&5
4963   ac_status=$?
4964   echo "$as_me:4964: \$? = $ac_status" >&5
4965   (exit $ac_status); } &&
4966          { ac_try='test -s conftest$ac_exeext'
4967   { (eval echo "$as_me:4967: \"$ac_try\"") >&5
4968   (eval $ac_try) 2>&5
4969   ac_status=$?
4970   echo "$as_me:4970: \$? = $ac_status" >&5
4971   (exit $ac_status); }; }; then
4972   ac_cv_func_dlsym=yes
4973 else
4974   echo "$as_me: failed program was:" >&5
4975 cat conftest.$ac_ext >&5
4976 ac_cv_func_dlsym=no
4977 fi
4978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4979 fi
4980 echo "$as_me:4980: result: $ac_cv_func_dlsym" >&5
4981 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4982 if test $ac_cv_func_dlsym = yes; then
4983   cf_have_dlsym=yes
4984 else
4985
4986 cf_have_libdl=no
4987 echo "$as_me:4987: checking for dlsym in -ldl" >&5
4988 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4989 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4990   echo $ECHO_N "(cached) $ECHO_C" >&6
4991 else
4992   ac_check_lib_save_LIBS=$LIBS
4993 LIBS="-ldl  $LIBS"
4994 cat >conftest.$ac_ext <<_ACEOF
4995 #line 4995 "configure"
4996 #include "confdefs.h"
4997
4998 /* Override any gcc2 internal prototype to avoid an error.  */
4999 #ifdef __cplusplus
5000 extern "C"
5001 #endif
5002 /* We use char because int might match the return type of a gcc2
5003    builtin and then its argument prototype would still apply.  */
5004 char dlsym ();
5005 int
5006 main ()
5007 {
5008 dlsym ();
5009   ;
5010   return 0;
5011 }
5012 _ACEOF
5013 rm -f conftest.$ac_objext conftest$ac_exeext
5014 if { (eval echo "$as_me:5014: \"$ac_link\"") >&5
5015   (eval $ac_link) 2>&5
5016   ac_status=$?
5017   echo "$as_me:5017: \$? = $ac_status" >&5
5018   (exit $ac_status); } &&
5019          { ac_try='test -s conftest$ac_exeext'
5020   { (eval echo "$as_me:5020: \"$ac_try\"") >&5
5021   (eval $ac_try) 2>&5
5022   ac_status=$?
5023   echo "$as_me:5023: \$? = $ac_status" >&5
5024   (exit $ac_status); }; }; then
5025   ac_cv_lib_dl_dlsym=yes
5026 else
5027   echo "$as_me: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5029 ac_cv_lib_dl_dlsym=no
5030 fi
5031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5032 LIBS=$ac_check_lib_save_LIBS
5033 fi
5034 echo "$as_me:5034: result: $ac_cv_lib_dl_dlsym" >&5
5035 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5036 if test $ac_cv_lib_dl_dlsym = yes; then
5037
5038         cf_have_dlsym=yes
5039         cf_have_libdl=yes
5040 fi
5041
5042 fi
5043
5044 if test "$cf_have_dlsym" = yes ; then
5045         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5046
5047         echo "$as_me:5047: checking whether able to link to dl*() functions" >&5
5048 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5049         cat >conftest.$ac_ext <<_ACEOF
5050 #line 5050 "configure"
5051 #include "confdefs.h"
5052 #include <dlfcn.h>
5053 int
5054 main ()
5055 {
5056
5057                 void *obj;
5058                 if ((obj = dlopen("filename", 0)) != 0) {
5059                         if (dlsym(obj, "symbolname") == 0) {
5060                         dlclose(obj);
5061                         }
5062                 }
5063   ;
5064   return 0;
5065 }
5066 _ACEOF
5067 rm -f conftest.$ac_objext conftest$ac_exeext
5068 if { (eval echo "$as_me:5068: \"$ac_link\"") >&5
5069   (eval $ac_link) 2>&5
5070   ac_status=$?
5071   echo "$as_me:5071: \$? = $ac_status" >&5
5072   (exit $ac_status); } &&
5073          { ac_try='test -s conftest$ac_exeext'
5074   { (eval echo "$as_me:5074: \"$ac_try\"") >&5
5075   (eval $ac_try) 2>&5
5076   ac_status=$?
5077   echo "$as_me:5077: \$? = $ac_status" >&5
5078   (exit $ac_status); }; }; then
5079
5080 cat >>confdefs.h <<\EOF
5081 #define HAVE_LIBDL 1
5082 EOF
5083
5084 else
5085   echo "$as_me: failed program was:" >&5
5086 cat conftest.$ac_ext >&5
5087
5088                 { { echo "$as_me:5088: error: Cannot link test program for libdl" >&5
5089 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5090    { (exit 1); exit 1; }; }
5091 fi
5092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5093         echo "$as_me:5093: result: ok" >&5
5094 echo "${ECHO_T}ok" >&6
5095 else
5096         { { echo "$as_me:5096: error: Cannot find dlsym function" >&5
5097 echo "$as_me: error: Cannot find dlsym function" >&2;}
5098    { (exit 1); exit 1; }; }
5099 fi
5100
5101                 if test "x$with_gpm" != xyes ; then
5102                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5103
5104 echo "${as_me:-configure}:5104: testing assuming soname for gpm is $with_gpm ..." 1>&5
5105
5106                         cf_cv_gpm_soname="$with_gpm"
5107                 else
5108
5109 echo "$as_me:5109: checking for soname of gpm library" >&5
5110 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5111 if test "${cf_cv_gpm_soname+set}" = set; then
5112   echo $ECHO_N "(cached) $ECHO_C" >&6
5113 else
5114
5115 cf_cv_gpm_soname=unknown
5116 if test "$cross_compiling" != yes ; then
5117 cat >conftest.$ac_ext <<CF_EOF
5118 #include <gpm.h>
5119 int main()
5120 {
5121 if (Gpm_Open(0,0)) Gpm_Close();
5122         ${cf_cv_main_return:-return}(0);
5123 }
5124 CF_EOF
5125 cf_save_LIBS="$LIBS"
5126         LIBS="-lgpm $LIBS"
5127         if { (eval echo "$as_me:5127: \"$ac_compile\"") >&5
5128   (eval $ac_compile) 2>&5
5129   ac_status=$?
5130   echo "$as_me:5130: \$? = $ac_status" >&5
5131   (exit $ac_status); } ; then
5132                 if { (eval echo "$as_me:5132: \"$ac_link\"") >&5
5133   (eval $ac_link) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } ; then
5137                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5138                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5139                 fi
5140         fi
5141 rm -rf conftest*
5142 LIBS="$cf_save_LIBS"
5143 fi
5144
5145 fi
5146 echo "$as_me:5146: result: $cf_cv_gpm_soname" >&5
5147 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5148
5149                 fi
5150                 test "$cf_cv_gpm_soname" != "unknown" &&
5151 cat >>confdefs.h <<EOF
5152 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5153 EOF
5154
5155                 SHLIB_LIST="-ldl $SHLIB_LIST"
5156         else
5157                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5158                 TEST_LIBS="-lgpm $TEST_LIBS"
5159         fi
5160
5161 cat >>confdefs.h <<\EOF
5162 #define HAVE_LIBGPM 1
5163 EOF
5164
5165 echo "$as_me:5165: checking for Gpm_Wgetch in -lgpm" >&5
5166 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5167 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170   ac_check_lib_save_LIBS=$LIBS
5171 LIBS="-lgpm  $LIBS"
5172 cat >conftest.$ac_ext <<_ACEOF
5173 #line 5173 "configure"
5174 #include "confdefs.h"
5175
5176 /* Override any gcc2 internal prototype to avoid an error.  */
5177 #ifdef __cplusplus
5178 extern "C"
5179 #endif
5180 /* We use char because int might match the return type of a gcc2
5181    builtin and then its argument prototype would still apply.  */
5182 char Gpm_Wgetch ();
5183 int
5184 main ()
5185 {
5186 Gpm_Wgetch ();
5187   ;
5188   return 0;
5189 }
5190 _ACEOF
5191 rm -f conftest.$ac_objext conftest$ac_exeext
5192 if { (eval echo "$as_me:5192: \"$ac_link\"") >&5
5193   (eval $ac_link) 2>&5
5194   ac_status=$?
5195   echo "$as_me:5195: \$? = $ac_status" >&5
5196   (exit $ac_status); } &&
5197          { ac_try='test -s conftest$ac_exeext'
5198   { (eval echo "$as_me:5198: \"$ac_try\"") >&5
5199   (eval $ac_try) 2>&5
5200   ac_status=$?
5201   echo "$as_me:5201: \$? = $ac_status" >&5
5202   (exit $ac_status); }; }; then
5203   ac_cv_lib_gpm_Gpm_Wgetch=yes
5204 else
5205   echo "$as_me: failed program was:" >&5
5206 cat conftest.$ac_ext >&5
5207 ac_cv_lib_gpm_Gpm_Wgetch=no
5208 fi
5209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5210 LIBS=$ac_check_lib_save_LIBS
5211 fi
5212 echo "$as_me:5212: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5213 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5214 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5215
5216 echo "$as_me:5216: checking if GPM is weakly bound to curses library" >&5
5217 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5218 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5219   echo $ECHO_N "(cached) $ECHO_C" >&6
5220 else
5221
5222 cf_cv_check_gpm_wgetch=unknown
5223 if test "$cross_compiling" != yes ; then
5224
5225 cat >conftest.$ac_ext <<CF_EOF
5226 #include <gpm.h>
5227 int main()
5228 {
5229         Gpm_Wgetch();
5230         ${cf_cv_main_return:-return}(0);
5231 }
5232 CF_EOF
5233
5234         cf_save_LIBS="$LIBS"
5235         # This only works if we can look at the symbol table.  If a shared
5236         # library is stripped for install, we cannot use that.  So we're forced
5237         # to rely on the static library, noting that some packagers may not
5238         # include it.
5239         LIBS="-static -lgpm -dynamic $LIBS"
5240         if { (eval echo "$as_me:5240: \"$ac_compile\"") >&5
5241   (eval $ac_compile) 2>&5
5242   ac_status=$?
5243   echo "$as_me:5243: \$? = $ac_status" >&5
5244   (exit $ac_status); } ; then
5245                 if { (eval echo "$as_me:5245: \"$ac_link\"") >&5
5246   (eval $ac_link) 2>&5
5247   ac_status=$?
5248   echo "$as_me:5248: \$? = $ac_status" >&5
5249   (exit $ac_status); } ; then
5250                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5251                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5252                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5253                 fi
5254         fi
5255         rm -rf conftest*
5256         LIBS="$cf_save_LIBS"
5257 fi
5258
5259 fi
5260 echo "$as_me:5260: result: $cf_cv_check_gpm_wgetch" >&5
5261 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5262
5263 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5264         { echo "$as_me:5264: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5265 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5266 fi
5267
5268 fi
5269
5270 fi
5271
5272 # not everyone has "test -c"
5273 if test -c /dev/sysmouse 2>/dev/null ; then
5274 echo "$as_me:5274: checking if you want to use sysmouse" >&5
5275 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5276
5277 # Check whether --with-sysmouse or --without-sysmouse was given.
5278 if test "${with_sysmouse+set}" = set; then
5279   withval="$with_sysmouse"
5280   cf_with_sysmouse=$withval
5281 else
5282   cf_with_sysmouse=maybe
5283 fi;
5284         if test "$cf_with_sysmouse" != no ; then
5285         cat >conftest.$ac_ext <<_ACEOF
5286 #line 5286 "configure"
5287 #include "confdefs.h"
5288
5289 #include <osreldate.h>
5290 #if (__FreeBSD_version >= 400017)
5291 #include <sys/consio.h>
5292 #include <sys/fbio.h>
5293 #else
5294 #include <machine/console.h>
5295 #endif
5296
5297 int
5298 main ()
5299 {
5300
5301         struct mouse_info the_mouse;
5302         ioctl(0, CONS_MOUSECTL, &the_mouse);
5303
5304   ;
5305   return 0;
5306 }
5307 _ACEOF
5308 rm -f conftest.$ac_objext
5309 if { (eval echo "$as_me:5309: \"$ac_compile\"") >&5
5310   (eval $ac_compile) 2>&5
5311   ac_status=$?
5312   echo "$as_me:5312: \$? = $ac_status" >&5
5313   (exit $ac_status); } &&
5314          { ac_try='test -s conftest.$ac_objext'
5315   { (eval echo "$as_me:5315: \"$ac_try\"") >&5
5316   (eval $ac_try) 2>&5
5317   ac_status=$?
5318   echo "$as_me:5318: \$? = $ac_status" >&5
5319   (exit $ac_status); }; }; then
5320   cf_with_sysmouse=yes
5321 else
5322   echo "$as_me: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 cf_with_sysmouse=no
5325 fi
5326 rm -f conftest.$ac_objext conftest.$ac_ext
5327         fi
5328 echo "$as_me:5328: result: $cf_with_sysmouse" >&5
5329 echo "${ECHO_T}$cf_with_sysmouse" >&6
5330 test "$cf_with_sysmouse" = yes &&
5331 cat >>confdefs.h <<\EOF
5332 #define USE_SYSMOUSE 1
5333 EOF
5334
5335 fi
5336
5337 if test X"$CC_G_OPT" = X"" ; then
5338         CC_G_OPT='-g'
5339         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5340 fi
5341
5342 if test X"$CXX_G_OPT" = X"" ; then
5343         CXX_G_OPT='-g'
5344         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5345 fi
5346
5347 echo "$as_me:5347: checking for default loader flags" >&5
5348 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5349 case $DFT_LWR_MODEL in
5350 libtool) LD_MODEL=''   ;;
5351 normal)  LD_MODEL=''   ;;
5352 debug)   LD_MODEL=$CC_G_OPT ;;
5353 profile) LD_MODEL='-pg';;
5354 shared)  LD_MODEL=''   ;;
5355 esac
5356 echo "$as_me:5356: result: $LD_MODEL" >&5
5357 echo "${ECHO_T}$LD_MODEL" >&6
5358
5359 case $DFT_LWR_MODEL in
5360 shared)
5361
5362 echo "$as_me:5362: checking if rpath option should be used" >&5
5363 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5364
5365 # Check whether --enable-rpath or --disable-rpath was given.
5366 if test "${enable_rpath+set}" = set; then
5367   enableval="$enable_rpath"
5368   cf_cv_enable_rpath=$enableval
5369 else
5370   cf_cv_enable_rpath=no
5371 fi;
5372 echo "$as_me:5372: result: $cf_cv_enable_rpath" >&5
5373 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5374
5375 echo "$as_me:5375: checking if shared libraries should be relinked during install" >&5
5376 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5377
5378 # Check whether --enable-relink or --disable-relink was given.
5379 if test "${enable_relink+set}" = set; then
5380   enableval="$enable_relink"
5381   cf_cv_do_relink=$enableval
5382 else
5383   cf_cv_do_relink=yes
5384 fi;
5385 echo "$as_me:5385: result: $cf_cv_do_relink" >&5
5386 echo "${ECHO_T}$cf_cv_do_relink" >&6
5387         ;;
5388 esac
5389
5390 LD_RPATH_OPT=
5391 echo "$as_me:5391: checking for an rpath option" >&5
5392 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5393 case $cf_cv_system_name in #(vi
5394 irix*) #(vi
5395         if test "$GCC" = yes; then
5396                 LD_RPATH_OPT="-Wl,-rpath,"
5397         else
5398                 LD_RPATH_OPT="-rpath "
5399         fi
5400         ;;
5401 linux*|gnu*|k*bsd*-gnu) #(vi
5402         LD_RPATH_OPT="-Wl,-rpath,"
5403         ;;
5404 openbsd[2-9].*|mirbsd*) #(vi
5405         LD_RPATH_OPT="-Wl,-rpath,"
5406         ;;
5407 dragonfly*|freebsd*) #(vi
5408         LD_RPATH_OPT="-rpath "
5409         ;;
5410 netbsd*) #(vi
5411         LD_RPATH_OPT="-Wl,-rpath,"
5412         ;;
5413 osf*|mls+*) #(vi
5414         LD_RPATH_OPT="-rpath "
5415         ;;
5416 solaris2*) #(vi
5417         LD_RPATH_OPT="-R"
5418         ;;
5419 *)
5420         ;;
5421 esac
5422 echo "$as_me:5422: result: $LD_RPATH_OPT" >&5
5423 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5424
5425 case "x$LD_RPATH_OPT" in #(vi
5426 x-R*)
5427         echo "$as_me:5427: checking if we need a space after rpath option" >&5
5428 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5429         cf_save_LIBS="$LIBS"
5430         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5431         cat >conftest.$ac_ext <<_ACEOF
5432 #line 5432 "configure"
5433 #include "confdefs.h"
5434
5435 int
5436 main ()
5437 {
5438
5439   ;
5440   return 0;
5441 }
5442 _ACEOF
5443 rm -f conftest.$ac_objext conftest$ac_exeext
5444 if { (eval echo "$as_me:5444: \"$ac_link\"") >&5
5445   (eval $ac_link) 2>&5
5446   ac_status=$?
5447   echo "$as_me:5447: \$? = $ac_status" >&5
5448   (exit $ac_status); } &&
5449          { ac_try='test -s conftest$ac_exeext'
5450   { (eval echo "$as_me:5450: \"$ac_try\"") >&5
5451   (eval $ac_try) 2>&5
5452   ac_status=$?
5453   echo "$as_me:5453: \$? = $ac_status" >&5
5454   (exit $ac_status); }; }; then
5455   cf_rpath_space=no
5456 else
5457   echo "$as_me: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 cf_rpath_space=yes
5460 fi
5461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5462         LIBS="$cf_save_LIBS"
5463         echo "$as_me:5463: result: $cf_rpath_space" >&5
5464 echo "${ECHO_T}$cf_rpath_space" >&6
5465         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5466         ;;
5467 esac
5468
5469         LOCAL_LDFLAGS=
5470         LOCAL_LDFLAGS2=
5471         LD_SHARED_OPTS=
5472         INSTALL_LIB="-m 644"
5473
5474         cf_cv_do_symlinks=no
5475         cf_ld_rpath_opt=
5476         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5477
5478         echo "$as_me:5478: checking if release/abi version should be used for shared libs" >&5
5479 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5480
5481 # Check whether --with-shlib-version or --without-shlib-version was given.
5482 if test "${with_shlib_version+set}" = set; then
5483   withval="$with_shlib_version"
5484   test -z "$withval" && withval=auto
5485         case $withval in #(vi
5486         yes) #(vi
5487                 cf_cv_shlib_version=auto
5488                 ;;
5489         rel|abi|auto|no) #(vi
5490                 cf_cv_shlib_version=$withval
5491                 ;;
5492         *)
5493                 { { echo "$as_me:5493: error: option value must be one of: rel, abi, auto or no" >&5
5494 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5495    { (exit 1); exit 1; }; }
5496                 ;;
5497         esac
5498
5499 else
5500   cf_cv_shlib_version=auto
5501 fi;
5502         echo "$as_me:5502: result: $cf_cv_shlib_version" >&5
5503 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5504
5505         cf_cv_rm_so_locs=no
5506         cf_try_cflags=
5507
5508         # Some less-capable ports of gcc support only -fpic
5509         CC_SHARED_OPTS=
5510         if test "$GCC" = yes
5511         then
5512                 echo "$as_me:5512: checking which $CC option to use" >&5
5513 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5514                 cf_save_CFLAGS="$CFLAGS"
5515                 for CC_SHARED_OPTS in -fPIC -fpic ''
5516                 do
5517                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5518                         cat >conftest.$ac_ext <<_ACEOF
5519 #line 5519 "configure"
5520 #include "confdefs.h"
5521 #include <stdio.h>
5522 int
5523 main ()
5524 {
5525 int x = 1
5526   ;
5527   return 0;
5528 }
5529 _ACEOF
5530 rm -f conftest.$ac_objext
5531 if { (eval echo "$as_me:5531: \"$ac_compile\"") >&5
5532   (eval $ac_compile) 2>&5
5533   ac_status=$?
5534   echo "$as_me:5534: \$? = $ac_status" >&5
5535   (exit $ac_status); } &&
5536          { ac_try='test -s conftest.$ac_objext'
5537   { (eval echo "$as_me:5537: \"$ac_try\"") >&5
5538   (eval $ac_try) 2>&5
5539   ac_status=$?
5540   echo "$as_me:5540: \$? = $ac_status" >&5
5541   (exit $ac_status); }; }; then
5542   break
5543 else
5544   echo "$as_me: failed program was:" >&5
5545 cat conftest.$ac_ext >&5
5546 fi
5547 rm -f conftest.$ac_objext conftest.$ac_ext
5548                 done
5549                 echo "$as_me:5549: result: $CC_SHARED_OPTS" >&5
5550 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5551                 CFLAGS="$cf_save_CFLAGS"
5552         fi
5553
5554         cf_cv_shlib_version_infix=no
5555
5556         case $cf_cv_system_name in #(vi
5557         aix4.3-9*|aix[5-7]*) #(vi
5558                 if test "$GCC" = yes; then
5559                         CC_SHARED_OPTS=
5560                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5561                 else
5562                         # CC_SHARED_OPTS='-qpic=large -G'
5563                         # perhaps "-bM:SRE -bnoentry -bexpall"
5564                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5565                 fi
5566                 ;;
5567         beos*) #(vi
5568                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5569                 ;;
5570         cygwin*) #(vi
5571                 CC_SHARED_OPTS=
5572                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5573                 cf_cv_shlib_version=cygdll
5574                 cf_cv_shlib_version_infix=cygdll
5575                 cat >mk_shared_lib.sh <<-CF_EOF
5576                 #!/bin/sh
5577                 SHARED_LIB=\$1
5578                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5579                 shift
5580                 cat <<-EOF
5581                 Linking shared library
5582                 ** SHARED_LIB \$SHARED_LIB
5583                 ** IMPORT_LIB \$IMPORT_LIB
5584 EOF
5585                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5586 CF_EOF
5587                 chmod +x mk_shared_lib.sh
5588                 ;;
5589         darwin*) #(vi
5590                 cf_try_cflags="no-cpp-precomp"
5591                 CC_SHARED_OPTS="-dynamic"
5592                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5593                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5594                 cf_cv_shlib_version_infix=yes
5595                 echo "$as_me:5595: checking if ld -search_paths_first works" >&5
5596 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5597 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5598   echo $ECHO_N "(cached) $ECHO_C" >&6
5599 else
5600
5601                         cf_save_LDFLAGS=$LDFLAGS
5602                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5603                         cat >conftest.$ac_ext <<_ACEOF
5604 #line 5604 "configure"
5605 #include "confdefs.h"
5606
5607 int
5608 main ()
5609 {
5610 int i;
5611   ;
5612   return 0;
5613 }
5614 _ACEOF
5615 rm -f conftest.$ac_objext conftest$ac_exeext
5616 if { (eval echo "$as_me:5616: \"$ac_link\"") >&5
5617   (eval $ac_link) 2>&5
5618   ac_status=$?
5619   echo "$as_me:5619: \$? = $ac_status" >&5
5620   (exit $ac_status); } &&
5621          { ac_try='test -s conftest$ac_exeext'
5622   { (eval echo "$as_me:5622: \"$ac_try\"") >&5
5623   (eval $ac_try) 2>&5
5624   ac_status=$?
5625   echo "$as_me:5625: \$? = $ac_status" >&5
5626   (exit $ac_status); }; }; then
5627   cf_cv_ldflags_search_paths_first=yes
5628 else
5629   echo "$as_me: failed program was:" >&5
5630 cat conftest.$ac_ext >&5
5631 cf_cv_ldflags_search_paths_first=no
5632 fi
5633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5634                                 LDFLAGS=$cf_save_LDFLAGS
5635 fi
5636 echo "$as_me:5636: result: $cf_cv_ldflags_search_paths_first" >&5
5637 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5638                 if test $cf_cv_ldflags_search_paths_first = yes; then
5639                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5640                 fi
5641                 ;;
5642         hpux[7-8]*) #(vi
5643                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5644                 if test "$GCC" != yes; then
5645                         CC_SHARED_OPTS='+Z'
5646                 fi
5647                 MK_SHARED_LIB='${LD} -b -o $@'
5648                 INSTALL_LIB="-m 555"
5649                 ;;
5650         hpux*) #(vi
5651                 # (tested with gcc 2.7.2 -- I don't have c89)
5652                 if test "$GCC" = yes; then
5653                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5654                 else
5655                         CC_SHARED_OPTS='+Z'
5656                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5657                 fi
5658                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5659                 # HP-UX shared libraries must be executable, and should be
5660                 # readonly to exploit a quirk in the memory manager.
5661                 INSTALL_LIB="-m 555"
5662                 ;;
5663         interix*)
5664                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5665                 if test "$cf_cv_shlib_version" = rel; then
5666                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5667                 else
5668                         cf_shared_soname='`basename `'
5669                 fi
5670                 CC_SHARED_OPTS=
5671                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5672                 ;;
5673         irix*) #(vi
5674                 if test "$cf_cv_enable_rpath" = yes ; then
5675                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5676                 fi
5677                 # tested with IRIX 5.2 and 'cc'.
5678                 if test "$GCC" != yes; then
5679                         CC_SHARED_OPTS='-KPIC'
5680                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5681                 else
5682                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5683                 fi
5684                 cf_cv_rm_so_locs=yes
5685                 ;;
5686         linux*|gnu*|k*bsd*-gnu) #(vi
5687                 if test "$DFT_LWR_MODEL" = "shared" ; then
5688                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5689                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5690                 fi
5691                 if test "$cf_cv_enable_rpath" = yes ; then
5692                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5693                 fi
5694
5695         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5696         if test "$cf_cv_shlib_version" = rel; then
5697                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5698         else
5699                 cf_cv_shared_soname='`basename $@`'
5700         fi
5701
5702                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5703                 ;;
5704         mingw*) #(vi
5705                 cf_cv_shlib_version=mingw
5706                 cf_cv_shlib_version_infix=mingw
5707                 CC_SHARED_OPTS=
5708                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5709                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5710                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5711                 cat >mk_shared_lib.sh <<-CF_EOF
5712                 #!/bin/sh
5713                 SHARED_LIB=\$1
5714                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5715                 shift
5716                 cat <<-EOF
5717                 Linking shared library
5718                 ** SHARED_LIB \$SHARED_LIB
5719                 ** IMPORT_LIB \$IMPORT_LIB
5720 EOF
5721                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5722 CF_EOF
5723                 chmod +x mk_shared_lib.sh
5724                 ;;
5725         openbsd[2-9].*|mirbsd*) #(vi
5726                 if test "$DFT_LWR_MODEL" = "shared" ; then
5727                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5728                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5729                 fi
5730                 if test "$cf_cv_enable_rpath" = yes ; then
5731                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5732                 fi
5733                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5734
5735         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5736         if test "$cf_cv_shlib_version" = rel; then
5737                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5738         else
5739                 cf_cv_shared_soname='`basename $@`'
5740         fi
5741
5742                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5743                 ;;
5744         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5745                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5746                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5747                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5748                 ;;
5749         dragonfly*|freebsd*) #(vi
5750                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5751                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5752                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5753                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5754                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5755                 fi
5756
5757         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5758         if test "$cf_cv_shlib_version" = rel; then
5759                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5760         else
5761                 cf_cv_shared_soname='`basename $@`'
5762         fi
5763
5764                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5765                 ;;
5766         netbsd*) #(vi
5767                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5768                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5769                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5770                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5771                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5772                         if test "$cf_cv_shlib_version" = auto; then
5773                         if test -f /usr/libexec/ld.elf_so; then
5774                                 cf_cv_shlib_version=abi
5775                         else
5776                                 cf_cv_shlib_version=rel
5777                         fi
5778                         fi
5779
5780         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5781         if test "$cf_cv_shlib_version" = rel; then
5782                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5783         else
5784                 cf_cv_shared_soname='`basename $@`'
5785         fi
5786
5787                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5788                 else
5789                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5790                 fi
5791                 ;;
5792         osf*|mls+*) #(vi
5793                 # tested with OSF/1 V3.2 and 'cc'
5794                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5795                 # link with shared libs).
5796                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5797                 case $host_os in #(vi
5798                 osf4*)
5799                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5800                         ;;
5801                 esac
5802                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5803                 if test "$DFT_LWR_MODEL" = "shared" ; then
5804                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5805                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5806                 fi
5807                 cf_cv_rm_so_locs=yes
5808                 ;;
5809         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5810                 # tested with osr5.0.5
5811                 if test "$GCC" != yes; then
5812                         CC_SHARED_OPTS='-belf -KPIC'
5813                 fi
5814                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5815                 if test "$cf_cv_enable_rpath" = yes ; then
5816                         # only way is to set LD_RUN_PATH but no switch for it
5817                         RUN_PATH=$libdir
5818                 fi
5819                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5820                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5821                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5822                 ;;
5823         sunos4*) #(vi
5824                 # tested with SunOS 4.1.1 and gcc 2.7.0
5825                 if test "$GCC" != yes; then
5826                         CC_SHARED_OPTS='-KPIC'
5827                 fi
5828                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5829                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5830                 ;;
5831         solaris2*) #(vi
5832                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5833                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5834                 if test "$DFT_LWR_MODEL" = "shared" ; then
5835                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5836                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5837                 fi
5838                 if test "$cf_cv_enable_rpath" = yes ; then
5839                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5840                 fi
5841
5842         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5843         if test "$cf_cv_shlib_version" = rel; then
5844                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5845         else
5846                 cf_cv_shared_soname='`basename $@`'
5847         fi
5848
5849                 if test "$GCC" != yes; then
5850                         cf_save_CFLAGS="$CFLAGS"
5851                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5852                         do
5853                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5854                                 cat >conftest.$ac_ext <<_ACEOF
5855 #line 5855 "configure"
5856 #include "confdefs.h"
5857 #include <stdio.h>
5858 int
5859 main ()
5860 {
5861 printf("Hello\n");
5862   ;
5863   return 0;
5864 }
5865 _ACEOF
5866 rm -f conftest.$ac_objext
5867 if { (eval echo "$as_me:5867: \"$ac_compile\"") >&5
5868   (eval $ac_compile) 2>&5
5869   ac_status=$?
5870   echo "$as_me:5870: \$? = $ac_status" >&5
5871   (exit $ac_status); } &&
5872          { ac_try='test -s conftest.$ac_objext'
5873   { (eval echo "$as_me:5873: \"$ac_try\"") >&5
5874   (eval $ac_try) 2>&5
5875   ac_status=$?
5876   echo "$as_me:5876: \$? = $ac_status" >&5
5877   (exit $ac_status); }; }; then
5878   break
5879 else
5880   echo "$as_me: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5882 fi
5883 rm -f conftest.$ac_objext conftest.$ac_ext
5884                         done
5885                         CFLAGS="$cf_save_CFLAGS"
5886                         CC_SHARED_OPTS=$cf_shared_opts
5887                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5888                 else
5889                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5890                 fi
5891                 ;;
5892         sysv5uw7*|unix_sv*) #(vi
5893                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5894                 if test "$GCC" != yes; then
5895                         CC_SHARED_OPTS='-KPIC'
5896                 fi
5897                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5898                 ;;
5899         *)
5900                 CC_SHARED_OPTS='unknown'
5901                 MK_SHARED_LIB='echo unknown'
5902                 ;;
5903         esac
5904
5905         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5906         case "$cf_cv_shlib_version" in #(vi
5907         rel|abi)
5908                 case "$MK_SHARED_LIB" in #(vi
5909                 *'-o $@') #(vi
5910                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5911                         ;;
5912                 *)
5913                         { echo "$as_me:5913: WARNING: ignored --with-shlib-version" >&5
5914 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5915                         ;;
5916                 esac
5917                 ;;
5918         esac
5919
5920         if test -n "$cf_try_cflags"
5921         then
5922 cat > conftest.$ac_ext <<EOF
5923 #line 5923 "${as_me:-configure}"
5924 #include <stdio.h>
5925 int main(int argc, char *argv[])
5926 {
5927         printf("hello\n");
5928         return (argv[argc-1] == 0) ;
5929 }
5930 EOF
5931                 cf_save_CFLAGS="$CFLAGS"
5932                 for cf_opt in $cf_try_cflags
5933                 do
5934                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5935                         echo "$as_me:5935: checking if CFLAGS option -$cf_opt works" >&5
5936 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5937                         if { (eval echo "$as_me:5937: \"$ac_compile\"") >&5
5938   (eval $ac_compile) 2>&5
5939   ac_status=$?
5940   echo "$as_me:5940: \$? = $ac_status" >&5
5941   (exit $ac_status); }; then
5942                                 echo "$as_me:5942: result: yes" >&5
5943 echo "${ECHO_T}yes" >&6
5944                                 cf_save_CFLAGS="$CFLAGS"
5945                         else
5946                                 echo "$as_me:5946: result: no" >&5
5947 echo "${ECHO_T}no" >&6
5948                         fi
5949                 done
5950                 CFLAGS="$cf_save_CFLAGS"
5951         fi
5952
5953         # RPATH_LIST is a colon-separated list of directories
5954         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5955         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5956
5957         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5958
5959 echo "${as_me:-configure}:5959: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5960
5961         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5962
5963 echo "${as_me:-configure}:5963: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5964
5965 if test "$CC_SHARED_OPTS" = "unknown"; then
5966         for model in $cf_list_models; do
5967                 if test "$model" = "shared"; then
5968                         { { echo "$as_me:5968: error: Shared libraries are not supported in this version" >&5
5969 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5970    { (exit 1); exit 1; }; }
5971                 fi
5972         done
5973 fi
5974
5975 ### If we're building with rpath, try to link non-standard libs that way too.
5976 if test "$DFT_LWR_MODEL" = "shared"; then
5977
5978 echo "$as_me:5978: checking if rpath-hack should be disabled" >&5
5979 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5980
5981 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5982 if test "${enable_rpath_hack+set}" = set; then
5983   enableval="$enable_rpath_hack"
5984   test "$enableval" != no && enableval=yes
5985   if test "$enableval" != "yes" ; then
5986     cf_disable_rpath_hack=yes
5987   else
5988     cf_disable_rpath_hack=no
5989   fi
5990 else
5991   enableval=yes
5992   cf_disable_rpath_hack=no
5993
5994 fi;
5995 echo "$as_me:5995: result: $cf_disable_rpath_hack" >&5
5996 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5997 if test "$cf_disable_rpath_hack" = no ; then
5998
5999 echo "$as_me:5999: checking for updated LDFLAGS" >&5
6000 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6001 if test -n "$LD_RPATH_OPT" ; then
6002         echo "$as_me:6002: result: maybe" >&5
6003 echo "${ECHO_T}maybe" >&6
6004
6005         for ac_prog in ldd
6006 do
6007   # Extract the first word of "$ac_prog", so it can be a program name with args.
6008 set dummy $ac_prog; ac_word=$2
6009 echo "$as_me:6009: checking for $ac_word" >&5
6010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6011 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6012   echo $ECHO_N "(cached) $ECHO_C" >&6
6013 else
6014   if test -n "$cf_ldd_prog"; then
6015   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6016 else
6017   ac_save_IFS=$IFS; IFS=$ac_path_separator
6018 ac_dummy="$PATH"
6019 for ac_dir in $ac_dummy; do
6020   IFS=$ac_save_IFS
6021   test -z "$ac_dir" && ac_dir=.
6022   $as_executable_p "$ac_dir/$ac_word" || continue
6023 ac_cv_prog_cf_ldd_prog="$ac_prog"
6024 echo "$as_me:6024: found $ac_dir/$ac_word" >&5
6025 break
6026 done
6027
6028 fi
6029 fi
6030 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6031 if test -n "$cf_ldd_prog"; then
6032   echo "$as_me:6032: result: $cf_ldd_prog" >&5
6033 echo "${ECHO_T}$cf_ldd_prog" >&6
6034 else
6035   echo "$as_me:6035: result: no" >&5
6036 echo "${ECHO_T}no" >&6
6037 fi
6038
6039   test -n "$cf_ldd_prog" && break
6040 done
6041 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6042
6043         cf_rpath_list="/usr/lib /lib"
6044         if test "$cf_ldd_prog" != no
6045         then
6046                 cf_rpath_oops=
6047
6048 cat >conftest.$ac_ext <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6051 #include <stdio.h>
6052 int
6053 main ()
6054 {
6055 printf("Hello");
6056   ;
6057   return 0;
6058 }
6059 _ACEOF
6060 rm -f conftest.$ac_objext conftest$ac_exeext
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062   (eval $ac_link) 2>&5
6063   ac_status=$?
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit $ac_status); } &&
6066          { ac_try='test -s conftest$ac_exeext'
6067   { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit $ac_status); }; }; then
6072   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6073                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6074 else
6075   echo "$as_me: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 fi
6078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6079
6080                 # If we passed the link-test, but get a "not found" on a given library,
6081                 # this could be due to inept reconfiguration of gcc to make it only
6082                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6083                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6084                 # /usr/local libraries.
6085                 if test -n "$cf_rpath_oops"
6086                 then
6087                         for cf_rpath_src in $cf_rpath_oops
6088                         do
6089                                 for cf_rpath_dir in \
6090                                         /usr/local \
6091                                         /usr/pkg \
6092                                         /opt/sfw
6093                                 do
6094                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6095                                         then
6096                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6097
6098 echo "${as_me:-configure}:6098: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6099
6100                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6101                                                 break
6102                                         fi
6103                                 done
6104                         done
6105                 fi
6106         fi
6107
6108         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6109
6110 echo "${as_me:-configure}:6110: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6111
6112 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6113
6114 echo "${as_me:-configure}:6114: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6115
6116 cf_rpath_dst=
6117 for cf_rpath_src in $LDFLAGS
6118 do
6119         case $cf_rpath_src in #(vi
6120         -L*) #(vi
6121
6122                 # check if this refers to a directory which we will ignore
6123                 cf_rpath_skip=no
6124                 if test -n "$cf_rpath_list"
6125                 then
6126                         for cf_rpath_item in $cf_rpath_list
6127                         do
6128                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6129                                 then
6130                                         cf_rpath_skip=yes
6131                                         break
6132                                 fi
6133                         done
6134                 fi
6135
6136                 if test "$cf_rpath_skip" = no
6137                 then
6138                         # transform the option
6139                         if test "$LD_RPATH_OPT" = "-R " ; then
6140                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6141                         else
6142                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6143                         fi
6144
6145                         # if we have not already added this, add it now
6146                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6147                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6148                         then
6149                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6150
6151 echo "${as_me:-configure}:6151: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6152
6153                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6154                         fi
6155                 fi
6156                 ;;
6157         esac
6158         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6159 done
6160 LDFLAGS=$cf_rpath_dst
6161
6162 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6163
6164 echo "${as_me:-configure}:6164: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6165
6166 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6167
6168 echo "${as_me:-configure}:6168: testing ...checking LIBS $LIBS ..." 1>&5
6169
6170 cf_rpath_dst=
6171 for cf_rpath_src in $LIBS
6172 do
6173         case $cf_rpath_src in #(vi
6174         -L*) #(vi
6175
6176                 # check if this refers to a directory which we will ignore
6177                 cf_rpath_skip=no
6178                 if test -n "$cf_rpath_list"
6179                 then
6180                         for cf_rpath_item in $cf_rpath_list
6181                         do
6182                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6183                                 then
6184                                         cf_rpath_skip=yes
6185                                         break
6186                                 fi
6187                         done
6188                 fi
6189
6190                 if test "$cf_rpath_skip" = no
6191                 then
6192                         # transform the option
6193                         if test "$LD_RPATH_OPT" = "-R " ; then
6194                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6195                         else
6196                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6197                         fi
6198
6199                         # if we have not already added this, add it now
6200                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6201                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6202                         then
6203                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6204
6205 echo "${as_me:-configure}:6205: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6206
6207                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6208                         fi
6209                 fi
6210                 ;;
6211         esac
6212         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6213 done
6214 LIBS=$cf_rpath_dst
6215
6216 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6217
6218 echo "${as_me:-configure}:6218: testing ...checked LIBS $LIBS ..." 1>&5
6219
6220         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6221
6222 echo "${as_me:-configure}:6222: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6223
6224 fi
6225
6226 fi
6227
6228 fi
6229
6230 ###############################################################################
6231
6232 ###     use option --disable-overwrite to leave out the link to -lcurses
6233 echo "$as_me:6233: checking if you wish to install ncurses overwriting curses" >&5
6234 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6235
6236 # Check whether --enable-overwrite or --disable-overwrite was given.
6237 if test "${enable_overwrite+set}" = set; then
6238   enableval="$enable_overwrite"
6239   with_overwrite=$enableval
6240 else
6241   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6242 fi;
6243 echo "$as_me:6243: result: $with_overwrite" >&5
6244 echo "${ECHO_T}$with_overwrite" >&6
6245
6246 echo "$as_me:6246: checking if external terminfo-database is used" >&5
6247 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6248
6249 # Check whether --enable-database or --disable-database was given.
6250 if test "${enable_database+set}" = set; then
6251   enableval="$enable_database"
6252   use_database=$enableval
6253 else
6254   use_database=yes
6255 fi;
6256 echo "$as_me:6256: result: $use_database" >&5
6257 echo "${ECHO_T}$use_database" >&6
6258
6259 case $host_os in #(vi
6260 os2*) #(vi
6261         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6262         ;;
6263 *) #(vi
6264         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6265         ;;
6266 esac
6267
6268 NCURSES_USE_DATABASE=0
6269 if test "$use_database" != no ; then
6270         NCURSES_USE_DATABASE=1
6271
6272         echo "$as_me:6272: checking which terminfo source-file will be installed" >&5
6273 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6274
6275 # Check whether --with-database or --without-database was given.
6276 if test "${with_database+set}" = set; then
6277   withval="$with_database"
6278   TERMINFO_SRC=$withval
6279 fi;
6280         echo "$as_me:6280: result: $TERMINFO_SRC" >&5
6281 echo "${ECHO_T}$TERMINFO_SRC" >&6
6282
6283         echo "$as_me:6283: checking whether to use hashed database instead of directory/tree" >&5
6284 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6285
6286 # Check whether --with-hashed-db or --without-hashed-db was given.
6287 if test "${with_hashed_db+set}" = set; then
6288   withval="$with_hashed_db"
6289
6290 else
6291   with_hashed_db=no
6292 fi;
6293         echo "$as_me:6293: result: $with_hashed_db" >&5
6294 echo "${ECHO_T}$with_hashed_db" >&6
6295 else
6296         with_hashed_db=no
6297 fi
6298
6299 echo "$as_me:6299: checking for list of fallback descriptions" >&5
6300 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6301
6302 # Check whether --with-fallbacks or --without-fallbacks was given.
6303 if test "${with_fallbacks+set}" = set; then
6304   withval="$with_fallbacks"
6305   with_fallback=$withval
6306 else
6307   with_fallback=
6308 fi;
6309 echo "$as_me:6309: result: $with_fallback" >&5
6310 echo "${ECHO_T}$with_fallback" >&6
6311 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6312
6313 echo "$as_me:6313: checking if you want modern xterm or antique" >&5
6314 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6315
6316 # Check whether --with-xterm-new or --without-xterm-new was given.
6317 if test "${with_xterm_new+set}" = set; then
6318   withval="$with_xterm_new"
6319   with_xterm_new=$withval
6320 else
6321   with_xterm_new=yes
6322 fi;
6323 case $with_xterm_new in
6324 no)     with_xterm_new=xterm-old;;
6325 *)      with_xterm_new=xterm-new;;
6326 esac
6327 echo "$as_me:6327: result: $with_xterm_new" >&5
6328 echo "${ECHO_T}$with_xterm_new" >&6
6329 WHICH_XTERM=$with_xterm_new
6330
6331 echo "$as_me:6331: checking if xterm backspace sends BS or DEL" >&5
6332 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6333
6334 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6335 if test "${with_xterm_kbs+set}" = set; then
6336   withval="$with_xterm_kbs"
6337   with_xterm_kbs=$withval
6338 else
6339   with_xterm_kbs=BS
6340 fi;
6341 case x$with_xterm_kbs in
6342 xyes|xno|xBS|xbs|x8)
6343         with_xterm_kbs=BS
6344         ;;
6345 xDEL|xdel|x127)
6346         with_xterm_kbs=DEL
6347         ;;
6348 *)
6349         with_xterm_kbs=$withval
6350         ;;
6351 esac
6352 echo "$as_me:6352: result: $with_xterm_kbs" >&5
6353 echo "${ECHO_T}$with_xterm_kbs" >&6
6354 XTERM_KBS=$with_xterm_kbs
6355
6356 MAKE_TERMINFO=
6357 if test "$use_database" = no ; then
6358         TERMINFO="${datadir}/terminfo"
6359         MAKE_TERMINFO="#"
6360 else
6361
6362 echo "$as_me:6362: checking for list of terminfo directories" >&5
6363 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6364
6365 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6366 if test "${with_terminfo_dirs+set}" = set; then
6367   withval="$with_terminfo_dirs"
6368
6369 else
6370   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6371 fi;
6372 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6373 cf_dst_path=
6374 for cf_src_path in $withval
6375 do
6376
6377 if test "x$prefix" != xNONE; then
6378   cf_path_syntax="$prefix"
6379 else
6380   cf_path_syntax="$ac_default_prefix"
6381 fi
6382
6383 case ".$cf_src_path" in #(vi
6384 .\$\(*\)*|.\'*\'*) #(vi
6385   ;;
6386 ..|./*|.\\*) #(vi
6387   ;;
6388 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6389   ;;
6390 .\${*prefix}*|.\${*dir}*) #(vi
6391   eval cf_src_path="$cf_src_path"
6392   case ".$cf_src_path" in #(vi
6393   .NONE/*)
6394     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6395     ;;
6396   esac
6397   ;; #(vi
6398 .no|.NONE/*)
6399   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6400   ;;
6401 *)
6402   { { echo "$as_me:6402: error: expected a pathname, not \"$cf_src_path\"" >&5
6403 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6404    { (exit 1); exit 1; }; }
6405   ;;
6406 esac
6407
6408   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6409   cf_dst_path="${cf_dst_path}${cf_src_path}"
6410 done
6411 IFS="$ac_save_ifs"
6412
6413 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6414 # so we have to check/work around.  We do prefer the result of "eval"...
6415 eval cf_dst_eval="$cf_dst_path"
6416 case "x$cf_dst_eval" in #(vi
6417 xNONE*) #(vi
6418         TERMINFO_DIRS=$cf_dst_path
6419         ;;
6420 *)
6421         TERMINFO_DIRS="$cf_dst_eval"
6422         ;;
6423 esac
6424
6425 echo "$as_me:6425: result: $TERMINFO_DIRS" >&5
6426 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6427 test -n "$TERMINFO_DIRS" &&
6428 cat >>confdefs.h <<EOF
6429 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6430 EOF
6431
6432 echo "$as_me:6432: checking for default terminfo directory" >&5
6433 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6434
6435 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6436 if test "${with_default_terminfo_dir+set}" = set; then
6437   withval="$with_default_terminfo_dir"
6438
6439 else
6440   withval="${TERMINFO:-${datadir}/terminfo}"
6441 fi; if test -n "${datadir}/terminfo" ; then
6442
6443 if test "x$prefix" != xNONE; then
6444   cf_path_syntax="$prefix"
6445 else
6446   cf_path_syntax="$ac_default_prefix"
6447 fi
6448
6449 case ".$withval" in #(vi
6450 .\$\(*\)*|.\'*\'*) #(vi
6451   ;;
6452 ..|./*|.\\*) #(vi
6453   ;;
6454 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6455   ;;
6456 .\${*prefix}*|.\${*dir}*) #(vi
6457   eval withval="$withval"
6458   case ".$withval" in #(vi
6459   .NONE/*)
6460     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6461     ;;
6462   esac
6463   ;; #(vi
6464 .no|.NONE/*)
6465   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6466   ;;
6467 *)
6468   { { echo "$as_me:6468: error: expected a pathname, not \"$withval\"" >&5
6469 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6470    { (exit 1); exit 1; }; }
6471   ;;
6472 esac
6473
6474 fi
6475 eval TERMINFO="$withval"
6476
6477 echo "$as_me:6477: result: $TERMINFO" >&5
6478 echo "${ECHO_T}$TERMINFO" >&6
6479
6480 cat >>confdefs.h <<EOF
6481 #define TERMINFO "$TERMINFO"
6482 EOF
6483
6484 fi
6485
6486 ###     use option --disable-big-core to make tic run on small machines
6487 ###     We need 4Mb, check if we can allocate 50% more than that.
6488 echo "$as_me:6488: checking if big-core option selected" >&5
6489 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6490
6491 # Check whether --enable-big-core or --disable-big-core was given.
6492 if test "${enable_big_core+set}" = set; then
6493   enableval="$enable_big_core"
6494   with_big_core=$enableval
6495 else
6496   if test "$cross_compiling" = yes; then
6497   with_big_core=no
6498 else
6499   cat >conftest.$ac_ext <<_ACEOF
6500 #line 6500 "configure"
6501 #include "confdefs.h"
6502
6503 #include <stdlib.h>
6504 #include <string.h>
6505 int main() {
6506         unsigned long n = 6000000L;
6507         char *s = malloc(n);
6508         if (s != 0)
6509                 s[0] = s[n-1] = 0;
6510         ${cf_cv_main_return:-return}(s == 0);
6511 }
6512 _ACEOF
6513 rm -f conftest$ac_exeext
6514 if { (eval echo "$as_me:6514: \"$ac_link\"") >&5
6515   (eval $ac_link) 2>&5
6516   ac_status=$?
6517   echo "$as_me:6517: \$? = $ac_status" >&5
6518   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6519   { (eval echo "$as_me:6519: \"$ac_try\"") >&5
6520   (eval $ac_try) 2>&5
6521   ac_status=$?
6522   echo "$as_me:6522: \$? = $ac_status" >&5
6523   (exit $ac_status); }; }; then
6524   with_big_core=yes
6525 else
6526   echo "$as_me: program exited with status $ac_status" >&5
6527 echo "$as_me: failed program was:" >&5
6528 cat conftest.$ac_ext >&5
6529 with_big_core=no
6530 fi
6531 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6532 fi
6533 fi;
6534 echo "$as_me:6534: result: $with_big_core" >&5
6535 echo "${ECHO_T}$with_big_core" >&6
6536 test "x$with_big_core" = "xyes" &&
6537 cat >>confdefs.h <<\EOF
6538 #define HAVE_BIG_CORE 1
6539 EOF
6540
6541 ### ISO C only guarantees 512-char strings, we have tables which load faster
6542 ### when constructed using "big" strings.  More than the C compiler, the awk
6543 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6544 echo "$as_me:6544: checking if big-strings option selected" >&5
6545 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6546
6547 # Check whether --enable-big-strings or --disable-big-strings was given.
6548 if test "${enable_big_strings+set}" = set; then
6549   enableval="$enable_big_strings"
6550   with_big_strings=$enableval
6551 else
6552
6553         case x$AWK in #(vi
6554         x)
6555                 eval with_big_strings=no
6556                 ;;
6557         *) #(vi
6558                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6559                         | $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
6560                         eval with_big_strings=yes
6561                 else
6562                         eval with_big_strings=no
6563                 fi
6564                 ;;
6565         esac
6566
6567 fi;
6568 echo "$as_me:6568: result: $with_big_strings" >&5
6569 echo "${ECHO_T}$with_big_strings" >&6
6570
6571 USE_BIG_STRINGS=0
6572 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6573
6574 ###     use option --enable-termcap to compile in the termcap fallback support
6575 echo "$as_me:6575: checking if you want termcap-fallback support" >&5
6576 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6577
6578 # Check whether --enable-termcap or --disable-termcap was given.
6579 if test "${enable_termcap+set}" = set; then
6580   enableval="$enable_termcap"
6581   with_termcap=$enableval
6582 else
6583   with_termcap=no
6584 fi;
6585 echo "$as_me:6585: result: $with_termcap" >&5
6586 echo "${ECHO_T}$with_termcap" >&6
6587
6588 NCURSES_USE_TERMCAP=0
6589 if test "x$with_termcap" != "xyes" ; then
6590         if test "$use_database" = no ; then
6591                 if test -z "$with_fallback" ; then
6592                         { { echo "$as_me:6592: error: You have disabled the database w/o specifying fallbacks" >&5
6593 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6594    { (exit 1); exit 1; }; }
6595                 fi
6596         fi
6597
6598 cat >>confdefs.h <<\EOF
6599 #define PURE_TERMINFO 1
6600 EOF
6601
6602 else
6603
6604         if test "$with_ticlib" != no ; then
6605                 { { echo "$as_me:6605: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6606 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6607    { (exit 1); exit 1; }; }
6608         fi
6609
6610         NCURSES_USE_TERMCAP=1
6611         echo "$as_me:6611: checking for list of termcap files" >&5
6612 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6613
6614 # Check whether --with-termpath or --without-termpath was given.
6615 if test "${with_termpath+set}" = set; then
6616   withval="$with_termpath"
6617
6618 else
6619   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6620 fi;
6621 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6622 cf_dst_path=
6623 for cf_src_path in $withval
6624 do
6625
6626 if test "x$prefix" != xNONE; then
6627   cf_path_syntax="$prefix"
6628 else
6629   cf_path_syntax="$ac_default_prefix"
6630 fi
6631
6632 case ".$cf_src_path" in #(vi
6633 .\$\(*\)*|.\'*\'*) #(vi
6634   ;;
6635 ..|./*|.\\*) #(vi
6636   ;;
6637 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6638   ;;
6639 .\${*prefix}*|.\${*dir}*) #(vi
6640   eval cf_src_path="$cf_src_path"
6641   case ".$cf_src_path" in #(vi
6642   .NONE/*)
6643     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6644     ;;
6645   esac
6646   ;; #(vi
6647 .no|.NONE/*)
6648   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6649   ;;
6650 *)
6651   { { echo "$as_me:6651: error: expected a pathname, not \"$cf_src_path\"" >&5
6652 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6653    { (exit 1); exit 1; }; }
6654   ;;
6655 esac
6656
6657   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6658   cf_dst_path="${cf_dst_path}${cf_src_path}"
6659 done
6660 IFS="$ac_save_ifs"
6661
6662 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6663 # so we have to check/work around.  We do prefer the result of "eval"...
6664 eval cf_dst_eval="$cf_dst_path"
6665 case "x$cf_dst_eval" in #(vi
6666 xNONE*) #(vi
6667         TERMPATH=$cf_dst_path
6668         ;;
6669 *)
6670         TERMPATH="$cf_dst_eval"
6671         ;;
6672 esac
6673
6674         echo "$as_me:6674: result: $TERMPATH" >&5
6675 echo "${ECHO_T}$TERMPATH" >&6
6676         test -n "$TERMPATH" &&
6677 cat >>confdefs.h <<EOF
6678 #define TERMPATH "$TERMPATH"
6679 EOF
6680
6681         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6682         echo "$as_me:6682: checking if fast termcap-loader is needed" >&5
6683 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6684
6685 # Check whether --enable-getcap or --disable-getcap was given.
6686 if test "${enable_getcap+set}" = set; then
6687   enableval="$enable_getcap"
6688   with_getcap=$enableval
6689 else
6690   with_getcap=no
6691 fi;
6692         echo "$as_me:6692: result: $with_getcap" >&5
6693 echo "${ECHO_T}$with_getcap" >&6
6694         test "x$with_getcap" = "xyes" &&
6695 cat >>confdefs.h <<\EOF
6696 #define USE_GETCAP 1
6697 EOF
6698
6699         echo "$as_me:6699: checking if translated termcaps will be cached in ~/.terminfo" >&5
6700 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6701
6702 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6703 if test "${enable_getcap_cache+set}" = set; then
6704   enableval="$enable_getcap_cache"
6705   with_getcap_cache=$enableval
6706 else
6707   with_getcap_cache=no
6708 fi;
6709         echo "$as_me:6709: result: $with_getcap_cache" >&5
6710 echo "${ECHO_T}$with_getcap_cache" >&6
6711         test "x$with_getcap_cache" = "xyes" &&
6712 cat >>confdefs.h <<\EOF
6713 #define USE_GETCAP_CACHE 1
6714 EOF
6715
6716 fi
6717
6718 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6719 echo "$as_me:6719: checking if ~/.terminfo is wanted" >&5
6720 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6721
6722 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6723 if test "${enable_home_terminfo+set}" = set; then
6724   enableval="$enable_home_terminfo"
6725   with_home_terminfo=$enableval
6726 else
6727   with_home_terminfo=yes
6728 fi;
6729 echo "$as_me:6729: result: $with_home_terminfo" >&5
6730 echo "${ECHO_T}$with_home_terminfo" >&6
6731 test "x$with_home_terminfo" = "xyes" &&
6732 cat >>confdefs.h <<\EOF
6733 #define USE_HOME_TERMINFO 1
6734 EOF
6735
6736 echo "$as_me:6736: checking if you want to use restricted environment when running as root" >&5
6737 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6738
6739 # Check whether --enable-root-environ or --disable-root-environ was given.
6740 if test "${enable_root_environ+set}" = set; then
6741   enableval="$enable_root_environ"
6742   with_root_environ=$enableval
6743 else
6744   with_root_environ=yes
6745 fi;
6746 echo "$as_me:6746: result: $with_root_environ" >&5
6747 echo "${ECHO_T}$with_root_environ" >&6
6748 test "x$with_root_environ" = xyes &&
6749 cat >>confdefs.h <<\EOF
6750 #define USE_ROOT_ENVIRON 1
6751 EOF
6752
6753 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6754 ###   to reduce storage requirements for the terminfo database.
6755
6756 for ac_func in \
6757         remove \
6758         unlink
6759 do
6760 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6761 echo "$as_me:6761: checking for $ac_func" >&5
6762 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6763 if eval "test \"\${$as_ac_var+set}\" = set"; then
6764   echo $ECHO_N "(cached) $ECHO_C" >&6
6765 else
6766   cat >conftest.$ac_ext <<_ACEOF
6767 #line 6767 "configure"
6768 #include "confdefs.h"
6769 /* System header to define __stub macros and hopefully few prototypes,
6770     which can conflict with char $ac_func (); below.  */
6771 #include <assert.h>
6772 /* Override any gcc2 internal prototype to avoid an error.  */
6773 #ifdef __cplusplus
6774 extern "C"
6775 #endif
6776 /* We use char because int might match the return type of a gcc2
6777    builtin and then its argument prototype would still apply.  */
6778 char $ac_func ();
6779 char (*f) ();
6780
6781 int
6782 main ()
6783 {
6784 /* The GNU C library defines this for functions which it implements
6785     to always fail with ENOSYS.  Some functions are actually named
6786     something starting with __ and the normal name is an alias.  */
6787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6788 choke me
6789 #else
6790 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6791 #endif
6792
6793   ;
6794   return 0;
6795 }
6796 _ACEOF
6797 rm -f conftest.$ac_objext conftest$ac_exeext
6798 if { (eval echo "$as_me:6798: \"$ac_link\"") >&5
6799   (eval $ac_link) 2>&5
6800   ac_status=$?
6801   echo "$as_me:6801: \$? = $ac_status" >&5
6802   (exit $ac_status); } &&
6803          { ac_try='test -s conftest$ac_exeext'
6804   { (eval echo "$as_me:6804: \"$ac_try\"") >&5
6805   (eval $ac_try) 2>&5
6806   ac_status=$?
6807   echo "$as_me:6807: \$? = $ac_status" >&5
6808   (exit $ac_status); }; }; then
6809   eval "$as_ac_var=yes"
6810 else
6811   echo "$as_me: failed program was:" >&5
6812 cat conftest.$ac_ext >&5
6813 eval "$as_ac_var=no"
6814 fi
6815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6816 fi
6817 echo "$as_me:6817: result: `eval echo '${'$as_ac_var'}'`" >&5
6818 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6819 if test `eval echo '${'$as_ac_var'}'` = yes; then
6820   cat >>confdefs.h <<EOF
6821 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6822 EOF
6823
6824 fi
6825 done
6826
6827 if test "$cross_compiling" = yes ; then
6828
6829 for ac_func in \
6830                 link \
6831                 symlink
6832 do
6833 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6834 echo "$as_me:6834: checking for $ac_func" >&5
6835 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6836 if eval "test \"\${$as_ac_var+set}\" = set"; then
6837   echo $ECHO_N "(cached) $ECHO_C" >&6
6838 else
6839   cat >conftest.$ac_ext <<_ACEOF
6840 #line 6840 "configure"
6841 #include "confdefs.h"
6842 /* System header to define __stub macros and hopefully few prototypes,
6843     which can conflict with char $ac_func (); below.  */
6844 #include <assert.h>
6845 /* Override any gcc2 internal prototype to avoid an error.  */
6846 #ifdef __cplusplus
6847 extern "C"
6848 #endif
6849 /* We use char because int might match the return type of a gcc2
6850    builtin and then its argument prototype would still apply.  */
6851 char $ac_func ();
6852 char (*f) ();
6853
6854 int
6855 main ()
6856 {
6857 /* The GNU C library defines this for functions which it implements
6858     to always fail with ENOSYS.  Some functions are actually named
6859     something starting with __ and the normal name is an alias.  */
6860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6861 choke me
6862 #else
6863 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6864 #endif
6865
6866   ;
6867   return 0;
6868 }
6869 _ACEOF
6870 rm -f conftest.$ac_objext conftest$ac_exeext
6871 if { (eval echo "$as_me:6871: \"$ac_link\"") >&5
6872   (eval $ac_link) 2>&5
6873   ac_status=$?
6874   echo "$as_me:6874: \$? = $ac_status" >&5
6875   (exit $ac_status); } &&
6876          { ac_try='test -s conftest$ac_exeext'
6877   { (eval echo "$as_me:6877: \"$ac_try\"") >&5
6878   (eval $ac_try) 2>&5
6879   ac_status=$?
6880   echo "$as_me:6880: \$? = $ac_status" >&5
6881   (exit $ac_status); }; }; then
6882   eval "$as_ac_var=yes"
6883 else
6884   echo "$as_me: failed program was:" >&5
6885 cat conftest.$ac_ext >&5
6886 eval "$as_ac_var=no"
6887 fi
6888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6889 fi
6890 echo "$as_me:6890: result: `eval echo '${'$as_ac_var'}'`" >&5
6891 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6892 if test `eval echo '${'$as_ac_var'}'` = yes; then
6893   cat >>confdefs.h <<EOF
6894 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6895 EOF
6896
6897 fi
6898 done
6899
6900 else
6901         echo "$as_me:6901: checking if link/symlink functions work" >&5
6902 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6903 if test "${cf_cv_link_funcs+set}" = set; then
6904   echo $ECHO_N "(cached) $ECHO_C" >&6
6905 else
6906
6907                 cf_cv_link_funcs=
6908                 for cf_func in link symlink ; do
6909                         if test "$cross_compiling" = yes; then
6910
6911                         eval 'ac_cv_func_'$cf_func'=error'
6912 else
6913   cat >conftest.$ac_ext <<_ACEOF
6914 #line 6914 "configure"
6915 #include "confdefs.h"
6916
6917 #include <sys/types.h>
6918 #include <sys/stat.h>
6919 #ifdef HAVE_UNISTD_H
6920 #include <unistd.h>
6921 #endif
6922 int main()
6923 {
6924         int fail = 0;
6925         char *src = "config.log";
6926         char *dst = "conftest.chk";
6927         struct stat src_sb;
6928         struct stat dst_sb;
6929
6930         stat(src, &src_sb);
6931         fail = ($cf_func("config.log", "conftest.chk") < 0)
6932             || (stat(dst, &dst_sb) < 0)
6933             || (dst_sb.st_mtime != src_sb.st_mtime);
6934 #ifdef HAVE_UNLINK
6935         unlink(dst);
6936 #else
6937         remove(dst);
6938 #endif
6939         ${cf_cv_main_return:-return} (fail);
6940 }
6941
6942 _ACEOF
6943 rm -f conftest$ac_exeext
6944 if { (eval echo "$as_me:6944: \"$ac_link\"") >&5
6945   (eval $ac_link) 2>&5
6946   ac_status=$?
6947   echo "$as_me:6947: \$? = $ac_status" >&5
6948   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6949   { (eval echo "$as_me:6949: \"$ac_try\"") >&5
6950   (eval $ac_try) 2>&5
6951   ac_status=$?
6952   echo "$as_me:6952: \$? = $ac_status" >&5
6953   (exit $ac_status); }; }; then
6954
6955                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6956                         eval 'ac_cv_func_'$cf_func'=yes'
6957 else
6958   echo "$as_me: program exited with status $ac_status" >&5
6959 echo "$as_me: failed program was:" >&5
6960 cat conftest.$ac_ext >&5
6961
6962                         eval 'ac_cv_func_'$cf_func'=no'
6963 fi
6964 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6965 fi
6966                 done
6967                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6968
6969 fi
6970 echo "$as_me:6970: result: $cf_cv_link_funcs" >&5
6971 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6972         test "$ac_cv_func_link"    = yes &&
6973 cat >>confdefs.h <<\EOF
6974 #define HAVE_LINK 1
6975 EOF
6976
6977         test "$ac_cv_func_symlink" = yes &&
6978 cat >>confdefs.h <<\EOF
6979 #define HAVE_SYMLINK 1
6980 EOF
6981
6982 fi
6983
6984 with_links=no
6985 with_symlinks=no
6986
6987 # soft links (symbolic links) are useful for some systems where hard links do
6988 # not work, or to make it simpler to copy terminfo trees around.
6989 if test "x$ac_cv_func_symlink" = xyes ; then
6990     echo "$as_me:6990: checking if tic should use symbolic links" >&5
6991 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6992
6993 # Check whether --enable-symlinks or --disable-symlinks was given.
6994 if test "${enable_symlinks+set}" = set; then
6995   enableval="$enable_symlinks"
6996   with_symlinks=$enableval
6997 else
6998   with_symlinks=no
6999 fi;
7000     echo "$as_me:7000: result: $with_symlinks" >&5
7001 echo "${ECHO_T}$with_symlinks" >&6
7002 fi
7003
7004 # If we have hard links and did not choose to use soft links instead, there is
7005 # no reason to make this choice optional - use the hard links.
7006 if test "$with_symlinks" = no ; then
7007     echo "$as_me:7007: checking if tic should use hard links" >&5
7008 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7009     if test "x$ac_cv_func_link" = xyes ; then
7010         with_links=yes
7011     else
7012         with_links=no
7013     fi
7014     echo "$as_me:7014: result: $with_links" >&5
7015 echo "${ECHO_T}$with_links" >&6
7016 fi
7017
7018 test "x$with_links" = xyes &&
7019 cat >>confdefs.h <<\EOF
7020 #define USE_LINKS 1
7021 EOF
7022
7023 test "x$with_symlinks" = xyes &&
7024 cat >>confdefs.h <<\EOF
7025 #define USE_SYMLINKS 1
7026 EOF
7027
7028 ###   use option --enable-broken-linker to force on use of broken-linker support
7029 echo "$as_me:7029: checking if you want broken-linker support code" >&5
7030 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7031
7032 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7033 if test "${enable_broken_linker+set}" = set; then
7034   enableval="$enable_broken_linker"
7035   with_broken_linker=$enableval
7036 else
7037   with_broken_linker=${BROKEN_LINKER:-no}
7038 fi;
7039 echo "$as_me:7039: result: $with_broken_linker" >&5
7040 echo "${ECHO_T}$with_broken_linker" >&6
7041
7042 BROKEN_LINKER=0
7043 if test "x$with_broken_linker" = xyes ; then
7044
7045 cat >>confdefs.h <<\EOF
7046 #define BROKEN_LINKER 1
7047 EOF
7048
7049         BROKEN_LINKER=1
7050 elif test "$DFT_LWR_MODEL" = shared ; then
7051         case $cf_cv_system_name in #(vi
7052         cygwin*)
7053
7054 cat >>confdefs.h <<\EOF
7055 #define BROKEN_LINKER 1
7056 EOF
7057
7058                 BROKEN_LINKER=1
7059                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7060
7061 echo "${as_me:-configure}:7061: testing cygwin linker is broken anyway ..." 1>&5
7062
7063                 ;;
7064         esac
7065 fi
7066
7067 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7068 echo "$as_me:7068: checking if tputs should process BSD-style prefix padding" >&5
7069 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7070
7071 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7072 if test "${enable_bsdpad+set}" = set; then
7073   enableval="$enable_bsdpad"
7074   with_bsdpad=$enableval
7075 else
7076   with_bsdpad=no
7077 fi;
7078 echo "$as_me:7078: result: $with_bsdpad" >&5
7079 echo "${ECHO_T}$with_bsdpad" >&6
7080 test "x$with_bsdpad" = xyes &&
7081 cat >>confdefs.h <<\EOF
7082 #define BSD_TPUTS 1
7083 EOF
7084
7085 ###   use option --enable-widec to turn on use of wide-character support
7086 NCURSES_CH_T=chtype
7087 NCURSES_LIBUTF8=0
7088
7089 NEED_WCHAR_H=0
7090 NCURSES_MBSTATE_T=0
7091 NCURSES_WCHAR_T=0
7092 NCURSES_WINT_T=0
7093
7094 # Check to define _XOPEN_SOURCE "automatically"
7095
7096 cf_XOPEN_SOURCE=500
7097 cf_POSIX_C_SOURCE=199506L
7098 cf_xopen_source=
7099
7100 case $host_os in #(vi
7101 aix[4-7]*) #(vi
7102         cf_xopen_source="-D_ALL_SOURCE"
7103         ;;
7104 cygwin) #(vi
7105         cf_XOPEN_SOURCE=600
7106         ;;
7107 darwin[0-8].*) #(vi
7108         cf_xopen_source="-D_APPLE_C_SOURCE"
7109         ;;
7110 darwin*) #(vi
7111         cf_xopen_source="-D_DARWIN_C_SOURCE"
7112         cf_XOPEN_SOURCE=
7113         ;;
7114 freebsd*|dragonfly*) #(vi
7115         # 5.x headers associate
7116         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7117         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7118         cf_POSIX_C_SOURCE=200112L
7119         cf_XOPEN_SOURCE=600
7120         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7121         ;;
7122 hpux11*) #(vi
7123         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7124         ;;
7125 hpux*) #(vi
7126         cf_xopen_source="-D_HPUX_SOURCE"
7127         ;;
7128 irix[56].*) #(vi
7129         cf_xopen_source="-D_SGI_SOURCE"
7130         cf_XOPEN_SOURCE=
7131         ;;
7132 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7133
7134 echo "$as_me:7134: checking if we must define _GNU_SOURCE" >&5
7135 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7136 if test "${cf_cv_gnu_source+set}" = set; then
7137   echo $ECHO_N "(cached) $ECHO_C" >&6
7138 else
7139
7140 cat >conftest.$ac_ext <<_ACEOF
7141 #line 7141 "configure"
7142 #include "confdefs.h"
7143 #include <sys/types.h>
7144 int
7145 main ()
7146 {
7147
7148 #ifndef _XOPEN_SOURCE
7149 make an error
7150 #endif
7151   ;
7152   return 0;
7153 }
7154 _ACEOF
7155 rm -f conftest.$ac_objext
7156 if { (eval echo "$as_me:7156: \"$ac_compile\"") >&5
7157   (eval $ac_compile) 2>&5
7158   ac_status=$?
7159   echo "$as_me:7159: \$? = $ac_status" >&5
7160   (exit $ac_status); } &&
7161          { ac_try='test -s conftest.$ac_objext'
7162   { (eval echo "$as_me:7162: \"$ac_try\"") >&5
7163   (eval $ac_try) 2>&5
7164   ac_status=$?
7165   echo "$as_me:7165: \$? = $ac_status" >&5
7166   (exit $ac_status); }; }; then
7167   cf_cv_gnu_source=no
7168 else
7169   echo "$as_me: failed program was:" >&5
7170 cat conftest.$ac_ext >&5
7171 cf_save="$CPPFLAGS"
7172          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7173          cat >conftest.$ac_ext <<_ACEOF
7174 #line 7174 "configure"
7175 #include "confdefs.h"
7176 #include <sys/types.h>
7177 int
7178 main ()
7179 {
7180
7181 #ifdef _XOPEN_SOURCE
7182 make an error
7183 #endif
7184   ;
7185   return 0;
7186 }
7187 _ACEOF
7188 rm -f conftest.$ac_objext
7189 if { (eval echo "$as_me:7189: \"$ac_compile\"") >&5
7190   (eval $ac_compile) 2>&5
7191   ac_status=$?
7192   echo "$as_me:7192: \$? = $ac_status" >&5
7193   (exit $ac_status); } &&
7194          { ac_try='test -s conftest.$ac_objext'
7195   { (eval echo "$as_me:7195: \"$ac_try\"") >&5
7196   (eval $ac_try) 2>&5
7197   ac_status=$?
7198   echo "$as_me:7198: \$? = $ac_status" >&5
7199   (exit $ac_status); }; }; then
7200   cf_cv_gnu_source=no
7201 else
7202   echo "$as_me: failed program was:" >&5
7203 cat conftest.$ac_ext >&5
7204 cf_cv_gnu_source=yes
7205 fi
7206 rm -f conftest.$ac_objext conftest.$ac_ext
7207         CPPFLAGS="$cf_save"
7208
7209 fi
7210 rm -f conftest.$ac_objext conftest.$ac_ext
7211
7212 fi
7213 echo "$as_me:7213: result: $cf_cv_gnu_source" >&5
7214 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7215 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7216
7217         ;;
7218 mirbsd*) #(vi
7219         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7220         cf_XOPEN_SOURCE=
7221
7222 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7223
7224 cf_save_CFLAGS="$CFLAGS"
7225 cf_save_CPPFLAGS="$CPPFLAGS"
7226
7227 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7228         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7229                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7230
7231 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7232         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7233                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7234
7235 echo "$as_me:7235: checking if we should define _POSIX_C_SOURCE" >&5
7236 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7237 if test "${cf_cv_posix_c_source+set}" = set; then
7238   echo $ECHO_N "(cached) $ECHO_C" >&6
7239 else
7240
7241 echo "${as_me:-configure}:7241: testing if the symbol is already defined go no further ..." 1>&5
7242
7243         cat >conftest.$ac_ext <<_ACEOF
7244 #line 7244 "configure"
7245 #include "confdefs.h"
7246 #include <sys/types.h>
7247 int
7248 main ()
7249 {
7250
7251 #ifndef _POSIX_C_SOURCE
7252 make an error
7253 #endif
7254   ;
7255   return 0;
7256 }
7257 _ACEOF
7258 rm -f conftest.$ac_objext
7259 if { (eval echo "$as_me:7259: \"$ac_compile\"") >&5
7260   (eval $ac_compile) 2>&5
7261   ac_status=$?
7262   echo "$as_me:7262: \$? = $ac_status" >&5
7263   (exit $ac_status); } &&
7264          { ac_try='test -s conftest.$ac_objext'
7265   { (eval echo "$as_me:7265: \"$ac_try\"") >&5
7266   (eval $ac_try) 2>&5
7267   ac_status=$?
7268   echo "$as_me:7268: \$? = $ac_status" >&5
7269   (exit $ac_status); }; }; then
7270   cf_cv_posix_c_source=no
7271 else
7272   echo "$as_me: failed program was:" >&5
7273 cat conftest.$ac_ext >&5
7274 cf_want_posix_source=no
7275          case .$cf_POSIX_C_SOURCE in #(vi
7276          .[12]??*) #(vi
7277                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7278                 ;;
7279          .2) #(vi
7280                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7281                 cf_want_posix_source=yes
7282                 ;;
7283          .*)
7284                 cf_want_posix_source=yes
7285                 ;;
7286          esac
7287          if test "$cf_want_posix_source" = yes ; then
7288                 cat >conftest.$ac_ext <<_ACEOF
7289 #line 7289 "configure"
7290 #include "confdefs.h"
7291 #include <sys/types.h>
7292 int
7293 main ()
7294 {
7295
7296 #ifdef _POSIX_SOURCE
7297 make an error
7298 #endif
7299   ;
7300   return 0;
7301 }
7302 _ACEOF
7303 rm -f conftest.$ac_objext
7304 if { (eval echo "$as_me:7304: \"$ac_compile\"") >&5
7305   (eval $ac_compile) 2>&5
7306   ac_status=$?
7307   echo "$as_me:7307: \$? = $ac_status" >&5
7308   (exit $ac_status); } &&
7309          { ac_try='test -s conftest.$ac_objext'
7310   { (eval echo "$as_me:7310: \"$ac_try\"") >&5
7311   (eval $ac_try) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); }; }; then
7315   :
7316 else
7317   echo "$as_me: failed program was:" >&5
7318 cat conftest.$ac_ext >&5
7319 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7320 fi
7321 rm -f conftest.$ac_objext conftest.$ac_ext
7322          fi
7323
7324 echo "${as_me:-configure}:7324: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7325
7326          CFLAGS="$cf_trim_CFLAGS"
7327          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7328
7329 echo "${as_me:-configure}:7329: testing if the second compile does not leave our definition intact error ..." 1>&5
7330
7331          cat >conftest.$ac_ext <<_ACEOF
7332 #line 7332 "configure"
7333 #include "confdefs.h"
7334 #include <sys/types.h>
7335 int
7336 main ()
7337 {
7338
7339 #ifndef _POSIX_C_SOURCE
7340 make an error
7341 #endif
7342   ;
7343   return 0;
7344 }
7345 _ACEOF
7346 rm -f conftest.$ac_objext
7347 if { (eval echo "$as_me:7347: \"$ac_compile\"") >&5
7348   (eval $ac_compile) 2>&5
7349   ac_status=$?
7350   echo "$as_me:7350: \$? = $ac_status" >&5
7351   (exit $ac_status); } &&
7352          { ac_try='test -s conftest.$ac_objext'
7353   { (eval echo "$as_me:7353: \"$ac_try\"") >&5
7354   (eval $ac_try) 2>&5
7355   ac_status=$?
7356   echo "$as_me:7356: \$? = $ac_status" >&5
7357   (exit $ac_status); }; }; then
7358   :
7359 else
7360   echo "$as_me: failed program was:" >&5
7361 cat conftest.$ac_ext >&5
7362 cf_cv_posix_c_source=no
7363 fi
7364 rm -f conftest.$ac_objext conftest.$ac_ext
7365          CFLAGS="$cf_save_CFLAGS"
7366          CPPFLAGS="$cf_save_CPPFLAGS"
7367
7368 fi
7369 rm -f conftest.$ac_objext conftest.$ac_ext
7370
7371 fi
7372 echo "$as_me:7372: result: $cf_cv_posix_c_source" >&5
7373 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7374
7375 if test "$cf_cv_posix_c_source" != no ; then
7376         CFLAGS="$cf_trim_CFLAGS"
7377         CPPFLAGS="$cf_trim_CPPFLAGS"
7378
7379 cf_fix_cppflags=no
7380 cf_new_cflags=
7381 cf_new_cppflags=
7382 cf_new_extra_cppflags=
7383
7384 for cf_add_cflags in $cf_cv_posix_c_source
7385 do
7386 case $cf_fix_cppflags in
7387 no)
7388         case $cf_add_cflags in #(vi
7389         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7390                 case $cf_add_cflags in
7391                 -D*)
7392                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7393
7394                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7395                                 && test -z "${cf_tst_cflags}" \
7396                                 && cf_fix_cppflags=yes
7397
7398                         if test $cf_fix_cppflags = yes ; then
7399                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7400                                 continue
7401                         elif test "${cf_tst_cflags}" = "\"'" ; then
7402                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7403                                 continue
7404                         fi
7405                         ;;
7406                 esac
7407                 case "$CPPFLAGS" in
7408                 *$cf_add_cflags) #(vi
7409                         ;;
7410                 *) #(vi
7411                         case $cf_add_cflags in #(vi
7412                         -D*)
7413                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7414
7415 CPPFLAGS=`echo "$CPPFLAGS" | \
7416         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7417                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7418
7419                                 ;;
7420                         esac
7421                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7422                         ;;
7423                 esac
7424                 ;;
7425         *)
7426                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7427                 ;;
7428         esac
7429         ;;
7430 yes)
7431         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7432
7433         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7434
7435         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7436                 && test -z "${cf_tst_cflags}" \
7437                 && cf_fix_cppflags=no
7438         ;;
7439 esac
7440 done
7441
7442 if test -n "$cf_new_cflags" ; then
7443
7444         CFLAGS="$CFLAGS $cf_new_cflags"
7445 fi
7446
7447 if test -n "$cf_new_cppflags" ; then
7448
7449         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7450 fi
7451
7452 if test -n "$cf_new_extra_cppflags" ; then
7453
7454         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7455 fi
7456
7457 fi
7458
7459         ;;
7460 netbsd*) #(vi
7461         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7462         ;;
7463 openbsd[4-9]*) #(vi
7464         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7465         cf_xopen_source="-D_BSD_SOURCE"
7466         cf_XOPEN_SOURCE=600
7467         ;;
7468 openbsd*) #(vi
7469         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7470         ;;
7471 osf[45]*) #(vi
7472         cf_xopen_source="-D_OSF_SOURCE"
7473         ;;
7474 nto-qnx*) #(vi
7475         cf_xopen_source="-D_QNX_SOURCE"
7476         ;;
7477 sco*) #(vi
7478         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7479         ;;
7480 solaris2.*) #(vi
7481         cf_xopen_source="-D__EXTENSIONS__"
7482         ;;
7483 *)
7484
7485 echo "$as_me:7485: checking if we should define _XOPEN_SOURCE" >&5
7486 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7487 if test "${cf_cv_xopen_source+set}" = set; then
7488   echo $ECHO_N "(cached) $ECHO_C" >&6
7489 else
7490
7491         cat >conftest.$ac_ext <<_ACEOF
7492 #line 7492 "configure"
7493 #include "confdefs.h"
7494
7495 #include <stdlib.h>
7496 #include <string.h>
7497 #include <sys/types.h>
7498
7499 int
7500 main ()
7501 {
7502
7503 #ifndef _XOPEN_SOURCE
7504 make an error
7505 #endif
7506   ;
7507   return 0;
7508 }
7509 _ACEOF
7510 rm -f conftest.$ac_objext
7511 if { (eval echo "$as_me:7511: \"$ac_compile\"") >&5
7512   (eval $ac_compile) 2>&5
7513   ac_status=$?
7514   echo "$as_me:7514: \$? = $ac_status" >&5
7515   (exit $ac_status); } &&
7516          { ac_try='test -s conftest.$ac_objext'
7517   { (eval echo "$as_me:7517: \"$ac_try\"") >&5
7518   (eval $ac_try) 2>&5
7519   ac_status=$?
7520   echo "$as_me:7520: \$? = $ac_status" >&5
7521   (exit $ac_status); }; }; then
7522   cf_cv_xopen_source=no
7523 else
7524   echo "$as_me: failed program was:" >&5
7525 cat conftest.$ac_ext >&5
7526 cf_save="$CPPFLAGS"
7527          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7528          cat >conftest.$ac_ext <<_ACEOF
7529 #line 7529 "configure"
7530 #include "confdefs.h"
7531
7532 #include <stdlib.h>
7533 #include <string.h>
7534 #include <sys/types.h>
7535
7536 int
7537 main ()
7538 {
7539
7540 #ifdef _XOPEN_SOURCE
7541 make an error
7542 #endif
7543   ;
7544   return 0;
7545 }
7546 _ACEOF
7547 rm -f conftest.$ac_objext
7548 if { (eval echo "$as_me:7548: \"$ac_compile\"") >&5
7549   (eval $ac_compile) 2>&5
7550   ac_status=$?
7551   echo "$as_me:7551: \$? = $ac_status" >&5
7552   (exit $ac_status); } &&
7553          { ac_try='test -s conftest.$ac_objext'
7554   { (eval echo "$as_me:7554: \"$ac_try\"") >&5
7555   (eval $ac_try) 2>&5
7556   ac_status=$?
7557   echo "$as_me:7557: \$? = $ac_status" >&5
7558   (exit $ac_status); }; }; then
7559   cf_cv_xopen_source=no
7560 else
7561   echo "$as_me: failed program was:" >&5
7562 cat conftest.$ac_ext >&5
7563 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7564 fi
7565 rm -f conftest.$ac_objext conftest.$ac_ext
7566         CPPFLAGS="$cf_save"
7567
7568 fi
7569 rm -f conftest.$ac_objext conftest.$ac_ext
7570
7571 fi
7572 echo "$as_me:7572: result: $cf_cv_xopen_source" >&5
7573 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7574
7575 if test "$cf_cv_xopen_source" != no ; then
7576
7577 CFLAGS=`echo "$CFLAGS" | \
7578         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7579                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7580
7581 CPPFLAGS=`echo "$CPPFLAGS" | \
7582         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7583                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7584
7585         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7586
7587 cf_fix_cppflags=no
7588 cf_new_cflags=
7589 cf_new_cppflags=
7590 cf_new_extra_cppflags=
7591
7592 for cf_add_cflags in $cf_temp_xopen_source
7593 do
7594 case $cf_fix_cppflags in
7595 no)
7596         case $cf_add_cflags in #(vi
7597         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7598                 case $cf_add_cflags in
7599                 -D*)
7600                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7601
7602                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7603                                 && test -z "${cf_tst_cflags}" \
7604                                 && cf_fix_cppflags=yes
7605
7606                         if test $cf_fix_cppflags = yes ; then
7607                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7608                                 continue
7609                         elif test "${cf_tst_cflags}" = "\"'" ; then
7610                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7611                                 continue
7612                         fi
7613                         ;;
7614                 esac
7615                 case "$CPPFLAGS" in
7616                 *$cf_add_cflags) #(vi
7617                         ;;
7618                 *) #(vi
7619                         case $cf_add_cflags in #(vi
7620                         -D*)
7621                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7622
7623 CPPFLAGS=`echo "$CPPFLAGS" | \
7624         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7625                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7626
7627                                 ;;
7628                         esac
7629                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7630                         ;;
7631                 esac
7632                 ;;
7633         *)
7634                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7635                 ;;
7636         esac
7637         ;;
7638 yes)
7639         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7640
7641         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7642
7643         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7644                 && test -z "${cf_tst_cflags}" \
7645                 && cf_fix_cppflags=no
7646         ;;
7647 esac
7648 done
7649
7650 if test -n "$cf_new_cflags" ; then
7651
7652         CFLAGS="$CFLAGS $cf_new_cflags"
7653 fi
7654
7655 if test -n "$cf_new_cppflags" ; then
7656
7657         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7658 fi
7659
7660 if test -n "$cf_new_extra_cppflags" ; then
7661
7662         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7663 fi
7664
7665 fi
7666
7667 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7668
7669 cf_save_CFLAGS="$CFLAGS"
7670 cf_save_CPPFLAGS="$CPPFLAGS"
7671
7672 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7673         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7674                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7675
7676 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7677         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7678                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7679
7680 echo "$as_me:7680: checking if we should define _POSIX_C_SOURCE" >&5
7681 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7682 if test "${cf_cv_posix_c_source+set}" = set; then
7683   echo $ECHO_N "(cached) $ECHO_C" >&6
7684 else
7685
7686 echo "${as_me:-configure}:7686: testing if the symbol is already defined go no further ..." 1>&5
7687
7688         cat >conftest.$ac_ext <<_ACEOF
7689 #line 7689 "configure"
7690 #include "confdefs.h"
7691 #include <sys/types.h>
7692 int
7693 main ()
7694 {
7695
7696 #ifndef _POSIX_C_SOURCE
7697 make an error
7698 #endif
7699   ;
7700   return 0;
7701 }
7702 _ACEOF
7703 rm -f conftest.$ac_objext
7704 if { (eval echo "$as_me:7704: \"$ac_compile\"") >&5
7705   (eval $ac_compile) 2>&5
7706   ac_status=$?
7707   echo "$as_me:7707: \$? = $ac_status" >&5
7708   (exit $ac_status); } &&
7709          { ac_try='test -s conftest.$ac_objext'
7710   { (eval echo "$as_me:7710: \"$ac_try\"") >&5
7711   (eval $ac_try) 2>&5
7712   ac_status=$?
7713   echo "$as_me:7713: \$? = $ac_status" >&5
7714   (exit $ac_status); }; }; then
7715   cf_cv_posix_c_source=no
7716 else
7717   echo "$as_me: failed program was:" >&5
7718 cat conftest.$ac_ext >&5
7719 cf_want_posix_source=no
7720          case .$cf_POSIX_C_SOURCE in #(vi
7721          .[12]??*) #(vi
7722                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7723                 ;;
7724          .2) #(vi
7725                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7726                 cf_want_posix_source=yes
7727                 ;;
7728          .*)
7729                 cf_want_posix_source=yes
7730                 ;;
7731          esac
7732          if test "$cf_want_posix_source" = yes ; then
7733                 cat >conftest.$ac_ext <<_ACEOF
7734 #line 7734 "configure"
7735 #include "confdefs.h"
7736 #include <sys/types.h>
7737 int
7738 main ()
7739 {
7740
7741 #ifdef _POSIX_SOURCE
7742 make an error
7743 #endif
7744   ;
7745   return 0;
7746 }
7747 _ACEOF
7748 rm -f conftest.$ac_objext
7749 if { (eval echo "$as_me:7749: \"$ac_compile\"") >&5
7750   (eval $ac_compile) 2>&5
7751   ac_status=$?
7752   echo "$as_me:7752: \$? = $ac_status" >&5
7753   (exit $ac_status); } &&
7754          { ac_try='test -s conftest.$ac_objext'
7755   { (eval echo "$as_me:7755: \"$ac_try\"") >&5
7756   (eval $ac_try) 2>&5
7757   ac_status=$?
7758   echo "$as_me:7758: \$? = $ac_status" >&5
7759   (exit $ac_status); }; }; then
7760   :
7761 else
7762   echo "$as_me: failed program was:" >&5
7763 cat conftest.$ac_ext >&5
7764 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7765 fi
7766 rm -f conftest.$ac_objext conftest.$ac_ext
7767          fi
7768
7769 echo "${as_me:-configure}:7769: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7770
7771          CFLAGS="$cf_trim_CFLAGS"
7772          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7773
7774 echo "${as_me:-configure}:7774: testing if the second compile does not leave our definition intact error ..." 1>&5
7775
7776          cat >conftest.$ac_ext <<_ACEOF
7777 #line 7777 "configure"
7778 #include "confdefs.h"
7779 #include <sys/types.h>
7780 int
7781 main ()
7782 {
7783
7784 #ifndef _POSIX_C_SOURCE
7785 make an error
7786 #endif
7787   ;
7788   return 0;
7789 }
7790 _ACEOF
7791 rm -f conftest.$ac_objext
7792 if { (eval echo "$as_me:7792: \"$ac_compile\"") >&5
7793   (eval $ac_compile) 2>&5
7794   ac_status=$?
7795   echo "$as_me:7795: \$? = $ac_status" >&5
7796   (exit $ac_status); } &&
7797          { ac_try='test -s conftest.$ac_objext'
7798   { (eval echo "$as_me:7798: \"$ac_try\"") >&5
7799   (eval $ac_try) 2>&5
7800   ac_status=$?
7801   echo "$as_me:7801: \$? = $ac_status" >&5
7802   (exit $ac_status); }; }; then
7803   :
7804 else
7805   echo "$as_me: failed program was:" >&5
7806 cat conftest.$ac_ext >&5
7807 cf_cv_posix_c_source=no
7808 fi
7809 rm -f conftest.$ac_objext conftest.$ac_ext
7810          CFLAGS="$cf_save_CFLAGS"
7811          CPPFLAGS="$cf_save_CPPFLAGS"
7812
7813 fi
7814 rm -f conftest.$ac_objext conftest.$ac_ext
7815
7816 fi
7817 echo "$as_me:7817: result: $cf_cv_posix_c_source" >&5
7818 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7819
7820 if test "$cf_cv_posix_c_source" != no ; then
7821         CFLAGS="$cf_trim_CFLAGS"
7822         CPPFLAGS="$cf_trim_CPPFLAGS"
7823
7824 cf_fix_cppflags=no
7825 cf_new_cflags=
7826 cf_new_cppflags=
7827 cf_new_extra_cppflags=
7828
7829 for cf_add_cflags in $cf_cv_posix_c_source
7830 do
7831 case $cf_fix_cppflags in
7832 no)
7833         case $cf_add_cflags in #(vi
7834         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7835                 case $cf_add_cflags in
7836                 -D*)
7837                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7838
7839                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7840                                 && test -z "${cf_tst_cflags}" \
7841                                 && cf_fix_cppflags=yes
7842
7843                         if test $cf_fix_cppflags = yes ; then
7844                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7845                                 continue
7846                         elif test "${cf_tst_cflags}" = "\"'" ; then
7847                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7848                                 continue
7849                         fi
7850                         ;;
7851                 esac
7852                 case "$CPPFLAGS" in
7853                 *$cf_add_cflags) #(vi
7854                         ;;
7855                 *) #(vi
7856                         case $cf_add_cflags in #(vi
7857                         -D*)
7858                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7859
7860 CPPFLAGS=`echo "$CPPFLAGS" | \
7861         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7862                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7863
7864                                 ;;
7865                         esac
7866                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7867                         ;;
7868                 esac
7869                 ;;
7870         *)
7871                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7872                 ;;
7873         esac
7874         ;;
7875 yes)
7876         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7877
7878         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7879
7880         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7881                 && test -z "${cf_tst_cflags}" \
7882                 && cf_fix_cppflags=no
7883         ;;
7884 esac
7885 done
7886
7887 if test -n "$cf_new_cflags" ; then
7888
7889         CFLAGS="$CFLAGS $cf_new_cflags"
7890 fi
7891
7892 if test -n "$cf_new_cppflags" ; then
7893
7894         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7895 fi
7896
7897 if test -n "$cf_new_extra_cppflags" ; then
7898
7899         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7900 fi
7901
7902 fi
7903
7904         ;;
7905 esac
7906
7907 if test -n "$cf_xopen_source" ; then
7908
7909 cf_fix_cppflags=no
7910 cf_new_cflags=
7911 cf_new_cppflags=
7912 cf_new_extra_cppflags=
7913
7914 for cf_add_cflags in $cf_xopen_source
7915 do
7916 case $cf_fix_cppflags in
7917 no)
7918         case $cf_add_cflags in #(vi
7919         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7920                 case $cf_add_cflags in
7921                 -D*)
7922                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7923
7924                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7925                                 && test -z "${cf_tst_cflags}" \
7926                                 && cf_fix_cppflags=yes
7927
7928                         if test $cf_fix_cppflags = yes ; then
7929                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7930                                 continue
7931                         elif test "${cf_tst_cflags}" = "\"'" ; then
7932                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7933                                 continue
7934                         fi
7935                         ;;
7936                 esac
7937                 case "$CPPFLAGS" in
7938                 *$cf_add_cflags) #(vi
7939                         ;;
7940                 *) #(vi
7941                         case $cf_add_cflags in #(vi
7942                         -D*)
7943                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7944
7945 CPPFLAGS=`echo "$CPPFLAGS" | \
7946         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7947                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7948
7949                                 ;;
7950                         esac
7951                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7952                         ;;
7953                 esac
7954                 ;;
7955         *)
7956                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7957                 ;;
7958         esac
7959         ;;
7960 yes)
7961         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7962
7963         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7964
7965         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7966                 && test -z "${cf_tst_cflags}" \
7967                 && cf_fix_cppflags=no
7968         ;;
7969 esac
7970 done
7971
7972 if test -n "$cf_new_cflags" ; then
7973
7974         CFLAGS="$CFLAGS $cf_new_cflags"
7975 fi
7976
7977 if test -n "$cf_new_cppflags" ; then
7978
7979         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7980 fi
7981
7982 if test -n "$cf_new_extra_cppflags" ; then
7983
7984         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7985 fi
7986
7987 fi
7988
7989 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7990         echo "$as_me:7990: checking if _XOPEN_SOURCE really is set" >&5
7991 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7992         cat >conftest.$ac_ext <<_ACEOF
7993 #line 7993 "configure"
7994 #include "confdefs.h"
7995 #include <stdlib.h>
7996 int
7997 main ()
7998 {
7999
8000 #ifndef _XOPEN_SOURCE
8001 make an error
8002 #endif
8003   ;
8004   return 0;
8005 }
8006 _ACEOF
8007 rm -f conftest.$ac_objext
8008 if { (eval echo "$as_me:8008: \"$ac_compile\"") >&5
8009   (eval $ac_compile) 2>&5
8010   ac_status=$?
8011   echo "$as_me:8011: \$? = $ac_status" >&5
8012   (exit $ac_status); } &&
8013          { ac_try='test -s conftest.$ac_objext'
8014   { (eval echo "$as_me:8014: \"$ac_try\"") >&5
8015   (eval $ac_try) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit $ac_status); }; }; then
8019   cf_XOPEN_SOURCE_set=yes
8020 else
8021   echo "$as_me: failed program was:" >&5
8022 cat conftest.$ac_ext >&5
8023 cf_XOPEN_SOURCE_set=no
8024 fi
8025 rm -f conftest.$ac_objext conftest.$ac_ext
8026         echo "$as_me:8026: result: $cf_XOPEN_SOURCE_set" >&5
8027 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8028         if test $cf_XOPEN_SOURCE_set = yes
8029         then
8030                 cat >conftest.$ac_ext <<_ACEOF
8031 #line 8031 "configure"
8032 #include "confdefs.h"
8033 #include <stdlib.h>
8034 int
8035 main ()
8036 {
8037
8038 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8039 make an error
8040 #endif
8041   ;
8042   return 0;
8043 }
8044 _ACEOF
8045 rm -f conftest.$ac_objext
8046 if { (eval echo "$as_me:8046: \"$ac_compile\"") >&5
8047   (eval $ac_compile) 2>&5
8048   ac_status=$?
8049   echo "$as_me:8049: \$? = $ac_status" >&5
8050   (exit $ac_status); } &&
8051          { ac_try='test -s conftest.$ac_objext'
8052   { (eval echo "$as_me:8052: \"$ac_try\"") >&5
8053   (eval $ac_try) 2>&5
8054   ac_status=$?
8055   echo "$as_me:8055: \$? = $ac_status" >&5
8056   (exit $ac_status); }; }; then
8057   cf_XOPEN_SOURCE_set_ok=yes
8058 else
8059   echo "$as_me: failed program was:" >&5
8060 cat conftest.$ac_ext >&5
8061 cf_XOPEN_SOURCE_set_ok=no
8062 fi
8063 rm -f conftest.$ac_objext conftest.$ac_ext
8064                 if test $cf_XOPEN_SOURCE_set_ok = no
8065                 then
8066                         { echo "$as_me:8066: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8067 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8068                 fi
8069         else
8070
8071 echo "$as_me:8071: checking if we should define _XOPEN_SOURCE" >&5
8072 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8073 if test "${cf_cv_xopen_source+set}" = set; then
8074   echo $ECHO_N "(cached) $ECHO_C" >&6
8075 else
8076
8077         cat >conftest.$ac_ext <<_ACEOF
8078 #line 8078 "configure"
8079 #include "confdefs.h"
8080
8081 #include <stdlib.h>
8082 #include <string.h>
8083 #include <sys/types.h>
8084
8085 int
8086 main ()
8087 {
8088
8089 #ifndef _XOPEN_SOURCE
8090 make an error
8091 #endif
8092   ;
8093   return 0;
8094 }
8095 _ACEOF
8096 rm -f conftest.$ac_objext
8097 if { (eval echo "$as_me:8097: \"$ac_compile\"") >&5
8098   (eval $ac_compile) 2>&5
8099   ac_status=$?
8100   echo "$as_me:8100: \$? = $ac_status" >&5
8101   (exit $ac_status); } &&
8102          { ac_try='test -s conftest.$ac_objext'
8103   { (eval echo "$as_me:8103: \"$ac_try\"") >&5
8104   (eval $ac_try) 2>&5
8105   ac_status=$?
8106   echo "$as_me:8106: \$? = $ac_status" >&5
8107   (exit $ac_status); }; }; then
8108   cf_cv_xopen_source=no
8109 else
8110   echo "$as_me: failed program was:" >&5
8111 cat conftest.$ac_ext >&5
8112 cf_save="$CPPFLAGS"
8113          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8114          cat >conftest.$ac_ext <<_ACEOF
8115 #line 8115 "configure"
8116 #include "confdefs.h"
8117
8118 #include <stdlib.h>
8119 #include <string.h>
8120 #include <sys/types.h>
8121
8122 int
8123 main ()
8124 {
8125
8126 #ifdef _XOPEN_SOURCE
8127 make an error
8128 #endif
8129   ;
8130   return 0;
8131 }
8132 _ACEOF
8133 rm -f conftest.$ac_objext
8134 if { (eval echo "$as_me:8134: \"$ac_compile\"") >&5
8135   (eval $ac_compile) 2>&5
8136   ac_status=$?
8137   echo "$as_me:8137: \$? = $ac_status" >&5
8138   (exit $ac_status); } &&
8139          { ac_try='test -s conftest.$ac_objext'
8140   { (eval echo "$as_me:8140: \"$ac_try\"") >&5
8141   (eval $ac_try) 2>&5
8142   ac_status=$?
8143   echo "$as_me:8143: \$? = $ac_status" >&5
8144   (exit $ac_status); }; }; then
8145   cf_cv_xopen_source=no
8146 else
8147   echo "$as_me: failed program was:" >&5
8148 cat conftest.$ac_ext >&5
8149 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8150 fi
8151 rm -f conftest.$ac_objext conftest.$ac_ext
8152         CPPFLAGS="$cf_save"
8153
8154 fi
8155 rm -f conftest.$ac_objext conftest.$ac_ext
8156
8157 fi
8158 echo "$as_me:8158: result: $cf_cv_xopen_source" >&5
8159 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8160
8161 if test "$cf_cv_xopen_source" != no ; then
8162
8163 CFLAGS=`echo "$CFLAGS" | \
8164         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8165                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8166
8167 CPPFLAGS=`echo "$CPPFLAGS" | \
8168         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8169                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8170
8171         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8172
8173 cf_fix_cppflags=no
8174 cf_new_cflags=
8175 cf_new_cppflags=
8176 cf_new_extra_cppflags=
8177
8178 for cf_add_cflags in $cf_temp_xopen_source
8179 do
8180 case $cf_fix_cppflags in
8181 no)
8182         case $cf_add_cflags in #(vi
8183         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8184                 case $cf_add_cflags in
8185                 -D*)
8186                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8187
8188                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8189                                 && test -z "${cf_tst_cflags}" \
8190                                 && cf_fix_cppflags=yes
8191
8192                         if test $cf_fix_cppflags = yes ; then
8193                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8194                                 continue
8195                         elif test "${cf_tst_cflags}" = "\"'" ; then
8196                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8197                                 continue
8198                         fi
8199                         ;;
8200                 esac
8201                 case "$CPPFLAGS" in
8202                 *$cf_add_cflags) #(vi
8203                         ;;
8204                 *) #(vi
8205                         case $cf_add_cflags in #(vi
8206                         -D*)
8207                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8208
8209 CPPFLAGS=`echo "$CPPFLAGS" | \
8210         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8211                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8212
8213                                 ;;
8214                         esac
8215                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8216                         ;;
8217                 esac
8218                 ;;
8219         *)
8220                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8221                 ;;
8222         esac
8223         ;;
8224 yes)
8225         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8226
8227         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8228
8229         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8230                 && test -z "${cf_tst_cflags}" \
8231                 && cf_fix_cppflags=no
8232         ;;
8233 esac
8234 done
8235
8236 if test -n "$cf_new_cflags" ; then
8237
8238         CFLAGS="$CFLAGS $cf_new_cflags"
8239 fi
8240
8241 if test -n "$cf_new_cppflags" ; then
8242
8243         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8244 fi
8245
8246 if test -n "$cf_new_extra_cppflags" ; then
8247
8248         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8249 fi
8250
8251 fi
8252
8253         fi
8254 fi
8255
8256 # Work around breakage on OS X
8257
8258 echo "$as_me:8258: checking if SIGWINCH is defined" >&5
8259 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8260 if test "${cf_cv_define_sigwinch+set}" = set; then
8261   echo $ECHO_N "(cached) $ECHO_C" >&6
8262 else
8263
8264         cat >conftest.$ac_ext <<_ACEOF
8265 #line 8265 "configure"
8266 #include "confdefs.h"
8267
8268 #include <sys/types.h>
8269 #include <sys/signal.h>
8270
8271 int
8272 main ()
8273 {
8274 int x = SIGWINCH
8275   ;
8276   return 0;
8277 }
8278 _ACEOF
8279 rm -f conftest.$ac_objext
8280 if { (eval echo "$as_me:8280: \"$ac_compile\"") >&5
8281   (eval $ac_compile) 2>&5
8282   ac_status=$?
8283   echo "$as_me:8283: \$? = $ac_status" >&5
8284   (exit $ac_status); } &&
8285          { ac_try='test -s conftest.$ac_objext'
8286   { (eval echo "$as_me:8286: \"$ac_try\"") >&5
8287   (eval $ac_try) 2>&5
8288   ac_status=$?
8289   echo "$as_me:8289: \$? = $ac_status" >&5
8290   (exit $ac_status); }; }; then
8291   cf_cv_define_sigwinch=yes
8292 else
8293   echo "$as_me: failed program was:" >&5
8294 cat conftest.$ac_ext >&5
8295 cat >conftest.$ac_ext <<_ACEOF
8296 #line 8296 "configure"
8297 #include "confdefs.h"
8298
8299 #undef _XOPEN_SOURCE
8300 #undef _POSIX_SOURCE
8301 #undef _POSIX_C_SOURCE
8302 #include <sys/types.h>
8303 #include <sys/signal.h>
8304
8305 int
8306 main ()
8307 {
8308 int x = SIGWINCH
8309   ;
8310   return 0;
8311 }
8312 _ACEOF
8313 rm -f conftest.$ac_objext
8314 if { (eval echo "$as_me:8314: \"$ac_compile\"") >&5
8315   (eval $ac_compile) 2>&5
8316   ac_status=$?
8317   echo "$as_me:8317: \$? = $ac_status" >&5
8318   (exit $ac_status); } &&
8319          { ac_try='test -s conftest.$ac_objext'
8320   { (eval echo "$as_me:8320: \"$ac_try\"") >&5
8321   (eval $ac_try) 2>&5
8322   ac_status=$?
8323   echo "$as_me:8323: \$? = $ac_status" >&5
8324   (exit $ac_status); }; }; then
8325   cf_cv_define_sigwinch=maybe
8326 else
8327   echo "$as_me: failed program was:" >&5
8328 cat conftest.$ac_ext >&5
8329 cf_cv_define_sigwinch=no
8330 fi
8331 rm -f conftest.$ac_objext conftest.$ac_ext
8332
8333 fi
8334 rm -f conftest.$ac_objext conftest.$ac_ext
8335
8336 fi
8337 echo "$as_me:8337: result: $cf_cv_define_sigwinch" >&5
8338 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8339
8340 if test "$cf_cv_define_sigwinch" = maybe ; then
8341 echo "$as_me:8341: checking for actual SIGWINCH definition" >&5
8342 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8343 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8344   echo $ECHO_N "(cached) $ECHO_C" >&6
8345 else
8346
8347 cf_cv_fixup_sigwinch=unknown
8348 cf_sigwinch=32
8349 while test $cf_sigwinch != 1
8350 do
8351         cat >conftest.$ac_ext <<_ACEOF
8352 #line 8352 "configure"
8353 #include "confdefs.h"
8354
8355 #undef _XOPEN_SOURCE
8356 #undef _POSIX_SOURCE
8357 #undef _POSIX_C_SOURCE
8358 #include <sys/types.h>
8359 #include <sys/signal.h>
8360
8361 int
8362 main ()
8363 {
8364
8365 #if SIGWINCH != $cf_sigwinch
8366 make an error
8367 #endif
8368 int x = SIGWINCH
8369   ;
8370   return 0;
8371 }
8372 _ACEOF
8373 rm -f conftest.$ac_objext
8374 if { (eval echo "$as_me:8374: \"$ac_compile\"") >&5
8375   (eval $ac_compile) 2>&5
8376   ac_status=$?
8377   echo "$as_me:8377: \$? = $ac_status" >&5
8378   (exit $ac_status); } &&
8379          { ac_try='test -s conftest.$ac_objext'
8380   { (eval echo "$as_me:8380: \"$ac_try\"") >&5
8381   (eval $ac_try) 2>&5
8382   ac_status=$?
8383   echo "$as_me:8383: \$? = $ac_status" >&5
8384   (exit $ac_status); }; }; then
8385   cf_cv_fixup_sigwinch=$cf_sigwinch
8386          break
8387 else
8388   echo "$as_me: failed program was:" >&5
8389 cat conftest.$ac_ext >&5
8390 fi
8391 rm -f conftest.$ac_objext conftest.$ac_ext
8392
8393 cf_sigwinch=`expr $cf_sigwinch - 1`
8394 done
8395
8396 fi
8397 echo "$as_me:8397: result: $cf_cv_fixup_sigwinch" >&5
8398 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8399
8400         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8401                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8402         fi
8403 fi
8404
8405 # Checks for CODESET support.
8406
8407   echo "$as_me:8407: checking for nl_langinfo and CODESET" >&5
8408 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8409 if test "${am_cv_langinfo_codeset+set}" = set; then
8410   echo $ECHO_N "(cached) $ECHO_C" >&6
8411 else
8412   cat >conftest.$ac_ext <<_ACEOF
8413 #line 8413 "configure"
8414 #include "confdefs.h"
8415 #include <langinfo.h>
8416 int
8417 main ()
8418 {
8419 char* cs = nl_langinfo(CODESET);
8420   ;
8421   return 0;
8422 }
8423 _ACEOF
8424 rm -f conftest.$ac_objext conftest$ac_exeext
8425 if { (eval echo "$as_me:8425: \"$ac_link\"") >&5
8426   (eval $ac_link) 2>&5
8427   ac_status=$?
8428   echo "$as_me:8428: \$? = $ac_status" >&5
8429   (exit $ac_status); } &&
8430          { ac_try='test -s conftest$ac_exeext'
8431   { (eval echo "$as_me:8431: \"$ac_try\"") >&5
8432   (eval $ac_try) 2>&5
8433   ac_status=$?
8434   echo "$as_me:8434: \$? = $ac_status" >&5
8435   (exit $ac_status); }; }; then
8436   am_cv_langinfo_codeset=yes
8437 else
8438   echo "$as_me: failed program was:" >&5
8439 cat conftest.$ac_ext >&5
8440 am_cv_langinfo_codeset=no
8441 fi
8442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8443
8444 fi
8445 echo "$as_me:8445: result: $am_cv_langinfo_codeset" >&5
8446 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8447   if test $am_cv_langinfo_codeset = yes; then
8448
8449 cat >>confdefs.h <<\EOF
8450 #define HAVE_LANGINFO_CODESET 1
8451 EOF
8452
8453   fi
8454
8455 # use these variables to work around a defect in gcc's fixincludes.
8456 NCURSES_OK_WCHAR_T=
8457 NCURSES_OK_WINT_T=
8458
8459 echo "$as_me:8459: checking if you want wide-character code" >&5
8460 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8461
8462 # Check whether --enable-widec or --disable-widec was given.
8463 if test "${enable_widec+set}" = set; then
8464   enableval="$enable_widec"
8465   with_widec=$enableval
8466 else
8467   with_widec=no
8468 fi;
8469 echo "$as_me:8469: result: $with_widec" >&5
8470 echo "${ECHO_T}$with_widec" >&6
8471 if test "x$with_widec" = xyes ; then
8472         LIB_SUFFIX="w${LIB_SUFFIX}"
8473
8474 cat >>confdefs.h <<\EOF
8475 #define USE_WIDEC_SUPPORT 1
8476 EOF
8477
8478 cat >>confdefs.h <<\EOF
8479 #define NCURSES_WIDECHAR 1
8480 EOF
8481
8482 echo "$as_me:8482: checking if wchar.h can be used as is" >&5
8483 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8484 if test "${cf_cv_wchar_h_okay+set}" = set; then
8485   echo $ECHO_N "(cached) $ECHO_C" >&6
8486 else
8487
8488 cat >conftest.$ac_ext <<_ACEOF
8489 #line 8489 "configure"
8490 #include "confdefs.h"
8491
8492 #include <stdlib.h>
8493 #include <wchar.h>
8494
8495 int
8496 main ()
8497 {
8498
8499         wint_t foo = 0;
8500         int bar = iswpunct(foo)
8501   ;
8502   return 0;
8503 }
8504 _ACEOF
8505 rm -f conftest.$ac_objext
8506 if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5
8507   (eval $ac_compile) 2>&5
8508   ac_status=$?
8509   echo "$as_me:8509: \$? = $ac_status" >&5
8510   (exit $ac_status); } &&
8511          { ac_try='test -s conftest.$ac_objext'
8512   { (eval echo "$as_me:8512: \"$ac_try\"") >&5
8513   (eval $ac_try) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit $ac_status); }; }; then
8517   cf_cv_wchar_h_okay=yes
8518 else
8519   echo "$as_me: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8521 cf_cv_wchar_h_okay=no
8522 fi
8523 rm -f conftest.$ac_objext conftest.$ac_ext
8524 fi
8525 echo "$as_me:8525: result: $cf_cv_wchar_h_okay" >&5
8526 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8527
8528 if test $cf_cv_wchar_h_okay = no
8529 then
8530
8531 echo "$as_me:8531: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8532 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8533 cat >conftest.$ac_ext <<_ACEOF
8534 #line 8534 "configure"
8535 #include "confdefs.h"
8536 #include <sys/types.h>
8537
8538 int
8539 main ()
8540 {
8541
8542 #ifndef _XOPEN_SOURCE_EXTENDED
8543 make an error
8544 #endif
8545   ;
8546   return 0;
8547 }
8548 _ACEOF
8549 rm -f conftest.$ac_objext
8550 if { (eval echo "$as_me:8550: \"$ac_compile\"") >&5
8551   (eval $ac_compile) 2>&5
8552   ac_status=$?
8553   echo "$as_me:8553: \$? = $ac_status" >&5
8554   (exit $ac_status); } &&
8555          { ac_try='test -s conftest.$ac_objext'
8556   { (eval echo "$as_me:8556: \"$ac_try\"") >&5
8557   (eval $ac_try) 2>&5
8558   ac_status=$?
8559   echo "$as_me:8559: \$? = $ac_status" >&5
8560   (exit $ac_status); }; }; then
8561   cf_result=no
8562 else
8563   echo "$as_me: failed program was:" >&5
8564 cat conftest.$ac_ext >&5
8565 cf_result=yes
8566 fi
8567 rm -f conftest.$ac_objext conftest.$ac_ext
8568 echo "$as_me:8568: result: $cf_result" >&5
8569 echo "${ECHO_T}$cf_result" >&6
8570
8571 if test "$cf_result" = yes ; then
8572         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8573 elif test "x" != "x" ; then
8574         echo "$as_me:8574: checking checking for compatible value versus " >&5
8575 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8576         cat >conftest.$ac_ext <<_ACEOF
8577 #line 8577 "configure"
8578 #include "confdefs.h"
8579 #include <sys/types.h>
8580
8581 int
8582 main ()
8583 {
8584
8585 #if _XOPEN_SOURCE_EXTENDED- < 0
8586 make an error
8587 #endif
8588   ;
8589   return 0;
8590 }
8591 _ACEOF
8592 rm -f conftest.$ac_objext
8593 if { (eval echo "$as_me:8593: \"$ac_compile\"") >&5
8594   (eval $ac_compile) 2>&5
8595   ac_status=$?
8596   echo "$as_me:8596: \$? = $ac_status" >&5
8597   (exit $ac_status); } &&
8598          { ac_try='test -s conftest.$ac_objext'
8599   { (eval echo "$as_me:8599: \"$ac_try\"") >&5
8600   (eval $ac_try) 2>&5
8601   ac_status=$?
8602   echo "$as_me:8602: \$? = $ac_status" >&5
8603   (exit $ac_status); }; }; then
8604   cf_result=yes
8605 else
8606   echo "$as_me: failed program was:" >&5
8607 cat conftest.$ac_ext >&5
8608 cf_result=no
8609 fi
8610 rm -f conftest.$ac_objext conftest.$ac_ext
8611         echo "$as_me:8611: result: $cf_result" >&5
8612 echo "${ECHO_T}$cf_result" >&6
8613         if test "$cf_result" = no ; then
8614                 # perhaps we can override it - try...
8615                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8616         fi
8617 fi
8618
8619 fi
8620
8621         # with_overwrite=no
8622         NCURSES_CH_T=cchar_t
8623
8624 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8625 do
8626 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8627 echo "$as_me:8627: checking for $ac_func" >&5
8628 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8629 if eval "test \"\${$as_ac_var+set}\" = set"; then
8630   echo $ECHO_N "(cached) $ECHO_C" >&6
8631 else
8632   cat >conftest.$ac_ext <<_ACEOF
8633 #line 8633 "configure"
8634 #include "confdefs.h"
8635 /* System header to define __stub macros and hopefully few prototypes,
8636     which can conflict with char $ac_func (); below.  */
8637 #include <assert.h>
8638 /* Override any gcc2 internal prototype to avoid an error.  */
8639 #ifdef __cplusplus
8640 extern "C"
8641 #endif
8642 /* We use char because int might match the return type of a gcc2
8643    builtin and then its argument prototype would still apply.  */
8644 char $ac_func ();
8645 char (*f) ();
8646
8647 int
8648 main ()
8649 {
8650 /* The GNU C library defines this for functions which it implements
8651     to always fail with ENOSYS.  Some functions are actually named
8652     something starting with __ and the normal name is an alias.  */
8653 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8654 choke me
8655 #else
8656 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8657 #endif
8658
8659   ;
8660   return 0;
8661 }
8662 _ACEOF
8663 rm -f conftest.$ac_objext conftest$ac_exeext
8664 if { (eval echo "$as_me:8664: \"$ac_link\"") >&5
8665   (eval $ac_link) 2>&5
8666   ac_status=$?
8667   echo "$as_me:8667: \$? = $ac_status" >&5
8668   (exit $ac_status); } &&
8669          { ac_try='test -s conftest$ac_exeext'
8670   { (eval echo "$as_me:8670: \"$ac_try\"") >&5
8671   (eval $ac_try) 2>&5
8672   ac_status=$?
8673   echo "$as_me:8673: \$? = $ac_status" >&5
8674   (exit $ac_status); }; }; then
8675   eval "$as_ac_var=yes"
8676 else
8677   echo "$as_me: failed program was:" >&5
8678 cat conftest.$ac_ext >&5
8679 eval "$as_ac_var=no"
8680 fi
8681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8682 fi
8683 echo "$as_me:8683: result: `eval echo '${'$as_ac_var'}'`" >&5
8684 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8685 if test `eval echo '${'$as_ac_var'}'` = yes; then
8686   cat >>confdefs.h <<EOF
8687 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8688 EOF
8689
8690 fi
8691 done
8692
8693         if test "x$ac_cv_func_putwc" != xyes ; then
8694
8695 echo "$as_me:8695: checking for multibyte character support" >&5
8696 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8697 if test "${cf_cv_utf8_lib+set}" = set; then
8698   echo $ECHO_N "(cached) $ECHO_C" >&6
8699 else
8700
8701         cf_save_LIBS="$LIBS"
8702         cat >conftest.$ac_ext <<_ACEOF
8703 #line 8703 "configure"
8704 #include "confdefs.h"
8705
8706 #include <stdlib.h>
8707 int
8708 main ()
8709 {
8710 putwc(0,0);
8711   ;
8712   return 0;
8713 }
8714 _ACEOF
8715 rm -f conftest.$ac_objext conftest$ac_exeext
8716 if { (eval echo "$as_me:8716: \"$ac_link\"") >&5
8717   (eval $ac_link) 2>&5
8718   ac_status=$?
8719   echo "$as_me:8719: \$? = $ac_status" >&5
8720   (exit $ac_status); } &&
8721          { ac_try='test -s conftest$ac_exeext'
8722   { (eval echo "$as_me:8722: \"$ac_try\"") >&5
8723   (eval $ac_try) 2>&5
8724   ac_status=$?
8725   echo "$as_me:8725: \$? = $ac_status" >&5
8726   (exit $ac_status); }; }; then
8727   cf_cv_utf8_lib=yes
8728 else
8729   echo "$as_me: failed program was:" >&5
8730 cat conftest.$ac_ext >&5
8731
8732 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8733 # will be set on completion of the AC_TRY_LINK below.
8734 cf_cv_header_path_utf8=
8735 cf_cv_library_path_utf8=
8736
8737 echo "${as_me:-configure}:8737: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8738
8739 cf_save_LIBS="$LIBS"
8740
8741 cat >conftest.$ac_ext <<_ACEOF
8742 #line 8742 "configure"
8743 #include "confdefs.h"
8744
8745 #include <libutf8.h>
8746 int
8747 main ()
8748 {
8749 putwc(0,0);
8750   ;
8751   return 0;
8752 }
8753 _ACEOF
8754 rm -f conftest.$ac_objext conftest$ac_exeext
8755 if { (eval echo "$as_me:8755: \"$ac_link\"") >&5
8756   (eval $ac_link) 2>&5
8757   ac_status=$?
8758   echo "$as_me:8758: \$? = $ac_status" >&5
8759   (exit $ac_status); } &&
8760          { ac_try='test -s conftest$ac_exeext'
8761   { (eval echo "$as_me:8761: \"$ac_try\"") >&5
8762   (eval $ac_try) 2>&5
8763   ac_status=$?
8764   echo "$as_me:8764: \$? = $ac_status" >&5
8765   (exit $ac_status); }; }; then
8766
8767         cf_cv_find_linkage_utf8=yes
8768         cf_cv_header_path_utf8=/usr/include
8769         cf_cv_library_path_utf8=/usr/lib
8770
8771 else
8772   echo "$as_me: failed program was:" >&5
8773 cat conftest.$ac_ext >&5
8774
8775 LIBS="-lutf8  $cf_save_LIBS"
8776
8777 cat >conftest.$ac_ext <<_ACEOF
8778 #line 8778 "configure"
8779 #include "confdefs.h"
8780
8781 #include <libutf8.h>
8782 int
8783 main ()
8784 {
8785 putwc(0,0);
8786   ;
8787   return 0;
8788 }
8789 _ACEOF
8790 rm -f conftest.$ac_objext conftest$ac_exeext
8791 if { (eval echo "$as_me:8791: \"$ac_link\"") >&5
8792   (eval $ac_link) 2>&5
8793   ac_status=$?
8794   echo "$as_me:8794: \$? = $ac_status" >&5
8795   (exit $ac_status); } &&
8796          { ac_try='test -s conftest$ac_exeext'
8797   { (eval echo "$as_me:8797: \"$ac_try\"") >&5
8798   (eval $ac_try) 2>&5
8799   ac_status=$?
8800   echo "$as_me:8800: \$? = $ac_status" >&5
8801   (exit $ac_status); }; }; then
8802
8803         cf_cv_find_linkage_utf8=yes
8804         cf_cv_header_path_utf8=/usr/include
8805         cf_cv_library_path_utf8=/usr/lib
8806         cf_cv_library_file_utf8="-lutf8"
8807
8808 else
8809   echo "$as_me: failed program was:" >&5
8810 cat conftest.$ac_ext >&5
8811
8812         cf_cv_find_linkage_utf8=no
8813         LIBS="$cf_save_LIBS"
8814
8815     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8816
8817 echo "${as_me:-configure}:8817: testing find linkage for utf8 library ..." 1>&5
8818
8819 echo "${as_me:-configure}:8819: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8820
8821     cf_save_CPPFLAGS="$CPPFLAGS"
8822     cf_test_CPPFLAGS="$CPPFLAGS"
8823
8824 cf_search=
8825
8826 # collect the current set of include-directories from compiler flags
8827 cf_header_path_list=""
8828 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8829         for cf_header_path in $CPPFLAGS $CFLAGS
8830         do
8831                 case $cf_header_path in #(vi
8832                 -I*)
8833                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8834
8835 test "$cf_header_path" != "NONE" && \
8836 test -d "$cf_header_path" && \
8837  {
8838         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8839         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8840         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8841         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8842         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8843         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8844 }
8845
8846                         cf_header_path_list="$cf_header_path_list $cf_search"
8847                         ;;
8848                 esac
8849         done
8850 fi
8851
8852 # add the variations for the package we are looking for
8853
8854 cf_search=
8855
8856 test "/usr" != "$prefix" && \
8857 test -d "/usr" && \
8858 (test $prefix = NONE || test "/usr" != "$prefix") && {
8859         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8860         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8861         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8862         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8863         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8864         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8865 }
8866
8867 test "$prefix" != "NONE" && \
8868 test -d "$prefix" && \
8869  {
8870         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8871         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8872         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8873         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8874         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8875         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8876 }
8877
8878 test "/usr/local" != "$prefix" && \
8879 test -d "/usr/local" && \
8880 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8881         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8882         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8883         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8884         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8885         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8886         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8887 }
8888
8889 test "/opt" != "$prefix" && \
8890 test -d "/opt" && \
8891 (test $prefix = NONE || test "/opt" != "$prefix") && {
8892         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8893         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8894         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8895         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8896         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8897         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8898 }
8899
8900 test "$HOME" != "$prefix" && \
8901 test -d "$HOME" && \
8902 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8903         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8904         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8905         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8906         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8907         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8908         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8909 }
8910
8911 test "$includedir" != NONE && \
8912 test "$includedir" != "/usr/include" && \
8913 test -d "$includedir" && {
8914         test -d $includedir &&    cf_search="$cf_search $includedir"
8915         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8916 }
8917
8918 test "$oldincludedir" != NONE && \
8919 test "$oldincludedir" != "/usr/include" && \
8920 test -d "$oldincludedir" && {
8921         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8922         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8923 }
8924
8925 cf_search="$cf_search $cf_header_path_list"
8926
8927     for cf_cv_header_path_utf8 in $cf_search
8928     do
8929       if test -d $cf_cv_header_path_utf8 ; then
8930         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8931
8932 echo "${as_me:-configure}:8932: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8933
8934         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8935         cat >conftest.$ac_ext <<_ACEOF
8936 #line 8936 "configure"
8937 #include "confdefs.h"
8938
8939 #include <libutf8.h>
8940 int
8941 main ()
8942 {
8943 putwc(0,0);
8944   ;
8945   return 0;
8946 }
8947 _ACEOF
8948 rm -f conftest.$ac_objext
8949 if { (eval echo "$as_me:8949: \"$ac_compile\"") >&5
8950   (eval $ac_compile) 2>&5
8951   ac_status=$?
8952   echo "$as_me:8952: \$? = $ac_status" >&5
8953   (exit $ac_status); } &&
8954          { ac_try='test -s conftest.$ac_objext'
8955   { (eval echo "$as_me:8955: \"$ac_try\"") >&5
8956   (eval $ac_try) 2>&5
8957   ac_status=$?
8958   echo "$as_me:8958: \$? = $ac_status" >&5
8959   (exit $ac_status); }; }; then
8960
8961             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8962
8963 echo "${as_me:-configure}:8963: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8964
8965             cf_cv_find_linkage_utf8=maybe
8966             cf_test_CPPFLAGS="$CPPFLAGS"
8967             break
8968 else
8969   echo "$as_me: failed program was:" >&5
8970 cat conftest.$ac_ext >&5
8971
8972             CPPFLAGS="$cf_save_CPPFLAGS"
8973
8974 fi
8975 rm -f conftest.$ac_objext conftest.$ac_ext
8976       fi
8977     done
8978
8979     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8980
8981 echo "${as_me:-configure}:8981: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8982
8983       cf_save_LIBS="$LIBS"
8984       cf_save_LDFLAGS="$LDFLAGS"
8985
8986       if test "$cf_cv_find_linkage_utf8" != yes ; then
8987
8988 cf_search=
8989 cf_library_path_list=""
8990 if test -n "${LDFLAGS}${LIBS}" ; then
8991         for cf_library_path in $LDFLAGS $LIBS
8992         do
8993                 case $cf_library_path in #(vi
8994                 -L*)
8995                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8996
8997 test "$cf_library_path" != "NONE" && \
8998 test -d "$cf_library_path" && \
8999  {
9000         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9001         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9002         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9003         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9004         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9005         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9006 }
9007
9008                         cf_library_path_list="$cf_library_path_list $cf_search"
9009                         ;;
9010                 esac
9011         done
9012 fi
9013
9014 cf_search=
9015
9016 test "/usr" != "$prefix" && \
9017 test -d "/usr" && \
9018 (test $prefix = NONE || test "/usr" != "$prefix") && {
9019         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9020         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9021         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9022         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9023         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9024         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9025 }
9026
9027 test "$prefix" != "NONE" && \
9028 test -d "$prefix" && \
9029  {
9030         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9031         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9032         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9033         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9034         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9035         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9036 }
9037
9038 test "/usr/local" != "$prefix" && \
9039 test -d "/usr/local" && \
9040 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9041         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9042         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9043         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9044         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9045         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9046         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9047 }
9048
9049 test "/opt" != "$prefix" && \
9050 test -d "/opt" && \
9051 (test $prefix = NONE || test "/opt" != "$prefix") && {
9052         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9053         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9054         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9055         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9056         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9057         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9058 }
9059
9060 test "$HOME" != "$prefix" && \
9061 test -d "$HOME" && \
9062 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9063         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9064         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9065         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9066         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9067         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9068         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9069 }
9070
9071 cf_search="$cf_library_path_list $cf_search"
9072
9073         for cf_cv_library_path_utf8 in $cf_search
9074         do
9075           if test -d $cf_cv_library_path_utf8 ; then
9076             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9077
9078 echo "${as_me:-configure}:9078: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9079
9080             CPPFLAGS="$cf_test_CPPFLAGS"
9081             LIBS="-lutf8  $cf_save_LIBS"
9082             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9083             cat >conftest.$ac_ext <<_ACEOF
9084 #line 9084 "configure"
9085 #include "confdefs.h"
9086
9087 #include <libutf8.h>
9088 int
9089 main ()
9090 {
9091 putwc(0,0);
9092   ;
9093   return 0;
9094 }
9095 _ACEOF
9096 rm -f conftest.$ac_objext conftest$ac_exeext
9097 if { (eval echo "$as_me:9097: \"$ac_link\"") >&5
9098   (eval $ac_link) 2>&5
9099   ac_status=$?
9100   echo "$as_me:9100: \$? = $ac_status" >&5
9101   (exit $ac_status); } &&
9102          { ac_try='test -s conftest$ac_exeext'
9103   { (eval echo "$as_me:9103: \"$ac_try\"") >&5
9104   (eval $ac_try) 2>&5
9105   ac_status=$?
9106   echo "$as_me:9106: \$? = $ac_status" >&5
9107   (exit $ac_status); }; }; then
9108
9109                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9110
9111 echo "${as_me:-configure}:9111: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9112
9113                 cf_cv_find_linkage_utf8=yes
9114                 cf_cv_library_file_utf8="-lutf8"
9115                 break
9116 else
9117   echo "$as_me: failed program was:" >&5
9118 cat conftest.$ac_ext >&5
9119
9120                 CPPFLAGS="$cf_save_CPPFLAGS"
9121                 LIBS="$cf_save_LIBS"
9122                 LDFLAGS="$cf_save_LDFLAGS"
9123
9124 fi
9125 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9126           fi
9127         done
9128         CPPFLAGS="$cf_save_CPPFLAGS"
9129         LDFLAGS="$cf_save_LDFLAGS"
9130       fi
9131
9132     else
9133       cf_cv_find_linkage_utf8=no
9134     fi
9135
9136 fi
9137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9138
9139 fi
9140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9141
9142 LIBS="$cf_save_LIBS"
9143
9144 if test "$cf_cv_find_linkage_utf8" = yes ; then
9145 cf_cv_utf8_lib=add-on
9146 else
9147 cf_cv_utf8_lib=no
9148 fi
9149
9150 fi
9151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9152 fi
9153 echo "$as_me:9153: result: $cf_cv_utf8_lib" >&5
9154 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9155
9156 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9157 # ncurses/ncursesw:
9158 if test "$cf_cv_utf8_lib" = "add-on" ; then
9159
9160 cat >>confdefs.h <<\EOF
9161 #define HAVE_LIBUTF8_H 1
9162 EOF
9163
9164 if test -n "$cf_cv_header_path_utf8" ; then
9165   for cf_add_incdir in $cf_cv_header_path_utf8
9166   do
9167         while test $cf_add_incdir != /usr/include
9168         do
9169           if test -d $cf_add_incdir
9170           then
9171                 cf_have_incdir=no
9172                 if test -n "$CFLAGS$CPPFLAGS" ; then
9173                   # a loop is needed to ensure we can add subdirs of existing dirs
9174                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9175                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9176                           cf_have_incdir=yes; break
9177                         fi
9178                   done
9179                 fi
9180
9181                 if test "$cf_have_incdir" = no ; then
9182                   if test "$cf_add_incdir" = /usr/local/include ; then
9183                         if test "$GCC" = yes
9184                         then
9185                           cf_save_CPPFLAGS=$CPPFLAGS
9186                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9187                           cat >conftest.$ac_ext <<_ACEOF
9188 #line 9188 "configure"
9189 #include "confdefs.h"
9190 #include <stdio.h>
9191 int
9192 main ()
9193 {
9194 printf("Hello")
9195   ;
9196   return 0;
9197 }
9198 _ACEOF
9199 rm -f conftest.$ac_objext
9200 if { (eval echo "$as_me:9200: \"$ac_compile\"") >&5
9201   (eval $ac_compile) 2>&5
9202   ac_status=$?
9203   echo "$as_me:9203: \$? = $ac_status" >&5
9204   (exit $ac_status); } &&
9205          { ac_try='test -s conftest.$ac_objext'
9206   { (eval echo "$as_me:9206: \"$ac_try\"") >&5
9207   (eval $ac_try) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); }; }; then
9211   :
9212 else
9213   echo "$as_me: failed program was:" >&5
9214 cat conftest.$ac_ext >&5
9215 cf_have_incdir=yes
9216 fi
9217 rm -f conftest.$ac_objext conftest.$ac_ext
9218                           CPPFLAGS=$cf_save_CPPFLAGS
9219                         fi
9220                   fi
9221                 fi
9222
9223                 if test "$cf_have_incdir" = no ; then
9224                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9225
9226 echo "${as_me:-configure}:9226: testing adding $cf_add_incdir to include-path ..." 1>&5
9227
9228                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9229
9230                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9231                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9232                   cf_add_incdir="$cf_top_incdir"
9233                 else
9234                   break
9235                 fi
9236           fi
9237         done
9238   done
9239 fi
9240
9241 if test -n "$cf_cv_library_path_utf8" ; then
9242   for cf_add_libdir in $cf_cv_library_path_utf8
9243   do
9244     if test $cf_add_libdir = /usr/lib ; then
9245       :
9246     elif test -d $cf_add_libdir
9247     then
9248       cf_have_libdir=no
9249       if test -n "$LDFLAGS$LIBS" ; then
9250         # a loop is needed to ensure we can add subdirs of existing dirs
9251         for cf_test_libdir in $LDFLAGS $LIBS ; do
9252           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9253             cf_have_libdir=yes; break
9254           fi
9255         done
9256       fi
9257       if test "$cf_have_libdir" = no ; then
9258         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9259
9260 echo "${as_me:-configure}:9260: testing adding $cf_add_libdir to library-path ..." 1>&5
9261
9262         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9263       fi
9264     fi
9265   done
9266 fi
9267
9268         LIBS="$cf_cv_library_file_utf8 $LIBS"
9269 fi
9270
9271                 if test "$cf_cv_utf8_lib" != no ; then
9272                         NCURSES_LIBUTF8=1
9273                 fi
9274         fi
9275
9276 # This is needed on Tru64 5.0 to declare mbstate_t
9277 echo "$as_me:9277: checking if we must include wchar.h to declare mbstate_t" >&5
9278 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9279 if test "${cf_cv_mbstate_t+set}" = set; then
9280   echo $ECHO_N "(cached) $ECHO_C" >&6
9281 else
9282
9283 cat >conftest.$ac_ext <<_ACEOF
9284 #line 9284 "configure"
9285 #include "confdefs.h"
9286
9287 #include <stdlib.h>
9288 #include <stdarg.h>
9289 #include <stdio.h>
9290 #ifdef HAVE_LIBUTF8_H
9291 #include <libutf8.h>
9292 #endif
9293 int
9294 main ()
9295 {
9296 mbstate_t state
9297   ;
9298   return 0;
9299 }
9300 _ACEOF
9301 rm -f conftest.$ac_objext
9302 if { (eval echo "$as_me:9302: \"$ac_compile\"") >&5
9303   (eval $ac_compile) 2>&5
9304   ac_status=$?
9305   echo "$as_me:9305: \$? = $ac_status" >&5
9306   (exit $ac_status); } &&
9307          { ac_try='test -s conftest.$ac_objext'
9308   { (eval echo "$as_me:9308: \"$ac_try\"") >&5
9309   (eval $ac_try) 2>&5
9310   ac_status=$?
9311   echo "$as_me:9311: \$? = $ac_status" >&5
9312   (exit $ac_status); }; }; then
9313   cf_cv_mbstate_t=no
9314 else
9315   echo "$as_me: failed program was:" >&5
9316 cat conftest.$ac_ext >&5
9317 cat >conftest.$ac_ext <<_ACEOF
9318 #line 9318 "configure"
9319 #include "confdefs.h"
9320
9321 #include <stdlib.h>
9322 #include <stdarg.h>
9323 #include <stdio.h>
9324 #include <wchar.h>
9325 #ifdef HAVE_LIBUTF8_H
9326 #include <libutf8.h>
9327 #endif
9328 int
9329 main ()
9330 {
9331 mbstate_t value
9332   ;
9333   return 0;
9334 }
9335 _ACEOF
9336 rm -f conftest.$ac_objext
9337 if { (eval echo "$as_me:9337: \"$ac_compile\"") >&5
9338   (eval $ac_compile) 2>&5
9339   ac_status=$?
9340   echo "$as_me:9340: \$? = $ac_status" >&5
9341   (exit $ac_status); } &&
9342          { ac_try='test -s conftest.$ac_objext'
9343   { (eval echo "$as_me:9343: \"$ac_try\"") >&5
9344   (eval $ac_try) 2>&5
9345   ac_status=$?
9346   echo "$as_me:9346: \$? = $ac_status" >&5
9347   (exit $ac_status); }; }; then
9348   cf_cv_mbstate_t=yes
9349 else
9350   echo "$as_me: failed program was:" >&5
9351 cat conftest.$ac_ext >&5
9352 cf_cv_mbstate_t=unknown
9353 fi
9354 rm -f conftest.$ac_objext conftest.$ac_ext
9355 fi
9356 rm -f conftest.$ac_objext conftest.$ac_ext
9357 fi
9358 echo "$as_me:9358: result: $cf_cv_mbstate_t" >&5
9359 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9360
9361 if test "$cf_cv_mbstate_t" = yes ; then
9362
9363 cat >>confdefs.h <<\EOF
9364 #define NEED_WCHAR_H 1
9365 EOF
9366
9367         NEED_WCHAR_H=1
9368 fi
9369
9370 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9371 if test "$cf_cv_mbstate_t" = unknown ; then
9372         NCURSES_MBSTATE_T=1
9373 fi
9374
9375 # This is needed on Tru64 5.0 to declare wchar_t
9376 echo "$as_me:9376: checking if we must include wchar.h to declare wchar_t" >&5
9377 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9378 if test "${cf_cv_wchar_t+set}" = set; then
9379   echo $ECHO_N "(cached) $ECHO_C" >&6
9380 else
9381
9382 cat >conftest.$ac_ext <<_ACEOF
9383 #line 9383 "configure"
9384 #include "confdefs.h"
9385
9386 #include <stdlib.h>
9387 #include <stdarg.h>
9388 #include <stdio.h>
9389 #ifdef HAVE_LIBUTF8_H
9390 #include <libutf8.h>
9391 #endif
9392 int
9393 main ()
9394 {
9395 wchar_t state
9396   ;
9397   return 0;
9398 }
9399 _ACEOF
9400 rm -f conftest.$ac_objext
9401 if { (eval echo "$as_me:9401: \"$ac_compile\"") >&5
9402   (eval $ac_compile) 2>&5
9403   ac_status=$?
9404   echo "$as_me:9404: \$? = $ac_status" >&5
9405   (exit $ac_status); } &&
9406          { ac_try='test -s conftest.$ac_objext'
9407   { (eval echo "$as_me:9407: \"$ac_try\"") >&5
9408   (eval $ac_try) 2>&5
9409   ac_status=$?
9410   echo "$as_me:9410: \$? = $ac_status" >&5
9411   (exit $ac_status); }; }; then
9412   cf_cv_wchar_t=no
9413 else
9414   echo "$as_me: failed program was:" >&5
9415 cat conftest.$ac_ext >&5
9416 cat >conftest.$ac_ext <<_ACEOF
9417 #line 9417 "configure"
9418 #include "confdefs.h"
9419
9420 #include <stdlib.h>
9421 #include <stdarg.h>
9422 #include <stdio.h>
9423 #include <wchar.h>
9424 #ifdef HAVE_LIBUTF8_H
9425 #include <libutf8.h>
9426 #endif
9427 int
9428 main ()
9429 {
9430 wchar_t value
9431   ;
9432   return 0;
9433 }
9434 _ACEOF
9435 rm -f conftest.$ac_objext
9436 if { (eval echo "$as_me:9436: \"$ac_compile\"") >&5
9437   (eval $ac_compile) 2>&5
9438   ac_status=$?
9439   echo "$as_me:9439: \$? = $ac_status" >&5
9440   (exit $ac_status); } &&
9441          { ac_try='test -s conftest.$ac_objext'
9442   { (eval echo "$as_me:9442: \"$ac_try\"") >&5
9443   (eval $ac_try) 2>&5
9444   ac_status=$?
9445   echo "$as_me:9445: \$? = $ac_status" >&5
9446   (exit $ac_status); }; }; then
9447   cf_cv_wchar_t=yes
9448 else
9449   echo "$as_me: failed program was:" >&5
9450 cat conftest.$ac_ext >&5
9451 cf_cv_wchar_t=unknown
9452 fi
9453 rm -f conftest.$ac_objext conftest.$ac_ext
9454 fi
9455 rm -f conftest.$ac_objext conftest.$ac_ext
9456 fi
9457 echo "$as_me:9457: result: $cf_cv_wchar_t" >&5
9458 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9459
9460 if test "$cf_cv_wchar_t" = yes ; then
9461
9462 cat >>confdefs.h <<\EOF
9463 #define NEED_WCHAR_H 1
9464 EOF
9465
9466         NEED_WCHAR_H=1
9467 fi
9468
9469 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9470 if test "$cf_cv_wchar_t" = unknown ; then
9471         NCURSES_WCHAR_T=1
9472 fi
9473
9474 # if we find wchar_t in either place, use substitution to provide a fallback.
9475 if test "$cf_cv_wchar_t" != unknown ; then
9476         NCURSES_OK_WCHAR_T=1
9477 fi
9478
9479 # This is needed on Tru64 5.0 to declare wint_t
9480 echo "$as_me:9480: checking if we must include wchar.h to declare wint_t" >&5
9481 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9482 if test "${cf_cv_wint_t+set}" = set; then
9483   echo $ECHO_N "(cached) $ECHO_C" >&6
9484 else
9485
9486 cat >conftest.$ac_ext <<_ACEOF
9487 #line 9487 "configure"
9488 #include "confdefs.h"
9489
9490 #include <stdlib.h>
9491 #include <stdarg.h>
9492 #include <stdio.h>
9493 #ifdef HAVE_LIBUTF8_H
9494 #include <libutf8.h>
9495 #endif
9496 int
9497 main ()
9498 {
9499 wint_t state
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   cf_cv_wint_t=no
9517 else
9518   echo "$as_me: failed program was:" >&5
9519 cat conftest.$ac_ext >&5
9520 cat >conftest.$ac_ext <<_ACEOF
9521 #line 9521 "configure"
9522 #include "confdefs.h"
9523
9524 #include <stdlib.h>
9525 #include <stdarg.h>
9526 #include <stdio.h>
9527 #include <wchar.h>
9528 #ifdef HAVE_LIBUTF8_H
9529 #include <libutf8.h>
9530 #endif
9531 int
9532 main ()
9533 {
9534 wint_t value
9535   ;
9536   return 0;
9537 }
9538 _ACEOF
9539 rm -f conftest.$ac_objext
9540 if { (eval echo "$as_me:9540: \"$ac_compile\"") >&5
9541   (eval $ac_compile) 2>&5
9542   ac_status=$?
9543   echo "$as_me:9543: \$? = $ac_status" >&5
9544   (exit $ac_status); } &&
9545          { ac_try='test -s conftest.$ac_objext'
9546   { (eval echo "$as_me:9546: \"$ac_try\"") >&5
9547   (eval $ac_try) 2>&5
9548   ac_status=$?
9549   echo "$as_me:9549: \$? = $ac_status" >&5
9550   (exit $ac_status); }; }; then
9551   cf_cv_wint_t=yes
9552 else
9553   echo "$as_me: failed program was:" >&5
9554 cat conftest.$ac_ext >&5
9555 cf_cv_wint_t=unknown
9556 fi
9557 rm -f conftest.$ac_objext conftest.$ac_ext
9558 fi
9559 rm -f conftest.$ac_objext conftest.$ac_ext
9560 fi
9561 echo "$as_me:9561: result: $cf_cv_wint_t" >&5
9562 echo "${ECHO_T}$cf_cv_wint_t" >&6
9563
9564 if test "$cf_cv_wint_t" = yes ; then
9565
9566 cat >>confdefs.h <<\EOF
9567 #define NEED_WCHAR_H 1
9568 EOF
9569
9570         NEED_WCHAR_H=1
9571 fi
9572
9573 # if we do not find wint_t in either place, use substitution to provide a fallback.
9574 if test "$cf_cv_wint_t" = unknown ; then
9575         NCURSES_WINT_T=1
9576 fi
9577
9578 # if we find wint_t in either place, use substitution to provide a fallback.
9579 if test "$cf_cv_wint_t" != unknown ; then
9580         NCURSES_OK_WINT_T=1
9581 fi
9582
9583         if test "$NCURSES_MBSTATE_T" != 0; then
9584
9585 cat >>confdefs.h <<\EOF
9586 #define NEED_MBSTATE_T_DEF 1
9587 EOF
9588
9589         fi
9590 fi
9591
9592 ###   use option --disable-lp64 to allow long chtype
9593 case $cf_cv_abi_version in
9594 [345]*)
9595         default_with_lp64=no
9596         ;;
9597 *)
9598         default_with_lp64=yes
9599         ;;
9600 esac
9601
9602 echo "$as_me:9602: checking whether to enable _LP64 definition in curses.h" >&5
9603 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9604
9605 # Check whether --enable-lp64 or --disable-lp64 was given.
9606 if test "${enable_lp64+set}" = set; then
9607   enableval="$enable_lp64"
9608   with_lp64=$enableval
9609 else
9610   with_lp64=$default_with_lp64
9611 fi;
9612 echo "$as_me:9612: result: $with_lp64" >&5
9613 echo "${ECHO_T}$with_lp64" >&6
9614
9615 if test "x$with_lp64" = xyes ; then
9616         cf_cv_enable_lp64=1
9617 else
9618         cf_cv_enable_lp64=0
9619 fi
9620
9621 # Check whether --enable-largefile or --disable-largefile was given.
9622 if test "${enable_largefile+set}" = set; then
9623   enableval="$enable_largefile"
9624
9625 fi;
9626 if test "$enable_largefile" != no; then
9627
9628   echo "$as_me:9628: checking for special C compiler options needed for large files" >&5
9629 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9630 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9631   echo $ECHO_N "(cached) $ECHO_C" >&6
9632 else
9633   ac_cv_sys_largefile_CC=no
9634      if test "$GCC" != yes; then
9635        ac_save_CC=$CC
9636        while :; do
9637          # IRIX 6.2 and later do not support large files by default,
9638          # so use the C compiler's -n32 option if that helps.
9639          cat >conftest.$ac_ext <<_ACEOF
9640 #line 9640 "configure"
9641 #include "confdefs.h"
9642 #include <sys/types.h>
9643  /* Check that off_t can represent 2**63 - 1 correctly.
9644     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9645     since some C++ compilers masquerading as C compilers
9646     incorrectly reject 9223372036854775807.  */
9647 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9648   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9649                        && LARGE_OFF_T % 2147483647 == 1)
9650                       ? 1 : -1];
9651 int
9652 main ()
9653 {
9654
9655   ;
9656   return 0;
9657 }
9658 _ACEOF
9659          rm -f conftest.$ac_objext
9660 if { (eval echo "$as_me:9660: \"$ac_compile\"") >&5
9661   (eval $ac_compile) 2>&5
9662   ac_status=$?
9663   echo "$as_me:9663: \$? = $ac_status" >&5
9664   (exit $ac_status); } &&
9665          { ac_try='test -s conftest.$ac_objext'
9666   { (eval echo "$as_me:9666: \"$ac_try\"") >&5
9667   (eval $ac_try) 2>&5
9668   ac_status=$?
9669   echo "$as_me:9669: \$? = $ac_status" >&5
9670   (exit $ac_status); }; }; then
9671   break
9672 else
9673   echo "$as_me: failed program was:" >&5
9674 cat conftest.$ac_ext >&5
9675 fi
9676 rm -f conftest.$ac_objext
9677          CC="$CC -n32"
9678          rm -f conftest.$ac_objext
9679 if { (eval echo "$as_me:9679: \"$ac_compile\"") >&5
9680   (eval $ac_compile) 2>&5
9681   ac_status=$?
9682   echo "$as_me:9682: \$? = $ac_status" >&5
9683   (exit $ac_status); } &&
9684          { ac_try='test -s conftest.$ac_objext'
9685   { (eval echo "$as_me:9685: \"$ac_try\"") >&5
9686   (eval $ac_try) 2>&5
9687   ac_status=$?
9688   echo "$as_me:9688: \$? = $ac_status" >&5
9689   (exit $ac_status); }; }; then
9690   ac_cv_sys_largefile_CC=' -n32'; break
9691 else
9692   echo "$as_me: failed program was:" >&5
9693 cat conftest.$ac_ext >&5
9694 fi
9695 rm -f conftest.$ac_objext
9696          break
9697        done
9698        CC=$ac_save_CC
9699        rm -f conftest.$ac_ext
9700     fi
9701 fi
9702 echo "$as_me:9702: result: $ac_cv_sys_largefile_CC" >&5
9703 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9704   if test "$ac_cv_sys_largefile_CC" != no; then
9705     CC=$CC$ac_cv_sys_largefile_CC
9706   fi
9707
9708   echo "$as_me:9708: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9709 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9710 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9711   echo $ECHO_N "(cached) $ECHO_C" >&6
9712 else
9713   while :; do
9714   ac_cv_sys_file_offset_bits=no
9715   cat >conftest.$ac_ext <<_ACEOF
9716 #line 9716 "configure"
9717 #include "confdefs.h"
9718 #include <sys/types.h>
9719  /* Check that off_t can represent 2**63 - 1 correctly.
9720     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9721     since some C++ compilers masquerading as C compilers
9722     incorrectly reject 9223372036854775807.  */
9723 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9724   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9725                        && LARGE_OFF_T % 2147483647 == 1)
9726                       ? 1 : -1];
9727 int
9728 main ()
9729 {
9730
9731   ;
9732   return 0;
9733 }
9734 _ACEOF
9735 rm -f conftest.$ac_objext
9736 if { (eval echo "$as_me:9736: \"$ac_compile\"") >&5
9737   (eval $ac_compile) 2>&5
9738   ac_status=$?
9739   echo "$as_me:9739: \$? = $ac_status" >&5
9740   (exit $ac_status); } &&
9741          { ac_try='test -s conftest.$ac_objext'
9742   { (eval echo "$as_me:9742: \"$ac_try\"") >&5
9743   (eval $ac_try) 2>&5
9744   ac_status=$?
9745   echo "$as_me:9745: \$? = $ac_status" >&5
9746   (exit $ac_status); }; }; then
9747   break
9748 else
9749   echo "$as_me: failed program was:" >&5
9750 cat conftest.$ac_ext >&5
9751 fi
9752 rm -f conftest.$ac_objext conftest.$ac_ext
9753   cat >conftest.$ac_ext <<_ACEOF
9754 #line 9754 "configure"
9755 #include "confdefs.h"
9756 #define _FILE_OFFSET_BITS 64
9757 #include <sys/types.h>
9758  /* Check that off_t can represent 2**63 - 1 correctly.
9759     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9760     since some C++ compilers masquerading as C compilers
9761     incorrectly reject 9223372036854775807.  */
9762 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9763   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9764                        && LARGE_OFF_T % 2147483647 == 1)
9765                       ? 1 : -1];
9766 int
9767 main ()
9768 {
9769
9770   ;
9771   return 0;
9772 }
9773 _ACEOF
9774 rm -f conftest.$ac_objext
9775 if { (eval echo "$as_me:9775: \"$ac_compile\"") >&5
9776   (eval $ac_compile) 2>&5
9777   ac_status=$?
9778   echo "$as_me:9778: \$? = $ac_status" >&5
9779   (exit $ac_status); } &&
9780          { ac_try='test -s conftest.$ac_objext'
9781   { (eval echo "$as_me:9781: \"$ac_try\"") >&5
9782   (eval $ac_try) 2>&5
9783   ac_status=$?
9784   echo "$as_me:9784: \$? = $ac_status" >&5
9785   (exit $ac_status); }; }; then
9786   ac_cv_sys_file_offset_bits=64; break
9787 else
9788   echo "$as_me: failed program was:" >&5
9789 cat conftest.$ac_ext >&5
9790 fi
9791 rm -f conftest.$ac_objext conftest.$ac_ext
9792   break
9793 done
9794 fi
9795 echo "$as_me:9795: result: $ac_cv_sys_file_offset_bits" >&5
9796 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9797 if test "$ac_cv_sys_file_offset_bits" != no; then
9798
9799 cat >>confdefs.h <<EOF
9800 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9801 EOF
9802
9803 fi
9804 rm -rf conftest*
9805   echo "$as_me:9805: checking for _LARGE_FILES value needed for large files" >&5
9806 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9807 if test "${ac_cv_sys_large_files+set}" = set; then
9808   echo $ECHO_N "(cached) $ECHO_C" >&6
9809 else
9810   while :; do
9811   ac_cv_sys_large_files=no
9812   cat >conftest.$ac_ext <<_ACEOF
9813 #line 9813 "configure"
9814 #include "confdefs.h"
9815 #include <sys/types.h>
9816  /* Check that off_t can represent 2**63 - 1 correctly.
9817     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9818     since some C++ compilers masquerading as C compilers
9819     incorrectly reject 9223372036854775807.  */
9820 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9821   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9822                        && LARGE_OFF_T % 2147483647 == 1)
9823                       ? 1 : -1];
9824 int
9825 main ()
9826 {
9827
9828   ;
9829   return 0;
9830 }
9831 _ACEOF
9832 rm -f conftest.$ac_objext
9833 if { (eval echo "$as_me:9833: \"$ac_compile\"") >&5
9834   (eval $ac_compile) 2>&5
9835   ac_status=$?
9836   echo "$as_me:9836: \$? = $ac_status" >&5
9837   (exit $ac_status); } &&
9838          { ac_try='test -s conftest.$ac_objext'
9839   { (eval echo "$as_me:9839: \"$ac_try\"") >&5
9840   (eval $ac_try) 2>&5
9841   ac_status=$?
9842   echo "$as_me:9842: \$? = $ac_status" >&5
9843   (exit $ac_status); }; }; then
9844   break
9845 else
9846   echo "$as_me: failed program was:" >&5
9847 cat conftest.$ac_ext >&5
9848 fi
9849 rm -f conftest.$ac_objext conftest.$ac_ext
9850   cat >conftest.$ac_ext <<_ACEOF
9851 #line 9851 "configure"
9852 #include "confdefs.h"
9853 #define _LARGE_FILES 1
9854 #include <sys/types.h>
9855  /* Check that off_t can represent 2**63 - 1 correctly.
9856     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9857     since some C++ compilers masquerading as C compilers
9858     incorrectly reject 9223372036854775807.  */
9859 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9860   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9861                        && LARGE_OFF_T % 2147483647 == 1)
9862                       ? 1 : -1];
9863 int
9864 main ()
9865 {
9866
9867   ;
9868   return 0;
9869 }
9870 _ACEOF
9871 rm -f conftest.$ac_objext
9872 if { (eval echo "$as_me:9872: \"$ac_compile\"") >&5
9873   (eval $ac_compile) 2>&5
9874   ac_status=$?
9875   echo "$as_me:9875: \$? = $ac_status" >&5
9876   (exit $ac_status); } &&
9877          { ac_try='test -s conftest.$ac_objext'
9878   { (eval echo "$as_me:9878: \"$ac_try\"") >&5
9879   (eval $ac_try) 2>&5
9880   ac_status=$?
9881   echo "$as_me:9881: \$? = $ac_status" >&5
9882   (exit $ac_status); }; }; then
9883   ac_cv_sys_large_files=1; break
9884 else
9885   echo "$as_me: failed program was:" >&5
9886 cat conftest.$ac_ext >&5
9887 fi
9888 rm -f conftest.$ac_objext conftest.$ac_ext
9889   break
9890 done
9891 fi
9892 echo "$as_me:9892: result: $ac_cv_sys_large_files" >&5
9893 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9894 if test "$ac_cv_sys_large_files" != no; then
9895
9896 cat >>confdefs.h <<EOF
9897 #define _LARGE_FILES $ac_cv_sys_large_files
9898 EOF
9899
9900 fi
9901 rm -rf conftest*
9902 fi
9903
9904     if test "$enable_largefile" != no ; then
9905         echo "$as_me:9905: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9906 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9907 if test "${ac_cv_sys_largefile_source+set}" = set; then
9908   echo $ECHO_N "(cached) $ECHO_C" >&6
9909 else
9910   while :; do
9911   ac_cv_sys_largefile_source=no
9912   cat >conftest.$ac_ext <<_ACEOF
9913 #line 9913 "configure"
9914 #include "confdefs.h"
9915 #include <stdio.h>
9916 int
9917 main ()
9918 {
9919 return !fseeko;
9920   ;
9921   return 0;
9922 }
9923 _ACEOF
9924 rm -f conftest.$ac_objext
9925 if { (eval echo "$as_me:9925: \"$ac_compile\"") >&5
9926   (eval $ac_compile) 2>&5
9927   ac_status=$?
9928   echo "$as_me:9928: \$? = $ac_status" >&5
9929   (exit $ac_status); } &&
9930          { ac_try='test -s conftest.$ac_objext'
9931   { (eval echo "$as_me:9931: \"$ac_try\"") >&5
9932   (eval $ac_try) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); }; }; then
9936   break
9937 else
9938   echo "$as_me: failed program was:" >&5
9939 cat conftest.$ac_ext >&5
9940 fi
9941 rm -f conftest.$ac_objext conftest.$ac_ext
9942   cat >conftest.$ac_ext <<_ACEOF
9943 #line 9943 "configure"
9944 #include "confdefs.h"
9945 #define _LARGEFILE_SOURCE 1
9946 #include <stdio.h>
9947 int
9948 main ()
9949 {
9950 return !fseeko;
9951   ;
9952   return 0;
9953 }
9954 _ACEOF
9955 rm -f conftest.$ac_objext
9956 if { (eval echo "$as_me:9956: \"$ac_compile\"") >&5
9957   (eval $ac_compile) 2>&5
9958   ac_status=$?
9959   echo "$as_me:9959: \$? = $ac_status" >&5
9960   (exit $ac_status); } &&
9961          { ac_try='test -s conftest.$ac_objext'
9962   { (eval echo "$as_me:9962: \"$ac_try\"") >&5
9963   (eval $ac_try) 2>&5
9964   ac_status=$?
9965   echo "$as_me:9965: \$? = $ac_status" >&5
9966   (exit $ac_status); }; }; then
9967   ac_cv_sys_largefile_source=1; break
9968 else
9969   echo "$as_me: failed program was:" >&5
9970 cat conftest.$ac_ext >&5
9971 fi
9972 rm -f conftest.$ac_objext conftest.$ac_ext
9973   break
9974 done
9975 fi
9976 echo "$as_me:9976: result: $ac_cv_sys_largefile_source" >&5
9977 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9978 if test "$ac_cv_sys_largefile_source" != no; then
9979
9980 cat >>confdefs.h <<EOF
9981 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9982 EOF
9983
9984 fi
9985 rm -rf conftest*
9986
9987 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9988 # in glibc 2.1.3, but that breaks too many other things.
9989 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9990 echo "$as_me:9990: checking for fseeko" >&5
9991 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9992 if test "${ac_cv_func_fseeko+set}" = set; then
9993   echo $ECHO_N "(cached) $ECHO_C" >&6
9994 else
9995   cat >conftest.$ac_ext <<_ACEOF
9996 #line 9996 "configure"
9997 #include "confdefs.h"
9998 #include <stdio.h>
9999 int
10000 main ()
10001 {
10002 return fseeko && fseeko (stdin, 0, 0);
10003   ;
10004   return 0;
10005 }
10006 _ACEOF
10007 rm -f conftest.$ac_objext conftest$ac_exeext
10008 if { (eval echo "$as_me:10008: \"$ac_link\"") >&5
10009   (eval $ac_link) 2>&5
10010   ac_status=$?
10011   echo "$as_me:10011: \$? = $ac_status" >&5
10012   (exit $ac_status); } &&
10013          { ac_try='test -s conftest$ac_exeext'
10014   { (eval echo "$as_me:10014: \"$ac_try\"") >&5
10015   (eval $ac_try) 2>&5
10016   ac_status=$?
10017   echo "$as_me:10017: \$? = $ac_status" >&5
10018   (exit $ac_status); }; }; then
10019   ac_cv_func_fseeko=yes
10020 else
10021   echo "$as_me: failed program was:" >&5
10022 cat conftest.$ac_ext >&5
10023 ac_cv_func_fseeko=no
10024 fi
10025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10026 fi
10027 echo "$as_me:10027: result: $ac_cv_func_fseeko" >&5
10028 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10029 if test $ac_cv_func_fseeko = yes; then
10030
10031 cat >>confdefs.h <<\EOF
10032 #define HAVE_FSEEKO 1
10033 EOF
10034
10035 fi
10036
10037         # Normally we would collect these definitions in the config.h,
10038         # but (like _XOPEN_SOURCE), some environments rely on having these
10039         # defined before any of the system headers are included.  Another
10040         # case comes up with C++, e.g., on AIX the compiler compiles the
10041         # header files by themselves before looking at the body files it is
10042         # told to compile.  For ncurses, those header files do not include
10043         # the config.h
10044         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10045         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10046         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10047
10048         echo "$as_me:10048: checking whether to use struct dirent64" >&5
10049 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10050 if test "${cf_cv_struct_dirent64+set}" = set; then
10051   echo $ECHO_N "(cached) $ECHO_C" >&6
10052 else
10053
10054                 cat >conftest.$ac_ext <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10057
10058 #include <sys/types.h>
10059 #include <dirent.h>
10060
10061 int
10062 main ()
10063 {
10064
10065                 /* if transitional largefile support is setup, this is true */
10066                 extern struct dirent64 * readdir(DIR *);
10067                 struct dirent64 *x = readdir((DIR *)0);
10068                 struct dirent *y = readdir((DIR *)0);
10069                 int z = x - y;
10070
10071   ;
10072   return 0;
10073 }
10074 _ACEOF
10075 rm -f conftest.$ac_objext
10076 if { (eval echo "$as_me:10076: \"$ac_compile\"") >&5
10077   (eval $ac_compile) 2>&5
10078   ac_status=$?
10079   echo "$as_me:10079: \$? = $ac_status" >&5
10080   (exit $ac_status); } &&
10081          { ac_try='test -s conftest.$ac_objext'
10082   { (eval echo "$as_me:10082: \"$ac_try\"") >&5
10083   (eval $ac_try) 2>&5
10084   ac_status=$?
10085   echo "$as_me:10085: \$? = $ac_status" >&5
10086   (exit $ac_status); }; }; then
10087   cf_cv_struct_dirent64=yes
10088 else
10089   echo "$as_me: failed program was:" >&5
10090 cat conftest.$ac_ext >&5
10091 cf_cv_struct_dirent64=no
10092 fi
10093 rm -f conftest.$ac_objext conftest.$ac_ext
10094
10095 fi
10096 echo "$as_me:10096: result: $cf_cv_struct_dirent64" >&5
10097 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10098         test "$cf_cv_struct_dirent64" = yes &&
10099 cat >>confdefs.h <<\EOF
10100 #define HAVE_STRUCT_DIRENT64 1
10101 EOF
10102
10103     fi
10104
10105 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10106 echo "$as_me:10106: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10107 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10108
10109 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10110 if test "${enable_tparm_varargs+set}" = set; then
10111   enableval="$enable_tparm_varargs"
10112   with_tparm_varargs=$enableval
10113 else
10114   with_tparm_varargs=yes
10115 fi;
10116 echo "$as_me:10116: result: $with_tparm_varargs" >&5
10117 echo "${ECHO_T}$with_tparm_varargs" >&6
10118 NCURSES_TPARM_VARARGS=0
10119 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10120
10121 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10122 if test "$with_ticlib" != no ; then
10123 echo "$as_me:10123: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10124 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10125
10126 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10127 if test "${enable_tic_depends+set}" = set; then
10128   enableval="$enable_tic_depends"
10129   with_tic_depends=$enableval
10130 else
10131   with_tic_depends=yes
10132 fi;
10133 echo "$as_me:10133: result: $with_tic_depends" >&5
10134 echo "${ECHO_T}$with_tic_depends" >&6
10135 else
10136         with_tic_depends=no
10137 fi
10138
10139 ###   use option --with-bool to override bool's type
10140 echo "$as_me:10140: checking for type of bool" >&5
10141 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10142
10143 # Check whether --with-bool or --without-bool was given.
10144 if test "${with_bool+set}" = set; then
10145   withval="$with_bool"
10146   NCURSES_BOOL="$withval"
10147 else
10148   NCURSES_BOOL=auto
10149 fi;
10150 echo "$as_me:10150: result: $NCURSES_BOOL" >&5
10151 echo "${ECHO_T}$NCURSES_BOOL" >&6
10152
10153 echo "$as_me:10153: checking for alternate terminal capabilities file" >&5
10154 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10155
10156 # Check whether --with-caps or --without-caps was given.
10157 if test "${with_caps+set}" = set; then
10158   withval="$with_caps"
10159   TERMINFO_CAPS=Caps.$withval
10160 else
10161   TERMINFO_CAPS=Caps
10162 fi;
10163 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10164 echo "$as_me:10164: result: $TERMINFO_CAPS" >&5
10165 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10166
10167 ###   use option --with-chtype to override chtype's type
10168 echo "$as_me:10168: checking for type of chtype" >&5
10169 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10170
10171 # Check whether --with-chtype or --without-chtype was given.
10172 if test "${with_chtype+set}" = set; then
10173   withval="$with_chtype"
10174   NCURSES_CHTYPE="$withval"
10175 else
10176   NCURSES_CHTYPE=auto
10177 fi;
10178 echo "$as_me:10178: result: $NCURSES_CHTYPE" >&5
10179 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10180
10181 ###   use option --with-ospeed to override ospeed's type
10182 echo "$as_me:10182: checking for type of ospeed" >&5
10183 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10184
10185 # Check whether --with-ospeed or --without-ospeed was given.
10186 if test "${with_ospeed+set}" = set; then
10187   withval="$with_ospeed"
10188   NCURSES_OSPEED="$withval"
10189 else
10190   NCURSES_OSPEED=short
10191 fi;
10192 echo "$as_me:10192: result: $NCURSES_OSPEED" >&5
10193 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10194
10195 ###   use option --with-mmask-t to override mmask_t's type
10196 echo "$as_me:10196: checking for type of mmask_t" >&5
10197 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10198
10199 # Check whether --with-mmask-t or --without-mmask-t was given.
10200 if test "${with_mmask_t+set}" = set; then
10201   withval="$with_mmask_t"
10202   NCURSES_MMASK_T="$withval"
10203 else
10204   NCURSES_MMASK_T=auto
10205 fi;
10206 echo "$as_me:10206: result: $NCURSES_MMASK_T" >&5
10207 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10208
10209 ###   use option --with-ccharw-max to override CCHARW_MAX size
10210 echo "$as_me:10210: checking for size CCHARW_MAX" >&5
10211 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10212
10213 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10214 if test "${with_ccharw_max+set}" = set; then
10215   withval="$with_ccharw_max"
10216   NCURSES_CCHARW_MAX="$withval"
10217 else
10218   NCURSES_CCHARW_MAX=5
10219 fi;
10220 echo "$as_me:10220: result: $NCURSES_CCHARW_MAX" >&5
10221 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10222
10223 ###   use option --with-tparm-arg to override tparm's argument type
10224 echo "$as_me:10224: checking for type of tparm args" >&5
10225 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10226
10227 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10228 if test "${with_tparm_arg+set}" = set; then
10229   withval="$with_tparm_arg"
10230   NCURSES_TPARM_ARG="$withval"
10231 else
10232   NCURSES_TPARM_ARG=long
10233 fi;
10234 echo "$as_me:10234: result: $NCURSES_TPARM_ARG" >&5
10235 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10236
10237 ### Enable compiling-in rcs id's
10238 echo "$as_me:10238: checking if RCS identifiers should be compiled-in" >&5
10239 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10240
10241 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10242 if test "${with_rcs_ids+set}" = set; then
10243   withval="$with_rcs_ids"
10244   with_rcs_ids=$withval
10245 else
10246   with_rcs_ids=no
10247 fi;
10248 echo "$as_me:10248: result: $with_rcs_ids" >&5
10249 echo "${ECHO_T}$with_rcs_ids" >&6
10250 test "x$with_rcs_ids" = xyes &&
10251 cat >>confdefs.h <<\EOF
10252 #define USE_RCS_IDS 1
10253 EOF
10254
10255 ###############################################################################
10256
10257 echo "$as_me:10257: checking format of man-pages" >&5
10258 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10259
10260 # Check whether --with-manpage-format or --without-manpage-format was given.
10261 if test "${with_manpage_format+set}" = set; then
10262   withval="$with_manpage_format"
10263   MANPAGE_FORMAT=$withval
10264 else
10265   MANPAGE_FORMAT=unknown
10266 fi;
10267
10268 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10269 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10270
10271 cf_unknown=
10272
10273 case $MANPAGE_FORMAT in
10274 unknown)
10275   if test -z "$MANPATH" ; then
10276     MANPATH="/usr/man:/usr/share/man"
10277   fi
10278
10279   # look for the 'date' man-page (it's most likely to be installed!)
10280   MANPAGE_FORMAT=
10281   cf_preform=no
10282   cf_catonly=yes
10283   cf_example=date
10284
10285   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10286   for cf_dir in $MANPATH; do
10287     test -z "$cf_dir" && cf_dir=/usr/man
10288     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
10289     do
10290       cf_test=`echo $cf_name | sed -e 's/*//'`
10291       if test "x$cf_test" = "x$cf_name" ; then
10292
10293         case "$cf_name" in
10294         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10295         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10296         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10297         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10298         esac
10299
10300         case "$cf_name" in
10301         $cf_dir/man*)
10302           cf_catonly=no
10303           ;;
10304         $cf_dir/cat*)
10305           cf_preform=yes
10306           ;;
10307         esac
10308         break
10309       fi
10310
10311       # if we found a match in either man* or cat*, stop looking
10312       if test -n "$MANPAGE_FORMAT" ; then
10313         cf_found=no
10314         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10315         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10316         case "$cf_name" in
10317         $cf_dir/cat*)
10318           cf_found=yes
10319           ;;
10320         esac
10321         test $cf_found=yes && break
10322       fi
10323     done
10324     # only check the first directory in $MANPATH where we find manpages
10325     if test -n "$MANPAGE_FORMAT" ; then
10326        break
10327     fi
10328   done
10329   # if we did not find the example, just assume it is normal
10330   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10331   IFS="$ac_save_ifs"
10332   ;;
10333 *)
10334   for cf_option in $MANPAGE_FORMAT; do
10335      case $cf_option in #(vi
10336      gzip|compress|BSDI|normal|formatted|catonly)
10337        ;;
10338      *)
10339        cf_unknown="$cf_unknown $cf_option"
10340        ;;
10341      esac
10342   done
10343   ;;
10344 esac
10345
10346 echo "$as_me:10346: result: $MANPAGE_FORMAT" >&5
10347 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10348 if test -n "$cf_unknown" ; then
10349   { echo "$as_me:10349: WARNING: Unexpected manpage-format $cf_unknown" >&5
10350 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10351 fi
10352
10353 echo "$as_me:10353: checking for manpage renaming" >&5
10354 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10355
10356 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10357 if test "${with_manpage_renames+set}" = set; then
10358   withval="$with_manpage_renames"
10359   MANPAGE_RENAMES=$withval
10360 else
10361   MANPAGE_RENAMES=yes
10362 fi;
10363
10364 case ".$MANPAGE_RENAMES" in #(vi
10365 .no) #(vi
10366   ;;
10367 .|.yes)
10368   # Debian 'man' program?
10369   if test -f /etc/debian_version ; then
10370     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10371   else
10372     MANPAGE_RENAMES=no
10373   fi
10374   ;;
10375 esac
10376
10377 if test "$MANPAGE_RENAMES" != no ; then
10378   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10379     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10380   elif test ! -f $MANPAGE_RENAMES ; then
10381     { { echo "$as_me:10381: error: not a filename: $MANPAGE_RENAMES" >&5
10382 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10383    { (exit 1); exit 1; }; }
10384   fi
10385
10386   test ! -d man && mkdir man
10387
10388   # Construct a sed-script to perform renaming within man-pages
10389   if test -n "$MANPAGE_RENAMES" ; then
10390     test ! -d man && mkdir man
10391     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10392   fi
10393 fi
10394
10395 echo "$as_me:10395: result: $MANPAGE_RENAMES" >&5
10396 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10397
10398 echo "$as_me:10398: checking if manpage aliases will be installed" >&5
10399 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10400
10401 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10402 if test "${with_manpage_aliases+set}" = set; then
10403   withval="$with_manpage_aliases"
10404   MANPAGE_ALIASES=$withval
10405 else
10406   MANPAGE_ALIASES=yes
10407 fi;
10408
10409 echo "$as_me:10409: result: $MANPAGE_ALIASES" >&5
10410 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10411
10412 case "x$LN_S" in #(vi
10413 xln*) #(vi
10414         cf_use_symlinks=yes
10415         ;;
10416 *)
10417         cf_use_symlinks=no
10418         ;;
10419 esac
10420
10421 MANPAGE_SYMLINKS=no
10422 if test "$MANPAGE_ALIASES" = yes ; then
10423 echo "$as_me:10423: checking if manpage symlinks should be used" >&5
10424 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10425
10426 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10427 if test "${with_manpage_symlinks+set}" = set; then
10428   withval="$with_manpage_symlinks"
10429   MANPAGE_SYMLINKS=$withval
10430 else
10431   MANPAGE_SYMLINKS=$cf_use_symlinks
10432 fi;
10433
10434 if test "$$cf_use_symlinks" = no; then
10435 if test "$MANPAGE_SYMLINKS" = yes ; then
10436         { echo "$as_me:10436: WARNING: cannot make symlinks" >&5
10437 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10438         MANPAGE_SYMLINKS=no
10439 fi
10440 fi
10441
10442 echo "$as_me:10442: result: $MANPAGE_SYMLINKS" >&5
10443 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10444 fi
10445
10446 echo "$as_me:10446: checking for manpage tbl" >&5
10447 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10448
10449 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10450 if test "${with_manpage_tbl+set}" = set; then
10451   withval="$with_manpage_tbl"
10452   MANPAGE_TBL=$withval
10453 else
10454   MANPAGE_TBL=no
10455 fi;
10456
10457 echo "$as_me:10457: result: $MANPAGE_TBL" >&5
10458 echo "${ECHO_T}$MANPAGE_TBL" >&6
10459
10460   if test "$prefix" = "NONE" ; then
10461      cf_prefix="$ac_default_prefix"
10462   else
10463      cf_prefix="$prefix"
10464   fi
10465
10466   case "$MANPAGE_FORMAT" in # (vi
10467   *catonly*) # (vi
10468     cf_format=yes
10469     cf_inboth=no
10470     ;;
10471   *formatted*) # (vi
10472     cf_format=yes
10473     cf_inboth=yes
10474     ;;
10475   *)
10476     cf_format=no
10477     cf_inboth=no
10478     ;;
10479   esac
10480
10481 test ! -d man && mkdir man
10482
10483 cf_so_strip=
10484 cf_compress=
10485 case "$MANPAGE_FORMAT" in #(vi
10486 *compress*) #(vi
10487         cf_so_strip="Z"
10488         cf_compress=compress
10489   ;;
10490 *gzip*)
10491         cf_so_strip="gz"
10492         cf_compress=gzip
10493   ;;
10494 esac
10495
10496 cf_edit_man=./edit_man.sh
10497 cf_man_alias=`pwd`/man_alias.sed
10498
10499 cat >$cf_edit_man <<CF_EOF
10500 #! /bin/sh
10501 # this script is generated by the configure-script CF_MAN_PAGES macro.
10502
10503 prefix="$cf_prefix"
10504 datarootdir="$datarootdir"
10505 datadir="$datadir"
10506
10507 NCURSES_MAJOR="$NCURSES_MAJOR"
10508 NCURSES_MINOR="$NCURSES_MINOR"
10509 NCURSES_PATCH="$NCURSES_PATCH"
10510
10511 NCURSES_OSPEED="$NCURSES_OSPEED"
10512 TERMINFO="$TERMINFO"
10513
10514 INSTALL="$INSTALL"
10515 INSTALL_DATA="$INSTALL_DATA"
10516
10517 transform="$program_transform_name"
10518
10519 TMP=\${TMPDIR:=/tmp}/man\$\$
10520 trap "rm -f \$TMP" 0 1 2 5 15
10521
10522 form=\$1
10523 shift || exit 1
10524
10525 verb=\$1
10526 shift || exit 1
10527
10528 mandir=\$1
10529 shift || exit 1
10530
10531 srcdir=\$1
10532 top_srcdir=\$srcdir/..
10533 shift || exit 1
10534
10535 if test "\$form" = normal ; then
10536         if test "$cf_format" = yes ; then
10537         if test "$cf_inboth" = no ; then
10538                 sh \$0 format \$verb \$mandir \$srcdir \$*
10539                 exit $?
10540         fi
10541         fi
10542         cf_subdir=\$mandir/man
10543         cf_tables=$MANPAGE_TBL
10544 else
10545         cf_subdir=\$mandir/cat
10546         cf_tables=yes
10547 fi
10548
10549 # process the list of source-files
10550 for i in \$* ; do
10551 case \$i in #(vi
10552 *.orig|*.rej) ;; #(vi
10553 *.[0-9]*)
10554         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10555         if test \$verb = installing ; then
10556         if test ! -d \$cf_subdir\${section} ; then
10557                 mkdir -p \$cf_subdir\$section
10558         fi
10559         fi
10560
10561         # replace variables in man page
10562         if test ! -f $cf_man_alias ; then
10563 cat >>$cf_man_alias <<-CF_EOF2
10564                 s,@DATADIR@,\$datadir,g
10565                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10566                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10567                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10568                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10569                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10570                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10571 CF_EOF
10572
10573         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10574         do
10575                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10576                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10577 cat >>$cf_edit_man <<-CF_EOF
10578                 s,@$cf_NAME@,$cf_name,g
10579 CF_EOF
10580         done
10581
10582 cat >>$cf_edit_man <<CF_EOF
10583 CF_EOF2
10584                 echo "...made $cf_man_alias"
10585         fi
10586
10587         aliases=
10588         cf_source=\`basename \$i\`
10589         inalias=\$cf_source
10590         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10591         if test ! -f \$inalias ; then
10592                 echo .. skipped \$cf_source
10593                 continue
10594         fi
10595 CF_EOF
10596
10597 if test "$MANPAGE_ALIASES" != no ; then
10598 cat >>$cf_edit_man <<CF_EOF
10599         nCurses=ignore.3x
10600         test $with_curses_h = yes && nCurses=ncurses.3x
10601         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10602 CF_EOF
10603 fi
10604
10605 if test "$MANPAGE_RENAMES" = no ; then
10606 cat >>$cf_edit_man <<CF_EOF
10607         # perform program transformations for section 1 man pages
10608         if test \$section = 1 ; then
10609                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10610         else
10611                 cf_target=\$cf_subdir\${section}/\$cf_source
10612         fi
10613 CF_EOF
10614 else
10615 cat >>$cf_edit_man <<CF_EOF
10616         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10617         if test -z "\$cf_target" ; then
10618                 echo '? missing rename for '\$cf_source
10619                 cf_target="\$cf_source"
10620         fi
10621         cf_target="\$cf_subdir\${section}/\${cf_target}"
10622
10623 CF_EOF
10624 fi
10625
10626 cat >>$cf_edit_man <<CF_EOF
10627         sed     -f $cf_man_alias \\
10628 CF_EOF
10629
10630 if test -f $MANPAGE_RENAMES ; then
10631 cat >>$cf_edit_man <<CF_EOF
10632                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10633 CF_EOF
10634 else
10635 cat >>$cf_edit_man <<CF_EOF
10636                 < \$i >\$TMP
10637 CF_EOF
10638 fi
10639
10640 cat >>$cf_edit_man <<CF_EOF
10641 if test \$cf_tables = yes ; then
10642         tbl \$TMP >\$TMP.out
10643         mv \$TMP.out \$TMP
10644 fi
10645 CF_EOF
10646
10647 if test $with_overwrite != yes ; then
10648 cat >>$cf_edit_man <<CF_EOF
10649         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10650         mv \$TMP.out \$TMP
10651 CF_EOF
10652 fi
10653
10654 if test $with_curses_h != yes ; then
10655 cat >>$cf_edit_man <<CF_EOF
10656         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10657         mv \$TMP.out \$TMP
10658 CF_EOF
10659 fi
10660
10661 cat >>$cf_edit_man <<CF_EOF
10662         if test \$form = format ; then
10663                 nroff -man \$TMP >\$TMP.out
10664                 mv \$TMP.out \$TMP
10665         fi
10666 CF_EOF
10667
10668 if test -n "$cf_compress" ; then
10669 cat >>$cf_edit_man <<CF_EOF
10670         if test \$verb = installing ; then
10671         if ( $cf_compress -f \$TMP )
10672         then
10673                 mv \$TMP.$cf_so_strip \$TMP
10674         fi
10675         fi
10676         cf_target="\$cf_target.$cf_so_strip"
10677 CF_EOF
10678 fi
10679
10680 case "$MANPAGE_FORMAT" in #(vi
10681 *BSDI*)
10682 cat >>$cf_edit_man <<CF_EOF
10683         if test \$form = format ; then
10684                 # BSDI installs only .0 suffixes in the cat directories
10685                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10686         fi
10687 CF_EOF
10688   ;;
10689 esac
10690
10691 cat >>$cf_edit_man <<CF_EOF
10692         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10693         if test \$verb = installing ; then
10694                 echo \$verb \$cf_target
10695                 \$INSTALL_DATA \$TMP \$cf_target
10696                 test -d \$cf_subdir\${section} &&
10697                 test -n "\$aliases" && (
10698                         cd \$cf_subdir\${section} && (
10699                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10700                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10701                                 cf_target=\`basename \$cf_target\`
10702                                 for cf_alias in \$aliases
10703                                 do
10704                                         if test \$section = 1 ; then
10705                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10706                                         fi
10707
10708                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10709                                                 if test -f \$cf_alias\${suffix} ; then
10710                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10711                                                         then
10712                                                                 continue
10713                                                         fi
10714                                                 fi
10715                                                 echo .. \$verb alias \$cf_alias\${suffix}
10716 CF_EOF
10717 case "x$LN_S" in #(vi
10718 *-f) #(vi
10719 cat >>$cf_edit_man <<CF_EOF
10720                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10721 CF_EOF
10722         ;;
10723 *)
10724 cat >>$cf_edit_man <<CF_EOF
10725                                                 rm -f \$cf_alias\${suffix}
10726                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10727 CF_EOF
10728         ;;
10729 esac
10730 cat >>$cf_edit_man <<CF_EOF
10731                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10732                                                 echo ".so \$cf_source" >\$TMP
10733 CF_EOF
10734 if test -n "$cf_compress" ; then
10735 cat >>$cf_edit_man <<CF_EOF
10736                                                 if test -n "$cf_so_strip" ; then
10737                                                         $cf_compress -f \$TMP
10738                                                         mv \$TMP.$cf_so_strip \$TMP
10739                                                 fi
10740 CF_EOF
10741 fi
10742 cat >>$cf_edit_man <<CF_EOF
10743                                                 echo .. \$verb alias \$cf_alias\${suffix}
10744                                                 rm -f \$cf_alias\${suffix}
10745                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10746                                         fi
10747                                 done
10748                         )
10749                 )
10750         elif test \$verb = removing ; then
10751                 test -f \$cf_target && (
10752                         echo \$verb \$cf_target
10753                         rm -f \$cf_target
10754                 )
10755                 test -d \$cf_subdir\${section} &&
10756                 test -n "\$aliases" && (
10757                         cd \$cf_subdir\${section} && (
10758                                 for cf_alias in \$aliases
10759                                 do
10760                                         if test \$section = 1 ; then
10761                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10762                                         fi
10763
10764                                         echo .. \$verb alias \$cf_alias\${suffix}
10765                                         rm -f \$cf_alias\${suffix}
10766                                 done
10767                         )
10768                 )
10769         else
10770 #               echo ".hy 0"
10771                 cat \$TMP
10772         fi
10773         ;;
10774 esac
10775 done
10776
10777 if test $cf_inboth = yes ; then
10778 if test \$form != format ; then
10779         sh \$0 format \$verb \$mandir \$srcdir \$*
10780 fi
10781 fi
10782
10783 exit 0
10784 CF_EOF
10785 chmod 755 $cf_edit_man
10786
10787 ###############################################################################
10788
10789 ### Note that some functions (such as const) are normally disabled anyway.
10790 echo "$as_me:10790: checking if you want to build with function extensions" >&5
10791 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10792
10793 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10794 if test "${enable_ext_funcs+set}" = set; then
10795   enableval="$enable_ext_funcs"
10796   with_ext_funcs=$enableval
10797 else
10798   with_ext_funcs=yes
10799 fi;
10800 echo "$as_me:10800: result: $with_ext_funcs" >&5
10801 echo "${ECHO_T}$with_ext_funcs" >&6
10802 if test "x$with_ext_funcs" = xyes ; then
10803         NCURSES_EXT_FUNCS=1
10804
10805 cat >>confdefs.h <<\EOF
10806 #define HAVE_ASSUME_DEFAULT_COLORS 1
10807 EOF
10808
10809 cat >>confdefs.h <<\EOF
10810 #define HAVE_CURSES_VERSION 1
10811 EOF
10812
10813 cat >>confdefs.h <<\EOF
10814 #define HAVE_HAS_KEY 1
10815 EOF
10816
10817 cat >>confdefs.h <<\EOF
10818 #define HAVE_RESIZETERM 1
10819 EOF
10820
10821 cat >>confdefs.h <<\EOF
10822 #define HAVE_RESIZE_TERM 1
10823 EOF
10824
10825 cat >>confdefs.h <<\EOF
10826 #define HAVE_TERM_ENTRY_H 1
10827 EOF
10828
10829 cat >>confdefs.h <<\EOF
10830 #define HAVE_USE_DEFAULT_COLORS 1
10831 EOF
10832
10833 cat >>confdefs.h <<\EOF
10834 #define HAVE_USE_SCREEN 1
10835 EOF
10836
10837 cat >>confdefs.h <<\EOF
10838 #define HAVE_USE_WINDOW 1
10839 EOF
10840
10841 cat >>confdefs.h <<\EOF
10842 #define HAVE_WRESIZE 1
10843 EOF
10844
10845 cat >>confdefs.h <<\EOF
10846 #define NCURSES_EXT_FUNCS 1
10847 EOF
10848
10849         GENERATED_EXT_FUNCS=generated
10850 else
10851         NCURSES_EXT_FUNCS=0
10852         GENERATED_EXT_FUNCS=
10853 fi
10854
10855 echo "$as_me:10855: checking if you want to build with experimental SCREEN extensions" >&5
10856 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10857
10858 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10859 if test "${enable_sp_funcs+set}" = set; then
10860   enableval="$enable_sp_funcs"
10861   with_sp_funcs=$enableval
10862 else
10863   with_sp_funcs=no
10864 fi;
10865 echo "$as_me:10865: result: $with_sp_funcs" >&5
10866 echo "${ECHO_T}$with_sp_funcs" >&6
10867 if test "x$with_sp_funcs" = xyes ; then
10868         NCURSES_SP_FUNCS=1
10869
10870 cat >>confdefs.h <<\EOF
10871 #define NCURSES_SP_FUNCS 1
10872 EOF
10873
10874         GENERATED_SP_FUNCS=generated
10875 else
10876         NCURSES_SP_FUNCS=0
10877         GENERATED_SP_FUNCS=
10878 fi
10879
10880 echo "$as_me:10880: checking if you want to build with experimental terminal-driver" >&5
10881 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10882
10883 # Check whether --enable-term-driver or --disable-term-driver was given.
10884 if test "${enable_term_driver+set}" = set; then
10885   enableval="$enable_term_driver"
10886   with_term_driver=$enableval
10887 else
10888   with_term_driver=no
10889 fi;
10890 echo "$as_me:10890: result: $with_term_driver" >&5
10891 echo "${ECHO_T}$with_term_driver" >&6
10892 if test "x$with_term_driver" = xyes ; then
10893
10894 cat >>confdefs.h <<\EOF
10895 #define USE_TERM_DRIVER 1
10896 EOF
10897
10898         if test "x$with_sp_funcs" != xyes ; then
10899                 { { echo "$as_me:10899: error: The term-driver option relies upon sp-funcs" >&5
10900 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10901    { (exit 1); exit 1; }; }
10902         fi
10903 fi
10904
10905 ###   use option --enable-const to turn on use of const beyond that in XSI.
10906 echo "$as_me:10906: checking for extended use of const keyword" >&5
10907 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10908
10909 # Check whether --enable-const or --disable-const was given.
10910 if test "${enable_const+set}" = set; then
10911   enableval="$enable_const"
10912   with_ext_const=$enableval
10913 else
10914   with_ext_const=no
10915 fi;
10916 echo "$as_me:10916: result: $with_ext_const" >&5
10917 echo "${ECHO_T}$with_ext_const" >&6
10918 NCURSES_CONST='/*nothing*/'
10919 if test "x$with_ext_const" = xyes ; then
10920         NCURSES_CONST=const
10921 fi
10922
10923 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10924 echo "$as_me:10924: checking if you want to use extended colors" >&5
10925 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10926
10927 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10928 if test "${enable_ext_colors+set}" = set; then
10929   enableval="$enable_ext_colors"
10930   with_ext_colors=$enableval
10931 else
10932   with_ext_colors=no
10933 fi;
10934 echo "$as_me:10934: result: $with_ext_colors" >&5
10935 echo "${ECHO_T}$with_ext_colors" >&6
10936 NCURSES_EXT_COLORS=0
10937 if test "x$with_ext_colors" = xyes ; then
10938         if test "x$with_widec" != xyes ; then
10939                 { { echo "$as_me:10939: error: This option applies only to wide-character library" >&5
10940 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10941    { (exit 1); exit 1; }; }
10942         else
10943                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10944
10945 if test "${with_abi_version+set}" != set; then
10946         case $cf_cv_rel_version in
10947         5.*)
10948                 cf_cv_rel_version=6.0
10949                 cf_cv_abi_version=6
10950                 { echo "$as_me:10950: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10951 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10952                 ;;
10953         esac
10954 fi
10955
10956         fi
10957         NCURSES_EXT_COLORS=1
10958
10959 cat >>confdefs.h <<\EOF
10960 #define NCURSES_EXT_COLORS 1
10961 EOF
10962
10963 fi
10964
10965 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10966 echo "$as_me:10966: checking if you want to use extended mouse encoding" >&5
10967 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10968
10969 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10970 if test "${enable_ext_mouse+set}" = set; then
10971   enableval="$enable_ext_mouse"
10972   with_ext_mouse=$enableval
10973 else
10974   with_ext_mouse=no
10975 fi;
10976 echo "$as_me:10976: result: $with_ext_mouse" >&5
10977 echo "${ECHO_T}$with_ext_mouse" >&6
10978 NCURSES_MOUSE_VERSION=1
10979 if test "x$with_ext_mouse" = xyes ; then
10980         NCURSES_MOUSE_VERSION=2
10981
10982 if test "${with_abi_version+set}" != set; then
10983         case $cf_cv_rel_version in
10984         5.*)
10985                 cf_cv_rel_version=6.0
10986                 cf_cv_abi_version=6
10987                 { echo "$as_me:10987: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10988 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10989                 ;;
10990         esac
10991 fi
10992
10993 fi
10994
10995 echo "$as_me:10995: checking if you want \$NCURSES_NO_PADDING code" >&5
10996 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10997
10998 # Check whether --enable-no-padding or --disable-no-padding was given.
10999 if test "${enable_no_padding+set}" = set; then
11000   enableval="$enable_no_padding"
11001   with_no_padding=$enableval
11002 else
11003   with_no_padding=$with_ext_funcs
11004 fi;
11005 echo "$as_me:11005: result: $with_no_padding" >&5
11006 echo "${ECHO_T}$with_no_padding" >&6
11007 test "x$with_no_padding" = xyes &&
11008 cat >>confdefs.h <<\EOF
11009 #define NCURSES_NO_PADDING 1
11010 EOF
11011
11012 echo "$as_me:11012: checking for ANSI C header files" >&5
11013 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11014 if test "${ac_cv_header_stdc+set}" = set; then
11015   echo $ECHO_N "(cached) $ECHO_C" >&6
11016 else
11017   cat >conftest.$ac_ext <<_ACEOF
11018 #line 11018 "configure"
11019 #include "confdefs.h"
11020 #include <stdlib.h>
11021 #include <stdarg.h>
11022 #include <string.h>
11023 #include <float.h>
11024
11025 _ACEOF
11026 if { (eval echo "$as_me:11026: \"$ac_cpp conftest.$ac_ext\"") >&5
11027   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11028   ac_status=$?
11029   egrep -v '^ *\+' conftest.er1 >conftest.err
11030   rm -f conftest.er1
11031   cat conftest.err >&5
11032   echo "$as_me:11032: \$? = $ac_status" >&5
11033   (exit $ac_status); } >/dev/null; then
11034   if test -s conftest.err; then
11035     ac_cpp_err=$ac_c_preproc_warn_flag
11036   else
11037     ac_cpp_err=
11038   fi
11039 else
11040   ac_cpp_err=yes
11041 fi
11042 if test -z "$ac_cpp_err"; then
11043   ac_cv_header_stdc=yes
11044 else
11045   echo "$as_me: failed program was:" >&5
11046   cat conftest.$ac_ext >&5
11047   ac_cv_header_stdc=no
11048 fi
11049 rm -f conftest.err conftest.$ac_ext
11050
11051 if test $ac_cv_header_stdc = yes; then
11052   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11053   cat >conftest.$ac_ext <<_ACEOF
11054 #line 11054 "configure"
11055 #include "confdefs.h"
11056 #include <string.h>
11057
11058 _ACEOF
11059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11060   egrep "memchr" >/dev/null 2>&1; then
11061   :
11062 else
11063   ac_cv_header_stdc=no
11064 fi
11065 rm -rf conftest*
11066
11067 fi
11068
11069 if test $ac_cv_header_stdc = yes; then
11070   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11071   cat >conftest.$ac_ext <<_ACEOF
11072 #line 11072 "configure"
11073 #include "confdefs.h"
11074 #include <stdlib.h>
11075
11076 _ACEOF
11077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11078   egrep "free" >/dev/null 2>&1; then
11079   :
11080 else
11081   ac_cv_header_stdc=no
11082 fi
11083 rm -rf conftest*
11084
11085 fi
11086
11087 if test $ac_cv_header_stdc = yes; then
11088   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11089   if test "$cross_compiling" = yes; then
11090   :
11091 else
11092   cat >conftest.$ac_ext <<_ACEOF
11093 #line 11093 "configure"
11094 #include "confdefs.h"
11095 #include <ctype.h>
11096 #if ((' ' & 0x0FF) == 0x020)
11097 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11098 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11099 #else
11100 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11101                      || ('j' <= (c) && (c) <= 'r') \
11102                      || ('s' <= (c) && (c) <= 'z'))
11103 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11104 #endif
11105
11106 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11107 int
11108 main ()
11109 {
11110   int i;
11111   for (i = 0; i < 256; i++)
11112     if (XOR (islower (i), ISLOWER (i))
11113         || toupper (i) != TOUPPER (i))
11114       $ac_main_return(2);
11115   $ac_main_return (0);
11116 }
11117 _ACEOF
11118 rm -f conftest$ac_exeext
11119 if { (eval echo "$as_me:11119: \"$ac_link\"") >&5
11120   (eval $ac_link) 2>&5
11121   ac_status=$?
11122   echo "$as_me:11122: \$? = $ac_status" >&5
11123   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11124   { (eval echo "$as_me:11124: \"$ac_try\"") >&5
11125   (eval $ac_try) 2>&5
11126   ac_status=$?
11127   echo "$as_me:11127: \$? = $ac_status" >&5
11128   (exit $ac_status); }; }; then
11129   :
11130 else
11131   echo "$as_me: program exited with status $ac_status" >&5
11132 echo "$as_me: failed program was:" >&5
11133 cat conftest.$ac_ext >&5
11134 ac_cv_header_stdc=no
11135 fi
11136 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11137 fi
11138 fi
11139 fi
11140 echo "$as_me:11140: result: $ac_cv_header_stdc" >&5
11141 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11142 if test $ac_cv_header_stdc = yes; then
11143
11144 cat >>confdefs.h <<\EOF
11145 #define STDC_HEADERS 1
11146 EOF
11147
11148 fi
11149
11150 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11151
11152 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11153                   inttypes.h stdint.h unistd.h
11154 do
11155 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11156 echo "$as_me:11156: checking for $ac_header" >&5
11157 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11158 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11159   echo $ECHO_N "(cached) $ECHO_C" >&6
11160 else
11161   cat >conftest.$ac_ext <<_ACEOF
11162 #line 11162 "configure"
11163 #include "confdefs.h"
11164 $ac_includes_default
11165 #include <$ac_header>
11166 _ACEOF
11167 rm -f conftest.$ac_objext
11168 if { (eval echo "$as_me:11168: \"$ac_compile\"") >&5
11169   (eval $ac_compile) 2>&5
11170   ac_status=$?
11171   echo "$as_me:11171: \$? = $ac_status" >&5
11172   (exit $ac_status); } &&
11173          { ac_try='test -s conftest.$ac_objext'
11174   { (eval echo "$as_me:11174: \"$ac_try\"") >&5
11175   (eval $ac_try) 2>&5
11176   ac_status=$?
11177   echo "$as_me:11177: \$? = $ac_status" >&5
11178   (exit $ac_status); }; }; then
11179   eval "$as_ac_Header=yes"
11180 else
11181   echo "$as_me: failed program was:" >&5
11182 cat conftest.$ac_ext >&5
11183 eval "$as_ac_Header=no"
11184 fi
11185 rm -f conftest.$ac_objext conftest.$ac_ext
11186 fi
11187 echo "$as_me:11187: result: `eval echo '${'$as_ac_Header'}'`" >&5
11188 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11189 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11190   cat >>confdefs.h <<EOF
11191 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11192 EOF
11193
11194 fi
11195 done
11196
11197 echo "$as_me:11197: checking for signed char" >&5
11198 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11199 if test "${ac_cv_type_signed_char+set}" = set; then
11200   echo $ECHO_N "(cached) $ECHO_C" >&6
11201 else
11202   cat >conftest.$ac_ext <<_ACEOF
11203 #line 11203 "configure"
11204 #include "confdefs.h"
11205 $ac_includes_default
11206 int
11207 main ()
11208 {
11209 if ((signed char *) 0)
11210   return 0;
11211 if (sizeof (signed char))
11212   return 0;
11213   ;
11214   return 0;
11215 }
11216 _ACEOF
11217 rm -f conftest.$ac_objext
11218 if { (eval echo "$as_me:11218: \"$ac_compile\"") >&5
11219   (eval $ac_compile) 2>&5
11220   ac_status=$?
11221   echo "$as_me:11221: \$? = $ac_status" >&5
11222   (exit $ac_status); } &&
11223          { ac_try='test -s conftest.$ac_objext'
11224   { (eval echo "$as_me:11224: \"$ac_try\"") >&5
11225   (eval $ac_try) 2>&5
11226   ac_status=$?
11227   echo "$as_me:11227: \$? = $ac_status" >&5
11228   (exit $ac_status); }; }; then
11229   ac_cv_type_signed_char=yes
11230 else
11231   echo "$as_me: failed program was:" >&5
11232 cat conftest.$ac_ext >&5
11233 ac_cv_type_signed_char=no
11234 fi
11235 rm -f conftest.$ac_objext conftest.$ac_ext
11236 fi
11237 echo "$as_me:11237: result: $ac_cv_type_signed_char" >&5
11238 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11239
11240 echo "$as_me:11240: checking size of signed char" >&5
11241 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11242 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11243   echo $ECHO_N "(cached) $ECHO_C" >&6
11244 else
11245   if test "$ac_cv_type_signed_char" = yes; then
11246   if test "$cross_compiling" = yes; then
11247   # Depending upon the size, compute the lo and hi bounds.
11248 cat >conftest.$ac_ext <<_ACEOF
11249 #line 11249 "configure"
11250 #include "confdefs.h"
11251 $ac_includes_default
11252 int
11253 main ()
11254 {
11255 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11256   ;
11257   return 0;
11258 }
11259 _ACEOF
11260 rm -f conftest.$ac_objext
11261 if { (eval echo "$as_me:11261: \"$ac_compile\"") >&5
11262   (eval $ac_compile) 2>&5
11263   ac_status=$?
11264   echo "$as_me:11264: \$? = $ac_status" >&5
11265   (exit $ac_status); } &&
11266          { ac_try='test -s conftest.$ac_objext'
11267   { (eval echo "$as_me:11267: \"$ac_try\"") >&5
11268   (eval $ac_try) 2>&5
11269   ac_status=$?
11270   echo "$as_me:11270: \$? = $ac_status" >&5
11271   (exit $ac_status); }; }; then
11272   ac_lo=0 ac_mid=0
11273   while :; do
11274     cat >conftest.$ac_ext <<_ACEOF
11275 #line 11275 "configure"
11276 #include "confdefs.h"
11277 $ac_includes_default
11278 int
11279 main ()
11280 {
11281 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11282   ;
11283   return 0;
11284 }
11285 _ACEOF
11286 rm -f conftest.$ac_objext
11287 if { (eval echo "$as_me:11287: \"$ac_compile\"") >&5
11288   (eval $ac_compile) 2>&5
11289   ac_status=$?
11290   echo "$as_me:11290: \$? = $ac_status" >&5
11291   (exit $ac_status); } &&
11292          { ac_try='test -s conftest.$ac_objext'
11293   { (eval echo "$as_me:11293: \"$ac_try\"") >&5
11294   (eval $ac_try) 2>&5
11295   ac_status=$?
11296   echo "$as_me:11296: \$? = $ac_status" >&5
11297   (exit $ac_status); }; }; then
11298   ac_hi=$ac_mid; break
11299 else
11300   echo "$as_me: failed program was:" >&5
11301 cat conftest.$ac_ext >&5
11302 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11303 fi
11304 rm -f conftest.$ac_objext conftest.$ac_ext
11305   done
11306 else
11307   echo "$as_me: failed program was:" >&5
11308 cat conftest.$ac_ext >&5
11309 ac_hi=-1 ac_mid=-1
11310   while :; do
11311     cat >conftest.$ac_ext <<_ACEOF
11312 #line 11312 "configure"
11313 #include "confdefs.h"
11314 $ac_includes_default
11315 int
11316 main ()
11317 {
11318 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11319   ;
11320   return 0;
11321 }
11322 _ACEOF
11323 rm -f conftest.$ac_objext
11324 if { (eval echo "$as_me:11324: \"$ac_compile\"") >&5
11325   (eval $ac_compile) 2>&5
11326   ac_status=$?
11327   echo "$as_me:11327: \$? = $ac_status" >&5
11328   (exit $ac_status); } &&
11329          { ac_try='test -s conftest.$ac_objext'
11330   { (eval echo "$as_me:11330: \"$ac_try\"") >&5
11331   (eval $ac_try) 2>&5
11332   ac_status=$?
11333   echo "$as_me:11333: \$? = $ac_status" >&5
11334   (exit $ac_status); }; }; then
11335   ac_lo=$ac_mid; break
11336 else
11337   echo "$as_me: failed program was:" >&5
11338 cat conftest.$ac_ext >&5
11339 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11340 fi
11341 rm -f conftest.$ac_objext conftest.$ac_ext
11342   done
11343 fi
11344 rm -f conftest.$ac_objext conftest.$ac_ext
11345 # Binary search between lo and hi bounds.
11346 while test "x$ac_lo" != "x$ac_hi"; do
11347   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11348   cat >conftest.$ac_ext <<_ACEOF
11349 #line 11349 "configure"
11350 #include "confdefs.h"
11351 $ac_includes_default
11352 int
11353 main ()
11354 {
11355 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11356   ;
11357   return 0;
11358 }
11359 _ACEOF
11360 rm -f conftest.$ac_objext
11361 if { (eval echo "$as_me:11361: \"$ac_compile\"") >&5
11362   (eval $ac_compile) 2>&5
11363   ac_status=$?
11364   echo "$as_me:11364: \$? = $ac_status" >&5
11365   (exit $ac_status); } &&
11366          { ac_try='test -s conftest.$ac_objext'
11367   { (eval echo "$as_me:11367: \"$ac_try\"") >&5
11368   (eval $ac_try) 2>&5
11369   ac_status=$?
11370   echo "$as_me:11370: \$? = $ac_status" >&5
11371   (exit $ac_status); }; }; then
11372   ac_hi=$ac_mid
11373 else
11374   echo "$as_me: failed program was:" >&5
11375 cat conftest.$ac_ext >&5
11376 ac_lo=`expr $ac_mid + 1`
11377 fi
11378 rm -f conftest.$ac_objext conftest.$ac_ext
11379 done
11380 ac_cv_sizeof_signed_char=$ac_lo
11381 else
11382   if test "$cross_compiling" = yes; then
11383   { { echo "$as_me:11383: error: cannot run test program while cross compiling" >&5
11384 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11385    { (exit 1); exit 1; }; }
11386 else
11387   cat >conftest.$ac_ext <<_ACEOF
11388 #line 11388 "configure"
11389 #include "confdefs.h"
11390 $ac_includes_default
11391 int
11392 main ()
11393 {
11394 FILE *f = fopen ("conftest.val", "w");
11395 if (!f)
11396   $ac_main_return (1);
11397 fprintf (f, "%d", (sizeof (signed char)));
11398 fclose (f);
11399   ;
11400   return 0;
11401 }
11402 _ACEOF
11403 rm -f conftest$ac_exeext
11404 if { (eval echo "$as_me:11404: \"$ac_link\"") >&5
11405   (eval $ac_link) 2>&5
11406   ac_status=$?
11407   echo "$as_me:11407: \$? = $ac_status" >&5
11408   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11409   { (eval echo "$as_me:11409: \"$ac_try\"") >&5
11410   (eval $ac_try) 2>&5
11411   ac_status=$?
11412   echo "$as_me:11412: \$? = $ac_status" >&5
11413   (exit $ac_status); }; }; then
11414   ac_cv_sizeof_signed_char=`cat conftest.val`
11415 else
11416   echo "$as_me: program exited with status $ac_status" >&5
11417 echo "$as_me: failed program was:" >&5
11418 cat conftest.$ac_ext >&5
11419 fi
11420 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11421 fi
11422 fi
11423 rm -f conftest.val
11424 else
11425   ac_cv_sizeof_signed_char=0
11426 fi
11427 fi
11428 echo "$as_me:11428: result: $ac_cv_sizeof_signed_char" >&5
11429 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11430 cat >>confdefs.h <<EOF
11431 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11432 EOF
11433
11434 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11435         NCURSES_SBOOL="signed char"
11436 else
11437         NCURSES_SBOOL="char"
11438 fi
11439 echo "$as_me:11439: checking if you want to use signed Boolean array in term.h" >&5
11440 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11441
11442 # Check whether --enable-signed-char or --disable-signed-char was given.
11443 if test "${enable_signed_char+set}" = set; then
11444   enableval="$enable_signed_char"
11445   with_signed_char=$enableval
11446 else
11447   with_signed_char=no
11448 fi;
11449 echo "$as_me:11449: result: $with_signed_char" >&5
11450 echo "${ECHO_T}$with_signed_char" >&6
11451 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11452
11453 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11454 echo "$as_me:11454: checking if you want SIGWINCH handler" >&5
11455 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11456
11457 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11458 if test "${enable_sigwinch+set}" = set; then
11459   enableval="$enable_sigwinch"
11460   with_sigwinch=$enableval
11461 else
11462   with_sigwinch=$with_ext_funcs
11463 fi;
11464 echo "$as_me:11464: result: $with_sigwinch" >&5
11465 echo "${ECHO_T}$with_sigwinch" >&6
11466 test "x$with_sigwinch" = xyes &&
11467 cat >>confdefs.h <<\EOF
11468 #define USE_SIGWINCH 1
11469 EOF
11470
11471 ###   use option --enable-tcap-names to allow user to define new capabilities
11472 echo "$as_me:11472: checking if you want user-definable terminal capabilities like termcap" >&5
11473 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11474
11475 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11476 if test "${enable_tcap_names+set}" = set; then
11477   enableval="$enable_tcap_names"
11478   with_tcap_names=$enableval
11479 else
11480   with_tcap_names=$with_ext_funcs
11481 fi;
11482 echo "$as_me:11482: result: $with_tcap_names" >&5
11483 echo "${ECHO_T}$with_tcap_names" >&6
11484 NCURSES_XNAMES=0
11485 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11486
11487 ###############################################################################
11488 # These options are relatively safe to experiment with.
11489
11490 echo "$as_me:11490: checking if you want all development code" >&5
11491 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11492
11493 # Check whether --with-develop or --without-develop was given.
11494 if test "${with_develop+set}" = set; then
11495   withval="$with_develop"
11496   with_develop=$withval
11497 else
11498   with_develop=no
11499 fi;
11500 echo "$as_me:11500: result: $with_develop" >&5
11501 echo "${ECHO_T}$with_develop" >&6
11502
11503 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11504 echo "$as_me:11504: checking if you want hard-tabs code" >&5
11505 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11506
11507 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11508 if test "${enable_hard_tabs+set}" = set; then
11509   enableval="$enable_hard_tabs"
11510
11511 else
11512   enable_hard_tabs=$with_develop
11513 fi;
11514 echo "$as_me:11514: result: $enable_hard_tabs" >&5
11515 echo "${ECHO_T}$enable_hard_tabs" >&6
11516 test "x$enable_hard_tabs" = xyes &&
11517 cat >>confdefs.h <<\EOF
11518 #define USE_HARD_TABS 1
11519 EOF
11520
11521 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11522 echo "$as_me:11522: checking if you want limited support for xmc" >&5
11523 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11524
11525 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11526 if test "${enable_xmc_glitch+set}" = set; then
11527   enableval="$enable_xmc_glitch"
11528
11529 else
11530   enable_xmc_glitch=$with_develop
11531 fi;
11532 echo "$as_me:11532: result: $enable_xmc_glitch" >&5
11533 echo "${ECHO_T}$enable_xmc_glitch" >&6
11534 test "x$enable_xmc_glitch" = xyes &&
11535 cat >>confdefs.h <<\EOF
11536 #define USE_XMC_SUPPORT 1
11537 EOF
11538
11539 ###############################################################################
11540 # These are just experimental, probably should not be in a package:
11541
11542 echo "$as_me:11542: checking if you do not want to assume colors are white-on-black" >&5
11543 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11544
11545 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11546 if test "${enable_assumed_color+set}" = set; then
11547   enableval="$enable_assumed_color"
11548   with_assumed_color=$enableval
11549 else
11550   with_assumed_color=yes
11551 fi;
11552 echo "$as_me:11552: result: $with_assumed_color" >&5
11553 echo "${ECHO_T}$with_assumed_color" >&6
11554 test "x$with_assumed_color" = xyes &&
11555 cat >>confdefs.h <<\EOF
11556 #define USE_ASSUMED_COLOR 1
11557 EOF
11558
11559 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11560 echo "$as_me:11560: checking if you want hashmap scrolling-optimization code" >&5
11561 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11562
11563 # Check whether --enable-hashmap or --disable-hashmap was given.
11564 if test "${enable_hashmap+set}" = set; then
11565   enableval="$enable_hashmap"
11566   with_hashmap=$enableval
11567 else
11568   with_hashmap=yes
11569 fi;
11570 echo "$as_me:11570: result: $with_hashmap" >&5
11571 echo "${ECHO_T}$with_hashmap" >&6
11572 test "x$with_hashmap" = xyes &&
11573 cat >>confdefs.h <<\EOF
11574 #define USE_HASHMAP 1
11575 EOF
11576
11577 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11578 echo "$as_me:11578: checking if you want colorfgbg code" >&5
11579 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11580
11581 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11582 if test "${enable_colorfgbg+set}" = set; then
11583   enableval="$enable_colorfgbg"
11584   with_colorfgbg=$enableval
11585 else
11586   with_colorfgbg=no
11587 fi;
11588 echo "$as_me:11588: result: $with_colorfgbg" >&5
11589 echo "${ECHO_T}$with_colorfgbg" >&6
11590 test "x$with_colorfgbg" = xyes &&
11591 cat >>confdefs.h <<\EOF
11592 #define USE_COLORFGBG 1
11593 EOF
11594
11595 ###   use option --enable-interop to turn on use of bindings used for interop
11596 echo "$as_me:11596: checking if you want interop bindings" >&5
11597 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11598
11599 # Check whether --enable-interop or --disable-interop was given.
11600 if test "${enable_interop+set}" = set; then
11601   enableval="$enable_interop"
11602   with_exp_interop=$enableval
11603 else
11604   with_exp_interop=no
11605 fi;
11606 echo "$as_me:11606: result: $with_exp_interop" >&5
11607 echo "${ECHO_T}$with_exp_interop" >&6
11608
11609 NCURSES_INTEROP_FUNCS=0
11610 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11611
11612 # This is still experimental (20080329), but should ultimately be moved to
11613 # the script-block --with-normal, etc.
11614
11615 echo "$as_me:11615: checking if you want to link with the pthread library" >&5
11616 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11617
11618 # Check whether --with-pthread or --without-pthread was given.
11619 if test "${with_pthread+set}" = set; then
11620   withval="$with_pthread"
11621   with_pthread=$withval
11622 else
11623   with_pthread=no
11624 fi;
11625 echo "$as_me:11625: result: $with_pthread" >&5
11626 echo "${ECHO_T}$with_pthread" >&6
11627
11628 if test "$with_pthread" != no ; then
11629     echo "$as_me:11629: checking for pthread.h" >&5
11630 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11631 if test "${ac_cv_header_pthread_h+set}" = set; then
11632   echo $ECHO_N "(cached) $ECHO_C" >&6
11633 else
11634   cat >conftest.$ac_ext <<_ACEOF
11635 #line 11635 "configure"
11636 #include "confdefs.h"
11637 #include <pthread.h>
11638 _ACEOF
11639 if { (eval echo "$as_me:11639: \"$ac_cpp conftest.$ac_ext\"") >&5
11640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11641   ac_status=$?
11642   egrep -v '^ *\+' conftest.er1 >conftest.err
11643   rm -f conftest.er1
11644   cat conftest.err >&5
11645   echo "$as_me:11645: \$? = $ac_status" >&5
11646   (exit $ac_status); } >/dev/null; then
11647   if test -s conftest.err; then
11648     ac_cpp_err=$ac_c_preproc_warn_flag
11649   else
11650     ac_cpp_err=
11651   fi
11652 else
11653   ac_cpp_err=yes
11654 fi
11655 if test -z "$ac_cpp_err"; then
11656   ac_cv_header_pthread_h=yes
11657 else
11658   echo "$as_me: failed program was:" >&5
11659   cat conftest.$ac_ext >&5
11660   ac_cv_header_pthread_h=no
11661 fi
11662 rm -f conftest.err conftest.$ac_ext
11663 fi
11664 echo "$as_me:11664: result: $ac_cv_header_pthread_h" >&5
11665 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11666 if test $ac_cv_header_pthread_h = yes; then
11667
11668 cat >>confdefs.h <<\EOF
11669 #define HAVE_PTHREADS_H 1
11670 EOF
11671
11672         for cf_lib_pthread in pthread c_r
11673         do
11674             echo "$as_me:11674: checking if we can link with the $cf_lib_pthread library" >&5
11675 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11676             cf_save_LIBS="$LIBS"
11677             LIBS="-l$cf_lib_pthread $LIBS"
11678             cat >conftest.$ac_ext <<_ACEOF
11679 #line 11679 "configure"
11680 #include "confdefs.h"
11681
11682 #include <pthread.h>
11683
11684 int
11685 main ()
11686 {
11687
11688                 int rc = pthread_create(0,0,0,0);
11689                 int r2 = pthread_mutexattr_settype(0, 0);
11690
11691   ;
11692   return 0;
11693 }
11694 _ACEOF
11695 rm -f conftest.$ac_objext conftest$ac_exeext
11696 if { (eval echo "$as_me:11696: \"$ac_link\"") >&5
11697   (eval $ac_link) 2>&5
11698   ac_status=$?
11699   echo "$as_me:11699: \$? = $ac_status" >&5
11700   (exit $ac_status); } &&
11701          { ac_try='test -s conftest$ac_exeext'
11702   { (eval echo "$as_me:11702: \"$ac_try\"") >&5
11703   (eval $ac_try) 2>&5
11704   ac_status=$?
11705   echo "$as_me:11705: \$? = $ac_status" >&5
11706   (exit $ac_status); }; }; then
11707   with_pthread=yes
11708 else
11709   echo "$as_me: failed program was:" >&5
11710 cat conftest.$ac_ext >&5
11711 with_pthread=no
11712 fi
11713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11714             LIBS="$cf_save_LIBS"
11715             echo "$as_me:11715: result: $with_pthread" >&5
11716 echo "${ECHO_T}$with_pthread" >&6
11717             test "$with_pthread" = yes && break
11718         done
11719
11720         if test "$with_pthread" = yes ; then
11721             LIBS="-l$cf_lib_pthread $LIBS"
11722
11723 cat >>confdefs.h <<\EOF
11724 #define HAVE_LIBPTHREADS 1
11725 EOF
11726
11727         else
11728             { { echo "$as_me:11728: error: Cannot link with pthread library" >&5
11729 echo "$as_me: error: Cannot link with pthread library" >&2;}
11730    { (exit 1); exit 1; }; }
11731         fi
11732
11733 fi
11734
11735 fi
11736
11737 if test "x$with_pthread" != xno; then
11738         echo "$as_me:11738: checking for pthread_kill" >&5
11739 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11740 if test "${ac_cv_func_pthread_kill+set}" = set; then
11741   echo $ECHO_N "(cached) $ECHO_C" >&6
11742 else
11743   cat >conftest.$ac_ext <<_ACEOF
11744 #line 11744 "configure"
11745 #include "confdefs.h"
11746 /* System header to define __stub macros and hopefully few prototypes,
11747     which can conflict with char pthread_kill (); below.  */
11748 #include <assert.h>
11749 /* Override any gcc2 internal prototype to avoid an error.  */
11750 #ifdef __cplusplus
11751 extern "C"
11752 #endif
11753 /* We use char because int might match the return type of a gcc2
11754    builtin and then its argument prototype would still apply.  */
11755 char pthread_kill ();
11756 char (*f) ();
11757
11758 int
11759 main ()
11760 {
11761 /* The GNU C library defines this for functions which it implements
11762     to always fail with ENOSYS.  Some functions are actually named
11763     something starting with __ and the normal name is an alias.  */
11764 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11765 choke me
11766 #else
11767 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11768 #endif
11769
11770   ;
11771   return 0;
11772 }
11773 _ACEOF
11774 rm -f conftest.$ac_objext conftest$ac_exeext
11775 if { (eval echo "$as_me:11775: \"$ac_link\"") >&5
11776   (eval $ac_link) 2>&5
11777   ac_status=$?
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit $ac_status); } &&
11780          { ac_try='test -s conftest$ac_exeext'
11781   { (eval echo "$as_me:11781: \"$ac_try\"") >&5
11782   (eval $ac_try) 2>&5
11783   ac_status=$?
11784   echo "$as_me:11784: \$? = $ac_status" >&5
11785   (exit $ac_status); }; }; then
11786   ac_cv_func_pthread_kill=yes
11787 else
11788   echo "$as_me: failed program was:" >&5
11789 cat conftest.$ac_ext >&5
11790 ac_cv_func_pthread_kill=no
11791 fi
11792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11793 fi
11794 echo "$as_me:11794: result: $ac_cv_func_pthread_kill" >&5
11795 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11796 if test $ac_cv_func_pthread_kill = yes; then
11797
11798                 echo "$as_me:11798: checking if you want to allow EINTR in wgetch with pthreads" >&5
11799 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11800
11801 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11802 if test "${enable_pthreads_eintr+set}" = set; then
11803   enableval="$enable_pthreads_eintr"
11804   use_pthreads_eintr=$enableval
11805 else
11806   use_pthreads_eintr=no
11807 fi;
11808                 echo "$as_me:11808: result: $use_pthreads_eintr" >&5
11809 echo "${ECHO_T}$use_pthreads_eintr" >&6
11810                 if test "x$use_pthreads_eintr" = xyes ; then
11811
11812 cat >>confdefs.h <<\EOF
11813 #define USE_PTHREADS_EINTR 1
11814 EOF
11815
11816                 fi
11817 fi
11818
11819         echo "$as_me:11819: checking if you want to use weak-symbols for pthreads" >&5
11820 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11821
11822 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11823 if test "${enable_weak_symbols+set}" = set; then
11824   enableval="$enable_weak_symbols"
11825   use_weak_symbols=$enableval
11826 else
11827   use_weak_symbols=no
11828 fi;
11829         echo "$as_me:11829: result: $use_weak_symbols" >&5
11830 echo "${ECHO_T}$use_weak_symbols" >&6
11831         if test "x$use_weak_symbols" = xyes ; then
11832
11833 echo "$as_me:11833: checking if $CC supports weak symbols" >&5
11834 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11835 if test "${cf_cv_weak_symbols+set}" = set; then
11836   echo $ECHO_N "(cached) $ECHO_C" >&6
11837 else
11838
11839 cat >conftest.$ac_ext <<_ACEOF
11840 #line 11840 "configure"
11841 #include "confdefs.h"
11842
11843 #include <stdio.h>
11844 int
11845 main ()
11846 {
11847
11848 #if defined(__GNUC__)
11849 #  if defined __USE_ISOC99
11850 #    define _cat_pragma(exp)    _Pragma(#exp)
11851 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11852 #  else
11853 #    define _weak_pragma(exp)
11854 #  endif
11855 #  define _declare(name)        __extension__ extern __typeof__(name) name
11856 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11857 #endif
11858
11859 weak_symbol(fopen);
11860
11861   ;
11862   return 0;
11863 }
11864 _ACEOF
11865 rm -f conftest.$ac_objext
11866 if { (eval echo "$as_me:11866: \"$ac_compile\"") >&5
11867   (eval $ac_compile) 2>&5
11868   ac_status=$?
11869   echo "$as_me:11869: \$? = $ac_status" >&5
11870   (exit $ac_status); } &&
11871          { ac_try='test -s conftest.$ac_objext'
11872   { (eval echo "$as_me:11872: \"$ac_try\"") >&5
11873   (eval $ac_try) 2>&5
11874   ac_status=$?
11875   echo "$as_me:11875: \$? = $ac_status" >&5
11876   (exit $ac_status); }; }; then
11877   cf_cv_weak_symbols=yes
11878 else
11879   echo "$as_me: failed program was:" >&5
11880 cat conftest.$ac_ext >&5
11881 cf_cv_weak_symbols=no
11882 fi
11883 rm -f conftest.$ac_objext conftest.$ac_ext
11884
11885 fi
11886 echo "$as_me:11886: result: $cf_cv_weak_symbols" >&5
11887 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11888
11889         else
11890                 cf_cv_weak_symbols=no
11891         fi
11892
11893         if test "x$cf_cv_weak_symbols" = xyes ; then
11894
11895 cat >>confdefs.h <<\EOF
11896 #define USE_WEAK_SYMBOLS 1
11897 EOF
11898
11899         fi
11900 fi
11901
11902 PTHREAD=
11903 if test "x$with_pthread" = "xyes" ; then
11904
11905 cat >>confdefs.h <<\EOF
11906 #define USE_PTHREADS 1
11907 EOF
11908
11909     enable_reentrant=yes
11910     if test "x$cf_cv_weak_symbols" = xyes ; then
11911         PTHREAD=-lpthread
11912     fi
11913 fi
11914
11915 # Reentrant code has to be opaque; there's little advantage to making ncurses
11916 # opaque outside of that, so there is no --enable-opaque option.  We can use
11917 # this option without --with-pthreads, but this will be always set for
11918 # pthreads.
11919 echo "$as_me:11919: checking if you want experimental reentrant code" >&5
11920 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11921
11922 # Check whether --enable-reentrant or --disable-reentrant was given.
11923 if test "${enable_reentrant+set}" = set; then
11924   enableval="$enable_reentrant"
11925   with_reentrant=$enableval
11926 else
11927   with_reentrant=no
11928 fi;
11929 echo "$as_me:11929: result: $with_reentrant" >&5
11930 echo "${ECHO_T}$with_reentrant" >&6
11931 if test "x$with_reentrant" = xyes ; then
11932         cf_cv_enable_reentrant=1
11933         cf_cv_enable_opaque="NCURSES_INTERNALS"
11934         NCURSES_OPAQUE=1
11935         NCURSES_SIZE_T=int
11936         if test "x$cf_cv_weak_symbols" = xyes ; then
11937
11938 # remove pthread library from $LIBS
11939 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11940
11941                 TEST_LIBS="-lpthread $TEST_LIBS"
11942                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11943         else
11944                 LIB_SUFFIX="t${LIB_SUFFIX}"
11945         fi
11946
11947 cat >>confdefs.h <<\EOF
11948 #define USE_REENTRANT 1
11949 EOF
11950
11951 if test "${with_abi_version+set}" != set; then
11952         case $cf_cv_rel_version in
11953         5.*)
11954                 cf_cv_rel_version=6.0
11955                 cf_cv_abi_version=6
11956                 { echo "$as_me:11956: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11957 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11958                 ;;
11959         esac
11960 fi
11961
11962 else
11963         cf_cv_enable_reentrant=0
11964         cf_cv_enable_opaque="NCURSES_OPAQUE"
11965         NCURSES_OPAQUE=0
11966         NCURSES_SIZE_T=short
11967 fi
11968
11969 ### Allow using a different wrap-prefix
11970 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11971         echo "$as_me:11971: checking for prefix used to wrap public variables" >&5
11972 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11973
11974 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11975 if test "${with_wrap_prefix+set}" = set; then
11976   withval="$with_wrap_prefix"
11977   NCURSES_WRAP_PREFIX=$withval
11978 else
11979   NCURSES_WRAP_PREFIX=_nc_
11980 fi;
11981         echo "$as_me:11981: result: $NCURSES_WRAP_PREFIX" >&5
11982 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11983 else
11984         NCURSES_WRAP_PREFIX=_nc_
11985 fi
11986
11987 cat >>confdefs.h <<EOF
11988 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11989 EOF
11990
11991 echo "$as_me:11991: checking if you want experimental safe-sprintf code" >&5
11992 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11993
11994 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11995 if test "${enable_safe_sprintf+set}" = set; then
11996   enableval="$enable_safe_sprintf"
11997   with_safe_sprintf=$enableval
11998 else
11999   with_safe_sprintf=no
12000 fi;
12001 echo "$as_me:12001: result: $with_safe_sprintf" >&5
12002 echo "${ECHO_T}$with_safe_sprintf" >&6
12003 test "x$with_safe_sprintf" = xyes &&
12004 cat >>confdefs.h <<\EOF
12005 #define USE_SAFE_SPRINTF 1
12006 EOF
12007
12008 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12009 # when hashmap is used scroll hints are useless
12010 if test "$with_hashmap" = no ; then
12011 echo "$as_me:12011: checking if you want to experiment without scrolling-hints code" >&5
12012 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12013
12014 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12015 if test "${enable_scroll_hints+set}" = set; then
12016   enableval="$enable_scroll_hints"
12017   with_scroll_hints=$enableval
12018 else
12019   with_scroll_hints=yes
12020 fi;
12021 echo "$as_me:12021: result: $with_scroll_hints" >&5
12022 echo "${ECHO_T}$with_scroll_hints" >&6
12023 test "x$with_scroll_hints" = xyes &&
12024 cat >>confdefs.h <<\EOF
12025 #define USE_SCROLL_HINTS 1
12026 EOF
12027
12028 fi
12029
12030 echo "$as_me:12030: checking if you want experimental wgetch-events code" >&5
12031 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12032
12033 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12034 if test "${enable_wgetch_events+set}" = set; then
12035   enableval="$enable_wgetch_events"
12036   with_wgetch_events=$enableval
12037 else
12038   with_wgetch_events=no
12039 fi;
12040 echo "$as_me:12040: result: $with_wgetch_events" >&5
12041 echo "${ECHO_T}$with_wgetch_events" >&6
12042 test "x$with_wgetch_events" = xyes &&
12043 cat >>confdefs.h <<\EOF
12044 #define NCURSES_WGETCH_EVENTS 1
12045 EOF
12046
12047 ###############################################################################
12048
12049 ###     use option --disable-echo to suppress full display compiling commands
12050
12051 echo "$as_me:12051: checking if you want to see long compiling messages" >&5
12052 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12053
12054 # Check whether --enable-echo or --disable-echo was given.
12055 if test "${enable_echo+set}" = set; then
12056   enableval="$enable_echo"
12057   test "$enableval" != no && enableval=yes
12058   if test "$enableval" != "yes" ; then
12059
12060     ECHO_LT='--silent'
12061     ECHO_LD='@echo linking $@;'
12062     RULE_CC='@echo compiling $<'
12063     SHOW_CC='@echo compiling $@'
12064     ECHO_CC='@'
12065
12066   else
12067
12068     ECHO_LT=''
12069     ECHO_LD=''
12070     RULE_CC=''
12071     SHOW_CC=''
12072     ECHO_CC=''
12073
12074   fi
12075 else
12076   enableval=yes
12077
12078     ECHO_LT=''
12079     ECHO_LD=''
12080     RULE_CC=''
12081     SHOW_CC=''
12082     ECHO_CC=''
12083
12084 fi;
12085 echo "$as_me:12085: result: $enableval" >&5
12086 echo "${ECHO_T}$enableval" >&6
12087
12088 if test "x$enable_echo" = xyes; then
12089         ECHO_LINK=
12090 else
12091         ECHO_LINK='@ echo linking $@ ... ;'
12092         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12093         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12094 fi
12095
12096 ###     use option --enable-warnings to turn on all gcc warnings
12097 echo "$as_me:12097: checking if you want to see compiler warnings" >&5
12098 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12099
12100 # Check whether --enable-warnings or --disable-warnings was given.
12101 if test "${enable_warnings+set}" = set; then
12102   enableval="$enable_warnings"
12103   with_warnings=$enableval
12104 fi;
12105 echo "$as_me:12105: result: $with_warnings" >&5
12106 echo "${ECHO_T}$with_warnings" >&6
12107
12108 if test "x$with_warnings" = "xyes"; then
12109
12110         ADAFLAGS="$ADAFLAGS -gnatg"
12111
12112 INTEL_COMPILER=no
12113
12114 if test "$GCC" = yes ; then
12115         case $host_os in
12116         linux*|gnu*)
12117                 echo "$as_me:12117: checking if this is really Intel C compiler" >&5
12118 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12119                 cf_save_CFLAGS="$CFLAGS"
12120                 CFLAGS="$CFLAGS -no-gcc"
12121                 cat >conftest.$ac_ext <<_ACEOF
12122 #line 12122 "configure"
12123 #include "confdefs.h"
12124
12125 int
12126 main ()
12127 {
12128
12129 #ifdef __INTEL_COMPILER
12130 #else
12131 make an error
12132 #endif
12133
12134   ;
12135   return 0;
12136 }
12137 _ACEOF
12138 rm -f conftest.$ac_objext
12139 if { (eval echo "$as_me:12139: \"$ac_compile\"") >&5
12140   (eval $ac_compile) 2>&5
12141   ac_status=$?
12142   echo "$as_me:12142: \$? = $ac_status" >&5
12143   (exit $ac_status); } &&
12144          { ac_try='test -s conftest.$ac_objext'
12145   { (eval echo "$as_me:12145: \"$ac_try\"") >&5
12146   (eval $ac_try) 2>&5
12147   ac_status=$?
12148   echo "$as_me:12148: \$? = $ac_status" >&5
12149   (exit $ac_status); }; }; then
12150   INTEL_COMPILER=yes
12151 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12152
12153 else
12154   echo "$as_me: failed program was:" >&5
12155 cat conftest.$ac_ext >&5
12156 fi
12157 rm -f conftest.$ac_objext conftest.$ac_ext
12158                 CFLAGS="$cf_save_CFLAGS"
12159                 echo "$as_me:12159: result: $INTEL_COMPILER" >&5
12160 echo "${ECHO_T}$INTEL_COMPILER" >&6
12161                 ;;
12162         esac
12163 fi
12164
12165 CLANG_COMPILER=no
12166
12167 if test "$GCC" = yes ; then
12168         echo "$as_me:12168: checking if this is really Clang C compiler" >&5
12169 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12170         cf_save_CFLAGS="$CFLAGS"
12171         CFLAGS="$CFLAGS -Qunused-arguments"
12172         cat >conftest.$ac_ext <<_ACEOF
12173 #line 12173 "configure"
12174 #include "confdefs.h"
12175
12176 int
12177 main ()
12178 {
12179
12180 #ifdef __clang__
12181 #else
12182 make an error
12183 #endif
12184
12185   ;
12186   return 0;
12187 }
12188 _ACEOF
12189 rm -f conftest.$ac_objext
12190 if { (eval echo "$as_me:12190: \"$ac_compile\"") >&5
12191   (eval $ac_compile) 2>&5
12192   ac_status=$?
12193   echo "$as_me:12193: \$? = $ac_status" >&5
12194   (exit $ac_status); } &&
12195          { ac_try='test -s conftest.$ac_objext'
12196   { (eval echo "$as_me:12196: \"$ac_try\"") >&5
12197   (eval $ac_try) 2>&5
12198   ac_status=$?
12199   echo "$as_me:12199: \$? = $ac_status" >&5
12200   (exit $ac_status); }; }; then
12201   CLANG_COMPILER=yes
12202 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12203
12204 else
12205   echo "$as_me: failed program was:" >&5
12206 cat conftest.$ac_ext >&5
12207 fi
12208 rm -f conftest.$ac_objext conftest.$ac_ext
12209         CFLAGS="$cf_save_CFLAGS"
12210         echo "$as_me:12210: result: $CLANG_COMPILER" >&5
12211 echo "${ECHO_T}$CLANG_COMPILER" >&6
12212 fi
12213
12214 cat > conftest.$ac_ext <<EOF
12215 #line 12215 "${as_me:-configure}"
12216 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12217 EOF
12218
12219 if test "$INTEL_COMPILER" = yes
12220 then
12221 # The "-wdXXX" options suppress warnings:
12222 # remark #1419: external declaration in primary source file
12223 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12224 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12225 # remark #193: zero used for undefined preprocessing identifier
12226 # remark #593: variable "curs_sb_left_arrow" was set but never used
12227 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12228 # remark #869: parameter "tw" was never referenced
12229 # remark #981: operands are evaluated in unspecified order
12230 # warning #279: controlling expression is constant
12231
12232         { echo "$as_me:12232: checking for $CC warning options..." >&5
12233 echo "$as_me: checking for $CC warning options..." >&6;}
12234         cf_save_CFLAGS="$CFLAGS"
12235         EXTRA_CFLAGS="-Wall"
12236         for cf_opt in \
12237                 wd1419 \
12238                 wd1683 \
12239                 wd1684 \
12240                 wd193 \
12241                 wd593 \
12242                 wd279 \
12243                 wd810 \
12244                 wd869 \
12245                 wd981
12246         do
12247                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12248                 if { (eval echo "$as_me:12248: \"$ac_compile\"") >&5
12249   (eval $ac_compile) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit $ac_status); }; then
12253                         test -n "$verbose" && echo "$as_me:12253: result: ... -$cf_opt" >&5
12254 echo "${ECHO_T}... -$cf_opt" >&6
12255                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12256                 fi
12257         done
12258         CFLAGS="$cf_save_CFLAGS"
12259
12260 elif test "$GCC" = yes
12261 then
12262         { echo "$as_me:12262: checking for $CC warning options..." >&5
12263 echo "$as_me: checking for $CC warning options..." >&6;}
12264         cf_save_CFLAGS="$CFLAGS"
12265         EXTRA_CFLAGS=
12266         cf_warn_CONST=""
12267         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12268         for cf_opt in W Wall \
12269                 Wbad-function-cast \
12270                 Wcast-align \
12271                 Wcast-qual \
12272                 Winline \
12273                 Wmissing-declarations \
12274                 Wmissing-prototypes \
12275                 Wnested-externs \
12276                 Wpointer-arith \
12277                 Wshadow \
12278                 Wstrict-prototypes \
12279                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12280         do
12281                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12282                 if { (eval echo "$as_me:12282: \"$ac_compile\"") >&5
12283   (eval $ac_compile) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit $ac_status); }; then
12287                         test -n "$verbose" && echo "$as_me:12287: result: ... -$cf_opt" >&5
12288 echo "${ECHO_T}... -$cf_opt" >&6
12289                         case $cf_opt in #(vi
12290                         Wcast-qual) #(vi
12291                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12292                                 ;;
12293                         Winline) #(vi
12294                                 case $GCC_VERSION in
12295                                 [34].*)
12296                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12297
12298 echo "${as_me:-configure}:12298: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12299
12300                                         continue;;
12301                                 esac
12302                                 ;;
12303                         Wpointer-arith) #(vi
12304                                 case $GCC_VERSION in
12305                                 [12].*)
12306                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12307
12308 echo "${as_me:-configure}:12308: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12309
12310                                         continue;;
12311                                 esac
12312                                 ;;
12313                         esac
12314                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12315                 fi
12316         done
12317         CFLAGS="$cf_save_CFLAGS"
12318 fi
12319 rm -rf conftest*
12320
12321         if test "x$cf_with_cxx" = xyes ; then
12322
12323 INTEL_CPLUSPLUS=no
12324
12325 if test "$GCC" = yes ; then
12326         case $host_os in
12327         linux*|gnu*)
12328                 echo "$as_me:12328: checking if this is really Intel C++ compiler" >&5
12329 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12330                 cf_save_CFLAGS="$CXXFLAGS"
12331                 CXXFLAGS="$CXXFLAGS -no-gcc"
12332                 cat >conftest.$ac_ext <<_ACEOF
12333 #line 12333 "configure"
12334 #include "confdefs.h"
12335
12336 int
12337 main ()
12338 {
12339
12340 #ifdef __INTEL_COMPILER
12341 #else
12342 make an error
12343 #endif
12344
12345   ;
12346   return 0;
12347 }
12348 _ACEOF
12349 rm -f conftest.$ac_objext
12350 if { (eval echo "$as_me:12350: \"$ac_compile\"") >&5
12351   (eval $ac_compile) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); } &&
12355          { ac_try='test -s conftest.$ac_objext'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; }; then
12361   INTEL_CPLUSPLUS=yes
12362 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12363
12364 else
12365   echo "$as_me: failed program was:" >&5
12366 cat conftest.$ac_ext >&5
12367 fi
12368 rm -f conftest.$ac_objext conftest.$ac_ext
12369                 CXXFLAGS="$cf_save_CFLAGS"
12370                 echo "$as_me:12370: result: $INTEL_CPLUSPLUS" >&5
12371 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12372                 ;;
12373         esac
12374 fi
12375
12376 CLANG_CPLUSPLUS=no
12377
12378 if test "$GCC" = yes ; then
12379         echo "$as_me:12379: checking if this is really Clang C++ compiler" >&5
12380 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12381         cf_save_CFLAGS="$CXXFLAGS"
12382         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12383         cat >conftest.$ac_ext <<_ACEOF
12384 #line 12384 "configure"
12385 #include "confdefs.h"
12386
12387 int
12388 main ()
12389 {
12390
12391 #ifdef __clang__
12392 #else
12393 make an error
12394 #endif
12395
12396   ;
12397   return 0;
12398 }
12399 _ACEOF
12400 rm -f conftest.$ac_objext
12401 if { (eval echo "$as_me:12401: \"$ac_compile\"") >&5
12402   (eval $ac_compile) 2>&5
12403   ac_status=$?
12404   echo "$as_me:12404: \$? = $ac_status" >&5
12405   (exit $ac_status); } &&
12406          { ac_try='test -s conftest.$ac_objext'
12407   { (eval echo "$as_me:12407: \"$ac_try\"") >&5
12408   (eval $ac_try) 2>&5
12409   ac_status=$?
12410   echo "$as_me:12410: \$? = $ac_status" >&5
12411   (exit $ac_status); }; }; then
12412   CLANG_CPLUSPLUS=yes
12413 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12414
12415 else
12416   echo "$as_me: failed program was:" >&5
12417 cat conftest.$ac_ext >&5
12418 fi
12419 rm -f conftest.$ac_objext conftest.$ac_ext
12420         CXXFLAGS="$cf_save_CFLAGS"
12421         echo "$as_me:12421: result: $CLANG_CPLUSPLUS" >&5
12422 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12423 fi
12424
12425 ac_ext=cc
12426 ac_cpp='$CXXCPP $CPPFLAGS'
12427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12428 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12430 ac_main_return=return
12431
12432 cat > conftest.$ac_ext <<EOF
12433 #line 12433 "configure"
12434 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12435 EOF
12436
12437 if test "$INTEL_CPLUSPLUS" = yes
12438 then
12439 # The "-wdXXX" options suppress warnings:
12440 # remark #1419: external declaration in primary source file
12441 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12442 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12443 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12444 # remark #193: zero used for undefined preprocessing identifier
12445 # remark #593: variable "curs_sb_left_arrow" was set but never used
12446 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12447 # remark #869: parameter "tw" was never referenced
12448 # remark #981: operands are evaluated in unspecified order
12449 # warning #269: invalid format string conversion
12450
12451         { echo "$as_me:12451: checking for $CC warning options..." >&5
12452 echo "$as_me: checking for $CC warning options..." >&6;}
12453         cf_save_CXXFLAGS="$CXXFLAGS"
12454         EXTRA_CXXFLAGS="-Wall"
12455         for cf_opt in \
12456                 wd1419 \
12457                 wd1682 \
12458                 wd1683 \
12459                 wd1684 \
12460                 wd193 \
12461                 wd279 \
12462                 wd593 \
12463                 wd810 \
12464                 wd869 \
12465                 wd981
12466         do
12467                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12468                 if { (eval echo "$as_me:12468: \"$ac_compile\"") >&5
12469   (eval $ac_compile) 2>&5
12470   ac_status=$?
12471   echo "$as_me:12471: \$? = $ac_status" >&5
12472   (exit $ac_status); }; then
12473                         test -n "$verbose" && echo "$as_me:12473: result: ... -$cf_opt" >&5
12474 echo "${ECHO_T}... -$cf_opt" >&6
12475                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12476                 fi
12477         done
12478         CXXFLAGS="$cf_save_CXXFLAGS"
12479
12480 elif test "$GXX" = yes
12481 then
12482         { echo "$as_me:12482: checking for $CXX warning options..." >&5
12483 echo "$as_me: checking for $CXX warning options..." >&6;}
12484         cf_save_CXXFLAGS="$CXXFLAGS"
12485         EXTRA_CXXFLAGS="-W -Wall"
12486         cf_gxx_extra_warnings=""
12487         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12488         case "$GCC_VERSION" in
12489         [1-2].*)
12490                 ;;
12491         *)
12492                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12493                 ;;
12494         esac
12495         for cf_opt in \
12496                 Wabi \
12497                 fabi-version=0 \
12498                 Woverloaded-virtual \
12499                 Wsign-promo \
12500                 Wsynth \
12501                 Wold-style-cast \
12502                 Wcast-align \
12503                 Wcast-qual \
12504                 Wmissing-prototypes \
12505                 Wpointer-arith \
12506                 Wshadow \
12507                 Wstrict-prototypes \
12508                 Wundef $cf_gxx_extra_warnings Wno-unused
12509         do
12510                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12511                 if { (eval echo "$as_me:12511: \"$ac_compile\"") >&5
12512   (eval $ac_compile) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); }; then
12516                         test -n "$verbose" && echo "$as_me:12516: result: ... -$cf_opt" >&5
12517 echo "${ECHO_T}... -$cf_opt" >&6
12518                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12519                 else
12520                         test -n "$verbose" && echo "$as_me:12520: result: ... no -$cf_opt" >&5
12521 echo "${ECHO_T}... no -$cf_opt" >&6
12522                 fi
12523         done
12524         CXXFLAGS="$cf_save_CXXFLAGS"
12525 fi
12526
12527 rm -rf conftest*
12528 ac_ext=c
12529 ac_cpp='$CPP $CPPFLAGS'
12530 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12531 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12532 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12533 ac_main_return=return
12534
12535         fi
12536 fi
12537
12538 if test "$GCC" = yes
12539 then
12540 cat > conftest.i <<EOF
12541 #ifndef GCC_PRINTF
12542 #define GCC_PRINTF 0
12543 #endif
12544 #ifndef GCC_SCANF
12545 #define GCC_SCANF 0
12546 #endif
12547 #ifndef GCC_NORETURN
12548 #define GCC_NORETURN /* nothing */
12549 #endif
12550 #ifndef GCC_UNUSED
12551 #define GCC_UNUSED /* nothing */
12552 #endif
12553 EOF
12554 if test "$GCC" = yes
12555 then
12556         { echo "$as_me:12556: checking for $CC __attribute__ directives..." >&5
12557 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12558 cat > conftest.$ac_ext <<EOF
12559 #line 12559 "${as_me:-configure}"
12560 #include "confdefs.h"
12561 #include "conftest.h"
12562 #include "conftest.i"
12563 #if     GCC_PRINTF
12564 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12565 #else
12566 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12567 #endif
12568 #if     GCC_SCANF
12569 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12570 #else
12571 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12572 #endif
12573 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12574 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12575 extern void foo(void) GCC_NORETURN;
12576 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12577 EOF
12578         cf_printf_attribute=no
12579         cf_scanf_attribute=no
12580         for cf_attribute in scanf printf unused noreturn
12581         do
12582
12583 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12584
12585                 cf_directive="__attribute__(($cf_attribute))"
12586                 echo "checking for $CC $cf_directive" 1>&5
12587
12588                 case $cf_attribute in #(vi
12589                 printf) #(vi
12590                         cf_printf_attribute=yes
12591                         cat >conftest.h <<EOF
12592 #define GCC_$cf_ATTRIBUTE 1
12593 EOF
12594                         ;;
12595                 scanf) #(vi
12596                         cf_scanf_attribute=yes
12597                         cat >conftest.h <<EOF
12598 #define GCC_$cf_ATTRIBUTE 1
12599 EOF
12600                         ;;
12601                 *) #(vi
12602                         cat >conftest.h <<EOF
12603 #define GCC_$cf_ATTRIBUTE $cf_directive
12604 EOF
12605                         ;;
12606                 esac
12607
12608                 if { (eval echo "$as_me:12608: \"$ac_compile\"") >&5
12609   (eval $ac_compile) 2>&5
12610   ac_status=$?
12611   echo "$as_me:12611: \$? = $ac_status" >&5
12612   (exit $ac_status); }; then
12613                         test -n "$verbose" && echo "$as_me:12613: result: ... $cf_attribute" >&5
12614 echo "${ECHO_T}... $cf_attribute" >&6
12615                         cat conftest.h >>confdefs.h
12616                         case $cf_attribute in #(vi
12617                         noreturn) #(vi
12618
12619 cat >>confdefs.h <<EOF
12620 #define GCC_NORETURN $cf_directive
12621 EOF
12622
12623                                 ;;
12624                         printf) #(vi
12625                                 cf_value='/* nothing */'
12626                                 if test "$cf_printf_attribute" != no ; then
12627                                         cf_value='__attribute__((format(printf,fmt,var)))'
12628
12629 cat >>confdefs.h <<\EOF
12630 #define GCC_PRINTF 1
12631 EOF
12632
12633                                 fi
12634
12635 cat >>confdefs.h <<EOF
12636 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12637 EOF
12638
12639                                 ;;
12640                         scanf) #(vi
12641                                 cf_value='/* nothing */'
12642                                 if test "$cf_scanf_attribute" != no ; then
12643                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12644
12645 cat >>confdefs.h <<\EOF
12646 #define GCC_SCANF 1
12647 EOF
12648
12649                                 fi
12650
12651 cat >>confdefs.h <<EOF
12652 #define GCC_SCANFLIKE(fmt,var) $cf_value
12653 EOF
12654
12655                                 ;;
12656                         unused) #(vi
12657
12658 cat >>confdefs.h <<EOF
12659 #define GCC_UNUSED $cf_directive
12660 EOF
12661
12662                                 ;;
12663                         esac
12664                 fi
12665         done
12666 else
12667         fgrep define conftest.i >>confdefs.h
12668 fi
12669 rm -rf conftest*
12670 fi
12671
12672 echo "$as_me:12672: checking if you want to work around bogus compiler/loader warnings" >&5
12673 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12674
12675 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12676 if test "${enable_string_hacks+set}" = set; then
12677   enableval="$enable_string_hacks"
12678   with_string_hacks=$enableval
12679 else
12680   with_string_hacks=no
12681 fi;
12682 echo "$as_me:12682: result: $with_string_hacks" >&5
12683 echo "${ECHO_T}$with_string_hacks" >&6
12684
12685 if test "x$with_string_hacks" = "xyes"; then
12686
12687 cat >>confdefs.h <<\EOF
12688 #define USE_STRING_HACKS 1
12689 EOF
12690
12691         { echo "$as_me:12691: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12692 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12693
12694 for ac_func in strlcat strlcpy snprintf
12695 do
12696 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12697 echo "$as_me:12697: checking for $ac_func" >&5
12698 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12699 if eval "test \"\${$as_ac_var+set}\" = set"; then
12700   echo $ECHO_N "(cached) $ECHO_C" >&6
12701 else
12702   cat >conftest.$ac_ext <<_ACEOF
12703 #line 12703 "configure"
12704 #include "confdefs.h"
12705 /* System header to define __stub macros and hopefully few prototypes,
12706     which can conflict with char $ac_func (); below.  */
12707 #include <assert.h>
12708 /* Override any gcc2 internal prototype to avoid an error.  */
12709 #ifdef __cplusplus
12710 extern "C"
12711 #endif
12712 /* We use char because int might match the return type of a gcc2
12713    builtin and then its argument prototype would still apply.  */
12714 char $ac_func ();
12715 char (*f) ();
12716
12717 int
12718 main ()
12719 {
12720 /* The GNU C library defines this for functions which it implements
12721     to always fail with ENOSYS.  Some functions are actually named
12722     something starting with __ and the normal name is an alias.  */
12723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12724 choke me
12725 #else
12726 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12727 #endif
12728
12729   ;
12730   return 0;
12731 }
12732 _ACEOF
12733 rm -f conftest.$ac_objext conftest$ac_exeext
12734 if { (eval echo "$as_me:12734: \"$ac_link\"") >&5
12735   (eval $ac_link) 2>&5
12736   ac_status=$?
12737   echo "$as_me:12737: \$? = $ac_status" >&5
12738   (exit $ac_status); } &&
12739          { ac_try='test -s conftest$ac_exeext'
12740   { (eval echo "$as_me:12740: \"$ac_try\"") >&5
12741   (eval $ac_try) 2>&5
12742   ac_status=$?
12743   echo "$as_me:12743: \$? = $ac_status" >&5
12744   (exit $ac_status); }; }; then
12745   eval "$as_ac_var=yes"
12746 else
12747   echo "$as_me: failed program was:" >&5
12748 cat conftest.$ac_ext >&5
12749 eval "$as_ac_var=no"
12750 fi
12751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12752 fi
12753 echo "$as_me:12753: result: `eval echo '${'$as_ac_var'}'`" >&5
12754 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12755 if test `eval echo '${'$as_ac_var'}'` = yes; then
12756   cat >>confdefs.h <<EOF
12757 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12758 EOF
12759
12760 fi
12761 done
12762
12763 fi
12764
12765 ###     use option --enable-assertions to turn on generation of assertion code
12766 echo "$as_me:12766: checking if you want to enable runtime assertions" >&5
12767 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12768
12769 # Check whether --enable-assertions or --disable-assertions was given.
12770 if test "${enable_assertions+set}" = set; then
12771   enableval="$enable_assertions"
12772   with_assertions=$enableval
12773 else
12774   with_assertions=no
12775 fi;
12776 echo "$as_me:12776: result: $with_assertions" >&5
12777 echo "${ECHO_T}$with_assertions" >&6
12778 if test -n "$GCC"
12779 then
12780         if test "$with_assertions" = no
12781         then
12782                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12783         else
12784
12785         ADAFLAGS="$ADAFLAGS -gnata"
12786
12787         fi
12788 fi
12789
12790 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12791
12792 echo "$as_me:12792: checking if you want to use dmalloc for testing" >&5
12793 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12794
12795 # Check whether --with-dmalloc or --without-dmalloc was given.
12796 if test "${with_dmalloc+set}" = set; then
12797   withval="$with_dmalloc"
12798
12799 cat >>confdefs.h <<EOF
12800 #define USE_DMALLOC 1
12801 EOF
12802
12803         : ${with_cflags:=-g}
12804         : ${with_no_leaks:=yes}
12805          with_dmalloc=yes
12806 else
12807   with_dmalloc=
12808 fi;
12809 echo "$as_me:12809: result: ${with_dmalloc:-no}" >&5
12810 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12811
12812 case .$with_cflags in #(vi
12813 .*-g*)
12814         case .$CFLAGS in #(vi
12815         .*-g*) #(vi
12816                 ;;
12817         *)
12818
12819 cf_fix_cppflags=no
12820 cf_new_cflags=
12821 cf_new_cppflags=
12822 cf_new_extra_cppflags=
12823
12824 for cf_add_cflags in -g
12825 do
12826 case $cf_fix_cppflags in
12827 no)
12828         case $cf_add_cflags in #(vi
12829         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12830                 case $cf_add_cflags in
12831                 -D*)
12832                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12833
12834                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12835                                 && test -z "${cf_tst_cflags}" \
12836                                 && cf_fix_cppflags=yes
12837
12838                         if test $cf_fix_cppflags = yes ; then
12839                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12840                                 continue
12841                         elif test "${cf_tst_cflags}" = "\"'" ; then
12842                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12843                                 continue
12844                         fi
12845                         ;;
12846                 esac
12847                 case "$CPPFLAGS" in
12848                 *$cf_add_cflags) #(vi
12849                         ;;
12850                 *) #(vi
12851                         case $cf_add_cflags in #(vi
12852                         -D*)
12853                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12854
12855 CPPFLAGS=`echo "$CPPFLAGS" | \
12856         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12857                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12858
12859                                 ;;
12860                         esac
12861                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12862                         ;;
12863                 esac
12864                 ;;
12865         *)
12866                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12867                 ;;
12868         esac
12869         ;;
12870 yes)
12871         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12872
12873         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12874
12875         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12876                 && test -z "${cf_tst_cflags}" \
12877                 && cf_fix_cppflags=no
12878         ;;
12879 esac
12880 done
12881
12882 if test -n "$cf_new_cflags" ; then
12883
12884         CFLAGS="$CFLAGS $cf_new_cflags"
12885 fi
12886
12887 if test -n "$cf_new_cppflags" ; then
12888
12889         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12890 fi
12891
12892 if test -n "$cf_new_extra_cppflags" ; then
12893
12894         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12895 fi
12896
12897                 ;;
12898         esac
12899         ;;
12900 esac
12901
12902 if test "$with_dmalloc" = yes ; then
12903         echo "$as_me:12903: checking for dmalloc.h" >&5
12904 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12905 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12906   echo $ECHO_N "(cached) $ECHO_C" >&6
12907 else
12908   cat >conftest.$ac_ext <<_ACEOF
12909 #line 12909 "configure"
12910 #include "confdefs.h"
12911 #include <dmalloc.h>
12912 _ACEOF
12913 if { (eval echo "$as_me:12913: \"$ac_cpp conftest.$ac_ext\"") >&5
12914   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12915   ac_status=$?
12916   egrep -v '^ *\+' conftest.er1 >conftest.err
12917   rm -f conftest.er1
12918   cat conftest.err >&5
12919   echo "$as_me:12919: \$? = $ac_status" >&5
12920   (exit $ac_status); } >/dev/null; then
12921   if test -s conftest.err; then
12922     ac_cpp_err=$ac_c_preproc_warn_flag
12923   else
12924     ac_cpp_err=
12925   fi
12926 else
12927   ac_cpp_err=yes
12928 fi
12929 if test -z "$ac_cpp_err"; then
12930   ac_cv_header_dmalloc_h=yes
12931 else
12932   echo "$as_me: failed program was:" >&5
12933   cat conftest.$ac_ext >&5
12934   ac_cv_header_dmalloc_h=no
12935 fi
12936 rm -f conftest.err conftest.$ac_ext
12937 fi
12938 echo "$as_me:12938: result: $ac_cv_header_dmalloc_h" >&5
12939 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12940 if test $ac_cv_header_dmalloc_h = yes; then
12941
12942 echo "$as_me:12942: checking for dmalloc_debug in -ldmalloc" >&5
12943 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12944 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12945   echo $ECHO_N "(cached) $ECHO_C" >&6
12946 else
12947   ac_check_lib_save_LIBS=$LIBS
12948 LIBS="-ldmalloc  $LIBS"
12949 cat >conftest.$ac_ext <<_ACEOF
12950 #line 12950 "configure"
12951 #include "confdefs.h"
12952
12953 /* Override any gcc2 internal prototype to avoid an error.  */
12954 #ifdef __cplusplus
12955 extern "C"
12956 #endif
12957 /* We use char because int might match the return type of a gcc2
12958    builtin and then its argument prototype would still apply.  */
12959 char dmalloc_debug ();
12960 int
12961 main ()
12962 {
12963 dmalloc_debug ();
12964   ;
12965   return 0;
12966 }
12967 _ACEOF
12968 rm -f conftest.$ac_objext conftest$ac_exeext
12969 if { (eval echo "$as_me:12969: \"$ac_link\"") >&5
12970   (eval $ac_link) 2>&5
12971   ac_status=$?
12972   echo "$as_me:12972: \$? = $ac_status" >&5
12973   (exit $ac_status); } &&
12974          { ac_try='test -s conftest$ac_exeext'
12975   { (eval echo "$as_me:12975: \"$ac_try\"") >&5
12976   (eval $ac_try) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit $ac_status); }; }; then
12980   ac_cv_lib_dmalloc_dmalloc_debug=yes
12981 else
12982   echo "$as_me: failed program was:" >&5
12983 cat conftest.$ac_ext >&5
12984 ac_cv_lib_dmalloc_dmalloc_debug=no
12985 fi
12986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12987 LIBS=$ac_check_lib_save_LIBS
12988 fi
12989 echo "$as_me:12989: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12990 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12991 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12992   cat >>confdefs.h <<EOF
12993 #define HAVE_LIBDMALLOC 1
12994 EOF
12995
12996   LIBS="-ldmalloc $LIBS"
12997
12998 fi
12999
13000 fi
13001
13002 fi
13003
13004 echo "$as_me:13004: checking if you want to use dbmalloc for testing" >&5
13005 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13006
13007 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13008 if test "${with_dbmalloc+set}" = set; then
13009   withval="$with_dbmalloc"
13010
13011 cat >>confdefs.h <<EOF
13012 #define USE_DBMALLOC 1
13013 EOF
13014
13015         : ${with_cflags:=-g}
13016         : ${with_no_leaks:=yes}
13017          with_dbmalloc=yes
13018 else
13019   with_dbmalloc=
13020 fi;
13021 echo "$as_me:13021: result: ${with_dbmalloc:-no}" >&5
13022 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13023
13024 case .$with_cflags in #(vi
13025 .*-g*)
13026         case .$CFLAGS in #(vi
13027         .*-g*) #(vi
13028                 ;;
13029         *)
13030
13031 cf_fix_cppflags=no
13032 cf_new_cflags=
13033 cf_new_cppflags=
13034 cf_new_extra_cppflags=
13035
13036 for cf_add_cflags in -g
13037 do
13038 case $cf_fix_cppflags in
13039 no)
13040         case $cf_add_cflags in #(vi
13041         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13042                 case $cf_add_cflags in
13043                 -D*)
13044                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13045
13046                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13047                                 && test -z "${cf_tst_cflags}" \
13048                                 && cf_fix_cppflags=yes
13049
13050                         if test $cf_fix_cppflags = yes ; then
13051                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13052                                 continue
13053                         elif test "${cf_tst_cflags}" = "\"'" ; then
13054                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13055                                 continue
13056                         fi
13057                         ;;
13058                 esac
13059                 case "$CPPFLAGS" in
13060                 *$cf_add_cflags) #(vi
13061                         ;;
13062                 *) #(vi
13063                         case $cf_add_cflags in #(vi
13064                         -D*)
13065                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13066
13067 CPPFLAGS=`echo "$CPPFLAGS" | \
13068         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13069                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13070
13071                                 ;;
13072                         esac
13073                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13074                         ;;
13075                 esac
13076                 ;;
13077         *)
13078                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13079                 ;;
13080         esac
13081         ;;
13082 yes)
13083         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13084
13085         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13086
13087         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13088                 && test -z "${cf_tst_cflags}" \
13089                 && cf_fix_cppflags=no
13090         ;;
13091 esac
13092 done
13093
13094 if test -n "$cf_new_cflags" ; then
13095
13096         CFLAGS="$CFLAGS $cf_new_cflags"
13097 fi
13098
13099 if test -n "$cf_new_cppflags" ; then
13100
13101         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13102 fi
13103
13104 if test -n "$cf_new_extra_cppflags" ; then
13105
13106         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13107 fi
13108
13109                 ;;
13110         esac
13111         ;;
13112 esac
13113
13114 if test "$with_dbmalloc" = yes ; then
13115         echo "$as_me:13115: checking for dbmalloc.h" >&5
13116 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13117 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13118   echo $ECHO_N "(cached) $ECHO_C" >&6
13119 else
13120   cat >conftest.$ac_ext <<_ACEOF
13121 #line 13121 "configure"
13122 #include "confdefs.h"
13123 #include <dbmalloc.h>
13124 _ACEOF
13125 if { (eval echo "$as_me:13125: \"$ac_cpp conftest.$ac_ext\"") >&5
13126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13127   ac_status=$?
13128   egrep -v '^ *\+' conftest.er1 >conftest.err
13129   rm -f conftest.er1
13130   cat conftest.err >&5
13131   echo "$as_me:13131: \$? = $ac_status" >&5
13132   (exit $ac_status); } >/dev/null; then
13133   if test -s conftest.err; then
13134     ac_cpp_err=$ac_c_preproc_warn_flag
13135   else
13136     ac_cpp_err=
13137   fi
13138 else
13139   ac_cpp_err=yes
13140 fi
13141 if test -z "$ac_cpp_err"; then
13142   ac_cv_header_dbmalloc_h=yes
13143 else
13144   echo "$as_me: failed program was:" >&5
13145   cat conftest.$ac_ext >&5
13146   ac_cv_header_dbmalloc_h=no
13147 fi
13148 rm -f conftest.err conftest.$ac_ext
13149 fi
13150 echo "$as_me:13150: result: $ac_cv_header_dbmalloc_h" >&5
13151 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13152 if test $ac_cv_header_dbmalloc_h = yes; then
13153
13154 echo "$as_me:13154: checking for debug_malloc in -ldbmalloc" >&5
13155 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13156 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13157   echo $ECHO_N "(cached) $ECHO_C" >&6
13158 else
13159   ac_check_lib_save_LIBS=$LIBS
13160 LIBS="-ldbmalloc  $LIBS"
13161 cat >conftest.$ac_ext <<_ACEOF
13162 #line 13162 "configure"
13163 #include "confdefs.h"
13164
13165 /* Override any gcc2 internal prototype to avoid an error.  */
13166 #ifdef __cplusplus
13167 extern "C"
13168 #endif
13169 /* We use char because int might match the return type of a gcc2
13170    builtin and then its argument prototype would still apply.  */
13171 char debug_malloc ();
13172 int
13173 main ()
13174 {
13175 debug_malloc ();
13176   ;
13177   return 0;
13178 }
13179 _ACEOF
13180 rm -f conftest.$ac_objext conftest$ac_exeext
13181 if { (eval echo "$as_me:13181: \"$ac_link\"") >&5
13182   (eval $ac_link) 2>&5
13183   ac_status=$?
13184   echo "$as_me:13184: \$? = $ac_status" >&5
13185   (exit $ac_status); } &&
13186          { ac_try='test -s conftest$ac_exeext'
13187   { (eval echo "$as_me:13187: \"$ac_try\"") >&5
13188   (eval $ac_try) 2>&5
13189   ac_status=$?
13190   echo "$as_me:13190: \$? = $ac_status" >&5
13191   (exit $ac_status); }; }; then
13192   ac_cv_lib_dbmalloc_debug_malloc=yes
13193 else
13194   echo "$as_me: failed program was:" >&5
13195 cat conftest.$ac_ext >&5
13196 ac_cv_lib_dbmalloc_debug_malloc=no
13197 fi
13198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13199 LIBS=$ac_check_lib_save_LIBS
13200 fi
13201 echo "$as_me:13201: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13202 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13203 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13204   cat >>confdefs.h <<EOF
13205 #define HAVE_LIBDBMALLOC 1
13206 EOF
13207
13208   LIBS="-ldbmalloc $LIBS"
13209
13210 fi
13211
13212 fi
13213
13214 fi
13215
13216 echo "$as_me:13216: checking if you want to use valgrind for testing" >&5
13217 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13218
13219 # Check whether --with-valgrind or --without-valgrind was given.
13220 if test "${with_valgrind+set}" = set; then
13221   withval="$with_valgrind"
13222
13223 cat >>confdefs.h <<EOF
13224 #define USE_VALGRIND 1
13225 EOF
13226
13227         : ${with_cflags:=-g}
13228         : ${with_no_leaks:=yes}
13229          with_valgrind=yes
13230 else
13231   with_valgrind=
13232 fi;
13233 echo "$as_me:13233: result: ${with_valgrind:-no}" >&5
13234 echo "${ECHO_T}${with_valgrind:-no}" >&6
13235
13236 case .$with_cflags in #(vi
13237 .*-g*)
13238         case .$CFLAGS in #(vi
13239         .*-g*) #(vi
13240                 ;;
13241         *)
13242
13243 cf_fix_cppflags=no
13244 cf_new_cflags=
13245 cf_new_cppflags=
13246 cf_new_extra_cppflags=
13247
13248 for cf_add_cflags in -g
13249 do
13250 case $cf_fix_cppflags in
13251 no)
13252         case $cf_add_cflags in #(vi
13253         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13254                 case $cf_add_cflags in
13255                 -D*)
13256                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13257
13258                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13259                                 && test -z "${cf_tst_cflags}" \
13260                                 && cf_fix_cppflags=yes
13261
13262                         if test $cf_fix_cppflags = yes ; then
13263                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13264                                 continue
13265                         elif test "${cf_tst_cflags}" = "\"'" ; then
13266                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13267                                 continue
13268                         fi
13269                         ;;
13270                 esac
13271                 case "$CPPFLAGS" in
13272                 *$cf_add_cflags) #(vi
13273                         ;;
13274                 *) #(vi
13275                         case $cf_add_cflags in #(vi
13276                         -D*)
13277                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13278
13279 CPPFLAGS=`echo "$CPPFLAGS" | \
13280         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13281                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13282
13283                                 ;;
13284                         esac
13285                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13286                         ;;
13287                 esac
13288                 ;;
13289         *)
13290                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13291                 ;;
13292         esac
13293         ;;
13294 yes)
13295         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13296
13297         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13298
13299         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13300                 && test -z "${cf_tst_cflags}" \
13301                 && cf_fix_cppflags=no
13302         ;;
13303 esac
13304 done
13305
13306 if test -n "$cf_new_cflags" ; then
13307
13308         CFLAGS="$CFLAGS $cf_new_cflags"
13309 fi
13310
13311 if test -n "$cf_new_cppflags" ; then
13312
13313         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13314 fi
13315
13316 if test -n "$cf_new_extra_cppflags" ; then
13317
13318         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13319 fi
13320
13321                 ;;
13322         esac
13323         ;;
13324 esac
13325
13326 echo "$as_me:13326: checking if you want to perform memory-leak testing" >&5
13327 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13328
13329 # Check whether --enable-leaks or --disable-leaks was given.
13330 if test "${enable_leaks+set}" = set; then
13331   enableval="$enable_leaks"
13332   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13333 else
13334   : ${with_no_leaks:=no}
13335 fi;
13336 echo "$as_me:13336: result: $with_no_leaks" >&5
13337 echo "${ECHO_T}$with_no_leaks" >&6
13338
13339 if test "$with_no_leaks" = yes ; then
13340
13341 cat >>confdefs.h <<\EOF
13342 #define NO_LEAKS 1
13343 EOF
13344
13345 cat >>confdefs.h <<\EOF
13346 #define YY_NO_LEAKS 1
13347 EOF
13348
13349 fi
13350
13351 cat >>confdefs.h <<\EOF
13352 #define HAVE_NC_ALLOC_H 1
13353 EOF
13354
13355 ###     use option --enable-expanded to generate certain macros as functions
13356
13357 # Check whether --enable-expanded or --disable-expanded was given.
13358 if test "${enable_expanded+set}" = set; then
13359   enableval="$enable_expanded"
13360   test "x$enableval" = xyes &&
13361 cat >>confdefs.h <<\EOF
13362 #define NCURSES_EXPANDED 1
13363 EOF
13364
13365 fi;
13366
13367 ###     use option --disable-macros to suppress macros in favor of functions
13368
13369 # Check whether --enable-macros or --disable-macros was given.
13370 if test "${enable_macros+set}" = set; then
13371   enableval="$enable_macros"
13372   test "$enableval" = no &&
13373 cat >>confdefs.h <<\EOF
13374 #define NCURSES_NOMACROS 1
13375 EOF
13376
13377 fi;
13378
13379 # Normally we only add trace() to the debug-library.  Allow this to be
13380 # extended to all models of the ncurses library:
13381 cf_all_traces=no
13382 case "$CFLAGS $CPPFLAGS" in
13383 *-DTRACE*)
13384         cf_all_traces=yes
13385         ;;
13386 esac
13387
13388 echo "$as_me:13388: checking whether to add trace feature to all models" >&5
13389 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13390
13391 # Check whether --with-trace or --without-trace was given.
13392 if test "${with_trace+set}" = set; then
13393   withval="$with_trace"
13394   cf_with_trace=$withval
13395 else
13396   cf_with_trace=$cf_all_traces
13397 fi;
13398 echo "$as_me:13398: result: $cf_with_trace" >&5
13399 echo "${ECHO_T}$cf_with_trace" >&6
13400
13401 if test "x$cf_with_trace" = xyes ; then
13402         LIB_TRACING=all
13403         ADA_TRACE=TRUE
13404
13405 cf_fix_cppflags=no
13406 cf_new_cflags=
13407 cf_new_cppflags=
13408 cf_new_extra_cppflags=
13409
13410 for cf_add_cflags in -DTRACE
13411 do
13412 case $cf_fix_cppflags in
13413 no)
13414         case $cf_add_cflags in #(vi
13415         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13416                 case $cf_add_cflags in
13417                 -D*)
13418                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13419
13420                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13421                                 && test -z "${cf_tst_cflags}" \
13422                                 && cf_fix_cppflags=yes
13423
13424                         if test $cf_fix_cppflags = yes ; then
13425                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13426                                 continue
13427                         elif test "${cf_tst_cflags}" = "\"'" ; then
13428                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13429                                 continue
13430                         fi
13431                         ;;
13432                 esac
13433                 case "$CPPFLAGS" in
13434                 *$cf_add_cflags) #(vi
13435                         ;;
13436                 *) #(vi
13437                         case $cf_add_cflags in #(vi
13438                         -D*)
13439                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13440
13441 CPPFLAGS=`echo "$CPPFLAGS" | \
13442         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13443                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13444
13445                                 ;;
13446                         esac
13447                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13448                         ;;
13449                 esac
13450                 ;;
13451         *)
13452                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13453                 ;;
13454         esac
13455         ;;
13456 yes)
13457         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13458
13459         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13460
13461         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13462                 && test -z "${cf_tst_cflags}" \
13463                 && cf_fix_cppflags=no
13464         ;;
13465 esac
13466 done
13467
13468 if test -n "$cf_new_cflags" ; then
13469
13470         CFLAGS="$CFLAGS $cf_new_cflags"
13471 fi
13472
13473 if test -n "$cf_new_cppflags" ; then
13474
13475         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13476 fi
13477
13478 if test -n "$cf_new_extra_cppflags" ; then
13479
13480         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13481 fi
13482
13483 else
13484         LIB_TRACING=DEBUG
13485         ADA_TRACE=FALSE
13486 fi
13487
13488 ###     Checks for libraries.
13489 case $cf_cv_system_name in #(vi
13490 *mingw32*) #(vi
13491         ;;
13492 *)
13493 echo "$as_me:13493: checking for gettimeofday" >&5
13494 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13495 if test "${ac_cv_func_gettimeofday+set}" = set; then
13496   echo $ECHO_N "(cached) $ECHO_C" >&6
13497 else
13498   cat >conftest.$ac_ext <<_ACEOF
13499 #line 13499 "configure"
13500 #include "confdefs.h"
13501 /* System header to define __stub macros and hopefully few prototypes,
13502     which can conflict with char gettimeofday (); below.  */
13503 #include <assert.h>
13504 /* Override any gcc2 internal prototype to avoid an error.  */
13505 #ifdef __cplusplus
13506 extern "C"
13507 #endif
13508 /* We use char because int might match the return type of a gcc2
13509    builtin and then its argument prototype would still apply.  */
13510 char gettimeofday ();
13511 char (*f) ();
13512
13513 int
13514 main ()
13515 {
13516 /* The GNU C library defines this for functions which it implements
13517     to always fail with ENOSYS.  Some functions are actually named
13518     something starting with __ and the normal name is an alias.  */
13519 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13520 choke me
13521 #else
13522 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13523 #endif
13524
13525   ;
13526   return 0;
13527 }
13528 _ACEOF
13529 rm -f conftest.$ac_objext conftest$ac_exeext
13530 if { (eval echo "$as_me:13530: \"$ac_link\"") >&5
13531   (eval $ac_link) 2>&5
13532   ac_status=$?
13533   echo "$as_me:13533: \$? = $ac_status" >&5
13534   (exit $ac_status); } &&
13535          { ac_try='test -s conftest$ac_exeext'
13536   { (eval echo "$as_me:13536: \"$ac_try\"") >&5
13537   (eval $ac_try) 2>&5
13538   ac_status=$?
13539   echo "$as_me:13539: \$? = $ac_status" >&5
13540   (exit $ac_status); }; }; then
13541   ac_cv_func_gettimeofday=yes
13542 else
13543   echo "$as_me: failed program was:" >&5
13544 cat conftest.$ac_ext >&5
13545 ac_cv_func_gettimeofday=no
13546 fi
13547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13548 fi
13549 echo "$as_me:13549: result: $ac_cv_func_gettimeofday" >&5
13550 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13551 if test $ac_cv_func_gettimeofday = yes; then
13552
13553 cat >>confdefs.h <<\EOF
13554 #define HAVE_GETTIMEOFDAY 1
13555 EOF
13556
13557 else
13558
13559 echo "$as_me:13559: checking for gettimeofday in -lbsd" >&5
13560 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13561 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13562   echo $ECHO_N "(cached) $ECHO_C" >&6
13563 else
13564   ac_check_lib_save_LIBS=$LIBS
13565 LIBS="-lbsd  $LIBS"
13566 cat >conftest.$ac_ext <<_ACEOF
13567 #line 13567 "configure"
13568 #include "confdefs.h"
13569
13570 /* Override any gcc2 internal prototype to avoid an error.  */
13571 #ifdef __cplusplus
13572 extern "C"
13573 #endif
13574 /* We use char because int might match the return type of a gcc2
13575    builtin and then its argument prototype would still apply.  */
13576 char gettimeofday ();
13577 int
13578 main ()
13579 {
13580 gettimeofday ();
13581   ;
13582   return 0;
13583 }
13584 _ACEOF
13585 rm -f conftest.$ac_objext conftest$ac_exeext
13586 if { (eval echo "$as_me:13586: \"$ac_link\"") >&5
13587   (eval $ac_link) 2>&5
13588   ac_status=$?
13589   echo "$as_me:13589: \$? = $ac_status" >&5
13590   (exit $ac_status); } &&
13591          { ac_try='test -s conftest$ac_exeext'
13592   { (eval echo "$as_me:13592: \"$ac_try\"") >&5
13593   (eval $ac_try) 2>&5
13594   ac_status=$?
13595   echo "$as_me:13595: \$? = $ac_status" >&5
13596   (exit $ac_status); }; }; then
13597   ac_cv_lib_bsd_gettimeofday=yes
13598 else
13599   echo "$as_me: failed program was:" >&5
13600 cat conftest.$ac_ext >&5
13601 ac_cv_lib_bsd_gettimeofday=no
13602 fi
13603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13604 LIBS=$ac_check_lib_save_LIBS
13605 fi
13606 echo "$as_me:13606: result: $ac_cv_lib_bsd_gettimeofday" >&5
13607 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13608 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13609
13610 cat >>confdefs.h <<\EOF
13611 #define HAVE_GETTIMEOFDAY 1
13612 EOF
13613
13614         LIBS="-lbsd $LIBS"
13615 fi
13616
13617 fi
13618         ;;
13619 esac
13620
13621 echo "$as_me:13621: checking if -lm needed for math functions" >&5
13622 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13623 if test "${cf_cv_need_libm+set}" = set; then
13624   echo $ECHO_N "(cached) $ECHO_C" >&6
13625 else
13626
13627         cat >conftest.$ac_ext <<_ACEOF
13628 #line 13628 "configure"
13629 #include "confdefs.h"
13630
13631         #include <stdio.h>
13632         #include <math.h>
13633
13634 int
13635 main ()
13636 {
13637 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13638   ;
13639   return 0;
13640 }
13641 _ACEOF
13642 rm -f conftest.$ac_objext conftest$ac_exeext
13643 if { (eval echo "$as_me:13643: \"$ac_link\"") >&5
13644   (eval $ac_link) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); } &&
13648          { ac_try='test -s conftest$ac_exeext'
13649   { (eval echo "$as_me:13649: \"$ac_try\"") >&5
13650   (eval $ac_try) 2>&5
13651   ac_status=$?
13652   echo "$as_me:13652: \$? = $ac_status" >&5
13653   (exit $ac_status); }; }; then
13654   cf_cv_need_libm=no
13655 else
13656   echo "$as_me: failed program was:" >&5
13657 cat conftest.$ac_ext >&5
13658 cf_cv_need_libm=yes
13659 fi
13660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13661 fi
13662 echo "$as_me:13662: result: $cf_cv_need_libm" >&5
13663 echo "${ECHO_T}$cf_cv_need_libm" >&6
13664 if test "$cf_cv_need_libm" = yes
13665 then
13666 MATH_LIB=-lm
13667 fi
13668
13669 ###     Checks for header files.
13670 echo "$as_me:13670: checking for ANSI C header files" >&5
13671 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13672 if test "${ac_cv_header_stdc+set}" = set; then
13673   echo $ECHO_N "(cached) $ECHO_C" >&6
13674 else
13675   cat >conftest.$ac_ext <<_ACEOF
13676 #line 13676 "configure"
13677 #include "confdefs.h"
13678 #include <stdlib.h>
13679 #include <stdarg.h>
13680 #include <string.h>
13681 #include <float.h>
13682
13683 _ACEOF
13684 if { (eval echo "$as_me:13684: \"$ac_cpp conftest.$ac_ext\"") >&5
13685   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13686   ac_status=$?
13687   egrep -v '^ *\+' conftest.er1 >conftest.err
13688   rm -f conftest.er1
13689   cat conftest.err >&5
13690   echo "$as_me:13690: \$? = $ac_status" >&5
13691   (exit $ac_status); } >/dev/null; then
13692   if test -s conftest.err; then
13693     ac_cpp_err=$ac_c_preproc_warn_flag
13694   else
13695     ac_cpp_err=
13696   fi
13697 else
13698   ac_cpp_err=yes
13699 fi
13700 if test -z "$ac_cpp_err"; then
13701   ac_cv_header_stdc=yes
13702 else
13703   echo "$as_me: failed program was:" >&5
13704   cat conftest.$ac_ext >&5
13705   ac_cv_header_stdc=no
13706 fi
13707 rm -f conftest.err conftest.$ac_ext
13708
13709 if test $ac_cv_header_stdc = yes; then
13710   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13711   cat >conftest.$ac_ext <<_ACEOF
13712 #line 13712 "configure"
13713 #include "confdefs.h"
13714 #include <string.h>
13715
13716 _ACEOF
13717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13718   egrep "memchr" >/dev/null 2>&1; then
13719   :
13720 else
13721   ac_cv_header_stdc=no
13722 fi
13723 rm -rf conftest*
13724
13725 fi
13726
13727 if test $ac_cv_header_stdc = yes; then
13728   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13729   cat >conftest.$ac_ext <<_ACEOF
13730 #line 13730 "configure"
13731 #include "confdefs.h"
13732 #include <stdlib.h>
13733
13734 _ACEOF
13735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13736   egrep "free" >/dev/null 2>&1; then
13737   :
13738 else
13739   ac_cv_header_stdc=no
13740 fi
13741 rm -rf conftest*
13742
13743 fi
13744
13745 if test $ac_cv_header_stdc = yes; then
13746   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13747   if test "$cross_compiling" = yes; then
13748   :
13749 else
13750   cat >conftest.$ac_ext <<_ACEOF
13751 #line 13751 "configure"
13752 #include "confdefs.h"
13753 #include <ctype.h>
13754 #if ((' ' & 0x0FF) == 0x020)
13755 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13756 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13757 #else
13758 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13759                      || ('j' <= (c) && (c) <= 'r') \
13760                      || ('s' <= (c) && (c) <= 'z'))
13761 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13762 #endif
13763
13764 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13765 int
13766 main ()
13767 {
13768   int i;
13769   for (i = 0; i < 256; i++)
13770     if (XOR (islower (i), ISLOWER (i))
13771         || toupper (i) != TOUPPER (i))
13772       $ac_main_return(2);
13773   $ac_main_return (0);
13774 }
13775 _ACEOF
13776 rm -f conftest$ac_exeext
13777 if { (eval echo "$as_me:13777: \"$ac_link\"") >&5
13778   (eval $ac_link) 2>&5
13779   ac_status=$?
13780   echo "$as_me:13780: \$? = $ac_status" >&5
13781   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13782   { (eval echo "$as_me:13782: \"$ac_try\"") >&5
13783   (eval $ac_try) 2>&5
13784   ac_status=$?
13785   echo "$as_me:13785: \$? = $ac_status" >&5
13786   (exit $ac_status); }; }; then
13787   :
13788 else
13789   echo "$as_me: program exited with status $ac_status" >&5
13790 echo "$as_me: failed program was:" >&5
13791 cat conftest.$ac_ext >&5
13792 ac_cv_header_stdc=no
13793 fi
13794 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13795 fi
13796 fi
13797 fi
13798 echo "$as_me:13798: result: $ac_cv_header_stdc" >&5
13799 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13800 if test $ac_cv_header_stdc = yes; then
13801
13802 cat >>confdefs.h <<\EOF
13803 #define STDC_HEADERS 1
13804 EOF
13805
13806 fi
13807
13808 ac_header_dirent=no
13809 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13810   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13811 echo "$as_me:13811: checking for $ac_hdr that defines DIR" >&5
13812 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13813 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13814   echo $ECHO_N "(cached) $ECHO_C" >&6
13815 else
13816   cat >conftest.$ac_ext <<_ACEOF
13817 #line 13817 "configure"
13818 #include "confdefs.h"
13819 #include <sys/types.h>
13820 #include <$ac_hdr>
13821
13822 int
13823 main ()
13824 {
13825 if ((DIR *) 0)
13826 return 0;
13827   ;
13828   return 0;
13829 }
13830 _ACEOF
13831 rm -f conftest.$ac_objext
13832 if { (eval echo "$as_me:13832: \"$ac_compile\"") >&5
13833   (eval $ac_compile) 2>&5
13834   ac_status=$?
13835   echo "$as_me:13835: \$? = $ac_status" >&5
13836   (exit $ac_status); } &&
13837          { ac_try='test -s conftest.$ac_objext'
13838   { (eval echo "$as_me:13838: \"$ac_try\"") >&5
13839   (eval $ac_try) 2>&5
13840   ac_status=$?
13841   echo "$as_me:13841: \$? = $ac_status" >&5
13842   (exit $ac_status); }; }; then
13843   eval "$as_ac_Header=yes"
13844 else
13845   echo "$as_me: failed program was:" >&5
13846 cat conftest.$ac_ext >&5
13847 eval "$as_ac_Header=no"
13848 fi
13849 rm -f conftest.$ac_objext conftest.$ac_ext
13850 fi
13851 echo "$as_me:13851: result: `eval echo '${'$as_ac_Header'}'`" >&5
13852 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13853 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13854   cat >>confdefs.h <<EOF
13855 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13856 EOF
13857
13858 ac_header_dirent=$ac_hdr; break
13859 fi
13860
13861 done
13862 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13863 if test $ac_header_dirent = dirent.h; then
13864   echo "$as_me:13864: checking for opendir in -ldir" >&5
13865 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13866 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13867   echo $ECHO_N "(cached) $ECHO_C" >&6
13868 else
13869   ac_check_lib_save_LIBS=$LIBS
13870 LIBS="-ldir  $LIBS"
13871 cat >conftest.$ac_ext <<_ACEOF
13872 #line 13872 "configure"
13873 #include "confdefs.h"
13874
13875 /* Override any gcc2 internal prototype to avoid an error.  */
13876 #ifdef __cplusplus
13877 extern "C"
13878 #endif
13879 /* We use char because int might match the return type of a gcc2
13880    builtin and then its argument prototype would still apply.  */
13881 char opendir ();
13882 int
13883 main ()
13884 {
13885 opendir ();
13886   ;
13887   return 0;
13888 }
13889 _ACEOF
13890 rm -f conftest.$ac_objext conftest$ac_exeext
13891 if { (eval echo "$as_me:13891: \"$ac_link\"") >&5
13892   (eval $ac_link) 2>&5
13893   ac_status=$?
13894   echo "$as_me:13894: \$? = $ac_status" >&5
13895   (exit $ac_status); } &&
13896          { ac_try='test -s conftest$ac_exeext'
13897   { (eval echo "$as_me:13897: \"$ac_try\"") >&5
13898   (eval $ac_try) 2>&5
13899   ac_status=$?
13900   echo "$as_me:13900: \$? = $ac_status" >&5
13901   (exit $ac_status); }; }; then
13902   ac_cv_lib_dir_opendir=yes
13903 else
13904   echo "$as_me: failed program was:" >&5
13905 cat conftest.$ac_ext >&5
13906 ac_cv_lib_dir_opendir=no
13907 fi
13908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13909 LIBS=$ac_check_lib_save_LIBS
13910 fi
13911 echo "$as_me:13911: result: $ac_cv_lib_dir_opendir" >&5
13912 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13913 if test $ac_cv_lib_dir_opendir = yes; then
13914   LIBS="$LIBS -ldir"
13915 fi
13916
13917 else
13918   echo "$as_me:13918: checking for opendir in -lx" >&5
13919 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13920 if test "${ac_cv_lib_x_opendir+set}" = set; then
13921   echo $ECHO_N "(cached) $ECHO_C" >&6
13922 else
13923   ac_check_lib_save_LIBS=$LIBS
13924 LIBS="-lx  $LIBS"
13925 cat >conftest.$ac_ext <<_ACEOF
13926 #line 13926 "configure"
13927 #include "confdefs.h"
13928
13929 /* Override any gcc2 internal prototype to avoid an error.  */
13930 #ifdef __cplusplus
13931 extern "C"
13932 #endif
13933 /* We use char because int might match the return type of a gcc2
13934    builtin and then its argument prototype would still apply.  */
13935 char opendir ();
13936 int
13937 main ()
13938 {
13939 opendir ();
13940   ;
13941   return 0;
13942 }
13943 _ACEOF
13944 rm -f conftest.$ac_objext conftest$ac_exeext
13945 if { (eval echo "$as_me:13945: \"$ac_link\"") >&5
13946   (eval $ac_link) 2>&5
13947   ac_status=$?
13948   echo "$as_me:13948: \$? = $ac_status" >&5
13949   (exit $ac_status); } &&
13950          { ac_try='test -s conftest$ac_exeext'
13951   { (eval echo "$as_me:13951: \"$ac_try\"") >&5
13952   (eval $ac_try) 2>&5
13953   ac_status=$?
13954   echo "$as_me:13954: \$? = $ac_status" >&5
13955   (exit $ac_status); }; }; then
13956   ac_cv_lib_x_opendir=yes
13957 else
13958   echo "$as_me: failed program was:" >&5
13959 cat conftest.$ac_ext >&5
13960 ac_cv_lib_x_opendir=no
13961 fi
13962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13963 LIBS=$ac_check_lib_save_LIBS
13964 fi
13965 echo "$as_me:13965: result: $ac_cv_lib_x_opendir" >&5
13966 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13967 if test $ac_cv_lib_x_opendir = yes; then
13968   LIBS="$LIBS -lx"
13969 fi
13970
13971 fi
13972
13973 echo "$as_me:13973: checking whether time.h and sys/time.h may both be included" >&5
13974 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13975 if test "${ac_cv_header_time+set}" = set; then
13976   echo $ECHO_N "(cached) $ECHO_C" >&6
13977 else
13978   cat >conftest.$ac_ext <<_ACEOF
13979 #line 13979 "configure"
13980 #include "confdefs.h"
13981 #include <sys/types.h>
13982 #include <sys/time.h>
13983 #include <time.h>
13984
13985 int
13986 main ()
13987 {
13988 if ((struct tm *) 0)
13989 return 0;
13990   ;
13991   return 0;
13992 }
13993 _ACEOF
13994 rm -f conftest.$ac_objext
13995 if { (eval echo "$as_me:13995: \"$ac_compile\"") >&5
13996   (eval $ac_compile) 2>&5
13997   ac_status=$?
13998   echo "$as_me:13998: \$? = $ac_status" >&5
13999   (exit $ac_status); } &&
14000          { ac_try='test -s conftest.$ac_objext'
14001   { (eval echo "$as_me:14001: \"$ac_try\"") >&5
14002   (eval $ac_try) 2>&5
14003   ac_status=$?
14004   echo "$as_me:14004: \$? = $ac_status" >&5
14005   (exit $ac_status); }; }; then
14006   ac_cv_header_time=yes
14007 else
14008   echo "$as_me: failed program was:" >&5
14009 cat conftest.$ac_ext >&5
14010 ac_cv_header_time=no
14011 fi
14012 rm -f conftest.$ac_objext conftest.$ac_ext
14013 fi
14014 echo "$as_me:14014: result: $ac_cv_header_time" >&5
14015 echo "${ECHO_T}$ac_cv_header_time" >&6
14016 if test $ac_cv_header_time = yes; then
14017
14018 cat >>confdefs.h <<\EOF
14019 #define TIME_WITH_SYS_TIME 1
14020 EOF
14021
14022 fi
14023
14024 cf_regex_func=no
14025
14026 cf_regex_libs="regex re"
14027 case $host_os in #(vi
14028 mingw*)
14029         cf_regex_libs="gnurx $cf_regex_libs"
14030         ;;
14031 esac
14032
14033 echo "$as_me:14033: checking for regcomp" >&5
14034 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14035 if test "${ac_cv_func_regcomp+set}" = set; then
14036   echo $ECHO_N "(cached) $ECHO_C" >&6
14037 else
14038   cat >conftest.$ac_ext <<_ACEOF
14039 #line 14039 "configure"
14040 #include "confdefs.h"
14041 /* System header to define __stub macros and hopefully few prototypes,
14042     which can conflict with char regcomp (); below.  */
14043 #include <assert.h>
14044 /* Override any gcc2 internal prototype to avoid an error.  */
14045 #ifdef __cplusplus
14046 extern "C"
14047 #endif
14048 /* We use char because int might match the return type of a gcc2
14049    builtin and then its argument prototype would still apply.  */
14050 char regcomp ();
14051 char (*f) ();
14052
14053 int
14054 main ()
14055 {
14056 /* The GNU C library defines this for functions which it implements
14057     to always fail with ENOSYS.  Some functions are actually named
14058     something starting with __ and the normal name is an alias.  */
14059 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14060 choke me
14061 #else
14062 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14063 #endif
14064
14065   ;
14066   return 0;
14067 }
14068 _ACEOF
14069 rm -f conftest.$ac_objext conftest$ac_exeext
14070 if { (eval echo "$as_me:14070: \"$ac_link\"") >&5
14071   (eval $ac_link) 2>&5
14072   ac_status=$?
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit $ac_status); } &&
14075          { ac_try='test -s conftest$ac_exeext'
14076   { (eval echo "$as_me:14076: \"$ac_try\"") >&5
14077   (eval $ac_try) 2>&5
14078   ac_status=$?
14079   echo "$as_me:14079: \$? = $ac_status" >&5
14080   (exit $ac_status); }; }; then
14081   ac_cv_func_regcomp=yes
14082 else
14083   echo "$as_me: failed program was:" >&5
14084 cat conftest.$ac_ext >&5
14085 ac_cv_func_regcomp=no
14086 fi
14087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14088 fi
14089 echo "$as_me:14089: result: $ac_cv_func_regcomp" >&5
14090 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14091 if test $ac_cv_func_regcomp = yes; then
14092   cf_regex_func=regcomp
14093 else
14094
14095         for cf_regex_lib in $cf_regex_libs
14096         do
14097                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14098 echo "$as_me:14098: checking for regcomp in -l$cf_regex_lib" >&5
14099 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14100 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14101   echo $ECHO_N "(cached) $ECHO_C" >&6
14102 else
14103   ac_check_lib_save_LIBS=$LIBS
14104 LIBS="-l$cf_regex_lib  $LIBS"
14105 cat >conftest.$ac_ext <<_ACEOF
14106 #line 14106 "configure"
14107 #include "confdefs.h"
14108
14109 /* Override any gcc2 internal prototype to avoid an error.  */
14110 #ifdef __cplusplus
14111 extern "C"
14112 #endif
14113 /* We use char because int might match the return type of a gcc2
14114    builtin and then its argument prototype would still apply.  */
14115 char regcomp ();
14116 int
14117 main ()
14118 {
14119 regcomp ();
14120   ;
14121   return 0;
14122 }
14123 _ACEOF
14124 rm -f conftest.$ac_objext conftest$ac_exeext
14125 if { (eval echo "$as_me:14125: \"$ac_link\"") >&5
14126   (eval $ac_link) 2>&5
14127   ac_status=$?
14128   echo "$as_me:14128: \$? = $ac_status" >&5
14129   (exit $ac_status); } &&
14130          { ac_try='test -s conftest$ac_exeext'
14131   { (eval echo "$as_me:14131: \"$ac_try\"") >&5
14132   (eval $ac_try) 2>&5
14133   ac_status=$?
14134   echo "$as_me:14134: \$? = $ac_status" >&5
14135   (exit $ac_status); }; }; then
14136   eval "$as_ac_Lib=yes"
14137 else
14138   echo "$as_me: failed program was:" >&5
14139 cat conftest.$ac_ext >&5
14140 eval "$as_ac_Lib=no"
14141 fi
14142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14143 LIBS=$ac_check_lib_save_LIBS
14144 fi
14145 echo "$as_me:14145: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14146 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14147 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14148
14149                                 LIBS="-l$cf_regex_lib $LIBS"
14150                                 cf_regex_func=regcomp
14151                                 break
14152 fi
14153
14154         done
14155
14156 fi
14157
14158 if test "$cf_regex_func" = no ; then
14159         echo "$as_me:14159: checking for compile" >&5
14160 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14161 if test "${ac_cv_func_compile+set}" = set; then
14162   echo $ECHO_N "(cached) $ECHO_C" >&6
14163 else
14164   cat >conftest.$ac_ext <<_ACEOF
14165 #line 14165 "configure"
14166 #include "confdefs.h"
14167 /* System header to define __stub macros and hopefully few prototypes,
14168     which can conflict with char compile (); below.  */
14169 #include <assert.h>
14170 /* Override any gcc2 internal prototype to avoid an error.  */
14171 #ifdef __cplusplus
14172 extern "C"
14173 #endif
14174 /* We use char because int might match the return type of a gcc2
14175    builtin and then its argument prototype would still apply.  */
14176 char compile ();
14177 char (*f) ();
14178
14179 int
14180 main ()
14181 {
14182 /* The GNU C library defines this for functions which it implements
14183     to always fail with ENOSYS.  Some functions are actually named
14184     something starting with __ and the normal name is an alias.  */
14185 #if defined (__stub_compile) || defined (__stub___compile)
14186 choke me
14187 #else
14188 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14189 #endif
14190
14191   ;
14192   return 0;
14193 }
14194 _ACEOF
14195 rm -f conftest.$ac_objext conftest$ac_exeext
14196 if { (eval echo "$as_me:14196: \"$ac_link\"") >&5
14197   (eval $ac_link) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit $ac_status); } &&
14201          { ac_try='test -s conftest$ac_exeext'
14202   { (eval echo "$as_me:14202: \"$ac_try\"") >&5
14203   (eval $ac_try) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit $ac_status); }; }; then
14207   ac_cv_func_compile=yes
14208 else
14209   echo "$as_me: failed program was:" >&5
14210 cat conftest.$ac_ext >&5
14211 ac_cv_func_compile=no
14212 fi
14213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14214 fi
14215 echo "$as_me:14215: result: $ac_cv_func_compile" >&5
14216 echo "${ECHO_T}$ac_cv_func_compile" >&6
14217 if test $ac_cv_func_compile = yes; then
14218   cf_regex_func=compile
14219 else
14220
14221                 echo "$as_me:14221: checking for compile in -lgen" >&5
14222 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14223 if test "${ac_cv_lib_gen_compile+set}" = set; then
14224   echo $ECHO_N "(cached) $ECHO_C" >&6
14225 else
14226   ac_check_lib_save_LIBS=$LIBS
14227 LIBS="-lgen  $LIBS"
14228 cat >conftest.$ac_ext <<_ACEOF
14229 #line 14229 "configure"
14230 #include "confdefs.h"
14231
14232 /* Override any gcc2 internal prototype to avoid an error.  */
14233 #ifdef __cplusplus
14234 extern "C"
14235 #endif
14236 /* We use char because int might match the return type of a gcc2
14237    builtin and then its argument prototype would still apply.  */
14238 char compile ();
14239 int
14240 main ()
14241 {
14242 compile ();
14243   ;
14244   return 0;
14245 }
14246 _ACEOF
14247 rm -f conftest.$ac_objext conftest$ac_exeext
14248 if { (eval echo "$as_me:14248: \"$ac_link\"") >&5
14249   (eval $ac_link) 2>&5
14250   ac_status=$?
14251   echo "$as_me:14251: \$? = $ac_status" >&5
14252   (exit $ac_status); } &&
14253          { ac_try='test -s conftest$ac_exeext'
14254   { (eval echo "$as_me:14254: \"$ac_try\"") >&5
14255   (eval $ac_try) 2>&5
14256   ac_status=$?
14257   echo "$as_me:14257: \$? = $ac_status" >&5
14258   (exit $ac_status); }; }; then
14259   ac_cv_lib_gen_compile=yes
14260 else
14261   echo "$as_me: failed program was:" >&5
14262 cat conftest.$ac_ext >&5
14263 ac_cv_lib_gen_compile=no
14264 fi
14265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14266 LIBS=$ac_check_lib_save_LIBS
14267 fi
14268 echo "$as_me:14268: result: $ac_cv_lib_gen_compile" >&5
14269 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14270 if test $ac_cv_lib_gen_compile = yes; then
14271
14272                                 LIBS="-lgen $LIBS"
14273                                 cf_regex_func=compile
14274 fi
14275
14276 fi
14277
14278 fi
14279
14280 if test "$cf_regex_func" = no ; then
14281         { echo "$as_me:14281: WARNING: cannot find regular expression library" >&5
14282 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14283 fi
14284
14285 echo "$as_me:14285: checking for regular-expression headers" >&5
14286 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14287 if test "${cf_cv_regex_hdrs+set}" = set; then
14288   echo $ECHO_N "(cached) $ECHO_C" >&6
14289 else
14290
14291 cf_cv_regex_hdrs=no
14292 case $cf_regex_func in #(vi
14293 compile) #(vi
14294         for cf_regex_hdr in regexp.h regexpr.h
14295         do
14296                 cat >conftest.$ac_ext <<_ACEOF
14297 #line 14297 "configure"
14298 #include "confdefs.h"
14299 #include <$cf_regex_hdr>
14300 int
14301 main ()
14302 {
14303
14304                         char *p = compile("", "", "", 0);
14305                         int x = step("", "");
14306
14307   ;
14308   return 0;
14309 }
14310 _ACEOF
14311 rm -f conftest.$ac_objext conftest$ac_exeext
14312 if { (eval echo "$as_me:14312: \"$ac_link\"") >&5
14313   (eval $ac_link) 2>&5
14314   ac_status=$?
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); } &&
14317          { ac_try='test -s conftest$ac_exeext'
14318   { (eval echo "$as_me:14318: \"$ac_try\"") >&5
14319   (eval $ac_try) 2>&5
14320   ac_status=$?
14321   echo "$as_me:14321: \$? = $ac_status" >&5
14322   (exit $ac_status); }; }; then
14323
14324                         cf_cv_regex_hdrs=$cf_regex_hdr
14325                         break
14326
14327 else
14328   echo "$as_me: failed program was:" >&5
14329 cat conftest.$ac_ext >&5
14330 fi
14331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14332         done
14333         ;;
14334 *)
14335         for cf_regex_hdr in regex.h
14336         do
14337                 cat >conftest.$ac_ext <<_ACEOF
14338 #line 14338 "configure"
14339 #include "confdefs.h"
14340 #include <sys/types.h>
14341 #include <$cf_regex_hdr>
14342 int
14343 main ()
14344 {
14345
14346                         regex_t *p;
14347                         int x = regcomp(p, "", 0);
14348                         int y = regexec(p, "", 0, 0, 0);
14349                         regfree(p);
14350
14351   ;
14352   return 0;
14353 }
14354 _ACEOF
14355 rm -f conftest.$ac_objext conftest$ac_exeext
14356 if { (eval echo "$as_me:14356: \"$ac_link\"") >&5
14357   (eval $ac_link) 2>&5
14358   ac_status=$?
14359   echo "$as_me:14359: \$? = $ac_status" >&5
14360   (exit $ac_status); } &&
14361          { ac_try='test -s conftest$ac_exeext'
14362   { (eval echo "$as_me:14362: \"$ac_try\"") >&5
14363   (eval $ac_try) 2>&5
14364   ac_status=$?
14365   echo "$as_me:14365: \$? = $ac_status" >&5
14366   (exit $ac_status); }; }; then
14367
14368                         cf_cv_regex_hdrs=$cf_regex_hdr
14369                         break
14370
14371 else
14372   echo "$as_me: failed program was:" >&5
14373 cat conftest.$ac_ext >&5
14374 fi
14375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14376         done
14377         ;;
14378 esac
14379
14380 fi
14381 echo "$as_me:14381: result: $cf_cv_regex_hdrs" >&5
14382 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14383
14384 case $cf_cv_regex_hdrs in #(vi
14385     no)        { echo "$as_me:14385: WARNING: no regular expression header found" >&5
14386 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14387     regex.h)
14388 cat >>confdefs.h <<\EOF
14389 #define HAVE_REGEX_H_FUNCS 1
14390 EOF
14391  ;; #(vi
14392     regexp.h)
14393 cat >>confdefs.h <<\EOF
14394 #define HAVE_REGEXP_H_FUNCS 1
14395 EOF
14396  ;; #(vi
14397     regexpr.h)
14398 cat >>confdefs.h <<\EOF
14399 #define HAVE_REGEXPR_H_FUNCS 1
14400 EOF
14401  ;;
14402 esac
14403
14404 for ac_header in \
14405 fcntl.h \
14406 getopt.h \
14407 limits.h \
14408 locale.h \
14409 math.h \
14410 poll.h \
14411 sys/bsdtypes.h \
14412 sys/ioctl.h \
14413 sys/param.h \
14414 sys/poll.h \
14415 sys/select.h \
14416 sys/time.h \
14417 sys/times.h \
14418 ttyent.h \
14419 unistd.h \
14420 wctype.h \
14421
14422 do
14423 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14424 echo "$as_me:14424: checking for $ac_header" >&5
14425 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14426 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14427   echo $ECHO_N "(cached) $ECHO_C" >&6
14428 else
14429   cat >conftest.$ac_ext <<_ACEOF
14430 #line 14430 "configure"
14431 #include "confdefs.h"
14432 #include <$ac_header>
14433 _ACEOF
14434 if { (eval echo "$as_me:14434: \"$ac_cpp conftest.$ac_ext\"") >&5
14435   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14436   ac_status=$?
14437   egrep -v '^ *\+' conftest.er1 >conftest.err
14438   rm -f conftest.er1
14439   cat conftest.err >&5
14440   echo "$as_me:14440: \$? = $ac_status" >&5
14441   (exit $ac_status); } >/dev/null; then
14442   if test -s conftest.err; then
14443     ac_cpp_err=$ac_c_preproc_warn_flag
14444   else
14445     ac_cpp_err=
14446   fi
14447 else
14448   ac_cpp_err=yes
14449 fi
14450 if test -z "$ac_cpp_err"; then
14451   eval "$as_ac_Header=yes"
14452 else
14453   echo "$as_me: failed program was:" >&5
14454   cat conftest.$ac_ext >&5
14455   eval "$as_ac_Header=no"
14456 fi
14457 rm -f conftest.err conftest.$ac_ext
14458 fi
14459 echo "$as_me:14459: result: `eval echo '${'$as_ac_Header'}'`" >&5
14460 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14461 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14462   cat >>confdefs.h <<EOF
14463 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14464 EOF
14465
14466 fi
14467 done
14468
14469 for ac_header in unistd.h getopt.h
14470 do
14471 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14472 echo "$as_me:14472: checking for $ac_header" >&5
14473 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14474 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14475   echo $ECHO_N "(cached) $ECHO_C" >&6
14476 else
14477   cat >conftest.$ac_ext <<_ACEOF
14478 #line 14478 "configure"
14479 #include "confdefs.h"
14480 #include <$ac_header>
14481 _ACEOF
14482 if { (eval echo "$as_me:14482: \"$ac_cpp conftest.$ac_ext\"") >&5
14483   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14484   ac_status=$?
14485   egrep -v '^ *\+' conftest.er1 >conftest.err
14486   rm -f conftest.er1
14487   cat conftest.err >&5
14488   echo "$as_me:14488: \$? = $ac_status" >&5
14489   (exit $ac_status); } >/dev/null; then
14490   if test -s conftest.err; then
14491     ac_cpp_err=$ac_c_preproc_warn_flag
14492   else
14493     ac_cpp_err=
14494   fi
14495 else
14496   ac_cpp_err=yes
14497 fi
14498 if test -z "$ac_cpp_err"; then
14499   eval "$as_ac_Header=yes"
14500 else
14501   echo "$as_me: failed program was:" >&5
14502   cat conftest.$ac_ext >&5
14503   eval "$as_ac_Header=no"
14504 fi
14505 rm -f conftest.err conftest.$ac_ext
14506 fi
14507 echo "$as_me:14507: result: `eval echo '${'$as_ac_Header'}'`" >&5
14508 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14509 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14510   cat >>confdefs.h <<EOF
14511 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14512 EOF
14513
14514 fi
14515 done
14516
14517 echo "$as_me:14517: checking for header declaring getopt variables" >&5
14518 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14519 if test "${cf_cv_getopt_header+set}" = set; then
14520   echo $ECHO_N "(cached) $ECHO_C" >&6
14521 else
14522
14523 cf_cv_getopt_header=none
14524 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14525 do
14526 cat >conftest.$ac_ext <<_ACEOF
14527 #line 14527 "configure"
14528 #include "confdefs.h"
14529
14530 #include <$cf_header>
14531 int
14532 main ()
14533 {
14534 int x = optind; char *y = optarg
14535   ;
14536   return 0;
14537 }
14538 _ACEOF
14539 rm -f conftest.$ac_objext
14540 if { (eval echo "$as_me:14540: \"$ac_compile\"") >&5
14541   (eval $ac_compile) 2>&5
14542   ac_status=$?
14543   echo "$as_me:14543: \$? = $ac_status" >&5
14544   (exit $ac_status); } &&
14545          { ac_try='test -s conftest.$ac_objext'
14546   { (eval echo "$as_me:14546: \"$ac_try\"") >&5
14547   (eval $ac_try) 2>&5
14548   ac_status=$?
14549   echo "$as_me:14549: \$? = $ac_status" >&5
14550   (exit $ac_status); }; }; then
14551   cf_cv_getopt_header=$cf_header
14552  break
14553 else
14554   echo "$as_me: failed program was:" >&5
14555 cat conftest.$ac_ext >&5
14556 fi
14557 rm -f conftest.$ac_objext conftest.$ac_ext
14558 done
14559
14560 fi
14561 echo "$as_me:14561: result: $cf_cv_getopt_header" >&5
14562 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14563 if test $cf_cv_getopt_header != none ; then
14564
14565 cat >>confdefs.h <<\EOF
14566 #define HAVE_GETOPT_HEADER 1
14567 EOF
14568
14569 fi
14570
14571 # check for ISC (this may also define _POSIX_SOURCE)
14572 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14573 if test "x$ISC" = xyes ; then
14574
14575 echo "$as_me:14575: checking for main in -lcposix" >&5
14576 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14577 if test "${ac_cv_lib_cposix_main+set}" = set; then
14578   echo $ECHO_N "(cached) $ECHO_C" >&6
14579 else
14580   ac_check_lib_save_LIBS=$LIBS
14581 LIBS="-lcposix  $LIBS"
14582 cat >conftest.$ac_ext <<_ACEOF
14583 #line 14583 "configure"
14584 #include "confdefs.h"
14585
14586 int
14587 main ()
14588 {
14589 main ();
14590   ;
14591   return 0;
14592 }
14593 _ACEOF
14594 rm -f conftest.$ac_objext conftest$ac_exeext
14595 if { (eval echo "$as_me:14595: \"$ac_link\"") >&5
14596   (eval $ac_link) 2>&5
14597   ac_status=$?
14598   echo "$as_me:14598: \$? = $ac_status" >&5
14599   (exit $ac_status); } &&
14600          { ac_try='test -s conftest$ac_exeext'
14601   { (eval echo "$as_me:14601: \"$ac_try\"") >&5
14602   (eval $ac_try) 2>&5
14603   ac_status=$?
14604   echo "$as_me:14604: \$? = $ac_status" >&5
14605   (exit $ac_status); }; }; then
14606   ac_cv_lib_cposix_main=yes
14607 else
14608   echo "$as_me: failed program was:" >&5
14609 cat conftest.$ac_ext >&5
14610 ac_cv_lib_cposix_main=no
14611 fi
14612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14613 LIBS=$ac_check_lib_save_LIBS
14614 fi
14615 echo "$as_me:14615: result: $ac_cv_lib_cposix_main" >&5
14616 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14617 if test $ac_cv_lib_cposix_main = yes; then
14618   cat >>confdefs.h <<EOF
14619 #define HAVE_LIBCPOSIX 1
14620 EOF
14621
14622   LIBS="-lcposix $LIBS"
14623
14624 fi
14625
14626         echo "$as_me:14626: checking for bzero in -linet" >&5
14627 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14628 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14629   echo $ECHO_N "(cached) $ECHO_C" >&6
14630 else
14631   ac_check_lib_save_LIBS=$LIBS
14632 LIBS="-linet  $LIBS"
14633 cat >conftest.$ac_ext <<_ACEOF
14634 #line 14634 "configure"
14635 #include "confdefs.h"
14636
14637 /* Override any gcc2 internal prototype to avoid an error.  */
14638 #ifdef __cplusplus
14639 extern "C"
14640 #endif
14641 /* We use char because int might match the return type of a gcc2
14642    builtin and then its argument prototype would still apply.  */
14643 char bzero ();
14644 int
14645 main ()
14646 {
14647 bzero ();
14648   ;
14649   return 0;
14650 }
14651 _ACEOF
14652 rm -f conftest.$ac_objext conftest$ac_exeext
14653 if { (eval echo "$as_me:14653: \"$ac_link\"") >&5
14654   (eval $ac_link) 2>&5
14655   ac_status=$?
14656   echo "$as_me:14656: \$? = $ac_status" >&5
14657   (exit $ac_status); } &&
14658          { ac_try='test -s conftest$ac_exeext'
14659   { (eval echo "$as_me:14659: \"$ac_try\"") >&5
14660   (eval $ac_try) 2>&5
14661   ac_status=$?
14662   echo "$as_me:14662: \$? = $ac_status" >&5
14663   (exit $ac_status); }; }; then
14664   ac_cv_lib_inet_bzero=yes
14665 else
14666   echo "$as_me: failed program was:" >&5
14667 cat conftest.$ac_ext >&5
14668 ac_cv_lib_inet_bzero=no
14669 fi
14670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14671 LIBS=$ac_check_lib_save_LIBS
14672 fi
14673 echo "$as_me:14673: result: $ac_cv_lib_inet_bzero" >&5
14674 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14675 if test $ac_cv_lib_inet_bzero = yes; then
14676   LIBS="-linet $LIBS"
14677 fi
14678 fi
14679
14680 echo "$as_me:14680: checking if sys/time.h works with sys/select.h" >&5
14681 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14682 if test "${cf_cv_sys_time_select+set}" = set; then
14683   echo $ECHO_N "(cached) $ECHO_C" >&6
14684 else
14685
14686 cat >conftest.$ac_ext <<_ACEOF
14687 #line 14687 "configure"
14688 #include "confdefs.h"
14689
14690 #include <sys/types.h>
14691 #ifdef HAVE_SYS_TIME_H
14692 #include <sys/time.h>
14693 #endif
14694 #ifdef HAVE_SYS_SELECT_H
14695 #include <sys/select.h>
14696 #endif
14697
14698 int
14699 main ()
14700 {
14701
14702   ;
14703   return 0;
14704 }
14705 _ACEOF
14706 rm -f conftest.$ac_objext
14707 if { (eval echo "$as_me:14707: \"$ac_compile\"") >&5
14708   (eval $ac_compile) 2>&5
14709   ac_status=$?
14710   echo "$as_me:14710: \$? = $ac_status" >&5
14711   (exit $ac_status); } &&
14712          { ac_try='test -s conftest.$ac_objext'
14713   { (eval echo "$as_me:14713: \"$ac_try\"") >&5
14714   (eval $ac_try) 2>&5
14715   ac_status=$?
14716   echo "$as_me:14716: \$? = $ac_status" >&5
14717   (exit $ac_status); }; }; then
14718   cf_cv_sys_time_select=yes
14719 else
14720   echo "$as_me: failed program was:" >&5
14721 cat conftest.$ac_ext >&5
14722 cf_cv_sys_time_select=no
14723 fi
14724 rm -f conftest.$ac_objext conftest.$ac_ext
14725
14726 fi
14727
14728 echo "$as_me:14728: result: $cf_cv_sys_time_select" >&5
14729 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14730 test "$cf_cv_sys_time_select" = yes &&
14731 cat >>confdefs.h <<\EOF
14732 #define HAVE_SYS_TIME_SELECT 1
14733 EOF
14734
14735 ###     checks for compiler characteristics
14736 ac_ext=c
14737 ac_cpp='$CPP $CPPFLAGS'
14738 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14739 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14740 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14741 ac_main_return=return
14742
14743 echo "$as_me:14743: checking for an ANSI C-conforming const" >&5
14744 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14745 if test "${ac_cv_c_const+set}" = set; then
14746   echo $ECHO_N "(cached) $ECHO_C" >&6
14747 else
14748   cat >conftest.$ac_ext <<_ACEOF
14749 #line 14749 "configure"
14750 #include "confdefs.h"
14751
14752 int
14753 main ()
14754 {
14755 /* FIXME: Include the comments suggested by Paul. */
14756 #ifndef __cplusplus
14757   /* Ultrix mips cc rejects this.  */
14758   typedef int charset[2];
14759   const charset x;
14760   /* SunOS 4.1.1 cc rejects this.  */
14761   char const *const *ccp;
14762   char **p;
14763   /* NEC SVR4.0.2 mips cc rejects this.  */
14764   struct point {int x, y;};
14765   static struct point const zero = {0,0};
14766   /* AIX XL C 1.02.0.0 rejects this.
14767      It does not let you subtract one const X* pointer from another in
14768      an arm of an if-expression whose if-part is not a constant
14769      expression */
14770   const char *g = "string";
14771   ccp = &g + (g ? g-g : 0);
14772   /* HPUX 7.0 cc rejects these. */
14773   ++ccp;
14774   p = (char**) ccp;
14775   ccp = (char const *const *) p;
14776   { /* SCO 3.2v4 cc rejects this.  */
14777     char *t;
14778     char const *s = 0 ? (char *) 0 : (char const *) 0;
14779
14780     *t++ = 0;
14781   }
14782   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14783     int x[] = {25, 17};
14784     const int *foo = &x[0];
14785     ++foo;
14786   }
14787   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14788     typedef const int *iptr;
14789     iptr p = 0;
14790     ++p;
14791   }
14792   { /* AIX XL C 1.02.0.0 rejects this saying
14793        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14794     struct s { int j; const int *ap[3]; };
14795     struct s *b; b->j = 5;
14796   }
14797   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14798     const int foo = 10;
14799   }
14800 #endif
14801
14802   ;
14803   return 0;
14804 }
14805 _ACEOF
14806 rm -f conftest.$ac_objext
14807 if { (eval echo "$as_me:14807: \"$ac_compile\"") >&5
14808   (eval $ac_compile) 2>&5
14809   ac_status=$?
14810   echo "$as_me:14810: \$? = $ac_status" >&5
14811   (exit $ac_status); } &&
14812          { ac_try='test -s conftest.$ac_objext'
14813   { (eval echo "$as_me:14813: \"$ac_try\"") >&5
14814   (eval $ac_try) 2>&5
14815   ac_status=$?
14816   echo "$as_me:14816: \$? = $ac_status" >&5
14817   (exit $ac_status); }; }; then
14818   ac_cv_c_const=yes
14819 else
14820   echo "$as_me: failed program was:" >&5
14821 cat conftest.$ac_ext >&5
14822 ac_cv_c_const=no
14823 fi
14824 rm -f conftest.$ac_objext conftest.$ac_ext
14825 fi
14826 echo "$as_me:14826: result: $ac_cv_c_const" >&5
14827 echo "${ECHO_T}$ac_cv_c_const" >&6
14828 if test $ac_cv_c_const = no; then
14829
14830 cat >>confdefs.h <<\EOF
14831 #define const
14832 EOF
14833
14834 fi
14835
14836 echo "$as_me:14836: checking for inline" >&5
14837 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14838 if test "${ac_cv_c_inline+set}" = set; then
14839   echo $ECHO_N "(cached) $ECHO_C" >&6
14840 else
14841   ac_cv_c_inline=no
14842 for ac_kw in inline __inline__ __inline; do
14843   cat >conftest.$ac_ext <<_ACEOF
14844 #line 14844 "configure"
14845 #include "confdefs.h"
14846 #ifndef __cplusplus
14847 static $ac_kw int static_foo () {return 0; }
14848 $ac_kw int foo () {return 0; }
14849 #endif
14850
14851 _ACEOF
14852 rm -f conftest.$ac_objext
14853 if { (eval echo "$as_me:14853: \"$ac_compile\"") >&5
14854   (eval $ac_compile) 2>&5
14855   ac_status=$?
14856   echo "$as_me:14856: \$? = $ac_status" >&5
14857   (exit $ac_status); } &&
14858          { ac_try='test -s conftest.$ac_objext'
14859   { (eval echo "$as_me:14859: \"$ac_try\"") >&5
14860   (eval $ac_try) 2>&5
14861   ac_status=$?
14862   echo "$as_me:14862: \$? = $ac_status" >&5
14863   (exit $ac_status); }; }; then
14864   ac_cv_c_inline=$ac_kw; break
14865 else
14866   echo "$as_me: failed program was:" >&5
14867 cat conftest.$ac_ext >&5
14868 fi
14869 rm -f conftest.$ac_objext conftest.$ac_ext
14870 done
14871
14872 fi
14873 echo "$as_me:14873: result: $ac_cv_c_inline" >&5
14874 echo "${ECHO_T}$ac_cv_c_inline" >&6
14875 case $ac_cv_c_inline in
14876   inline | yes) ;;
14877   no)
14878 cat >>confdefs.h <<\EOF
14879 #define inline
14880 EOF
14881  ;;
14882   *)  cat >>confdefs.h <<EOF
14883 #define inline $ac_cv_c_inline
14884 EOF
14885  ;;
14886 esac
14887
14888 NCURSES_INLINE=
14889 if test "$ac_cv_c_inline" != no ; then
14890   NCURSES_INLINE=inline
14891   if test "$INTEL_COMPILER" = yes
14892   then
14893     :
14894   elif test "$CLANG_COMPILER" = yes
14895   then
14896     :
14897   elif test "$GCC" = yes
14898   then
14899     echo "$as_me:14899: checking if $CC supports options to tune inlining" >&5
14900 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14901 if test "${cf_cv_gcc_inline+set}" = set; then
14902   echo $ECHO_N "(cached) $ECHO_C" >&6
14903 else
14904
14905       cf_save_CFLAGS=$CFLAGS
14906       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14907       cat >conftest.$ac_ext <<_ACEOF
14908 #line 14908 "configure"
14909 #include "confdefs.h"
14910 inline int foo(void) { return 1; }
14911 int
14912 main ()
14913 {
14914 ${cf_cv_main_return:-return} foo()
14915   ;
14916   return 0;
14917 }
14918 _ACEOF
14919 rm -f conftest.$ac_objext
14920 if { (eval echo "$as_me:14920: \"$ac_compile\"") >&5
14921   (eval $ac_compile) 2>&5
14922   ac_status=$?
14923   echo "$as_me:14923: \$? = $ac_status" >&5
14924   (exit $ac_status); } &&
14925          { ac_try='test -s conftest.$ac_objext'
14926   { (eval echo "$as_me:14926: \"$ac_try\"") >&5
14927   (eval $ac_try) 2>&5
14928   ac_status=$?
14929   echo "$as_me:14929: \$? = $ac_status" >&5
14930   (exit $ac_status); }; }; then
14931   cf_cv_gcc_inline=yes
14932 else
14933   echo "$as_me: failed program was:" >&5
14934 cat conftest.$ac_ext >&5
14935 cf_cv_gcc_inline=no
14936 fi
14937 rm -f conftest.$ac_objext conftest.$ac_ext
14938       CFLAGS=$cf_save_CFLAGS
14939
14940 fi
14941 echo "$as_me:14941: result: $cf_cv_gcc_inline" >&5
14942 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14943     if test "$cf_cv_gcc_inline" = yes ; then
14944
14945 cf_fix_cppflags=no
14946 cf_new_cflags=
14947 cf_new_cppflags=
14948 cf_new_extra_cppflags=
14949
14950 for cf_add_cflags in --param max-inline-insns-single=1200
14951 do
14952 case $cf_fix_cppflags in
14953 no)
14954         case $cf_add_cflags in #(vi
14955         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14956                 case $cf_add_cflags in
14957                 -D*)
14958                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14959
14960                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14961                                 && test -z "${cf_tst_cflags}" \
14962                                 && cf_fix_cppflags=yes
14963
14964                         if test $cf_fix_cppflags = yes ; then
14965                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14966                                 continue
14967                         elif test "${cf_tst_cflags}" = "\"'" ; then
14968                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14969                                 continue
14970                         fi
14971                         ;;
14972                 esac
14973                 case "$CPPFLAGS" in
14974                 *$cf_add_cflags) #(vi
14975                         ;;
14976                 *) #(vi
14977                         case $cf_add_cflags in #(vi
14978                         -D*)
14979                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14980
14981 CPPFLAGS=`echo "$CPPFLAGS" | \
14982         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14983                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14984
14985                                 ;;
14986                         esac
14987                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14988                         ;;
14989                 esac
14990                 ;;
14991         *)
14992                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14993                 ;;
14994         esac
14995         ;;
14996 yes)
14997         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14998
14999         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15000
15001         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15002                 && test -z "${cf_tst_cflags}" \
15003                 && cf_fix_cppflags=no
15004         ;;
15005 esac
15006 done
15007
15008 if test -n "$cf_new_cflags" ; then
15009
15010         CFLAGS="$CFLAGS $cf_new_cflags"
15011 fi
15012
15013 if test -n "$cf_new_cppflags" ; then
15014
15015         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15016 fi
15017
15018 if test -n "$cf_new_extra_cppflags" ; then
15019
15020         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15021 fi
15022
15023     fi
15024   fi
15025 fi
15026
15027 echo "$as_me:15027: checking for signal global datatype" >&5
15028 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15029 if test "${cf_cv_sig_atomic_t+set}" = set; then
15030   echo $ECHO_N "(cached) $ECHO_C" >&6
15031 else
15032
15033         for cf_type in \
15034                 "volatile sig_atomic_t" \
15035                 "sig_atomic_t" \
15036                 "int"
15037         do
15038         cat >conftest.$ac_ext <<_ACEOF
15039 #line 15039 "configure"
15040 #include "confdefs.h"
15041
15042 #include <sys/types.h>
15043 #include <signal.h>
15044 #include <stdio.h>
15045
15046 extern $cf_type x;
15047 $cf_type x;
15048 static void handler(int sig)
15049 {
15050         x = 5;
15051 }
15052 int
15053 main ()
15054 {
15055 signal(SIGINT, handler);
15056                  x = 1
15057   ;
15058   return 0;
15059 }
15060 _ACEOF
15061 rm -f conftest.$ac_objext
15062 if { (eval echo "$as_me:15062: \"$ac_compile\"") >&5
15063   (eval $ac_compile) 2>&5
15064   ac_status=$?
15065   echo "$as_me:15065: \$? = $ac_status" >&5
15066   (exit $ac_status); } &&
15067          { ac_try='test -s conftest.$ac_objext'
15068   { (eval echo "$as_me:15068: \"$ac_try\"") >&5
15069   (eval $ac_try) 2>&5
15070   ac_status=$?
15071   echo "$as_me:15071: \$? = $ac_status" >&5
15072   (exit $ac_status); }; }; then
15073   cf_cv_sig_atomic_t=$cf_type
15074 else
15075   echo "$as_me: failed program was:" >&5
15076 cat conftest.$ac_ext >&5
15077 cf_cv_sig_atomic_t=no
15078 fi
15079 rm -f conftest.$ac_objext conftest.$ac_ext
15080                 test "$cf_cv_sig_atomic_t" != no && break
15081         done
15082
15083 fi
15084
15085 echo "$as_me:15085: result: $cf_cv_sig_atomic_t" >&5
15086 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15087 test "$cf_cv_sig_atomic_t" != no &&
15088 cat >>confdefs.h <<EOF
15089 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15090 EOF
15091
15092 if test $NCURSES_CHTYPE = auto ; then
15093
15094 echo "$as_me:15094: checking for type of chtype" >&5
15095 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15096 if test "${cf_cv_typeof_chtype+set}" = set; then
15097   echo $ECHO_N "(cached) $ECHO_C" >&6
15098 else
15099
15100                 if test "$cross_compiling" = yes; then
15101   cf_cv_typeof_chtype=long
15102 else
15103   cat >conftest.$ac_ext <<_ACEOF
15104 #line 15104 "configure"
15105 #include "confdefs.h"
15106
15107 #define WANT_BITS 31
15108 #include <stdio.h>
15109 int main()
15110 {
15111         FILE *fp = fopen("cf_test.out", "w");
15112         if (fp != 0) {
15113                 char *result = "long";
15114                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15115                         int n;
15116                         unsigned int x, y;
15117                         for (n = 0; n < WANT_BITS; n++) {
15118                                 x = (1 << n);
15119                                 y = (x >> n);
15120                                 if (y != 1 || x == 0) {
15121                                         x = 0;
15122                                         break;
15123                                 }
15124                         }
15125                         /*
15126                          * If x is nonzero, an int is big enough for the bits
15127                          * that we want.
15128                          */
15129                         result = (x != 0) ? "int" : "long";
15130                 }
15131                 fputs(result, fp);
15132                 fclose(fp);
15133         }
15134         ${cf_cv_main_return:-return}(0);
15135 }
15136
15137 _ACEOF
15138 rm -f conftest$ac_exeext
15139 if { (eval echo "$as_me:15139: \"$ac_link\"") >&5
15140   (eval $ac_link) 2>&5
15141   ac_status=$?
15142   echo "$as_me:15142: \$? = $ac_status" >&5
15143   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15144   { (eval echo "$as_me:15144: \"$ac_try\"") >&5
15145   (eval $ac_try) 2>&5
15146   ac_status=$?
15147   echo "$as_me:15147: \$? = $ac_status" >&5
15148   (exit $ac_status); }; }; then
15149   cf_cv_typeof_chtype=`cat cf_test.out`
15150 else
15151   echo "$as_me: program exited with status $ac_status" >&5
15152 echo "$as_me: failed program was:" >&5
15153 cat conftest.$ac_ext >&5
15154 cf_cv_typeof_chtype=long
15155 fi
15156 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15157 fi
15158                 rm -f cf_test.out
15159
15160 fi
15161
15162 echo "$as_me:15162: result: $cf_cv_typeof_chtype" >&5
15163 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15164
15165 cat >>confdefs.h <<EOF
15166 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15167 EOF
15168
15169 else
15170         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15171 fi
15172 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15173
15174 echo "$as_me:15174: checking if unsigned literals are legal" >&5
15175 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15176 if test "${cf_cv_unsigned_literals+set}" = set; then
15177   echo $ECHO_N "(cached) $ECHO_C" >&6
15178 else
15179
15180         cat >conftest.$ac_ext <<_ACEOF
15181 #line 15181 "configure"
15182 #include "confdefs.h"
15183
15184 int
15185 main ()
15186 {
15187 long x = 1L + 1UL + 1U + 1
15188   ;
15189   return 0;
15190 }
15191 _ACEOF
15192 rm -f conftest.$ac_objext
15193 if { (eval echo "$as_me:15193: \"$ac_compile\"") >&5
15194   (eval $ac_compile) 2>&5
15195   ac_status=$?
15196   echo "$as_me:15196: \$? = $ac_status" >&5
15197   (exit $ac_status); } &&
15198          { ac_try='test -s conftest.$ac_objext'
15199   { (eval echo "$as_me:15199: \"$ac_try\"") >&5
15200   (eval $ac_try) 2>&5
15201   ac_status=$?
15202   echo "$as_me:15202: \$? = $ac_status" >&5
15203   (exit $ac_status); }; }; then
15204   cf_cv_unsigned_literals=yes
15205 else
15206   echo "$as_me: failed program was:" >&5
15207 cat conftest.$ac_ext >&5
15208 cf_cv_unsigned_literals=no
15209 fi
15210 rm -f conftest.$ac_objext conftest.$ac_ext
15211
15212 fi
15213
15214 echo "$as_me:15214: result: $cf_cv_unsigned_literals" >&5
15215 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15216
15217 cf_cv_1UL="1"
15218 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15219 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15220
15221 if test $NCURSES_MMASK_T = auto ; then
15222         cf_cv_typeof_mmask_t=long
15223 else
15224         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15225 fi
15226 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15227
15228 ###     Checks for external-data
15229
15230 echo "$as_me:15230: checking if external errno is declared" >&5
15231 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15232 if test "${cf_cv_dcl_errno+set}" = set; then
15233   echo $ECHO_N "(cached) $ECHO_C" >&6
15234 else
15235
15236     cat >conftest.$ac_ext <<_ACEOF
15237 #line 15237 "configure"
15238 #include "confdefs.h"
15239
15240 #ifdef HAVE_STDLIB_H
15241 #include <stdlib.h>
15242 #endif
15243 #include <stdio.h>
15244 #include <sys/types.h>
15245 #include <errno.h>
15246 int
15247 main ()
15248 {
15249 int x = (int) errno
15250   ;
15251   return 0;
15252 }
15253 _ACEOF
15254 rm -f conftest.$ac_objext
15255 if { (eval echo "$as_me:15255: \"$ac_compile\"") >&5
15256   (eval $ac_compile) 2>&5
15257   ac_status=$?
15258   echo "$as_me:15258: \$? = $ac_status" >&5
15259   (exit $ac_status); } &&
15260          { ac_try='test -s conftest.$ac_objext'
15261   { (eval echo "$as_me:15261: \"$ac_try\"") >&5
15262   (eval $ac_try) 2>&5
15263   ac_status=$?
15264   echo "$as_me:15264: \$? = $ac_status" >&5
15265   (exit $ac_status); }; }; then
15266   cf_cv_dcl_errno=yes
15267 else
15268   echo "$as_me: failed program was:" >&5
15269 cat conftest.$ac_ext >&5
15270 cf_cv_dcl_errno=no
15271 fi
15272 rm -f conftest.$ac_objext conftest.$ac_ext
15273
15274 fi
15275 echo "$as_me:15275: result: $cf_cv_dcl_errno" >&5
15276 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15277
15278 if test "$cf_cv_dcl_errno" = no ; then
15279
15280 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15281
15282     cat >>confdefs.h <<EOF
15283 #define $cf_result 1
15284 EOF
15285
15286 fi
15287
15288 # It's possible (for near-UNIX clones) that the data doesn't exist
15289
15290 echo "$as_me:15290: checking if external errno exists" >&5
15291 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15292 if test "${cf_cv_have_errno+set}" = set; then
15293   echo $ECHO_N "(cached) $ECHO_C" >&6
15294 else
15295
15296     cat >conftest.$ac_ext <<_ACEOF
15297 #line 15297 "configure"
15298 #include "confdefs.h"
15299
15300 #undef errno
15301 extern int errno;
15302
15303 int
15304 main ()
15305 {
15306 errno = 2
15307   ;
15308   return 0;
15309 }
15310 _ACEOF
15311 rm -f conftest.$ac_objext conftest$ac_exeext
15312 if { (eval echo "$as_me:15312: \"$ac_link\"") >&5
15313   (eval $ac_link) 2>&5
15314   ac_status=$?
15315   echo "$as_me:15315: \$? = $ac_status" >&5
15316   (exit $ac_status); } &&
15317          { ac_try='test -s conftest$ac_exeext'
15318   { (eval echo "$as_me:15318: \"$ac_try\"") >&5
15319   (eval $ac_try) 2>&5
15320   ac_status=$?
15321   echo "$as_me:15321: \$? = $ac_status" >&5
15322   (exit $ac_status); }; }; then
15323   cf_cv_have_errno=yes
15324 else
15325   echo "$as_me: failed program was:" >&5
15326 cat conftest.$ac_ext >&5
15327 cf_cv_have_errno=no
15328 fi
15329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15330
15331 fi
15332 echo "$as_me:15332: result: $cf_cv_have_errno" >&5
15333 echo "${ECHO_T}$cf_cv_have_errno" >&6
15334
15335 if test "$cf_cv_have_errno" = yes ; then
15336
15337 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15338
15339     cat >>confdefs.h <<EOF
15340 #define $cf_result 1
15341 EOF
15342
15343 fi
15344
15345 echo "$as_me:15345: checking if data-only library module links" >&5
15346 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15347 if test "${cf_cv_link_dataonly+set}" = set; then
15348   echo $ECHO_N "(cached) $ECHO_C" >&6
15349 else
15350
15351         rm -f conftest.a
15352         cat >conftest.$ac_ext <<EOF
15353 #line 15353 "configure"
15354 int     testdata[3] = { 123, 456, 789 };
15355 EOF
15356         if { (eval echo "$as_me:15356: \"$ac_compile\"") >&5
15357   (eval $ac_compile) 2>&5
15358   ac_status=$?
15359   echo "$as_me:15359: \$? = $ac_status" >&5
15360   (exit $ac_status); } ; then
15361                 mv conftest.o data.o && \
15362                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15363         fi
15364         rm -f conftest.$ac_ext data.o
15365         cat >conftest.$ac_ext <<EOF
15366 #line 15366 "configure"
15367 int     testfunc()
15368 {
15369 #if defined(NeXT)
15370         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15371 #else
15372         extern int testdata[3];
15373         return testdata[0] == 123
15374            &&  testdata[1] == 456
15375            &&  testdata[2] == 789;
15376 #endif
15377 }
15378 EOF
15379         if { (eval echo "$as_me:15379: \"$ac_compile\"") >&5
15380   (eval $ac_compile) 2>&5
15381   ac_status=$?
15382   echo "$as_me:15382: \$? = $ac_status" >&5
15383   (exit $ac_status); }; then
15384                 mv conftest.o func.o && \
15385                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15386         fi
15387         rm -f conftest.$ac_ext func.o
15388         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15389         cf_saveLIBS="$LIBS"
15390         LIBS="conftest.a $LIBS"
15391         if test "$cross_compiling" = yes; then
15392   cf_cv_link_dataonly=unknown
15393 else
15394   cat >conftest.$ac_ext <<_ACEOF
15395 #line 15395 "configure"
15396 #include "confdefs.h"
15397
15398         int main()
15399         {
15400                 extern int testfunc();
15401                 ${cf_cv_main_return:-return} (!testfunc());
15402         }
15403
15404 _ACEOF
15405 rm -f conftest$ac_exeext
15406 if { (eval echo "$as_me:15406: \"$ac_link\"") >&5
15407   (eval $ac_link) 2>&5
15408   ac_status=$?
15409   echo "$as_me:15409: \$? = $ac_status" >&5
15410   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15411   { (eval echo "$as_me:15411: \"$ac_try\"") >&5
15412   (eval $ac_try) 2>&5
15413   ac_status=$?
15414   echo "$as_me:15414: \$? = $ac_status" >&5
15415   (exit $ac_status); }; }; then
15416   cf_cv_link_dataonly=yes
15417 else
15418   echo "$as_me: program exited with status $ac_status" >&5
15419 echo "$as_me: failed program was:" >&5
15420 cat conftest.$ac_ext >&5
15421 cf_cv_link_dataonly=no
15422 fi
15423 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15424 fi
15425         LIBS="$cf_saveLIBS"
15426
15427 fi
15428
15429 echo "$as_me:15429: result: $cf_cv_link_dataonly" >&5
15430 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15431
15432 if test "$cf_cv_link_dataonly" = no ; then
15433
15434 cat >>confdefs.h <<\EOF
15435 #define BROKEN_LINKER 1
15436 EOF
15437
15438         BROKEN_LINKER=1
15439 fi
15440
15441 ###     Checks for library functions.
15442
15443 for ac_func in \
15444 getcwd \
15445 getegid \
15446 geteuid \
15447 getttynam \
15448 issetugid \
15449 poll \
15450 putenv \
15451 remove \
15452 select \
15453 setbuf \
15454 setbuffer \
15455 setenv \
15456 setvbuf \
15457 sigaction \
15458 sigvec \
15459 strdup \
15460 strstr \
15461 tcgetpgrp \
15462 times \
15463 vsnprintf \
15464
15465 do
15466 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15467 echo "$as_me:15467: checking for $ac_func" >&5
15468 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15469 if eval "test \"\${$as_ac_var+set}\" = set"; then
15470   echo $ECHO_N "(cached) $ECHO_C" >&6
15471 else
15472   cat >conftest.$ac_ext <<_ACEOF
15473 #line 15473 "configure"
15474 #include "confdefs.h"
15475 /* System header to define __stub macros and hopefully few prototypes,
15476     which can conflict with char $ac_func (); below.  */
15477 #include <assert.h>
15478 /* Override any gcc2 internal prototype to avoid an error.  */
15479 #ifdef __cplusplus
15480 extern "C"
15481 #endif
15482 /* We use char because int might match the return type of a gcc2
15483    builtin and then its argument prototype would still apply.  */
15484 char $ac_func ();
15485 char (*f) ();
15486
15487 int
15488 main ()
15489 {
15490 /* The GNU C library defines this for functions which it implements
15491     to always fail with ENOSYS.  Some functions are actually named
15492     something starting with __ and the normal name is an alias.  */
15493 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15494 choke me
15495 #else
15496 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15497 #endif
15498
15499   ;
15500   return 0;
15501 }
15502 _ACEOF
15503 rm -f conftest.$ac_objext conftest$ac_exeext
15504 if { (eval echo "$as_me:15504: \"$ac_link\"") >&5
15505   (eval $ac_link) 2>&5
15506   ac_status=$?
15507   echo "$as_me:15507: \$? = $ac_status" >&5
15508   (exit $ac_status); } &&
15509          { ac_try='test -s conftest$ac_exeext'
15510   { (eval echo "$as_me:15510: \"$ac_try\"") >&5
15511   (eval $ac_try) 2>&5
15512   ac_status=$?
15513   echo "$as_me:15513: \$? = $ac_status" >&5
15514   (exit $ac_status); }; }; then
15515   eval "$as_ac_var=yes"
15516 else
15517   echo "$as_me: failed program was:" >&5
15518 cat conftest.$ac_ext >&5
15519 eval "$as_ac_var=no"
15520 fi
15521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15522 fi
15523 echo "$as_me:15523: result: `eval echo '${'$as_ac_var'}'`" >&5
15524 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15525 if test `eval echo '${'$as_ac_var'}'` = yes; then
15526   cat >>confdefs.h <<EOF
15527 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15528 EOF
15529
15530 fi
15531 done
15532
15533 if test "x$with_getcap" = "xyes" ; then
15534
15535 echo "$as_me:15535: checking for terminal-capability database functions" >&5
15536 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15537 if test "${cf_cv_cgetent+set}" = set; then
15538   echo $ECHO_N "(cached) $ECHO_C" >&6
15539 else
15540
15541 cat >conftest.$ac_ext <<_ACEOF
15542 #line 15542 "configure"
15543 #include "confdefs.h"
15544
15545 #include <stdlib.h>
15546 int
15547 main ()
15548 {
15549
15550         char temp[128];
15551         char *buf = temp;
15552         char *db_array = temp;
15553         cgetent(&buf, &db_array, "vt100");
15554         cgetcap(buf, "tc", '=');
15555         cgetmatch(buf, "tc");
15556
15557   ;
15558   return 0;
15559 }
15560 _ACEOF
15561 rm -f conftest.$ac_objext conftest$ac_exeext
15562 if { (eval echo "$as_me:15562: \"$ac_link\"") >&5
15563   (eval $ac_link) 2>&5
15564   ac_status=$?
15565   echo "$as_me:15565: \$? = $ac_status" >&5
15566   (exit $ac_status); } &&
15567          { ac_try='test -s conftest$ac_exeext'
15568   { (eval echo "$as_me:15568: \"$ac_try\"") >&5
15569   (eval $ac_try) 2>&5
15570   ac_status=$?
15571   echo "$as_me:15571: \$? = $ac_status" >&5
15572   (exit $ac_status); }; }; then
15573   cf_cv_cgetent=yes
15574 else
15575   echo "$as_me: failed program was:" >&5
15576 cat conftest.$ac_ext >&5
15577 cf_cv_cgetent=no
15578 fi
15579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15580
15581 fi
15582 echo "$as_me:15582: result: $cf_cv_cgetent" >&5
15583 echo "${ECHO_T}$cf_cv_cgetent" >&6
15584
15585 if test "$cf_cv_cgetent" = yes
15586 then
15587
15588 cat >>confdefs.h <<\EOF
15589 #define HAVE_BSD_CGETENT 1
15590 EOF
15591
15592 echo "$as_me:15592: checking if cgetent uses const parameter" >&5
15593 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15594 if test "${cf_cv_cgetent_const+set}" = set; then
15595   echo $ECHO_N "(cached) $ECHO_C" >&6
15596 else
15597
15598 cat >conftest.$ac_ext <<_ACEOF
15599 #line 15599 "configure"
15600 #include "confdefs.h"
15601
15602 #include <stdlib.h>
15603 int
15604 main ()
15605 {
15606
15607         char temp[128];
15608         char *buf = temp;
15609 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15610         const char *db_array = temp;
15611         cgetent(&buf, &db_array, "vt100");
15612 #endif
15613         cgetcap(buf, "tc", '=');
15614         cgetmatch(buf, "tc");
15615
15616   ;
15617   return 0;
15618 }
15619 _ACEOF
15620 rm -f conftest.$ac_objext conftest$ac_exeext
15621 if { (eval echo "$as_me:15621: \"$ac_link\"") >&5
15622   (eval $ac_link) 2>&5
15623   ac_status=$?
15624   echo "$as_me:15624: \$? = $ac_status" >&5
15625   (exit $ac_status); } &&
15626          { ac_try='test -s conftest$ac_exeext'
15627   { (eval echo "$as_me:15627: \"$ac_try\"") >&5
15628   (eval $ac_try) 2>&5
15629   ac_status=$?
15630   echo "$as_me:15630: \$? = $ac_status" >&5
15631   (exit $ac_status); }; }; then
15632   cf_cv_cgetent_const=yes
15633 else
15634   echo "$as_me: failed program was:" >&5
15635 cat conftest.$ac_ext >&5
15636 cf_cv_cgetent_const=no
15637 fi
15638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15639
15640 fi
15641 echo "$as_me:15641: result: $cf_cv_cgetent_const" >&5
15642 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15643         if test "$cf_cv_cgetent_const" = yes
15644         then
15645
15646 cat >>confdefs.h <<EOF
15647 #define CGETENT_CONST const
15648 EOF
15649
15650         fi
15651 fi
15652
15653 fi
15654
15655 echo "$as_me:15655: checking for isascii" >&5
15656 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15657 if test "${cf_cv_have_isascii+set}" = set; then
15658   echo $ECHO_N "(cached) $ECHO_C" >&6
15659 else
15660
15661         cat >conftest.$ac_ext <<_ACEOF
15662 #line 15662 "configure"
15663 #include "confdefs.h"
15664 #include <ctype.h>
15665 int
15666 main ()
15667 {
15668 int x = isascii(' ')
15669   ;
15670   return 0;
15671 }
15672 _ACEOF
15673 rm -f conftest.$ac_objext conftest$ac_exeext
15674 if { (eval echo "$as_me:15674: \"$ac_link\"") >&5
15675   (eval $ac_link) 2>&5
15676   ac_status=$?
15677   echo "$as_me:15677: \$? = $ac_status" >&5
15678   (exit $ac_status); } &&
15679          { ac_try='test -s conftest$ac_exeext'
15680   { (eval echo "$as_me:15680: \"$ac_try\"") >&5
15681   (eval $ac_try) 2>&5
15682   ac_status=$?
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit $ac_status); }; }; then
15685   cf_cv_have_isascii=yes
15686 else
15687   echo "$as_me: failed program was:" >&5
15688 cat conftest.$ac_ext >&5
15689 cf_cv_have_isascii=no
15690 fi
15691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15692
15693 fi
15694 echo "$as_me:15694: result: $cf_cv_have_isascii" >&5
15695 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15696 test "$cf_cv_have_isascii" = yes &&
15697 cat >>confdefs.h <<\EOF
15698 #define HAVE_ISASCII 1
15699 EOF
15700
15701 if test "$ac_cv_func_sigaction" = yes; then
15702 echo "$as_me:15702: checking whether sigaction needs _POSIX_SOURCE" >&5
15703 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15704 cat >conftest.$ac_ext <<_ACEOF
15705 #line 15705 "configure"
15706 #include "confdefs.h"
15707
15708 #include <sys/types.h>
15709 #include <signal.h>
15710 int
15711 main ()
15712 {
15713 struct sigaction act
15714   ;
15715   return 0;
15716 }
15717 _ACEOF
15718 rm -f conftest.$ac_objext
15719 if { (eval echo "$as_me:15719: \"$ac_compile\"") >&5
15720   (eval $ac_compile) 2>&5
15721   ac_status=$?
15722   echo "$as_me:15722: \$? = $ac_status" >&5
15723   (exit $ac_status); } &&
15724          { ac_try='test -s conftest.$ac_objext'
15725   { (eval echo "$as_me:15725: \"$ac_try\"") >&5
15726   (eval $ac_try) 2>&5
15727   ac_status=$?
15728   echo "$as_me:15728: \$? = $ac_status" >&5
15729   (exit $ac_status); }; }; then
15730   sigact_bad=no
15731 else
15732   echo "$as_me: failed program was:" >&5
15733 cat conftest.$ac_ext >&5
15734
15735 cat >conftest.$ac_ext <<_ACEOF
15736 #line 15736 "configure"
15737 #include "confdefs.h"
15738
15739 #define _POSIX_SOURCE
15740 #include <sys/types.h>
15741 #include <signal.h>
15742 int
15743 main ()
15744 {
15745 struct sigaction act
15746   ;
15747   return 0;
15748 }
15749 _ACEOF
15750 rm -f conftest.$ac_objext
15751 if { (eval echo "$as_me:15751: \"$ac_compile\"") >&5
15752   (eval $ac_compile) 2>&5
15753   ac_status=$?
15754   echo "$as_me:15754: \$? = $ac_status" >&5
15755   (exit $ac_status); } &&
15756          { ac_try='test -s conftest.$ac_objext'
15757   { (eval echo "$as_me:15757: \"$ac_try\"") >&5
15758   (eval $ac_try) 2>&5
15759   ac_status=$?
15760   echo "$as_me:15760: \$? = $ac_status" >&5
15761   (exit $ac_status); }; }; then
15762   sigact_bad=yes
15763
15764 cat >>confdefs.h <<\EOF
15765 #define _POSIX_SOURCE 1
15766 EOF
15767
15768 else
15769   echo "$as_me: failed program was:" >&5
15770 cat conftest.$ac_ext >&5
15771 sigact_bad=unknown
15772 fi
15773 rm -f conftest.$ac_objext conftest.$ac_ext
15774 fi
15775 rm -f conftest.$ac_objext conftest.$ac_ext
15776 echo "$as_me:15776: result: $sigact_bad" >&5
15777 echo "${ECHO_T}$sigact_bad" >&6
15778 fi
15779
15780 echo "$as_me:15780: checking if nanosleep really works" >&5
15781 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15782 if test "${cf_cv_func_nanosleep+set}" = set; then
15783   echo $ECHO_N "(cached) $ECHO_C" >&6
15784 else
15785
15786 if test "$cross_compiling" = yes; then
15787   cf_cv_func_nanosleep=unknown
15788 else
15789   cat >conftest.$ac_ext <<_ACEOF
15790 #line 15790 "configure"
15791 #include "confdefs.h"
15792
15793 #include <stdio.h>
15794 #include <errno.h>
15795 #include <time.h>
15796
15797 #ifdef HAVE_SYS_TIME_H
15798 #include <sys/time.h>
15799 #endif
15800
15801 int main() {
15802         struct timespec ts1, ts2;
15803         int code;
15804         ts1.tv_sec  = 0;
15805         ts1.tv_nsec = 750000000;
15806         ts2.tv_sec  = 0;
15807         ts2.tv_nsec = 0;
15808         errno = 0;
15809         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15810         ${cf_cv_main_return:-return}(code != 0);
15811 }
15812
15813 _ACEOF
15814 rm -f conftest$ac_exeext
15815 if { (eval echo "$as_me:15815: \"$ac_link\"") >&5
15816   (eval $ac_link) 2>&5
15817   ac_status=$?
15818   echo "$as_me:15818: \$? = $ac_status" >&5
15819   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15820   { (eval echo "$as_me:15820: \"$ac_try\"") >&5
15821   (eval $ac_try) 2>&5
15822   ac_status=$?
15823   echo "$as_me:15823: \$? = $ac_status" >&5
15824   (exit $ac_status); }; }; then
15825   cf_cv_func_nanosleep=yes
15826 else
15827   echo "$as_me: program exited with status $ac_status" >&5
15828 echo "$as_me: failed program was:" >&5
15829 cat conftest.$ac_ext >&5
15830 cf_cv_func_nanosleep=no
15831 fi
15832 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15833 fi
15834 fi
15835 echo "$as_me:15835: result: $cf_cv_func_nanosleep" >&5
15836 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15837
15838 test "$cf_cv_func_nanosleep" = "yes" &&
15839 cat >>confdefs.h <<\EOF
15840 #define HAVE_NANOSLEEP 1
15841 EOF
15842
15843 for ac_header in \
15844 termio.h \
15845 termios.h \
15846 unistd.h \
15847
15848 do
15849 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15850 echo "$as_me:15850: checking for $ac_header" >&5
15851 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15852 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15853   echo $ECHO_N "(cached) $ECHO_C" >&6
15854 else
15855   cat >conftest.$ac_ext <<_ACEOF
15856 #line 15856 "configure"
15857 #include "confdefs.h"
15858 #include <$ac_header>
15859 _ACEOF
15860 if { (eval echo "$as_me:15860: \"$ac_cpp conftest.$ac_ext\"") >&5
15861   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15862   ac_status=$?
15863   egrep -v '^ *\+' conftest.er1 >conftest.err
15864   rm -f conftest.er1
15865   cat conftest.err >&5
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); } >/dev/null; then
15868   if test -s conftest.err; then
15869     ac_cpp_err=$ac_c_preproc_warn_flag
15870   else
15871     ac_cpp_err=
15872   fi
15873 else
15874   ac_cpp_err=yes
15875 fi
15876 if test -z "$ac_cpp_err"; then
15877   eval "$as_ac_Header=yes"
15878 else
15879   echo "$as_me: failed program was:" >&5
15880   cat conftest.$ac_ext >&5
15881   eval "$as_ac_Header=no"
15882 fi
15883 rm -f conftest.err conftest.$ac_ext
15884 fi
15885 echo "$as_me:15885: result: `eval echo '${'$as_ac_Header'}'`" >&5
15886 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15887 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15888   cat >>confdefs.h <<EOF
15889 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15890 EOF
15891
15892 fi
15893 done
15894
15895 if test "$ISC" = yes ; then
15896
15897 for ac_header in sys/termio.h
15898 do
15899 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15900 echo "$as_me:15900: checking for $ac_header" >&5
15901 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15902 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   cat >conftest.$ac_ext <<_ACEOF
15906 #line 15906 "configure"
15907 #include "confdefs.h"
15908 #include <$ac_header>
15909 _ACEOF
15910 if { (eval echo "$as_me:15910: \"$ac_cpp conftest.$ac_ext\"") >&5
15911   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15912   ac_status=$?
15913   egrep -v '^ *\+' conftest.er1 >conftest.err
15914   rm -f conftest.er1
15915   cat conftest.err >&5
15916   echo "$as_me:15916: \$? = $ac_status" >&5
15917   (exit $ac_status); } >/dev/null; then
15918   if test -s conftest.err; then
15919     ac_cpp_err=$ac_c_preproc_warn_flag
15920   else
15921     ac_cpp_err=
15922   fi
15923 else
15924   ac_cpp_err=yes
15925 fi
15926 if test -z "$ac_cpp_err"; then
15927   eval "$as_ac_Header=yes"
15928 else
15929   echo "$as_me: failed program was:" >&5
15930   cat conftest.$ac_ext >&5
15931   eval "$as_ac_Header=no"
15932 fi
15933 rm -f conftest.err conftest.$ac_ext
15934 fi
15935 echo "$as_me:15935: result: `eval echo '${'$as_ac_Header'}'`" >&5
15936 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15937 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15938   cat >>confdefs.h <<EOF
15939 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15940 EOF
15941
15942 fi
15943 done
15944
15945 fi
15946 if test "$ac_cv_header_termios_h" = yes ; then
15947         case "$CFLAGS $CPPFLAGS" in
15948         *-D_POSIX_SOURCE*)
15949                 termios_bad=dunno ;;
15950         *)      termios_bad=maybe ;;
15951         esac
15952         if test "$termios_bad" = maybe ; then
15953         echo "$as_me:15953: checking whether termios.h needs _POSIX_SOURCE" >&5
15954 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15955         cat >conftest.$ac_ext <<_ACEOF
15956 #line 15956 "configure"
15957 #include "confdefs.h"
15958 #include <termios.h>
15959 int
15960 main ()
15961 {
15962 struct termios foo; int x = foo.c_iflag
15963   ;
15964   return 0;
15965 }
15966 _ACEOF
15967 rm -f conftest.$ac_objext
15968 if { (eval echo "$as_me:15968: \"$ac_compile\"") >&5
15969   (eval $ac_compile) 2>&5
15970   ac_status=$?
15971   echo "$as_me:15971: \$? = $ac_status" >&5
15972   (exit $ac_status); } &&
15973          { ac_try='test -s conftest.$ac_objext'
15974   { (eval echo "$as_me:15974: \"$ac_try\"") >&5
15975   (eval $ac_try) 2>&5
15976   ac_status=$?
15977   echo "$as_me:15977: \$? = $ac_status" >&5
15978   (exit $ac_status); }; }; then
15979   termios_bad=no
15980 else
15981   echo "$as_me: failed program was:" >&5
15982 cat conftest.$ac_ext >&5
15983
15984                 cat >conftest.$ac_ext <<_ACEOF
15985 #line 15985 "configure"
15986 #include "confdefs.h"
15987
15988 #define _POSIX_SOURCE
15989 #include <termios.h>
15990 int
15991 main ()
15992 {
15993 struct termios foo; int x = foo.c_iflag
15994   ;
15995   return 0;
15996 }
15997 _ACEOF
15998 rm -f conftest.$ac_objext
15999 if { (eval echo "$as_me:15999: \"$ac_compile\"") >&5
16000   (eval $ac_compile) 2>&5
16001   ac_status=$?
16002   echo "$as_me:16002: \$? = $ac_status" >&5
16003   (exit $ac_status); } &&
16004          { ac_try='test -s conftest.$ac_objext'
16005   { (eval echo "$as_me:16005: \"$ac_try\"") >&5
16006   (eval $ac_try) 2>&5
16007   ac_status=$?
16008   echo "$as_me:16008: \$? = $ac_status" >&5
16009   (exit $ac_status); }; }; then
16010   termios_bad=unknown
16011 else
16012   echo "$as_me: failed program was:" >&5
16013 cat conftest.$ac_ext >&5
16014 termios_bad=yes
16015 cat >>confdefs.h <<\EOF
16016 #define _POSIX_SOURCE 1
16017 EOF
16018
16019 fi
16020 rm -f conftest.$ac_objext conftest.$ac_ext
16021
16022 fi
16023 rm -f conftest.$ac_objext conftest.$ac_ext
16024         echo "$as_me:16024: result: $termios_bad" >&5
16025 echo "${ECHO_T}$termios_bad" >&6
16026         fi
16027 fi
16028
16029 echo "$as_me:16029: checking for tcgetattr" >&5
16030 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16031 if test "${cf_cv_have_tcgetattr+set}" = set; then
16032   echo $ECHO_N "(cached) $ECHO_C" >&6
16033 else
16034
16035 cat >conftest.$ac_ext <<_ACEOF
16036 #line 16036 "configure"
16037 #include "confdefs.h"
16038
16039 #include <sys/types.h>
16040 #ifdef HAVE_UNISTD_H
16041 #include <unistd.h>
16042 #endif
16043 #ifdef HAVE_TERMIOS_H
16044 #include <termios.h>
16045 #define TTY struct termios
16046 #else
16047 #ifdef HAVE_TERMIO_H
16048 #include <termio.h>
16049 #define TTY struct termio
16050 #endif
16051 #endif
16052
16053 int
16054 main ()
16055 {
16056
16057 TTY foo;
16058 tcgetattr(1, &foo);
16059   ;
16060   return 0;
16061 }
16062 _ACEOF
16063 rm -f conftest.$ac_objext conftest$ac_exeext
16064 if { (eval echo "$as_me:16064: \"$ac_link\"") >&5
16065   (eval $ac_link) 2>&5
16066   ac_status=$?
16067   echo "$as_me:16067: \$? = $ac_status" >&5
16068   (exit $ac_status); } &&
16069          { ac_try='test -s conftest$ac_exeext'
16070   { (eval echo "$as_me:16070: \"$ac_try\"") >&5
16071   (eval $ac_try) 2>&5
16072   ac_status=$?
16073   echo "$as_me:16073: \$? = $ac_status" >&5
16074   (exit $ac_status); }; }; then
16075   cf_cv_have_tcgetattr=yes
16076 else
16077   echo "$as_me: failed program was:" >&5
16078 cat conftest.$ac_ext >&5
16079 cf_cv_have_tcgetattr=no
16080 fi
16081 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16082 fi
16083 echo "$as_me:16083: result: $cf_cv_have_tcgetattr" >&5
16084 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16085 test "$cf_cv_have_tcgetattr" = yes &&
16086 cat >>confdefs.h <<\EOF
16087 #define HAVE_TCGETATTR 1
16088 EOF
16089
16090 echo "$as_me:16090: checking for vsscanf function or workaround" >&5
16091 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16092 if test "${cf_cv_func_vsscanf+set}" = set; then
16093   echo $ECHO_N "(cached) $ECHO_C" >&6
16094 else
16095
16096 cat >conftest.$ac_ext <<_ACEOF
16097 #line 16097 "configure"
16098 #include "confdefs.h"
16099
16100 #include <stdarg.h>
16101 #include <stdio.h>
16102 int
16103 main ()
16104 {
16105
16106         va_list ap;
16107         vsscanf("from", "%d", ap)
16108   ;
16109   return 0;
16110 }
16111 _ACEOF
16112 rm -f conftest.$ac_objext conftest$ac_exeext
16113 if { (eval echo "$as_me:16113: \"$ac_link\"") >&5
16114   (eval $ac_link) 2>&5
16115   ac_status=$?
16116   echo "$as_me:16116: \$? = $ac_status" >&5
16117   (exit $ac_status); } &&
16118          { ac_try='test -s conftest$ac_exeext'
16119   { (eval echo "$as_me:16119: \"$ac_try\"") >&5
16120   (eval $ac_try) 2>&5
16121   ac_status=$?
16122   echo "$as_me:16122: \$? = $ac_status" >&5
16123   (exit $ac_status); }; }; then
16124   cf_cv_func_vsscanf=vsscanf
16125 else
16126   echo "$as_me: failed program was:" >&5
16127 cat conftest.$ac_ext >&5
16128
16129 cat >conftest.$ac_ext <<_ACEOF
16130 #line 16130 "configure"
16131 #include "confdefs.h"
16132
16133 #include <stdarg.h>
16134 #include <stdio.h>
16135 int
16136 main ()
16137 {
16138
16139     FILE strbuf;
16140     char *str = "from";
16141
16142     strbuf._flag = _IOREAD;
16143     strbuf._ptr = strbuf._base = (unsigned char *) str;
16144     strbuf._cnt = strlen(str);
16145     strbuf._file = _NFILE;
16146     return (vfscanf(&strbuf, "%d", ap))
16147   ;
16148   return 0;
16149 }
16150 _ACEOF
16151 rm -f conftest.$ac_objext conftest$ac_exeext
16152 if { (eval echo "$as_me:16152: \"$ac_link\"") >&5
16153   (eval $ac_link) 2>&5
16154   ac_status=$?
16155   echo "$as_me:16155: \$? = $ac_status" >&5
16156   (exit $ac_status); } &&
16157          { ac_try='test -s conftest$ac_exeext'
16158   { (eval echo "$as_me:16158: \"$ac_try\"") >&5
16159   (eval $ac_try) 2>&5
16160   ac_status=$?
16161   echo "$as_me:16161: \$? = $ac_status" >&5
16162   (exit $ac_status); }; }; then
16163   cf_cv_func_vsscanf=vfscanf
16164 else
16165   echo "$as_me: failed program was:" >&5
16166 cat conftest.$ac_ext >&5
16167
16168 cat >conftest.$ac_ext <<_ACEOF
16169 #line 16169 "configure"
16170 #include "confdefs.h"
16171
16172 #include <stdarg.h>
16173 #include <stdio.h>
16174 int
16175 main ()
16176 {
16177
16178     FILE strbuf;
16179     char *str = "from";
16180
16181     strbuf._flag = _IOREAD;
16182     strbuf._ptr = strbuf._base = (unsigned char *) str;
16183     strbuf._cnt = strlen(str);
16184     strbuf._file = _NFILE;
16185     return (_doscan(&strbuf, "%d", ap))
16186   ;
16187   return 0;
16188 }
16189 _ACEOF
16190 rm -f conftest.$ac_objext conftest$ac_exeext
16191 if { (eval echo "$as_me:16191: \"$ac_link\"") >&5
16192   (eval $ac_link) 2>&5
16193   ac_status=$?
16194   echo "$as_me:16194: \$? = $ac_status" >&5
16195   (exit $ac_status); } &&
16196          { ac_try='test -s conftest$ac_exeext'
16197   { (eval echo "$as_me:16197: \"$ac_try\"") >&5
16198   (eval $ac_try) 2>&5
16199   ac_status=$?
16200   echo "$as_me:16200: \$? = $ac_status" >&5
16201   (exit $ac_status); }; }; then
16202   cf_cv_func_vsscanf=_doscan
16203 else
16204   echo "$as_me: failed program was:" >&5
16205 cat conftest.$ac_ext >&5
16206
16207 cf_cv_func_vsscanf=no
16208 fi
16209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16210 fi
16211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16212 fi
16213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16214 fi
16215 echo "$as_me:16215: result: $cf_cv_func_vsscanf" >&5
16216 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16217
16218 case $cf_cv_func_vsscanf in #(vi
16219 vsscanf)
16220 cat >>confdefs.h <<\EOF
16221 #define HAVE_VSSCANF 1
16222 EOF
16223 ;; #(vi
16224 vfscanf)
16225 cat >>confdefs.h <<\EOF
16226 #define HAVE_VFSCANF 1
16227 EOF
16228 ;; #(vi
16229 _doscan)
16230 cat >>confdefs.h <<\EOF
16231 #define HAVE__DOSCAN 1
16232 EOF
16233 ;;
16234 esac
16235
16236 echo "$as_me:16236: checking for working mkstemp" >&5
16237 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16238 if test "${cf_cv_func_mkstemp+set}" = set; then
16239   echo $ECHO_N "(cached) $ECHO_C" >&6
16240 else
16241
16242 rm -rf conftest*
16243 if test "$cross_compiling" = yes; then
16244   cf_cv_func_mkstemp=maybe
16245 else
16246   cat >conftest.$ac_ext <<_ACEOF
16247 #line 16247 "configure"
16248 #include "confdefs.h"
16249
16250 #include <sys/types.h>
16251 #include <stdlib.h>
16252 #include <stdio.h>
16253 #include <string.h>
16254 #include <sys/stat.h>
16255 int main()
16256 {
16257         char *tmpl = "conftestXXXXXX";
16258         char name[2][80];
16259         int n;
16260         int result = 0;
16261         int fd;
16262         struct stat sb;
16263
16264         umask(077);
16265         for (n = 0; n < 2; ++n) {
16266                 strcpy(name[n], tmpl);
16267                 if ((fd = mkstemp(name[n])) >= 0) {
16268                         if (!strcmp(name[n], tmpl)
16269                          || stat(name[n], &sb) != 0
16270                          || (sb.st_mode & S_IFMT) != S_IFREG
16271                          || (sb.st_mode & 077) != 0) {
16272                                 result = 1;
16273                         }
16274                         close(fd);
16275                 }
16276         }
16277         if (result == 0
16278          && !strcmp(name[0], name[1]))
16279                 result = 1;
16280         ${cf_cv_main_return:-return}(result);
16281 }
16282
16283 _ACEOF
16284 rm -f conftest$ac_exeext
16285 if { (eval echo "$as_me:16285: \"$ac_link\"") >&5
16286   (eval $ac_link) 2>&5
16287   ac_status=$?
16288   echo "$as_me:16288: \$? = $ac_status" >&5
16289   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16290   { (eval echo "$as_me:16290: \"$ac_try\"") >&5
16291   (eval $ac_try) 2>&5
16292   ac_status=$?
16293   echo "$as_me:16293: \$? = $ac_status" >&5
16294   (exit $ac_status); }; }; then
16295   cf_cv_func_mkstemp=yes
16296
16297 else
16298   echo "$as_me: program exited with status $ac_status" >&5
16299 echo "$as_me: failed program was:" >&5
16300 cat conftest.$ac_ext >&5
16301 cf_cv_func_mkstemp=no
16302
16303 fi
16304 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16305 fi
16306
16307 fi
16308 echo "$as_me:16308: result: $cf_cv_func_mkstemp" >&5
16309 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16310 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16311         echo "$as_me:16311: checking for mkstemp" >&5
16312 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16313 if test "${ac_cv_func_mkstemp+set}" = set; then
16314   echo $ECHO_N "(cached) $ECHO_C" >&6
16315 else
16316   cat >conftest.$ac_ext <<_ACEOF
16317 #line 16317 "configure"
16318 #include "confdefs.h"
16319 /* System header to define __stub macros and hopefully few prototypes,
16320     which can conflict with char mkstemp (); below.  */
16321 #include <assert.h>
16322 /* Override any gcc2 internal prototype to avoid an error.  */
16323 #ifdef __cplusplus
16324 extern "C"
16325 #endif
16326 /* We use char because int might match the return type of a gcc2
16327    builtin and then its argument prototype would still apply.  */
16328 char mkstemp ();
16329 char (*f) ();
16330
16331 int
16332 main ()
16333 {
16334 /* The GNU C library defines this for functions which it implements
16335     to always fail with ENOSYS.  Some functions are actually named
16336     something starting with __ and the normal name is an alias.  */
16337 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16338 choke me
16339 #else
16340 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16341 #endif
16342
16343   ;
16344   return 0;
16345 }
16346 _ACEOF
16347 rm -f conftest.$ac_objext conftest$ac_exeext
16348 if { (eval echo "$as_me:16348: \"$ac_link\"") >&5
16349   (eval $ac_link) 2>&5
16350   ac_status=$?
16351   echo "$as_me:16351: \$? = $ac_status" >&5
16352   (exit $ac_status); } &&
16353          { ac_try='test -s conftest$ac_exeext'
16354   { (eval echo "$as_me:16354: \"$ac_try\"") >&5
16355   (eval $ac_try) 2>&5
16356   ac_status=$?
16357   echo "$as_me:16357: \$? = $ac_status" >&5
16358   (exit $ac_status); }; }; then
16359   ac_cv_func_mkstemp=yes
16360 else
16361   echo "$as_me: failed program was:" >&5
16362 cat conftest.$ac_ext >&5
16363 ac_cv_func_mkstemp=no
16364 fi
16365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16366 fi
16367 echo "$as_me:16367: result: $ac_cv_func_mkstemp" >&5
16368 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16369
16370 fi
16371 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16372
16373 cat >>confdefs.h <<\EOF
16374 #define HAVE_MKSTEMP 1
16375 EOF
16376
16377 fi
16378
16379 # setup for prototype of fallback for vsscanf()
16380
16381 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16382         HAVE_VSSCANF=1
16383 else
16384         HAVE_VSSCANF=0
16385 fi
16386
16387 if test "x$cross_compiling" = xyes ; then
16388         { echo "$as_me:16388: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16389 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16390 else
16391         echo "$as_me:16391: checking whether setvbuf arguments are reversed" >&5
16392 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16393 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16394   echo $ECHO_N "(cached) $ECHO_C" >&6
16395 else
16396   if test "$cross_compiling" = yes; then
16397   { { echo "$as_me:16397: error: cannot run test program while cross compiling" >&5
16398 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16399    { (exit 1); exit 1; }; }
16400 else
16401   cat >conftest.$ac_ext <<_ACEOF
16402 #line 16402 "configure"
16403 #include "confdefs.h"
16404 #include <stdio.h>
16405 /* If setvbuf has the reversed format, exit 0. */
16406 int
16407 main ()
16408 {
16409   /* This call has the arguments reversed.
16410      A reversed system may check and see that the address of main
16411      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16412   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16413     $ac_main_return(1);
16414   putc('\r', stdout);
16415   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16416 }
16417 _ACEOF
16418 rm -f conftest$ac_exeext
16419 if { (eval echo "$as_me:16419: \"$ac_link\"") >&5
16420   (eval $ac_link) 2>&5
16421   ac_status=$?
16422   echo "$as_me:16422: \$? = $ac_status" >&5
16423   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16424   { (eval echo "$as_me:16424: \"$ac_try\"") >&5
16425   (eval $ac_try) 2>&5
16426   ac_status=$?
16427   echo "$as_me:16427: \$? = $ac_status" >&5
16428   (exit $ac_status); }; }; then
16429   ac_cv_func_setvbuf_reversed=yes
16430 else
16431   echo "$as_me: program exited with status $ac_status" >&5
16432 echo "$as_me: failed program was:" >&5
16433 cat conftest.$ac_ext >&5
16434 ac_cv_func_setvbuf_reversed=no
16435 fi
16436 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16437 fi
16438 rm -f core core.* *.core
16439 fi
16440 echo "$as_me:16440: result: $ac_cv_func_setvbuf_reversed" >&5
16441 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16442 if test $ac_cv_func_setvbuf_reversed = yes; then
16443
16444 cat >>confdefs.h <<\EOF
16445 #define SETVBUF_REVERSED 1
16446 EOF
16447
16448 fi
16449
16450 fi
16451 echo "$as_me:16451: checking for intptr_t" >&5
16452 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16453 if test "${ac_cv_type_intptr_t+set}" = set; then
16454   echo $ECHO_N "(cached) $ECHO_C" >&6
16455 else
16456   cat >conftest.$ac_ext <<_ACEOF
16457 #line 16457 "configure"
16458 #include "confdefs.h"
16459 $ac_includes_default
16460 int
16461 main ()
16462 {
16463 if ((intptr_t *) 0)
16464   return 0;
16465 if (sizeof (intptr_t))
16466   return 0;
16467   ;
16468   return 0;
16469 }
16470 _ACEOF
16471 rm -f conftest.$ac_objext
16472 if { (eval echo "$as_me:16472: \"$ac_compile\"") >&5
16473   (eval $ac_compile) 2>&5
16474   ac_status=$?
16475   echo "$as_me:16475: \$? = $ac_status" >&5
16476   (exit $ac_status); } &&
16477          { ac_try='test -s conftest.$ac_objext'
16478   { (eval echo "$as_me:16478: \"$ac_try\"") >&5
16479   (eval $ac_try) 2>&5
16480   ac_status=$?
16481   echo "$as_me:16481: \$? = $ac_status" >&5
16482   (exit $ac_status); }; }; then
16483   ac_cv_type_intptr_t=yes
16484 else
16485   echo "$as_me: failed program was:" >&5
16486 cat conftest.$ac_ext >&5
16487 ac_cv_type_intptr_t=no
16488 fi
16489 rm -f conftest.$ac_objext conftest.$ac_ext
16490 fi
16491 echo "$as_me:16491: result: $ac_cv_type_intptr_t" >&5
16492 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16493 if test $ac_cv_type_intptr_t = yes; then
16494   :
16495 else
16496
16497 cat >>confdefs.h <<EOF
16498 #define intptr_t long
16499 EOF
16500
16501 fi
16502
16503 echo "$as_me:16503: checking for type sigaction_t" >&5
16504 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16505 if test "${cf_cv_type_sigaction+set}" = set; then
16506   echo $ECHO_N "(cached) $ECHO_C" >&6
16507 else
16508
16509         cat >conftest.$ac_ext <<_ACEOF
16510 #line 16510 "configure"
16511 #include "confdefs.h"
16512
16513 #include <signal.h>
16514 int
16515 main ()
16516 {
16517 sigaction_t x
16518   ;
16519   return 0;
16520 }
16521 _ACEOF
16522 rm -f conftest.$ac_objext
16523 if { (eval echo "$as_me:16523: \"$ac_compile\"") >&5
16524   (eval $ac_compile) 2>&5
16525   ac_status=$?
16526   echo "$as_me:16526: \$? = $ac_status" >&5
16527   (exit $ac_status); } &&
16528          { ac_try='test -s conftest.$ac_objext'
16529   { (eval echo "$as_me:16529: \"$ac_try\"") >&5
16530   (eval $ac_try) 2>&5
16531   ac_status=$?
16532   echo "$as_me:16532: \$? = $ac_status" >&5
16533   (exit $ac_status); }; }; then
16534   cf_cv_type_sigaction=yes
16535 else
16536   echo "$as_me: failed program was:" >&5
16537 cat conftest.$ac_ext >&5
16538 cf_cv_type_sigaction=no
16539 fi
16540 rm -f conftest.$ac_objext conftest.$ac_ext
16541 fi
16542
16543 echo "$as_me:16543: result: $cf_cv_type_sigaction" >&5
16544 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16545 test "$cf_cv_type_sigaction" = yes &&
16546 cat >>confdefs.h <<\EOF
16547 #define HAVE_TYPE_SIGACTION 1
16548 EOF
16549
16550 echo "$as_me:16550: checking declaration of size-change" >&5
16551 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16552 if test "${cf_cv_sizechange+set}" = set; then
16553   echo $ECHO_N "(cached) $ECHO_C" >&6
16554 else
16555
16556     cf_cv_sizechange=unknown
16557     cf_save_CPPFLAGS="$CPPFLAGS"
16558
16559 for cf_opts in "" "NEED_PTEM_H"
16560 do
16561
16562     CPPFLAGS="$cf_save_CPPFLAGS"
16563     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16564     cat >conftest.$ac_ext <<_ACEOF
16565 #line 16565 "configure"
16566 #include "confdefs.h"
16567 #include <sys/types.h>
16568 #ifdef HAVE_TERMIOS_H
16569 #include <termios.h>
16570 #else
16571 #ifdef HAVE_TERMIO_H
16572 #include <termio.h>
16573 #endif
16574 #endif
16575 #ifdef NEED_PTEM_H
16576 /* This is a workaround for SCO:  they neglected to define struct winsize in
16577  * termios.h -- it's only in termio.h and ptem.h
16578  */
16579 #include        <sys/stream.h>
16580 #include        <sys/ptem.h>
16581 #endif
16582 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16583 #include <sys/ioctl.h>
16584 #endif
16585
16586 int
16587 main ()
16588 {
16589
16590 #ifdef TIOCGSIZE
16591         struct ttysize win;     /* FIXME: what system is this? */
16592         int y = win.ts_lines;
16593         int x = win.ts_cols;
16594 #else
16595 #ifdef TIOCGWINSZ
16596         struct winsize win;
16597         int y = win.ws_row;
16598         int x = win.ws_col;
16599 #else
16600         no TIOCGSIZE or TIOCGWINSZ
16601 #endif /* TIOCGWINSZ */
16602 #endif /* TIOCGSIZE */
16603
16604   ;
16605   return 0;
16606 }
16607 _ACEOF
16608 rm -f conftest.$ac_objext
16609 if { (eval echo "$as_me:16609: \"$ac_compile\"") >&5
16610   (eval $ac_compile) 2>&5
16611   ac_status=$?
16612   echo "$as_me:16612: \$? = $ac_status" >&5
16613   (exit $ac_status); } &&
16614          { ac_try='test -s conftest.$ac_objext'
16615   { (eval echo "$as_me:16615: \"$ac_try\"") >&5
16616   (eval $ac_try) 2>&5
16617   ac_status=$?
16618   echo "$as_me:16618: \$? = $ac_status" >&5
16619   (exit $ac_status); }; }; then
16620   cf_cv_sizechange=yes
16621 else
16622   echo "$as_me: failed program was:" >&5
16623 cat conftest.$ac_ext >&5
16624 cf_cv_sizechange=no
16625 fi
16626 rm -f conftest.$ac_objext conftest.$ac_ext
16627
16628         CPPFLAGS="$cf_save_CPPFLAGS"
16629         if test "$cf_cv_sizechange" = yes ; then
16630                 echo "size-change succeeded ($cf_opts)" >&5
16631                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16632                 break
16633         fi
16634 done
16635
16636 fi
16637 echo "$as_me:16637: result: $cf_cv_sizechange" >&5
16638 echo "${ECHO_T}$cf_cv_sizechange" >&6
16639 if test "$cf_cv_sizechange" != no ; then
16640
16641 cat >>confdefs.h <<\EOF
16642 #define HAVE_SIZECHANGE 1
16643 EOF
16644
16645         case $cf_cv_sizechange in #(vi
16646         NEED*)
16647                 cat >>confdefs.h <<EOF
16648 #define $cf_cv_sizechange  1
16649 EOF
16650
16651                 ;;
16652         esac
16653 fi
16654
16655 echo "$as_me:16655: checking for memmove" >&5
16656 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16657 if test "${ac_cv_func_memmove+set}" = set; then
16658   echo $ECHO_N "(cached) $ECHO_C" >&6
16659 else
16660   cat >conftest.$ac_ext <<_ACEOF
16661 #line 16661 "configure"
16662 #include "confdefs.h"
16663 /* System header to define __stub macros and hopefully few prototypes,
16664     which can conflict with char memmove (); below.  */
16665 #include <assert.h>
16666 /* Override any gcc2 internal prototype to avoid an error.  */
16667 #ifdef __cplusplus
16668 extern "C"
16669 #endif
16670 /* We use char because int might match the return type of a gcc2
16671    builtin and then its argument prototype would still apply.  */
16672 char memmove ();
16673 char (*f) ();
16674
16675 int
16676 main ()
16677 {
16678 /* The GNU C library defines this for functions which it implements
16679     to always fail with ENOSYS.  Some functions are actually named
16680     something starting with __ and the normal name is an alias.  */
16681 #if defined (__stub_memmove) || defined (__stub___memmove)
16682 choke me
16683 #else
16684 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16685 #endif
16686
16687   ;
16688   return 0;
16689 }
16690 _ACEOF
16691 rm -f conftest.$ac_objext conftest$ac_exeext
16692 if { (eval echo "$as_me:16692: \"$ac_link\"") >&5
16693   (eval $ac_link) 2>&5
16694   ac_status=$?
16695   echo "$as_me:16695: \$? = $ac_status" >&5
16696   (exit $ac_status); } &&
16697          { ac_try='test -s conftest$ac_exeext'
16698   { (eval echo "$as_me:16698: \"$ac_try\"") >&5
16699   (eval $ac_try) 2>&5
16700   ac_status=$?
16701   echo "$as_me:16701: \$? = $ac_status" >&5
16702   (exit $ac_status); }; }; then
16703   ac_cv_func_memmove=yes
16704 else
16705   echo "$as_me: failed program was:" >&5
16706 cat conftest.$ac_ext >&5
16707 ac_cv_func_memmove=no
16708 fi
16709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16710 fi
16711 echo "$as_me:16711: result: $ac_cv_func_memmove" >&5
16712 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16713 if test $ac_cv_func_memmove = yes; then
16714   :
16715 else
16716
16717 echo "$as_me:16717: checking for bcopy" >&5
16718 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16719 if test "${ac_cv_func_bcopy+set}" = set; then
16720   echo $ECHO_N "(cached) $ECHO_C" >&6
16721 else
16722   cat >conftest.$ac_ext <<_ACEOF
16723 #line 16723 "configure"
16724 #include "confdefs.h"
16725 /* System header to define __stub macros and hopefully few prototypes,
16726     which can conflict with char bcopy (); below.  */
16727 #include <assert.h>
16728 /* Override any gcc2 internal prototype to avoid an error.  */
16729 #ifdef __cplusplus
16730 extern "C"
16731 #endif
16732 /* We use char because int might match the return type of a gcc2
16733    builtin and then its argument prototype would still apply.  */
16734 char bcopy ();
16735 char (*f) ();
16736
16737 int
16738 main ()
16739 {
16740 /* The GNU C library defines this for functions which it implements
16741     to always fail with ENOSYS.  Some functions are actually named
16742     something starting with __ and the normal name is an alias.  */
16743 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16744 choke me
16745 #else
16746 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16747 #endif
16748
16749   ;
16750   return 0;
16751 }
16752 _ACEOF
16753 rm -f conftest.$ac_objext conftest$ac_exeext
16754 if { (eval echo "$as_me:16754: \"$ac_link\"") >&5
16755   (eval $ac_link) 2>&5
16756   ac_status=$?
16757   echo "$as_me:16757: \$? = $ac_status" >&5
16758   (exit $ac_status); } &&
16759          { ac_try='test -s conftest$ac_exeext'
16760   { (eval echo "$as_me:16760: \"$ac_try\"") >&5
16761   (eval $ac_try) 2>&5
16762   ac_status=$?
16763   echo "$as_me:16763: \$? = $ac_status" >&5
16764   (exit $ac_status); }; }; then
16765   ac_cv_func_bcopy=yes
16766 else
16767   echo "$as_me: failed program was:" >&5
16768 cat conftest.$ac_ext >&5
16769 ac_cv_func_bcopy=no
16770 fi
16771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16772 fi
16773 echo "$as_me:16773: result: $ac_cv_func_bcopy" >&5
16774 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16775 if test $ac_cv_func_bcopy = yes; then
16776
16777         echo "$as_me:16777: checking if bcopy does overlapping moves" >&5
16778 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16779 if test "${cf_cv_good_bcopy+set}" = set; then
16780   echo $ECHO_N "(cached) $ECHO_C" >&6
16781 else
16782
16783                 if test "$cross_compiling" = yes; then
16784   cf_cv_good_bcopy=unknown
16785 else
16786   cat >conftest.$ac_ext <<_ACEOF
16787 #line 16787 "configure"
16788 #include "confdefs.h"
16789
16790 int main() {
16791         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16792         char temp[40];
16793         bcopy(data, temp, sizeof(data));
16794         bcopy(temp+10, temp, 15);
16795         bcopy(temp+5, temp+15, 10);
16796         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16797 }
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_good_bcopy=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_good_bcopy=no
16817 fi
16818 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16819 fi
16820
16821 fi
16822 echo "$as_me:16822: result: $cf_cv_good_bcopy" >&5
16823 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16824
16825 else
16826   cf_cv_good_bcopy=no
16827 fi
16828
16829         if test "$cf_cv_good_bcopy" = yes ; then
16830
16831 cat >>confdefs.h <<\EOF
16832 #define USE_OK_BCOPY 1
16833 EOF
16834
16835         else
16836
16837 cat >>confdefs.h <<\EOF
16838 #define USE_MY_MEMMOVE 1
16839 EOF
16840
16841         fi
16842
16843 fi
16844
16845 echo "$as_me:16845: checking if poll really works" >&5
16846 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16847 if test "${cf_cv_working_poll+set}" = set; then
16848   echo $ECHO_N "(cached) $ECHO_C" >&6
16849 else
16850
16851 if test "$cross_compiling" = yes; then
16852   cf_cv_working_poll=unknown
16853 else
16854   cat >conftest.$ac_ext <<_ACEOF
16855 #line 16855 "configure"
16856 #include "confdefs.h"
16857
16858 #include <stdlib.h>
16859 #include <stdio.h>
16860 #include <unistd.h>
16861 #include <fcntl.h>
16862 #ifdef HAVE_POLL_H
16863 #include <poll.h>
16864 #else
16865 #include <sys/poll.h>
16866 #endif
16867 int main() {
16868         struct pollfd myfds;
16869         int ret;
16870
16871         /* check for Darwin bug with respect to "devices" */
16872         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16873         if (myfds.fd < 0)
16874                 myfds.fd = 0;
16875         myfds.events = POLLIN;
16876         myfds.revents = 0;
16877
16878         ret = poll(&myfds, 1, 100);
16879
16880         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16881                 ret = -1;
16882         } else {
16883                 int fd = 0;
16884                 if (!isatty(fd)) {
16885                         fd = open("/dev/tty", 2);       /* O_RDWR */
16886                 }
16887
16888                 if (fd >= 0) {
16889                         /* also check with standard input */
16890                         myfds.fd = fd;
16891                         myfds.events = POLLIN;
16892                         myfds.revents = 0;
16893                         ret = poll(&myfds, 1, 100);
16894                 } else {
16895                         ret = -1;
16896                 }
16897         }
16898         ${cf_cv_main_return:-return}(ret < 0);
16899 }
16900 _ACEOF
16901 rm -f conftest$ac_exeext
16902 if { (eval echo "$as_me:16902: \"$ac_link\"") >&5
16903   (eval $ac_link) 2>&5
16904   ac_status=$?
16905   echo "$as_me:16905: \$? = $ac_status" >&5
16906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16907   { (eval echo "$as_me:16907: \"$ac_try\"") >&5
16908   (eval $ac_try) 2>&5
16909   ac_status=$?
16910   echo "$as_me:16910: \$? = $ac_status" >&5
16911   (exit $ac_status); }; }; then
16912   cf_cv_working_poll=yes
16913 else
16914   echo "$as_me: program exited with status $ac_status" >&5
16915 echo "$as_me: failed program was:" >&5
16916 cat conftest.$ac_ext >&5
16917 cf_cv_working_poll=no
16918 fi
16919 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16920 fi
16921 fi
16922 echo "$as_me:16922: result: $cf_cv_working_poll" >&5
16923 echo "${ECHO_T}$cf_cv_working_poll" >&6
16924 test "$cf_cv_working_poll" = "yes" &&
16925 cat >>confdefs.h <<\EOF
16926 #define HAVE_WORKING_POLL 1
16927 EOF
16928
16929 echo "$as_me:16929: checking for va_copy" >&5
16930 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16931 if test "${cf_cv_have_va_copy+set}" = set; then
16932   echo $ECHO_N "(cached) $ECHO_C" >&6
16933 else
16934
16935 cat >conftest.$ac_ext <<_ACEOF
16936 #line 16936 "configure"
16937 #include "confdefs.h"
16938
16939 #include <stdarg.h>
16940
16941 int
16942 main ()
16943 {
16944
16945         static va_list dst;
16946         static va_list src;
16947         va_copy(dst, src)
16948   ;
16949   return 0;
16950 }
16951 _ACEOF
16952 rm -f conftest.$ac_objext conftest$ac_exeext
16953 if { (eval echo "$as_me:16953: \"$ac_link\"") >&5
16954   (eval $ac_link) 2>&5
16955   ac_status=$?
16956   echo "$as_me:16956: \$? = $ac_status" >&5
16957   (exit $ac_status); } &&
16958          { ac_try='test -s conftest$ac_exeext'
16959   { (eval echo "$as_me:16959: \"$ac_try\"") >&5
16960   (eval $ac_try) 2>&5
16961   ac_status=$?
16962   echo "$as_me:16962: \$? = $ac_status" >&5
16963   (exit $ac_status); }; }; then
16964   cf_cv_have_va_copy=yes
16965 else
16966   echo "$as_me: failed program was:" >&5
16967 cat conftest.$ac_ext >&5
16968 cf_cv_have_va_copy=no
16969 fi
16970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16971 fi
16972 echo "$as_me:16972: result: $cf_cv_have_va_copy" >&5
16973 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16974
16975 test "$cf_cv_have_va_copy" = yes &&
16976 cat >>confdefs.h <<\EOF
16977 #define HAVE_VA_COPY 1
16978 EOF
16979
16980 echo "$as_me:16980: checking for __va_copy" >&5
16981 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16982 if test "${cf_cv_have___va_copy+set}" = set; then
16983   echo $ECHO_N "(cached) $ECHO_C" >&6
16984 else
16985
16986 cat >conftest.$ac_ext <<_ACEOF
16987 #line 16987 "configure"
16988 #include "confdefs.h"
16989
16990 #include <stdarg.h>
16991
16992 int
16993 main ()
16994 {
16995
16996         static va_list dst;
16997         static va_list src;
16998         __va_copy(dst, src)
16999   ;
17000   return 0;
17001 }
17002 _ACEOF
17003 rm -f conftest.$ac_objext conftest$ac_exeext
17004 if { (eval echo "$as_me:17004: \"$ac_link\"") >&5
17005   (eval $ac_link) 2>&5
17006   ac_status=$?
17007   echo "$as_me:17007: \$? = $ac_status" >&5
17008   (exit $ac_status); } &&
17009          { ac_try='test -s conftest$ac_exeext'
17010   { (eval echo "$as_me:17010: \"$ac_try\"") >&5
17011   (eval $ac_try) 2>&5
17012   ac_status=$?
17013   echo "$as_me:17013: \$? = $ac_status" >&5
17014   (exit $ac_status); }; }; then
17015   cf_cv_have___va_copy=yes
17016 else
17017   echo "$as_me: failed program was:" >&5
17018 cat conftest.$ac_ext >&5
17019 cf_cv_have___va_copy=no
17020 fi
17021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17022 fi
17023 echo "$as_me:17023: result: $cf_cv_have___va_copy" >&5
17024 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17025
17026 test "$cf_cv_have___va_copy" = yes &&
17027 cat >>confdefs.h <<\EOF
17028 #define HAVE___VA_COPY 1
17029 EOF
17030
17031 echo "$as_me:17031: checking for pid_t" >&5
17032 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17033 if test "${ac_cv_type_pid_t+set}" = set; then
17034   echo $ECHO_N "(cached) $ECHO_C" >&6
17035 else
17036   cat >conftest.$ac_ext <<_ACEOF
17037 #line 17037 "configure"
17038 #include "confdefs.h"
17039 $ac_includes_default
17040 int
17041 main ()
17042 {
17043 if ((pid_t *) 0)
17044   return 0;
17045 if (sizeof (pid_t))
17046   return 0;
17047   ;
17048   return 0;
17049 }
17050 _ACEOF
17051 rm -f conftest.$ac_objext
17052 if { (eval echo "$as_me:17052: \"$ac_compile\"") >&5
17053   (eval $ac_compile) 2>&5
17054   ac_status=$?
17055   echo "$as_me:17055: \$? = $ac_status" >&5
17056   (exit $ac_status); } &&
17057          { ac_try='test -s conftest.$ac_objext'
17058   { (eval echo "$as_me:17058: \"$ac_try\"") >&5
17059   (eval $ac_try) 2>&5
17060   ac_status=$?
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit $ac_status); }; }; then
17063   ac_cv_type_pid_t=yes
17064 else
17065   echo "$as_me: failed program was:" >&5
17066 cat conftest.$ac_ext >&5
17067 ac_cv_type_pid_t=no
17068 fi
17069 rm -f conftest.$ac_objext conftest.$ac_ext
17070 fi
17071 echo "$as_me:17071: result: $ac_cv_type_pid_t" >&5
17072 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17073 if test $ac_cv_type_pid_t = yes; then
17074   :
17075 else
17076
17077 cat >>confdefs.h <<EOF
17078 #define pid_t int
17079 EOF
17080
17081 fi
17082
17083 for ac_header in unistd.h vfork.h
17084 do
17085 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17086 echo "$as_me:17086: checking for $ac_header" >&5
17087 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17088 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17089   echo $ECHO_N "(cached) $ECHO_C" >&6
17090 else
17091   cat >conftest.$ac_ext <<_ACEOF
17092 #line 17092 "configure"
17093 #include "confdefs.h"
17094 #include <$ac_header>
17095 _ACEOF
17096 if { (eval echo "$as_me:17096: \"$ac_cpp conftest.$ac_ext\"") >&5
17097   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17098   ac_status=$?
17099   egrep -v '^ *\+' conftest.er1 >conftest.err
17100   rm -f conftest.er1
17101   cat conftest.err >&5
17102   echo "$as_me:17102: \$? = $ac_status" >&5
17103   (exit $ac_status); } >/dev/null; then
17104   if test -s conftest.err; then
17105     ac_cpp_err=$ac_c_preproc_warn_flag
17106   else
17107     ac_cpp_err=
17108   fi
17109 else
17110   ac_cpp_err=yes
17111 fi
17112 if test -z "$ac_cpp_err"; then
17113   eval "$as_ac_Header=yes"
17114 else
17115   echo "$as_me: failed program was:" >&5
17116   cat conftest.$ac_ext >&5
17117   eval "$as_ac_Header=no"
17118 fi
17119 rm -f conftest.err conftest.$ac_ext
17120 fi
17121 echo "$as_me:17121: result: `eval echo '${'$as_ac_Header'}'`" >&5
17122 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17123 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17124   cat >>confdefs.h <<EOF
17125 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17126 EOF
17127
17128 fi
17129 done
17130
17131 for ac_func in fork vfork
17132 do
17133 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17134 echo "$as_me:17134: checking for $ac_func" >&5
17135 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17136 if eval "test \"\${$as_ac_var+set}\" = set"; then
17137   echo $ECHO_N "(cached) $ECHO_C" >&6
17138 else
17139   cat >conftest.$ac_ext <<_ACEOF
17140 #line 17140 "configure"
17141 #include "confdefs.h"
17142 /* System header to define __stub macros and hopefully few prototypes,
17143     which can conflict with char $ac_func (); below.  */
17144 #include <assert.h>
17145 /* Override any gcc2 internal prototype to avoid an error.  */
17146 #ifdef __cplusplus
17147 extern "C"
17148 #endif
17149 /* We use char because int might match the return type of a gcc2
17150    builtin and then its argument prototype would still apply.  */
17151 char $ac_func ();
17152 char (*f) ();
17153
17154 int
17155 main ()
17156 {
17157 /* The GNU C library defines this for functions which it implements
17158     to always fail with ENOSYS.  Some functions are actually named
17159     something starting with __ and the normal name is an alias.  */
17160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17161 choke me
17162 #else
17163 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17164 #endif
17165
17166   ;
17167   return 0;
17168 }
17169 _ACEOF
17170 rm -f conftest.$ac_objext conftest$ac_exeext
17171 if { (eval echo "$as_me:17171: \"$ac_link\"") >&5
17172   (eval $ac_link) 2>&5
17173   ac_status=$?
17174   echo "$as_me:17174: \$? = $ac_status" >&5
17175   (exit $ac_status); } &&
17176          { ac_try='test -s conftest$ac_exeext'
17177   { (eval echo "$as_me:17177: \"$ac_try\"") >&5
17178   (eval $ac_try) 2>&5
17179   ac_status=$?
17180   echo "$as_me:17180: \$? = $ac_status" >&5
17181   (exit $ac_status); }; }; then
17182   eval "$as_ac_var=yes"
17183 else
17184   echo "$as_me: failed program was:" >&5
17185 cat conftest.$ac_ext >&5
17186 eval "$as_ac_var=no"
17187 fi
17188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17189 fi
17190 echo "$as_me:17190: result: `eval echo '${'$as_ac_var'}'`" >&5
17191 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17192 if test `eval echo '${'$as_ac_var'}'` = yes; then
17193   cat >>confdefs.h <<EOF
17194 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17195 EOF
17196
17197 fi
17198 done
17199
17200 ac_cv_func_fork_works=$ac_cv_func_fork
17201 if test "x$ac_cv_func_fork" = xyes; then
17202   echo "$as_me:17202: checking for working fork" >&5
17203 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17204 if test "${ac_cv_func_fork_works+set}" = set; then
17205   echo $ECHO_N "(cached) $ECHO_C" >&6
17206 else
17207   if test "$cross_compiling" = yes; then
17208   ac_cv_func_fork_works=cross
17209 else
17210   cat >conftest.$ac_ext <<_ACEOF
17211 /* By Rüdiger Kuhlmann. */
17212       #include <sys/types.h>
17213       #if HAVE_UNISTD_H
17214       # include <unistd.h>
17215       #endif
17216       /* Some systems only have a dummy stub for fork() */
17217       int main ()
17218       {
17219         if (fork() < 0)
17220           $ac_main_return (1);
17221         $ac_main_return (0);
17222       }
17223 _ACEOF
17224 rm -f conftest$ac_exeext
17225 if { (eval echo "$as_me:17225: \"$ac_link\"") >&5
17226   (eval $ac_link) 2>&5
17227   ac_status=$?
17228   echo "$as_me:17228: \$? = $ac_status" >&5
17229   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17230   { (eval echo "$as_me:17230: \"$ac_try\"") >&5
17231   (eval $ac_try) 2>&5
17232   ac_status=$?
17233   echo "$as_me:17233: \$? = $ac_status" >&5
17234   (exit $ac_status); }; }; then
17235   ac_cv_func_fork_works=yes
17236 else
17237   echo "$as_me: program exited with status $ac_status" >&5
17238 echo "$as_me: failed program was:" >&5
17239 cat conftest.$ac_ext >&5
17240 ac_cv_func_fork_works=no
17241 fi
17242 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17243 fi
17244 fi
17245 echo "$as_me:17245: result: $ac_cv_func_fork_works" >&5
17246 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17247
17248 fi
17249 if test "x$ac_cv_func_fork_works" = xcross; then
17250   case $host in
17251     *-*-amigaos* | *-*-msdosdjgpp*)
17252       # Override, as these systems have only a dummy fork() stub
17253       ac_cv_func_fork_works=no
17254       ;;
17255     *)
17256       ac_cv_func_fork_works=yes
17257       ;;
17258   esac
17259   { echo "$as_me:17259: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17260 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17261 fi
17262 ac_cv_func_vfork_works=$ac_cv_func_vfork
17263 if test "x$ac_cv_func_vfork" = xyes; then
17264   echo "$as_me:17264: checking for working vfork" >&5
17265 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17266 if test "${ac_cv_func_vfork_works+set}" = set; then
17267   echo $ECHO_N "(cached) $ECHO_C" >&6
17268 else
17269   if test "$cross_compiling" = yes; then
17270   ac_cv_func_vfork_works=cross
17271 else
17272   cat >conftest.$ac_ext <<_ACEOF
17273 #line 17273 "configure"
17274 #include "confdefs.h"
17275 /* Thanks to Paul Eggert for this test.  */
17276 #include <stdio.h>
17277 #include <sys/types.h>
17278 #include <sys/stat.h>
17279 #if HAVE_UNISTD_H
17280 # include <unistd.h>
17281 #endif
17282 #if HAVE_VFORK_H
17283 # include <vfork.h>
17284 #endif
17285 /* On some sparc systems, changes by the child to local and incoming
17286    argument registers are propagated back to the parent.  The compiler
17287    is told about this with #include <vfork.h>, but some compilers
17288    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17289    static variable whose address is put into a register that is
17290    clobbered by the vfork.  */
17291 static
17292 #ifdef __cplusplus
17293 sparc_address_test (int arg)
17294 # else
17295 sparc_address_test (arg) int arg;
17296 #endif
17297 {
17298   static pid_t child;
17299   if (!child) {
17300     child = vfork ();
17301     if (child < 0) {
17302       perror ("vfork");
17303       _exit(2);
17304     }
17305     if (!child) {
17306       arg = getpid();
17307       write(-1, "", 0);
17308       _exit (arg);
17309     }
17310   }
17311 }
17312
17313 int
17314 main ()
17315 {
17316   pid_t parent = getpid ();
17317   pid_t child;
17318
17319   sparc_address_test ();
17320
17321   child = vfork ();
17322
17323   if (child == 0) {
17324     /* Here is another test for sparc vfork register problems.  This
17325        test uses lots of local variables, at least as many local
17326        variables as main has allocated so far including compiler
17327        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17328        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17329        reuse the register of parent for one of the local variables,
17330        since it will think that parent can't possibly be used any more
17331        in this routine.  Assigning to the local variable will thus
17332        munge parent in the parent process.  */
17333     pid_t
17334       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17335       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17336     /* Convince the compiler that p..p7 are live; otherwise, it might
17337        use the same hardware register for all 8 local variables.  */
17338     if (p != p1 || p != p2 || p != p3 || p != p4
17339         || p != p5 || p != p6 || p != p7)
17340       _exit(1);
17341
17342     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17343        from child file descriptors.  If the child closes a descriptor
17344        before it execs or exits, this munges the parent's descriptor
17345        as well.  Test for this by closing stdout in the child.  */
17346     _exit(close(fileno(stdout)) != 0);
17347   } else {
17348     int status;
17349     struct stat st;
17350
17351     while (wait(&status) != child)
17352       ;
17353     $ac_main_return(
17354          /* Was there some problem with vforking?  */
17355          child < 0
17356
17357          /* Did the child fail?  (This shouldn't happen.)  */
17358          || status
17359
17360          /* Did the vfork/compiler bug occur?  */
17361          || parent != getpid()
17362
17363          /* Did the file descriptor bug occur?  */
17364          || fstat(fileno(stdout), &st) != 0
17365          );
17366   }
17367 }
17368 _ACEOF
17369 rm -f conftest$ac_exeext
17370 if { (eval echo "$as_me:17370: \"$ac_link\"") >&5
17371   (eval $ac_link) 2>&5
17372   ac_status=$?
17373   echo "$as_me:17373: \$? = $ac_status" >&5
17374   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17375   { (eval echo "$as_me:17375: \"$ac_try\"") >&5
17376   (eval $ac_try) 2>&5
17377   ac_status=$?
17378   echo "$as_me:17378: \$? = $ac_status" >&5
17379   (exit $ac_status); }; }; then
17380   ac_cv_func_vfork_works=yes
17381 else
17382   echo "$as_me: program exited with status $ac_status" >&5
17383 echo "$as_me: failed program was:" >&5
17384 cat conftest.$ac_ext >&5
17385 ac_cv_func_vfork_works=no
17386 fi
17387 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17388 fi
17389 fi
17390 echo "$as_me:17390: result: $ac_cv_func_vfork_works" >&5
17391 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17392
17393 fi;
17394 if test "x$ac_cv_func_fork_works" = xcross; then
17395   ac_cv_func_vfork_works=ac_cv_func_vfork
17396   { echo "$as_me:17396: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17397 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17398 fi
17399
17400 if test "x$ac_cv_func_vfork_works" = xyes; then
17401
17402 cat >>confdefs.h <<\EOF
17403 #define HAVE_WORKING_VFORK 1
17404 EOF
17405
17406 else
17407
17408 cat >>confdefs.h <<\EOF
17409 #define vfork fork
17410 EOF
17411
17412 fi
17413 if test "x$ac_cv_func_fork_works" = xyes; then
17414
17415 cat >>confdefs.h <<\EOF
17416 #define HAVE_WORKING_FORK 1
17417 EOF
17418
17419 fi
17420
17421 # special check for test/ditto.c
17422
17423 echo "$as_me:17423: checking for openpty in -lutil" >&5
17424 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17425 if test "${ac_cv_lib_util_openpty+set}" = set; then
17426   echo $ECHO_N "(cached) $ECHO_C" >&6
17427 else
17428   ac_check_lib_save_LIBS=$LIBS
17429 LIBS="-lutil  $LIBS"
17430 cat >conftest.$ac_ext <<_ACEOF
17431 #line 17431 "configure"
17432 #include "confdefs.h"
17433
17434 /* Override any gcc2 internal prototype to avoid an error.  */
17435 #ifdef __cplusplus
17436 extern "C"
17437 #endif
17438 /* We use char because int might match the return type of a gcc2
17439    builtin and then its argument prototype would still apply.  */
17440 char openpty ();
17441 int
17442 main ()
17443 {
17444 openpty ();
17445   ;
17446   return 0;
17447 }
17448 _ACEOF
17449 rm -f conftest.$ac_objext conftest$ac_exeext
17450 if { (eval echo "$as_me:17450: \"$ac_link\"") >&5
17451   (eval $ac_link) 2>&5
17452   ac_status=$?
17453   echo "$as_me:17453: \$? = $ac_status" >&5
17454   (exit $ac_status); } &&
17455          { ac_try='test -s conftest$ac_exeext'
17456   { (eval echo "$as_me:17456: \"$ac_try\"") >&5
17457   (eval $ac_try) 2>&5
17458   ac_status=$?
17459   echo "$as_me:17459: \$? = $ac_status" >&5
17460   (exit $ac_status); }; }; then
17461   ac_cv_lib_util_openpty=yes
17462 else
17463   echo "$as_me: failed program was:" >&5
17464 cat conftest.$ac_ext >&5
17465 ac_cv_lib_util_openpty=no
17466 fi
17467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17468 LIBS=$ac_check_lib_save_LIBS
17469 fi
17470 echo "$as_me:17470: result: $ac_cv_lib_util_openpty" >&5
17471 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17472 if test $ac_cv_lib_util_openpty = yes; then
17473   cf_cv_lib_util=yes
17474 else
17475   cf_cv_lib_util=no
17476 fi
17477
17478 echo "$as_me:17478: checking for openpty header" >&5
17479 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17480 if test "${cf_cv_func_openpty+set}" = set; then
17481   echo $ECHO_N "(cached) $ECHO_C" >&6
17482 else
17483
17484     cf_save_LIBS="$LIBS"
17485     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17486     for cf_header in pty.h libutil.h util.h
17487     do
17488     cat >conftest.$ac_ext <<_ACEOF
17489 #line 17489 "configure"
17490 #include "confdefs.h"
17491
17492 #include <$cf_header>
17493
17494 int
17495 main ()
17496 {
17497
17498     int x = openpty((int *)0, (int *)0, (char *)0,
17499                    (struct termios *)0, (struct winsize *)0);
17500
17501   ;
17502   return 0;
17503 }
17504 _ACEOF
17505 rm -f conftest.$ac_objext conftest$ac_exeext
17506 if { (eval echo "$as_me:17506: \"$ac_link\"") >&5
17507   (eval $ac_link) 2>&5
17508   ac_status=$?
17509   echo "$as_me:17509: \$? = $ac_status" >&5
17510   (exit $ac_status); } &&
17511          { ac_try='test -s conftest$ac_exeext'
17512   { (eval echo "$as_me:17512: \"$ac_try\"") >&5
17513   (eval $ac_try) 2>&5
17514   ac_status=$?
17515   echo "$as_me:17515: \$? = $ac_status" >&5
17516   (exit $ac_status); }; }; then
17517
17518         cf_cv_func_openpty=$cf_header
17519         break
17520
17521 else
17522   echo "$as_me: failed program was:" >&5
17523 cat conftest.$ac_ext >&5
17524
17525         cf_cv_func_openpty=no
17526
17527 fi
17528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17529     done
17530     LIBS="$cf_save_LIBS"
17531
17532 fi
17533 echo "$as_me:17533: result: $cf_cv_func_openpty" >&5
17534 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17535
17536 if test "$cf_cv_func_openpty" != no ; then
17537
17538 cat >>confdefs.h <<EOF
17539 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17540 EOF
17541
17542 cat >>confdefs.h <<\EOF
17543 #define USE_XTERM_PTY 1
17544 EOF
17545
17546     if test "x$cf_cv_lib_util" = xyes ; then
17547         TEST_LIBS="-lutil $TEST_LIBS"
17548     fi
17549 fi
17550
17551 if test "$with_hashed_db" != no ; then
17552
17553 cat >>confdefs.h <<\EOF
17554 #define USE_HASHED_DB 1
17555 EOF
17556
17557 case $with_hashed_db in #(vi
17558 yes|*able*) #(vi
17559     ;;
17560 *)
17561     if test -d "$with_hashed_db" ; then
17562
17563 if test -n "$with_hashed_db/include" ; then
17564   for cf_add_incdir in $with_hashed_db/include
17565   do
17566         while test $cf_add_incdir != /usr/include
17567         do
17568           if test -d $cf_add_incdir
17569           then
17570                 cf_have_incdir=no
17571                 if test -n "$CFLAGS$CPPFLAGS" ; then
17572                   # a loop is needed to ensure we can add subdirs of existing dirs
17573                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17574                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17575                           cf_have_incdir=yes; break
17576                         fi
17577                   done
17578                 fi
17579
17580                 if test "$cf_have_incdir" = no ; then
17581                   if test "$cf_add_incdir" = /usr/local/include ; then
17582                         if test "$GCC" = yes
17583                         then
17584                           cf_save_CPPFLAGS=$CPPFLAGS
17585                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17586                           cat >conftest.$ac_ext <<_ACEOF
17587 #line 17587 "configure"
17588 #include "confdefs.h"
17589 #include <stdio.h>
17590 int
17591 main ()
17592 {
17593 printf("Hello")
17594   ;
17595   return 0;
17596 }
17597 _ACEOF
17598 rm -f conftest.$ac_objext
17599 if { (eval echo "$as_me:17599: \"$ac_compile\"") >&5
17600   (eval $ac_compile) 2>&5
17601   ac_status=$?
17602   echo "$as_me:17602: \$? = $ac_status" >&5
17603   (exit $ac_status); } &&
17604          { ac_try='test -s conftest.$ac_objext'
17605   { (eval echo "$as_me:17605: \"$ac_try\"") >&5
17606   (eval $ac_try) 2>&5
17607   ac_status=$?
17608   echo "$as_me:17608: \$? = $ac_status" >&5
17609   (exit $ac_status); }; }; then
17610   :
17611 else
17612   echo "$as_me: failed program was:" >&5
17613 cat conftest.$ac_ext >&5
17614 cf_have_incdir=yes
17615 fi
17616 rm -f conftest.$ac_objext conftest.$ac_ext
17617                           CPPFLAGS=$cf_save_CPPFLAGS
17618                         fi
17619                   fi
17620                 fi
17621
17622                 if test "$cf_have_incdir" = no ; then
17623                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17624
17625 echo "${as_me:-configure}:17625: testing adding $cf_add_incdir to include-path ..." 1>&5
17626
17627                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17628
17629                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17630                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17631                   cf_add_incdir="$cf_top_incdir"
17632                 else
17633                   break
17634                 fi
17635           fi
17636         done
17637   done
17638 fi
17639
17640 if test -n "$with_hashed_db/lib" ; then
17641   for cf_add_libdir in $with_hashed_db/lib
17642   do
17643     if test $cf_add_libdir = /usr/lib ; then
17644       :
17645     elif test -d $cf_add_libdir
17646     then
17647       cf_have_libdir=no
17648       if test -n "$LDFLAGS$LIBS" ; then
17649         # a loop is needed to ensure we can add subdirs of existing dirs
17650         for cf_test_libdir in $LDFLAGS $LIBS ; do
17651           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17652             cf_have_libdir=yes; break
17653           fi
17654         done
17655       fi
17656       if test "$cf_have_libdir" = no ; then
17657         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17658
17659 echo "${as_me:-configure}:17659: testing adding $cf_add_libdir to library-path ..." 1>&5
17660
17661         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17662       fi
17663     fi
17664   done
17665 fi
17666
17667     fi
17668 esac
17669
17670 echo "$as_me:17670: checking for db.h" >&5
17671 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17672 if test "${ac_cv_header_db_h+set}" = set; then
17673   echo $ECHO_N "(cached) $ECHO_C" >&6
17674 else
17675   cat >conftest.$ac_ext <<_ACEOF
17676 #line 17676 "configure"
17677 #include "confdefs.h"
17678 #include <db.h>
17679 _ACEOF
17680 if { (eval echo "$as_me:17680: \"$ac_cpp conftest.$ac_ext\"") >&5
17681   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17682   ac_status=$?
17683   egrep -v '^ *\+' conftest.er1 >conftest.err
17684   rm -f conftest.er1
17685   cat conftest.err >&5
17686   echo "$as_me:17686: \$? = $ac_status" >&5
17687   (exit $ac_status); } >/dev/null; then
17688   if test -s conftest.err; then
17689     ac_cpp_err=$ac_c_preproc_warn_flag
17690   else
17691     ac_cpp_err=
17692   fi
17693 else
17694   ac_cpp_err=yes
17695 fi
17696 if test -z "$ac_cpp_err"; then
17697   ac_cv_header_db_h=yes
17698 else
17699   echo "$as_me: failed program was:" >&5
17700   cat conftest.$ac_ext >&5
17701   ac_cv_header_db_h=no
17702 fi
17703 rm -f conftest.err conftest.$ac_ext
17704 fi
17705 echo "$as_me:17705: result: $ac_cv_header_db_h" >&5
17706 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17707 if test $ac_cv_header_db_h = yes; then
17708
17709 echo "$as_me:17709: checking for version of db" >&5
17710 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17711 if test "${cf_cv_hashed_db_version+set}" = set; then
17712   echo $ECHO_N "(cached) $ECHO_C" >&6
17713 else
17714
17715 cf_cv_hashed_db_version=unknown
17716
17717 for cf_db_version in 1 2 3 4 5
17718 do
17719
17720 echo "${as_me:-configure}:17720: testing checking for db version $cf_db_version ..." 1>&5
17721
17722         cat >conftest.$ac_ext <<_ACEOF
17723 #line 17723 "configure"
17724 #include "confdefs.h"
17725
17726 $ac_includes_default
17727 #include <db.h>
17728
17729 #ifdef DB_VERSION_MAJOR
17730         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17731 #if $cf_db_version == DB_VERSION_MAJOR
17732         /* ok */
17733 #else
17734         make an error
17735 #endif
17736 #else
17737 #if $cf_db_version == 1
17738         /* ok: assuming this is DB 1.8.5 */
17739 #else
17740         make an error
17741 #endif
17742 #endif
17743
17744 int
17745 main ()
17746 {
17747 DBT *foo = 0
17748   ;
17749   return 0;
17750 }
17751 _ACEOF
17752 rm -f conftest.$ac_objext
17753 if { (eval echo "$as_me:17753: \"$ac_compile\"") >&5
17754   (eval $ac_compile) 2>&5
17755   ac_status=$?
17756   echo "$as_me:17756: \$? = $ac_status" >&5
17757   (exit $ac_status); } &&
17758          { ac_try='test -s conftest.$ac_objext'
17759   { (eval echo "$as_me:17759: \"$ac_try\"") >&5
17760   (eval $ac_try) 2>&5
17761   ac_status=$?
17762   echo "$as_me:17762: \$? = $ac_status" >&5
17763   (exit $ac_status); }; }; then
17764
17765         cf_cv_hashed_db_version=$cf_db_version
17766         break
17767
17768 else
17769   echo "$as_me: failed program was:" >&5
17770 cat conftest.$ac_ext >&5
17771 fi
17772 rm -f conftest.$ac_objext conftest.$ac_ext
17773 done
17774
17775 fi
17776 echo "$as_me:17776: result: $cf_cv_hashed_db_version" >&5
17777 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17778
17779 if test "$cf_cv_hashed_db_version" = unknown ; then
17780         { { echo "$as_me:17780: error: Cannot determine version of db" >&5
17781 echo "$as_me: error: Cannot determine version of db" >&2;}
17782    { (exit 1); exit 1; }; }
17783 else
17784
17785 echo "$as_me:17785: checking for db libraries" >&5
17786 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17787 if test "${cf_cv_hashed_db_libs+set}" = set; then
17788   echo $ECHO_N "(cached) $ECHO_C" >&6
17789 else
17790
17791 cf_cv_hashed_db_libs=unknown
17792 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17793 do
17794         cf_save_libs="$LIBS"
17795         if test -n "$cf_db_libs"; then
17796                 LIBS="-l$cf_db_libs $LIBS"
17797         fi
17798
17799 echo "${as_me:-configure}:17799: testing checking for library "$cf_db_libs" ..." 1>&5
17800
17801         cat >conftest.$ac_ext <<_ACEOF
17802 #line 17802 "configure"
17803 #include "confdefs.h"
17804
17805 $ac_includes_default
17806 #include <db.h>
17807
17808 int
17809 main ()
17810 {
17811
17812         char *path = "/tmp/foo";
17813 #ifdef DB_VERSION_MAJOR
17814 #if DB_VERSION_MAJOR >= 4
17815         DB *result = 0;
17816         db_create(&result, NULL, 0);
17817         result->open(result,
17818                 NULL,
17819                 path,
17820                 path,
17821                 DB_HASH,
17822                 DB_CREATE,
17823                 0644);
17824 #elif DB_VERSION_MAJOR >= 3
17825         DB *result = 0;
17826         db_create(&result, NULL, 0);
17827         result->open(result,
17828                 path,
17829                 path,
17830                 DB_HASH,
17831                 DB_CREATE,
17832                 0644);
17833 #elif DB_VERSION_MAJOR >= 2
17834         DB *result = 0;
17835         db_open(path,
17836                 DB_HASH,
17837                 DB_CREATE,
17838                 0644,
17839                 (DB_ENV *) 0,
17840                 (DB_INFO *) 0,
17841                 &result);
17842 #endif /* DB_VERSION_MAJOR */
17843 #else
17844         DB *result = dbopen(path,
17845                      2,
17846                      0644,
17847                      DB_HASH,
17848                      0);
17849 #endif
17850         ${cf_cv_main_return:-return}(result != 0)
17851
17852   ;
17853   return 0;
17854 }
17855 _ACEOF
17856 rm -f conftest.$ac_objext conftest$ac_exeext
17857 if { (eval echo "$as_me:17857: \"$ac_link\"") >&5
17858   (eval $ac_link) 2>&5
17859   ac_status=$?
17860   echo "$as_me:17860: \$? = $ac_status" >&5
17861   (exit $ac_status); } &&
17862          { ac_try='test -s conftest$ac_exeext'
17863   { (eval echo "$as_me:17863: \"$ac_try\"") >&5
17864   (eval $ac_try) 2>&5
17865   ac_status=$?
17866   echo "$as_me:17866: \$? = $ac_status" >&5
17867   (exit $ac_status); }; }; then
17868
17869         if test -n "$cf_db_libs" ; then
17870                 cf_cv_hashed_db_libs=$cf_db_libs
17871         else
17872                 cf_cv_hashed_db_libs=default
17873         fi
17874         LIBS="$cf_save_libs"
17875         break
17876
17877 else
17878   echo "$as_me: failed program was:" >&5
17879 cat conftest.$ac_ext >&5
17880 fi
17881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17882         LIBS="$cf_save_libs"
17883 done
17884
17885 fi
17886 echo "$as_me:17886: result: $cf_cv_hashed_db_libs" >&5
17887 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17888
17889         if test "$cf_cv_hashed_db_libs" = unknown ; then
17890                 { { echo "$as_me:17890: error: Cannot determine library for db" >&5
17891 echo "$as_me: error: Cannot determine library for db" >&2;}
17892    { (exit 1); exit 1; }; }
17893         elif test "$cf_cv_hashed_db_libs" != default ; then
17894                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17895         fi
17896 fi
17897
17898 else
17899
17900         { { echo "$as_me:17900: error: Cannot find db.h" >&5
17901 echo "$as_me: error: Cannot find db.h" >&2;}
17902    { (exit 1); exit 1; }; }
17903
17904 fi
17905
17906 fi
17907
17908 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17909         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17910         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17911 fi
17912
17913 # Just in case, check if the C compiler has a bool type.
17914
17915 echo "$as_me:17915: checking if we should include stdbool.h" >&5
17916 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17917
17918 if test "${cf_cv_header_stdbool_h+set}" = set; then
17919   echo $ECHO_N "(cached) $ECHO_C" >&6
17920 else
17921
17922         cat >conftest.$ac_ext <<_ACEOF
17923 #line 17923 "configure"
17924 #include "confdefs.h"
17925
17926 int
17927 main ()
17928 {
17929 bool foo = false
17930   ;
17931   return 0;
17932 }
17933 _ACEOF
17934 rm -f conftest.$ac_objext
17935 if { (eval echo "$as_me:17935: \"$ac_compile\"") >&5
17936   (eval $ac_compile) 2>&5
17937   ac_status=$?
17938   echo "$as_me:17938: \$? = $ac_status" >&5
17939   (exit $ac_status); } &&
17940          { ac_try='test -s conftest.$ac_objext'
17941   { (eval echo "$as_me:17941: \"$ac_try\"") >&5
17942   (eval $ac_try) 2>&5
17943   ac_status=$?
17944   echo "$as_me:17944: \$? = $ac_status" >&5
17945   (exit $ac_status); }; }; then
17946   cf_cv_header_stdbool_h=0
17947 else
17948   echo "$as_me: failed program was:" >&5
17949 cat conftest.$ac_ext >&5
17950 cat >conftest.$ac_ext <<_ACEOF
17951 #line 17951 "configure"
17952 #include "confdefs.h"
17953
17954 #ifndef __BEOS__
17955 #include <stdbool.h>
17956 #endif
17957
17958 int
17959 main ()
17960 {
17961 bool foo = false
17962   ;
17963   return 0;
17964 }
17965 _ACEOF
17966 rm -f conftest.$ac_objext
17967 if { (eval echo "$as_me:17967: \"$ac_compile\"") >&5
17968   (eval $ac_compile) 2>&5
17969   ac_status=$?
17970   echo "$as_me:17970: \$? = $ac_status" >&5
17971   (exit $ac_status); } &&
17972          { ac_try='test -s conftest.$ac_objext'
17973   { (eval echo "$as_me:17973: \"$ac_try\"") >&5
17974   (eval $ac_try) 2>&5
17975   ac_status=$?
17976   echo "$as_me:17976: \$? = $ac_status" >&5
17977   (exit $ac_status); }; }; then
17978   cf_cv_header_stdbool_h=1
17979 else
17980   echo "$as_me: failed program was:" >&5
17981 cat conftest.$ac_ext >&5
17982 cf_cv_header_stdbool_h=0
17983 fi
17984 rm -f conftest.$ac_objext conftest.$ac_ext
17985 fi
17986 rm -f conftest.$ac_objext conftest.$ac_ext
17987 fi
17988
17989 if test "$cf_cv_header_stdbool_h" = 1
17990 then    echo "$as_me:17990: result: yes" >&5
17991 echo "${ECHO_T}yes" >&6
17992 else    echo "$as_me:17992: result: no" >&5
17993 echo "${ECHO_T}no" >&6
17994 fi
17995
17996 echo "$as_me:17996: checking for builtin bool type" >&5
17997 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17998
17999 if test "${cf_cv_cc_bool_type+set}" = set; then
18000   echo $ECHO_N "(cached) $ECHO_C" >&6
18001 else
18002
18003         cat >conftest.$ac_ext <<_ACEOF
18004 #line 18004 "configure"
18005 #include "confdefs.h"
18006
18007 #include <stdio.h>
18008 #include <sys/types.h>
18009
18010 int
18011 main ()
18012 {
18013 bool x = false
18014   ;
18015   return 0;
18016 }
18017 _ACEOF
18018 rm -f conftest.$ac_objext
18019 if { (eval echo "$as_me:18019: \"$ac_compile\"") >&5
18020   (eval $ac_compile) 2>&5
18021   ac_status=$?
18022   echo "$as_me:18022: \$? = $ac_status" >&5
18023   (exit $ac_status); } &&
18024          { ac_try='test -s conftest.$ac_objext'
18025   { (eval echo "$as_me:18025: \"$ac_try\"") >&5
18026   (eval $ac_try) 2>&5
18027   ac_status=$?
18028   echo "$as_me:18028: \$? = $ac_status" >&5
18029   (exit $ac_status); }; }; then
18030   cf_cv_cc_bool_type=1
18031 else
18032   echo "$as_me: failed program was:" >&5
18033 cat conftest.$ac_ext >&5
18034 cf_cv_cc_bool_type=0
18035 fi
18036 rm -f conftest.$ac_objext conftest.$ac_ext
18037
18038 fi
18039
18040 if test "$cf_cv_cc_bool_type" = 1
18041 then    echo "$as_me:18041: result: yes" >&5
18042 echo "${ECHO_T}yes" >&6
18043 else    echo "$as_me:18043: result: no" >&5
18044 echo "${ECHO_T}no" >&6
18045 fi
18046
18047 # Check for C++ compiler characteristics (and ensure that it's there!)
18048 if test -n "$CXX" ; then
18049         ac_ext=cc
18050 ac_cpp='$CXXCPP $CPPFLAGS'
18051 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18052 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18053 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18054 ac_main_return=return
18055
18056 if test -n "$GXX" ; then
18057 case $cf_cv_system_name in #(vi
18058 os2*) #(vi
18059         cf_stdcpp_libname=stdcpp
18060         ;;
18061 *)
18062         cf_stdcpp_libname=stdc++
18063         ;;
18064 esac
18065 echo "$as_me:18065: checking for library $cf_stdcpp_libname" >&5
18066 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18067 if test "${cf_cv_libstdcpp+set}" = set; then
18068   echo $ECHO_N "(cached) $ECHO_C" >&6
18069 else
18070
18071         cf_save="$LIBS"
18072         LIBS="-l$cf_stdcpp_libname $LIBS"
18073 cat >conftest.$ac_ext <<_ACEOF
18074 #line 18074 "configure"
18075 #include "confdefs.h"
18076
18077 #include <strstream.h>
18078 int
18079 main ()
18080 {
18081
18082 char buf[80];
18083 strstreambuf foo(buf, sizeof(buf))
18084
18085   ;
18086   return 0;
18087 }
18088 _ACEOF
18089 rm -f conftest.$ac_objext conftest$ac_exeext
18090 if { (eval echo "$as_me:18090: \"$ac_link\"") >&5
18091   (eval $ac_link) 2>&5
18092   ac_status=$?
18093   echo "$as_me:18093: \$? = $ac_status" >&5
18094   (exit $ac_status); } &&
18095          { ac_try='test -s conftest$ac_exeext'
18096   { (eval echo "$as_me:18096: \"$ac_try\"") >&5
18097   (eval $ac_try) 2>&5
18098   ac_status=$?
18099   echo "$as_me:18099: \$? = $ac_status" >&5
18100   (exit $ac_status); }; }; then
18101   cf_cv_libstdcpp=yes
18102 else
18103   echo "$as_me: failed program was:" >&5
18104 cat conftest.$ac_ext >&5
18105 cf_cv_libstdcpp=no
18106 fi
18107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18108         LIBS="$cf_save"
18109
18110 fi
18111 echo "$as_me:18111: result: $cf_cv_libstdcpp" >&5
18112 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18113 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18114 fi
18115
18116         echo "$as_me:18116: checking whether $CXX understands -c and -o together" >&5
18117 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18118 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18119   echo $ECHO_N "(cached) $ECHO_C" >&6
18120 else
18121
18122 cat > conftest.$ac_ext <<CF_EOF
18123 #include <stdio.h>
18124 int main()
18125 {
18126         ${cf_cv_main_return:-return}(0);
18127 }
18128 CF_EOF
18129 # We do the test twice because some compilers refuse to overwrite an
18130 # existing .o file with -o, though they will create one.
18131 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18132 if { (eval echo "$as_me:18132: \"$ac_try\"") >&5
18133   (eval $ac_try) 2>&5
18134   ac_status=$?
18135   echo "$as_me:18135: \$? = $ac_status" >&5
18136   (exit $ac_status); } &&
18137   test -f conftest2.$ac_objext && { (eval echo "$as_me:18137: \"$ac_try\"") >&5
18138   (eval $ac_try) 2>&5
18139   ac_status=$?
18140   echo "$as_me:18140: \$? = $ac_status" >&5
18141   (exit $ac_status); };
18142 then
18143   eval cf_cv_prog_CXX_c_o=yes
18144 else
18145   eval cf_cv_prog_CXX_c_o=no
18146 fi
18147 rm -rf conftest*
18148
18149 fi
18150 if test $cf_cv_prog_CXX_c_o = yes; then
18151   echo "$as_me:18151: result: yes" >&5
18152 echo "${ECHO_T}yes" >&6
18153 else
18154   echo "$as_me:18154: result: no" >&5
18155 echo "${ECHO_T}no" >&6
18156 fi
18157
18158         case $GXX_VERSION in
18159         1*|2.0-6*)
18160                 cf_cxx_library=yes
18161                 ;;
18162         *-2.7*|2.7*)
18163
18164 cf_cxx_library=unknown
18165 case $cf_cv_system_name in #(vi
18166 os2*) #(vi
18167         cf_gpp_libname=gpp
18168         ;;
18169 *)
18170         cf_gpp_libname=g++
18171         ;;
18172 esac
18173 if test "$GXX" = yes; then
18174         echo "$as_me:18174: checking for lib$cf_gpp_libname" >&5
18175 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18176         cf_save="$LIBS"
18177         LIBS="-l$cf_gpp_libname $LIBS"
18178         cat >conftest.$ac_ext <<_ACEOF
18179 #line 18179 "configure"
18180 #include "confdefs.h"
18181
18182 #include <$cf_gpp_libname/builtin.h>
18183
18184 int
18185 main ()
18186 {
18187 two_arg_error_handler_t foo2 = lib_error_handler
18188   ;
18189   return 0;
18190 }
18191 _ACEOF
18192 rm -f conftest.$ac_objext conftest$ac_exeext
18193 if { (eval echo "$as_me:18193: \"$ac_link\"") >&5
18194   (eval $ac_link) 2>&5
18195   ac_status=$?
18196   echo "$as_me:18196: \$? = $ac_status" >&5
18197   (exit $ac_status); } &&
18198          { ac_try='test -s conftest$ac_exeext'
18199   { (eval echo "$as_me:18199: \"$ac_try\"") >&5
18200   (eval $ac_try) 2>&5
18201   ac_status=$?
18202   echo "$as_me:18202: \$? = $ac_status" >&5
18203   (exit $ac_status); }; }; then
18204   cf_cxx_library=yes
18205          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18206          if test "$cf_gpp_libname" = cpp ; then
18207
18208 cat >>confdefs.h <<\EOF
18209 #define HAVE_GPP_BUILTIN_H 1
18210 EOF
18211
18212          else
18213
18214 cat >>confdefs.h <<\EOF
18215 #define HAVE_GXX_BUILTIN_H 1
18216 EOF
18217
18218          fi
18219 else
18220   echo "$as_me: failed program was:" >&5
18221 cat conftest.$ac_ext >&5
18222 cat >conftest.$ac_ext <<_ACEOF
18223 #line 18223 "configure"
18224 #include "confdefs.h"
18225
18226 #include <builtin.h>
18227
18228 int
18229 main ()
18230 {
18231 two_arg_error_handler_t foo2 = lib_error_handler
18232   ;
18233   return 0;
18234 }
18235 _ACEOF
18236 rm -f conftest.$ac_objext conftest$ac_exeext
18237 if { (eval echo "$as_me:18237: \"$ac_link\"") >&5
18238   (eval $ac_link) 2>&5
18239   ac_status=$?
18240   echo "$as_me:18240: \$? = $ac_status" >&5
18241   (exit $ac_status); } &&
18242          { ac_try='test -s conftest$ac_exeext'
18243   { (eval echo "$as_me:18243: \"$ac_try\"") >&5
18244   (eval $ac_try) 2>&5
18245   ac_status=$?
18246   echo "$as_me:18246: \$? = $ac_status" >&5
18247   (exit $ac_status); }; }; then
18248   cf_cxx_library=yes
18249          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18250
18251 cat >>confdefs.h <<\EOF
18252 #define HAVE_BUILTIN_H 1
18253 EOF
18254
18255 else
18256   echo "$as_me: failed program was:" >&5
18257 cat conftest.$ac_ext >&5
18258 cf_cxx_library=no
18259 fi
18260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18261 fi
18262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18263         LIBS="$cf_save"
18264         echo "$as_me:18264: result: $cf_cxx_library" >&5
18265 echo "${ECHO_T}$cf_cxx_library" >&6
18266 fi
18267
18268                 ;;
18269         *)
18270                 cf_cxx_library=no
18271                 ;;
18272         esac
18273
18274         ac_ext=cc
18275 ac_cpp='$CXXCPP $CPPFLAGS'
18276 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18277 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18278 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18279 ac_main_return=return
18280 echo "$as_me:18280: checking how to run the C++ preprocessor" >&5
18281 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18282 if test -z "$CXXCPP"; then
18283   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18284   echo $ECHO_N "(cached) $ECHO_C" >&6
18285 else
18286       # Double quotes because CXXCPP needs to be expanded
18287     for CXXCPP in "$CXX -E" "/lib/cpp"
18288     do
18289       ac_preproc_ok=false
18290 for ac_cxx_preproc_warn_flag in '' yes
18291 do
18292   # Use a header file that comes with gcc, so configuring glibc
18293   # with a fresh cross-compiler works.
18294   # On the NeXT, cc -E runs the code through the compiler's parser,
18295   # not just through cpp. "Syntax error" is here to catch this case.
18296   cat >conftest.$ac_ext <<_ACEOF
18297 #line 18297 "configure"
18298 #include "confdefs.h"
18299 #include <assert.h>
18300                      Syntax error
18301 _ACEOF
18302 if { (eval echo "$as_me:18302: \"$ac_cpp conftest.$ac_ext\"") >&5
18303   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18304   ac_status=$?
18305   egrep -v '^ *\+' conftest.er1 >conftest.err
18306   rm -f conftest.er1
18307   cat conftest.err >&5
18308   echo "$as_me:18308: \$? = $ac_status" >&5
18309   (exit $ac_status); } >/dev/null; then
18310   if test -s conftest.err; then
18311     ac_cpp_err=$ac_cxx_preproc_warn_flag
18312   else
18313     ac_cpp_err=
18314   fi
18315 else
18316   ac_cpp_err=yes
18317 fi
18318 if test -z "$ac_cpp_err"; then
18319   :
18320 else
18321   echo "$as_me: failed program was:" >&5
18322   cat conftest.$ac_ext >&5
18323   # Broken: fails on valid input.
18324 continue
18325 fi
18326 rm -f conftest.err conftest.$ac_ext
18327
18328   # OK, works on sane cases.  Now check whether non-existent headers
18329   # can be detected and how.
18330   cat >conftest.$ac_ext <<_ACEOF
18331 #line 18331 "configure"
18332 #include "confdefs.h"
18333 #include <ac_nonexistent.h>
18334 _ACEOF
18335 if { (eval echo "$as_me:18335: \"$ac_cpp conftest.$ac_ext\"") >&5
18336   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18337   ac_status=$?
18338   egrep -v '^ *\+' conftest.er1 >conftest.err
18339   rm -f conftest.er1
18340   cat conftest.err >&5
18341   echo "$as_me:18341: \$? = $ac_status" >&5
18342   (exit $ac_status); } >/dev/null; then
18343   if test -s conftest.err; then
18344     ac_cpp_err=$ac_cxx_preproc_warn_flag
18345   else
18346     ac_cpp_err=
18347   fi
18348 else
18349   ac_cpp_err=yes
18350 fi
18351 if test -z "$ac_cpp_err"; then
18352   # Broken: success on invalid input.
18353 continue
18354 else
18355   echo "$as_me: failed program was:" >&5
18356   cat conftest.$ac_ext >&5
18357   # Passes both tests.
18358 ac_preproc_ok=:
18359 break
18360 fi
18361 rm -f conftest.err conftest.$ac_ext
18362
18363 done
18364 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18365 rm -f conftest.err conftest.$ac_ext
18366 if $ac_preproc_ok; then
18367   break
18368 fi
18369
18370     done
18371     ac_cv_prog_CXXCPP=$CXXCPP
18372
18373 fi
18374   CXXCPP=$ac_cv_prog_CXXCPP
18375 else
18376   ac_cv_prog_CXXCPP=$CXXCPP
18377 fi
18378 echo "$as_me:18378: result: $CXXCPP" >&5
18379 echo "${ECHO_T}$CXXCPP" >&6
18380 ac_preproc_ok=false
18381 for ac_cxx_preproc_warn_flag in '' yes
18382 do
18383   # Use a header file that comes with gcc, so configuring glibc
18384   # with a fresh cross-compiler works.
18385   # On the NeXT, cc -E runs the code through the compiler's parser,
18386   # not just through cpp. "Syntax error" is here to catch this case.
18387   cat >conftest.$ac_ext <<_ACEOF
18388 #line 18388 "configure"
18389 #include "confdefs.h"
18390 #include <assert.h>
18391                      Syntax error
18392 _ACEOF
18393 if { (eval echo "$as_me:18393: \"$ac_cpp conftest.$ac_ext\"") >&5
18394   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18395   ac_status=$?
18396   egrep -v '^ *\+' conftest.er1 >conftest.err
18397   rm -f conftest.er1
18398   cat conftest.err >&5
18399   echo "$as_me:18399: \$? = $ac_status" >&5
18400   (exit $ac_status); } >/dev/null; then
18401   if test -s conftest.err; then
18402     ac_cpp_err=$ac_cxx_preproc_warn_flag
18403   else
18404     ac_cpp_err=
18405   fi
18406 else
18407   ac_cpp_err=yes
18408 fi
18409 if test -z "$ac_cpp_err"; then
18410   :
18411 else
18412   echo "$as_me: failed program was:" >&5
18413   cat conftest.$ac_ext >&5
18414   # Broken: fails on valid input.
18415 continue
18416 fi
18417 rm -f conftest.err conftest.$ac_ext
18418
18419   # OK, works on sane cases.  Now check whether non-existent headers
18420   # can be detected and how.
18421   cat >conftest.$ac_ext <<_ACEOF
18422 #line 18422 "configure"
18423 #include "confdefs.h"
18424 #include <ac_nonexistent.h>
18425 _ACEOF
18426 if { (eval echo "$as_me:18426: \"$ac_cpp conftest.$ac_ext\"") >&5
18427   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18428   ac_status=$?
18429   egrep -v '^ *\+' conftest.er1 >conftest.err
18430   rm -f conftest.er1
18431   cat conftest.err >&5
18432   echo "$as_me:18432: \$? = $ac_status" >&5
18433   (exit $ac_status); } >/dev/null; then
18434   if test -s conftest.err; then
18435     ac_cpp_err=$ac_cxx_preproc_warn_flag
18436   else
18437     ac_cpp_err=
18438   fi
18439 else
18440   ac_cpp_err=yes
18441 fi
18442 if test -z "$ac_cpp_err"; then
18443   # Broken: success on invalid input.
18444 continue
18445 else
18446   echo "$as_me: failed program was:" >&5
18447   cat conftest.$ac_ext >&5
18448   # Passes both tests.
18449 ac_preproc_ok=:
18450 break
18451 fi
18452 rm -f conftest.err conftest.$ac_ext
18453
18454 done
18455 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18456 rm -f conftest.err conftest.$ac_ext
18457 if $ac_preproc_ok; then
18458   :
18459 else
18460   { { echo "$as_me:18460: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18461 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18462    { (exit 1); exit 1; }; }
18463 fi
18464
18465 ac_ext=cc
18466 ac_cpp='$CXXCPP $CPPFLAGS'
18467 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18468 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18469 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18470 ac_main_return=return
18471
18472 for ac_header in typeinfo
18473 do
18474 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18475 echo "$as_me:18475: checking for $ac_header" >&5
18476 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18477 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18478   echo $ECHO_N "(cached) $ECHO_C" >&6
18479 else
18480   cat >conftest.$ac_ext <<_ACEOF
18481 #line 18481 "configure"
18482 #include "confdefs.h"
18483 #include <$ac_header>
18484 _ACEOF
18485 if { (eval echo "$as_me:18485: \"$ac_cpp conftest.$ac_ext\"") >&5
18486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18487   ac_status=$?
18488   egrep -v '^ *\+' conftest.er1 >conftest.err
18489   rm -f conftest.er1
18490   cat conftest.err >&5
18491   echo "$as_me:18491: \$? = $ac_status" >&5
18492   (exit $ac_status); } >/dev/null; then
18493   if test -s conftest.err; then
18494     ac_cpp_err=$ac_cxx_preproc_warn_flag
18495   else
18496     ac_cpp_err=
18497   fi
18498 else
18499   ac_cpp_err=yes
18500 fi
18501 if test -z "$ac_cpp_err"; then
18502   eval "$as_ac_Header=yes"
18503 else
18504   echo "$as_me: failed program was:" >&5
18505   cat conftest.$ac_ext >&5
18506   eval "$as_ac_Header=no"
18507 fi
18508 rm -f conftest.err conftest.$ac_ext
18509 fi
18510 echo "$as_me:18510: result: `eval echo '${'$as_ac_Header'}'`" >&5
18511 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18512 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18513   cat >>confdefs.h <<EOF
18514 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18515 EOF
18516
18517 fi
18518 done
18519
18520 for ac_header in iostream
18521 do
18522 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18523 echo "$as_me:18523: checking for $ac_header" >&5
18524 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18525 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18526   echo $ECHO_N "(cached) $ECHO_C" >&6
18527 else
18528   cat >conftest.$ac_ext <<_ACEOF
18529 #line 18529 "configure"
18530 #include "confdefs.h"
18531 #include <$ac_header>
18532 _ACEOF
18533 if { (eval echo "$as_me:18533: \"$ac_cpp conftest.$ac_ext\"") >&5
18534   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18535   ac_status=$?
18536   egrep -v '^ *\+' conftest.er1 >conftest.err
18537   rm -f conftest.er1
18538   cat conftest.err >&5
18539   echo "$as_me:18539: \$? = $ac_status" >&5
18540   (exit $ac_status); } >/dev/null; then
18541   if test -s conftest.err; then
18542     ac_cpp_err=$ac_cxx_preproc_warn_flag
18543   else
18544     ac_cpp_err=
18545   fi
18546 else
18547   ac_cpp_err=yes
18548 fi
18549 if test -z "$ac_cpp_err"; then
18550   eval "$as_ac_Header=yes"
18551 else
18552   echo "$as_me: failed program was:" >&5
18553   cat conftest.$ac_ext >&5
18554   eval "$as_ac_Header=no"
18555 fi
18556 rm -f conftest.err conftest.$ac_ext
18557 fi
18558 echo "$as_me:18558: result: `eval echo '${'$as_ac_Header'}'`" >&5
18559 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18560 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18561   cat >>confdefs.h <<EOF
18562 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18563 EOF
18564
18565 fi
18566 done
18567
18568 if test x"$ac_cv_header_iostream" = xyes ; then
18569         echo "$as_me:18569: checking if iostream uses std-namespace" >&5
18570 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18571         cat >conftest.$ac_ext <<_ACEOF
18572 #line 18572 "configure"
18573 #include "confdefs.h"
18574
18575 #include <iostream>
18576 using std::endl;
18577 using std::cerr;
18578 int
18579 main ()
18580 {
18581
18582 cerr << "testing" << endl;
18583
18584   ;
18585   return 0;
18586 }
18587 _ACEOF
18588 rm -f conftest.$ac_objext
18589 if { (eval echo "$as_me:18589: \"$ac_compile\"") >&5
18590   (eval $ac_compile) 2>&5
18591   ac_status=$?
18592   echo "$as_me:18592: \$? = $ac_status" >&5
18593   (exit $ac_status); } &&
18594          { ac_try='test -s conftest.$ac_objext'
18595   { (eval echo "$as_me:18595: \"$ac_try\"") >&5
18596   (eval $ac_try) 2>&5
18597   ac_status=$?
18598   echo "$as_me:18598: \$? = $ac_status" >&5
18599   (exit $ac_status); }; }; then
18600   cf_iostream_namespace=yes
18601 else
18602   echo "$as_me: failed program was:" >&5
18603 cat conftest.$ac_ext >&5
18604 cf_iostream_namespace=no
18605 fi
18606 rm -f conftest.$ac_objext conftest.$ac_ext
18607         echo "$as_me:18607: result: $cf_iostream_namespace" >&5
18608 echo "${ECHO_T}$cf_iostream_namespace" >&6
18609         if test "$cf_iostream_namespace" = yes ; then
18610
18611 cat >>confdefs.h <<\EOF
18612 #define IOSTREAM_NAMESPACE 1
18613 EOF
18614
18615         fi
18616 fi
18617
18618 echo "$as_me:18618: checking if we should include stdbool.h" >&5
18619 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18620
18621 if test "${cf_cv_header_stdbool_h+set}" = set; then
18622   echo $ECHO_N "(cached) $ECHO_C" >&6
18623 else
18624
18625         cat >conftest.$ac_ext <<_ACEOF
18626 #line 18626 "configure"
18627 #include "confdefs.h"
18628
18629 int
18630 main ()
18631 {
18632 bool foo = false
18633   ;
18634   return 0;
18635 }
18636 _ACEOF
18637 rm -f conftest.$ac_objext
18638 if { (eval echo "$as_me:18638: \"$ac_compile\"") >&5
18639   (eval $ac_compile) 2>&5
18640   ac_status=$?
18641   echo "$as_me:18641: \$? = $ac_status" >&5
18642   (exit $ac_status); } &&
18643          { ac_try='test -s conftest.$ac_objext'
18644   { (eval echo "$as_me:18644: \"$ac_try\"") >&5
18645   (eval $ac_try) 2>&5
18646   ac_status=$?
18647   echo "$as_me:18647: \$? = $ac_status" >&5
18648   (exit $ac_status); }; }; then
18649   cf_cv_header_stdbool_h=0
18650 else
18651   echo "$as_me: failed program was:" >&5
18652 cat conftest.$ac_ext >&5
18653 cat >conftest.$ac_ext <<_ACEOF
18654 #line 18654 "configure"
18655 #include "confdefs.h"
18656
18657 #ifndef __BEOS__
18658 #include <stdbool.h>
18659 #endif
18660
18661 int
18662 main ()
18663 {
18664 bool foo = false
18665   ;
18666   return 0;
18667 }
18668 _ACEOF
18669 rm -f conftest.$ac_objext
18670 if { (eval echo "$as_me:18670: \"$ac_compile\"") >&5
18671   (eval $ac_compile) 2>&5
18672   ac_status=$?
18673   echo "$as_me:18673: \$? = $ac_status" >&5
18674   (exit $ac_status); } &&
18675          { ac_try='test -s conftest.$ac_objext'
18676   { (eval echo "$as_me:18676: \"$ac_try\"") >&5
18677   (eval $ac_try) 2>&5
18678   ac_status=$?
18679   echo "$as_me:18679: \$? = $ac_status" >&5
18680   (exit $ac_status); }; }; then
18681   cf_cv_header_stdbool_h=1
18682 else
18683   echo "$as_me: failed program was:" >&5
18684 cat conftest.$ac_ext >&5
18685 cf_cv_header_stdbool_h=0
18686 fi
18687 rm -f conftest.$ac_objext conftest.$ac_ext
18688 fi
18689 rm -f conftest.$ac_objext conftest.$ac_ext
18690 fi
18691
18692 if test "$cf_cv_header_stdbool_h" = 1
18693 then    echo "$as_me:18693: result: yes" >&5
18694 echo "${ECHO_T}yes" >&6
18695 else    echo "$as_me:18695: result: no" >&5
18696 echo "${ECHO_T}no" >&6
18697 fi
18698
18699 echo "$as_me:18699: checking for builtin bool type" >&5
18700 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18701
18702 if test "${cf_cv_builtin_bool+set}" = set; then
18703   echo $ECHO_N "(cached) $ECHO_C" >&6
18704 else
18705
18706         cat >conftest.$ac_ext <<_ACEOF
18707 #line 18707 "configure"
18708 #include "confdefs.h"
18709
18710 #include <stdio.h>
18711 #include <sys/types.h>
18712
18713 int
18714 main ()
18715 {
18716 bool x = false
18717   ;
18718   return 0;
18719 }
18720 _ACEOF
18721 rm -f conftest.$ac_objext
18722 if { (eval echo "$as_me:18722: \"$ac_compile\"") >&5
18723   (eval $ac_compile) 2>&5
18724   ac_status=$?
18725   echo "$as_me:18725: \$? = $ac_status" >&5
18726   (exit $ac_status); } &&
18727          { ac_try='test -s conftest.$ac_objext'
18728   { (eval echo "$as_me:18728: \"$ac_try\"") >&5
18729   (eval $ac_try) 2>&5
18730   ac_status=$?
18731   echo "$as_me:18731: \$? = $ac_status" >&5
18732   (exit $ac_status); }; }; then
18733   cf_cv_builtin_bool=1
18734 else
18735   echo "$as_me: failed program was:" >&5
18736 cat conftest.$ac_ext >&5
18737 cf_cv_builtin_bool=0
18738 fi
18739 rm -f conftest.$ac_objext conftest.$ac_ext
18740
18741 fi
18742
18743 if test "$cf_cv_builtin_bool" = 1
18744 then    echo "$as_me:18744: result: yes" >&5
18745 echo "${ECHO_T}yes" >&6
18746 else    echo "$as_me:18746: result: no" >&5
18747 echo "${ECHO_T}no" >&6
18748 fi
18749
18750 echo "$as_me:18750: checking for size of bool" >&5
18751 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18752 if test "${cf_cv_type_of_bool+set}" = set; then
18753   echo $ECHO_N "(cached) $ECHO_C" >&6
18754 else
18755
18756         rm -f cf_test.out
18757         if test "$cross_compiling" = yes; then
18758   cf_cv_type_of_bool=unknown
18759 else
18760   cat >conftest.$ac_ext <<_ACEOF
18761 #line 18761 "configure"
18762 #include "confdefs.h"
18763
18764 #include <stdlib.h>
18765 #include <stdio.h>
18766
18767 #if defined(__cplusplus)
18768
18769 #ifdef HAVE_GXX_BUILTIN_H
18770 #include <g++/builtin.h>
18771 #elif HAVE_GPP_BUILTIN_H
18772 #include <gpp/builtin.h>
18773 #elif HAVE_BUILTIN_H
18774 #include <builtin.h>
18775 #endif
18776
18777 #else
18778
18779 #if $cf_cv_header_stdbool_h
18780 #include <stdbool.h>
18781 #endif
18782
18783 #endif
18784
18785 int main()
18786 {
18787         FILE *fp = fopen("cf_test.out", "w");
18788         if (fp != 0) {
18789                 bool x = true;
18790                 if ((bool)(-x) >= 0)
18791                         fputs("unsigned ", fp);
18792                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18793                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18794                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18795                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18796                 fclose(fp);
18797         }
18798         ${cf_cv_main_return:-return}(0);
18799 }
18800
18801 _ACEOF
18802 rm -f conftest$ac_exeext
18803 if { (eval echo "$as_me:18803: \"$ac_link\"") >&5
18804   (eval $ac_link) 2>&5
18805   ac_status=$?
18806   echo "$as_me:18806: \$? = $ac_status" >&5
18807   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18808   { (eval echo "$as_me:18808: \"$ac_try\"") >&5
18809   (eval $ac_try) 2>&5
18810   ac_status=$?
18811   echo "$as_me:18811: \$? = $ac_status" >&5
18812   (exit $ac_status); }; }; then
18813   cf_cv_type_of_bool=`cat cf_test.out`
18814                  if test -z "$cf_cv_type_of_bool"; then
18815                    cf_cv_type_of_bool=unknown
18816                  fi
18817 else
18818   echo "$as_me: program exited with status $ac_status" >&5
18819 echo "$as_me: failed program was:" >&5
18820 cat conftest.$ac_ext >&5
18821 cf_cv_type_of_bool=unknown
18822 fi
18823 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18824 fi
18825
18826 fi
18827
18828         rm -f cf_test.out
18829 echo "$as_me:18829: result: $cf_cv_type_of_bool" >&5
18830 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18831 if test "$cf_cv_type_of_bool" = unknown ; then
18832         case .$NCURSES_BOOL in #(vi
18833         .auto|.) NCURSES_BOOL=unsigned;;
18834         esac
18835         { echo "$as_me:18835: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18836 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18837         cf_cv_type_of_bool=$NCURSES_BOOL
18838 fi
18839
18840 echo "$as_me:18840: checking for special defines needed for etip.h" >&5
18841 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18842 cf_save_CXXFLAGS="$CXXFLAGS"
18843 cf_result="none"
18844
18845 # etip.h includes ncurses.h which includes ncurses_dll.h
18846 # But ncurses_dll.h is generated - fix here.
18847 test -d include || mkdir include
18848 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
18849
18850 for cf_math in "" MATH_H
18851 do
18852 for cf_excp in "" MATH_EXCEPTION
18853 do
18854         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18855         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18856         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18857 cat >conftest.$ac_ext <<_ACEOF
18858 #line 18858 "configure"
18859 #include "confdefs.h"
18860
18861 #include <etip.h.in>
18862
18863 int
18864 main ()
18865 {
18866
18867   ;
18868   return 0;
18869 }
18870 _ACEOF
18871 rm -f conftest.$ac_objext
18872 if { (eval echo "$as_me:18872: \"$ac_compile\"") >&5
18873   (eval $ac_compile) 2>&5
18874   ac_status=$?
18875   echo "$as_me:18875: \$? = $ac_status" >&5
18876   (exit $ac_status); } &&
18877          { ac_try='test -s conftest.$ac_objext'
18878   { (eval echo "$as_me:18878: \"$ac_try\"") >&5
18879   (eval $ac_try) 2>&5
18880   ac_status=$?
18881   echo "$as_me:18881: \$? = $ac_status" >&5
18882   (exit $ac_status); }; }; then
18883
18884         test -n "$cf_math" && cat >>confdefs.h <<EOF
18885 #define ETIP_NEEDS_${cf_math} 1
18886 EOF
18887
18888         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18889 #define ETIP_NEEDS_${cf_excp} 1
18890 EOF
18891
18892         cf_result="$cf_math $cf_excp"
18893         break 2
18894
18895 else
18896   echo "$as_me: failed program was:" >&5
18897 cat conftest.$ac_ext >&5
18898 fi
18899 rm -f conftest.$ac_objext conftest.$ac_ext
18900 done
18901 done
18902 echo "$as_me:18902: result: $cf_result" >&5
18903 echo "${ECHO_T}$cf_result" >&6
18904 CXXFLAGS="$cf_save_CXXFLAGS"
18905
18906 if test -n "$CXX"; then
18907 echo "$as_me:18907: checking if $CXX accepts parameter initialization" >&5
18908 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18909 if test "${cf_cv_cpp_param_init+set}" = set; then
18910   echo $ECHO_N "(cached) $ECHO_C" >&6
18911 else
18912
18913         ac_ext=cc
18914 ac_cpp='$CXXCPP $CPPFLAGS'
18915 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18916 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18917 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18918 ac_main_return=return
18919
18920         if test "$cross_compiling" = yes; then
18921   cf_cv_cpp_param_init=unknown
18922 else
18923   cat >conftest.$ac_ext <<_ACEOF
18924 #line 18924 "configure"
18925 #include "confdefs.h"
18926
18927 class TEST {
18928 private:
18929         int value;
18930 public:
18931         TEST(int x = 1);
18932         ~TEST();
18933 };
18934
18935 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18936 {
18937         value = x;
18938 }
18939 int main() { }
18940
18941 _ACEOF
18942 rm -f conftest$ac_exeext
18943 if { (eval echo "$as_me:18943: \"$ac_link\"") >&5
18944   (eval $ac_link) 2>&5
18945   ac_status=$?
18946   echo "$as_me:18946: \$? = $ac_status" >&5
18947   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18948   { (eval echo "$as_me:18948: \"$ac_try\"") >&5
18949   (eval $ac_try) 2>&5
18950   ac_status=$?
18951   echo "$as_me:18951: \$? = $ac_status" >&5
18952   (exit $ac_status); }; }; then
18953   cf_cv_cpp_param_init=yes
18954 else
18955   echo "$as_me: program exited with status $ac_status" >&5
18956 echo "$as_me: failed program was:" >&5
18957 cat conftest.$ac_ext >&5
18958 cf_cv_cpp_param_init=no
18959 fi
18960 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18961 fi
18962         ac_ext=cc
18963 ac_cpp='$CXXCPP $CPPFLAGS'
18964 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18965 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18966 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18967 ac_main_return=return
18968
18969 fi
18970 echo "$as_me:18970: result: $cf_cv_cpp_param_init" >&5
18971 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18972 fi
18973 test "$cf_cv_cpp_param_init" = yes &&
18974 cat >>confdefs.h <<\EOF
18975 #define CPP_HAS_PARAM_INIT 1
18976 EOF
18977
18978 if test -n "$CXX"; then
18979
18980 echo "$as_me:18980: checking if $CXX accepts static_cast" >&5
18981 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18982 if test "${cf_cv_cpp_static_cast+set}" = set; then
18983   echo $ECHO_N "(cached) $ECHO_C" >&6
18984 else
18985
18986         ac_ext=cc
18987 ac_cpp='$CXXCPP $CPPFLAGS'
18988 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18989 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18990 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18991 ac_main_return=return
18992
18993         cat >conftest.$ac_ext <<_ACEOF
18994 #line 18994 "configure"
18995 #include "confdefs.h"
18996
18997 class NCursesPanel
18998 {
18999 public:
19000   NCursesPanel(int nlines,
19001                int ncols,
19002                int begin_y = 0,
19003                int begin_x = 0)
19004   {
19005   }
19006   NCursesPanel();
19007   ~NCursesPanel();
19008 };
19009
19010 template<class T> class NCursesUserPanel : public NCursesPanel
19011 {
19012 public:
19013   NCursesUserPanel (int nlines,
19014                     int ncols,
19015                     int begin_y = 0,
19016                     int begin_x = 0,
19017                     const T* p_UserData = static_cast<T*>(0))
19018     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19019   {
19020   };
19021   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19022   {
19023   };
19024
19025   virtual ~NCursesUserPanel() {};
19026 };
19027
19028 int
19029 main ()
19030 {
19031
19032         const char* p_UserData = static_cast<char*>(0)
19033   ;
19034   return 0;
19035 }
19036 _ACEOF
19037 rm -f conftest.$ac_objext
19038 if { (eval echo "$as_me:19038: \"$ac_compile\"") >&5
19039   (eval $ac_compile) 2>&5
19040   ac_status=$?
19041   echo "$as_me:19041: \$? = $ac_status" >&5
19042   (exit $ac_status); } &&
19043          { ac_try='test -s conftest.$ac_objext'
19044   { (eval echo "$as_me:19044: \"$ac_try\"") >&5
19045   (eval $ac_try) 2>&5
19046   ac_status=$?
19047   echo "$as_me:19047: \$? = $ac_status" >&5
19048   (exit $ac_status); }; }; then
19049   cf_cv_cpp_static_cast=yes
19050 else
19051   echo "$as_me: failed program was:" >&5
19052 cat conftest.$ac_ext >&5
19053 cf_cv_cpp_static_cast=no
19054 fi
19055 rm -f conftest.$ac_objext conftest.$ac_ext
19056
19057         ac_ext=cc
19058 ac_cpp='$CXXCPP $CPPFLAGS'
19059 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19060 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19061 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19062 ac_main_return=return
19063
19064 fi
19065 echo "$as_me:19065: result: $cf_cv_cpp_static_cast" >&5
19066 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19067
19068 fi
19069
19070 test "$cf_cv_cpp_static_cast" = yes &&
19071 cat >>confdefs.h <<\EOF
19072 #define CPP_HAS_STATIC_CAST 1
19073 EOF
19074
19075         CXX_AR='$(AR)'
19076         CXX_ARFLAGS='$(ARFLAGS)'
19077         case $cf_cv_system_name in #(vi
19078         irix*) #(vi
19079             if test "$GXX" != yes ; then
19080                 CXX_AR='$(CXX)'
19081                 CXX_ARFLAGS='-ar -o'
19082             fi
19083             ;;
19084         sco3.2v5*) #(vi
19085             CXXLDFLAGS="-u main"
19086             ;;
19087         solaris2*)
19088             if test "$GXX" != yes ; then
19089                 CXX_AR='$(CXX)'
19090                 CXX_ARFLAGS='-xar -o'
19091             fi
19092             ;;
19093         esac
19094
19095 else
19096         cf_cxx_library=no
19097         cf_cv_builtin_bool=1
19098
19099         # Just because we are not configuring against C++ right now does not
19100         # mean that a user will not want to use C++.  Some distributors disable
19101         # the C++ portion of this configuration as a shortcut (or just to avoid
19102         # compiling the demo in the c++ directory).  So we need a reasonable
19103         # default for the 'bool' type.
19104         #
19105         # Caveat: since the storage of the bool type is not standardized, it
19106         # may change.
19107
19108         if test "$NCURSES_BOOL" != auto ; then
19109                 cf_cv_type_of_bool=$NCURSES_BOOL
19110                 cf_cv_header_stdbool_h=0
19111         else
19112                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19113
19114 echo "$as_me:19114: checking for size of bool" >&5
19115 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19116 if test "${cf_cv_type_of_bool+set}" = set; then
19117   echo $ECHO_N "(cached) $ECHO_C" >&6
19118 else
19119
19120         rm -f cf_test.out
19121         if test "$cross_compiling" = yes; then
19122   cf_cv_type_of_bool=unknown
19123 else
19124   cat >conftest.$ac_ext <<_ACEOF
19125 #line 19125 "configure"
19126 #include "confdefs.h"
19127
19128 #include <stdlib.h>
19129 #include <stdio.h>
19130
19131 #if defined(__cplusplus)
19132
19133 #ifdef HAVE_GXX_BUILTIN_H
19134 #include <g++/builtin.h>
19135 #elif HAVE_GPP_BUILTIN_H
19136 #include <gpp/builtin.h>
19137 #elif HAVE_BUILTIN_H
19138 #include <builtin.h>
19139 #endif
19140
19141 #else
19142
19143 #if $cf_cv_header_stdbool_h
19144 #include <stdbool.h>
19145 #endif
19146
19147 #endif
19148
19149 int main()
19150 {
19151         FILE *fp = fopen("cf_test.out", "w");
19152         if (fp != 0) {
19153                 bool x = true;
19154                 if ((bool)(-x) >= 0)
19155                         fputs("unsigned ", fp);
19156                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19157                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19158                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19159                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19160                 fclose(fp);
19161         }
19162         ${cf_cv_main_return:-return}(0);
19163 }
19164
19165 _ACEOF
19166 rm -f conftest$ac_exeext
19167 if { (eval echo "$as_me:19167: \"$ac_link\"") >&5
19168   (eval $ac_link) 2>&5
19169   ac_status=$?
19170   echo "$as_me:19170: \$? = $ac_status" >&5
19171   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19172   { (eval echo "$as_me:19172: \"$ac_try\"") >&5
19173   (eval $ac_try) 2>&5
19174   ac_status=$?
19175   echo "$as_me:19175: \$? = $ac_status" >&5
19176   (exit $ac_status); }; }; then
19177   cf_cv_type_of_bool=`cat cf_test.out`
19178                  if test -z "$cf_cv_type_of_bool"; then
19179                    cf_cv_type_of_bool=unknown
19180                  fi
19181 else
19182   echo "$as_me: program exited with status $ac_status" >&5
19183 echo "$as_me: failed program was:" >&5
19184 cat conftest.$ac_ext >&5
19185 cf_cv_type_of_bool=unknown
19186 fi
19187 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19188 fi
19189
19190 fi
19191
19192         rm -f cf_test.out
19193 echo "$as_me:19193: result: $cf_cv_type_of_bool" >&5
19194 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19195 if test "$cf_cv_type_of_bool" = unknown ; then
19196         case .$NCURSES_BOOL in #(vi
19197         .auto|.) NCURSES_BOOL=unsigned;;
19198         esac
19199         { echo "$as_me:19199: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19200 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19201         cf_cv_type_of_bool=$NCURSES_BOOL
19202 fi
19203
19204                 else
19205                         echo "$as_me:19205: checking for fallback type of bool" >&5
19206 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19207                         case "$host_cpu" in #(vi
19208                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19209                         *)      cf_cv_type_of_bool=int  ;;
19210                         esac
19211                         echo "$as_me:19211: result: $cf_cv_type_of_bool" >&5
19212 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19213                 fi
19214         fi
19215 fi
19216
19217 # If the C compiler did not declare bool, and we did not determine that the C++
19218 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19219 # ncurses library use the same type as C++ bool.  Note that this allows one to
19220 # specify the type of bool in a configure-script option and postpone
19221 # integration with the C++ compiler provided that the types are compatible.
19222 USE_CXX_BOOL=1
19223 if test $cf_cv_cc_bool_type = 1
19224 then
19225         # oops: C has a bool.  Unlikely, but C++ could differ.
19226         USE_CXX_BOOL=0
19227 elif test $cf_cv_builtin_bool = 0
19228 then
19229         # C++ has no bool
19230         USE_CXX_BOOL=0
19231 else
19232         # this is the normal case
19233         USE_CXX_BOOL='defined(__cplusplus)'
19234 fi
19235
19236 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19237
19238         if test "$cf_with_ada" != "no" ; then
19239                 if test "$with_libtool" != "no"; then
19240                         { echo "$as_me:19240: WARNING: libtool does not support Ada - disabling feature" >&5
19241 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19242                         cf_with_ada=no
19243                 fi
19244         fi
19245
19246         if test "$cf_with_ada" != "no" ; then
19247
19248 cf_ada_make=gnatmake
19249 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19250 set dummy $cf_ada_make; ac_word=$2
19251 echo "$as_me:19251: checking for $ac_word" >&5
19252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19253 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19254   echo $ECHO_N "(cached) $ECHO_C" >&6
19255 else
19256   if test -n "$gnat_exists"; then
19257   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19258 else
19259   ac_save_IFS=$IFS; IFS=$ac_path_separator
19260 ac_dummy="$PATH"
19261 for ac_dir in $ac_dummy; do
19262   IFS=$ac_save_IFS
19263   test -z "$ac_dir" && ac_dir=.
19264   $as_executable_p "$ac_dir/$ac_word" || continue
19265 ac_cv_prog_gnat_exists="yes"
19266 echo "$as_me:19266: found $ac_dir/$ac_word" >&5
19267 break
19268 done
19269
19270   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19271 fi
19272 fi
19273 gnat_exists=$ac_cv_prog_gnat_exists
19274 if test -n "$gnat_exists"; then
19275   echo "$as_me:19275: result: $gnat_exists" >&5
19276 echo "${ECHO_T}$gnat_exists" >&6
19277 else
19278   echo "$as_me:19278: result: no" >&5
19279 echo "${ECHO_T}no" >&6
19280 fi
19281
19282 if test "$ac_cv_prog_gnat_exists" = no; then
19283    cf_ada_make=
19284    cf_cv_prog_gnat_correct=no
19285 else
19286
19287 echo "$as_me:19287: checking for gnat version" >&5
19288 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19289 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19290         grep '[0-9].[0-9][0-9]*' |\
19291     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19292 echo "$as_me:19292: result: $cf_gnat_version" >&5
19293 echo "${ECHO_T}$cf_gnat_version" >&6
19294
19295 case $cf_gnat_version in #(vi
19296 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19297         cf_cv_prog_gnat_correct=yes
19298         ;;
19299 *)
19300         { echo "$as_me:19300: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19301 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19302         cf_cv_prog_gnat_correct=no
19303         ;;
19304 esac
19305
19306    # Extract the first word of "m4", so it can be a program name with args.
19307 set dummy m4; ac_word=$2
19308 echo "$as_me:19308: checking for $ac_word" >&5
19309 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19310 if test "${ac_cv_prog_M4_exists+set}" = set; then
19311   echo $ECHO_N "(cached) $ECHO_C" >&6
19312 else
19313   if test -n "$M4_exists"; then
19314   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19315 else
19316   ac_save_IFS=$IFS; IFS=$ac_path_separator
19317 ac_dummy="$PATH"
19318 for ac_dir in $ac_dummy; do
19319   IFS=$ac_save_IFS
19320   test -z "$ac_dir" && ac_dir=.
19321   $as_executable_p "$ac_dir/$ac_word" || continue
19322 ac_cv_prog_M4_exists="yes"
19323 echo "$as_me:19323: found $ac_dir/$ac_word" >&5
19324 break
19325 done
19326
19327   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19328 fi
19329 fi
19330 M4_exists=$ac_cv_prog_M4_exists
19331 if test -n "$M4_exists"; then
19332   echo "$as_me:19332: result: $M4_exists" >&5
19333 echo "${ECHO_T}$M4_exists" >&6
19334 else
19335   echo "$as_me:19335: result: no" >&5
19336 echo "${ECHO_T}no" >&6
19337 fi
19338
19339    if test "$ac_cv_prog_M4_exists" = no; then
19340       cf_cv_prog_gnat_correct=no
19341       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19342    fi
19343    if test "$cf_cv_prog_gnat_correct" = yes; then
19344       echo "$as_me:19344: checking if GNAT works" >&5
19345 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19346
19347 rm -rf conftest* *~conftest*
19348 cat >>conftest.ads <<CF_EOF
19349 procedure conftest;
19350 CF_EOF
19351 cat >>conftest.adb <<CF_EOF
19352 with Text_IO;
19353 with GNAT.OS_Lib;
19354 procedure conftest is
19355 begin
19356    Text_IO.Put ("Hello World");
19357    Text_IO.New_Line;
19358    GNAT.OS_Lib.OS_Exit (0);
19359 end conftest;
19360 CF_EOF
19361 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19362    if ( ./conftest 1>&5 2>&1 ) ; then
19363       cf_cv_prog_gnat_correct=yes
19364    else
19365       cf_cv_prog_gnat_correct=no
19366    fi
19367 else
19368    cf_cv_prog_gnat_correct=no
19369 fi
19370 rm -rf conftest* *~conftest*
19371
19372       echo "$as_me:19372: result: $cf_cv_prog_gnat_correct" >&5
19373 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19374    fi
19375 fi
19376
19377                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19378
19379         ADAFLAGS="$ADAFLAGS -gnatpn"
19380
19381         echo "$as_me:19381: checking optimization options for ADAFLAGS" >&5
19382 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19383         case "$CFLAGS" in
19384         *-g*)
19385
19386         ADAFLAGS="$ADAFLAGS -g"
19387
19388                 ;;
19389         esac
19390         case "$CFLAGS" in
19391         *-O*)
19392                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19393
19394         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19395
19396                 ;;
19397         esac
19398         echo "$as_me:19398: result: $ADAFLAGS" >&5
19399 echo "${ECHO_T}$ADAFLAGS" >&6
19400
19401 echo "$as_me:19401: checking if GNAT supports generics" >&5
19402 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19403 case $cf_gnat_version in #(vi
19404 3.[1-9]*|[4-9].*) #(vi
19405         cf_gnat_generics=yes
19406         ;;
19407 *)
19408         cf_gnat_generics=no
19409         ;;
19410 esac
19411 echo "$as_me:19411: result: $cf_gnat_generics" >&5
19412 echo "${ECHO_T}$cf_gnat_generics" >&6
19413
19414 if test "$cf_gnat_generics" = yes
19415 then
19416         cf_compile_generics=generics
19417         cf_generic_objects="\${GENOBJS}"
19418 else
19419         cf_compile_generics=
19420         cf_generic_objects=
19421 fi
19422
19423 echo "$as_me:19423: checking if GNAT supports SIGINT" >&5
19424 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19425 if test "${cf_cv_gnat_sigint+set}" = set; then
19426   echo $ECHO_N "(cached) $ECHO_C" >&6
19427 else
19428
19429 rm -rf conftest* *~conftest*
19430 cat >>conftest.ads <<CF_EOF
19431 with Ada.Interrupts.Names;
19432
19433 package ConfTest is
19434
19435    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19436    pragma Unreserve_All_Interrupts;
19437    pragma Warnings (On);
19438
19439    protected Process is
19440       procedure Stop;
19441       function Continue return Boolean;
19442       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19443    private
19444       Done : Boolean := False;
19445    end Process;
19446
19447 end ConfTest;
19448 CF_EOF
19449 cat >>conftest.adb <<CF_EOF
19450 package body ConfTest is
19451    protected body Process is
19452       procedure Stop is
19453       begin
19454          Done := True;
19455       end Stop;
19456       function Continue return Boolean is
19457       begin
19458          return not Done;
19459       end Continue;
19460    end Process;
19461 end ConfTest;
19462 CF_EOF
19463 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19464       cf_cv_gnat_sigint=yes
19465 else
19466    cf_cv_gnat_sigint=no
19467 fi
19468 rm -rf conftest* *~conftest*
19469
19470 fi
19471 echo "$as_me:19471: result: $cf_cv_gnat_sigint" >&5
19472 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19473
19474 if test $cf_cv_gnat_sigint = yes ; then
19475         USE_GNAT_SIGINT=""
19476 else
19477         USE_GNAT_SIGINT="#"
19478 fi
19479
19480 echo "$as_me:19480: checking if GNAT pragma Unreferenced works" >&5
19481 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19482 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19483   echo $ECHO_N "(cached) $ECHO_C" >&6
19484 else
19485
19486 rm -rf conftest* *~conftest*
19487 cat >>conftest.ads <<CF_EOF
19488 procedure conftest;
19489 CF_EOF
19490 cat >>conftest.adb <<CF_EOF
19491 with Text_IO;
19492 with GNAT.OS_Lib;
19493 procedure conftest is
19494    test : Integer;
19495    pragma Unreferenced (test);
19496 begin
19497    test := 1;
19498    Text_IO.Put ("Hello World");
19499    Text_IO.New_Line;
19500    GNAT.OS_Lib.OS_Exit (0);
19501 end conftest;
19502 CF_EOF
19503 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19504       cf_cv_pragma_unreferenced=yes
19505 else
19506    cf_cv_pragma_unreferenced=no
19507 fi
19508 rm -rf conftest* *~conftest*
19509
19510 fi
19511 echo "$as_me:19511: result: $cf_cv_pragma_unreferenced" >&5
19512 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19513
19514 # if the pragma is supported, use it (needed in the Trace code).
19515 if test $cf_cv_pragma_unreferenced = yes ; then
19516         PRAGMA_UNREF=TRUE
19517 else
19518         PRAGMA_UNREF=FALSE
19519 fi
19520
19521 cf_gnat_libraries=no
19522 cf_gnat_projects=no
19523
19524 echo "$as_me:19524: checking if GNAT supports project files" >&5
19525 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19526 case $cf_gnat_version in #(vi
19527 3.[0-9]*) #(vi
19528         ;;
19529 *)
19530         case $cf_cv_system_name in #(vi
19531         cygwin*) #(vi
19532                 ;;
19533         *)
19534                 mkdir conftest.src conftest.bin conftest.lib
19535                 cd conftest.src
19536                 rm -rf conftest* *~conftest*
19537                 cat >>library.gpr <<CF_EOF
19538 project Library is
19539   Kind := External ("LIB_KIND");
19540   for Library_Name use "ConfTest";
19541   for Object_Dir use ".";
19542   for Library_ALI_Dir use External("LIBRARY_DIR");
19543   for Library_Version use External ("SONAME");
19544   for Library_Kind use Kind;
19545   for Library_Dir use External("BUILD_DIR");
19546   Source_Dir := External ("SOURCE_DIR");
19547   for Source_Dirs use (Source_Dir);
19548   package Compiler is
19549      for Default_Switches ("Ada") use
19550        ("-g",
19551         "-O2",
19552         "-gnatafno",
19553         "-gnatVa",   -- All validity checks
19554         "-gnatwa");  -- Activate all optional errors
19555   end Compiler;
19556 end Library;
19557 CF_EOF
19558                 cat >>confpackage.ads <<CF_EOF
19559 package ConfPackage is
19560    procedure conftest;
19561 end ConfPackage;
19562 CF_EOF
19563                 cat >>confpackage.adb <<CF_EOF
19564 with Text_IO;
19565 package body ConfPackage is
19566    procedure conftest is
19567    begin
19568       Text_IO.Put ("Hello World");
19569       Text_IO.New_Line;
19570    end conftest;
19571 end ConfPackage;
19572 CF_EOF
19573                 if ( $cf_ada_make $ADAFLAGS \
19574                                 -Plibrary.gpr \
19575                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19576                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19577                                 -XSOURCE_DIR=`pwd` \
19578                                 -XSONAME=libConfTest.so.1 \
19579                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19580                         cf_gnat_projects=yes
19581                 fi
19582                 cd ..
19583                 if test -f conftest.lib/confpackage.ali
19584                 then
19585                         cf_gnat_libraries=yes
19586                 fi
19587                 rm -rf conftest* *~conftest*
19588                 ;;
19589         esac
19590         ;;
19591 esac
19592 echo "$as_me:19592: result: $cf_gnat_projects" >&5
19593 echo "${ECHO_T}$cf_gnat_projects" >&6
19594
19595 if test $cf_gnat_projects = yes
19596 then
19597         echo "$as_me:19597: checking if GNAT supports libraries" >&5
19598 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19599         echo "$as_me:19599: result: $cf_gnat_libraries" >&5
19600 echo "${ECHO_T}$cf_gnat_libraries" >&6
19601 fi
19602
19603 if test "$cf_gnat_projects" = yes
19604 then
19605         USE_OLD_MAKERULES="#"
19606         USE_GNAT_PROJECTS=""
19607 else
19608         USE_OLD_MAKERULES=""
19609         USE_GNAT_PROJECTS="#"
19610 fi
19611
19612 if test "$cf_gnat_libraries" = yes
19613 then
19614         USE_GNAT_LIBRARIES=""
19615 else
19616         USE_GNAT_LIBRARIES="#"
19617 fi
19618
19619 echo "$as_me:19619: checking for ada-compiler" >&5
19620 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19621
19622 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19623 if test "${with_ada_compiler+set}" = set; then
19624   withval="$with_ada_compiler"
19625   cf_ada_compiler=$withval
19626 else
19627   cf_ada_compiler=gnatmake
19628 fi;
19629
19630 echo "$as_me:19630: result: $cf_ada_compiler" >&5
19631 echo "${ECHO_T}$cf_ada_compiler" >&6
19632
19633                         cf_ada_package=terminal_interface
19634
19635 echo "$as_me:19635: checking for ada-include" >&5
19636 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19637
19638 # Check whether --with-ada-include or --without-ada-include was given.
19639 if test "${with_ada_include+set}" = set; then
19640   withval="$with_ada_include"
19641
19642 else
19643   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19644 fi; if test -n "$prefix/share/ada/adainclude" ; then
19645
19646 if test "x$prefix" != xNONE; then
19647   cf_path_syntax="$prefix"
19648 else
19649   cf_path_syntax="$ac_default_prefix"
19650 fi
19651
19652 case ".$withval" in #(vi
19653 .\$\(*\)*|.\'*\'*) #(vi
19654   ;;
19655 ..|./*|.\\*) #(vi
19656   ;;
19657 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19658   ;;
19659 .\${*prefix}*|.\${*dir}*) #(vi
19660   eval withval="$withval"
19661   case ".$withval" in #(vi
19662   .NONE/*)
19663     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19664     ;;
19665   esac
19666   ;; #(vi
19667 .no|.NONE/*)
19668   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19669   ;;
19670 *)
19671   { { echo "$as_me:19671: error: expected a pathname, not \"$withval\"" >&5
19672 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19673    { (exit 1); exit 1; }; }
19674   ;;
19675 esac
19676
19677 fi
19678 eval ADA_INCLUDE="$withval"
19679
19680 echo "$as_me:19680: result: $ADA_INCLUDE" >&5
19681 echo "${ECHO_T}$ADA_INCLUDE" >&6
19682
19683 echo "$as_me:19683: checking for ada-objects" >&5
19684 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19685
19686 # Check whether --with-ada-objects or --without-ada-objects was given.
19687 if test "${with_ada_objects+set}" = set; then
19688   withval="$with_ada_objects"
19689
19690 else
19691   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19692 fi; if test -n "$prefix/lib/ada/adalib" ; then
19693
19694 if test "x$prefix" != xNONE; then
19695   cf_path_syntax="$prefix"
19696 else
19697   cf_path_syntax="$ac_default_prefix"
19698 fi
19699
19700 case ".$withval" in #(vi
19701 .\$\(*\)*|.\'*\'*) #(vi
19702   ;;
19703 ..|./*|.\\*) #(vi
19704   ;;
19705 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19706   ;;
19707 .\${*prefix}*|.\${*dir}*) #(vi
19708   eval withval="$withval"
19709   case ".$withval" in #(vi
19710   .NONE/*)
19711     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19712     ;;
19713   esac
19714   ;; #(vi
19715 .no|.NONE/*)
19716   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19717   ;;
19718 *)
19719   { { echo "$as_me:19719: error: expected a pathname, not \"$withval\"" >&5
19720 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19721    { (exit 1); exit 1; }; }
19722   ;;
19723 esac
19724
19725 fi
19726 eval ADA_OBJECTS="$withval"
19727
19728 echo "$as_me:19728: result: $ADA_OBJECTS" >&5
19729 echo "${ECHO_T}$ADA_OBJECTS" >&6
19730
19731 echo "$as_me:19731: checking if an Ada95 shared-library should be built" >&5
19732 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19733
19734 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19735 if test "${with_ada_sharedlib+set}" = set; then
19736   withval="$with_ada_sharedlib"
19737   with_ada_sharedlib=$withval
19738 else
19739   with_ada_sharedlib=no
19740 fi;
19741 echo "$as_me:19741: result: $with_ada_sharedlib" >&5
19742 echo "${ECHO_T}$with_ada_sharedlib" >&6
19743
19744 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19745 MAKE_ADA_SHAREDLIB="#"
19746
19747 if test "x$with_ada_sharedlib" != xno
19748 then
19749         MAKE_ADA_SHAREDLIB=
19750         if test "x$with_ada_sharedlib" != xyes
19751         then
19752                 ADA_SHAREDLIB="$with_ada_sharedlib"
19753         fi
19754 fi
19755
19756                 fi
19757         fi
19758 else
19759         cf_with_ada=no
19760 fi
19761
19762 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19763 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19764 ###
19765 ### ticlib modules may be a separate library, otherwise contained in termlib.
19766 ### termlib modules may be a separate library, otherwise contained in ncurses.
19767 ###
19768 ### The of "+" or " " between the tokens controls the way the script
19769 ### chooses to split module lists into libraries.
19770 ###
19771 ### (see CF_LIB_RULES).
19772 echo "$as_me:19772: checking for library subsets" >&5
19773 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19774 LIB_SUBSETS=
19775
19776 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19777         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19778         if test "$with_ticlib" != no ; then
19779                 LIB_SUBSETS="${LIB_SUBSETS} "
19780         else
19781                 LIB_SUBSETS="${LIB_SUBSETS}+"
19782         fi
19783 fi
19784
19785 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19786 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19787
19788 if test "$with_termlib" != no ; then
19789         LIB_SUBSETS="${LIB_SUBSETS} "
19790 else
19791         LIB_SUBSETS="${LIB_SUBSETS}+"
19792 fi
19793
19794 LIB_SUBSETS="${LIB_SUBSETS}base"
19795
19796 # Most term-driver calls are to tinfo, but some like init_pair are to the
19797 # base library (so it resides in base).
19798 if test "$with_term_driver" != no ; then
19799         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19800         case $cf_cv_system_name in #(vi
19801         *mingw32*) #(vi
19802                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19803                 ;;
19804         *) #(vi
19805                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19806                 ;;
19807         esac
19808 fi
19809
19810 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19811 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19812
19813 echo "$as_me:19813: result: $LIB_SUBSETS" >&5
19814 echo "${ECHO_T}$LIB_SUBSETS" >&6
19815
19816 ### Construct the list of include-directories to be generated
19817
19818 if test "$GCC" != yes; then
19819         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19820 elif test "$includedir" != "/usr/include"; then
19821         if test "$includedir" = '${prefix}/include' ; then
19822                 if test $prefix != /usr ; then
19823                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19824                 fi
19825         else
19826                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
19827         fi
19828 fi
19829 if test "$srcdir" != "."; then
19830         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19831 fi
19832 CPPFLAGS="-I. -I../include $CPPFLAGS"
19833
19834 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19835 if test "$srcdir" != "."; then
19836         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19837 fi
19838 if test "$GCC" != yes; then
19839         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19840 elif test "$includedir" != "/usr/include"; then
19841         if test "$includedir" = '${prefix}/include' ; then
19842                 if test $prefix != /usr ; then
19843                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19844                 fi
19845         else
19846                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19847         fi
19848 fi
19849
19850 ### Build up pieces for makefile rules
19851 echo "$as_me:19851: checking default library suffix" >&5
19852 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19853
19854         case $DFT_LWR_MODEL in
19855         libtool) DFT_ARG_SUFFIX=''   ;;
19856         normal)  DFT_ARG_SUFFIX=''   ;;
19857         debug)   DFT_ARG_SUFFIX='_g' ;;
19858         profile) DFT_ARG_SUFFIX='_p' ;;
19859         shared)  DFT_ARG_SUFFIX=''   ;;
19860         esac
19861         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19862 echo "$as_me:19862: result: $DFT_ARG_SUFFIX" >&5
19863 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19864
19865 echo "$as_me:19865: checking default library-dependency suffix" >&5
19866 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19867
19868         case $DFT_LWR_MODEL in #(vi
19869         libtool) #(vi
19870                 DFT_LIB_SUFFIX='.la'
19871                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19872                 ;;
19873         normal) #(vi
19874                 DFT_LIB_SUFFIX='.a'
19875                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19876                 ;;
19877         debug) #(vi
19878                 DFT_LIB_SUFFIX='_g.a'
19879                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19880                 ;;
19881         profile) #(vi
19882                 DFT_LIB_SUFFIX='_p.a'
19883                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19884                 ;;
19885         shared) #(vi
19886                 case $cf_cv_system_name in
19887                 aix[5-7]*) #(vi
19888                         DFT_LIB_SUFFIX='.a'
19889                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19890                         ;;
19891                 cygwin*|mingw*) #(vi
19892                         DFT_LIB_SUFFIX='.dll'
19893                         DFT_DEP_SUFFIX='.dll.a'
19894                         ;;
19895                 darwin*) #(vi
19896                         DFT_LIB_SUFFIX='.dylib'
19897                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19898                         ;;
19899                 hpux*) #(vi
19900                         case $target in
19901                         ia64*) #(vi
19902                                 DFT_LIB_SUFFIX='.so'
19903                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19904                                 ;;
19905                         *) #(vi
19906                                 DFT_LIB_SUFFIX='.sl'
19907                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19908                                 ;;
19909                         esac
19910                         ;;
19911                 *)      DFT_LIB_SUFFIX='.so'
19912                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19913                         ;;
19914                 esac
19915         esac
19916         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19917         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19918 echo "$as_me:19918: result: $DFT_DEP_SUFFIX" >&5
19919 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19920
19921 echo "$as_me:19921: checking default object directory" >&5
19922 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19923
19924         case $DFT_LWR_MODEL in
19925         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19926         normal)  DFT_OBJ_SUBDIR='objects' ;;
19927         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19928         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19929         shared)
19930                 case $cf_cv_system_name in #(vi
19931                 cygwin) #(vi
19932                         DFT_OBJ_SUBDIR='objects' ;;
19933                 *)
19934                         DFT_OBJ_SUBDIR='obj_s' ;;
19935                 esac
19936         esac
19937 echo "$as_me:19937: result: $DFT_OBJ_SUBDIR" >&5
19938 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19939
19940 if test "x$cf_with_cxx" = xyes ; then
19941 echo "$as_me:19941: checking c++ library-dependency suffix" >&5
19942 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19943 if test "$with_libtool" != "no"; then
19944         # libtool thinks it can make c++ shared libraries (perhaps only g++)
19945         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19946 elif test "$with_shared_cxx" != "no"; then
19947         # also for g++ users...
19948         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19949 else
19950         # we normally make a static library because C/C++ library rules differ
19951
19952         case normal in #(vi
19953         libtool) #(vi
19954                 CXX_LIB_SUFFIX='.la'
19955                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19956                 ;;
19957         normal) #(vi
19958                 CXX_LIB_SUFFIX='.a'
19959                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19960                 ;;
19961         debug) #(vi
19962                 CXX_LIB_SUFFIX='_g.a'
19963                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19964                 ;;
19965         profile) #(vi
19966                 CXX_LIB_SUFFIX='_p.a'
19967                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19968                 ;;
19969         shared) #(vi
19970                 case $cf_cv_system_name in
19971                 aix[5-7]*) #(vi
19972                         CXX_LIB_SUFFIX='.a'
19973                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19974                         ;;
19975                 cygwin*|mingw*) #(vi
19976                         CXX_LIB_SUFFIX='.dll'
19977                         CXX_DEP_SUFFIX='.dll.a'
19978                         ;;
19979                 darwin*) #(vi
19980                         CXX_LIB_SUFFIX='.dylib'
19981                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19982                         ;;
19983                 hpux*) #(vi
19984                         case $target in
19985                         ia64*) #(vi
19986                                 CXX_LIB_SUFFIX='.so'
19987                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19988                                 ;;
19989                         *) #(vi
19990                                 CXX_LIB_SUFFIX='.sl'
19991                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19992                                 ;;
19993                         esac
19994                         ;;
19995                 *)      CXX_LIB_SUFFIX='.so'
19996                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19997                         ;;
19998                 esac
19999         esac
20000         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20001         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20002
20003 fi
20004 echo "$as_me:20004: result: $CXX_LIB_SUFFIX" >&5
20005 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20006
20007 fi
20008
20009 # do not want -ldl in build except as needed for -lncurses dependency
20010 if test "x$with_dlsym" = xyes ; then
20011 if test $DFT_LWR_MODEL = shared || \
20012    test $DFT_LWR_MODEL = libtool ; then
20013
20014 # remove dl library from $LIBS
20015 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20016
20017 fi
20018 fi
20019 ### Set up low-level terminfo dependencies for makefiles.
20020
20021 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20022 # do not need libdl
20023 TICS_LIST=
20024 if test "x$with_dlsym" = xyes ; then
20025
20026 # remove dl library from $SHLIB_LIST
20027 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20028
20029 fi
20030
20031 if test "$with_ticlib" != no ; then
20032
20033         if test "x$with_ticlib" != xyes ; then
20034                 TICS_NAME=$with_ticlib
20035                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20036                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20037                 TICS_LIB_SUFFIX="${with_ticlib}"
20038         else
20039                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20040                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20041                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20042         fi
20043         TICS_LDFLAGS="-L${LIB_DIR}"
20044         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20045 else
20046         TICS_LDFLAGS="-L${LIB_DIR}"
20047         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20048 fi
20049
20050 if test "$with_termlib" != no ; then
20051
20052         if test "x$with_termlib" != xyes ; then
20053                 TINFO_NAME=$with_termlib
20054                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20055                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20056                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20057                 TINFO_LIB_SUFFIX="${with_termlib}"
20058         else
20059                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20060                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20061                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20062                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20063         fi
20064
20065         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20066         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20067         if test "$DFT_LWR_MODEL" = "libtool"; then
20068                 TEST_ARGS="${TEST_DEPS}"
20069                 TEST_ARG2="${TEST_DEP2}"
20070                 TINFO_LDFLAGS="-L${LIB_DIR}"
20071                 TINFO_LIBS="$TEST_ARGS"
20072                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20073                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20074         else
20075                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20076                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20077                 if test "x$with_term_driver" != xno ; then
20078                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20079                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20080                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20081                 else
20082                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20083                         TINFO_LIBS="$TEST_ARGS"
20084                 fi
20085                 TINFO_LDFLAGS="-L${LIB_DIR}"
20086                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20087         fi
20088 else
20089         # the next lines are needed for linking libtic over libncurses
20090         TINFO_NAME=${LIB_NAME}
20091         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20092         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20093         if test "x$with_tic_depends" = xyes ; then
20094                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20095         else
20096                 TICS_LIST="$SHLIB_LIST"
20097         fi
20098
20099         TINFO_LDFLAGS="-L${LIB_DIR}"
20100         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20101 fi
20102
20103 if test "$DFT_LWR_MODEL" = shared ; then
20104         case $cf_cv_system_name in #(vi
20105         cygwin*)
20106                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20107                 TINFO_SUFFIX=.dll
20108                 ;;
20109         esac
20110 fi
20111
20112 if test "x$with_dlsym" = xyes ; then
20113
20114 # remove dl library from $TICS_LIST
20115 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20116
20117 fi
20118
20119 if test "$DFT_LWR_MODEL" = "libtool"; then
20120     OBJEXT=lo
20121 fi
20122
20123 # needed for Ada95
20124 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20125
20126 case $DFT_LWR_MODEL in
20127 normal|debug|profile)
20128
20129 if test "$GCC" = yes ; then
20130         case $cf_cv_system_name in #(
20131         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20132                 LDFLAGS_STATIC=
20133                 LDFLAGS_SHARED=
20134                 ;;
20135     *)  #( normally, except when broken
20136         LDFLAGS_STATIC=-static
20137         LDFLAGS_SHARED=-dynamic
20138         ;;
20139     esac
20140 else
20141         case $cf_cv_system_name in #(
20142         aix[4-7]*)      #( from ld manpage
20143                 LDFLAGS_STATIC=-bstatic
20144                 LDFLAGS_SHARED=-bdynamic
20145                 ;;
20146         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20147                 # We could also use just "archive" and "shared".
20148                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20149                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20150                 ;;
20151         irix*)          #( from ld manpage IRIX64
20152                 LDFLAGS_STATIC=-Bstatic
20153                 LDFLAGS_SHARED=-Bdynamic
20154                 ;;
20155         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20156                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20157                 LDFLAGS_STATIC=-noso
20158                 LDFLAGS_SHARED=-so_archive
20159                 ;;
20160         solaris2*)
20161                 LDFLAGS_STATIC=-Bstatic
20162                 LDFLAGS_SHARED=-Bdynamic
20163                 ;;
20164         esac
20165 fi
20166
20167 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20168 then
20169         echo "$as_me:20169: checking if linker supports switching between static/dynamic" >&5
20170 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20171
20172         rm -f libconftest.a
20173         cat >conftest.$ac_ext <<EOF
20174 #line 20174 "configure"
20175 #include <stdio.h>
20176 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20177 EOF
20178         if { (eval echo "$as_me:20178: \"$ac_compile\"") >&5
20179   (eval $ac_compile) 2>&5
20180   ac_status=$?
20181   echo "$as_me:20181: \$? = $ac_status" >&5
20182   (exit $ac_status); } ; then
20183                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20184                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20185         fi
20186         rm -f conftest.*
20187
20188         cf_save_LIBS="$LIBS"
20189
20190         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20191         cat >conftest.$ac_ext <<_ACEOF
20192 #line 20192 "configure"
20193 #include "confdefs.h"
20194
20195 #line 20195 "configure"
20196 #include <stdio.h>
20197 int cf_ldflags_static(FILE *fp);
20198
20199 int
20200 main ()
20201 {
20202
20203         return cf_ldflags_static(stdin);
20204
20205   ;
20206   return 0;
20207 }
20208 _ACEOF
20209 rm -f conftest.$ac_objext conftest$ac_exeext
20210 if { (eval echo "$as_me:20210: \"$ac_link\"") >&5
20211   (eval $ac_link) 2>&5
20212   ac_status=$?
20213   echo "$as_me:20213: \$? = $ac_status" >&5
20214   (exit $ac_status); } &&
20215          { ac_try='test -s conftest$ac_exeext'
20216   { (eval echo "$as_me:20216: \"$ac_try\"") >&5
20217   (eval $ac_try) 2>&5
20218   ac_status=$?
20219   echo "$as_me:20219: \$? = $ac_status" >&5
20220   (exit $ac_status); }; }; then
20221
20222         # some linkers simply ignore the -dynamic
20223         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20224         *static*) # (vi
20225                 cf_ldflags_static=no
20226                 ;;
20227         *)
20228                 cf_ldflags_static=yes
20229                 ;;
20230         esac
20231
20232 else
20233   echo "$as_me: failed program was:" >&5
20234 cat conftest.$ac_ext >&5
20235 cf_ldflags_static=no
20236 fi
20237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20238
20239         rm -f libconftest.*
20240         LIBS="$cf_save_LIBS"
20241
20242         echo "$as_me:20242: result: $cf_ldflags_static" >&5
20243 echo "${ECHO_T}$cf_ldflags_static" >&6
20244
20245         if test $cf_ldflags_static != yes
20246         then
20247                 LDFLAGS_STATIC=
20248                 LDFLAGS_SHARED=
20249         fi
20250 else
20251         LDFLAGS_STATIC=
20252         LDFLAGS_SHARED=
20253 fi
20254
20255         ;;
20256 esac
20257
20258 echo "$as_me:20258: checking where we will install curses.h" >&5
20259 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20260 test "$with_overwrite" = no && \
20261 test "x$includedir" = 'x${prefix}/include' && \
20262         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20263 echo "$as_me:20263: result: $includedir" >&5
20264 echo "${ECHO_T}$includedir" >&6
20265
20266 ### Resolve a conflict between normal and wide-curses by forcing applications
20267 ### that will need libutf8 to add it to their configure script.
20268 if test "$with_overwrite" != no ; then
20269 if test "$NCURSES_LIBUTF8" = 1 ; then
20270         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20271         { echo "$as_me:20271: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20272 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20273 fi
20274 fi
20275 WITH_OVERWRITE=$with_overwrite
20276
20277 # used to separate tack out of the tree
20278 NCURSES_TREE=
20279
20280 ### predefined stuff for the test programs
20281
20282 cat >>confdefs.h <<\EOF
20283 #define HAVE_SLK_COLOR 1
20284 EOF
20285
20286 ### Construct the list of subdirectories for which we'll customize makefiles
20287 ### with the appropriate compile-rules.
20288
20289 echo "$as_me:20289: checking for src modules" >&5
20290 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20291
20292 # dependencies and linker-arguments for test-programs
20293 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20294 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20295 if test "$DFT_LWR_MODEL" = "libtool"; then
20296         TEST_ARGS="${TEST_DEPS}"
20297         TEST_ARG2="${TEST_DEP2}"
20298 else
20299         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20300         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20301 fi
20302
20303 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20304 cf_cv_src_modules=
20305 for cf_dir in $modules_to_build
20306 do
20307         if test -f $srcdir/$cf_dir/modules; then
20308
20309                 # We may/may not have tack in the distribution, though the
20310                 # makefile is.
20311                 if test $cf_dir = tack ; then
20312                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20313                                 continue
20314                         fi
20315                 fi
20316
20317                 if test -z "$cf_cv_src_modules"; then
20318                         cf_cv_src_modules=$cf_dir
20319                 else
20320                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20321                 fi
20322
20323                 # Make the ncurses_cfg.h file record the library interface files as
20324                 # well.  These are header files that are the same name as their
20325                 # directory.  Ncurses is the only library that does not follow
20326                 # that pattern.
20327                 if test $cf_dir = tack ; then
20328                         continue
20329                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20330
20331 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20332
20333                         cat >>confdefs.h <<EOF
20334 #define HAVE_${cf_have_include}_H 1
20335 EOF
20336
20337                         cat >>confdefs.h <<EOF
20338 #define HAVE_LIB${cf_have_include} 1
20339 EOF
20340
20341                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20342                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20343                         if test "$DFT_LWR_MODEL" = "libtool"; then
20344                                 TEST_ARGS="${TEST_DEPS}"
20345                                 TEST_ARG2="${TEST_DEP2}"
20346                         else
20347                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20348                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20349                         fi
20350                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20351                 fi
20352         fi
20353 done
20354 echo "$as_me:20354: result: $cf_cv_src_modules" >&5
20355 echo "${ECHO_T}$cf_cv_src_modules" >&6
20356
20357 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20358 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20359
20360 SRC_SUBDIRS=
20361 if test "x$cf_with_manpages" != xno ; then
20362         SRC_SUBDIRS="$SRC_SUBDIRS man"
20363 fi
20364 SRC_SUBDIRS="$SRC_SUBDIRS include"
20365 for cf_dir in $cf_cv_src_modules
20366 do
20367         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20368 done
20369 if test "x$cf_with_tests" != "xno" ; then
20370         SRC_SUBDIRS="$SRC_SUBDIRS test"
20371 fi
20372 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20373 if test "$cf_with_cxx_binding" != no; then
20374         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20375         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20376 fi
20377
20378 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20379 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20380
20381 ADA_SUBDIRS=
20382 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20383         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20384         ADA_SUBDIRS="gen src"
20385         if test "x$cf_with_tests" != "xno" ; then
20386                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20387         fi
20388 fi
20389
20390 SUB_MAKEFILES=
20391 for cf_dir in $SRC_SUBDIRS
20392 do
20393         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20394 done
20395
20396 if test -n "$ADA_SUBDIRS"; then
20397         for cf_dir in $ADA_SUBDIRS
20398         do
20399                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20400         done
20401
20402 fi
20403
20404 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20405    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20406    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20407 fi
20408
20409 DIRS_TO_MAKE="lib"
20410 for cf_item in $cf_list_models
20411 do
20412
20413         case $cf_item in
20414         libtool) cf_subdir='obj_lo'  ;;
20415         normal)  cf_subdir='objects' ;;
20416         debug)   cf_subdir='obj_g' ;;
20417         profile) cf_subdir='obj_p' ;;
20418         shared)
20419                 case $cf_cv_system_name in #(vi
20420                 cygwin) #(vi
20421                         cf_subdir='objects' ;;
20422                 *)
20423                         cf_subdir='obj_s' ;;
20424                 esac
20425         esac
20426
20427         for cf_item2 in $DIRS_TO_MAKE
20428         do
20429                 test $cf_item2 = $cf_subdir && break
20430         done
20431         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20432 done
20433 for cf_dir in $DIRS_TO_MAKE
20434 do
20435         test ! -d $cf_dir && mkdir $cf_dir
20436 done
20437
20438 # symbols that differ when compiling Ada95 by itself.
20439 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20440
20441 # values to use as strings
20442
20443 cat >>confdefs.h <<EOF
20444 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20445 EOF
20446
20447 cat >>confdefs.h <<EOF
20448 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20449 EOF
20450
20451 ### Now that we're done running tests, add the compiler-warnings, if any
20452
20453 cf_fix_cppflags=no
20454 cf_new_cflags=
20455 cf_new_cppflags=
20456 cf_new_extra_cppflags=
20457
20458 for cf_add_cflags in $EXTRA_CFLAGS
20459 do
20460 case $cf_fix_cppflags in
20461 no)
20462         case $cf_add_cflags in #(vi
20463         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20464                 case $cf_add_cflags in
20465                 -D*)
20466                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20467
20468                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20469                                 && test -z "${cf_tst_cflags}" \
20470                                 && cf_fix_cppflags=yes
20471
20472                         if test $cf_fix_cppflags = yes ; then
20473                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20474                                 continue
20475                         elif test "${cf_tst_cflags}" = "\"'" ; then
20476                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20477                                 continue
20478                         fi
20479                         ;;
20480                 esac
20481                 case "$CPPFLAGS" in
20482                 *$cf_add_cflags) #(vi
20483                         ;;
20484                 *) #(vi
20485                         case $cf_add_cflags in #(vi
20486                         -D*)
20487                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20488
20489 CPPFLAGS=`echo "$CPPFLAGS" | \
20490         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20491                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20492
20493                                 ;;
20494                         esac
20495                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20496                         ;;
20497                 esac
20498                 ;;
20499         *)
20500                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20501                 ;;
20502         esac
20503         ;;
20504 yes)
20505         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20506
20507         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20508
20509         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20510                 && test -z "${cf_tst_cflags}" \
20511                 && cf_fix_cppflags=no
20512         ;;
20513 esac
20514 done
20515
20516 if test -n "$cf_new_cflags" ; then
20517
20518         CFLAGS="$CFLAGS $cf_new_cflags"
20519 fi
20520
20521 if test -n "$cf_new_cppflags" ; then
20522
20523         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20524 fi
20525
20526 if test -n "$cf_new_extra_cppflags" ; then
20527
20528         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20529 fi
20530
20531 ### Define substitutions for header files to avoid name-pollution
20532
20533 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20534         HAVE_TCGETATTR=1
20535 else
20536         HAVE_TCGETATTR=0
20537 fi
20538
20539 if test "x$ac_cv_header_termio_h" = xyes ; then
20540         HAVE_TERMIO_H=1
20541 else
20542         HAVE_TERMIO_H=0
20543 fi
20544
20545 if test "x$ac_cv_header_termios_h" = xyes ; then
20546         HAVE_TERMIOS_H=1
20547 else
20548         HAVE_TERMIOS_H=0
20549 fi
20550
20551 ################################################################################
20552 test "x$use_database" = xyes && \
20553 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20554
20555 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20556 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20557
20558 if test "x$enable_pc_files" = xyes ; then \
20559 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20560 MAKE_PC_FILES=
20561 else
20562 MAKE_PC_FILES="#"
20563 fi
20564
20565 # Extract the first word of "tic", so it can be a program name with args.
20566 set dummy tic; ac_word=$2
20567 echo "$as_me:20567: checking for $ac_word" >&5
20568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20569 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20570   echo $ECHO_N "(cached) $ECHO_C" >&6
20571 else
20572   case $TIC_PATH in
20573   [\\/]* | ?:[\\/]*)
20574   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20575   ;;
20576   *)
20577   ac_save_IFS=$IFS; IFS=$ac_path_separator
20578 ac_dummy="$PATH:/usr/local/ncurses/bin"
20579 for ac_dir in $ac_dummy; do
20580   IFS=$ac_save_IFS
20581   test -z "$ac_dir" && ac_dir=.
20582   if $as_executable_p "$ac_dir/$ac_word"; then
20583    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20584    echo "$as_me:20584: found $ac_dir/$ac_word" >&5
20585    break
20586 fi
20587 done
20588
20589   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20590   ;;
20591 esac
20592 fi
20593 TIC_PATH=$ac_cv_path_TIC_PATH
20594
20595 if test -n "$TIC_PATH"; then
20596   echo "$as_me:20596: result: $TIC_PATH" >&5
20597 echo "${ECHO_T}$TIC_PATH" >&6
20598 else
20599   echo "$as_me:20599: result: no" >&5
20600 echo "${ECHO_T}no" >&6
20601 fi
20602
20603 if test -n "$FALLBACK_LIST"
20604 then
20605         if test "$TIC_PATH" = unknown
20606         then
20607                 { echo "$as_me:20607: WARNING: no tic program found for fallbacks" >&5
20608 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20609         fi
20610 fi
20611
20612 if test "x$cf_with_tests" != xno ; then
20613         MAKE_TESTS=
20614 else
20615         MAKE_TESTS="#"
20616 fi
20617
20618 ADAHTML_DIR=../../doc/html/ada
20619
20620 # these could be configurable, but are not currently
20621 PANEL_NAME=panel
20622 MENU_NAME=menu
20623 FORM_NAME=form
20624 CXX_NAME=ncurses++
20625
20626 SUB_SCRIPTS=
20627
20628 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"
20629 ac_config_commands="$ac_config_commands default"
20630 cat >confcache <<\_ACEOF
20631 # This file is a shell script that caches the results of configure
20632 # tests run on this system so they can be shared between configure
20633 # scripts and configure runs, see configure's option --config-cache.
20634 # It is not useful on other systems.  If it contains results you don't
20635 # want to keep, you may remove or edit it.
20636 #
20637 # config.status only pays attention to the cache file if you give it
20638 # the --recheck option to rerun configure.
20639 #
20640 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20641 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20642 # following values.
20643
20644 _ACEOF
20645
20646 # The following way of writing the cache mishandles newlines in values,
20647 # but we know of no workaround that is simple, portable, and efficient.
20648 # So, don't put newlines in cache variables' values.
20649 # Ultrix sh set writes to stderr and can't be redirected directly,
20650 # and sets the high bit in the cache file unless we assign to the vars.
20651 {
20652   (set) 2>&1 |
20653     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20654     *ac_space=\ *)
20655       # `set' does not quote correctly, so add quotes (double-quote
20656       # substitution turns \\\\ into \\, and sed turns \\ into \).
20657       sed -n \
20658         "s/'/'\\\\''/g;
20659           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20660       ;;
20661     *)
20662       # `set' quotes correctly as required by POSIX, so do not add quotes.
20663       sed -n \
20664         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20665       ;;
20666     esac;
20667 } |
20668   sed '
20669      t clear
20670      : clear
20671      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20672      t end
20673      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20674      : end' >>confcache
20675 if cmp -s $cache_file confcache; then :; else
20676   if test -w $cache_file; then
20677     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20678     cat confcache >$cache_file
20679   else
20680     echo "not updating unwritable cache $cache_file"
20681   fi
20682 fi
20683 rm -f confcache
20684
20685 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20686 # Let make expand exec_prefix.
20687 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20688
20689 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20690 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20691 # trailing colons and then remove the whole line if VPATH becomes empty
20692 # (actually we leave an empty line to preserve line numbers).
20693 if test "x$srcdir" = x.; then
20694   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20695 s/:*\$(srcdir):*/:/;
20696 s/:*\${srcdir}:*/:/;
20697 s/:*@srcdir@:*/:/;
20698 s/^\([^=]*=[    ]*\):*/\1/;
20699 s/:*$//;
20700 s/^[^=]*=[      ]*$//;
20701 }'
20702 fi
20703
20704 DEFS=-DHAVE_CONFIG_H
20705
20706 : ${CONFIG_STATUS=./config.status}
20707 ac_clean_files_save=$ac_clean_files
20708 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20709 { echo "$as_me:20709: creating $CONFIG_STATUS" >&5
20710 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20711 cat >$CONFIG_STATUS <<_ACEOF
20712 #! $SHELL
20713 # Generated automatically by configure.
20714 # Run this file to recreate the current configuration.
20715 # Compiler output produced by configure, useful for debugging
20716 # configure, is in config.log if it exists.
20717
20718 debug=false
20719 SHELL=\${CONFIG_SHELL-$SHELL}
20720 ac_cs_invocation="\$0 \$@"
20721
20722 _ACEOF
20723
20724 cat >>$CONFIG_STATUS <<\_ACEOF
20725 # Be Bourne compatible
20726 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20727   emulate sh
20728   NULLCMD=:
20729 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20730   set -o posix
20731 fi
20732
20733 # Name of the executable.
20734 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20735
20736 if expr a : '\(a\)' >/dev/null 2>&1; then
20737   as_expr=expr
20738 else
20739   as_expr=false
20740 fi
20741
20742 rm -f conf$$ conf$$.exe conf$$.file
20743 echo >conf$$.file
20744 if ln -s conf$$.file conf$$ 2>/dev/null; then
20745   # We could just check for DJGPP; but this test a) works b) is more generic
20746   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20747   if test -f conf$$.exe; then
20748     # Don't use ln at all; we don't have any links
20749     as_ln_s='cp -p'
20750   else
20751     as_ln_s='ln -s'
20752   fi
20753 elif ln conf$$.file conf$$ 2>/dev/null; then
20754   as_ln_s=ln
20755 else
20756   as_ln_s='cp -p'
20757 fi
20758 rm -f conf$$ conf$$.exe conf$$.file
20759
20760 as_executable_p="test -f"
20761
20762 # Support unset when possible.
20763 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20764   as_unset=unset
20765 else
20766   as_unset=false
20767 fi
20768
20769 # NLS nuisances.
20770 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20771 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20772 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20773 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20774 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20775 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20776 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20777 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20778
20779 # IFS
20780 # We need space, tab and new line, in precisely that order.
20781 as_nl='
20782 '
20783 IFS="   $as_nl"
20784
20785 # CDPATH.
20786 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20787
20788 exec 6>&1
20789
20790 _ACEOF
20791
20792 # Files that config.status was made for.
20793 if test -n "$ac_config_files"; then
20794   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20795 fi
20796
20797 if test -n "$ac_config_headers"; then
20798   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20799 fi
20800
20801 if test -n "$ac_config_links"; then
20802   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20803 fi
20804
20805 if test -n "$ac_config_commands"; then
20806   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20807 fi
20808
20809 cat >>$CONFIG_STATUS <<\EOF
20810
20811 ac_cs_usage="\
20812 \`$as_me' instantiates files from templates according to the
20813 current configuration.
20814
20815 Usage: $0 [OPTIONS] [FILE]...
20816
20817   -h, --help       print this help, then exit
20818   -V, --version    print version number, then exit
20819   -d, --debug      don't remove temporary files
20820       --recheck    update $as_me by reconfiguring in the same conditions
20821   --file=FILE[:TEMPLATE]
20822                    instantiate the configuration file FILE
20823   --header=FILE[:TEMPLATE]
20824                    instantiate the configuration header FILE
20825
20826 Configuration files:
20827 $config_files
20828
20829 Configuration headers:
20830 $config_headers
20831
20832 Configuration commands:
20833 $config_commands
20834
20835 Report bugs to <dickey@invisible-island.net>."
20836 EOF
20837
20838 cat >>$CONFIG_STATUS <<EOF
20839 ac_cs_version="\\
20840 config.status
20841 configured by $0, generated by GNU Autoconf 2.52.20121002,
20842   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20843
20844 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20845 Free Software Foundation, Inc.
20846 This config.status script is free software; the Free Software Foundation
20847 gives unlimited permission to copy, distribute and modify it."
20848 srcdir=$srcdir
20849 INSTALL="$INSTALL"
20850 EOF
20851
20852 cat >>$CONFIG_STATUS <<\EOF
20853 # If no file are specified by the user, then we need to provide default
20854 # value.  By we need to know if files were specified by the user.
20855 ac_need_defaults=:
20856 while test $# != 0
20857 do
20858   case $1 in
20859   --*=*)
20860     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20861     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20862     shift
20863     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20864     shift
20865     ;;
20866   -*);;
20867   *) # This is not an option, so the user has probably given explicit
20868      # arguments.
20869      ac_need_defaults=false;;
20870   esac
20871
20872   case $1 in
20873   # Handling of the options.
20874 EOF
20875 cat >>$CONFIG_STATUS <<EOF
20876   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20877     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20878     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20879 EOF
20880 cat >>$CONFIG_STATUS <<\EOF
20881   --version | --vers* | -V )
20882     echo "$ac_cs_version"; exit 0 ;;
20883   --he | --h)
20884     # Conflict between --help and --header
20885     { { echo "$as_me:20885: error: ambiguous option: $1
20886 Try \`$0 --help' for more information." >&5
20887 echo "$as_me: error: ambiguous option: $1
20888 Try \`$0 --help' for more information." >&2;}
20889    { (exit 1); exit 1; }; };;
20890   --help | --hel | -h )
20891     echo "$ac_cs_usage"; exit 0 ;;
20892   --debug | --d* | -d )
20893     debug=: ;;
20894   --file | --fil | --fi | --f )
20895     shift
20896     CONFIG_FILES="$CONFIG_FILES $1"
20897     ac_need_defaults=false;;
20898   --header | --heade | --head | --hea )
20899     shift
20900     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20901     ac_need_defaults=false;;
20902
20903   # This is an error.
20904   -*) { { echo "$as_me:20904: error: unrecognized option: $1
20905 Try \`$0 --help' for more information." >&5
20906 echo "$as_me: error: unrecognized option: $1
20907 Try \`$0 --help' for more information." >&2;}
20908    { (exit 1); exit 1; }; } ;;
20909
20910   *) ac_config_targets="$ac_config_targets $1" ;;
20911
20912   esac
20913   shift
20914 done
20915
20916 exec 5>>config.log
20917 cat >&5 << _ACEOF
20918
20919 ## ----------------------- ##
20920 ## Running config.status.  ##
20921 ## ----------------------- ##
20922
20923 This file was extended by $as_me 2.52.20121002, executed with
20924   CONFIG_FILES    = $CONFIG_FILES
20925   CONFIG_HEADERS  = $CONFIG_HEADERS
20926   CONFIG_LINKS    = $CONFIG_LINKS
20927   CONFIG_COMMANDS = $CONFIG_COMMANDS
20928   > $ac_cs_invocation
20929 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20930
20931 _ACEOF
20932 EOF
20933
20934 cat >>$CONFIG_STATUS <<EOF
20935 #
20936 # INIT-COMMANDS section.
20937 #
20938
20939 ### Special initialization commands, used to pass information from the
20940 ### configuration-run into config.status
20941
20942 AWK="$AWK"
20943 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20944 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20945 ECHO_LD="$ECHO_LD"
20946 LDCONFIG="$LDCONFIG"
20947 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20948 LIB_NAME="$LIB_NAME"
20949 LIB_PREFIX="$LIB_PREFIX"
20950 LIB_SUBSETS="$LIB_SUBSETS"
20951 LIB_SUFFIX="$LIB_SUFFIX"
20952 LIB_TRACING="$LIB_TRACING"
20953 LN_S="$LN_S"
20954 MAKE_TERMINFO="$MAKE_TERMINFO"
20955 NCURSES_MAJOR="$NCURSES_MAJOR"
20956 NCURSES_MINOR="$NCURSES_MINOR"
20957 NCURSES_OSPEED="$NCURSES_OSPEED"
20958 NCURSES_PATCH="$NCURSES_PATCH"
20959 SRC_SUBDIRS="$SRC_SUBDIRS"
20960 TERMINFO="$TERMINFO"
20961 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20962 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20963 TICS_NAME="$TICS_NAME"
20964 TIC_PATH="$TIC_PATH"
20965 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20966 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20967 TINFO_NAME="$TINFO_NAME"
20968 TINFO_SUFFIX="$TINFO_SUFFIX"
20969 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20970 WITH_CURSES_H="$with_curses_h"
20971 WITH_ECHO="${enable_echo:=yes}"
20972 WITH_OVERWRITE="$with_overwrite"
20973 cf_LIST_MODELS="$cf_list_models"
20974 cf_cv_abi_version="$cf_cv_abi_version"
20975 cf_cv_do_relink="$cf_cv_do_relink"
20976 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20977 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20978 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20979 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20980 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20981 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20982 cf_cv_rel_version="$cf_cv_rel_version"
20983 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20984 cf_cv_shared_soname='$cf_cv_shared_soname'
20985 cf_cv_shlib_version="$cf_cv_shlib_version"
20986 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20987 cf_cv_system_name="$cf_cv_system_name"
20988 cf_cv_term_driver="$with_term_driver"
20989 cf_with_ada="$cf_with_ada"
20990 cf_with_cxx_binding="$cf_with_cxx_binding"
20991 cf_with_manpages="$cf_with_manpages"
20992 cf_with_tests="$cf_with_tests"
20993 with_shared_cxx="$with_shared_cxx"
20994 host="$host"
20995 target="$target"
20996
20997 EOF
20998
20999 cat >>$CONFIG_STATUS <<\EOF
21000 for ac_config_target in $ac_config_targets
21001 do
21002   case "$ac_config_target" in
21003   # Handling of arguments.
21004   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21005   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21006   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21007   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21008   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21009   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21010   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21011   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21012   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21013   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21014   *) { { echo "$as_me:21014: error: invalid argument: $ac_config_target" >&5
21015 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21016    { (exit 1); exit 1; }; };;
21017   esac
21018 done
21019
21020 # If the user did not use the arguments to specify the items to instantiate,
21021 # then the envvar interface is used.  Set only those that are not.
21022 # We use the long form for the default assignment because of an extremely
21023 # bizarre bug on SunOS 4.1.3.
21024 if $ac_need_defaults; then
21025   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21026   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21027   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21028 fi
21029
21030 # Create a temporary directory, and hook for its removal unless debugging.
21031 $debug ||
21032 {
21033   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21034   trap '{ (exit 1); exit 1; }' 1 2 13 15
21035 }
21036
21037 # Create a (secure) tmp directory for tmp files.
21038 : ${TMPDIR=/tmp}
21039 {
21040   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21041   test -n "$tmp" && test -d "$tmp"
21042 }  ||
21043 {
21044   tmp=$TMPDIR/cs$$-$RANDOM
21045   (umask 077 && mkdir $tmp)
21046 } ||
21047 {
21048    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21049    { (exit 1); exit 1; }
21050 }
21051
21052 EOF
21053
21054 cat >>$CONFIG_STATUS <<EOF
21055
21056 #
21057 # CONFIG_FILES section.
21058 #
21059
21060 # No need to generate the scripts if there are no CONFIG_FILES.
21061 # This happens for instance when ./config.status config.h
21062 if test -n "\$CONFIG_FILES"; then
21063   # Protect against being on the right side of a sed subst in config.status.
21064   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21065    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21066 s,@SHELL@,$SHELL,;t t
21067 s,@exec_prefix@,$exec_prefix,;t t
21068 s,@prefix@,$prefix,;t t
21069 s,@program_transform_name@,$program_transform_name,;t t
21070 s,@bindir@,$bindir,;t t
21071 s,@sbindir@,$sbindir,;t t
21072 s,@libexecdir@,$libexecdir,;t t
21073 s,@datarootdir@,$datarootdir,;t t
21074 s,@datadir@,$datadir,;t t
21075 s,@sysconfdir@,$sysconfdir,;t t
21076 s,@sharedstatedir@,$sharedstatedir,;t t
21077 s,@localstatedir@,$localstatedir,;t t
21078 s,@libdir@,$libdir,;t t
21079 s,@includedir@,$includedir,;t t
21080 s,@oldincludedir@,$oldincludedir,;t t
21081 s,@infodir@,$infodir,;t t
21082 s,@mandir@,$mandir,;t t
21083 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21084 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21085 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21086 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21087 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21088 s,@build_alias@,$build_alias,;t t
21089 s,@host_alias@,$host_alias,;t t
21090 s,@target_alias@,$target_alias,;t t
21091 s,@ECHO_C@,$ECHO_C,;t t
21092 s,@ECHO_N@,$ECHO_N,;t t
21093 s,@ECHO_T@,$ECHO_T,;t t
21094 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21095 s,@DEFS@,$DEFS,;t t
21096 s,@LIBS@,$LIBS,;t t
21097 s,@top_builddir@,$top_builddir,;t t
21098 s,@EGREP@,$EGREP,;t t
21099 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21100 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21101 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21102 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21103 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21104 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21105 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21106 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21107 s,@build@,$build,;t t
21108 s,@build_cpu@,$build_cpu,;t t
21109 s,@build_vendor@,$build_vendor,;t t
21110 s,@build_os@,$build_os,;t t
21111 s,@host@,$host,;t t
21112 s,@host_cpu@,$host_cpu,;t t
21113 s,@host_vendor@,$host_vendor,;t t
21114 s,@host_os@,$host_os,;t t
21115 s,@target@,$target,;t t
21116 s,@target_cpu@,$target_cpu,;t t
21117 s,@target_vendor@,$target_vendor,;t t
21118 s,@target_os@,$target_os,;t t
21119 s,@CC@,$CC,;t t
21120 s,@CFLAGS@,$CFLAGS,;t t
21121 s,@LDFLAGS@,$LDFLAGS,;t t
21122 s,@CPPFLAGS@,$CPPFLAGS,;t t
21123 s,@ac_ct_CC@,$ac_ct_CC,;t t
21124 s,@EXEEXT@,$EXEEXT,;t t
21125 s,@OBJEXT@,$OBJEXT,;t t
21126 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21127 s,@CPP@,$CPP,;t t
21128 s,@LDCONFIG@,$LDCONFIG,;t t
21129 s,@CXX@,$CXX,;t t
21130 s,@CXXFLAGS@,$CXXFLAGS,;t t
21131 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21132 s,@AWK@,$AWK,;t t
21133 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21134 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21135 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21136 s,@LINT@,$LINT,;t t
21137 s,@LINT_OPTS@,$LINT_OPTS,;t t
21138 s,@LN_S@,$LN_S,;t t
21139 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21140 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21141 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21142 s,@SET_MAKE@,$SET_MAKE,;t t
21143 s,@CTAGS@,$CTAGS,;t t
21144 s,@ETAGS@,$ETAGS,;t t
21145 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21146 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21147 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21148 s,@RANLIB@,$RANLIB,;t t
21149 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21150 s,@LD@,$LD,;t t
21151 s,@ac_ct_LD@,$ac_ct_LD,;t t
21152 s,@AR@,$AR,;t t
21153 s,@ac_ct_AR@,$ac_ct_AR,;t t
21154 s,@ARFLAGS@,$ARFLAGS,;t t
21155 s,@DESTDIR@,$DESTDIR,;t t
21156 s,@BUILD_CC@,$BUILD_CC,;t t
21157 s,@BUILD_CPP@,$BUILD_CPP,;t t
21158 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21159 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21160 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21161 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21162 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21163 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21164 s,@cf_list_models@,$cf_list_models,;t t
21165 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21166 s,@LIBTOOL@,$LIBTOOL,;t t
21167 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21168 s,@LT_UNDEF@,$LT_UNDEF,;t t
21169 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21170 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21171 s,@LIB_CREATE@,$LIB_CREATE,;t t
21172 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21173 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21174 s,@LIB_PREP@,$LIB_PREP,;t t
21175 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21176 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21177 s,@LIB_LINK@,$LIB_LINK,;t t
21178 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21179 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21180 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21181 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21182 s,@TICS_NAME@,$TICS_NAME,;t t
21183 s,@TINFO_NAME@,$TINFO_NAME,;t t
21184 s,@LIB_NAME@,$LIB_NAME,;t t
21185 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21186 s,@CC_G_OPT@,$CC_G_OPT,;t t
21187 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21188 s,@LD_MODEL@,$LD_MODEL,;t t
21189 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21190 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21191 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21192 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21193 s,@LINK_PROGS@,$LINK_PROGS,;t t
21194 s,@LINK_TESTS@,$LINK_TESTS,;t t
21195 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21196 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21197 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21198 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21199 s,@RPATH_LIST@,$RPATH_LIST,;t t
21200 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21201 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21202 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21203 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21204 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21205 s,@XTERM_KBS@,$XTERM_KBS,;t t
21206 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21207 s,@TERMINFO@,$TERMINFO,;t t
21208 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21209 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21210 s,@TERMPATH@,$TERMPATH,;t t
21211 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21212 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21213 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21214 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21215 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21216 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21217 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21218 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21219 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21220 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21221 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21222 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21223 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21224 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21225 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21226 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21227 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21228 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21229 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21230 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21231 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21232 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21233 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21234 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21235 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21236 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21237 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21238 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21239 s,@PTHREAD@,$PTHREAD,;t t
21240 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21241 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21242 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21243 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21244 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21245 s,@ECHO_LT@,$ECHO_LT,;t t
21246 s,@ECHO_LD@,$ECHO_LD,;t t
21247 s,@RULE_CC@,$RULE_CC,;t t
21248 s,@SHOW_CC@,$SHOW_CC,;t t
21249 s,@ECHO_CC@,$ECHO_CC,;t t
21250 s,@ECHO_LINK@,$ECHO_LINK,;t t
21251 s,@ADAFLAGS@,$ADAFLAGS,;t t
21252 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21253 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21254 s,@ADA_TRACE@,$ADA_TRACE,;t t
21255 s,@MATH_LIB@,$MATH_LIB,;t t
21256 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21257 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21258 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21259 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21260 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21261 s,@TEST_LIBS@,$TEST_LIBS,;t t
21262 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21263 s,@CXXCPP@,$CXXCPP,;t t
21264 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21265 s,@CXX_AR@,$CXX_AR,;t t
21266 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21267 s,@CXXLIBS@,$CXXLIBS,;t t
21268 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21269 s,@gnat_exists@,$gnat_exists,;t t
21270 s,@M4_exists@,$M4_exists,;t t
21271 s,@cf_ada_make@,$cf_ada_make,;t t
21272 s,@cf_compile_generics@,$cf_compile_generics,;t t
21273 s,@cf_generic_objects@,$cf_generic_objects,;t t
21274 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21275 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21276 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21277 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21278 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21279 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21280 s,@cf_ada_package@,$cf_ada_package,;t t
21281 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21282 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21283 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21284 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21285 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21286 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21287 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21288 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21289 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21290 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21291 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21292 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21293 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21294 s,@TICS_LIBS@,$TICS_LIBS,;t t
21295 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21296 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21297 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21298 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21299 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21300 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21301 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21302 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21303 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21304 s,@TICS_LIST@,$TICS_LIST,;t t
21305 s,@TINFO_LIST@,$TINFO_LIST,;t t
21306 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21307 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21308 s,@TEST_ARGS@,$TEST_ARGS,;t t
21309 s,@TEST_DEPS@,$TEST_DEPS,;t t
21310 s,@TEST_ARG2@,$TEST_ARG2,;t t
21311 s,@TEST_DEP2@,$TEST_DEP2,;t t
21312 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21313 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21314 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21315 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21316 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21317 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21318 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21319 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21320 s,@cross_compiling@,$cross_compiling,;t t
21321 s,@TIC_PATH@,$TIC_PATH,;t t
21322 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21323 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21324 s,@PANEL_NAME@,$PANEL_NAME,;t t
21325 s,@MENU_NAME@,$MENU_NAME,;t t
21326 s,@FORM_NAME@,$FORM_NAME,;t t
21327 s,@CXX_NAME@,$CXX_NAME,;t t
21328 CEOF
21329
21330 EOF
21331
21332   cat >>$CONFIG_STATUS <<\EOF
21333   # Split the substitutions into bite-sized pieces for seds with
21334   # small command number limits, like on Digital OSF/1 and HP-UX.
21335   ac_max_sed_lines=48
21336   ac_sed_frag=1 # Number of current file.
21337   ac_beg=1 # First line for current file.
21338   ac_end=$ac_max_sed_lines # Line after last line for current file.
21339   ac_more_lines=:
21340   ac_sed_cmds=
21341   while $ac_more_lines; do
21342     if test $ac_beg -gt 1; then
21343       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21344     else
21345       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21346     fi
21347     if test ! -s $tmp/subs.frag; then
21348       ac_more_lines=false
21349     else
21350       # The purpose of the label and of the branching condition is to
21351       # speed up the sed processing (if there are no `@' at all, there
21352       # is no need to browse any of the substitutions).
21353       # These are the two extra sed commands mentioned above.
21354       (echo ':t
21355   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21356       if test -z "$ac_sed_cmds"; then
21357         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21358       else
21359         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21360       fi
21361       ac_sed_frag=`expr $ac_sed_frag + 1`
21362       ac_beg=$ac_end
21363       ac_end=`expr $ac_end + $ac_max_sed_lines`
21364     fi
21365   done
21366   if test -z "$ac_sed_cmds"; then
21367     ac_sed_cmds=cat
21368   fi
21369 fi # test -n "$CONFIG_FILES"
21370
21371 EOF
21372 cat >>$CONFIG_STATUS <<\EOF
21373 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21374   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21375   case $ac_file in
21376   - | *:- | *:-:* ) # input from stdin
21377         cat >$tmp/stdin
21378         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21379         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21380   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21381         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21382   * )   ac_file_in=$ac_file.in ;;
21383   esac
21384
21385   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21386   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21387          X"$ac_file" : 'X\(//\)[^/]' \| \
21388          X"$ac_file" : 'X\(//\)$' \| \
21389          X"$ac_file" : 'X\(/\)' \| \
21390          .     : '\(.\)' 2>/dev/null ||
21391 echo X"$ac_file" |
21392     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21393           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21394           /^X\(\/\/\)$/{ s//\1/; q; }
21395           /^X\(\/\).*/{ s//\1/; q; }
21396           s/.*/./; q'`
21397   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21398     { case "$ac_dir" in
21399   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21400   *)                      as_incr_dir=.;;
21401 esac
21402 as_dummy="$ac_dir"
21403 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21404   case $as_mkdir_dir in
21405     # Skip DOS drivespec
21406     ?:) as_incr_dir=$as_mkdir_dir ;;
21407     *)
21408       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21409       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21410     ;;
21411   esac
21412 done; }
21413
21414     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21415     # A "../" for each directory in $ac_dir_suffix.
21416     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21417   else
21418     ac_dir_suffix= ac_dots=
21419   fi
21420
21421   case $srcdir in
21422   .)  ac_srcdir=.
21423       if test -z "$ac_dots"; then
21424          ac_top_srcdir=.
21425       else
21426          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21427       fi ;;
21428   [\\/]* | ?:[\\/]* )
21429       ac_srcdir=$srcdir$ac_dir_suffix;
21430       ac_top_srcdir=$srcdir ;;
21431   *) # Relative path.
21432     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21433     ac_top_srcdir=$ac_dots$srcdir ;;
21434   esac
21435
21436   case $INSTALL in
21437   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21438   *) ac_INSTALL=$ac_dots$INSTALL ;;
21439   esac
21440
21441   if test x"$ac_file" != x-; then
21442     { echo "$as_me:21442: creating $ac_file" >&5
21443 echo "$as_me: creating $ac_file" >&6;}
21444     rm -f "$ac_file"
21445   fi
21446   # Let's still pretend it is `configure' which instantiates (i.e., don't
21447   # use $as_me), people would be surprised to read:
21448   #    /* config.h.  Generated automatically by config.status.  */
21449   configure_input="Generated automatically from `echo $ac_file_in |
21450                                                  sed 's,.*/,,'` by configure."
21451
21452   # First look for the input files in the build tree, otherwise in the
21453   # src tree.
21454   ac_file_inputs=`IFS=:
21455     for f in $ac_file_in; do
21456       case $f in
21457       -) echo $tmp/stdin ;;
21458       [\\/$]*)
21459          # Absolute (can't be DOS-style, as IFS=:)
21460          test -f "$f" || { { echo "$as_me:21460: error: cannot find input file: $f" >&5
21461 echo "$as_me: error: cannot find input file: $f" >&2;}
21462    { (exit 1); exit 1; }; }
21463          echo $f;;
21464       *) # Relative
21465          if test -f "$f"; then
21466            # Build tree
21467            echo $f
21468          elif test -f "$srcdir/$f"; then
21469            # Source tree
21470            echo $srcdir/$f
21471          else
21472            # /dev/null tree
21473            { { echo "$as_me:21473: error: cannot find input file: $f" >&5
21474 echo "$as_me: error: cannot find input file: $f" >&2;}
21475    { (exit 1); exit 1; }; }
21476          fi;;
21477       esac
21478     done` || { (exit 1); exit 1; }
21479 EOF
21480 cat >>$CONFIG_STATUS <<\EOF
21481   ac_warn_datarootdir=no
21482   if test x"$ac_file" != x-; then
21483     for ac_item in $ac_file_inputs
21484     do
21485       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21486       if test -n "$ac_seen"; then
21487         ac_used=`grep '@datarootdir@' $ac_item`
21488         if test -z "$ac_used"; then
21489           { echo "$as_me:21489: WARNING: datarootdir was used implicitly but not set:
21490 $ac_seen" >&5
21491 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21492 $ac_seen" >&2;}
21493           ac_warn_datarootdir=yes
21494         fi
21495       fi
21496       ac_seen=`grep '${datarootdir}' $ac_item`
21497       if test -n "$ac_seen"; then
21498         { echo "$as_me:21498: WARNING: datarootdir was used explicitly but not set:
21499 $ac_seen" >&5
21500 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21501 $ac_seen" >&2;}
21502         ac_warn_datarootdir=yes
21503       fi
21504     done
21505   fi
21506
21507 if test "x$ac_warn_datarootdir" = xyes; then
21508   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21509 fi
21510
21511 EOF
21512 cat >>$CONFIG_STATUS <<EOF
21513   sed "$ac_vpsub
21514 $extrasub
21515 EOF
21516 cat >>$CONFIG_STATUS <<\EOF
21517 :t
21518 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21519 s,@configure_input@,$configure_input,;t t
21520 s,@srcdir@,$ac_srcdir,;t t
21521 s,@top_srcdir@,$ac_top_srcdir,;t t
21522 s,@INSTALL@,$ac_INSTALL,;t t
21523 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21524   rm -f $tmp/stdin
21525   if test x"$ac_file" != x-; then
21526     cp $tmp/out $ac_file
21527
21528     for ac_name in prefix exec_prefix datarootdir
21529     do
21530         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21531         if test -n "$ac_seen"; then
21532             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21533             if test -z "$ac_init"; then
21534               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21535               { echo "$as_me:21535: WARNING: Variable $ac_name is used but was not set:
21536 $ac_seen" >&5
21537 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21538 $ac_seen" >&2;}
21539             fi
21540         fi
21541     done
21542     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21543     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21544     if test -s $tmp/out; then
21545       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21546       { echo "$as_me:21546: WARNING: Some variables may not be substituted:
21547 $ac_seen" >&5
21548 echo "$as_me: WARNING: Some variables may not be substituted:
21549 $ac_seen" >&2;}
21550     fi
21551   else
21552     cat $tmp/out
21553   fi
21554   rm -f $tmp/out
21555
21556 done
21557 EOF
21558 cat >>$CONFIG_STATUS <<\EOF
21559
21560 #
21561 # CONFIG_HEADER section.
21562 #
21563
21564 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21565 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21566 #
21567 # ac_d sets the value in "#define NAME VALUE" lines.
21568 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21569 ac_dB='[        ].*$,\1#\2'
21570 ac_dC=' '
21571 ac_dD=',;t'
21572 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21573 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21574 ac_iB='\([      ]\),\1#\2define\3'
21575 ac_iC=' '
21576 ac_iD='\4,;t'
21577 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21578 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21579 ac_uB='$,\1#\2define\3'
21580 ac_uC=' '
21581 ac_uD=',;t'
21582
21583 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21584   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21585   case $ac_file in
21586   - | *:- | *:-:* ) # input from stdin
21587         cat >$tmp/stdin
21588         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21589         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21590   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21591         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21592   * )   ac_file_in=$ac_file.in ;;
21593   esac
21594
21595   test x"$ac_file" != x- && { echo "$as_me:21595: creating $ac_file" >&5
21596 echo "$as_me: creating $ac_file" >&6;}
21597
21598   # First look for the input files in the build tree, otherwise in the
21599   # src tree.
21600   ac_file_inputs=`IFS=:
21601     for f in $ac_file_in; do
21602       case $f in
21603       -) echo $tmp/stdin ;;
21604       [\\/$]*)
21605          # Absolute (can't be DOS-style, as IFS=:)
21606          test -f "$f" || { { echo "$as_me:21606: error: cannot find input file: $f" >&5
21607 echo "$as_me: error: cannot find input file: $f" >&2;}
21608    { (exit 1); exit 1; }; }
21609          echo $f;;
21610       *) # Relative
21611          if test -f "$f"; then
21612            # Build tree
21613            echo $f
21614          elif test -f "$srcdir/$f"; then
21615            # Source tree
21616            echo $srcdir/$f
21617          else
21618            # /dev/null tree
21619            { { echo "$as_me:21619: error: cannot find input file: $f" >&5
21620 echo "$as_me: error: cannot find input file: $f" >&2;}
21621    { (exit 1); exit 1; }; }
21622          fi;;
21623       esac
21624     done` || { (exit 1); exit 1; }
21625   # Remove the trailing spaces.
21626   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21627
21628 EOF
21629
21630 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21631 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21632 # be either 'cat' or 'sort'.
21633 cat confdefs.h | uniq >conftest.vals
21634
21635 # Break up conftest.vals because some shells have a limit on
21636 # the size of here documents, and old seds have small limits too.
21637
21638 rm -f conftest.tail
21639 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21640 while grep . conftest.vals >/dev/null
21641 do
21642   # Write chunks of a limited-size here document to conftest.frag.
21643   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21644   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21645   echo 'CEOF' >> $CONFIG_STATUS
21646   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21647   rm -f conftest.vals
21648   mv conftest.tail conftest.vals
21649 done
21650 rm -f conftest.vals
21651
21652 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21653 # marker @DEFS@.
21654 echo '  cat >> conftest.edit <<CEOF
21655 /@DEFS@/r conftest.frag
21656 /@DEFS@/d
21657 CEOF
21658 sed -f conftest.edit $tmp/in > $tmp/out
21659 rm -f $tmp/in
21660 mv $tmp/out $tmp/in
21661 rm -f conftest.edit conftest.frag
21662 ' >> $CONFIG_STATUS
21663
21664 cat >>$CONFIG_STATUS <<\EOF
21665   # Let's still pretend it is `configure' which instantiates (i.e., don't
21666   # use $as_me), people would be surprised to read:
21667   #    /* config.h.  Generated automatically by config.status.  */
21668   if test x"$ac_file" = x-; then
21669     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21670   else
21671     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21672   fi
21673   cat $tmp/in >>$tmp/config.h
21674   rm -f $tmp/in
21675   if test x"$ac_file" != x-; then
21676     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21677       { echo "$as_me:21677: $ac_file is unchanged" >&5
21678 echo "$as_me: $ac_file is unchanged" >&6;}
21679     else
21680       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21681          X"$ac_file" : 'X\(//\)[^/]' \| \
21682          X"$ac_file" : 'X\(//\)$' \| \
21683          X"$ac_file" : 'X\(/\)' \| \
21684          .     : '\(.\)' 2>/dev/null ||
21685 echo X"$ac_file" |
21686     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21687           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21688           /^X\(\/\/\)$/{ s//\1/; q; }
21689           /^X\(\/\).*/{ s//\1/; q; }
21690           s/.*/./; q'`
21691       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21692         { case "$ac_dir" in
21693   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21694   *)                      as_incr_dir=.;;
21695 esac
21696 as_dummy="$ac_dir"
21697 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21698   case $as_mkdir_dir in
21699     # Skip DOS drivespec
21700     ?:) as_incr_dir=$as_mkdir_dir ;;
21701     *)
21702       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21703       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21704     ;;
21705   esac
21706 done; }
21707
21708       fi
21709       rm -f $ac_file
21710       mv $tmp/config.h $ac_file
21711     fi
21712   else
21713     cat $tmp/config.h
21714     rm -f $tmp/config.h
21715   fi
21716 done
21717 EOF
21718 cat >>$CONFIG_STATUS <<\EOF
21719 #
21720 # CONFIG_COMMANDS section.
21721 #
21722 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21723   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21724   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21725
21726   case $ac_dest in
21727     default )
21728 if test "x$cf_with_tests" != xno ; then
21729
21730 for cf_dir in test
21731 do
21732         if test ! -d $srcdir/$cf_dir; then
21733                 continue
21734         elif test -f $srcdir/$cf_dir/programs; then
21735                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21736         fi
21737 done
21738
21739 fi
21740
21741 cf_prefix=$LIB_PREFIX
21742
21743 case $cf_cv_shlib_version in #(vi
21744 cygdll|mingw)
21745         TINFO_NAME=$TINFO_ARG_SUFFIX
21746         TINFO_SUFFIX=.dll
21747         ;;
21748 esac
21749
21750 if test -n "$TINFO_SUFFIX" ; then
21751         case $TINFO_SUFFIX in
21752         tw*)
21753                 TINFO_NAME="${TINFO_NAME}tw"
21754                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21755                 ;;
21756         t*)
21757                 TINFO_NAME="${TINFO_NAME}t"
21758                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21759                 ;;
21760         w*)
21761                 TINFO_NAME="${TINFO_NAME}w"
21762                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21763                 ;;
21764         esac
21765 fi
21766
21767 for cf_dir in $SRC_SUBDIRS
21768 do
21769         if test ! -d $srcdir/$cf_dir ; then
21770                 continue
21771         elif test -f $srcdir/$cf_dir/modules; then
21772
21773                 SHARED_LIB=
21774                 Libs_To_Make=
21775                 for cf_item in $cf_LIST_MODELS
21776                 do
21777
21778         case $cf_item in #(vi
21779         libtool) #(vi
21780                 cf_suffix='.la'
21781                 cf_depsuf=$cf_suffix
21782                 ;;
21783         normal) #(vi
21784                 cf_suffix='.a'
21785                 cf_depsuf=$cf_suffix
21786                 ;;
21787         debug) #(vi
21788                 cf_suffix='_g.a'
21789                 cf_depsuf=$cf_suffix
21790                 ;;
21791         profile) #(vi
21792                 cf_suffix='_p.a'
21793                 cf_depsuf=$cf_suffix
21794                 ;;
21795         shared) #(vi
21796                 case $cf_cv_system_name in
21797                 aix[5-7]*) #(vi
21798                         cf_suffix='.a'
21799                         cf_depsuf=$cf_suffix
21800                         ;;
21801                 cygwin*|mingw*) #(vi
21802                         cf_suffix='.dll'
21803                         cf_depsuf='.dll.a'
21804                         ;;
21805                 darwin*) #(vi
21806                         cf_suffix='.dylib'
21807                         cf_depsuf=$cf_suffix
21808                         ;;
21809                 hpux*) #(vi
21810                         case $target in
21811                         ia64*) #(vi
21812                                 cf_suffix='.so'
21813                                 cf_depsuf=$cf_suffix
21814                                 ;;
21815                         *) #(vi
21816                                 cf_suffix='.sl'
21817                                 cf_depsuf=$cf_suffix
21818                                 ;;
21819                         esac
21820                         ;;
21821                 *)      cf_suffix='.so'
21822                         cf_depsuf=$cf_suffix
21823                         ;;
21824                 esac
21825         esac
21826         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21827         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21828
21829                         cf_libname=$cf_dir
21830                         test "$cf_dir" = c++ && cf_libname=ncurses++
21831                         if test $cf_item = shared ; then
21832                                 if test -n "${LIB_SUFFIX}"
21833                                 then
21834                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
21835                                 else
21836                                         cf_shared_suffix="$cf_suffix"
21837                                 fi
21838                                 if test "$cf_cv_do_symlinks" = yes ; then
21839                                         cf_version_name=
21840
21841                                         case "$cf_cv_shlib_version" in #(vi
21842                                         rel) #(vi
21843                                                 cf_version_name=REL_VERSION
21844                                                 ;;
21845                                         abi)
21846                                                 cf_version_name=ABI_VERSION
21847                                                 ;;
21848                                         esac
21849
21850                                         if test -n "$cf_version_name"
21851                                         then
21852                                                 case "$cf_cv_system_name" in #(vi
21853                                                 darwin*)
21854                                                         # "w", etc?
21855                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
21856                                                         ;; #(vi
21857                                                 *)
21858                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
21859                                                         ;;
21860                                                 esac
21861                                         fi
21862                                         if test -n "${LIB_SUFFIX}"
21863                                         then
21864                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
21865                                         else
21866                                                 cf_shared_suffix="$cf_suffix"
21867                                         fi
21868                                 fi
21869                                 # cygwin needs import library, and has unique naming convention
21870                                 # use autodetected ${cf_prefix} for import lib and static lib, but
21871                                 # use 'cyg' prefix for shared lib.
21872                                 case $cf_cv_shlib_version in #(vi
21873                                 cygdll) #(vi
21874                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21875                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
21876                                         continue
21877                                         ;;
21878                                 mingw)
21879                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21880                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
21881                                         continue
21882                                         ;;
21883                                 esac
21884                         fi
21885                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
21886                 done
21887
21888                 if test $cf_dir = ncurses ; then
21889                         cf_subsets="$LIB_SUBSETS"
21890                         cf_r_parts="$cf_subsets"
21891                         cf_liblist="$Libs_To_Make"
21892
21893                         while test -n "$cf_r_parts"
21894                         do
21895                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21896                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21897                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21898                                         cf_item=
21899                                         case $cf_l_parts in #(vi
21900                                         *termlib*) #(vi
21901                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21902                                                 ;;
21903                                         *ticlib*)
21904                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21905                                                 ;;
21906                                         *)
21907                                                 break
21908                                                 ;;
21909                                         esac
21910                                         if test -n "$cf_item"; then
21911                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21912                                         fi
21913                                 else
21914                                         break
21915                                 fi
21916                         done
21917                 else
21918                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21919                 fi
21920
21921                 if test $cf_dir = c++; then
21922                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
21923                                 cf_list=
21924                                 for cf_item in $Libs_To_Make
21925                                 do
21926                                         case $cf_item in
21927                                         *.a)
21928                                                 ;;
21929                                         *)
21930                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
21931                                                 ;;
21932                                         esac
21933                                         for cf_test in $cf_list
21934                                         do
21935                                                 if test "$cf_test" = "$cf_item"
21936                                                 then
21937                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
21938                                                         cf_item=
21939                                                         break
21940                                                 fi
21941                                         done
21942                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
21943                                 done
21944                                 Libs_To_Make="$cf_list"
21945                         fi
21946                 fi
21947
21948                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21949                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21950                         $cf_dir/Makefile >$cf_dir/Makefile.out
21951                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21952
21953                 $AWK -f $srcdir/mk-0th.awk \
21954                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21955                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21956
21957                 for cf_subset in $cf_subsets
21958                 do
21959                         cf_subdirs=
21960                         for cf_item in $cf_LIST_MODELS
21961                         do
21962
21963                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21964
21965 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21966
21967                         CXX_MODEL=$cf_ITEM
21968                         if test "$CXX_MODEL" = SHARED; then
21969                                 case $cf_cv_shlib_version in #(vi
21970                                 cygdll|mingw) #(vi
21971                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
21972
21973 echo "${as_me:-configure}:21973: testing overriding CXX_MODEL to SHARED ..." 1>&5
21974
21975                                         with_shared_cxx=yes
21976                                         ;;
21977                                 *)
21978                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
21979                                         ;;
21980                                 esac
21981                         fi
21982
21983         case $cf_item in #(vi
21984         libtool) #(vi
21985                 cf_suffix='.la'
21986                 cf_depsuf=$cf_suffix
21987                 ;;
21988         normal) #(vi
21989                 cf_suffix='.a'
21990                 cf_depsuf=$cf_suffix
21991                 ;;
21992         debug) #(vi
21993                 cf_suffix='_g.a'
21994                 cf_depsuf=$cf_suffix
21995                 ;;
21996         profile) #(vi
21997                 cf_suffix='_p.a'
21998                 cf_depsuf=$cf_suffix
21999                 ;;
22000         shared) #(vi
22001                 case $cf_cv_system_name in
22002                 aix[5-7]*) #(vi
22003                         cf_suffix='.a'
22004                         cf_depsuf=$cf_suffix
22005                         ;;
22006                 cygwin*|mingw*) #(vi
22007                         cf_suffix='.dll'
22008                         cf_depsuf='.dll.a'
22009                         ;;
22010                 darwin*) #(vi
22011                         cf_suffix='.dylib'
22012                         cf_depsuf=$cf_suffix
22013                         ;;
22014                 hpux*) #(vi
22015                         case $target in
22016                         ia64*) #(vi
22017                                 cf_suffix='.so'
22018                                 cf_depsuf=$cf_suffix
22019                                 ;;
22020                         *) #(vi
22021                                 cf_suffix='.sl'
22022                                 cf_depsuf=$cf_suffix
22023                                 ;;
22024                         esac
22025                         ;;
22026                 *)      cf_suffix='.so'
22027                         cf_depsuf=$cf_suffix
22028                         ;;
22029                 esac
22030         esac
22031         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22032         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22033
22034         case $cf_item in
22035         libtool) cf_subdir='obj_lo'  ;;
22036         normal)  cf_subdir='objects' ;;
22037         debug)   cf_subdir='obj_g' ;;
22038         profile) cf_subdir='obj_p' ;;
22039         shared)
22040                 case $cf_cv_system_name in #(vi
22041                 cygwin) #(vi
22042                         cf_subdir='objects' ;;
22043                 *)
22044                         cf_subdir='obj_s' ;;
22045                 esac
22046         esac
22047
22048                         # Test for case where we build libtinfo with a different name.
22049                         cf_libname=$cf_dir
22050                         if test $cf_dir = ncurses ; then
22051                                 case $cf_subset in
22052                                 *base*)
22053                                         cf_libname=${cf_libname}$LIB_SUFFIX
22054                                         ;;
22055                                 *termlib*)
22056                                         cf_libname=$TINFO_LIB_SUFFIX
22057                                         ;;
22058                                 ticlib*)
22059                                         cf_libname=$TICS_LIB_SUFFIX
22060                                         ;;
22061                                 esac
22062                         elif test $cf_dir = c++ ; then
22063                                 cf_libname=ncurses++$LIB_SUFFIX
22064                         else
22065                                 cf_libname=${cf_libname}$LIB_SUFFIX
22066                         fi
22067                         if test -n "${DFT_ARG_SUFFIX}" ; then
22068                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22069                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22070                         fi
22071
22072                         # These dependencies really are for development, not
22073                         # builds, but they are useful in porting, too.
22074                         cf_depend="../include/ncurses_cfg.h"
22075                         if test "$srcdir" = "."; then
22076                                 cf_reldir="."
22077                         else
22078                                 cf_reldir="\${srcdir}"
22079                         fi
22080
22081                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22082                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22083                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22084                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22085                         fi
22086
22087                         cf_dir_suffix=
22088                         old_cf_suffix="$cf_suffix"
22089                         if test "$cf_cv_shlib_version_infix" = yes ; then
22090                         if test -n "$LIB_SUFFIX" ; then
22091                                 case $LIB_SUFFIX in
22092                                 tw*)
22093                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22094                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22095                                         cf_dir_suffix=tw
22096                                         ;;
22097                                 t*)
22098                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22099                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22100                                         cf_dir_suffix=t
22101                                         ;;
22102                                 w*)
22103                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22104                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22105                                         cf_dir_suffix=w
22106                                         ;;
22107                                 esac
22108                         fi
22109                         fi
22110
22111                         $AWK -f $srcdir/mk-1st.awk \
22112                                 name=${cf_libname}${cf_dir_suffix} \
22113                                 traces=$LIB_TRACING \
22114                                 MODEL=$cf_ITEM \
22115                                 CXX_MODEL=$CXX_MODEL \
22116                                 model=$cf_subdir \
22117                                 prefix=$cf_prefix \
22118                                 suffix=$cf_suffix \
22119                                 subset=$cf_subset \
22120                                 driver=$cf_cv_term_driver \
22121                                 SymLink="$LN_S" \
22122                                 TermlibRoot=$TINFO_NAME \
22123                                 TermlibSuffix=$TINFO_SUFFIX \
22124                                 ShlibVer=$cf_cv_shlib_version \
22125                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22126                                 ReLink=${cf_cv_do_relink:-no} \
22127                                 DoLinks=$cf_cv_do_symlinks \
22128                                 rmSoLocs=$cf_cv_rm_so_locs \
22129                                 ldconfig="$LDCONFIG" \
22130                                 overwrite=$WITH_OVERWRITE \
22131                                 depend="$cf_depend" \
22132                                 host="$host" \
22133                                 libtool_version="$LIBTOOL_VERSION" \
22134                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22135
22136                         cf_suffix="$old_cf_suffix"
22137
22138                         for cf_subdir2 in $cf_subdirs lib
22139                         do
22140                                 test $cf_subdir = $cf_subdir2 && break
22141                         done
22142                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22143                         $AWK -f $srcdir/mk-2nd.awk \
22144                                 name=$cf_dir \
22145                                 traces=$LIB_TRACING \
22146                                 MODEL=$cf_ITEM \
22147                                 model=$cf_subdir \
22148                                 subset=$cf_subset \
22149                                 srcdir=$srcdir \
22150                                 echo=$WITH_ECHO \
22151                                 crenames=$cf_cv_prog_CC_c_o \
22152                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22153                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22154                         cf_subdirs="$cf_subdirs $cf_subdir"
22155                         done
22156                 done
22157         fi
22158
22159         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22160 done
22161
22162 for cf_dir in $SRC_SUBDIRS
22163 do
22164         if test ! -d $srcdir/$cf_dir ; then
22165                 continue
22166         fi
22167
22168         if test -f $cf_dir/Makefile ; then
22169                 case "$cf_dir" in
22170                 Ada95) #(vi
22171                         echo 'libs \' >> Makefile
22172                         echo 'install.libs \' >> Makefile
22173                         echo 'uninstall.libs ::' >> Makefile
22174                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22175                         ;;
22176                 esac
22177         fi
22178
22179         if test -f $srcdir/$cf_dir/modules; then
22180                 echo >> Makefile
22181                 if test -f $srcdir/$cf_dir/headers; then
22182 cat >> Makefile <<CF_EOF
22183 install.includes \\
22184 uninstall.includes \\
22185 CF_EOF
22186                 fi
22187 if test "$cf_dir" != "c++" ; then
22188 echo 'lint \' >> Makefile
22189 fi
22190 cat >> Makefile <<CF_EOF
22191 libs \\
22192 lintlib \\
22193 install.libs \\
22194 uninstall.libs \\
22195 install.$cf_dir \\
22196 uninstall.$cf_dir ::
22197         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22198 CF_EOF
22199         elif test -f $srcdir/$cf_dir/headers; then
22200 cat >> Makefile <<CF_EOF
22201
22202 libs \\
22203 install.libs \\
22204 uninstall.libs \\
22205 install.includes \\
22206 uninstall.includes ::
22207         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22208 CF_EOF
22209 fi
22210 done
22211
22212 cat >> Makefile <<CF_EOF
22213
22214 install.libs uninstall.libs \\
22215 install.data uninstall.data ::
22216 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22217 CF_EOF
22218
22219 if test "x$cf_with_manpages" = xyes; then
22220 cat >> Makefile <<CF_EOF
22221
22222 install.man \\
22223 uninstall.man ::
22224         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22225 CF_EOF
22226 fi
22227
22228 cat >> Makefile <<CF_EOF
22229
22230 distclean ::
22231         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22232         rm -f headers.sh headers.sed mk_shared_lib.sh
22233         rm -f edit_man.* man_alias.*
22234         rm -rf \${DIRS_TO_MAKE}
22235 CF_EOF
22236
22237 # Special case: tack's manpage lives in its own directory.
22238 if test "x$cf_with_manpages" = xyes; then
22239 if test -d tack ; then
22240 if test -f $srcdir/$tack.h; then
22241 cat >> Makefile <<CF_EOF
22242
22243 install.man \\
22244 uninstall.man ::
22245         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22246 CF_EOF
22247 fi
22248 fi
22249 fi
22250
22251 rm -f headers.sed headers.sh
22252
22253 echo creating headers.sh
22254 cat >headers.sh <<CF_EOF
22255 #! /bin/sh
22256 # This shell script is generated by the 'configure' script.  It is invoked in a
22257 # subdirectory of the build tree.  It generates a sed-script in the parent
22258 # directory that is used to adjust includes for header files that reside in a
22259 # subdirectory of /usr/include, etc.
22260 PRG=""
22261 while test \$# != 3
22262 do
22263 PRG="\$PRG \$1"; shift
22264 done
22265 DST=\$1
22266 REF=\$2
22267 SRC=\$3
22268 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22269 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22270 echo installing \$SRC in \$DST
22271 CF_EOF
22272
22273 if test $WITH_CURSES_H = yes; then
22274         cat >>headers.sh <<CF_EOF
22275 case \$DST in
22276 /*/include/*)
22277         END=\`basename \$DST\`
22278         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22279         do
22280                 NAME=\`basename \$i\`
22281                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22282         done
22283         ;;
22284 *)
22285         echo "" >> \$TMPSED
22286         ;;
22287 esac
22288 CF_EOF
22289
22290 else
22291         cat >>headers.sh <<CF_EOF
22292 case \$DST in
22293 /*/include/*)
22294         END=\`basename \$DST\`
22295         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22296         do
22297                 NAME=\`basename \$i\`
22298                 if test "\$NAME" = "curses.h"
22299                 then
22300                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22301                         NAME=ncurses.h
22302                 fi
22303                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22304         done
22305         ;;
22306 *)
22307         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22308         ;;
22309 esac
22310 CF_EOF
22311 fi
22312 cat >>headers.sh <<CF_EOF
22313 rm -f \$TMPSRC
22314 sed -f \$TMPSED \$SRC > \$TMPSRC
22315 NAME=\`basename \$SRC\`
22316 CF_EOF
22317 if test $WITH_CURSES_H != yes; then
22318         cat >>headers.sh <<CF_EOF
22319 test "\$NAME" = "curses.h" && NAME=ncurses.h
22320 CF_EOF
22321 fi
22322 cat >>headers.sh <<CF_EOF
22323 # Just in case someone gzip'd manpages, remove the conflicting copy.
22324 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22325
22326 eval \$PRG \$TMPSRC \$DST/\$NAME
22327 rm -f \$TMPSRC \$TMPSED
22328 CF_EOF
22329
22330 chmod 0755 headers.sh
22331
22332 for cf_dir in $SRC_SUBDIRS
22333 do
22334         if test ! -d $srcdir/$cf_dir ; then
22335                 continue
22336         fi
22337
22338         if test -f $srcdir/$cf_dir/headers; then
22339                 $AWK -f $srcdir/mk-hdr.awk \
22340                         subset="$LIB_SUBSETS" \
22341                         compat="$WITH_CURSES_H" \
22342                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22343         fi
22344
22345         if test -f $srcdir/$cf_dir/modules; then
22346                 if test "$cf_dir" != "c++" ; then
22347                         cat >>$cf_dir/Makefile <<"CF_EOF"
22348 depend : ${AUTO_SRC}
22349         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22350
22351 # DO NOT DELETE THIS LINE -- make depend depends on it.
22352 CF_EOF
22353                 fi
22354         fi
22355 done
22356
22357 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22358 if test -z "$USE_OLD_MAKERULES" ; then
22359         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22360 fi
22361 fi
22362  ;;
22363   esac
22364 done
22365 EOF
22366
22367 cat >>$CONFIG_STATUS <<\EOF
22368
22369 { (exit 0); exit 0; }
22370 EOF
22371 chmod +x $CONFIG_STATUS
22372 ac_clean_files=$ac_clean_files_save
22373
22374 # configure is writing to config.log, and then calls config.status.
22375 # config.status does its own redirection, appending to config.log.
22376 # Unfortunately, on DOS this fails, as config.log is still kept open
22377 # by configure, so config.status won't be able to write to it; its
22378 # output is simply discarded.  So we exec the FD to /dev/null,
22379 # effectively closing config.log, so it can be properly (re)opened and
22380 # appended to by config.status.  When coming back to configure, we
22381 # need to make the FD available again.
22382 if test "$no_create" != yes; then
22383   ac_cs_success=:
22384   exec 5>/dev/null
22385   $SHELL $CONFIG_STATUS || ac_cs_success=false
22386   exec 5>>config.log
22387   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22388   # would make configure fail if this is the last instruction.
22389   $ac_cs_success || { (exit 1); exit 1; }
22390 fi
22391 ${MAKE:-make} preinstall