]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20130727
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.572 .
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}nm", so it can be a program name with args.
3942 set dummy ${ac_tool_prefix}nm; 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_NM+set}" = set; then
3946   echo $ECHO_N "(cached) $ECHO_C" >&6
3947 else
3948   if test -n "$NM"; then
3949   ac_cv_prog_NM="$NM" # 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_NM="${ac_tool_prefix}nm"
3958 echo "$as_me:3958: found $ac_dir/$ac_word" >&5
3959 break
3960 done
3961
3962 fi
3963 fi
3964 NM=$ac_cv_prog_NM
3965 if test -n "$NM"; then
3966   echo "$as_me:3966: result: $NM" >&5
3967 echo "${ECHO_T}$NM" >&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_NM"; then
3975   ac_ct_NM=$NM
3976   # Extract the first word of "nm", so it can be a program name with args.
3977 set dummy nm; 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_NM+set}" = set; then
3981   echo $ECHO_N "(cached) $ECHO_C" >&6
3982 else
3983   if test -n "$ac_ct_NM"; then
3984   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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_NM="nm"
3993 echo "$as_me:3993: found $ac_dir/$ac_word" >&5
3994 break
3995 done
3996
3997   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
3998 fi
3999 fi
4000 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4001 if test -n "$ac_ct_NM"; then
4002   echo "$as_me:4002: result: $ac_ct_NM" >&5
4003 echo "${ECHO_T}$ac_ct_NM" >&6
4004 else
4005   echo "$as_me:4005: result: no" >&5
4006 echo "${ECHO_T}no" >&6
4007 fi
4008
4009   NM=$ac_ct_NM
4010 else
4011   NM="$ac_cv_prog_NM"
4012 fi
4013
4014 if test -n "$ac_tool_prefix"; then
4015   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4016 set dummy ${ac_tool_prefix}ar; ac_word=$2
4017 echo "$as_me:4017: checking for $ac_word" >&5
4018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4019 if test "${ac_cv_prog_AR+set}" = set; then
4020   echo $ECHO_N "(cached) $ECHO_C" >&6
4021 else
4022   if test -n "$AR"; then
4023   ac_cv_prog_AR="$AR" # Let the user override the test.
4024 else
4025   ac_save_IFS=$IFS; IFS=$ac_path_separator
4026 ac_dummy="$PATH"
4027 for ac_dir in $ac_dummy; do
4028   IFS=$ac_save_IFS
4029   test -z "$ac_dir" && ac_dir=.
4030   $as_executable_p "$ac_dir/$ac_word" || continue
4031 ac_cv_prog_AR="${ac_tool_prefix}ar"
4032 echo "$as_me:4032: found $ac_dir/$ac_word" >&5
4033 break
4034 done
4035
4036 fi
4037 fi
4038 AR=$ac_cv_prog_AR
4039 if test -n "$AR"; then
4040   echo "$as_me:4040: result: $AR" >&5
4041 echo "${ECHO_T}$AR" >&6
4042 else
4043   echo "$as_me:4043: result: no" >&5
4044 echo "${ECHO_T}no" >&6
4045 fi
4046
4047 fi
4048 if test -z "$ac_cv_prog_AR"; then
4049   ac_ct_AR=$AR
4050   # Extract the first word of "ar", so it can be a program name with args.
4051 set dummy ar; ac_word=$2
4052 echo "$as_me:4052: checking for $ac_word" >&5
4053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4054 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4055   echo $ECHO_N "(cached) $ECHO_C" >&6
4056 else
4057   if test -n "$ac_ct_AR"; then
4058   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4059 else
4060   ac_save_IFS=$IFS; IFS=$ac_path_separator
4061 ac_dummy="$PATH"
4062 for ac_dir in $ac_dummy; do
4063   IFS=$ac_save_IFS
4064   test -z "$ac_dir" && ac_dir=.
4065   $as_executable_p "$ac_dir/$ac_word" || continue
4066 ac_cv_prog_ac_ct_AR="ar"
4067 echo "$as_me:4067: found $ac_dir/$ac_word" >&5
4068 break
4069 done
4070
4071   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4072 fi
4073 fi
4074 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4075 if test -n "$ac_ct_AR"; then
4076   echo "$as_me:4076: result: $ac_ct_AR" >&5
4077 echo "${ECHO_T}$ac_ct_AR" >&6
4078 else
4079   echo "$as_me:4079: result: no" >&5
4080 echo "${ECHO_T}no" >&6
4081 fi
4082
4083   AR=$ac_ct_AR
4084 else
4085   AR="$ac_cv_prog_AR"
4086 fi
4087
4088 echo "$as_me:4088: checking for options to update archives" >&5
4089 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4090 if test "${cf_cv_ar_flags+set}" = set; then
4091   echo $ECHO_N "(cached) $ECHO_C" >&6
4092 else
4093
4094         cf_cv_ar_flags=unknown
4095         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4096         do
4097
4098                 # check if $ARFLAGS already contains this choice
4099                 if test "x$ARFLAGS" != "x" ; then
4100                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4101                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4102                                 cf_cv_ar_flags=
4103                                 break
4104                         fi
4105                 fi
4106
4107                 rm -f conftest.$ac_cv_objext
4108                 rm -f conftest.a
4109
4110                 cat >conftest.$ac_ext <<EOF
4111 #line 4111 "configure"
4112 int     testdata[3] = { 123, 456, 789 };
4113 EOF
4114                 if { (eval echo "$as_me:4114: \"$ac_compile\"") >&5
4115   (eval $ac_compile) 2>&5
4116   ac_status=$?
4117   echo "$as_me:4117: \$? = $ac_status" >&5
4118   (exit $ac_status); } ; then
4119                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4120                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4121                         if test -f conftest.a ; then
4122                                 cf_cv_ar_flags=$cf_ar_flags
4123                                 break
4124                         fi
4125                 else
4126                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4127
4128 echo "${as_me:-configure}:4128: testing cannot compile test-program ..." 1>&5
4129
4130                         break
4131                 fi
4132         done
4133         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4134
4135 fi
4136 echo "$as_me:4136: result: $cf_cv_ar_flags" >&5
4137 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4138
4139 if test -n "$ARFLAGS" ; then
4140         if test -n "$cf_cv_ar_flags" ; then
4141                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4142         fi
4143 else
4144         ARFLAGS=$cf_cv_ar_flags
4145 fi
4146
4147 echo "$as_me:4147: checking if you have specified an install-prefix" >&5
4148 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4149
4150 # Check whether --with-install-prefix or --without-install-prefix was given.
4151 if test "${with_install_prefix+set}" = set; then
4152   withval="$with_install_prefix"
4153   case "x$withval" in #(vi
4154         xyes|xno) #(vi
4155                 ;;
4156         *)      DESTDIR="$withval"
4157                 ;;
4158         esac
4159 fi;
4160 echo "$as_me:4160: result: $DESTDIR" >&5
4161 echo "${ECHO_T}$DESTDIR" >&6
4162
4163 ###############################################################################
4164
4165 # If we're cross-compiling, allow the user to override the tools and their
4166 # options.  The configure script is oriented toward identifying the host
4167 # compiler, etc., but we need a build compiler to generate parts of the source.
4168
4169 if test "$cross_compiling" = yes ; then
4170
4171         # defaults that we might want to override
4172         : ${BUILD_CFLAGS:=''}
4173         : ${BUILD_CPPFLAGS:=''}
4174         : ${BUILD_LDFLAGS:=''}
4175         : ${BUILD_LIBS:=''}
4176         : ${BUILD_EXEEXT:='$x'}
4177         : ${BUILD_OBJEXT:='o'}
4178
4179 # Check whether --with-build-cc or --without-build-cc was given.
4180 if test "${with_build_cc+set}" = set; then
4181   withval="$with_build_cc"
4182   BUILD_CC="$withval"
4183 else
4184   for ac_prog in gcc cc cl
4185 do
4186   # Extract the first word of "$ac_prog", so it can be a program name with args.
4187 set dummy $ac_prog; ac_word=$2
4188 echo "$as_me:4188: checking for $ac_word" >&5
4189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4190 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4191   echo $ECHO_N "(cached) $ECHO_C" >&6
4192 else
4193   if test -n "$BUILD_CC"; then
4194   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4195 else
4196   ac_save_IFS=$IFS; IFS=$ac_path_separator
4197 ac_dummy="$PATH"
4198 for ac_dir in $ac_dummy; do
4199   IFS=$ac_save_IFS
4200   test -z "$ac_dir" && ac_dir=.
4201   $as_executable_p "$ac_dir/$ac_word" || continue
4202 ac_cv_prog_BUILD_CC="$ac_prog"
4203 echo "$as_me:4203: found $ac_dir/$ac_word" >&5
4204 break
4205 done
4206
4207 fi
4208 fi
4209 BUILD_CC=$ac_cv_prog_BUILD_CC
4210 if test -n "$BUILD_CC"; then
4211   echo "$as_me:4211: result: $BUILD_CC" >&5
4212 echo "${ECHO_T}$BUILD_CC" >&6
4213 else
4214   echo "$as_me:4214: result: no" >&5
4215 echo "${ECHO_T}no" >&6
4216 fi
4217
4218   test -n "$BUILD_CC" && break
4219 done
4220
4221 fi;
4222         echo "$as_me:4222: checking for native build C compiler" >&5
4223 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4224         echo "$as_me:4224: result: $BUILD_CC" >&5
4225 echo "${ECHO_T}$BUILD_CC" >&6
4226
4227         echo "$as_me:4227: checking for native build C preprocessor" >&5
4228 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4229
4230 # Check whether --with-build-cpp or --without-build-cpp was given.
4231 if test "${with_build_cpp+set}" = set; then
4232   withval="$with_build_cpp"
4233   BUILD_CPP="$withval"
4234 else
4235   BUILD_CPP='${BUILD_CC} -E'
4236 fi;
4237         echo "$as_me:4237: result: $BUILD_CPP" >&5
4238 echo "${ECHO_T}$BUILD_CPP" >&6
4239
4240         echo "$as_me:4240: checking for native build C flags" >&5
4241 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4242
4243 # Check whether --with-build-cflags or --without-build-cflags was given.
4244 if test "${with_build_cflags+set}" = set; then
4245   withval="$with_build_cflags"
4246   BUILD_CFLAGS="$withval"
4247 fi;
4248         echo "$as_me:4248: result: $BUILD_CFLAGS" >&5
4249 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4250
4251         echo "$as_me:4251: checking for native build C preprocessor-flags" >&5
4252 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4253
4254 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4255 if test "${with_build_cppflags+set}" = set; then
4256   withval="$with_build_cppflags"
4257   BUILD_CPPFLAGS="$withval"
4258 fi;
4259         echo "$as_me:4259: result: $BUILD_CPPFLAGS" >&5
4260 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4261
4262         echo "$as_me:4262: checking for native build linker-flags" >&5
4263 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4264
4265 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4266 if test "${with_build_ldflags+set}" = set; then
4267   withval="$with_build_ldflags"
4268   BUILD_LDFLAGS="$withval"
4269 fi;
4270         echo "$as_me:4270: result: $BUILD_LDFLAGS" >&5
4271 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4272
4273         echo "$as_me:4273: checking for native build linker-libraries" >&5
4274 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4275
4276 # Check whether --with-build-libs or --without-build-libs was given.
4277 if test "${with_build_libs+set}" = set; then
4278   withval="$with_build_libs"
4279   BUILD_LIBS="$withval"
4280 fi;
4281         echo "$as_me:4281: result: $BUILD_LIBS" >&5
4282 echo "${ECHO_T}$BUILD_LIBS" >&6
4283
4284         # this assumes we're on Unix.
4285         BUILD_EXEEXT=
4286         BUILD_OBJEXT=o
4287
4288         : ${BUILD_CC:='${CC}'}
4289
4290         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4291                 { { echo "$as_me:4291: error: Cross-build requires two compilers.
4292 Use --with-build-cc to specify the native compiler." >&5
4293 echo "$as_me: error: Cross-build requires two compilers.
4294 Use --with-build-cc to specify the native compiler." >&2;}
4295    { (exit 1); exit 1; }; }
4296         fi
4297
4298 else
4299         : ${BUILD_CC:='${CC}'}
4300         : ${BUILD_CPP:='${CPP}'}
4301         : ${BUILD_CFLAGS:='${CFLAGS}'}
4302         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4303         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4304         : ${BUILD_LIBS:='${LIBS}'}
4305         : ${BUILD_EXEEXT:='$x'}
4306         : ${BUILD_OBJEXT:='o'}
4307 fi
4308
4309 ###############################################################################
4310
4311 ### Options to allow the user to specify the set of libraries which are used.
4312 ### Use "--without-normal --with-shared" to allow the default model to be
4313 ### shared, for example.
4314 cf_list_models=""
4315
4316 echo "$as_me:4316: checking if libtool -version-number should be used" >&5
4317 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4318
4319 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4320 if test "${enable_libtool_version+set}" = set; then
4321   enableval="$enable_libtool_version"
4322   test "$enableval" != no && enableval=yes
4323   if test "$enableval" != "yes" ; then
4324     cf_libtool_version=no
4325   else
4326     cf_libtool_version=yes
4327   fi
4328 else
4329   enableval=yes
4330   cf_libtool_version=yes
4331
4332 fi;
4333 echo "$as_me:4333: result: $cf_libtool_version" >&5
4334 echo "${ECHO_T}$cf_libtool_version" >&6
4335
4336 if test "$cf_libtool_version" = yes ; then
4337         LIBTOOL_VERSION="-version-number"
4338 else
4339         LIBTOOL_VERSION="-version-info"
4340 fi
4341
4342 LIBTOOL=
4343
4344 # common library maintenance symbols that are convenient for libtool scripts:
4345 LIB_CREATE='${AR} -cr'
4346 LIB_OBJECT='${OBJECTS}'
4347 LIB_SUFFIX=.a
4348 LIB_PREP="$RANLIB"
4349
4350 # symbols used to prop libtool up to enable it to determine what it should be
4351 # doing:
4352 LIB_CLEAN=
4353 LIB_COMPILE=
4354 LIB_LINK='${CC}'
4355 LIB_INSTALL=
4356 LIB_UNINSTALL=
4357
4358 echo "$as_me:4358: checking if you want to build libraries with libtool" >&5
4359 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4360
4361 # Check whether --with-libtool or --without-libtool was given.
4362 if test "${with_libtool+set}" = set; then
4363   withval="$with_libtool"
4364   with_libtool=$withval
4365 else
4366   with_libtool=no
4367 fi;
4368 echo "$as_me:4368: result: $with_libtool" >&5
4369 echo "${ECHO_T}$with_libtool" >&6
4370 if test "$with_libtool" != "no"; then
4371
4372         if test "$with_libtool" != "yes" ; then
4373
4374 if test "x$prefix" != xNONE; then
4375   cf_path_syntax="$prefix"
4376 else
4377   cf_path_syntax="$ac_default_prefix"
4378 fi
4379
4380 case ".$with_libtool" in #(vi
4381 .\$\(*\)*|.\'*\'*) #(vi
4382   ;;
4383 ..|./*|.\\*) #(vi
4384   ;;
4385 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4386   ;;
4387 .\${*prefix}*|.\${*dir}*) #(vi
4388   eval with_libtool="$with_libtool"
4389   case ".$with_libtool" in #(vi
4390   .NONE/*)
4391     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4392     ;;
4393   esac
4394   ;; #(vi
4395 .no|.NONE/*)
4396   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4397   ;;
4398 *)
4399   { { echo "$as_me:4399: error: expected a pathname, not \"$with_libtool\"" >&5
4400 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4401    { (exit 1); exit 1; }; }
4402   ;;
4403 esac
4404
4405                 LIBTOOL=$with_libtool
4406         else
4407                 if test -n "$ac_tool_prefix"; then
4408   for ac_prog in libtool glibtool
4409   do
4410     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4411 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4412 echo "$as_me:4412: checking for $ac_word" >&5
4413 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4414 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4415   echo $ECHO_N "(cached) $ECHO_C" >&6
4416 else
4417   if test -n "$LIBTOOL"; then
4418   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4419 else
4420   ac_save_IFS=$IFS; IFS=$ac_path_separator
4421 ac_dummy="$PATH"
4422 for ac_dir in $ac_dummy; do
4423   IFS=$ac_save_IFS
4424   test -z "$ac_dir" && ac_dir=.
4425   $as_executable_p "$ac_dir/$ac_word" || continue
4426 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4427 echo "$as_me:4427: found $ac_dir/$ac_word" >&5
4428 break
4429 done
4430
4431 fi
4432 fi
4433 LIBTOOL=$ac_cv_prog_LIBTOOL
4434 if test -n "$LIBTOOL"; then
4435   echo "$as_me:4435: result: $LIBTOOL" >&5
4436 echo "${ECHO_T}$LIBTOOL" >&6
4437 else
4438   echo "$as_me:4438: result: no" >&5
4439 echo "${ECHO_T}no" >&6
4440 fi
4441
4442     test -n "$LIBTOOL" && break
4443   done
4444 fi
4445 if test -z "$LIBTOOL"; then
4446   ac_ct_LIBTOOL=$LIBTOOL
4447   for ac_prog in libtool glibtool
4448 do
4449   # Extract the first word of "$ac_prog", so it can be a program name with args.
4450 set dummy $ac_prog; ac_word=$2
4451 echo "$as_me:4451: checking for $ac_word" >&5
4452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4453 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   if test -n "$ac_ct_LIBTOOL"; then
4457   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4458 else
4459   ac_save_IFS=$IFS; IFS=$ac_path_separator
4460 ac_dummy="$PATH"
4461 for ac_dir in $ac_dummy; do
4462   IFS=$ac_save_IFS
4463   test -z "$ac_dir" && ac_dir=.
4464   $as_executable_p "$ac_dir/$ac_word" || continue
4465 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4466 echo "$as_me:4466: found $ac_dir/$ac_word" >&5
4467 break
4468 done
4469
4470 fi
4471 fi
4472 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4473 if test -n "$ac_ct_LIBTOOL"; then
4474   echo "$as_me:4474: result: $ac_ct_LIBTOOL" >&5
4475 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4476 else
4477   echo "$as_me:4477: result: no" >&5
4478 echo "${ECHO_T}no" >&6
4479 fi
4480
4481   test -n "$ac_ct_LIBTOOL" && break
4482 done
4483 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4484
4485   LIBTOOL=$ac_ct_LIBTOOL
4486 fi
4487
4488 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4489 then
4490         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.].*//'`
4491 else
4492         cf_cv_libtool_version=
4493 fi
4494 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4495
4496                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4497                 then
4498
4499 unset ac_cv_prog_ac_ct_LIBTOOL
4500 unset ac_ct_LIBTOOL
4501 unset LIBTOOL
4502
4503                         if test -n "$ac_tool_prefix"; then
4504   for ac_prog in glibtool
4505   do
4506     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4508 echo "$as_me:4508: checking for $ac_word" >&5
4509 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4510 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4511   echo $ECHO_N "(cached) $ECHO_C" >&6
4512 else
4513   if test -n "$LIBTOOL"; then
4514   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4515 else
4516   ac_save_IFS=$IFS; IFS=$ac_path_separator
4517 ac_dummy="$PATH"
4518 for ac_dir in $ac_dummy; do
4519   IFS=$ac_save_IFS
4520   test -z "$ac_dir" && ac_dir=.
4521   $as_executable_p "$ac_dir/$ac_word" || continue
4522 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4523 echo "$as_me:4523: found $ac_dir/$ac_word" >&5
4524 break
4525 done
4526
4527 fi
4528 fi
4529 LIBTOOL=$ac_cv_prog_LIBTOOL
4530 if test -n "$LIBTOOL"; then
4531   echo "$as_me:4531: result: $LIBTOOL" >&5
4532 echo "${ECHO_T}$LIBTOOL" >&6
4533 else
4534   echo "$as_me:4534: result: no" >&5
4535 echo "${ECHO_T}no" >&6
4536 fi
4537
4538     test -n "$LIBTOOL" && break
4539   done
4540 fi
4541 if test -z "$LIBTOOL"; then
4542   ac_ct_LIBTOOL=$LIBTOOL
4543   for ac_prog in glibtool
4544 do
4545   # Extract the first word of "$ac_prog", so it can be a program name with args.
4546 set dummy $ac_prog; ac_word=$2
4547 echo "$as_me:4547: checking for $ac_word" >&5
4548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4549 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4550   echo $ECHO_N "(cached) $ECHO_C" >&6
4551 else
4552   if test -n "$ac_ct_LIBTOOL"; then
4553   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4554 else
4555   ac_save_IFS=$IFS; IFS=$ac_path_separator
4556 ac_dummy="$PATH"
4557 for ac_dir in $ac_dummy; do
4558   IFS=$ac_save_IFS
4559   test -z "$ac_dir" && ac_dir=.
4560   $as_executable_p "$ac_dir/$ac_word" || continue
4561 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4562 echo "$as_me:4562: found $ac_dir/$ac_word" >&5
4563 break
4564 done
4565
4566 fi
4567 fi
4568 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4569 if test -n "$ac_ct_LIBTOOL"; then
4570   echo "$as_me:4570: result: $ac_ct_LIBTOOL" >&5
4571 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4572 else
4573   echo "$as_me:4573: result: no" >&5
4574 echo "${ECHO_T}no" >&6
4575 fi
4576
4577   test -n "$ac_ct_LIBTOOL" && break
4578 done
4579 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4580
4581   LIBTOOL=$ac_ct_LIBTOOL
4582 fi
4583
4584 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4585 then
4586         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.].*//'`
4587 else
4588         cf_cv_libtool_version=
4589 fi
4590 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4591
4592                 fi
4593         fi
4594         if test -z "$LIBTOOL" ; then
4595                 { { echo "$as_me:4595: error: Cannot find libtool" >&5
4596 echo "$as_me: error: Cannot find libtool" >&2;}
4597    { (exit 1); exit 1; }; }
4598         fi
4599         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4600         LIB_OBJECT='${OBJECTS:.o=.lo}'
4601         LIB_SUFFIX=.la
4602         LIB_CLEAN='${LIBTOOL} --mode=clean'
4603         LIB_COMPILE='${LIBTOOL} --mode=compile'
4604         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4605         LIB_INSTALL='${LIBTOOL} --mode=install'
4606         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4607         LIB_PREP=:
4608
4609 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4610 then
4611         echo "$as_me:4611: checking version of $LIBTOOL" >&5
4612 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4613
4614 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4615 then
4616         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.].*//'`
4617 else
4618         cf_cv_libtool_version=
4619 fi
4620 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4621
4622         echo "$as_me:4622: result: $cf_cv_libtool_version" >&5
4623 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4624         if test -z "$cf_cv_libtool_version" ; then
4625                 { { echo "$as_me:4625: error: This is not GNU libtool" >&5
4626 echo "$as_me: error: This is not GNU libtool" >&2;}
4627    { (exit 1); exit 1; }; }
4628         fi
4629 else
4630         { { echo "$as_me:4630: error: GNU libtool has not been found" >&5
4631 echo "$as_me: error: GNU libtool has not been found" >&2;}
4632    { (exit 1); exit 1; }; }
4633 fi
4634
4635         # special hack to add -no-undefined (which libtool should do for itself)
4636         LT_UNDEF=
4637         case "$cf_cv_system_name" in #(vi
4638         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4639                 LT_UNDEF=-no-undefined
4640                 ;;
4641         esac
4642
4643         # special hack to add --tag option for C++ compiler
4644         case $cf_cv_libtool_version in #(vi
4645         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4646                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4647                 LIBTOOL="$LIBTOOL --tag=CC"
4648                 ;;
4649         *)
4650                 LIBTOOL_CXX="$LIBTOOL"
4651                 ;;
4652         esac
4653 else
4654         LIBTOOL=""
4655         LIBTOOL_CXX=""
4656 fi
4657
4658 test -z "$LIBTOOL" && ECHO_LT=
4659
4660 if test "$with_libtool" != "no" ; then
4661
4662 cf_list_models="$cf_list_models libtool"
4663
4664 else
4665
4666 echo "$as_me:4666: checking if you want to build shared libraries" >&5
4667 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4668
4669 # Check whether --with-shared or --without-shared was given.
4670 if test "${with_shared+set}" = set; then
4671   withval="$with_shared"
4672   with_shared=$withval
4673 else
4674   with_shared=no
4675 fi;
4676 echo "$as_me:4676: result: $with_shared" >&5
4677 echo "${ECHO_T}$with_shared" >&6
4678 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4679
4680 echo "$as_me:4680: checking if you want to build static libraries" >&5
4681 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4682
4683 # Check whether --with-normal or --without-normal was given.
4684 if test "${with_normal+set}" = set; then
4685   withval="$with_normal"
4686   with_normal=$withval
4687 else
4688   with_normal=yes
4689 fi;
4690 echo "$as_me:4690: result: $with_normal" >&5
4691 echo "${ECHO_T}$with_normal" >&6
4692 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4693
4694 echo "$as_me:4694: checking if you want to build debug libraries" >&5
4695 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4696
4697 # Check whether --with-debug or --without-debug was given.
4698 if test "${with_debug+set}" = set; then
4699   withval="$with_debug"
4700   with_debug=$withval
4701 else
4702   with_debug=yes
4703 fi;
4704 echo "$as_me:4704: result: $with_debug" >&5
4705 echo "${ECHO_T}$with_debug" >&6
4706 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4707
4708 echo "$as_me:4708: checking if you want to build profiling libraries" >&5
4709 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4710
4711 # Check whether --with-profile or --without-profile was given.
4712 if test "${with_profile+set}" = set; then
4713   withval="$with_profile"
4714   with_profile=$withval
4715 else
4716   with_profile=no
4717 fi;
4718 echo "$as_me:4718: result: $with_profile" >&5
4719 echo "${ECHO_T}$with_profile" >&6
4720 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4721
4722 fi
4723
4724 if test "X$cf_with_cxx_binding" != Xno; then
4725 if test "x$with_shared" = "xyes"; then
4726 echo "$as_me:4726: checking if you want to build C++ shared libraries" >&5
4727 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4728
4729 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4730 if test "${with_cxx_shared+set}" = set; then
4731   withval="$with_cxx_shared"
4732   with_shared_cxx=$withval
4733 else
4734   with_shared_cxx=no
4735 fi;
4736 echo "$as_me:4736: result: $with_shared_cxx" >&5
4737 echo "${ECHO_T}$with_shared_cxx" >&6
4738 fi
4739 fi
4740
4741 ###############################################################################
4742
4743 echo "$as_me:4743: checking for specified models" >&5
4744 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4745 test -z "$cf_list_models" && cf_list_models=normal
4746 test "$with_libtool" != "no" && cf_list_models=libtool
4747 echo "$as_me:4747: result: $cf_list_models" >&5
4748 echo "${ECHO_T}$cf_list_models" >&6
4749
4750 ### Use the first model as the default, and save its suffix for use in building
4751 ### up test-applications.
4752 echo "$as_me:4752: checking for default model" >&5
4753 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4754 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4755 echo "$as_me:4755: result: $DFT_LWR_MODEL" >&5
4756 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4757
4758 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4759
4760 TICS_NAME=tic
4761
4762 TINFO_NAME=tinfo
4763
4764 LIB_NAME=ncurses
4765
4766 LIB_DIR=../lib
4767 LIB_2ND=../../lib
4768
4769 echo "$as_me:4769: checking if you want to have a library-prefix" >&5
4770 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4771
4772 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4773 if test "${with_lib_prefix+set}" = set; then
4774   withval="$with_lib_prefix"
4775   with_lib_prefix=$withval
4776 else
4777   with_lib_prefix=auto
4778 fi;
4779 echo "$as_me:4779: result: $with_lib_prefix" >&5
4780 echo "${ECHO_T}$with_lib_prefix" >&6
4781
4782 if test $with_lib_prefix = auto
4783 then
4784
4785         case $cf_cv_system_name in #(vi
4786         OS/2*|os2*) #(vi
4787         LIB_PREFIX=''
4788         ;;
4789         *)      LIB_PREFIX='lib'
4790         ;;
4791         esac
4792 cf_prefix=$LIB_PREFIX
4793
4794 elif test $with_lib_prefix = no
4795 then
4796         LIB_PREFIX=
4797 else
4798         LIB_PREFIX=$with_lib_prefix
4799 fi
4800
4801 LIB_SUFFIX=
4802
4803         echo "$as_me:4803: checking for PATH separator" >&5
4804 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4805         case $cf_cv_system_name in
4806         os2*)   PATH_SEPARATOR=';'  ;;
4807         *)      ${PATH_SEPARATOR:=':'}  ;;
4808         esac
4809
4810         echo "$as_me:4810: result: $PATH_SEPARATOR" >&5
4811 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4812
4813 ###############################################################################
4814
4815 echo "$as_me:4815: checking if you want to build a separate terminfo library" >&5
4816 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4817
4818 # Check whether --with-termlib or --without-termlib was given.
4819 if test "${with_termlib+set}" = set; then
4820   withval="$with_termlib"
4821   with_termlib=$withval
4822 else
4823   with_termlib=no
4824 fi;
4825 echo "$as_me:4825: result: $with_termlib" >&5
4826 echo "${ECHO_T}$with_termlib" >&6
4827
4828 echo "$as_me:4828: checking if you want to build a separate tic library" >&5
4829 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4830
4831 # Check whether --with-ticlib or --without-ticlib was given.
4832 if test "${with_ticlib+set}" = set; then
4833   withval="$with_ticlib"
4834   with_ticlib=$withval
4835 else
4836   with_ticlib=no
4837 fi;
4838 echo "$as_me:4838: result: $with_ticlib" >&5
4839 echo "${ECHO_T}$with_ticlib" >&6
4840
4841 ### Checks for special libraries, must be done up-front.
4842 SHLIB_LIST=""
4843
4844 echo "$as_me:4844: checking if you want to link with the GPM mouse library" >&5
4845 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4846
4847 # Check whether --with-gpm or --without-gpm was given.
4848 if test "${with_gpm+set}" = set; then
4849   withval="$with_gpm"
4850   with_gpm=$withval
4851 else
4852   with_gpm=maybe
4853 fi;
4854 echo "$as_me:4854: result: $with_gpm" >&5
4855 echo "${ECHO_T}$with_gpm" >&6
4856
4857 if test "$with_gpm" != no ; then
4858         echo "$as_me:4858: checking for gpm.h" >&5
4859 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4860 if test "${ac_cv_header_gpm_h+set}" = set; then
4861   echo $ECHO_N "(cached) $ECHO_C" >&6
4862 else
4863   cat >conftest.$ac_ext <<_ACEOF
4864 #line 4864 "configure"
4865 #include "confdefs.h"
4866 #include <gpm.h>
4867 _ACEOF
4868 if { (eval echo "$as_me:4868: \"$ac_cpp conftest.$ac_ext\"") >&5
4869   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4870   ac_status=$?
4871   egrep -v '^ *\+' conftest.er1 >conftest.err
4872   rm -f conftest.er1
4873   cat conftest.err >&5
4874   echo "$as_me:4874: \$? = $ac_status" >&5
4875   (exit $ac_status); } >/dev/null; then
4876   if test -s conftest.err; then
4877     ac_cpp_err=$ac_c_preproc_warn_flag
4878   else
4879     ac_cpp_err=
4880   fi
4881 else
4882   ac_cpp_err=yes
4883 fi
4884 if test -z "$ac_cpp_err"; then
4885   ac_cv_header_gpm_h=yes
4886 else
4887   echo "$as_me: failed program was:" >&5
4888   cat conftest.$ac_ext >&5
4889   ac_cv_header_gpm_h=no
4890 fi
4891 rm -f conftest.err conftest.$ac_ext
4892 fi
4893 echo "$as_me:4893: result: $ac_cv_header_gpm_h" >&5
4894 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4895 if test $ac_cv_header_gpm_h = yes; then
4896
4897 cat >>confdefs.h <<\EOF
4898 #define HAVE_GPM_H 1
4899 EOF
4900
4901                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4902                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4903
4904 echo "${as_me:-configure}:4904: testing assuming we really have GPM library ..." 1>&5
4905
4906 cat >>confdefs.h <<\EOF
4907 #define HAVE_LIBGPM 1
4908 EOF
4909
4910                 else
4911                         echo "$as_me:4911: checking for Gpm_Open in -lgpm" >&5
4912 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4913 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4914   echo $ECHO_N "(cached) $ECHO_C" >&6
4915 else
4916   ac_check_lib_save_LIBS=$LIBS
4917 LIBS="-lgpm  $LIBS"
4918 cat >conftest.$ac_ext <<_ACEOF
4919 #line 4919 "configure"
4920 #include "confdefs.h"
4921
4922 /* Override any gcc2 internal prototype to avoid an error.  */
4923 #ifdef __cplusplus
4924 extern "C"
4925 #endif
4926 /* We use char because int might match the return type of a gcc2
4927    builtin and then its argument prototype would still apply.  */
4928 char Gpm_Open ();
4929 int
4930 main ()
4931 {
4932 Gpm_Open ();
4933   ;
4934   return 0;
4935 }
4936 _ACEOF
4937 rm -f conftest.$ac_objext conftest$ac_exeext
4938 if { (eval echo "$as_me:4938: \"$ac_link\"") >&5
4939   (eval $ac_link) 2>&5
4940   ac_status=$?
4941   echo "$as_me:4941: \$? = $ac_status" >&5
4942   (exit $ac_status); } &&
4943          { ac_try='test -s conftest$ac_exeext'
4944   { (eval echo "$as_me:4944: \"$ac_try\"") >&5
4945   (eval $ac_try) 2>&5
4946   ac_status=$?
4947   echo "$as_me:4947: \$? = $ac_status" >&5
4948   (exit $ac_status); }; }; then
4949   ac_cv_lib_gpm_Gpm_Open=yes
4950 else
4951   echo "$as_me: failed program was:" >&5
4952 cat conftest.$ac_ext >&5
4953 ac_cv_lib_gpm_Gpm_Open=no
4954 fi
4955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4956 LIBS=$ac_check_lib_save_LIBS
4957 fi
4958 echo "$as_me:4958: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4959 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4960 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4961   :
4962 else
4963
4964                                 { { echo "$as_me:4964: error: Cannot link with GPM library" >&5
4965 echo "$as_me: error: Cannot link with GPM library" >&2;}
4966    { (exit 1); exit 1; }; }
4967                 fi
4968                 with_gpm=yes
4969
4970 fi
4971
4972 else
4973
4974                 test "$with_gpm" != maybe && { echo "$as_me:4974: WARNING: Cannot find GPM header" >&5
4975 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4976                 with_gpm=no
4977
4978 fi
4979
4980 fi
4981
4982 if test "$with_gpm" != no ; then
4983         echo "$as_me:4983: checking if you want to load GPM dynamically" >&5
4984 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4985
4986 # Check whether --with-dlsym or --without-dlsym was given.
4987 if test "${with_dlsym+set}" = set; then
4988   withval="$with_dlsym"
4989   with_dlsym=$withval
4990 else
4991   with_dlsym=yes
4992 fi;
4993         echo "$as_me:4993: result: $with_dlsym" >&5
4994 echo "${ECHO_T}$with_dlsym" >&6
4995         if test "x$with_dlsym" = xyes ; then
4996
4997 cf_have_dlsym=no
4998 echo "$as_me:4998: checking for dlsym" >&5
4999 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5000 if test "${ac_cv_func_dlsym+set}" = set; then
5001   echo $ECHO_N "(cached) $ECHO_C" >&6
5002 else
5003   cat >conftest.$ac_ext <<_ACEOF
5004 #line 5004 "configure"
5005 #include "confdefs.h"
5006 /* System header to define __stub macros and hopefully few prototypes,
5007     which can conflict with char dlsym (); below.  */
5008 #include <assert.h>
5009 /* Override any gcc2 internal prototype to avoid an error.  */
5010 #ifdef __cplusplus
5011 extern "C"
5012 #endif
5013 /* We use char because int might match the return type of a gcc2
5014    builtin and then its argument prototype would still apply.  */
5015 char dlsym ();
5016 char (*f) ();
5017
5018 int
5019 main ()
5020 {
5021 /* The GNU C library defines this for functions which it implements
5022     to always fail with ENOSYS.  Some functions are actually named
5023     something starting with __ and the normal name is an alias.  */
5024 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5025 choke me
5026 #else
5027 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5028 #endif
5029
5030   ;
5031   return 0;
5032 }
5033 _ACEOF
5034 rm -f conftest.$ac_objext conftest$ac_exeext
5035 if { (eval echo "$as_me:5035: \"$ac_link\"") >&5
5036   (eval $ac_link) 2>&5
5037   ac_status=$?
5038   echo "$as_me:5038: \$? = $ac_status" >&5
5039   (exit $ac_status); } &&
5040          { ac_try='test -s conftest$ac_exeext'
5041   { (eval echo "$as_me:5041: \"$ac_try\"") >&5
5042   (eval $ac_try) 2>&5
5043   ac_status=$?
5044   echo "$as_me:5044: \$? = $ac_status" >&5
5045   (exit $ac_status); }; }; then
5046   ac_cv_func_dlsym=yes
5047 else
5048   echo "$as_me: failed program was:" >&5
5049 cat conftest.$ac_ext >&5
5050 ac_cv_func_dlsym=no
5051 fi
5052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5053 fi
5054 echo "$as_me:5054: result: $ac_cv_func_dlsym" >&5
5055 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5056 if test $ac_cv_func_dlsym = yes; then
5057   cf_have_dlsym=yes
5058 else
5059
5060 cf_have_libdl=no
5061 echo "$as_me:5061: checking for dlsym in -ldl" >&5
5062 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5063 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5064   echo $ECHO_N "(cached) $ECHO_C" >&6
5065 else
5066   ac_check_lib_save_LIBS=$LIBS
5067 LIBS="-ldl  $LIBS"
5068 cat >conftest.$ac_ext <<_ACEOF
5069 #line 5069 "configure"
5070 #include "confdefs.h"
5071
5072 /* Override any gcc2 internal prototype to avoid an error.  */
5073 #ifdef __cplusplus
5074 extern "C"
5075 #endif
5076 /* We use char because int might match the return type of a gcc2
5077    builtin and then its argument prototype would still apply.  */
5078 char dlsym ();
5079 int
5080 main ()
5081 {
5082 dlsym ();
5083   ;
5084   return 0;
5085 }
5086 _ACEOF
5087 rm -f conftest.$ac_objext conftest$ac_exeext
5088 if { (eval echo "$as_me:5088: \"$ac_link\"") >&5
5089   (eval $ac_link) 2>&5
5090   ac_status=$?
5091   echo "$as_me:5091: \$? = $ac_status" >&5
5092   (exit $ac_status); } &&
5093          { ac_try='test -s conftest$ac_exeext'
5094   { (eval echo "$as_me:5094: \"$ac_try\"") >&5
5095   (eval $ac_try) 2>&5
5096   ac_status=$?
5097   echo "$as_me:5097: \$? = $ac_status" >&5
5098   (exit $ac_status); }; }; then
5099   ac_cv_lib_dl_dlsym=yes
5100 else
5101   echo "$as_me: failed program was:" >&5
5102 cat conftest.$ac_ext >&5
5103 ac_cv_lib_dl_dlsym=no
5104 fi
5105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5106 LIBS=$ac_check_lib_save_LIBS
5107 fi
5108 echo "$as_me:5108: result: $ac_cv_lib_dl_dlsym" >&5
5109 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5110 if test $ac_cv_lib_dl_dlsym = yes; then
5111
5112         cf_have_dlsym=yes
5113         cf_have_libdl=yes
5114 fi
5115
5116 fi
5117
5118 if test "$cf_have_dlsym" = yes ; then
5119         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5120
5121         echo "$as_me:5121: checking whether able to link to dl*() functions" >&5
5122 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5123         cat >conftest.$ac_ext <<_ACEOF
5124 #line 5124 "configure"
5125 #include "confdefs.h"
5126 #include <dlfcn.h>
5127 int
5128 main ()
5129 {
5130
5131                 void *obj;
5132                 if ((obj = dlopen("filename", 0)) != 0) {
5133                         if (dlsym(obj, "symbolname") == 0) {
5134                         dlclose(obj);
5135                         }
5136                 }
5137   ;
5138   return 0;
5139 }
5140 _ACEOF
5141 rm -f conftest.$ac_objext conftest$ac_exeext
5142 if { (eval echo "$as_me:5142: \"$ac_link\"") >&5
5143   (eval $ac_link) 2>&5
5144   ac_status=$?
5145   echo "$as_me:5145: \$? = $ac_status" >&5
5146   (exit $ac_status); } &&
5147          { ac_try='test -s conftest$ac_exeext'
5148   { (eval echo "$as_me:5148: \"$ac_try\"") >&5
5149   (eval $ac_try) 2>&5
5150   ac_status=$?
5151   echo "$as_me:5151: \$? = $ac_status" >&5
5152   (exit $ac_status); }; }; then
5153
5154 cat >>confdefs.h <<\EOF
5155 #define HAVE_LIBDL 1
5156 EOF
5157
5158 else
5159   echo "$as_me: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161
5162                 { { echo "$as_me:5162: error: Cannot link test program for libdl" >&5
5163 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5164    { (exit 1); exit 1; }; }
5165 fi
5166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5167         echo "$as_me:5167: result: ok" >&5
5168 echo "${ECHO_T}ok" >&6
5169 else
5170         { { echo "$as_me:5170: error: Cannot find dlsym function" >&5
5171 echo "$as_me: error: Cannot find dlsym function" >&2;}
5172    { (exit 1); exit 1; }; }
5173 fi
5174
5175                 if test "x$with_gpm" != xyes ; then
5176                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5177
5178 echo "${as_me:-configure}:5178: testing assuming soname for gpm is $with_gpm ..." 1>&5
5179
5180                         cf_cv_gpm_soname="$with_gpm"
5181                 else
5182
5183 echo "$as_me:5183: checking for soname of gpm library" >&5
5184 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5185 if test "${cf_cv_gpm_soname+set}" = set; then
5186   echo $ECHO_N "(cached) $ECHO_C" >&6
5187 else
5188
5189 cf_cv_gpm_soname=unknown
5190 if test "$cross_compiling" != yes ; then
5191 cat >conftest.$ac_ext <<CF_EOF
5192 #include <gpm.h>
5193 int main()
5194 {
5195 if (Gpm_Open(0,0)) Gpm_Close();
5196         ${cf_cv_main_return:-return}(0);
5197 }
5198 CF_EOF
5199 cf_save_LIBS="$LIBS"
5200         LIBS="-lgpm $LIBS"
5201         if { (eval echo "$as_me:5201: \"$ac_compile\"") >&5
5202   (eval $ac_compile) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); } ; then
5206                 if { (eval echo "$as_me:5206: \"$ac_link\"") >&5
5207   (eval $ac_link) 2>&5
5208   ac_status=$?
5209   echo "$as_me:5209: \$? = $ac_status" >&5
5210   (exit $ac_status); } ; then
5211                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5212                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5213                 fi
5214         fi
5215 rm -rf conftest*
5216 LIBS="$cf_save_LIBS"
5217 fi
5218
5219 fi
5220 echo "$as_me:5220: result: $cf_cv_gpm_soname" >&5
5221 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5222
5223                 fi
5224                 test "$cf_cv_gpm_soname" != "unknown" &&
5225 cat >>confdefs.h <<EOF
5226 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5227 EOF
5228
5229                 SHLIB_LIST="-ldl $SHLIB_LIST"
5230         else
5231                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5232                 TEST_LIBS="-lgpm $TEST_LIBS"
5233         fi
5234
5235 cat >>confdefs.h <<\EOF
5236 #define HAVE_LIBGPM 1
5237 EOF
5238
5239 echo "$as_me:5239: checking for Gpm_Wgetch in -lgpm" >&5
5240 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5241 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5242   echo $ECHO_N "(cached) $ECHO_C" >&6
5243 else
5244   ac_check_lib_save_LIBS=$LIBS
5245 LIBS="-lgpm  $LIBS"
5246 cat >conftest.$ac_ext <<_ACEOF
5247 #line 5247 "configure"
5248 #include "confdefs.h"
5249
5250 /* Override any gcc2 internal prototype to avoid an error.  */
5251 #ifdef __cplusplus
5252 extern "C"
5253 #endif
5254 /* We use char because int might match the return type of a gcc2
5255    builtin and then its argument prototype would still apply.  */
5256 char Gpm_Wgetch ();
5257 int
5258 main ()
5259 {
5260 Gpm_Wgetch ();
5261   ;
5262   return 0;
5263 }
5264 _ACEOF
5265 rm -f conftest.$ac_objext conftest$ac_exeext
5266 if { (eval echo "$as_me:5266: \"$ac_link\"") >&5
5267   (eval $ac_link) 2>&5
5268   ac_status=$?
5269   echo "$as_me:5269: \$? = $ac_status" >&5
5270   (exit $ac_status); } &&
5271          { ac_try='test -s conftest$ac_exeext'
5272   { (eval echo "$as_me:5272: \"$ac_try\"") >&5
5273   (eval $ac_try) 2>&5
5274   ac_status=$?
5275   echo "$as_me:5275: \$? = $ac_status" >&5
5276   (exit $ac_status); }; }; then
5277   ac_cv_lib_gpm_Gpm_Wgetch=yes
5278 else
5279   echo "$as_me: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 ac_cv_lib_gpm_Gpm_Wgetch=no
5282 fi
5283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5284 LIBS=$ac_check_lib_save_LIBS
5285 fi
5286 echo "$as_me:5286: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5287 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5288 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5289
5290 echo "$as_me:5290: checking if GPM is weakly bound to curses library" >&5
5291 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5292 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5293   echo $ECHO_N "(cached) $ECHO_C" >&6
5294 else
5295
5296 cf_cv_check_gpm_wgetch=unknown
5297 if test "$cross_compiling" != yes ; then
5298
5299 cat >conftest.$ac_ext <<CF_EOF
5300 #include <gpm.h>
5301 int main()
5302 {
5303         Gpm_Wgetch();
5304         ${cf_cv_main_return:-return}(0);
5305 }
5306 CF_EOF
5307
5308         cf_save_LIBS="$LIBS"
5309         # This only works if we can look at the symbol table.  If a shared
5310         # library is stripped for install, we cannot use that.  So we're forced
5311         # to rely on the static library, noting that some packagers may not
5312         # include it.
5313         LIBS="-static -lgpm -dynamic $LIBS"
5314         if { (eval echo "$as_me:5314: \"$ac_compile\"") >&5
5315   (eval $ac_compile) 2>&5
5316   ac_status=$?
5317   echo "$as_me:5317: \$? = $ac_status" >&5
5318   (exit $ac_status); } ; then
5319                 if { (eval echo "$as_me:5319: \"$ac_link\"") >&5
5320   (eval $ac_link) 2>&5
5321   ac_status=$?
5322   echo "$as_me:5322: \$? = $ac_status" >&5
5323   (exit $ac_status); } ; then
5324                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5325                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5326                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5327                 fi
5328         fi
5329         rm -rf conftest*
5330         LIBS="$cf_save_LIBS"
5331 fi
5332
5333 fi
5334 echo "$as_me:5334: result: $cf_cv_check_gpm_wgetch" >&5
5335 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5336
5337 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5338         { echo "$as_me:5338: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5339 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5340 fi
5341
5342 fi
5343
5344 fi
5345
5346 # not everyone has "test -c"
5347 if test -c /dev/sysmouse 2>/dev/null ; then
5348 echo "$as_me:5348: checking if you want to use sysmouse" >&5
5349 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5350
5351 # Check whether --with-sysmouse or --without-sysmouse was given.
5352 if test "${with_sysmouse+set}" = set; then
5353   withval="$with_sysmouse"
5354   cf_with_sysmouse=$withval
5355 else
5356   cf_with_sysmouse=maybe
5357 fi;
5358         if test "$cf_with_sysmouse" != no ; then
5359         cat >conftest.$ac_ext <<_ACEOF
5360 #line 5360 "configure"
5361 #include "confdefs.h"
5362
5363 #include <osreldate.h>
5364 #if (__FreeBSD_version >= 400017)
5365 #include <sys/consio.h>
5366 #include <sys/fbio.h>
5367 #else
5368 #include <machine/console.h>
5369 #endif
5370
5371 int
5372 main ()
5373 {
5374
5375         struct mouse_info the_mouse;
5376         ioctl(0, CONS_MOUSECTL, &the_mouse);
5377
5378   ;
5379   return 0;
5380 }
5381 _ACEOF
5382 rm -f conftest.$ac_objext
5383 if { (eval echo "$as_me:5383: \"$ac_compile\"") >&5
5384   (eval $ac_compile) 2>&5
5385   ac_status=$?
5386   echo "$as_me:5386: \$? = $ac_status" >&5
5387   (exit $ac_status); } &&
5388          { ac_try='test -s conftest.$ac_objext'
5389   { (eval echo "$as_me:5389: \"$ac_try\"") >&5
5390   (eval $ac_try) 2>&5
5391   ac_status=$?
5392   echo "$as_me:5392: \$? = $ac_status" >&5
5393   (exit $ac_status); }; }; then
5394   cf_with_sysmouse=yes
5395 else
5396   echo "$as_me: failed program was:" >&5
5397 cat conftest.$ac_ext >&5
5398 cf_with_sysmouse=no
5399 fi
5400 rm -f conftest.$ac_objext conftest.$ac_ext
5401         fi
5402 echo "$as_me:5402: result: $cf_with_sysmouse" >&5
5403 echo "${ECHO_T}$cf_with_sysmouse" >&6
5404 test "$cf_with_sysmouse" = yes &&
5405 cat >>confdefs.h <<\EOF
5406 #define USE_SYSMOUSE 1
5407 EOF
5408
5409 fi
5410
5411 if test X"$CC_G_OPT" = X"" ; then
5412         CC_G_OPT='-g'
5413         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5414 fi
5415
5416 if test X"$CXX_G_OPT" = X"" ; then
5417         CXX_G_OPT='-g'
5418         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5419 fi
5420
5421 echo "$as_me:5421: checking for default loader flags" >&5
5422 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5423 case $DFT_LWR_MODEL in
5424 libtool) LD_MODEL=''   ;;
5425 normal)  LD_MODEL=''   ;;
5426 debug)   LD_MODEL=$CC_G_OPT ;;
5427 profile) LD_MODEL='-pg';;
5428 shared)  LD_MODEL=''   ;;
5429 esac
5430 echo "$as_me:5430: result: $LD_MODEL" >&5
5431 echo "${ECHO_T}$LD_MODEL" >&6
5432
5433 case $DFT_LWR_MODEL in
5434 shared)
5435
5436 echo "$as_me:5436: checking if rpath option should be used" >&5
5437 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5438
5439 # Check whether --enable-rpath or --disable-rpath was given.
5440 if test "${enable_rpath+set}" = set; then
5441   enableval="$enable_rpath"
5442   cf_cv_enable_rpath=$enableval
5443 else
5444   cf_cv_enable_rpath=no
5445 fi;
5446 echo "$as_me:5446: result: $cf_cv_enable_rpath" >&5
5447 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5448
5449 echo "$as_me:5449: checking if shared libraries should be relinked during install" >&5
5450 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5451
5452 # Check whether --enable-relink or --disable-relink was given.
5453 if test "${enable_relink+set}" = set; then
5454   enableval="$enable_relink"
5455   cf_cv_do_relink=$enableval
5456 else
5457   cf_cv_do_relink=yes
5458 fi;
5459 echo "$as_me:5459: result: $cf_cv_do_relink" >&5
5460 echo "${ECHO_T}$cf_cv_do_relink" >&6
5461         ;;
5462 esac
5463
5464 # we will build libraries one-level down.
5465 rel_builddir=..
5466
5467 LD_RPATH_OPT=
5468 echo "$as_me:5468: checking for an rpath option" >&5
5469 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5470 case $cf_cv_system_name in #(vi
5471 irix*) #(vi
5472         if test "$GCC" = yes; then
5473                 LD_RPATH_OPT="-Wl,-rpath,"
5474         else
5475                 LD_RPATH_OPT="-rpath "
5476         fi
5477         ;;
5478 linux*|gnu*|k*bsd*-gnu) #(vi
5479         LD_RPATH_OPT="-Wl,-rpath,"
5480         ;;
5481 openbsd[2-9].*|mirbsd*) #(vi
5482         LD_RPATH_OPT="-Wl,-rpath,"
5483         ;;
5484 dragonfly*|freebsd*) #(vi
5485         LD_RPATH_OPT="-rpath "
5486         ;;
5487 netbsd*) #(vi
5488         LD_RPATH_OPT="-Wl,-rpath,"
5489         ;;
5490 osf*|mls+*) #(vi
5491         LD_RPATH_OPT="-rpath "
5492         ;;
5493 solaris2*) #(vi
5494         LD_RPATH_OPT="-R"
5495         ;;
5496 *)
5497         ;;
5498 esac
5499 echo "$as_me:5499: result: $LD_RPATH_OPT" >&5
5500 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5501
5502 case "x$LD_RPATH_OPT" in #(vi
5503 x-R*)
5504         echo "$as_me:5504: checking if we need a space after rpath option" >&5
5505 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5506         cf_save_LIBS="$LIBS"
5507         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5508         cat >conftest.$ac_ext <<_ACEOF
5509 #line 5509 "configure"
5510 #include "confdefs.h"
5511
5512 int
5513 main ()
5514 {
5515
5516   ;
5517   return 0;
5518 }
5519 _ACEOF
5520 rm -f conftest.$ac_objext conftest$ac_exeext
5521 if { (eval echo "$as_me:5521: \"$ac_link\"") >&5
5522   (eval $ac_link) 2>&5
5523   ac_status=$?
5524   echo "$as_me:5524: \$? = $ac_status" >&5
5525   (exit $ac_status); } &&
5526          { ac_try='test -s conftest$ac_exeext'
5527   { (eval echo "$as_me:5527: \"$ac_try\"") >&5
5528   (eval $ac_try) 2>&5
5529   ac_status=$?
5530   echo "$as_me:5530: \$? = $ac_status" >&5
5531   (exit $ac_status); }; }; then
5532   cf_rpath_space=no
5533 else
5534   echo "$as_me: failed program was:" >&5
5535 cat conftest.$ac_ext >&5
5536 cf_rpath_space=yes
5537 fi
5538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5539         LIBS="$cf_save_LIBS"
5540         echo "$as_me:5540: result: $cf_rpath_space" >&5
5541 echo "${ECHO_T}$cf_rpath_space" >&6
5542         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5543         ;;
5544 esac
5545
5546         RM_SHARED_OPTS=
5547         LOCAL_LDFLAGS=
5548         LOCAL_LDFLAGS2=
5549         LD_SHARED_OPTS=
5550         INSTALL_LIB="-m 644"
5551         : ${rel_builddir:=.}
5552
5553         cf_cv_do_symlinks=no
5554         cf_ld_rpath_opt=
5555         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5556
5557         echo "$as_me:5557: checking if release/abi version should be used for shared libs" >&5
5558 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5559
5560 # Check whether --with-shlib-version or --without-shlib-version was given.
5561 if test "${with_shlib_version+set}" = set; then
5562   withval="$with_shlib_version"
5563   test -z "$withval" && withval=auto
5564         case $withval in #(vi
5565         yes) #(vi
5566                 cf_cv_shlib_version=auto
5567                 ;;
5568         rel|abi|auto|no) #(vi
5569                 cf_cv_shlib_version=$withval
5570                 ;;
5571         *)
5572                 { { echo "$as_me:5572: error: option value must be one of: rel, abi, auto or no" >&5
5573 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5574    { (exit 1); exit 1; }; }
5575                 ;;
5576         esac
5577
5578 else
5579   cf_cv_shlib_version=auto
5580 fi;
5581         echo "$as_me:5581: result: $cf_cv_shlib_version" >&5
5582 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5583
5584         cf_cv_rm_so_locs=no
5585         cf_try_cflags=
5586
5587         # Some less-capable ports of gcc support only -fpic
5588         CC_SHARED_OPTS=
5589         if test "$GCC" = yes
5590         then
5591                 echo "$as_me:5591: checking which $CC option to use" >&5
5592 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5593                 cf_save_CFLAGS="$CFLAGS"
5594                 for CC_SHARED_OPTS in -fPIC -fpic ''
5595                 do
5596                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5597                         cat >conftest.$ac_ext <<_ACEOF
5598 #line 5598 "configure"
5599 #include "confdefs.h"
5600 #include <stdio.h>
5601 int
5602 main ()
5603 {
5604 int x = 1
5605   ;
5606   return 0;
5607 }
5608 _ACEOF
5609 rm -f conftest.$ac_objext
5610 if { (eval echo "$as_me:5610: \"$ac_compile\"") >&5
5611   (eval $ac_compile) 2>&5
5612   ac_status=$?
5613   echo "$as_me:5613: \$? = $ac_status" >&5
5614   (exit $ac_status); } &&
5615          { ac_try='test -s conftest.$ac_objext'
5616   { (eval echo "$as_me:5616: \"$ac_try\"") >&5
5617   (eval $ac_try) 2>&5
5618   ac_status=$?
5619   echo "$as_me:5619: \$? = $ac_status" >&5
5620   (exit $ac_status); }; }; then
5621   break
5622 else
5623   echo "$as_me: failed program was:" >&5
5624 cat conftest.$ac_ext >&5
5625 fi
5626 rm -f conftest.$ac_objext conftest.$ac_ext
5627                 done
5628                 echo "$as_me:5628: result: $CC_SHARED_OPTS" >&5
5629 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5630                 CFLAGS="$cf_save_CFLAGS"
5631         fi
5632
5633         cf_cv_shlib_version_infix=no
5634
5635         case $cf_cv_system_name in #(vi
5636         aix4.3-9*|aix[5-7]*) #(vi
5637                 if test "$GCC" = yes; then
5638                         CC_SHARED_OPTS=
5639                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5640                 else
5641                         # CC_SHARED_OPTS='-qpic=large -G'
5642                         # perhaps "-bM:SRE -bnoentry -bexpall"
5643                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5644                 fi
5645                 ;;
5646         beos*) #(vi
5647                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5648                 ;;
5649         cygwin*) #(vi
5650                 CC_SHARED_OPTS=
5651                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5652                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5653                 cf_cv_shlib_version=cygdll
5654                 cf_cv_shlib_version_infix=cygdll
5655                 cat >mk_shared_lib.sh <<-CF_EOF
5656                 #!/bin/sh
5657                 SHARED_LIB=\$1
5658                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5659                 shift
5660                 cat <<-EOF
5661                 Linking shared library
5662                 ** SHARED_LIB \$SHARED_LIB
5663                 ** IMPORT_LIB \$IMPORT_LIB
5664 EOF
5665                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5666 CF_EOF
5667                 chmod +x mk_shared_lib.sh
5668                 ;;
5669         darwin*) #(vi
5670                 cf_try_cflags="no-cpp-precomp"
5671                 CC_SHARED_OPTS="-dynamic"
5672                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5673                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5674                 cf_cv_shlib_version_infix=yes
5675                 echo "$as_me:5675: checking if ld -search_paths_first works" >&5
5676 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5677 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5678   echo $ECHO_N "(cached) $ECHO_C" >&6
5679 else
5680
5681                         cf_save_LDFLAGS=$LDFLAGS
5682                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5683                         cat >conftest.$ac_ext <<_ACEOF
5684 #line 5684 "configure"
5685 #include "confdefs.h"
5686
5687 int
5688 main ()
5689 {
5690 int i;
5691   ;
5692   return 0;
5693 }
5694 _ACEOF
5695 rm -f conftest.$ac_objext conftest$ac_exeext
5696 if { (eval echo "$as_me:5696: \"$ac_link\"") >&5
5697   (eval $ac_link) 2>&5
5698   ac_status=$?
5699   echo "$as_me:5699: \$? = $ac_status" >&5
5700   (exit $ac_status); } &&
5701          { ac_try='test -s conftest$ac_exeext'
5702   { (eval echo "$as_me:5702: \"$ac_try\"") >&5
5703   (eval $ac_try) 2>&5
5704   ac_status=$?
5705   echo "$as_me:5705: \$? = $ac_status" >&5
5706   (exit $ac_status); }; }; then
5707   cf_cv_ldflags_search_paths_first=yes
5708 else
5709   echo "$as_me: failed program was:" >&5
5710 cat conftest.$ac_ext >&5
5711 cf_cv_ldflags_search_paths_first=no
5712 fi
5713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5714                                 LDFLAGS=$cf_save_LDFLAGS
5715 fi
5716 echo "$as_me:5716: result: $cf_cv_ldflags_search_paths_first" >&5
5717 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5718                 if test $cf_cv_ldflags_search_paths_first = yes; then
5719                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5720                 fi
5721                 ;;
5722         hpux[7-8]*) #(vi
5723                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5724                 if test "$GCC" != yes; then
5725                         CC_SHARED_OPTS='+Z'
5726                 fi
5727                 MK_SHARED_LIB='${LD} -b -o $@'
5728                 INSTALL_LIB="-m 555"
5729                 ;;
5730         hpux*) #(vi
5731                 # (tested with gcc 2.7.2 -- I don't have c89)
5732                 if test "$GCC" = yes; then
5733                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5734                 else
5735                         CC_SHARED_OPTS='+Z'
5736                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5737                 fi
5738                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5739                 # HP-UX shared libraries must be executable, and should be
5740                 # readonly to exploit a quirk in the memory manager.
5741                 INSTALL_LIB="-m 555"
5742                 ;;
5743         interix*)
5744                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5745                 if test "$cf_cv_shlib_version" = rel; then
5746                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5747                 else
5748                         cf_shared_soname='`basename `'
5749                 fi
5750                 CC_SHARED_OPTS=
5751                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5752                 ;;
5753         irix*) #(vi
5754                 if test "$cf_cv_enable_rpath" = yes ; then
5755                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5756                 fi
5757                 # tested with IRIX 5.2 and 'cc'.
5758                 if test "$GCC" != yes; then
5759                         CC_SHARED_OPTS='-KPIC'
5760                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5761                 else
5762                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5763                 fi
5764                 cf_cv_rm_so_locs=yes
5765                 ;;
5766         linux*|gnu*|k*bsd*-gnu) #(vi
5767                 if test "$DFT_LWR_MODEL" = "shared" ; then
5768                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5769                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5770                 fi
5771                 if test "$cf_cv_enable_rpath" = yes ; then
5772                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5773                 fi
5774
5775         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5776         if test "$cf_cv_shlib_version" = rel; then
5777                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5778         else
5779                 cf_cv_shared_soname='`basename $@`'
5780         fi
5781
5782                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5783                 ;;
5784         mingw*) #(vi
5785                 cf_cv_shlib_version=mingw
5786                 cf_cv_shlib_version_infix=mingw
5787                 if test "$DFT_LWR_MODEL" = "shared" ; then
5788                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5789                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5790                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5791                 fi
5792                 CC_SHARED_OPTS=
5793                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5794                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5795                 cat >mk_shared_lib.sh <<-CF_EOF
5796                 #!/bin/sh
5797                 SHARED_LIB=\$1
5798                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5799                 shift
5800                 cat <<-EOF
5801                 Linking shared library
5802                 ** SHARED_LIB \$SHARED_LIB
5803                 ** IMPORT_LIB \$IMPORT_LIB
5804 EOF
5805                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5806 CF_EOF
5807                 chmod +x mk_shared_lib.sh
5808                 ;;
5809         openbsd[2-9].*|mirbsd*) #(vi
5810                 if test "$DFT_LWR_MODEL" = "shared" ; then
5811                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5812                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5813                 fi
5814                 if test "$cf_cv_enable_rpath" = yes ; then
5815                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5816                 fi
5817                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5818
5819         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5820         if test "$cf_cv_shlib_version" = rel; then
5821                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5822         else
5823                 cf_cv_shared_soname='`basename $@`'
5824         fi
5825
5826                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5827                 ;;
5828         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5829                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5830                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5831                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5832                 ;;
5833         dragonfly*|freebsd*) #(vi
5834                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5835                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5836                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5837                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5838                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5839                 fi
5840
5841         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5842         if test "$cf_cv_shlib_version" = rel; then
5843                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5844         else
5845                 cf_cv_shared_soname='`basename $@`'
5846         fi
5847
5848                 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -soname=`basename $@` -o $@'
5849                 ;;
5850         netbsd*) #(vi
5851                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5852                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5853                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5854                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5855                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5856                         if test "$cf_cv_shlib_version" = auto; then
5857                         if test -f /usr/libexec/ld.elf_so; then
5858                                 cf_cv_shlib_version=abi
5859                         else
5860                                 cf_cv_shlib_version=rel
5861                         fi
5862                         fi
5863
5864         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5865         if test "$cf_cv_shlib_version" = rel; then
5866                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5867         else
5868                 cf_cv_shared_soname='`basename $@`'
5869         fi
5870
5871                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5872                 else
5873                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5874                 fi
5875                 ;;
5876         osf*|mls+*) #(vi
5877                 # tested with OSF/1 V3.2 and 'cc'
5878                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5879                 # link with shared libs).
5880                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5881                 case $host_os in #(vi
5882                 osf4*)
5883                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5884                         ;;
5885                 esac
5886                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5887                 if test "$DFT_LWR_MODEL" = "shared" ; then
5888                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5889                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5890                 fi
5891                 cf_cv_rm_so_locs=yes
5892                 ;;
5893         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5894                 # tested with osr5.0.5
5895                 if test "$GCC" != yes; then
5896                         CC_SHARED_OPTS='-belf -KPIC'
5897                 fi
5898                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5899                 if test "$cf_cv_enable_rpath" = yes ; then
5900                         # only way is to set LD_RUN_PATH but no switch for it
5901                         RUN_PATH=$libdir
5902                 fi
5903                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5904                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5905                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5906                 ;;
5907         sunos4*) #(vi
5908                 # tested with SunOS 4.1.1 and gcc 2.7.0
5909                 if test "$GCC" != yes; then
5910                         CC_SHARED_OPTS='-KPIC'
5911                 fi
5912                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5913                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5914                 ;;
5915         solaris2*) #(vi
5916                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5917                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5918                 if test "$DFT_LWR_MODEL" = "shared" ; then
5919                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5920                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5921                 fi
5922                 if test "$cf_cv_enable_rpath" = yes ; then
5923                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5924                 fi
5925
5926         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5927         if test "$cf_cv_shlib_version" = rel; then
5928                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5929         else
5930                 cf_cv_shared_soname='`basename $@`'
5931         fi
5932
5933                 if test "$GCC" != yes; then
5934                         cf_save_CFLAGS="$CFLAGS"
5935                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5936                         do
5937                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5938                                 cat >conftest.$ac_ext <<_ACEOF
5939 #line 5939 "configure"
5940 #include "confdefs.h"
5941 #include <stdio.h>
5942 int
5943 main ()
5944 {
5945 printf("Hello\n");
5946   ;
5947   return 0;
5948 }
5949 _ACEOF
5950 rm -f conftest.$ac_objext
5951 if { (eval echo "$as_me:5951: \"$ac_compile\"") >&5
5952   (eval $ac_compile) 2>&5
5953   ac_status=$?
5954   echo "$as_me:5954: \$? = $ac_status" >&5
5955   (exit $ac_status); } &&
5956          { ac_try='test -s conftest.$ac_objext'
5957   { (eval echo "$as_me:5957: \"$ac_try\"") >&5
5958   (eval $ac_try) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); }; }; then
5962   break
5963 else
5964   echo "$as_me: failed program was:" >&5
5965 cat conftest.$ac_ext >&5
5966 fi
5967 rm -f conftest.$ac_objext conftest.$ac_ext
5968                         done
5969                         CFLAGS="$cf_save_CFLAGS"
5970                         CC_SHARED_OPTS=$cf_shared_opts
5971                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5972                 else
5973                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5974                 fi
5975                 ;;
5976         sysv5uw7*|unix_sv*) #(vi
5977                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5978                 if test "$GCC" != yes; then
5979                         CC_SHARED_OPTS='-KPIC'
5980                 fi
5981                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5982                 ;;
5983         *)
5984                 CC_SHARED_OPTS='unknown'
5985                 MK_SHARED_LIB='echo unknown'
5986                 ;;
5987         esac
5988
5989         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5990         case "$cf_cv_shlib_version" in #(vi
5991         rel|abi)
5992                 case "$MK_SHARED_LIB" in #(vi
5993                 *'-o $@') #(vi
5994                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5995                         ;;
5996                 *)
5997                         { echo "$as_me:5997: WARNING: ignored --with-shlib-version" >&5
5998 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5999                         ;;
6000                 esac
6001                 ;;
6002         esac
6003
6004         if test -n "$cf_try_cflags"
6005         then
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6007 "${as_me:-configure}"
6008 #include <stdio.h>
6009 int main(int argc, char *argv[])
6010 {
6011         printf("hello\n");
6012         return (argv[argc-1] == 0) ;
6013 }
6014 EOF
6015                 cf_save_CFLAGS="$CFLAGS"
6016                 for cf_opt in $cf_try_cflags
6017                 do
6018                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6019                         echo "$as_me:6019: checking if CFLAGS option -$cf_opt works" >&5
6020 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6021                         if { (eval echo "$as_me:6021: \"$ac_compile\"") >&5
6022   (eval $ac_compile) 2>&5
6023   ac_status=$?
6024   echo "$as_me:6024: \$? = $ac_status" >&5
6025   (exit $ac_status); }; then
6026                                 echo "$as_me:6026: result: yes" >&5
6027 echo "${ECHO_T}yes" >&6
6028                                 cf_save_CFLAGS="$CFLAGS"
6029                         else
6030                                 echo "$as_me:6030: result: no" >&5
6031 echo "${ECHO_T}no" >&6
6032                         fi
6033                 done
6034                 CFLAGS="$cf_save_CFLAGS"
6035         fi
6036
6037         # RPATH_LIST is a colon-separated list of directories
6038         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6039         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6040
6041         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6042
6043         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6044
6045 echo "${as_me:-configure}:6045: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6046
6047         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6048
6049 echo "${as_me:-configure}:6049: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6050
6051 if test "$CC_SHARED_OPTS" = "unknown"; then
6052         for model in $cf_list_models; do
6053                 if test "$model" = "shared"; then
6054                         { { echo "$as_me:6054: error: Shared libraries are not supported in this version" >&5
6055 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6056    { (exit 1); exit 1; }; }
6057                 fi
6058         done
6059 fi
6060
6061 ### If we're building with rpath, try to link non-standard libs that way too.
6062 if test "$DFT_LWR_MODEL" = "shared"; then
6063
6064 echo "$as_me:6064: checking if rpath-hack should be disabled" >&5
6065 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6066
6067 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6068 if test "${enable_rpath_hack+set}" = set; then
6069   enableval="$enable_rpath_hack"
6070   test "$enableval" != no && enableval=yes
6071   if test "$enableval" != "yes" ; then
6072     cf_disable_rpath_hack=yes
6073   else
6074     cf_disable_rpath_hack=no
6075   fi
6076 else
6077   enableval=yes
6078   cf_disable_rpath_hack=no
6079
6080 fi;
6081 echo "$as_me:6081: result: $cf_disable_rpath_hack" >&5
6082 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6083 if test "$cf_disable_rpath_hack" = no ; then
6084
6085 echo "$as_me:6085: checking for updated LDFLAGS" >&5
6086 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6087 if test -n "$LD_RPATH_OPT" ; then
6088         echo "$as_me:6088: result: maybe" >&5
6089 echo "${ECHO_T}maybe" >&6
6090
6091         for ac_prog in ldd
6092 do
6093   # Extract the first word of "$ac_prog", so it can be a program name with args.
6094 set dummy $ac_prog; ac_word=$2
6095 echo "$as_me:6095: checking for $ac_word" >&5
6096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6097 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6098   echo $ECHO_N "(cached) $ECHO_C" >&6
6099 else
6100   if test -n "$cf_ldd_prog"; then
6101   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6102 else
6103   ac_save_IFS=$IFS; IFS=$ac_path_separator
6104 ac_dummy="$PATH"
6105 for ac_dir in $ac_dummy; do
6106   IFS=$ac_save_IFS
6107   test -z "$ac_dir" && ac_dir=.
6108   $as_executable_p "$ac_dir/$ac_word" || continue
6109 ac_cv_prog_cf_ldd_prog="$ac_prog"
6110 echo "$as_me:6110: found $ac_dir/$ac_word" >&5
6111 break
6112 done
6113
6114 fi
6115 fi
6116 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6117 if test -n "$cf_ldd_prog"; then
6118   echo "$as_me:6118: result: $cf_ldd_prog" >&5
6119 echo "${ECHO_T}$cf_ldd_prog" >&6
6120 else
6121   echo "$as_me:6121: result: no" >&5
6122 echo "${ECHO_T}no" >&6
6123 fi
6124
6125   test -n "$cf_ldd_prog" && break
6126 done
6127 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6128
6129         cf_rpath_list="/usr/lib /lib"
6130         if test "$cf_ldd_prog" != no
6131         then
6132                 cf_rpath_oops=
6133
6134 cat >conftest.$ac_ext <<_ACEOF
6135 #line 6135 "configure"
6136 #include "confdefs.h"
6137 #include <stdio.h>
6138 int
6139 main ()
6140 {
6141 printf("Hello");
6142   ;
6143   return 0;
6144 }
6145 _ACEOF
6146 rm -f conftest.$ac_objext conftest$ac_exeext
6147 if { (eval echo "$as_me:6147: \"$ac_link\"") >&5
6148   (eval $ac_link) 2>&5
6149   ac_status=$?
6150   echo "$as_me:6150: \$? = $ac_status" >&5
6151   (exit $ac_status); } &&
6152          { ac_try='test -s conftest$ac_exeext'
6153   { (eval echo "$as_me:6153: \"$ac_try\"") >&5
6154   (eval $ac_try) 2>&5
6155   ac_status=$?
6156   echo "$as_me:6156: \$? = $ac_status" >&5
6157   (exit $ac_status); }; }; then
6158   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6159                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6160 else
6161   echo "$as_me: failed program was:" >&5
6162 cat conftest.$ac_ext >&5
6163 fi
6164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6165
6166                 # If we passed the link-test, but get a "not found" on a given library,
6167                 # this could be due to inept reconfiguration of gcc to make it only
6168                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6169                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6170                 # /usr/local libraries.
6171                 if test -n "$cf_rpath_oops"
6172                 then
6173                         for cf_rpath_src in $cf_rpath_oops
6174                         do
6175                                 for cf_rpath_dir in \
6176                                         /usr/local \
6177                                         /usr/pkg \
6178                                         /opt/sfw
6179                                 do
6180                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6181                                         then
6182                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6183
6184 echo "${as_me:-configure}:6184: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6185
6186                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6187                                                 break
6188                                         fi
6189                                 done
6190                         done
6191                 fi
6192         fi
6193
6194         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6195
6196 echo "${as_me:-configure}:6196: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6197
6198 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6199
6200 echo "${as_me:-configure}:6200: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6201
6202 cf_rpath_dst=
6203 for cf_rpath_src in $LDFLAGS
6204 do
6205         case $cf_rpath_src in #(vi
6206         -L*) #(vi
6207
6208                 # check if this refers to a directory which we will ignore
6209                 cf_rpath_skip=no
6210                 if test -n "$cf_rpath_list"
6211                 then
6212                         for cf_rpath_item in $cf_rpath_list
6213                         do
6214                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6215                                 then
6216                                         cf_rpath_skip=yes
6217                                         break
6218                                 fi
6219                         done
6220                 fi
6221
6222                 if test "$cf_rpath_skip" = no
6223                 then
6224                         # transform the option
6225                         if test "$LD_RPATH_OPT" = "-R " ; then
6226                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6227                         else
6228                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6229                         fi
6230
6231                         # if we have not already added this, add it now
6232                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6233                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6234                         then
6235                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6236
6237 echo "${as_me:-configure}:6237: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6238
6239                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6240                         fi
6241                 fi
6242                 ;;
6243         esac
6244         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6245 done
6246 LDFLAGS=$cf_rpath_dst
6247
6248 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6249
6250 echo "${as_me:-configure}:6250: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6251
6252 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6253
6254 echo "${as_me:-configure}:6254: testing ...checking LIBS $LIBS ..." 1>&5
6255
6256 cf_rpath_dst=
6257 for cf_rpath_src in $LIBS
6258 do
6259         case $cf_rpath_src in #(vi
6260         -L*) #(vi
6261
6262                 # check if this refers to a directory which we will ignore
6263                 cf_rpath_skip=no
6264                 if test -n "$cf_rpath_list"
6265                 then
6266                         for cf_rpath_item in $cf_rpath_list
6267                         do
6268                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6269                                 then
6270                                         cf_rpath_skip=yes
6271                                         break
6272                                 fi
6273                         done
6274                 fi
6275
6276                 if test "$cf_rpath_skip" = no
6277                 then
6278                         # transform the option
6279                         if test "$LD_RPATH_OPT" = "-R " ; then
6280                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6281                         else
6282                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6283                         fi
6284
6285                         # if we have not already added this, add it now
6286                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6287                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6288                         then
6289                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6290
6291 echo "${as_me:-configure}:6291: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6292
6293                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6294                         fi
6295                 fi
6296                 ;;
6297         esac
6298         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6299 done
6300 LIBS=$cf_rpath_dst
6301
6302 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6303
6304 echo "${as_me:-configure}:6304: testing ...checked LIBS $LIBS ..." 1>&5
6305
6306         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6307
6308 echo "${as_me:-configure}:6308: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6309
6310 else
6311         echo "$as_me:6311: result: no" >&5
6312 echo "${ECHO_T}no" >&6
6313 fi
6314
6315 fi
6316
6317 fi
6318
6319 ###############################################################################
6320
6321 ###     use option --disable-overwrite to leave out the link to -lcurses
6322 echo "$as_me:6322: checking if you wish to install ncurses overwriting curses" >&5
6323 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6324
6325 # Check whether --enable-overwrite or --disable-overwrite was given.
6326 if test "${enable_overwrite+set}" = set; then
6327   enableval="$enable_overwrite"
6328   with_overwrite=$enableval
6329 else
6330   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6331 fi;
6332 echo "$as_me:6332: result: $with_overwrite" >&5
6333 echo "${ECHO_T}$with_overwrite" >&6
6334
6335 echo "$as_me:6335: checking if external terminfo-database is used" >&5
6336 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6337
6338 # Check whether --enable-database or --disable-database was given.
6339 if test "${enable_database+set}" = set; then
6340   enableval="$enable_database"
6341   use_database=$enableval
6342 else
6343   use_database=yes
6344 fi;
6345 echo "$as_me:6345: result: $use_database" >&5
6346 echo "${ECHO_T}$use_database" >&6
6347
6348 case $host_os in #(vi
6349 os2*) #(vi
6350         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6351         ;;
6352 *) #(vi
6353         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6354         ;;
6355 esac
6356
6357 NCURSES_USE_DATABASE=0
6358 if test "$use_database" != no ; then
6359         NCURSES_USE_DATABASE=1
6360
6361         echo "$as_me:6361: checking which terminfo source-file will be installed" >&5
6362 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6363
6364 # Check whether --with-database or --without-database was given.
6365 if test "${with_database+set}" = set; then
6366   withval="$with_database"
6367   TERMINFO_SRC=$withval
6368 fi;
6369         echo "$as_me:6369: result: $TERMINFO_SRC" >&5
6370 echo "${ECHO_T}$TERMINFO_SRC" >&6
6371
6372         echo "$as_me:6372: checking whether to use hashed database instead of directory/tree" >&5
6373 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6374
6375 # Check whether --with-hashed-db or --without-hashed-db was given.
6376 if test "${with_hashed_db+set}" = set; then
6377   withval="$with_hashed_db"
6378
6379 else
6380   with_hashed_db=no
6381 fi;
6382         echo "$as_me:6382: result: $with_hashed_db" >&5
6383 echo "${ECHO_T}$with_hashed_db" >&6
6384 else
6385         with_hashed_db=no
6386 fi
6387
6388 echo "$as_me:6388: checking for list of fallback descriptions" >&5
6389 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6390
6391 # Check whether --with-fallbacks or --without-fallbacks was given.
6392 if test "${with_fallbacks+set}" = set; then
6393   withval="$with_fallbacks"
6394   with_fallback=$withval
6395 else
6396   with_fallback=
6397 fi;
6398 echo "$as_me:6398: result: $with_fallback" >&5
6399 echo "${ECHO_T}$with_fallback" >&6
6400 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6401
6402 echo "$as_me:6402: checking if you want modern xterm or antique" >&5
6403 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6404
6405 # Check whether --with-xterm-new or --without-xterm-new was given.
6406 if test "${with_xterm_new+set}" = set; then
6407   withval="$with_xterm_new"
6408   with_xterm_new=$withval
6409 else
6410   with_xterm_new=yes
6411 fi;
6412 case $with_xterm_new in
6413 no)     with_xterm_new=xterm-old;;
6414 *)      with_xterm_new=xterm-new;;
6415 esac
6416 echo "$as_me:6416: result: $with_xterm_new" >&5
6417 echo "${ECHO_T}$with_xterm_new" >&6
6418 WHICH_XTERM=$with_xterm_new
6419
6420 echo "$as_me:6420: checking if xterm backspace sends BS or DEL" >&5
6421 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6422
6423 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6424 if test "${with_xterm_kbs+set}" = set; then
6425   withval="$with_xterm_kbs"
6426   with_xterm_kbs=$withval
6427 else
6428   with_xterm_kbs=BS
6429 fi;
6430 case x$with_xterm_kbs in
6431 xyes|xno|xBS|xbs|x8)
6432         with_xterm_kbs=BS
6433         ;;
6434 xDEL|xdel|x127)
6435         with_xterm_kbs=DEL
6436         ;;
6437 *)
6438         with_xterm_kbs=$withval
6439         ;;
6440 esac
6441 echo "$as_me:6441: result: $with_xterm_kbs" >&5
6442 echo "${ECHO_T}$with_xterm_kbs" >&6
6443 XTERM_KBS=$with_xterm_kbs
6444
6445 MAKE_TERMINFO=
6446 if test "$use_database" = no ; then
6447         TERMINFO="${datadir}/terminfo"
6448         MAKE_TERMINFO="#"
6449 else
6450
6451 echo "$as_me:6451: checking for list of terminfo directories" >&5
6452 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6453
6454 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6455 if test "${with_terminfo_dirs+set}" = set; then
6456   withval="$with_terminfo_dirs"
6457
6458 else
6459   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6460 fi;
6461 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6462 cf_dst_path=
6463 for cf_src_path in $withval
6464 do
6465
6466 if test "x$prefix" != xNONE; then
6467   cf_path_syntax="$prefix"
6468 else
6469   cf_path_syntax="$ac_default_prefix"
6470 fi
6471
6472 case ".$cf_src_path" in #(vi
6473 .\$\(*\)*|.\'*\'*) #(vi
6474   ;;
6475 ..|./*|.\\*) #(vi
6476   ;;
6477 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6478   ;;
6479 .\${*prefix}*|.\${*dir}*) #(vi
6480   eval cf_src_path="$cf_src_path"
6481   case ".$cf_src_path" in #(vi
6482   .NONE/*)
6483     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6484     ;;
6485   esac
6486   ;; #(vi
6487 .no|.NONE/*)
6488   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6489   ;;
6490 *)
6491   { { echo "$as_me:6491: error: expected a pathname, not \"$cf_src_path\"" >&5
6492 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6493    { (exit 1); exit 1; }; }
6494   ;;
6495 esac
6496
6497   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6498   cf_dst_path="${cf_dst_path}${cf_src_path}"
6499 done
6500 IFS="$ac_save_ifs"
6501
6502 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6503 # so we have to check/work around.  We do prefer the result of "eval"...
6504 eval cf_dst_eval="$cf_dst_path"
6505 case "x$cf_dst_eval" in #(vi
6506 xNONE*) #(vi
6507         TERMINFO_DIRS=$cf_dst_path
6508         ;;
6509 *)
6510         TERMINFO_DIRS="$cf_dst_eval"
6511         ;;
6512 esac
6513
6514 echo "$as_me:6514: result: $TERMINFO_DIRS" >&5
6515 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6516 test -n "$TERMINFO_DIRS" &&
6517 cat >>confdefs.h <<EOF
6518 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6519 EOF
6520
6521 echo "$as_me:6521: checking for default terminfo directory" >&5
6522 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6523
6524 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6525 if test "${with_default_terminfo_dir+set}" = set; then
6526   withval="$with_default_terminfo_dir"
6527
6528 else
6529   withval="${TERMINFO:-${datadir}/terminfo}"
6530 fi; if test -n "${datadir}/terminfo" ; then
6531
6532 if test "x$prefix" != xNONE; then
6533   cf_path_syntax="$prefix"
6534 else
6535   cf_path_syntax="$ac_default_prefix"
6536 fi
6537
6538 case ".$withval" in #(vi
6539 .\$\(*\)*|.\'*\'*) #(vi
6540   ;;
6541 ..|./*|.\\*) #(vi
6542   ;;
6543 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6544   ;;
6545 .\${*prefix}*|.\${*dir}*) #(vi
6546   eval withval="$withval"
6547   case ".$withval" in #(vi
6548   .NONE/*)
6549     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6550     ;;
6551   esac
6552   ;; #(vi
6553 .no|.NONE/*)
6554   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6555   ;;
6556 *)
6557   { { echo "$as_me:6557: error: expected a pathname, not \"$withval\"" >&5
6558 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6559    { (exit 1); exit 1; }; }
6560   ;;
6561 esac
6562
6563 fi
6564 eval TERMINFO="$withval"
6565
6566 echo "$as_me:6566: result: $TERMINFO" >&5
6567 echo "${ECHO_T}$TERMINFO" >&6
6568
6569 cat >>confdefs.h <<EOF
6570 #define TERMINFO "$TERMINFO"
6571 EOF
6572
6573 fi
6574
6575 ###     use option --disable-big-core to make tic run on small machines
6576 ###     We need 4Mb, check if we can allocate 50% more than that.
6577 echo "$as_me:6577: checking if big-core option selected" >&5
6578 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6579
6580 # Check whether --enable-big-core or --disable-big-core was given.
6581 if test "${enable_big_core+set}" = set; then
6582   enableval="$enable_big_core"
6583   with_big_core=$enableval
6584 else
6585   if test "$cross_compiling" = yes; then
6586   with_big_core=no
6587 else
6588   cat >conftest.$ac_ext <<_ACEOF
6589 #line 6589 "configure"
6590 #include "confdefs.h"
6591
6592 #include <stdlib.h>
6593 #include <string.h>
6594 int main() {
6595         unsigned long n = 6000000L;
6596         char *s = malloc(n);
6597         if (s != 0)
6598                 s[0] = s[n-1] = 0;
6599         ${cf_cv_main_return:-return}(s == 0);
6600 }
6601 _ACEOF
6602 rm -f conftest$ac_exeext
6603 if { (eval echo "$as_me:6603: \"$ac_link\"") >&5
6604   (eval $ac_link) 2>&5
6605   ac_status=$?
6606   echo "$as_me:6606: \$? = $ac_status" >&5
6607   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6608   { (eval echo "$as_me:6608: \"$ac_try\"") >&5
6609   (eval $ac_try) 2>&5
6610   ac_status=$?
6611   echo "$as_me:6611: \$? = $ac_status" >&5
6612   (exit $ac_status); }; }; then
6613   with_big_core=yes
6614 else
6615   echo "$as_me: program exited with status $ac_status" >&5
6616 echo "$as_me: failed program was:" >&5
6617 cat conftest.$ac_ext >&5
6618 with_big_core=no
6619 fi
6620 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6621 fi
6622 fi;
6623 echo "$as_me:6623: result: $with_big_core" >&5
6624 echo "${ECHO_T}$with_big_core" >&6
6625 test "x$with_big_core" = "xyes" &&
6626 cat >>confdefs.h <<\EOF
6627 #define HAVE_BIG_CORE 1
6628 EOF
6629
6630 ### ISO C only guarantees 512-char strings, we have tables which load faster
6631 ### when constructed using "big" strings.  More than the C compiler, the awk
6632 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6633 echo "$as_me:6633: checking if big-strings option selected" >&5
6634 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6635
6636 # Check whether --enable-big-strings or --disable-big-strings was given.
6637 if test "${enable_big_strings+set}" = set; then
6638   enableval="$enable_big_strings"
6639   with_big_strings=$enableval
6640 else
6641
6642         case x$AWK in #(vi
6643         x)
6644                 eval with_big_strings=no
6645                 ;;
6646         *) #(vi
6647                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6648                         | $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
6649                         eval with_big_strings=yes
6650                 else
6651                         eval with_big_strings=no
6652                 fi
6653                 ;;
6654         esac
6655
6656 fi;
6657 echo "$as_me:6657: result: $with_big_strings" >&5
6658 echo "${ECHO_T}$with_big_strings" >&6
6659
6660 USE_BIG_STRINGS=0
6661 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6662
6663 ###     use option --enable-termcap to compile in the termcap fallback support
6664 echo "$as_me:6664: checking if you want termcap-fallback support" >&5
6665 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6666
6667 # Check whether --enable-termcap or --disable-termcap was given.
6668 if test "${enable_termcap+set}" = set; then
6669   enableval="$enable_termcap"
6670   with_termcap=$enableval
6671 else
6672   with_termcap=no
6673 fi;
6674 echo "$as_me:6674: result: $with_termcap" >&5
6675 echo "${ECHO_T}$with_termcap" >&6
6676
6677 NCURSES_USE_TERMCAP=0
6678 if test "x$with_termcap" != "xyes" ; then
6679         if test "$use_database" = no ; then
6680                 if test -z "$with_fallback" ; then
6681                         { { echo "$as_me:6681: error: You have disabled the database w/o specifying fallbacks" >&5
6682 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6683    { (exit 1); exit 1; }; }
6684                 fi
6685         fi
6686
6687 cat >>confdefs.h <<\EOF
6688 #define PURE_TERMINFO 1
6689 EOF
6690
6691 else
6692
6693         if test "$with_ticlib" != no ; then
6694                 { { echo "$as_me:6694: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6695 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6696    { (exit 1); exit 1; }; }
6697         fi
6698
6699         NCURSES_USE_TERMCAP=1
6700         echo "$as_me:6700: checking for list of termcap files" >&5
6701 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6702
6703 # Check whether --with-termpath or --without-termpath was given.
6704 if test "${with_termpath+set}" = set; then
6705   withval="$with_termpath"
6706
6707 else
6708   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6709 fi;
6710 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6711 cf_dst_path=
6712 for cf_src_path in $withval
6713 do
6714
6715 if test "x$prefix" != xNONE; then
6716   cf_path_syntax="$prefix"
6717 else
6718   cf_path_syntax="$ac_default_prefix"
6719 fi
6720
6721 case ".$cf_src_path" in #(vi
6722 .\$\(*\)*|.\'*\'*) #(vi
6723   ;;
6724 ..|./*|.\\*) #(vi
6725   ;;
6726 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6727   ;;
6728 .\${*prefix}*|.\${*dir}*) #(vi
6729   eval cf_src_path="$cf_src_path"
6730   case ".$cf_src_path" in #(vi
6731   .NONE/*)
6732     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6733     ;;
6734   esac
6735   ;; #(vi
6736 .no|.NONE/*)
6737   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6738   ;;
6739 *)
6740   { { echo "$as_me:6740: error: expected a pathname, not \"$cf_src_path\"" >&5
6741 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6742    { (exit 1); exit 1; }; }
6743   ;;
6744 esac
6745
6746   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6747   cf_dst_path="${cf_dst_path}${cf_src_path}"
6748 done
6749 IFS="$ac_save_ifs"
6750
6751 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6752 # so we have to check/work around.  We do prefer the result of "eval"...
6753 eval cf_dst_eval="$cf_dst_path"
6754 case "x$cf_dst_eval" in #(vi
6755 xNONE*) #(vi
6756         TERMPATH=$cf_dst_path
6757         ;;
6758 *)
6759         TERMPATH="$cf_dst_eval"
6760         ;;
6761 esac
6762
6763         echo "$as_me:6763: result: $TERMPATH" >&5
6764 echo "${ECHO_T}$TERMPATH" >&6
6765         test -n "$TERMPATH" &&
6766 cat >>confdefs.h <<EOF
6767 #define TERMPATH "$TERMPATH"
6768 EOF
6769
6770         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6771         echo "$as_me:6771: checking if fast termcap-loader is needed" >&5
6772 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6773
6774 # Check whether --enable-getcap or --disable-getcap was given.
6775 if test "${enable_getcap+set}" = set; then
6776   enableval="$enable_getcap"
6777   with_getcap=$enableval
6778 else
6779   with_getcap=no
6780 fi;
6781         echo "$as_me:6781: result: $with_getcap" >&5
6782 echo "${ECHO_T}$with_getcap" >&6
6783         test "x$with_getcap" = "xyes" &&
6784 cat >>confdefs.h <<\EOF
6785 #define USE_GETCAP 1
6786 EOF
6787
6788         echo "$as_me:6788: checking if translated termcaps will be cached in ~/.terminfo" >&5
6789 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6790
6791 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6792 if test "${enable_getcap_cache+set}" = set; then
6793   enableval="$enable_getcap_cache"
6794   with_getcap_cache=$enableval
6795 else
6796   with_getcap_cache=no
6797 fi;
6798         echo "$as_me:6798: result: $with_getcap_cache" >&5
6799 echo "${ECHO_T}$with_getcap_cache" >&6
6800         test "x$with_getcap_cache" = "xyes" &&
6801 cat >>confdefs.h <<\EOF
6802 #define USE_GETCAP_CACHE 1
6803 EOF
6804
6805 fi
6806
6807 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6808 echo "$as_me:6808: checking if ~/.terminfo is wanted" >&5
6809 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6810
6811 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6812 if test "${enable_home_terminfo+set}" = set; then
6813   enableval="$enable_home_terminfo"
6814   with_home_terminfo=$enableval
6815 else
6816   with_home_terminfo=yes
6817 fi;
6818 echo "$as_me:6818: result: $with_home_terminfo" >&5
6819 echo "${ECHO_T}$with_home_terminfo" >&6
6820 test "x$with_home_terminfo" = "xyes" &&
6821 cat >>confdefs.h <<\EOF
6822 #define USE_HOME_TERMINFO 1
6823 EOF
6824
6825 echo "$as_me:6825: checking if you want to use restricted environment when running as root" >&5
6826 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6827
6828 # Check whether --enable-root-environ or --disable-root-environ was given.
6829 if test "${enable_root_environ+set}" = set; then
6830   enableval="$enable_root_environ"
6831   with_root_environ=$enableval
6832 else
6833   with_root_environ=yes
6834 fi;
6835 echo "$as_me:6835: result: $with_root_environ" >&5
6836 echo "${ECHO_T}$with_root_environ" >&6
6837 test "x$with_root_environ" = xyes &&
6838 cat >>confdefs.h <<\EOF
6839 #define USE_ROOT_ENVIRON 1
6840 EOF
6841
6842 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6843 ###   to reduce storage requirements for the terminfo database.
6844
6845 for ac_func in \
6846         remove \
6847         unlink
6848 do
6849 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6850 echo "$as_me:6850: checking for $ac_func" >&5
6851 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6852 if eval "test \"\${$as_ac_var+set}\" = set"; then
6853   echo $ECHO_N "(cached) $ECHO_C" >&6
6854 else
6855   cat >conftest.$ac_ext <<_ACEOF
6856 #line 6856 "configure"
6857 #include "confdefs.h"
6858 /* System header to define __stub macros and hopefully few prototypes,
6859     which can conflict with char $ac_func (); below.  */
6860 #include <assert.h>
6861 /* Override any gcc2 internal prototype to avoid an error.  */
6862 #ifdef __cplusplus
6863 extern "C"
6864 #endif
6865 /* We use char because int might match the return type of a gcc2
6866    builtin and then its argument prototype would still apply.  */
6867 char $ac_func ();
6868 char (*f) ();
6869
6870 int
6871 main ()
6872 {
6873 /* The GNU C library defines this for functions which it implements
6874     to always fail with ENOSYS.  Some functions are actually named
6875     something starting with __ and the normal name is an alias.  */
6876 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6877 choke me
6878 #else
6879 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6880 #endif
6881
6882   ;
6883   return 0;
6884 }
6885 _ACEOF
6886 rm -f conftest.$ac_objext conftest$ac_exeext
6887 if { (eval echo "$as_me:6887: \"$ac_link\"") >&5
6888   (eval $ac_link) 2>&5
6889   ac_status=$?
6890   echo "$as_me:6890: \$? = $ac_status" >&5
6891   (exit $ac_status); } &&
6892          { ac_try='test -s conftest$ac_exeext'
6893   { (eval echo "$as_me:6893: \"$ac_try\"") >&5
6894   (eval $ac_try) 2>&5
6895   ac_status=$?
6896   echo "$as_me:6896: \$? = $ac_status" >&5
6897   (exit $ac_status); }; }; then
6898   eval "$as_ac_var=yes"
6899 else
6900   echo "$as_me: failed program was:" >&5
6901 cat conftest.$ac_ext >&5
6902 eval "$as_ac_var=no"
6903 fi
6904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6905 fi
6906 echo "$as_me:6906: result: `eval echo '${'$as_ac_var'}'`" >&5
6907 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6908 if test `eval echo '${'$as_ac_var'}'` = yes; then
6909   cat >>confdefs.h <<EOF
6910 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6911 EOF
6912
6913 fi
6914 done
6915
6916 if test "$cross_compiling" = yes ; then
6917
6918 for ac_func in \
6919                 link \
6920                 symlink
6921 do
6922 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6923 echo "$as_me:6923: checking for $ac_func" >&5
6924 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6925 if eval "test \"\${$as_ac_var+set}\" = set"; then
6926   echo $ECHO_N "(cached) $ECHO_C" >&6
6927 else
6928   cat >conftest.$ac_ext <<_ACEOF
6929 #line 6929 "configure"
6930 #include "confdefs.h"
6931 /* System header to define __stub macros and hopefully few prototypes,
6932     which can conflict with char $ac_func (); below.  */
6933 #include <assert.h>
6934 /* Override any gcc2 internal prototype to avoid an error.  */
6935 #ifdef __cplusplus
6936 extern "C"
6937 #endif
6938 /* We use char because int might match the return type of a gcc2
6939    builtin and then its argument prototype would still apply.  */
6940 char $ac_func ();
6941 char (*f) ();
6942
6943 int
6944 main ()
6945 {
6946 /* The GNU C library defines this for functions which it implements
6947     to always fail with ENOSYS.  Some functions are actually named
6948     something starting with __ and the normal name is an alias.  */
6949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6950 choke me
6951 #else
6952 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6953 #endif
6954
6955   ;
6956   return 0;
6957 }
6958 _ACEOF
6959 rm -f conftest.$ac_objext conftest$ac_exeext
6960 if { (eval echo "$as_me:6960: \"$ac_link\"") >&5
6961   (eval $ac_link) 2>&5
6962   ac_status=$?
6963   echo "$as_me:6963: \$? = $ac_status" >&5
6964   (exit $ac_status); } &&
6965          { ac_try='test -s conftest$ac_exeext'
6966   { (eval echo "$as_me:6966: \"$ac_try\"") >&5
6967   (eval $ac_try) 2>&5
6968   ac_status=$?
6969   echo "$as_me:6969: \$? = $ac_status" >&5
6970   (exit $ac_status); }; }; then
6971   eval "$as_ac_var=yes"
6972 else
6973   echo "$as_me: failed program was:" >&5
6974 cat conftest.$ac_ext >&5
6975 eval "$as_ac_var=no"
6976 fi
6977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6978 fi
6979 echo "$as_me:6979: result: `eval echo '${'$as_ac_var'}'`" >&5
6980 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6981 if test `eval echo '${'$as_ac_var'}'` = yes; then
6982   cat >>confdefs.h <<EOF
6983 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6984 EOF
6985
6986 fi
6987 done
6988
6989 else
6990         echo "$as_me:6990: checking if link/symlink functions work" >&5
6991 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6992 if test "${cf_cv_link_funcs+set}" = set; then
6993   echo $ECHO_N "(cached) $ECHO_C" >&6
6994 else
6995
6996                 cf_cv_link_funcs=
6997                 for cf_func in link symlink ; do
6998                         if test "$cross_compiling" = yes; then
6999
7000                         eval 'ac_cv_func_'$cf_func'=error'
7001 else
7002   cat >conftest.$ac_ext <<_ACEOF
7003 #line 7003 "configure"
7004 #include "confdefs.h"
7005
7006 #include <sys/types.h>
7007 #include <sys/stat.h>
7008 #ifdef HAVE_UNISTD_H
7009 #include <unistd.h>
7010 #endif
7011 int main()
7012 {
7013         int fail = 0;
7014         char *src = "config.log";
7015         char *dst = "conftest.chk";
7016         struct stat src_sb;
7017         struct stat dst_sb;
7018
7019         stat(src, &src_sb);
7020         fail = ($cf_func("config.log", "conftest.chk") < 0)
7021             || (stat(dst, &dst_sb) < 0)
7022             || (dst_sb.st_mtime != src_sb.st_mtime);
7023 #ifdef HAVE_UNLINK
7024         unlink(dst);
7025 #else
7026         remove(dst);
7027 #endif
7028         ${cf_cv_main_return:-return} (fail);
7029 }
7030
7031 _ACEOF
7032 rm -f conftest$ac_exeext
7033 if { (eval echo "$as_me:7033: \"$ac_link\"") >&5
7034   (eval $ac_link) 2>&5
7035   ac_status=$?
7036   echo "$as_me:7036: \$? = $ac_status" >&5
7037   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7038   { (eval echo "$as_me:7038: \"$ac_try\"") >&5
7039   (eval $ac_try) 2>&5
7040   ac_status=$?
7041   echo "$as_me:7041: \$? = $ac_status" >&5
7042   (exit $ac_status); }; }; then
7043
7044                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7045                         eval 'ac_cv_func_'$cf_func'=yes'
7046 else
7047   echo "$as_me: program exited with status $ac_status" >&5
7048 echo "$as_me: failed program was:" >&5
7049 cat conftest.$ac_ext >&5
7050
7051                         eval 'ac_cv_func_'$cf_func'=no'
7052 fi
7053 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7054 fi
7055                 done
7056                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7057
7058 fi
7059 echo "$as_me:7059: result: $cf_cv_link_funcs" >&5
7060 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7061         test "$ac_cv_func_link"    = yes &&
7062 cat >>confdefs.h <<\EOF
7063 #define HAVE_LINK 1
7064 EOF
7065
7066         test "$ac_cv_func_symlink" = yes &&
7067 cat >>confdefs.h <<\EOF
7068 #define HAVE_SYMLINK 1
7069 EOF
7070
7071 fi
7072
7073 with_links=no
7074 with_symlinks=no
7075
7076 # soft links (symbolic links) are useful for some systems where hard links do
7077 # not work, or to make it simpler to copy terminfo trees around.
7078 if test "x$ac_cv_func_symlink" = xyes ; then
7079     echo "$as_me:7079: checking if tic should use symbolic links" >&5
7080 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7081
7082 # Check whether --enable-symlinks or --disable-symlinks was given.
7083 if test "${enable_symlinks+set}" = set; then
7084   enableval="$enable_symlinks"
7085   with_symlinks=$enableval
7086 else
7087   with_symlinks=no
7088 fi;
7089     echo "$as_me:7089: result: $with_symlinks" >&5
7090 echo "${ECHO_T}$with_symlinks" >&6
7091 fi
7092
7093 # If we have hard links and did not choose to use soft links instead, there is
7094 # no reason to make this choice optional - use the hard links.
7095 if test "$with_symlinks" = no ; then
7096     echo "$as_me:7096: checking if tic should use hard links" >&5
7097 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7098     if test "x$ac_cv_func_link" = xyes ; then
7099         with_links=yes
7100     else
7101         with_links=no
7102     fi
7103     echo "$as_me:7103: result: $with_links" >&5
7104 echo "${ECHO_T}$with_links" >&6
7105 fi
7106
7107 test "x$with_links" = xyes &&
7108 cat >>confdefs.h <<\EOF
7109 #define USE_LINKS 1
7110 EOF
7111
7112 test "x$with_symlinks" = xyes &&
7113 cat >>confdefs.h <<\EOF
7114 #define USE_SYMLINKS 1
7115 EOF
7116
7117 ###   use option --enable-broken-linker to force on use of broken-linker support
7118 echo "$as_me:7118: checking if you want broken-linker support code" >&5
7119 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7120
7121 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7122 if test "${enable_broken_linker+set}" = set; then
7123   enableval="$enable_broken_linker"
7124   with_broken_linker=$enableval
7125 else
7126   with_broken_linker=${BROKEN_LINKER:-no}
7127 fi;
7128 echo "$as_me:7128: result: $with_broken_linker" >&5
7129 echo "${ECHO_T}$with_broken_linker" >&6
7130
7131 BROKEN_LINKER=0
7132 if test "x$with_broken_linker" = xyes ; then
7133
7134 cat >>confdefs.h <<\EOF
7135 #define BROKEN_LINKER 1
7136 EOF
7137
7138         BROKEN_LINKER=1
7139 elif test "$DFT_LWR_MODEL" = shared ; then
7140         case $cf_cv_system_name in #(vi
7141         cygwin*)
7142
7143 cat >>confdefs.h <<\EOF
7144 #define BROKEN_LINKER 1
7145 EOF
7146
7147                 BROKEN_LINKER=1
7148                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7149
7150 echo "${as_me:-configure}:7150: testing cygwin linker is broken anyway ..." 1>&5
7151
7152                 ;;
7153         esac
7154 fi
7155
7156 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7157 echo "$as_me:7157: checking if tputs should process BSD-style prefix padding" >&5
7158 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7159
7160 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7161 if test "${enable_bsdpad+set}" = set; then
7162   enableval="$enable_bsdpad"
7163   with_bsdpad=$enableval
7164 else
7165   with_bsdpad=no
7166 fi;
7167 echo "$as_me:7167: result: $with_bsdpad" >&5
7168 echo "${ECHO_T}$with_bsdpad" >&6
7169 test "x$with_bsdpad" = xyes &&
7170 cat >>confdefs.h <<\EOF
7171 #define BSD_TPUTS 1
7172 EOF
7173
7174 ###   use option --enable-widec to turn on use of wide-character support
7175 NCURSES_CH_T=chtype
7176 NCURSES_LIBUTF8=0
7177
7178 NEED_WCHAR_H=0
7179 NCURSES_MBSTATE_T=0
7180 NCURSES_WCHAR_T=0
7181 NCURSES_WINT_T=0
7182
7183 # Check to define _XOPEN_SOURCE "automatically"
7184
7185 cf_XOPEN_SOURCE=500
7186 cf_POSIX_C_SOURCE=199506L
7187 cf_xopen_source=
7188
7189 case $host_os in #(vi
7190 aix[4-7]*) #(vi
7191         cf_xopen_source="-D_ALL_SOURCE"
7192         ;;
7193 cygwin) #(vi
7194         cf_XOPEN_SOURCE=600
7195         ;;
7196 darwin[0-8].*) #(vi
7197         cf_xopen_source="-D_APPLE_C_SOURCE"
7198         ;;
7199 darwin*) #(vi
7200         cf_xopen_source="-D_DARWIN_C_SOURCE"
7201         cf_XOPEN_SOURCE=
7202         ;;
7203 freebsd*|dragonfly*) #(vi
7204         # 5.x headers associate
7205         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7206         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7207         cf_POSIX_C_SOURCE=200112L
7208         cf_XOPEN_SOURCE=600
7209         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7210         ;;
7211 hpux11*) #(vi
7212         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7213         ;;
7214 hpux*) #(vi
7215         cf_xopen_source="-D_HPUX_SOURCE"
7216         ;;
7217 irix[56].*) #(vi
7218         cf_xopen_source="-D_SGI_SOURCE"
7219         cf_XOPEN_SOURCE=
7220         ;;
7221 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7222
7223 echo "$as_me:7223: checking if we must define _GNU_SOURCE" >&5
7224 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7225 if test "${cf_cv_gnu_source+set}" = set; then
7226   echo $ECHO_N "(cached) $ECHO_C" >&6
7227 else
7228
7229 cat >conftest.$ac_ext <<_ACEOF
7230 #line 7230 "configure"
7231 #include "confdefs.h"
7232 #include <sys/types.h>
7233 int
7234 main ()
7235 {
7236
7237 #ifndef _XOPEN_SOURCE
7238 make an error
7239 #endif
7240   ;
7241   return 0;
7242 }
7243 _ACEOF
7244 rm -f conftest.$ac_objext
7245 if { (eval echo "$as_me:7245: \"$ac_compile\"") >&5
7246   (eval $ac_compile) 2>&5
7247   ac_status=$?
7248   echo "$as_me:7248: \$? = $ac_status" >&5
7249   (exit $ac_status); } &&
7250          { ac_try='test -s conftest.$ac_objext'
7251   { (eval echo "$as_me:7251: \"$ac_try\"") >&5
7252   (eval $ac_try) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit $ac_status); }; }; then
7256   cf_cv_gnu_source=no
7257 else
7258   echo "$as_me: failed program was:" >&5
7259 cat conftest.$ac_ext >&5
7260 cf_save="$CPPFLAGS"
7261          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7262          cat >conftest.$ac_ext <<_ACEOF
7263 #line 7263 "configure"
7264 #include "confdefs.h"
7265 #include <sys/types.h>
7266 int
7267 main ()
7268 {
7269
7270 #ifdef _XOPEN_SOURCE
7271 make an error
7272 #endif
7273   ;
7274   return 0;
7275 }
7276 _ACEOF
7277 rm -f conftest.$ac_objext
7278 if { (eval echo "$as_me:7278: \"$ac_compile\"") >&5
7279   (eval $ac_compile) 2>&5
7280   ac_status=$?
7281   echo "$as_me:7281: \$? = $ac_status" >&5
7282   (exit $ac_status); } &&
7283          { ac_try='test -s conftest.$ac_objext'
7284   { (eval echo "$as_me:7284: \"$ac_try\"") >&5
7285   (eval $ac_try) 2>&5
7286   ac_status=$?
7287   echo "$as_me:7287: \$? = $ac_status" >&5
7288   (exit $ac_status); }; }; then
7289   cf_cv_gnu_source=no
7290 else
7291   echo "$as_me: failed program was:" >&5
7292 cat conftest.$ac_ext >&5
7293 cf_cv_gnu_source=yes
7294 fi
7295 rm -f conftest.$ac_objext conftest.$ac_ext
7296         CPPFLAGS="$cf_save"
7297
7298 fi
7299 rm -f conftest.$ac_objext conftest.$ac_ext
7300
7301 fi
7302 echo "$as_me:7302: result: $cf_cv_gnu_source" >&5
7303 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7304 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7305
7306         ;;
7307 mirbsd*) #(vi
7308         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7309         cf_XOPEN_SOURCE=
7310
7311 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7312
7313 cf_save_CFLAGS="$CFLAGS"
7314 cf_save_CPPFLAGS="$CPPFLAGS"
7315
7316 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7317         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7318                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7319
7320 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7321         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7322                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7323
7324 echo "$as_me:7324: checking if we should define _POSIX_C_SOURCE" >&5
7325 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7326 if test "${cf_cv_posix_c_source+set}" = set; then
7327   echo $ECHO_N "(cached) $ECHO_C" >&6
7328 else
7329
7330 echo "${as_me:-configure}:7330: testing if the symbol is already defined go no further ..." 1>&5
7331
7332         cat >conftest.$ac_ext <<_ACEOF
7333 #line 7333 "configure"
7334 #include "confdefs.h"
7335 #include <sys/types.h>
7336 int
7337 main ()
7338 {
7339
7340 #ifndef _POSIX_C_SOURCE
7341 make an error
7342 #endif
7343   ;
7344   return 0;
7345 }
7346 _ACEOF
7347 rm -f conftest.$ac_objext
7348 if { (eval echo "$as_me:7348: \"$ac_compile\"") >&5
7349   (eval $ac_compile) 2>&5
7350   ac_status=$?
7351   echo "$as_me:7351: \$? = $ac_status" >&5
7352   (exit $ac_status); } &&
7353          { ac_try='test -s conftest.$ac_objext'
7354   { (eval echo "$as_me:7354: \"$ac_try\"") >&5
7355   (eval $ac_try) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit $ac_status); }; }; then
7359   cf_cv_posix_c_source=no
7360 else
7361   echo "$as_me: failed program was:" >&5
7362 cat conftest.$ac_ext >&5
7363 cf_want_posix_source=no
7364          case .$cf_POSIX_C_SOURCE in #(vi
7365          .[12]??*) #(vi
7366                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7367                 ;;
7368          .2) #(vi
7369                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7370                 cf_want_posix_source=yes
7371                 ;;
7372          .*)
7373                 cf_want_posix_source=yes
7374                 ;;
7375          esac
7376          if test "$cf_want_posix_source" = yes ; then
7377                 cat >conftest.$ac_ext <<_ACEOF
7378 #line 7378 "configure"
7379 #include "confdefs.h"
7380 #include <sys/types.h>
7381 int
7382 main ()
7383 {
7384
7385 #ifdef _POSIX_SOURCE
7386 make an error
7387 #endif
7388   ;
7389   return 0;
7390 }
7391 _ACEOF
7392 rm -f conftest.$ac_objext
7393 if { (eval echo "$as_me:7393: \"$ac_compile\"") >&5
7394   (eval $ac_compile) 2>&5
7395   ac_status=$?
7396   echo "$as_me:7396: \$? = $ac_status" >&5
7397   (exit $ac_status); } &&
7398          { ac_try='test -s conftest.$ac_objext'
7399   { (eval echo "$as_me:7399: \"$ac_try\"") >&5
7400   (eval $ac_try) 2>&5
7401   ac_status=$?
7402   echo "$as_me:7402: \$? = $ac_status" >&5
7403   (exit $ac_status); }; }; then
7404   :
7405 else
7406   echo "$as_me: failed program was:" >&5
7407 cat conftest.$ac_ext >&5
7408 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7409 fi
7410 rm -f conftest.$ac_objext conftest.$ac_ext
7411          fi
7412
7413 echo "${as_me:-configure}:7413: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7414
7415          CFLAGS="$cf_trim_CFLAGS"
7416          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7417
7418 echo "${as_me:-configure}:7418: testing if the second compile does not leave our definition intact error ..." 1>&5
7419
7420          cat >conftest.$ac_ext <<_ACEOF
7421 #line 7421 "configure"
7422 #include "confdefs.h"
7423 #include <sys/types.h>
7424 int
7425 main ()
7426 {
7427
7428 #ifndef _POSIX_C_SOURCE
7429 make an error
7430 #endif
7431   ;
7432   return 0;
7433 }
7434 _ACEOF
7435 rm -f conftest.$ac_objext
7436 if { (eval echo "$as_me:7436: \"$ac_compile\"") >&5
7437   (eval $ac_compile) 2>&5
7438   ac_status=$?
7439   echo "$as_me:7439: \$? = $ac_status" >&5
7440   (exit $ac_status); } &&
7441          { ac_try='test -s conftest.$ac_objext'
7442   { (eval echo "$as_me:7442: \"$ac_try\"") >&5
7443   (eval $ac_try) 2>&5
7444   ac_status=$?
7445   echo "$as_me:7445: \$? = $ac_status" >&5
7446   (exit $ac_status); }; }; then
7447   :
7448 else
7449   echo "$as_me: failed program was:" >&5
7450 cat conftest.$ac_ext >&5
7451 cf_cv_posix_c_source=no
7452 fi
7453 rm -f conftest.$ac_objext conftest.$ac_ext
7454          CFLAGS="$cf_save_CFLAGS"
7455          CPPFLAGS="$cf_save_CPPFLAGS"
7456
7457 fi
7458 rm -f conftest.$ac_objext conftest.$ac_ext
7459
7460 fi
7461 echo "$as_me:7461: result: $cf_cv_posix_c_source" >&5
7462 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7463
7464 if test "$cf_cv_posix_c_source" != no ; then
7465         CFLAGS="$cf_trim_CFLAGS"
7466         CPPFLAGS="$cf_trim_CPPFLAGS"
7467
7468 cf_fix_cppflags=no
7469 cf_new_cflags=
7470 cf_new_cppflags=
7471 cf_new_extra_cppflags=
7472
7473 for cf_add_cflags in $cf_cv_posix_c_source
7474 do
7475 case $cf_fix_cppflags in
7476 no)
7477         case $cf_add_cflags in #(vi
7478         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7479                 case $cf_add_cflags in
7480                 -D*)
7481                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7482
7483                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7484                                 && test -z "${cf_tst_cflags}" \
7485                                 && cf_fix_cppflags=yes
7486
7487                         if test $cf_fix_cppflags = yes ; then
7488                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7489                                 continue
7490                         elif test "${cf_tst_cflags}" = "\"'" ; then
7491                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7492                                 continue
7493                         fi
7494                         ;;
7495                 esac
7496                 case "$CPPFLAGS" in
7497                 *$cf_add_cflags) #(vi
7498                         ;;
7499                 *) #(vi
7500                         case $cf_add_cflags in #(vi
7501                         -D*)
7502                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7503
7504 CPPFLAGS=`echo "$CPPFLAGS" | \
7505         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7506                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7507
7508                                 ;;
7509                         esac
7510                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7511                         ;;
7512                 esac
7513                 ;;
7514         *)
7515                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7516                 ;;
7517         esac
7518         ;;
7519 yes)
7520         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7521
7522         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7523
7524         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7525                 && test -z "${cf_tst_cflags}" \
7526                 && cf_fix_cppflags=no
7527         ;;
7528 esac
7529 done
7530
7531 if test -n "$cf_new_cflags" ; then
7532
7533         CFLAGS="$CFLAGS $cf_new_cflags"
7534 fi
7535
7536 if test -n "$cf_new_cppflags" ; then
7537
7538         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7539 fi
7540
7541 if test -n "$cf_new_extra_cppflags" ; then
7542
7543         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7544 fi
7545
7546 fi
7547
7548         ;;
7549 netbsd*) #(vi
7550         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7551         ;;
7552 openbsd[4-9]*) #(vi
7553         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7554         cf_xopen_source="-D_BSD_SOURCE"
7555         cf_XOPEN_SOURCE=600
7556         ;;
7557 openbsd*) #(vi
7558         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7559         ;;
7560 osf[45]*) #(vi
7561         cf_xopen_source="-D_OSF_SOURCE"
7562         ;;
7563 nto-qnx*) #(vi
7564         cf_xopen_source="-D_QNX_SOURCE"
7565         ;;
7566 sco*) #(vi
7567         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7568         ;;
7569 solaris2.*) #(vi
7570         cf_xopen_source="-D__EXTENSIONS__"
7571         ;;
7572 *)
7573
7574 echo "$as_me:7574: checking if we should define _XOPEN_SOURCE" >&5
7575 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7576 if test "${cf_cv_xopen_source+set}" = set; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579
7580         cat >conftest.$ac_ext <<_ACEOF
7581 #line 7581 "configure"
7582 #include "confdefs.h"
7583
7584 #include <stdlib.h>
7585 #include <string.h>
7586 #include <sys/types.h>
7587
7588 int
7589 main ()
7590 {
7591
7592 #ifndef _XOPEN_SOURCE
7593 make an error
7594 #endif
7595   ;
7596   return 0;
7597 }
7598 _ACEOF
7599 rm -f conftest.$ac_objext
7600 if { (eval echo "$as_me:7600: \"$ac_compile\"") >&5
7601   (eval $ac_compile) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); } &&
7605          { ac_try='test -s conftest.$ac_objext'
7606   { (eval echo "$as_me:7606: \"$ac_try\"") >&5
7607   (eval $ac_try) 2>&5
7608   ac_status=$?
7609   echo "$as_me:7609: \$? = $ac_status" >&5
7610   (exit $ac_status); }; }; then
7611   cf_cv_xopen_source=no
7612 else
7613   echo "$as_me: failed program was:" >&5
7614 cat conftest.$ac_ext >&5
7615 cf_save="$CPPFLAGS"
7616          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7617          cat >conftest.$ac_ext <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620
7621 #include <stdlib.h>
7622 #include <string.h>
7623 #include <sys/types.h>
7624
7625 int
7626 main ()
7627 {
7628
7629 #ifdef _XOPEN_SOURCE
7630 make an error
7631 #endif
7632   ;
7633   return 0;
7634 }
7635 _ACEOF
7636 rm -f conftest.$ac_objext
7637 if { (eval echo "$as_me:7637: \"$ac_compile\"") >&5
7638   (eval $ac_compile) 2>&5
7639   ac_status=$?
7640   echo "$as_me:7640: \$? = $ac_status" >&5
7641   (exit $ac_status); } &&
7642          { ac_try='test -s conftest.$ac_objext'
7643   { (eval echo "$as_me:7643: \"$ac_try\"") >&5
7644   (eval $ac_try) 2>&5
7645   ac_status=$?
7646   echo "$as_me:7646: \$? = $ac_status" >&5
7647   (exit $ac_status); }; }; then
7648   cf_cv_xopen_source=no
7649 else
7650   echo "$as_me: failed program was:" >&5
7651 cat conftest.$ac_ext >&5
7652 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7653 fi
7654 rm -f conftest.$ac_objext conftest.$ac_ext
7655         CPPFLAGS="$cf_save"
7656
7657 fi
7658 rm -f conftest.$ac_objext conftest.$ac_ext
7659
7660 fi
7661 echo "$as_me:7661: result: $cf_cv_xopen_source" >&5
7662 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7663
7664 if test "$cf_cv_xopen_source" != no ; then
7665
7666 CFLAGS=`echo "$CFLAGS" | \
7667         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7668                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7669
7670 CPPFLAGS=`echo "$CPPFLAGS" | \
7671         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7672                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7673
7674         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7675
7676 cf_fix_cppflags=no
7677 cf_new_cflags=
7678 cf_new_cppflags=
7679 cf_new_extra_cppflags=
7680
7681 for cf_add_cflags in $cf_temp_xopen_source
7682 do
7683 case $cf_fix_cppflags in
7684 no)
7685         case $cf_add_cflags in #(vi
7686         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7687                 case $cf_add_cflags in
7688                 -D*)
7689                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7690
7691                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7692                                 && test -z "${cf_tst_cflags}" \
7693                                 && cf_fix_cppflags=yes
7694
7695                         if test $cf_fix_cppflags = yes ; then
7696                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7697                                 continue
7698                         elif test "${cf_tst_cflags}" = "\"'" ; then
7699                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7700                                 continue
7701                         fi
7702                         ;;
7703                 esac
7704                 case "$CPPFLAGS" in
7705                 *$cf_add_cflags) #(vi
7706                         ;;
7707                 *) #(vi
7708                         case $cf_add_cflags in #(vi
7709                         -D*)
7710                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7711
7712 CPPFLAGS=`echo "$CPPFLAGS" | \
7713         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7714                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7715
7716                                 ;;
7717                         esac
7718                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7719                         ;;
7720                 esac
7721                 ;;
7722         *)
7723                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7724                 ;;
7725         esac
7726         ;;
7727 yes)
7728         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7729
7730         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7731
7732         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7733                 && test -z "${cf_tst_cflags}" \
7734                 && cf_fix_cppflags=no
7735         ;;
7736 esac
7737 done
7738
7739 if test -n "$cf_new_cflags" ; then
7740
7741         CFLAGS="$CFLAGS $cf_new_cflags"
7742 fi
7743
7744 if test -n "$cf_new_cppflags" ; then
7745
7746         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7747 fi
7748
7749 if test -n "$cf_new_extra_cppflags" ; then
7750
7751         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7752 fi
7753
7754 fi
7755
7756 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7757
7758 cf_save_CFLAGS="$CFLAGS"
7759 cf_save_CPPFLAGS="$CPPFLAGS"
7760
7761 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7762         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7763                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7764
7765 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7766         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7767                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7768
7769 echo "$as_me:7769: checking if we should define _POSIX_C_SOURCE" >&5
7770 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7771 if test "${cf_cv_posix_c_source+set}" = set; then
7772   echo $ECHO_N "(cached) $ECHO_C" >&6
7773 else
7774
7775 echo "${as_me:-configure}:7775: testing if the symbol is already defined go no further ..." 1>&5
7776
7777         cat >conftest.$ac_ext <<_ACEOF
7778 #line 7778 "configure"
7779 #include "confdefs.h"
7780 #include <sys/types.h>
7781 int
7782 main ()
7783 {
7784
7785 #ifndef _POSIX_C_SOURCE
7786 make an error
7787 #endif
7788   ;
7789   return 0;
7790 }
7791 _ACEOF
7792 rm -f conftest.$ac_objext
7793 if { (eval echo "$as_me:7793: \"$ac_compile\"") >&5
7794   (eval $ac_compile) 2>&5
7795   ac_status=$?
7796   echo "$as_me:7796: \$? = $ac_status" >&5
7797   (exit $ac_status); } &&
7798          { ac_try='test -s conftest.$ac_objext'
7799   { (eval echo "$as_me:7799: \"$ac_try\"") >&5
7800   (eval $ac_try) 2>&5
7801   ac_status=$?
7802   echo "$as_me:7802: \$? = $ac_status" >&5
7803   (exit $ac_status); }; }; then
7804   cf_cv_posix_c_source=no
7805 else
7806   echo "$as_me: failed program was:" >&5
7807 cat conftest.$ac_ext >&5
7808 cf_want_posix_source=no
7809          case .$cf_POSIX_C_SOURCE in #(vi
7810          .[12]??*) #(vi
7811                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7812                 ;;
7813          .2) #(vi
7814                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7815                 cf_want_posix_source=yes
7816                 ;;
7817          .*)
7818                 cf_want_posix_source=yes
7819                 ;;
7820          esac
7821          if test "$cf_want_posix_source" = yes ; then
7822                 cat >conftest.$ac_ext <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825 #include <sys/types.h>
7826 int
7827 main ()
7828 {
7829
7830 #ifdef _POSIX_SOURCE
7831 make an error
7832 #endif
7833   ;
7834   return 0;
7835 }
7836 _ACEOF
7837 rm -f conftest.$ac_objext
7838 if { (eval echo "$as_me:7838: \"$ac_compile\"") >&5
7839   (eval $ac_compile) 2>&5
7840   ac_status=$?
7841   echo "$as_me:7841: \$? = $ac_status" >&5
7842   (exit $ac_status); } &&
7843          { ac_try='test -s conftest.$ac_objext'
7844   { (eval echo "$as_me:7844: \"$ac_try\"") >&5
7845   (eval $ac_try) 2>&5
7846   ac_status=$?
7847   echo "$as_me:7847: \$? = $ac_status" >&5
7848   (exit $ac_status); }; }; then
7849   :
7850 else
7851   echo "$as_me: failed program was:" >&5
7852 cat conftest.$ac_ext >&5
7853 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7854 fi
7855 rm -f conftest.$ac_objext conftest.$ac_ext
7856          fi
7857
7858 echo "${as_me:-configure}:7858: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7859
7860          CFLAGS="$cf_trim_CFLAGS"
7861          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7862
7863 echo "${as_me:-configure}:7863: testing if the second compile does not leave our definition intact error ..." 1>&5
7864
7865          cat >conftest.$ac_ext <<_ACEOF
7866 #line 7866 "configure"
7867 #include "confdefs.h"
7868 #include <sys/types.h>
7869 int
7870 main ()
7871 {
7872
7873 #ifndef _POSIX_C_SOURCE
7874 make an error
7875 #endif
7876   ;
7877   return 0;
7878 }
7879 _ACEOF
7880 rm -f conftest.$ac_objext
7881 if { (eval echo "$as_me:7881: \"$ac_compile\"") >&5
7882   (eval $ac_compile) 2>&5
7883   ac_status=$?
7884   echo "$as_me:7884: \$? = $ac_status" >&5
7885   (exit $ac_status); } &&
7886          { ac_try='test -s conftest.$ac_objext'
7887   { (eval echo "$as_me:7887: \"$ac_try\"") >&5
7888   (eval $ac_try) 2>&5
7889   ac_status=$?
7890   echo "$as_me:7890: \$? = $ac_status" >&5
7891   (exit $ac_status); }; }; then
7892   :
7893 else
7894   echo "$as_me: failed program was:" >&5
7895 cat conftest.$ac_ext >&5
7896 cf_cv_posix_c_source=no
7897 fi
7898 rm -f conftest.$ac_objext conftest.$ac_ext
7899          CFLAGS="$cf_save_CFLAGS"
7900          CPPFLAGS="$cf_save_CPPFLAGS"
7901
7902 fi
7903 rm -f conftest.$ac_objext conftest.$ac_ext
7904
7905 fi
7906 echo "$as_me:7906: result: $cf_cv_posix_c_source" >&5
7907 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7908
7909 if test "$cf_cv_posix_c_source" != no ; then
7910         CFLAGS="$cf_trim_CFLAGS"
7911         CPPFLAGS="$cf_trim_CPPFLAGS"
7912
7913 cf_fix_cppflags=no
7914 cf_new_cflags=
7915 cf_new_cppflags=
7916 cf_new_extra_cppflags=
7917
7918 for cf_add_cflags in $cf_cv_posix_c_source
7919 do
7920 case $cf_fix_cppflags in
7921 no)
7922         case $cf_add_cflags in #(vi
7923         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7924                 case $cf_add_cflags in
7925                 -D*)
7926                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7927
7928                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7929                                 && test -z "${cf_tst_cflags}" \
7930                                 && cf_fix_cppflags=yes
7931
7932                         if test $cf_fix_cppflags = yes ; then
7933                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7934                                 continue
7935                         elif test "${cf_tst_cflags}" = "\"'" ; then
7936                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7937                                 continue
7938                         fi
7939                         ;;
7940                 esac
7941                 case "$CPPFLAGS" in
7942                 *$cf_add_cflags) #(vi
7943                         ;;
7944                 *) #(vi
7945                         case $cf_add_cflags in #(vi
7946                         -D*)
7947                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7948
7949 CPPFLAGS=`echo "$CPPFLAGS" | \
7950         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7951                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7952
7953                                 ;;
7954                         esac
7955                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7956                         ;;
7957                 esac
7958                 ;;
7959         *)
7960                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7961                 ;;
7962         esac
7963         ;;
7964 yes)
7965         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7966
7967         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7968
7969         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7970                 && test -z "${cf_tst_cflags}" \
7971                 && cf_fix_cppflags=no
7972         ;;
7973 esac
7974 done
7975
7976 if test -n "$cf_new_cflags" ; then
7977
7978         CFLAGS="$CFLAGS $cf_new_cflags"
7979 fi
7980
7981 if test -n "$cf_new_cppflags" ; then
7982
7983         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7984 fi
7985
7986 if test -n "$cf_new_extra_cppflags" ; then
7987
7988         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7989 fi
7990
7991 fi
7992
7993         ;;
7994 esac
7995
7996 if test -n "$cf_xopen_source" ; then
7997
7998 cf_fix_cppflags=no
7999 cf_new_cflags=
8000 cf_new_cppflags=
8001 cf_new_extra_cppflags=
8002
8003 for cf_add_cflags in $cf_xopen_source
8004 do
8005 case $cf_fix_cppflags in
8006 no)
8007         case $cf_add_cflags in #(vi
8008         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8009                 case $cf_add_cflags in
8010                 -D*)
8011                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8012
8013                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8014                                 && test -z "${cf_tst_cflags}" \
8015                                 && cf_fix_cppflags=yes
8016
8017                         if test $cf_fix_cppflags = yes ; then
8018                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8019                                 continue
8020                         elif test "${cf_tst_cflags}" = "\"'" ; then
8021                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8022                                 continue
8023                         fi
8024                         ;;
8025                 esac
8026                 case "$CPPFLAGS" in
8027                 *$cf_add_cflags) #(vi
8028                         ;;
8029                 *) #(vi
8030                         case $cf_add_cflags in #(vi
8031                         -D*)
8032                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8033
8034 CPPFLAGS=`echo "$CPPFLAGS" | \
8035         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8036                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8037
8038                                 ;;
8039                         esac
8040                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8041                         ;;
8042                 esac
8043                 ;;
8044         *)
8045                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8046                 ;;
8047         esac
8048         ;;
8049 yes)
8050         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8051
8052         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8053
8054         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8055                 && test -z "${cf_tst_cflags}" \
8056                 && cf_fix_cppflags=no
8057         ;;
8058 esac
8059 done
8060
8061 if test -n "$cf_new_cflags" ; then
8062
8063         CFLAGS="$CFLAGS $cf_new_cflags"
8064 fi
8065
8066 if test -n "$cf_new_cppflags" ; then
8067
8068         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8069 fi
8070
8071 if test -n "$cf_new_extra_cppflags" ; then
8072
8073         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8074 fi
8075
8076 fi
8077
8078 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8079         echo "$as_me:8079: checking if _XOPEN_SOURCE really is set" >&5
8080 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8081         cat >conftest.$ac_ext <<_ACEOF
8082 #line 8082 "configure"
8083 #include "confdefs.h"
8084 #include <stdlib.h>
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_XOPEN_SOURCE_set=yes
8109 else
8110   echo "$as_me: failed program was:" >&5
8111 cat conftest.$ac_ext >&5
8112 cf_XOPEN_SOURCE_set=no
8113 fi
8114 rm -f conftest.$ac_objext conftest.$ac_ext
8115         echo "$as_me:8115: result: $cf_XOPEN_SOURCE_set" >&5
8116 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8117         if test $cf_XOPEN_SOURCE_set = yes
8118         then
8119                 cat >conftest.$ac_ext <<_ACEOF
8120 #line 8120 "configure"
8121 #include "confdefs.h"
8122 #include <stdlib.h>
8123 int
8124 main ()
8125 {
8126
8127 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8128 make an error
8129 #endif
8130   ;
8131   return 0;
8132 }
8133 _ACEOF
8134 rm -f conftest.$ac_objext
8135 if { (eval echo "$as_me:8135: \"$ac_compile\"") >&5
8136   (eval $ac_compile) 2>&5
8137   ac_status=$?
8138   echo "$as_me:8138: \$? = $ac_status" >&5
8139   (exit $ac_status); } &&
8140          { ac_try='test -s conftest.$ac_objext'
8141   { (eval echo "$as_me:8141: \"$ac_try\"") >&5
8142   (eval $ac_try) 2>&5
8143   ac_status=$?
8144   echo "$as_me:8144: \$? = $ac_status" >&5
8145   (exit $ac_status); }; }; then
8146   cf_XOPEN_SOURCE_set_ok=yes
8147 else
8148   echo "$as_me: failed program was:" >&5
8149 cat conftest.$ac_ext >&5
8150 cf_XOPEN_SOURCE_set_ok=no
8151 fi
8152 rm -f conftest.$ac_objext conftest.$ac_ext
8153                 if test $cf_XOPEN_SOURCE_set_ok = no
8154                 then
8155                         { echo "$as_me:8155: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8156 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8157                 fi
8158         else
8159
8160 echo "$as_me:8160: checking if we should define _XOPEN_SOURCE" >&5
8161 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8162 if test "${cf_cv_xopen_source+set}" = set; then
8163   echo $ECHO_N "(cached) $ECHO_C" >&6
8164 else
8165
8166         cat >conftest.$ac_ext <<_ACEOF
8167 #line 8167 "configure"
8168 #include "confdefs.h"
8169
8170 #include <stdlib.h>
8171 #include <string.h>
8172 #include <sys/types.h>
8173
8174 int
8175 main ()
8176 {
8177
8178 #ifndef _XOPEN_SOURCE
8179 make an error
8180 #endif
8181   ;
8182   return 0;
8183 }
8184 _ACEOF
8185 rm -f conftest.$ac_objext
8186 if { (eval echo "$as_me:8186: \"$ac_compile\"") >&5
8187   (eval $ac_compile) 2>&5
8188   ac_status=$?
8189   echo "$as_me:8189: \$? = $ac_status" >&5
8190   (exit $ac_status); } &&
8191          { ac_try='test -s conftest.$ac_objext'
8192   { (eval echo "$as_me:8192: \"$ac_try\"") >&5
8193   (eval $ac_try) 2>&5
8194   ac_status=$?
8195   echo "$as_me:8195: \$? = $ac_status" >&5
8196   (exit $ac_status); }; }; then
8197   cf_cv_xopen_source=no
8198 else
8199   echo "$as_me: failed program was:" >&5
8200 cat conftest.$ac_ext >&5
8201 cf_save="$CPPFLAGS"
8202          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8203          cat >conftest.$ac_ext <<_ACEOF
8204 #line 8204 "configure"
8205 #include "confdefs.h"
8206
8207 #include <stdlib.h>
8208 #include <string.h>
8209 #include <sys/types.h>
8210
8211 int
8212 main ()
8213 {
8214
8215 #ifdef _XOPEN_SOURCE
8216 make an error
8217 #endif
8218   ;
8219   return 0;
8220 }
8221 _ACEOF
8222 rm -f conftest.$ac_objext
8223 if { (eval echo "$as_me:8223: \"$ac_compile\"") >&5
8224   (eval $ac_compile) 2>&5
8225   ac_status=$?
8226   echo "$as_me:8226: \$? = $ac_status" >&5
8227   (exit $ac_status); } &&
8228          { ac_try='test -s conftest.$ac_objext'
8229   { (eval echo "$as_me:8229: \"$ac_try\"") >&5
8230   (eval $ac_try) 2>&5
8231   ac_status=$?
8232   echo "$as_me:8232: \$? = $ac_status" >&5
8233   (exit $ac_status); }; }; then
8234   cf_cv_xopen_source=no
8235 else
8236   echo "$as_me: failed program was:" >&5
8237 cat conftest.$ac_ext >&5
8238 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8239 fi
8240 rm -f conftest.$ac_objext conftest.$ac_ext
8241         CPPFLAGS="$cf_save"
8242
8243 fi
8244 rm -f conftest.$ac_objext conftest.$ac_ext
8245
8246 fi
8247 echo "$as_me:8247: result: $cf_cv_xopen_source" >&5
8248 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8249
8250 if test "$cf_cv_xopen_source" != no ; then
8251
8252 CFLAGS=`echo "$CFLAGS" | \
8253         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8254                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8255
8256 CPPFLAGS=`echo "$CPPFLAGS" | \
8257         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8258                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8259
8260         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8261
8262 cf_fix_cppflags=no
8263 cf_new_cflags=
8264 cf_new_cppflags=
8265 cf_new_extra_cppflags=
8266
8267 for cf_add_cflags in $cf_temp_xopen_source
8268 do
8269 case $cf_fix_cppflags in
8270 no)
8271         case $cf_add_cflags in #(vi
8272         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8273                 case $cf_add_cflags in
8274                 -D*)
8275                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8276
8277                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8278                                 && test -z "${cf_tst_cflags}" \
8279                                 && cf_fix_cppflags=yes
8280
8281                         if test $cf_fix_cppflags = yes ; then
8282                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8283                                 continue
8284                         elif test "${cf_tst_cflags}" = "\"'" ; then
8285                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8286                                 continue
8287                         fi
8288                         ;;
8289                 esac
8290                 case "$CPPFLAGS" in
8291                 *$cf_add_cflags) #(vi
8292                         ;;
8293                 *) #(vi
8294                         case $cf_add_cflags in #(vi
8295                         -D*)
8296                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8297
8298 CPPFLAGS=`echo "$CPPFLAGS" | \
8299         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8300                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8301
8302                                 ;;
8303                         esac
8304                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8305                         ;;
8306                 esac
8307                 ;;
8308         *)
8309                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8310                 ;;
8311         esac
8312         ;;
8313 yes)
8314         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8315
8316         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8317
8318         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8319                 && test -z "${cf_tst_cflags}" \
8320                 && cf_fix_cppflags=no
8321         ;;
8322 esac
8323 done
8324
8325 if test -n "$cf_new_cflags" ; then
8326
8327         CFLAGS="$CFLAGS $cf_new_cflags"
8328 fi
8329
8330 if test -n "$cf_new_cppflags" ; then
8331
8332         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8333 fi
8334
8335 if test -n "$cf_new_extra_cppflags" ; then
8336
8337         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8338 fi
8339
8340 fi
8341
8342         fi
8343 fi
8344
8345 # Work around breakage on OS X
8346
8347 echo "$as_me:8347: checking if SIGWINCH is defined" >&5
8348 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8349 if test "${cf_cv_define_sigwinch+set}" = set; then
8350   echo $ECHO_N "(cached) $ECHO_C" >&6
8351 else
8352
8353         cat >conftest.$ac_ext <<_ACEOF
8354 #line 8354 "configure"
8355 #include "confdefs.h"
8356
8357 #include <sys/types.h>
8358 #include <sys/signal.h>
8359
8360 int
8361 main ()
8362 {
8363 int x = SIGWINCH
8364   ;
8365   return 0;
8366 }
8367 _ACEOF
8368 rm -f conftest.$ac_objext
8369 if { (eval echo "$as_me:8369: \"$ac_compile\"") >&5
8370   (eval $ac_compile) 2>&5
8371   ac_status=$?
8372   echo "$as_me:8372: \$? = $ac_status" >&5
8373   (exit $ac_status); } &&
8374          { ac_try='test -s conftest.$ac_objext'
8375   { (eval echo "$as_me:8375: \"$ac_try\"") >&5
8376   (eval $ac_try) 2>&5
8377   ac_status=$?
8378   echo "$as_me:8378: \$? = $ac_status" >&5
8379   (exit $ac_status); }; }; then
8380   cf_cv_define_sigwinch=yes
8381 else
8382   echo "$as_me: failed program was:" >&5
8383 cat conftest.$ac_ext >&5
8384 cat >conftest.$ac_ext <<_ACEOF
8385 #line 8385 "configure"
8386 #include "confdefs.h"
8387
8388 #undef _XOPEN_SOURCE
8389 #undef _POSIX_SOURCE
8390 #undef _POSIX_C_SOURCE
8391 #include <sys/types.h>
8392 #include <sys/signal.h>
8393
8394 int
8395 main ()
8396 {
8397 int x = SIGWINCH
8398   ;
8399   return 0;
8400 }
8401 _ACEOF
8402 rm -f conftest.$ac_objext
8403 if { (eval echo "$as_me:8403: \"$ac_compile\"") >&5
8404   (eval $ac_compile) 2>&5
8405   ac_status=$?
8406   echo "$as_me:8406: \$? = $ac_status" >&5
8407   (exit $ac_status); } &&
8408          { ac_try='test -s conftest.$ac_objext'
8409   { (eval echo "$as_me:8409: \"$ac_try\"") >&5
8410   (eval $ac_try) 2>&5
8411   ac_status=$?
8412   echo "$as_me:8412: \$? = $ac_status" >&5
8413   (exit $ac_status); }; }; then
8414   cf_cv_define_sigwinch=maybe
8415 else
8416   echo "$as_me: failed program was:" >&5
8417 cat conftest.$ac_ext >&5
8418 cf_cv_define_sigwinch=no
8419 fi
8420 rm -f conftest.$ac_objext conftest.$ac_ext
8421
8422 fi
8423 rm -f conftest.$ac_objext conftest.$ac_ext
8424
8425 fi
8426 echo "$as_me:8426: result: $cf_cv_define_sigwinch" >&5
8427 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8428
8429 if test "$cf_cv_define_sigwinch" = maybe ; then
8430 echo "$as_me:8430: checking for actual SIGWINCH definition" >&5
8431 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8432 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8433   echo $ECHO_N "(cached) $ECHO_C" >&6
8434 else
8435
8436 cf_cv_fixup_sigwinch=unknown
8437 cf_sigwinch=32
8438 while test $cf_sigwinch != 1
8439 do
8440         cat >conftest.$ac_ext <<_ACEOF
8441 #line 8441 "configure"
8442 #include "confdefs.h"
8443
8444 #undef _XOPEN_SOURCE
8445 #undef _POSIX_SOURCE
8446 #undef _POSIX_C_SOURCE
8447 #include <sys/types.h>
8448 #include <sys/signal.h>
8449
8450 int
8451 main ()
8452 {
8453
8454 #if SIGWINCH != $cf_sigwinch
8455 make an error
8456 #endif
8457 int x = SIGWINCH
8458   ;
8459   return 0;
8460 }
8461 _ACEOF
8462 rm -f conftest.$ac_objext
8463 if { (eval echo "$as_me:8463: \"$ac_compile\"") >&5
8464   (eval $ac_compile) 2>&5
8465   ac_status=$?
8466   echo "$as_me:8466: \$? = $ac_status" >&5
8467   (exit $ac_status); } &&
8468          { ac_try='test -s conftest.$ac_objext'
8469   { (eval echo "$as_me:8469: \"$ac_try\"") >&5
8470   (eval $ac_try) 2>&5
8471   ac_status=$?
8472   echo "$as_me:8472: \$? = $ac_status" >&5
8473   (exit $ac_status); }; }; then
8474   cf_cv_fixup_sigwinch=$cf_sigwinch
8475          break
8476 else
8477   echo "$as_me: failed program was:" >&5
8478 cat conftest.$ac_ext >&5
8479 fi
8480 rm -f conftest.$ac_objext conftest.$ac_ext
8481
8482 cf_sigwinch=`expr $cf_sigwinch - 1`
8483 done
8484
8485 fi
8486 echo "$as_me:8486: result: $cf_cv_fixup_sigwinch" >&5
8487 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8488
8489         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8490                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8491         fi
8492 fi
8493
8494 # Checks for CODESET support.
8495
8496   echo "$as_me:8496: checking for nl_langinfo and CODESET" >&5
8497 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8498 if test "${am_cv_langinfo_codeset+set}" = set; then
8499   echo $ECHO_N "(cached) $ECHO_C" >&6
8500 else
8501   cat >conftest.$ac_ext <<_ACEOF
8502 #line 8502 "configure"
8503 #include "confdefs.h"
8504 #include <langinfo.h>
8505 int
8506 main ()
8507 {
8508 char* cs = nl_langinfo(CODESET);
8509   ;
8510   return 0;
8511 }
8512 _ACEOF
8513 rm -f conftest.$ac_objext conftest$ac_exeext
8514 if { (eval echo "$as_me:8514: \"$ac_link\"") >&5
8515   (eval $ac_link) 2>&5
8516   ac_status=$?
8517   echo "$as_me:8517: \$? = $ac_status" >&5
8518   (exit $ac_status); } &&
8519          { ac_try='test -s conftest$ac_exeext'
8520   { (eval echo "$as_me:8520: \"$ac_try\"") >&5
8521   (eval $ac_try) 2>&5
8522   ac_status=$?
8523   echo "$as_me:8523: \$? = $ac_status" >&5
8524   (exit $ac_status); }; }; then
8525   am_cv_langinfo_codeset=yes
8526 else
8527   echo "$as_me: failed program was:" >&5
8528 cat conftest.$ac_ext >&5
8529 am_cv_langinfo_codeset=no
8530 fi
8531 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8532
8533 fi
8534 echo "$as_me:8534: result: $am_cv_langinfo_codeset" >&5
8535 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8536   if test $am_cv_langinfo_codeset = yes; then
8537
8538 cat >>confdefs.h <<\EOF
8539 #define HAVE_LANGINFO_CODESET 1
8540 EOF
8541
8542   fi
8543
8544 # use these variables to work around a defect in gcc's fixincludes.
8545 NCURSES_OK_WCHAR_T=
8546 NCURSES_OK_WINT_T=
8547
8548 echo "$as_me:8548: checking if you want wide-character code" >&5
8549 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8550
8551 # Check whether --enable-widec or --disable-widec was given.
8552 if test "${enable_widec+set}" = set; then
8553   enableval="$enable_widec"
8554   with_widec=$enableval
8555 else
8556   with_widec=no
8557 fi;
8558 echo "$as_me:8558: result: $with_widec" >&5
8559 echo "${ECHO_T}$with_widec" >&6
8560 if test "x$with_widec" = xyes ; then
8561         LIB_SUFFIX="w${LIB_SUFFIX}"
8562
8563 cat >>confdefs.h <<\EOF
8564 #define USE_WIDEC_SUPPORT 1
8565 EOF
8566
8567 cat >>confdefs.h <<\EOF
8568 #define NCURSES_WIDECHAR 1
8569 EOF
8570
8571 echo "$as_me:8571: checking if wchar.h can be used as is" >&5
8572 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8573 if test "${cf_cv_wchar_h_okay+set}" = set; then
8574   echo $ECHO_N "(cached) $ECHO_C" >&6
8575 else
8576
8577 cat >conftest.$ac_ext <<_ACEOF
8578 #line 8578 "configure"
8579 #include "confdefs.h"
8580
8581 #include <stdlib.h>
8582 #include <wchar.h>
8583
8584 int
8585 main ()
8586 {
8587
8588         wint_t foo = 0;
8589         int bar = iswpunct(foo)
8590   ;
8591   return 0;
8592 }
8593 _ACEOF
8594 rm -f conftest.$ac_objext
8595 if { (eval echo "$as_me:8595: \"$ac_compile\"") >&5
8596   (eval $ac_compile) 2>&5
8597   ac_status=$?
8598   echo "$as_me:8598: \$? = $ac_status" >&5
8599   (exit $ac_status); } &&
8600          { ac_try='test -s conftest.$ac_objext'
8601   { (eval echo "$as_me:8601: \"$ac_try\"") >&5
8602   (eval $ac_try) 2>&5
8603   ac_status=$?
8604   echo "$as_me:8604: \$? = $ac_status" >&5
8605   (exit $ac_status); }; }; then
8606   cf_cv_wchar_h_okay=yes
8607 else
8608   echo "$as_me: failed program was:" >&5
8609 cat conftest.$ac_ext >&5
8610 cf_cv_wchar_h_okay=no
8611 fi
8612 rm -f conftest.$ac_objext conftest.$ac_ext
8613 fi
8614 echo "$as_me:8614: result: $cf_cv_wchar_h_okay" >&5
8615 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8616
8617 if test $cf_cv_wchar_h_okay = no
8618 then
8619
8620 echo "$as_me:8620: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8621 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8622 cat >conftest.$ac_ext <<_ACEOF
8623 #line 8623 "configure"
8624 #include "confdefs.h"
8625 #include <sys/types.h>
8626
8627 int
8628 main ()
8629 {
8630
8631 #ifndef _XOPEN_SOURCE_EXTENDED
8632 make an error
8633 #endif
8634   ;
8635   return 0;
8636 }
8637 _ACEOF
8638 rm -f conftest.$ac_objext
8639 if { (eval echo "$as_me:8639: \"$ac_compile\"") >&5
8640   (eval $ac_compile) 2>&5
8641   ac_status=$?
8642   echo "$as_me:8642: \$? = $ac_status" >&5
8643   (exit $ac_status); } &&
8644          { ac_try='test -s conftest.$ac_objext'
8645   { (eval echo "$as_me:8645: \"$ac_try\"") >&5
8646   (eval $ac_try) 2>&5
8647   ac_status=$?
8648   echo "$as_me:8648: \$? = $ac_status" >&5
8649   (exit $ac_status); }; }; then
8650   cf_result=no
8651 else
8652   echo "$as_me: failed program was:" >&5
8653 cat conftest.$ac_ext >&5
8654 cf_result=yes
8655 fi
8656 rm -f conftest.$ac_objext conftest.$ac_ext
8657 echo "$as_me:8657: result: $cf_result" >&5
8658 echo "${ECHO_T}$cf_result" >&6
8659
8660 if test "$cf_result" = yes ; then
8661         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8662 elif test "x" != "x" ; then
8663         echo "$as_me:8663: checking checking for compatible value versus " >&5
8664 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8665         cat >conftest.$ac_ext <<_ACEOF
8666 #line 8666 "configure"
8667 #include "confdefs.h"
8668 #include <sys/types.h>
8669
8670 int
8671 main ()
8672 {
8673
8674 #if _XOPEN_SOURCE_EXTENDED- < 0
8675 make an error
8676 #endif
8677   ;
8678   return 0;
8679 }
8680 _ACEOF
8681 rm -f conftest.$ac_objext
8682 if { (eval echo "$as_me:8682: \"$ac_compile\"") >&5
8683   (eval $ac_compile) 2>&5
8684   ac_status=$?
8685   echo "$as_me:8685: \$? = $ac_status" >&5
8686   (exit $ac_status); } &&
8687          { ac_try='test -s conftest.$ac_objext'
8688   { (eval echo "$as_me:8688: \"$ac_try\"") >&5
8689   (eval $ac_try) 2>&5
8690   ac_status=$?
8691   echo "$as_me:8691: \$? = $ac_status" >&5
8692   (exit $ac_status); }; }; then
8693   cf_result=yes
8694 else
8695   echo "$as_me: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8697 cf_result=no
8698 fi
8699 rm -f conftest.$ac_objext conftest.$ac_ext
8700         echo "$as_me:8700: result: $cf_result" >&5
8701 echo "${ECHO_T}$cf_result" >&6
8702         if test "$cf_result" = no ; then
8703                 # perhaps we can override it - try...
8704                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8705         fi
8706 fi
8707
8708 fi
8709
8710         # with_overwrite=no
8711         NCURSES_CH_T=cchar_t
8712
8713 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8714 do
8715 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8716 echo "$as_me:8716: checking for $ac_func" >&5
8717 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8718 if eval "test \"\${$as_ac_var+set}\" = set"; then
8719   echo $ECHO_N "(cached) $ECHO_C" >&6
8720 else
8721   cat >conftest.$ac_ext <<_ACEOF
8722 #line 8722 "configure"
8723 #include "confdefs.h"
8724 /* System header to define __stub macros and hopefully few prototypes,
8725     which can conflict with char $ac_func (); below.  */
8726 #include <assert.h>
8727 /* Override any gcc2 internal prototype to avoid an error.  */
8728 #ifdef __cplusplus
8729 extern "C"
8730 #endif
8731 /* We use char because int might match the return type of a gcc2
8732    builtin and then its argument prototype would still apply.  */
8733 char $ac_func ();
8734 char (*f) ();
8735
8736 int
8737 main ()
8738 {
8739 /* The GNU C library defines this for functions which it implements
8740     to always fail with ENOSYS.  Some functions are actually named
8741     something starting with __ and the normal name is an alias.  */
8742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8743 choke me
8744 #else
8745 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8746 #endif
8747
8748   ;
8749   return 0;
8750 }
8751 _ACEOF
8752 rm -f conftest.$ac_objext conftest$ac_exeext
8753 if { (eval echo "$as_me:8753: \"$ac_link\"") >&5
8754   (eval $ac_link) 2>&5
8755   ac_status=$?
8756   echo "$as_me:8756: \$? = $ac_status" >&5
8757   (exit $ac_status); } &&
8758          { ac_try='test -s conftest$ac_exeext'
8759   { (eval echo "$as_me:8759: \"$ac_try\"") >&5
8760   (eval $ac_try) 2>&5
8761   ac_status=$?
8762   echo "$as_me:8762: \$? = $ac_status" >&5
8763   (exit $ac_status); }; }; then
8764   eval "$as_ac_var=yes"
8765 else
8766   echo "$as_me: failed program was:" >&5
8767 cat conftest.$ac_ext >&5
8768 eval "$as_ac_var=no"
8769 fi
8770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8771 fi
8772 echo "$as_me:8772: result: `eval echo '${'$as_ac_var'}'`" >&5
8773 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8774 if test `eval echo '${'$as_ac_var'}'` = yes; then
8775   cat >>confdefs.h <<EOF
8776 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8777 EOF
8778
8779 fi
8780 done
8781
8782         if test "x$ac_cv_func_putwc" != xyes ; then
8783
8784 echo "$as_me:8784: checking for multibyte character support" >&5
8785 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8786 if test "${cf_cv_utf8_lib+set}" = set; then
8787   echo $ECHO_N "(cached) $ECHO_C" >&6
8788 else
8789
8790         cf_save_LIBS="$LIBS"
8791         cat >conftest.$ac_ext <<_ACEOF
8792 #line 8792 "configure"
8793 #include "confdefs.h"
8794
8795 #include <stdlib.h>
8796 int
8797 main ()
8798 {
8799 putwc(0,0);
8800   ;
8801   return 0;
8802 }
8803 _ACEOF
8804 rm -f conftest.$ac_objext conftest$ac_exeext
8805 if { (eval echo "$as_me:8805: \"$ac_link\"") >&5
8806   (eval $ac_link) 2>&5
8807   ac_status=$?
8808   echo "$as_me:8808: \$? = $ac_status" >&5
8809   (exit $ac_status); } &&
8810          { ac_try='test -s conftest$ac_exeext'
8811   { (eval echo "$as_me:8811: \"$ac_try\"") >&5
8812   (eval $ac_try) 2>&5
8813   ac_status=$?
8814   echo "$as_me:8814: \$? = $ac_status" >&5
8815   (exit $ac_status); }; }; then
8816   cf_cv_utf8_lib=yes
8817 else
8818   echo "$as_me: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8820
8821 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8822 # will be set on completion of the AC_TRY_LINK below.
8823 cf_cv_header_path_utf8=
8824 cf_cv_library_path_utf8=
8825
8826 echo "${as_me:-configure}:8826: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8827
8828 cf_save_LIBS="$LIBS"
8829
8830 cat >conftest.$ac_ext <<_ACEOF
8831 #line 8831 "configure"
8832 #include "confdefs.h"
8833
8834 #include <libutf8.h>
8835 int
8836 main ()
8837 {
8838 putwc(0,0);
8839   ;
8840   return 0;
8841 }
8842 _ACEOF
8843 rm -f conftest.$ac_objext conftest$ac_exeext
8844 if { (eval echo "$as_me:8844: \"$ac_link\"") >&5
8845   (eval $ac_link) 2>&5
8846   ac_status=$?
8847   echo "$as_me:8847: \$? = $ac_status" >&5
8848   (exit $ac_status); } &&
8849          { ac_try='test -s conftest$ac_exeext'
8850   { (eval echo "$as_me:8850: \"$ac_try\"") >&5
8851   (eval $ac_try) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); }; }; then
8855
8856         cf_cv_find_linkage_utf8=yes
8857         cf_cv_header_path_utf8=/usr/include
8858         cf_cv_library_path_utf8=/usr/lib
8859
8860 else
8861   echo "$as_me: failed program was:" >&5
8862 cat conftest.$ac_ext >&5
8863
8864 LIBS="-lutf8  $cf_save_LIBS"
8865
8866 cat >conftest.$ac_ext <<_ACEOF
8867 #line 8867 "configure"
8868 #include "confdefs.h"
8869
8870 #include <libutf8.h>
8871 int
8872 main ()
8873 {
8874 putwc(0,0);
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext conftest$ac_exeext
8880 if { (eval echo "$as_me:8880: \"$ac_link\"") >&5
8881   (eval $ac_link) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -s conftest$ac_exeext'
8886   { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887   (eval $ac_try) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891
8892         cf_cv_find_linkage_utf8=yes
8893         cf_cv_header_path_utf8=/usr/include
8894         cf_cv_library_path_utf8=/usr/lib
8895         cf_cv_library_file_utf8="-lutf8"
8896
8897 else
8898   echo "$as_me: failed program was:" >&5
8899 cat conftest.$ac_ext >&5
8900
8901         cf_cv_find_linkage_utf8=no
8902         LIBS="$cf_save_LIBS"
8903
8904     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8905
8906 echo "${as_me:-configure}:8906: testing find linkage for utf8 library ..." 1>&5
8907
8908 echo "${as_me:-configure}:8908: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8909
8910     cf_save_CPPFLAGS="$CPPFLAGS"
8911     cf_test_CPPFLAGS="$CPPFLAGS"
8912
8913 cf_search=
8914
8915 # collect the current set of include-directories from compiler flags
8916 cf_header_path_list=""
8917 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8918         for cf_header_path in $CPPFLAGS $CFLAGS
8919         do
8920                 case $cf_header_path in #(vi
8921                 -I*)
8922                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8923
8924 test "$cf_header_path" != "NONE" && \
8925 test -d "$cf_header_path" && \
8926  {
8927         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8928         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8929         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8930         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8931         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8932         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8933 }
8934
8935                         cf_header_path_list="$cf_header_path_list $cf_search"
8936                         ;;
8937                 esac
8938         done
8939 fi
8940
8941 # add the variations for the package we are looking for
8942
8943 cf_search=
8944
8945 test "/usr" != "$prefix" && \
8946 test -d "/usr" && \
8947 (test $prefix = NONE || test "/usr" != "$prefix") && {
8948         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8949         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8950         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8951         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8952         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8953         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8954 }
8955
8956 test "$prefix" != "NONE" && \
8957 test -d "$prefix" && \
8958  {
8959         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8960         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8961         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8962         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8963         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8964         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8965 }
8966
8967 test "/usr/local" != "$prefix" && \
8968 test -d "/usr/local" && \
8969 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8970         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8971         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8972         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8973         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8974         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8975         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8976 }
8977
8978 test "/opt" != "$prefix" && \
8979 test -d "/opt" && \
8980 (test $prefix = NONE || test "/opt" != "$prefix") && {
8981         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8982         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8983         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8984         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8985         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8986         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8987 }
8988
8989 test "$HOME" != "$prefix" && \
8990 test -d "$HOME" && \
8991 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8992         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8993         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8994         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8995         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8996         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8997         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8998 }
8999
9000 test "$includedir" != NONE && \
9001 test "$includedir" != "/usr/include" && \
9002 test -d "$includedir" && {
9003         test -d $includedir &&    cf_search="$cf_search $includedir"
9004         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9005 }
9006
9007 test "$oldincludedir" != NONE && \
9008 test "$oldincludedir" != "/usr/include" && \
9009 test -d "$oldincludedir" && {
9010         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9011         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9012 }
9013
9014 cf_search="$cf_search $cf_header_path_list"
9015
9016     for cf_cv_header_path_utf8 in $cf_search
9017     do
9018       if test -d $cf_cv_header_path_utf8 ; then
9019         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9020
9021 echo "${as_me:-configure}:9021: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9022
9023         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9024         cat >conftest.$ac_ext <<_ACEOF
9025 #line 9025 "configure"
9026 #include "confdefs.h"
9027
9028 #include <libutf8.h>
9029 int
9030 main ()
9031 {
9032 putwc(0,0);
9033   ;
9034   return 0;
9035 }
9036 _ACEOF
9037 rm -f conftest.$ac_objext
9038 if { (eval echo "$as_me:9038: \"$ac_compile\"") >&5
9039   (eval $ac_compile) 2>&5
9040   ac_status=$?
9041   echo "$as_me:9041: \$? = $ac_status" >&5
9042   (exit $ac_status); } &&
9043          { ac_try='test -s conftest.$ac_objext'
9044   { (eval echo "$as_me:9044: \"$ac_try\"") >&5
9045   (eval $ac_try) 2>&5
9046   ac_status=$?
9047   echo "$as_me:9047: \$? = $ac_status" >&5
9048   (exit $ac_status); }; }; then
9049
9050             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9051
9052 echo "${as_me:-configure}:9052: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9053
9054             cf_cv_find_linkage_utf8=maybe
9055             cf_test_CPPFLAGS="$CPPFLAGS"
9056             break
9057 else
9058   echo "$as_me: failed program was:" >&5
9059 cat conftest.$ac_ext >&5
9060
9061             CPPFLAGS="$cf_save_CPPFLAGS"
9062
9063 fi
9064 rm -f conftest.$ac_objext conftest.$ac_ext
9065       fi
9066     done
9067
9068     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9069
9070 echo "${as_me:-configure}:9070: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9071
9072       cf_save_LIBS="$LIBS"
9073       cf_save_LDFLAGS="$LDFLAGS"
9074
9075       if test "$cf_cv_find_linkage_utf8" != yes ; then
9076
9077 cf_search=
9078 cf_library_path_list=""
9079 if test -n "${LDFLAGS}${LIBS}" ; then
9080         for cf_library_path in $LDFLAGS $LIBS
9081         do
9082                 case $cf_library_path in #(vi
9083                 -L*)
9084                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9085
9086 test "$cf_library_path" != "NONE" && \
9087 test -d "$cf_library_path" && \
9088  {
9089         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9090         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9091         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9092         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9093         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9094         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9095 }
9096
9097                         cf_library_path_list="$cf_library_path_list $cf_search"
9098                         ;;
9099                 esac
9100         done
9101 fi
9102
9103 cf_search=
9104
9105 test "/usr" != "$prefix" && \
9106 test -d "/usr" && \
9107 (test $prefix = NONE || test "/usr" != "$prefix") && {
9108         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9109         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9110         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9111         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9112         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9113         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9114 }
9115
9116 test "$prefix" != "NONE" && \
9117 test -d "$prefix" && \
9118  {
9119         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9120         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9121         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9122         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9123         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9124         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9125 }
9126
9127 test "/usr/local" != "$prefix" && \
9128 test -d "/usr/local" && \
9129 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9130         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9131         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9132         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9133         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9134         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9135         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9136 }
9137
9138 test "/opt" != "$prefix" && \
9139 test -d "/opt" && \
9140 (test $prefix = NONE || test "/opt" != "$prefix") && {
9141         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9142         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9143         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9144         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9145         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9146         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9147 }
9148
9149 test "$HOME" != "$prefix" && \
9150 test -d "$HOME" && \
9151 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9152         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9153         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9154         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9155         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9156         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9157         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9158 }
9159
9160 cf_search="$cf_library_path_list $cf_search"
9161
9162         for cf_cv_library_path_utf8 in $cf_search
9163         do
9164           if test -d $cf_cv_library_path_utf8 ; then
9165             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9166
9167 echo "${as_me:-configure}:9167: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9168
9169             CPPFLAGS="$cf_test_CPPFLAGS"
9170             LIBS="-lutf8  $cf_save_LIBS"
9171             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9172             cat >conftest.$ac_ext <<_ACEOF
9173 #line 9173 "configure"
9174 #include "confdefs.h"
9175
9176 #include <libutf8.h>
9177 int
9178 main ()
9179 {
9180 putwc(0,0);
9181   ;
9182   return 0;
9183 }
9184 _ACEOF
9185 rm -f conftest.$ac_objext conftest$ac_exeext
9186 if { (eval echo "$as_me:9186: \"$ac_link\"") >&5
9187   (eval $ac_link) 2>&5
9188   ac_status=$?
9189   echo "$as_me:9189: \$? = $ac_status" >&5
9190   (exit $ac_status); } &&
9191          { ac_try='test -s conftest$ac_exeext'
9192   { (eval echo "$as_me:9192: \"$ac_try\"") >&5
9193   (eval $ac_try) 2>&5
9194   ac_status=$?
9195   echo "$as_me:9195: \$? = $ac_status" >&5
9196   (exit $ac_status); }; }; then
9197
9198                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9199
9200 echo "${as_me:-configure}:9200: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9201
9202                 cf_cv_find_linkage_utf8=yes
9203                 cf_cv_library_file_utf8="-lutf8"
9204                 break
9205 else
9206   echo "$as_me: failed program was:" >&5
9207 cat conftest.$ac_ext >&5
9208
9209                 CPPFLAGS="$cf_save_CPPFLAGS"
9210                 LIBS="$cf_save_LIBS"
9211                 LDFLAGS="$cf_save_LDFLAGS"
9212
9213 fi
9214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9215           fi
9216         done
9217         CPPFLAGS="$cf_save_CPPFLAGS"
9218         LDFLAGS="$cf_save_LDFLAGS"
9219       fi
9220
9221     else
9222       cf_cv_find_linkage_utf8=no
9223     fi
9224
9225 fi
9226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9227
9228 fi
9229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9230
9231 LIBS="$cf_save_LIBS"
9232
9233 if test "$cf_cv_find_linkage_utf8" = yes ; then
9234 cf_cv_utf8_lib=add-on
9235 else
9236 cf_cv_utf8_lib=no
9237 fi
9238
9239 fi
9240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9241 fi
9242 echo "$as_me:9242: result: $cf_cv_utf8_lib" >&5
9243 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9244
9245 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9246 # ncurses/ncursesw:
9247 if test "$cf_cv_utf8_lib" = "add-on" ; then
9248
9249 cat >>confdefs.h <<\EOF
9250 #define HAVE_LIBUTF8_H 1
9251 EOF
9252
9253 if test -n "$cf_cv_header_path_utf8" ; then
9254   for cf_add_incdir in $cf_cv_header_path_utf8
9255   do
9256         while test $cf_add_incdir != /usr/include
9257         do
9258           if test -d $cf_add_incdir
9259           then
9260                 cf_have_incdir=no
9261                 if test -n "$CFLAGS$CPPFLAGS" ; then
9262                   # a loop is needed to ensure we can add subdirs of existing dirs
9263                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9264                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9265                           cf_have_incdir=yes; break
9266                         fi
9267                   done
9268                 fi
9269
9270                 if test "$cf_have_incdir" = no ; then
9271                   if test "$cf_add_incdir" = /usr/local/include ; then
9272                         if test "$GCC" = yes
9273                         then
9274                           cf_save_CPPFLAGS=$CPPFLAGS
9275                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9276                           cat >conftest.$ac_ext <<_ACEOF
9277 #line 9277 "configure"
9278 #include "confdefs.h"
9279 #include <stdio.h>
9280 int
9281 main ()
9282 {
9283 printf("Hello")
9284   ;
9285   return 0;
9286 }
9287 _ACEOF
9288 rm -f conftest.$ac_objext
9289 if { (eval echo "$as_me:9289: \"$ac_compile\"") >&5
9290   (eval $ac_compile) 2>&5
9291   ac_status=$?
9292   echo "$as_me:9292: \$? = $ac_status" >&5
9293   (exit $ac_status); } &&
9294          { ac_try='test -s conftest.$ac_objext'
9295   { (eval echo "$as_me:9295: \"$ac_try\"") >&5
9296   (eval $ac_try) 2>&5
9297   ac_status=$?
9298   echo "$as_me:9298: \$? = $ac_status" >&5
9299   (exit $ac_status); }; }; then
9300   :
9301 else
9302   echo "$as_me: failed program was:" >&5
9303 cat conftest.$ac_ext >&5
9304 cf_have_incdir=yes
9305 fi
9306 rm -f conftest.$ac_objext conftest.$ac_ext
9307                           CPPFLAGS=$cf_save_CPPFLAGS
9308                         fi
9309                   fi
9310                 fi
9311
9312                 if test "$cf_have_incdir" = no ; then
9313                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9314
9315 echo "${as_me:-configure}:9315: testing adding $cf_add_incdir to include-path ..." 1>&5
9316
9317                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9318
9319                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9320                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9321                   cf_add_incdir="$cf_top_incdir"
9322                 else
9323                   break
9324                 fi
9325           fi
9326         done
9327   done
9328 fi
9329
9330 if test -n "$cf_cv_library_path_utf8" ; then
9331   for cf_add_libdir in $cf_cv_library_path_utf8
9332   do
9333     if test $cf_add_libdir = /usr/lib ; then
9334       :
9335     elif test -d $cf_add_libdir
9336     then
9337       cf_have_libdir=no
9338       if test -n "$LDFLAGS$LIBS" ; then
9339         # a loop is needed to ensure we can add subdirs of existing dirs
9340         for cf_test_libdir in $LDFLAGS $LIBS ; do
9341           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9342             cf_have_libdir=yes; break
9343           fi
9344         done
9345       fi
9346       if test "$cf_have_libdir" = no ; then
9347         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9348
9349 echo "${as_me:-configure}:9349: testing adding $cf_add_libdir to library-path ..." 1>&5
9350
9351         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9352       fi
9353     fi
9354   done
9355 fi
9356
9357         LIBS="$cf_cv_library_file_utf8 $LIBS"
9358 fi
9359
9360                 if test "$cf_cv_utf8_lib" != no ; then
9361                         NCURSES_LIBUTF8=1
9362                 fi
9363         fi
9364
9365 # This is needed on Tru64 5.0 to declare mbstate_t
9366 echo "$as_me:9366: checking if we must include wchar.h to declare mbstate_t" >&5
9367 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9368 if test "${cf_cv_mbstate_t+set}" = set; then
9369   echo $ECHO_N "(cached) $ECHO_C" >&6
9370 else
9371
9372 cat >conftest.$ac_ext <<_ACEOF
9373 #line 9373 "configure"
9374 #include "confdefs.h"
9375
9376 #include <stdlib.h>
9377 #include <stdarg.h>
9378 #include <stdio.h>
9379 #ifdef HAVE_LIBUTF8_H
9380 #include <libutf8.h>
9381 #endif
9382 int
9383 main ()
9384 {
9385 mbstate_t state
9386   ;
9387   return 0;
9388 }
9389 _ACEOF
9390 rm -f conftest.$ac_objext
9391 if { (eval echo "$as_me:9391: \"$ac_compile\"") >&5
9392   (eval $ac_compile) 2>&5
9393   ac_status=$?
9394   echo "$as_me:9394: \$? = $ac_status" >&5
9395   (exit $ac_status); } &&
9396          { ac_try='test -s conftest.$ac_objext'
9397   { (eval echo "$as_me:9397: \"$ac_try\"") >&5
9398   (eval $ac_try) 2>&5
9399   ac_status=$?
9400   echo "$as_me:9400: \$? = $ac_status" >&5
9401   (exit $ac_status); }; }; then
9402   cf_cv_mbstate_t=no
9403 else
9404   echo "$as_me: failed program was:" >&5
9405 cat conftest.$ac_ext >&5
9406 cat >conftest.$ac_ext <<_ACEOF
9407 #line 9407 "configure"
9408 #include "confdefs.h"
9409
9410 #include <stdlib.h>
9411 #include <stdarg.h>
9412 #include <stdio.h>
9413 #include <wchar.h>
9414 #ifdef HAVE_LIBUTF8_H
9415 #include <libutf8.h>
9416 #endif
9417 int
9418 main ()
9419 {
9420 mbstate_t value
9421   ;
9422   return 0;
9423 }
9424 _ACEOF
9425 rm -f conftest.$ac_objext
9426 if { (eval echo "$as_me:9426: \"$ac_compile\"") >&5
9427   (eval $ac_compile) 2>&5
9428   ac_status=$?
9429   echo "$as_me:9429: \$? = $ac_status" >&5
9430   (exit $ac_status); } &&
9431          { ac_try='test -s conftest.$ac_objext'
9432   { (eval echo "$as_me:9432: \"$ac_try\"") >&5
9433   (eval $ac_try) 2>&5
9434   ac_status=$?
9435   echo "$as_me:9435: \$? = $ac_status" >&5
9436   (exit $ac_status); }; }; then
9437   cf_cv_mbstate_t=yes
9438 else
9439   echo "$as_me: failed program was:" >&5
9440 cat conftest.$ac_ext >&5
9441 cf_cv_mbstate_t=unknown
9442 fi
9443 rm -f conftest.$ac_objext conftest.$ac_ext
9444 fi
9445 rm -f conftest.$ac_objext conftest.$ac_ext
9446 fi
9447 echo "$as_me:9447: result: $cf_cv_mbstate_t" >&5
9448 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9449
9450 if test "$cf_cv_mbstate_t" = yes ; then
9451
9452 cat >>confdefs.h <<\EOF
9453 #define NEED_WCHAR_H 1
9454 EOF
9455
9456         NEED_WCHAR_H=1
9457 fi
9458
9459 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9460 if test "$cf_cv_mbstate_t" = unknown ; then
9461         NCURSES_MBSTATE_T=1
9462 fi
9463
9464 # This is needed on Tru64 5.0 to declare wchar_t
9465 echo "$as_me:9465: checking if we must include wchar.h to declare wchar_t" >&5
9466 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9467 if test "${cf_cv_wchar_t+set}" = set; then
9468   echo $ECHO_N "(cached) $ECHO_C" >&6
9469 else
9470
9471 cat >conftest.$ac_ext <<_ACEOF
9472 #line 9472 "configure"
9473 #include "confdefs.h"
9474
9475 #include <stdlib.h>
9476 #include <stdarg.h>
9477 #include <stdio.h>
9478 #ifdef HAVE_LIBUTF8_H
9479 #include <libutf8.h>
9480 #endif
9481 int
9482 main ()
9483 {
9484 wchar_t state
9485   ;
9486   return 0;
9487 }
9488 _ACEOF
9489 rm -f conftest.$ac_objext
9490 if { (eval echo "$as_me:9490: \"$ac_compile\"") >&5
9491   (eval $ac_compile) 2>&5
9492   ac_status=$?
9493   echo "$as_me:9493: \$? = $ac_status" >&5
9494   (exit $ac_status); } &&
9495          { ac_try='test -s conftest.$ac_objext'
9496   { (eval echo "$as_me:9496: \"$ac_try\"") >&5
9497   (eval $ac_try) 2>&5
9498   ac_status=$?
9499   echo "$as_me:9499: \$? = $ac_status" >&5
9500   (exit $ac_status); }; }; then
9501   cf_cv_wchar_t=no
9502 else
9503   echo "$as_me: failed program was:" >&5
9504 cat conftest.$ac_ext >&5
9505 cat >conftest.$ac_ext <<_ACEOF
9506 #line 9506 "configure"
9507 #include "confdefs.h"
9508
9509 #include <stdlib.h>
9510 #include <stdarg.h>
9511 #include <stdio.h>
9512 #include <wchar.h>
9513 #ifdef HAVE_LIBUTF8_H
9514 #include <libutf8.h>
9515 #endif
9516 int
9517 main ()
9518 {
9519 wchar_t value
9520   ;
9521   return 0;
9522 }
9523 _ACEOF
9524 rm -f conftest.$ac_objext
9525 if { (eval echo "$as_me:9525: \"$ac_compile\"") >&5
9526   (eval $ac_compile) 2>&5
9527   ac_status=$?
9528   echo "$as_me:9528: \$? = $ac_status" >&5
9529   (exit $ac_status); } &&
9530          { ac_try='test -s conftest.$ac_objext'
9531   { (eval echo "$as_me:9531: \"$ac_try\"") >&5
9532   (eval $ac_try) 2>&5
9533   ac_status=$?
9534   echo "$as_me:9534: \$? = $ac_status" >&5
9535   (exit $ac_status); }; }; then
9536   cf_cv_wchar_t=yes
9537 else
9538   echo "$as_me: failed program was:" >&5
9539 cat conftest.$ac_ext >&5
9540 cf_cv_wchar_t=unknown
9541 fi
9542 rm -f conftest.$ac_objext conftest.$ac_ext
9543 fi
9544 rm -f conftest.$ac_objext conftest.$ac_ext
9545 fi
9546 echo "$as_me:9546: result: $cf_cv_wchar_t" >&5
9547 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9548
9549 if test "$cf_cv_wchar_t" = yes ; then
9550
9551 cat >>confdefs.h <<\EOF
9552 #define NEED_WCHAR_H 1
9553 EOF
9554
9555         NEED_WCHAR_H=1
9556 fi
9557
9558 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9559 if test "$cf_cv_wchar_t" = unknown ; then
9560         NCURSES_WCHAR_T=1
9561 fi
9562
9563 # if we find wchar_t in either place, use substitution to provide a fallback.
9564 if test "$cf_cv_wchar_t" != unknown ; then
9565         NCURSES_OK_WCHAR_T=1
9566 fi
9567
9568 # This is needed on Tru64 5.0 to declare wint_t
9569 echo "$as_me:9569: checking if we must include wchar.h to declare wint_t" >&5
9570 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9571 if test "${cf_cv_wint_t+set}" = set; then
9572   echo $ECHO_N "(cached) $ECHO_C" >&6
9573 else
9574
9575 cat >conftest.$ac_ext <<_ACEOF
9576 #line 9576 "configure"
9577 #include "confdefs.h"
9578
9579 #include <stdlib.h>
9580 #include <stdarg.h>
9581 #include <stdio.h>
9582 #ifdef HAVE_LIBUTF8_H
9583 #include <libutf8.h>
9584 #endif
9585 int
9586 main ()
9587 {
9588 wint_t state
9589   ;
9590   return 0;
9591 }
9592 _ACEOF
9593 rm -f conftest.$ac_objext
9594 if { (eval echo "$as_me:9594: \"$ac_compile\"") >&5
9595   (eval $ac_compile) 2>&5
9596   ac_status=$?
9597   echo "$as_me:9597: \$? = $ac_status" >&5
9598   (exit $ac_status); } &&
9599          { ac_try='test -s conftest.$ac_objext'
9600   { (eval echo "$as_me:9600: \"$ac_try\"") >&5
9601   (eval $ac_try) 2>&5
9602   ac_status=$?
9603   echo "$as_me:9603: \$? = $ac_status" >&5
9604   (exit $ac_status); }; }; then
9605   cf_cv_wint_t=no
9606 else
9607   echo "$as_me: failed program was:" >&5
9608 cat conftest.$ac_ext >&5
9609 cat >conftest.$ac_ext <<_ACEOF
9610 #line 9610 "configure"
9611 #include "confdefs.h"
9612
9613 #include <stdlib.h>
9614 #include <stdarg.h>
9615 #include <stdio.h>
9616 #include <wchar.h>
9617 #ifdef HAVE_LIBUTF8_H
9618 #include <libutf8.h>
9619 #endif
9620 int
9621 main ()
9622 {
9623 wint_t value
9624   ;
9625   return 0;
9626 }
9627 _ACEOF
9628 rm -f conftest.$ac_objext
9629 if { (eval echo "$as_me:9629: \"$ac_compile\"") >&5
9630   (eval $ac_compile) 2>&5
9631   ac_status=$?
9632   echo "$as_me:9632: \$? = $ac_status" >&5
9633   (exit $ac_status); } &&
9634          { ac_try='test -s conftest.$ac_objext'
9635   { (eval echo "$as_me:9635: \"$ac_try\"") >&5
9636   (eval $ac_try) 2>&5
9637   ac_status=$?
9638   echo "$as_me:9638: \$? = $ac_status" >&5
9639   (exit $ac_status); }; }; then
9640   cf_cv_wint_t=yes
9641 else
9642   echo "$as_me: failed program was:" >&5
9643 cat conftest.$ac_ext >&5
9644 cf_cv_wint_t=unknown
9645 fi
9646 rm -f conftest.$ac_objext conftest.$ac_ext
9647 fi
9648 rm -f conftest.$ac_objext conftest.$ac_ext
9649 fi
9650 echo "$as_me:9650: result: $cf_cv_wint_t" >&5
9651 echo "${ECHO_T}$cf_cv_wint_t" >&6
9652
9653 if test "$cf_cv_wint_t" = yes ; then
9654
9655 cat >>confdefs.h <<\EOF
9656 #define NEED_WCHAR_H 1
9657 EOF
9658
9659         NEED_WCHAR_H=1
9660 fi
9661
9662 # if we do not find wint_t in either place, use substitution to provide a fallback.
9663 if test "$cf_cv_wint_t" = unknown ; then
9664         NCURSES_WINT_T=1
9665 fi
9666
9667 # if we find wint_t in either place, use substitution to provide a fallback.
9668 if test "$cf_cv_wint_t" != unknown ; then
9669         NCURSES_OK_WINT_T=1
9670 fi
9671
9672         if test "$NCURSES_MBSTATE_T" != 0; then
9673
9674 cat >>confdefs.h <<\EOF
9675 #define NEED_MBSTATE_T_DEF 1
9676 EOF
9677
9678         fi
9679 fi
9680
9681 ###   use option --disable-lp64 to allow long chtype
9682 case $cf_cv_abi_version in
9683 [345]*)
9684         default_with_lp64=no
9685         ;;
9686 *)
9687         default_with_lp64=yes
9688         ;;
9689 esac
9690
9691 echo "$as_me:9691: checking whether to enable _LP64 definition in curses.h" >&5
9692 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9693
9694 # Check whether --enable-lp64 or --disable-lp64 was given.
9695 if test "${enable_lp64+set}" = set; then
9696   enableval="$enable_lp64"
9697   with_lp64=$enableval
9698 else
9699   with_lp64=$default_with_lp64
9700 fi;
9701 echo "$as_me:9701: result: $with_lp64" >&5
9702 echo "${ECHO_T}$with_lp64" >&6
9703
9704 if test "x$with_lp64" = xyes ; then
9705         cf_cv_enable_lp64=1
9706 else
9707         cf_cv_enable_lp64=0
9708 fi
9709
9710 # Check whether --enable-largefile or --disable-largefile was given.
9711 if test "${enable_largefile+set}" = set; then
9712   enableval="$enable_largefile"
9713
9714 fi;
9715 if test "$enable_largefile" != no; then
9716
9717   echo "$as_me:9717: checking for special C compiler options needed for large files" >&5
9718 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9719 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9720   echo $ECHO_N "(cached) $ECHO_C" >&6
9721 else
9722   ac_cv_sys_largefile_CC=no
9723      if test "$GCC" != yes; then
9724        ac_save_CC=$CC
9725        while :; do
9726          # IRIX 6.2 and later do not support large files by default,
9727          # so use the C compiler's -n32 option if that helps.
9728          cat >conftest.$ac_ext <<_ACEOF
9729 #line 9729 "configure"
9730 #include "confdefs.h"
9731 #include <sys/types.h>
9732  /* Check that off_t can represent 2**63 - 1 correctly.
9733     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9734     since some C++ compilers masquerading as C compilers
9735     incorrectly reject 9223372036854775807.  */
9736 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9737   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9738                        && LARGE_OFF_T % 2147483647 == 1)
9739                       ? 1 : -1];
9740 int
9741 main ()
9742 {
9743
9744   ;
9745   return 0;
9746 }
9747 _ACEOF
9748          rm -f conftest.$ac_objext
9749 if { (eval echo "$as_me:9749: \"$ac_compile\"") >&5
9750   (eval $ac_compile) 2>&5
9751   ac_status=$?
9752   echo "$as_me:9752: \$? = $ac_status" >&5
9753   (exit $ac_status); } &&
9754          { ac_try='test -s conftest.$ac_objext'
9755   { (eval echo "$as_me:9755: \"$ac_try\"") >&5
9756   (eval $ac_try) 2>&5
9757   ac_status=$?
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); }; }; then
9760   break
9761 else
9762   echo "$as_me: failed program was:" >&5
9763 cat conftest.$ac_ext >&5
9764 fi
9765 rm -f conftest.$ac_objext
9766          CC="$CC -n32"
9767          rm -f conftest.$ac_objext
9768 if { (eval echo "$as_me:9768: \"$ac_compile\"") >&5
9769   (eval $ac_compile) 2>&5
9770   ac_status=$?
9771   echo "$as_me:9771: \$? = $ac_status" >&5
9772   (exit $ac_status); } &&
9773          { ac_try='test -s conftest.$ac_objext'
9774   { (eval echo "$as_me:9774: \"$ac_try\"") >&5
9775   (eval $ac_try) 2>&5
9776   ac_status=$?
9777   echo "$as_me:9777: \$? = $ac_status" >&5
9778   (exit $ac_status); }; }; then
9779   ac_cv_sys_largefile_CC=' -n32'; break
9780 else
9781   echo "$as_me: failed program was:" >&5
9782 cat conftest.$ac_ext >&5
9783 fi
9784 rm -f conftest.$ac_objext
9785          break
9786        done
9787        CC=$ac_save_CC
9788        rm -f conftest.$ac_ext
9789     fi
9790 fi
9791 echo "$as_me:9791: result: $ac_cv_sys_largefile_CC" >&5
9792 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9793   if test "$ac_cv_sys_largefile_CC" != no; then
9794     CC=$CC$ac_cv_sys_largefile_CC
9795   fi
9796
9797   echo "$as_me:9797: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9798 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9799 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9800   echo $ECHO_N "(cached) $ECHO_C" >&6
9801 else
9802   while :; do
9803   ac_cv_sys_file_offset_bits=no
9804   cat >conftest.$ac_ext <<_ACEOF
9805 #line 9805 "configure"
9806 #include "confdefs.h"
9807 #include <sys/types.h>
9808  /* Check that off_t can represent 2**63 - 1 correctly.
9809     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9810     since some C++ compilers masquerading as C compilers
9811     incorrectly reject 9223372036854775807.  */
9812 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9813   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9814                        && LARGE_OFF_T % 2147483647 == 1)
9815                       ? 1 : -1];
9816 int
9817 main ()
9818 {
9819
9820   ;
9821   return 0;
9822 }
9823 _ACEOF
9824 rm -f conftest.$ac_objext
9825 if { (eval echo "$as_me:9825: \"$ac_compile\"") >&5
9826   (eval $ac_compile) 2>&5
9827   ac_status=$?
9828   echo "$as_me:9828: \$? = $ac_status" >&5
9829   (exit $ac_status); } &&
9830          { ac_try='test -s conftest.$ac_objext'
9831   { (eval echo "$as_me:9831: \"$ac_try\"") >&5
9832   (eval $ac_try) 2>&5
9833   ac_status=$?
9834   echo "$as_me:9834: \$? = $ac_status" >&5
9835   (exit $ac_status); }; }; then
9836   break
9837 else
9838   echo "$as_me: failed program was:" >&5
9839 cat conftest.$ac_ext >&5
9840 fi
9841 rm -f conftest.$ac_objext conftest.$ac_ext
9842   cat >conftest.$ac_ext <<_ACEOF
9843 #line 9843 "configure"
9844 #include "confdefs.h"
9845 #define _FILE_OFFSET_BITS 64
9846 #include <sys/types.h>
9847  /* Check that off_t can represent 2**63 - 1 correctly.
9848     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9849     since some C++ compilers masquerading as C compilers
9850     incorrectly reject 9223372036854775807.  */
9851 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9852   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9853                        && LARGE_OFF_T % 2147483647 == 1)
9854                       ? 1 : -1];
9855 int
9856 main ()
9857 {
9858
9859   ;
9860   return 0;
9861 }
9862 _ACEOF
9863 rm -f conftest.$ac_objext
9864 if { (eval echo "$as_me:9864: \"$ac_compile\"") >&5
9865   (eval $ac_compile) 2>&5
9866   ac_status=$?
9867   echo "$as_me:9867: \$? = $ac_status" >&5
9868   (exit $ac_status); } &&
9869          { ac_try='test -s conftest.$ac_objext'
9870   { (eval echo "$as_me:9870: \"$ac_try\"") >&5
9871   (eval $ac_try) 2>&5
9872   ac_status=$?
9873   echo "$as_me:9873: \$? = $ac_status" >&5
9874   (exit $ac_status); }; }; then
9875   ac_cv_sys_file_offset_bits=64; break
9876 else
9877   echo "$as_me: failed program was:" >&5
9878 cat conftest.$ac_ext >&5
9879 fi
9880 rm -f conftest.$ac_objext conftest.$ac_ext
9881   break
9882 done
9883 fi
9884 echo "$as_me:9884: result: $ac_cv_sys_file_offset_bits" >&5
9885 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9886 if test "$ac_cv_sys_file_offset_bits" != no; then
9887
9888 cat >>confdefs.h <<EOF
9889 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9890 EOF
9891
9892 fi
9893 rm -rf conftest*
9894   echo "$as_me:9894: checking for _LARGE_FILES value needed for large files" >&5
9895 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9896 if test "${ac_cv_sys_large_files+set}" = set; then
9897   echo $ECHO_N "(cached) $ECHO_C" >&6
9898 else
9899   while :; do
9900   ac_cv_sys_large_files=no
9901   cat >conftest.$ac_ext <<_ACEOF
9902 #line 9902 "configure"
9903 #include "confdefs.h"
9904 #include <sys/types.h>
9905  /* Check that off_t can represent 2**63 - 1 correctly.
9906     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9907     since some C++ compilers masquerading as C compilers
9908     incorrectly reject 9223372036854775807.  */
9909 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9910   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9911                        && LARGE_OFF_T % 2147483647 == 1)
9912                       ? 1 : -1];
9913 int
9914 main ()
9915 {
9916
9917   ;
9918   return 0;
9919 }
9920 _ACEOF
9921 rm -f conftest.$ac_objext
9922 if { (eval echo "$as_me:9922: \"$ac_compile\"") >&5
9923   (eval $ac_compile) 2>&5
9924   ac_status=$?
9925   echo "$as_me:9925: \$? = $ac_status" >&5
9926   (exit $ac_status); } &&
9927          { ac_try='test -s conftest.$ac_objext'
9928   { (eval echo "$as_me:9928: \"$ac_try\"") >&5
9929   (eval $ac_try) 2>&5
9930   ac_status=$?
9931   echo "$as_me:9931: \$? = $ac_status" >&5
9932   (exit $ac_status); }; }; then
9933   break
9934 else
9935   echo "$as_me: failed program was:" >&5
9936 cat conftest.$ac_ext >&5
9937 fi
9938 rm -f conftest.$ac_objext conftest.$ac_ext
9939   cat >conftest.$ac_ext <<_ACEOF
9940 #line 9940 "configure"
9941 #include "confdefs.h"
9942 #define _LARGE_FILES 1
9943 #include <sys/types.h>
9944  /* Check that off_t can represent 2**63 - 1 correctly.
9945     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9946     since some C++ compilers masquerading as C compilers
9947     incorrectly reject 9223372036854775807.  */
9948 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9949   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9950                        && LARGE_OFF_T % 2147483647 == 1)
9951                       ? 1 : -1];
9952 int
9953 main ()
9954 {
9955
9956   ;
9957   return 0;
9958 }
9959 _ACEOF
9960 rm -f conftest.$ac_objext
9961 if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
9962   (eval $ac_compile) 2>&5
9963   ac_status=$?
9964   echo "$as_me:9964: \$? = $ac_status" >&5
9965   (exit $ac_status); } &&
9966          { ac_try='test -s conftest.$ac_objext'
9967   { (eval echo "$as_me:9967: \"$ac_try\"") >&5
9968   (eval $ac_try) 2>&5
9969   ac_status=$?
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit $ac_status); }; }; then
9972   ac_cv_sys_large_files=1; break
9973 else
9974   echo "$as_me: failed program was:" >&5
9975 cat conftest.$ac_ext >&5
9976 fi
9977 rm -f conftest.$ac_objext conftest.$ac_ext
9978   break
9979 done
9980 fi
9981 echo "$as_me:9981: result: $ac_cv_sys_large_files" >&5
9982 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9983 if test "$ac_cv_sys_large_files" != no; then
9984
9985 cat >>confdefs.h <<EOF
9986 #define _LARGE_FILES $ac_cv_sys_large_files
9987 EOF
9988
9989 fi
9990 rm -rf conftest*
9991 fi
9992
9993     if test "$enable_largefile" != no ; then
9994         echo "$as_me:9994: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9995 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9996 if test "${ac_cv_sys_largefile_source+set}" = set; then
9997   echo $ECHO_N "(cached) $ECHO_C" >&6
9998 else
9999   while :; do
10000   ac_cv_sys_largefile_source=no
10001   cat >conftest.$ac_ext <<_ACEOF
10002 #line 10002 "configure"
10003 #include "confdefs.h"
10004 #include <stdio.h>
10005 int
10006 main ()
10007 {
10008 return !fseeko;
10009   ;
10010   return 0;
10011 }
10012 _ACEOF
10013 rm -f conftest.$ac_objext
10014 if { (eval echo "$as_me:10014: \"$ac_compile\"") >&5
10015   (eval $ac_compile) 2>&5
10016   ac_status=$?
10017   echo "$as_me:10017: \$? = $ac_status" >&5
10018   (exit $ac_status); } &&
10019          { ac_try='test -s conftest.$ac_objext'
10020   { (eval echo "$as_me:10020: \"$ac_try\"") >&5
10021   (eval $ac_try) 2>&5
10022   ac_status=$?
10023   echo "$as_me:10023: \$? = $ac_status" >&5
10024   (exit $ac_status); }; }; then
10025   break
10026 else
10027   echo "$as_me: failed program was:" >&5
10028 cat conftest.$ac_ext >&5
10029 fi
10030 rm -f conftest.$ac_objext conftest.$ac_ext
10031   cat >conftest.$ac_ext <<_ACEOF
10032 #line 10032 "configure"
10033 #include "confdefs.h"
10034 #define _LARGEFILE_SOURCE 1
10035 #include <stdio.h>
10036 int
10037 main ()
10038 {
10039 return !fseeko;
10040   ;
10041   return 0;
10042 }
10043 _ACEOF
10044 rm -f conftest.$ac_objext
10045 if { (eval echo "$as_me:10045: \"$ac_compile\"") >&5
10046   (eval $ac_compile) 2>&5
10047   ac_status=$?
10048   echo "$as_me:10048: \$? = $ac_status" >&5
10049   (exit $ac_status); } &&
10050          { ac_try='test -s conftest.$ac_objext'
10051   { (eval echo "$as_me:10051: \"$ac_try\"") >&5
10052   (eval $ac_try) 2>&5
10053   ac_status=$?
10054   echo "$as_me:10054: \$? = $ac_status" >&5
10055   (exit $ac_status); }; }; then
10056   ac_cv_sys_largefile_source=1; break
10057 else
10058   echo "$as_me: failed program was:" >&5
10059 cat conftest.$ac_ext >&5
10060 fi
10061 rm -f conftest.$ac_objext conftest.$ac_ext
10062   break
10063 done
10064 fi
10065 echo "$as_me:10065: result: $ac_cv_sys_largefile_source" >&5
10066 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10067 if test "$ac_cv_sys_largefile_source" != no; then
10068
10069 cat >>confdefs.h <<EOF
10070 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10071 EOF
10072
10073 fi
10074 rm -rf conftest*
10075
10076 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10077 # in glibc 2.1.3, but that breaks too many other things.
10078 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10079 echo "$as_me:10079: checking for fseeko" >&5
10080 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10081 if test "${ac_cv_func_fseeko+set}" = set; then
10082   echo $ECHO_N "(cached) $ECHO_C" >&6
10083 else
10084   cat >conftest.$ac_ext <<_ACEOF
10085 #line 10085 "configure"
10086 #include "confdefs.h"
10087 #include <stdio.h>
10088 int
10089 main ()
10090 {
10091 return fseeko && fseeko (stdin, 0, 0);
10092   ;
10093   return 0;
10094 }
10095 _ACEOF
10096 rm -f conftest.$ac_objext conftest$ac_exeext
10097 if { (eval echo "$as_me:10097: \"$ac_link\"") >&5
10098   (eval $ac_link) 2>&5
10099   ac_status=$?
10100   echo "$as_me:10100: \$? = $ac_status" >&5
10101   (exit $ac_status); } &&
10102          { ac_try='test -s conftest$ac_exeext'
10103   { (eval echo "$as_me:10103: \"$ac_try\"") >&5
10104   (eval $ac_try) 2>&5
10105   ac_status=$?
10106   echo "$as_me:10106: \$? = $ac_status" >&5
10107   (exit $ac_status); }; }; then
10108   ac_cv_func_fseeko=yes
10109 else
10110   echo "$as_me: failed program was:" >&5
10111 cat conftest.$ac_ext >&5
10112 ac_cv_func_fseeko=no
10113 fi
10114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10115 fi
10116 echo "$as_me:10116: result: $ac_cv_func_fseeko" >&5
10117 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10118 if test $ac_cv_func_fseeko = yes; then
10119
10120 cat >>confdefs.h <<\EOF
10121 #define HAVE_FSEEKO 1
10122 EOF
10123
10124 fi
10125
10126         # Normally we would collect these definitions in the config.h,
10127         # but (like _XOPEN_SOURCE), some environments rely on having these
10128         # defined before any of the system headers are included.  Another
10129         # case comes up with C++, e.g., on AIX the compiler compiles the
10130         # header files by themselves before looking at the body files it is
10131         # told to compile.  For ncurses, those header files do not include
10132         # the config.h
10133         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10134         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10135         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10136
10137         echo "$as_me:10137: checking whether to use struct dirent64" >&5
10138 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10139 if test "${cf_cv_struct_dirent64+set}" = set; then
10140   echo $ECHO_N "(cached) $ECHO_C" >&6
10141 else
10142
10143                 cat >conftest.$ac_ext <<_ACEOF
10144 #line 10144 "configure"
10145 #include "confdefs.h"
10146
10147 #include <sys/types.h>
10148 #include <dirent.h>
10149
10150 int
10151 main ()
10152 {
10153
10154                 /* if transitional largefile support is setup, this is true */
10155                 extern struct dirent64 * readdir(DIR *);
10156                 struct dirent64 *x = readdir((DIR *)0);
10157                 struct dirent *y = readdir((DIR *)0);
10158                 int z = x - y;
10159
10160   ;
10161   return 0;
10162 }
10163 _ACEOF
10164 rm -f conftest.$ac_objext
10165 if { (eval echo "$as_me:10165: \"$ac_compile\"") >&5
10166   (eval $ac_compile) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit $ac_status); } &&
10170          { ac_try='test -s conftest.$ac_objext'
10171   { (eval echo "$as_me:10171: \"$ac_try\"") >&5
10172   (eval $ac_try) 2>&5
10173   ac_status=$?
10174   echo "$as_me:10174: \$? = $ac_status" >&5
10175   (exit $ac_status); }; }; then
10176   cf_cv_struct_dirent64=yes
10177 else
10178   echo "$as_me: failed program was:" >&5
10179 cat conftest.$ac_ext >&5
10180 cf_cv_struct_dirent64=no
10181 fi
10182 rm -f conftest.$ac_objext conftest.$ac_ext
10183
10184 fi
10185 echo "$as_me:10185: result: $cf_cv_struct_dirent64" >&5
10186 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10187         test "$cf_cv_struct_dirent64" = yes &&
10188 cat >>confdefs.h <<\EOF
10189 #define HAVE_STRUCT_DIRENT64 1
10190 EOF
10191
10192     fi
10193
10194 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10195 echo "$as_me:10195: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10196 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10197
10198 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10199 if test "${enable_tparm_varargs+set}" = set; then
10200   enableval="$enable_tparm_varargs"
10201   with_tparm_varargs=$enableval
10202 else
10203   with_tparm_varargs=yes
10204 fi;
10205 echo "$as_me:10205: result: $with_tparm_varargs" >&5
10206 echo "${ECHO_T}$with_tparm_varargs" >&6
10207 NCURSES_TPARM_VARARGS=0
10208 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10209
10210 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10211 if test "$with_ticlib" != no ; then
10212 echo "$as_me:10212: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10213 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10214
10215 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10216 if test "${enable_tic_depends+set}" = set; then
10217   enableval="$enable_tic_depends"
10218   with_tic_depends=$enableval
10219 else
10220   with_tic_depends=yes
10221 fi;
10222 echo "$as_me:10222: result: $with_tic_depends" >&5
10223 echo "${ECHO_T}$with_tic_depends" >&6
10224 else
10225         with_tic_depends=no
10226 fi
10227
10228 ###   use option --with-bool to override bool's type
10229 echo "$as_me:10229: checking for type of bool" >&5
10230 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10231
10232 # Check whether --with-bool or --without-bool was given.
10233 if test "${with_bool+set}" = set; then
10234   withval="$with_bool"
10235   NCURSES_BOOL="$withval"
10236 else
10237   NCURSES_BOOL=auto
10238 fi;
10239 echo "$as_me:10239: result: $NCURSES_BOOL" >&5
10240 echo "${ECHO_T}$NCURSES_BOOL" >&6
10241
10242 echo "$as_me:10242: checking for alternate terminal capabilities file" >&5
10243 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10244
10245 # Check whether --with-caps or --without-caps was given.
10246 if test "${with_caps+set}" = set; then
10247   withval="$with_caps"
10248   TERMINFO_CAPS=Caps.$withval
10249 else
10250   TERMINFO_CAPS=Caps
10251 fi;
10252 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10253 echo "$as_me:10253: result: $TERMINFO_CAPS" >&5
10254 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10255
10256 ###   use option --with-chtype to override chtype's type
10257 echo "$as_me:10257: checking for type of chtype" >&5
10258 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10259
10260 # Check whether --with-chtype or --without-chtype was given.
10261 if test "${with_chtype+set}" = set; then
10262   withval="$with_chtype"
10263   NCURSES_CHTYPE="$withval"
10264 else
10265   NCURSES_CHTYPE=auto
10266 fi;
10267 echo "$as_me:10267: result: $NCURSES_CHTYPE" >&5
10268 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10269
10270 ###   use option --with-ospeed to override ospeed's type
10271 echo "$as_me:10271: checking for type of ospeed" >&5
10272 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10273
10274 # Check whether --with-ospeed or --without-ospeed was given.
10275 if test "${with_ospeed+set}" = set; then
10276   withval="$with_ospeed"
10277   NCURSES_OSPEED="$withval"
10278 else
10279   NCURSES_OSPEED=short
10280 fi;
10281 echo "$as_me:10281: result: $NCURSES_OSPEED" >&5
10282 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10283
10284 ###   use option --with-mmask-t to override mmask_t's type
10285 echo "$as_me:10285: checking for type of mmask_t" >&5
10286 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10287
10288 # Check whether --with-mmask-t or --without-mmask-t was given.
10289 if test "${with_mmask_t+set}" = set; then
10290   withval="$with_mmask_t"
10291   NCURSES_MMASK_T="$withval"
10292 else
10293   NCURSES_MMASK_T=auto
10294 fi;
10295 echo "$as_me:10295: result: $NCURSES_MMASK_T" >&5
10296 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10297
10298 ###   use option --with-ccharw-max to override CCHARW_MAX size
10299 echo "$as_me:10299: checking for size CCHARW_MAX" >&5
10300 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10301
10302 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10303 if test "${with_ccharw_max+set}" = set; then
10304   withval="$with_ccharw_max"
10305   NCURSES_CCHARW_MAX="$withval"
10306 else
10307   NCURSES_CCHARW_MAX=5
10308 fi;
10309 echo "$as_me:10309: result: $NCURSES_CCHARW_MAX" >&5
10310 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10311
10312 ###   use option --with-tparm-arg to override tparm's argument type
10313 echo "$as_me:10313: checking for type of tparm args" >&5
10314 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10315
10316 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10317 if test "${with_tparm_arg+set}" = set; then
10318   withval="$with_tparm_arg"
10319   NCURSES_TPARM_ARG="$withval"
10320 else
10321   NCURSES_TPARM_ARG=long
10322 fi;
10323 echo "$as_me:10323: result: $NCURSES_TPARM_ARG" >&5
10324 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10325
10326 ### Enable compiling-in rcs id's
10327 echo "$as_me:10327: checking if RCS identifiers should be compiled-in" >&5
10328 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10329
10330 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10331 if test "${with_rcs_ids+set}" = set; then
10332   withval="$with_rcs_ids"
10333   with_rcs_ids=$withval
10334 else
10335   with_rcs_ids=no
10336 fi;
10337 echo "$as_me:10337: result: $with_rcs_ids" >&5
10338 echo "${ECHO_T}$with_rcs_ids" >&6
10339 test "x$with_rcs_ids" = xyes &&
10340 cat >>confdefs.h <<\EOF
10341 #define USE_RCS_IDS 1
10342 EOF
10343
10344 ###############################################################################
10345
10346 echo "$as_me:10346: checking format of man-pages" >&5
10347 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10348
10349 # Check whether --with-manpage-format or --without-manpage-format was given.
10350 if test "${with_manpage_format+set}" = set; then
10351   withval="$with_manpage_format"
10352   MANPAGE_FORMAT=$withval
10353 else
10354   MANPAGE_FORMAT=unknown
10355 fi;
10356
10357 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10358 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10359
10360 cf_unknown=
10361
10362 case $MANPAGE_FORMAT in
10363 unknown)
10364   if test -z "$MANPATH" ; then
10365     MANPATH="/usr/man:/usr/share/man"
10366   fi
10367
10368   # look for the 'date' man-page (it's most likely to be installed!)
10369   MANPAGE_FORMAT=
10370   cf_preform=no
10371   cf_catonly=yes
10372   cf_example=date
10373
10374   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10375   for cf_dir in $MANPATH; do
10376     test -z "$cf_dir" && cf_dir=/usr/man
10377     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
10378     do
10379       cf_test=`echo $cf_name | sed -e 's/*//'`
10380       if test "x$cf_test" = "x$cf_name" ; then
10381
10382         case "$cf_name" in
10383         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10384         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10385         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10386         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10387         esac
10388
10389         case "$cf_name" in
10390         $cf_dir/man*)
10391           cf_catonly=no
10392           ;;
10393         $cf_dir/cat*)
10394           cf_preform=yes
10395           ;;
10396         esac
10397         break
10398       fi
10399
10400       # if we found a match in either man* or cat*, stop looking
10401       if test -n "$MANPAGE_FORMAT" ; then
10402         cf_found=no
10403         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10404         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10405         case "$cf_name" in
10406         $cf_dir/cat*)
10407           cf_found=yes
10408           ;;
10409         esac
10410         test $cf_found=yes && break
10411       fi
10412     done
10413     # only check the first directory in $MANPATH where we find manpages
10414     if test -n "$MANPAGE_FORMAT" ; then
10415        break
10416     fi
10417   done
10418   # if we did not find the example, just assume it is normal
10419   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10420   IFS="$ac_save_ifs"
10421   ;;
10422 *)
10423   for cf_option in $MANPAGE_FORMAT; do
10424      case $cf_option in #(vi
10425      gzip|compress|BSDI|normal|formatted|catonly)
10426        ;;
10427      *)
10428        cf_unknown="$cf_unknown $cf_option"
10429        ;;
10430      esac
10431   done
10432   ;;
10433 esac
10434
10435 echo "$as_me:10435: result: $MANPAGE_FORMAT" >&5
10436 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10437 if test -n "$cf_unknown" ; then
10438   { echo "$as_me:10438: WARNING: Unexpected manpage-format $cf_unknown" >&5
10439 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10440 fi
10441
10442 echo "$as_me:10442: checking for manpage renaming" >&5
10443 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10444
10445 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10446 if test "${with_manpage_renames+set}" = set; then
10447   withval="$with_manpage_renames"
10448   MANPAGE_RENAMES=$withval
10449 else
10450   MANPAGE_RENAMES=yes
10451 fi;
10452
10453 case ".$MANPAGE_RENAMES" in #(vi
10454 .no) #(vi
10455   ;;
10456 .|.yes)
10457   # Debian 'man' program?
10458   if test -f /etc/debian_version ; then
10459     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10460   else
10461     MANPAGE_RENAMES=no
10462   fi
10463   ;;
10464 esac
10465
10466 if test "$MANPAGE_RENAMES" != no ; then
10467   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10468     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10469   elif test ! -f $MANPAGE_RENAMES ; then
10470     { { echo "$as_me:10470: error: not a filename: $MANPAGE_RENAMES" >&5
10471 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10472    { (exit 1); exit 1; }; }
10473   fi
10474
10475   test ! -d man && mkdir man
10476
10477   # Construct a sed-script to perform renaming within man-pages
10478   if test -n "$MANPAGE_RENAMES" ; then
10479     test ! -d man && mkdir man
10480     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10481   fi
10482 fi
10483
10484 echo "$as_me:10484: result: $MANPAGE_RENAMES" >&5
10485 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10486
10487 echo "$as_me:10487: checking if manpage aliases will be installed" >&5
10488 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10489
10490 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10491 if test "${with_manpage_aliases+set}" = set; then
10492   withval="$with_manpage_aliases"
10493   MANPAGE_ALIASES=$withval
10494 else
10495   MANPAGE_ALIASES=yes
10496 fi;
10497
10498 echo "$as_me:10498: result: $MANPAGE_ALIASES" >&5
10499 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10500
10501 case "x$LN_S" in #(vi
10502 xln*) #(vi
10503         cf_use_symlinks=yes
10504         ;;
10505 *)
10506         cf_use_symlinks=no
10507         ;;
10508 esac
10509
10510 MANPAGE_SYMLINKS=no
10511 if test "$MANPAGE_ALIASES" = yes ; then
10512 echo "$as_me:10512: checking if manpage symlinks should be used" >&5
10513 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10514
10515 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10516 if test "${with_manpage_symlinks+set}" = set; then
10517   withval="$with_manpage_symlinks"
10518   MANPAGE_SYMLINKS=$withval
10519 else
10520   MANPAGE_SYMLINKS=$cf_use_symlinks
10521 fi;
10522
10523 if test "$$cf_use_symlinks" = no; then
10524 if test "$MANPAGE_SYMLINKS" = yes ; then
10525         { echo "$as_me:10525: WARNING: cannot make symlinks" >&5
10526 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10527         MANPAGE_SYMLINKS=no
10528 fi
10529 fi
10530
10531 echo "$as_me:10531: result: $MANPAGE_SYMLINKS" >&5
10532 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10533 fi
10534
10535 echo "$as_me:10535: checking for manpage tbl" >&5
10536 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10537
10538 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10539 if test "${with_manpage_tbl+set}" = set; then
10540   withval="$with_manpage_tbl"
10541   MANPAGE_TBL=$withval
10542 else
10543   MANPAGE_TBL=no
10544 fi;
10545
10546 echo "$as_me:10546: result: $MANPAGE_TBL" >&5
10547 echo "${ECHO_T}$MANPAGE_TBL" >&6
10548
10549   if test "$prefix" = "NONE" ; then
10550      cf_prefix="$ac_default_prefix"
10551   else
10552      cf_prefix="$prefix"
10553   fi
10554
10555   case "$MANPAGE_FORMAT" in # (vi
10556   *catonly*) # (vi
10557     cf_format=yes
10558     cf_inboth=no
10559     ;;
10560   *formatted*) # (vi
10561     cf_format=yes
10562     cf_inboth=yes
10563     ;;
10564   *)
10565     cf_format=no
10566     cf_inboth=no
10567     ;;
10568   esac
10569
10570 test ! -d man && mkdir man
10571
10572 cf_so_strip=
10573 cf_compress=
10574 case "$MANPAGE_FORMAT" in #(vi
10575 *compress*) #(vi
10576         cf_so_strip="Z"
10577         cf_compress=compress
10578   ;;
10579 *gzip*)
10580         cf_so_strip="gz"
10581         cf_compress=gzip
10582   ;;
10583 esac
10584
10585 cf_edit_man=./edit_man.sh
10586 cf_man_alias=`pwd`/man_alias.sed
10587
10588 cat >$cf_edit_man <<CF_EOF
10589 #! /bin/sh
10590 # this script is generated by the configure-script CF_MAN_PAGES macro.
10591
10592 prefix="$cf_prefix"
10593 datarootdir="$datarootdir"
10594 datadir="$datadir"
10595
10596 NCURSES_MAJOR="$NCURSES_MAJOR"
10597 NCURSES_MINOR="$NCURSES_MINOR"
10598 NCURSES_PATCH="$NCURSES_PATCH"
10599
10600 NCURSES_OSPEED="$NCURSES_OSPEED"
10601 TERMINFO="$TERMINFO"
10602
10603 INSTALL="$INSTALL"
10604 INSTALL_DATA="$INSTALL_DATA"
10605
10606 transform="$program_transform_name"
10607
10608 TMP=\${TMPDIR:=/tmp}/man\$\$
10609 trap "rm -f \$TMP" 0 1 2 5 15
10610
10611 form=\$1
10612 shift || exit 1
10613
10614 verb=\$1
10615 shift || exit 1
10616
10617 mandir=\$1
10618 shift || exit 1
10619
10620 srcdir=\$1
10621 top_srcdir=\$srcdir/..
10622 shift || exit 1
10623
10624 if test "\$form" = normal ; then
10625         if test "$cf_format" = yes ; then
10626         if test "$cf_inboth" = no ; then
10627                 sh \$0 format \$verb \$mandir \$srcdir \$*
10628                 exit $?
10629         fi
10630         fi
10631         cf_subdir=\$mandir/man
10632         cf_tables=$MANPAGE_TBL
10633 else
10634         cf_subdir=\$mandir/cat
10635         cf_tables=yes
10636 fi
10637
10638 # process the list of source-files
10639 for i in \$* ; do
10640 case \$i in #(vi
10641 *.orig|*.rej) ;; #(vi
10642 *.[0-9]*)
10643         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10644         if test \$verb = installing ; then
10645         if test ! -d \$cf_subdir\${section} ; then
10646                 mkdir -p \$cf_subdir\$section
10647         fi
10648         fi
10649
10650         # replace variables in man page
10651         if test ! -f $cf_man_alias ; then
10652 cat >>$cf_man_alias <<-CF_EOF2
10653                 s,@DATADIR@,\$datadir,g
10654                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10655                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10656                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10657                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10658                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10659                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10660 CF_EOF
10661
10662         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10663         do
10664                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10665                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10666 cat >>$cf_edit_man <<-CF_EOF
10667                 s,@$cf_NAME@,$cf_name,g
10668 CF_EOF
10669         done
10670
10671 cat >>$cf_edit_man <<CF_EOF
10672 CF_EOF2
10673                 echo "...made $cf_man_alias"
10674         fi
10675
10676         aliases=
10677         cf_source=\`basename \$i\`
10678         inalias=\$cf_source
10679         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10680         if test ! -f \$inalias ; then
10681                 echo .. skipped \$cf_source
10682                 continue
10683         fi
10684 CF_EOF
10685
10686 if test "$MANPAGE_ALIASES" != no ; then
10687 cat >>$cf_edit_man <<CF_EOF
10688         nCurses=ignore.3x
10689         test $with_curses_h = yes && nCurses=ncurses.3x
10690         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10691 CF_EOF
10692 fi
10693
10694 if test "$MANPAGE_RENAMES" = no ; then
10695 cat >>$cf_edit_man <<CF_EOF
10696         # perform program transformations for section 1 man pages
10697         if test \$section = 1 ; then
10698                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10699         else
10700                 cf_target=\$cf_subdir\${section}/\$cf_source
10701         fi
10702 CF_EOF
10703 else
10704 cat >>$cf_edit_man <<CF_EOF
10705         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10706         if test -z "\$cf_target" ; then
10707                 echo '? missing rename for '\$cf_source
10708                 cf_target="\$cf_source"
10709         fi
10710         cf_target="\$cf_subdir\${section}/\${cf_target}"
10711
10712 CF_EOF
10713 fi
10714
10715 cat >>$cf_edit_man <<CF_EOF
10716         sed     -f $cf_man_alias \\
10717 CF_EOF
10718
10719 if test -f $MANPAGE_RENAMES ; then
10720 cat >>$cf_edit_man <<CF_EOF
10721                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10722 CF_EOF
10723 else
10724 cat >>$cf_edit_man <<CF_EOF
10725                 < \$i >\$TMP
10726 CF_EOF
10727 fi
10728
10729 cat >>$cf_edit_man <<CF_EOF
10730 if test \$cf_tables = yes ; then
10731         tbl \$TMP >\$TMP.out
10732         mv \$TMP.out \$TMP
10733 fi
10734 CF_EOF
10735
10736 if test $with_overwrite != yes ; then
10737 cat >>$cf_edit_man <<CF_EOF
10738         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10739         mv \$TMP.out \$TMP
10740 CF_EOF
10741 fi
10742
10743 if test $with_curses_h != yes ; then
10744 cat >>$cf_edit_man <<CF_EOF
10745         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10746         mv \$TMP.out \$TMP
10747 CF_EOF
10748 fi
10749
10750 cat >>$cf_edit_man <<CF_EOF
10751         if test \$form = format ; then
10752                 nroff -man \$TMP >\$TMP.out
10753                 mv \$TMP.out \$TMP
10754         fi
10755 CF_EOF
10756
10757 if test -n "$cf_compress" ; then
10758 cat >>$cf_edit_man <<CF_EOF
10759         if test \$verb = installing ; then
10760         if ( $cf_compress -f \$TMP )
10761         then
10762                 mv \$TMP.$cf_so_strip \$TMP
10763         fi
10764         fi
10765         cf_target="\$cf_target.$cf_so_strip"
10766 CF_EOF
10767 fi
10768
10769 case "$MANPAGE_FORMAT" in #(vi
10770 *BSDI*)
10771 cat >>$cf_edit_man <<CF_EOF
10772         if test \$form = format ; then
10773                 # BSDI installs only .0 suffixes in the cat directories
10774                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10775         fi
10776 CF_EOF
10777   ;;
10778 esac
10779
10780 cat >>$cf_edit_man <<CF_EOF
10781         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10782         if test \$verb = installing ; then
10783                 echo \$verb \$cf_target
10784                 \$INSTALL_DATA \$TMP \$cf_target
10785                 test -d \$cf_subdir\${section} &&
10786                 test -n "\$aliases" && (
10787                         cd \$cf_subdir\${section} && (
10788                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10789                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10790                                 cf_target=\`basename \$cf_target\`
10791                                 for cf_alias in \$aliases
10792                                 do
10793                                         if test \$section = 1 ; then
10794                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10795                                         fi
10796
10797                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10798                                                 if test -f \$cf_alias\${suffix} ; then
10799                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10800                                                         then
10801                                                                 continue
10802                                                         fi
10803                                                 fi
10804                                                 echo .. \$verb alias \$cf_alias\${suffix}
10805 CF_EOF
10806 case "x$LN_S" in #(vi
10807 *-f) #(vi
10808 cat >>$cf_edit_man <<CF_EOF
10809                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10810 CF_EOF
10811         ;;
10812 *)
10813 cat >>$cf_edit_man <<CF_EOF
10814                                                 rm -f \$cf_alias\${suffix}
10815                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10816 CF_EOF
10817         ;;
10818 esac
10819 cat >>$cf_edit_man <<CF_EOF
10820                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10821                                                 echo ".so \$cf_source" >\$TMP
10822 CF_EOF
10823 if test -n "$cf_compress" ; then
10824 cat >>$cf_edit_man <<CF_EOF
10825                                                 if test -n "$cf_so_strip" ; then
10826                                                         $cf_compress -f \$TMP
10827                                                         mv \$TMP.$cf_so_strip \$TMP
10828                                                 fi
10829 CF_EOF
10830 fi
10831 cat >>$cf_edit_man <<CF_EOF
10832                                                 echo .. \$verb alias \$cf_alias\${suffix}
10833                                                 rm -f \$cf_alias\${suffix}
10834                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10835                                         fi
10836                                 done
10837                         )
10838                 )
10839         elif test \$verb = removing ; then
10840                 test -f \$cf_target && (
10841                         echo \$verb \$cf_target
10842                         rm -f \$cf_target
10843                 )
10844                 test -d \$cf_subdir\${section} &&
10845                 test -n "\$aliases" && (
10846                         cd \$cf_subdir\${section} && (
10847                                 for cf_alias in \$aliases
10848                                 do
10849                                         if test \$section = 1 ; then
10850                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10851                                         fi
10852
10853                                         echo .. \$verb alias \$cf_alias\${suffix}
10854                                         rm -f \$cf_alias\${suffix}
10855                                 done
10856                         )
10857                 )
10858         else
10859 #               echo ".hy 0"
10860                 cat \$TMP
10861         fi
10862         ;;
10863 esac
10864 done
10865
10866 if test $cf_inboth = yes ; then
10867 if test \$form != format ; then
10868         sh \$0 format \$verb \$mandir \$srcdir \$*
10869 fi
10870 fi
10871
10872 exit 0
10873 CF_EOF
10874 chmod 755 $cf_edit_man
10875
10876 ###############################################################################
10877
10878 ### Note that some functions (such as const) are normally disabled anyway.
10879 echo "$as_me:10879: checking if you want to build with function extensions" >&5
10880 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10881
10882 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10883 if test "${enable_ext_funcs+set}" = set; then
10884   enableval="$enable_ext_funcs"
10885   with_ext_funcs=$enableval
10886 else
10887   with_ext_funcs=yes
10888 fi;
10889 echo "$as_me:10889: result: $with_ext_funcs" >&5
10890 echo "${ECHO_T}$with_ext_funcs" >&6
10891 if test "x$with_ext_funcs" = xyes ; then
10892         NCURSES_EXT_FUNCS=1
10893
10894 cat >>confdefs.h <<\EOF
10895 #define HAVE_ASSUME_DEFAULT_COLORS 1
10896 EOF
10897
10898 cat >>confdefs.h <<\EOF
10899 #define HAVE_CURSES_VERSION 1
10900 EOF
10901
10902 cat >>confdefs.h <<\EOF
10903 #define HAVE_HAS_KEY 1
10904 EOF
10905
10906 cat >>confdefs.h <<\EOF
10907 #define HAVE_RESIZETERM 1
10908 EOF
10909
10910 cat >>confdefs.h <<\EOF
10911 #define HAVE_RESIZE_TERM 1
10912 EOF
10913
10914 cat >>confdefs.h <<\EOF
10915 #define HAVE_TERM_ENTRY_H 1
10916 EOF
10917
10918 cat >>confdefs.h <<\EOF
10919 #define HAVE_USE_DEFAULT_COLORS 1
10920 EOF
10921
10922 cat >>confdefs.h <<\EOF
10923 #define HAVE_USE_SCREEN 1
10924 EOF
10925
10926 cat >>confdefs.h <<\EOF
10927 #define HAVE_USE_WINDOW 1
10928 EOF
10929
10930 cat >>confdefs.h <<\EOF
10931 #define HAVE_WRESIZE 1
10932 EOF
10933
10934 cat >>confdefs.h <<\EOF
10935 #define NCURSES_EXT_FUNCS 1
10936 EOF
10937
10938         GENERATED_EXT_FUNCS=generated
10939 else
10940         NCURSES_EXT_FUNCS=0
10941         GENERATED_EXT_FUNCS=
10942 fi
10943
10944 echo "$as_me:10944: checking if you want to build with experimental SCREEN extensions" >&5
10945 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10946
10947 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10948 if test "${enable_sp_funcs+set}" = set; then
10949   enableval="$enable_sp_funcs"
10950   with_sp_funcs=$enableval
10951 else
10952   with_sp_funcs=no
10953 fi;
10954 echo "$as_me:10954: result: $with_sp_funcs" >&5
10955 echo "${ECHO_T}$with_sp_funcs" >&6
10956 if test "x$with_sp_funcs" = xyes ; then
10957         NCURSES_SP_FUNCS=1
10958
10959 cat >>confdefs.h <<\EOF
10960 #define NCURSES_SP_FUNCS 1
10961 EOF
10962
10963         GENERATED_SP_FUNCS=generated
10964 else
10965         NCURSES_SP_FUNCS=0
10966         GENERATED_SP_FUNCS=
10967 fi
10968
10969 echo "$as_me:10969: checking if you want to build with experimental terminal-driver" >&5
10970 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10971
10972 # Check whether --enable-term-driver or --disable-term-driver was given.
10973 if test "${enable_term_driver+set}" = set; then
10974   enableval="$enable_term_driver"
10975   with_term_driver=$enableval
10976 else
10977   with_term_driver=no
10978 fi;
10979 echo "$as_me:10979: result: $with_term_driver" >&5
10980 echo "${ECHO_T}$with_term_driver" >&6
10981 if test "x$with_term_driver" = xyes ; then
10982
10983 cat >>confdefs.h <<\EOF
10984 #define USE_TERM_DRIVER 1
10985 EOF
10986
10987         if test "x$with_sp_funcs" != xyes ; then
10988                 { { echo "$as_me:10988: error: The term-driver option relies upon sp-funcs" >&5
10989 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10990    { (exit 1); exit 1; }; }
10991         fi
10992 fi
10993
10994 ###   use option --enable-const to turn on use of const beyond that in XSI.
10995 echo "$as_me:10995: checking for extended use of const keyword" >&5
10996 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10997
10998 # Check whether --enable-const or --disable-const was given.
10999 if test "${enable_const+set}" = set; then
11000   enableval="$enable_const"
11001   with_ext_const=$enableval
11002 else
11003   with_ext_const=no
11004 fi;
11005 echo "$as_me:11005: result: $with_ext_const" >&5
11006 echo "${ECHO_T}$with_ext_const" >&6
11007 NCURSES_CONST='/*nothing*/'
11008 if test "x$with_ext_const" = xyes ; then
11009         NCURSES_CONST=const
11010 fi
11011
11012 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11013 echo "$as_me:11013: checking if you want to use extended colors" >&5
11014 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11015
11016 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11017 if test "${enable_ext_colors+set}" = set; then
11018   enableval="$enable_ext_colors"
11019   with_ext_colors=$enableval
11020 else
11021   with_ext_colors=no
11022 fi;
11023 echo "$as_me:11023: result: $with_ext_colors" >&5
11024 echo "${ECHO_T}$with_ext_colors" >&6
11025 NCURSES_EXT_COLORS=0
11026 if test "x$with_ext_colors" = xyes ; then
11027         if test "x$with_widec" != xyes ; then
11028                 { { echo "$as_me:11028: error: This option applies only to wide-character library" >&5
11029 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11030    { (exit 1); exit 1; }; }
11031         else
11032                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11033
11034 if test "${with_abi_version+set}" != set; then
11035         case $cf_cv_rel_version in
11036         5.*)
11037                 cf_cv_rel_version=6.0
11038                 cf_cv_abi_version=6
11039                 { echo "$as_me:11039: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11040 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11041                 ;;
11042         esac
11043 fi
11044
11045         fi
11046         NCURSES_EXT_COLORS=1
11047
11048 cat >>confdefs.h <<\EOF
11049 #define NCURSES_EXT_COLORS 1
11050 EOF
11051
11052 fi
11053
11054 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11055 echo "$as_me:11055: checking if you want to use extended mouse encoding" >&5
11056 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11057
11058 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11059 if test "${enable_ext_mouse+set}" = set; then
11060   enableval="$enable_ext_mouse"
11061   with_ext_mouse=$enableval
11062 else
11063   with_ext_mouse=no
11064 fi;
11065 echo "$as_me:11065: result: $with_ext_mouse" >&5
11066 echo "${ECHO_T}$with_ext_mouse" >&6
11067 NCURSES_MOUSE_VERSION=1
11068 if test "x$with_ext_mouse" = xyes ; then
11069         NCURSES_MOUSE_VERSION=2
11070
11071 if test "${with_abi_version+set}" != set; then
11072         case $cf_cv_rel_version in
11073         5.*)
11074                 cf_cv_rel_version=6.0
11075                 cf_cv_abi_version=6
11076                 { echo "$as_me:11076: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11077 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11078                 ;;
11079         esac
11080 fi
11081
11082 fi
11083
11084 echo "$as_me:11084: checking if you want \$NCURSES_NO_PADDING code" >&5
11085 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11086
11087 # Check whether --enable-no-padding or --disable-no-padding was given.
11088 if test "${enable_no_padding+set}" = set; then
11089   enableval="$enable_no_padding"
11090   with_no_padding=$enableval
11091 else
11092   with_no_padding=$with_ext_funcs
11093 fi;
11094 echo "$as_me:11094: result: $with_no_padding" >&5
11095 echo "${ECHO_T}$with_no_padding" >&6
11096 test "x$with_no_padding" = xyes &&
11097 cat >>confdefs.h <<\EOF
11098 #define NCURSES_NO_PADDING 1
11099 EOF
11100
11101 echo "$as_me:11101: checking for ANSI C header files" >&5
11102 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11103 if test "${ac_cv_header_stdc+set}" = set; then
11104   echo $ECHO_N "(cached) $ECHO_C" >&6
11105 else
11106   cat >conftest.$ac_ext <<_ACEOF
11107 #line 11107 "configure"
11108 #include "confdefs.h"
11109 #include <stdlib.h>
11110 #include <stdarg.h>
11111 #include <string.h>
11112 #include <float.h>
11113
11114 _ACEOF
11115 if { (eval echo "$as_me:11115: \"$ac_cpp conftest.$ac_ext\"") >&5
11116   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11117   ac_status=$?
11118   egrep -v '^ *\+' conftest.er1 >conftest.err
11119   rm -f conftest.er1
11120   cat conftest.err >&5
11121   echo "$as_me:11121: \$? = $ac_status" >&5
11122   (exit $ac_status); } >/dev/null; then
11123   if test -s conftest.err; then
11124     ac_cpp_err=$ac_c_preproc_warn_flag
11125   else
11126     ac_cpp_err=
11127   fi
11128 else
11129   ac_cpp_err=yes
11130 fi
11131 if test -z "$ac_cpp_err"; then
11132   ac_cv_header_stdc=yes
11133 else
11134   echo "$as_me: failed program was:" >&5
11135   cat conftest.$ac_ext >&5
11136   ac_cv_header_stdc=no
11137 fi
11138 rm -f conftest.err conftest.$ac_ext
11139
11140 if test $ac_cv_header_stdc = yes; then
11141   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11142   cat >conftest.$ac_ext <<_ACEOF
11143 #line 11143 "configure"
11144 #include "confdefs.h"
11145 #include <string.h>
11146
11147 _ACEOF
11148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11149   egrep "memchr" >/dev/null 2>&1; then
11150   :
11151 else
11152   ac_cv_header_stdc=no
11153 fi
11154 rm -rf conftest*
11155
11156 fi
11157
11158 if test $ac_cv_header_stdc = yes; then
11159   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11160   cat >conftest.$ac_ext <<_ACEOF
11161 #line 11161 "configure"
11162 #include "confdefs.h"
11163 #include <stdlib.h>
11164
11165 _ACEOF
11166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11167   egrep "free" >/dev/null 2>&1; then
11168   :
11169 else
11170   ac_cv_header_stdc=no
11171 fi
11172 rm -rf conftest*
11173
11174 fi
11175
11176 if test $ac_cv_header_stdc = yes; then
11177   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11178   if test "$cross_compiling" = yes; then
11179   :
11180 else
11181   cat >conftest.$ac_ext <<_ACEOF
11182 #line 11182 "configure"
11183 #include "confdefs.h"
11184 #include <ctype.h>
11185 #if ((' ' & 0x0FF) == 0x020)
11186 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11187 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11188 #else
11189 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11190                      || ('j' <= (c) && (c) <= 'r') \
11191                      || ('s' <= (c) && (c) <= 'z'))
11192 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11193 #endif
11194
11195 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11196 int
11197 main ()
11198 {
11199   int i;
11200   for (i = 0; i < 256; i++)
11201     if (XOR (islower (i), ISLOWER (i))
11202         || toupper (i) != TOUPPER (i))
11203       $ac_main_return(2);
11204   $ac_main_return (0);
11205 }
11206 _ACEOF
11207 rm -f conftest$ac_exeext
11208 if { (eval echo "$as_me:11208: \"$ac_link\"") >&5
11209   (eval $ac_link) 2>&5
11210   ac_status=$?
11211   echo "$as_me:11211: \$? = $ac_status" >&5
11212   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11213   { (eval echo "$as_me:11213: \"$ac_try\"") >&5
11214   (eval $ac_try) 2>&5
11215   ac_status=$?
11216   echo "$as_me:11216: \$? = $ac_status" >&5
11217   (exit $ac_status); }; }; then
11218   :
11219 else
11220   echo "$as_me: program exited with status $ac_status" >&5
11221 echo "$as_me: failed program was:" >&5
11222 cat conftest.$ac_ext >&5
11223 ac_cv_header_stdc=no
11224 fi
11225 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11226 fi
11227 fi
11228 fi
11229 echo "$as_me:11229: result: $ac_cv_header_stdc" >&5
11230 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11231 if test $ac_cv_header_stdc = yes; then
11232
11233 cat >>confdefs.h <<\EOF
11234 #define STDC_HEADERS 1
11235 EOF
11236
11237 fi
11238
11239 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11240
11241 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11242                   inttypes.h stdint.h unistd.h
11243 do
11244 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11245 echo "$as_me:11245: checking for $ac_header" >&5
11246 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11247 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11248   echo $ECHO_N "(cached) $ECHO_C" >&6
11249 else
11250   cat >conftest.$ac_ext <<_ACEOF
11251 #line 11251 "configure"
11252 #include "confdefs.h"
11253 $ac_includes_default
11254 #include <$ac_header>
11255 _ACEOF
11256 rm -f conftest.$ac_objext
11257 if { (eval echo "$as_me:11257: \"$ac_compile\"") >&5
11258   (eval $ac_compile) 2>&5
11259   ac_status=$?
11260   echo "$as_me:11260: \$? = $ac_status" >&5
11261   (exit $ac_status); } &&
11262          { ac_try='test -s conftest.$ac_objext'
11263   { (eval echo "$as_me:11263: \"$ac_try\"") >&5
11264   (eval $ac_try) 2>&5
11265   ac_status=$?
11266   echo "$as_me:11266: \$? = $ac_status" >&5
11267   (exit $ac_status); }; }; then
11268   eval "$as_ac_Header=yes"
11269 else
11270   echo "$as_me: failed program was:" >&5
11271 cat conftest.$ac_ext >&5
11272 eval "$as_ac_Header=no"
11273 fi
11274 rm -f conftest.$ac_objext conftest.$ac_ext
11275 fi
11276 echo "$as_me:11276: result: `eval echo '${'$as_ac_Header'}'`" >&5
11277 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11278 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11279   cat >>confdefs.h <<EOF
11280 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11281 EOF
11282
11283 fi
11284 done
11285
11286 echo "$as_me:11286: checking for signed char" >&5
11287 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11288 if test "${ac_cv_type_signed_char+set}" = set; then
11289   echo $ECHO_N "(cached) $ECHO_C" >&6
11290 else
11291   cat >conftest.$ac_ext <<_ACEOF
11292 #line 11292 "configure"
11293 #include "confdefs.h"
11294 $ac_includes_default
11295 int
11296 main ()
11297 {
11298 if ((signed char *) 0)
11299   return 0;
11300 if (sizeof (signed char))
11301   return 0;
11302   ;
11303   return 0;
11304 }
11305 _ACEOF
11306 rm -f conftest.$ac_objext
11307 if { (eval echo "$as_me:11307: \"$ac_compile\"") >&5
11308   (eval $ac_compile) 2>&5
11309   ac_status=$?
11310   echo "$as_me:11310: \$? = $ac_status" >&5
11311   (exit $ac_status); } &&
11312          { ac_try='test -s conftest.$ac_objext'
11313   { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314   (eval $ac_try) 2>&5
11315   ac_status=$?
11316   echo "$as_me:11316: \$? = $ac_status" >&5
11317   (exit $ac_status); }; }; then
11318   ac_cv_type_signed_char=yes
11319 else
11320   echo "$as_me: failed program was:" >&5
11321 cat conftest.$ac_ext >&5
11322 ac_cv_type_signed_char=no
11323 fi
11324 rm -f conftest.$ac_objext conftest.$ac_ext
11325 fi
11326 echo "$as_me:11326: result: $ac_cv_type_signed_char" >&5
11327 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11328
11329 echo "$as_me:11329: checking size of signed char" >&5
11330 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11331 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11332   echo $ECHO_N "(cached) $ECHO_C" >&6
11333 else
11334   if test "$ac_cv_type_signed_char" = yes; then
11335   if test "$cross_compiling" = yes; then
11336   # Depending upon the size, compute the lo and hi bounds.
11337 cat >conftest.$ac_ext <<_ACEOF
11338 #line 11338 "configure"
11339 #include "confdefs.h"
11340 $ac_includes_default
11341 int
11342 main ()
11343 {
11344 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11345   ;
11346   return 0;
11347 }
11348 _ACEOF
11349 rm -f conftest.$ac_objext
11350 if { (eval echo "$as_me:11350: \"$ac_compile\"") >&5
11351   (eval $ac_compile) 2>&5
11352   ac_status=$?
11353   echo "$as_me:11353: \$? = $ac_status" >&5
11354   (exit $ac_status); } &&
11355          { ac_try='test -s conftest.$ac_objext'
11356   { (eval echo "$as_me:11356: \"$ac_try\"") >&5
11357   (eval $ac_try) 2>&5
11358   ac_status=$?
11359   echo "$as_me:11359: \$? = $ac_status" >&5
11360   (exit $ac_status); }; }; then
11361   ac_lo=0 ac_mid=0
11362   while :; do
11363     cat >conftest.$ac_ext <<_ACEOF
11364 #line 11364 "configure"
11365 #include "confdefs.h"
11366 $ac_includes_default
11367 int
11368 main ()
11369 {
11370 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11371   ;
11372   return 0;
11373 }
11374 _ACEOF
11375 rm -f conftest.$ac_objext
11376 if { (eval echo "$as_me:11376: \"$ac_compile\"") >&5
11377   (eval $ac_compile) 2>&5
11378   ac_status=$?
11379   echo "$as_me:11379: \$? = $ac_status" >&5
11380   (exit $ac_status); } &&
11381          { ac_try='test -s conftest.$ac_objext'
11382   { (eval echo "$as_me:11382: \"$ac_try\"") >&5
11383   (eval $ac_try) 2>&5
11384   ac_status=$?
11385   echo "$as_me:11385: \$? = $ac_status" >&5
11386   (exit $ac_status); }; }; then
11387   ac_hi=$ac_mid; break
11388 else
11389   echo "$as_me: failed program was:" >&5
11390 cat conftest.$ac_ext >&5
11391 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11392 fi
11393 rm -f conftest.$ac_objext conftest.$ac_ext
11394   done
11395 else
11396   echo "$as_me: failed program was:" >&5
11397 cat conftest.$ac_ext >&5
11398 ac_hi=-1 ac_mid=-1
11399   while :; do
11400     cat >conftest.$ac_ext <<_ACEOF
11401 #line 11401 "configure"
11402 #include "confdefs.h"
11403 $ac_includes_default
11404 int
11405 main ()
11406 {
11407 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11408   ;
11409   return 0;
11410 }
11411 _ACEOF
11412 rm -f conftest.$ac_objext
11413 if { (eval echo "$as_me:11413: \"$ac_compile\"") >&5
11414   (eval $ac_compile) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); } &&
11418          { ac_try='test -s conftest.$ac_objext'
11419   { (eval echo "$as_me:11419: \"$ac_try\"") >&5
11420   (eval $ac_try) 2>&5
11421   ac_status=$?
11422   echo "$as_me:11422: \$? = $ac_status" >&5
11423   (exit $ac_status); }; }; then
11424   ac_lo=$ac_mid; break
11425 else
11426   echo "$as_me: failed program was:" >&5
11427 cat conftest.$ac_ext >&5
11428 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11429 fi
11430 rm -f conftest.$ac_objext conftest.$ac_ext
11431   done
11432 fi
11433 rm -f conftest.$ac_objext conftest.$ac_ext
11434 # Binary search between lo and hi bounds.
11435 while test "x$ac_lo" != "x$ac_hi"; do
11436   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11437   cat >conftest.$ac_ext <<_ACEOF
11438 #line 11438 "configure"
11439 #include "confdefs.h"
11440 $ac_includes_default
11441 int
11442 main ()
11443 {
11444 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11445   ;
11446   return 0;
11447 }
11448 _ACEOF
11449 rm -f conftest.$ac_objext
11450 if { (eval echo "$as_me:11450: \"$ac_compile\"") >&5
11451   (eval $ac_compile) 2>&5
11452   ac_status=$?
11453   echo "$as_me:11453: \$? = $ac_status" >&5
11454   (exit $ac_status); } &&
11455          { ac_try='test -s conftest.$ac_objext'
11456   { (eval echo "$as_me:11456: \"$ac_try\"") >&5
11457   (eval $ac_try) 2>&5
11458   ac_status=$?
11459   echo "$as_me:11459: \$? = $ac_status" >&5
11460   (exit $ac_status); }; }; then
11461   ac_hi=$ac_mid
11462 else
11463   echo "$as_me: failed program was:" >&5
11464 cat conftest.$ac_ext >&5
11465 ac_lo=`expr $ac_mid + 1`
11466 fi
11467 rm -f conftest.$ac_objext conftest.$ac_ext
11468 done
11469 ac_cv_sizeof_signed_char=$ac_lo
11470 else
11471   if test "$cross_compiling" = yes; then
11472   { { echo "$as_me:11472: error: cannot run test program while cross compiling" >&5
11473 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11474    { (exit 1); exit 1; }; }
11475 else
11476   cat >conftest.$ac_ext <<_ACEOF
11477 #line 11477 "configure"
11478 #include "confdefs.h"
11479 $ac_includes_default
11480 int
11481 main ()
11482 {
11483 FILE *f = fopen ("conftest.val", "w");
11484 if (!f)
11485   $ac_main_return (1);
11486 fprintf (f, "%d", (sizeof (signed char)));
11487 fclose (f);
11488   ;
11489   return 0;
11490 }
11491 _ACEOF
11492 rm -f conftest$ac_exeext
11493 if { (eval echo "$as_me:11493: \"$ac_link\"") >&5
11494   (eval $ac_link) 2>&5
11495   ac_status=$?
11496   echo "$as_me:11496: \$? = $ac_status" >&5
11497   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11498   { (eval echo "$as_me:11498: \"$ac_try\"") >&5
11499   (eval $ac_try) 2>&5
11500   ac_status=$?
11501   echo "$as_me:11501: \$? = $ac_status" >&5
11502   (exit $ac_status); }; }; then
11503   ac_cv_sizeof_signed_char=`cat conftest.val`
11504 else
11505   echo "$as_me: program exited with status $ac_status" >&5
11506 echo "$as_me: failed program was:" >&5
11507 cat conftest.$ac_ext >&5
11508 fi
11509 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11510 fi
11511 fi
11512 rm -f conftest.val
11513 else
11514   ac_cv_sizeof_signed_char=0
11515 fi
11516 fi
11517 echo "$as_me:11517: result: $ac_cv_sizeof_signed_char" >&5
11518 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11519 cat >>confdefs.h <<EOF
11520 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11521 EOF
11522
11523 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11524         NCURSES_SBOOL="signed char"
11525 else
11526         NCURSES_SBOOL="char"
11527 fi
11528 echo "$as_me:11528: checking if you want to use signed Boolean array in term.h" >&5
11529 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11530
11531 # Check whether --enable-signed-char or --disable-signed-char was given.
11532 if test "${enable_signed_char+set}" = set; then
11533   enableval="$enable_signed_char"
11534   with_signed_char=$enableval
11535 else
11536   with_signed_char=no
11537 fi;
11538 echo "$as_me:11538: result: $with_signed_char" >&5
11539 echo "${ECHO_T}$with_signed_char" >&6
11540 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11541
11542 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11543 echo "$as_me:11543: checking if you want SIGWINCH handler" >&5
11544 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11545
11546 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11547 if test "${enable_sigwinch+set}" = set; then
11548   enableval="$enable_sigwinch"
11549   with_sigwinch=$enableval
11550 else
11551   with_sigwinch=$with_ext_funcs
11552 fi;
11553 echo "$as_me:11553: result: $with_sigwinch" >&5
11554 echo "${ECHO_T}$with_sigwinch" >&6
11555 test "x$with_sigwinch" = xyes &&
11556 cat >>confdefs.h <<\EOF
11557 #define USE_SIGWINCH 1
11558 EOF
11559
11560 ###   use option --enable-tcap-names to allow user to define new capabilities
11561 echo "$as_me:11561: checking if you want user-definable terminal capabilities like termcap" >&5
11562 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11563
11564 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11565 if test "${enable_tcap_names+set}" = set; then
11566   enableval="$enable_tcap_names"
11567   with_tcap_names=$enableval
11568 else
11569   with_tcap_names=$with_ext_funcs
11570 fi;
11571 echo "$as_me:11571: result: $with_tcap_names" >&5
11572 echo "${ECHO_T}$with_tcap_names" >&6
11573 NCURSES_XNAMES=0
11574 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11575
11576 ###############################################################################
11577 # These options are relatively safe to experiment with.
11578
11579 echo "$as_me:11579: checking if you want all development code" >&5
11580 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11581
11582 # Check whether --with-develop or --without-develop was given.
11583 if test "${with_develop+set}" = set; then
11584   withval="$with_develop"
11585   with_develop=$withval
11586 else
11587   with_develop=no
11588 fi;
11589 echo "$as_me:11589: result: $with_develop" >&5
11590 echo "${ECHO_T}$with_develop" >&6
11591
11592 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11593 echo "$as_me:11593: checking if you want hard-tabs code" >&5
11594 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11595
11596 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11597 if test "${enable_hard_tabs+set}" = set; then
11598   enableval="$enable_hard_tabs"
11599
11600 else
11601   enable_hard_tabs=$with_develop
11602 fi;
11603 echo "$as_me:11603: result: $enable_hard_tabs" >&5
11604 echo "${ECHO_T}$enable_hard_tabs" >&6
11605 test "x$enable_hard_tabs" = xyes &&
11606 cat >>confdefs.h <<\EOF
11607 #define USE_HARD_TABS 1
11608 EOF
11609
11610 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11611 echo "$as_me:11611: checking if you want limited support for xmc" >&5
11612 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11613
11614 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11615 if test "${enable_xmc_glitch+set}" = set; then
11616   enableval="$enable_xmc_glitch"
11617
11618 else
11619   enable_xmc_glitch=$with_develop
11620 fi;
11621 echo "$as_me:11621: result: $enable_xmc_glitch" >&5
11622 echo "${ECHO_T}$enable_xmc_glitch" >&6
11623 test "x$enable_xmc_glitch" = xyes &&
11624 cat >>confdefs.h <<\EOF
11625 #define USE_XMC_SUPPORT 1
11626 EOF
11627
11628 ###############################################################################
11629 # These are just experimental, probably should not be in a package:
11630
11631 echo "$as_me:11631: checking if you do not want to assume colors are white-on-black" >&5
11632 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11633
11634 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11635 if test "${enable_assumed_color+set}" = set; then
11636   enableval="$enable_assumed_color"
11637   with_assumed_color=$enableval
11638 else
11639   with_assumed_color=yes
11640 fi;
11641 echo "$as_me:11641: result: $with_assumed_color" >&5
11642 echo "${ECHO_T}$with_assumed_color" >&6
11643 test "x$with_assumed_color" = xyes &&
11644 cat >>confdefs.h <<\EOF
11645 #define USE_ASSUMED_COLOR 1
11646 EOF
11647
11648 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11649 echo "$as_me:11649: checking if you want hashmap scrolling-optimization code" >&5
11650 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11651
11652 # Check whether --enable-hashmap or --disable-hashmap was given.
11653 if test "${enable_hashmap+set}" = set; then
11654   enableval="$enable_hashmap"
11655   with_hashmap=$enableval
11656 else
11657   with_hashmap=yes
11658 fi;
11659 echo "$as_me:11659: result: $with_hashmap" >&5
11660 echo "${ECHO_T}$with_hashmap" >&6
11661 test "x$with_hashmap" = xyes &&
11662 cat >>confdefs.h <<\EOF
11663 #define USE_HASHMAP 1
11664 EOF
11665
11666 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11667 echo "$as_me:11667: checking if you want colorfgbg code" >&5
11668 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11669
11670 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11671 if test "${enable_colorfgbg+set}" = set; then
11672   enableval="$enable_colorfgbg"
11673   with_colorfgbg=$enableval
11674 else
11675   with_colorfgbg=no
11676 fi;
11677 echo "$as_me:11677: result: $with_colorfgbg" >&5
11678 echo "${ECHO_T}$with_colorfgbg" >&6
11679 test "x$with_colorfgbg" = xyes &&
11680 cat >>confdefs.h <<\EOF
11681 #define USE_COLORFGBG 1
11682 EOF
11683
11684 ###   use option --enable-interop to turn on use of bindings used for interop
11685 echo "$as_me:11685: checking if you want interop bindings" >&5
11686 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11687
11688 # Check whether --enable-interop or --disable-interop was given.
11689 if test "${enable_interop+set}" = set; then
11690   enableval="$enable_interop"
11691   with_exp_interop=$enableval
11692 else
11693   with_exp_interop=no
11694 fi;
11695 echo "$as_me:11695: result: $with_exp_interop" >&5
11696 echo "${ECHO_T}$with_exp_interop" >&6
11697
11698 NCURSES_INTEROP_FUNCS=0
11699 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11700
11701 # This is still experimental (20080329), but should ultimately be moved to
11702 # the script-block --with-normal, etc.
11703
11704 echo "$as_me:11704: checking if you want to link with the pthread library" >&5
11705 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11706
11707 # Check whether --with-pthread or --without-pthread was given.
11708 if test "${with_pthread+set}" = set; then
11709   withval="$with_pthread"
11710   with_pthread=$withval
11711 else
11712   with_pthread=no
11713 fi;
11714 echo "$as_me:11714: result: $with_pthread" >&5
11715 echo "${ECHO_T}$with_pthread" >&6
11716
11717 if test "$with_pthread" != no ; then
11718     echo "$as_me:11718: checking for pthread.h" >&5
11719 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11720 if test "${ac_cv_header_pthread_h+set}" = set; then
11721   echo $ECHO_N "(cached) $ECHO_C" >&6
11722 else
11723   cat >conftest.$ac_ext <<_ACEOF
11724 #line 11724 "configure"
11725 #include "confdefs.h"
11726 #include <pthread.h>
11727 _ACEOF
11728 if { (eval echo "$as_me:11728: \"$ac_cpp conftest.$ac_ext\"") >&5
11729   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11730   ac_status=$?
11731   egrep -v '^ *\+' conftest.er1 >conftest.err
11732   rm -f conftest.er1
11733   cat conftest.err >&5
11734   echo "$as_me:11734: \$? = $ac_status" >&5
11735   (exit $ac_status); } >/dev/null; then
11736   if test -s conftest.err; then
11737     ac_cpp_err=$ac_c_preproc_warn_flag
11738   else
11739     ac_cpp_err=
11740   fi
11741 else
11742   ac_cpp_err=yes
11743 fi
11744 if test -z "$ac_cpp_err"; then
11745   ac_cv_header_pthread_h=yes
11746 else
11747   echo "$as_me: failed program was:" >&5
11748   cat conftest.$ac_ext >&5
11749   ac_cv_header_pthread_h=no
11750 fi
11751 rm -f conftest.err conftest.$ac_ext
11752 fi
11753 echo "$as_me:11753: result: $ac_cv_header_pthread_h" >&5
11754 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11755 if test $ac_cv_header_pthread_h = yes; then
11756
11757 cat >>confdefs.h <<\EOF
11758 #define HAVE_PTHREADS_H 1
11759 EOF
11760
11761         for cf_lib_pthread in pthread c_r
11762         do
11763             echo "$as_me:11763: checking if we can link with the $cf_lib_pthread library" >&5
11764 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11765             cf_save_LIBS="$LIBS"
11766             LIBS="-l$cf_lib_pthread $LIBS"
11767             cat >conftest.$ac_ext <<_ACEOF
11768 #line 11768 "configure"
11769 #include "confdefs.h"
11770
11771 #include <pthread.h>
11772
11773 int
11774 main ()
11775 {
11776
11777                 int rc = pthread_create(0,0,0,0);
11778                 int r2 = pthread_mutexattr_settype(0, 0);
11779
11780   ;
11781   return 0;
11782 }
11783 _ACEOF
11784 rm -f conftest.$ac_objext conftest$ac_exeext
11785 if { (eval echo "$as_me:11785: \"$ac_link\"") >&5
11786   (eval $ac_link) 2>&5
11787   ac_status=$?
11788   echo "$as_me:11788: \$? = $ac_status" >&5
11789   (exit $ac_status); } &&
11790          { ac_try='test -s conftest$ac_exeext'
11791   { (eval echo "$as_me:11791: \"$ac_try\"") >&5
11792   (eval $ac_try) 2>&5
11793   ac_status=$?
11794   echo "$as_me:11794: \$? = $ac_status" >&5
11795   (exit $ac_status); }; }; then
11796   with_pthread=yes
11797 else
11798   echo "$as_me: failed program was:" >&5
11799 cat conftest.$ac_ext >&5
11800 with_pthread=no
11801 fi
11802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11803             LIBS="$cf_save_LIBS"
11804             echo "$as_me:11804: result: $with_pthread" >&5
11805 echo "${ECHO_T}$with_pthread" >&6
11806             test "$with_pthread" = yes && break
11807         done
11808
11809         if test "$with_pthread" = yes ; then
11810             LIBS="-l$cf_lib_pthread $LIBS"
11811
11812 cat >>confdefs.h <<\EOF
11813 #define HAVE_LIBPTHREADS 1
11814 EOF
11815
11816         else
11817             { { echo "$as_me:11817: error: Cannot link with pthread library" >&5
11818 echo "$as_me: error: Cannot link with pthread library" >&2;}
11819    { (exit 1); exit 1; }; }
11820         fi
11821
11822 fi
11823
11824 fi
11825
11826 if test "x$with_pthread" != xno; then
11827         echo "$as_me:11827: checking for pthread_kill" >&5
11828 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11829 if test "${ac_cv_func_pthread_kill+set}" = set; then
11830   echo $ECHO_N "(cached) $ECHO_C" >&6
11831 else
11832   cat >conftest.$ac_ext <<_ACEOF
11833 #line 11833 "configure"
11834 #include "confdefs.h"
11835 /* System header to define __stub macros and hopefully few prototypes,
11836     which can conflict with char pthread_kill (); below.  */
11837 #include <assert.h>
11838 /* Override any gcc2 internal prototype to avoid an error.  */
11839 #ifdef __cplusplus
11840 extern "C"
11841 #endif
11842 /* We use char because int might match the return type of a gcc2
11843    builtin and then its argument prototype would still apply.  */
11844 char pthread_kill ();
11845 char (*f) ();
11846
11847 int
11848 main ()
11849 {
11850 /* The GNU C library defines this for functions which it implements
11851     to always fail with ENOSYS.  Some functions are actually named
11852     something starting with __ and the normal name is an alias.  */
11853 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11854 choke me
11855 #else
11856 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11857 #endif
11858
11859   ;
11860   return 0;
11861 }
11862 _ACEOF
11863 rm -f conftest.$ac_objext conftest$ac_exeext
11864 if { (eval echo "$as_me:11864: \"$ac_link\"") >&5
11865   (eval $ac_link) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit $ac_status); } &&
11869          { ac_try='test -s conftest$ac_exeext'
11870   { (eval echo "$as_me:11870: \"$ac_try\"") >&5
11871   (eval $ac_try) 2>&5
11872   ac_status=$?
11873   echo "$as_me:11873: \$? = $ac_status" >&5
11874   (exit $ac_status); }; }; then
11875   ac_cv_func_pthread_kill=yes
11876 else
11877   echo "$as_me: failed program was:" >&5
11878 cat conftest.$ac_ext >&5
11879 ac_cv_func_pthread_kill=no
11880 fi
11881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11882 fi
11883 echo "$as_me:11883: result: $ac_cv_func_pthread_kill" >&5
11884 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11885 if test $ac_cv_func_pthread_kill = yes; then
11886
11887                 echo "$as_me:11887: checking if you want to allow EINTR in wgetch with pthreads" >&5
11888 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11889
11890 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11891 if test "${enable_pthreads_eintr+set}" = set; then
11892   enableval="$enable_pthreads_eintr"
11893   use_pthreads_eintr=$enableval
11894 else
11895   use_pthreads_eintr=no
11896 fi;
11897                 echo "$as_me:11897: result: $use_pthreads_eintr" >&5
11898 echo "${ECHO_T}$use_pthreads_eintr" >&6
11899                 if test "x$use_pthreads_eintr" = xyes ; then
11900
11901 cat >>confdefs.h <<\EOF
11902 #define USE_PTHREADS_EINTR 1
11903 EOF
11904
11905                 fi
11906 fi
11907
11908         echo "$as_me:11908: checking if you want to use weak-symbols for pthreads" >&5
11909 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11910
11911 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11912 if test "${enable_weak_symbols+set}" = set; then
11913   enableval="$enable_weak_symbols"
11914   use_weak_symbols=$enableval
11915 else
11916   use_weak_symbols=no
11917 fi;
11918         echo "$as_me:11918: result: $use_weak_symbols" >&5
11919 echo "${ECHO_T}$use_weak_symbols" >&6
11920         if test "x$use_weak_symbols" = xyes ; then
11921
11922 echo "$as_me:11922: checking if $CC supports weak symbols" >&5
11923 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11924 if test "${cf_cv_weak_symbols+set}" = set; then
11925   echo $ECHO_N "(cached) $ECHO_C" >&6
11926 else
11927
11928 cat >conftest.$ac_ext <<_ACEOF
11929 #line 11929 "configure"
11930 #include "confdefs.h"
11931
11932 #include <stdio.h>
11933 int
11934 main ()
11935 {
11936
11937 #if defined(__GNUC__)
11938 #  if defined __USE_ISOC99
11939 #    define _cat_pragma(exp)    _Pragma(#exp)
11940 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11941 #  else
11942 #    define _weak_pragma(exp)
11943 #  endif
11944 #  define _declare(name)        __extension__ extern __typeof__(name) name
11945 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11946 #endif
11947
11948 weak_symbol(fopen);
11949
11950   ;
11951   return 0;
11952 }
11953 _ACEOF
11954 rm -f conftest.$ac_objext
11955 if { (eval echo "$as_me:11955: \"$ac_compile\"") >&5
11956   (eval $ac_compile) 2>&5
11957   ac_status=$?
11958   echo "$as_me:11958: \$? = $ac_status" >&5
11959   (exit $ac_status); } &&
11960          { ac_try='test -s conftest.$ac_objext'
11961   { (eval echo "$as_me:11961: \"$ac_try\"") >&5
11962   (eval $ac_try) 2>&5
11963   ac_status=$?
11964   echo "$as_me:11964: \$? = $ac_status" >&5
11965   (exit $ac_status); }; }; then
11966   cf_cv_weak_symbols=yes
11967 else
11968   echo "$as_me: failed program was:" >&5
11969 cat conftest.$ac_ext >&5
11970 cf_cv_weak_symbols=no
11971 fi
11972 rm -f conftest.$ac_objext conftest.$ac_ext
11973
11974 fi
11975 echo "$as_me:11975: result: $cf_cv_weak_symbols" >&5
11976 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11977
11978         else
11979                 cf_cv_weak_symbols=no
11980         fi
11981
11982         if test "x$cf_cv_weak_symbols" = xyes ; then
11983
11984 cat >>confdefs.h <<\EOF
11985 #define USE_WEAK_SYMBOLS 1
11986 EOF
11987
11988         fi
11989 fi
11990
11991 PTHREAD=
11992 if test "x$with_pthread" = "xyes" ; then
11993
11994 cat >>confdefs.h <<\EOF
11995 #define USE_PTHREADS 1
11996 EOF
11997
11998     enable_reentrant=yes
11999     if test "x$cf_cv_weak_symbols" = xyes ; then
12000         PTHREAD=-lpthread
12001     fi
12002 fi
12003
12004 # Reentrant code has to be opaque; there's little advantage to making ncurses
12005 # opaque outside of that, so there is no --enable-opaque option.  We can use
12006 # this option without --with-pthreads, but this will be always set for
12007 # pthreads.
12008 echo "$as_me:12008: checking if you want experimental reentrant code" >&5
12009 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12010
12011 # Check whether --enable-reentrant or --disable-reentrant was given.
12012 if test "${enable_reentrant+set}" = set; then
12013   enableval="$enable_reentrant"
12014   with_reentrant=$enableval
12015 else
12016   with_reentrant=no
12017 fi;
12018 echo "$as_me:12018: result: $with_reentrant" >&5
12019 echo "${ECHO_T}$with_reentrant" >&6
12020 if test "x$with_reentrant" = xyes ; then
12021         cf_cv_enable_reentrant=1
12022         cf_cv_enable_opaque="NCURSES_INTERNALS"
12023         NCURSES_OPAQUE=1
12024         NCURSES_SIZE_T=int
12025         if test "x$cf_cv_weak_symbols" = xyes ; then
12026
12027 # remove pthread library from $LIBS
12028 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12029
12030                 TEST_LIBS="-lpthread $TEST_LIBS"
12031                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12032         else
12033                 LIB_SUFFIX="t${LIB_SUFFIX}"
12034         fi
12035
12036 cat >>confdefs.h <<\EOF
12037 #define USE_REENTRANT 1
12038 EOF
12039
12040 if test "${with_abi_version+set}" != set; then
12041         case $cf_cv_rel_version in
12042         5.*)
12043                 cf_cv_rel_version=6.0
12044                 cf_cv_abi_version=6
12045                 { echo "$as_me:12045: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12046 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12047                 ;;
12048         esac
12049 fi
12050
12051 else
12052         cf_cv_enable_reentrant=0
12053         cf_cv_enable_opaque="NCURSES_OPAQUE"
12054         NCURSES_OPAQUE=0
12055         NCURSES_SIZE_T=short
12056 fi
12057
12058 ### Allow using a different wrap-prefix
12059 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12060         echo "$as_me:12060: checking for prefix used to wrap public variables" >&5
12061 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12062
12063 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12064 if test "${with_wrap_prefix+set}" = set; then
12065   withval="$with_wrap_prefix"
12066   NCURSES_WRAP_PREFIX=$withval
12067 else
12068   NCURSES_WRAP_PREFIX=_nc_
12069 fi;
12070         echo "$as_me:12070: result: $NCURSES_WRAP_PREFIX" >&5
12071 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12072 else
12073         NCURSES_WRAP_PREFIX=_nc_
12074 fi
12075
12076 cat >>confdefs.h <<EOF
12077 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12078 EOF
12079
12080 echo "$as_me:12080: checking if you want experimental safe-sprintf code" >&5
12081 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12082
12083 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12084 if test "${enable_safe_sprintf+set}" = set; then
12085   enableval="$enable_safe_sprintf"
12086   with_safe_sprintf=$enableval
12087 else
12088   with_safe_sprintf=no
12089 fi;
12090 echo "$as_me:12090: result: $with_safe_sprintf" >&5
12091 echo "${ECHO_T}$with_safe_sprintf" >&6
12092 test "x$with_safe_sprintf" = xyes &&
12093 cat >>confdefs.h <<\EOF
12094 #define USE_SAFE_SPRINTF 1
12095 EOF
12096
12097 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12098 # when hashmap is used scroll hints are useless
12099 if test "$with_hashmap" = no ; then
12100 echo "$as_me:12100: checking if you want to experiment without scrolling-hints code" >&5
12101 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12102
12103 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12104 if test "${enable_scroll_hints+set}" = set; then
12105   enableval="$enable_scroll_hints"
12106   with_scroll_hints=$enableval
12107 else
12108   with_scroll_hints=yes
12109 fi;
12110 echo "$as_me:12110: result: $with_scroll_hints" >&5
12111 echo "${ECHO_T}$with_scroll_hints" >&6
12112 test "x$with_scroll_hints" = xyes &&
12113 cat >>confdefs.h <<\EOF
12114 #define USE_SCROLL_HINTS 1
12115 EOF
12116
12117 fi
12118
12119 echo "$as_me:12119: checking if you want experimental wgetch-events code" >&5
12120 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12121
12122 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12123 if test "${enable_wgetch_events+set}" = set; then
12124   enableval="$enable_wgetch_events"
12125   with_wgetch_events=$enableval
12126 else
12127   with_wgetch_events=no
12128 fi;
12129 echo "$as_me:12129: result: $with_wgetch_events" >&5
12130 echo "${ECHO_T}$with_wgetch_events" >&6
12131 test "x$with_wgetch_events" = xyes &&
12132 cat >>confdefs.h <<\EOF
12133 #define NCURSES_WGETCH_EVENTS 1
12134 EOF
12135
12136 ###############################################################################
12137
12138 ###     use option --disable-echo to suppress full display compiling commands
12139
12140 echo "$as_me:12140: checking if you want to see long compiling messages" >&5
12141 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12142
12143 # Check whether --enable-echo or --disable-echo was given.
12144 if test "${enable_echo+set}" = set; then
12145   enableval="$enable_echo"
12146   test "$enableval" != no && enableval=yes
12147   if test "$enableval" != "yes" ; then
12148
12149     ECHO_LT='--silent'
12150     ECHO_LD='@echo linking $@;'
12151     RULE_CC='@echo compiling $<'
12152     SHOW_CC='@echo compiling $@'
12153     ECHO_CC='@'
12154
12155   else
12156
12157     ECHO_LT=''
12158     ECHO_LD=''
12159     RULE_CC=''
12160     SHOW_CC=''
12161     ECHO_CC=''
12162
12163   fi
12164 else
12165   enableval=yes
12166
12167     ECHO_LT=''
12168     ECHO_LD=''
12169     RULE_CC=''
12170     SHOW_CC=''
12171     ECHO_CC=''
12172
12173 fi;
12174 echo "$as_me:12174: result: $enableval" >&5
12175 echo "${ECHO_T}$enableval" >&6
12176
12177 if test "x$enable_echo" = xyes; then
12178         ECHO_LINK=
12179 else
12180         ECHO_LINK='@ echo linking $@ ... ;'
12181         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12182         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12183 fi
12184
12185 ###     use option --enable-warnings to turn on all gcc warnings
12186 echo "$as_me:12186: checking if you want to see compiler warnings" >&5
12187 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12188
12189 # Check whether --enable-warnings or --disable-warnings was given.
12190 if test "${enable_warnings+set}" = set; then
12191   enableval="$enable_warnings"
12192   with_warnings=$enableval
12193 fi;
12194 echo "$as_me:12194: result: $with_warnings" >&5
12195 echo "${ECHO_T}$with_warnings" >&6
12196
12197 if test "x$with_warnings" = "xyes"; then
12198
12199         ADAFLAGS="$ADAFLAGS -gnatg"
12200
12201 INTEL_COMPILER=no
12202
12203 if test "$GCC" = yes ; then
12204         case $host_os in
12205         linux*|gnu*)
12206                 echo "$as_me:12206: checking if this is really Intel C compiler" >&5
12207 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12208                 cf_save_CFLAGS="$CFLAGS"
12209                 CFLAGS="$CFLAGS -no-gcc"
12210                 cat >conftest.$ac_ext <<_ACEOF
12211 #line 12211 "configure"
12212 #include "confdefs.h"
12213
12214 int
12215 main ()
12216 {
12217
12218 #ifdef __INTEL_COMPILER
12219 #else
12220 make an error
12221 #endif
12222
12223   ;
12224   return 0;
12225 }
12226 _ACEOF
12227 rm -f conftest.$ac_objext
12228 if { (eval echo "$as_me:12228: \"$ac_compile\"") >&5
12229   (eval $ac_compile) 2>&5
12230   ac_status=$?
12231   echo "$as_me:12231: \$? = $ac_status" >&5
12232   (exit $ac_status); } &&
12233          { ac_try='test -s conftest.$ac_objext'
12234   { (eval echo "$as_me:12234: \"$ac_try\"") >&5
12235   (eval $ac_try) 2>&5
12236   ac_status=$?
12237   echo "$as_me:12237: \$? = $ac_status" >&5
12238   (exit $ac_status); }; }; then
12239   INTEL_COMPILER=yes
12240 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12241
12242 else
12243   echo "$as_me: failed program was:" >&5
12244 cat conftest.$ac_ext >&5
12245 fi
12246 rm -f conftest.$ac_objext conftest.$ac_ext
12247                 CFLAGS="$cf_save_CFLAGS"
12248                 echo "$as_me:12248: result: $INTEL_COMPILER" >&5
12249 echo "${ECHO_T}$INTEL_COMPILER" >&6
12250                 ;;
12251         esac
12252 fi
12253
12254 CLANG_COMPILER=no
12255
12256 if test "$GCC" = yes ; then
12257         echo "$as_me:12257: checking if this is really Clang C compiler" >&5
12258 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12259         cf_save_CFLAGS="$CFLAGS"
12260         CFLAGS="$CFLAGS -Qunused-arguments"
12261         cat >conftest.$ac_ext <<_ACEOF
12262 #line 12262 "configure"
12263 #include "confdefs.h"
12264
12265 int
12266 main ()
12267 {
12268
12269 #ifdef __clang__
12270 #else
12271 make an error
12272 #endif
12273
12274   ;
12275   return 0;
12276 }
12277 _ACEOF
12278 rm -f conftest.$ac_objext
12279 if { (eval echo "$as_me:12279: \"$ac_compile\"") >&5
12280   (eval $ac_compile) 2>&5
12281   ac_status=$?
12282   echo "$as_me:12282: \$? = $ac_status" >&5
12283   (exit $ac_status); } &&
12284          { ac_try='test -s conftest.$ac_objext'
12285   { (eval echo "$as_me:12285: \"$ac_try\"") >&5
12286   (eval $ac_try) 2>&5
12287   ac_status=$?
12288   echo "$as_me:12288: \$? = $ac_status" >&5
12289   (exit $ac_status); }; }; then
12290   CLANG_COMPILER=yes
12291 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12292
12293 else
12294   echo "$as_me: failed program was:" >&5
12295 cat conftest.$ac_ext >&5
12296 fi
12297 rm -f conftest.$ac_objext conftest.$ac_ext
12298         CFLAGS="$cf_save_CFLAGS"
12299         echo "$as_me:12299: result: $CLANG_COMPILER" >&5
12300 echo "${ECHO_T}$CLANG_COMPILER" >&6
12301 fi
12302
12303 cat > conftest.$ac_ext <<EOF
12304 #line 12304 "${as_me:-configure}"
12305 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12306 EOF
12307
12308 if test "$INTEL_COMPILER" = yes
12309 then
12310 # The "-wdXXX" options suppress warnings:
12311 # remark #1419: external declaration in primary source file
12312 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12313 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12314 # remark #193: zero used for undefined preprocessing identifier
12315 # remark #593: variable "curs_sb_left_arrow" was set but never used
12316 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12317 # remark #869: parameter "tw" was never referenced
12318 # remark #981: operands are evaluated in unspecified order
12319 # warning #279: controlling expression is constant
12320
12321         { echo "$as_me:12321: checking for $CC warning options..." >&5
12322 echo "$as_me: checking for $CC warning options..." >&6;}
12323         cf_save_CFLAGS="$CFLAGS"
12324         EXTRA_CFLAGS="-Wall"
12325         for cf_opt in \
12326                 wd1419 \
12327                 wd1683 \
12328                 wd1684 \
12329                 wd193 \
12330                 wd593 \
12331                 wd279 \
12332                 wd810 \
12333                 wd869 \
12334                 wd981
12335         do
12336                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12337                 if { (eval echo "$as_me:12337: \"$ac_compile\"") >&5
12338   (eval $ac_compile) 2>&5
12339   ac_status=$?
12340   echo "$as_me:12340: \$? = $ac_status" >&5
12341   (exit $ac_status); }; then
12342                         test -n "$verbose" && echo "$as_me:12342: result: ... -$cf_opt" >&5
12343 echo "${ECHO_T}... -$cf_opt" >&6
12344                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12345                 fi
12346         done
12347         CFLAGS="$cf_save_CFLAGS"
12348
12349 elif test "$GCC" = yes
12350 then
12351         { echo "$as_me:12351: checking for $CC warning options..." >&5
12352 echo "$as_me: checking for $CC warning options..." >&6;}
12353         cf_save_CFLAGS="$CFLAGS"
12354         EXTRA_CFLAGS=
12355         cf_warn_CONST=""
12356         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12357         for cf_opt in W Wall \
12358                 Wbad-function-cast \
12359                 Wcast-align \
12360                 Wcast-qual \
12361                 Winline \
12362                 Wmissing-declarations \
12363                 Wmissing-prototypes \
12364                 Wnested-externs \
12365                 Wpointer-arith \
12366                 Wshadow \
12367                 Wstrict-prototypes \
12368                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12369         do
12370                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12371                 if { (eval echo "$as_me:12371: \"$ac_compile\"") >&5
12372   (eval $ac_compile) 2>&5
12373   ac_status=$?
12374   echo "$as_me:12374: \$? = $ac_status" >&5
12375   (exit $ac_status); }; then
12376                         test -n "$verbose" && echo "$as_me:12376: result: ... -$cf_opt" >&5
12377 echo "${ECHO_T}... -$cf_opt" >&6
12378                         case $cf_opt in #(vi
12379                         Wcast-qual) #(vi
12380                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12381                                 ;;
12382                         Winline) #(vi
12383                                 case $GCC_VERSION in
12384                                 [34].*)
12385                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12386
12387 echo "${as_me:-configure}:12387: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12388
12389                                         continue;;
12390                                 esac
12391                                 ;;
12392                         Wpointer-arith) #(vi
12393                                 case $GCC_VERSION in
12394                                 [12].*)
12395                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12396
12397 echo "${as_me:-configure}:12397: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12398
12399                                         continue;;
12400                                 esac
12401                                 ;;
12402                         esac
12403                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12404                 fi
12405         done
12406         CFLAGS="$cf_save_CFLAGS"
12407 fi
12408 rm -rf conftest*
12409
12410         if test "x$cf_with_cxx" = xyes ; then
12411
12412 INTEL_CPLUSPLUS=no
12413
12414 if test "$GCC" = yes ; then
12415         case $host_os in
12416         linux*|gnu*)
12417                 echo "$as_me:12417: checking if this is really Intel C++ compiler" >&5
12418 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12419                 cf_save_CFLAGS="$CXXFLAGS"
12420                 CXXFLAGS="$CXXFLAGS -no-gcc"
12421                 cat >conftest.$ac_ext <<_ACEOF
12422 #line 12422 "configure"
12423 #include "confdefs.h"
12424
12425 int
12426 main ()
12427 {
12428
12429 #ifdef __INTEL_COMPILER
12430 #else
12431 make an error
12432 #endif
12433
12434   ;
12435   return 0;
12436 }
12437 _ACEOF
12438 rm -f conftest.$ac_objext
12439 if { (eval echo "$as_me:12439: \"$ac_compile\"") >&5
12440   (eval $ac_compile) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); } &&
12444          { ac_try='test -s conftest.$ac_objext'
12445   { (eval echo "$as_me:12445: \"$ac_try\"") >&5
12446   (eval $ac_try) 2>&5
12447   ac_status=$?
12448   echo "$as_me:12448: \$? = $ac_status" >&5
12449   (exit $ac_status); }; }; then
12450   INTEL_CPLUSPLUS=yes
12451 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12452
12453 else
12454   echo "$as_me: failed program was:" >&5
12455 cat conftest.$ac_ext >&5
12456 fi
12457 rm -f conftest.$ac_objext conftest.$ac_ext
12458                 CXXFLAGS="$cf_save_CFLAGS"
12459                 echo "$as_me:12459: result: $INTEL_CPLUSPLUS" >&5
12460 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12461                 ;;
12462         esac
12463 fi
12464
12465 CLANG_CPLUSPLUS=no
12466
12467 if test "$GCC" = yes ; then
12468         echo "$as_me:12468: checking if this is really Clang C++ compiler" >&5
12469 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12470         cf_save_CFLAGS="$CXXFLAGS"
12471         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12472         cat >conftest.$ac_ext <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12475
12476 int
12477 main ()
12478 {
12479
12480 #ifdef __clang__
12481 #else
12482 make an error
12483 #endif
12484
12485   ;
12486   return 0;
12487 }
12488 _ACEOF
12489 rm -f conftest.$ac_objext
12490 if { (eval echo "$as_me:12490: \"$ac_compile\"") >&5
12491   (eval $ac_compile) 2>&5
12492   ac_status=$?
12493   echo "$as_me:12493: \$? = $ac_status" >&5
12494   (exit $ac_status); } &&
12495          { ac_try='test -s conftest.$ac_objext'
12496   { (eval echo "$as_me:12496: \"$ac_try\"") >&5
12497   (eval $ac_try) 2>&5
12498   ac_status=$?
12499   echo "$as_me:12499: \$? = $ac_status" >&5
12500   (exit $ac_status); }; }; then
12501   CLANG_CPLUSPLUS=yes
12502 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12503
12504 else
12505   echo "$as_me: failed program was:" >&5
12506 cat conftest.$ac_ext >&5
12507 fi
12508 rm -f conftest.$ac_objext conftest.$ac_ext
12509         CXXFLAGS="$cf_save_CFLAGS"
12510         echo "$as_me:12510: result: $CLANG_CPLUSPLUS" >&5
12511 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12512 fi
12513
12514 ac_ext=cc
12515 ac_cpp='$CXXCPP $CPPFLAGS'
12516 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12517 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12518 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12519 ac_main_return=return
12520
12521 cat > conftest.$ac_ext <<EOF
12522 #line 12522 "configure"
12523 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12524 EOF
12525
12526 if test "$INTEL_CPLUSPLUS" = yes
12527 then
12528 # The "-wdXXX" options suppress warnings:
12529 # remark #1419: external declaration in primary source file
12530 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12531 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12532 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12533 # remark #193: zero used for undefined preprocessing identifier
12534 # remark #593: variable "curs_sb_left_arrow" was set but never used
12535 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12536 # remark #869: parameter "tw" was never referenced
12537 # remark #981: operands are evaluated in unspecified order
12538 # warning #269: invalid format string conversion
12539
12540         { echo "$as_me:12540: checking for $CC warning options..." >&5
12541 echo "$as_me: checking for $CC warning options..." >&6;}
12542         cf_save_CXXFLAGS="$CXXFLAGS"
12543         EXTRA_CXXFLAGS="-Wall"
12544         for cf_opt in \
12545                 wd1419 \
12546                 wd1682 \
12547                 wd1683 \
12548                 wd1684 \
12549                 wd193 \
12550                 wd279 \
12551                 wd593 \
12552                 wd810 \
12553                 wd869 \
12554                 wd981
12555         do
12556                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12557                 if { (eval echo "$as_me:12557: \"$ac_compile\"") >&5
12558   (eval $ac_compile) 2>&5
12559   ac_status=$?
12560   echo "$as_me:12560: \$? = $ac_status" >&5
12561   (exit $ac_status); }; then
12562                         test -n "$verbose" && echo "$as_me:12562: result: ... -$cf_opt" >&5
12563 echo "${ECHO_T}... -$cf_opt" >&6
12564                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12565                 fi
12566         done
12567         CXXFLAGS="$cf_save_CXXFLAGS"
12568
12569 elif test "$GXX" = yes
12570 then
12571         { echo "$as_me:12571: checking for $CXX warning options..." >&5
12572 echo "$as_me: checking for $CXX warning options..." >&6;}
12573         cf_save_CXXFLAGS="$CXXFLAGS"
12574         EXTRA_CXXFLAGS="-W -Wall"
12575         cf_gxx_extra_warnings=""
12576         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12577         case "$GCC_VERSION" in
12578         [1-2].*)
12579                 ;;
12580         *)
12581                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12582                 ;;
12583         esac
12584         for cf_opt in \
12585                 Wabi \
12586                 fabi-version=0 \
12587                 Woverloaded-virtual \
12588                 Wsign-promo \
12589                 Wsynth \
12590                 Wold-style-cast \
12591                 Wcast-align \
12592                 Wcast-qual \
12593                 Wmissing-prototypes \
12594                 Wpointer-arith \
12595                 Wshadow \
12596                 Wstrict-prototypes \
12597                 Wundef $cf_gxx_extra_warnings Wno-unused
12598         do
12599                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12600                 if { (eval echo "$as_me:12600: \"$ac_compile\"") >&5
12601   (eval $ac_compile) 2>&5
12602   ac_status=$?
12603   echo "$as_me:12603: \$? = $ac_status" >&5
12604   (exit $ac_status); }; then
12605                         test -n "$verbose" && echo "$as_me:12605: result: ... -$cf_opt" >&5
12606 echo "${ECHO_T}... -$cf_opt" >&6
12607                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12608                 else
12609                         test -n "$verbose" && echo "$as_me:12609: result: ... no -$cf_opt" >&5
12610 echo "${ECHO_T}... no -$cf_opt" >&6
12611                 fi
12612         done
12613         CXXFLAGS="$cf_save_CXXFLAGS"
12614 fi
12615
12616 rm -rf conftest*
12617 ac_ext=c
12618 ac_cpp='$CPP $CPPFLAGS'
12619 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12620 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12621 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12622 ac_main_return=return
12623
12624         fi
12625 fi
12626
12627 if test "$GCC" = yes
12628 then
12629 cat > conftest.i <<EOF
12630 #ifndef GCC_PRINTF
12631 #define GCC_PRINTF 0
12632 #endif
12633 #ifndef GCC_SCANF
12634 #define GCC_SCANF 0
12635 #endif
12636 #ifndef GCC_NORETURN
12637 #define GCC_NORETURN /* nothing */
12638 #endif
12639 #ifndef GCC_UNUSED
12640 #define GCC_UNUSED /* nothing */
12641 #endif
12642 EOF
12643 if test "$GCC" = yes
12644 then
12645         { echo "$as_me:12645: checking for $CC __attribute__ directives..." >&5
12646 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12647 cat > conftest.$ac_ext <<EOF
12648 #line 12648 "${as_me:-configure}"
12649 #include "confdefs.h"
12650 #include "conftest.h"
12651 #include "conftest.i"
12652 #if     GCC_PRINTF
12653 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12654 #else
12655 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12656 #endif
12657 #if     GCC_SCANF
12658 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12659 #else
12660 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12661 #endif
12662 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12663 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12664 extern void foo(void) GCC_NORETURN;
12665 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12666 EOF
12667         cf_printf_attribute=no
12668         cf_scanf_attribute=no
12669         for cf_attribute in scanf printf unused noreturn
12670         do
12671
12672 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12673
12674                 cf_directive="__attribute__(($cf_attribute))"
12675                 echo "checking for $CC $cf_directive" 1>&5
12676
12677                 case $cf_attribute in #(vi
12678                 printf) #(vi
12679                         cf_printf_attribute=yes
12680                         cat >conftest.h <<EOF
12681 #define GCC_$cf_ATTRIBUTE 1
12682 EOF
12683                         ;;
12684                 scanf) #(vi
12685                         cf_scanf_attribute=yes
12686                         cat >conftest.h <<EOF
12687 #define GCC_$cf_ATTRIBUTE 1
12688 EOF
12689                         ;;
12690                 *) #(vi
12691                         cat >conftest.h <<EOF
12692 #define GCC_$cf_ATTRIBUTE $cf_directive
12693 EOF
12694                         ;;
12695                 esac
12696
12697                 if { (eval echo "$as_me:12697: \"$ac_compile\"") >&5
12698   (eval $ac_compile) 2>&5
12699   ac_status=$?
12700   echo "$as_me:12700: \$? = $ac_status" >&5
12701   (exit $ac_status); }; then
12702                         test -n "$verbose" && echo "$as_me:12702: result: ... $cf_attribute" >&5
12703 echo "${ECHO_T}... $cf_attribute" >&6
12704                         cat conftest.h >>confdefs.h
12705                         case $cf_attribute in #(vi
12706                         noreturn) #(vi
12707
12708 cat >>confdefs.h <<EOF
12709 #define GCC_NORETURN $cf_directive
12710 EOF
12711
12712                                 ;;
12713                         printf) #(vi
12714                                 cf_value='/* nothing */'
12715                                 if test "$cf_printf_attribute" != no ; then
12716                                         cf_value='__attribute__((format(printf,fmt,var)))'
12717
12718 cat >>confdefs.h <<\EOF
12719 #define GCC_PRINTF 1
12720 EOF
12721
12722                                 fi
12723
12724 cat >>confdefs.h <<EOF
12725 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12726 EOF
12727
12728                                 ;;
12729                         scanf) #(vi
12730                                 cf_value='/* nothing */'
12731                                 if test "$cf_scanf_attribute" != no ; then
12732                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12733
12734 cat >>confdefs.h <<\EOF
12735 #define GCC_SCANF 1
12736 EOF
12737
12738                                 fi
12739
12740 cat >>confdefs.h <<EOF
12741 #define GCC_SCANFLIKE(fmt,var) $cf_value
12742 EOF
12743
12744                                 ;;
12745                         unused) #(vi
12746
12747 cat >>confdefs.h <<EOF
12748 #define GCC_UNUSED $cf_directive
12749 EOF
12750
12751                                 ;;
12752                         esac
12753                 fi
12754         done
12755 else
12756         fgrep define conftest.i >>confdefs.h
12757 fi
12758 rm -rf conftest*
12759 fi
12760
12761 echo "$as_me:12761: checking if you want to work around bogus compiler/loader warnings" >&5
12762 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12763
12764 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12765 if test "${enable_string_hacks+set}" = set; then
12766   enableval="$enable_string_hacks"
12767   with_string_hacks=$enableval
12768 else
12769   with_string_hacks=no
12770 fi;
12771 echo "$as_me:12771: result: $with_string_hacks" >&5
12772 echo "${ECHO_T}$with_string_hacks" >&6
12773
12774 if test "x$with_string_hacks" = "xyes"; then
12775
12776 cat >>confdefs.h <<\EOF
12777 #define USE_STRING_HACKS 1
12778 EOF
12779
12780         { echo "$as_me:12780: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12781 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12782
12783 for ac_func in strlcat strlcpy snprintf
12784 do
12785 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12786 echo "$as_me:12786: checking for $ac_func" >&5
12787 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12788 if eval "test \"\${$as_ac_var+set}\" = set"; then
12789   echo $ECHO_N "(cached) $ECHO_C" >&6
12790 else
12791   cat >conftest.$ac_ext <<_ACEOF
12792 #line 12792 "configure"
12793 #include "confdefs.h"
12794 /* System header to define __stub macros and hopefully few prototypes,
12795     which can conflict with char $ac_func (); below.  */
12796 #include <assert.h>
12797 /* Override any gcc2 internal prototype to avoid an error.  */
12798 #ifdef __cplusplus
12799 extern "C"
12800 #endif
12801 /* We use char because int might match the return type of a gcc2
12802    builtin and then its argument prototype would still apply.  */
12803 char $ac_func ();
12804 char (*f) ();
12805
12806 int
12807 main ()
12808 {
12809 /* The GNU C library defines this for functions which it implements
12810     to always fail with ENOSYS.  Some functions are actually named
12811     something starting with __ and the normal name is an alias.  */
12812 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12813 choke me
12814 #else
12815 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12816 #endif
12817
12818   ;
12819   return 0;
12820 }
12821 _ACEOF
12822 rm -f conftest.$ac_objext conftest$ac_exeext
12823 if { (eval echo "$as_me:12823: \"$ac_link\"") >&5
12824   (eval $ac_link) 2>&5
12825   ac_status=$?
12826   echo "$as_me:12826: \$? = $ac_status" >&5
12827   (exit $ac_status); } &&
12828          { ac_try='test -s conftest$ac_exeext'
12829   { (eval echo "$as_me:12829: \"$ac_try\"") >&5
12830   (eval $ac_try) 2>&5
12831   ac_status=$?
12832   echo "$as_me:12832: \$? = $ac_status" >&5
12833   (exit $ac_status); }; }; then
12834   eval "$as_ac_var=yes"
12835 else
12836   echo "$as_me: failed program was:" >&5
12837 cat conftest.$ac_ext >&5
12838 eval "$as_ac_var=no"
12839 fi
12840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12841 fi
12842 echo "$as_me:12842: result: `eval echo '${'$as_ac_var'}'`" >&5
12843 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12844 if test `eval echo '${'$as_ac_var'}'` = yes; then
12845   cat >>confdefs.h <<EOF
12846 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12847 EOF
12848
12849 fi
12850 done
12851
12852 fi
12853
12854 ###     use option --enable-assertions to turn on generation of assertion code
12855 echo "$as_me:12855: checking if you want to enable runtime assertions" >&5
12856 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12857
12858 # Check whether --enable-assertions or --disable-assertions was given.
12859 if test "${enable_assertions+set}" = set; then
12860   enableval="$enable_assertions"
12861   with_assertions=$enableval
12862 else
12863   with_assertions=no
12864 fi;
12865 echo "$as_me:12865: result: $with_assertions" >&5
12866 echo "${ECHO_T}$with_assertions" >&6
12867 if test -n "$GCC"
12868 then
12869         if test "$with_assertions" = no
12870         then
12871                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12872         else
12873
12874         ADAFLAGS="$ADAFLAGS -gnata"
12875
12876         fi
12877 fi
12878
12879 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12880
12881 echo "$as_me:12881: checking if you want to use dmalloc for testing" >&5
12882 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12883
12884 # Check whether --with-dmalloc or --without-dmalloc was given.
12885 if test "${with_dmalloc+set}" = set; then
12886   withval="$with_dmalloc"
12887
12888 cat >>confdefs.h <<EOF
12889 #define USE_DMALLOC 1
12890 EOF
12891
12892         : ${with_cflags:=-g}
12893         : ${with_no_leaks:=yes}
12894          with_dmalloc=yes
12895 else
12896   with_dmalloc=
12897 fi;
12898 echo "$as_me:12898: result: ${with_dmalloc:-no}" >&5
12899 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12900
12901 case .$with_cflags in #(vi
12902 .*-g*)
12903         case .$CFLAGS in #(vi
12904         .*-g*) #(vi
12905                 ;;
12906         *)
12907
12908 cf_fix_cppflags=no
12909 cf_new_cflags=
12910 cf_new_cppflags=
12911 cf_new_extra_cppflags=
12912
12913 for cf_add_cflags in -g
12914 do
12915 case $cf_fix_cppflags in
12916 no)
12917         case $cf_add_cflags in #(vi
12918         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12919                 case $cf_add_cflags in
12920                 -D*)
12921                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12922
12923                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12924                                 && test -z "${cf_tst_cflags}" \
12925                                 && cf_fix_cppflags=yes
12926
12927                         if test $cf_fix_cppflags = yes ; then
12928                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12929                                 continue
12930                         elif test "${cf_tst_cflags}" = "\"'" ; then
12931                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12932                                 continue
12933                         fi
12934                         ;;
12935                 esac
12936                 case "$CPPFLAGS" in
12937                 *$cf_add_cflags) #(vi
12938                         ;;
12939                 *) #(vi
12940                         case $cf_add_cflags in #(vi
12941                         -D*)
12942                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12943
12944 CPPFLAGS=`echo "$CPPFLAGS" | \
12945         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12946                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12947
12948                                 ;;
12949                         esac
12950                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12951                         ;;
12952                 esac
12953                 ;;
12954         *)
12955                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12956                 ;;
12957         esac
12958         ;;
12959 yes)
12960         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12961
12962         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12963
12964         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12965                 && test -z "${cf_tst_cflags}" \
12966                 && cf_fix_cppflags=no
12967         ;;
12968 esac
12969 done
12970
12971 if test -n "$cf_new_cflags" ; then
12972
12973         CFLAGS="$CFLAGS $cf_new_cflags"
12974 fi
12975
12976 if test -n "$cf_new_cppflags" ; then
12977
12978         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12979 fi
12980
12981 if test -n "$cf_new_extra_cppflags" ; then
12982
12983         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12984 fi
12985
12986                 ;;
12987         esac
12988         ;;
12989 esac
12990
12991 if test "$with_dmalloc" = yes ; then
12992         echo "$as_me:12992: checking for dmalloc.h" >&5
12993 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12994 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12995   echo $ECHO_N "(cached) $ECHO_C" >&6
12996 else
12997   cat >conftest.$ac_ext <<_ACEOF
12998 #line 12998 "configure"
12999 #include "confdefs.h"
13000 #include <dmalloc.h>
13001 _ACEOF
13002 if { (eval echo "$as_me:13002: \"$ac_cpp conftest.$ac_ext\"") >&5
13003   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13004   ac_status=$?
13005   egrep -v '^ *\+' conftest.er1 >conftest.err
13006   rm -f conftest.er1
13007   cat conftest.err >&5
13008   echo "$as_me:13008: \$? = $ac_status" >&5
13009   (exit $ac_status); } >/dev/null; then
13010   if test -s conftest.err; then
13011     ac_cpp_err=$ac_c_preproc_warn_flag
13012   else
13013     ac_cpp_err=
13014   fi
13015 else
13016   ac_cpp_err=yes
13017 fi
13018 if test -z "$ac_cpp_err"; then
13019   ac_cv_header_dmalloc_h=yes
13020 else
13021   echo "$as_me: failed program was:" >&5
13022   cat conftest.$ac_ext >&5
13023   ac_cv_header_dmalloc_h=no
13024 fi
13025 rm -f conftest.err conftest.$ac_ext
13026 fi
13027 echo "$as_me:13027: result: $ac_cv_header_dmalloc_h" >&5
13028 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13029 if test $ac_cv_header_dmalloc_h = yes; then
13030
13031 echo "$as_me:13031: checking for dmalloc_debug in -ldmalloc" >&5
13032 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13033 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13034   echo $ECHO_N "(cached) $ECHO_C" >&6
13035 else
13036   ac_check_lib_save_LIBS=$LIBS
13037 LIBS="-ldmalloc  $LIBS"
13038 cat >conftest.$ac_ext <<_ACEOF
13039 #line 13039 "configure"
13040 #include "confdefs.h"
13041
13042 /* Override any gcc2 internal prototype to avoid an error.  */
13043 #ifdef __cplusplus
13044 extern "C"
13045 #endif
13046 /* We use char because int might match the return type of a gcc2
13047    builtin and then its argument prototype would still apply.  */
13048 char dmalloc_debug ();
13049 int
13050 main ()
13051 {
13052 dmalloc_debug ();
13053   ;
13054   return 0;
13055 }
13056 _ACEOF
13057 rm -f conftest.$ac_objext conftest$ac_exeext
13058 if { (eval echo "$as_me:13058: \"$ac_link\"") >&5
13059   (eval $ac_link) 2>&5
13060   ac_status=$?
13061   echo "$as_me:13061: \$? = $ac_status" >&5
13062   (exit $ac_status); } &&
13063          { ac_try='test -s conftest$ac_exeext'
13064   { (eval echo "$as_me:13064: \"$ac_try\"") >&5
13065   (eval $ac_try) 2>&5
13066   ac_status=$?
13067   echo "$as_me:13067: \$? = $ac_status" >&5
13068   (exit $ac_status); }; }; then
13069   ac_cv_lib_dmalloc_dmalloc_debug=yes
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 cat conftest.$ac_ext >&5
13073 ac_cv_lib_dmalloc_dmalloc_debug=no
13074 fi
13075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13076 LIBS=$ac_check_lib_save_LIBS
13077 fi
13078 echo "$as_me:13078: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13079 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13080 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13081   cat >>confdefs.h <<EOF
13082 #define HAVE_LIBDMALLOC 1
13083 EOF
13084
13085   LIBS="-ldmalloc $LIBS"
13086
13087 fi
13088
13089 fi
13090
13091 fi
13092
13093 echo "$as_me:13093: checking if you want to use dbmalloc for testing" >&5
13094 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13095
13096 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13097 if test "${with_dbmalloc+set}" = set; then
13098   withval="$with_dbmalloc"
13099
13100 cat >>confdefs.h <<EOF
13101 #define USE_DBMALLOC 1
13102 EOF
13103
13104         : ${with_cflags:=-g}
13105         : ${with_no_leaks:=yes}
13106          with_dbmalloc=yes
13107 else
13108   with_dbmalloc=
13109 fi;
13110 echo "$as_me:13110: result: ${with_dbmalloc:-no}" >&5
13111 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13112
13113 case .$with_cflags in #(vi
13114 .*-g*)
13115         case .$CFLAGS in #(vi
13116         .*-g*) #(vi
13117                 ;;
13118         *)
13119
13120 cf_fix_cppflags=no
13121 cf_new_cflags=
13122 cf_new_cppflags=
13123 cf_new_extra_cppflags=
13124
13125 for cf_add_cflags in -g
13126 do
13127 case $cf_fix_cppflags in
13128 no)
13129         case $cf_add_cflags in #(vi
13130         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13131                 case $cf_add_cflags in
13132                 -D*)
13133                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13134
13135                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13136                                 && test -z "${cf_tst_cflags}" \
13137                                 && cf_fix_cppflags=yes
13138
13139                         if test $cf_fix_cppflags = yes ; then
13140                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13141                                 continue
13142                         elif test "${cf_tst_cflags}" = "\"'" ; then
13143                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13144                                 continue
13145                         fi
13146                         ;;
13147                 esac
13148                 case "$CPPFLAGS" in
13149                 *$cf_add_cflags) #(vi
13150                         ;;
13151                 *) #(vi
13152                         case $cf_add_cflags in #(vi
13153                         -D*)
13154                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13155
13156 CPPFLAGS=`echo "$CPPFLAGS" | \
13157         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13158                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13159
13160                                 ;;
13161                         esac
13162                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13163                         ;;
13164                 esac
13165                 ;;
13166         *)
13167                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13168                 ;;
13169         esac
13170         ;;
13171 yes)
13172         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13173
13174         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13175
13176         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13177                 && test -z "${cf_tst_cflags}" \
13178                 && cf_fix_cppflags=no
13179         ;;
13180 esac
13181 done
13182
13183 if test -n "$cf_new_cflags" ; then
13184
13185         CFLAGS="$CFLAGS $cf_new_cflags"
13186 fi
13187
13188 if test -n "$cf_new_cppflags" ; then
13189
13190         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13191 fi
13192
13193 if test -n "$cf_new_extra_cppflags" ; then
13194
13195         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13196 fi
13197
13198                 ;;
13199         esac
13200         ;;
13201 esac
13202
13203 if test "$with_dbmalloc" = yes ; then
13204         echo "$as_me:13204: checking for dbmalloc.h" >&5
13205 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13206 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13207   echo $ECHO_N "(cached) $ECHO_C" >&6
13208 else
13209   cat >conftest.$ac_ext <<_ACEOF
13210 #line 13210 "configure"
13211 #include "confdefs.h"
13212 #include <dbmalloc.h>
13213 _ACEOF
13214 if { (eval echo "$as_me:13214: \"$ac_cpp conftest.$ac_ext\"") >&5
13215   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13216   ac_status=$?
13217   egrep -v '^ *\+' conftest.er1 >conftest.err
13218   rm -f conftest.er1
13219   cat conftest.err >&5
13220   echo "$as_me:13220: \$? = $ac_status" >&5
13221   (exit $ac_status); } >/dev/null; then
13222   if test -s conftest.err; then
13223     ac_cpp_err=$ac_c_preproc_warn_flag
13224   else
13225     ac_cpp_err=
13226   fi
13227 else
13228   ac_cpp_err=yes
13229 fi
13230 if test -z "$ac_cpp_err"; then
13231   ac_cv_header_dbmalloc_h=yes
13232 else
13233   echo "$as_me: failed program was:" >&5
13234   cat conftest.$ac_ext >&5
13235   ac_cv_header_dbmalloc_h=no
13236 fi
13237 rm -f conftest.err conftest.$ac_ext
13238 fi
13239 echo "$as_me:13239: result: $ac_cv_header_dbmalloc_h" >&5
13240 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13241 if test $ac_cv_header_dbmalloc_h = yes; then
13242
13243 echo "$as_me:13243: checking for debug_malloc in -ldbmalloc" >&5
13244 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13245 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13246   echo $ECHO_N "(cached) $ECHO_C" >&6
13247 else
13248   ac_check_lib_save_LIBS=$LIBS
13249 LIBS="-ldbmalloc  $LIBS"
13250 cat >conftest.$ac_ext <<_ACEOF
13251 #line 13251 "configure"
13252 #include "confdefs.h"
13253
13254 /* Override any gcc2 internal prototype to avoid an error.  */
13255 #ifdef __cplusplus
13256 extern "C"
13257 #endif
13258 /* We use char because int might match the return type of a gcc2
13259    builtin and then its argument prototype would still apply.  */
13260 char debug_malloc ();
13261 int
13262 main ()
13263 {
13264 debug_malloc ();
13265   ;
13266   return 0;
13267 }
13268 _ACEOF
13269 rm -f conftest.$ac_objext conftest$ac_exeext
13270 if { (eval echo "$as_me:13270: \"$ac_link\"") >&5
13271   (eval $ac_link) 2>&5
13272   ac_status=$?
13273   echo "$as_me:13273: \$? = $ac_status" >&5
13274   (exit $ac_status); } &&
13275          { ac_try='test -s conftest$ac_exeext'
13276   { (eval echo "$as_me:13276: \"$ac_try\"") >&5
13277   (eval $ac_try) 2>&5
13278   ac_status=$?
13279   echo "$as_me:13279: \$? = $ac_status" >&5
13280   (exit $ac_status); }; }; then
13281   ac_cv_lib_dbmalloc_debug_malloc=yes
13282 else
13283   echo "$as_me: failed program was:" >&5
13284 cat conftest.$ac_ext >&5
13285 ac_cv_lib_dbmalloc_debug_malloc=no
13286 fi
13287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13288 LIBS=$ac_check_lib_save_LIBS
13289 fi
13290 echo "$as_me:13290: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13291 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13292 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13293   cat >>confdefs.h <<EOF
13294 #define HAVE_LIBDBMALLOC 1
13295 EOF
13296
13297   LIBS="-ldbmalloc $LIBS"
13298
13299 fi
13300
13301 fi
13302
13303 fi
13304
13305 echo "$as_me:13305: checking if you want to use valgrind for testing" >&5
13306 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13307
13308 # Check whether --with-valgrind or --without-valgrind was given.
13309 if test "${with_valgrind+set}" = set; then
13310   withval="$with_valgrind"
13311
13312 cat >>confdefs.h <<EOF
13313 #define USE_VALGRIND 1
13314 EOF
13315
13316         : ${with_cflags:=-g}
13317         : ${with_no_leaks:=yes}
13318          with_valgrind=yes
13319 else
13320   with_valgrind=
13321 fi;
13322 echo "$as_me:13322: result: ${with_valgrind:-no}" >&5
13323 echo "${ECHO_T}${with_valgrind:-no}" >&6
13324
13325 case .$with_cflags in #(vi
13326 .*-g*)
13327         case .$CFLAGS in #(vi
13328         .*-g*) #(vi
13329                 ;;
13330         *)
13331
13332 cf_fix_cppflags=no
13333 cf_new_cflags=
13334 cf_new_cppflags=
13335 cf_new_extra_cppflags=
13336
13337 for cf_add_cflags in -g
13338 do
13339 case $cf_fix_cppflags in
13340 no)
13341         case $cf_add_cflags in #(vi
13342         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13343                 case $cf_add_cflags in
13344                 -D*)
13345                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13346
13347                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13348                                 && test -z "${cf_tst_cflags}" \
13349                                 && cf_fix_cppflags=yes
13350
13351                         if test $cf_fix_cppflags = yes ; then
13352                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13353                                 continue
13354                         elif test "${cf_tst_cflags}" = "\"'" ; then
13355                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13356                                 continue
13357                         fi
13358                         ;;
13359                 esac
13360                 case "$CPPFLAGS" in
13361                 *$cf_add_cflags) #(vi
13362                         ;;
13363                 *) #(vi
13364                         case $cf_add_cflags in #(vi
13365                         -D*)
13366                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13367
13368 CPPFLAGS=`echo "$CPPFLAGS" | \
13369         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13370                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13371
13372                                 ;;
13373                         esac
13374                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13375                         ;;
13376                 esac
13377                 ;;
13378         *)
13379                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13380                 ;;
13381         esac
13382         ;;
13383 yes)
13384         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13385
13386         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13387
13388         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13389                 && test -z "${cf_tst_cflags}" \
13390                 && cf_fix_cppflags=no
13391         ;;
13392 esac
13393 done
13394
13395 if test -n "$cf_new_cflags" ; then
13396
13397         CFLAGS="$CFLAGS $cf_new_cflags"
13398 fi
13399
13400 if test -n "$cf_new_cppflags" ; then
13401
13402         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13403 fi
13404
13405 if test -n "$cf_new_extra_cppflags" ; then
13406
13407         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13408 fi
13409
13410                 ;;
13411         esac
13412         ;;
13413 esac
13414
13415 echo "$as_me:13415: checking if you want to perform memory-leak testing" >&5
13416 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13417
13418 # Check whether --enable-leaks or --disable-leaks was given.
13419 if test "${enable_leaks+set}" = set; then
13420   enableval="$enable_leaks"
13421   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13422 else
13423   : ${with_no_leaks:=no}
13424 fi;
13425 echo "$as_me:13425: result: $with_no_leaks" >&5
13426 echo "${ECHO_T}$with_no_leaks" >&6
13427
13428 if test "$with_no_leaks" = yes ; then
13429
13430 cat >>confdefs.h <<\EOF
13431 #define NO_LEAKS 1
13432 EOF
13433
13434 cat >>confdefs.h <<\EOF
13435 #define YY_NO_LEAKS 1
13436 EOF
13437
13438 fi
13439
13440 cat >>confdefs.h <<\EOF
13441 #define HAVE_NC_ALLOC_H 1
13442 EOF
13443
13444 ###     use option --enable-expanded to generate certain macros as functions
13445
13446 # Check whether --enable-expanded or --disable-expanded was given.
13447 if test "${enable_expanded+set}" = set; then
13448   enableval="$enable_expanded"
13449   test "x$enableval" = xyes &&
13450 cat >>confdefs.h <<\EOF
13451 #define NCURSES_EXPANDED 1
13452 EOF
13453
13454 fi;
13455
13456 ###     use option --disable-macros to suppress macros in favor of functions
13457
13458 # Check whether --enable-macros or --disable-macros was given.
13459 if test "${enable_macros+set}" = set; then
13460   enableval="$enable_macros"
13461   test "$enableval" = no &&
13462 cat >>confdefs.h <<\EOF
13463 #define NCURSES_NOMACROS 1
13464 EOF
13465
13466 fi;
13467
13468 # Normally we only add trace() to the debug-library.  Allow this to be
13469 # extended to all models of the ncurses library:
13470 cf_all_traces=no
13471 case "$CFLAGS $CPPFLAGS" in
13472 *-DTRACE*)
13473         cf_all_traces=yes
13474         ;;
13475 esac
13476
13477 echo "$as_me:13477: checking whether to add trace feature to all models" >&5
13478 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13479
13480 # Check whether --with-trace or --without-trace was given.
13481 if test "${with_trace+set}" = set; then
13482   withval="$with_trace"
13483   cf_with_trace=$withval
13484 else
13485   cf_with_trace=$cf_all_traces
13486 fi;
13487 echo "$as_me:13487: result: $cf_with_trace" >&5
13488 echo "${ECHO_T}$cf_with_trace" >&6
13489
13490 if test "x$cf_with_trace" = xyes ; then
13491         LIB_TRACING=all
13492         ADA_TRACE=TRUE
13493
13494 cf_fix_cppflags=no
13495 cf_new_cflags=
13496 cf_new_cppflags=
13497 cf_new_extra_cppflags=
13498
13499 for cf_add_cflags in -DTRACE
13500 do
13501 case $cf_fix_cppflags in
13502 no)
13503         case $cf_add_cflags in #(vi
13504         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13505                 case $cf_add_cflags in
13506                 -D*)
13507                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13508
13509                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13510                                 && test -z "${cf_tst_cflags}" \
13511                                 && cf_fix_cppflags=yes
13512
13513                         if test $cf_fix_cppflags = yes ; then
13514                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13515                                 continue
13516                         elif test "${cf_tst_cflags}" = "\"'" ; then
13517                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13518                                 continue
13519                         fi
13520                         ;;
13521                 esac
13522                 case "$CPPFLAGS" in
13523                 *$cf_add_cflags) #(vi
13524                         ;;
13525                 *) #(vi
13526                         case $cf_add_cflags in #(vi
13527                         -D*)
13528                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13529
13530 CPPFLAGS=`echo "$CPPFLAGS" | \
13531         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13532                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13533
13534                                 ;;
13535                         esac
13536                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13537                         ;;
13538                 esac
13539                 ;;
13540         *)
13541                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13542                 ;;
13543         esac
13544         ;;
13545 yes)
13546         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13547
13548         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13549
13550         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13551                 && test -z "${cf_tst_cflags}" \
13552                 && cf_fix_cppflags=no
13553         ;;
13554 esac
13555 done
13556
13557 if test -n "$cf_new_cflags" ; then
13558
13559         CFLAGS="$CFLAGS $cf_new_cflags"
13560 fi
13561
13562 if test -n "$cf_new_cppflags" ; then
13563
13564         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13565 fi
13566
13567 if test -n "$cf_new_extra_cppflags" ; then
13568
13569         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13570 fi
13571
13572 else
13573         LIB_TRACING=DEBUG
13574         ADA_TRACE=FALSE
13575 fi
13576
13577 ###     Checks for libraries.
13578 case $cf_cv_system_name in #(vi
13579 *mingw32*) #(vi
13580         ;;
13581 *)
13582 echo "$as_me:13582: checking for gettimeofday" >&5
13583 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13584 if test "${ac_cv_func_gettimeofday+set}" = set; then
13585   echo $ECHO_N "(cached) $ECHO_C" >&6
13586 else
13587   cat >conftest.$ac_ext <<_ACEOF
13588 #line 13588 "configure"
13589 #include "confdefs.h"
13590 /* System header to define __stub macros and hopefully few prototypes,
13591     which can conflict with char gettimeofday (); below.  */
13592 #include <assert.h>
13593 /* Override any gcc2 internal prototype to avoid an error.  */
13594 #ifdef __cplusplus
13595 extern "C"
13596 #endif
13597 /* We use char because int might match the return type of a gcc2
13598    builtin and then its argument prototype would still apply.  */
13599 char gettimeofday ();
13600 char (*f) ();
13601
13602 int
13603 main ()
13604 {
13605 /* The GNU C library defines this for functions which it implements
13606     to always fail with ENOSYS.  Some functions are actually named
13607     something starting with __ and the normal name is an alias.  */
13608 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13609 choke me
13610 #else
13611 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13612 #endif
13613
13614   ;
13615   return 0;
13616 }
13617 _ACEOF
13618 rm -f conftest.$ac_objext conftest$ac_exeext
13619 if { (eval echo "$as_me:13619: \"$ac_link\"") >&5
13620   (eval $ac_link) 2>&5
13621   ac_status=$?
13622   echo "$as_me:13622: \$? = $ac_status" >&5
13623   (exit $ac_status); } &&
13624          { ac_try='test -s conftest$ac_exeext'
13625   { (eval echo "$as_me:13625: \"$ac_try\"") >&5
13626   (eval $ac_try) 2>&5
13627   ac_status=$?
13628   echo "$as_me:13628: \$? = $ac_status" >&5
13629   (exit $ac_status); }; }; then
13630   ac_cv_func_gettimeofday=yes
13631 else
13632   echo "$as_me: failed program was:" >&5
13633 cat conftest.$ac_ext >&5
13634 ac_cv_func_gettimeofday=no
13635 fi
13636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13637 fi
13638 echo "$as_me:13638: result: $ac_cv_func_gettimeofday" >&5
13639 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13640 if test $ac_cv_func_gettimeofday = yes; then
13641
13642 cat >>confdefs.h <<\EOF
13643 #define HAVE_GETTIMEOFDAY 1
13644 EOF
13645
13646 else
13647
13648 echo "$as_me:13648: checking for gettimeofday in -lbsd" >&5
13649 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13650 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13651   echo $ECHO_N "(cached) $ECHO_C" >&6
13652 else
13653   ac_check_lib_save_LIBS=$LIBS
13654 LIBS="-lbsd  $LIBS"
13655 cat >conftest.$ac_ext <<_ACEOF
13656 #line 13656 "configure"
13657 #include "confdefs.h"
13658
13659 /* Override any gcc2 internal prototype to avoid an error.  */
13660 #ifdef __cplusplus
13661 extern "C"
13662 #endif
13663 /* We use char because int might match the return type of a gcc2
13664    builtin and then its argument prototype would still apply.  */
13665 char gettimeofday ();
13666 int
13667 main ()
13668 {
13669 gettimeofday ();
13670   ;
13671   return 0;
13672 }
13673 _ACEOF
13674 rm -f conftest.$ac_objext conftest$ac_exeext
13675 if { (eval echo "$as_me:13675: \"$ac_link\"") >&5
13676   (eval $ac_link) 2>&5
13677   ac_status=$?
13678   echo "$as_me:13678: \$? = $ac_status" >&5
13679   (exit $ac_status); } &&
13680          { ac_try='test -s conftest$ac_exeext'
13681   { (eval echo "$as_me:13681: \"$ac_try\"") >&5
13682   (eval $ac_try) 2>&5
13683   ac_status=$?
13684   echo "$as_me:13684: \$? = $ac_status" >&5
13685   (exit $ac_status); }; }; then
13686   ac_cv_lib_bsd_gettimeofday=yes
13687 else
13688   echo "$as_me: failed program was:" >&5
13689 cat conftest.$ac_ext >&5
13690 ac_cv_lib_bsd_gettimeofday=no
13691 fi
13692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13693 LIBS=$ac_check_lib_save_LIBS
13694 fi
13695 echo "$as_me:13695: result: $ac_cv_lib_bsd_gettimeofday" >&5
13696 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13697 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13698
13699 cat >>confdefs.h <<\EOF
13700 #define HAVE_GETTIMEOFDAY 1
13701 EOF
13702
13703         LIBS="-lbsd $LIBS"
13704 fi
13705
13706 fi
13707         ;;
13708 esac
13709
13710 echo "$as_me:13710: checking if -lm needed for math functions" >&5
13711 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13712 if test "${cf_cv_need_libm+set}" = set; then
13713   echo $ECHO_N "(cached) $ECHO_C" >&6
13714 else
13715
13716         cat >conftest.$ac_ext <<_ACEOF
13717 #line 13717 "configure"
13718 #include "confdefs.h"
13719
13720         #include <stdio.h>
13721         #include <math.h>
13722
13723 int
13724 main ()
13725 {
13726 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13727   ;
13728   return 0;
13729 }
13730 _ACEOF
13731 rm -f conftest.$ac_objext conftest$ac_exeext
13732 if { (eval echo "$as_me:13732: \"$ac_link\"") >&5
13733   (eval $ac_link) 2>&5
13734   ac_status=$?
13735   echo "$as_me:13735: \$? = $ac_status" >&5
13736   (exit $ac_status); } &&
13737          { ac_try='test -s conftest$ac_exeext'
13738   { (eval echo "$as_me:13738: \"$ac_try\"") >&5
13739   (eval $ac_try) 2>&5
13740   ac_status=$?
13741   echo "$as_me:13741: \$? = $ac_status" >&5
13742   (exit $ac_status); }; }; then
13743   cf_cv_need_libm=no
13744 else
13745   echo "$as_me: failed program was:" >&5
13746 cat conftest.$ac_ext >&5
13747 cf_cv_need_libm=yes
13748 fi
13749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13750 fi
13751 echo "$as_me:13751: result: $cf_cv_need_libm" >&5
13752 echo "${ECHO_T}$cf_cv_need_libm" >&6
13753 if test "$cf_cv_need_libm" = yes
13754 then
13755 MATH_LIB=-lm
13756 fi
13757
13758 ###     Checks for header files.
13759 echo "$as_me:13759: checking for ANSI C header files" >&5
13760 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13761 if test "${ac_cv_header_stdc+set}" = set; then
13762   echo $ECHO_N "(cached) $ECHO_C" >&6
13763 else
13764   cat >conftest.$ac_ext <<_ACEOF
13765 #line 13765 "configure"
13766 #include "confdefs.h"
13767 #include <stdlib.h>
13768 #include <stdarg.h>
13769 #include <string.h>
13770 #include <float.h>
13771
13772 _ACEOF
13773 if { (eval echo "$as_me:13773: \"$ac_cpp conftest.$ac_ext\"") >&5
13774   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13775   ac_status=$?
13776   egrep -v '^ *\+' conftest.er1 >conftest.err
13777   rm -f conftest.er1
13778   cat conftest.err >&5
13779   echo "$as_me:13779: \$? = $ac_status" >&5
13780   (exit $ac_status); } >/dev/null; then
13781   if test -s conftest.err; then
13782     ac_cpp_err=$ac_c_preproc_warn_flag
13783   else
13784     ac_cpp_err=
13785   fi
13786 else
13787   ac_cpp_err=yes
13788 fi
13789 if test -z "$ac_cpp_err"; then
13790   ac_cv_header_stdc=yes
13791 else
13792   echo "$as_me: failed program was:" >&5
13793   cat conftest.$ac_ext >&5
13794   ac_cv_header_stdc=no
13795 fi
13796 rm -f conftest.err conftest.$ac_ext
13797
13798 if test $ac_cv_header_stdc = yes; then
13799   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13800   cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803 #include <string.h>
13804
13805 _ACEOF
13806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13807   egrep "memchr" >/dev/null 2>&1; then
13808   :
13809 else
13810   ac_cv_header_stdc=no
13811 fi
13812 rm -rf conftest*
13813
13814 fi
13815
13816 if test $ac_cv_header_stdc = yes; then
13817   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13818   cat >conftest.$ac_ext <<_ACEOF
13819 #line 13819 "configure"
13820 #include "confdefs.h"
13821 #include <stdlib.h>
13822
13823 _ACEOF
13824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13825   egrep "free" >/dev/null 2>&1; then
13826   :
13827 else
13828   ac_cv_header_stdc=no
13829 fi
13830 rm -rf conftest*
13831
13832 fi
13833
13834 if test $ac_cv_header_stdc = yes; then
13835   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13836   if test "$cross_compiling" = yes; then
13837   :
13838 else
13839   cat >conftest.$ac_ext <<_ACEOF
13840 #line 13840 "configure"
13841 #include "confdefs.h"
13842 #include <ctype.h>
13843 #if ((' ' & 0x0FF) == 0x020)
13844 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13845 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13846 #else
13847 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13848                      || ('j' <= (c) && (c) <= 'r') \
13849                      || ('s' <= (c) && (c) <= 'z'))
13850 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13851 #endif
13852
13853 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13854 int
13855 main ()
13856 {
13857   int i;
13858   for (i = 0; i < 256; i++)
13859     if (XOR (islower (i), ISLOWER (i))
13860         || toupper (i) != TOUPPER (i))
13861       $ac_main_return(2);
13862   $ac_main_return (0);
13863 }
13864 _ACEOF
13865 rm -f conftest$ac_exeext
13866 if { (eval echo "$as_me:13866: \"$ac_link\"") >&5
13867   (eval $ac_link) 2>&5
13868   ac_status=$?
13869   echo "$as_me:13869: \$? = $ac_status" >&5
13870   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13871   { (eval echo "$as_me:13871: \"$ac_try\"") >&5
13872   (eval $ac_try) 2>&5
13873   ac_status=$?
13874   echo "$as_me:13874: \$? = $ac_status" >&5
13875   (exit $ac_status); }; }; then
13876   :
13877 else
13878   echo "$as_me: program exited with status $ac_status" >&5
13879 echo "$as_me: failed program was:" >&5
13880 cat conftest.$ac_ext >&5
13881 ac_cv_header_stdc=no
13882 fi
13883 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13884 fi
13885 fi
13886 fi
13887 echo "$as_me:13887: result: $ac_cv_header_stdc" >&5
13888 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13889 if test $ac_cv_header_stdc = yes; then
13890
13891 cat >>confdefs.h <<\EOF
13892 #define STDC_HEADERS 1
13893 EOF
13894
13895 fi
13896
13897 ac_header_dirent=no
13898 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13899   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13900 echo "$as_me:13900: checking for $ac_hdr that defines DIR" >&5
13901 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13902 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13903   echo $ECHO_N "(cached) $ECHO_C" >&6
13904 else
13905   cat >conftest.$ac_ext <<_ACEOF
13906 #line 13906 "configure"
13907 #include "confdefs.h"
13908 #include <sys/types.h>
13909 #include <$ac_hdr>
13910
13911 int
13912 main ()
13913 {
13914 if ((DIR *) 0)
13915 return 0;
13916   ;
13917   return 0;
13918 }
13919 _ACEOF
13920 rm -f conftest.$ac_objext
13921 if { (eval echo "$as_me:13921: \"$ac_compile\"") >&5
13922   (eval $ac_compile) 2>&5
13923   ac_status=$?
13924   echo "$as_me:13924: \$? = $ac_status" >&5
13925   (exit $ac_status); } &&
13926          { ac_try='test -s conftest.$ac_objext'
13927   { (eval echo "$as_me:13927: \"$ac_try\"") >&5
13928   (eval $ac_try) 2>&5
13929   ac_status=$?
13930   echo "$as_me:13930: \$? = $ac_status" >&5
13931   (exit $ac_status); }; }; then
13932   eval "$as_ac_Header=yes"
13933 else
13934   echo "$as_me: failed program was:" >&5
13935 cat conftest.$ac_ext >&5
13936 eval "$as_ac_Header=no"
13937 fi
13938 rm -f conftest.$ac_objext conftest.$ac_ext
13939 fi
13940 echo "$as_me:13940: result: `eval echo '${'$as_ac_Header'}'`" >&5
13941 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13942 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13943   cat >>confdefs.h <<EOF
13944 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13945 EOF
13946
13947 ac_header_dirent=$ac_hdr; break
13948 fi
13949
13950 done
13951 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13952 if test $ac_header_dirent = dirent.h; then
13953   echo "$as_me:13953: checking for opendir in -ldir" >&5
13954 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13955 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13956   echo $ECHO_N "(cached) $ECHO_C" >&6
13957 else
13958   ac_check_lib_save_LIBS=$LIBS
13959 LIBS="-ldir  $LIBS"
13960 cat >conftest.$ac_ext <<_ACEOF
13961 #line 13961 "configure"
13962 #include "confdefs.h"
13963
13964 /* Override any gcc2 internal prototype to avoid an error.  */
13965 #ifdef __cplusplus
13966 extern "C"
13967 #endif
13968 /* We use char because int might match the return type of a gcc2
13969    builtin and then its argument prototype would still apply.  */
13970 char opendir ();
13971 int
13972 main ()
13973 {
13974 opendir ();
13975   ;
13976   return 0;
13977 }
13978 _ACEOF
13979 rm -f conftest.$ac_objext conftest$ac_exeext
13980 if { (eval echo "$as_me:13980: \"$ac_link\"") >&5
13981   (eval $ac_link) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit $ac_status); } &&
13985          { ac_try='test -s conftest$ac_exeext'
13986   { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit $ac_status); }; }; then
13991   ac_cv_lib_dir_opendir=yes
13992 else
13993   echo "$as_me: failed program was:" >&5
13994 cat conftest.$ac_ext >&5
13995 ac_cv_lib_dir_opendir=no
13996 fi
13997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13998 LIBS=$ac_check_lib_save_LIBS
13999 fi
14000 echo "$as_me:14000: result: $ac_cv_lib_dir_opendir" >&5
14001 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14002 if test $ac_cv_lib_dir_opendir = yes; then
14003   LIBS="$LIBS -ldir"
14004 fi
14005
14006 else
14007   echo "$as_me:14007: checking for opendir in -lx" >&5
14008 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14009 if test "${ac_cv_lib_x_opendir+set}" = set; then
14010   echo $ECHO_N "(cached) $ECHO_C" >&6
14011 else
14012   ac_check_lib_save_LIBS=$LIBS
14013 LIBS="-lx  $LIBS"
14014 cat >conftest.$ac_ext <<_ACEOF
14015 #line 14015 "configure"
14016 #include "confdefs.h"
14017
14018 /* Override any gcc2 internal prototype to avoid an error.  */
14019 #ifdef __cplusplus
14020 extern "C"
14021 #endif
14022 /* We use char because int might match the return type of a gcc2
14023    builtin and then its argument prototype would still apply.  */
14024 char opendir ();
14025 int
14026 main ()
14027 {
14028 opendir ();
14029   ;
14030   return 0;
14031 }
14032 _ACEOF
14033 rm -f conftest.$ac_objext conftest$ac_exeext
14034 if { (eval echo "$as_me:14034: \"$ac_link\"") >&5
14035   (eval $ac_link) 2>&5
14036   ac_status=$?
14037   echo "$as_me:14037: \$? = $ac_status" >&5
14038   (exit $ac_status); } &&
14039          { ac_try='test -s conftest$ac_exeext'
14040   { (eval echo "$as_me:14040: \"$ac_try\"") >&5
14041   (eval $ac_try) 2>&5
14042   ac_status=$?
14043   echo "$as_me:14043: \$? = $ac_status" >&5
14044   (exit $ac_status); }; }; then
14045   ac_cv_lib_x_opendir=yes
14046 else
14047   echo "$as_me: failed program was:" >&5
14048 cat conftest.$ac_ext >&5
14049 ac_cv_lib_x_opendir=no
14050 fi
14051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14052 LIBS=$ac_check_lib_save_LIBS
14053 fi
14054 echo "$as_me:14054: result: $ac_cv_lib_x_opendir" >&5
14055 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14056 if test $ac_cv_lib_x_opendir = yes; then
14057   LIBS="$LIBS -lx"
14058 fi
14059
14060 fi
14061
14062 echo "$as_me:14062: checking whether time.h and sys/time.h may both be included" >&5
14063 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14064 if test "${ac_cv_header_time+set}" = set; then
14065   echo $ECHO_N "(cached) $ECHO_C" >&6
14066 else
14067   cat >conftest.$ac_ext <<_ACEOF
14068 #line 14068 "configure"
14069 #include "confdefs.h"
14070 #include <sys/types.h>
14071 #include <sys/time.h>
14072 #include <time.h>
14073
14074 int
14075 main ()
14076 {
14077 if ((struct tm *) 0)
14078 return 0;
14079   ;
14080   return 0;
14081 }
14082 _ACEOF
14083 rm -f conftest.$ac_objext
14084 if { (eval echo "$as_me:14084: \"$ac_compile\"") >&5
14085   (eval $ac_compile) 2>&5
14086   ac_status=$?
14087   echo "$as_me:14087: \$? = $ac_status" >&5
14088   (exit $ac_status); } &&
14089          { ac_try='test -s conftest.$ac_objext'
14090   { (eval echo "$as_me:14090: \"$ac_try\"") >&5
14091   (eval $ac_try) 2>&5
14092   ac_status=$?
14093   echo "$as_me:14093: \$? = $ac_status" >&5
14094   (exit $ac_status); }; }; then
14095   ac_cv_header_time=yes
14096 else
14097   echo "$as_me: failed program was:" >&5
14098 cat conftest.$ac_ext >&5
14099 ac_cv_header_time=no
14100 fi
14101 rm -f conftest.$ac_objext conftest.$ac_ext
14102 fi
14103 echo "$as_me:14103: result: $ac_cv_header_time" >&5
14104 echo "${ECHO_T}$ac_cv_header_time" >&6
14105 if test $ac_cv_header_time = yes; then
14106
14107 cat >>confdefs.h <<\EOF
14108 #define TIME_WITH_SYS_TIME 1
14109 EOF
14110
14111 fi
14112
14113 cf_regex_func=no
14114
14115 cf_regex_libs="regex re"
14116 case $host_os in #(vi
14117 mingw*)
14118         cf_regex_libs="gnurx $cf_regex_libs"
14119         ;;
14120 esac
14121
14122 echo "$as_me:14122: checking for regcomp" >&5
14123 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14124 if test "${ac_cv_func_regcomp+set}" = set; then
14125   echo $ECHO_N "(cached) $ECHO_C" >&6
14126 else
14127   cat >conftest.$ac_ext <<_ACEOF
14128 #line 14128 "configure"
14129 #include "confdefs.h"
14130 /* System header to define __stub macros and hopefully few prototypes,
14131     which can conflict with char regcomp (); below.  */
14132 #include <assert.h>
14133 /* Override any gcc2 internal prototype to avoid an error.  */
14134 #ifdef __cplusplus
14135 extern "C"
14136 #endif
14137 /* We use char because int might match the return type of a gcc2
14138    builtin and then its argument prototype would still apply.  */
14139 char regcomp ();
14140 char (*f) ();
14141
14142 int
14143 main ()
14144 {
14145 /* The GNU C library defines this for functions which it implements
14146     to always fail with ENOSYS.  Some functions are actually named
14147     something starting with __ and the normal name is an alias.  */
14148 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14149 choke me
14150 #else
14151 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14152 #endif
14153
14154   ;
14155   return 0;
14156 }
14157 _ACEOF
14158 rm -f conftest.$ac_objext conftest$ac_exeext
14159 if { (eval echo "$as_me:14159: \"$ac_link\"") >&5
14160   (eval $ac_link) 2>&5
14161   ac_status=$?
14162   echo "$as_me:14162: \$? = $ac_status" >&5
14163   (exit $ac_status); } &&
14164          { ac_try='test -s conftest$ac_exeext'
14165   { (eval echo "$as_me:14165: \"$ac_try\"") >&5
14166   (eval $ac_try) 2>&5
14167   ac_status=$?
14168   echo "$as_me:14168: \$? = $ac_status" >&5
14169   (exit $ac_status); }; }; then
14170   ac_cv_func_regcomp=yes
14171 else
14172   echo "$as_me: failed program was:" >&5
14173 cat conftest.$ac_ext >&5
14174 ac_cv_func_regcomp=no
14175 fi
14176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14177 fi
14178 echo "$as_me:14178: result: $ac_cv_func_regcomp" >&5
14179 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14180 if test $ac_cv_func_regcomp = yes; then
14181   cf_regex_func=regcomp
14182 else
14183
14184         for cf_regex_lib in $cf_regex_libs
14185         do
14186                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14187 echo "$as_me:14187: checking for regcomp in -l$cf_regex_lib" >&5
14188 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14189 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14190   echo $ECHO_N "(cached) $ECHO_C" >&6
14191 else
14192   ac_check_lib_save_LIBS=$LIBS
14193 LIBS="-l$cf_regex_lib  $LIBS"
14194 cat >conftest.$ac_ext <<_ACEOF
14195 #line 14195 "configure"
14196 #include "confdefs.h"
14197
14198 /* Override any gcc2 internal prototype to avoid an error.  */
14199 #ifdef __cplusplus
14200 extern "C"
14201 #endif
14202 /* We use char because int might match the return type of a gcc2
14203    builtin and then its argument prototype would still apply.  */
14204 char regcomp ();
14205 int
14206 main ()
14207 {
14208 regcomp ();
14209   ;
14210   return 0;
14211 }
14212 _ACEOF
14213 rm -f conftest.$ac_objext conftest$ac_exeext
14214 if { (eval echo "$as_me:14214: \"$ac_link\"") >&5
14215   (eval $ac_link) 2>&5
14216   ac_status=$?
14217   echo "$as_me:14217: \$? = $ac_status" >&5
14218   (exit $ac_status); } &&
14219          { ac_try='test -s conftest$ac_exeext'
14220   { (eval echo "$as_me:14220: \"$ac_try\"") >&5
14221   (eval $ac_try) 2>&5
14222   ac_status=$?
14223   echo "$as_me:14223: \$? = $ac_status" >&5
14224   (exit $ac_status); }; }; then
14225   eval "$as_ac_Lib=yes"
14226 else
14227   echo "$as_me: failed program was:" >&5
14228 cat conftest.$ac_ext >&5
14229 eval "$as_ac_Lib=no"
14230 fi
14231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14232 LIBS=$ac_check_lib_save_LIBS
14233 fi
14234 echo "$as_me:14234: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14235 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14236 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14237
14238                                 LIBS="-l$cf_regex_lib $LIBS"
14239                                 cf_regex_func=regcomp
14240                                 break
14241 fi
14242
14243         done
14244
14245 fi
14246
14247 if test "$cf_regex_func" = no ; then
14248         echo "$as_me:14248: checking for compile" >&5
14249 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14250 if test "${ac_cv_func_compile+set}" = set; then
14251   echo $ECHO_N "(cached) $ECHO_C" >&6
14252 else
14253   cat >conftest.$ac_ext <<_ACEOF
14254 #line 14254 "configure"
14255 #include "confdefs.h"
14256 /* System header to define __stub macros and hopefully few prototypes,
14257     which can conflict with char compile (); below.  */
14258 #include <assert.h>
14259 /* Override any gcc2 internal prototype to avoid an error.  */
14260 #ifdef __cplusplus
14261 extern "C"
14262 #endif
14263 /* We use char because int might match the return type of a gcc2
14264    builtin and then its argument prototype would still apply.  */
14265 char compile ();
14266 char (*f) ();
14267
14268 int
14269 main ()
14270 {
14271 /* The GNU C library defines this for functions which it implements
14272     to always fail with ENOSYS.  Some functions are actually named
14273     something starting with __ and the normal name is an alias.  */
14274 #if defined (__stub_compile) || defined (__stub___compile)
14275 choke me
14276 #else
14277 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14278 #endif
14279
14280   ;
14281   return 0;
14282 }
14283 _ACEOF
14284 rm -f conftest.$ac_objext conftest$ac_exeext
14285 if { (eval echo "$as_me:14285: \"$ac_link\"") >&5
14286   (eval $ac_link) 2>&5
14287   ac_status=$?
14288   echo "$as_me:14288: \$? = $ac_status" >&5
14289   (exit $ac_status); } &&
14290          { ac_try='test -s conftest$ac_exeext'
14291   { (eval echo "$as_me:14291: \"$ac_try\"") >&5
14292   (eval $ac_try) 2>&5
14293   ac_status=$?
14294   echo "$as_me:14294: \$? = $ac_status" >&5
14295   (exit $ac_status); }; }; then
14296   ac_cv_func_compile=yes
14297 else
14298   echo "$as_me: failed program was:" >&5
14299 cat conftest.$ac_ext >&5
14300 ac_cv_func_compile=no
14301 fi
14302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14303 fi
14304 echo "$as_me:14304: result: $ac_cv_func_compile" >&5
14305 echo "${ECHO_T}$ac_cv_func_compile" >&6
14306 if test $ac_cv_func_compile = yes; then
14307   cf_regex_func=compile
14308 else
14309
14310                 echo "$as_me:14310: checking for compile in -lgen" >&5
14311 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14312 if test "${ac_cv_lib_gen_compile+set}" = set; then
14313   echo $ECHO_N "(cached) $ECHO_C" >&6
14314 else
14315   ac_check_lib_save_LIBS=$LIBS
14316 LIBS="-lgen  $LIBS"
14317 cat >conftest.$ac_ext <<_ACEOF
14318 #line 14318 "configure"
14319 #include "confdefs.h"
14320
14321 /* Override any gcc2 internal prototype to avoid an error.  */
14322 #ifdef __cplusplus
14323 extern "C"
14324 #endif
14325 /* We use char because int might match the return type of a gcc2
14326    builtin and then its argument prototype would still apply.  */
14327 char compile ();
14328 int
14329 main ()
14330 {
14331 compile ();
14332   ;
14333   return 0;
14334 }
14335 _ACEOF
14336 rm -f conftest.$ac_objext conftest$ac_exeext
14337 if { (eval echo "$as_me:14337: \"$ac_link\"") >&5
14338   (eval $ac_link) 2>&5
14339   ac_status=$?
14340   echo "$as_me:14340: \$? = $ac_status" >&5
14341   (exit $ac_status); } &&
14342          { ac_try='test -s conftest$ac_exeext'
14343   { (eval echo "$as_me:14343: \"$ac_try\"") >&5
14344   (eval $ac_try) 2>&5
14345   ac_status=$?
14346   echo "$as_me:14346: \$? = $ac_status" >&5
14347   (exit $ac_status); }; }; then
14348   ac_cv_lib_gen_compile=yes
14349 else
14350   echo "$as_me: failed program was:" >&5
14351 cat conftest.$ac_ext >&5
14352 ac_cv_lib_gen_compile=no
14353 fi
14354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14355 LIBS=$ac_check_lib_save_LIBS
14356 fi
14357 echo "$as_me:14357: result: $ac_cv_lib_gen_compile" >&5
14358 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14359 if test $ac_cv_lib_gen_compile = yes; then
14360
14361                                 LIBS="-lgen $LIBS"
14362                                 cf_regex_func=compile
14363 fi
14364
14365 fi
14366
14367 fi
14368
14369 if test "$cf_regex_func" = no ; then
14370         { echo "$as_me:14370: WARNING: cannot find regular expression library" >&5
14371 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14372 fi
14373
14374 echo "$as_me:14374: checking for regular-expression headers" >&5
14375 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14376 if test "${cf_cv_regex_hdrs+set}" = set; then
14377   echo $ECHO_N "(cached) $ECHO_C" >&6
14378 else
14379
14380 cf_cv_regex_hdrs=no
14381 case $cf_regex_func in #(vi
14382 compile) #(vi
14383         for cf_regex_hdr in regexp.h regexpr.h
14384         do
14385                 cat >conftest.$ac_ext <<_ACEOF
14386 #line 14386 "configure"
14387 #include "confdefs.h"
14388 #include <$cf_regex_hdr>
14389 int
14390 main ()
14391 {
14392
14393                         char *p = compile("", "", "", 0);
14394                         int x = step("", "");
14395
14396   ;
14397   return 0;
14398 }
14399 _ACEOF
14400 rm -f conftest.$ac_objext conftest$ac_exeext
14401 if { (eval echo "$as_me:14401: \"$ac_link\"") >&5
14402   (eval $ac_link) 2>&5
14403   ac_status=$?
14404   echo "$as_me:14404: \$? = $ac_status" >&5
14405   (exit $ac_status); } &&
14406          { ac_try='test -s conftest$ac_exeext'
14407   { (eval echo "$as_me:14407: \"$ac_try\"") >&5
14408   (eval $ac_try) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit $ac_status); }; }; then
14412
14413                         cf_cv_regex_hdrs=$cf_regex_hdr
14414                         break
14415
14416 else
14417   echo "$as_me: failed program was:" >&5
14418 cat conftest.$ac_ext >&5
14419 fi
14420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14421         done
14422         ;;
14423 *)
14424         for cf_regex_hdr in regex.h
14425         do
14426                 cat >conftest.$ac_ext <<_ACEOF
14427 #line 14427 "configure"
14428 #include "confdefs.h"
14429 #include <sys/types.h>
14430 #include <$cf_regex_hdr>
14431 int
14432 main ()
14433 {
14434
14435                         regex_t *p;
14436                         int x = regcomp(p, "", 0);
14437                         int y = regexec(p, "", 0, 0, 0);
14438                         regfree(p);
14439
14440   ;
14441   return 0;
14442 }
14443 _ACEOF
14444 rm -f conftest.$ac_objext conftest$ac_exeext
14445 if { (eval echo "$as_me:14445: \"$ac_link\"") >&5
14446   (eval $ac_link) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); } &&
14450          { ac_try='test -s conftest$ac_exeext'
14451   { (eval echo "$as_me:14451: \"$ac_try\"") >&5
14452   (eval $ac_try) 2>&5
14453   ac_status=$?
14454   echo "$as_me:14454: \$? = $ac_status" >&5
14455   (exit $ac_status); }; }; then
14456
14457                         cf_cv_regex_hdrs=$cf_regex_hdr
14458                         break
14459
14460 else
14461   echo "$as_me: failed program was:" >&5
14462 cat conftest.$ac_ext >&5
14463 fi
14464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14465         done
14466         ;;
14467 esac
14468
14469 fi
14470 echo "$as_me:14470: result: $cf_cv_regex_hdrs" >&5
14471 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14472
14473 case $cf_cv_regex_hdrs in #(vi
14474     no)        { echo "$as_me:14474: WARNING: no regular expression header found" >&5
14475 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14476     regex.h)
14477 cat >>confdefs.h <<\EOF
14478 #define HAVE_REGEX_H_FUNCS 1
14479 EOF
14480  ;; #(vi
14481     regexp.h)
14482 cat >>confdefs.h <<\EOF
14483 #define HAVE_REGEXP_H_FUNCS 1
14484 EOF
14485  ;; #(vi
14486     regexpr.h)
14487 cat >>confdefs.h <<\EOF
14488 #define HAVE_REGEXPR_H_FUNCS 1
14489 EOF
14490  ;;
14491 esac
14492
14493 for ac_header in \
14494 fcntl.h \
14495 getopt.h \
14496 limits.h \
14497 locale.h \
14498 math.h \
14499 poll.h \
14500 sys/bsdtypes.h \
14501 sys/ioctl.h \
14502 sys/param.h \
14503 sys/poll.h \
14504 sys/select.h \
14505 sys/time.h \
14506 sys/times.h \
14507 ttyent.h \
14508 unistd.h \
14509 wctype.h \
14510
14511 do
14512 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14513 echo "$as_me:14513: checking for $ac_header" >&5
14514 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14515 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14516   echo $ECHO_N "(cached) $ECHO_C" >&6
14517 else
14518   cat >conftest.$ac_ext <<_ACEOF
14519 #line 14519 "configure"
14520 #include "confdefs.h"
14521 #include <$ac_header>
14522 _ACEOF
14523 if { (eval echo "$as_me:14523: \"$ac_cpp conftest.$ac_ext\"") >&5
14524   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14525   ac_status=$?
14526   egrep -v '^ *\+' conftest.er1 >conftest.err
14527   rm -f conftest.er1
14528   cat conftest.err >&5
14529   echo "$as_me:14529: \$? = $ac_status" >&5
14530   (exit $ac_status); } >/dev/null; then
14531   if test -s conftest.err; then
14532     ac_cpp_err=$ac_c_preproc_warn_flag
14533   else
14534     ac_cpp_err=
14535   fi
14536 else
14537   ac_cpp_err=yes
14538 fi
14539 if test -z "$ac_cpp_err"; then
14540   eval "$as_ac_Header=yes"
14541 else
14542   echo "$as_me: failed program was:" >&5
14543   cat conftest.$ac_ext >&5
14544   eval "$as_ac_Header=no"
14545 fi
14546 rm -f conftest.err conftest.$ac_ext
14547 fi
14548 echo "$as_me:14548: result: `eval echo '${'$as_ac_Header'}'`" >&5
14549 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14550 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14551   cat >>confdefs.h <<EOF
14552 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14553 EOF
14554
14555 fi
14556 done
14557
14558 for ac_header in unistd.h getopt.h
14559 do
14560 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14561 echo "$as_me:14561: checking for $ac_header" >&5
14562 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14563 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14564   echo $ECHO_N "(cached) $ECHO_C" >&6
14565 else
14566   cat >conftest.$ac_ext <<_ACEOF
14567 #line 14567 "configure"
14568 #include "confdefs.h"
14569 #include <$ac_header>
14570 _ACEOF
14571 if { (eval echo "$as_me:14571: \"$ac_cpp conftest.$ac_ext\"") >&5
14572   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14573   ac_status=$?
14574   egrep -v '^ *\+' conftest.er1 >conftest.err
14575   rm -f conftest.er1
14576   cat conftest.err >&5
14577   echo "$as_me:14577: \$? = $ac_status" >&5
14578   (exit $ac_status); } >/dev/null; then
14579   if test -s conftest.err; then
14580     ac_cpp_err=$ac_c_preproc_warn_flag
14581   else
14582     ac_cpp_err=
14583   fi
14584 else
14585   ac_cpp_err=yes
14586 fi
14587 if test -z "$ac_cpp_err"; then
14588   eval "$as_ac_Header=yes"
14589 else
14590   echo "$as_me: failed program was:" >&5
14591   cat conftest.$ac_ext >&5
14592   eval "$as_ac_Header=no"
14593 fi
14594 rm -f conftest.err conftest.$ac_ext
14595 fi
14596 echo "$as_me:14596: result: `eval echo '${'$as_ac_Header'}'`" >&5
14597 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14598 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14599   cat >>confdefs.h <<EOF
14600 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14601 EOF
14602
14603 fi
14604 done
14605
14606 echo "$as_me:14606: checking for header declaring getopt variables" >&5
14607 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14608 if test "${cf_cv_getopt_header+set}" = set; then
14609   echo $ECHO_N "(cached) $ECHO_C" >&6
14610 else
14611
14612 cf_cv_getopt_header=none
14613 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14614 do
14615 cat >conftest.$ac_ext <<_ACEOF
14616 #line 14616 "configure"
14617 #include "confdefs.h"
14618
14619 #include <$cf_header>
14620 int
14621 main ()
14622 {
14623 int x = optind; char *y = optarg
14624   ;
14625   return 0;
14626 }
14627 _ACEOF
14628 rm -f conftest.$ac_objext
14629 if { (eval echo "$as_me:14629: \"$ac_compile\"") >&5
14630   (eval $ac_compile) 2>&5
14631   ac_status=$?
14632   echo "$as_me:14632: \$? = $ac_status" >&5
14633   (exit $ac_status); } &&
14634          { ac_try='test -s conftest.$ac_objext'
14635   { (eval echo "$as_me:14635: \"$ac_try\"") >&5
14636   (eval $ac_try) 2>&5
14637   ac_status=$?
14638   echo "$as_me:14638: \$? = $ac_status" >&5
14639   (exit $ac_status); }; }; then
14640   cf_cv_getopt_header=$cf_header
14641  break
14642 else
14643   echo "$as_me: failed program was:" >&5
14644 cat conftest.$ac_ext >&5
14645 fi
14646 rm -f conftest.$ac_objext conftest.$ac_ext
14647 done
14648
14649 fi
14650 echo "$as_me:14650: result: $cf_cv_getopt_header" >&5
14651 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14652 if test $cf_cv_getopt_header != none ; then
14653
14654 cat >>confdefs.h <<\EOF
14655 #define HAVE_GETOPT_HEADER 1
14656 EOF
14657
14658 fi
14659
14660 # check for ISC (this may also define _POSIX_SOURCE)
14661 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14662 if test "x$ISC" = xyes ; then
14663
14664 echo "$as_me:14664: checking for main in -lcposix" >&5
14665 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14666 if test "${ac_cv_lib_cposix_main+set}" = set; then
14667   echo $ECHO_N "(cached) $ECHO_C" >&6
14668 else
14669   ac_check_lib_save_LIBS=$LIBS
14670 LIBS="-lcposix  $LIBS"
14671 cat >conftest.$ac_ext <<_ACEOF
14672 #line 14672 "configure"
14673 #include "confdefs.h"
14674
14675 int
14676 main ()
14677 {
14678 main ();
14679   ;
14680   return 0;
14681 }
14682 _ACEOF
14683 rm -f conftest.$ac_objext conftest$ac_exeext
14684 if { (eval echo "$as_me:14684: \"$ac_link\"") >&5
14685   (eval $ac_link) 2>&5
14686   ac_status=$?
14687   echo "$as_me:14687: \$? = $ac_status" >&5
14688   (exit $ac_status); } &&
14689          { ac_try='test -s conftest$ac_exeext'
14690   { (eval echo "$as_me:14690: \"$ac_try\"") >&5
14691   (eval $ac_try) 2>&5
14692   ac_status=$?
14693   echo "$as_me:14693: \$? = $ac_status" >&5
14694   (exit $ac_status); }; }; then
14695   ac_cv_lib_cposix_main=yes
14696 else
14697   echo "$as_me: failed program was:" >&5
14698 cat conftest.$ac_ext >&5
14699 ac_cv_lib_cposix_main=no
14700 fi
14701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14702 LIBS=$ac_check_lib_save_LIBS
14703 fi
14704 echo "$as_me:14704: result: $ac_cv_lib_cposix_main" >&5
14705 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14706 if test $ac_cv_lib_cposix_main = yes; then
14707   cat >>confdefs.h <<EOF
14708 #define HAVE_LIBCPOSIX 1
14709 EOF
14710
14711   LIBS="-lcposix $LIBS"
14712
14713 fi
14714
14715         echo "$as_me:14715: checking for bzero in -linet" >&5
14716 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14717 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14718   echo $ECHO_N "(cached) $ECHO_C" >&6
14719 else
14720   ac_check_lib_save_LIBS=$LIBS
14721 LIBS="-linet  $LIBS"
14722 cat >conftest.$ac_ext <<_ACEOF
14723 #line 14723 "configure"
14724 #include "confdefs.h"
14725
14726 /* Override any gcc2 internal prototype to avoid an error.  */
14727 #ifdef __cplusplus
14728 extern "C"
14729 #endif
14730 /* We use char because int might match the return type of a gcc2
14731    builtin and then its argument prototype would still apply.  */
14732 char bzero ();
14733 int
14734 main ()
14735 {
14736 bzero ();
14737   ;
14738   return 0;
14739 }
14740 _ACEOF
14741 rm -f conftest.$ac_objext conftest$ac_exeext
14742 if { (eval echo "$as_me:14742: \"$ac_link\"") >&5
14743   (eval $ac_link) 2>&5
14744   ac_status=$?
14745   echo "$as_me:14745: \$? = $ac_status" >&5
14746   (exit $ac_status); } &&
14747          { ac_try='test -s conftest$ac_exeext'
14748   { (eval echo "$as_me:14748: \"$ac_try\"") >&5
14749   (eval $ac_try) 2>&5
14750   ac_status=$?
14751   echo "$as_me:14751: \$? = $ac_status" >&5
14752   (exit $ac_status); }; }; then
14753   ac_cv_lib_inet_bzero=yes
14754 else
14755   echo "$as_me: failed program was:" >&5
14756 cat conftest.$ac_ext >&5
14757 ac_cv_lib_inet_bzero=no
14758 fi
14759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14760 LIBS=$ac_check_lib_save_LIBS
14761 fi
14762 echo "$as_me:14762: result: $ac_cv_lib_inet_bzero" >&5
14763 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14764 if test $ac_cv_lib_inet_bzero = yes; then
14765   LIBS="-linet $LIBS"
14766 fi
14767 fi
14768
14769 echo "$as_me:14769: checking if sys/time.h works with sys/select.h" >&5
14770 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14771 if test "${cf_cv_sys_time_select+set}" = set; then
14772   echo $ECHO_N "(cached) $ECHO_C" >&6
14773 else
14774
14775 cat >conftest.$ac_ext <<_ACEOF
14776 #line 14776 "configure"
14777 #include "confdefs.h"
14778
14779 #include <sys/types.h>
14780 #ifdef HAVE_SYS_TIME_H
14781 #include <sys/time.h>
14782 #endif
14783 #ifdef HAVE_SYS_SELECT_H
14784 #include <sys/select.h>
14785 #endif
14786
14787 int
14788 main ()
14789 {
14790
14791   ;
14792   return 0;
14793 }
14794 _ACEOF
14795 rm -f conftest.$ac_objext
14796 if { (eval echo "$as_me:14796: \"$ac_compile\"") >&5
14797   (eval $ac_compile) 2>&5
14798   ac_status=$?
14799   echo "$as_me:14799: \$? = $ac_status" >&5
14800   (exit $ac_status); } &&
14801          { ac_try='test -s conftest.$ac_objext'
14802   { (eval echo "$as_me:14802: \"$ac_try\"") >&5
14803   (eval $ac_try) 2>&5
14804   ac_status=$?
14805   echo "$as_me:14805: \$? = $ac_status" >&5
14806   (exit $ac_status); }; }; then
14807   cf_cv_sys_time_select=yes
14808 else
14809   echo "$as_me: failed program was:" >&5
14810 cat conftest.$ac_ext >&5
14811 cf_cv_sys_time_select=no
14812 fi
14813 rm -f conftest.$ac_objext conftest.$ac_ext
14814
14815 fi
14816
14817 echo "$as_me:14817: result: $cf_cv_sys_time_select" >&5
14818 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14819 test "$cf_cv_sys_time_select" = yes &&
14820 cat >>confdefs.h <<\EOF
14821 #define HAVE_SYS_TIME_SELECT 1
14822 EOF
14823
14824 ###     checks for compiler characteristics
14825 ac_ext=c
14826 ac_cpp='$CPP $CPPFLAGS'
14827 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14828 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14830 ac_main_return=return
14831
14832 echo "$as_me:14832: checking for an ANSI C-conforming const" >&5
14833 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14834 if test "${ac_cv_c_const+set}" = set; then
14835   echo $ECHO_N "(cached) $ECHO_C" >&6
14836 else
14837   cat >conftest.$ac_ext <<_ACEOF
14838 #line 14838 "configure"
14839 #include "confdefs.h"
14840
14841 int
14842 main ()
14843 {
14844 /* FIXME: Include the comments suggested by Paul. */
14845 #ifndef __cplusplus
14846   /* Ultrix mips cc rejects this.  */
14847   typedef int charset[2];
14848   const charset x;
14849   /* SunOS 4.1.1 cc rejects this.  */
14850   char const *const *ccp;
14851   char **p;
14852   /* NEC SVR4.0.2 mips cc rejects this.  */
14853   struct point {int x, y;};
14854   static struct point const zero = {0,0};
14855   /* AIX XL C 1.02.0.0 rejects this.
14856      It does not let you subtract one const X* pointer from another in
14857      an arm of an if-expression whose if-part is not a constant
14858      expression */
14859   const char *g = "string";
14860   ccp = &g + (g ? g-g : 0);
14861   /* HPUX 7.0 cc rejects these. */
14862   ++ccp;
14863   p = (char**) ccp;
14864   ccp = (char const *const *) p;
14865   { /* SCO 3.2v4 cc rejects this.  */
14866     char *t;
14867     char const *s = 0 ? (char *) 0 : (char const *) 0;
14868
14869     *t++ = 0;
14870   }
14871   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14872     int x[] = {25, 17};
14873     const int *foo = &x[0];
14874     ++foo;
14875   }
14876   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14877     typedef const int *iptr;
14878     iptr p = 0;
14879     ++p;
14880   }
14881   { /* AIX XL C 1.02.0.0 rejects this saying
14882        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14883     struct s { int j; const int *ap[3]; };
14884     struct s *b; b->j = 5;
14885   }
14886   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14887     const int foo = 10;
14888   }
14889 #endif
14890
14891   ;
14892   return 0;
14893 }
14894 _ACEOF
14895 rm -f conftest.$ac_objext
14896 if { (eval echo "$as_me:14896: \"$ac_compile\"") >&5
14897   (eval $ac_compile) 2>&5
14898   ac_status=$?
14899   echo "$as_me:14899: \$? = $ac_status" >&5
14900   (exit $ac_status); } &&
14901          { ac_try='test -s conftest.$ac_objext'
14902   { (eval echo "$as_me:14902: \"$ac_try\"") >&5
14903   (eval $ac_try) 2>&5
14904   ac_status=$?
14905   echo "$as_me:14905: \$? = $ac_status" >&5
14906   (exit $ac_status); }; }; then
14907   ac_cv_c_const=yes
14908 else
14909   echo "$as_me: failed program was:" >&5
14910 cat conftest.$ac_ext >&5
14911 ac_cv_c_const=no
14912 fi
14913 rm -f conftest.$ac_objext conftest.$ac_ext
14914 fi
14915 echo "$as_me:14915: result: $ac_cv_c_const" >&5
14916 echo "${ECHO_T}$ac_cv_c_const" >&6
14917 if test $ac_cv_c_const = no; then
14918
14919 cat >>confdefs.h <<\EOF
14920 #define const
14921 EOF
14922
14923 fi
14924
14925 echo "$as_me:14925: checking for inline" >&5
14926 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14927 if test "${ac_cv_c_inline+set}" = set; then
14928   echo $ECHO_N "(cached) $ECHO_C" >&6
14929 else
14930   ac_cv_c_inline=no
14931 for ac_kw in inline __inline__ __inline; do
14932   cat >conftest.$ac_ext <<_ACEOF
14933 #line 14933 "configure"
14934 #include "confdefs.h"
14935 #ifndef __cplusplus
14936 static $ac_kw int static_foo () {return 0; }
14937 $ac_kw int foo () {return 0; }
14938 #endif
14939
14940 _ACEOF
14941 rm -f conftest.$ac_objext
14942 if { (eval echo "$as_me:14942: \"$ac_compile\"") >&5
14943   (eval $ac_compile) 2>&5
14944   ac_status=$?
14945   echo "$as_me:14945: \$? = $ac_status" >&5
14946   (exit $ac_status); } &&
14947          { ac_try='test -s conftest.$ac_objext'
14948   { (eval echo "$as_me:14948: \"$ac_try\"") >&5
14949   (eval $ac_try) 2>&5
14950   ac_status=$?
14951   echo "$as_me:14951: \$? = $ac_status" >&5
14952   (exit $ac_status); }; }; then
14953   ac_cv_c_inline=$ac_kw; break
14954 else
14955   echo "$as_me: failed program was:" >&5
14956 cat conftest.$ac_ext >&5
14957 fi
14958 rm -f conftest.$ac_objext conftest.$ac_ext
14959 done
14960
14961 fi
14962 echo "$as_me:14962: result: $ac_cv_c_inline" >&5
14963 echo "${ECHO_T}$ac_cv_c_inline" >&6
14964 case $ac_cv_c_inline in
14965   inline | yes) ;;
14966   no)
14967 cat >>confdefs.h <<\EOF
14968 #define inline
14969 EOF
14970  ;;
14971   *)  cat >>confdefs.h <<EOF
14972 #define inline $ac_cv_c_inline
14973 EOF
14974  ;;
14975 esac
14976
14977 NCURSES_INLINE=
14978 if test "$ac_cv_c_inline" != no ; then
14979   NCURSES_INLINE=inline
14980   if test "$INTEL_COMPILER" = yes
14981   then
14982     :
14983   elif test "$CLANG_COMPILER" = yes
14984   then
14985     :
14986   elif test "$GCC" = yes
14987   then
14988     echo "$as_me:14988: checking if $CC supports options to tune inlining" >&5
14989 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14990 if test "${cf_cv_gcc_inline+set}" = set; then
14991   echo $ECHO_N "(cached) $ECHO_C" >&6
14992 else
14993
14994       cf_save_CFLAGS=$CFLAGS
14995       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14996       cat >conftest.$ac_ext <<_ACEOF
14997 #line 14997 "configure"
14998 #include "confdefs.h"
14999 inline int foo(void) { return 1; }
15000 int
15001 main ()
15002 {
15003 ${cf_cv_main_return:-return} foo()
15004   ;
15005   return 0;
15006 }
15007 _ACEOF
15008 rm -f conftest.$ac_objext
15009 if { (eval echo "$as_me:15009: \"$ac_compile\"") >&5
15010   (eval $ac_compile) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); } &&
15014          { ac_try='test -s conftest.$ac_objext'
15015   { (eval echo "$as_me:15015: \"$ac_try\"") >&5
15016   (eval $ac_try) 2>&5
15017   ac_status=$?
15018   echo "$as_me:15018: \$? = $ac_status" >&5
15019   (exit $ac_status); }; }; then
15020   cf_cv_gcc_inline=yes
15021 else
15022   echo "$as_me: failed program was:" >&5
15023 cat conftest.$ac_ext >&5
15024 cf_cv_gcc_inline=no
15025 fi
15026 rm -f conftest.$ac_objext conftest.$ac_ext
15027       CFLAGS=$cf_save_CFLAGS
15028
15029 fi
15030 echo "$as_me:15030: result: $cf_cv_gcc_inline" >&5
15031 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15032     if test "$cf_cv_gcc_inline" = yes ; then
15033
15034 cf_fix_cppflags=no
15035 cf_new_cflags=
15036 cf_new_cppflags=
15037 cf_new_extra_cppflags=
15038
15039 for cf_add_cflags in --param max-inline-insns-single=1200
15040 do
15041 case $cf_fix_cppflags in
15042 no)
15043         case $cf_add_cflags in #(vi
15044         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15045                 case $cf_add_cflags in
15046                 -D*)
15047                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15048
15049                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15050                                 && test -z "${cf_tst_cflags}" \
15051                                 && cf_fix_cppflags=yes
15052
15053                         if test $cf_fix_cppflags = yes ; then
15054                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15055                                 continue
15056                         elif test "${cf_tst_cflags}" = "\"'" ; then
15057                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15058                                 continue
15059                         fi
15060                         ;;
15061                 esac
15062                 case "$CPPFLAGS" in
15063                 *$cf_add_cflags) #(vi
15064                         ;;
15065                 *) #(vi
15066                         case $cf_add_cflags in #(vi
15067                         -D*)
15068                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15069
15070 CPPFLAGS=`echo "$CPPFLAGS" | \
15071         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15072                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15073
15074                                 ;;
15075                         esac
15076                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15077                         ;;
15078                 esac
15079                 ;;
15080         *)
15081                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15082                 ;;
15083         esac
15084         ;;
15085 yes)
15086         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15087
15088         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15089
15090         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15091                 && test -z "${cf_tst_cflags}" \
15092                 && cf_fix_cppflags=no
15093         ;;
15094 esac
15095 done
15096
15097 if test -n "$cf_new_cflags" ; then
15098
15099         CFLAGS="$CFLAGS $cf_new_cflags"
15100 fi
15101
15102 if test -n "$cf_new_cppflags" ; then
15103
15104         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15105 fi
15106
15107 if test -n "$cf_new_extra_cppflags" ; then
15108
15109         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15110 fi
15111
15112     fi
15113   fi
15114 fi
15115
15116 echo "$as_me:15116: checking for signal global datatype" >&5
15117 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15118 if test "${cf_cv_sig_atomic_t+set}" = set; then
15119   echo $ECHO_N "(cached) $ECHO_C" >&6
15120 else
15121
15122         for cf_type in \
15123                 "volatile sig_atomic_t" \
15124                 "sig_atomic_t" \
15125                 "int"
15126         do
15127         cat >conftest.$ac_ext <<_ACEOF
15128 #line 15128 "configure"
15129 #include "confdefs.h"
15130
15131 #include <sys/types.h>
15132 #include <signal.h>
15133 #include <stdio.h>
15134
15135 extern $cf_type x;
15136 $cf_type x;
15137 static void handler(int sig)
15138 {
15139         x = 5;
15140 }
15141 int
15142 main ()
15143 {
15144 signal(SIGINT, handler);
15145                  x = 1
15146   ;
15147   return 0;
15148 }
15149 _ACEOF
15150 rm -f conftest.$ac_objext
15151 if { (eval echo "$as_me:15151: \"$ac_compile\"") >&5
15152   (eval $ac_compile) 2>&5
15153   ac_status=$?
15154   echo "$as_me:15154: \$? = $ac_status" >&5
15155   (exit $ac_status); } &&
15156          { ac_try='test -s conftest.$ac_objext'
15157   { (eval echo "$as_me:15157: \"$ac_try\"") >&5
15158   (eval $ac_try) 2>&5
15159   ac_status=$?
15160   echo "$as_me:15160: \$? = $ac_status" >&5
15161   (exit $ac_status); }; }; then
15162   cf_cv_sig_atomic_t=$cf_type
15163 else
15164   echo "$as_me: failed program was:" >&5
15165 cat conftest.$ac_ext >&5
15166 cf_cv_sig_atomic_t=no
15167 fi
15168 rm -f conftest.$ac_objext conftest.$ac_ext
15169                 test "$cf_cv_sig_atomic_t" != no && break
15170         done
15171
15172 fi
15173
15174 echo "$as_me:15174: result: $cf_cv_sig_atomic_t" >&5
15175 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15176 test "$cf_cv_sig_atomic_t" != no &&
15177 cat >>confdefs.h <<EOF
15178 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15179 EOF
15180
15181 if test $NCURSES_CHTYPE = auto ; then
15182
15183 echo "$as_me:15183: checking for type of chtype" >&5
15184 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15185 if test "${cf_cv_typeof_chtype+set}" = set; then
15186   echo $ECHO_N "(cached) $ECHO_C" >&6
15187 else
15188
15189                 if test "$cross_compiling" = yes; then
15190   cf_cv_typeof_chtype=long
15191 else
15192   cat >conftest.$ac_ext <<_ACEOF
15193 #line 15193 "configure"
15194 #include "confdefs.h"
15195
15196 #define WANT_BITS 31
15197 #include <stdio.h>
15198 int main()
15199 {
15200         FILE *fp = fopen("cf_test.out", "w");
15201         if (fp != 0) {
15202                 char *result = "long";
15203                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15204                         int n;
15205                         unsigned int x, y;
15206                         for (n = 0; n < WANT_BITS; n++) {
15207                                 x = (1 << n);
15208                                 y = (x >> n);
15209                                 if (y != 1 || x == 0) {
15210                                         x = 0;
15211                                         break;
15212                                 }
15213                         }
15214                         /*
15215                          * If x is nonzero, an int is big enough for the bits
15216                          * that we want.
15217                          */
15218                         result = (x != 0) ? "int" : "long";
15219                 }
15220                 fputs(result, fp);
15221                 fclose(fp);
15222         }
15223         ${cf_cv_main_return:-return}(0);
15224 }
15225
15226 _ACEOF
15227 rm -f conftest$ac_exeext
15228 if { (eval echo "$as_me:15228: \"$ac_link\"") >&5
15229   (eval $ac_link) 2>&5
15230   ac_status=$?
15231   echo "$as_me:15231: \$? = $ac_status" >&5
15232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15233   { (eval echo "$as_me:15233: \"$ac_try\"") >&5
15234   (eval $ac_try) 2>&5
15235   ac_status=$?
15236   echo "$as_me:15236: \$? = $ac_status" >&5
15237   (exit $ac_status); }; }; then
15238   cf_cv_typeof_chtype=`cat cf_test.out`
15239 else
15240   echo "$as_me: program exited with status $ac_status" >&5
15241 echo "$as_me: failed program was:" >&5
15242 cat conftest.$ac_ext >&5
15243 cf_cv_typeof_chtype=long
15244 fi
15245 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15246 fi
15247                 rm -f cf_test.out
15248
15249 fi
15250
15251 echo "$as_me:15251: result: $cf_cv_typeof_chtype" >&5
15252 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15253
15254 cat >>confdefs.h <<EOF
15255 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15256 EOF
15257
15258 else
15259         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15260 fi
15261 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15262
15263 echo "$as_me:15263: checking if unsigned literals are legal" >&5
15264 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15265 if test "${cf_cv_unsigned_literals+set}" = set; then
15266   echo $ECHO_N "(cached) $ECHO_C" >&6
15267 else
15268
15269         cat >conftest.$ac_ext <<_ACEOF
15270 #line 15270 "configure"
15271 #include "confdefs.h"
15272
15273 int
15274 main ()
15275 {
15276 long x = 1L + 1UL + 1U + 1
15277   ;
15278   return 0;
15279 }
15280 _ACEOF
15281 rm -f conftest.$ac_objext
15282 if { (eval echo "$as_me:15282: \"$ac_compile\"") >&5
15283   (eval $ac_compile) 2>&5
15284   ac_status=$?
15285   echo "$as_me:15285: \$? = $ac_status" >&5
15286   (exit $ac_status); } &&
15287          { ac_try='test -s conftest.$ac_objext'
15288   { (eval echo "$as_me:15288: \"$ac_try\"") >&5
15289   (eval $ac_try) 2>&5
15290   ac_status=$?
15291   echo "$as_me:15291: \$? = $ac_status" >&5
15292   (exit $ac_status); }; }; then
15293   cf_cv_unsigned_literals=yes
15294 else
15295   echo "$as_me: failed program was:" >&5
15296 cat conftest.$ac_ext >&5
15297 cf_cv_unsigned_literals=no
15298 fi
15299 rm -f conftest.$ac_objext conftest.$ac_ext
15300
15301 fi
15302
15303 echo "$as_me:15303: result: $cf_cv_unsigned_literals" >&5
15304 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15305
15306 cf_cv_1UL="1"
15307 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15308 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15309
15310 if test $NCURSES_MMASK_T = auto ; then
15311         cf_cv_typeof_mmask_t=long
15312 else
15313         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15314 fi
15315 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15316
15317 ###     Checks for external-data
15318
15319 echo "$as_me:15319: checking if external errno is declared" >&5
15320 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15321 if test "${cf_cv_dcl_errno+set}" = set; then
15322   echo $ECHO_N "(cached) $ECHO_C" >&6
15323 else
15324
15325     cat >conftest.$ac_ext <<_ACEOF
15326 #line 15326 "configure"
15327 #include "confdefs.h"
15328
15329 #ifdef HAVE_STDLIB_H
15330 #include <stdlib.h>
15331 #endif
15332 #include <stdio.h>
15333 #include <sys/types.h>
15334 #include <errno.h>
15335 int
15336 main ()
15337 {
15338 int x = (int) errno
15339   ;
15340   return 0;
15341 }
15342 _ACEOF
15343 rm -f conftest.$ac_objext
15344 if { (eval echo "$as_me:15344: \"$ac_compile\"") >&5
15345   (eval $ac_compile) 2>&5
15346   ac_status=$?
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); } &&
15349          { ac_try='test -s conftest.$ac_objext'
15350   { (eval echo "$as_me:15350: \"$ac_try\"") >&5
15351   (eval $ac_try) 2>&5
15352   ac_status=$?
15353   echo "$as_me:15353: \$? = $ac_status" >&5
15354   (exit $ac_status); }; }; then
15355   cf_cv_dcl_errno=yes
15356 else
15357   echo "$as_me: failed program was:" >&5
15358 cat conftest.$ac_ext >&5
15359 cf_cv_dcl_errno=no
15360 fi
15361 rm -f conftest.$ac_objext conftest.$ac_ext
15362
15363 fi
15364 echo "$as_me:15364: result: $cf_cv_dcl_errno" >&5
15365 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15366
15367 if test "$cf_cv_dcl_errno" = no ; then
15368
15369 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15370
15371     cat >>confdefs.h <<EOF
15372 #define $cf_result 1
15373 EOF
15374
15375 fi
15376
15377 # It's possible (for near-UNIX clones) that the data doesn't exist
15378
15379 echo "$as_me:15379: checking if external errno exists" >&5
15380 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15381 if test "${cf_cv_have_errno+set}" = set; then
15382   echo $ECHO_N "(cached) $ECHO_C" >&6
15383 else
15384
15385     cat >conftest.$ac_ext <<_ACEOF
15386 #line 15386 "configure"
15387 #include "confdefs.h"
15388
15389 #undef errno
15390 extern int errno;
15391
15392 int
15393 main ()
15394 {
15395 errno = 2
15396   ;
15397   return 0;
15398 }
15399 _ACEOF
15400 rm -f conftest.$ac_objext conftest$ac_exeext
15401 if { (eval echo "$as_me:15401: \"$ac_link\"") >&5
15402   (eval $ac_link) 2>&5
15403   ac_status=$?
15404   echo "$as_me:15404: \$? = $ac_status" >&5
15405   (exit $ac_status); } &&
15406          { ac_try='test -s conftest$ac_exeext'
15407   { (eval echo "$as_me:15407: \"$ac_try\"") >&5
15408   (eval $ac_try) 2>&5
15409   ac_status=$?
15410   echo "$as_me:15410: \$? = $ac_status" >&5
15411   (exit $ac_status); }; }; then
15412   cf_cv_have_errno=yes
15413 else
15414   echo "$as_me: failed program was:" >&5
15415 cat conftest.$ac_ext >&5
15416 cf_cv_have_errno=no
15417 fi
15418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15419
15420 fi
15421 echo "$as_me:15421: result: $cf_cv_have_errno" >&5
15422 echo "${ECHO_T}$cf_cv_have_errno" >&6
15423
15424 if test "$cf_cv_have_errno" = yes ; then
15425
15426 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15427
15428     cat >>confdefs.h <<EOF
15429 #define $cf_result 1
15430 EOF
15431
15432 fi
15433
15434 echo "$as_me:15434: checking if data-only library module links" >&5
15435 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15436 if test "${cf_cv_link_dataonly+set}" = set; then
15437   echo $ECHO_N "(cached) $ECHO_C" >&6
15438 else
15439
15440         rm -f conftest.a
15441         cat >conftest.$ac_ext <<EOF
15442 #line 15442 "configure"
15443 int     testdata[3] = { 123, 456, 789 };
15444 EOF
15445         if { (eval echo "$as_me:15445: \"$ac_compile\"") >&5
15446   (eval $ac_compile) 2>&5
15447   ac_status=$?
15448   echo "$as_me:15448: \$? = $ac_status" >&5
15449   (exit $ac_status); } ; then
15450                 mv conftest.o data.o && \
15451                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15452         fi
15453         rm -f conftest.$ac_ext data.o
15454         cat >conftest.$ac_ext <<EOF
15455 #line 15455 "configure"
15456 int     testfunc()
15457 {
15458 #if defined(NeXT)
15459         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15460 #else
15461         extern int testdata[3];
15462         return testdata[0] == 123
15463            &&  testdata[1] == 456
15464            &&  testdata[2] == 789;
15465 #endif
15466 }
15467 EOF
15468         if { (eval echo "$as_me:15468: \"$ac_compile\"") >&5
15469   (eval $ac_compile) 2>&5
15470   ac_status=$?
15471   echo "$as_me:15471: \$? = $ac_status" >&5
15472   (exit $ac_status); }; then
15473                 mv conftest.o func.o && \
15474                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15475         fi
15476         rm -f conftest.$ac_ext func.o
15477         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15478         cf_saveLIBS="$LIBS"
15479         LIBS="conftest.a $LIBS"
15480         if test "$cross_compiling" = yes; then
15481   cf_cv_link_dataonly=unknown
15482 else
15483   cat >conftest.$ac_ext <<_ACEOF
15484 #line 15484 "configure"
15485 #include "confdefs.h"
15486
15487         int main()
15488         {
15489                 extern int testfunc();
15490                 ${cf_cv_main_return:-return} (!testfunc());
15491         }
15492
15493 _ACEOF
15494 rm -f conftest$ac_exeext
15495 if { (eval echo "$as_me:15495: \"$ac_link\"") >&5
15496   (eval $ac_link) 2>&5
15497   ac_status=$?
15498   echo "$as_me:15498: \$? = $ac_status" >&5
15499   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15500   { (eval echo "$as_me:15500: \"$ac_try\"") >&5
15501   (eval $ac_try) 2>&5
15502   ac_status=$?
15503   echo "$as_me:15503: \$? = $ac_status" >&5
15504   (exit $ac_status); }; }; then
15505   cf_cv_link_dataonly=yes
15506 else
15507   echo "$as_me: program exited with status $ac_status" >&5
15508 echo "$as_me: failed program was:" >&5
15509 cat conftest.$ac_ext >&5
15510 cf_cv_link_dataonly=no
15511 fi
15512 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15513 fi
15514         LIBS="$cf_saveLIBS"
15515
15516 fi
15517
15518 echo "$as_me:15518: result: $cf_cv_link_dataonly" >&5
15519 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15520
15521 if test "$cf_cv_link_dataonly" = no ; then
15522
15523 cat >>confdefs.h <<\EOF
15524 #define BROKEN_LINKER 1
15525 EOF
15526
15527         BROKEN_LINKER=1
15528 fi
15529
15530 ###     Checks for library functions.
15531
15532 for ac_func in \
15533 getcwd \
15534 getegid \
15535 geteuid \
15536 getttynam \
15537 issetugid \
15538 poll \
15539 putenv \
15540 remove \
15541 select \
15542 setbuf \
15543 setbuffer \
15544 setenv \
15545 setvbuf \
15546 sigaction \
15547 sigvec \
15548 strdup \
15549 strstr \
15550 tcgetpgrp \
15551 times \
15552 vsnprintf \
15553
15554 do
15555 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15556 echo "$as_me:15556: checking for $ac_func" >&5
15557 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15558 if eval "test \"\${$as_ac_var+set}\" = set"; then
15559   echo $ECHO_N "(cached) $ECHO_C" >&6
15560 else
15561   cat >conftest.$ac_ext <<_ACEOF
15562 #line 15562 "configure"
15563 #include "confdefs.h"
15564 /* System header to define __stub macros and hopefully few prototypes,
15565     which can conflict with char $ac_func (); below.  */
15566 #include <assert.h>
15567 /* Override any gcc2 internal prototype to avoid an error.  */
15568 #ifdef __cplusplus
15569 extern "C"
15570 #endif
15571 /* We use char because int might match the return type of a gcc2
15572    builtin and then its argument prototype would still apply.  */
15573 char $ac_func ();
15574 char (*f) ();
15575
15576 int
15577 main ()
15578 {
15579 /* The GNU C library defines this for functions which it implements
15580     to always fail with ENOSYS.  Some functions are actually named
15581     something starting with __ and the normal name is an alias.  */
15582 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15583 choke me
15584 #else
15585 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15586 #endif
15587
15588   ;
15589   return 0;
15590 }
15591 _ACEOF
15592 rm -f conftest.$ac_objext conftest$ac_exeext
15593 if { (eval echo "$as_me:15593: \"$ac_link\"") >&5
15594   (eval $ac_link) 2>&5
15595   ac_status=$?
15596   echo "$as_me:15596: \$? = $ac_status" >&5
15597   (exit $ac_status); } &&
15598          { ac_try='test -s conftest$ac_exeext'
15599   { (eval echo "$as_me:15599: \"$ac_try\"") >&5
15600   (eval $ac_try) 2>&5
15601   ac_status=$?
15602   echo "$as_me:15602: \$? = $ac_status" >&5
15603   (exit $ac_status); }; }; then
15604   eval "$as_ac_var=yes"
15605 else
15606   echo "$as_me: failed program was:" >&5
15607 cat conftest.$ac_ext >&5
15608 eval "$as_ac_var=no"
15609 fi
15610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15611 fi
15612 echo "$as_me:15612: result: `eval echo '${'$as_ac_var'}'`" >&5
15613 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15614 if test `eval echo '${'$as_ac_var'}'` = yes; then
15615   cat >>confdefs.h <<EOF
15616 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15617 EOF
15618
15619 fi
15620 done
15621
15622 if test "x$with_getcap" = "xyes" ; then
15623
15624 echo "$as_me:15624: checking for terminal-capability database functions" >&5
15625 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15626 if test "${cf_cv_cgetent+set}" = set; then
15627   echo $ECHO_N "(cached) $ECHO_C" >&6
15628 else
15629
15630 cat >conftest.$ac_ext <<_ACEOF
15631 #line 15631 "configure"
15632 #include "confdefs.h"
15633
15634 #include <stdlib.h>
15635 int
15636 main ()
15637 {
15638
15639         char temp[128];
15640         char *buf = temp;
15641         char *db_array = temp;
15642         cgetent(&buf, &db_array, "vt100");
15643         cgetcap(buf, "tc", '=');
15644         cgetmatch(buf, "tc");
15645
15646   ;
15647   return 0;
15648 }
15649 _ACEOF
15650 rm -f conftest.$ac_objext conftest$ac_exeext
15651 if { (eval echo "$as_me:15651: \"$ac_link\"") >&5
15652   (eval $ac_link) 2>&5
15653   ac_status=$?
15654   echo "$as_me:15654: \$? = $ac_status" >&5
15655   (exit $ac_status); } &&
15656          { ac_try='test -s conftest$ac_exeext'
15657   { (eval echo "$as_me:15657: \"$ac_try\"") >&5
15658   (eval $ac_try) 2>&5
15659   ac_status=$?
15660   echo "$as_me:15660: \$? = $ac_status" >&5
15661   (exit $ac_status); }; }; then
15662   cf_cv_cgetent=yes
15663 else
15664   echo "$as_me: failed program was:" >&5
15665 cat conftest.$ac_ext >&5
15666 cf_cv_cgetent=no
15667 fi
15668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15669
15670 fi
15671 echo "$as_me:15671: result: $cf_cv_cgetent" >&5
15672 echo "${ECHO_T}$cf_cv_cgetent" >&6
15673
15674 if test "$cf_cv_cgetent" = yes
15675 then
15676
15677 cat >>confdefs.h <<\EOF
15678 #define HAVE_BSD_CGETENT 1
15679 EOF
15680
15681 echo "$as_me:15681: checking if cgetent uses const parameter" >&5
15682 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15683 if test "${cf_cv_cgetent_const+set}" = set; then
15684   echo $ECHO_N "(cached) $ECHO_C" >&6
15685 else
15686
15687 cat >conftest.$ac_ext <<_ACEOF
15688 #line 15688 "configure"
15689 #include "confdefs.h"
15690
15691 #include <stdlib.h>
15692 int
15693 main ()
15694 {
15695
15696         char temp[128];
15697         char *buf = temp;
15698 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15699         const char *db_array = temp;
15700         cgetent(&buf, &db_array, "vt100");
15701 #endif
15702         cgetcap(buf, "tc", '=');
15703         cgetmatch(buf, "tc");
15704
15705   ;
15706   return 0;
15707 }
15708 _ACEOF
15709 rm -f conftest.$ac_objext conftest$ac_exeext
15710 if { (eval echo "$as_me:15710: \"$ac_link\"") >&5
15711   (eval $ac_link) 2>&5
15712   ac_status=$?
15713   echo "$as_me:15713: \$? = $ac_status" >&5
15714   (exit $ac_status); } &&
15715          { ac_try='test -s conftest$ac_exeext'
15716   { (eval echo "$as_me:15716: \"$ac_try\"") >&5
15717   (eval $ac_try) 2>&5
15718   ac_status=$?
15719   echo "$as_me:15719: \$? = $ac_status" >&5
15720   (exit $ac_status); }; }; then
15721   cf_cv_cgetent_const=yes
15722 else
15723   echo "$as_me: failed program was:" >&5
15724 cat conftest.$ac_ext >&5
15725 cf_cv_cgetent_const=no
15726 fi
15727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15728
15729 fi
15730 echo "$as_me:15730: result: $cf_cv_cgetent_const" >&5
15731 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15732         if test "$cf_cv_cgetent_const" = yes
15733         then
15734
15735 cat >>confdefs.h <<EOF
15736 #define CGETENT_CONST const
15737 EOF
15738
15739         fi
15740 fi
15741
15742 fi
15743
15744 echo "$as_me:15744: checking for isascii" >&5
15745 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15746 if test "${cf_cv_have_isascii+set}" = set; then
15747   echo $ECHO_N "(cached) $ECHO_C" >&6
15748 else
15749
15750         cat >conftest.$ac_ext <<_ACEOF
15751 #line 15751 "configure"
15752 #include "confdefs.h"
15753 #include <ctype.h>
15754 int
15755 main ()
15756 {
15757 int x = isascii(' ')
15758   ;
15759   return 0;
15760 }
15761 _ACEOF
15762 rm -f conftest.$ac_objext conftest$ac_exeext
15763 if { (eval echo "$as_me:15763: \"$ac_link\"") >&5
15764   (eval $ac_link) 2>&5
15765   ac_status=$?
15766   echo "$as_me:15766: \$? = $ac_status" >&5
15767   (exit $ac_status); } &&
15768          { ac_try='test -s conftest$ac_exeext'
15769   { (eval echo "$as_me:15769: \"$ac_try\"") >&5
15770   (eval $ac_try) 2>&5
15771   ac_status=$?
15772   echo "$as_me:15772: \$? = $ac_status" >&5
15773   (exit $ac_status); }; }; then
15774   cf_cv_have_isascii=yes
15775 else
15776   echo "$as_me: failed program was:" >&5
15777 cat conftest.$ac_ext >&5
15778 cf_cv_have_isascii=no
15779 fi
15780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15781
15782 fi
15783 echo "$as_me:15783: result: $cf_cv_have_isascii" >&5
15784 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15785 test "$cf_cv_have_isascii" = yes &&
15786 cat >>confdefs.h <<\EOF
15787 #define HAVE_ISASCII 1
15788 EOF
15789
15790 if test "$ac_cv_func_sigaction" = yes; then
15791 echo "$as_me:15791: checking whether sigaction needs _POSIX_SOURCE" >&5
15792 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15793 cat >conftest.$ac_ext <<_ACEOF
15794 #line 15794 "configure"
15795 #include "confdefs.h"
15796
15797 #include <sys/types.h>
15798 #include <signal.h>
15799 int
15800 main ()
15801 {
15802 struct sigaction act
15803   ;
15804   return 0;
15805 }
15806 _ACEOF
15807 rm -f conftest.$ac_objext
15808 if { (eval echo "$as_me:15808: \"$ac_compile\"") >&5
15809   (eval $ac_compile) 2>&5
15810   ac_status=$?
15811   echo "$as_me:15811: \$? = $ac_status" >&5
15812   (exit $ac_status); } &&
15813          { ac_try='test -s conftest.$ac_objext'
15814   { (eval echo "$as_me:15814: \"$ac_try\"") >&5
15815   (eval $ac_try) 2>&5
15816   ac_status=$?
15817   echo "$as_me:15817: \$? = $ac_status" >&5
15818   (exit $ac_status); }; }; then
15819   sigact_bad=no
15820 else
15821   echo "$as_me: failed program was:" >&5
15822 cat conftest.$ac_ext >&5
15823
15824 cat >conftest.$ac_ext <<_ACEOF
15825 #line 15825 "configure"
15826 #include "confdefs.h"
15827
15828 #define _POSIX_SOURCE
15829 #include <sys/types.h>
15830 #include <signal.h>
15831 int
15832 main ()
15833 {
15834 struct sigaction act
15835   ;
15836   return 0;
15837 }
15838 _ACEOF
15839 rm -f conftest.$ac_objext
15840 if { (eval echo "$as_me:15840: \"$ac_compile\"") >&5
15841   (eval $ac_compile) 2>&5
15842   ac_status=$?
15843   echo "$as_me:15843: \$? = $ac_status" >&5
15844   (exit $ac_status); } &&
15845          { ac_try='test -s conftest.$ac_objext'
15846   { (eval echo "$as_me:15846: \"$ac_try\"") >&5
15847   (eval $ac_try) 2>&5
15848   ac_status=$?
15849   echo "$as_me:15849: \$? = $ac_status" >&5
15850   (exit $ac_status); }; }; then
15851   sigact_bad=yes
15852
15853 cat >>confdefs.h <<\EOF
15854 #define _POSIX_SOURCE 1
15855 EOF
15856
15857 else
15858   echo "$as_me: failed program was:" >&5
15859 cat conftest.$ac_ext >&5
15860 sigact_bad=unknown
15861 fi
15862 rm -f conftest.$ac_objext conftest.$ac_ext
15863 fi
15864 rm -f conftest.$ac_objext conftest.$ac_ext
15865 echo "$as_me:15865: result: $sigact_bad" >&5
15866 echo "${ECHO_T}$sigact_bad" >&6
15867 fi
15868
15869 echo "$as_me:15869: checking if nanosleep really works" >&5
15870 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15871 if test "${cf_cv_func_nanosleep+set}" = set; then
15872   echo $ECHO_N "(cached) $ECHO_C" >&6
15873 else
15874
15875 if test "$cross_compiling" = yes; then
15876   cf_cv_func_nanosleep=unknown
15877 else
15878   cat >conftest.$ac_ext <<_ACEOF
15879 #line 15879 "configure"
15880 #include "confdefs.h"
15881
15882 #include <stdio.h>
15883 #include <errno.h>
15884 #include <time.h>
15885
15886 #ifdef HAVE_SYS_TIME_H
15887 #include <sys/time.h>
15888 #endif
15889
15890 int main() {
15891         struct timespec ts1, ts2;
15892         int code;
15893         ts1.tv_sec  = 0;
15894         ts1.tv_nsec = 750000000;
15895         ts2.tv_sec  = 0;
15896         ts2.tv_nsec = 0;
15897         errno = 0;
15898         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15899         ${cf_cv_main_return:-return}(code != 0);
15900 }
15901
15902 _ACEOF
15903 rm -f conftest$ac_exeext
15904 if { (eval echo "$as_me:15904: \"$ac_link\"") >&5
15905   (eval $ac_link) 2>&5
15906   ac_status=$?
15907   echo "$as_me:15907: \$? = $ac_status" >&5
15908   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15909   { (eval echo "$as_me:15909: \"$ac_try\"") >&5
15910   (eval $ac_try) 2>&5
15911   ac_status=$?
15912   echo "$as_me:15912: \$? = $ac_status" >&5
15913   (exit $ac_status); }; }; then
15914   cf_cv_func_nanosleep=yes
15915 else
15916   echo "$as_me: program exited with status $ac_status" >&5
15917 echo "$as_me: failed program was:" >&5
15918 cat conftest.$ac_ext >&5
15919 cf_cv_func_nanosleep=no
15920 fi
15921 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15922 fi
15923 fi
15924 echo "$as_me:15924: result: $cf_cv_func_nanosleep" >&5
15925 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15926
15927 test "$cf_cv_func_nanosleep" = "yes" &&
15928 cat >>confdefs.h <<\EOF
15929 #define HAVE_NANOSLEEP 1
15930 EOF
15931
15932 for ac_header in \
15933 termio.h \
15934 termios.h \
15935 unistd.h \
15936
15937 do
15938 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15939 echo "$as_me:15939: checking for $ac_header" >&5
15940 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15941 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15942   echo $ECHO_N "(cached) $ECHO_C" >&6
15943 else
15944   cat >conftest.$ac_ext <<_ACEOF
15945 #line 15945 "configure"
15946 #include "confdefs.h"
15947 #include <$ac_header>
15948 _ACEOF
15949 if { (eval echo "$as_me:15949: \"$ac_cpp conftest.$ac_ext\"") >&5
15950   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15951   ac_status=$?
15952   egrep -v '^ *\+' conftest.er1 >conftest.err
15953   rm -f conftest.er1
15954   cat conftest.err >&5
15955   echo "$as_me:15955: \$? = $ac_status" >&5
15956   (exit $ac_status); } >/dev/null; then
15957   if test -s conftest.err; then
15958     ac_cpp_err=$ac_c_preproc_warn_flag
15959   else
15960     ac_cpp_err=
15961   fi
15962 else
15963   ac_cpp_err=yes
15964 fi
15965 if test -z "$ac_cpp_err"; then
15966   eval "$as_ac_Header=yes"
15967 else
15968   echo "$as_me: failed program was:" >&5
15969   cat conftest.$ac_ext >&5
15970   eval "$as_ac_Header=no"
15971 fi
15972 rm -f conftest.err conftest.$ac_ext
15973 fi
15974 echo "$as_me:15974: result: `eval echo '${'$as_ac_Header'}'`" >&5
15975 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15976 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15977   cat >>confdefs.h <<EOF
15978 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15979 EOF
15980
15981 fi
15982 done
15983
15984 if test "$ISC" = yes ; then
15985
15986 for ac_header in sys/termio.h
15987 do
15988 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15989 echo "$as_me:15989: checking for $ac_header" >&5
15990 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15991 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15992   echo $ECHO_N "(cached) $ECHO_C" >&6
15993 else
15994   cat >conftest.$ac_ext <<_ACEOF
15995 #line 15995 "configure"
15996 #include "confdefs.h"
15997 #include <$ac_header>
15998 _ACEOF
15999 if { (eval echo "$as_me:15999: \"$ac_cpp conftest.$ac_ext\"") >&5
16000   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16001   ac_status=$?
16002   egrep -v '^ *\+' conftest.er1 >conftest.err
16003   rm -f conftest.er1
16004   cat conftest.err >&5
16005   echo "$as_me:16005: \$? = $ac_status" >&5
16006   (exit $ac_status); } >/dev/null; then
16007   if test -s conftest.err; then
16008     ac_cpp_err=$ac_c_preproc_warn_flag
16009   else
16010     ac_cpp_err=
16011   fi
16012 else
16013   ac_cpp_err=yes
16014 fi
16015 if test -z "$ac_cpp_err"; then
16016   eval "$as_ac_Header=yes"
16017 else
16018   echo "$as_me: failed program was:" >&5
16019   cat conftest.$ac_ext >&5
16020   eval "$as_ac_Header=no"
16021 fi
16022 rm -f conftest.err conftest.$ac_ext
16023 fi
16024 echo "$as_me:16024: result: `eval echo '${'$as_ac_Header'}'`" >&5
16025 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16027   cat >>confdefs.h <<EOF
16028 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16029 EOF
16030
16031 fi
16032 done
16033
16034 fi
16035 if test "$ac_cv_header_termios_h" = yes ; then
16036         case "$CFLAGS $CPPFLAGS" in
16037         *-D_POSIX_SOURCE*)
16038                 termios_bad=dunno ;;
16039         *)      termios_bad=maybe ;;
16040         esac
16041         if test "$termios_bad" = maybe ; then
16042         echo "$as_me:16042: checking whether termios.h needs _POSIX_SOURCE" >&5
16043 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16044         cat >conftest.$ac_ext <<_ACEOF
16045 #line 16045 "configure"
16046 #include "confdefs.h"
16047 #include <termios.h>
16048 int
16049 main ()
16050 {
16051 struct termios foo; int x = foo.c_iflag
16052   ;
16053   return 0;
16054 }
16055 _ACEOF
16056 rm -f conftest.$ac_objext
16057 if { (eval echo "$as_me:16057: \"$ac_compile\"") >&5
16058   (eval $ac_compile) 2>&5
16059   ac_status=$?
16060   echo "$as_me:16060: \$? = $ac_status" >&5
16061   (exit $ac_status); } &&
16062          { ac_try='test -s conftest.$ac_objext'
16063   { (eval echo "$as_me:16063: \"$ac_try\"") >&5
16064   (eval $ac_try) 2>&5
16065   ac_status=$?
16066   echo "$as_me:16066: \$? = $ac_status" >&5
16067   (exit $ac_status); }; }; then
16068   termios_bad=no
16069 else
16070   echo "$as_me: failed program was:" >&5
16071 cat conftest.$ac_ext >&5
16072
16073                 cat >conftest.$ac_ext <<_ACEOF
16074 #line 16074 "configure"
16075 #include "confdefs.h"
16076
16077 #define _POSIX_SOURCE
16078 #include <termios.h>
16079 int
16080 main ()
16081 {
16082 struct termios foo; int x = foo.c_iflag
16083   ;
16084   return 0;
16085 }
16086 _ACEOF
16087 rm -f conftest.$ac_objext
16088 if { (eval echo "$as_me:16088: \"$ac_compile\"") >&5
16089   (eval $ac_compile) 2>&5
16090   ac_status=$?
16091   echo "$as_me:16091: \$? = $ac_status" >&5
16092   (exit $ac_status); } &&
16093          { ac_try='test -s conftest.$ac_objext'
16094   { (eval echo "$as_me:16094: \"$ac_try\"") >&5
16095   (eval $ac_try) 2>&5
16096   ac_status=$?
16097   echo "$as_me:16097: \$? = $ac_status" >&5
16098   (exit $ac_status); }; }; then
16099   termios_bad=unknown
16100 else
16101   echo "$as_me: failed program was:" >&5
16102 cat conftest.$ac_ext >&5
16103 termios_bad=yes
16104 cat >>confdefs.h <<\EOF
16105 #define _POSIX_SOURCE 1
16106 EOF
16107
16108 fi
16109 rm -f conftest.$ac_objext conftest.$ac_ext
16110
16111 fi
16112 rm -f conftest.$ac_objext conftest.$ac_ext
16113         echo "$as_me:16113: result: $termios_bad" >&5
16114 echo "${ECHO_T}$termios_bad" >&6
16115         fi
16116 fi
16117
16118 echo "$as_me:16118: checking for tcgetattr" >&5
16119 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16120 if test "${cf_cv_have_tcgetattr+set}" = set; then
16121   echo $ECHO_N "(cached) $ECHO_C" >&6
16122 else
16123
16124 cat >conftest.$ac_ext <<_ACEOF
16125 #line 16125 "configure"
16126 #include "confdefs.h"
16127
16128 #include <sys/types.h>
16129 #ifdef HAVE_UNISTD_H
16130 #include <unistd.h>
16131 #endif
16132 #ifdef HAVE_TERMIOS_H
16133 #include <termios.h>
16134 #define TTY struct termios
16135 #else
16136 #ifdef HAVE_TERMIO_H
16137 #include <termio.h>
16138 #define TTY struct termio
16139 #endif
16140 #endif
16141
16142 int
16143 main ()
16144 {
16145
16146 TTY foo;
16147 tcgetattr(1, &foo);
16148   ;
16149   return 0;
16150 }
16151 _ACEOF
16152 rm -f conftest.$ac_objext conftest$ac_exeext
16153 if { (eval echo "$as_me:16153: \"$ac_link\"") >&5
16154   (eval $ac_link) 2>&5
16155   ac_status=$?
16156   echo "$as_me:16156: \$? = $ac_status" >&5
16157   (exit $ac_status); } &&
16158          { ac_try='test -s conftest$ac_exeext'
16159   { (eval echo "$as_me:16159: \"$ac_try\"") >&5
16160   (eval $ac_try) 2>&5
16161   ac_status=$?
16162   echo "$as_me:16162: \$? = $ac_status" >&5
16163   (exit $ac_status); }; }; then
16164   cf_cv_have_tcgetattr=yes
16165 else
16166   echo "$as_me: failed program was:" >&5
16167 cat conftest.$ac_ext >&5
16168 cf_cv_have_tcgetattr=no
16169 fi
16170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16171 fi
16172 echo "$as_me:16172: result: $cf_cv_have_tcgetattr" >&5
16173 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16174 test "$cf_cv_have_tcgetattr" = yes &&
16175 cat >>confdefs.h <<\EOF
16176 #define HAVE_TCGETATTR 1
16177 EOF
16178
16179 echo "$as_me:16179: checking for vsscanf function or workaround" >&5
16180 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16181 if test "${cf_cv_func_vsscanf+set}" = set; then
16182   echo $ECHO_N "(cached) $ECHO_C" >&6
16183 else
16184
16185 cat >conftest.$ac_ext <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16188
16189 #include <stdarg.h>
16190 #include <stdio.h>
16191 int
16192 main ()
16193 {
16194
16195         va_list ap;
16196         vsscanf("from", "%d", ap)
16197   ;
16198   return 0;
16199 }
16200 _ACEOF
16201 rm -f conftest.$ac_objext conftest$ac_exeext
16202 if { (eval echo "$as_me:16202: \"$ac_link\"") >&5
16203   (eval $ac_link) 2>&5
16204   ac_status=$?
16205   echo "$as_me:16205: \$? = $ac_status" >&5
16206   (exit $ac_status); } &&
16207          { ac_try='test -s conftest$ac_exeext'
16208   { (eval echo "$as_me:16208: \"$ac_try\"") >&5
16209   (eval $ac_try) 2>&5
16210   ac_status=$?
16211   echo "$as_me:16211: \$? = $ac_status" >&5
16212   (exit $ac_status); }; }; then
16213   cf_cv_func_vsscanf=vsscanf
16214 else
16215   echo "$as_me: failed program was:" >&5
16216 cat conftest.$ac_ext >&5
16217
16218 cat >conftest.$ac_ext <<_ACEOF
16219 #line 16219 "configure"
16220 #include "confdefs.h"
16221
16222 #include <stdarg.h>
16223 #include <stdio.h>
16224 int
16225 main ()
16226 {
16227
16228     FILE strbuf;
16229     char *str = "from";
16230
16231     strbuf._flag = _IOREAD;
16232     strbuf._ptr = strbuf._base = (unsigned char *) str;
16233     strbuf._cnt = strlen(str);
16234     strbuf._file = _NFILE;
16235     return (vfscanf(&strbuf, "%d", ap))
16236   ;
16237   return 0;
16238 }
16239 _ACEOF
16240 rm -f conftest.$ac_objext conftest$ac_exeext
16241 if { (eval echo "$as_me:16241: \"$ac_link\"") >&5
16242   (eval $ac_link) 2>&5
16243   ac_status=$?
16244   echo "$as_me:16244: \$? = $ac_status" >&5
16245   (exit $ac_status); } &&
16246          { ac_try='test -s conftest$ac_exeext'
16247   { (eval echo "$as_me:16247: \"$ac_try\"") >&5
16248   (eval $ac_try) 2>&5
16249   ac_status=$?
16250   echo "$as_me:16250: \$? = $ac_status" >&5
16251   (exit $ac_status); }; }; then
16252   cf_cv_func_vsscanf=vfscanf
16253 else
16254   echo "$as_me: failed program was:" >&5
16255 cat conftest.$ac_ext >&5
16256
16257 cat >conftest.$ac_ext <<_ACEOF
16258 #line 16258 "configure"
16259 #include "confdefs.h"
16260
16261 #include <stdarg.h>
16262 #include <stdio.h>
16263 int
16264 main ()
16265 {
16266
16267     FILE strbuf;
16268     char *str = "from";
16269
16270     strbuf._flag = _IOREAD;
16271     strbuf._ptr = strbuf._base = (unsigned char *) str;
16272     strbuf._cnt = strlen(str);
16273     strbuf._file = _NFILE;
16274     return (_doscan(&strbuf, "%d", ap))
16275   ;
16276   return 0;
16277 }
16278 _ACEOF
16279 rm -f conftest.$ac_objext conftest$ac_exeext
16280 if { (eval echo "$as_me:16280: \"$ac_link\"") >&5
16281   (eval $ac_link) 2>&5
16282   ac_status=$?
16283   echo "$as_me:16283: \$? = $ac_status" >&5
16284   (exit $ac_status); } &&
16285          { ac_try='test -s conftest$ac_exeext'
16286   { (eval echo "$as_me:16286: \"$ac_try\"") >&5
16287   (eval $ac_try) 2>&5
16288   ac_status=$?
16289   echo "$as_me:16289: \$? = $ac_status" >&5
16290   (exit $ac_status); }; }; then
16291   cf_cv_func_vsscanf=_doscan
16292 else
16293   echo "$as_me: failed program was:" >&5
16294 cat conftest.$ac_ext >&5
16295
16296 cf_cv_func_vsscanf=no
16297 fi
16298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16299 fi
16300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16301 fi
16302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16303 fi
16304 echo "$as_me:16304: result: $cf_cv_func_vsscanf" >&5
16305 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16306
16307 case $cf_cv_func_vsscanf in #(vi
16308 vsscanf)
16309 cat >>confdefs.h <<\EOF
16310 #define HAVE_VSSCANF 1
16311 EOF
16312 ;; #(vi
16313 vfscanf)
16314 cat >>confdefs.h <<\EOF
16315 #define HAVE_VFSCANF 1
16316 EOF
16317 ;; #(vi
16318 _doscan)
16319 cat >>confdefs.h <<\EOF
16320 #define HAVE__DOSCAN 1
16321 EOF
16322 ;;
16323 esac
16324
16325 echo "$as_me:16325: checking for working mkstemp" >&5
16326 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16327 if test "${cf_cv_func_mkstemp+set}" = set; then
16328   echo $ECHO_N "(cached) $ECHO_C" >&6
16329 else
16330
16331 rm -rf conftest*
16332 if test "$cross_compiling" = yes; then
16333   cf_cv_func_mkstemp=maybe
16334 else
16335   cat >conftest.$ac_ext <<_ACEOF
16336 #line 16336 "configure"
16337 #include "confdefs.h"
16338
16339 #include <sys/types.h>
16340 #include <stdlib.h>
16341 #include <stdio.h>
16342 #include <string.h>
16343 #include <sys/stat.h>
16344 int main()
16345 {
16346         char *tmpl = "conftestXXXXXX";
16347         char name[2][80];
16348         int n;
16349         int result = 0;
16350         int fd;
16351         struct stat sb;
16352
16353         umask(077);
16354         for (n = 0; n < 2; ++n) {
16355                 strcpy(name[n], tmpl);
16356                 if ((fd = mkstemp(name[n])) >= 0) {
16357                         if (!strcmp(name[n], tmpl)
16358                          || stat(name[n], &sb) != 0
16359                          || (sb.st_mode & S_IFMT) != S_IFREG
16360                          || (sb.st_mode & 077) != 0) {
16361                                 result = 1;
16362                         }
16363                         close(fd);
16364                 }
16365         }
16366         if (result == 0
16367          && !strcmp(name[0], name[1]))
16368                 result = 1;
16369         ${cf_cv_main_return:-return}(result);
16370 }
16371
16372 _ACEOF
16373 rm -f conftest$ac_exeext
16374 if { (eval echo "$as_me:16374: \"$ac_link\"") >&5
16375   (eval $ac_link) 2>&5
16376   ac_status=$?
16377   echo "$as_me:16377: \$? = $ac_status" >&5
16378   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16379   { (eval echo "$as_me:16379: \"$ac_try\"") >&5
16380   (eval $ac_try) 2>&5
16381   ac_status=$?
16382   echo "$as_me:16382: \$? = $ac_status" >&5
16383   (exit $ac_status); }; }; then
16384   cf_cv_func_mkstemp=yes
16385
16386 else
16387   echo "$as_me: program exited with status $ac_status" >&5
16388 echo "$as_me: failed program was:" >&5
16389 cat conftest.$ac_ext >&5
16390 cf_cv_func_mkstemp=no
16391
16392 fi
16393 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16394 fi
16395
16396 fi
16397 echo "$as_me:16397: result: $cf_cv_func_mkstemp" >&5
16398 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16399 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16400         echo "$as_me:16400: checking for mkstemp" >&5
16401 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16402 if test "${ac_cv_func_mkstemp+set}" = set; then
16403   echo $ECHO_N "(cached) $ECHO_C" >&6
16404 else
16405   cat >conftest.$ac_ext <<_ACEOF
16406 #line 16406 "configure"
16407 #include "confdefs.h"
16408 /* System header to define __stub macros and hopefully few prototypes,
16409     which can conflict with char mkstemp (); below.  */
16410 #include <assert.h>
16411 /* Override any gcc2 internal prototype to avoid an error.  */
16412 #ifdef __cplusplus
16413 extern "C"
16414 #endif
16415 /* We use char because int might match the return type of a gcc2
16416    builtin and then its argument prototype would still apply.  */
16417 char mkstemp ();
16418 char (*f) ();
16419
16420 int
16421 main ()
16422 {
16423 /* The GNU C library defines this for functions which it implements
16424     to always fail with ENOSYS.  Some functions are actually named
16425     something starting with __ and the normal name is an alias.  */
16426 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16427 choke me
16428 #else
16429 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16430 #endif
16431
16432   ;
16433   return 0;
16434 }
16435 _ACEOF
16436 rm -f conftest.$ac_objext conftest$ac_exeext
16437 if { (eval echo "$as_me:16437: \"$ac_link\"") >&5
16438   (eval $ac_link) 2>&5
16439   ac_status=$?
16440   echo "$as_me:16440: \$? = $ac_status" >&5
16441   (exit $ac_status); } &&
16442          { ac_try='test -s conftest$ac_exeext'
16443   { (eval echo "$as_me:16443: \"$ac_try\"") >&5
16444   (eval $ac_try) 2>&5
16445   ac_status=$?
16446   echo "$as_me:16446: \$? = $ac_status" >&5
16447   (exit $ac_status); }; }; then
16448   ac_cv_func_mkstemp=yes
16449 else
16450   echo "$as_me: failed program was:" >&5
16451 cat conftest.$ac_ext >&5
16452 ac_cv_func_mkstemp=no
16453 fi
16454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16455 fi
16456 echo "$as_me:16456: result: $ac_cv_func_mkstemp" >&5
16457 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16458
16459 fi
16460 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16461
16462 cat >>confdefs.h <<\EOF
16463 #define HAVE_MKSTEMP 1
16464 EOF
16465
16466 fi
16467
16468 # setup for prototype of fallback for vsscanf()
16469
16470 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16471         HAVE_VSSCANF=1
16472 else
16473         HAVE_VSSCANF=0
16474 fi
16475
16476 if test "x$cross_compiling" = xyes ; then
16477         { echo "$as_me:16477: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16478 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16479 else
16480         echo "$as_me:16480: checking whether setvbuf arguments are reversed" >&5
16481 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16482 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16483   echo $ECHO_N "(cached) $ECHO_C" >&6
16484 else
16485   if test "$cross_compiling" = yes; then
16486   { { echo "$as_me:16486: error: cannot run test program while cross compiling" >&5
16487 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16488    { (exit 1); exit 1; }; }
16489 else
16490   cat >conftest.$ac_ext <<_ACEOF
16491 #line 16491 "configure"
16492 #include "confdefs.h"
16493 #include <stdio.h>
16494 /* If setvbuf has the reversed format, exit 0. */
16495 int
16496 main ()
16497 {
16498   /* This call has the arguments reversed.
16499      A reversed system may check and see that the address of main
16500      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16501   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16502     $ac_main_return(1);
16503   putc('\r', stdout);
16504   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16505 }
16506 _ACEOF
16507 rm -f conftest$ac_exeext
16508 if { (eval echo "$as_me:16508: \"$ac_link\"") >&5
16509   (eval $ac_link) 2>&5
16510   ac_status=$?
16511   echo "$as_me:16511: \$? = $ac_status" >&5
16512   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16513   { (eval echo "$as_me:16513: \"$ac_try\"") >&5
16514   (eval $ac_try) 2>&5
16515   ac_status=$?
16516   echo "$as_me:16516: \$? = $ac_status" >&5
16517   (exit $ac_status); }; }; then
16518   ac_cv_func_setvbuf_reversed=yes
16519 else
16520   echo "$as_me: program exited with status $ac_status" >&5
16521 echo "$as_me: failed program was:" >&5
16522 cat conftest.$ac_ext >&5
16523 ac_cv_func_setvbuf_reversed=no
16524 fi
16525 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16526 fi
16527 rm -f core core.* *.core
16528 fi
16529 echo "$as_me:16529: result: $ac_cv_func_setvbuf_reversed" >&5
16530 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16531 if test $ac_cv_func_setvbuf_reversed = yes; then
16532
16533 cat >>confdefs.h <<\EOF
16534 #define SETVBUF_REVERSED 1
16535 EOF
16536
16537 fi
16538
16539 fi
16540 echo "$as_me:16540: checking for intptr_t" >&5
16541 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16542 if test "${ac_cv_type_intptr_t+set}" = set; then
16543   echo $ECHO_N "(cached) $ECHO_C" >&6
16544 else
16545   cat >conftest.$ac_ext <<_ACEOF
16546 #line 16546 "configure"
16547 #include "confdefs.h"
16548 $ac_includes_default
16549 int
16550 main ()
16551 {
16552 if ((intptr_t *) 0)
16553   return 0;
16554 if (sizeof (intptr_t))
16555   return 0;
16556   ;
16557   return 0;
16558 }
16559 _ACEOF
16560 rm -f conftest.$ac_objext
16561 if { (eval echo "$as_me:16561: \"$ac_compile\"") >&5
16562   (eval $ac_compile) 2>&5
16563   ac_status=$?
16564   echo "$as_me:16564: \$? = $ac_status" >&5
16565   (exit $ac_status); } &&
16566          { ac_try='test -s conftest.$ac_objext'
16567   { (eval echo "$as_me:16567: \"$ac_try\"") >&5
16568   (eval $ac_try) 2>&5
16569   ac_status=$?
16570   echo "$as_me:16570: \$? = $ac_status" >&5
16571   (exit $ac_status); }; }; then
16572   ac_cv_type_intptr_t=yes
16573 else
16574   echo "$as_me: failed program was:" >&5
16575 cat conftest.$ac_ext >&5
16576 ac_cv_type_intptr_t=no
16577 fi
16578 rm -f conftest.$ac_objext conftest.$ac_ext
16579 fi
16580 echo "$as_me:16580: result: $ac_cv_type_intptr_t" >&5
16581 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16582 if test $ac_cv_type_intptr_t = yes; then
16583   :
16584 else
16585
16586 cat >>confdefs.h <<EOF
16587 #define intptr_t long
16588 EOF
16589
16590 fi
16591
16592 echo "$as_me:16592: checking for type sigaction_t" >&5
16593 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16594 if test "${cf_cv_type_sigaction+set}" = set; then
16595   echo $ECHO_N "(cached) $ECHO_C" >&6
16596 else
16597
16598         cat >conftest.$ac_ext <<_ACEOF
16599 #line 16599 "configure"
16600 #include "confdefs.h"
16601
16602 #include <signal.h>
16603 int
16604 main ()
16605 {
16606 sigaction_t x
16607   ;
16608   return 0;
16609 }
16610 _ACEOF
16611 rm -f conftest.$ac_objext
16612 if { (eval echo "$as_me:16612: \"$ac_compile\"") >&5
16613   (eval $ac_compile) 2>&5
16614   ac_status=$?
16615   echo "$as_me:16615: \$? = $ac_status" >&5
16616   (exit $ac_status); } &&
16617          { ac_try='test -s conftest.$ac_objext'
16618   { (eval echo "$as_me:16618: \"$ac_try\"") >&5
16619   (eval $ac_try) 2>&5
16620   ac_status=$?
16621   echo "$as_me:16621: \$? = $ac_status" >&5
16622   (exit $ac_status); }; }; then
16623   cf_cv_type_sigaction=yes
16624 else
16625   echo "$as_me: failed program was:" >&5
16626 cat conftest.$ac_ext >&5
16627 cf_cv_type_sigaction=no
16628 fi
16629 rm -f conftest.$ac_objext conftest.$ac_ext
16630 fi
16631
16632 echo "$as_me:16632: result: $cf_cv_type_sigaction" >&5
16633 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16634 test "$cf_cv_type_sigaction" = yes &&
16635 cat >>confdefs.h <<\EOF
16636 #define HAVE_TYPE_SIGACTION 1
16637 EOF
16638
16639 echo "$as_me:16639: checking declaration of size-change" >&5
16640 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16641 if test "${cf_cv_sizechange+set}" = set; then
16642   echo $ECHO_N "(cached) $ECHO_C" >&6
16643 else
16644
16645     cf_cv_sizechange=unknown
16646     cf_save_CPPFLAGS="$CPPFLAGS"
16647
16648 for cf_opts in "" "NEED_PTEM_H"
16649 do
16650
16651     CPPFLAGS="$cf_save_CPPFLAGS"
16652     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16653     cat >conftest.$ac_ext <<_ACEOF
16654 #line 16654 "configure"
16655 #include "confdefs.h"
16656 #include <sys/types.h>
16657 #ifdef HAVE_TERMIOS_H
16658 #include <termios.h>
16659 #else
16660 #ifdef HAVE_TERMIO_H
16661 #include <termio.h>
16662 #endif
16663 #endif
16664 #ifdef NEED_PTEM_H
16665 /* This is a workaround for SCO:  they neglected to define struct winsize in
16666  * termios.h -- it's only in termio.h and ptem.h
16667  */
16668 #include        <sys/stream.h>
16669 #include        <sys/ptem.h>
16670 #endif
16671 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16672 #include <sys/ioctl.h>
16673 #endif
16674
16675 int
16676 main ()
16677 {
16678
16679 #ifdef TIOCGSIZE
16680         struct ttysize win;     /* FIXME: what system is this? */
16681         int y = win.ts_lines;
16682         int x = win.ts_cols;
16683 #else
16684 #ifdef TIOCGWINSZ
16685         struct winsize win;
16686         int y = win.ws_row;
16687         int x = win.ws_col;
16688 #else
16689         no TIOCGSIZE or TIOCGWINSZ
16690 #endif /* TIOCGWINSZ */
16691 #endif /* TIOCGSIZE */
16692
16693   ;
16694   return 0;
16695 }
16696 _ACEOF
16697 rm -f conftest.$ac_objext
16698 if { (eval echo "$as_me:16698: \"$ac_compile\"") >&5
16699   (eval $ac_compile) 2>&5
16700   ac_status=$?
16701   echo "$as_me:16701: \$? = $ac_status" >&5
16702   (exit $ac_status); } &&
16703          { ac_try='test -s conftest.$ac_objext'
16704   { (eval echo "$as_me:16704: \"$ac_try\"") >&5
16705   (eval $ac_try) 2>&5
16706   ac_status=$?
16707   echo "$as_me:16707: \$? = $ac_status" >&5
16708   (exit $ac_status); }; }; then
16709   cf_cv_sizechange=yes
16710 else
16711   echo "$as_me: failed program was:" >&5
16712 cat conftest.$ac_ext >&5
16713 cf_cv_sizechange=no
16714 fi
16715 rm -f conftest.$ac_objext conftest.$ac_ext
16716
16717         CPPFLAGS="$cf_save_CPPFLAGS"
16718         if test "$cf_cv_sizechange" = yes ; then
16719                 echo "size-change succeeded ($cf_opts)" >&5
16720                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16721                 break
16722         fi
16723 done
16724
16725 fi
16726 echo "$as_me:16726: result: $cf_cv_sizechange" >&5
16727 echo "${ECHO_T}$cf_cv_sizechange" >&6
16728 if test "$cf_cv_sizechange" != no ; then
16729
16730 cat >>confdefs.h <<\EOF
16731 #define HAVE_SIZECHANGE 1
16732 EOF
16733
16734         case $cf_cv_sizechange in #(vi
16735         NEED*)
16736                 cat >>confdefs.h <<EOF
16737 #define $cf_cv_sizechange  1
16738 EOF
16739
16740                 ;;
16741         esac
16742 fi
16743
16744 echo "$as_me:16744: checking for memmove" >&5
16745 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16746 if test "${ac_cv_func_memmove+set}" = set; then
16747   echo $ECHO_N "(cached) $ECHO_C" >&6
16748 else
16749   cat >conftest.$ac_ext <<_ACEOF
16750 #line 16750 "configure"
16751 #include "confdefs.h"
16752 /* System header to define __stub macros and hopefully few prototypes,
16753     which can conflict with char memmove (); below.  */
16754 #include <assert.h>
16755 /* Override any gcc2 internal prototype to avoid an error.  */
16756 #ifdef __cplusplus
16757 extern "C"
16758 #endif
16759 /* We use char because int might match the return type of a gcc2
16760    builtin and then its argument prototype would still apply.  */
16761 char memmove ();
16762 char (*f) ();
16763
16764 int
16765 main ()
16766 {
16767 /* The GNU C library defines this for functions which it implements
16768     to always fail with ENOSYS.  Some functions are actually named
16769     something starting with __ and the normal name is an alias.  */
16770 #if defined (__stub_memmove) || defined (__stub___memmove)
16771 choke me
16772 #else
16773 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16774 #endif
16775
16776   ;
16777   return 0;
16778 }
16779 _ACEOF
16780 rm -f conftest.$ac_objext conftest$ac_exeext
16781 if { (eval echo "$as_me:16781: \"$ac_link\"") >&5
16782   (eval $ac_link) 2>&5
16783   ac_status=$?
16784   echo "$as_me:16784: \$? = $ac_status" >&5
16785   (exit $ac_status); } &&
16786          { ac_try='test -s conftest$ac_exeext'
16787   { (eval echo "$as_me:16787: \"$ac_try\"") >&5
16788   (eval $ac_try) 2>&5
16789   ac_status=$?
16790   echo "$as_me:16790: \$? = $ac_status" >&5
16791   (exit $ac_status); }; }; then
16792   ac_cv_func_memmove=yes
16793 else
16794   echo "$as_me: failed program was:" >&5
16795 cat conftest.$ac_ext >&5
16796 ac_cv_func_memmove=no
16797 fi
16798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16799 fi
16800 echo "$as_me:16800: result: $ac_cv_func_memmove" >&5
16801 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16802 if test $ac_cv_func_memmove = yes; then
16803   :
16804 else
16805
16806 echo "$as_me:16806: checking for bcopy" >&5
16807 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16808 if test "${ac_cv_func_bcopy+set}" = set; then
16809   echo $ECHO_N "(cached) $ECHO_C" >&6
16810 else
16811   cat >conftest.$ac_ext <<_ACEOF
16812 #line 16812 "configure"
16813 #include "confdefs.h"
16814 /* System header to define __stub macros and hopefully few prototypes,
16815     which can conflict with char bcopy (); below.  */
16816 #include <assert.h>
16817 /* Override any gcc2 internal prototype to avoid an error.  */
16818 #ifdef __cplusplus
16819 extern "C"
16820 #endif
16821 /* We use char because int might match the return type of a gcc2
16822    builtin and then its argument prototype would still apply.  */
16823 char bcopy ();
16824 char (*f) ();
16825
16826 int
16827 main ()
16828 {
16829 /* The GNU C library defines this for functions which it implements
16830     to always fail with ENOSYS.  Some functions are actually named
16831     something starting with __ and the normal name is an alias.  */
16832 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16833 choke me
16834 #else
16835 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16836 #endif
16837
16838   ;
16839   return 0;
16840 }
16841 _ACEOF
16842 rm -f conftest.$ac_objext conftest$ac_exeext
16843 if { (eval echo "$as_me:16843: \"$ac_link\"") >&5
16844   (eval $ac_link) 2>&5
16845   ac_status=$?
16846   echo "$as_me:16846: \$? = $ac_status" >&5
16847   (exit $ac_status); } &&
16848          { ac_try='test -s conftest$ac_exeext'
16849   { (eval echo "$as_me:16849: \"$ac_try\"") >&5
16850   (eval $ac_try) 2>&5
16851   ac_status=$?
16852   echo "$as_me:16852: \$? = $ac_status" >&5
16853   (exit $ac_status); }; }; then
16854   ac_cv_func_bcopy=yes
16855 else
16856   echo "$as_me: failed program was:" >&5
16857 cat conftest.$ac_ext >&5
16858 ac_cv_func_bcopy=no
16859 fi
16860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16861 fi
16862 echo "$as_me:16862: result: $ac_cv_func_bcopy" >&5
16863 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16864 if test $ac_cv_func_bcopy = yes; then
16865
16866         echo "$as_me:16866: checking if bcopy does overlapping moves" >&5
16867 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16868 if test "${cf_cv_good_bcopy+set}" = set; then
16869   echo $ECHO_N "(cached) $ECHO_C" >&6
16870 else
16871
16872                 if test "$cross_compiling" = yes; then
16873   cf_cv_good_bcopy=unknown
16874 else
16875   cat >conftest.$ac_ext <<_ACEOF
16876 #line 16876 "configure"
16877 #include "confdefs.h"
16878
16879 int main() {
16880         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16881         char temp[40];
16882         bcopy(data, temp, sizeof(data));
16883         bcopy(temp+10, temp, 15);
16884         bcopy(temp+5, temp+15, 10);
16885         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16886 }
16887
16888 _ACEOF
16889 rm -f conftest$ac_exeext
16890 if { (eval echo "$as_me:16890: \"$ac_link\"") >&5
16891   (eval $ac_link) 2>&5
16892   ac_status=$?
16893   echo "$as_me:16893: \$? = $ac_status" >&5
16894   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16895   { (eval echo "$as_me:16895: \"$ac_try\"") >&5
16896   (eval $ac_try) 2>&5
16897   ac_status=$?
16898   echo "$as_me:16898: \$? = $ac_status" >&5
16899   (exit $ac_status); }; }; then
16900   cf_cv_good_bcopy=yes
16901 else
16902   echo "$as_me: program exited with status $ac_status" >&5
16903 echo "$as_me: failed program was:" >&5
16904 cat conftest.$ac_ext >&5
16905 cf_cv_good_bcopy=no
16906 fi
16907 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16908 fi
16909
16910 fi
16911 echo "$as_me:16911: result: $cf_cv_good_bcopy" >&5
16912 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16913
16914 else
16915   cf_cv_good_bcopy=no
16916 fi
16917
16918         if test "$cf_cv_good_bcopy" = yes ; then
16919
16920 cat >>confdefs.h <<\EOF
16921 #define USE_OK_BCOPY 1
16922 EOF
16923
16924         else
16925
16926 cat >>confdefs.h <<\EOF
16927 #define USE_MY_MEMMOVE 1
16928 EOF
16929
16930         fi
16931
16932 fi
16933
16934 echo "$as_me:16934: checking if poll really works" >&5
16935 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16936 if test "${cf_cv_working_poll+set}" = set; then
16937   echo $ECHO_N "(cached) $ECHO_C" >&6
16938 else
16939
16940 if test "$cross_compiling" = yes; then
16941   cf_cv_working_poll=unknown
16942 else
16943   cat >conftest.$ac_ext <<_ACEOF
16944 #line 16944 "configure"
16945 #include "confdefs.h"
16946
16947 #include <stdlib.h>
16948 #include <stdio.h>
16949 #include <unistd.h>
16950 #include <fcntl.h>
16951 #ifdef HAVE_POLL_H
16952 #include <poll.h>
16953 #else
16954 #include <sys/poll.h>
16955 #endif
16956 int main() {
16957         struct pollfd myfds;
16958         int ret;
16959
16960         /* check for Darwin bug with respect to "devices" */
16961         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16962         if (myfds.fd < 0)
16963                 myfds.fd = 0;
16964         myfds.events = POLLIN;
16965         myfds.revents = 0;
16966
16967         ret = poll(&myfds, 1, 100);
16968
16969         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16970                 ret = -1;
16971         } else {
16972                 int fd = 0;
16973                 if (!isatty(fd)) {
16974                         fd = open("/dev/tty", 2);       /* O_RDWR */
16975                 }
16976
16977                 if (fd >= 0) {
16978                         /* also check with standard input */
16979                         myfds.fd = fd;
16980                         myfds.events = POLLIN;
16981                         myfds.revents = 0;
16982                         ret = poll(&myfds, 1, 100);
16983                 } else {
16984                         ret = -1;
16985                 }
16986         }
16987         ${cf_cv_main_return:-return}(ret < 0);
16988 }
16989 _ACEOF
16990 rm -f conftest$ac_exeext
16991 if { (eval echo "$as_me:16991: \"$ac_link\"") >&5
16992   (eval $ac_link) 2>&5
16993   ac_status=$?
16994   echo "$as_me:16994: \$? = $ac_status" >&5
16995   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16996   { (eval echo "$as_me:16996: \"$ac_try\"") >&5
16997   (eval $ac_try) 2>&5
16998   ac_status=$?
16999   echo "$as_me:16999: \$? = $ac_status" >&5
17000   (exit $ac_status); }; }; then
17001   cf_cv_working_poll=yes
17002 else
17003   echo "$as_me: program exited with status $ac_status" >&5
17004 echo "$as_me: failed program was:" >&5
17005 cat conftest.$ac_ext >&5
17006 cf_cv_working_poll=no
17007 fi
17008 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17009 fi
17010 fi
17011 echo "$as_me:17011: result: $cf_cv_working_poll" >&5
17012 echo "${ECHO_T}$cf_cv_working_poll" >&6
17013 test "$cf_cv_working_poll" = "yes" &&
17014 cat >>confdefs.h <<\EOF
17015 #define HAVE_WORKING_POLL 1
17016 EOF
17017
17018 echo "$as_me:17018: checking for va_copy" >&5
17019 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17020 if test "${cf_cv_have_va_copy+set}" = set; then
17021   echo $ECHO_N "(cached) $ECHO_C" >&6
17022 else
17023
17024 cat >conftest.$ac_ext <<_ACEOF
17025 #line 17025 "configure"
17026 #include "confdefs.h"
17027
17028 #include <stdarg.h>
17029
17030 int
17031 main ()
17032 {
17033
17034         static va_list dst;
17035         static va_list src;
17036         va_copy(dst, src)
17037   ;
17038   return 0;
17039 }
17040 _ACEOF
17041 rm -f conftest.$ac_objext conftest$ac_exeext
17042 if { (eval echo "$as_me:17042: \"$ac_link\"") >&5
17043   (eval $ac_link) 2>&5
17044   ac_status=$?
17045   echo "$as_me:17045: \$? = $ac_status" >&5
17046   (exit $ac_status); } &&
17047          { ac_try='test -s conftest$ac_exeext'
17048   { (eval echo "$as_me:17048: \"$ac_try\"") >&5
17049   (eval $ac_try) 2>&5
17050   ac_status=$?
17051   echo "$as_me:17051: \$? = $ac_status" >&5
17052   (exit $ac_status); }; }; then
17053   cf_cv_have_va_copy=yes
17054 else
17055   echo "$as_me: failed program was:" >&5
17056 cat conftest.$ac_ext >&5
17057 cf_cv_have_va_copy=no
17058 fi
17059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17060 fi
17061 echo "$as_me:17061: result: $cf_cv_have_va_copy" >&5
17062 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17063
17064 test "$cf_cv_have_va_copy" = yes &&
17065 cat >>confdefs.h <<\EOF
17066 #define HAVE_VA_COPY 1
17067 EOF
17068
17069 echo "$as_me:17069: checking for __va_copy" >&5
17070 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17071 if test "${cf_cv_have___va_copy+set}" = set; then
17072   echo $ECHO_N "(cached) $ECHO_C" >&6
17073 else
17074
17075 cat >conftest.$ac_ext <<_ACEOF
17076 #line 17076 "configure"
17077 #include "confdefs.h"
17078
17079 #include <stdarg.h>
17080
17081 int
17082 main ()
17083 {
17084
17085         static va_list dst;
17086         static va_list src;
17087         __va_copy(dst, src)
17088   ;
17089   return 0;
17090 }
17091 _ACEOF
17092 rm -f conftest.$ac_objext conftest$ac_exeext
17093 if { (eval echo "$as_me:17093: \"$ac_link\"") >&5
17094   (eval $ac_link) 2>&5
17095   ac_status=$?
17096   echo "$as_me:17096: \$? = $ac_status" >&5
17097   (exit $ac_status); } &&
17098          { ac_try='test -s conftest$ac_exeext'
17099   { (eval echo "$as_me:17099: \"$ac_try\"") >&5
17100   (eval $ac_try) 2>&5
17101   ac_status=$?
17102   echo "$as_me:17102: \$? = $ac_status" >&5
17103   (exit $ac_status); }; }; then
17104   cf_cv_have___va_copy=yes
17105 else
17106   echo "$as_me: failed program was:" >&5
17107 cat conftest.$ac_ext >&5
17108 cf_cv_have___va_copy=no
17109 fi
17110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17111 fi
17112 echo "$as_me:17112: result: $cf_cv_have___va_copy" >&5
17113 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17114
17115 test "$cf_cv_have___va_copy" = yes &&
17116 cat >>confdefs.h <<\EOF
17117 #define HAVE___VA_COPY 1
17118 EOF
17119
17120 echo "$as_me:17120: checking for pid_t" >&5
17121 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17122 if test "${ac_cv_type_pid_t+set}" = set; then
17123   echo $ECHO_N "(cached) $ECHO_C" >&6
17124 else
17125   cat >conftest.$ac_ext <<_ACEOF
17126 #line 17126 "configure"
17127 #include "confdefs.h"
17128 $ac_includes_default
17129 int
17130 main ()
17131 {
17132 if ((pid_t *) 0)
17133   return 0;
17134 if (sizeof (pid_t))
17135   return 0;
17136   ;
17137   return 0;
17138 }
17139 _ACEOF
17140 rm -f conftest.$ac_objext
17141 if { (eval echo "$as_me:17141: \"$ac_compile\"") >&5
17142   (eval $ac_compile) 2>&5
17143   ac_status=$?
17144   echo "$as_me:17144: \$? = $ac_status" >&5
17145   (exit $ac_status); } &&
17146          { ac_try='test -s conftest.$ac_objext'
17147   { (eval echo "$as_me:17147: \"$ac_try\"") >&5
17148   (eval $ac_try) 2>&5
17149   ac_status=$?
17150   echo "$as_me:17150: \$? = $ac_status" >&5
17151   (exit $ac_status); }; }; then
17152   ac_cv_type_pid_t=yes
17153 else
17154   echo "$as_me: failed program was:" >&5
17155 cat conftest.$ac_ext >&5
17156 ac_cv_type_pid_t=no
17157 fi
17158 rm -f conftest.$ac_objext conftest.$ac_ext
17159 fi
17160 echo "$as_me:17160: result: $ac_cv_type_pid_t" >&5
17161 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17162 if test $ac_cv_type_pid_t = yes; then
17163   :
17164 else
17165
17166 cat >>confdefs.h <<EOF
17167 #define pid_t int
17168 EOF
17169
17170 fi
17171
17172 for ac_header in unistd.h vfork.h
17173 do
17174 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17175 echo "$as_me:17175: checking for $ac_header" >&5
17176 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17177 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17178   echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180   cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183 #include <$ac_header>
17184 _ACEOF
17185 if { (eval echo "$as_me:17185: \"$ac_cpp conftest.$ac_ext\"") >&5
17186   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17187   ac_status=$?
17188   egrep -v '^ *\+' conftest.er1 >conftest.err
17189   rm -f conftest.er1
17190   cat conftest.err >&5
17191   echo "$as_me:17191: \$? = $ac_status" >&5
17192   (exit $ac_status); } >/dev/null; then
17193   if test -s conftest.err; then
17194     ac_cpp_err=$ac_c_preproc_warn_flag
17195   else
17196     ac_cpp_err=
17197   fi
17198 else
17199   ac_cpp_err=yes
17200 fi
17201 if test -z "$ac_cpp_err"; then
17202   eval "$as_ac_Header=yes"
17203 else
17204   echo "$as_me: failed program was:" >&5
17205   cat conftest.$ac_ext >&5
17206   eval "$as_ac_Header=no"
17207 fi
17208 rm -f conftest.err conftest.$ac_ext
17209 fi
17210 echo "$as_me:17210: result: `eval echo '${'$as_ac_Header'}'`" >&5
17211 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17212 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17213   cat >>confdefs.h <<EOF
17214 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17215 EOF
17216
17217 fi
17218 done
17219
17220 for ac_func in fork vfork
17221 do
17222 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17223 echo "$as_me:17223: checking for $ac_func" >&5
17224 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17225 if eval "test \"\${$as_ac_var+set}\" = set"; then
17226   echo $ECHO_N "(cached) $ECHO_C" >&6
17227 else
17228   cat >conftest.$ac_ext <<_ACEOF
17229 #line 17229 "configure"
17230 #include "confdefs.h"
17231 /* System header to define __stub macros and hopefully few prototypes,
17232     which can conflict with char $ac_func (); below.  */
17233 #include <assert.h>
17234 /* Override any gcc2 internal prototype to avoid an error.  */
17235 #ifdef __cplusplus
17236 extern "C"
17237 #endif
17238 /* We use char because int might match the return type of a gcc2
17239    builtin and then its argument prototype would still apply.  */
17240 char $ac_func ();
17241 char (*f) ();
17242
17243 int
17244 main ()
17245 {
17246 /* The GNU C library defines this for functions which it implements
17247     to always fail with ENOSYS.  Some functions are actually named
17248     something starting with __ and the normal name is an alias.  */
17249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17250 choke me
17251 #else
17252 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17253 #endif
17254
17255   ;
17256   return 0;
17257 }
17258 _ACEOF
17259 rm -f conftest.$ac_objext conftest$ac_exeext
17260 if { (eval echo "$as_me:17260: \"$ac_link\"") >&5
17261   (eval $ac_link) 2>&5
17262   ac_status=$?
17263   echo "$as_me:17263: \$? = $ac_status" >&5
17264   (exit $ac_status); } &&
17265          { ac_try='test -s conftest$ac_exeext'
17266   { (eval echo "$as_me:17266: \"$ac_try\"") >&5
17267   (eval $ac_try) 2>&5
17268   ac_status=$?
17269   echo "$as_me:17269: \$? = $ac_status" >&5
17270   (exit $ac_status); }; }; then
17271   eval "$as_ac_var=yes"
17272 else
17273   echo "$as_me: failed program was:" >&5
17274 cat conftest.$ac_ext >&5
17275 eval "$as_ac_var=no"
17276 fi
17277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17278 fi
17279 echo "$as_me:17279: result: `eval echo '${'$as_ac_var'}'`" >&5
17280 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17281 if test `eval echo '${'$as_ac_var'}'` = yes; then
17282   cat >>confdefs.h <<EOF
17283 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17284 EOF
17285
17286 fi
17287 done
17288
17289 ac_cv_func_fork_works=$ac_cv_func_fork
17290 if test "x$ac_cv_func_fork" = xyes; then
17291   echo "$as_me:17291: checking for working fork" >&5
17292 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17293 if test "${ac_cv_func_fork_works+set}" = set; then
17294   echo $ECHO_N "(cached) $ECHO_C" >&6
17295 else
17296   if test "$cross_compiling" = yes; then
17297   ac_cv_func_fork_works=cross
17298 else
17299   cat >conftest.$ac_ext <<_ACEOF
17300 /* By Rüdiger Kuhlmann. */
17301       #include <sys/types.h>
17302       #if HAVE_UNISTD_H
17303       # include <unistd.h>
17304       #endif
17305       /* Some systems only have a dummy stub for fork() */
17306       int main ()
17307       {
17308         if (fork() < 0)
17309           $ac_main_return (1);
17310         $ac_main_return (0);
17311       }
17312 _ACEOF
17313 rm -f conftest$ac_exeext
17314 if { (eval echo "$as_me:17314: \"$ac_link\"") >&5
17315   (eval $ac_link) 2>&5
17316   ac_status=$?
17317   echo "$as_me:17317: \$? = $ac_status" >&5
17318   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17319   { (eval echo "$as_me:17319: \"$ac_try\"") >&5
17320   (eval $ac_try) 2>&5
17321   ac_status=$?
17322   echo "$as_me:17322: \$? = $ac_status" >&5
17323   (exit $ac_status); }; }; then
17324   ac_cv_func_fork_works=yes
17325 else
17326   echo "$as_me: program exited with status $ac_status" >&5
17327 echo "$as_me: failed program was:" >&5
17328 cat conftest.$ac_ext >&5
17329 ac_cv_func_fork_works=no
17330 fi
17331 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17332 fi
17333 fi
17334 echo "$as_me:17334: result: $ac_cv_func_fork_works" >&5
17335 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17336
17337 fi
17338 if test "x$ac_cv_func_fork_works" = xcross; then
17339   case $host in
17340     *-*-amigaos* | *-*-msdosdjgpp*)
17341       # Override, as these systems have only a dummy fork() stub
17342       ac_cv_func_fork_works=no
17343       ;;
17344     *)
17345       ac_cv_func_fork_works=yes
17346       ;;
17347   esac
17348   { echo "$as_me:17348: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17349 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17350 fi
17351 ac_cv_func_vfork_works=$ac_cv_func_vfork
17352 if test "x$ac_cv_func_vfork" = xyes; then
17353   echo "$as_me:17353: checking for working vfork" >&5
17354 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17355 if test "${ac_cv_func_vfork_works+set}" = set; then
17356   echo $ECHO_N "(cached) $ECHO_C" >&6
17357 else
17358   if test "$cross_compiling" = yes; then
17359   ac_cv_func_vfork_works=cross
17360 else
17361   cat >conftest.$ac_ext <<_ACEOF
17362 #line 17362 "configure"
17363 #include "confdefs.h"
17364 /* Thanks to Paul Eggert for this test.  */
17365 #include <stdio.h>
17366 #include <sys/types.h>
17367 #include <sys/stat.h>
17368 #if HAVE_UNISTD_H
17369 # include <unistd.h>
17370 #endif
17371 #if HAVE_VFORK_H
17372 # include <vfork.h>
17373 #endif
17374 /* On some sparc systems, changes by the child to local and incoming
17375    argument registers are propagated back to the parent.  The compiler
17376    is told about this with #include <vfork.h>, but some compilers
17377    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17378    static variable whose address is put into a register that is
17379    clobbered by the vfork.  */
17380 static
17381 #ifdef __cplusplus
17382 sparc_address_test (int arg)
17383 # else
17384 sparc_address_test (arg) int arg;
17385 #endif
17386 {
17387   static pid_t child;
17388   if (!child) {
17389     child = vfork ();
17390     if (child < 0) {
17391       perror ("vfork");
17392       _exit(2);
17393     }
17394     if (!child) {
17395       arg = getpid();
17396       write(-1, "", 0);
17397       _exit (arg);
17398     }
17399   }
17400 }
17401
17402 int
17403 main ()
17404 {
17405   pid_t parent = getpid ();
17406   pid_t child;
17407
17408   sparc_address_test ();
17409
17410   child = vfork ();
17411
17412   if (child == 0) {
17413     /* Here is another test for sparc vfork register problems.  This
17414        test uses lots of local variables, at least as many local
17415        variables as main has allocated so far including compiler
17416        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17417        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17418        reuse the register of parent for one of the local variables,
17419        since it will think that parent can't possibly be used any more
17420        in this routine.  Assigning to the local variable will thus
17421        munge parent in the parent process.  */
17422     pid_t
17423       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17424       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17425     /* Convince the compiler that p..p7 are live; otherwise, it might
17426        use the same hardware register for all 8 local variables.  */
17427     if (p != p1 || p != p2 || p != p3 || p != p4
17428         || p != p5 || p != p6 || p != p7)
17429       _exit(1);
17430
17431     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17432        from child file descriptors.  If the child closes a descriptor
17433        before it execs or exits, this munges the parent's descriptor
17434        as well.  Test for this by closing stdout in the child.  */
17435     _exit(close(fileno(stdout)) != 0);
17436   } else {
17437     int status;
17438     struct stat st;
17439
17440     while (wait(&status) != child)
17441       ;
17442     $ac_main_return(
17443          /* Was there some problem with vforking?  */
17444          child < 0
17445
17446          /* Did the child fail?  (This shouldn't happen.)  */
17447          || status
17448
17449          /* Did the vfork/compiler bug occur?  */
17450          || parent != getpid()
17451
17452          /* Did the file descriptor bug occur?  */
17453          || fstat(fileno(stdout), &st) != 0
17454          );
17455   }
17456 }
17457 _ACEOF
17458 rm -f conftest$ac_exeext
17459 if { (eval echo "$as_me:17459: \"$ac_link\"") >&5
17460   (eval $ac_link) 2>&5
17461   ac_status=$?
17462   echo "$as_me:17462: \$? = $ac_status" >&5
17463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17464   { (eval echo "$as_me:17464: \"$ac_try\"") >&5
17465   (eval $ac_try) 2>&5
17466   ac_status=$?
17467   echo "$as_me:17467: \$? = $ac_status" >&5
17468   (exit $ac_status); }; }; then
17469   ac_cv_func_vfork_works=yes
17470 else
17471   echo "$as_me: program exited with status $ac_status" >&5
17472 echo "$as_me: failed program was:" >&5
17473 cat conftest.$ac_ext >&5
17474 ac_cv_func_vfork_works=no
17475 fi
17476 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17477 fi
17478 fi
17479 echo "$as_me:17479: result: $ac_cv_func_vfork_works" >&5
17480 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17481
17482 fi;
17483 if test "x$ac_cv_func_fork_works" = xcross; then
17484   ac_cv_func_vfork_works=ac_cv_func_vfork
17485   { echo "$as_me:17485: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17486 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17487 fi
17488
17489 if test "x$ac_cv_func_vfork_works" = xyes; then
17490
17491 cat >>confdefs.h <<\EOF
17492 #define HAVE_WORKING_VFORK 1
17493 EOF
17494
17495 else
17496
17497 cat >>confdefs.h <<\EOF
17498 #define vfork fork
17499 EOF
17500
17501 fi
17502 if test "x$ac_cv_func_fork_works" = xyes; then
17503
17504 cat >>confdefs.h <<\EOF
17505 #define HAVE_WORKING_FORK 1
17506 EOF
17507
17508 fi
17509
17510 # special check for test/ditto.c
17511
17512 echo "$as_me:17512: checking for openpty in -lutil" >&5
17513 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17514 if test "${ac_cv_lib_util_openpty+set}" = set; then
17515   echo $ECHO_N "(cached) $ECHO_C" >&6
17516 else
17517   ac_check_lib_save_LIBS=$LIBS
17518 LIBS="-lutil  $LIBS"
17519 cat >conftest.$ac_ext <<_ACEOF
17520 #line 17520 "configure"
17521 #include "confdefs.h"
17522
17523 /* Override any gcc2 internal prototype to avoid an error.  */
17524 #ifdef __cplusplus
17525 extern "C"
17526 #endif
17527 /* We use char because int might match the return type of a gcc2
17528    builtin and then its argument prototype would still apply.  */
17529 char openpty ();
17530 int
17531 main ()
17532 {
17533 openpty ();
17534   ;
17535   return 0;
17536 }
17537 _ACEOF
17538 rm -f conftest.$ac_objext conftest$ac_exeext
17539 if { (eval echo "$as_me:17539: \"$ac_link\"") >&5
17540   (eval $ac_link) 2>&5
17541   ac_status=$?
17542   echo "$as_me:17542: \$? = $ac_status" >&5
17543   (exit $ac_status); } &&
17544          { ac_try='test -s conftest$ac_exeext'
17545   { (eval echo "$as_me:17545: \"$ac_try\"") >&5
17546   (eval $ac_try) 2>&5
17547   ac_status=$?
17548   echo "$as_me:17548: \$? = $ac_status" >&5
17549   (exit $ac_status); }; }; then
17550   ac_cv_lib_util_openpty=yes
17551 else
17552   echo "$as_me: failed program was:" >&5
17553 cat conftest.$ac_ext >&5
17554 ac_cv_lib_util_openpty=no
17555 fi
17556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17557 LIBS=$ac_check_lib_save_LIBS
17558 fi
17559 echo "$as_me:17559: result: $ac_cv_lib_util_openpty" >&5
17560 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17561 if test $ac_cv_lib_util_openpty = yes; then
17562   cf_cv_lib_util=yes
17563 else
17564   cf_cv_lib_util=no
17565 fi
17566
17567 echo "$as_me:17567: checking for openpty header" >&5
17568 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17569 if test "${cf_cv_func_openpty+set}" = set; then
17570   echo $ECHO_N "(cached) $ECHO_C" >&6
17571 else
17572
17573     cf_save_LIBS="$LIBS"
17574     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17575     for cf_header in pty.h libutil.h util.h
17576     do
17577     cat >conftest.$ac_ext <<_ACEOF
17578 #line 17578 "configure"
17579 #include "confdefs.h"
17580
17581 #include <$cf_header>
17582
17583 int
17584 main ()
17585 {
17586
17587     int x = openpty((int *)0, (int *)0, (char *)0,
17588                    (struct termios *)0, (struct winsize *)0);
17589
17590   ;
17591   return 0;
17592 }
17593 _ACEOF
17594 rm -f conftest.$ac_objext conftest$ac_exeext
17595 if { (eval echo "$as_me:17595: \"$ac_link\"") >&5
17596   (eval $ac_link) 2>&5
17597   ac_status=$?
17598   echo "$as_me:17598: \$? = $ac_status" >&5
17599   (exit $ac_status); } &&
17600          { ac_try='test -s conftest$ac_exeext'
17601   { (eval echo "$as_me:17601: \"$ac_try\"") >&5
17602   (eval $ac_try) 2>&5
17603   ac_status=$?
17604   echo "$as_me:17604: \$? = $ac_status" >&5
17605   (exit $ac_status); }; }; then
17606
17607         cf_cv_func_openpty=$cf_header
17608         break
17609
17610 else
17611   echo "$as_me: failed program was:" >&5
17612 cat conftest.$ac_ext >&5
17613
17614         cf_cv_func_openpty=no
17615
17616 fi
17617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17618     done
17619     LIBS="$cf_save_LIBS"
17620
17621 fi
17622 echo "$as_me:17622: result: $cf_cv_func_openpty" >&5
17623 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17624
17625 if test "$cf_cv_func_openpty" != no ; then
17626
17627 cat >>confdefs.h <<EOF
17628 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17629 EOF
17630
17631 cat >>confdefs.h <<\EOF
17632 #define USE_XTERM_PTY 1
17633 EOF
17634
17635     if test "x$cf_cv_lib_util" = xyes ; then
17636         TEST_LIBS="-lutil $TEST_LIBS"
17637     fi
17638 fi
17639
17640 if test "$with_hashed_db" != no ; then
17641
17642 cat >>confdefs.h <<\EOF
17643 #define USE_HASHED_DB 1
17644 EOF
17645
17646 case $with_hashed_db in #(vi
17647 yes|*able*) #(vi
17648     ;;
17649 *)
17650     if test -d "$with_hashed_db" ; then
17651
17652 if test -n "$with_hashed_db/include" ; then
17653   for cf_add_incdir in $with_hashed_db/include
17654   do
17655         while test $cf_add_incdir != /usr/include
17656         do
17657           if test -d $cf_add_incdir
17658           then
17659                 cf_have_incdir=no
17660                 if test -n "$CFLAGS$CPPFLAGS" ; then
17661                   # a loop is needed to ensure we can add subdirs of existing dirs
17662                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17663                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17664                           cf_have_incdir=yes; break
17665                         fi
17666                   done
17667                 fi
17668
17669                 if test "$cf_have_incdir" = no ; then
17670                   if test "$cf_add_incdir" = /usr/local/include ; then
17671                         if test "$GCC" = yes
17672                         then
17673                           cf_save_CPPFLAGS=$CPPFLAGS
17674                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17675                           cat >conftest.$ac_ext <<_ACEOF
17676 #line 17676 "configure"
17677 #include "confdefs.h"
17678 #include <stdio.h>
17679 int
17680 main ()
17681 {
17682 printf("Hello")
17683   ;
17684   return 0;
17685 }
17686 _ACEOF
17687 rm -f conftest.$ac_objext
17688 if { (eval echo "$as_me:17688: \"$ac_compile\"") >&5
17689   (eval $ac_compile) 2>&5
17690   ac_status=$?
17691   echo "$as_me:17691: \$? = $ac_status" >&5
17692   (exit $ac_status); } &&
17693          { ac_try='test -s conftest.$ac_objext'
17694   { (eval echo "$as_me:17694: \"$ac_try\"") >&5
17695   (eval $ac_try) 2>&5
17696   ac_status=$?
17697   echo "$as_me:17697: \$? = $ac_status" >&5
17698   (exit $ac_status); }; }; then
17699   :
17700 else
17701   echo "$as_me: failed program was:" >&5
17702 cat conftest.$ac_ext >&5
17703 cf_have_incdir=yes
17704 fi
17705 rm -f conftest.$ac_objext conftest.$ac_ext
17706                           CPPFLAGS=$cf_save_CPPFLAGS
17707                         fi
17708                   fi
17709                 fi
17710
17711                 if test "$cf_have_incdir" = no ; then
17712                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17713
17714 echo "${as_me:-configure}:17714: testing adding $cf_add_incdir to include-path ..." 1>&5
17715
17716                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17717
17718                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17719                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17720                   cf_add_incdir="$cf_top_incdir"
17721                 else
17722                   break
17723                 fi
17724           fi
17725         done
17726   done
17727 fi
17728
17729 if test -n "$with_hashed_db/lib" ; then
17730   for cf_add_libdir in $with_hashed_db/lib
17731   do
17732     if test $cf_add_libdir = /usr/lib ; then
17733       :
17734     elif test -d $cf_add_libdir
17735     then
17736       cf_have_libdir=no
17737       if test -n "$LDFLAGS$LIBS" ; then
17738         # a loop is needed to ensure we can add subdirs of existing dirs
17739         for cf_test_libdir in $LDFLAGS $LIBS ; do
17740           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17741             cf_have_libdir=yes; break
17742           fi
17743         done
17744       fi
17745       if test "$cf_have_libdir" = no ; then
17746         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17747
17748 echo "${as_me:-configure}:17748: testing adding $cf_add_libdir to library-path ..." 1>&5
17749
17750         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17751       fi
17752     fi
17753   done
17754 fi
17755
17756     fi
17757 esac
17758
17759 echo "$as_me:17759: checking for db.h" >&5
17760 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17761 if test "${ac_cv_header_db_h+set}" = set; then
17762   echo $ECHO_N "(cached) $ECHO_C" >&6
17763 else
17764   cat >conftest.$ac_ext <<_ACEOF
17765 #line 17765 "configure"
17766 #include "confdefs.h"
17767 #include <db.h>
17768 _ACEOF
17769 if { (eval echo "$as_me:17769: \"$ac_cpp conftest.$ac_ext\"") >&5
17770   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17771   ac_status=$?
17772   egrep -v '^ *\+' conftest.er1 >conftest.err
17773   rm -f conftest.er1
17774   cat conftest.err >&5
17775   echo "$as_me:17775: \$? = $ac_status" >&5
17776   (exit $ac_status); } >/dev/null; then
17777   if test -s conftest.err; then
17778     ac_cpp_err=$ac_c_preproc_warn_flag
17779   else
17780     ac_cpp_err=
17781   fi
17782 else
17783   ac_cpp_err=yes
17784 fi
17785 if test -z "$ac_cpp_err"; then
17786   ac_cv_header_db_h=yes
17787 else
17788   echo "$as_me: failed program was:" >&5
17789   cat conftest.$ac_ext >&5
17790   ac_cv_header_db_h=no
17791 fi
17792 rm -f conftest.err conftest.$ac_ext
17793 fi
17794 echo "$as_me:17794: result: $ac_cv_header_db_h" >&5
17795 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17796 if test $ac_cv_header_db_h = yes; then
17797
17798 echo "$as_me:17798: checking for version of db" >&5
17799 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17800 if test "${cf_cv_hashed_db_version+set}" = set; then
17801   echo $ECHO_N "(cached) $ECHO_C" >&6
17802 else
17803
17804 cf_cv_hashed_db_version=unknown
17805
17806 for cf_db_version in 1 2 3 4 5
17807 do
17808
17809 echo "${as_me:-configure}:17809: testing checking for db version $cf_db_version ..." 1>&5
17810
17811         cat >conftest.$ac_ext <<_ACEOF
17812 #line 17812 "configure"
17813 #include "confdefs.h"
17814
17815 $ac_includes_default
17816 #include <db.h>
17817
17818 #ifdef DB_VERSION_MAJOR
17819         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17820 #if $cf_db_version == DB_VERSION_MAJOR
17821         /* ok */
17822 #else
17823         make an error
17824 #endif
17825 #else
17826 #if $cf_db_version == 1
17827         /* ok: assuming this is DB 1.8.5 */
17828 #else
17829         make an error
17830 #endif
17831 #endif
17832
17833 int
17834 main ()
17835 {
17836 DBT *foo = 0
17837   ;
17838   return 0;
17839 }
17840 _ACEOF
17841 rm -f conftest.$ac_objext
17842 if { (eval echo "$as_me:17842: \"$ac_compile\"") >&5
17843   (eval $ac_compile) 2>&5
17844   ac_status=$?
17845   echo "$as_me:17845: \$? = $ac_status" >&5
17846   (exit $ac_status); } &&
17847          { ac_try='test -s conftest.$ac_objext'
17848   { (eval echo "$as_me:17848: \"$ac_try\"") >&5
17849   (eval $ac_try) 2>&5
17850   ac_status=$?
17851   echo "$as_me:17851: \$? = $ac_status" >&5
17852   (exit $ac_status); }; }; then
17853
17854         cf_cv_hashed_db_version=$cf_db_version
17855         break
17856
17857 else
17858   echo "$as_me: failed program was:" >&5
17859 cat conftest.$ac_ext >&5
17860 fi
17861 rm -f conftest.$ac_objext conftest.$ac_ext
17862 done
17863
17864 fi
17865 echo "$as_me:17865: result: $cf_cv_hashed_db_version" >&5
17866 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17867
17868 if test "$cf_cv_hashed_db_version" = unknown ; then
17869         { { echo "$as_me:17869: error: Cannot determine version of db" >&5
17870 echo "$as_me: error: Cannot determine version of db" >&2;}
17871    { (exit 1); exit 1; }; }
17872 else
17873
17874 echo "$as_me:17874: checking for db libraries" >&5
17875 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17876 if test "${cf_cv_hashed_db_libs+set}" = set; then
17877   echo $ECHO_N "(cached) $ECHO_C" >&6
17878 else
17879
17880 cf_cv_hashed_db_libs=unknown
17881 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17882 do
17883         cf_save_libs="$LIBS"
17884         if test -n "$cf_db_libs"; then
17885                 LIBS="-l$cf_db_libs $LIBS"
17886         fi
17887
17888 echo "${as_me:-configure}:17888: testing checking for library "$cf_db_libs" ..." 1>&5
17889
17890         cat >conftest.$ac_ext <<_ACEOF
17891 #line 17891 "configure"
17892 #include "confdefs.h"
17893
17894 $ac_includes_default
17895 #include <db.h>
17896
17897 int
17898 main ()
17899 {
17900
17901         char *path = "/tmp/foo";
17902 #ifdef DB_VERSION_MAJOR
17903 #if DB_VERSION_MAJOR >= 4
17904         DB *result = 0;
17905         db_create(&result, NULL, 0);
17906         result->open(result,
17907                 NULL,
17908                 path,
17909                 path,
17910                 DB_HASH,
17911                 DB_CREATE,
17912                 0644);
17913 #elif DB_VERSION_MAJOR >= 3
17914         DB *result = 0;
17915         db_create(&result, NULL, 0);
17916         result->open(result,
17917                 path,
17918                 path,
17919                 DB_HASH,
17920                 DB_CREATE,
17921                 0644);
17922 #elif DB_VERSION_MAJOR >= 2
17923         DB *result = 0;
17924         db_open(path,
17925                 DB_HASH,
17926                 DB_CREATE,
17927                 0644,
17928                 (DB_ENV *) 0,
17929                 (DB_INFO *) 0,
17930                 &result);
17931 #endif /* DB_VERSION_MAJOR */
17932 #else
17933         DB *result = dbopen(path,
17934                      2,
17935                      0644,
17936                      DB_HASH,
17937                      0);
17938 #endif
17939         ${cf_cv_main_return:-return}(result != 0)
17940
17941   ;
17942   return 0;
17943 }
17944 _ACEOF
17945 rm -f conftest.$ac_objext conftest$ac_exeext
17946 if { (eval echo "$as_me:17946: \"$ac_link\"") >&5
17947   (eval $ac_link) 2>&5
17948   ac_status=$?
17949   echo "$as_me:17949: \$? = $ac_status" >&5
17950   (exit $ac_status); } &&
17951          { ac_try='test -s conftest$ac_exeext'
17952   { (eval echo "$as_me:17952: \"$ac_try\"") >&5
17953   (eval $ac_try) 2>&5
17954   ac_status=$?
17955   echo "$as_me:17955: \$? = $ac_status" >&5
17956   (exit $ac_status); }; }; then
17957
17958         if test -n "$cf_db_libs" ; then
17959                 cf_cv_hashed_db_libs=$cf_db_libs
17960         else
17961                 cf_cv_hashed_db_libs=default
17962         fi
17963         LIBS="$cf_save_libs"
17964         break
17965
17966 else
17967   echo "$as_me: failed program was:" >&5
17968 cat conftest.$ac_ext >&5
17969 fi
17970 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17971         LIBS="$cf_save_libs"
17972 done
17973
17974 fi
17975 echo "$as_me:17975: result: $cf_cv_hashed_db_libs" >&5
17976 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17977
17978         if test "$cf_cv_hashed_db_libs" = unknown ; then
17979                 { { echo "$as_me:17979: error: Cannot determine library for db" >&5
17980 echo "$as_me: error: Cannot determine library for db" >&2;}
17981    { (exit 1); exit 1; }; }
17982         elif test "$cf_cv_hashed_db_libs" != default ; then
17983                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17984         fi
17985 fi
17986
17987 else
17988
17989         { { echo "$as_me:17989: error: Cannot find db.h" >&5
17990 echo "$as_me: error: Cannot find db.h" >&2;}
17991    { (exit 1); exit 1; }; }
17992
17993 fi
17994
17995 fi
17996
17997 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17998         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17999         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18000 fi
18001
18002 # Just in case, check if the C compiler has a bool type.
18003
18004 echo "$as_me:18004: checking if we should include stdbool.h" >&5
18005 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18006
18007 if test "${cf_cv_header_stdbool_h+set}" = set; then
18008   echo $ECHO_N "(cached) $ECHO_C" >&6
18009 else
18010
18011         cat >conftest.$ac_ext <<_ACEOF
18012 #line 18012 "configure"
18013 #include "confdefs.h"
18014
18015 int
18016 main ()
18017 {
18018 bool foo = false
18019   ;
18020   return 0;
18021 }
18022 _ACEOF
18023 rm -f conftest.$ac_objext
18024 if { (eval echo "$as_me:18024: \"$ac_compile\"") >&5
18025   (eval $ac_compile) 2>&5
18026   ac_status=$?
18027   echo "$as_me:18027: \$? = $ac_status" >&5
18028   (exit $ac_status); } &&
18029          { ac_try='test -s conftest.$ac_objext'
18030   { (eval echo "$as_me:18030: \"$ac_try\"") >&5
18031   (eval $ac_try) 2>&5
18032   ac_status=$?
18033   echo "$as_me:18033: \$? = $ac_status" >&5
18034   (exit $ac_status); }; }; then
18035   cf_cv_header_stdbool_h=0
18036 else
18037   echo "$as_me: failed program was:" >&5
18038 cat conftest.$ac_ext >&5
18039 cat >conftest.$ac_ext <<_ACEOF
18040 #line 18040 "configure"
18041 #include "confdefs.h"
18042
18043 #ifndef __BEOS__
18044 #include <stdbool.h>
18045 #endif
18046
18047 int
18048 main ()
18049 {
18050 bool foo = false
18051   ;
18052   return 0;
18053 }
18054 _ACEOF
18055 rm -f conftest.$ac_objext
18056 if { (eval echo "$as_me:18056: \"$ac_compile\"") >&5
18057   (eval $ac_compile) 2>&5
18058   ac_status=$?
18059   echo "$as_me:18059: \$? = $ac_status" >&5
18060   (exit $ac_status); } &&
18061          { ac_try='test -s conftest.$ac_objext'
18062   { (eval echo "$as_me:18062: \"$ac_try\"") >&5
18063   (eval $ac_try) 2>&5
18064   ac_status=$?
18065   echo "$as_me:18065: \$? = $ac_status" >&5
18066   (exit $ac_status); }; }; then
18067   cf_cv_header_stdbool_h=1
18068 else
18069   echo "$as_me: failed program was:" >&5
18070 cat conftest.$ac_ext >&5
18071 cf_cv_header_stdbool_h=0
18072 fi
18073 rm -f conftest.$ac_objext conftest.$ac_ext
18074 fi
18075 rm -f conftest.$ac_objext conftest.$ac_ext
18076 fi
18077
18078 if test "$cf_cv_header_stdbool_h" = 1
18079 then    echo "$as_me:18079: result: yes" >&5
18080 echo "${ECHO_T}yes" >&6
18081 else    echo "$as_me:18081: result: no" >&5
18082 echo "${ECHO_T}no" >&6
18083 fi
18084
18085 echo "$as_me:18085: checking for builtin bool type" >&5
18086 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18087
18088 if test "${cf_cv_cc_bool_type+set}" = set; then
18089   echo $ECHO_N "(cached) $ECHO_C" >&6
18090 else
18091
18092         cat >conftest.$ac_ext <<_ACEOF
18093 #line 18093 "configure"
18094 #include "confdefs.h"
18095
18096 #include <stdio.h>
18097 #include <sys/types.h>
18098
18099 int
18100 main ()
18101 {
18102 bool x = false
18103   ;
18104   return 0;
18105 }
18106 _ACEOF
18107 rm -f conftest.$ac_objext
18108 if { (eval echo "$as_me:18108: \"$ac_compile\"") >&5
18109   (eval $ac_compile) 2>&5
18110   ac_status=$?
18111   echo "$as_me:18111: \$? = $ac_status" >&5
18112   (exit $ac_status); } &&
18113          { ac_try='test -s conftest.$ac_objext'
18114   { (eval echo "$as_me:18114: \"$ac_try\"") >&5
18115   (eval $ac_try) 2>&5
18116   ac_status=$?
18117   echo "$as_me:18117: \$? = $ac_status" >&5
18118   (exit $ac_status); }; }; then
18119   cf_cv_cc_bool_type=1
18120 else
18121   echo "$as_me: failed program was:" >&5
18122 cat conftest.$ac_ext >&5
18123 cf_cv_cc_bool_type=0
18124 fi
18125 rm -f conftest.$ac_objext conftest.$ac_ext
18126
18127 fi
18128
18129 if test "$cf_cv_cc_bool_type" = 1
18130 then    echo "$as_me:18130: result: yes" >&5
18131 echo "${ECHO_T}yes" >&6
18132 else    echo "$as_me:18132: result: no" >&5
18133 echo "${ECHO_T}no" >&6
18134 fi
18135
18136 # Check for C++ compiler characteristics (and ensure that it's there!)
18137 if test -n "$CXX" ; then
18138         ac_ext=cc
18139 ac_cpp='$CXXCPP $CPPFLAGS'
18140 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18141 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18142 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18143 ac_main_return=return
18144
18145 if test -n "$GXX" ; then
18146 case $cf_cv_system_name in #(vi
18147 os2*) #(vi
18148         cf_stdcpp_libname=stdcpp
18149         ;;
18150 *)
18151         cf_stdcpp_libname=stdc++
18152         ;;
18153 esac
18154 echo "$as_me:18154: checking for library $cf_stdcpp_libname" >&5
18155 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18156 if test "${cf_cv_libstdcpp+set}" = set; then
18157   echo $ECHO_N "(cached) $ECHO_C" >&6
18158 else
18159
18160         cf_save="$LIBS"
18161         LIBS="-l$cf_stdcpp_libname $LIBS"
18162 cat >conftest.$ac_ext <<_ACEOF
18163 #line 18163 "configure"
18164 #include "confdefs.h"
18165
18166 #include <strstream.h>
18167 int
18168 main ()
18169 {
18170
18171 char buf[80];
18172 strstreambuf foo(buf, sizeof(buf))
18173
18174   ;
18175   return 0;
18176 }
18177 _ACEOF
18178 rm -f conftest.$ac_objext conftest$ac_exeext
18179 if { (eval echo "$as_me:18179: \"$ac_link\"") >&5
18180   (eval $ac_link) 2>&5
18181   ac_status=$?
18182   echo "$as_me:18182: \$? = $ac_status" >&5
18183   (exit $ac_status); } &&
18184          { ac_try='test -s conftest$ac_exeext'
18185   { (eval echo "$as_me:18185: \"$ac_try\"") >&5
18186   (eval $ac_try) 2>&5
18187   ac_status=$?
18188   echo "$as_me:18188: \$? = $ac_status" >&5
18189   (exit $ac_status); }; }; then
18190   cf_cv_libstdcpp=yes
18191 else
18192   echo "$as_me: failed program was:" >&5
18193 cat conftest.$ac_ext >&5
18194 cf_cv_libstdcpp=no
18195 fi
18196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18197         LIBS="$cf_save"
18198
18199 fi
18200 echo "$as_me:18200: result: $cf_cv_libstdcpp" >&5
18201 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18202 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18203 fi
18204
18205         echo "$as_me:18205: checking whether $CXX understands -c and -o together" >&5
18206 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18207 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18208   echo $ECHO_N "(cached) $ECHO_C" >&6
18209 else
18210
18211 cat > conftest.$ac_ext <<CF_EOF
18212 #include <stdio.h>
18213 int main()
18214 {
18215         ${cf_cv_main_return:-return}(0);
18216 }
18217 CF_EOF
18218 # We do the test twice because some compilers refuse to overwrite an
18219 # existing .o file with -o, though they will create one.
18220 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18221 if { (eval echo "$as_me:18221: \"$ac_try\"") >&5
18222   (eval $ac_try) 2>&5
18223   ac_status=$?
18224   echo "$as_me:18224: \$? = $ac_status" >&5
18225   (exit $ac_status); } &&
18226   test -f conftest2.$ac_objext && { (eval echo "$as_me:18226: \"$ac_try\"") >&5
18227   (eval $ac_try) 2>&5
18228   ac_status=$?
18229   echo "$as_me:18229: \$? = $ac_status" >&5
18230   (exit $ac_status); };
18231 then
18232   eval cf_cv_prog_CXX_c_o=yes
18233 else
18234   eval cf_cv_prog_CXX_c_o=no
18235 fi
18236 rm -rf conftest*
18237
18238 fi
18239 if test $cf_cv_prog_CXX_c_o = yes; then
18240   echo "$as_me:18240: result: yes" >&5
18241 echo "${ECHO_T}yes" >&6
18242 else
18243   echo "$as_me:18243: result: no" >&5
18244 echo "${ECHO_T}no" >&6
18245 fi
18246
18247         case $GXX_VERSION in
18248         1*|2.0-6*)
18249                 cf_cxx_library=yes
18250                 ;;
18251         *-2.7*|2.7*)
18252
18253 cf_cxx_library=unknown
18254 case $cf_cv_system_name in #(vi
18255 os2*) #(vi
18256         cf_gpp_libname=gpp
18257         ;;
18258 *)
18259         cf_gpp_libname=g++
18260         ;;
18261 esac
18262 if test "$GXX" = yes; then
18263         echo "$as_me:18263: checking for lib$cf_gpp_libname" >&5
18264 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18265         cf_save="$LIBS"
18266         LIBS="-l$cf_gpp_libname $LIBS"
18267         cat >conftest.$ac_ext <<_ACEOF
18268 #line 18268 "configure"
18269 #include "confdefs.h"
18270
18271 #include <$cf_gpp_libname/builtin.h>
18272
18273 int
18274 main ()
18275 {
18276 two_arg_error_handler_t foo2 = lib_error_handler
18277   ;
18278   return 0;
18279 }
18280 _ACEOF
18281 rm -f conftest.$ac_objext conftest$ac_exeext
18282 if { (eval echo "$as_me:18282: \"$ac_link\"") >&5
18283   (eval $ac_link) 2>&5
18284   ac_status=$?
18285   echo "$as_me:18285: \$? = $ac_status" >&5
18286   (exit $ac_status); } &&
18287          { ac_try='test -s conftest$ac_exeext'
18288   { (eval echo "$as_me:18288: \"$ac_try\"") >&5
18289   (eval $ac_try) 2>&5
18290   ac_status=$?
18291   echo "$as_me:18291: \$? = $ac_status" >&5
18292   (exit $ac_status); }; }; then
18293   cf_cxx_library=yes
18294          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18295          if test "$cf_gpp_libname" = cpp ; then
18296
18297 cat >>confdefs.h <<\EOF
18298 #define HAVE_GPP_BUILTIN_H 1
18299 EOF
18300
18301          else
18302
18303 cat >>confdefs.h <<\EOF
18304 #define HAVE_GXX_BUILTIN_H 1
18305 EOF
18306
18307          fi
18308 else
18309   echo "$as_me: failed program was:" >&5
18310 cat conftest.$ac_ext >&5
18311 cat >conftest.$ac_ext <<_ACEOF
18312 #line 18312 "configure"
18313 #include "confdefs.h"
18314
18315 #include <builtin.h>
18316
18317 int
18318 main ()
18319 {
18320 two_arg_error_handler_t foo2 = lib_error_handler
18321   ;
18322   return 0;
18323 }
18324 _ACEOF
18325 rm -f conftest.$ac_objext conftest$ac_exeext
18326 if { (eval echo "$as_me:18326: \"$ac_link\"") >&5
18327   (eval $ac_link) 2>&5
18328   ac_status=$?
18329   echo "$as_me:18329: \$? = $ac_status" >&5
18330   (exit $ac_status); } &&
18331          { ac_try='test -s conftest$ac_exeext'
18332   { (eval echo "$as_me:18332: \"$ac_try\"") >&5
18333   (eval $ac_try) 2>&5
18334   ac_status=$?
18335   echo "$as_me:18335: \$? = $ac_status" >&5
18336   (exit $ac_status); }; }; then
18337   cf_cxx_library=yes
18338          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18339
18340 cat >>confdefs.h <<\EOF
18341 #define HAVE_BUILTIN_H 1
18342 EOF
18343
18344 else
18345   echo "$as_me: failed program was:" >&5
18346 cat conftest.$ac_ext >&5
18347 cf_cxx_library=no
18348 fi
18349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18350 fi
18351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18352         LIBS="$cf_save"
18353         echo "$as_me:18353: result: $cf_cxx_library" >&5
18354 echo "${ECHO_T}$cf_cxx_library" >&6
18355 fi
18356
18357                 ;;
18358         *)
18359                 cf_cxx_library=no
18360                 ;;
18361         esac
18362
18363         ac_ext=cc
18364 ac_cpp='$CXXCPP $CPPFLAGS'
18365 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18366 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18367 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18368 ac_main_return=return
18369 echo "$as_me:18369: checking how to run the C++ preprocessor" >&5
18370 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18371 if test -z "$CXXCPP"; then
18372   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18373   echo $ECHO_N "(cached) $ECHO_C" >&6
18374 else
18375       # Double quotes because CXXCPP needs to be expanded
18376     for CXXCPP in "$CXX -E" "/lib/cpp"
18377     do
18378       ac_preproc_ok=false
18379 for ac_cxx_preproc_warn_flag in '' yes
18380 do
18381   # Use a header file that comes with gcc, so configuring glibc
18382   # with a fresh cross-compiler works.
18383   # On the NeXT, cc -E runs the code through the compiler's parser,
18384   # not just through cpp. "Syntax error" is here to catch this case.
18385   cat >conftest.$ac_ext <<_ACEOF
18386 #line 18386 "configure"
18387 #include "confdefs.h"
18388 #include <assert.h>
18389                      Syntax error
18390 _ACEOF
18391 if { (eval echo "$as_me:18391: \"$ac_cpp conftest.$ac_ext\"") >&5
18392   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18393   ac_status=$?
18394   egrep -v '^ *\+' conftest.er1 >conftest.err
18395   rm -f conftest.er1
18396   cat conftest.err >&5
18397   echo "$as_me:18397: \$? = $ac_status" >&5
18398   (exit $ac_status); } >/dev/null; then
18399   if test -s conftest.err; then
18400     ac_cpp_err=$ac_cxx_preproc_warn_flag
18401   else
18402     ac_cpp_err=
18403   fi
18404 else
18405   ac_cpp_err=yes
18406 fi
18407 if test -z "$ac_cpp_err"; then
18408   :
18409 else
18410   echo "$as_me: failed program was:" >&5
18411   cat conftest.$ac_ext >&5
18412   # Broken: fails on valid input.
18413 continue
18414 fi
18415 rm -f conftest.err conftest.$ac_ext
18416
18417   # OK, works on sane cases.  Now check whether non-existent headers
18418   # can be detected and how.
18419   cat >conftest.$ac_ext <<_ACEOF
18420 #line 18420 "configure"
18421 #include "confdefs.h"
18422 #include <ac_nonexistent.h>
18423 _ACEOF
18424 if { (eval echo "$as_me:18424: \"$ac_cpp conftest.$ac_ext\"") >&5
18425   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18426   ac_status=$?
18427   egrep -v '^ *\+' conftest.er1 >conftest.err
18428   rm -f conftest.er1
18429   cat conftest.err >&5
18430   echo "$as_me:18430: \$? = $ac_status" >&5
18431   (exit $ac_status); } >/dev/null; then
18432   if test -s conftest.err; then
18433     ac_cpp_err=$ac_cxx_preproc_warn_flag
18434   else
18435     ac_cpp_err=
18436   fi
18437 else
18438   ac_cpp_err=yes
18439 fi
18440 if test -z "$ac_cpp_err"; then
18441   # Broken: success on invalid input.
18442 continue
18443 else
18444   echo "$as_me: failed program was:" >&5
18445   cat conftest.$ac_ext >&5
18446   # Passes both tests.
18447 ac_preproc_ok=:
18448 break
18449 fi
18450 rm -f conftest.err conftest.$ac_ext
18451
18452 done
18453 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18454 rm -f conftest.err conftest.$ac_ext
18455 if $ac_preproc_ok; then
18456   break
18457 fi
18458
18459     done
18460     ac_cv_prog_CXXCPP=$CXXCPP
18461
18462 fi
18463   CXXCPP=$ac_cv_prog_CXXCPP
18464 else
18465   ac_cv_prog_CXXCPP=$CXXCPP
18466 fi
18467 echo "$as_me:18467: result: $CXXCPP" >&5
18468 echo "${ECHO_T}$CXXCPP" >&6
18469 ac_preproc_ok=false
18470 for ac_cxx_preproc_warn_flag in '' yes
18471 do
18472   # Use a header file that comes with gcc, so configuring glibc
18473   # with a fresh cross-compiler works.
18474   # On the NeXT, cc -E runs the code through the compiler's parser,
18475   # not just through cpp. "Syntax error" is here to catch this case.
18476   cat >conftest.$ac_ext <<_ACEOF
18477 #line 18477 "configure"
18478 #include "confdefs.h"
18479 #include <assert.h>
18480                      Syntax error
18481 _ACEOF
18482 if { (eval echo "$as_me:18482: \"$ac_cpp conftest.$ac_ext\"") >&5
18483   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18484   ac_status=$?
18485   egrep -v '^ *\+' conftest.er1 >conftest.err
18486   rm -f conftest.er1
18487   cat conftest.err >&5
18488   echo "$as_me:18488: \$? = $ac_status" >&5
18489   (exit $ac_status); } >/dev/null; then
18490   if test -s conftest.err; then
18491     ac_cpp_err=$ac_cxx_preproc_warn_flag
18492   else
18493     ac_cpp_err=
18494   fi
18495 else
18496   ac_cpp_err=yes
18497 fi
18498 if test -z "$ac_cpp_err"; then
18499   :
18500 else
18501   echo "$as_me: failed program was:" >&5
18502   cat conftest.$ac_ext >&5
18503   # Broken: fails on valid input.
18504 continue
18505 fi
18506 rm -f conftest.err conftest.$ac_ext
18507
18508   # OK, works on sane cases.  Now check whether non-existent headers
18509   # can be detected and how.
18510   cat >conftest.$ac_ext <<_ACEOF
18511 #line 18511 "configure"
18512 #include "confdefs.h"
18513 #include <ac_nonexistent.h>
18514 _ACEOF
18515 if { (eval echo "$as_me:18515: \"$ac_cpp conftest.$ac_ext\"") >&5
18516   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18517   ac_status=$?
18518   egrep -v '^ *\+' conftest.er1 >conftest.err
18519   rm -f conftest.er1
18520   cat conftest.err >&5
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit $ac_status); } >/dev/null; then
18523   if test -s conftest.err; then
18524     ac_cpp_err=$ac_cxx_preproc_warn_flag
18525   else
18526     ac_cpp_err=
18527   fi
18528 else
18529   ac_cpp_err=yes
18530 fi
18531 if test -z "$ac_cpp_err"; then
18532   # Broken: success on invalid input.
18533 continue
18534 else
18535   echo "$as_me: failed program was:" >&5
18536   cat conftest.$ac_ext >&5
18537   # Passes both tests.
18538 ac_preproc_ok=:
18539 break
18540 fi
18541 rm -f conftest.err conftest.$ac_ext
18542
18543 done
18544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18545 rm -f conftest.err conftest.$ac_ext
18546 if $ac_preproc_ok; then
18547   :
18548 else
18549   { { echo "$as_me:18549: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18550 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18551    { (exit 1); exit 1; }; }
18552 fi
18553
18554 ac_ext=cc
18555 ac_cpp='$CXXCPP $CPPFLAGS'
18556 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18557 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18558 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18559 ac_main_return=return
18560
18561 for ac_header in typeinfo
18562 do
18563 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18564 echo "$as_me:18564: checking for $ac_header" >&5
18565 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18566 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18567   echo $ECHO_N "(cached) $ECHO_C" >&6
18568 else
18569   cat >conftest.$ac_ext <<_ACEOF
18570 #line 18570 "configure"
18571 #include "confdefs.h"
18572 #include <$ac_header>
18573 _ACEOF
18574 if { (eval echo "$as_me:18574: \"$ac_cpp conftest.$ac_ext\"") >&5
18575   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18576   ac_status=$?
18577   egrep -v '^ *\+' conftest.er1 >conftest.err
18578   rm -f conftest.er1
18579   cat conftest.err >&5
18580   echo "$as_me:18580: \$? = $ac_status" >&5
18581   (exit $ac_status); } >/dev/null; then
18582   if test -s conftest.err; then
18583     ac_cpp_err=$ac_cxx_preproc_warn_flag
18584   else
18585     ac_cpp_err=
18586   fi
18587 else
18588   ac_cpp_err=yes
18589 fi
18590 if test -z "$ac_cpp_err"; then
18591   eval "$as_ac_Header=yes"
18592 else
18593   echo "$as_me: failed program was:" >&5
18594   cat conftest.$ac_ext >&5
18595   eval "$as_ac_Header=no"
18596 fi
18597 rm -f conftest.err conftest.$ac_ext
18598 fi
18599 echo "$as_me:18599: result: `eval echo '${'$as_ac_Header'}'`" >&5
18600 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18601 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18602   cat >>confdefs.h <<EOF
18603 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18604 EOF
18605
18606 fi
18607 done
18608
18609 for ac_header in iostream
18610 do
18611 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18612 echo "$as_me:18612: checking for $ac_header" >&5
18613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18615   echo $ECHO_N "(cached) $ECHO_C" >&6
18616 else
18617   cat >conftest.$ac_ext <<_ACEOF
18618 #line 18618 "configure"
18619 #include "confdefs.h"
18620 #include <$ac_header>
18621 _ACEOF
18622 if { (eval echo "$as_me:18622: \"$ac_cpp conftest.$ac_ext\"") >&5
18623   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18624   ac_status=$?
18625   egrep -v '^ *\+' conftest.er1 >conftest.err
18626   rm -f conftest.er1
18627   cat conftest.err >&5
18628   echo "$as_me:18628: \$? = $ac_status" >&5
18629   (exit $ac_status); } >/dev/null; then
18630   if test -s conftest.err; then
18631     ac_cpp_err=$ac_cxx_preproc_warn_flag
18632   else
18633     ac_cpp_err=
18634   fi
18635 else
18636   ac_cpp_err=yes
18637 fi
18638 if test -z "$ac_cpp_err"; then
18639   eval "$as_ac_Header=yes"
18640 else
18641   echo "$as_me: failed program was:" >&5
18642   cat conftest.$ac_ext >&5
18643   eval "$as_ac_Header=no"
18644 fi
18645 rm -f conftest.err conftest.$ac_ext
18646 fi
18647 echo "$as_me:18647: result: `eval echo '${'$as_ac_Header'}'`" >&5
18648 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18649 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18650   cat >>confdefs.h <<EOF
18651 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18652 EOF
18653
18654 fi
18655 done
18656
18657 if test x"$ac_cv_header_iostream" = xyes ; then
18658         echo "$as_me:18658: checking if iostream uses std-namespace" >&5
18659 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18660         cat >conftest.$ac_ext <<_ACEOF
18661 #line 18661 "configure"
18662 #include "confdefs.h"
18663
18664 #include <iostream>
18665 using std::endl;
18666 using std::cerr;
18667 int
18668 main ()
18669 {
18670
18671 cerr << "testing" << endl;
18672
18673   ;
18674   return 0;
18675 }
18676 _ACEOF
18677 rm -f conftest.$ac_objext
18678 if { (eval echo "$as_me:18678: \"$ac_compile\"") >&5
18679   (eval $ac_compile) 2>&5
18680   ac_status=$?
18681   echo "$as_me:18681: \$? = $ac_status" >&5
18682   (exit $ac_status); } &&
18683          { ac_try='test -s conftest.$ac_objext'
18684   { (eval echo "$as_me:18684: \"$ac_try\"") >&5
18685   (eval $ac_try) 2>&5
18686   ac_status=$?
18687   echo "$as_me:18687: \$? = $ac_status" >&5
18688   (exit $ac_status); }; }; then
18689   cf_iostream_namespace=yes
18690 else
18691   echo "$as_me: failed program was:" >&5
18692 cat conftest.$ac_ext >&5
18693 cf_iostream_namespace=no
18694 fi
18695 rm -f conftest.$ac_objext conftest.$ac_ext
18696         echo "$as_me:18696: result: $cf_iostream_namespace" >&5
18697 echo "${ECHO_T}$cf_iostream_namespace" >&6
18698         if test "$cf_iostream_namespace" = yes ; then
18699
18700 cat >>confdefs.h <<\EOF
18701 #define IOSTREAM_NAMESPACE 1
18702 EOF
18703
18704         fi
18705 fi
18706
18707 echo "$as_me:18707: checking if we should include stdbool.h" >&5
18708 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18709
18710 if test "${cf_cv_header_stdbool_h+set}" = set; then
18711   echo $ECHO_N "(cached) $ECHO_C" >&6
18712 else
18713
18714         cat >conftest.$ac_ext <<_ACEOF
18715 #line 18715 "configure"
18716 #include "confdefs.h"
18717
18718 int
18719 main ()
18720 {
18721 bool foo = false
18722   ;
18723   return 0;
18724 }
18725 _ACEOF
18726 rm -f conftest.$ac_objext
18727 if { (eval echo "$as_me:18727: \"$ac_compile\"") >&5
18728   (eval $ac_compile) 2>&5
18729   ac_status=$?
18730   echo "$as_me:18730: \$? = $ac_status" >&5
18731   (exit $ac_status); } &&
18732          { ac_try='test -s conftest.$ac_objext'
18733   { (eval echo "$as_me:18733: \"$ac_try\"") >&5
18734   (eval $ac_try) 2>&5
18735   ac_status=$?
18736   echo "$as_me:18736: \$? = $ac_status" >&5
18737   (exit $ac_status); }; }; then
18738   cf_cv_header_stdbool_h=0
18739 else
18740   echo "$as_me: failed program was:" >&5
18741 cat conftest.$ac_ext >&5
18742 cat >conftest.$ac_ext <<_ACEOF
18743 #line 18743 "configure"
18744 #include "confdefs.h"
18745
18746 #ifndef __BEOS__
18747 #include <stdbool.h>
18748 #endif
18749
18750 int
18751 main ()
18752 {
18753 bool foo = false
18754   ;
18755   return 0;
18756 }
18757 _ACEOF
18758 rm -f conftest.$ac_objext
18759 if { (eval echo "$as_me:18759: \"$ac_compile\"") >&5
18760   (eval $ac_compile) 2>&5
18761   ac_status=$?
18762   echo "$as_me:18762: \$? = $ac_status" >&5
18763   (exit $ac_status); } &&
18764          { ac_try='test -s conftest.$ac_objext'
18765   { (eval echo "$as_me:18765: \"$ac_try\"") >&5
18766   (eval $ac_try) 2>&5
18767   ac_status=$?
18768   echo "$as_me:18768: \$? = $ac_status" >&5
18769   (exit $ac_status); }; }; then
18770   cf_cv_header_stdbool_h=1
18771 else
18772   echo "$as_me: failed program was:" >&5
18773 cat conftest.$ac_ext >&5
18774 cf_cv_header_stdbool_h=0
18775 fi
18776 rm -f conftest.$ac_objext conftest.$ac_ext
18777 fi
18778 rm -f conftest.$ac_objext conftest.$ac_ext
18779 fi
18780
18781 if test "$cf_cv_header_stdbool_h" = 1
18782 then    echo "$as_me:18782: result: yes" >&5
18783 echo "${ECHO_T}yes" >&6
18784 else    echo "$as_me:18784: result: no" >&5
18785 echo "${ECHO_T}no" >&6
18786 fi
18787
18788 echo "$as_me:18788: checking for builtin bool type" >&5
18789 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18790
18791 if test "${cf_cv_builtin_bool+set}" = set; then
18792   echo $ECHO_N "(cached) $ECHO_C" >&6
18793 else
18794
18795         cat >conftest.$ac_ext <<_ACEOF
18796 #line 18796 "configure"
18797 #include "confdefs.h"
18798
18799 #include <stdio.h>
18800 #include <sys/types.h>
18801
18802 int
18803 main ()
18804 {
18805 bool x = false
18806   ;
18807   return 0;
18808 }
18809 _ACEOF
18810 rm -f conftest.$ac_objext
18811 if { (eval echo "$as_me:18811: \"$ac_compile\"") >&5
18812   (eval $ac_compile) 2>&5
18813   ac_status=$?
18814   echo "$as_me:18814: \$? = $ac_status" >&5
18815   (exit $ac_status); } &&
18816          { ac_try='test -s conftest.$ac_objext'
18817   { (eval echo "$as_me:18817: \"$ac_try\"") >&5
18818   (eval $ac_try) 2>&5
18819   ac_status=$?
18820   echo "$as_me:18820: \$? = $ac_status" >&5
18821   (exit $ac_status); }; }; then
18822   cf_cv_builtin_bool=1
18823 else
18824   echo "$as_me: failed program was:" >&5
18825 cat conftest.$ac_ext >&5
18826 cf_cv_builtin_bool=0
18827 fi
18828 rm -f conftest.$ac_objext conftest.$ac_ext
18829
18830 fi
18831
18832 if test "$cf_cv_builtin_bool" = 1
18833 then    echo "$as_me:18833: result: yes" >&5
18834 echo "${ECHO_T}yes" >&6
18835 else    echo "$as_me:18835: result: no" >&5
18836 echo "${ECHO_T}no" >&6
18837 fi
18838
18839 echo "$as_me:18839: checking for size of bool" >&5
18840 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18841 if test "${cf_cv_type_of_bool+set}" = set; then
18842   echo $ECHO_N "(cached) $ECHO_C" >&6
18843 else
18844
18845         rm -f cf_test.out
18846         if test "$cross_compiling" = yes; then
18847   cf_cv_type_of_bool=unknown
18848 else
18849   cat >conftest.$ac_ext <<_ACEOF
18850 #line 18850 "configure"
18851 #include "confdefs.h"
18852
18853 #include <stdlib.h>
18854 #include <stdio.h>
18855
18856 #if defined(__cplusplus)
18857
18858 #ifdef HAVE_GXX_BUILTIN_H
18859 #include <g++/builtin.h>
18860 #elif HAVE_GPP_BUILTIN_H
18861 #include <gpp/builtin.h>
18862 #elif HAVE_BUILTIN_H
18863 #include <builtin.h>
18864 #endif
18865
18866 #else
18867
18868 #if $cf_cv_header_stdbool_h
18869 #include <stdbool.h>
18870 #endif
18871
18872 #endif
18873
18874 int main()
18875 {
18876         FILE *fp = fopen("cf_test.out", "w");
18877         if (fp != 0) {
18878                 bool x = true;
18879                 if ((bool)(-x) >= 0)
18880                         fputs("unsigned ", fp);
18881                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18882                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18883                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18884                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18885                 fclose(fp);
18886         }
18887         ${cf_cv_main_return:-return}(0);
18888 }
18889
18890 _ACEOF
18891 rm -f conftest$ac_exeext
18892 if { (eval echo "$as_me:18892: \"$ac_link\"") >&5
18893   (eval $ac_link) 2>&5
18894   ac_status=$?
18895   echo "$as_me:18895: \$? = $ac_status" >&5
18896   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18897   { (eval echo "$as_me:18897: \"$ac_try\"") >&5
18898   (eval $ac_try) 2>&5
18899   ac_status=$?
18900   echo "$as_me:18900: \$? = $ac_status" >&5
18901   (exit $ac_status); }; }; then
18902   cf_cv_type_of_bool=`cat cf_test.out`
18903                  if test -z "$cf_cv_type_of_bool"; then
18904                    cf_cv_type_of_bool=unknown
18905                  fi
18906 else
18907   echo "$as_me: program exited with status $ac_status" >&5
18908 echo "$as_me: failed program was:" >&5
18909 cat conftest.$ac_ext >&5
18910 cf_cv_type_of_bool=unknown
18911 fi
18912 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18913 fi
18914
18915 fi
18916
18917         rm -f cf_test.out
18918 echo "$as_me:18918: result: $cf_cv_type_of_bool" >&5
18919 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18920 if test "$cf_cv_type_of_bool" = unknown ; then
18921         case .$NCURSES_BOOL in #(vi
18922         .auto|.) NCURSES_BOOL=unsigned;;
18923         esac
18924         { echo "$as_me:18924: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18925 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18926         cf_cv_type_of_bool=$NCURSES_BOOL
18927 fi
18928
18929 echo "$as_me:18929: checking for special defines needed for etip.h" >&5
18930 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18931 cf_save_CXXFLAGS="$CXXFLAGS"
18932 cf_result="none"
18933
18934 # etip.h includes ncurses.h which includes ncurses_dll.h
18935 # But ncurses_dll.h is generated - fix here.
18936 test -d include || mkdir include
18937 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
18938
18939 for cf_math in "" MATH_H
18940 do
18941 for cf_excp in "" MATH_EXCEPTION
18942 do
18943         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18944         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18945         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18946 cat >conftest.$ac_ext <<_ACEOF
18947 #line 18947 "configure"
18948 #include "confdefs.h"
18949
18950 #include <etip.h.in>
18951
18952 int
18953 main ()
18954 {
18955
18956   ;
18957   return 0;
18958 }
18959 _ACEOF
18960 rm -f conftest.$ac_objext
18961 if { (eval echo "$as_me:18961: \"$ac_compile\"") >&5
18962   (eval $ac_compile) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit $ac_status); } &&
18966          { ac_try='test -s conftest.$ac_objext'
18967   { (eval echo "$as_me:18967: \"$ac_try\"") >&5
18968   (eval $ac_try) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit $ac_status); }; }; then
18972
18973         test -n "$cf_math" && cat >>confdefs.h <<EOF
18974 #define ETIP_NEEDS_${cf_math} 1
18975 EOF
18976
18977         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18978 #define ETIP_NEEDS_${cf_excp} 1
18979 EOF
18980
18981         cf_result="$cf_math $cf_excp"
18982         break 2
18983
18984 else
18985   echo "$as_me: failed program was:" >&5
18986 cat conftest.$ac_ext >&5
18987 fi
18988 rm -f conftest.$ac_objext conftest.$ac_ext
18989 done
18990 done
18991 echo "$as_me:18991: result: $cf_result" >&5
18992 echo "${ECHO_T}$cf_result" >&6
18993 CXXFLAGS="$cf_save_CXXFLAGS"
18994
18995 if test -n "$CXX"; then
18996 echo "$as_me:18996: checking if $CXX accepts parameter initialization" >&5
18997 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18998 if test "${cf_cv_cpp_param_init+set}" = set; then
18999   echo $ECHO_N "(cached) $ECHO_C" >&6
19000 else
19001
19002         ac_ext=cc
19003 ac_cpp='$CXXCPP $CPPFLAGS'
19004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19005 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19007 ac_main_return=return
19008
19009         if test "$cross_compiling" = yes; then
19010   cf_cv_cpp_param_init=unknown
19011 else
19012   cat >conftest.$ac_ext <<_ACEOF
19013 #line 19013 "configure"
19014 #include "confdefs.h"
19015
19016 class TEST {
19017 private:
19018         int value;
19019 public:
19020         TEST(int x = 1);
19021         ~TEST();
19022 };
19023
19024 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19025 {
19026         value = x;
19027 }
19028 int main() { }
19029
19030 _ACEOF
19031 rm -f conftest$ac_exeext
19032 if { (eval echo "$as_me:19032: \"$ac_link\"") >&5
19033   (eval $ac_link) 2>&5
19034   ac_status=$?
19035   echo "$as_me:19035: \$? = $ac_status" >&5
19036   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19037   { (eval echo "$as_me:19037: \"$ac_try\"") >&5
19038   (eval $ac_try) 2>&5
19039   ac_status=$?
19040   echo "$as_me:19040: \$? = $ac_status" >&5
19041   (exit $ac_status); }; }; then
19042   cf_cv_cpp_param_init=yes
19043 else
19044   echo "$as_me: program exited with status $ac_status" >&5
19045 echo "$as_me: failed program was:" >&5
19046 cat conftest.$ac_ext >&5
19047 cf_cv_cpp_param_init=no
19048 fi
19049 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19050 fi
19051         ac_ext=cc
19052 ac_cpp='$CXXCPP $CPPFLAGS'
19053 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19054 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19055 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19056 ac_main_return=return
19057
19058 fi
19059 echo "$as_me:19059: result: $cf_cv_cpp_param_init" >&5
19060 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19061 fi
19062 test "$cf_cv_cpp_param_init" = yes &&
19063 cat >>confdefs.h <<\EOF
19064 #define CPP_HAS_PARAM_INIT 1
19065 EOF
19066
19067 if test -n "$CXX"; then
19068
19069 echo "$as_me:19069: checking if $CXX accepts static_cast" >&5
19070 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19071 if test "${cf_cv_cpp_static_cast+set}" = set; then
19072   echo $ECHO_N "(cached) $ECHO_C" >&6
19073 else
19074
19075         ac_ext=cc
19076 ac_cpp='$CXXCPP $CPPFLAGS'
19077 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19078 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19079 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19080 ac_main_return=return
19081
19082         cat >conftest.$ac_ext <<_ACEOF
19083 #line 19083 "configure"
19084 #include "confdefs.h"
19085
19086 class NCursesPanel
19087 {
19088 public:
19089   NCursesPanel(int nlines,
19090                int ncols,
19091                int begin_y = 0,
19092                int begin_x = 0)
19093   {
19094   }
19095   NCursesPanel();
19096   ~NCursesPanel();
19097 };
19098
19099 template<class T> class NCursesUserPanel : public NCursesPanel
19100 {
19101 public:
19102   NCursesUserPanel (int nlines,
19103                     int ncols,
19104                     int begin_y = 0,
19105                     int begin_x = 0,
19106                     const T* p_UserData = static_cast<T*>(0))
19107     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19108   {
19109   };
19110   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19111   {
19112   };
19113
19114   virtual ~NCursesUserPanel() {};
19115 };
19116
19117 int
19118 main ()
19119 {
19120
19121         const char* p_UserData = static_cast<char*>(0)
19122   ;
19123   return 0;
19124 }
19125 _ACEOF
19126 rm -f conftest.$ac_objext
19127 if { (eval echo "$as_me:19127: \"$ac_compile\"") >&5
19128   (eval $ac_compile) 2>&5
19129   ac_status=$?
19130   echo "$as_me:19130: \$? = $ac_status" >&5
19131   (exit $ac_status); } &&
19132          { ac_try='test -s conftest.$ac_objext'
19133   { (eval echo "$as_me:19133: \"$ac_try\"") >&5
19134   (eval $ac_try) 2>&5
19135   ac_status=$?
19136   echo "$as_me:19136: \$? = $ac_status" >&5
19137   (exit $ac_status); }; }; then
19138   cf_cv_cpp_static_cast=yes
19139 else
19140   echo "$as_me: failed program was:" >&5
19141 cat conftest.$ac_ext >&5
19142 cf_cv_cpp_static_cast=no
19143 fi
19144 rm -f conftest.$ac_objext conftest.$ac_ext
19145
19146         ac_ext=cc
19147 ac_cpp='$CXXCPP $CPPFLAGS'
19148 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19149 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19150 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19151 ac_main_return=return
19152
19153 fi
19154 echo "$as_me:19154: result: $cf_cv_cpp_static_cast" >&5
19155 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19156
19157 fi
19158
19159 test "$cf_cv_cpp_static_cast" = yes &&
19160 cat >>confdefs.h <<\EOF
19161 #define CPP_HAS_STATIC_CAST 1
19162 EOF
19163
19164         CXX_AR='$(AR)'
19165         CXX_ARFLAGS='$(ARFLAGS)'
19166         case $cf_cv_system_name in #(vi
19167         irix*) #(vi
19168             if test "$GXX" != yes ; then
19169                 CXX_AR='$(CXX)'
19170                 CXX_ARFLAGS='-ar -o'
19171             fi
19172             ;;
19173         sco3.2v5*) #(vi
19174             CXXLDFLAGS="-u main"
19175             ;;
19176         solaris2*)
19177             if test "$GXX" != yes ; then
19178                 CXX_AR='$(CXX)'
19179                 CXX_ARFLAGS='-xar -o'
19180             fi
19181             ;;
19182         esac
19183
19184 else
19185         cf_cxx_library=no
19186         cf_cv_builtin_bool=1
19187
19188         # Just because we are not configuring against C++ right now does not
19189         # mean that a user will not want to use C++.  Some distributors disable
19190         # the C++ portion of this configuration as a shortcut (or just to avoid
19191         # compiling the demo in the c++ directory).  So we need a reasonable
19192         # default for the 'bool' type.
19193         #
19194         # Caveat: since the storage of the bool type is not standardized, it
19195         # may change.
19196
19197         if test "$NCURSES_BOOL" != auto ; then
19198                 cf_cv_type_of_bool=$NCURSES_BOOL
19199                 cf_cv_header_stdbool_h=0
19200         else
19201                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19202
19203 echo "$as_me:19203: checking for size of bool" >&5
19204 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19205 if test "${cf_cv_type_of_bool+set}" = set; then
19206   echo $ECHO_N "(cached) $ECHO_C" >&6
19207 else
19208
19209         rm -f cf_test.out
19210         if test "$cross_compiling" = yes; then
19211   cf_cv_type_of_bool=unknown
19212 else
19213   cat >conftest.$ac_ext <<_ACEOF
19214 #line 19214 "configure"
19215 #include "confdefs.h"
19216
19217 #include <stdlib.h>
19218 #include <stdio.h>
19219
19220 #if defined(__cplusplus)
19221
19222 #ifdef HAVE_GXX_BUILTIN_H
19223 #include <g++/builtin.h>
19224 #elif HAVE_GPP_BUILTIN_H
19225 #include <gpp/builtin.h>
19226 #elif HAVE_BUILTIN_H
19227 #include <builtin.h>
19228 #endif
19229
19230 #else
19231
19232 #if $cf_cv_header_stdbool_h
19233 #include <stdbool.h>
19234 #endif
19235
19236 #endif
19237
19238 int main()
19239 {
19240         FILE *fp = fopen("cf_test.out", "w");
19241         if (fp != 0) {
19242                 bool x = true;
19243                 if ((bool)(-x) >= 0)
19244                         fputs("unsigned ", fp);
19245                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19246                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19247                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19248                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19249                 fclose(fp);
19250         }
19251         ${cf_cv_main_return:-return}(0);
19252 }
19253
19254 _ACEOF
19255 rm -f conftest$ac_exeext
19256 if { (eval echo "$as_me:19256: \"$ac_link\"") >&5
19257   (eval $ac_link) 2>&5
19258   ac_status=$?
19259   echo "$as_me:19259: \$? = $ac_status" >&5
19260   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19261   { (eval echo "$as_me:19261: \"$ac_try\"") >&5
19262   (eval $ac_try) 2>&5
19263   ac_status=$?
19264   echo "$as_me:19264: \$? = $ac_status" >&5
19265   (exit $ac_status); }; }; then
19266   cf_cv_type_of_bool=`cat cf_test.out`
19267                  if test -z "$cf_cv_type_of_bool"; then
19268                    cf_cv_type_of_bool=unknown
19269                  fi
19270 else
19271   echo "$as_me: program exited with status $ac_status" >&5
19272 echo "$as_me: failed program was:" >&5
19273 cat conftest.$ac_ext >&5
19274 cf_cv_type_of_bool=unknown
19275 fi
19276 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19277 fi
19278
19279 fi
19280
19281         rm -f cf_test.out
19282 echo "$as_me:19282: result: $cf_cv_type_of_bool" >&5
19283 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19284 if test "$cf_cv_type_of_bool" = unknown ; then
19285         case .$NCURSES_BOOL in #(vi
19286         .auto|.) NCURSES_BOOL=unsigned;;
19287         esac
19288         { echo "$as_me:19288: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19289 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19290         cf_cv_type_of_bool=$NCURSES_BOOL
19291 fi
19292
19293                 else
19294                         echo "$as_me:19294: checking for fallback type of bool" >&5
19295 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19296                         case "$host_cpu" in #(vi
19297                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19298                         *)      cf_cv_type_of_bool=int  ;;
19299                         esac
19300                         echo "$as_me:19300: result: $cf_cv_type_of_bool" >&5
19301 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19302                 fi
19303         fi
19304 fi
19305
19306 # If the C compiler did not declare bool, and we did not determine that the C++
19307 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19308 # ncurses library use the same type as C++ bool.  Note that this allows one to
19309 # specify the type of bool in a configure-script option and postpone
19310 # integration with the C++ compiler provided that the types are compatible.
19311 USE_CXX_BOOL=1
19312 if test $cf_cv_cc_bool_type = 1
19313 then
19314         # oops: C has a bool.  Unlikely, but C++ could differ.
19315         USE_CXX_BOOL=0
19316 elif test $cf_cv_builtin_bool = 0
19317 then
19318         # C++ has no bool
19319         USE_CXX_BOOL=0
19320 else
19321         # this is the normal case
19322         USE_CXX_BOOL='defined(__cplusplus)'
19323 fi
19324
19325 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19326
19327         if test "$cf_with_ada" != "no" ; then
19328                 if test "$with_libtool" != "no"; then
19329                         { echo "$as_me:19329: WARNING: libtool does not support Ada - disabling feature" >&5
19330 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19331                         cf_with_ada=no
19332                 fi
19333         fi
19334
19335         if test "$cf_with_ada" != "no" ; then
19336
19337 cf_ada_make=gnatmake
19338 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19339 set dummy $cf_ada_make; ac_word=$2
19340 echo "$as_me:19340: checking for $ac_word" >&5
19341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19342 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19343   echo $ECHO_N "(cached) $ECHO_C" >&6
19344 else
19345   if test -n "$gnat_exists"; then
19346   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19347 else
19348   ac_save_IFS=$IFS; IFS=$ac_path_separator
19349 ac_dummy="$PATH"
19350 for ac_dir in $ac_dummy; do
19351   IFS=$ac_save_IFS
19352   test -z "$ac_dir" && ac_dir=.
19353   $as_executable_p "$ac_dir/$ac_word" || continue
19354 ac_cv_prog_gnat_exists="yes"
19355 echo "$as_me:19355: found $ac_dir/$ac_word" >&5
19356 break
19357 done
19358
19359   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19360 fi
19361 fi
19362 gnat_exists=$ac_cv_prog_gnat_exists
19363 if test -n "$gnat_exists"; then
19364   echo "$as_me:19364: result: $gnat_exists" >&5
19365 echo "${ECHO_T}$gnat_exists" >&6
19366 else
19367   echo "$as_me:19367: result: no" >&5
19368 echo "${ECHO_T}no" >&6
19369 fi
19370
19371 if test "$ac_cv_prog_gnat_exists" = no; then
19372    cf_ada_make=
19373    cf_cv_prog_gnat_correct=no
19374 else
19375
19376 echo "$as_me:19376: checking for gnat version" >&5
19377 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19378 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19379         grep '[0-9].[0-9][0-9]*' |\
19380     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19381 echo "$as_me:19381: result: $cf_gnat_version" >&5
19382 echo "${ECHO_T}$cf_gnat_version" >&6
19383
19384 case $cf_gnat_version in #(vi
19385 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19386         cf_cv_prog_gnat_correct=yes
19387         ;;
19388 *)
19389         { echo "$as_me:19389: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19390 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19391         cf_cv_prog_gnat_correct=no
19392         ;;
19393 esac
19394
19395    # Extract the first word of "m4", so it can be a program name with args.
19396 set dummy m4; ac_word=$2
19397 echo "$as_me:19397: checking for $ac_word" >&5
19398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19399 if test "${ac_cv_prog_M4_exists+set}" = set; then
19400   echo $ECHO_N "(cached) $ECHO_C" >&6
19401 else
19402   if test -n "$M4_exists"; then
19403   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19404 else
19405   ac_save_IFS=$IFS; IFS=$ac_path_separator
19406 ac_dummy="$PATH"
19407 for ac_dir in $ac_dummy; do
19408   IFS=$ac_save_IFS
19409   test -z "$ac_dir" && ac_dir=.
19410   $as_executable_p "$ac_dir/$ac_word" || continue
19411 ac_cv_prog_M4_exists="yes"
19412 echo "$as_me:19412: found $ac_dir/$ac_word" >&5
19413 break
19414 done
19415
19416   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19417 fi
19418 fi
19419 M4_exists=$ac_cv_prog_M4_exists
19420 if test -n "$M4_exists"; then
19421   echo "$as_me:19421: result: $M4_exists" >&5
19422 echo "${ECHO_T}$M4_exists" >&6
19423 else
19424   echo "$as_me:19424: result: no" >&5
19425 echo "${ECHO_T}no" >&6
19426 fi
19427
19428    if test "$ac_cv_prog_M4_exists" = no; then
19429       cf_cv_prog_gnat_correct=no
19430       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19431    fi
19432    if test "$cf_cv_prog_gnat_correct" = yes; then
19433       echo "$as_me:19433: checking if GNAT works" >&5
19434 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19435
19436 rm -rf conftest* *~conftest*
19437 cat >>conftest.ads <<CF_EOF
19438 procedure conftest;
19439 CF_EOF
19440 cat >>conftest.adb <<CF_EOF
19441 with Text_IO;
19442 with GNAT.OS_Lib;
19443 procedure conftest is
19444 begin
19445    Text_IO.Put ("Hello World");
19446    Text_IO.New_Line;
19447    GNAT.OS_Lib.OS_Exit (0);
19448 end conftest;
19449 CF_EOF
19450 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19451    if ( ./conftest 1>&5 2>&1 ) ; then
19452       cf_cv_prog_gnat_correct=yes
19453    else
19454       cf_cv_prog_gnat_correct=no
19455    fi
19456 else
19457    cf_cv_prog_gnat_correct=no
19458 fi
19459 rm -rf conftest* *~conftest*
19460
19461       echo "$as_me:19461: result: $cf_cv_prog_gnat_correct" >&5
19462 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19463    fi
19464 fi
19465
19466                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19467
19468         ADAFLAGS="$ADAFLAGS -gnatpn"
19469
19470         echo "$as_me:19470: checking optimization options for ADAFLAGS" >&5
19471 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19472         case "$CFLAGS" in
19473         *-g*)
19474
19475         ADAFLAGS="$ADAFLAGS -g"
19476
19477                 ;;
19478         esac
19479         case "$CFLAGS" in
19480         *-O*)
19481                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19482
19483         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19484
19485                 ;;
19486         esac
19487         echo "$as_me:19487: result: $ADAFLAGS" >&5
19488 echo "${ECHO_T}$ADAFLAGS" >&6
19489
19490 echo "$as_me:19490: checking if GNAT supports generics" >&5
19491 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19492 case $cf_gnat_version in #(vi
19493 3.[1-9]*|[4-9].*) #(vi
19494         cf_gnat_generics=yes
19495         ;;
19496 *)
19497         cf_gnat_generics=no
19498         ;;
19499 esac
19500 echo "$as_me:19500: result: $cf_gnat_generics" >&5
19501 echo "${ECHO_T}$cf_gnat_generics" >&6
19502
19503 if test "$cf_gnat_generics" = yes
19504 then
19505         cf_compile_generics=generics
19506         cf_generic_objects="\${GENOBJS}"
19507 else
19508         cf_compile_generics=
19509         cf_generic_objects=
19510 fi
19511
19512 echo "$as_me:19512: checking if GNAT supports SIGINT" >&5
19513 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19514 if test "${cf_cv_gnat_sigint+set}" = set; then
19515   echo $ECHO_N "(cached) $ECHO_C" >&6
19516 else
19517
19518 rm -rf conftest* *~conftest*
19519 cat >>conftest.ads <<CF_EOF
19520 with Ada.Interrupts.Names;
19521
19522 package ConfTest is
19523
19524    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19525    pragma Unreserve_All_Interrupts;
19526    pragma Warnings (On);
19527
19528    protected Process is
19529       procedure Stop;
19530       function Continue return Boolean;
19531       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19532    private
19533       Done : Boolean := False;
19534    end Process;
19535
19536 end ConfTest;
19537 CF_EOF
19538 cat >>conftest.adb <<CF_EOF
19539 package body ConfTest is
19540    protected body Process is
19541       procedure Stop is
19542       begin
19543          Done := True;
19544       end Stop;
19545       function Continue return Boolean is
19546       begin
19547          return not Done;
19548       end Continue;
19549    end Process;
19550 end ConfTest;
19551 CF_EOF
19552 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19553       cf_cv_gnat_sigint=yes
19554 else
19555    cf_cv_gnat_sigint=no
19556 fi
19557 rm -rf conftest* *~conftest*
19558
19559 fi
19560 echo "$as_me:19560: result: $cf_cv_gnat_sigint" >&5
19561 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19562
19563 if test $cf_cv_gnat_sigint = yes ; then
19564         USE_GNAT_SIGINT=""
19565 else
19566         USE_GNAT_SIGINT="#"
19567 fi
19568
19569 echo "$as_me:19569: checking if GNAT pragma Unreferenced works" >&5
19570 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19571 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19572   echo $ECHO_N "(cached) $ECHO_C" >&6
19573 else
19574
19575 rm -rf conftest* *~conftest*
19576 cat >>conftest.ads <<CF_EOF
19577 procedure conftest;
19578 CF_EOF
19579 cat >>conftest.adb <<CF_EOF
19580 with Text_IO;
19581 with GNAT.OS_Lib;
19582 procedure conftest is
19583    test : Integer;
19584    pragma Unreferenced (test);
19585 begin
19586    test := 1;
19587    Text_IO.Put ("Hello World");
19588    Text_IO.New_Line;
19589    GNAT.OS_Lib.OS_Exit (0);
19590 end conftest;
19591 CF_EOF
19592 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19593       cf_cv_pragma_unreferenced=yes
19594 else
19595    cf_cv_pragma_unreferenced=no
19596 fi
19597 rm -rf conftest* *~conftest*
19598
19599 fi
19600 echo "$as_me:19600: result: $cf_cv_pragma_unreferenced" >&5
19601 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19602
19603 # if the pragma is supported, use it (needed in the Trace code).
19604 if test $cf_cv_pragma_unreferenced = yes ; then
19605         PRAGMA_UNREF=TRUE
19606 else
19607         PRAGMA_UNREF=FALSE
19608 fi
19609
19610 cf_gnat_libraries=no
19611 cf_gnat_projects=no
19612
19613 echo "$as_me:19613: checking if GNAT supports project files" >&5
19614 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19615 case $cf_gnat_version in #(vi
19616 3.[0-9]*) #(vi
19617         ;;
19618 *)
19619         case $cf_cv_system_name in #(vi
19620         cygwin*) #(vi
19621                 ;;
19622         *)
19623                 mkdir conftest.src conftest.bin conftest.lib
19624                 cd conftest.src
19625                 rm -rf conftest* *~conftest*
19626                 cat >>library.gpr <<CF_EOF
19627 project Library is
19628   Kind := External ("LIB_KIND");
19629   for Library_Name use "ConfTest";
19630   for Object_Dir use ".";
19631   for Library_ALI_Dir use External("LIBRARY_DIR");
19632   for Library_Version use External ("SONAME");
19633   for Library_Kind use Kind;
19634   for Library_Dir use External("BUILD_DIR");
19635   Source_Dir := External ("SOURCE_DIR");
19636   for Source_Dirs use (Source_Dir);
19637   package Compiler is
19638      for Default_Switches ("Ada") use
19639        ("-g",
19640         "-O2",
19641         "-gnatafno",
19642         "-gnatVa",   -- All validity checks
19643         "-gnatwa");  -- Activate all optional errors
19644   end Compiler;
19645 end Library;
19646 CF_EOF
19647                 cat >>confpackage.ads <<CF_EOF
19648 package ConfPackage is
19649    procedure conftest;
19650 end ConfPackage;
19651 CF_EOF
19652                 cat >>confpackage.adb <<CF_EOF
19653 with Text_IO;
19654 package body ConfPackage is
19655    procedure conftest is
19656    begin
19657       Text_IO.Put ("Hello World");
19658       Text_IO.New_Line;
19659    end conftest;
19660 end ConfPackage;
19661 CF_EOF
19662                 if ( $cf_ada_make $ADAFLAGS \
19663                                 -Plibrary.gpr \
19664                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19665                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19666                                 -XSOURCE_DIR=`pwd` \
19667                                 -XSONAME=libConfTest.so.1 \
19668                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19669                         cf_gnat_projects=yes
19670                 fi
19671                 cd ..
19672                 if test -f conftest.lib/confpackage.ali
19673                 then
19674                         cf_gnat_libraries=yes
19675                 fi
19676                 rm -rf conftest* *~conftest*
19677                 ;;
19678         esac
19679         ;;
19680 esac
19681 echo "$as_me:19681: result: $cf_gnat_projects" >&5
19682 echo "${ECHO_T}$cf_gnat_projects" >&6
19683
19684 if test $cf_gnat_projects = yes
19685 then
19686         echo "$as_me:19686: checking if GNAT supports libraries" >&5
19687 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19688         echo "$as_me:19688: result: $cf_gnat_libraries" >&5
19689 echo "${ECHO_T}$cf_gnat_libraries" >&6
19690 fi
19691
19692 if test "$cf_gnat_projects" = yes
19693 then
19694         USE_OLD_MAKERULES="#"
19695         USE_GNAT_PROJECTS=""
19696 else
19697         USE_OLD_MAKERULES=""
19698         USE_GNAT_PROJECTS="#"
19699 fi
19700
19701 if test "$cf_gnat_libraries" = yes
19702 then
19703         USE_GNAT_LIBRARIES=""
19704 else
19705         USE_GNAT_LIBRARIES="#"
19706 fi
19707
19708 echo "$as_me:19708: checking for ada-compiler" >&5
19709 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19710
19711 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19712 if test "${with_ada_compiler+set}" = set; then
19713   withval="$with_ada_compiler"
19714   cf_ada_compiler=$withval
19715 else
19716   cf_ada_compiler=gnatmake
19717 fi;
19718
19719 echo "$as_me:19719: result: $cf_ada_compiler" >&5
19720 echo "${ECHO_T}$cf_ada_compiler" >&6
19721
19722                         cf_ada_package=terminal_interface
19723
19724 echo "$as_me:19724: checking for ada-include" >&5
19725 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19726
19727 # Check whether --with-ada-include or --without-ada-include was given.
19728 if test "${with_ada_include+set}" = set; then
19729   withval="$with_ada_include"
19730
19731 else
19732   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19733 fi; if test -n "$prefix/share/ada/adainclude" ; then
19734
19735 if test "x$prefix" != xNONE; then
19736   cf_path_syntax="$prefix"
19737 else
19738   cf_path_syntax="$ac_default_prefix"
19739 fi
19740
19741 case ".$withval" in #(vi
19742 .\$\(*\)*|.\'*\'*) #(vi
19743   ;;
19744 ..|./*|.\\*) #(vi
19745   ;;
19746 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19747   ;;
19748 .\${*prefix}*|.\${*dir}*) #(vi
19749   eval withval="$withval"
19750   case ".$withval" in #(vi
19751   .NONE/*)
19752     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19753     ;;
19754   esac
19755   ;; #(vi
19756 .no|.NONE/*)
19757   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19758   ;;
19759 *)
19760   { { echo "$as_me:19760: error: expected a pathname, not \"$withval\"" >&5
19761 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19762    { (exit 1); exit 1; }; }
19763   ;;
19764 esac
19765
19766 fi
19767 eval ADA_INCLUDE="$withval"
19768
19769 echo "$as_me:19769: result: $ADA_INCLUDE" >&5
19770 echo "${ECHO_T}$ADA_INCLUDE" >&6
19771
19772 echo "$as_me:19772: checking for ada-objects" >&5
19773 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19774
19775 # Check whether --with-ada-objects or --without-ada-objects was given.
19776 if test "${with_ada_objects+set}" = set; then
19777   withval="$with_ada_objects"
19778
19779 else
19780   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19781 fi; if test -n "$prefix/lib/ada/adalib" ; then
19782
19783 if test "x$prefix" != xNONE; then
19784   cf_path_syntax="$prefix"
19785 else
19786   cf_path_syntax="$ac_default_prefix"
19787 fi
19788
19789 case ".$withval" in #(vi
19790 .\$\(*\)*|.\'*\'*) #(vi
19791   ;;
19792 ..|./*|.\\*) #(vi
19793   ;;
19794 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19795   ;;
19796 .\${*prefix}*|.\${*dir}*) #(vi
19797   eval withval="$withval"
19798   case ".$withval" in #(vi
19799   .NONE/*)
19800     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19801     ;;
19802   esac
19803   ;; #(vi
19804 .no|.NONE/*)
19805   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19806   ;;
19807 *)
19808   { { echo "$as_me:19808: error: expected a pathname, not \"$withval\"" >&5
19809 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19810    { (exit 1); exit 1; }; }
19811   ;;
19812 esac
19813
19814 fi
19815 eval ADA_OBJECTS="$withval"
19816
19817 echo "$as_me:19817: result: $ADA_OBJECTS" >&5
19818 echo "${ECHO_T}$ADA_OBJECTS" >&6
19819
19820 echo "$as_me:19820: checking if an Ada95 shared-library should be built" >&5
19821 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19822
19823 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19824 if test "${with_ada_sharedlib+set}" = set; then
19825   withval="$with_ada_sharedlib"
19826   with_ada_sharedlib=$withval
19827 else
19828   with_ada_sharedlib=no
19829 fi;
19830 echo "$as_me:19830: result: $with_ada_sharedlib" >&5
19831 echo "${ECHO_T}$with_ada_sharedlib" >&6
19832
19833 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19834 MAKE_ADA_SHAREDLIB="#"
19835
19836 if test "x$with_ada_sharedlib" != xno
19837 then
19838         MAKE_ADA_SHAREDLIB=
19839         if test "x$with_ada_sharedlib" != xyes
19840         then
19841                 ADA_SHAREDLIB="$with_ada_sharedlib"
19842         fi
19843 fi
19844
19845                 fi
19846         fi
19847 else
19848         cf_with_ada=no
19849 fi
19850
19851 # do this "late" to avoid conflict with header-checks
19852 if test "x$with_widec" = xyes ; then
19853         echo "$as_me:19853: checking for wchar_t" >&5
19854 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19855 if test "${ac_cv_type_wchar_t+set}" = set; then
19856   echo $ECHO_N "(cached) $ECHO_C" >&6
19857 else
19858   cat >conftest.$ac_ext <<_ACEOF
19859 #line 19859 "configure"
19860 #include "confdefs.h"
19861 $ac_includes_default
19862 int
19863 main ()
19864 {
19865 if ((wchar_t *) 0)
19866   return 0;
19867 if (sizeof (wchar_t))
19868   return 0;
19869   ;
19870   return 0;
19871 }
19872 _ACEOF
19873 rm -f conftest.$ac_objext
19874 if { (eval echo "$as_me:19874: \"$ac_compile\"") >&5
19875   (eval $ac_compile) 2>&5
19876   ac_status=$?
19877   echo "$as_me:19877: \$? = $ac_status" >&5
19878   (exit $ac_status); } &&
19879          { ac_try='test -s conftest.$ac_objext'
19880   { (eval echo "$as_me:19880: \"$ac_try\"") >&5
19881   (eval $ac_try) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit $ac_status); }; }; then
19885   ac_cv_type_wchar_t=yes
19886 else
19887   echo "$as_me: failed program was:" >&5
19888 cat conftest.$ac_ext >&5
19889 ac_cv_type_wchar_t=no
19890 fi
19891 rm -f conftest.$ac_objext conftest.$ac_ext
19892 fi
19893 echo "$as_me:19893: result: $ac_cv_type_wchar_t" >&5
19894 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19895
19896 echo "$as_me:19896: checking size of wchar_t" >&5
19897 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19898 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19899   echo $ECHO_N "(cached) $ECHO_C" >&6
19900 else
19901   if test "$ac_cv_type_wchar_t" = yes; then
19902   if test "$cross_compiling" = yes; then
19903   # Depending upon the size, compute the lo and hi bounds.
19904 cat >conftest.$ac_ext <<_ACEOF
19905 #line 19905 "configure"
19906 #include "confdefs.h"
19907 $ac_includes_default
19908 int
19909 main ()
19910 {
19911 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
19912   ;
19913   return 0;
19914 }
19915 _ACEOF
19916 rm -f conftest.$ac_objext
19917 if { (eval echo "$as_me:19917: \"$ac_compile\"") >&5
19918   (eval $ac_compile) 2>&5
19919   ac_status=$?
19920   echo "$as_me:19920: \$? = $ac_status" >&5
19921   (exit $ac_status); } &&
19922          { ac_try='test -s conftest.$ac_objext'
19923   { (eval echo "$as_me:19923: \"$ac_try\"") >&5
19924   (eval $ac_try) 2>&5
19925   ac_status=$?
19926   echo "$as_me:19926: \$? = $ac_status" >&5
19927   (exit $ac_status); }; }; then
19928   ac_lo=0 ac_mid=0
19929   while :; do
19930     cat >conftest.$ac_ext <<_ACEOF
19931 #line 19931 "configure"
19932 #include "confdefs.h"
19933 $ac_includes_default
19934 int
19935 main ()
19936 {
19937 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
19938   ;
19939   return 0;
19940 }
19941 _ACEOF
19942 rm -f conftest.$ac_objext
19943 if { (eval echo "$as_me:19943: \"$ac_compile\"") >&5
19944   (eval $ac_compile) 2>&5
19945   ac_status=$?
19946   echo "$as_me:19946: \$? = $ac_status" >&5
19947   (exit $ac_status); } &&
19948          { ac_try='test -s conftest.$ac_objext'
19949   { (eval echo "$as_me:19949: \"$ac_try\"") >&5
19950   (eval $ac_try) 2>&5
19951   ac_status=$?
19952   echo "$as_me:19952: \$? = $ac_status" >&5
19953   (exit $ac_status); }; }; then
19954   ac_hi=$ac_mid; break
19955 else
19956   echo "$as_me: failed program was:" >&5
19957 cat conftest.$ac_ext >&5
19958 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
19959 fi
19960 rm -f conftest.$ac_objext conftest.$ac_ext
19961   done
19962 else
19963   echo "$as_me: failed program was:" >&5
19964 cat conftest.$ac_ext >&5
19965 ac_hi=-1 ac_mid=-1
19966   while :; do
19967     cat >conftest.$ac_ext <<_ACEOF
19968 #line 19968 "configure"
19969 #include "confdefs.h"
19970 $ac_includes_default
19971 int
19972 main ()
19973 {
19974 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
19975   ;
19976   return 0;
19977 }
19978 _ACEOF
19979 rm -f conftest.$ac_objext
19980 if { (eval echo "$as_me:19980: \"$ac_compile\"") >&5
19981   (eval $ac_compile) 2>&5
19982   ac_status=$?
19983   echo "$as_me:19983: \$? = $ac_status" >&5
19984   (exit $ac_status); } &&
19985          { ac_try='test -s conftest.$ac_objext'
19986   { (eval echo "$as_me:19986: \"$ac_try\"") >&5
19987   (eval $ac_try) 2>&5
19988   ac_status=$?
19989   echo "$as_me:19989: \$? = $ac_status" >&5
19990   (exit $ac_status); }; }; then
19991   ac_lo=$ac_mid; break
19992 else
19993   echo "$as_me: failed program was:" >&5
19994 cat conftest.$ac_ext >&5
19995 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
19996 fi
19997 rm -f conftest.$ac_objext conftest.$ac_ext
19998   done
19999 fi
20000 rm -f conftest.$ac_objext conftest.$ac_ext
20001 # Binary search between lo and hi bounds.
20002 while test "x$ac_lo" != "x$ac_hi"; do
20003   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20004   cat >conftest.$ac_ext <<_ACEOF
20005 #line 20005 "configure"
20006 #include "confdefs.h"
20007 $ac_includes_default
20008 int
20009 main ()
20010 {
20011 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20012   ;
20013   return 0;
20014 }
20015 _ACEOF
20016 rm -f conftest.$ac_objext
20017 if { (eval echo "$as_me:20017: \"$ac_compile\"") >&5
20018   (eval $ac_compile) 2>&5
20019   ac_status=$?
20020   echo "$as_me:20020: \$? = $ac_status" >&5
20021   (exit $ac_status); } &&
20022          { ac_try='test -s conftest.$ac_objext'
20023   { (eval echo "$as_me:20023: \"$ac_try\"") >&5
20024   (eval $ac_try) 2>&5
20025   ac_status=$?
20026   echo "$as_me:20026: \$? = $ac_status" >&5
20027   (exit $ac_status); }; }; then
20028   ac_hi=$ac_mid
20029 else
20030   echo "$as_me: failed program was:" >&5
20031 cat conftest.$ac_ext >&5
20032 ac_lo=`expr $ac_mid + 1`
20033 fi
20034 rm -f conftest.$ac_objext conftest.$ac_ext
20035 done
20036 ac_cv_sizeof_wchar_t=$ac_lo
20037 else
20038   if test "$cross_compiling" = yes; then
20039   { { echo "$as_me:20039: error: cannot run test program while cross compiling" >&5
20040 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20041    { (exit 1); exit 1; }; }
20042 else
20043   cat >conftest.$ac_ext <<_ACEOF
20044 #line 20044 "configure"
20045 #include "confdefs.h"
20046 $ac_includes_default
20047 int
20048 main ()
20049 {
20050 FILE *f = fopen ("conftest.val", "w");
20051 if (!f)
20052   $ac_main_return (1);
20053 fprintf (f, "%d", (sizeof (wchar_t)));
20054 fclose (f);
20055   ;
20056   return 0;
20057 }
20058 _ACEOF
20059 rm -f conftest$ac_exeext
20060 if { (eval echo "$as_me:20060: \"$ac_link\"") >&5
20061   (eval $ac_link) 2>&5
20062   ac_status=$?
20063   echo "$as_me:20063: \$? = $ac_status" >&5
20064   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20065   { (eval echo "$as_me:20065: \"$ac_try\"") >&5
20066   (eval $ac_try) 2>&5
20067   ac_status=$?
20068   echo "$as_me:20068: \$? = $ac_status" >&5
20069   (exit $ac_status); }; }; then
20070   ac_cv_sizeof_wchar_t=`cat conftest.val`
20071 else
20072   echo "$as_me: program exited with status $ac_status" >&5
20073 echo "$as_me: failed program was:" >&5
20074 cat conftest.$ac_ext >&5
20075 fi
20076 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20077 fi
20078 fi
20079 rm -f conftest.val
20080 else
20081   ac_cv_sizeof_wchar_t=0
20082 fi
20083 fi
20084 echo "$as_me:20084: result: $ac_cv_sizeof_wchar_t" >&5
20085 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20086 cat >>confdefs.h <<EOF
20087 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20088 EOF
20089
20090 fi
20091
20092 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20093 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20094 ###
20095 ### ticlib modules may be a separate library, otherwise contained in termlib.
20096 ### termlib modules may be a separate library, otherwise contained in ncurses.
20097 ###
20098 ### The of "+" or " " between the tokens controls the way the script
20099 ### chooses to split module lists into libraries.
20100 ###
20101 ### (see CF_LIB_RULES).
20102 echo "$as_me:20102: checking for library subsets" >&5
20103 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20104 LIB_SUBSETS=
20105
20106 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20107         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20108         if test "$with_ticlib" != no ; then
20109                 LIB_SUBSETS="${LIB_SUBSETS} "
20110         else
20111                 LIB_SUBSETS="${LIB_SUBSETS}+"
20112         fi
20113 fi
20114
20115 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20116 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20117
20118 if test "$with_termlib" != no ; then
20119         LIB_SUBSETS="${LIB_SUBSETS} "
20120 else
20121         LIB_SUBSETS="${LIB_SUBSETS}+"
20122 fi
20123
20124 LIB_SUBSETS="${LIB_SUBSETS}base"
20125
20126 # Most term-driver calls are to tinfo, but some like init_pair are to the
20127 # base library (so it resides in base).
20128 if test "$with_term_driver" != no ; then
20129         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20130         case $cf_cv_system_name in #(vi
20131         *mingw32*) #(vi
20132                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20133                 ;;
20134         *) #(vi
20135                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20136                 ;;
20137         esac
20138 fi
20139
20140 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20141 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20142
20143 echo "$as_me:20143: result: $LIB_SUBSETS" >&5
20144 echo "${ECHO_T}$LIB_SUBSETS" >&6
20145
20146 ### Construct the list of include-directories to be generated
20147
20148 if test "$GCC" != yes; then
20149         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20150 elif test "$includedir" != "/usr/include"; then
20151         if test "$includedir" = '${prefix}/include' ; then
20152                 if test $prefix != /usr ; then
20153                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20154                 fi
20155         else
20156                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20157         fi
20158 fi
20159 if test "$srcdir" != "."; then
20160         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20161 fi
20162 CPPFLAGS="-I. -I../include $CPPFLAGS"
20163
20164 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20165 if test "$srcdir" != "."; then
20166         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20167 fi
20168 if test "$GCC" != yes; then
20169         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20170 elif test "$includedir" != "/usr/include"; then
20171         if test "$includedir" = '${prefix}/include' ; then
20172                 if test $prefix != /usr ; then
20173                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20174                 fi
20175         else
20176                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20177         fi
20178 fi
20179
20180 ### Build up pieces for makefile rules
20181 echo "$as_me:20181: checking default library suffix" >&5
20182 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20183
20184         case $DFT_LWR_MODEL in
20185         libtool) DFT_ARG_SUFFIX=''   ;;
20186         normal)  DFT_ARG_SUFFIX=''   ;;
20187         debug)   DFT_ARG_SUFFIX='_g' ;;
20188         profile) DFT_ARG_SUFFIX='_p' ;;
20189         shared)  DFT_ARG_SUFFIX=''   ;;
20190         esac
20191         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20192 echo "$as_me:20192: result: $DFT_ARG_SUFFIX" >&5
20193 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20194
20195 echo "$as_me:20195: checking default library-dependency suffix" >&5
20196 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20197
20198         case X$DFT_LWR_MODEL in #(vi
20199         Xlibtool) #(vi
20200                 DFT_LIB_SUFFIX='.la'
20201                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20202                 ;;
20203         Xdebug) #(vi
20204                 DFT_LIB_SUFFIX='_g.a'
20205                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20206                 ;;
20207         Xprofile) #(vi
20208                 DFT_LIB_SUFFIX='_p.a'
20209                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20210                 ;;
20211         Xshared) #(vi
20212                 case $cf_cv_system_name in
20213                 aix[5-7]*) #(vi
20214                         DFT_LIB_SUFFIX='.a'
20215                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20216                         ;;
20217                 cygwin*|mingw*) #(vi
20218                         DFT_LIB_SUFFIX='.dll'
20219                         DFT_DEP_SUFFIX='.dll.a'
20220                         ;;
20221                 darwin*) #(vi
20222                         DFT_LIB_SUFFIX='.dylib'
20223                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20224                         ;;
20225                 hpux*) #(vi
20226                         case $target in
20227                         ia64*) #(vi
20228                                 DFT_LIB_SUFFIX='.so'
20229                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20230                                 ;;
20231                         *) #(vi
20232                                 DFT_LIB_SUFFIX='.sl'
20233                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20234                                 ;;
20235                         esac
20236                         ;;
20237                 *) #(vi
20238                         DFT_LIB_SUFFIX='.so'
20239                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20240                         ;;
20241                 esac
20242                 ;;
20243         *)
20244                 DFT_LIB_SUFFIX='.a'
20245                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20246                 ;;
20247         esac
20248         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20249         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20250 echo "$as_me:20250: result: $DFT_DEP_SUFFIX" >&5
20251 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20252
20253 echo "$as_me:20253: checking default object directory" >&5
20254 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20255
20256         case $DFT_LWR_MODEL in
20257         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20258         normal)  DFT_OBJ_SUBDIR='objects' ;;
20259         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20260         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20261         shared)
20262                 case $cf_cv_system_name in #(vi
20263                 cygwin) #(vi
20264                         DFT_OBJ_SUBDIR='objects' ;;
20265                 *)
20266                         DFT_OBJ_SUBDIR='obj_s' ;;
20267                 esac
20268         esac
20269 echo "$as_me:20269: result: $DFT_OBJ_SUBDIR" >&5
20270 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20271
20272 if test "x$cf_with_cxx" = xyes ; then
20273 echo "$as_me:20273: checking c++ library-dependency suffix" >&5
20274 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20275 if test "$with_libtool" != "no"; then
20276         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20277         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20278 elif test "$with_shared_cxx" != "no"; then
20279         # also for g++ users...
20280         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20281 else
20282         # we normally make a static library because C/C++ library rules differ
20283
20284         case Xnormal in #(vi
20285         Xlibtool) #(vi
20286                 CXX_LIB_SUFFIX='.la'
20287                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20288                 ;;
20289         Xdebug) #(vi
20290                 CXX_LIB_SUFFIX='_g.a'
20291                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20292                 ;;
20293         Xprofile) #(vi
20294                 CXX_LIB_SUFFIX='_p.a'
20295                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20296                 ;;
20297         Xshared) #(vi
20298                 case $cf_cv_system_name in
20299                 aix[5-7]*) #(vi
20300                         CXX_LIB_SUFFIX='.a'
20301                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20302                         ;;
20303                 cygwin*|mingw*) #(vi
20304                         CXX_LIB_SUFFIX='.dll'
20305                         CXX_DEP_SUFFIX='.dll.a'
20306                         ;;
20307                 darwin*) #(vi
20308                         CXX_LIB_SUFFIX='.dylib'
20309                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20310                         ;;
20311                 hpux*) #(vi
20312                         case $target in
20313                         ia64*) #(vi
20314                                 CXX_LIB_SUFFIX='.so'
20315                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20316                                 ;;
20317                         *) #(vi
20318                                 CXX_LIB_SUFFIX='.sl'
20319                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20320                                 ;;
20321                         esac
20322                         ;;
20323                 *) #(vi
20324                         CXX_LIB_SUFFIX='.so'
20325                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20326                         ;;
20327                 esac
20328                 ;;
20329         *)
20330                 CXX_LIB_SUFFIX='.a'
20331                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20332                 ;;
20333         esac
20334         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20335         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20336
20337 fi
20338 echo "$as_me:20338: result: $CXX_LIB_SUFFIX" >&5
20339 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20340
20341 fi
20342
20343 # do not want -ldl in build except as needed for -lncurses dependency
20344 if test "x$with_dlsym" = xyes ; then
20345 if test $DFT_LWR_MODEL = shared || \
20346    test $DFT_LWR_MODEL = libtool ; then
20347
20348 # remove dl library from $LIBS
20349 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20350
20351 fi
20352 fi
20353 ### Set up low-level terminfo dependencies for makefiles.
20354
20355 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20356 # do not need libdl
20357 TICS_LIST=
20358 if test "x$with_dlsym" = xyes ; then
20359
20360 # remove dl library from $SHLIB_LIST
20361 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20362
20363 fi
20364
20365 if test "$with_ticlib" != no ; then
20366
20367         if test "x$with_ticlib" != xyes ; then
20368                 TICS_NAME=$with_ticlib
20369                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20370                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20371                 TICS_LIB_SUFFIX="${with_ticlib}"
20372         else
20373                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20374                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20375                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20376         fi
20377         TICS_LDFLAGS="-L${LIB_DIR}"
20378         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20379 else
20380         TICS_LDFLAGS="-L${LIB_DIR}"
20381         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20382 fi
20383
20384 if test "$with_termlib" != no ; then
20385
20386         if test "x$with_termlib" != xyes ; then
20387                 TINFO_NAME=$with_termlib
20388                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20389                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20390                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20391                 TINFO_LIB_SUFFIX="${with_termlib}"
20392         else
20393                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20394                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20395                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20396                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20397         fi
20398
20399         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20400         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20401         if test "$DFT_LWR_MODEL" = "libtool"; then
20402                 TEST_ARGS="${TEST_DEPS}"
20403                 TEST_ARG2="${TEST_DEP2}"
20404                 TINFO_LDFLAGS="-L${LIB_DIR}"
20405                 TINFO_LIBS="$TEST_ARGS"
20406                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20407                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20408         else
20409                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20410                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20411                 if test "x$with_term_driver" != xno ; then
20412                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20413                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20414                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20415                 else
20416                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20417                         TINFO_LIBS="$TEST_ARGS"
20418                 fi
20419                 TINFO_LDFLAGS="-L${LIB_DIR}"
20420                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20421         fi
20422 else
20423         # the next lines are needed for linking libtic over libncurses
20424         TINFO_NAME=${LIB_NAME}
20425         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20426         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20427         if test "x$with_tic_depends" = xyes ; then
20428                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20429         else
20430                 TICS_LIST="$SHLIB_LIST"
20431         fi
20432
20433         TINFO_LDFLAGS="-L${LIB_DIR}"
20434         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20435 fi
20436
20437 if test "$DFT_LWR_MODEL" = shared ; then
20438         case $cf_cv_system_name in #(vi
20439         cygwin*)
20440                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20441                 TINFO_SUFFIX=.dll
20442                 ;;
20443         esac
20444 fi
20445
20446 if test "x$with_dlsym" = xyes ; then
20447
20448 # remove dl library from $TICS_LIST
20449 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20450
20451 fi
20452
20453 if test "$DFT_LWR_MODEL" = "libtool"; then
20454     OBJEXT=lo
20455 fi
20456
20457 # needed for Ada95
20458 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20459
20460 case $DFT_LWR_MODEL in
20461 normal|debug|profile)
20462
20463 if test "$GCC" = yes ; then
20464         case $cf_cv_system_name in #(
20465         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20466                 LDFLAGS_STATIC=
20467                 LDFLAGS_SHARED=
20468                 ;;
20469     *)  #( normally, except when broken
20470         LDFLAGS_STATIC=-static
20471         LDFLAGS_SHARED=-dynamic
20472         ;;
20473     esac
20474 else
20475         case $cf_cv_system_name in #(
20476         aix[4-7]*)      #( from ld manpage
20477                 LDFLAGS_STATIC=-bstatic
20478                 LDFLAGS_SHARED=-bdynamic
20479                 ;;
20480         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20481                 # We could also use just "archive" and "shared".
20482                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20483                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20484                 ;;
20485         irix*)          #( from ld manpage IRIX64
20486                 LDFLAGS_STATIC=-Bstatic
20487                 LDFLAGS_SHARED=-Bdynamic
20488                 ;;
20489         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20490                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20491                 LDFLAGS_STATIC=-noso
20492                 LDFLAGS_SHARED=-so_archive
20493                 ;;
20494         solaris2*)
20495                 LDFLAGS_STATIC=-Bstatic
20496                 LDFLAGS_SHARED=-Bdynamic
20497                 ;;
20498         esac
20499 fi
20500
20501 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20502 then
20503         echo "$as_me:20503: checking if linker supports switching between static/dynamic" >&5
20504 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20505
20506         rm -f libconftest.a
20507         cat >conftest.$ac_ext <<EOF
20508 #line 20508 "configure"
20509 #include <stdio.h>
20510 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20511 EOF
20512         if { (eval echo "$as_me:20512: \"$ac_compile\"") >&5
20513   (eval $ac_compile) 2>&5
20514   ac_status=$?
20515   echo "$as_me:20515: \$? = $ac_status" >&5
20516   (exit $ac_status); } ; then
20517                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20518                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20519         fi
20520         rm -f conftest.*
20521
20522         cf_save_LIBS="$LIBS"
20523
20524         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20525         cat >conftest.$ac_ext <<_ACEOF
20526 #line 20526 "configure"
20527 #include "confdefs.h"
20528
20529 #line 20529 "configure"
20530 #include <stdio.h>
20531 int cf_ldflags_static(FILE *fp);
20532
20533 int
20534 main ()
20535 {
20536
20537         return cf_ldflags_static(stdin);
20538
20539   ;
20540   return 0;
20541 }
20542 _ACEOF
20543 rm -f conftest.$ac_objext conftest$ac_exeext
20544 if { (eval echo "$as_me:20544: \"$ac_link\"") >&5
20545   (eval $ac_link) 2>&5
20546   ac_status=$?
20547   echo "$as_me:20547: \$? = $ac_status" >&5
20548   (exit $ac_status); } &&
20549          { ac_try='test -s conftest$ac_exeext'
20550   { (eval echo "$as_me:20550: \"$ac_try\"") >&5
20551   (eval $ac_try) 2>&5
20552   ac_status=$?
20553   echo "$as_me:20553: \$? = $ac_status" >&5
20554   (exit $ac_status); }; }; then
20555
20556         # some linkers simply ignore the -dynamic
20557         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20558         *static*) # (vi
20559                 cf_ldflags_static=no
20560                 ;;
20561         *)
20562                 cf_ldflags_static=yes
20563                 ;;
20564         esac
20565
20566 else
20567   echo "$as_me: failed program was:" >&5
20568 cat conftest.$ac_ext >&5
20569 cf_ldflags_static=no
20570 fi
20571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20572
20573         rm -f libconftest.*
20574         LIBS="$cf_save_LIBS"
20575
20576         echo "$as_me:20576: result: $cf_ldflags_static" >&5
20577 echo "${ECHO_T}$cf_ldflags_static" >&6
20578
20579         if test $cf_ldflags_static != yes
20580         then
20581                 LDFLAGS_STATIC=
20582                 LDFLAGS_SHARED=
20583         fi
20584 else
20585         LDFLAGS_STATIC=
20586         LDFLAGS_SHARED=
20587 fi
20588
20589         ;;
20590 esac
20591
20592 echo "$as_me:20592: checking where we will install curses.h" >&5
20593 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20594 test "$with_overwrite" = no && \
20595 test "x$includedir" = 'x${prefix}/include' && \
20596         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20597 echo "$as_me:20597: result: $includedir" >&5
20598 echo "${ECHO_T}$includedir" >&6
20599
20600 ### Resolve a conflict between normal and wide-curses by forcing applications
20601 ### that will need libutf8 to add it to their configure script.
20602 if test "$with_overwrite" != no ; then
20603 if test "$NCURSES_LIBUTF8" = 1 ; then
20604         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20605         { echo "$as_me:20605: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20606 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20607 fi
20608 fi
20609 WITH_OVERWRITE=$with_overwrite
20610
20611 # used to separate tack out of the tree
20612 NCURSES_TREE=
20613
20614 ### predefined stuff for the test programs
20615
20616 cat >>confdefs.h <<\EOF
20617 #define HAVE_SLK_COLOR 1
20618 EOF
20619
20620 ### Construct the list of subdirectories for which we'll customize makefiles
20621 ### with the appropriate compile-rules.
20622
20623 echo "$as_me:20623: checking for src modules" >&5
20624 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20625
20626 # dependencies and linker-arguments for test-programs
20627 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20628 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20629 if test "$DFT_LWR_MODEL" = "libtool"; then
20630         TEST_ARGS="${TEST_DEPS}"
20631         TEST_ARG2="${TEST_DEP2}"
20632 else
20633         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20634         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20635 fi
20636
20637 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20638 cf_cv_src_modules=
20639 for cf_dir in $modules_to_build
20640 do
20641         if test -f $srcdir/$cf_dir/modules; then
20642
20643                 # We may/may not have tack in the distribution, though the
20644                 # makefile is.
20645                 if test $cf_dir = tack ; then
20646                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20647                                 continue
20648                         fi
20649                 fi
20650
20651                 if test -z "$cf_cv_src_modules"; then
20652                         cf_cv_src_modules=$cf_dir
20653                 else
20654                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20655                 fi
20656
20657                 # Make the ncurses_cfg.h file record the library interface files as
20658                 # well.  These are header files that are the same name as their
20659                 # directory.  Ncurses is the only library that does not follow
20660                 # that pattern.
20661                 if test $cf_dir = tack ; then
20662                         continue
20663                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20664
20665 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20666
20667                         cat >>confdefs.h <<EOF
20668 #define HAVE_${cf_have_include}_H 1
20669 EOF
20670
20671                         cat >>confdefs.h <<EOF
20672 #define HAVE_LIB${cf_have_include} 1
20673 EOF
20674
20675                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20676                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20677                         if test "$DFT_LWR_MODEL" = "libtool"; then
20678                                 TEST_ARGS="${TEST_DEPS}"
20679                                 TEST_ARG2="${TEST_DEP2}"
20680                         else
20681                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20682                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20683                         fi
20684                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20685                 fi
20686         fi
20687 done
20688 echo "$as_me:20688: result: $cf_cv_src_modules" >&5
20689 echo "${ECHO_T}$cf_cv_src_modules" >&6
20690
20691 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20692 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20693
20694 SRC_SUBDIRS=
20695 if test "x$cf_with_manpages" != xno ; then
20696         SRC_SUBDIRS="$SRC_SUBDIRS man"
20697 fi
20698 SRC_SUBDIRS="$SRC_SUBDIRS include"
20699 for cf_dir in $cf_cv_src_modules
20700 do
20701         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20702 done
20703 if test "x$cf_with_tests" != "xno" ; then
20704         SRC_SUBDIRS="$SRC_SUBDIRS test"
20705 fi
20706 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20707 if test "$cf_with_cxx_binding" != no; then
20708         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20709         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20710 fi
20711
20712 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20713 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20714
20715 ADA_SUBDIRS=
20716 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20717         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20718         ADA_SUBDIRS="gen src"
20719         if test "x$cf_with_tests" != "xno" ; then
20720                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20721         fi
20722 fi
20723
20724 SUB_MAKEFILES=
20725 for cf_dir in $SRC_SUBDIRS
20726 do
20727         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20728 done
20729
20730 if test -n "$ADA_SUBDIRS"; then
20731         for cf_dir in $ADA_SUBDIRS
20732         do
20733                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20734         done
20735
20736 fi
20737
20738 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20739    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20740    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20741 fi
20742
20743 DIRS_TO_MAKE="lib"
20744 for cf_item in $cf_list_models
20745 do
20746
20747         case $cf_item in
20748         libtool) cf_subdir='obj_lo'  ;;
20749         normal)  cf_subdir='objects' ;;
20750         debug)   cf_subdir='obj_g' ;;
20751         profile) cf_subdir='obj_p' ;;
20752         shared)
20753                 case $cf_cv_system_name in #(vi
20754                 cygwin) #(vi
20755                         cf_subdir='objects' ;;
20756                 *)
20757                         cf_subdir='obj_s' ;;
20758                 esac
20759         esac
20760
20761         for cf_item2 in $DIRS_TO_MAKE
20762         do
20763                 test $cf_item2 = $cf_subdir && break
20764         done
20765         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20766 done
20767 for cf_dir in $DIRS_TO_MAKE
20768 do
20769         test ! -d $cf_dir && mkdir $cf_dir
20770 done
20771
20772 # symbols that differ when compiling Ada95 by itself.
20773 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20774
20775 # values to use as strings
20776
20777 cat >>confdefs.h <<EOF
20778 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20779 EOF
20780
20781 cat >>confdefs.h <<EOF
20782 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20783 EOF
20784
20785 ### Now that we're done running tests, add the compiler-warnings, if any
20786
20787 cf_fix_cppflags=no
20788 cf_new_cflags=
20789 cf_new_cppflags=
20790 cf_new_extra_cppflags=
20791
20792 for cf_add_cflags in $EXTRA_CFLAGS
20793 do
20794 case $cf_fix_cppflags in
20795 no)
20796         case $cf_add_cflags in #(vi
20797         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20798                 case $cf_add_cflags in
20799                 -D*)
20800                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20801
20802                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20803                                 && test -z "${cf_tst_cflags}" \
20804                                 && cf_fix_cppflags=yes
20805
20806                         if test $cf_fix_cppflags = yes ; then
20807                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20808                                 continue
20809                         elif test "${cf_tst_cflags}" = "\"'" ; then
20810                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20811                                 continue
20812                         fi
20813                         ;;
20814                 esac
20815                 case "$CPPFLAGS" in
20816                 *$cf_add_cflags) #(vi
20817                         ;;
20818                 *) #(vi
20819                         case $cf_add_cflags in #(vi
20820                         -D*)
20821                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20822
20823 CPPFLAGS=`echo "$CPPFLAGS" | \
20824         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20825                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20826
20827                                 ;;
20828                         esac
20829                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20830                         ;;
20831                 esac
20832                 ;;
20833         *)
20834                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20835                 ;;
20836         esac
20837         ;;
20838 yes)
20839         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20840
20841         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20842
20843         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20844                 && test -z "${cf_tst_cflags}" \
20845                 && cf_fix_cppflags=no
20846         ;;
20847 esac
20848 done
20849
20850 if test -n "$cf_new_cflags" ; then
20851
20852         CFLAGS="$CFLAGS $cf_new_cflags"
20853 fi
20854
20855 if test -n "$cf_new_cppflags" ; then
20856
20857         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20858 fi
20859
20860 if test -n "$cf_new_extra_cppflags" ; then
20861
20862         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20863 fi
20864
20865 ### Define substitutions for header files to avoid name-pollution
20866
20867 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20868         HAVE_TCGETATTR=1
20869 else
20870         HAVE_TCGETATTR=0
20871 fi
20872
20873 if test "x$ac_cv_header_termio_h" = xyes ; then
20874         HAVE_TERMIO_H=1
20875 else
20876         HAVE_TERMIO_H=0
20877 fi
20878
20879 if test "x$ac_cv_header_termios_h" = xyes ; then
20880         HAVE_TERMIOS_H=1
20881 else
20882         HAVE_TERMIOS_H=0
20883 fi
20884
20885 ################################################################################
20886 test "x$use_database" = xyes && \
20887 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20888
20889 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20890 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20891
20892 if test "x$enable_pc_files" = xyes ; then \
20893 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20894 MAKE_PC_FILES=
20895 else
20896 MAKE_PC_FILES="#"
20897 fi
20898
20899 # Extract the first word of "tic", so it can be a program name with args.
20900 set dummy tic; ac_word=$2
20901 echo "$as_me:20901: checking for $ac_word" >&5
20902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20903 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20904   echo $ECHO_N "(cached) $ECHO_C" >&6
20905 else
20906   case $TIC_PATH in
20907   [\\/]* | ?:[\\/]*)
20908   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20909   ;;
20910   *)
20911   ac_save_IFS=$IFS; IFS=$ac_path_separator
20912 ac_dummy="$PATH:/usr/local/ncurses/bin"
20913 for ac_dir in $ac_dummy; do
20914   IFS=$ac_save_IFS
20915   test -z "$ac_dir" && ac_dir=.
20916   if $as_executable_p "$ac_dir/$ac_word"; then
20917    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20918    echo "$as_me:20918: found $ac_dir/$ac_word" >&5
20919    break
20920 fi
20921 done
20922
20923   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20924   ;;
20925 esac
20926 fi
20927 TIC_PATH=$ac_cv_path_TIC_PATH
20928
20929 if test -n "$TIC_PATH"; then
20930   echo "$as_me:20930: result: $TIC_PATH" >&5
20931 echo "${ECHO_T}$TIC_PATH" >&6
20932 else
20933   echo "$as_me:20933: result: no" >&5
20934 echo "${ECHO_T}no" >&6
20935 fi
20936
20937 if test -n "$FALLBACK_LIST"
20938 then
20939         if test "$TIC_PATH" = unknown
20940         then
20941                 { echo "$as_me:20941: WARNING: no tic program found for fallbacks" >&5
20942 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20943         fi
20944 fi
20945
20946 if test "x$cf_with_tests" != xno ; then
20947         MAKE_TESTS=
20948 else
20949         MAKE_TESTS="#"
20950 fi
20951
20952 ADAHTML_DIR=../../doc/html/ada
20953
20954 # these could be configurable, but are not currently
20955 PANEL_NAME=panel
20956 MENU_NAME=menu
20957 FORM_NAME=form
20958 CXX_NAME=ncurses++
20959
20960 SUB_SCRIPTS=
20961
20962 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"
20963 ac_config_commands="$ac_config_commands default"
20964 cat >confcache <<\_ACEOF
20965 # This file is a shell script that caches the results of configure
20966 # tests run on this system so they can be shared between configure
20967 # scripts and configure runs, see configure's option --config-cache.
20968 # It is not useful on other systems.  If it contains results you don't
20969 # want to keep, you may remove or edit it.
20970 #
20971 # config.status only pays attention to the cache file if you give it
20972 # the --recheck option to rerun configure.
20973 #
20974 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20975 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20976 # following values.
20977
20978 _ACEOF
20979
20980 # The following way of writing the cache mishandles newlines in values,
20981 # but we know of no workaround that is simple, portable, and efficient.
20982 # So, don't put newlines in cache variables' values.
20983 # Ultrix sh set writes to stderr and can't be redirected directly,
20984 # and sets the high bit in the cache file unless we assign to the vars.
20985 {
20986   (set) 2>&1 |
20987     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20988     *ac_space=\ *)
20989       # `set' does not quote correctly, so add quotes (double-quote
20990       # substitution turns \\\\ into \\, and sed turns \\ into \).
20991       sed -n \
20992         "s/'/'\\\\''/g;
20993           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20994       ;;
20995     *)
20996       # `set' quotes correctly as required by POSIX, so do not add quotes.
20997       sed -n \
20998         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20999       ;;
21000     esac;
21001 } |
21002   sed '
21003      t clear
21004      : clear
21005      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21006      t end
21007      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21008      : end' >>confcache
21009 if cmp -s $cache_file confcache; then :; else
21010   if test -w $cache_file; then
21011     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21012     cat confcache >$cache_file
21013   else
21014     echo "not updating unwritable cache $cache_file"
21015   fi
21016 fi
21017 rm -f confcache
21018
21019 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21020 # Let make expand exec_prefix.
21021 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21022
21023 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21024 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21025 # trailing colons and then remove the whole line if VPATH becomes empty
21026 # (actually we leave an empty line to preserve line numbers).
21027 if test "x$srcdir" = x.; then
21028   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21029 s/:*\$(srcdir):*/:/;
21030 s/:*\${srcdir}:*/:/;
21031 s/:*@srcdir@:*/:/;
21032 s/^\([^=]*=[    ]*\):*/\1/;
21033 s/:*$//;
21034 s/^[^=]*=[      ]*$//;
21035 }'
21036 fi
21037
21038 DEFS=-DHAVE_CONFIG_H
21039
21040 : ${CONFIG_STATUS=./config.status}
21041 ac_clean_files_save=$ac_clean_files
21042 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21043 { echo "$as_me:21043: creating $CONFIG_STATUS" >&5
21044 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21045 cat >$CONFIG_STATUS <<_ACEOF
21046 #! $SHELL
21047 # Generated automatically by configure.
21048 # Run this file to recreate the current configuration.
21049 # Compiler output produced by configure, useful for debugging
21050 # configure, is in config.log if it exists.
21051
21052 debug=false
21053 SHELL=\${CONFIG_SHELL-$SHELL}
21054 ac_cs_invocation="\$0 \$@"
21055
21056 _ACEOF
21057
21058 cat >>$CONFIG_STATUS <<\_ACEOF
21059 # Be Bourne compatible
21060 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21061   emulate sh
21062   NULLCMD=:
21063 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21064   set -o posix
21065 fi
21066
21067 # Name of the executable.
21068 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21069
21070 if expr a : '\(a\)' >/dev/null 2>&1; then
21071   as_expr=expr
21072 else
21073   as_expr=false
21074 fi
21075
21076 rm -f conf$$ conf$$.exe conf$$.file
21077 echo >conf$$.file
21078 if ln -s conf$$.file conf$$ 2>/dev/null; then
21079   # We could just check for DJGPP; but this test a) works b) is more generic
21080   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21081   if test -f conf$$.exe; then
21082     # Don't use ln at all; we don't have any links
21083     as_ln_s='cp -p'
21084   else
21085     as_ln_s='ln -s'
21086   fi
21087 elif ln conf$$.file conf$$ 2>/dev/null; then
21088   as_ln_s=ln
21089 else
21090   as_ln_s='cp -p'
21091 fi
21092 rm -f conf$$ conf$$.exe conf$$.file
21093
21094 as_executable_p="test -f"
21095
21096 # Support unset when possible.
21097 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21098   as_unset=unset
21099 else
21100   as_unset=false
21101 fi
21102
21103 # NLS nuisances.
21104 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21105 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21106 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21107 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21108 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21109 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21110 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21111 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21112
21113 # IFS
21114 # We need space, tab and new line, in precisely that order.
21115 as_nl='
21116 '
21117 IFS="   $as_nl"
21118
21119 # CDPATH.
21120 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21121
21122 exec 6>&1
21123
21124 _ACEOF
21125
21126 # Files that config.status was made for.
21127 if test -n "$ac_config_files"; then
21128   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21129 fi
21130
21131 if test -n "$ac_config_headers"; then
21132   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21133 fi
21134
21135 if test -n "$ac_config_links"; then
21136   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21137 fi
21138
21139 if test -n "$ac_config_commands"; then
21140   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21141 fi
21142
21143 cat >>$CONFIG_STATUS <<\EOF
21144
21145 ac_cs_usage="\
21146 \`$as_me' instantiates files from templates according to the
21147 current configuration.
21148
21149 Usage: $0 [OPTIONS] [FILE]...
21150
21151   -h, --help       print this help, then exit
21152   -V, --version    print version number, then exit
21153   -d, --debug      don't remove temporary files
21154       --recheck    update $as_me by reconfiguring in the same conditions
21155   --file=FILE[:TEMPLATE]
21156                    instantiate the configuration file FILE
21157   --header=FILE[:TEMPLATE]
21158                    instantiate the configuration header FILE
21159
21160 Configuration files:
21161 $config_files
21162
21163 Configuration headers:
21164 $config_headers
21165
21166 Configuration commands:
21167 $config_commands
21168
21169 Report bugs to <dickey@invisible-island.net>."
21170 EOF
21171
21172 cat >>$CONFIG_STATUS <<EOF
21173 ac_cs_version="\\
21174 config.status
21175 configured by $0, generated by GNU Autoconf 2.52.20121002,
21176   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21177
21178 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21179 Free Software Foundation, Inc.
21180 This config.status script is free software; the Free Software Foundation
21181 gives unlimited permission to copy, distribute and modify it."
21182 srcdir=$srcdir
21183 INSTALL="$INSTALL"
21184 EOF
21185
21186 cat >>$CONFIG_STATUS <<\EOF
21187 # If no file are specified by the user, then we need to provide default
21188 # value.  By we need to know if files were specified by the user.
21189 ac_need_defaults=:
21190 while test $# != 0
21191 do
21192   case $1 in
21193   --*=*)
21194     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21195     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21196     shift
21197     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21198     shift
21199     ;;
21200   -*);;
21201   *) # This is not an option, so the user has probably given explicit
21202      # arguments.
21203      ac_need_defaults=false;;
21204   esac
21205
21206   case $1 in
21207   # Handling of the options.
21208 EOF
21209 cat >>$CONFIG_STATUS <<EOF
21210   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21211     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21212     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21213 EOF
21214 cat >>$CONFIG_STATUS <<\EOF
21215   --version | --vers* | -V )
21216     echo "$ac_cs_version"; exit 0 ;;
21217   --he | --h)
21218     # Conflict between --help and --header
21219     { { echo "$as_me:21219: error: ambiguous option: $1
21220 Try \`$0 --help' for more information." >&5
21221 echo "$as_me: error: ambiguous option: $1
21222 Try \`$0 --help' for more information." >&2;}
21223    { (exit 1); exit 1; }; };;
21224   --help | --hel | -h )
21225     echo "$ac_cs_usage"; exit 0 ;;
21226   --debug | --d* | -d )
21227     debug=: ;;
21228   --file | --fil | --fi | --f )
21229     shift
21230     CONFIG_FILES="$CONFIG_FILES $1"
21231     ac_need_defaults=false;;
21232   --header | --heade | --head | --hea )
21233     shift
21234     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21235     ac_need_defaults=false;;
21236
21237   # This is an error.
21238   -*) { { echo "$as_me:21238: error: unrecognized option: $1
21239 Try \`$0 --help' for more information." >&5
21240 echo "$as_me: error: unrecognized option: $1
21241 Try \`$0 --help' for more information." >&2;}
21242    { (exit 1); exit 1; }; } ;;
21243
21244   *) ac_config_targets="$ac_config_targets $1" ;;
21245
21246   esac
21247   shift
21248 done
21249
21250 exec 5>>config.log
21251 cat >&5 << _ACEOF
21252
21253 ## ----------------------- ##
21254 ## Running config.status.  ##
21255 ## ----------------------- ##
21256
21257 This file was extended by $as_me 2.52.20121002, executed with
21258   CONFIG_FILES    = $CONFIG_FILES
21259   CONFIG_HEADERS  = $CONFIG_HEADERS
21260   CONFIG_LINKS    = $CONFIG_LINKS
21261   CONFIG_COMMANDS = $CONFIG_COMMANDS
21262   > $ac_cs_invocation
21263 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21264
21265 _ACEOF
21266 EOF
21267
21268 cat >>$CONFIG_STATUS <<EOF
21269 #
21270 # INIT-COMMANDS section.
21271 #
21272
21273 ### Special initialization commands, used to pass information from the
21274 ### configuration-run into config.status
21275
21276 AWK="$AWK"
21277 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21278 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21279 ECHO_LD="$ECHO_LD"
21280 LDCONFIG="$LDCONFIG"
21281 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21282 LIB_NAME="$LIB_NAME"
21283 LIB_PREFIX="$LIB_PREFIX"
21284 LIB_SUBSETS="$LIB_SUBSETS"
21285 LIB_SUFFIX="$LIB_SUFFIX"
21286 LIB_TRACING="$LIB_TRACING"
21287 LN_S="$LN_S"
21288 MAKE_TERMINFO="$MAKE_TERMINFO"
21289 NCURSES_MAJOR="$NCURSES_MAJOR"
21290 NCURSES_MINOR="$NCURSES_MINOR"
21291 NCURSES_OSPEED="$NCURSES_OSPEED"
21292 NCURSES_PATCH="$NCURSES_PATCH"
21293 SRC_SUBDIRS="$SRC_SUBDIRS"
21294 TERMINFO="$TERMINFO"
21295 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21296 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21297 TICS_NAME="$TICS_NAME"
21298 TIC_PATH="$TIC_PATH"
21299 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21300 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21301 TINFO_NAME="$TINFO_NAME"
21302 TINFO_SUFFIX="$TINFO_SUFFIX"
21303 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
21304 WITH_CURSES_H="$with_curses_h"
21305 WITH_ECHO="${enable_echo:=yes}"
21306 WITH_OVERWRITE="$with_overwrite"
21307 cf_LIST_MODELS="$cf_list_models"
21308 cf_cv_abi_version="$cf_cv_abi_version"
21309 cf_cv_do_relink="$cf_cv_do_relink"
21310 cf_cv_do_symlinks="$cf_cv_do_symlinks"
21311 cf_cv_enable_lp64="$cf_cv_enable_lp64"
21312 cf_cv_enable_opaque="$cf_cv_enable_opaque"
21313 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21314 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21315 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21316 cf_cv_rel_version="$cf_cv_rel_version"
21317 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21318 cf_cv_shared_soname='$cf_cv_shared_soname'
21319 cf_cv_shlib_version="$cf_cv_shlib_version"
21320 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21321 cf_cv_system_name="$cf_cv_system_name"
21322 cf_cv_term_driver="$with_term_driver"
21323 cf_with_ada="$cf_with_ada"
21324 cf_with_cxx_binding="$cf_with_cxx_binding"
21325 cf_with_manpages="$cf_with_manpages"
21326 cf_with_tests="$cf_with_tests"
21327 with_shared_cxx="$with_shared_cxx"
21328 host="$host"
21329 target="$target"
21330
21331 EOF
21332
21333 cat >>$CONFIG_STATUS <<\EOF
21334 for ac_config_target in $ac_config_targets
21335 do
21336   case "$ac_config_target" in
21337   # Handling of arguments.
21338   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21339   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21340   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21341   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21342   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21343   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21344   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21345   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21346   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21347   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21348   *) { { echo "$as_me:21348: error: invalid argument: $ac_config_target" >&5
21349 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21350    { (exit 1); exit 1; }; };;
21351   esac
21352 done
21353
21354 # If the user did not use the arguments to specify the items to instantiate,
21355 # then the envvar interface is used.  Set only those that are not.
21356 # We use the long form for the default assignment because of an extremely
21357 # bizarre bug on SunOS 4.1.3.
21358 if $ac_need_defaults; then
21359   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21360   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21361   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21362 fi
21363
21364 # Create a temporary directory, and hook for its removal unless debugging.
21365 $debug ||
21366 {
21367   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21368   trap '{ (exit 1); exit 1; }' 1 2 13 15
21369 }
21370
21371 # Create a (secure) tmp directory for tmp files.
21372 : ${TMPDIR=/tmp}
21373 {
21374   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21375   test -n "$tmp" && test -d "$tmp"
21376 }  ||
21377 {
21378   tmp=$TMPDIR/cs$$-$RANDOM
21379   (umask 077 && mkdir $tmp)
21380 } ||
21381 {
21382    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21383    { (exit 1); exit 1; }
21384 }
21385
21386 EOF
21387
21388 cat >>$CONFIG_STATUS <<EOF
21389
21390 #
21391 # CONFIG_FILES section.
21392 #
21393
21394 # No need to generate the scripts if there are no CONFIG_FILES.
21395 # This happens for instance when ./config.status config.h
21396 if test -n "\$CONFIG_FILES"; then
21397   # Protect against being on the right side of a sed subst in config.status.
21398   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21399    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21400 s,@SHELL@,$SHELL,;t t
21401 s,@exec_prefix@,$exec_prefix,;t t
21402 s,@prefix@,$prefix,;t t
21403 s,@program_transform_name@,$program_transform_name,;t t
21404 s,@bindir@,$bindir,;t t
21405 s,@sbindir@,$sbindir,;t t
21406 s,@libexecdir@,$libexecdir,;t t
21407 s,@datarootdir@,$datarootdir,;t t
21408 s,@datadir@,$datadir,;t t
21409 s,@sysconfdir@,$sysconfdir,;t t
21410 s,@sharedstatedir@,$sharedstatedir,;t t
21411 s,@localstatedir@,$localstatedir,;t t
21412 s,@libdir@,$libdir,;t t
21413 s,@includedir@,$includedir,;t t
21414 s,@oldincludedir@,$oldincludedir,;t t
21415 s,@infodir@,$infodir,;t t
21416 s,@mandir@,$mandir,;t t
21417 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21418 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21419 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21420 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21421 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21422 s,@build_alias@,$build_alias,;t t
21423 s,@host_alias@,$host_alias,;t t
21424 s,@target_alias@,$target_alias,;t t
21425 s,@ECHO_C@,$ECHO_C,;t t
21426 s,@ECHO_N@,$ECHO_N,;t t
21427 s,@ECHO_T@,$ECHO_T,;t t
21428 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21429 s,@DEFS@,$DEFS,;t t
21430 s,@LIBS@,$LIBS,;t t
21431 s,@top_builddir@,$top_builddir,;t t
21432 s,@EGREP@,$EGREP,;t t
21433 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21434 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21435 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21436 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21437 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21438 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21439 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21440 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21441 s,@build@,$build,;t t
21442 s,@build_cpu@,$build_cpu,;t t
21443 s,@build_vendor@,$build_vendor,;t t
21444 s,@build_os@,$build_os,;t t
21445 s,@host@,$host,;t t
21446 s,@host_cpu@,$host_cpu,;t t
21447 s,@host_vendor@,$host_vendor,;t t
21448 s,@host_os@,$host_os,;t t
21449 s,@target@,$target,;t t
21450 s,@target_cpu@,$target_cpu,;t t
21451 s,@target_vendor@,$target_vendor,;t t
21452 s,@target_os@,$target_os,;t t
21453 s,@CC@,$CC,;t t
21454 s,@CFLAGS@,$CFLAGS,;t t
21455 s,@LDFLAGS@,$LDFLAGS,;t t
21456 s,@CPPFLAGS@,$CPPFLAGS,;t t
21457 s,@ac_ct_CC@,$ac_ct_CC,;t t
21458 s,@EXEEXT@,$EXEEXT,;t t
21459 s,@OBJEXT@,$OBJEXT,;t t
21460 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21461 s,@CPP@,$CPP,;t t
21462 s,@LDCONFIG@,$LDCONFIG,;t t
21463 s,@CXX@,$CXX,;t t
21464 s,@CXXFLAGS@,$CXXFLAGS,;t t
21465 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21466 s,@AWK@,$AWK,;t t
21467 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21468 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21469 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21470 s,@LINT@,$LINT,;t t
21471 s,@LINT_OPTS@,$LINT_OPTS,;t t
21472 s,@LN_S@,$LN_S,;t t
21473 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21474 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21475 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21476 s,@SET_MAKE@,$SET_MAKE,;t t
21477 s,@CTAGS@,$CTAGS,;t t
21478 s,@ETAGS@,$ETAGS,;t t
21479 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21480 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21481 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21482 s,@RANLIB@,$RANLIB,;t t
21483 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21484 s,@LD@,$LD,;t t
21485 s,@ac_ct_LD@,$ac_ct_LD,;t t
21486 s,@AR@,$AR,;t t
21487 s,@ac_ct_AR@,$ac_ct_AR,;t t
21488 s,@NM@,$NM,;t t
21489 s,@ac_ct_NM@,$ac_ct_NM,;t t
21490 s,@ARFLAGS@,$ARFLAGS,;t t
21491 s,@DESTDIR@,$DESTDIR,;t t
21492 s,@BUILD_CC@,$BUILD_CC,;t t
21493 s,@BUILD_CPP@,$BUILD_CPP,;t t
21494 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21495 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21496 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21497 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21498 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21499 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21500 s,@cf_list_models@,$cf_list_models,;t t
21501 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21502 s,@LIBTOOL@,$LIBTOOL,;t t
21503 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21504 s,@LT_UNDEF@,$LT_UNDEF,;t t
21505 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21506 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21507 s,@LIB_CREATE@,$LIB_CREATE,;t t
21508 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21509 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21510 s,@LIB_PREP@,$LIB_PREP,;t t
21511 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21512 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21513 s,@LIB_LINK@,$LIB_LINK,;t t
21514 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21515 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21516 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21517 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21518 s,@TICS_NAME@,$TICS_NAME,;t t
21519 s,@TINFO_NAME@,$TINFO_NAME,;t t
21520 s,@LIB_NAME@,$LIB_NAME,;t t
21521 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21522 s,@CC_G_OPT@,$CC_G_OPT,;t t
21523 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21524 s,@LD_MODEL@,$LD_MODEL,;t t
21525 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21526 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21527 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21528 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21529 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
21530 s,@LINK_PROGS@,$LINK_PROGS,;t t
21531 s,@LINK_TESTS@,$LINK_TESTS,;t t
21532 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21533 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21534 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21535 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21536 s,@RPATH_LIST@,$RPATH_LIST,;t t
21537 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21538 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21539 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21540 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21541 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21542 s,@XTERM_KBS@,$XTERM_KBS,;t t
21543 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21544 s,@TERMINFO@,$TERMINFO,;t t
21545 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21546 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21547 s,@TERMPATH@,$TERMPATH,;t t
21548 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21549 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21550 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21551 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21552 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21553 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21554 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21555 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21556 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21557 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21558 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21559 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21560 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21561 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21562 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21563 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21564 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21565 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21566 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21567 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21568 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21569 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21570 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21571 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21572 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21573 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21574 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21575 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21576 s,@PTHREAD@,$PTHREAD,;t t
21577 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21578 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21579 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21580 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21581 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21582 s,@ECHO_LT@,$ECHO_LT,;t t
21583 s,@ECHO_LD@,$ECHO_LD,;t t
21584 s,@RULE_CC@,$RULE_CC,;t t
21585 s,@SHOW_CC@,$SHOW_CC,;t t
21586 s,@ECHO_CC@,$ECHO_CC,;t t
21587 s,@ECHO_LINK@,$ECHO_LINK,;t t
21588 s,@ADAFLAGS@,$ADAFLAGS,;t t
21589 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21590 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21591 s,@ADA_TRACE@,$ADA_TRACE,;t t
21592 s,@MATH_LIB@,$MATH_LIB,;t t
21593 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21594 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21595 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21596 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21597 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21598 s,@TEST_LIBS@,$TEST_LIBS,;t t
21599 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21600 s,@CXXCPP@,$CXXCPP,;t t
21601 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21602 s,@CXX_AR@,$CXX_AR,;t t
21603 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21604 s,@CXXLIBS@,$CXXLIBS,;t t
21605 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21606 s,@gnat_exists@,$gnat_exists,;t t
21607 s,@M4_exists@,$M4_exists,;t t
21608 s,@cf_ada_make@,$cf_ada_make,;t t
21609 s,@cf_compile_generics@,$cf_compile_generics,;t t
21610 s,@cf_generic_objects@,$cf_generic_objects,;t t
21611 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21612 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21613 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21614 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21615 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21616 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21617 s,@cf_ada_package@,$cf_ada_package,;t t
21618 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21619 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21620 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21621 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21622 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21623 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21624 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21625 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21626 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21627 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21628 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21629 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21630 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21631 s,@TICS_LIBS@,$TICS_LIBS,;t t
21632 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21633 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21634 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21635 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21636 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21637 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21638 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21639 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21640 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21641 s,@TICS_LIST@,$TICS_LIST,;t t
21642 s,@TINFO_LIST@,$TINFO_LIST,;t t
21643 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21644 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21645 s,@TEST_ARGS@,$TEST_ARGS,;t t
21646 s,@TEST_DEPS@,$TEST_DEPS,;t t
21647 s,@TEST_ARG2@,$TEST_ARG2,;t t
21648 s,@TEST_DEP2@,$TEST_DEP2,;t t
21649 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21650 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21651 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21652 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21653 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21654 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21655 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21656 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21657 s,@cross_compiling@,$cross_compiling,;t t
21658 s,@TIC_PATH@,$TIC_PATH,;t t
21659 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21660 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21661 s,@PANEL_NAME@,$PANEL_NAME,;t t
21662 s,@MENU_NAME@,$MENU_NAME,;t t
21663 s,@FORM_NAME@,$FORM_NAME,;t t
21664 s,@CXX_NAME@,$CXX_NAME,;t t
21665 CEOF
21666
21667 EOF
21668
21669   cat >>$CONFIG_STATUS <<\EOF
21670   # Split the substitutions into bite-sized pieces for seds with
21671   # small command number limits, like on Digital OSF/1 and HP-UX.
21672   ac_max_sed_lines=48
21673   ac_sed_frag=1 # Number of current file.
21674   ac_beg=1 # First line for current file.
21675   ac_end=$ac_max_sed_lines # Line after last line for current file.
21676   ac_more_lines=:
21677   ac_sed_cmds=
21678   while $ac_more_lines; do
21679     if test $ac_beg -gt 1; then
21680       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21681     else
21682       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21683     fi
21684     if test ! -s $tmp/subs.frag; then
21685       ac_more_lines=false
21686     else
21687       # The purpose of the label and of the branching condition is to
21688       # speed up the sed processing (if there are no `@' at all, there
21689       # is no need to browse any of the substitutions).
21690       # These are the two extra sed commands mentioned above.
21691       (echo ':t
21692   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21693       if test -z "$ac_sed_cmds"; then
21694         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21695       else
21696         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21697       fi
21698       ac_sed_frag=`expr $ac_sed_frag + 1`
21699       ac_beg=$ac_end
21700       ac_end=`expr $ac_end + $ac_max_sed_lines`
21701     fi
21702   done
21703   if test -z "$ac_sed_cmds"; then
21704     ac_sed_cmds=cat
21705   fi
21706 fi # test -n "$CONFIG_FILES"
21707
21708 EOF
21709 cat >>$CONFIG_STATUS <<\EOF
21710 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21711   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21712   case $ac_file in
21713   - | *:- | *:-:* ) # input from stdin
21714         cat >$tmp/stdin
21715         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21716         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21717   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21718         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21719   * )   ac_file_in=$ac_file.in ;;
21720   esac
21721
21722   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21723   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21724          X"$ac_file" : 'X\(//\)[^/]' \| \
21725          X"$ac_file" : 'X\(//\)$' \| \
21726          X"$ac_file" : 'X\(/\)' \| \
21727          .     : '\(.\)' 2>/dev/null ||
21728 echo X"$ac_file" |
21729     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21730           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21731           /^X\(\/\/\)$/{ s//\1/; q; }
21732           /^X\(\/\).*/{ s//\1/; q; }
21733           s/.*/./; q'`
21734   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21735     { case "$ac_dir" in
21736   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21737   *)                      as_incr_dir=.;;
21738 esac
21739 as_dummy="$ac_dir"
21740 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21741   case $as_mkdir_dir in
21742     # Skip DOS drivespec
21743     ?:) as_incr_dir=$as_mkdir_dir ;;
21744     *)
21745       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21746       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21747     ;;
21748   esac
21749 done; }
21750
21751     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21752     # A "../" for each directory in $ac_dir_suffix.
21753     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21754   else
21755     ac_dir_suffix= ac_dots=
21756   fi
21757
21758   case $srcdir in
21759   .)  ac_srcdir=.
21760       if test -z "$ac_dots"; then
21761          ac_top_srcdir=.
21762       else
21763          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21764       fi ;;
21765   [\\/]* | ?:[\\/]* )
21766       ac_srcdir=$srcdir$ac_dir_suffix;
21767       ac_top_srcdir=$srcdir ;;
21768   *) # Relative path.
21769     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21770     ac_top_srcdir=$ac_dots$srcdir ;;
21771   esac
21772
21773   case $INSTALL in
21774   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21775   *) ac_INSTALL=$ac_dots$INSTALL ;;
21776   esac
21777
21778   if test x"$ac_file" != x-; then
21779     { echo "$as_me:21779: creating $ac_file" >&5
21780 echo "$as_me: creating $ac_file" >&6;}
21781     rm -f "$ac_file"
21782   fi
21783   # Let's still pretend it is `configure' which instantiates (i.e., don't
21784   # use $as_me), people would be surprised to read:
21785   #    /* config.h.  Generated automatically by config.status.  */
21786   configure_input="Generated automatically from `echo $ac_file_in |
21787                                                  sed 's,.*/,,'` by configure."
21788
21789   # First look for the input files in the build tree, otherwise in the
21790   # src tree.
21791   ac_file_inputs=`IFS=:
21792     for f in $ac_file_in; do
21793       case $f in
21794       -) echo $tmp/stdin ;;
21795       [\\/$]*)
21796          # Absolute (can't be DOS-style, as IFS=:)
21797          test -f "$f" || { { echo "$as_me:21797: error: cannot find input file: $f" >&5
21798 echo "$as_me: error: cannot find input file: $f" >&2;}
21799    { (exit 1); exit 1; }; }
21800          echo $f;;
21801       *) # Relative
21802          if test -f "$f"; then
21803            # Build tree
21804            echo $f
21805          elif test -f "$srcdir/$f"; then
21806            # Source tree
21807            echo $srcdir/$f
21808          else
21809            # /dev/null tree
21810            { { echo "$as_me:21810: error: cannot find input file: $f" >&5
21811 echo "$as_me: error: cannot find input file: $f" >&2;}
21812    { (exit 1); exit 1; }; }
21813          fi;;
21814       esac
21815     done` || { (exit 1); exit 1; }
21816 EOF
21817 cat >>$CONFIG_STATUS <<\EOF
21818   ac_warn_datarootdir=no
21819   if test x"$ac_file" != x-; then
21820     for ac_item in $ac_file_inputs
21821     do
21822       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21823       if test -n "$ac_seen"; then
21824         ac_used=`grep '@datarootdir@' $ac_item`
21825         if test -z "$ac_used"; then
21826           { echo "$as_me:21826: WARNING: datarootdir was used implicitly but not set:
21827 $ac_seen" >&5
21828 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21829 $ac_seen" >&2;}
21830           ac_warn_datarootdir=yes
21831         fi
21832       fi
21833       ac_seen=`grep '${datarootdir}' $ac_item`
21834       if test -n "$ac_seen"; then
21835         { echo "$as_me:21835: WARNING: datarootdir was used explicitly but not set:
21836 $ac_seen" >&5
21837 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21838 $ac_seen" >&2;}
21839         ac_warn_datarootdir=yes
21840       fi
21841     done
21842   fi
21843
21844 if test "x$ac_warn_datarootdir" = xyes; then
21845   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21846 fi
21847
21848 EOF
21849 cat >>$CONFIG_STATUS <<EOF
21850   sed "$ac_vpsub
21851 $extrasub
21852 EOF
21853 cat >>$CONFIG_STATUS <<\EOF
21854 :t
21855 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21856 s,@configure_input@,$configure_input,;t t
21857 s,@srcdir@,$ac_srcdir,;t t
21858 s,@top_srcdir@,$ac_top_srcdir,;t t
21859 s,@INSTALL@,$ac_INSTALL,;t t
21860 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21861   rm -f $tmp/stdin
21862   if test x"$ac_file" != x-; then
21863     cp $tmp/out $ac_file
21864
21865     for ac_name in prefix exec_prefix datarootdir
21866     do
21867         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21868         if test -n "$ac_seen"; then
21869             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21870             if test -z "$ac_init"; then
21871               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21872               { echo "$as_me:21872: WARNING: Variable $ac_name is used but was not set:
21873 $ac_seen" >&5
21874 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21875 $ac_seen" >&2;}
21876             fi
21877         fi
21878     done
21879     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21880     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21881     if test -s $tmp/out; then
21882       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21883       { echo "$as_me:21883: WARNING: Some variables may not be substituted:
21884 $ac_seen" >&5
21885 echo "$as_me: WARNING: Some variables may not be substituted:
21886 $ac_seen" >&2;}
21887     fi
21888   else
21889     cat $tmp/out
21890   fi
21891   rm -f $tmp/out
21892
21893 done
21894 EOF
21895 cat >>$CONFIG_STATUS <<\EOF
21896
21897 #
21898 # CONFIG_HEADER section.
21899 #
21900
21901 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21902 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21903 #
21904 # ac_d sets the value in "#define NAME VALUE" lines.
21905 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21906 ac_dB='[        ].*$,\1#\2'
21907 ac_dC=' '
21908 ac_dD=',;t'
21909 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21910 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21911 ac_iB='\([      ]\),\1#\2define\3'
21912 ac_iC=' '
21913 ac_iD='\4,;t'
21914 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21915 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21916 ac_uB='$,\1#\2define\3'
21917 ac_uC=' '
21918 ac_uD=',;t'
21919
21920 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21921   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21922   case $ac_file in
21923   - | *:- | *:-:* ) # input from stdin
21924         cat >$tmp/stdin
21925         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21926         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21927   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21928         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21929   * )   ac_file_in=$ac_file.in ;;
21930   esac
21931
21932   test x"$ac_file" != x- && { echo "$as_me:21932: creating $ac_file" >&5
21933 echo "$as_me: creating $ac_file" >&6;}
21934
21935   # First look for the input files in the build tree, otherwise in the
21936   # src tree.
21937   ac_file_inputs=`IFS=:
21938     for f in $ac_file_in; do
21939       case $f in
21940       -) echo $tmp/stdin ;;
21941       [\\/$]*)
21942          # Absolute (can't be DOS-style, as IFS=:)
21943          test -f "$f" || { { echo "$as_me:21943: error: cannot find input file: $f" >&5
21944 echo "$as_me: error: cannot find input file: $f" >&2;}
21945    { (exit 1); exit 1; }; }
21946          echo $f;;
21947       *) # Relative
21948          if test -f "$f"; then
21949            # Build tree
21950            echo $f
21951          elif test -f "$srcdir/$f"; then
21952            # Source tree
21953            echo $srcdir/$f
21954          else
21955            # /dev/null tree
21956            { { echo "$as_me:21956: error: cannot find input file: $f" >&5
21957 echo "$as_me: error: cannot find input file: $f" >&2;}
21958    { (exit 1); exit 1; }; }
21959          fi;;
21960       esac
21961     done` || { (exit 1); exit 1; }
21962   # Remove the trailing spaces.
21963   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21964
21965 EOF
21966
21967 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21968 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21969 # be either 'cat' or 'sort'.
21970 cat confdefs.h | uniq >conftest.vals
21971
21972 # Break up conftest.vals because some shells have a limit on
21973 # the size of here documents, and old seds have small limits too.
21974
21975 rm -f conftest.tail
21976 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21977 while grep . conftest.vals >/dev/null
21978 do
21979   # Write chunks of a limited-size here document to conftest.frag.
21980   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21981   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21982   echo 'CEOF' >> $CONFIG_STATUS
21983   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21984   rm -f conftest.vals
21985   mv conftest.tail conftest.vals
21986 done
21987 rm -f conftest.vals
21988
21989 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21990 # marker @DEFS@.
21991 echo '  cat >> conftest.edit <<CEOF
21992 /@DEFS@/r conftest.frag
21993 /@DEFS@/d
21994 CEOF
21995 sed -f conftest.edit $tmp/in > $tmp/out
21996 rm -f $tmp/in
21997 mv $tmp/out $tmp/in
21998 rm -f conftest.edit conftest.frag
21999 ' >> $CONFIG_STATUS
22000
22001 cat >>$CONFIG_STATUS <<\EOF
22002   # Let's still pretend it is `configure' which instantiates (i.e., don't
22003   # use $as_me), people would be surprised to read:
22004   #    /* config.h.  Generated automatically by config.status.  */
22005   if test x"$ac_file" = x-; then
22006     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22007   else
22008     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22009   fi
22010   cat $tmp/in >>$tmp/config.h
22011   rm -f $tmp/in
22012   if test x"$ac_file" != x-; then
22013     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22014       { echo "$as_me:22014: $ac_file is unchanged" >&5
22015 echo "$as_me: $ac_file is unchanged" >&6;}
22016     else
22017       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22018          X"$ac_file" : 'X\(//\)[^/]' \| \
22019          X"$ac_file" : 'X\(//\)$' \| \
22020          X"$ac_file" : 'X\(/\)' \| \
22021          .     : '\(.\)' 2>/dev/null ||
22022 echo X"$ac_file" |
22023     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22024           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22025           /^X\(\/\/\)$/{ s//\1/; q; }
22026           /^X\(\/\).*/{ s//\1/; q; }
22027           s/.*/./; q'`
22028       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22029         { case "$ac_dir" in
22030   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22031   *)                      as_incr_dir=.;;
22032 esac
22033 as_dummy="$ac_dir"
22034 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22035   case $as_mkdir_dir in
22036     # Skip DOS drivespec
22037     ?:) as_incr_dir=$as_mkdir_dir ;;
22038     *)
22039       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22040       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22041     ;;
22042   esac
22043 done; }
22044
22045       fi
22046       rm -f $ac_file
22047       mv $tmp/config.h $ac_file
22048     fi
22049   else
22050     cat $tmp/config.h
22051     rm -f $tmp/config.h
22052   fi
22053 done
22054 EOF
22055 cat >>$CONFIG_STATUS <<\EOF
22056 #
22057 # CONFIG_COMMANDS section.
22058 #
22059 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22060   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22061   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22062
22063   case $ac_dest in
22064     default )
22065 if test "x$cf_with_tests" != xno ; then
22066
22067 for cf_dir in test
22068 do
22069         if test ! -d $srcdir/$cf_dir; then
22070                 continue
22071         elif test -f $srcdir/$cf_dir/programs; then
22072                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22073         fi
22074 done
22075
22076 fi
22077
22078 cf_prefix=$LIB_PREFIX
22079
22080 case $cf_cv_shlib_version in #(vi
22081 cygdll|mingw)
22082         TINFO_NAME=$TINFO_ARG_SUFFIX
22083         TINFO_SUFFIX=.dll
22084         ;;
22085 esac
22086
22087 if test -n "$TINFO_SUFFIX" ; then
22088         case $TINFO_SUFFIX in
22089         tw*)
22090                 TINFO_NAME="${TINFO_NAME}tw"
22091                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22092                 ;;
22093         t*)
22094                 TINFO_NAME="${TINFO_NAME}t"
22095                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22096                 ;;
22097         w*)
22098                 TINFO_NAME="${TINFO_NAME}w"
22099                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22100                 ;;
22101         esac
22102 fi
22103
22104 for cf_dir in $SRC_SUBDIRS
22105 do
22106         if test ! -d $srcdir/$cf_dir ; then
22107                 continue
22108         elif test -f $srcdir/$cf_dir/modules; then
22109
22110                 SHARED_LIB=
22111                 Libs_To_Make=
22112                 for cf_item in $cf_LIST_MODELS
22113                 do
22114
22115         case X$cf_item in #(vi
22116         Xlibtool) #(vi
22117                 cf_suffix='.la'
22118                 cf_depsuf=$cf_suffix
22119                 ;;
22120         Xdebug) #(vi
22121                 cf_suffix='_g.a'
22122                 cf_depsuf=$cf_suffix
22123                 ;;
22124         Xprofile) #(vi
22125                 cf_suffix='_p.a'
22126                 cf_depsuf=$cf_suffix
22127                 ;;
22128         Xshared) #(vi
22129                 case $cf_cv_system_name in
22130                 aix[5-7]*) #(vi
22131                         cf_suffix='.a'
22132                         cf_depsuf=$cf_suffix
22133                         ;;
22134                 cygwin*|mingw*) #(vi
22135                         cf_suffix='.dll'
22136                         cf_depsuf='.dll.a'
22137                         ;;
22138                 darwin*) #(vi
22139                         cf_suffix='.dylib'
22140                         cf_depsuf=$cf_suffix
22141                         ;;
22142                 hpux*) #(vi
22143                         case $target in
22144                         ia64*) #(vi
22145                                 cf_suffix='.so'
22146                                 cf_depsuf=$cf_suffix
22147                                 ;;
22148                         *) #(vi
22149                                 cf_suffix='.sl'
22150                                 cf_depsuf=$cf_suffix
22151                                 ;;
22152                         esac
22153                         ;;
22154                 *) #(vi
22155                         cf_suffix='.so'
22156                         cf_depsuf=$cf_suffix
22157                         ;;
22158                 esac
22159                 ;;
22160         *)
22161                 cf_suffix='.a'
22162                 cf_depsuf=$cf_suffix
22163                 ;;
22164         esac
22165         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22166         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22167
22168                         cf_libname=$cf_dir
22169                         test "$cf_dir" = c++ && cf_libname=ncurses++
22170                         if test $cf_item = shared ; then
22171                                 if test -n "${LIB_SUFFIX}"
22172                                 then
22173                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22174                                 else
22175                                         cf_shared_suffix="$cf_suffix"
22176                                 fi
22177                                 if test "$cf_cv_do_symlinks" = yes ; then
22178                                         cf_version_name=
22179
22180                                         case "$cf_cv_shlib_version" in #(vi
22181                                         rel) #(vi
22182                                                 cf_version_name=REL_VERSION
22183                                                 ;;
22184                                         abi)
22185                                                 cf_version_name=ABI_VERSION
22186                                                 ;;
22187                                         esac
22188
22189                                         if test -n "$cf_version_name"
22190                                         then
22191                                                 case "$cf_cv_system_name" in #(vi
22192                                                 darwin*)
22193                                                         # "w", etc?
22194                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22195                                                         ;; #(vi
22196                                                 *)
22197                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22198                                                         ;;
22199                                                 esac
22200                                         fi
22201                                         if test -n "${LIB_SUFFIX}"
22202                                         then
22203                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22204                                         else
22205                                                 cf_shared_suffix="$cf_suffix"
22206                                         fi
22207                                 fi
22208                                 # cygwin needs import library, and has unique naming convention
22209                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22210                                 # use 'cyg' prefix for shared lib.
22211                                 case $cf_cv_shlib_version in #(vi
22212                                 cygdll) #(vi
22213                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22214                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22215                                         continue
22216                                         ;;
22217                                 mingw)
22218                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22219                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22220                                         continue
22221                                         ;;
22222                                 esac
22223                         fi
22224                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22225                 done
22226
22227                 if test $cf_dir = ncurses ; then
22228                         cf_subsets="$LIB_SUBSETS"
22229                         cf_r_parts="$cf_subsets"
22230                         cf_liblist="$Libs_To_Make"
22231
22232                         while test -n "$cf_r_parts"
22233                         do
22234                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22235                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22236                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22237                                         cf_item=
22238                                         case $cf_l_parts in #(vi
22239                                         *termlib*) #(vi
22240                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22241                                                 ;;
22242                                         *ticlib*)
22243                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22244                                                 ;;
22245                                         *)
22246                                                 break
22247                                                 ;;
22248                                         esac
22249                                         if test -n "$cf_item"; then
22250                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22251                                         fi
22252                                 else
22253                                         break
22254                                 fi
22255                         done
22256                 else
22257                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22258                 fi
22259
22260                 if test $cf_dir = c++; then
22261                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22262                                 cf_list=
22263                                 for cf_item in $Libs_To_Make
22264                                 do
22265                                         case $cf_item in
22266                                         *.a)
22267                                                 ;;
22268                                         *)
22269                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22270                                                 ;;
22271                                         esac
22272                                         for cf_test in $cf_list
22273                                         do
22274                                                 if test "$cf_test" = "$cf_item"
22275                                                 then
22276                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22277                                                         cf_item=
22278                                                         break
22279                                                 fi
22280                                         done
22281                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
22282                                 done
22283                                 Libs_To_Make="$cf_list"
22284                         fi
22285                 fi
22286
22287                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22288                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22289                         $cf_dir/Makefile >$cf_dir/Makefile.out
22290                 mv $cf_dir/Makefile.out $cf_dir/Makefile
22291
22292                 $AWK -f $srcdir/mk-0th.awk \
22293                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22294                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22295
22296                 for cf_subset in $cf_subsets
22297                 do
22298                         cf_subdirs=
22299                         for cf_item in $cf_LIST_MODELS
22300                         do
22301
22302                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22303
22304 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22305
22306                         CXX_MODEL=$cf_ITEM
22307                         if test "$CXX_MODEL" = SHARED; then
22308                                 case $cf_cv_shlib_version in #(vi
22309                                 cygdll|mingw) #(vi
22310                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
22311
22312 echo "${as_me:-configure}:22312: testing overriding CXX_MODEL to SHARED ..." 1>&5
22313
22314                                         with_shared_cxx=yes
22315                                         ;;
22316                                 *)
22317                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22318                                         ;;
22319                                 esac
22320                         fi
22321
22322         case X$cf_item in #(vi
22323         Xlibtool) #(vi
22324                 cf_suffix='.la'
22325                 cf_depsuf=$cf_suffix
22326                 ;;
22327         Xdebug) #(vi
22328                 cf_suffix='_g.a'
22329                 cf_depsuf=$cf_suffix
22330                 ;;
22331         Xprofile) #(vi
22332                 cf_suffix='_p.a'
22333                 cf_depsuf=$cf_suffix
22334                 ;;
22335         Xshared) #(vi
22336                 case $cf_cv_system_name in
22337                 aix[5-7]*) #(vi
22338                         cf_suffix='.a'
22339                         cf_depsuf=$cf_suffix
22340                         ;;
22341                 cygwin*|mingw*) #(vi
22342                         cf_suffix='.dll'
22343                         cf_depsuf='.dll.a'
22344                         ;;
22345                 darwin*) #(vi
22346                         cf_suffix='.dylib'
22347                         cf_depsuf=$cf_suffix
22348                         ;;
22349                 hpux*) #(vi
22350                         case $target in
22351                         ia64*) #(vi
22352                                 cf_suffix='.so'
22353                                 cf_depsuf=$cf_suffix
22354                                 ;;
22355                         *) #(vi
22356                                 cf_suffix='.sl'
22357                                 cf_depsuf=$cf_suffix
22358                                 ;;
22359                         esac
22360                         ;;
22361                 *) #(vi
22362                         cf_suffix='.so'
22363                         cf_depsuf=$cf_suffix
22364                         ;;
22365                 esac
22366                 ;;
22367         *)
22368                 cf_suffix='.a'
22369                 cf_depsuf=$cf_suffix
22370                 ;;
22371         esac
22372         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22373         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22374
22375         case $cf_item in
22376         libtool) cf_subdir='obj_lo'  ;;
22377         normal)  cf_subdir='objects' ;;
22378         debug)   cf_subdir='obj_g' ;;
22379         profile) cf_subdir='obj_p' ;;
22380         shared)
22381                 case $cf_cv_system_name in #(vi
22382                 cygwin) #(vi
22383                         cf_subdir='objects' ;;
22384                 *)
22385                         cf_subdir='obj_s' ;;
22386                 esac
22387         esac
22388
22389                         # Test for case where we build libtinfo with a different name.
22390                         cf_libname=$cf_dir
22391                         if test $cf_dir = ncurses ; then
22392                                 case $cf_subset in
22393                                 *base*)
22394                                         cf_libname=${cf_libname}$LIB_SUFFIX
22395                                         ;;
22396                                 *termlib*)
22397                                         cf_libname=$TINFO_LIB_SUFFIX
22398                                         ;;
22399                                 ticlib*)
22400                                         cf_libname=$TICS_LIB_SUFFIX
22401                                         ;;
22402                                 esac
22403                         elif test $cf_dir = c++ ; then
22404                                 cf_libname=ncurses++$LIB_SUFFIX
22405                         else
22406                                 cf_libname=${cf_libname}$LIB_SUFFIX
22407                         fi
22408                         if test -n "${DFT_ARG_SUFFIX}" ; then
22409                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22410                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22411                         fi
22412
22413                         # These dependencies really are for development, not
22414                         # builds, but they are useful in porting, too.
22415                         cf_depend="../include/ncurses_cfg.h"
22416                         if test "$srcdir" = "."; then
22417                                 cf_reldir="."
22418                         else
22419                                 cf_reldir="\${srcdir}"
22420                         fi
22421
22422                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22423                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22424                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22425                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22426                         fi
22427
22428                         cf_dir_suffix=
22429                         old_cf_suffix="$cf_suffix"
22430                         if test "$cf_cv_shlib_version_infix" = yes ; then
22431                         if test -n "$LIB_SUFFIX" ; then
22432                                 case $LIB_SUFFIX in
22433                                 tw*)
22434                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22435                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22436                                         cf_dir_suffix=tw
22437                                         ;;
22438                                 t*)
22439                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22440                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22441                                         cf_dir_suffix=t
22442                                         ;;
22443                                 w*)
22444                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22445                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22446                                         cf_dir_suffix=w
22447                                         ;;
22448                                 esac
22449                         fi
22450                         fi
22451
22452                         $AWK -f $srcdir/mk-1st.awk \
22453                                 name=${cf_libname}${cf_dir_suffix} \
22454                                 traces=$LIB_TRACING \
22455                                 MODEL=$cf_ITEM \
22456                                 CXX_MODEL=$CXX_MODEL \
22457                                 model=$cf_subdir \
22458                                 prefix=$cf_prefix \
22459                                 suffix=$cf_suffix \
22460                                 subset=$cf_subset \
22461                                 driver=$cf_cv_term_driver \
22462                                 SymLink="$LN_S" \
22463                                 TermlibRoot=$TINFO_NAME \
22464                                 TermlibSuffix=$TINFO_SUFFIX \
22465                                 ShlibVer=$cf_cv_shlib_version \
22466                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22467                                 ReLink=${cf_cv_do_relink:-no} \
22468                                 DoLinks=$cf_cv_do_symlinks \
22469                                 rmSoLocs=$cf_cv_rm_so_locs \
22470                                 ldconfig="$LDCONFIG" \
22471                                 overwrite=$WITH_OVERWRITE \
22472                                 depend="$cf_depend" \
22473                                 host="$host" \
22474                                 libtool_version="$LIBTOOL_VERSION" \
22475                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22476
22477                         cf_suffix="$old_cf_suffix"
22478
22479                         for cf_subdir2 in $cf_subdirs lib
22480                         do
22481                                 test $cf_subdir = $cf_subdir2 && break
22482                         done
22483                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22484                         $AWK -f $srcdir/mk-2nd.awk \
22485                                 name=$cf_dir \
22486                                 traces=$LIB_TRACING \
22487                                 MODEL=$cf_ITEM \
22488                                 model=$cf_subdir \
22489                                 subset=$cf_subset \
22490                                 srcdir=$srcdir \
22491                                 echo=$WITH_ECHO \
22492                                 crenames=$cf_cv_prog_CC_c_o \
22493                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22494                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22495                         cf_subdirs="$cf_subdirs $cf_subdir"
22496                         done
22497                 done
22498         fi
22499
22500         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22501 done
22502
22503 for cf_dir in $SRC_SUBDIRS
22504 do
22505         if test ! -d $srcdir/$cf_dir ; then
22506                 continue
22507         fi
22508
22509         if test -f $cf_dir/Makefile ; then
22510                 case "$cf_dir" in
22511                 Ada95) #(vi
22512                         echo 'libs \' >> Makefile
22513                         echo 'install.libs \' >> Makefile
22514                         echo 'uninstall.libs ::' >> Makefile
22515                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22516                         ;;
22517                 esac
22518         fi
22519
22520         if test -f $srcdir/$cf_dir/modules; then
22521                 echo >> Makefile
22522                 if test -f $srcdir/$cf_dir/headers; then
22523 cat >> Makefile <<CF_EOF
22524 install.includes \\
22525 uninstall.includes \\
22526 CF_EOF
22527                 fi
22528 if test "$cf_dir" != "c++" ; then
22529 echo 'lint \' >> Makefile
22530 fi
22531 cat >> Makefile <<CF_EOF
22532 libs \\
22533 lintlib \\
22534 install.libs \\
22535 uninstall.libs \\
22536 install.$cf_dir \\
22537 uninstall.$cf_dir ::
22538         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22539 CF_EOF
22540         elif test -f $srcdir/$cf_dir/headers; then
22541 cat >> Makefile <<CF_EOF
22542
22543 libs \\
22544 install.libs \\
22545 uninstall.libs \\
22546 install.includes \\
22547 uninstall.includes ::
22548         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22549 CF_EOF
22550 fi
22551 done
22552
22553 cat >> Makefile <<CF_EOF
22554
22555 install.libs uninstall.libs \\
22556 install.data uninstall.data ::
22557 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22558 CF_EOF
22559
22560 if test "x$cf_with_manpages" = xyes; then
22561 cat >> Makefile <<CF_EOF
22562
22563 install.man \\
22564 uninstall.man ::
22565         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22566 CF_EOF
22567 fi
22568
22569 cat >> Makefile <<CF_EOF
22570
22571 distclean ::
22572         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22573         rm -f headers.sh headers.sed mk_shared_lib.sh
22574         rm -f edit_man.* man_alias.*
22575         rm -rf \${DIRS_TO_MAKE}
22576 CF_EOF
22577
22578 # Special case: tack's manpage lives in its own directory.
22579 if test "x$cf_with_manpages" = xyes; then
22580 if test -d tack ; then
22581 if test -f $srcdir/$tack.h; then
22582 cat >> Makefile <<CF_EOF
22583
22584 install.man \\
22585 uninstall.man ::
22586         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22587 CF_EOF
22588 fi
22589 fi
22590 fi
22591
22592 rm -f headers.sed headers.sh
22593
22594 echo creating headers.sh
22595 cat >headers.sh <<CF_EOF
22596 #! /bin/sh
22597 # This shell script is generated by the 'configure' script.  It is invoked in a
22598 # subdirectory of the build tree.  It generates a sed-script in the parent
22599 # directory that is used to adjust includes for header files that reside in a
22600 # subdirectory of /usr/include, etc.
22601 PRG=""
22602 while test \$# != 3
22603 do
22604 PRG="\$PRG \$1"; shift
22605 done
22606 DST=\$1
22607 REF=\$2
22608 SRC=\$3
22609 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22610 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22611 echo installing \$SRC in \$DST
22612 CF_EOF
22613
22614 if test $WITH_CURSES_H = yes; then
22615         cat >>headers.sh <<CF_EOF
22616 case \$DST in
22617 /*/include/*)
22618         END=\`basename \$DST\`
22619         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22620         do
22621                 NAME=\`basename \$i\`
22622                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22623         done
22624         ;;
22625 *)
22626         echo "" >> \$TMPSED
22627         ;;
22628 esac
22629 CF_EOF
22630
22631 else
22632         cat >>headers.sh <<CF_EOF
22633 case \$DST in
22634 /*/include/*)
22635         END=\`basename \$DST\`
22636         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22637         do
22638                 NAME=\`basename \$i\`
22639                 if test "\$NAME" = "curses.h"
22640                 then
22641                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22642                         NAME=ncurses.h
22643                 fi
22644                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22645         done
22646         ;;
22647 *)
22648         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22649         ;;
22650 esac
22651 CF_EOF
22652 fi
22653 cat >>headers.sh <<CF_EOF
22654 rm -f \$TMPSRC
22655 sed -f \$TMPSED \$SRC > \$TMPSRC
22656 NAME=\`basename \$SRC\`
22657 CF_EOF
22658 if test $WITH_CURSES_H != yes; then
22659         cat >>headers.sh <<CF_EOF
22660 test "\$NAME" = "curses.h" && NAME=ncurses.h
22661 CF_EOF
22662 fi
22663 cat >>headers.sh <<CF_EOF
22664 # Just in case someone gzip'd manpages, remove the conflicting copy.
22665 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22666
22667 eval \$PRG \$TMPSRC \$DST/\$NAME
22668 rm -f \$TMPSRC \$TMPSED
22669 CF_EOF
22670
22671 chmod 0755 headers.sh
22672
22673 for cf_dir in $SRC_SUBDIRS
22674 do
22675         if test ! -d $srcdir/$cf_dir ; then
22676                 continue
22677         fi
22678
22679         if test -f $srcdir/$cf_dir/headers; then
22680                 $AWK -f $srcdir/mk-hdr.awk \
22681                         subset="$LIB_SUBSETS" \
22682                         compat="$WITH_CURSES_H" \
22683                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22684         fi
22685
22686         if test -f $srcdir/$cf_dir/modules; then
22687                 if test "$cf_dir" != "c++" ; then
22688                         cat >>$cf_dir/Makefile <<"CF_EOF"
22689 depend : ${AUTO_SRC}
22690         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22691
22692 # DO NOT DELETE THIS LINE -- make depend depends on it.
22693 CF_EOF
22694                 fi
22695         fi
22696 done
22697
22698 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22699 if test -z "$USE_OLD_MAKERULES" ; then
22700         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22701 fi
22702 fi
22703  ;;
22704   esac
22705 done
22706 EOF
22707
22708 cat >>$CONFIG_STATUS <<\EOF
22709
22710 { (exit 0); exit 0; }
22711 EOF
22712 chmod +x $CONFIG_STATUS
22713 ac_clean_files=$ac_clean_files_save
22714
22715 # configure is writing to config.log, and then calls config.status.
22716 # config.status does its own redirection, appending to config.log.
22717 # Unfortunately, on DOS this fails, as config.log is still kept open
22718 # by configure, so config.status won't be able to write to it; its
22719 # output is simply discarded.  So we exec the FD to /dev/null,
22720 # effectively closing config.log, so it can be properly (re)opened and
22721 # appended to by config.status.  When coming back to configure, we
22722 # need to make the FD available again.
22723 if test "$no_create" != yes; then
22724   ac_cs_success=:
22725   exec 5>/dev/null
22726   $SHELL $CONFIG_STATUS || ac_cs_success=false
22727   exec 5>>config.log
22728   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22729   # would make configure fail if this is the last instruction.
22730   $ac_cs_success || { (exit 1); exit 1; }
22731 fi
22732 ${MAKE:-make} preinstall