]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20140913
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.584 .
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   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --enable-mixed-case     tic should assume mixed-case filenames
718   --with-install-prefix   prefixes actual install-location ($DESTDIR)
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727   --disable-libtool-version  enable to use libtool's incompatible naming scheme
728   --with-libtool          generate libraries with libtool
729   --with-shared           generate shared-libraries
730   --with-normal           generate normal-libraries (default)
731   --with-debug            generate debug-libraries (default)
732   --with-profile          generate profile-libraries
733   --with-cxx-shared       generate C++ shared-libraries
734   --with-lib-prefix       override library-prefix
735   --with-termlib          generate separate terminfo library
736   --with-ticlib           generate separate tic library
737   --with-gpm              use Alessandro Rubini's GPM library
738   --without-dlsym         do not use dlsym() to load GPM dynamically
739   --with-sysmouse         use sysmouse (FreeBSD console)
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --disable-lib-suffixes  disable library suffixes
744   --disable-rpath-hack    don't add rpath options for additional libraries
745 Fine-Tuning Your Configuration:
746   --disable-overwrite     leave out the link to -lcurses
747   --disable-database      do not use terminfo, only fallbacks/termcap
748   --with-database=XXX     specify terminfo source to install
749   --with-hashed-db        specify hashed-database library
750   --with-fallbacks=XXX    specify list of fallback terminal descriptions
751   --without-xterm-new     specify if xterm terminfo should be old version
752   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
753   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
754   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
755   --disable-big-core      assume machine has little memory
756   --disable-big-strings   assume compiler has only standard-size strings
757   --enable-termcap        compile in termcap fallback support
758   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
759   --enable-getcap         fast termcap load, no xrefs to terminfo
760   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
761   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
762   --disable-root-environ  restrict environment when running as root
763   --enable-symlinks       make tic use symbolic links not hard links
764   --enable-broken_linker  compile with broken-linker support code
765   --enable-bsdpad         recognize BSD-style prefix padding
766   --enable-widec          compile with wide-char/UTF-8 code
767   --disable-lp64          allow chtype to be long (ignore _LP64)
768   --disable-largefile     omit support for large files
769   --disable-tparm-varargs compile tparm() without varargs interface
770   --disable-tic-depends   link tic library without explicit dependency on ncurses library
771   --with-bool=TYPE        override fallback type of bool variable
772   --with-caps=alt         compile with alternate Caps file
773   --with-chtype=TYPE      override type of chtype
774   --with-ospeed=TYPE      override type of ospeed variable
775   --with-mmask-t=TYPE     override type of mmask_t
776   --with-ccharw-max=XXX   override size CCHARW_MAX
777   --with-tparm-arg=TYPE   override parameter type of tparm
778   --with-rcs-ids          compile-in RCS identifiers
779 Options to Specify How Manpages are Installed:
780   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
781                           optionally formatted/catonly, e.g., gzip,formatted
782   --with-manpage-renames  specify manpage-renaming
783   --with-manpage-aliases  specify manpage-aliases using .so
784   --with-manpage-symlinks specify manpage-aliases using symlinks
785   --with-manpage-tbl      specify manpage processing with tbl
786 Extensions:
787   --disable-ext-funcs     disable function-extensions
788   --enable-sp-funcs       enable experimental SCREEN-extensions
789   --enable-term-driver    enable experimental terminal-driver
790   --enable-const          compile with extra/non-standard const
791   --enable-ext-colors     compile for 256-color support
792   --enable-ext-mouse      compile for extended mouse-encoding
793   --enable-no-padding     compile with $NCURSES_NO_PADDING code
794   --enable-signed-char    compile using signed Boolean's in term.h
795   --enable-sigwinch       compile with SIGWINCH handler
796   --enable-tcap-names     compile with user-definable terminal capabilities
797 Development Code:
798   --without-develop       disable development options
799   --enable-hard-tabs      compile with hard-tabs code
800   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
801 Experimental Code:
802   --disable-assumed-color do not assume anything about default-colors
803   --disable-hashmap       compile without hashmap scrolling-optimization
804   --enable-colorfgbg      compile-in experimental $COLORFGBG code
805   --enable-interop        compile-in experimental interop bindings
806   --with-pthread          use POSIX thread library
807   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
808   --enable-weak-symbols   enable weak-symbols for pthreads
809   --enable-reentrant      compile with experimental reentrant code
810   --with-wrap-prefix=XXX  override prefix used for public variables
811   --enable-safe-sprintf   compile with experimental safe-sprintf code
812   --disable-scroll-hints  compile without scroll-hints code
813   --enable-wgetch-events  compile with experimental wgetch-events code
814 Testing/development Options:
815   --disable-echo          do not display "compiling" commands
816   --enable-warnings       build: turn on GCC compiler warnings
817   --enable-string-hacks   work around bogus compiler/loader warnings
818   --enable-assertions     test: turn on generation of assertion code
819   --with-dmalloc          test: use Gray Watson's dmalloc library
820   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
821   --with-valgrind         test: use valgrind
822   --disable-leaks         test: free permanent memory, analyze leaks
823   --enable-expanded       test: generate functions for certain macros
824   --disable-macros        test: use functions rather than macros
825   --with-trace            test: add trace() function to all models of ncurses
826   --disable-gnat-projects test: disable GNAT projects even if usable
827 Ada95 Binding Options:
828   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
829   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
830   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
831   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
832
833 Some influential environment variables:
834   CC          C compiler command
835   CFLAGS      C compiler flags
836   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
837               nonstandard directory <lib dir>
838   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
839               headers in a nonstandard directory <include dir>
840   CPP         C preprocessor
841   CXX         C++ compiler command
842   CXXFLAGS    C++ compiler flags
843   CXXCPP      C++ preprocessor
844
845 Use these variables to override the choices made by `configure' or to help
846 it to find libraries and programs with nonstandard names/locations.
847
848 EOF
849 fi
850
851 if test "$ac_init_help" = "recursive"; then
852   # If there are subdirs, report their specific --help.
853   ac_popdir=`pwd`
854   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
855     cd $ac_subdir
856     # A "../" for each directory in /$ac_subdir.
857     ac_dots=`echo $ac_subdir |
858              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
859
860     case $srcdir in
861     .) # No --srcdir option.  We are building in place.
862       ac_sub_srcdir=$srcdir ;;
863     [\\/]* | ?:[\\/]* ) # Absolute path.
864       ac_sub_srcdir=$srcdir/$ac_subdir ;;
865     *) # Relative path.
866       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
867     esac
868
869     # Check for guested configure; otherwise get Cygnus style configure.
870     if test -f $ac_sub_srcdir/configure.gnu; then
871       echo
872       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
873     elif test -f $ac_sub_srcdir/configure; then
874       echo
875       $SHELL $ac_sub_srcdir/configure  --help=recursive
876     elif test -f $ac_sub_srcdir/configure.ac ||
877            test -f $ac_sub_srcdir/configure.in; then
878       echo
879       $ac_configure --help
880     else
881       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
882     fi
883     cd $ac_popdir
884   done
885 fi
886
887 test -n "$ac_init_help" && exit 0
888 if $ac_init_version; then
889   cat <<\EOF
890
891 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
892 Free Software Foundation, Inc.
893 This configure script is free software; the Free Software Foundation
894 gives unlimited permission to copy, distribute and modify it.
895 EOF
896   exit 0
897 fi
898 exec 5>config.log
899 cat >&5 <<EOF
900 This file contains any messages produced by compilers while
901 running configure, to aid debugging if configure makes a mistake.
902
903 It was created by $as_me, which was
904 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
905
906   $ $0 $@
907
908 EOF
909 {
910 cat <<_ASUNAME
911 ## ---------- ##
912 ## Platform.  ##
913 ## ---------- ##
914
915 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
916 uname -m = `(uname -m) 2>/dev/null || echo unknown`
917 uname -r = `(uname -r) 2>/dev/null || echo unknown`
918 uname -s = `(uname -s) 2>/dev/null || echo unknown`
919 uname -v = `(uname -v) 2>/dev/null || echo unknown`
920
921 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
922 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
923
924 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
925 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
926 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
927 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
928 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
929 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
930 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
931
932 PATH = $PATH
933
934 _ASUNAME
935 } >&5
936
937 cat >&5 <<EOF
938 ## ------------ ##
939 ## Core tests.  ##
940 ## ------------ ##
941
942 EOF
943
944 # Keep a trace of the command line.
945 # Strip out --no-create and --no-recursion so they do not pile up.
946 # Also quote any args containing shell meta-characters.
947 ac_configure_args=
948 ac_sep=
949 for ac_arg
950 do
951   case $ac_arg in
952   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
953   | --no-cr | --no-c) ;;
954   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
956   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
957     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
958     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
959     ac_sep=" " ;;
960   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
961      ac_sep=" " ;;
962   esac
963   # Get rid of the leading space.
964 done
965
966 # When interrupted or exit'd, cleanup temporary files, and complete
967 # config.log.  We remove comments because anyway the quotes in there
968 # would cause problems or look ugly.
969 trap 'exit_status=$?
970   # Save into config.log some information that might help in debugging.
971   echo >&5
972   echo "## ----------------- ##" >&5
973   echo "## Cache variables.  ##" >&5
974   echo "## ----------------- ##" >&5
975   echo >&5
976   # The following way of writing the cache mishandles newlines in values,
977 {
978   (set) 2>&1 |
979     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
980     *ac_space=\ *)
981       sed -n \
982         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
983           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
984       ;;
985     *)
986       sed -n \
987         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
988       ;;
989     esac;
990 } >&5
991   sed "/^$/d" confdefs.h >conftest.log
992   if test -s conftest.log; then
993     echo >&5
994     echo "## ------------ ##" >&5
995     echo "## confdefs.h.  ##" >&5
996     echo "## ------------ ##" >&5
997     echo >&5
998     cat conftest.log >&5
999   fi
1000   (echo; echo) >&5
1001   test "$ac_signal" != 0 &&
1002     echo "$as_me: caught signal $ac_signal" >&5
1003   echo "$as_me: exit $exit_status" >&5
1004   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1005     exit $exit_status
1006      ' 0
1007 for ac_signal in 1 2 13 15; do
1008   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1009 done
1010 ac_signal=0
1011
1012 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1013 rm -rf conftest* confdefs.h
1014 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1015 echo >confdefs.h
1016
1017 # Let the site file select an alternate cache file if it wants to.
1018 # Prefer explicitly selected file to automatically selected ones.
1019 if test -z "$CONFIG_SITE"; then
1020   if test "x$prefix" != xNONE; then
1021     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1022   else
1023     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1024   fi
1025 fi
1026 for ac_site_file in $CONFIG_SITE; do
1027   if test -r "$ac_site_file"; then
1028     { echo "$as_me:1028: loading site script $ac_site_file" >&5
1029 echo "$as_me: loading site script $ac_site_file" >&6;}
1030     cat "$ac_site_file" >&5
1031     . "$ac_site_file"
1032   fi
1033 done
1034
1035 if test -r "$cache_file"; then
1036   # Some versions of bash will fail to source /dev/null (special
1037   # files actually), so we avoid doing that.
1038   if test -f "$cache_file"; then
1039     { echo "$as_me:1039: loading cache $cache_file" >&5
1040 echo "$as_me: loading cache $cache_file" >&6;}
1041     case $cache_file in
1042       [\\/]* | ?:[\\/]* ) . $cache_file;;
1043       *)                      . ./$cache_file;;
1044     esac
1045   fi
1046 else
1047   { echo "$as_me:1047: creating cache $cache_file" >&5
1048 echo "$as_me: creating cache $cache_file" >&6;}
1049   >$cache_file
1050 fi
1051
1052 # Check that the precious variables saved in the cache have kept the same
1053 # value.
1054 ac_cache_corrupted=false
1055 for ac_var in `(set) 2>&1 |
1056                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1057   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1058   eval ac_new_set=\$ac_env_${ac_var}_set
1059   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1060   eval ac_new_val="\$ac_env_${ac_var}_value"
1061   case $ac_old_set,$ac_new_set in
1062     set,)
1063       { echo "$as_me:1063: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,set)
1067       { echo "$as_me:1067: error: \`$ac_var' was not set in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,);;
1071     *)
1072       if test "x$ac_old_val" != "x$ac_new_val"; then
1073         { echo "$as_me:1073: error: \`$ac_var' has changed since the previous run:" >&5
1074 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1075         { echo "$as_me:1075:   former value:  $ac_old_val" >&5
1076 echo "$as_me:   former value:  $ac_old_val" >&2;}
1077         { echo "$as_me:1077:   current value: $ac_new_val" >&5
1078 echo "$as_me:   current value: $ac_new_val" >&2;}
1079         ac_cache_corrupted=:
1080       fi;;
1081   esac
1082   # Pass precious variables to config.status.  It doesn't matter if
1083   # we pass some twice (in addition to the command line arguments).
1084   if test "$ac_new_set" = set; then
1085     case $ac_new_val in
1086     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1087       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1088       ac_configure_args="$ac_configure_args '$ac_arg'"
1089       ;;
1090     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1091        ;;
1092     esac
1093   fi
1094 done
1095 if $ac_cache_corrupted; then
1096   { echo "$as_me:1096: error: changes in the environment can compromise the build" >&5
1097 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1098   { { echo "$as_me:1098: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1099 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1100    { (exit 1); exit 1; }; }
1101 fi
1102
1103 ac_ext=c
1104 ac_cpp='$CPP $CPPFLAGS'
1105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1108 ac_main_return=return
1109
1110 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1111   *c*,-n*) ECHO_N= ECHO_C='
1112 ' ECHO_T='      ' ;;
1113   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1114   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1115 esac
1116 echo "#! $SHELL" >conftest.sh
1117 echo  "exit 0"   >>conftest.sh
1118 chmod +x conftest.sh
1119 if { (echo "$as_me:1119: PATH=\".;.\"; conftest.sh") >&5
1120   (PATH=".;."; conftest.sh) 2>&5
1121   ac_status=$?
1122   echo "$as_me:1122: \$? = $ac_status" >&5
1123   (exit $ac_status); }; then
1124   ac_path_separator=';'
1125 else
1126   ac_path_separator=:
1127 fi
1128 PATH_SEPARATOR="$ac_path_separator"
1129 rm -f conftest.sh
1130
1131 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1132
1133 top_builddir=`pwd`
1134
1135 echo "$as_me:1135: checking for egrep" >&5
1136 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1137 if test "${ac_cv_prog_egrep+set}" = set; then
1138   echo $ECHO_N "(cached) $ECHO_C" >&6
1139 else
1140   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1141     then ac_cv_prog_egrep='grep -E'
1142     else ac_cv_prog_egrep='egrep'
1143     fi
1144 fi
1145 echo "$as_me:1145: result: $ac_cv_prog_egrep" >&5
1146 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1147  EGREP=$ac_cv_prog_egrep
1148
1149 test -z "$EGREP" && { { echo "$as_me:1149: error: No egrep program found" >&5
1150 echo "$as_me: error: No egrep program found" >&2;}
1151    { (exit 1); exit 1; }; }
1152
1153 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1155 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1156 cf_cv_abi_version=${NCURSES_MAJOR}
1157 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1158 cf_cv_timestamp=`date`
1159 echo "$as_me:1159: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1160 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1161
1162 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1163
1164 # Check whether --with-rel-version or --without-rel-version was given.
1165 if test "${with_rel_version+set}" = set; then
1166   withval="$with_rel_version"
1167   { echo "$as_me:1167: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1168 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1169  cf_cv_rel_version=$withval
1170 fi;
1171
1172  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1173  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1174
1175 if test -n "$NCURSES_MAJOR" ; then
1176   case $NCURSES_MAJOR in #(vi
1177   [0-9]*) #(vi
1178         ;;
1179   *)
1180         { { echo "$as_me:1180: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1181 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1182    { (exit 1); exit 1; }; }
1183         ;;
1184   esac
1185 else
1186   { { echo "$as_me:1186: error: Release major-version value is empty" >&5
1187 echo "$as_me: error: Release major-version value is empty" >&2;}
1188    { (exit 1); exit 1; }; }
1189 fi
1190
1191 if test -n "$NCURSES_MINOR" ; then
1192   case $NCURSES_MINOR in #(vi
1193   [0-9]*) #(vi
1194         ;;
1195   *)
1196         { { echo "$as_me:1196: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1197 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1198    { (exit 1); exit 1; }; }
1199         ;;
1200   esac
1201 else
1202   { { echo "$as_me:1202: error: Release minor-version value is empty" >&5
1203 echo "$as_me: error: Release minor-version value is empty" >&2;}
1204    { (exit 1); exit 1; }; }
1205 fi
1206
1207 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1208
1209 # Check whether --with-abi-version or --without-abi-version was given.
1210 if test "${with_abi_version+set}" = set; then
1211   withval="$with_abi_version"
1212   { echo "$as_me:1212: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1213 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1214  cf_cv_abi_version=$withval
1215 fi;
1216
1217 if test -n "$cf_cv_abi_version" ; then
1218   case $cf_cv_abi_version in #(vi
1219   [0-9]*) #(vi
1220         ;;
1221   *)
1222         { { echo "$as_me:1222: error: ABI version is not a number: $cf_cv_abi_version" >&5
1223 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1224    { (exit 1); exit 1; }; }
1225         ;;
1226   esac
1227 else
1228   { { echo "$as_me:1228: error: ABI version value is empty" >&5
1229 echo "$as_me: error: ABI version value is empty" >&2;}
1230    { (exit 1); exit 1; }; }
1231 fi
1232
1233 ac_aux_dir=
1234 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1235   if test -f $ac_dir/install-sh; then
1236     ac_aux_dir=$ac_dir
1237     ac_install_sh="$ac_aux_dir/install-sh -c"
1238     break
1239   elif test -f $ac_dir/install.sh; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/install.sh -c"
1242     break
1243   elif test -f $ac_dir/shtool; then
1244     ac_aux_dir=$ac_dir
1245     ac_install_sh="$ac_aux_dir/shtool install -c"
1246     break
1247   fi
1248 done
1249 if test -z "$ac_aux_dir"; then
1250   { { echo "$as_me:1250: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1251 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1252    { (exit 1); exit 1; }; }
1253 fi
1254 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1255 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1256 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1257
1258 # Make sure we can run config.sub.
1259 $ac_config_sub sun4 >/dev/null 2>&1 ||
1260   { { echo "$as_me:1260: error: cannot run $ac_config_sub" >&5
1261 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 echo "$as_me:1264: checking build system type" >&5
1265 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1266 if test "${ac_cv_build+set}" = set; then
1267   echo $ECHO_N "(cached) $ECHO_C" >&6
1268 else
1269   ac_cv_build_alias=$build_alias
1270 test -z "$ac_cv_build_alias" &&
1271   ac_cv_build_alias=`$ac_config_guess`
1272 test -z "$ac_cv_build_alias" &&
1273   { { echo "$as_me:1273: error: cannot guess build type; you must specify one" >&5
1274 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1275    { (exit 1); exit 1; }; }
1276 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1277   { { echo "$as_me:1277: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1278 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1279    { (exit 1); exit 1; }; }
1280
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_build" >&5
1283 echo "${ECHO_T}$ac_cv_build" >&6
1284 build=$ac_cv_build
1285 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1286 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1287 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1288
1289 echo "$as_me:1289: checking host system type" >&5
1290 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1291 if test "${ac_cv_host+set}" = set; then
1292   echo $ECHO_N "(cached) $ECHO_C" >&6
1293 else
1294   ac_cv_host_alias=$host_alias
1295 test -z "$ac_cv_host_alias" &&
1296   ac_cv_host_alias=$ac_cv_build_alias
1297 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1298   { { echo "$as_me:1298: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1299 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1300    { (exit 1); exit 1; }; }
1301
1302 fi
1303 echo "$as_me:1303: result: $ac_cv_host" >&5
1304 echo "${ECHO_T}$ac_cv_host" >&6
1305 host=$ac_cv_host
1306 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1307 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1308 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1309
1310 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1311         echo "$as_me:1311: checking target system type" >&5
1312 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1313 if test "${ac_cv_target+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   ac_cv_target_alias=$target_alias
1317 test "x$ac_cv_target_alias" = "x" &&
1318   ac_cv_target_alias=$ac_cv_host_alias
1319 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1320   { { echo "$as_me:1320: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1321 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1322    { (exit 1); exit 1; }; }
1323
1324 fi
1325 echo "$as_me:1325: result: $ac_cv_target" >&5
1326 echo "${ECHO_T}$ac_cv_target" >&6
1327 target=$ac_cv_target
1328 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1329 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1330 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1331
1332 # The aliases save the names the user supplied, while $host etc.
1333 # will get canonicalized.
1334 test -n "$target_alias" &&
1335   test "$program_prefix$program_suffix$program_transform_name" = \
1336     NONENONEs,x,x, &&
1337   program_prefix=${target_alias}-
1338         system_name="$host_os"
1339 else
1340         system_name="`(uname -s -r) 2>/dev/null`"
1341         if test -z "$system_name" ; then
1342                 system_name="`(hostname) 2>/dev/null`"
1343         fi
1344 fi
1345 test -n "$system_name" &&
1346 cat >>confdefs.h <<EOF
1347 #define SYSTEM_NAME "$system_name"
1348 EOF
1349
1350 if test "${cf_cv_system_name+set}" = set; then
1351   echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353   cf_cv_system_name="$system_name"
1354 fi
1355
1356 test -z "$system_name" && system_name="$cf_cv_system_name"
1357 test -n "$cf_cv_system_name" && echo "$as_me:1357: result: Configuring for $cf_cv_system_name" >&5
1358 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1359
1360 if test ".$system_name" != ".$cf_cv_system_name" ; then
1361         echo "$as_me:1361: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1362 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1363         { { echo "$as_me:1363: error: \"Please remove config.cache and try again.\"" >&5
1364 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1365    { (exit 1); exit 1; }; }
1366 fi
1367
1368 # Check whether --with-system-type or --without-system-type was given.
1369 if test "${with_system_type+set}" = set; then
1370   withval="$with_system_type"
1371   { echo "$as_me:1371: WARNING: overriding system type to $withval" >&5
1372 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1373         cf_cv_system_name=$withval
1374         host_os=$withval
1375
1376 fi;
1377
1378 ###     Save the given $CFLAGS to allow user-override.
1379 cf_user_CFLAGS="$CFLAGS"
1380
1381 ###     Default install-location
1382
1383 echo "$as_me:1383: checking for prefix" >&5
1384 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1385 if test "x$prefix" = "xNONE" ; then
1386         case "$cf_cv_system_name" in
1387                 # non-vendor systems don't have a conflict
1388         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1389                 prefix=/usr
1390                 ;;
1391         *)      prefix=$ac_default_prefix
1392                 ;;
1393         esac
1394 fi
1395 echo "$as_me:1395: result: $prefix" >&5
1396 echo "${ECHO_T}$prefix" >&6
1397
1398 if test "x$prefix" = "xNONE" ; then
1399 echo "$as_me:1399: checking for default include-directory" >&5
1400 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1401 test -n "$verbose" && echo 1>&6
1402 for cf_symbol in \
1403         $includedir \
1404         $includedir/ncurses \
1405         $prefix/include \
1406         $prefix/include/ncurses \
1407         /usr/local/include \
1408         /usr/local/include/ncurses \
1409         /usr/include \
1410         /usr/include/ncurses
1411 do
1412         cf_dir=`eval echo $cf_symbol`
1413         if test -f $cf_dir/curses.h ; then
1414         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1415                 includedir="$cf_symbol"
1416                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1417                 break
1418         fi
1419         fi
1420         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1421 done
1422 echo "$as_me:1422: result: $includedir" >&5
1423 echo "${ECHO_T}$includedir" >&6
1424 fi
1425
1426 ###     Checks for programs.
1427
1428 # Check whether --with-ada or --without-ada was given.
1429 if test "${with_ada+set}" = set; then
1430   withval="$with_ada"
1431   cf_with_ada=$withval
1432 else
1433   cf_with_ada=yes
1434 fi;
1435 if test "x$cf_with_ada" = xyes
1436 then
1437         cf_PROG_CC="gnatgcc gcc cc"
1438 else
1439         cf_PROG_CC="gcc cc"
1440 fi
1441
1442 ac_ext=c
1443 ac_cpp='$CPP $CPPFLAGS'
1444 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1445 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1447 ac_main_return=return
1448 if test -n "$ac_tool_prefix"; then
1449   for ac_prog in $cf_PROG_CC
1450   do
1451     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1452 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1453 echo "$as_me:1453: checking for $ac_word" >&5
1454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1455 if test "${ac_cv_prog_CC+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   if test -n "$CC"; then
1459   ac_cv_prog_CC="$CC" # Let the user override the test.
1460 else
1461   ac_save_IFS=$IFS; IFS=$ac_path_separator
1462 ac_dummy="$PATH"
1463 for ac_dir in $ac_dummy; do
1464   IFS=$ac_save_IFS
1465   test -z "$ac_dir" && ac_dir=.
1466   $as_executable_p "$ac_dir/$ac_word" || continue
1467 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1468 echo "$as_me:1468: found $ac_dir/$ac_word" >&5
1469 break
1470 done
1471
1472 fi
1473 fi
1474 CC=$ac_cv_prog_CC
1475 if test -n "$CC"; then
1476   echo "$as_me:1476: result: $CC" >&5
1477 echo "${ECHO_T}$CC" >&6
1478 else
1479   echo "$as_me:1479: result: no" >&5
1480 echo "${ECHO_T}no" >&6
1481 fi
1482
1483     test -n "$CC" && break
1484   done
1485 fi
1486 if test -z "$CC"; then
1487   ac_ct_CC=$CC
1488   for ac_prog in $cf_PROG_CC
1489 do
1490   # Extract the first word of "$ac_prog", so it can be a program name with args.
1491 set dummy $ac_prog; ac_word=$2
1492 echo "$as_me:1492: checking for $ac_word" >&5
1493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1495   echo $ECHO_N "(cached) $ECHO_C" >&6
1496 else
1497   if test -n "$ac_ct_CC"; then
1498   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1499 else
1500   ac_save_IFS=$IFS; IFS=$ac_path_separator
1501 ac_dummy="$PATH"
1502 for ac_dir in $ac_dummy; do
1503   IFS=$ac_save_IFS
1504   test -z "$ac_dir" && ac_dir=.
1505   $as_executable_p "$ac_dir/$ac_word" || continue
1506 ac_cv_prog_ac_ct_CC="$ac_prog"
1507 echo "$as_me:1507: found $ac_dir/$ac_word" >&5
1508 break
1509 done
1510
1511 fi
1512 fi
1513 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1514 if test -n "$ac_ct_CC"; then
1515   echo "$as_me:1515: result: $ac_ct_CC" >&5
1516 echo "${ECHO_T}$ac_ct_CC" >&6
1517 else
1518   echo "$as_me:1518: result: no" >&5
1519 echo "${ECHO_T}no" >&6
1520 fi
1521
1522   test -n "$ac_ct_CC" && break
1523 done
1524
1525   CC=$ac_ct_CC
1526 fi
1527
1528 test -z "$CC" && { { echo "$as_me:1528: error: no acceptable cc found in \$PATH" >&5
1529 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1530    { (exit 1); exit 1; }; }
1531
1532 # Provide some information about the compiler.
1533 echo "$as_me:1533:" \
1534      "checking for C compiler version" >&5
1535 ac_compiler=`set X $ac_compile; echo $2`
1536 { (eval echo "$as_me:1536: \"$ac_compiler --version </dev/null >&5\"") >&5
1537   (eval $ac_compiler --version </dev/null >&5) 2>&5
1538   ac_status=$?
1539   echo "$as_me:1539: \$? = $ac_status" >&5
1540   (exit $ac_status); }
1541 { (eval echo "$as_me:1541: \"$ac_compiler -v </dev/null >&5\"") >&5
1542   (eval $ac_compiler -v </dev/null >&5) 2>&5
1543   ac_status=$?
1544   echo "$as_me:1544: \$? = $ac_status" >&5
1545   (exit $ac_status); }
1546 { (eval echo "$as_me:1546: \"$ac_compiler -V </dev/null >&5\"") >&5
1547   (eval $ac_compiler -V </dev/null >&5) 2>&5
1548   ac_status=$?
1549   echo "$as_me:1549: \$? = $ac_status" >&5
1550   (exit $ac_status); }
1551
1552 cat >conftest.$ac_ext <<_ACEOF
1553 #line 1553 "configure"
1554 #include "confdefs.h"
1555
1556 int
1557 main ()
1558 {
1559
1560   ;
1561   return 0;
1562 }
1563 _ACEOF
1564 ac_clean_files_save=$ac_clean_files
1565 ac_clean_files="$ac_clean_files a.out a.exe"
1566 # Try to create an executable without -o first, disregard a.out.
1567 # It will help us diagnose broken compilers, and finding out an intuition
1568 # of exeext.
1569 echo "$as_me:1569: checking for C compiler default output" >&5
1570 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1571 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1572 if { (eval echo "$as_me:1572: \"$ac_link_default\"") >&5
1573   (eval $ac_link_default) 2>&5
1574   ac_status=$?
1575   echo "$as_me:1575: \$? = $ac_status" >&5
1576   (exit $ac_status); }; then
1577   # Find the output, starting from the most likely.  This scheme is
1578 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579 # resort.
1580 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1581                 ls a.out conftest 2>/dev/null;
1582                 ls a.* conftest.* 2>/dev/null`; do
1583   case $ac_file in
1584     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1585     a.out ) # We found the default executable, but exeext='' is most
1586             # certainly right.
1587             break;;
1588     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1589           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1590           export ac_cv_exeext
1591           break;;
1592     * ) break;;
1593   esac
1594 done
1595 else
1596   echo "$as_me: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 { { echo "$as_me:1598: error: C compiler cannot create executables" >&5
1599 echo "$as_me: error: C compiler cannot create executables" >&2;}
1600    { (exit 77); exit 77; }; }
1601 fi
1602
1603 ac_exeext=$ac_cv_exeext
1604 echo "$as_me:1604: result: $ac_file" >&5
1605 echo "${ECHO_T}$ac_file" >&6
1606
1607 # Check the compiler produces executables we can run.  If not, either
1608 # the compiler is broken, or we cross compile.
1609 echo "$as_me:1609: checking whether the C compiler works" >&5
1610 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1611 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1612 # If not cross compiling, check that we can run a simple program.
1613 if test "$cross_compiling" != yes; then
1614   if { ac_try='./$ac_file'
1615   { (eval echo "$as_me:1615: \"$ac_try\"") >&5
1616   (eval $ac_try) 2>&5
1617   ac_status=$?
1618   echo "$as_me:1618: \$? = $ac_status" >&5
1619   (exit $ac_status); }; }; then
1620     cross_compiling=no
1621   else
1622     if test "$cross_compiling" = maybe; then
1623         cross_compiling=yes
1624     else
1625         { { echo "$as_me:1625: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&5
1627 echo "$as_me: error: cannot run C compiled programs.
1628 If you meant to cross compile, use \`--host'." >&2;}
1629    { (exit 1); exit 1; }; }
1630     fi
1631   fi
1632 fi
1633 echo "$as_me:1633: result: yes" >&5
1634 echo "${ECHO_T}yes" >&6
1635
1636 rm -f a.out a.exe conftest$ac_cv_exeext
1637 ac_clean_files=$ac_clean_files_save
1638 # Check the compiler produces executables we can run.  If not, either
1639 # the compiler is broken, or we cross compile.
1640 echo "$as_me:1640: checking whether we are cross compiling" >&5
1641 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1642 echo "$as_me:1642: result: $cross_compiling" >&5
1643 echo "${ECHO_T}$cross_compiling" >&6
1644
1645 echo "$as_me:1645: checking for executable suffix" >&5
1646 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1647 if { (eval echo "$as_me:1647: \"$ac_link\"") >&5
1648   (eval $ac_link) 2>&5
1649   ac_status=$?
1650   echo "$as_me:1650: \$? = $ac_status" >&5
1651   (exit $ac_status); }; then
1652   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1653 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1654 # work properly (i.e., refer to `conftest.exe'), while it won't with
1655 # `rm'.
1656 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1657   case $ac_file in
1658     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1659     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1660           export ac_cv_exeext
1661           break;;
1662     * ) break;;
1663   esac
1664 done
1665 else
1666   { { echo "$as_me:1666: error: cannot compute EXEEXT: cannot compile and link" >&5
1667 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1668    { (exit 1); exit 1; }; }
1669 fi
1670
1671 rm -f conftest$ac_cv_exeext
1672 echo "$as_me:1672: result: $ac_cv_exeext" >&5
1673 echo "${ECHO_T}$ac_cv_exeext" >&6
1674
1675 rm -f conftest.$ac_ext
1676 EXEEXT=$ac_cv_exeext
1677 ac_exeext=$EXEEXT
1678 echo "$as_me:1678: checking for object suffix" >&5
1679 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1680 if test "${ac_cv_objext+set}" = set; then
1681   echo $ECHO_N "(cached) $ECHO_C" >&6
1682 else
1683   cat >conftest.$ac_ext <<_ACEOF
1684 #line 1684 "configure"
1685 #include "confdefs.h"
1686
1687 int
1688 main ()
1689 {
1690
1691   ;
1692   return 0;
1693 }
1694 _ACEOF
1695 rm -f conftest.o conftest.obj
1696 if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5
1697   (eval $ac_compile) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }; then
1701   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1702   case $ac_file in
1703     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1704     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1705        break;;
1706   esac
1707 done
1708 else
1709   echo "$as_me: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 { { echo "$as_me:1711: error: cannot compute OBJEXT: cannot compile" >&5
1712 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1713    { (exit 1); exit 1; }; }
1714 fi
1715
1716 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1717 fi
1718 echo "$as_me:1718: result: $ac_cv_objext" >&5
1719 echo "${ECHO_T}$ac_cv_objext" >&6
1720 OBJEXT=$ac_cv_objext
1721 ac_objext=$OBJEXT
1722 echo "$as_me:1722: checking whether we are using the GNU C compiler" >&5
1723 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1724 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1725   echo $ECHO_N "(cached) $ECHO_C" >&6
1726 else
1727   cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main ()
1733 {
1734 #ifndef __GNUC__
1735        choke me
1736 #endif
1737
1738   ;
1739   return 0;
1740 }
1741 _ACEOF
1742 rm -f conftest.$ac_objext
1743 if { (eval echo "$as_me:1743: \"$ac_compile\"") >&5
1744   (eval $ac_compile) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); } &&
1748          { ac_try='test -s conftest.$ac_objext'
1749   { (eval echo "$as_me:1749: \"$ac_try\"") >&5
1750   (eval $ac_try) 2>&5
1751   ac_status=$?
1752   echo "$as_me:1752: \$? = $ac_status" >&5
1753   (exit $ac_status); }; }; then
1754   ac_compiler_gnu=yes
1755 else
1756   echo "$as_me: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 ac_compiler_gnu=no
1759 fi
1760 rm -f conftest.$ac_objext conftest.$ac_ext
1761 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1762
1763 fi
1764 echo "$as_me:1764: result: $ac_cv_c_compiler_gnu" >&5
1765 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1766 GCC=`test $ac_compiler_gnu = yes && echo yes`
1767 ac_test_CFLAGS=${CFLAGS+set}
1768 ac_save_CFLAGS=$CFLAGS
1769 CFLAGS="-g"
1770 echo "$as_me:1770: checking whether $CC accepts -g" >&5
1771 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1772 if test "${ac_cv_prog_cc_g+set}" = set; then
1773   echo $ECHO_N "(cached) $ECHO_C" >&6
1774 else
1775   cat >conftest.$ac_ext <<_ACEOF
1776 #line 1776 "configure"
1777 #include "confdefs.h"
1778
1779 int
1780 main ()
1781 {
1782
1783   ;
1784   return 0;
1785 }
1786 _ACEOF
1787 rm -f conftest.$ac_objext
1788 if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5
1789   (eval $ac_compile) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); } &&
1793          { ac_try='test -s conftest.$ac_objext'
1794   { (eval echo "$as_me:1794: \"$ac_try\"") >&5
1795   (eval $ac_try) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; }; then
1799   ac_cv_prog_cc_g=yes
1800 else
1801   echo "$as_me: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 ac_cv_prog_cc_g=no
1804 fi
1805 rm -f conftest.$ac_objext conftest.$ac_ext
1806 fi
1807 echo "$as_me:1807: result: $ac_cv_prog_cc_g" >&5
1808 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1809 if test "$ac_test_CFLAGS" = set; then
1810   CFLAGS=$ac_save_CFLAGS
1811 elif test $ac_cv_prog_cc_g = yes; then
1812   if test "$GCC" = yes; then
1813     CFLAGS="-g -O2"
1814   else
1815     CFLAGS="-g"
1816   fi
1817 else
1818   if test "$GCC" = yes; then
1819     CFLAGS="-O2"
1820   else
1821     CFLAGS=
1822   fi
1823 fi
1824 # Some people use a C++ compiler to compile C.  Since we use `exit',
1825 # in C++ we need to declare it.  In case someone uses the same compiler
1826 # for both compiling C and C++ we need to have the C++ compiler decide
1827 # the declaration of exit, since it's the most demanding environment.
1828 cat >conftest.$ac_ext <<_ACEOF
1829 #ifndef __cplusplus
1830   choke me
1831 #endif
1832 _ACEOF
1833 rm -f conftest.$ac_objext
1834 if { (eval echo "$as_me:1834: \"$ac_compile\"") >&5
1835   (eval $ac_compile) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); } &&
1839          { ac_try='test -s conftest.$ac_objext'
1840   { (eval echo "$as_me:1840: \"$ac_try\"") >&5
1841   (eval $ac_try) 2>&5
1842   ac_status=$?
1843   echo "$as_me:1843: \$? = $ac_status" >&5
1844   (exit $ac_status); }; }; then
1845   for ac_declaration in \
1846    ''\
1847    '#include <stdlib.h>' \
1848    'extern "C" void std::exit (int) throw (); using std::exit;' \
1849    'extern "C" void std::exit (int); using std::exit;' \
1850    'extern "C" void exit (int) throw ();' \
1851    'extern "C" void exit (int);' \
1852    'void exit (int);'
1853 do
1854   cat >conftest.$ac_ext <<_ACEOF
1855 #line 1855 "configure"
1856 #include "confdefs.h"
1857 #include <stdlib.h>
1858 $ac_declaration
1859 int
1860 main ()
1861 {
1862 exit (42);
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.$ac_objext
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); } &&
1873          { ac_try='test -s conftest.$ac_objext'
1874   { (eval echo "$as_me:1874: \"$ac_try\"") >&5
1875   (eval $ac_try) 2>&5
1876   ac_status=$?
1877   echo "$as_me:1877: \$? = $ac_status" >&5
1878   (exit $ac_status); }; }; then
1879   :
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 continue
1884 fi
1885 rm -f conftest.$ac_objext conftest.$ac_ext
1886   cat >conftest.$ac_ext <<_ACEOF
1887 #line 1887 "configure"
1888 #include "confdefs.h"
1889 $ac_declaration
1890 int
1891 main ()
1892 {
1893 exit (42);
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900   (eval $ac_compile) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); } &&
1904          { ac_try='test -s conftest.$ac_objext'
1905   { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906   (eval $ac_try) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); }; }; then
1910   break
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 fi
1915 rm -f conftest.$ac_objext conftest.$ac_ext
1916 done
1917 rm -rf conftest*
1918 if test -n "$ac_declaration"; then
1919   echo '#ifdef __cplusplus' >>confdefs.h
1920   echo $ac_declaration      >>confdefs.h
1921   echo '#endif'             >>confdefs.h
1922 fi
1923
1924 else
1925   echo "$as_me: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_ext=c
1930 ac_cpp='$CPP $CPPFLAGS'
1931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1934 ac_main_return=return
1935
1936 GCC_VERSION=none
1937 if test "$GCC" = yes ; then
1938         echo "$as_me:1938: checking version of $CC" >&5
1939 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1940         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.].*//'`"
1941         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1942         echo "$as_me:1942: result: $GCC_VERSION" >&5
1943 echo "${ECHO_T}$GCC_VERSION" >&6
1944 fi
1945
1946 echo "$as_me:1946: checking for $CC option to accept ANSI C" >&5
1947 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1948 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1949   echo $ECHO_N "(cached) $ECHO_C" >&6
1950 else
1951   ac_cv_prog_cc_stdc=no
1952 ac_save_CC=$CC
1953 cat >conftest.$ac_ext <<_ACEOF
1954 #line 1954 "configure"
1955 #include "confdefs.h"
1956 #include <stdarg.h>
1957 #include <stdio.h>
1958 #include <sys/types.h>
1959 #include <sys/stat.h>
1960 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1961 struct buf { int x; };
1962 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1963 static char *e (p, i)
1964      char **p;
1965      int i;
1966 {
1967   return p[i];
1968 }
1969 static char *f (char * (*g) (char **, int), char **p, ...)
1970 {
1971   char *s;
1972   va_list v;
1973   va_start (v,p);
1974   s = g (p, va_arg (v,int));
1975   va_end (v);
1976   return s;
1977 }
1978 int test (int i, double x);
1979 struct s1 {int (*f) (int a);};
1980 struct s2 {int (*f) (double a);};
1981 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1982 int argc;
1983 char **argv;
1984 int
1985 main ()
1986 {
1987 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1988   ;
1989   return 0;
1990 }
1991 _ACEOF
1992 # Don't try gcc -ansi; that turns off useful extensions and
1993 # breaks some systems' header files.
1994 # AIX                   -qlanglvl=ansi
1995 # Ultrix and OSF/1      -std1
1996 # HP-UX 10.20 and later -Ae
1997 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1998 # SVR4                  -Xc -D__EXTENSIONS__
1999 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2000 do
2001   CC="$ac_save_CC $ac_arg"
2002   rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:2003: \"$ac_compile\"") >&5
2004   (eval $ac_compile) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); } &&
2008          { ac_try='test -s conftest.$ac_objext'
2009   { (eval echo "$as_me:2009: \"$ac_try\"") >&5
2010   (eval $ac_try) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); }; }; then
2014   ac_cv_prog_cc_stdc=$ac_arg
2015 break
2016 else
2017   echo "$as_me: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2019 fi
2020 rm -f conftest.$ac_objext
2021 done
2022 rm -f conftest.$ac_ext conftest.$ac_objext
2023 CC=$ac_save_CC
2024
2025 fi
2026
2027 case "x$ac_cv_prog_cc_stdc" in
2028   x|xno)
2029     echo "$as_me:2029: result: none needed" >&5
2030 echo "${ECHO_T}none needed" >&6 ;;
2031   *)
2032     echo "$as_me:2032: result: $ac_cv_prog_cc_stdc" >&5
2033 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2034     CC="$CC $ac_cv_prog_cc_stdc" ;;
2035 esac
2036
2037 # This should have been defined by AC_PROG_CC
2038 : ${CC:=cc}
2039
2040 echo "$as_me:2040: checking \$CC variable" >&5
2041 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2042 case "$CC" in #(vi
2043 *[\ \   ]-[IUD]*)
2044         echo "$as_me:2044: result: broken" >&5
2045 echo "${ECHO_T}broken" >&6
2046         { echo "$as_me:2046: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2047 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2048         # humor him...
2049         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2050         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2051
2052 cf_fix_cppflags=no
2053 cf_new_cflags=
2054 cf_new_cppflags=
2055 cf_new_extra_cppflags=
2056
2057 for cf_add_cflags in $cf_flags
2058 do
2059 case $cf_fix_cppflags in
2060 no)
2061         case $cf_add_cflags in #(vi
2062         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2063                 case $cf_add_cflags in
2064                 -D*)
2065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2066
2067                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2068                                 && test -z "${cf_tst_cflags}" \
2069                                 && cf_fix_cppflags=yes
2070
2071                         if test $cf_fix_cppflags = yes ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         elif test "${cf_tst_cflags}" = "\"'" ; then
2075                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2076                                 continue
2077                         fi
2078                         ;;
2079                 esac
2080                 case "$CPPFLAGS" in
2081                 *$cf_add_cflags) #(vi
2082                         ;;
2083                 *) #(vi
2084                         case $cf_add_cflags in #(vi
2085                         -D*)
2086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2087
2088 CPPFLAGS=`echo "$CPPFLAGS" | \
2089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2091
2092                                 ;;
2093                         esac
2094                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2095                         ;;
2096                 esac
2097                 ;;
2098         *)
2099                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2100                 ;;
2101         esac
2102         ;;
2103 yes)
2104         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2105
2106         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2107
2108         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2109                 && test -z "${cf_tst_cflags}" \
2110                 && cf_fix_cppflags=no
2111         ;;
2112 esac
2113 done
2114
2115 if test -n "$cf_new_cflags" ; then
2116
2117         CFLAGS="$CFLAGS $cf_new_cflags"
2118 fi
2119
2120 if test -n "$cf_new_cppflags" ; then
2121
2122         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2123 fi
2124
2125 if test -n "$cf_new_extra_cppflags" ; then
2126
2127         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2128 fi
2129
2130         ;;
2131 *)
2132         echo "$as_me:2132: result: ok" >&5
2133 echo "${ECHO_T}ok" >&6
2134         ;;
2135 esac
2136
2137 ac_ext=c
2138 ac_cpp='$CPP $CPPFLAGS'
2139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2142 ac_main_return=return
2143 echo "$as_me:2143: checking how to run the C preprocessor" >&5
2144 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2145 # On Suns, sometimes $CPP names a directory.
2146 if test -n "$CPP" && test -d "$CPP"; then
2147   CPP=
2148 fi
2149 if test -z "$CPP"; then
2150   if test "${ac_cv_prog_CPP+set}" = set; then
2151   echo $ECHO_N "(cached) $ECHO_C" >&6
2152 else
2153       # Double quotes because CPP needs to be expanded
2154     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2155     do
2156       ac_preproc_ok=false
2157 for ac_c_preproc_warn_flag in '' yes
2158 do
2159   # Use a header file that comes with gcc, so configuring glibc
2160   # with a fresh cross-compiler works.
2161   # On the NeXT, cc -E runs the code through the compiler's parser,
2162   # not just through cpp. "Syntax error" is here to catch this case.
2163   cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <assert.h>
2167                      Syntax error
2168 _ACEOF
2169 if { (eval echo "$as_me:2169: \"$ac_cpp conftest.$ac_ext\"") >&5
2170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171   ac_status=$?
2172   egrep -v '^ *\+' conftest.er1 >conftest.err
2173   rm -f conftest.er1
2174   cat conftest.err >&5
2175   echo "$as_me:2175: \$? = $ac_status" >&5
2176   (exit $ac_status); } >/dev/null; then
2177   if test -s conftest.err; then
2178     ac_cpp_err=$ac_c_preproc_warn_flag
2179   else
2180     ac_cpp_err=
2181   fi
2182 else
2183   ac_cpp_err=yes
2184 fi
2185 if test -z "$ac_cpp_err"; then
2186   :
2187 else
2188   echo "$as_me: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   # Broken: fails on valid input.
2191 continue
2192 fi
2193 rm -f conftest.err conftest.$ac_ext
2194
2195   # OK, works on sane cases.  Now check whether non-existent headers
2196   # can be detected and how.
2197   cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2200 #include <ac_nonexistent.h>
2201 _ACEOF
2202 if { (eval echo "$as_me:2202: \"$ac_cpp conftest.$ac_ext\"") >&5
2203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204   ac_status=$?
2205   egrep -v '^ *\+' conftest.er1 >conftest.err
2206   rm -f conftest.er1
2207   cat conftest.err >&5
2208   echo "$as_me:2208: \$? = $ac_status" >&5
2209   (exit $ac_status); } >/dev/null; then
2210   if test -s conftest.err; then
2211     ac_cpp_err=$ac_c_preproc_warn_flag
2212   else
2213     ac_cpp_err=
2214   fi
2215 else
2216   ac_cpp_err=yes
2217 fi
2218 if test -z "$ac_cpp_err"; then
2219   # Broken: success on invalid input.
2220 continue
2221 else
2222   echo "$as_me: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   # Passes both tests.
2225 ac_preproc_ok=:
2226 break
2227 fi
2228 rm -f conftest.err conftest.$ac_ext
2229
2230 done
2231 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2232 rm -f conftest.err conftest.$ac_ext
2233 if $ac_preproc_ok; then
2234   break
2235 fi
2236
2237     done
2238     ac_cv_prog_CPP=$CPP
2239
2240 fi
2241   CPP=$ac_cv_prog_CPP
2242 else
2243   ac_cv_prog_CPP=$CPP
2244 fi
2245 echo "$as_me:2245: result: $CPP" >&5
2246 echo "${ECHO_T}$CPP" >&6
2247 ac_preproc_ok=false
2248 for ac_c_preproc_warn_flag in '' yes
2249 do
2250   # Use a header file that comes with gcc, so configuring glibc
2251   # with a fresh cross-compiler works.
2252   # On the NeXT, cc -E runs the code through the compiler's parser,
2253   # not just through cpp. "Syntax error" is here to catch this case.
2254   cat >conftest.$ac_ext <<_ACEOF
2255 #line 2255 "configure"
2256 #include "confdefs.h"
2257 #include <assert.h>
2258                      Syntax error
2259 _ACEOF
2260 if { (eval echo "$as_me:2260: \"$ac_cpp conftest.$ac_ext\"") >&5
2261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262   ac_status=$?
2263   egrep -v '^ *\+' conftest.er1 >conftest.err
2264   rm -f conftest.er1
2265   cat conftest.err >&5
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } >/dev/null; then
2268   if test -s conftest.err; then
2269     ac_cpp_err=$ac_c_preproc_warn_flag
2270   else
2271     ac_cpp_err=
2272   fi
2273 else
2274   ac_cpp_err=yes
2275 fi
2276 if test -z "$ac_cpp_err"; then
2277   :
2278 else
2279   echo "$as_me: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   # Broken: fails on valid input.
2282 continue
2283 fi
2284 rm -f conftest.err conftest.$ac_ext
2285
2286   # OK, works on sane cases.  Now check whether non-existent headers
2287   # can be detected and how.
2288   cat >conftest.$ac_ext <<_ACEOF
2289 #line 2289 "configure"
2290 #include "confdefs.h"
2291 #include <ac_nonexistent.h>
2292 _ACEOF
2293 if { (eval echo "$as_me:2293: \"$ac_cpp conftest.$ac_ext\"") >&5
2294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2295   ac_status=$?
2296   egrep -v '^ *\+' conftest.er1 >conftest.err
2297   rm -f conftest.er1
2298   cat conftest.err >&5
2299   echo "$as_me:2299: \$? = $ac_status" >&5
2300   (exit $ac_status); } >/dev/null; then
2301   if test -s conftest.err; then
2302     ac_cpp_err=$ac_c_preproc_warn_flag
2303   else
2304     ac_cpp_err=
2305   fi
2306 else
2307   ac_cpp_err=yes
2308 fi
2309 if test -z "$ac_cpp_err"; then
2310   # Broken: success on invalid input.
2311 continue
2312 else
2313   echo "$as_me: failed program was:" >&5
2314   cat conftest.$ac_ext >&5
2315   # Passes both tests.
2316 ac_preproc_ok=:
2317 break
2318 fi
2319 rm -f conftest.err conftest.$ac_ext
2320
2321 done
2322 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2323 rm -f conftest.err conftest.$ac_ext
2324 if $ac_preproc_ok; then
2325   :
2326 else
2327   { { echo "$as_me:2327: error: C preprocessor \"$CPP\" fails sanity check" >&5
2328 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2329    { (exit 1); exit 1; }; }
2330 fi
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338
2339 if test $ac_cv_c_compiler_gnu = yes; then
2340     echo "$as_me:2340: checking whether $CC needs -traditional" >&5
2341 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2342 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345     ac_pattern="Autoconf.*'x'"
2346   cat >conftest.$ac_ext <<_ACEOF
2347 #line 2347 "configure"
2348 #include "confdefs.h"
2349 #include <sgtty.h>
2350 int Autoconf = TIOCGETP;
2351 _ACEOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353   egrep "$ac_pattern" >/dev/null 2>&1; then
2354   ac_cv_prog_gcc_traditional=yes
2355 else
2356   ac_cv_prog_gcc_traditional=no
2357 fi
2358 rm -rf conftest*
2359
2360   if test $ac_cv_prog_gcc_traditional = no; then
2361     cat >conftest.$ac_ext <<_ACEOF
2362 #line 2362 "configure"
2363 #include "confdefs.h"
2364 #include <termio.h>
2365 int Autoconf = TCGETA;
2366 _ACEOF
2367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2368   egrep "$ac_pattern" >/dev/null 2>&1; then
2369   ac_cv_prog_gcc_traditional=yes
2370 fi
2371 rm -rf conftest*
2372
2373   fi
2374 fi
2375 echo "$as_me:2375: result: $ac_cv_prog_gcc_traditional" >&5
2376 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2377   if test $ac_cv_prog_gcc_traditional = yes; then
2378     CC="$CC -traditional"
2379   fi
2380 fi
2381
2382 echo "$as_me:2382: checking whether $CC understands -c and -o together" >&5
2383 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2384 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2385   echo $ECHO_N "(cached) $ECHO_C" >&6
2386 else
2387
2388 cat > conftest.$ac_ext <<CF_EOF
2389 #include <stdio.h>
2390 int main()
2391 {
2392         ${cf_cv_main_return:-return}(0);
2393 }
2394 CF_EOF
2395 # We do the test twice because some compilers refuse to overwrite an
2396 # existing .o file with -o, though they will create one.
2397 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2398 if { (eval echo "$as_me:2398: \"$ac_try\"") >&5
2399   (eval $ac_try) 2>&5
2400   ac_status=$?
2401   echo "$as_me:2401: \$? = $ac_status" >&5
2402   (exit $ac_status); } &&
2403   test -f conftest2.$ac_objext && { (eval echo "$as_me:2403: \"$ac_try\"") >&5
2404   (eval $ac_try) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit $ac_status); };
2408 then
2409   eval cf_cv_prog_CC_c_o=yes
2410 else
2411   eval cf_cv_prog_CC_c_o=no
2412 fi
2413 rm -rf conftest*
2414
2415 fi
2416 if test $cf_cv_prog_CC_c_o = yes; then
2417   echo "$as_me:2417: result: yes" >&5
2418 echo "${ECHO_T}yes" >&6
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422 fi
2423
2424 if test "$cross_compiling" = yes ; then
2425   LDCONFIG=:
2426 else
2427 case "$cf_cv_system_name" in #(vi
2428 dragonfly*|mirbsd*|freebsd*) #(vi
2429   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2430   ;;
2431 *) LDPATH=$PATH:/sbin:/usr/sbin
2432   # Extract the first word of "ldconfig", so it can be a program name with args.
2433 set dummy ldconfig; ac_word=$2
2434 echo "$as_me:2434: checking for $ac_word" >&5
2435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2436 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2437   echo $ECHO_N "(cached) $ECHO_C" >&6
2438 else
2439   case $LDCONFIG in
2440   [\\/]* | ?:[\\/]*)
2441   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2442   ;;
2443   *)
2444   ac_save_IFS=$IFS; IFS=$ac_path_separator
2445 ac_dummy="$LDPATH"
2446 for ac_dir in $ac_dummy; do
2447   IFS=$ac_save_IFS
2448   test -z "$ac_dir" && ac_dir=.
2449   if $as_executable_p "$ac_dir/$ac_word"; then
2450    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2451    echo "$as_me:2451: found $ac_dir/$ac_word" >&5
2452    break
2453 fi
2454 done
2455
2456   ;;
2457 esac
2458 fi
2459 LDCONFIG=$ac_cv_path_LDCONFIG
2460
2461 if test -n "$LDCONFIG"; then
2462   echo "$as_me:2462: result: $LDCONFIG" >&5
2463 echo "${ECHO_T}$LDCONFIG" >&6
2464 else
2465   echo "$as_me:2465: result: no" >&5
2466 echo "${ECHO_T}no" >&6
2467 fi
2468
2469   ;;
2470 esac
2471 fi
2472
2473 echo "$as_me:2473: checking if you want to ensure bool is consistent with C++" >&5
2474 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2475
2476 # Check whether --with-cxx or --without-cxx was given.
2477 if test "${with_cxx+set}" = set; then
2478   withval="$with_cxx"
2479   cf_with_cxx=$withval
2480 else
2481   cf_with_cxx=yes
2482 fi;
2483 echo "$as_me:2483: result: $cf_with_cxx" >&5
2484 echo "${ECHO_T}$cf_with_cxx" >&6
2485 if test "X$cf_with_cxx" = Xno ; then
2486         CXX=""
2487         GXX=""
2488 else
2489         # with autoconf 2.13, we can change the error to a warning:
2490                 ac_ext=cc
2491 ac_cpp='$CXXCPP $CPPFLAGS'
2492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2495 ac_main_return=return
2496 if test -n "$ac_tool_prefix"; then
2497   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2498   do
2499     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2500 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2501 echo "$as_me:2501: checking for $ac_word" >&5
2502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2503 if test "${ac_cv_prog_CXX+set}" = set; then
2504   echo $ECHO_N "(cached) $ECHO_C" >&6
2505 else
2506   if test -n "$CXX"; then
2507   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2508 else
2509   ac_save_IFS=$IFS; IFS=$ac_path_separator
2510 ac_dummy="$PATH"
2511 for ac_dir in $ac_dummy; do
2512   IFS=$ac_save_IFS
2513   test -z "$ac_dir" && ac_dir=.
2514   $as_executable_p "$ac_dir/$ac_word" || continue
2515 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2516 echo "$as_me:2516: found $ac_dir/$ac_word" >&5
2517 break
2518 done
2519
2520 fi
2521 fi
2522 CXX=$ac_cv_prog_CXX
2523 if test -n "$CXX"; then
2524   echo "$as_me:2524: result: $CXX" >&5
2525 echo "${ECHO_T}$CXX" >&6
2526 else
2527   echo "$as_me:2527: result: no" >&5
2528 echo "${ECHO_T}no" >&6
2529 fi
2530
2531     test -n "$CXX" && break
2532   done
2533 fi
2534 if test -z "$CXX"; then
2535   ac_ct_CXX=$CXX
2536   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2537 do
2538   # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo "$as_me:2540: checking for $ac_word" >&5
2541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2542 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2543   echo $ECHO_N "(cached) $ECHO_C" >&6
2544 else
2545   if test -n "$ac_ct_CXX"; then
2546   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2547 else
2548   ac_save_IFS=$IFS; IFS=$ac_path_separator
2549 ac_dummy="$PATH"
2550 for ac_dir in $ac_dummy; do
2551   IFS=$ac_save_IFS
2552   test -z "$ac_dir" && ac_dir=.
2553   $as_executable_p "$ac_dir/$ac_word" || continue
2554 ac_cv_prog_ac_ct_CXX="$ac_prog"
2555 echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556 break
2557 done
2558
2559 fi
2560 fi
2561 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2562 if test -n "$ac_ct_CXX"; then
2563   echo "$as_me:2563: result: $ac_ct_CXX" >&5
2564 echo "${ECHO_T}$ac_ct_CXX" >&6
2565 else
2566   echo "$as_me:2566: result: no" >&5
2567 echo "${ECHO_T}no" >&6
2568 fi
2569
2570   test -n "$ac_ct_CXX" && break
2571 done
2572 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2573
2574   CXX=$ac_ct_CXX
2575 fi
2576
2577 # Provide some information about the compiler.
2578 echo "$as_me:2578:" \
2579      "checking for C++ compiler version" >&5
2580 ac_compiler=`set X $ac_compile; echo $2`
2581 { (eval echo "$as_me:2581: \"$ac_compiler --version </dev/null >&5\"") >&5
2582   (eval $ac_compiler --version </dev/null >&5) 2>&5
2583   ac_status=$?
2584   echo "$as_me:2584: \$? = $ac_status" >&5
2585   (exit $ac_status); }
2586 { (eval echo "$as_me:2586: \"$ac_compiler -v </dev/null >&5\"") >&5
2587   (eval $ac_compiler -v </dev/null >&5) 2>&5
2588   ac_status=$?
2589   echo "$as_me:2589: \$? = $ac_status" >&5
2590   (exit $ac_status); }
2591 { (eval echo "$as_me:2591: \"$ac_compiler -V </dev/null >&5\"") >&5
2592   (eval $ac_compiler -V </dev/null >&5) 2>&5
2593   ac_status=$?
2594   echo "$as_me:2594: \$? = $ac_status" >&5
2595   (exit $ac_status); }
2596
2597 echo "$as_me:2597: checking whether we are using the GNU C++ compiler" >&5
2598 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2599 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   cat >conftest.$ac_ext <<_ACEOF
2603 #line 2603 "configure"
2604 #include "confdefs.h"
2605
2606 int
2607 main ()
2608 {
2609 #ifndef __GNUC__
2610        choke me
2611 #endif
2612
2613   ;
2614   return 0;
2615 }
2616 _ACEOF
2617 rm -f conftest.$ac_objext
2618 if { (eval echo "$as_me:2618: \"$ac_compile\"") >&5
2619   (eval $ac_compile) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); } &&
2623          { ac_try='test -s conftest.$ac_objext'
2624   { (eval echo "$as_me:2624: \"$ac_try\"") >&5
2625   (eval $ac_try) 2>&5
2626   ac_status=$?
2627   echo "$as_me:2627: \$? = $ac_status" >&5
2628   (exit $ac_status); }; }; then
2629   ac_compiler_gnu=yes
2630 else
2631   echo "$as_me: failed program was:" >&5
2632 cat conftest.$ac_ext >&5
2633 ac_compiler_gnu=no
2634 fi
2635 rm -f conftest.$ac_objext conftest.$ac_ext
2636 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2637
2638 fi
2639 echo "$as_me:2639: result: $ac_cv_cxx_compiler_gnu" >&5
2640 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2641 GXX=`test $ac_compiler_gnu = yes && echo yes`
2642 ac_test_CXXFLAGS=${CXXFLAGS+set}
2643 ac_save_CXXFLAGS=$CXXFLAGS
2644 CXXFLAGS="-g"
2645 echo "$as_me:2645: checking whether $CXX accepts -g" >&5
2646 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2647 if test "${ac_cv_prog_cxx_g+set}" = set; then
2648   echo $ECHO_N "(cached) $ECHO_C" >&6
2649 else
2650   cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2653
2654 int
2655 main ()
2656 {
2657
2658   ;
2659   return 0;
2660 }
2661 _ACEOF
2662 rm -f conftest.$ac_objext
2663 if { (eval echo "$as_me:2663: \"$ac_compile\"") >&5
2664   (eval $ac_compile) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); } &&
2668          { ac_try='test -s conftest.$ac_objext'
2669   { (eval echo "$as_me:2669: \"$ac_try\"") >&5
2670   (eval $ac_try) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }; }; then
2674   ac_cv_prog_cxx_g=yes
2675 else
2676   echo "$as_me: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 ac_cv_prog_cxx_g=no
2679 fi
2680 rm -f conftest.$ac_objext conftest.$ac_ext
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_prog_cxx_g" >&5
2683 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2684 if test "$ac_test_CXXFLAGS" = set; then
2685   CXXFLAGS=$ac_save_CXXFLAGS
2686 elif test $ac_cv_prog_cxx_g = yes; then
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-g -O2"
2689   else
2690     CXXFLAGS="-g"
2691   fi
2692 else
2693   if test "$GXX" = yes; then
2694     CXXFLAGS="-O2"
2695   else
2696     CXXFLAGS=
2697   fi
2698 fi
2699 for ac_declaration in \
2700    ''\
2701    '#include <stdlib.h>' \
2702    'extern "C" void std::exit (int) throw (); using std::exit;' \
2703    'extern "C" void std::exit (int); using std::exit;' \
2704    'extern "C" void exit (int) throw ();' \
2705    'extern "C" void exit (int);' \
2706    'void exit (int);'
2707 do
2708   cat >conftest.$ac_ext <<_ACEOF
2709 #line 2709 "configure"
2710 #include "confdefs.h"
2711 #include <stdlib.h>
2712 $ac_declaration
2713 int
2714 main ()
2715 {
2716 exit (42);
2717   ;
2718   return 0;
2719 }
2720 _ACEOF
2721 rm -f conftest.$ac_objext
2722 if { (eval echo "$as_me:2722: \"$ac_compile\"") >&5
2723   (eval $ac_compile) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); } &&
2727          { ac_try='test -s conftest.$ac_objext'
2728   { (eval echo "$as_me:2728: \"$ac_try\"") >&5
2729   (eval $ac_try) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }; }; then
2733   :
2734 else
2735   echo "$as_me: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2737 continue
2738 fi
2739 rm -f conftest.$ac_objext conftest.$ac_ext
2740   cat >conftest.$ac_ext <<_ACEOF
2741 #line 2741 "configure"
2742 #include "confdefs.h"
2743 $ac_declaration
2744 int
2745 main ()
2746 {
2747 exit (42);
2748   ;
2749   return 0;
2750 }
2751 _ACEOF
2752 rm -f conftest.$ac_objext
2753 if { (eval echo "$as_me:2753: \"$ac_compile\"") >&5
2754   (eval $ac_compile) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); } &&
2758          { ac_try='test -s conftest.$ac_objext'
2759   { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2760   (eval $ac_try) 2>&5
2761   ac_status=$?
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); }; }; then
2764   break
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 fi
2769 rm -f conftest.$ac_objext conftest.$ac_ext
2770 done
2771 rm -rf conftest*
2772 if test -n "$ac_declaration"; then
2773   echo '#ifdef __cplusplus' >>confdefs.h
2774   echo $ac_declaration      >>confdefs.h
2775   echo '#endif'             >>confdefs.h
2776 fi
2777
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783 ac_main_return=return
2784
2785         ac_ext=cc
2786 ac_cpp='$CXXCPP $CPPFLAGS'
2787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2790 ac_main_return=return
2791
2792         if test "x$cf_with_cxx" != xno
2793         then
2794                 # Several of the C++ configurations do not work, particularly when
2795                 # cross-compiling (20140913 -TD)
2796                 echo "$as_me:2796: checking if $CXX works" >&5
2797 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2798
2799                 save_CPPFLAGS="$CPPFLAGS"
2800                 eval cf_includedir=${includedir}
2801                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2802
2803 cat >conftest.$ac_ext <<_ACEOF
2804 #line 2804 "configure"
2805 #include "confdefs.h"
2806
2807 #include <stdlib.h>
2808 #include <stdio.h>
2809
2810 int
2811 main ()
2812 {
2813
2814                 printf("Hello world!\n")
2815
2816   ;
2817   return 0;
2818 }
2819 _ACEOF
2820 rm -f conftest.$ac_objext
2821 if { (eval echo "$as_me:2821: \"$ac_compile\"") >&5
2822   (eval $ac_compile) 2>&5
2823   ac_status=$?
2824   echo "$as_me:2824: \$? = $ac_status" >&5
2825   (exit $ac_status); } &&
2826          { ac_try='test -s conftest.$ac_objext'
2827   { (eval echo "$as_me:2827: \"$ac_try\"") >&5
2828   (eval $ac_try) 2>&5
2829   ac_status=$?
2830   echo "$as_me:2830: \$? = $ac_status" >&5
2831   (exit $ac_status); }; }; then
2832   cf_cxx_works=yes
2833 else
2834   echo "$as_me: failed program was:" >&5
2835 cat conftest.$ac_ext >&5
2836 cf_cxx_works=no
2837 fi
2838 rm -f conftest.$ac_objext conftest.$ac_ext
2839                 CPPFLAGS="$save_CPPFLAGS"
2840
2841                 echo "$as_me:2841: result: $cf_cxx_works" >&5
2842 echo "${ECHO_T}$cf_cxx_works" >&6
2843                 if test "x$cf_cxx_works" = xno
2844                 then
2845                         { echo "$as_me:2845: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2846 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2847                         cf_with_cxx=no; CXX=""; GXX="";
2848                 fi
2849         fi
2850         ac_ext=c
2851 ac_cpp='$CPP $CPPFLAGS'
2852 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2853 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2854 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2855 ac_main_return=return
2856
2857         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2858         if test "$CXX" = "g++" ; then
2859                 # Extract the first word of "g++", so it can be a program name with args.
2860 set dummy g++; ac_word=$2
2861 echo "$as_me:2861: checking for $ac_word" >&5
2862 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2863 if test "${ac_cv_path_CXX+set}" = set; then
2864   echo $ECHO_N "(cached) $ECHO_C" >&6
2865 else
2866   case $CXX in
2867   [\\/]* | ?:[\\/]*)
2868   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2869   ;;
2870   *)
2871   ac_save_IFS=$IFS; IFS=$ac_path_separator
2872 ac_dummy="$PATH"
2873 for ac_dir in $ac_dummy; do
2874   IFS=$ac_save_IFS
2875   test -z "$ac_dir" && ac_dir=.
2876   if $as_executable_p "$ac_dir/$ac_word"; then
2877    ac_cv_path_CXX="$ac_dir/$ac_word"
2878    echo "$as_me:2878: found $ac_dir/$ac_word" >&5
2879    break
2880 fi
2881 done
2882
2883   ;;
2884 esac
2885 fi
2886 CXX=$ac_cv_path_CXX
2887
2888 if test -n "$CXX"; then
2889   echo "$as_me:2889: result: $CXX" >&5
2890 echo "${ECHO_T}$CXX" >&6
2891 else
2892   echo "$as_me:2892: result: no" >&5
2893 echo "${ECHO_T}no" >&6
2894 fi
2895
2896         fi
2897         case "x$CXX" in #(vi
2898         x|xg++)
2899                 { echo "$as_me:2899: WARNING: You don't have any C++ compiler, too bad" >&5
2900 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2901                 cf_with_cxx=no; CXX=""; GXX="";
2902                 ;;
2903         esac
2904 fi
2905
2906 GXX_VERSION=none
2907 if test "$GXX" = yes; then
2908         echo "$as_me:2908: checking version of ${CXX:-g++}" >&5
2909 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2910         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2911         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2912         echo "$as_me:2912: result: $GXX_VERSION" >&5
2913 echo "${ECHO_T}$GXX_VERSION" >&6
2914 fi
2915
2916 case $GXX_VERSION in
2917 1*|2.[0-6]*)
2918         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2919         # cf_cxx_library=no
2920         { echo "$as_me:2920: WARNING: templates do not work" >&5
2921 echo "$as_me: WARNING: templates do not work" >&2;}
2922         ;;
2923 esac
2924
2925 echo "$as_me:2925: checking if you want to build C++ binding and demo" >&5
2926 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2927
2928 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2929 if test "${with_cxx_binding+set}" = set; then
2930   withval="$with_cxx_binding"
2931   cf_with_cxx_binding=$withval
2932 else
2933   cf_with_cxx_binding=$cf_with_cxx
2934 fi;
2935 echo "$as_me:2935: result: $cf_with_cxx_binding" >&5
2936 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2937
2938 echo "$as_me:2938: checking if you want to build with Ada95" >&5
2939 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2940 echo "$as_me:2940: result: $cf_with_ada" >&5
2941 echo "${ECHO_T}$cf_with_ada" >&6
2942
2943 echo "$as_me:2943: checking if you want to install terminal database" >&5
2944 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2945
2946 # Check whether --enable-db-install or --disable-db-install was given.
2947 if test "${enable_db_install+set}" = set; then
2948   enableval="$enable_db_install"
2949   cf_with_db_install=$enableval
2950 else
2951   cf_with_db_install=yes
2952 fi;
2953 echo "$as_me:2953: result: $cf_with_db_install" >&5
2954 echo "${ECHO_T}$cf_with_db_install" >&6
2955
2956 echo "$as_me:2956: checking if you want to install manpages" >&5
2957 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2958
2959 # Check whether --with-manpages or --without-manpages was given.
2960 if test "${with_manpages+set}" = set; then
2961   withval="$with_manpages"
2962   cf_with_manpages=$withval
2963 else
2964   cf_with_manpages=yes
2965 fi;
2966 echo "$as_me:2966: result: $cf_with_manpages" >&5
2967 echo "${ECHO_T}$cf_with_manpages" >&6
2968
2969 echo "$as_me:2969: checking if you want to build programs such as tic" >&5
2970 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2971
2972 # Check whether --with-progs or --without-progs was given.
2973 if test "${with_progs+set}" = set; then
2974   withval="$with_progs"
2975   cf_with_progs=$withval
2976 else
2977   cf_with_progs=yes
2978 fi;
2979 echo "$as_me:2979: result: $cf_with_progs" >&5
2980 echo "${ECHO_T}$cf_with_progs" >&6
2981
2982 echo "$as_me:2982: checking if you want to build test-programs" >&5
2983 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2984
2985 # Check whether --with-tests or --without-tests was given.
2986 if test "${with_tests+set}" = set; then
2987   withval="$with_tests"
2988   cf_with_tests=$withval
2989 else
2990   cf_with_tests=yes
2991 fi;
2992 echo "$as_me:2992: result: $cf_with_tests" >&5
2993 echo "${ECHO_T}$cf_with_tests" >&6
2994
2995 echo "$as_me:2995: checking if you wish to install curses.h" >&5
2996 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2997
2998 # Check whether --with-curses-h or --without-curses-h was given.
2999 if test "${with_curses_h+set}" = set; then
3000   withval="$with_curses_h"
3001   with_curses_h=$withval
3002 else
3003   with_curses_h=yes
3004 fi;
3005 echo "$as_me:3005: result: $with_curses_h" >&5
3006 echo "${ECHO_T}$with_curses_h" >&6
3007
3008 modules_to_build="ncurses"
3009 if test "X$cf_with_progs" != Xno ; then
3010 modules_to_build="$modules_to_build progs tack"
3011 fi
3012 modules_to_build="$modules_to_build panel menu form"
3013
3014 test "$program_prefix" != NONE &&
3015   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3016 # Use a double $ so make ignores it.
3017 test "$program_suffix" != NONE &&
3018   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3019 # Double any \ or $.  echo might interpret backslashes.
3020 # By default was `s,x,x', remove it if useless.
3021 cat <<\_ACEOF >conftest.sed
3022 s/[\\$]/&&/g;s/;s,x,x,$//
3023 _ACEOF
3024 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3025 rm conftest.sed
3026
3027 for ac_prog in mawk gawk nawk awk
3028 do
3029   # Extract the first word of "$ac_prog", so it can be a program name with args.
3030 set dummy $ac_prog; ac_word=$2
3031 echo "$as_me:3031: checking for $ac_word" >&5
3032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3033 if test "${ac_cv_prog_AWK+set}" = set; then
3034   echo $ECHO_N "(cached) $ECHO_C" >&6
3035 else
3036   if test -n "$AWK"; then
3037   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3038 else
3039   ac_save_IFS=$IFS; IFS=$ac_path_separator
3040 ac_dummy="$PATH"
3041 for ac_dir in $ac_dummy; do
3042   IFS=$ac_save_IFS
3043   test -z "$ac_dir" && ac_dir=.
3044   $as_executable_p "$ac_dir/$ac_word" || continue
3045 ac_cv_prog_AWK="$ac_prog"
3046 echo "$as_me:3046: found $ac_dir/$ac_word" >&5
3047 break
3048 done
3049
3050 fi
3051 fi
3052 AWK=$ac_cv_prog_AWK
3053 if test -n "$AWK"; then
3054   echo "$as_me:3054: result: $AWK" >&5
3055 echo "${ECHO_T}$AWK" >&6
3056 else
3057   echo "$as_me:3057: result: no" >&5
3058 echo "${ECHO_T}no" >&6
3059 fi
3060
3061   test -n "$AWK" && break
3062 done
3063
3064 test -z "$AWK" && { { echo "$as_me:3064: error: No awk program found" >&5
3065 echo "$as_me: error: No awk program found" >&2;}
3066    { (exit 1); exit 1; }; }
3067
3068 echo "$as_me:3068: checking for egrep" >&5
3069 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3070 if test "${ac_cv_prog_egrep+set}" = set; then
3071   echo $ECHO_N "(cached) $ECHO_C" >&6
3072 else
3073   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3074     then ac_cv_prog_egrep='grep -E'
3075     else ac_cv_prog_egrep='egrep'
3076     fi
3077 fi
3078 echo "$as_me:3078: result: $ac_cv_prog_egrep" >&5
3079 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3080  EGREP=$ac_cv_prog_egrep
3081
3082 test -z "$EGREP" && { { echo "$as_me:3082: error: No egrep program found" >&5
3083 echo "$as_me: error: No egrep program found" >&2;}
3084    { (exit 1); exit 1; }; }
3085
3086 # Find a good install program.  We prefer a C program (faster),
3087 # so one script is as good as another.  But avoid the broken or
3088 # incompatible versions:
3089 # SysV /etc/install, /usr/sbin/install
3090 # SunOS /usr/etc/install
3091 # IRIX /sbin/install
3092 # AIX /bin/install
3093 # AmigaOS /C/install, which installs bootblocks on floppy discs
3094 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3095 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3096 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3097 # ./install, which can be erroneously created by make from ./install.sh.
3098 echo "$as_me:3098: checking for a BSD compatible install" >&5
3099 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3100 if test -z "$INSTALL"; then
3101 if test "${ac_cv_path_install+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104     ac_save_IFS=$IFS; IFS=$ac_path_separator
3105   for ac_dir in $PATH; do
3106     IFS=$ac_save_IFS
3107     # Account for people who put trailing slashes in PATH elements.
3108     case $ac_dir/ in
3109     / | ./ | .// | /cC/* \
3110     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3111     | /usr/ucb/* ) ;;
3112     *)
3113       # OSF1 and SCO ODT 3.0 have their own names for install.
3114       # Don't use installbsd from OSF since it installs stuff as root
3115       # by default.
3116       for ac_prog in ginstall scoinst install; do
3117         if $as_executable_p "$ac_dir/$ac_prog"; then
3118           if test $ac_prog = install &&
3119             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3120             # AIX install.  It has an incompatible calling convention.
3121             :
3122           elif test $ac_prog = install &&
3123             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3124             # program-specific install script used by HP pwplus--don't use.
3125             :
3126           else
3127             ac_cv_path_install="$ac_dir/$ac_prog -c"
3128             break 2
3129           fi
3130         fi
3131       done
3132       ;;
3133     esac
3134   done
3135
3136 fi
3137   if test "${ac_cv_path_install+set}" = set; then
3138     INSTALL=$ac_cv_path_install
3139   else
3140     # As a last resort, use the slow shell script.  We don't cache a
3141     # path for INSTALL within a source directory, because that will
3142     # break other packages using the cache if that directory is
3143     # removed, or if the path is relative.
3144     INSTALL=$ac_install_sh
3145   fi
3146 fi
3147 echo "$as_me:3147: result: $INSTALL" >&5
3148 echo "${ECHO_T}$INSTALL" >&6
3149
3150 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3151 # It thinks the first close brace ends the variable substitution.
3152 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3153
3154 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3155
3156 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3157
3158 case $INSTALL in
3159 /*)
3160   ;;
3161 *)
3162   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3163   test -z "$cf_dir" && cf_dir=.
3164   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3165   ;;
3166 esac
3167
3168 for ac_prog in tdlint lint alint splint lclint
3169 do
3170   # Extract the first word of "$ac_prog", so it can be a program name with args.
3171 set dummy $ac_prog; ac_word=$2
3172 echo "$as_me:3172: checking for $ac_word" >&5
3173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3174 if test "${ac_cv_prog_LINT+set}" = set; then
3175   echo $ECHO_N "(cached) $ECHO_C" >&6
3176 else
3177   if test -n "$LINT"; then
3178   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3179 else
3180   ac_save_IFS=$IFS; IFS=$ac_path_separator
3181 ac_dummy="$PATH"
3182 for ac_dir in $ac_dummy; do
3183   IFS=$ac_save_IFS
3184   test -z "$ac_dir" && ac_dir=.
3185   $as_executable_p "$ac_dir/$ac_word" || continue
3186 ac_cv_prog_LINT="$ac_prog"
3187 echo "$as_me:3187: found $ac_dir/$ac_word" >&5
3188 break
3189 done
3190
3191 fi
3192 fi
3193 LINT=$ac_cv_prog_LINT
3194 if test -n "$LINT"; then
3195   echo "$as_me:3195: result: $LINT" >&5
3196 echo "${ECHO_T}$LINT" >&6
3197 else
3198   echo "$as_me:3198: result: no" >&5
3199 echo "${ECHO_T}no" >&6
3200 fi
3201
3202   test -n "$LINT" && break
3203 done
3204
3205 echo "$as_me:3205: checking whether ln -s works" >&5
3206 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3207 LN_S=$as_ln_s
3208 if test "$LN_S" = "ln -s"; then
3209   echo "$as_me:3209: result: yes" >&5
3210 echo "${ECHO_T}yes" >&6
3211 else
3212   echo "$as_me:3212: result: no, using $LN_S" >&5
3213 echo "${ECHO_T}no, using $LN_S" >&6
3214 fi
3215
3216 echo "$as_me:3216: checking if $LN_S -f options work" >&5
3217 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3218
3219 rm -f conf$$.src conf$$dst
3220 echo >conf$$.dst
3221 echo first >conf$$.src
3222 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3223         cf_prog_ln_sf=yes
3224 else
3225         cf_prog_ln_sf=no
3226 fi
3227 rm -f conf$$.dst conf$$src
3228 echo "$as_me:3228: result: $cf_prog_ln_sf" >&5
3229 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3230
3231 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3232
3233 echo "$as_me:3233: checking for long file names" >&5
3234 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3235 if test "${ac_cv_sys_long_file_names+set}" = set; then
3236   echo $ECHO_N "(cached) $ECHO_C" >&6
3237 else
3238   ac_cv_sys_long_file_names=yes
3239 # Test for long file names in all the places we know might matter:
3240 #      .                the current directory, where building will happen
3241 #      $prefix/lib      where we will be installing things
3242 #      $exec_prefix/lib likewise
3243 # eval it to expand exec_prefix.
3244 #      $TMPDIR          if set, where it might want to write temporary files
3245 # if $TMPDIR is not set:
3246 #      /tmp             where it might want to write temporary files
3247 #      /var/tmp         likewise
3248 #      /usr/tmp         likewise
3249 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3250   ac_tmpdirs=$TMPDIR
3251 else
3252   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3253 fi
3254 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3255   test -d $ac_dir || continue
3256   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3257   ac_xdir=$ac_dir/cf$$
3258   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3259   ac_tf1=$ac_xdir/conftest9012345
3260   ac_tf2=$ac_xdir/conftest9012346
3261   (echo 1 >$ac_tf1) 2>/dev/null
3262   (echo 2 >$ac_tf2) 2>/dev/null
3263   ac_val=`cat $ac_tf1 2>/dev/null`
3264   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3265     ac_cv_sys_long_file_names=no
3266     rm -rf $ac_xdir 2>/dev/null
3267     break
3268   fi
3269   rm -rf $ac_xdir 2>/dev/null
3270 done
3271 fi
3272 echo "$as_me:3272: result: $ac_cv_sys_long_file_names" >&5
3273 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3274 if test $ac_cv_sys_long_file_names = yes; then
3275
3276 cat >>confdefs.h <<\EOF
3277 #define HAVE_LONG_FILE_NAMES 1
3278 EOF
3279
3280 fi
3281
3282 # if we find pkg-config, check if we should install the ".pc" files.
3283
3284 echo "$as_me:3284: checking if you want to use pkg-config" >&5
3285 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3286
3287 # Check whether --with-pkg-config or --without-pkg-config was given.
3288 if test "${with_pkg_config+set}" = set; then
3289   withval="$with_pkg_config"
3290   cf_pkg_config=$withval
3291 else
3292   cf_pkg_config=yes
3293 fi;
3294 echo "$as_me:3294: result: $cf_pkg_config" >&5
3295 echo "${ECHO_T}$cf_pkg_config" >&6
3296
3297 case $cf_pkg_config in #(vi
3298 no) #(vi
3299         PKG_CONFIG=none
3300         ;;
3301 yes) #(vi
3302
3303 if test -n "$ac_tool_prefix"; then
3304   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3305 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3306 echo "$as_me:3306: checking for $ac_word" >&5
3307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3308 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3309   echo $ECHO_N "(cached) $ECHO_C" >&6
3310 else
3311   case $PKG_CONFIG in
3312   [\\/]* | ?:[\\/]*)
3313   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3314   ;;
3315   *)
3316   ac_save_IFS=$IFS; IFS=$ac_path_separator
3317 ac_dummy="$PATH"
3318 for ac_dir in $ac_dummy; do
3319   IFS=$ac_save_IFS
3320   test -z "$ac_dir" && ac_dir=.
3321   if $as_executable_p "$ac_dir/$ac_word"; then
3322    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3323    echo "$as_me:3323: found $ac_dir/$ac_word" >&5
3324    break
3325 fi
3326 done
3327
3328   ;;
3329 esac
3330 fi
3331 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3332
3333 if test -n "$PKG_CONFIG"; then
3334   echo "$as_me:3334: result: $PKG_CONFIG" >&5
3335 echo "${ECHO_T}$PKG_CONFIG" >&6
3336 else
3337   echo "$as_me:3337: result: no" >&5
3338 echo "${ECHO_T}no" >&6
3339 fi
3340
3341 fi
3342 if test -z "$ac_cv_path_PKG_CONFIG"; then
3343   ac_pt_PKG_CONFIG=$PKG_CONFIG
3344   # Extract the first word of "pkg-config", so it can be a program name with args.
3345 set dummy pkg-config; ac_word=$2
3346 echo "$as_me:3346: checking for $ac_word" >&5
3347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   case $ac_pt_PKG_CONFIG in
3352   [\\/]* | ?:[\\/]*)
3353   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3354   ;;
3355   *)
3356   ac_save_IFS=$IFS; IFS=$ac_path_separator
3357 ac_dummy="$PATH"
3358 for ac_dir in $ac_dummy; do
3359   IFS=$ac_save_IFS
3360   test -z "$ac_dir" && ac_dir=.
3361   if $as_executable_p "$ac_dir/$ac_word"; then
3362    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3363    echo "$as_me:3363: found $ac_dir/$ac_word" >&5
3364    break
3365 fi
3366 done
3367
3368   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3369   ;;
3370 esac
3371 fi
3372 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3373
3374 if test -n "$ac_pt_PKG_CONFIG"; then
3375   echo "$as_me:3375: result: $ac_pt_PKG_CONFIG" >&5
3376 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3377 else
3378   echo "$as_me:3378: result: no" >&5
3379 echo "${ECHO_T}no" >&6
3380 fi
3381
3382   PKG_CONFIG=$ac_pt_PKG_CONFIG
3383 else
3384   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3385 fi
3386
3387         ;;
3388 *)
3389         PKG_CONFIG=$withval
3390         ;;
3391 esac
3392
3393 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3394 if test "$PKG_CONFIG" != none ; then
3395
3396 if test "x$prefix" != xNONE; then
3397   cf_path_syntax="$prefix"
3398 else
3399   cf_path_syntax="$ac_default_prefix"
3400 fi
3401
3402 case ".$PKG_CONFIG" in #(vi
3403 .\$\(*\)*|.\'*\'*) #(vi
3404   ;;
3405 ..|./*|.\\*) #(vi
3406   ;;
3407 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3408   ;;
3409 .\${*prefix}*|.\${*dir}*) #(vi
3410   eval PKG_CONFIG="$PKG_CONFIG"
3411   case ".$PKG_CONFIG" in #(vi
3412   .NONE/*)
3413     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3414     ;;
3415   esac
3416   ;; #(vi
3417 .no|.NONE/*)
3418   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3419   ;;
3420 *)
3421   { { echo "$as_me:3421: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3422 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3423    { (exit 1); exit 1; }; }
3424   ;;
3425 esac
3426
3427 fi
3428
3429 if test "$PKG_CONFIG" != none ; then
3430         echo "$as_me:3430: checking for $PKG_CONFIG library directory" >&5
3431 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3432
3433 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3434 if test "${with_pkg_config_libdir+set}" = set; then
3435   withval="$with_pkg_config_libdir"
3436   PKG_CONFIG_LIBDIR=$withval
3437 else
3438   PKG_CONFIG_LIBDIR=yes
3439 fi;
3440
3441         case x$PKG_CONFIG_LIBDIR in #(vi
3442         x/*) #(vi
3443                 ;;
3444         xyes) #(vi
3445                 # look for the library directory using the same prefix as the executable
3446                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3447                 case x`(arch) 2>/dev/null` in #(vi
3448                 *64) #(vi
3449                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3450                         do
3451                                 if test -d $cf_config/pkgconfig
3452                                 then
3453                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3454                                         break
3455                                 fi
3456                         done
3457                         ;;
3458                 *)
3459                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3460                         ;;
3461                 esac
3462                 ;;
3463         *)
3464                 ;;
3465         esac
3466
3467         echo "$as_me:3467: result: $PKG_CONFIG_LIBDIR" >&5
3468 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3469 fi
3470
3471 if test "$PKG_CONFIG" != none ; then
3472         echo "$as_me:3472: checking if we should install .pc files for $PKG_CONFIG" >&5
3473 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3474
3475 # Check whether --enable-pc-files or --disable-pc-files was given.
3476 if test "${enable_pc_files+set}" = set; then
3477   enableval="$enable_pc_files"
3478   enable_pc_files=$enableval
3479 else
3480   enable_pc_files=no
3481 fi;
3482         echo "$as_me:3482: result: $enable_pc_files" >&5
3483 echo "${ECHO_T}$enable_pc_files" >&6
3484         if test "$enable_pc_files" != no
3485         then
3486
3487 if test "x$prefix" != xNONE; then
3488   cf_path_syntax="$prefix"
3489 else
3490   cf_path_syntax="$ac_default_prefix"
3491 fi
3492
3493 case ".$PKG_CONFIG_LIBDIR" in #(vi
3494 .\$\(*\)*|.\'*\'*) #(vi
3495   ;;
3496 ..|./*|.\\*) #(vi
3497   ;;
3498 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3499   ;;
3500 .\${*prefix}*|.\${*dir}*) #(vi
3501   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3502   case ".$PKG_CONFIG_LIBDIR" in #(vi
3503   .NONE/*)
3504     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3505     ;;
3506   esac
3507   ;; #(vi
3508 .no|.NONE/*)
3509   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3510   ;;
3511 *)
3512   { { echo "$as_me:3512: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3513 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3514    { (exit 1); exit 1; }; }
3515   ;;
3516 esac
3517
3518         fi
3519 else
3520         enable_pc_files=no
3521 fi
3522
3523 echo "$as_me:3523: checking if we should assume mixed-case filenames" >&5
3524 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3525
3526 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3527 if test "${enable_mixed_case+set}" = set; then
3528   enableval="$enable_mixed_case"
3529   enable_mixedcase=$enableval
3530 else
3531   enable_mixedcase=auto
3532 fi;
3533 echo "$as_me:3533: result: $enable_mixedcase" >&5
3534 echo "${ECHO_T}$enable_mixedcase" >&6
3535 if test "$enable_mixedcase" = "auto" ; then
3536
3537 echo "$as_me:3537: checking if filesystem supports mixed-case filenames" >&5
3538 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3539 if test "${cf_cv_mixedcase+set}" = set; then
3540   echo $ECHO_N "(cached) $ECHO_C" >&6
3541 else
3542
3543 if test "$cross_compiling" = yes ; then
3544         case $target_alias in #(vi
3545         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3546                 cf_cv_mixedcase=no
3547                 ;;
3548         *)
3549                 cf_cv_mixedcase=yes
3550                 ;;
3551         esac
3552 else
3553         rm -f conftest CONFTEST
3554         echo test >conftest
3555         if test -f CONFTEST ; then
3556                 cf_cv_mixedcase=no
3557         else
3558                 cf_cv_mixedcase=yes
3559         fi
3560         rm -f conftest CONFTEST
3561 fi
3562
3563 fi
3564 echo "$as_me:3564: result: $cf_cv_mixedcase" >&5
3565 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3566 test "$cf_cv_mixedcase" = yes &&
3567 cat >>confdefs.h <<\EOF
3568 #define MIXEDCASE_FILENAMES 1
3569 EOF
3570
3571 else
3572     cf_cv_mixedcase=$enable_mixedcase
3573     if test "x$enable_mixedcase" = "xyes" ; then
3574
3575 cat >>confdefs.h <<\EOF
3576 #define MIXEDCASE_FILENAMES 1
3577 EOF
3578
3579     fi
3580 fi
3581
3582 # do this after mixed-case option (tags/TAGS is not as important as tic).
3583 echo "$as_me:3583: checking whether ${MAKE-make} sets \${MAKE}" >&5
3584 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3585 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3586 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3587   echo $ECHO_N "(cached) $ECHO_C" >&6
3588 else
3589   cat >conftest.make <<\EOF
3590 all:
3591         @echo 'ac_maketemp="${MAKE}"'
3592 EOF
3593 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3594 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3595 if test -n "$ac_maketemp"; then
3596   eval ac_cv_prog_make_${ac_make}_set=yes
3597 else
3598   eval ac_cv_prog_make_${ac_make}_set=no
3599 fi
3600 rm -f conftest.make
3601 fi
3602 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3603   echo "$as_me:3603: result: yes" >&5
3604 echo "${ECHO_T}yes" >&6
3605   SET_MAKE=
3606 else
3607   echo "$as_me:3607: result: no" >&5
3608 echo "${ECHO_T}no" >&6
3609   SET_MAKE="MAKE=${MAKE-make}"
3610 fi
3611
3612 for ac_prog in exctags ctags
3613 do
3614   # Extract the first word of "$ac_prog", so it can be a program name with args.
3615 set dummy $ac_prog; ac_word=$2
3616 echo "$as_me:3616: checking for $ac_word" >&5
3617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3618 if test "${ac_cv_prog_CTAGS+set}" = set; then
3619   echo $ECHO_N "(cached) $ECHO_C" >&6
3620 else
3621   if test -n "$CTAGS"; then
3622   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3623 else
3624   ac_save_IFS=$IFS; IFS=$ac_path_separator
3625 ac_dummy="$PATH"
3626 for ac_dir in $ac_dummy; do
3627   IFS=$ac_save_IFS
3628   test -z "$ac_dir" && ac_dir=.
3629   $as_executable_p "$ac_dir/$ac_word" || continue
3630 ac_cv_prog_CTAGS="$ac_prog"
3631 echo "$as_me:3631: found $ac_dir/$ac_word" >&5
3632 break
3633 done
3634
3635 fi
3636 fi
3637 CTAGS=$ac_cv_prog_CTAGS
3638 if test -n "$CTAGS"; then
3639   echo "$as_me:3639: result: $CTAGS" >&5
3640 echo "${ECHO_T}$CTAGS" >&6
3641 else
3642   echo "$as_me:3642: result: no" >&5
3643 echo "${ECHO_T}no" >&6
3644 fi
3645
3646   test -n "$CTAGS" && break
3647 done
3648
3649 for ac_prog in exetags etags
3650 do
3651   # Extract the first word of "$ac_prog", so it can be a program name with args.
3652 set dummy $ac_prog; ac_word=$2
3653 echo "$as_me:3653: checking for $ac_word" >&5
3654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3655 if test "${ac_cv_prog_ETAGS+set}" = set; then
3656   echo $ECHO_N "(cached) $ECHO_C" >&6
3657 else
3658   if test -n "$ETAGS"; then
3659   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3660 else
3661   ac_save_IFS=$IFS; IFS=$ac_path_separator
3662 ac_dummy="$PATH"
3663 for ac_dir in $ac_dummy; do
3664   IFS=$ac_save_IFS
3665   test -z "$ac_dir" && ac_dir=.
3666   $as_executable_p "$ac_dir/$ac_word" || continue
3667 ac_cv_prog_ETAGS="$ac_prog"
3668 echo "$as_me:3668: found $ac_dir/$ac_word" >&5
3669 break
3670 done
3671
3672 fi
3673 fi
3674 ETAGS=$ac_cv_prog_ETAGS
3675 if test -n "$ETAGS"; then
3676   echo "$as_me:3676: result: $ETAGS" >&5
3677 echo "${ECHO_T}$ETAGS" >&6
3678 else
3679   echo "$as_me:3679: result: no" >&5
3680 echo "${ECHO_T}no" >&6
3681 fi
3682
3683   test -n "$ETAGS" && break
3684 done
3685
3686 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3687 set dummy ${CTAGS:-ctags}; ac_word=$2
3688 echo "$as_me:3688: checking for $ac_word" >&5
3689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3690 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3691   echo $ECHO_N "(cached) $ECHO_C" >&6
3692 else
3693   if test -n "$MAKE_LOWER_TAGS"; then
3694   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3695 else
3696   ac_save_IFS=$IFS; IFS=$ac_path_separator
3697 ac_dummy="$PATH"
3698 for ac_dir in $ac_dummy; do
3699   IFS=$ac_save_IFS
3700   test -z "$ac_dir" && ac_dir=.
3701   $as_executable_p "$ac_dir/$ac_word" || continue
3702 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3703 echo "$as_me:3703: found $ac_dir/$ac_word" >&5
3704 break
3705 done
3706
3707   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3708 fi
3709 fi
3710 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3711 if test -n "$MAKE_LOWER_TAGS"; then
3712   echo "$as_me:3712: result: $MAKE_LOWER_TAGS" >&5
3713 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3714 else
3715   echo "$as_me:3715: result: no" >&5
3716 echo "${ECHO_T}no" >&6
3717 fi
3718
3719 if test "$cf_cv_mixedcase" = yes ; then
3720         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3721 set dummy ${ETAGS:-etags}; ac_word=$2
3722 echo "$as_me:3722: checking for $ac_word" >&5
3723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3724 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3725   echo $ECHO_N "(cached) $ECHO_C" >&6
3726 else
3727   if test -n "$MAKE_UPPER_TAGS"; then
3728   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3729 else
3730   ac_save_IFS=$IFS; IFS=$ac_path_separator
3731 ac_dummy="$PATH"
3732 for ac_dir in $ac_dummy; do
3733   IFS=$ac_save_IFS
3734   test -z "$ac_dir" && ac_dir=.
3735   $as_executable_p "$ac_dir/$ac_word" || continue
3736 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3737 echo "$as_me:3737: found $ac_dir/$ac_word" >&5
3738 break
3739 done
3740
3741   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3742 fi
3743 fi
3744 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3745 if test -n "$MAKE_UPPER_TAGS"; then
3746   echo "$as_me:3746: result: $MAKE_UPPER_TAGS" >&5
3747 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753 else
3754         MAKE_UPPER_TAGS=no
3755 fi
3756
3757 if test "$MAKE_UPPER_TAGS" = yes ; then
3758         MAKE_UPPER_TAGS=
3759 else
3760         MAKE_UPPER_TAGS="#"
3761 fi
3762
3763 if test "$MAKE_LOWER_TAGS" = yes ; then
3764         MAKE_LOWER_TAGS=
3765 else
3766         MAKE_LOWER_TAGS="#"
3767 fi
3768
3769 echo "$as_me:3769: checking for makeflags variable" >&5
3770 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3771 if test "${cf_cv_makeflags+set}" = set; then
3772   echo $ECHO_N "(cached) $ECHO_C" >&6
3773 else
3774
3775         cf_cv_makeflags=''
3776         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3777         do
3778                 cat >cf_makeflags.tmp <<CF_EOF
3779 SHELL = /bin/sh
3780 all :
3781         @ echo '.$cf_option'
3782 CF_EOF
3783                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3784                 case "$cf_result" in
3785                 .*k|.*kw)
3786                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3787                         case "$cf_result" in
3788                         .*CC=*) cf_cv_makeflags=
3789                                 ;;
3790                         *)      cf_cv_makeflags=$cf_option
3791                                 ;;
3792                         esac
3793                         break
3794                         ;;
3795                 .-)     ;;
3796                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3797                         ;;
3798                 esac
3799         done
3800         rm -f cf_makeflags.tmp
3801
3802 fi
3803 echo "$as_me:3803: result: $cf_cv_makeflags" >&5
3804 echo "${ECHO_T}$cf_cv_makeflags" >&6
3805
3806 if test -n "$ac_tool_prefix"; then
3807   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3808 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3809 echo "$as_me:3809: checking for $ac_word" >&5
3810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3811 if test "${ac_cv_prog_RANLIB+set}" = set; then
3812   echo $ECHO_N "(cached) $ECHO_C" >&6
3813 else
3814   if test -n "$RANLIB"; then
3815   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3816 else
3817   ac_save_IFS=$IFS; IFS=$ac_path_separator
3818 ac_dummy="$PATH"
3819 for ac_dir in $ac_dummy; do
3820   IFS=$ac_save_IFS
3821   test -z "$ac_dir" && ac_dir=.
3822   $as_executable_p "$ac_dir/$ac_word" || continue
3823 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3824 echo "$as_me:3824: found $ac_dir/$ac_word" >&5
3825 break
3826 done
3827
3828 fi
3829 fi
3830 RANLIB=$ac_cv_prog_RANLIB
3831 if test -n "$RANLIB"; then
3832   echo "$as_me:3832: result: $RANLIB" >&5
3833 echo "${ECHO_T}$RANLIB" >&6
3834 else
3835   echo "$as_me:3835: result: no" >&5
3836 echo "${ECHO_T}no" >&6
3837 fi
3838
3839 fi
3840 if test -z "$ac_cv_prog_RANLIB"; then
3841   ac_ct_RANLIB=$RANLIB
3842   # Extract the first word of "ranlib", so it can be a program name with args.
3843 set dummy ranlib; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3847   echo $ECHO_N "(cached) $ECHO_C" >&6
3848 else
3849   if test -n "$ac_ct_RANLIB"; then
3850   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3851 else
3852   ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 ac_dummy="$PATH"
3854 for ac_dir in $ac_dummy; do
3855   IFS=$ac_save_IFS
3856   test -z "$ac_dir" && ac_dir=.
3857   $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_ac_ct_RANLIB="ranlib"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860 break
3861 done
3862
3863   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3864 fi
3865 fi
3866 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3867 if test -n "$ac_ct_RANLIB"; then
3868   echo "$as_me:3868: result: $ac_ct_RANLIB" >&5
3869 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3870 else
3871   echo "$as_me:3871: result: no" >&5
3872 echo "${ECHO_T}no" >&6
3873 fi
3874
3875   RANLIB=$ac_ct_RANLIB
3876 else
3877   RANLIB="$ac_cv_prog_RANLIB"
3878 fi
3879
3880 if test -n "$ac_tool_prefix"; then
3881   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3882 set dummy ${ac_tool_prefix}ld; ac_word=$2
3883 echo "$as_me:3883: checking for $ac_word" >&5
3884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885 if test "${ac_cv_prog_LD+set}" = set; then
3886   echo $ECHO_N "(cached) $ECHO_C" >&6
3887 else
3888   if test -n "$LD"; then
3889   ac_cv_prog_LD="$LD" # Let the user override the test.
3890 else
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   $as_executable_p "$ac_dir/$ac_word" || continue
3897 ac_cv_prog_LD="${ac_tool_prefix}ld"
3898 echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899 break
3900 done
3901
3902 fi
3903 fi
3904 LD=$ac_cv_prog_LD
3905 if test -n "$LD"; then
3906   echo "$as_me:3906: result: $LD" >&5
3907 echo "${ECHO_T}$LD" >&6
3908 else
3909   echo "$as_me:3909: result: no" >&5
3910 echo "${ECHO_T}no" >&6
3911 fi
3912
3913 fi
3914 if test -z "$ac_cv_prog_LD"; then
3915   ac_ct_LD=$LD
3916   # Extract the first word of "ld", so it can be a program name with args.
3917 set dummy ld; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ac_ct_LD"; then
3924   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ac_ct_LD="ld"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3938 fi
3939 fi
3940 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3941 if test -n "$ac_ct_LD"; then
3942   echo "$as_me:3942: result: $ac_ct_LD" >&5
3943 echo "${ECHO_T}$ac_ct_LD" >&6
3944 else
3945   echo "$as_me:3945: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   LD=$ac_ct_LD
3950 else
3951   LD="$ac_cv_prog_LD"
3952 fi
3953
3954 if test -n "$ac_tool_prefix"; then
3955   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3956 set dummy ${ac_tool_prefix}ar; ac_word=$2
3957 echo "$as_me:3957: checking for $ac_word" >&5
3958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3959 if test "${ac_cv_prog_AR+set}" = set; then
3960   echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962   if test -n "$AR"; then
3963   ac_cv_prog_AR="$AR" # Let the user override the test.
3964 else
3965   ac_save_IFS=$IFS; IFS=$ac_path_separator
3966 ac_dummy="$PATH"
3967 for ac_dir in $ac_dummy; do
3968   IFS=$ac_save_IFS
3969   test -z "$ac_dir" && ac_dir=.
3970   $as_executable_p "$ac_dir/$ac_word" || continue
3971 ac_cv_prog_AR="${ac_tool_prefix}ar"
3972 echo "$as_me:3972: found $ac_dir/$ac_word" >&5
3973 break
3974 done
3975
3976 fi
3977 fi
3978 AR=$ac_cv_prog_AR
3979 if test -n "$AR"; then
3980   echo "$as_me:3980: result: $AR" >&5
3981 echo "${ECHO_T}$AR" >&6
3982 else
3983   echo "$as_me:3983: result: no" >&5
3984 echo "${ECHO_T}no" >&6
3985 fi
3986
3987 fi
3988 if test -z "$ac_cv_prog_AR"; then
3989   ac_ct_AR=$AR
3990   # Extract the first word of "ar", so it can be a program name with args.
3991 set dummy ar; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3995   echo $ECHO_N "(cached) $ECHO_C" >&6
3996 else
3997   if test -n "$ac_ct_AR"; then
3998   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3999 else
4000   ac_save_IFS=$IFS; IFS=$ac_path_separator
4001 ac_dummy="$PATH"
4002 for ac_dir in $ac_dummy; do
4003   IFS=$ac_save_IFS
4004   test -z "$ac_dir" && ac_dir=.
4005   $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_ac_ct_AR="ar"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4008 break
4009 done
4010
4011   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4012 fi
4013 fi
4014 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4015 if test -n "$ac_ct_AR"; then
4016   echo "$as_me:4016: result: $ac_ct_AR" >&5
4017 echo "${ECHO_T}$ac_ct_AR" >&6
4018 else
4019   echo "$as_me:4019: result: no" >&5
4020 echo "${ECHO_T}no" >&6
4021 fi
4022
4023   AR=$ac_ct_AR
4024 else
4025   AR="$ac_cv_prog_AR"
4026 fi
4027
4028 if test -n "$ac_tool_prefix"; then
4029   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}nm; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_prog_NM+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   if test -n "$NM"; then
4037   ac_cv_prog_NM="$NM" # Let the user override the test.
4038 else
4039   ac_save_IFS=$IFS; IFS=$ac_path_separator
4040 ac_dummy="$PATH"
4041 for ac_dir in $ac_dummy; do
4042   IFS=$ac_save_IFS
4043   test -z "$ac_dir" && ac_dir=.
4044   $as_executable_p "$ac_dir/$ac_word" || continue
4045 ac_cv_prog_NM="${ac_tool_prefix}nm"
4046 echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047 break
4048 done
4049
4050 fi
4051 fi
4052 NM=$ac_cv_prog_NM
4053 if test -n "$NM"; then
4054   echo "$as_me:4054: result: $NM" >&5
4055 echo "${ECHO_T}$NM" >&6
4056 else
4057   echo "$as_me:4057: result: no" >&5
4058 echo "${ECHO_T}no" >&6
4059 fi
4060
4061 fi
4062 if test -z "$ac_cv_prog_NM"; then
4063   ac_ct_NM=$NM
4064   # Extract the first word of "nm", so it can be a program name with args.
4065 set dummy nm; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4069   echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071   if test -n "$ac_ct_NM"; then
4072   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4073 else
4074   ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 ac_dummy="$PATH"
4076 for ac_dir in $ac_dummy; do
4077   IFS=$ac_save_IFS
4078   test -z "$ac_dir" && ac_dir=.
4079   $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_ac_ct_NM="nm"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082 break
4083 done
4084
4085   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4086 fi
4087 fi
4088 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4089 if test -n "$ac_ct_NM"; then
4090   echo "$as_me:4090: result: $ac_ct_NM" >&5
4091 echo "${ECHO_T}$ac_ct_NM" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   NM=$ac_ct_NM
4098 else
4099   NM="$ac_cv_prog_NM"
4100 fi
4101
4102 if test -n "$ac_tool_prefix"; then
4103   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4104 set dummy ${ac_tool_prefix}ar; ac_word=$2
4105 echo "$as_me:4105: checking for $ac_word" >&5
4106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4107 if test "${ac_cv_prog_AR+set}" = set; then
4108   echo $ECHO_N "(cached) $ECHO_C" >&6
4109 else
4110   if test -n "$AR"; then
4111   ac_cv_prog_AR="$AR" # Let the user override the test.
4112 else
4113   ac_save_IFS=$IFS; IFS=$ac_path_separator
4114 ac_dummy="$PATH"
4115 for ac_dir in $ac_dummy; do
4116   IFS=$ac_save_IFS
4117   test -z "$ac_dir" && ac_dir=.
4118   $as_executable_p "$ac_dir/$ac_word" || continue
4119 ac_cv_prog_AR="${ac_tool_prefix}ar"
4120 echo "$as_me:4120: found $ac_dir/$ac_word" >&5
4121 break
4122 done
4123
4124 fi
4125 fi
4126 AR=$ac_cv_prog_AR
4127 if test -n "$AR"; then
4128   echo "$as_me:4128: result: $AR" >&5
4129 echo "${ECHO_T}$AR" >&6
4130 else
4131   echo "$as_me:4131: result: no" >&5
4132 echo "${ECHO_T}no" >&6
4133 fi
4134
4135 fi
4136 if test -z "$ac_cv_prog_AR"; then
4137   ac_ct_AR=$AR
4138   # Extract the first word of "ar", so it can be a program name with args.
4139 set dummy ar; ac_word=$2
4140 echo "$as_me:4140: checking for $ac_word" >&5
4141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4142 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4143   echo $ECHO_N "(cached) $ECHO_C" >&6
4144 else
4145   if test -n "$ac_ct_AR"; then
4146   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4147 else
4148   ac_save_IFS=$IFS; IFS=$ac_path_separator
4149 ac_dummy="$PATH"
4150 for ac_dir in $ac_dummy; do
4151   IFS=$ac_save_IFS
4152   test -z "$ac_dir" && ac_dir=.
4153   $as_executable_p "$ac_dir/$ac_word" || continue
4154 ac_cv_prog_ac_ct_AR="ar"
4155 echo "$as_me:4155: found $ac_dir/$ac_word" >&5
4156 break
4157 done
4158
4159   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4160 fi
4161 fi
4162 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4163 if test -n "$ac_ct_AR"; then
4164   echo "$as_me:4164: result: $ac_ct_AR" >&5
4165 echo "${ECHO_T}$ac_ct_AR" >&6
4166 else
4167   echo "$as_me:4167: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4169 fi
4170
4171   AR=$ac_ct_AR
4172 else
4173   AR="$ac_cv_prog_AR"
4174 fi
4175
4176 echo "$as_me:4176: checking for options to update archives" >&5
4177 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4178 if test "${cf_cv_ar_flags+set}" = set; then
4179   echo $ECHO_N "(cached) $ECHO_C" >&6
4180 else
4181
4182         cf_cv_ar_flags=unknown
4183         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4184         do
4185
4186                 # check if $ARFLAGS already contains this choice
4187                 if test "x$ARFLAGS" != "x" ; then
4188                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4189                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4190                                 cf_cv_ar_flags=
4191                                 break
4192                         fi
4193                 fi
4194
4195                 rm -f conftest.$ac_cv_objext
4196                 rm -f conftest.a
4197
4198                 cat >conftest.$ac_ext <<EOF
4199 #line 4199 "configure"
4200 int     testdata[3] = { 123, 456, 789 };
4201 EOF
4202                 if { (eval echo "$as_me:4202: \"$ac_compile\"") >&5
4203   (eval $ac_compile) 2>&5
4204   ac_status=$?
4205   echo "$as_me:4205: \$? = $ac_status" >&5
4206   (exit $ac_status); } ; then
4207                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4208                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4209                         if test -f conftest.a ; then
4210                                 cf_cv_ar_flags=$cf_ar_flags
4211                                 break
4212                         fi
4213                 else
4214                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4215
4216 echo "${as_me:-configure}:4216: testing cannot compile test-program ..." 1>&5
4217
4218                         break
4219                 fi
4220         done
4221         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4222
4223 fi
4224 echo "$as_me:4224: result: $cf_cv_ar_flags" >&5
4225 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4226
4227 if test -n "$ARFLAGS" ; then
4228         if test -n "$cf_cv_ar_flags" ; then
4229                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4230         fi
4231 else
4232         ARFLAGS=$cf_cv_ar_flags
4233 fi
4234
4235 echo "$as_me:4235: checking if you have specified an install-prefix" >&5
4236 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4237
4238 # Check whether --with-install-prefix or --without-install-prefix was given.
4239 if test "${with_install_prefix+set}" = set; then
4240   withval="$with_install_prefix"
4241   case "x$withval" in #(vi
4242         xyes|xno) #(vi
4243                 ;;
4244         *)      DESTDIR="$withval"
4245                 ;;
4246         esac
4247 fi;
4248 echo "$as_me:4248: result: $DESTDIR" >&5
4249 echo "${ECHO_T}$DESTDIR" >&6
4250
4251 ###############################################################################
4252
4253 # If we're cross-compiling, allow the user to override the tools and their
4254 # options.  The configure script is oriented toward identifying the host
4255 # compiler, etc., but we need a build compiler to generate parts of the source.
4256
4257 if test "$cross_compiling" = yes ; then
4258
4259         # defaults that we might want to override
4260         : ${BUILD_CFLAGS:=''}
4261         : ${BUILD_CPPFLAGS:=''}
4262         : ${BUILD_LDFLAGS:=''}
4263         : ${BUILD_LIBS:=''}
4264         : ${BUILD_EXEEXT:='$x'}
4265         : ${BUILD_OBJEXT:='o'}
4266
4267 # Check whether --with-build-cc or --without-build-cc was given.
4268 if test "${with_build_cc+set}" = set; then
4269   withval="$with_build_cc"
4270   BUILD_CC="$withval"
4271 else
4272   for ac_prog in gcc cc cl
4273 do
4274   # Extract the first word of "$ac_prog", so it can be a program name with args.
4275 set dummy $ac_prog; ac_word=$2
4276 echo "$as_me:4276: checking for $ac_word" >&5
4277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4278 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4279   echo $ECHO_N "(cached) $ECHO_C" >&6
4280 else
4281   if test -n "$BUILD_CC"; then
4282   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4283 else
4284   ac_save_IFS=$IFS; IFS=$ac_path_separator
4285 ac_dummy="$PATH"
4286 for ac_dir in $ac_dummy; do
4287   IFS=$ac_save_IFS
4288   test -z "$ac_dir" && ac_dir=.
4289   $as_executable_p "$ac_dir/$ac_word" || continue
4290 ac_cv_prog_BUILD_CC="$ac_prog"
4291 echo "$as_me:4291: found $ac_dir/$ac_word" >&5
4292 break
4293 done
4294
4295 fi
4296 fi
4297 BUILD_CC=$ac_cv_prog_BUILD_CC
4298 if test -n "$BUILD_CC"; then
4299   echo "$as_me:4299: result: $BUILD_CC" >&5
4300 echo "${ECHO_T}$BUILD_CC" >&6
4301 else
4302   echo "$as_me:4302: result: no" >&5
4303 echo "${ECHO_T}no" >&6
4304 fi
4305
4306   test -n "$BUILD_CC" && break
4307 done
4308
4309 fi;
4310         echo "$as_me:4310: checking for native build C compiler" >&5
4311 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4312         echo "$as_me:4312: result: $BUILD_CC" >&5
4313 echo "${ECHO_T}$BUILD_CC" >&6
4314
4315         echo "$as_me:4315: checking for native build C preprocessor" >&5
4316 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4317
4318 # Check whether --with-build-cpp or --without-build-cpp was given.
4319 if test "${with_build_cpp+set}" = set; then
4320   withval="$with_build_cpp"
4321   BUILD_CPP="$withval"
4322 else
4323   BUILD_CPP='${BUILD_CC} -E'
4324 fi;
4325         echo "$as_me:4325: result: $BUILD_CPP" >&5
4326 echo "${ECHO_T}$BUILD_CPP" >&6
4327
4328         echo "$as_me:4328: checking for native build C flags" >&5
4329 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4330
4331 # Check whether --with-build-cflags or --without-build-cflags was given.
4332 if test "${with_build_cflags+set}" = set; then
4333   withval="$with_build_cflags"
4334   BUILD_CFLAGS="$withval"
4335 fi;
4336         echo "$as_me:4336: result: $BUILD_CFLAGS" >&5
4337 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4338
4339         echo "$as_me:4339: checking for native build C preprocessor-flags" >&5
4340 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4341
4342 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4343 if test "${with_build_cppflags+set}" = set; then
4344   withval="$with_build_cppflags"
4345   BUILD_CPPFLAGS="$withval"
4346 fi;
4347         echo "$as_me:4347: result: $BUILD_CPPFLAGS" >&5
4348 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4349
4350         echo "$as_me:4350: checking for native build linker-flags" >&5
4351 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4352
4353 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4354 if test "${with_build_ldflags+set}" = set; then
4355   withval="$with_build_ldflags"
4356   BUILD_LDFLAGS="$withval"
4357 fi;
4358         echo "$as_me:4358: result: $BUILD_LDFLAGS" >&5
4359 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4360
4361         echo "$as_me:4361: checking for native build linker-libraries" >&5
4362 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4363
4364 # Check whether --with-build-libs or --without-build-libs was given.
4365 if test "${with_build_libs+set}" = set; then
4366   withval="$with_build_libs"
4367   BUILD_LIBS="$withval"
4368 fi;
4369         echo "$as_me:4369: result: $BUILD_LIBS" >&5
4370 echo "${ECHO_T}$BUILD_LIBS" >&6
4371
4372         # this assumes we're on Unix.
4373         BUILD_EXEEXT=
4374         BUILD_OBJEXT=o
4375
4376         : ${BUILD_CC:='${CC}'}
4377
4378         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4379                 { { echo "$as_me:4379: error: Cross-build requires two compilers.
4380 Use --with-build-cc to specify the native compiler." >&5
4381 echo "$as_me: error: Cross-build requires two compilers.
4382 Use --with-build-cc to specify the native compiler." >&2;}
4383    { (exit 1); exit 1; }; }
4384         fi
4385
4386 else
4387         : ${BUILD_CC:='${CC}'}
4388         : ${BUILD_CPP:='${CPP}'}
4389         : ${BUILD_CFLAGS:='${CFLAGS}'}
4390         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4391         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4392         : ${BUILD_LIBS:='${LIBS}'}
4393         : ${BUILD_EXEEXT:='$x'}
4394         : ${BUILD_OBJEXT:='o'}
4395 fi
4396
4397 ###############################################################################
4398
4399 ### Options to allow the user to specify the set of libraries which are used.
4400 ### Use "--without-normal --with-shared" to allow the default model to be
4401 ### shared, for example.
4402 cf_list_models=""
4403
4404 echo "$as_me:4404: checking if libtool -version-number should be used" >&5
4405 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4406
4407 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4408 if test "${enable_libtool_version+set}" = set; then
4409   enableval="$enable_libtool_version"
4410   test "$enableval" != no && enableval=yes
4411   if test "$enableval" != "yes" ; then
4412     cf_libtool_version=no
4413   else
4414     cf_libtool_version=yes
4415   fi
4416 else
4417   enableval=yes
4418   cf_libtool_version=yes
4419
4420 fi;
4421 echo "$as_me:4421: result: $cf_libtool_version" >&5
4422 echo "${ECHO_T}$cf_libtool_version" >&6
4423
4424 if test "$cf_libtool_version" = yes ; then
4425         LIBTOOL_VERSION="-version-number"
4426 else
4427         LIBTOOL_VERSION="-version-info"
4428 fi
4429
4430 LIBTOOL=
4431
4432 # common library maintenance symbols that are convenient for libtool scripts:
4433 LIB_CREATE='${AR} -cr'
4434 LIB_OBJECT='${OBJECTS}'
4435 LIB_SUFFIX=.a
4436 LIB_PREP="$RANLIB"
4437
4438 # symbols used to prop libtool up to enable it to determine what it should be
4439 # doing:
4440 LIB_CLEAN=
4441 LIB_COMPILE=
4442 LIB_LINK='${CC}'
4443 LIB_INSTALL=
4444 LIB_UNINSTALL=
4445
4446 echo "$as_me:4446: checking if you want to build libraries with libtool" >&5
4447 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4448
4449 # Check whether --with-libtool or --without-libtool was given.
4450 if test "${with_libtool+set}" = set; then
4451   withval="$with_libtool"
4452   with_libtool=$withval
4453 else
4454   with_libtool=no
4455 fi;
4456 echo "$as_me:4456: result: $with_libtool" >&5
4457 echo "${ECHO_T}$with_libtool" >&6
4458 if test "$with_libtool" != "no"; then
4459
4460         if test "$with_libtool" != "yes" ; then
4461
4462 if test "x$prefix" != xNONE; then
4463   cf_path_syntax="$prefix"
4464 else
4465   cf_path_syntax="$ac_default_prefix"
4466 fi
4467
4468 case ".$with_libtool" in #(vi
4469 .\$\(*\)*|.\'*\'*) #(vi
4470   ;;
4471 ..|./*|.\\*) #(vi
4472   ;;
4473 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4474   ;;
4475 .\${*prefix}*|.\${*dir}*) #(vi
4476   eval with_libtool="$with_libtool"
4477   case ".$with_libtool" in #(vi
4478   .NONE/*)
4479     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4480     ;;
4481   esac
4482   ;; #(vi
4483 .no|.NONE/*)
4484   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4485   ;;
4486 *)
4487   { { echo "$as_me:4487: error: expected a pathname, not \"$with_libtool\"" >&5
4488 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4489    { (exit 1); exit 1; }; }
4490   ;;
4491 esac
4492
4493                 LIBTOOL=$with_libtool
4494         else
4495                 if test -n "$ac_tool_prefix"; then
4496   for ac_prog in libtool glibtool
4497   do
4498     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4499 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4500 echo "$as_me:4500: checking for $ac_word" >&5
4501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4502 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4503   echo $ECHO_N "(cached) $ECHO_C" >&6
4504 else
4505   if test -n "$LIBTOOL"; then
4506   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4507 else
4508   ac_save_IFS=$IFS; IFS=$ac_path_separator
4509 ac_dummy="$PATH"
4510 for ac_dir in $ac_dummy; do
4511   IFS=$ac_save_IFS
4512   test -z "$ac_dir" && ac_dir=.
4513   $as_executable_p "$ac_dir/$ac_word" || continue
4514 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4515 echo "$as_me:4515: found $ac_dir/$ac_word" >&5
4516 break
4517 done
4518
4519 fi
4520 fi
4521 LIBTOOL=$ac_cv_prog_LIBTOOL
4522 if test -n "$LIBTOOL"; then
4523   echo "$as_me:4523: result: $LIBTOOL" >&5
4524 echo "${ECHO_T}$LIBTOOL" >&6
4525 else
4526   echo "$as_me:4526: result: no" >&5
4527 echo "${ECHO_T}no" >&6
4528 fi
4529
4530     test -n "$LIBTOOL" && break
4531   done
4532 fi
4533 if test -z "$LIBTOOL"; then
4534   ac_ct_LIBTOOL=$LIBTOOL
4535   for ac_prog in libtool glibtool
4536 do
4537   # Extract the first word of "$ac_prog", so it can be a program name with args.
4538 set dummy $ac_prog; ac_word=$2
4539 echo "$as_me:4539: checking for $ac_word" >&5
4540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4541 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4542   echo $ECHO_N "(cached) $ECHO_C" >&6
4543 else
4544   if test -n "$ac_ct_LIBTOOL"; then
4545   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4546 else
4547   ac_save_IFS=$IFS; IFS=$ac_path_separator
4548 ac_dummy="$PATH"
4549 for ac_dir in $ac_dummy; do
4550   IFS=$ac_save_IFS
4551   test -z "$ac_dir" && ac_dir=.
4552   $as_executable_p "$ac_dir/$ac_word" || continue
4553 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4554 echo "$as_me:4554: found $ac_dir/$ac_word" >&5
4555 break
4556 done
4557
4558 fi
4559 fi
4560 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4561 if test -n "$ac_ct_LIBTOOL"; then
4562   echo "$as_me:4562: result: $ac_ct_LIBTOOL" >&5
4563 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4564 else
4565   echo "$as_me:4565: result: no" >&5
4566 echo "${ECHO_T}no" >&6
4567 fi
4568
4569   test -n "$ac_ct_LIBTOOL" && break
4570 done
4571 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4572
4573   LIBTOOL=$ac_ct_LIBTOOL
4574 fi
4575
4576 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4577 then
4578         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.].*//'`
4579 else
4580         cf_cv_libtool_version=
4581 fi
4582 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4583
4584                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4585                 then
4586
4587 unset ac_cv_prog_ac_ct_LIBTOOL
4588 unset ac_ct_LIBTOOL
4589 unset LIBTOOL
4590
4591                         if test -n "$ac_tool_prefix"; then
4592   for ac_prog in glibtool
4593   do
4594     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4595 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4596 echo "$as_me:4596: checking for $ac_word" >&5
4597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4598 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4599   echo $ECHO_N "(cached) $ECHO_C" >&6
4600 else
4601   if test -n "$LIBTOOL"; then
4602   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4603 else
4604   ac_save_IFS=$IFS; IFS=$ac_path_separator
4605 ac_dummy="$PATH"
4606 for ac_dir in $ac_dummy; do
4607   IFS=$ac_save_IFS
4608   test -z "$ac_dir" && ac_dir=.
4609   $as_executable_p "$ac_dir/$ac_word" || continue
4610 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4611 echo "$as_me:4611: found $ac_dir/$ac_word" >&5
4612 break
4613 done
4614
4615 fi
4616 fi
4617 LIBTOOL=$ac_cv_prog_LIBTOOL
4618 if test -n "$LIBTOOL"; then
4619   echo "$as_me:4619: result: $LIBTOOL" >&5
4620 echo "${ECHO_T}$LIBTOOL" >&6
4621 else
4622   echo "$as_me:4622: result: no" >&5
4623 echo "${ECHO_T}no" >&6
4624 fi
4625
4626     test -n "$LIBTOOL" && break
4627   done
4628 fi
4629 if test -z "$LIBTOOL"; then
4630   ac_ct_LIBTOOL=$LIBTOOL
4631   for ac_prog in glibtool
4632 do
4633   # Extract the first word of "$ac_prog", so it can be a program name with args.
4634 set dummy $ac_prog; ac_word=$2
4635 echo "$as_me:4635: checking for $ac_word" >&5
4636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4637 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4638   echo $ECHO_N "(cached) $ECHO_C" >&6
4639 else
4640   if test -n "$ac_ct_LIBTOOL"; then
4641   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4642 else
4643   ac_save_IFS=$IFS; IFS=$ac_path_separator
4644 ac_dummy="$PATH"
4645 for ac_dir in $ac_dummy; do
4646   IFS=$ac_save_IFS
4647   test -z "$ac_dir" && ac_dir=.
4648   $as_executable_p "$ac_dir/$ac_word" || continue
4649 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4650 echo "$as_me:4650: found $ac_dir/$ac_word" >&5
4651 break
4652 done
4653
4654 fi
4655 fi
4656 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4657 if test -n "$ac_ct_LIBTOOL"; then
4658   echo "$as_me:4658: result: $ac_ct_LIBTOOL" >&5
4659 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4660 else
4661   echo "$as_me:4661: result: no" >&5
4662 echo "${ECHO_T}no" >&6
4663 fi
4664
4665   test -n "$ac_ct_LIBTOOL" && break
4666 done
4667 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4668
4669   LIBTOOL=$ac_ct_LIBTOOL
4670 fi
4671
4672 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4673 then
4674         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.].*//'`
4675 else
4676         cf_cv_libtool_version=
4677 fi
4678 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4679
4680                 fi
4681         fi
4682         if test -z "$LIBTOOL" ; then
4683                 { { echo "$as_me:4683: error: Cannot find libtool" >&5
4684 echo "$as_me: error: Cannot find libtool" >&2;}
4685    { (exit 1); exit 1; }; }
4686         fi
4687         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4688         LIB_OBJECT='${OBJECTS:.o=.lo}'
4689         LIB_SUFFIX=.la
4690         LIB_CLEAN='${LIBTOOL} --mode=clean'
4691         LIB_COMPILE='${LIBTOOL} --mode=compile'
4692         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4693         LIB_INSTALL='${LIBTOOL} --mode=install'
4694         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4695         LIB_PREP=:
4696
4697 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4698 then
4699         echo "$as_me:4699: checking version of $LIBTOOL" >&5
4700 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4701
4702 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4703 then
4704         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.].*//'`
4705 else
4706         cf_cv_libtool_version=
4707 fi
4708 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4709
4710         echo "$as_me:4710: result: $cf_cv_libtool_version" >&5
4711 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4712         if test -z "$cf_cv_libtool_version" ; then
4713                 { { echo "$as_me:4713: error: This is not GNU libtool" >&5
4714 echo "$as_me: error: This is not GNU libtool" >&2;}
4715    { (exit 1); exit 1; }; }
4716         fi
4717 else
4718         { { echo "$as_me:4718: error: GNU libtool has not been found" >&5
4719 echo "$as_me: error: GNU libtool has not been found" >&2;}
4720    { (exit 1); exit 1; }; }
4721 fi
4722
4723         # special hack to add -no-undefined (which libtool should do for itself)
4724         LT_UNDEF=
4725         case "$cf_cv_system_name" in #(vi
4726         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4727                 LT_UNDEF=-no-undefined
4728                 ;;
4729         esac
4730
4731         # special hack to add --tag option for C++ compiler
4732         case $cf_cv_libtool_version in #(vi
4733         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4734                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4735                 LIBTOOL="$LIBTOOL --tag=CC"
4736                 ;;
4737         *)
4738                 LIBTOOL_CXX="$LIBTOOL"
4739                 ;;
4740         esac
4741 else
4742         LIBTOOL=""
4743         LIBTOOL_CXX=""
4744 fi
4745
4746 test -z "$LIBTOOL" && ECHO_LT=
4747
4748 if test "$with_libtool" != "no" ; then
4749
4750 cf_list_models="$cf_list_models libtool"
4751
4752 else
4753
4754 echo "$as_me:4754: checking if you want to build shared libraries" >&5
4755 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4756
4757 # Check whether --with-shared or --without-shared was given.
4758 if test "${with_shared+set}" = set; then
4759   withval="$with_shared"
4760   with_shared=$withval
4761 else
4762   with_shared=no
4763 fi;
4764 echo "$as_me:4764: result: $with_shared" >&5
4765 echo "${ECHO_T}$with_shared" >&6
4766 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4767
4768 echo "$as_me:4768: checking if you want to build static libraries" >&5
4769 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4770
4771 # Check whether --with-normal or --without-normal was given.
4772 if test "${with_normal+set}" = set; then
4773   withval="$with_normal"
4774   with_normal=$withval
4775 else
4776   with_normal=yes
4777 fi;
4778 echo "$as_me:4778: result: $with_normal" >&5
4779 echo "${ECHO_T}$with_normal" >&6
4780 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4781
4782 echo "$as_me:4782: checking if you want to build debug libraries" >&5
4783 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4784
4785 # Check whether --with-debug or --without-debug was given.
4786 if test "${with_debug+set}" = set; then
4787   withval="$with_debug"
4788   with_debug=$withval
4789 else
4790   with_debug=yes
4791 fi;
4792 echo "$as_me:4792: result: $with_debug" >&5
4793 echo "${ECHO_T}$with_debug" >&6
4794 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4795
4796 echo "$as_me:4796: checking if you want to build profiling libraries" >&5
4797 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4798
4799 # Check whether --with-profile or --without-profile was given.
4800 if test "${with_profile+set}" = set; then
4801   withval="$with_profile"
4802   with_profile=$withval
4803 else
4804   with_profile=no
4805 fi;
4806 echo "$as_me:4806: result: $with_profile" >&5
4807 echo "${ECHO_T}$with_profile" >&6
4808 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4809
4810 fi
4811
4812 if test "X$cf_with_cxx_binding" != Xno; then
4813 if test "x$with_shared" = "xyes"; then
4814 echo "$as_me:4814: checking if you want to build C++ shared libraries" >&5
4815 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4816
4817 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4818 if test "${with_cxx_shared+set}" = set; then
4819   withval="$with_cxx_shared"
4820   with_shared_cxx=$withval
4821 else
4822   with_shared_cxx=no
4823 fi;
4824 echo "$as_me:4824: result: $with_shared_cxx" >&5
4825 echo "${ECHO_T}$with_shared_cxx" >&6
4826 fi
4827 fi
4828
4829 ###############################################################################
4830
4831 echo "$as_me:4831: checking for specified models" >&5
4832 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4833 test -z "$cf_list_models" && cf_list_models=normal
4834 test "$with_libtool" != "no" && cf_list_models=libtool
4835 echo "$as_me:4835: result: $cf_list_models" >&5
4836 echo "${ECHO_T}$cf_list_models" >&6
4837
4838 ### Use the first model as the default, and save its suffix for use in building
4839 ### up test-applications.
4840 echo "$as_me:4840: checking for default model" >&5
4841 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4842 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4843 echo "$as_me:4843: result: $DFT_LWR_MODEL" >&5
4844 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4845
4846 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4847
4848 TICS_NAME=tic
4849
4850 TINFO_NAME=tinfo
4851
4852 LIB_NAME=ncurses
4853
4854 LIB_DIR=../lib
4855 LIB_2ND=../../lib
4856
4857 echo "$as_me:4857: checking if you want to have a library-prefix" >&5
4858 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4859
4860 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4861 if test "${with_lib_prefix+set}" = set; then
4862   withval="$with_lib_prefix"
4863   with_lib_prefix=$withval
4864 else
4865   with_lib_prefix=auto
4866 fi;
4867 echo "$as_me:4867: result: $with_lib_prefix" >&5
4868 echo "${ECHO_T}$with_lib_prefix" >&6
4869
4870 if test $with_lib_prefix = auto
4871 then
4872
4873         case $cf_cv_system_name in #(vi
4874         OS/2*|os2*) #(vi
4875         LIB_PREFIX=''
4876         ;;
4877         *)      LIB_PREFIX='lib'
4878         ;;
4879         esac
4880 cf_prefix=$LIB_PREFIX
4881
4882 elif test $with_lib_prefix = no
4883 then
4884         LIB_PREFIX=
4885 else
4886         LIB_PREFIX=$with_lib_prefix
4887 fi
4888
4889 LIB_SUFFIX=
4890
4891         echo "$as_me:4891: checking for PATH separator" >&5
4892 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4893         case $cf_cv_system_name in
4894         os2*)   PATH_SEPARATOR=';'  ;;
4895         *)      ${PATH_SEPARATOR:=':'}  ;;
4896         esac
4897
4898         echo "$as_me:4898: result: $PATH_SEPARATOR" >&5
4899 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4900
4901 ###############################################################################
4902
4903 echo "$as_me:4903: checking if you want to build a separate terminfo library" >&5
4904 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4905
4906 # Check whether --with-termlib or --without-termlib was given.
4907 if test "${with_termlib+set}" = set; then
4908   withval="$with_termlib"
4909   with_termlib=$withval
4910 else
4911   with_termlib=no
4912 fi;
4913 echo "$as_me:4913: result: $with_termlib" >&5
4914 echo "${ECHO_T}$with_termlib" >&6
4915
4916 echo "$as_me:4916: checking if you want to build a separate tic library" >&5
4917 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4918
4919 # Check whether --with-ticlib or --without-ticlib was given.
4920 if test "${with_ticlib+set}" = set; then
4921   withval="$with_ticlib"
4922   with_ticlib=$withval
4923 else
4924   with_ticlib=no
4925 fi;
4926 echo "$as_me:4926: result: $with_ticlib" >&5
4927 echo "${ECHO_T}$with_ticlib" >&6
4928
4929 ### Checks for special libraries, must be done up-front.
4930 SHLIB_LIST=""
4931
4932 echo "$as_me:4932: checking if you want to link with the GPM mouse library" >&5
4933 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4934
4935 # Check whether --with-gpm or --without-gpm was given.
4936 if test "${with_gpm+set}" = set; then
4937   withval="$with_gpm"
4938   with_gpm=$withval
4939 else
4940   with_gpm=maybe
4941 fi;
4942 echo "$as_me:4942: result: $with_gpm" >&5
4943 echo "${ECHO_T}$with_gpm" >&6
4944
4945 if test "$with_gpm" != no ; then
4946         echo "$as_me:4946: checking for gpm.h" >&5
4947 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4948 if test "${ac_cv_header_gpm_h+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   cat >conftest.$ac_ext <<_ACEOF
4952 #line 4952 "configure"
4953 #include "confdefs.h"
4954 #include <gpm.h>
4955 _ACEOF
4956 if { (eval echo "$as_me:4956: \"$ac_cpp conftest.$ac_ext\"") >&5
4957   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4958   ac_status=$?
4959   egrep -v '^ *\+' conftest.er1 >conftest.err
4960   rm -f conftest.er1
4961   cat conftest.err >&5
4962   echo "$as_me:4962: \$? = $ac_status" >&5
4963   (exit $ac_status); } >/dev/null; then
4964   if test -s conftest.err; then
4965     ac_cpp_err=$ac_c_preproc_warn_flag
4966   else
4967     ac_cpp_err=
4968   fi
4969 else
4970   ac_cpp_err=yes
4971 fi
4972 if test -z "$ac_cpp_err"; then
4973   ac_cv_header_gpm_h=yes
4974 else
4975   echo "$as_me: failed program was:" >&5
4976   cat conftest.$ac_ext >&5
4977   ac_cv_header_gpm_h=no
4978 fi
4979 rm -f conftest.err conftest.$ac_ext
4980 fi
4981 echo "$as_me:4981: result: $ac_cv_header_gpm_h" >&5
4982 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4983 if test $ac_cv_header_gpm_h = yes; then
4984
4985 cat >>confdefs.h <<\EOF
4986 #define HAVE_GPM_H 1
4987 EOF
4988
4989                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4990                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4991
4992 echo "${as_me:-configure}:4992: testing assuming we really have GPM library ..." 1>&5
4993
4994 cat >>confdefs.h <<\EOF
4995 #define HAVE_LIBGPM 1
4996 EOF
4997
4998                 else
4999                         echo "$as_me:4999: checking for Gpm_Open in -lgpm" >&5
5000 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5001 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5002   echo $ECHO_N "(cached) $ECHO_C" >&6
5003 else
5004   ac_check_lib_save_LIBS=$LIBS
5005 LIBS="-lgpm  $LIBS"
5006 cat >conftest.$ac_ext <<_ACEOF
5007 #line 5007 "configure"
5008 #include "confdefs.h"
5009
5010 /* Override any gcc2 internal prototype to avoid an error.  */
5011 #ifdef __cplusplus
5012 extern "C"
5013 #endif
5014 /* We use char because int might match the return type of a gcc2
5015    builtin and then its argument prototype would still apply.  */
5016 char Gpm_Open ();
5017 int
5018 main ()
5019 {
5020 Gpm_Open ();
5021   ;
5022   return 0;
5023 }
5024 _ACEOF
5025 rm -f conftest.$ac_objext conftest$ac_exeext
5026 if { (eval echo "$as_me:5026: \"$ac_link\"") >&5
5027   (eval $ac_link) 2>&5
5028   ac_status=$?
5029   echo "$as_me:5029: \$? = $ac_status" >&5
5030   (exit $ac_status); } &&
5031          { ac_try='test -s conftest$ac_exeext'
5032   { (eval echo "$as_me:5032: \"$ac_try\"") >&5
5033   (eval $ac_try) 2>&5
5034   ac_status=$?
5035   echo "$as_me:5035: \$? = $ac_status" >&5
5036   (exit $ac_status); }; }; then
5037   ac_cv_lib_gpm_Gpm_Open=yes
5038 else
5039   echo "$as_me: failed program was:" >&5
5040 cat conftest.$ac_ext >&5
5041 ac_cv_lib_gpm_Gpm_Open=no
5042 fi
5043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5044 LIBS=$ac_check_lib_save_LIBS
5045 fi
5046 echo "$as_me:5046: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5047 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5048 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5049   :
5050 else
5051
5052                                 { { echo "$as_me:5052: error: Cannot link with GPM library" >&5
5053 echo "$as_me: error: Cannot link with GPM library" >&2;}
5054    { (exit 1); exit 1; }; }
5055                 fi
5056                 with_gpm=yes
5057
5058 fi
5059
5060 else
5061
5062                 test "$with_gpm" != maybe && { echo "$as_me:5062: WARNING: Cannot find GPM header" >&5
5063 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5064                 with_gpm=no
5065
5066 fi
5067
5068 fi
5069
5070 if test "$with_gpm" != no ; then
5071         echo "$as_me:5071: checking if you want to load GPM dynamically" >&5
5072 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5073
5074 # Check whether --with-dlsym or --without-dlsym was given.
5075 if test "${with_dlsym+set}" = set; then
5076   withval="$with_dlsym"
5077   with_dlsym=$withval
5078 else
5079   with_dlsym=yes
5080 fi;
5081         echo "$as_me:5081: result: $with_dlsym" >&5
5082 echo "${ECHO_T}$with_dlsym" >&6
5083         if test "x$with_dlsym" = xyes ; then
5084
5085 cf_have_dlsym=no
5086 echo "$as_me:5086: checking for dlsym" >&5
5087 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5088 if test "${ac_cv_func_dlsym+set}" = set; then
5089   echo $ECHO_N "(cached) $ECHO_C" >&6
5090 else
5091   cat >conftest.$ac_ext <<_ACEOF
5092 #line 5092 "configure"
5093 #include "confdefs.h"
5094 /* System header to define __stub macros and hopefully few prototypes,
5095     which can conflict with char dlsym (); below.  */
5096 #include <assert.h>
5097 /* Override any gcc2 internal prototype to avoid an error.  */
5098 #ifdef __cplusplus
5099 extern "C"
5100 #endif
5101 /* We use char because int might match the return type of a gcc2
5102    builtin and then its argument prototype would still apply.  */
5103 char dlsym ();
5104 char (*f) ();
5105
5106 int
5107 main ()
5108 {
5109 /* The GNU C library defines this for functions which it implements
5110     to always fail with ENOSYS.  Some functions are actually named
5111     something starting with __ and the normal name is an alias.  */
5112 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5113 choke me
5114 #else
5115 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5116 #endif
5117
5118   ;
5119   return 0;
5120 }
5121 _ACEOF
5122 rm -f conftest.$ac_objext conftest$ac_exeext
5123 if { (eval echo "$as_me:5123: \"$ac_link\"") >&5
5124   (eval $ac_link) 2>&5
5125   ac_status=$?
5126   echo "$as_me:5126: \$? = $ac_status" >&5
5127   (exit $ac_status); } &&
5128          { ac_try='test -s conftest$ac_exeext'
5129   { (eval echo "$as_me:5129: \"$ac_try\"") >&5
5130   (eval $ac_try) 2>&5
5131   ac_status=$?
5132   echo "$as_me:5132: \$? = $ac_status" >&5
5133   (exit $ac_status); }; }; then
5134   ac_cv_func_dlsym=yes
5135 else
5136   echo "$as_me: failed program was:" >&5
5137 cat conftest.$ac_ext >&5
5138 ac_cv_func_dlsym=no
5139 fi
5140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5141 fi
5142 echo "$as_me:5142: result: $ac_cv_func_dlsym" >&5
5143 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5144 if test $ac_cv_func_dlsym = yes; then
5145   cf_have_dlsym=yes
5146 else
5147
5148 cf_have_libdl=no
5149 echo "$as_me:5149: checking for dlsym in -ldl" >&5
5150 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5151 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5152   echo $ECHO_N "(cached) $ECHO_C" >&6
5153 else
5154   ac_check_lib_save_LIBS=$LIBS
5155 LIBS="-ldl  $LIBS"
5156 cat >conftest.$ac_ext <<_ACEOF
5157 #line 5157 "configure"
5158 #include "confdefs.h"
5159
5160 /* Override any gcc2 internal prototype to avoid an error.  */
5161 #ifdef __cplusplus
5162 extern "C"
5163 #endif
5164 /* We use char because int might match the return type of a gcc2
5165    builtin and then its argument prototype would still apply.  */
5166 char dlsym ();
5167 int
5168 main ()
5169 {
5170 dlsym ();
5171   ;
5172   return 0;
5173 }
5174 _ACEOF
5175 rm -f conftest.$ac_objext conftest$ac_exeext
5176 if { (eval echo "$as_me:5176: \"$ac_link\"") >&5
5177   (eval $ac_link) 2>&5
5178   ac_status=$?
5179   echo "$as_me:5179: \$? = $ac_status" >&5
5180   (exit $ac_status); } &&
5181          { ac_try='test -s conftest$ac_exeext'
5182   { (eval echo "$as_me:5182: \"$ac_try\"") >&5
5183   (eval $ac_try) 2>&5
5184   ac_status=$?
5185   echo "$as_me:5185: \$? = $ac_status" >&5
5186   (exit $ac_status); }; }; then
5187   ac_cv_lib_dl_dlsym=yes
5188 else
5189   echo "$as_me: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191 ac_cv_lib_dl_dlsym=no
5192 fi
5193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5194 LIBS=$ac_check_lib_save_LIBS
5195 fi
5196 echo "$as_me:5196: result: $ac_cv_lib_dl_dlsym" >&5
5197 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5198 if test $ac_cv_lib_dl_dlsym = yes; then
5199
5200         cf_have_dlsym=yes
5201         cf_have_libdl=yes
5202 fi
5203
5204 fi
5205
5206 if test "$cf_have_dlsym" = yes ; then
5207         test "$cf_have_libdl" = yes &&
5208 cf_add_libs="-ldl"
5209 # Filter out duplicates - this happens with badly-designed ".pc" files...
5210 for cf_add_1lib in $LIBS
5211 do
5212         for cf_add_2lib in $cf_add_libs
5213         do
5214                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5215                 then
5216                         cf_add_1lib=
5217                         break
5218                 fi
5219         done
5220         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5221 done
5222 LIBS="$cf_add_libs"
5223
5224         echo "$as_me:5224: checking whether able to link to dl*() functions" >&5
5225 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5226         cat >conftest.$ac_ext <<_ACEOF
5227 #line 5227 "configure"
5228 #include "confdefs.h"
5229 #include <dlfcn.h>
5230 int
5231 main ()
5232 {
5233
5234                 void *obj;
5235                 if ((obj = dlopen("filename", 0)) != 0) {
5236                         if (dlsym(obj, "symbolname") == 0) {
5237                         dlclose(obj);
5238                         }
5239                 }
5240   ;
5241   return 0;
5242 }
5243 _ACEOF
5244 rm -f conftest.$ac_objext conftest$ac_exeext
5245 if { (eval echo "$as_me:5245: \"$ac_link\"") >&5
5246   (eval $ac_link) 2>&5
5247   ac_status=$?
5248   echo "$as_me:5248: \$? = $ac_status" >&5
5249   (exit $ac_status); } &&
5250          { ac_try='test -s conftest$ac_exeext'
5251   { (eval echo "$as_me:5251: \"$ac_try\"") >&5
5252   (eval $ac_try) 2>&5
5253   ac_status=$?
5254   echo "$as_me:5254: \$? = $ac_status" >&5
5255   (exit $ac_status); }; }; then
5256
5257 cat >>confdefs.h <<\EOF
5258 #define HAVE_LIBDL 1
5259 EOF
5260
5261 else
5262   echo "$as_me: failed program was:" >&5
5263 cat conftest.$ac_ext >&5
5264
5265                 { { echo "$as_me:5265: error: Cannot link test program for libdl" >&5
5266 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5267    { (exit 1); exit 1; }; }
5268 fi
5269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5270         echo "$as_me:5270: result: ok" >&5
5271 echo "${ECHO_T}ok" >&6
5272 else
5273         { { echo "$as_me:5273: error: Cannot find dlsym function" >&5
5274 echo "$as_me: error: Cannot find dlsym function" >&2;}
5275    { (exit 1); exit 1; }; }
5276 fi
5277
5278                 if test "x$with_gpm" != xyes ; then
5279                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5280
5281 echo "${as_me:-configure}:5281: testing assuming soname for gpm is $with_gpm ..." 1>&5
5282
5283                         cf_cv_gpm_soname="$with_gpm"
5284                 else
5285
5286 echo "$as_me:5286: checking for soname of gpm library" >&5
5287 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5288 if test "${cf_cv_gpm_soname+set}" = set; then
5289   echo $ECHO_N "(cached) $ECHO_C" >&6
5290 else
5291
5292 cf_cv_gpm_soname=unknown
5293 if test "$cross_compiling" != yes ; then
5294 cat >conftest.$ac_ext <<CF_EOF
5295 #include <gpm.h>
5296 int main()
5297 {
5298 if (Gpm_Open(0,0)) Gpm_Close();
5299         ${cf_cv_main_return:-return}(0);
5300 }
5301 CF_EOF
5302 cf_save_LIBS="$LIBS"
5303
5304 cf_add_libs="-lgpm"
5305 # Filter out duplicates - this happens with badly-designed ".pc" files...
5306 for cf_add_1lib in $LIBS
5307 do
5308         for cf_add_2lib in $cf_add_libs
5309         do
5310                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5311                 then
5312                         cf_add_1lib=
5313                         break
5314                 fi
5315         done
5316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5317 done
5318 LIBS="$cf_add_libs"
5319
5320         if { (eval echo "$as_me:5320: \"$ac_compile\"") >&5
5321   (eval $ac_compile) 2>&5
5322   ac_status=$?
5323   echo "$as_me:5323: \$? = $ac_status" >&5
5324   (exit $ac_status); } ; then
5325                 if { (eval echo "$as_me:5325: \"$ac_link\"") >&5
5326   (eval $ac_link) 2>&5
5327   ac_status=$?
5328   echo "$as_me:5328: \$? = $ac_status" >&5
5329   (exit $ac_status); } ; then
5330                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5331                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5332                 fi
5333         fi
5334 rm -rf conftest*
5335 LIBS="$cf_save_LIBS"
5336 fi
5337
5338 fi
5339 echo "$as_me:5339: result: $cf_cv_gpm_soname" >&5
5340 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5341
5342                 fi
5343                 test "$cf_cv_gpm_soname" != "unknown" &&
5344 cat >>confdefs.h <<EOF
5345 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5346 EOF
5347
5348                 SHLIB_LIST="-ldl $SHLIB_LIST"
5349         else
5350                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5351
5352 cf_add_libs="-lgpm"
5353 # Filter out duplicates - this happens with badly-designed ".pc" files...
5354 for cf_add_1lib in $TEST_LIBS
5355 do
5356         for cf_add_2lib in $cf_add_libs
5357         do
5358                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5359                 then
5360                         cf_add_1lib=
5361                         break
5362                 fi
5363         done
5364         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5365 done
5366 TEST_LIBS="$cf_add_libs"
5367
5368         fi
5369
5370 cat >>confdefs.h <<\EOF
5371 #define HAVE_LIBGPM 1
5372 EOF
5373
5374 echo "$as_me:5374: checking for Gpm_Wgetch in -lgpm" >&5
5375 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5376 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5377   echo $ECHO_N "(cached) $ECHO_C" >&6
5378 else
5379   ac_check_lib_save_LIBS=$LIBS
5380 LIBS="-lgpm  $LIBS"
5381 cat >conftest.$ac_ext <<_ACEOF
5382 #line 5382 "configure"
5383 #include "confdefs.h"
5384
5385 /* Override any gcc2 internal prototype to avoid an error.  */
5386 #ifdef __cplusplus
5387 extern "C"
5388 #endif
5389 /* We use char because int might match the return type of a gcc2
5390    builtin and then its argument prototype would still apply.  */
5391 char Gpm_Wgetch ();
5392 int
5393 main ()
5394 {
5395 Gpm_Wgetch ();
5396   ;
5397   return 0;
5398 }
5399 _ACEOF
5400 rm -f conftest.$ac_objext conftest$ac_exeext
5401 if { (eval echo "$as_me:5401: \"$ac_link\"") >&5
5402   (eval $ac_link) 2>&5
5403   ac_status=$?
5404   echo "$as_me:5404: \$? = $ac_status" >&5
5405   (exit $ac_status); } &&
5406          { ac_try='test -s conftest$ac_exeext'
5407   { (eval echo "$as_me:5407: \"$ac_try\"") >&5
5408   (eval $ac_try) 2>&5
5409   ac_status=$?
5410   echo "$as_me:5410: \$? = $ac_status" >&5
5411   (exit $ac_status); }; }; then
5412   ac_cv_lib_gpm_Gpm_Wgetch=yes
5413 else
5414   echo "$as_me: failed program was:" >&5
5415 cat conftest.$ac_ext >&5
5416 ac_cv_lib_gpm_Gpm_Wgetch=no
5417 fi
5418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5419 LIBS=$ac_check_lib_save_LIBS
5420 fi
5421 echo "$as_me:5421: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5422 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5423 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5424
5425 echo "$as_me:5425: checking if GPM is weakly bound to curses library" >&5
5426 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5427 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5428   echo $ECHO_N "(cached) $ECHO_C" >&6
5429 else
5430
5431 cf_cv_check_gpm_wgetch=unknown
5432 if test "$cross_compiling" != yes ; then
5433
5434 cat >conftest.$ac_ext <<CF_EOF
5435 #include <gpm.h>
5436 int main()
5437 {
5438         Gpm_Wgetch();
5439         ${cf_cv_main_return:-return}(0);
5440 }
5441 CF_EOF
5442
5443         cf_save_LIBS="$LIBS"
5444         # This only works if we can look at the symbol table.  If a shared
5445         # library is stripped for install, we cannot use that.  So we're forced
5446         # to rely on the static library, noting that some packagers may not
5447         # include it.
5448         LIBS="-static -lgpm -dynamic $LIBS"
5449         if { (eval echo "$as_me:5449: \"$ac_compile\"") >&5
5450   (eval $ac_compile) 2>&5
5451   ac_status=$?
5452   echo "$as_me:5452: \$? = $ac_status" >&5
5453   (exit $ac_status); } ; then
5454                 if { (eval echo "$as_me:5454: \"$ac_link\"") >&5
5455   (eval $ac_link) 2>&5
5456   ac_status=$?
5457   echo "$as_me:5457: \$? = $ac_status" >&5
5458   (exit $ac_status); } ; then
5459                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5460                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5461                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5462                 fi
5463         fi
5464         rm -rf conftest*
5465         LIBS="$cf_save_LIBS"
5466 fi
5467
5468 fi
5469 echo "$as_me:5469: result: $cf_cv_check_gpm_wgetch" >&5
5470 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5471
5472 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5473         { echo "$as_me:5473: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5474 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5475 fi
5476
5477 fi
5478
5479 fi
5480
5481 # not everyone has "test -c"
5482 if test -c /dev/sysmouse 2>/dev/null ; then
5483 echo "$as_me:5483: checking if you want to use sysmouse" >&5
5484 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5485
5486 # Check whether --with-sysmouse or --without-sysmouse was given.
5487 if test "${with_sysmouse+set}" = set; then
5488   withval="$with_sysmouse"
5489   cf_with_sysmouse=$withval
5490 else
5491   cf_with_sysmouse=maybe
5492 fi;
5493         if test "$cf_with_sysmouse" != no ; then
5494         cat >conftest.$ac_ext <<_ACEOF
5495 #line 5495 "configure"
5496 #include "confdefs.h"
5497
5498 #include <osreldate.h>
5499 #if (__FreeBSD_version >= 400017)
5500 #include <sys/consio.h>
5501 #include <sys/fbio.h>
5502 #else
5503 #include <machine/console.h>
5504 #endif
5505
5506 int
5507 main ()
5508 {
5509
5510         struct mouse_info the_mouse;
5511         ioctl(0, CONS_MOUSECTL, &the_mouse);
5512
5513   ;
5514   return 0;
5515 }
5516 _ACEOF
5517 rm -f conftest.$ac_objext
5518 if { (eval echo "$as_me:5518: \"$ac_compile\"") >&5
5519   (eval $ac_compile) 2>&5
5520   ac_status=$?
5521   echo "$as_me:5521: \$? = $ac_status" >&5
5522   (exit $ac_status); } &&
5523          { ac_try='test -s conftest.$ac_objext'
5524   { (eval echo "$as_me:5524: \"$ac_try\"") >&5
5525   (eval $ac_try) 2>&5
5526   ac_status=$?
5527   echo "$as_me:5527: \$? = $ac_status" >&5
5528   (exit $ac_status); }; }; then
5529   cf_with_sysmouse=yes
5530 else
5531   echo "$as_me: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5533 cf_with_sysmouse=no
5534 fi
5535 rm -f conftest.$ac_objext conftest.$ac_ext
5536         fi
5537 echo "$as_me:5537: result: $cf_with_sysmouse" >&5
5538 echo "${ECHO_T}$cf_with_sysmouse" >&6
5539 test "$cf_with_sysmouse" = yes &&
5540 cat >>confdefs.h <<\EOF
5541 #define USE_SYSMOUSE 1
5542 EOF
5543
5544 fi
5545
5546 if test X"$CC_G_OPT" = X"" ; then
5547         CC_G_OPT='-g'
5548         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5549 fi
5550
5551 if test X"$CXX_G_OPT" = X"" ; then
5552         CXX_G_OPT='-g'
5553         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5554 fi
5555
5556 echo "$as_me:5556: checking for default loader flags" >&5
5557 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5558 case $DFT_LWR_MODEL in
5559 libtool) LD_MODEL=''   ;;
5560 normal)  LD_MODEL=''   ;;
5561 debug)   LD_MODEL=$CC_G_OPT ;;
5562 profile) LD_MODEL='-pg';;
5563 shared)  LD_MODEL=''   ;;
5564 esac
5565 echo "$as_me:5565: result: $LD_MODEL" >&5
5566 echo "${ECHO_T}$LD_MODEL" >&6
5567
5568 case $DFT_LWR_MODEL in
5569 shared)
5570
5571 echo "$as_me:5571: checking if rpath option should be used" >&5
5572 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5573
5574 # Check whether --enable-rpath or --disable-rpath was given.
5575 if test "${enable_rpath+set}" = set; then
5576   enableval="$enable_rpath"
5577   cf_cv_enable_rpath=$enableval
5578 else
5579   cf_cv_enable_rpath=no
5580 fi;
5581 echo "$as_me:5581: result: $cf_cv_enable_rpath" >&5
5582 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5583
5584 echo "$as_me:5584: checking if shared libraries should be relinked during install" >&5
5585 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5586
5587 # Check whether --enable-relink or --disable-relink was given.
5588 if test "${enable_relink+set}" = set; then
5589   enableval="$enable_relink"
5590   cf_cv_do_relink=$enableval
5591 else
5592   cf_cv_do_relink=yes
5593 fi;
5594 echo "$as_me:5594: result: $cf_cv_do_relink" >&5
5595 echo "${ECHO_T}$cf_cv_do_relink" >&6
5596         ;;
5597 esac
5598
5599 # we will build libraries one-level down.
5600 rel_builddir=..
5601
5602 LD_RPATH_OPT=
5603 echo "$as_me:5603: checking for an rpath option" >&5
5604 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5605 case $cf_cv_system_name in #(vi
5606 irix*) #(vi
5607         if test "$GCC" = yes; then
5608                 LD_RPATH_OPT="-Wl,-rpath,"
5609         else
5610                 LD_RPATH_OPT="-rpath "
5611         fi
5612         ;;
5613 linux*|gnu*|k*bsd*-gnu) #(vi
5614         LD_RPATH_OPT="-Wl,-rpath,"
5615         ;;
5616 openbsd[2-9].*|mirbsd*) #(vi
5617         LD_RPATH_OPT="-Wl,-rpath,"
5618         ;;
5619 dragonfly*|freebsd*) #(vi
5620         LD_RPATH_OPT="-rpath "
5621         ;;
5622 netbsd*) #(vi
5623         LD_RPATH_OPT="-Wl,-rpath,"
5624         ;;
5625 osf*|mls+*) #(vi
5626         LD_RPATH_OPT="-rpath "
5627         ;;
5628 solaris2*) #(vi
5629         LD_RPATH_OPT="-R"
5630         ;;
5631 *)
5632         ;;
5633 esac
5634 echo "$as_me:5634: result: $LD_RPATH_OPT" >&5
5635 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5636
5637 case "x$LD_RPATH_OPT" in #(vi
5638 x-R*)
5639         echo "$as_me:5639: checking if we need a space after rpath option" >&5
5640 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5641         cf_save_LIBS="$LIBS"
5642
5643 cf_add_libs="${LD_RPATH_OPT}$libdir"
5644 # Filter out duplicates - this happens with badly-designed ".pc" files...
5645 for cf_add_1lib in $LIBS
5646 do
5647         for cf_add_2lib in $cf_add_libs
5648         do
5649                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5650                 then
5651                         cf_add_1lib=
5652                         break
5653                 fi
5654         done
5655         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5656 done
5657 LIBS="$cf_add_libs"
5658
5659         cat >conftest.$ac_ext <<_ACEOF
5660 #line 5660 "configure"
5661 #include "confdefs.h"
5662
5663 int
5664 main ()
5665 {
5666
5667   ;
5668   return 0;
5669 }
5670 _ACEOF
5671 rm -f conftest.$ac_objext conftest$ac_exeext
5672 if { (eval echo "$as_me:5672: \"$ac_link\"") >&5
5673   (eval $ac_link) 2>&5
5674   ac_status=$?
5675   echo "$as_me:5675: \$? = $ac_status" >&5
5676   (exit $ac_status); } &&
5677          { ac_try='test -s conftest$ac_exeext'
5678   { (eval echo "$as_me:5678: \"$ac_try\"") >&5
5679   (eval $ac_try) 2>&5
5680   ac_status=$?
5681   echo "$as_me:5681: \$? = $ac_status" >&5
5682   (exit $ac_status); }; }; then
5683   cf_rpath_space=no
5684 else
5685   echo "$as_me: failed program was:" >&5
5686 cat conftest.$ac_ext >&5
5687 cf_rpath_space=yes
5688 fi
5689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5690         LIBS="$cf_save_LIBS"
5691         echo "$as_me:5691: result: $cf_rpath_space" >&5
5692 echo "${ECHO_T}$cf_rpath_space" >&6
5693         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5694         ;;
5695 esac
5696
5697         RM_SHARED_OPTS=
5698         LOCAL_LDFLAGS=
5699         LOCAL_LDFLAGS2=
5700         LD_SHARED_OPTS=
5701         INSTALL_LIB="-m 644"
5702         : ${rel_builddir:=.}
5703
5704         shlibdir=$libdir
5705
5706         MAKE_DLLS="#"
5707
5708         cf_cv_do_symlinks=no
5709         cf_ld_rpath_opt=
5710         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5711
5712         echo "$as_me:5712: checking if release/abi version should be used for shared libs" >&5
5713 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5714
5715 # Check whether --with-shlib-version or --without-shlib-version was given.
5716 if test "${with_shlib_version+set}" = set; then
5717   withval="$with_shlib_version"
5718   test -z "$withval" && withval=auto
5719         case $withval in #(vi
5720         yes) #(vi
5721                 cf_cv_shlib_version=auto
5722                 ;;
5723         rel|abi|auto|no) #(vi
5724                 cf_cv_shlib_version=$withval
5725                 ;;
5726         *)
5727                 { { echo "$as_me:5727: error: option value must be one of: rel, abi, auto or no" >&5
5728 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5729    { (exit 1); exit 1; }; }
5730                 ;;
5731         esac
5732
5733 else
5734   cf_cv_shlib_version=auto
5735 fi;
5736         echo "$as_me:5736: result: $cf_cv_shlib_version" >&5
5737 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5738
5739         cf_cv_rm_so_locs=no
5740         cf_try_cflags=
5741
5742         # Some less-capable ports of gcc support only -fpic
5743         CC_SHARED_OPTS=
5744         if test "$GCC" = yes
5745         then
5746                 echo "$as_me:5746: checking which $CC option to use" >&5
5747 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5748                 cf_save_CFLAGS="$CFLAGS"
5749                 for CC_SHARED_OPTS in -fPIC -fpic ''
5750                 do
5751                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5752                         cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755 #include <stdio.h>
5756 int
5757 main ()
5758 {
5759 int x = 1
5760   ;
5761   return 0;
5762 }
5763 _ACEOF
5764 rm -f conftest.$ac_objext
5765 if { (eval echo "$as_me:5765: \"$ac_compile\"") >&5
5766   (eval $ac_compile) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); } &&
5770          { ac_try='test -s conftest.$ac_objext'
5771   { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); }; }; then
5776   break
5777 else
5778   echo "$as_me: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 fi
5781 rm -f conftest.$ac_objext conftest.$ac_ext
5782                 done
5783                 echo "$as_me:5783: result: $CC_SHARED_OPTS" >&5
5784 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5785                 CFLAGS="$cf_save_CFLAGS"
5786         fi
5787
5788         cf_cv_shlib_version_infix=no
5789
5790         case $cf_cv_system_name in #(vi
5791         aix4.3-9*|aix[5-7]*) #(vi
5792                 if test "$GCC" = yes; then
5793                         CC_SHARED_OPTS=
5794                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5795                 else
5796                         # CC_SHARED_OPTS='-qpic=large -G'
5797                         # perhaps "-bM:SRE -bnoentry -bexpall"
5798                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5799                 fi
5800                 ;;
5801         beos*) #(vi
5802                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5803                 ;;
5804         cygwin*) #(vi
5805                 CC_SHARED_OPTS=
5806                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5807                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5808                 cf_cv_shlib_version=cygdll
5809                 cf_cv_shlib_version_infix=cygdll
5810                 shlibdir=$bindir
5811                 MAKE_DLLS=
5812                 cat >mk_shared_lib.sh <<-CF_EOF
5813                 #!/bin/sh
5814                 SHARED_LIB=\$1
5815                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5816                 shift
5817                 cat <<-EOF
5818                 Linking shared library
5819                 ** SHARED_LIB \$SHARED_LIB
5820                 ** IMPORT_LIB \$IMPORT_LIB
5821 EOF
5822                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5823 CF_EOF
5824                 chmod +x mk_shared_lib.sh
5825                 ;;
5826         msys*) #(vi
5827                 CC_SHARED_OPTS=
5828                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5829                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5830                 cf_cv_shlib_version=msysdll
5831                 cf_cv_shlib_version_infix=msysdll
5832                 shlibdir=$bindir
5833                 MAKE_DLLS=
5834                 cat >mk_shared_lib.sh <<-CF_EOF
5835                 #!/bin/sh
5836                 SHARED_LIB=\$1
5837                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5838                 shift
5839                 cat <<-EOF
5840                 Linking shared library
5841                 ** SHARED_LIB \$SHARED_LIB
5842                 ** IMPORT_LIB \$IMPORT_LIB
5843 EOF
5844                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5845 CF_EOF
5846                 chmod +x mk_shared_lib.sh
5847                 ;;
5848         darwin*) #(vi
5849                 cf_try_cflags="no-cpp-precomp"
5850                 CC_SHARED_OPTS="-dynamic"
5851                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5852                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5853                 cf_cv_shlib_version_infix=yes
5854                 echo "$as_me:5854: checking if ld -search_paths_first works" >&5
5855 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5856 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5857   echo $ECHO_N "(cached) $ECHO_C" >&6
5858 else
5859
5860                         cf_save_LDFLAGS=$LDFLAGS
5861                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5862                         cat >conftest.$ac_ext <<_ACEOF
5863 #line 5863 "configure"
5864 #include "confdefs.h"
5865
5866 int
5867 main ()
5868 {
5869 int i;
5870   ;
5871   return 0;
5872 }
5873 _ACEOF
5874 rm -f conftest.$ac_objext conftest$ac_exeext
5875 if { (eval echo "$as_me:5875: \"$ac_link\"") >&5
5876   (eval $ac_link) 2>&5
5877   ac_status=$?
5878   echo "$as_me:5878: \$? = $ac_status" >&5
5879   (exit $ac_status); } &&
5880          { ac_try='test -s conftest$ac_exeext'
5881   { (eval echo "$as_me:5881: \"$ac_try\"") >&5
5882   (eval $ac_try) 2>&5
5883   ac_status=$?
5884   echo "$as_me:5884: \$? = $ac_status" >&5
5885   (exit $ac_status); }; }; then
5886   cf_cv_ldflags_search_paths_first=yes
5887 else
5888   echo "$as_me: failed program was:" >&5
5889 cat conftest.$ac_ext >&5
5890 cf_cv_ldflags_search_paths_first=no
5891 fi
5892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5893                                 LDFLAGS=$cf_save_LDFLAGS
5894 fi
5895 echo "$as_me:5895: result: $cf_cv_ldflags_search_paths_first" >&5
5896 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5897                 if test $cf_cv_ldflags_search_paths_first = yes; then
5898                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5899                 fi
5900                 ;;
5901         hpux[7-8]*) #(vi
5902                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5903                 if test "$GCC" != yes; then
5904                         CC_SHARED_OPTS='+Z'
5905                 fi
5906                 MK_SHARED_LIB='${LD} -b -o $@'
5907                 INSTALL_LIB="-m 555"
5908                 ;;
5909         hpux*) #(vi
5910                 # (tested with gcc 2.7.2 -- I don't have c89)
5911                 if test "$GCC" = yes; then
5912                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5913                 else
5914                         CC_SHARED_OPTS='+Z'
5915                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5916                 fi
5917                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5918                 # HP-UX shared libraries must be executable, and should be
5919                 # readonly to exploit a quirk in the memory manager.
5920                 INSTALL_LIB="-m 555"
5921                 ;;
5922         interix*)
5923                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5924                 if test "$cf_cv_shlib_version" = rel; then
5925                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5926                 else
5927                         cf_shared_soname='`basename `'
5928                 fi
5929                 CC_SHARED_OPTS=
5930                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5931                 ;;
5932         irix*) #(vi
5933                 if test "$cf_cv_enable_rpath" = yes ; then
5934                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5935                 fi
5936                 # tested with IRIX 5.2 and 'cc'.
5937                 if test "$GCC" != yes; then
5938                         CC_SHARED_OPTS='-KPIC'
5939                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5940                 else
5941                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5942                 fi
5943                 cf_cv_rm_so_locs=yes
5944                 ;;
5945         linux*|gnu*|k*bsd*-gnu) #(vi
5946                 if test "$DFT_LWR_MODEL" = "shared" ; then
5947                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5948                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5949                 fi
5950                 if test "$cf_cv_enable_rpath" = yes ; then
5951                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5952                 fi
5953
5954         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5955         if test "$cf_cv_shlib_version" = rel; then
5956                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5957         else
5958                 cf_cv_shared_soname='`basename $@`'
5959         fi
5960
5961                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5962                 ;;
5963         mingw*) #(vi
5964                 cf_cv_shlib_version=mingw
5965                 cf_cv_shlib_version_infix=mingw
5966                 shlibdir=$bindir
5967                 MAKE_DLLS=
5968                 if test "$DFT_LWR_MODEL" = "shared" ; then
5969                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5970                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5971                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5972                 fi
5973                 CC_SHARED_OPTS=
5974                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5975                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5976                 cat >mk_shared_lib.sh <<-CF_EOF
5977                 #!/bin/sh
5978                 SHARED_LIB=\$1
5979                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5980                 shift
5981                 cat <<-EOF
5982                 Linking shared library
5983                 ** SHARED_LIB \$SHARED_LIB
5984                 ** IMPORT_LIB \$IMPORT_LIB
5985 EOF
5986                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5987 CF_EOF
5988                 chmod +x mk_shared_lib.sh
5989                 ;;
5990         openbsd[2-9].*|mirbsd*) #(vi
5991                 if test "$DFT_LWR_MODEL" = "shared" ; then
5992                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5993                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5994                 fi
5995                 if test "$cf_cv_enable_rpath" = yes ; then
5996                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5997                 fi
5998                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5999
6000         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6001         if test "$cf_cv_shlib_version" = rel; then
6002                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6003         else
6004                 cf_cv_shared_soname='`basename $@`'
6005         fi
6006
6007                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6008                 ;;
6009         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6010                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6011                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6012                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6013                 ;;
6014         dragonfly*|freebsd*) #(vi
6015                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6016                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6017                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6018                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6019                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6020                 fi
6021
6022         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6023         if test "$cf_cv_shlib_version" = rel; then
6024                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6025         else
6026                 cf_cv_shared_soname='`basename $@`'
6027         fi
6028
6029                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
6030                 ;;
6031         netbsd*) #(vi
6032                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6033                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6034                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6035                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6036                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6037                         if test "$cf_cv_shlib_version" = auto; then
6038                         if test -f /usr/libexec/ld.elf_so; then
6039                                 cf_cv_shlib_version=abi
6040                         else
6041                                 cf_cv_shlib_version=rel
6042                         fi
6043                         fi
6044
6045         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6046         if test "$cf_cv_shlib_version" = rel; then
6047                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6048         else
6049                 cf_cv_shared_soname='`basename $@`'
6050         fi
6051
6052                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6053                 else
6054                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6055                 fi
6056                 ;;
6057         osf*|mls+*) #(vi
6058                 # tested with OSF/1 V3.2 and 'cc'
6059                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6060                 # link with shared libs).
6061                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6062                 case $host_os in #(vi
6063                 osf4*)
6064                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6065                         ;;
6066                 esac
6067                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6068                 if test "$DFT_LWR_MODEL" = "shared" ; then
6069                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6070                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6071                 fi
6072                 cf_cv_rm_so_locs=yes
6073                 ;;
6074         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6075                 # tested with osr5.0.5
6076                 if test "$GCC" != yes; then
6077                         CC_SHARED_OPTS='-belf -KPIC'
6078                 fi
6079                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6080                 if test "$cf_cv_enable_rpath" = yes ; then
6081                         # only way is to set LD_RUN_PATH but no switch for it
6082                         RUN_PATH=$libdir
6083                 fi
6084                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6085                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6086                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6087                 ;;
6088         sunos4*) #(vi
6089                 # tested with SunOS 4.1.1 and gcc 2.7.0
6090                 if test "$GCC" != yes; then
6091                         CC_SHARED_OPTS='-KPIC'
6092                 fi
6093                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6094                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6095                 ;;
6096         solaris2*) #(vi
6097                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6098                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6099                 if test "$DFT_LWR_MODEL" = "shared" ; then
6100                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6101                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6102                 fi
6103                 if test "$cf_cv_enable_rpath" = yes ; then
6104                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6105                 fi
6106
6107         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6108         if test "$cf_cv_shlib_version" = rel; then
6109                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6110         else
6111                 cf_cv_shared_soname='`basename $@`'
6112         fi
6113
6114                 if test "$GCC" != yes; then
6115                         cf_save_CFLAGS="$CFLAGS"
6116                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6117                         do
6118                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6119                                 cat >conftest.$ac_ext <<_ACEOF
6120 #line 6120 "configure"
6121 #include "confdefs.h"
6122 #include <stdio.h>
6123 int
6124 main ()
6125 {
6126 printf("Hello\n");
6127   ;
6128   return 0;
6129 }
6130 _ACEOF
6131 rm -f conftest.$ac_objext
6132 if { (eval echo "$as_me:6132: \"$ac_compile\"") >&5
6133   (eval $ac_compile) 2>&5
6134   ac_status=$?
6135   echo "$as_me:6135: \$? = $ac_status" >&5
6136   (exit $ac_status); } &&
6137          { ac_try='test -s conftest.$ac_objext'
6138   { (eval echo "$as_me:6138: \"$ac_try\"") >&5
6139   (eval $ac_try) 2>&5
6140   ac_status=$?
6141   echo "$as_me:6141: \$? = $ac_status" >&5
6142   (exit $ac_status); }; }; then
6143   break
6144 else
6145   echo "$as_me: failed program was:" >&5
6146 cat conftest.$ac_ext >&5
6147 fi
6148 rm -f conftest.$ac_objext conftest.$ac_ext
6149                         done
6150                         CFLAGS="$cf_save_CFLAGS"
6151                         CC_SHARED_OPTS=$cf_shared_opts
6152                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6153                 else
6154                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6155                 fi
6156                 ;;
6157         sysv5uw7*|unix_sv*) #(vi
6158                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6159                 if test "$GCC" != yes; then
6160                         CC_SHARED_OPTS='-KPIC'
6161                 fi
6162                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6163                 ;;
6164         *)
6165                 CC_SHARED_OPTS='unknown'
6166                 MK_SHARED_LIB='echo unknown'
6167                 ;;
6168         esac
6169
6170         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6171         case "$cf_cv_shlib_version" in #(vi
6172         rel|abi)
6173                 case "$MK_SHARED_LIB" in #(vi
6174                 *'-o $@') #(vi
6175                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6176                         ;;
6177                 *)
6178                         { echo "$as_me:6178: WARNING: ignored --with-shlib-version" >&5
6179 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6180                         ;;
6181                 esac
6182                 ;;
6183         esac
6184
6185         if test -n "$cf_try_cflags"
6186         then
6187 cat > conftest.$ac_ext <<EOF
6188 #line 6188 "${as_me:-configure}"
6189 #include <stdio.h>
6190 int main(int argc, char *argv[])
6191 {
6192         printf("hello\n");
6193         return (argv[argc-1] == 0) ;
6194 }
6195 EOF
6196                 cf_save_CFLAGS="$CFLAGS"
6197                 for cf_opt in $cf_try_cflags
6198                 do
6199                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6200                         echo "$as_me:6200: checking if CFLAGS option -$cf_opt works" >&5
6201 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6202                         if { (eval echo "$as_me:6202: \"$ac_compile\"") >&5
6203   (eval $ac_compile) 2>&5
6204   ac_status=$?
6205   echo "$as_me:6205: \$? = $ac_status" >&5
6206   (exit $ac_status); }; then
6207                                 echo "$as_me:6207: result: yes" >&5
6208 echo "${ECHO_T}yes" >&6
6209                                 cf_save_CFLAGS="$CFLAGS"
6210                         else
6211                                 echo "$as_me:6211: result: no" >&5
6212 echo "${ECHO_T}no" >&6
6213                         fi
6214                 done
6215                 CFLAGS="$cf_save_CFLAGS"
6216         fi
6217
6218         # RPATH_LIST is a colon-separated list of directories
6219         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6220         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6221
6222         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6223
6224         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6225
6226 echo "${as_me:-configure}:6226: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6227
6228         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6229
6230 echo "${as_me:-configure}:6230: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6231
6232 if test "$CC_SHARED_OPTS" = "unknown"; then
6233         for model in $cf_list_models; do
6234                 if test "$model" = "shared"; then
6235                         { { echo "$as_me:6235: error: Shared libraries are not supported in this version" >&5
6236 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6237    { (exit 1); exit 1; }; }
6238                 fi
6239         done
6240 fi
6241
6242 # pretend that ncurses==ncursesw==ncursest
6243 echo "$as_me:6243: checking if you want to disable library suffixes" >&5
6244 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6245
6246 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6247 if test "${enable_lib_suffixes+set}" = set; then
6248   enableval="$enable_lib_suffixes"
6249   disable_lib_suffixes=$enableval
6250 else
6251   disable_lib_suffixes=no
6252 fi;
6253 echo "$as_me:6253: result: $disable_lib_suffixes" >&5
6254 echo "${ECHO_T}$disable_lib_suffixes" >&6
6255
6256 ### If we're building with rpath, try to link non-standard libs that way too.
6257 if test "$DFT_LWR_MODEL" = "shared"; then
6258
6259 echo "$as_me:6259: checking if rpath-hack should be disabled" >&5
6260 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6261
6262 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6263 if test "${enable_rpath_hack+set}" = set; then
6264   enableval="$enable_rpath_hack"
6265   test "$enableval" != no && enableval=yes
6266   if test "$enableval" != "yes" ; then
6267     cf_disable_rpath_hack=yes
6268   else
6269     cf_disable_rpath_hack=no
6270   fi
6271 else
6272   enableval=yes
6273   cf_disable_rpath_hack=no
6274
6275 fi;
6276 echo "$as_me:6276: result: $cf_disable_rpath_hack" >&5
6277 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6278 if test "$cf_disable_rpath_hack" = no ; then
6279
6280 echo "$as_me:6280: checking for updated LDFLAGS" >&5
6281 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6282 if test -n "$LD_RPATH_OPT" ; then
6283         echo "$as_me:6283: result: maybe" >&5
6284 echo "${ECHO_T}maybe" >&6
6285
6286         for ac_prog in ldd
6287 do
6288   # Extract the first word of "$ac_prog", so it can be a program name with args.
6289 set dummy $ac_prog; ac_word=$2
6290 echo "$as_me:6290: checking for $ac_word" >&5
6291 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6292 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6293   echo $ECHO_N "(cached) $ECHO_C" >&6
6294 else
6295   if test -n "$cf_ldd_prog"; then
6296   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6297 else
6298   ac_save_IFS=$IFS; IFS=$ac_path_separator
6299 ac_dummy="$PATH"
6300 for ac_dir in $ac_dummy; do
6301   IFS=$ac_save_IFS
6302   test -z "$ac_dir" && ac_dir=.
6303   $as_executable_p "$ac_dir/$ac_word" || continue
6304 ac_cv_prog_cf_ldd_prog="$ac_prog"
6305 echo "$as_me:6305: found $ac_dir/$ac_word" >&5
6306 break
6307 done
6308
6309 fi
6310 fi
6311 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6312 if test -n "$cf_ldd_prog"; then
6313   echo "$as_me:6313: result: $cf_ldd_prog" >&5
6314 echo "${ECHO_T}$cf_ldd_prog" >&6
6315 else
6316   echo "$as_me:6316: result: no" >&5
6317 echo "${ECHO_T}no" >&6
6318 fi
6319
6320   test -n "$cf_ldd_prog" && break
6321 done
6322 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6323
6324         cf_rpath_list="/usr/lib /lib"
6325         if test "$cf_ldd_prog" != no
6326         then
6327                 cf_rpath_oops=
6328
6329 cat >conftest.$ac_ext <<_ACEOF
6330 #line 6330 "configure"
6331 #include "confdefs.h"
6332 #include <stdio.h>
6333 int
6334 main ()
6335 {
6336 printf("Hello");
6337   ;
6338   return 0;
6339 }
6340 _ACEOF
6341 rm -f conftest.$ac_objext conftest$ac_exeext
6342 if { (eval echo "$as_me:6342: \"$ac_link\"") >&5
6343   (eval $ac_link) 2>&5
6344   ac_status=$?
6345   echo "$as_me:6345: \$? = $ac_status" >&5
6346   (exit $ac_status); } &&
6347          { ac_try='test -s conftest$ac_exeext'
6348   { (eval echo "$as_me:6348: \"$ac_try\"") >&5
6349   (eval $ac_try) 2>&5
6350   ac_status=$?
6351   echo "$as_me:6351: \$? = $ac_status" >&5
6352   (exit $ac_status); }; }; then
6353   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6354                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6355 else
6356   echo "$as_me: failed program was:" >&5
6357 cat conftest.$ac_ext >&5
6358 fi
6359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6360
6361                 # If we passed the link-test, but get a "not found" on a given library,
6362                 # this could be due to inept reconfiguration of gcc to make it only
6363                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6364                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6365                 # /usr/local libraries.
6366                 if test -n "$cf_rpath_oops"
6367                 then
6368                         for cf_rpath_src in $cf_rpath_oops
6369                         do
6370                                 for cf_rpath_dir in \
6371                                         /usr/local \
6372                                         /usr/pkg \
6373                                         /opt/sfw
6374                                 do
6375                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6376                                         then
6377                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6378
6379 echo "${as_me:-configure}:6379: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6380
6381                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6382                                                 break
6383                                         fi
6384                                 done
6385                         done
6386                 fi
6387         fi
6388
6389         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6390
6391 echo "${as_me:-configure}:6391: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6392
6393 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6394
6395 echo "${as_me:-configure}:6395: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6396
6397 cf_rpath_dst=
6398 for cf_rpath_src in $LDFLAGS
6399 do
6400         case $cf_rpath_src in #(vi
6401         -L*) #(vi
6402
6403                 # check if this refers to a directory which we will ignore
6404                 cf_rpath_skip=no
6405                 if test -n "$cf_rpath_list"
6406                 then
6407                         for cf_rpath_item in $cf_rpath_list
6408                         do
6409                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6410                                 then
6411                                         cf_rpath_skip=yes
6412                                         break
6413                                 fi
6414                         done
6415                 fi
6416
6417                 if test "$cf_rpath_skip" = no
6418                 then
6419                         # transform the option
6420                         if test "$LD_RPATH_OPT" = "-R " ; then
6421                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6422                         else
6423                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6424                         fi
6425
6426                         # if we have not already added this, add it now
6427                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6428                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6429                         then
6430                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6431
6432 echo "${as_me:-configure}:6432: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6433
6434                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6435                         fi
6436                 fi
6437                 ;;
6438         esac
6439         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6440 done
6441 LDFLAGS=$cf_rpath_dst
6442
6443 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6444
6445 echo "${as_me:-configure}:6445: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6446
6447 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6448
6449 echo "${as_me:-configure}:6449: testing ...checking LIBS $LIBS ..." 1>&5
6450
6451 cf_rpath_dst=
6452 for cf_rpath_src in $LIBS
6453 do
6454         case $cf_rpath_src in #(vi
6455         -L*) #(vi
6456
6457                 # check if this refers to a directory which we will ignore
6458                 cf_rpath_skip=no
6459                 if test -n "$cf_rpath_list"
6460                 then
6461                         for cf_rpath_item in $cf_rpath_list
6462                         do
6463                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6464                                 then
6465                                         cf_rpath_skip=yes
6466                                         break
6467                                 fi
6468                         done
6469                 fi
6470
6471                 if test "$cf_rpath_skip" = no
6472                 then
6473                         # transform the option
6474                         if test "$LD_RPATH_OPT" = "-R " ; then
6475                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6476                         else
6477                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6478                         fi
6479
6480                         # if we have not already added this, add it now
6481                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6482                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6483                         then
6484                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6485
6486 echo "${as_me:-configure}:6486: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6487
6488                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6489                         fi
6490                 fi
6491                 ;;
6492         esac
6493         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6494 done
6495 LIBS=$cf_rpath_dst
6496
6497 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6498
6499 echo "${as_me:-configure}:6499: testing ...checked LIBS $LIBS ..." 1>&5
6500
6501         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6502
6503 echo "${as_me:-configure}:6503: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6504
6505 else
6506         echo "$as_me:6506: result: no" >&5
6507 echo "${ECHO_T}no" >&6
6508 fi
6509
6510 fi
6511
6512 fi
6513
6514 ###############################################################################
6515
6516 ###     use option --disable-overwrite to leave out the link to -lcurses
6517 echo "$as_me:6517: checking if you wish to install ncurses overwriting curses" >&5
6518 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6519
6520 # Check whether --enable-overwrite or --disable-overwrite was given.
6521 if test "${enable_overwrite+set}" = set; then
6522   enableval="$enable_overwrite"
6523   with_overwrite=$enableval
6524 else
6525   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6526 fi;
6527 echo "$as_me:6527: result: $with_overwrite" >&5
6528 echo "${ECHO_T}$with_overwrite" >&6
6529
6530 echo "$as_me:6530: checking if external terminfo-database is used" >&5
6531 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6532
6533 # Check whether --enable-database or --disable-database was given.
6534 if test "${enable_database+set}" = set; then
6535   enableval="$enable_database"
6536   use_database=$enableval
6537 else
6538   use_database=yes
6539 fi;
6540 echo "$as_me:6540: result: $use_database" >&5
6541 echo "${ECHO_T}$use_database" >&6
6542
6543 case $host_os in #(vi
6544 os2*) #(vi
6545         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6546         ;;
6547 *) #(vi
6548         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6549         ;;
6550 esac
6551
6552 NCURSES_USE_DATABASE=0
6553 if test "$use_database" != no ; then
6554         NCURSES_USE_DATABASE=1
6555
6556         echo "$as_me:6556: checking which terminfo source-file will be installed" >&5
6557 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6558
6559 # Check whether --with-database or --without-database was given.
6560 if test "${with_database+set}" = set; then
6561   withval="$with_database"
6562   TERMINFO_SRC=$withval
6563 fi;
6564         echo "$as_me:6564: result: $TERMINFO_SRC" >&5
6565 echo "${ECHO_T}$TERMINFO_SRC" >&6
6566
6567         echo "$as_me:6567: checking whether to use hashed database instead of directory/tree" >&5
6568 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6569
6570 # Check whether --with-hashed-db or --without-hashed-db was given.
6571 if test "${with_hashed_db+set}" = set; then
6572   withval="$with_hashed_db"
6573
6574 else
6575   with_hashed_db=no
6576 fi;
6577         echo "$as_me:6577: result: $with_hashed_db" >&5
6578 echo "${ECHO_T}$with_hashed_db" >&6
6579 else
6580         with_hashed_db=no
6581 fi
6582
6583 echo "$as_me:6583: checking for list of fallback descriptions" >&5
6584 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6585
6586 # Check whether --with-fallbacks or --without-fallbacks was given.
6587 if test "${with_fallbacks+set}" = set; then
6588   withval="$with_fallbacks"
6589   with_fallback=$withval
6590 else
6591   with_fallback=
6592 fi;
6593 echo "$as_me:6593: result: $with_fallback" >&5
6594 echo "${ECHO_T}$with_fallback" >&6
6595 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6596
6597 echo "$as_me:6597: checking if you want modern xterm or antique" >&5
6598 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6599
6600 # Check whether --with-xterm-new or --without-xterm-new was given.
6601 if test "${with_xterm_new+set}" = set; then
6602   withval="$with_xterm_new"
6603   with_xterm_new=$withval
6604 else
6605   with_xterm_new=yes
6606 fi;
6607 case $with_xterm_new in
6608 no)     with_xterm_new=xterm-old;;
6609 *)      with_xterm_new=xterm-new;;
6610 esac
6611 echo "$as_me:6611: result: $with_xterm_new" >&5
6612 echo "${ECHO_T}$with_xterm_new" >&6
6613 WHICH_XTERM=$with_xterm_new
6614
6615 echo "$as_me:6615: checking if xterm backspace sends BS or DEL" >&5
6616 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6617
6618 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6619 if test "${with_xterm_kbs+set}" = set; then
6620   withval="$with_xterm_kbs"
6621   with_xterm_kbs=$withval
6622 else
6623   with_xterm_kbs=BS
6624 fi;
6625 case x$with_xterm_kbs in
6626 xyes|xno|xBS|xbs|x8)
6627         with_xterm_kbs=BS
6628         ;;
6629 xDEL|xdel|x127)
6630         with_xterm_kbs=DEL
6631         ;;
6632 *)
6633         with_xterm_kbs=$withval
6634         ;;
6635 esac
6636 echo "$as_me:6636: result: $with_xterm_kbs" >&5
6637 echo "${ECHO_T}$with_xterm_kbs" >&6
6638 XTERM_KBS=$with_xterm_kbs
6639
6640 MAKE_TERMINFO=
6641 if test "$use_database" = no ; then
6642         TERMINFO="${datadir}/terminfo"
6643         MAKE_TERMINFO="#"
6644 else
6645
6646 echo "$as_me:6646: checking for list of terminfo directories" >&5
6647 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6648
6649 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6650 if test "${with_terminfo_dirs+set}" = set; then
6651   withval="$with_terminfo_dirs"
6652
6653 else
6654   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6655 fi;
6656 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6657 cf_dst_path=
6658 for cf_src_path in $withval
6659 do
6660
6661 if test "x$prefix" != xNONE; then
6662   cf_path_syntax="$prefix"
6663 else
6664   cf_path_syntax="$ac_default_prefix"
6665 fi
6666
6667 case ".$cf_src_path" in #(vi
6668 .\$\(*\)*|.\'*\'*) #(vi
6669   ;;
6670 ..|./*|.\\*) #(vi
6671   ;;
6672 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6673   ;;
6674 .\${*prefix}*|.\${*dir}*) #(vi
6675   eval cf_src_path="$cf_src_path"
6676   case ".$cf_src_path" in #(vi
6677   .NONE/*)
6678     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6679     ;;
6680   esac
6681   ;; #(vi
6682 .no|.NONE/*)
6683   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6684   ;;
6685 *)
6686   { { echo "$as_me:6686: error: expected a pathname, not \"$cf_src_path\"" >&5
6687 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6688    { (exit 1); exit 1; }; }
6689   ;;
6690 esac
6691
6692   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6693   cf_dst_path="${cf_dst_path}${cf_src_path}"
6694 done
6695 IFS="$ac_save_ifs"
6696
6697 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6698 # so we have to check/work around.  We do prefer the result of "eval"...
6699 eval cf_dst_eval="$cf_dst_path"
6700 case "x$cf_dst_eval" in #(vi
6701 xNONE*) #(vi
6702         TERMINFO_DIRS=$cf_dst_path
6703         ;;
6704 *)
6705         TERMINFO_DIRS="$cf_dst_eval"
6706         ;;
6707 esac
6708
6709 echo "$as_me:6709: result: $TERMINFO_DIRS" >&5
6710 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6711 test -n "$TERMINFO_DIRS" &&
6712 cat >>confdefs.h <<EOF
6713 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6714 EOF
6715
6716 echo "$as_me:6716: checking for default terminfo directory" >&5
6717 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6718
6719 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6720 if test "${with_default_terminfo_dir+set}" = set; then
6721   withval="$with_default_terminfo_dir"
6722
6723 else
6724   withval="${TERMINFO:-${datadir}/terminfo}"
6725 fi; if test -n "${datadir}/terminfo" ; then
6726
6727 if test "x$prefix" != xNONE; then
6728   cf_path_syntax="$prefix"
6729 else
6730   cf_path_syntax="$ac_default_prefix"
6731 fi
6732
6733 case ".$withval" in #(vi
6734 .\$\(*\)*|.\'*\'*) #(vi
6735   ;;
6736 ..|./*|.\\*) #(vi
6737   ;;
6738 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6739   ;;
6740 .\${*prefix}*|.\${*dir}*) #(vi
6741   eval withval="$withval"
6742   case ".$withval" in #(vi
6743   .NONE/*)
6744     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6745     ;;
6746   esac
6747   ;; #(vi
6748 .no|.NONE/*)
6749   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6750   ;;
6751 *)
6752   { { echo "$as_me:6752: error: expected a pathname, not \"$withval\"" >&5
6753 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6754    { (exit 1); exit 1; }; }
6755   ;;
6756 esac
6757
6758 fi
6759 eval TERMINFO="$withval"
6760
6761 echo "$as_me:6761: result: $TERMINFO" >&5
6762 echo "${ECHO_T}$TERMINFO" >&6
6763
6764 cat >>confdefs.h <<EOF
6765 #define TERMINFO "$TERMINFO"
6766 EOF
6767
6768 fi
6769
6770 ###     use option --disable-big-core to make tic run on small machines
6771 ###     We need 4Mb, check if we can allocate 50% more than that.
6772 echo "$as_me:6772: checking if big-core option selected" >&5
6773 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6774
6775 # Check whether --enable-big-core or --disable-big-core was given.
6776 if test "${enable_big_core+set}" = set; then
6777   enableval="$enable_big_core"
6778   with_big_core=$enableval
6779 else
6780   if test "$cross_compiling" = yes; then
6781   with_big_core=no
6782 else
6783   cat >conftest.$ac_ext <<_ACEOF
6784 #line 6784 "configure"
6785 #include "confdefs.h"
6786
6787 #include <stdlib.h>
6788 #include <string.h>
6789 int main() {
6790         unsigned long n = 6000000L;
6791         char *s = malloc(n);
6792         if (s != 0)
6793                 s[0] = s[n-1] = 0;
6794         ${cf_cv_main_return:-return}(s == 0);
6795 }
6796 _ACEOF
6797 rm -f conftest$ac_exeext
6798 if { (eval echo "$as_me:6798: \"$ac_link\"") >&5
6799   (eval $ac_link) 2>&5
6800   ac_status=$?
6801   echo "$as_me:6801: \$? = $ac_status" >&5
6802   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6803   { (eval echo "$as_me:6803: \"$ac_try\"") >&5
6804   (eval $ac_try) 2>&5
6805   ac_status=$?
6806   echo "$as_me:6806: \$? = $ac_status" >&5
6807   (exit $ac_status); }; }; then
6808   with_big_core=yes
6809 else
6810   echo "$as_me: program exited with status $ac_status" >&5
6811 echo "$as_me: failed program was:" >&5
6812 cat conftest.$ac_ext >&5
6813 with_big_core=no
6814 fi
6815 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6816 fi
6817 fi;
6818 echo "$as_me:6818: result: $with_big_core" >&5
6819 echo "${ECHO_T}$with_big_core" >&6
6820 test "x$with_big_core" = "xyes" &&
6821 cat >>confdefs.h <<\EOF
6822 #define HAVE_BIG_CORE 1
6823 EOF
6824
6825 ### ISO C only guarantees 512-char strings, we have tables which load faster
6826 ### when constructed using "big" strings.  More than the C compiler, the awk
6827 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6828 echo "$as_me:6828: checking if big-strings option selected" >&5
6829 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6830
6831 # Check whether --enable-big-strings or --disable-big-strings was given.
6832 if test "${enable_big_strings+set}" = set; then
6833   enableval="$enable_big_strings"
6834   with_big_strings=$enableval
6835 else
6836
6837         case x$AWK in #(vi
6838         x)
6839                 eval with_big_strings=no
6840                 ;;
6841         *) #(vi
6842                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6843                         | $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
6844                         eval with_big_strings=yes
6845                 else
6846                         eval with_big_strings=no
6847                 fi
6848                 ;;
6849         esac
6850
6851 fi;
6852 echo "$as_me:6852: result: $with_big_strings" >&5
6853 echo "${ECHO_T}$with_big_strings" >&6
6854
6855 USE_BIG_STRINGS=0
6856 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6857
6858 ###     use option --enable-termcap to compile in the termcap fallback support
6859 echo "$as_me:6859: checking if you want termcap-fallback support" >&5
6860 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6861
6862 # Check whether --enable-termcap or --disable-termcap was given.
6863 if test "${enable_termcap+set}" = set; then
6864   enableval="$enable_termcap"
6865   with_termcap=$enableval
6866 else
6867   with_termcap=no
6868 fi;
6869 echo "$as_me:6869: result: $with_termcap" >&5
6870 echo "${ECHO_T}$with_termcap" >&6
6871
6872 NCURSES_USE_TERMCAP=0
6873 if test "x$with_termcap" != "xyes" ; then
6874         if test "$use_database" = no ; then
6875                 if test -z "$with_fallback" ; then
6876                         { { echo "$as_me:6876: error: You have disabled the database w/o specifying fallbacks" >&5
6877 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6878    { (exit 1); exit 1; }; }
6879                 fi
6880         fi
6881
6882 cat >>confdefs.h <<\EOF
6883 #define PURE_TERMINFO 1
6884 EOF
6885
6886 else
6887
6888         if test "$with_ticlib" != no ; then
6889                 { { echo "$as_me:6889: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6890 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6891    { (exit 1); exit 1; }; }
6892         fi
6893
6894         NCURSES_USE_TERMCAP=1
6895         echo "$as_me:6895: checking for list of termcap files" >&5
6896 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6897
6898 # Check whether --with-termpath or --without-termpath was given.
6899 if test "${with_termpath+set}" = set; then
6900   withval="$with_termpath"
6901
6902 else
6903   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6904 fi;
6905 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6906 cf_dst_path=
6907 for cf_src_path in $withval
6908 do
6909
6910 if test "x$prefix" != xNONE; then
6911   cf_path_syntax="$prefix"
6912 else
6913   cf_path_syntax="$ac_default_prefix"
6914 fi
6915
6916 case ".$cf_src_path" in #(vi
6917 .\$\(*\)*|.\'*\'*) #(vi
6918   ;;
6919 ..|./*|.\\*) #(vi
6920   ;;
6921 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6922   ;;
6923 .\${*prefix}*|.\${*dir}*) #(vi
6924   eval cf_src_path="$cf_src_path"
6925   case ".$cf_src_path" in #(vi
6926   .NONE/*)
6927     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6928     ;;
6929   esac
6930   ;; #(vi
6931 .no|.NONE/*)
6932   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6933   ;;
6934 *)
6935   { { echo "$as_me:6935: error: expected a pathname, not \"$cf_src_path\"" >&5
6936 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6937    { (exit 1); exit 1; }; }
6938   ;;
6939 esac
6940
6941   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6942   cf_dst_path="${cf_dst_path}${cf_src_path}"
6943 done
6944 IFS="$ac_save_ifs"
6945
6946 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6947 # so we have to check/work around.  We do prefer the result of "eval"...
6948 eval cf_dst_eval="$cf_dst_path"
6949 case "x$cf_dst_eval" in #(vi
6950 xNONE*) #(vi
6951         TERMPATH=$cf_dst_path
6952         ;;
6953 *)
6954         TERMPATH="$cf_dst_eval"
6955         ;;
6956 esac
6957
6958         echo "$as_me:6958: result: $TERMPATH" >&5
6959 echo "${ECHO_T}$TERMPATH" >&6
6960         test -n "$TERMPATH" &&
6961 cat >>confdefs.h <<EOF
6962 #define TERMPATH "$TERMPATH"
6963 EOF
6964
6965         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6966         echo "$as_me:6966: checking if fast termcap-loader is needed" >&5
6967 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6968
6969 # Check whether --enable-getcap or --disable-getcap was given.
6970 if test "${enable_getcap+set}" = set; then
6971   enableval="$enable_getcap"
6972   with_getcap=$enableval
6973 else
6974   with_getcap=no
6975 fi;
6976         echo "$as_me:6976: result: $with_getcap" >&5
6977 echo "${ECHO_T}$with_getcap" >&6
6978         test "x$with_getcap" = "xyes" &&
6979 cat >>confdefs.h <<\EOF
6980 #define USE_GETCAP 1
6981 EOF
6982
6983         echo "$as_me:6983: checking if translated termcaps will be cached in ~/.terminfo" >&5
6984 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6985
6986 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6987 if test "${enable_getcap_cache+set}" = set; then
6988   enableval="$enable_getcap_cache"
6989   with_getcap_cache=$enableval
6990 else
6991   with_getcap_cache=no
6992 fi;
6993         echo "$as_me:6993: result: $with_getcap_cache" >&5
6994 echo "${ECHO_T}$with_getcap_cache" >&6
6995         test "x$with_getcap_cache" = "xyes" &&
6996 cat >>confdefs.h <<\EOF
6997 #define USE_GETCAP_CACHE 1
6998 EOF
6999
7000 fi
7001
7002 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7003 echo "$as_me:7003: checking if ~/.terminfo is wanted" >&5
7004 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7005
7006 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7007 if test "${enable_home_terminfo+set}" = set; then
7008   enableval="$enable_home_terminfo"
7009   with_home_terminfo=$enableval
7010 else
7011   with_home_terminfo=yes
7012 fi;
7013 echo "$as_me:7013: result: $with_home_terminfo" >&5
7014 echo "${ECHO_T}$with_home_terminfo" >&6
7015 test "x$with_home_terminfo" = "xyes" &&
7016 cat >>confdefs.h <<\EOF
7017 #define USE_HOME_TERMINFO 1
7018 EOF
7019
7020 echo "$as_me:7020: checking if you want to use restricted environment when running as root" >&5
7021 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7022
7023 # Check whether --enable-root-environ or --disable-root-environ was given.
7024 if test "${enable_root_environ+set}" = set; then
7025   enableval="$enable_root_environ"
7026   with_root_environ=$enableval
7027 else
7028   with_root_environ=yes
7029 fi;
7030 echo "$as_me:7030: result: $with_root_environ" >&5
7031 echo "${ECHO_T}$with_root_environ" >&6
7032 test "x$with_root_environ" = xyes &&
7033 cat >>confdefs.h <<\EOF
7034 #define USE_ROOT_ENVIRON 1
7035 EOF
7036
7037 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7038 ###   to reduce storage requirements for the terminfo database.
7039
7040 for ac_func in \
7041         remove \
7042         unlink
7043 do
7044 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7045 echo "$as_me:7045: checking for $ac_func" >&5
7046 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7047 if eval "test \"\${$as_ac_var+set}\" = set"; then
7048   echo $ECHO_N "(cached) $ECHO_C" >&6
7049 else
7050   cat >conftest.$ac_ext <<_ACEOF
7051 #line 7051 "configure"
7052 #include "confdefs.h"
7053 /* System header to define __stub macros and hopefully few prototypes,
7054     which can conflict with char $ac_func (); below.  */
7055 #include <assert.h>
7056 /* Override any gcc2 internal prototype to avoid an error.  */
7057 #ifdef __cplusplus
7058 extern "C"
7059 #endif
7060 /* We use char because int might match the return type of a gcc2
7061    builtin and then its argument prototype would still apply.  */
7062 char $ac_func ();
7063 char (*f) ();
7064
7065 int
7066 main ()
7067 {
7068 /* The GNU C library defines this for functions which it implements
7069     to always fail with ENOSYS.  Some functions are actually named
7070     something starting with __ and the normal name is an alias.  */
7071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7072 choke me
7073 #else
7074 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7075 #endif
7076
7077   ;
7078   return 0;
7079 }
7080 _ACEOF
7081 rm -f conftest.$ac_objext conftest$ac_exeext
7082 if { (eval echo "$as_me:7082: \"$ac_link\"") >&5
7083   (eval $ac_link) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); } &&
7087          { ac_try='test -s conftest$ac_exeext'
7088   { (eval echo "$as_me:7088: \"$ac_try\"") >&5
7089   (eval $ac_try) 2>&5
7090   ac_status=$?
7091   echo "$as_me:7091: \$? = $ac_status" >&5
7092   (exit $ac_status); }; }; then
7093   eval "$as_ac_var=yes"
7094 else
7095   echo "$as_me: failed program was:" >&5
7096 cat conftest.$ac_ext >&5
7097 eval "$as_ac_var=no"
7098 fi
7099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7100 fi
7101 echo "$as_me:7101: result: `eval echo '${'$as_ac_var'}'`" >&5
7102 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7103 if test `eval echo '${'$as_ac_var'}'` = yes; then
7104   cat >>confdefs.h <<EOF
7105 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7106 EOF
7107
7108 fi
7109 done
7110
7111 if test "$cross_compiling" = yes ; then
7112
7113 for ac_func in \
7114                 link \
7115                 symlink
7116 do
7117 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7118 echo "$as_me:7118: checking for $ac_func" >&5
7119 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7120 if eval "test \"\${$as_ac_var+set}\" = set"; then
7121   echo $ECHO_N "(cached) $ECHO_C" >&6
7122 else
7123   cat >conftest.$ac_ext <<_ACEOF
7124 #line 7124 "configure"
7125 #include "confdefs.h"
7126 /* System header to define __stub macros and hopefully few prototypes,
7127     which can conflict with char $ac_func (); below.  */
7128 #include <assert.h>
7129 /* Override any gcc2 internal prototype to avoid an error.  */
7130 #ifdef __cplusplus
7131 extern "C"
7132 #endif
7133 /* We use char because int might match the return type of a gcc2
7134    builtin and then its argument prototype would still apply.  */
7135 char $ac_func ();
7136 char (*f) ();
7137
7138 int
7139 main ()
7140 {
7141 /* The GNU C library defines this for functions which it implements
7142     to always fail with ENOSYS.  Some functions are actually named
7143     something starting with __ and the normal name is an alias.  */
7144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7145 choke me
7146 #else
7147 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7148 #endif
7149
7150   ;
7151   return 0;
7152 }
7153 _ACEOF
7154 rm -f conftest.$ac_objext conftest$ac_exeext
7155 if { (eval echo "$as_me:7155: \"$ac_link\"") >&5
7156   (eval $ac_link) 2>&5
7157   ac_status=$?
7158   echo "$as_me:7158: \$? = $ac_status" >&5
7159   (exit $ac_status); } &&
7160          { ac_try='test -s conftest$ac_exeext'
7161   { (eval echo "$as_me:7161: \"$ac_try\"") >&5
7162   (eval $ac_try) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); }; }; then
7166   eval "$as_ac_var=yes"
7167 else
7168   echo "$as_me: failed program was:" >&5
7169 cat conftest.$ac_ext >&5
7170 eval "$as_ac_var=no"
7171 fi
7172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7173 fi
7174 echo "$as_me:7174: result: `eval echo '${'$as_ac_var'}'`" >&5
7175 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7176 if test `eval echo '${'$as_ac_var'}'` = yes; then
7177   cat >>confdefs.h <<EOF
7178 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7179 EOF
7180
7181 fi
7182 done
7183
7184 else
7185         echo "$as_me:7185: checking if link/symlink functions work" >&5
7186 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7187 if test "${cf_cv_link_funcs+set}" = set; then
7188   echo $ECHO_N "(cached) $ECHO_C" >&6
7189 else
7190
7191                 cf_cv_link_funcs=
7192                 for cf_func in link symlink ; do
7193                         if test "$cross_compiling" = yes; then
7194
7195                         eval 'ac_cv_func_'$cf_func'=error'
7196 else
7197   cat >conftest.$ac_ext <<_ACEOF
7198 #line 7198 "configure"
7199 #include "confdefs.h"
7200
7201 #include <sys/types.h>
7202 #include <sys/stat.h>
7203 #ifdef HAVE_UNISTD_H
7204 #include <unistd.h>
7205 #endif
7206 int main()
7207 {
7208         int fail = 0;
7209         char *src = "config.log";
7210         char *dst = "conftest.chk";
7211         struct stat src_sb;
7212         struct stat dst_sb;
7213
7214         stat(src, &src_sb);
7215         fail = ($cf_func("config.log", "conftest.chk") < 0)
7216             || (stat(dst, &dst_sb) < 0)
7217             || (dst_sb.st_mtime != src_sb.st_mtime);
7218 #ifdef HAVE_UNLINK
7219         unlink(dst);
7220 #else
7221         remove(dst);
7222 #endif
7223         ${cf_cv_main_return:-return} (fail);
7224 }
7225
7226 _ACEOF
7227 rm -f conftest$ac_exeext
7228 if { (eval echo "$as_me:7228: \"$ac_link\"") >&5
7229   (eval $ac_link) 2>&5
7230   ac_status=$?
7231   echo "$as_me:7231: \$? = $ac_status" >&5
7232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7233   { (eval echo "$as_me:7233: \"$ac_try\"") >&5
7234   (eval $ac_try) 2>&5
7235   ac_status=$?
7236   echo "$as_me:7236: \$? = $ac_status" >&5
7237   (exit $ac_status); }; }; then
7238
7239                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7240                         eval 'ac_cv_func_'$cf_func'=yes'
7241 else
7242   echo "$as_me: program exited with status $ac_status" >&5
7243 echo "$as_me: failed program was:" >&5
7244 cat conftest.$ac_ext >&5
7245
7246                         eval 'ac_cv_func_'$cf_func'=no'
7247 fi
7248 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7249 fi
7250                 done
7251                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7252
7253 fi
7254 echo "$as_me:7254: result: $cf_cv_link_funcs" >&5
7255 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7256         test "$ac_cv_func_link"    = yes &&
7257 cat >>confdefs.h <<\EOF
7258 #define HAVE_LINK 1
7259 EOF
7260
7261         test "$ac_cv_func_symlink" = yes &&
7262 cat >>confdefs.h <<\EOF
7263 #define HAVE_SYMLINK 1
7264 EOF
7265
7266 fi
7267
7268 with_links=no
7269 with_symlinks=no
7270
7271 # soft links (symbolic links) are useful for some systems where hard links do
7272 # not work, or to make it simpler to copy terminfo trees around.
7273 if test "x$ac_cv_func_symlink" = xyes ; then
7274     echo "$as_me:7274: checking if tic should use symbolic links" >&5
7275 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7276
7277 # Check whether --enable-symlinks or --disable-symlinks was given.
7278 if test "${enable_symlinks+set}" = set; then
7279   enableval="$enable_symlinks"
7280   with_symlinks=$enableval
7281 else
7282   with_symlinks=no
7283 fi;
7284     echo "$as_me:7284: result: $with_symlinks" >&5
7285 echo "${ECHO_T}$with_symlinks" >&6
7286 fi
7287
7288 # If we have hard links and did not choose to use soft links instead, there is
7289 # no reason to make this choice optional - use the hard links.
7290 if test "$with_symlinks" = no ; then
7291     echo "$as_me:7291: checking if tic should use hard links" >&5
7292 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7293     if test "x$ac_cv_func_link" = xyes ; then
7294         with_links=yes
7295     else
7296         with_links=no
7297     fi
7298     echo "$as_me:7298: result: $with_links" >&5
7299 echo "${ECHO_T}$with_links" >&6
7300 fi
7301
7302 test "x$with_links" = xyes &&
7303 cat >>confdefs.h <<\EOF
7304 #define USE_LINKS 1
7305 EOF
7306
7307 test "x$with_symlinks" = xyes &&
7308 cat >>confdefs.h <<\EOF
7309 #define USE_SYMLINKS 1
7310 EOF
7311
7312 ###   use option --enable-broken-linker to force on use of broken-linker support
7313 echo "$as_me:7313: checking if you want broken-linker support code" >&5
7314 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7315
7316 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7317 if test "${enable_broken_linker+set}" = set; then
7318   enableval="$enable_broken_linker"
7319   with_broken_linker=$enableval
7320 else
7321   with_broken_linker=${BROKEN_LINKER:-no}
7322 fi;
7323 echo "$as_me:7323: result: $with_broken_linker" >&5
7324 echo "${ECHO_T}$with_broken_linker" >&6
7325
7326 BROKEN_LINKER=0
7327 if test "x$with_broken_linker" = xyes ; then
7328
7329 cat >>confdefs.h <<\EOF
7330 #define BROKEN_LINKER 1
7331 EOF
7332
7333         BROKEN_LINKER=1
7334 elif test "$DFT_LWR_MODEL" = shared ; then
7335         case $cf_cv_system_name in #(vi
7336         cygwin*)
7337
7338 cat >>confdefs.h <<\EOF
7339 #define BROKEN_LINKER 1
7340 EOF
7341
7342                 BROKEN_LINKER=1
7343                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7344
7345 echo "${as_me:-configure}:7345: testing cygwin linker is broken anyway ..." 1>&5
7346
7347                 ;;
7348         esac
7349 fi
7350
7351 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7352 echo "$as_me:7352: checking if tputs should process BSD-style prefix padding" >&5
7353 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7354
7355 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7356 if test "${enable_bsdpad+set}" = set; then
7357   enableval="$enable_bsdpad"
7358   with_bsdpad=$enableval
7359 else
7360   with_bsdpad=no
7361 fi;
7362 echo "$as_me:7362: result: $with_bsdpad" >&5
7363 echo "${ECHO_T}$with_bsdpad" >&6
7364 test "x$with_bsdpad" = xyes &&
7365 cat >>confdefs.h <<\EOF
7366 #define BSD_TPUTS 1
7367 EOF
7368
7369 ###   use option --enable-widec to turn on use of wide-character support
7370 NCURSES_CH_T=chtype
7371 NCURSES_LIBUTF8=0
7372
7373 NEED_WCHAR_H=0
7374 NCURSES_MBSTATE_T=0
7375 NCURSES_WCHAR_T=0
7376 NCURSES_WINT_T=0
7377
7378 # Check to define _XOPEN_SOURCE "automatically"
7379
7380 cf_XOPEN_SOURCE=500
7381 cf_POSIX_C_SOURCE=199506L
7382 cf_xopen_source=
7383
7384 case $host_os in #(vi
7385 aix[4-7]*) #(vi
7386         cf_xopen_source="-D_ALL_SOURCE"
7387         ;;
7388 cygwin|msys) #(vi
7389         cf_XOPEN_SOURCE=600
7390         ;;
7391 darwin[0-8].*) #(vi
7392         cf_xopen_source="-D_APPLE_C_SOURCE"
7393         ;;
7394 darwin*) #(vi
7395         cf_xopen_source="-D_DARWIN_C_SOURCE"
7396         cf_XOPEN_SOURCE=
7397         ;;
7398 freebsd*|dragonfly*) #(vi
7399         # 5.x headers associate
7400         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7401         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7402         cf_POSIX_C_SOURCE=200112L
7403         cf_XOPEN_SOURCE=600
7404         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7405         ;;
7406 hpux11*) #(vi
7407         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7408         ;;
7409 hpux*) #(vi
7410         cf_xopen_source="-D_HPUX_SOURCE"
7411         ;;
7412 irix[56].*) #(vi
7413         cf_xopen_source="-D_SGI_SOURCE"
7414         cf_XOPEN_SOURCE=
7415         ;;
7416 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7417
7418 echo "$as_me:7418: checking if we must define _GNU_SOURCE" >&5
7419 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7420 if test "${cf_cv_gnu_source+set}" = set; then
7421   echo $ECHO_N "(cached) $ECHO_C" >&6
7422 else
7423
7424 cat >conftest.$ac_ext <<_ACEOF
7425 #line 7425 "configure"
7426 #include "confdefs.h"
7427 #include <sys/types.h>
7428 int
7429 main ()
7430 {
7431
7432 #ifndef _XOPEN_SOURCE
7433 make an error
7434 #endif
7435   ;
7436   return 0;
7437 }
7438 _ACEOF
7439 rm -f conftest.$ac_objext
7440 if { (eval echo "$as_me:7440: \"$ac_compile\"") >&5
7441   (eval $ac_compile) 2>&5
7442   ac_status=$?
7443   echo "$as_me:7443: \$? = $ac_status" >&5
7444   (exit $ac_status); } &&
7445          { ac_try='test -s conftest.$ac_objext'
7446   { (eval echo "$as_me:7446: \"$ac_try\"") >&5
7447   (eval $ac_try) 2>&5
7448   ac_status=$?
7449   echo "$as_me:7449: \$? = $ac_status" >&5
7450   (exit $ac_status); }; }; then
7451   cf_cv_gnu_source=no
7452 else
7453   echo "$as_me: failed program was:" >&5
7454 cat conftest.$ac_ext >&5
7455 cf_save="$CPPFLAGS"
7456          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7457          cat >conftest.$ac_ext <<_ACEOF
7458 #line 7458 "configure"
7459 #include "confdefs.h"
7460 #include <sys/types.h>
7461 int
7462 main ()
7463 {
7464
7465 #ifdef _XOPEN_SOURCE
7466 make an error
7467 #endif
7468   ;
7469   return 0;
7470 }
7471 _ACEOF
7472 rm -f conftest.$ac_objext
7473 if { (eval echo "$as_me:7473: \"$ac_compile\"") >&5
7474   (eval $ac_compile) 2>&5
7475   ac_status=$?
7476   echo "$as_me:7476: \$? = $ac_status" >&5
7477   (exit $ac_status); } &&
7478          { ac_try='test -s conftest.$ac_objext'
7479   { (eval echo "$as_me:7479: \"$ac_try\"") >&5
7480   (eval $ac_try) 2>&5
7481   ac_status=$?
7482   echo "$as_me:7482: \$? = $ac_status" >&5
7483   (exit $ac_status); }; }; then
7484   cf_cv_gnu_source=no
7485 else
7486   echo "$as_me: failed program was:" >&5
7487 cat conftest.$ac_ext >&5
7488 cf_cv_gnu_source=yes
7489 fi
7490 rm -f conftest.$ac_objext conftest.$ac_ext
7491         CPPFLAGS="$cf_save"
7492
7493 fi
7494 rm -f conftest.$ac_objext conftest.$ac_ext
7495
7496 fi
7497 echo "$as_me:7497: result: $cf_cv_gnu_source" >&5
7498 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7499 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7500
7501         ;;
7502 minix*) #(vi
7503         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7504         ;;
7505 mirbsd*) #(vi
7506         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7507         cf_XOPEN_SOURCE=
7508
7509 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7510
7511 cf_save_CFLAGS="$CFLAGS"
7512 cf_save_CPPFLAGS="$CPPFLAGS"
7513
7514 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7515         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7516                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7517
7518 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7519         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7520                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7521
7522 echo "$as_me:7522: checking if we should define _POSIX_C_SOURCE" >&5
7523 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7524 if test "${cf_cv_posix_c_source+set}" = set; then
7525   echo $ECHO_N "(cached) $ECHO_C" >&6
7526 else
7527
7528 echo "${as_me:-configure}:7528: testing if the symbol is already defined go no further ..." 1>&5
7529
7530         cat >conftest.$ac_ext <<_ACEOF
7531 #line 7531 "configure"
7532 #include "confdefs.h"
7533 #include <sys/types.h>
7534 int
7535 main ()
7536 {
7537
7538 #ifndef _POSIX_C_SOURCE
7539 make an error
7540 #endif
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f conftest.$ac_objext
7546 if { (eval echo "$as_me:7546: \"$ac_compile\"") >&5
7547   (eval $ac_compile) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit $ac_status); } &&
7551          { ac_try='test -s conftest.$ac_objext'
7552   { (eval echo "$as_me:7552: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   cf_cv_posix_c_source=no
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7561 cf_want_posix_source=no
7562          case .$cf_POSIX_C_SOURCE in #(vi
7563          .[12]??*) #(vi
7564                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7565                 ;;
7566          .2) #(vi
7567                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7568                 cf_want_posix_source=yes
7569                 ;;
7570          .*)
7571                 cf_want_posix_source=yes
7572                 ;;
7573          esac
7574          if test "$cf_want_posix_source" = yes ; then
7575                 cat >conftest.$ac_ext <<_ACEOF
7576 #line 7576 "configure"
7577 #include "confdefs.h"
7578 #include <sys/types.h>
7579 int
7580 main ()
7581 {
7582
7583 #ifdef _POSIX_SOURCE
7584 make an error
7585 #endif
7586   ;
7587   return 0;
7588 }
7589 _ACEOF
7590 rm -f conftest.$ac_objext
7591 if { (eval echo "$as_me:7591: \"$ac_compile\"") >&5
7592   (eval $ac_compile) 2>&5
7593   ac_status=$?
7594   echo "$as_me:7594: \$? = $ac_status" >&5
7595   (exit $ac_status); } &&
7596          { ac_try='test -s conftest.$ac_objext'
7597   { (eval echo "$as_me:7597: \"$ac_try\"") >&5
7598   (eval $ac_try) 2>&5
7599   ac_status=$?
7600   echo "$as_me:7600: \$? = $ac_status" >&5
7601   (exit $ac_status); }; }; then
7602   :
7603 else
7604   echo "$as_me: failed program was:" >&5
7605 cat conftest.$ac_ext >&5
7606 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7607 fi
7608 rm -f conftest.$ac_objext conftest.$ac_ext
7609          fi
7610
7611 echo "${as_me:-configure}:7611: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7612
7613          CFLAGS="$cf_trim_CFLAGS"
7614          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7615
7616 echo "${as_me:-configure}:7616: testing if the second compile does not leave our definition intact error ..." 1>&5
7617
7618          cat >conftest.$ac_ext <<_ACEOF
7619 #line 7619 "configure"
7620 #include "confdefs.h"
7621 #include <sys/types.h>
7622 int
7623 main ()
7624 {
7625
7626 #ifndef _POSIX_C_SOURCE
7627 make an error
7628 #endif
7629   ;
7630   return 0;
7631 }
7632 _ACEOF
7633 rm -f conftest.$ac_objext
7634 if { (eval echo "$as_me:7634: \"$ac_compile\"") >&5
7635   (eval $ac_compile) 2>&5
7636   ac_status=$?
7637   echo "$as_me:7637: \$? = $ac_status" >&5
7638   (exit $ac_status); } &&
7639          { ac_try='test -s conftest.$ac_objext'
7640   { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit $ac_status); }; }; then
7645   :
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 cat conftest.$ac_ext >&5
7649 cf_cv_posix_c_source=no
7650 fi
7651 rm -f conftest.$ac_objext conftest.$ac_ext
7652          CFLAGS="$cf_save_CFLAGS"
7653          CPPFLAGS="$cf_save_CPPFLAGS"
7654
7655 fi
7656 rm -f conftest.$ac_objext conftest.$ac_ext
7657
7658 fi
7659 echo "$as_me:7659: result: $cf_cv_posix_c_source" >&5
7660 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7661
7662 if test "$cf_cv_posix_c_source" != no ; then
7663         CFLAGS="$cf_trim_CFLAGS"
7664         CPPFLAGS="$cf_trim_CPPFLAGS"
7665
7666 cf_fix_cppflags=no
7667 cf_new_cflags=
7668 cf_new_cppflags=
7669 cf_new_extra_cppflags=
7670
7671 for cf_add_cflags in $cf_cv_posix_c_source
7672 do
7673 case $cf_fix_cppflags in
7674 no)
7675         case $cf_add_cflags in #(vi
7676         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7677                 case $cf_add_cflags in
7678                 -D*)
7679                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7680
7681                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7682                                 && test -z "${cf_tst_cflags}" \
7683                                 && cf_fix_cppflags=yes
7684
7685                         if test $cf_fix_cppflags = yes ; then
7686                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7687                                 continue
7688                         elif test "${cf_tst_cflags}" = "\"'" ; then
7689                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7690                                 continue
7691                         fi
7692                         ;;
7693                 esac
7694                 case "$CPPFLAGS" in
7695                 *$cf_add_cflags) #(vi
7696                         ;;
7697                 *) #(vi
7698                         case $cf_add_cflags in #(vi
7699                         -D*)
7700                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7701
7702 CPPFLAGS=`echo "$CPPFLAGS" | \
7703         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7704                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7705
7706                                 ;;
7707                         esac
7708                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7709                         ;;
7710                 esac
7711                 ;;
7712         *)
7713                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7714                 ;;
7715         esac
7716         ;;
7717 yes)
7718         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7719
7720         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7721
7722         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7723                 && test -z "${cf_tst_cflags}" \
7724                 && cf_fix_cppflags=no
7725         ;;
7726 esac
7727 done
7728
7729 if test -n "$cf_new_cflags" ; then
7730
7731         CFLAGS="$CFLAGS $cf_new_cflags"
7732 fi
7733
7734 if test -n "$cf_new_cppflags" ; then
7735
7736         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7737 fi
7738
7739 if test -n "$cf_new_extra_cppflags" ; then
7740
7741         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7742 fi
7743
7744 fi
7745
7746         ;;
7747 netbsd*) #(vi
7748         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7749         ;;
7750 openbsd[4-9]*) #(vi
7751         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7752         cf_xopen_source="-D_BSD_SOURCE"
7753         cf_XOPEN_SOURCE=600
7754         ;;
7755 openbsd*) #(vi
7756         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7757         ;;
7758 osf[45]*) #(vi
7759         cf_xopen_source="-D_OSF_SOURCE"
7760         ;;
7761 nto-qnx*) #(vi
7762         cf_xopen_source="-D_QNX_SOURCE"
7763         ;;
7764 sco*) #(vi
7765         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7766         ;;
7767 solaris2.*) #(vi
7768         cf_xopen_source="-D__EXTENSIONS__"
7769         cf_cv_xopen_source=broken
7770         ;;
7771 *)
7772
7773 echo "$as_me:7773: checking if we should define _XOPEN_SOURCE" >&5
7774 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7775 if test "${cf_cv_xopen_source+set}" = set; then
7776   echo $ECHO_N "(cached) $ECHO_C" >&6
7777 else
7778
7779         cat >conftest.$ac_ext <<_ACEOF
7780 #line 7780 "configure"
7781 #include "confdefs.h"
7782
7783 #include <stdlib.h>
7784 #include <string.h>
7785 #include <sys/types.h>
7786
7787 int
7788 main ()
7789 {
7790
7791 #ifndef _XOPEN_SOURCE
7792 make an error
7793 #endif
7794   ;
7795   return 0;
7796 }
7797 _ACEOF
7798 rm -f conftest.$ac_objext
7799 if { (eval echo "$as_me:7799: \"$ac_compile\"") >&5
7800   (eval $ac_compile) 2>&5
7801   ac_status=$?
7802   echo "$as_me:7802: \$? = $ac_status" >&5
7803   (exit $ac_status); } &&
7804          { ac_try='test -s conftest.$ac_objext'
7805   { (eval echo "$as_me:7805: \"$ac_try\"") >&5
7806   (eval $ac_try) 2>&5
7807   ac_status=$?
7808   echo "$as_me:7808: \$? = $ac_status" >&5
7809   (exit $ac_status); }; }; then
7810   cf_cv_xopen_source=no
7811 else
7812   echo "$as_me: failed program was:" >&5
7813 cat conftest.$ac_ext >&5
7814 cf_save="$CPPFLAGS"
7815          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7816          cat >conftest.$ac_ext <<_ACEOF
7817 #line 7817 "configure"
7818 #include "confdefs.h"
7819
7820 #include <stdlib.h>
7821 #include <string.h>
7822 #include <sys/types.h>
7823
7824 int
7825 main ()
7826 {
7827
7828 #ifdef _XOPEN_SOURCE
7829 make an error
7830 #endif
7831   ;
7832   return 0;
7833 }
7834 _ACEOF
7835 rm -f conftest.$ac_objext
7836 if { (eval echo "$as_me:7836: \"$ac_compile\"") >&5
7837   (eval $ac_compile) 2>&5
7838   ac_status=$?
7839   echo "$as_me:7839: \$? = $ac_status" >&5
7840   (exit $ac_status); } &&
7841          { ac_try='test -s conftest.$ac_objext'
7842   { (eval echo "$as_me:7842: \"$ac_try\"") >&5
7843   (eval $ac_try) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit $ac_status); }; }; then
7847   cf_cv_xopen_source=no
7848 else
7849   echo "$as_me: failed program was:" >&5
7850 cat conftest.$ac_ext >&5
7851 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7852 fi
7853 rm -f conftest.$ac_objext conftest.$ac_ext
7854         CPPFLAGS="$cf_save"
7855
7856 fi
7857 rm -f conftest.$ac_objext conftest.$ac_ext
7858
7859 fi
7860 echo "$as_me:7860: result: $cf_cv_xopen_source" >&5
7861 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7862
7863 if test "$cf_cv_xopen_source" != no ; then
7864
7865 CFLAGS=`echo "$CFLAGS" | \
7866         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7867                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7868
7869 CPPFLAGS=`echo "$CPPFLAGS" | \
7870         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7871                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7872
7873         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7874
7875 cf_fix_cppflags=no
7876 cf_new_cflags=
7877 cf_new_cppflags=
7878 cf_new_extra_cppflags=
7879
7880 for cf_add_cflags in $cf_temp_xopen_source
7881 do
7882 case $cf_fix_cppflags in
7883 no)
7884         case $cf_add_cflags in #(vi
7885         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7886                 case $cf_add_cflags in
7887                 -D*)
7888                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7889
7890                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7891                                 && test -z "${cf_tst_cflags}" \
7892                                 && cf_fix_cppflags=yes
7893
7894                         if test $cf_fix_cppflags = yes ; then
7895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7896                                 continue
7897                         elif test "${cf_tst_cflags}" = "\"'" ; then
7898                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7899                                 continue
7900                         fi
7901                         ;;
7902                 esac
7903                 case "$CPPFLAGS" in
7904                 *$cf_add_cflags) #(vi
7905                         ;;
7906                 *) #(vi
7907                         case $cf_add_cflags in #(vi
7908                         -D*)
7909                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7910
7911 CPPFLAGS=`echo "$CPPFLAGS" | \
7912         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7913                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7914
7915                                 ;;
7916                         esac
7917                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7918                         ;;
7919                 esac
7920                 ;;
7921         *)
7922                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7923                 ;;
7924         esac
7925         ;;
7926 yes)
7927         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7928
7929         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7930
7931         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7932                 && test -z "${cf_tst_cflags}" \
7933                 && cf_fix_cppflags=no
7934         ;;
7935 esac
7936 done
7937
7938 if test -n "$cf_new_cflags" ; then
7939
7940         CFLAGS="$CFLAGS $cf_new_cflags"
7941 fi
7942
7943 if test -n "$cf_new_cppflags" ; then
7944
7945         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7946 fi
7947
7948 if test -n "$cf_new_extra_cppflags" ; then
7949
7950         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7951 fi
7952
7953 fi
7954
7955 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7956
7957 cf_save_CFLAGS="$CFLAGS"
7958 cf_save_CPPFLAGS="$CPPFLAGS"
7959
7960 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7961         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7962                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7963
7964 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7965         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7966                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7967
7968 echo "$as_me:7968: checking if we should define _POSIX_C_SOURCE" >&5
7969 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7970 if test "${cf_cv_posix_c_source+set}" = set; then
7971   echo $ECHO_N "(cached) $ECHO_C" >&6
7972 else
7973
7974 echo "${as_me:-configure}:7974: testing if the symbol is already defined go no further ..." 1>&5
7975
7976         cat >conftest.$ac_ext <<_ACEOF
7977 #line 7977 "configure"
7978 #include "confdefs.h"
7979 #include <sys/types.h>
7980 int
7981 main ()
7982 {
7983
7984 #ifndef _POSIX_C_SOURCE
7985 make an error
7986 #endif
7987   ;
7988   return 0;
7989 }
7990 _ACEOF
7991 rm -f conftest.$ac_objext
7992 if { (eval echo "$as_me:7992: \"$ac_compile\"") >&5
7993   (eval $ac_compile) 2>&5
7994   ac_status=$?
7995   echo "$as_me:7995: \$? = $ac_status" >&5
7996   (exit $ac_status); } &&
7997          { ac_try='test -s conftest.$ac_objext'
7998   { (eval echo "$as_me:7998: \"$ac_try\"") >&5
7999   (eval $ac_try) 2>&5
8000   ac_status=$?
8001   echo "$as_me:8001: \$? = $ac_status" >&5
8002   (exit $ac_status); }; }; then
8003   cf_cv_posix_c_source=no
8004 else
8005   echo "$as_me: failed program was:" >&5
8006 cat conftest.$ac_ext >&5
8007 cf_want_posix_source=no
8008          case .$cf_POSIX_C_SOURCE in #(vi
8009          .[12]??*) #(vi
8010                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8011                 ;;
8012          .2) #(vi
8013                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8014                 cf_want_posix_source=yes
8015                 ;;
8016          .*)
8017                 cf_want_posix_source=yes
8018                 ;;
8019          esac
8020          if test "$cf_want_posix_source" = yes ; then
8021                 cat >conftest.$ac_ext <<_ACEOF
8022 #line 8022 "configure"
8023 #include "confdefs.h"
8024 #include <sys/types.h>
8025 int
8026 main ()
8027 {
8028
8029 #ifdef _POSIX_SOURCE
8030 make an error
8031 #endif
8032   ;
8033   return 0;
8034 }
8035 _ACEOF
8036 rm -f conftest.$ac_objext
8037 if { (eval echo "$as_me:8037: \"$ac_compile\"") >&5
8038   (eval $ac_compile) 2>&5
8039   ac_status=$?
8040   echo "$as_me:8040: \$? = $ac_status" >&5
8041   (exit $ac_status); } &&
8042          { ac_try='test -s conftest.$ac_objext'
8043   { (eval echo "$as_me:8043: \"$ac_try\"") >&5
8044   (eval $ac_try) 2>&5
8045   ac_status=$?
8046   echo "$as_me:8046: \$? = $ac_status" >&5
8047   (exit $ac_status); }; }; then
8048   :
8049 else
8050   echo "$as_me: failed program was:" >&5
8051 cat conftest.$ac_ext >&5
8052 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8053 fi
8054 rm -f conftest.$ac_objext conftest.$ac_ext
8055          fi
8056
8057 echo "${as_me:-configure}:8057: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8058
8059          CFLAGS="$cf_trim_CFLAGS"
8060          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8061
8062 echo "${as_me:-configure}:8062: testing if the second compile does not leave our definition intact error ..." 1>&5
8063
8064          cat >conftest.$ac_ext <<_ACEOF
8065 #line 8065 "configure"
8066 #include "confdefs.h"
8067 #include <sys/types.h>
8068 int
8069 main ()
8070 {
8071
8072 #ifndef _POSIX_C_SOURCE
8073 make an error
8074 #endif
8075   ;
8076   return 0;
8077 }
8078 _ACEOF
8079 rm -f conftest.$ac_objext
8080 if { (eval echo "$as_me:8080: \"$ac_compile\"") >&5
8081   (eval $ac_compile) 2>&5
8082   ac_status=$?
8083   echo "$as_me:8083: \$? = $ac_status" >&5
8084   (exit $ac_status); } &&
8085          { ac_try='test -s conftest.$ac_objext'
8086   { (eval echo "$as_me:8086: \"$ac_try\"") >&5
8087   (eval $ac_try) 2>&5
8088   ac_status=$?
8089   echo "$as_me:8089: \$? = $ac_status" >&5
8090   (exit $ac_status); }; }; then
8091   :
8092 else
8093   echo "$as_me: failed program was:" >&5
8094 cat conftest.$ac_ext >&5
8095 cf_cv_posix_c_source=no
8096 fi
8097 rm -f conftest.$ac_objext conftest.$ac_ext
8098          CFLAGS="$cf_save_CFLAGS"
8099          CPPFLAGS="$cf_save_CPPFLAGS"
8100
8101 fi
8102 rm -f conftest.$ac_objext conftest.$ac_ext
8103
8104 fi
8105 echo "$as_me:8105: result: $cf_cv_posix_c_source" >&5
8106 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8107
8108 if test "$cf_cv_posix_c_source" != no ; then
8109         CFLAGS="$cf_trim_CFLAGS"
8110         CPPFLAGS="$cf_trim_CPPFLAGS"
8111
8112 cf_fix_cppflags=no
8113 cf_new_cflags=
8114 cf_new_cppflags=
8115 cf_new_extra_cppflags=
8116
8117 for cf_add_cflags in $cf_cv_posix_c_source
8118 do
8119 case $cf_fix_cppflags in
8120 no)
8121         case $cf_add_cflags in #(vi
8122         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8123                 case $cf_add_cflags in
8124                 -D*)
8125                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8126
8127                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8128                                 && test -z "${cf_tst_cflags}" \
8129                                 && cf_fix_cppflags=yes
8130
8131                         if test $cf_fix_cppflags = yes ; then
8132                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8133                                 continue
8134                         elif test "${cf_tst_cflags}" = "\"'" ; then
8135                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8136                                 continue
8137                         fi
8138                         ;;
8139                 esac
8140                 case "$CPPFLAGS" in
8141                 *$cf_add_cflags) #(vi
8142                         ;;
8143                 *) #(vi
8144                         case $cf_add_cflags in #(vi
8145                         -D*)
8146                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8147
8148 CPPFLAGS=`echo "$CPPFLAGS" | \
8149         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8150                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8151
8152                                 ;;
8153                         esac
8154                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8155                         ;;
8156                 esac
8157                 ;;
8158         *)
8159                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8160                 ;;
8161         esac
8162         ;;
8163 yes)
8164         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8165
8166         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8167
8168         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8169                 && test -z "${cf_tst_cflags}" \
8170                 && cf_fix_cppflags=no
8171         ;;
8172 esac
8173 done
8174
8175 if test -n "$cf_new_cflags" ; then
8176
8177         CFLAGS="$CFLAGS $cf_new_cflags"
8178 fi
8179
8180 if test -n "$cf_new_cppflags" ; then
8181
8182         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8183 fi
8184
8185 if test -n "$cf_new_extra_cppflags" ; then
8186
8187         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8188 fi
8189
8190 fi
8191
8192         ;;
8193 esac
8194
8195 if test -n "$cf_xopen_source" ; then
8196
8197 cf_fix_cppflags=no
8198 cf_new_cflags=
8199 cf_new_cppflags=
8200 cf_new_extra_cppflags=
8201
8202 for cf_add_cflags in $cf_xopen_source
8203 do
8204 case $cf_fix_cppflags in
8205 no)
8206         case $cf_add_cflags in #(vi
8207         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8208                 case $cf_add_cflags in
8209                 -D*)
8210                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8211
8212                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8213                                 && test -z "${cf_tst_cflags}" \
8214                                 && cf_fix_cppflags=yes
8215
8216                         if test $cf_fix_cppflags = yes ; then
8217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8218                                 continue
8219                         elif test "${cf_tst_cflags}" = "\"'" ; then
8220                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8221                                 continue
8222                         fi
8223                         ;;
8224                 esac
8225                 case "$CPPFLAGS" in
8226                 *$cf_add_cflags) #(vi
8227                         ;;
8228                 *) #(vi
8229                         case $cf_add_cflags in #(vi
8230                         -D*)
8231                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8232
8233 CPPFLAGS=`echo "$CPPFLAGS" | \
8234         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8235                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8236
8237                                 ;;
8238                         esac
8239                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8240                         ;;
8241                 esac
8242                 ;;
8243         *)
8244                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8245                 ;;
8246         esac
8247         ;;
8248 yes)
8249         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8250
8251         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8252
8253         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8254                 && test -z "${cf_tst_cflags}" \
8255                 && cf_fix_cppflags=no
8256         ;;
8257 esac
8258 done
8259
8260 if test -n "$cf_new_cflags" ; then
8261         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8262
8263 echo "${as_me:-configure}:8263: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8264
8265         CFLAGS="$CFLAGS $cf_new_cflags"
8266 fi
8267
8268 if test -n "$cf_new_cppflags" ; then
8269         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8270
8271 echo "${as_me:-configure}:8271: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8272
8273         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8274 fi
8275
8276 if test -n "$cf_new_extra_cppflags" ; then
8277         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8278
8279 echo "${as_me:-configure}:8279: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8280
8281         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8282 fi
8283
8284 fi
8285
8286 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8287         echo "$as_me:8287: checking if _XOPEN_SOURCE really is set" >&5
8288 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8289         cat >conftest.$ac_ext <<_ACEOF
8290 #line 8290 "configure"
8291 #include "confdefs.h"
8292 #include <stdlib.h>
8293 int
8294 main ()
8295 {
8296
8297 #ifndef _XOPEN_SOURCE
8298 make an error
8299 #endif
8300   ;
8301   return 0;
8302 }
8303 _ACEOF
8304 rm -f conftest.$ac_objext
8305 if { (eval echo "$as_me:8305: \"$ac_compile\"") >&5
8306   (eval $ac_compile) 2>&5
8307   ac_status=$?
8308   echo "$as_me:8308: \$? = $ac_status" >&5
8309   (exit $ac_status); } &&
8310          { ac_try='test -s conftest.$ac_objext'
8311   { (eval echo "$as_me:8311: \"$ac_try\"") >&5
8312   (eval $ac_try) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit $ac_status); }; }; then
8316   cf_XOPEN_SOURCE_set=yes
8317 else
8318   echo "$as_me: failed program was:" >&5
8319 cat conftest.$ac_ext >&5
8320 cf_XOPEN_SOURCE_set=no
8321 fi
8322 rm -f conftest.$ac_objext conftest.$ac_ext
8323         echo "$as_me:8323: result: $cf_XOPEN_SOURCE_set" >&5
8324 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8325         if test $cf_XOPEN_SOURCE_set = yes
8326         then
8327                 cat >conftest.$ac_ext <<_ACEOF
8328 #line 8328 "configure"
8329 #include "confdefs.h"
8330 #include <stdlib.h>
8331 int
8332 main ()
8333 {
8334
8335 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8336 make an error
8337 #endif
8338   ;
8339   return 0;
8340 }
8341 _ACEOF
8342 rm -f conftest.$ac_objext
8343 if { (eval echo "$as_me:8343: \"$ac_compile\"") >&5
8344   (eval $ac_compile) 2>&5
8345   ac_status=$?
8346   echo "$as_me:8346: \$? = $ac_status" >&5
8347   (exit $ac_status); } &&
8348          { ac_try='test -s conftest.$ac_objext'
8349   { (eval echo "$as_me:8349: \"$ac_try\"") >&5
8350   (eval $ac_try) 2>&5
8351   ac_status=$?
8352   echo "$as_me:8352: \$? = $ac_status" >&5
8353   (exit $ac_status); }; }; then
8354   cf_XOPEN_SOURCE_set_ok=yes
8355 else
8356   echo "$as_me: failed program was:" >&5
8357 cat conftest.$ac_ext >&5
8358 cf_XOPEN_SOURCE_set_ok=no
8359 fi
8360 rm -f conftest.$ac_objext conftest.$ac_ext
8361                 if test $cf_XOPEN_SOURCE_set_ok = no
8362                 then
8363                         { echo "$as_me:8363: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8364 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8365                 fi
8366         else
8367
8368 echo "$as_me:8368: checking if we should define _XOPEN_SOURCE" >&5
8369 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8370 if test "${cf_cv_xopen_source+set}" = set; then
8371   echo $ECHO_N "(cached) $ECHO_C" >&6
8372 else
8373
8374         cat >conftest.$ac_ext <<_ACEOF
8375 #line 8375 "configure"
8376 #include "confdefs.h"
8377
8378 #include <stdlib.h>
8379 #include <string.h>
8380 #include <sys/types.h>
8381
8382 int
8383 main ()
8384 {
8385
8386 #ifndef _XOPEN_SOURCE
8387 make an error
8388 #endif
8389   ;
8390   return 0;
8391 }
8392 _ACEOF
8393 rm -f conftest.$ac_objext
8394 if { (eval echo "$as_me:8394: \"$ac_compile\"") >&5
8395   (eval $ac_compile) 2>&5
8396   ac_status=$?
8397   echo "$as_me:8397: \$? = $ac_status" >&5
8398   (exit $ac_status); } &&
8399          { ac_try='test -s conftest.$ac_objext'
8400   { (eval echo "$as_me:8400: \"$ac_try\"") >&5
8401   (eval $ac_try) 2>&5
8402   ac_status=$?
8403   echo "$as_me:8403: \$? = $ac_status" >&5
8404   (exit $ac_status); }; }; then
8405   cf_cv_xopen_source=no
8406 else
8407   echo "$as_me: failed program was:" >&5
8408 cat conftest.$ac_ext >&5
8409 cf_save="$CPPFLAGS"
8410          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8411          cat >conftest.$ac_ext <<_ACEOF
8412 #line 8412 "configure"
8413 #include "confdefs.h"
8414
8415 #include <stdlib.h>
8416 #include <string.h>
8417 #include <sys/types.h>
8418
8419 int
8420 main ()
8421 {
8422
8423 #ifdef _XOPEN_SOURCE
8424 make an error
8425 #endif
8426   ;
8427   return 0;
8428 }
8429 _ACEOF
8430 rm -f conftest.$ac_objext
8431 if { (eval echo "$as_me:8431: \"$ac_compile\"") >&5
8432   (eval $ac_compile) 2>&5
8433   ac_status=$?
8434   echo "$as_me:8434: \$? = $ac_status" >&5
8435   (exit $ac_status); } &&
8436          { ac_try='test -s conftest.$ac_objext'
8437   { (eval echo "$as_me:8437: \"$ac_try\"") >&5
8438   (eval $ac_try) 2>&5
8439   ac_status=$?
8440   echo "$as_me:8440: \$? = $ac_status" >&5
8441   (exit $ac_status); }; }; then
8442   cf_cv_xopen_source=no
8443 else
8444   echo "$as_me: failed program was:" >&5
8445 cat conftest.$ac_ext >&5
8446 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8447 fi
8448 rm -f conftest.$ac_objext conftest.$ac_ext
8449         CPPFLAGS="$cf_save"
8450
8451 fi
8452 rm -f conftest.$ac_objext conftest.$ac_ext
8453
8454 fi
8455 echo "$as_me:8455: result: $cf_cv_xopen_source" >&5
8456 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8457
8458 if test "$cf_cv_xopen_source" != no ; then
8459
8460 CFLAGS=`echo "$CFLAGS" | \
8461         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8462                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8463
8464 CPPFLAGS=`echo "$CPPFLAGS" | \
8465         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8466                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8467
8468         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8469
8470 cf_fix_cppflags=no
8471 cf_new_cflags=
8472 cf_new_cppflags=
8473 cf_new_extra_cppflags=
8474
8475 for cf_add_cflags in $cf_temp_xopen_source
8476 do
8477 case $cf_fix_cppflags in
8478 no)
8479         case $cf_add_cflags in #(vi
8480         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8481                 case $cf_add_cflags in
8482                 -D*)
8483                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8484
8485                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8486                                 && test -z "${cf_tst_cflags}" \
8487                                 && cf_fix_cppflags=yes
8488
8489                         if test $cf_fix_cppflags = yes ; then
8490                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8491                                 continue
8492                         elif test "${cf_tst_cflags}" = "\"'" ; then
8493                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8494                                 continue
8495                         fi
8496                         ;;
8497                 esac
8498                 case "$CPPFLAGS" in
8499                 *$cf_add_cflags) #(vi
8500                         ;;
8501                 *) #(vi
8502                         case $cf_add_cflags in #(vi
8503                         -D*)
8504                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8505
8506 CPPFLAGS=`echo "$CPPFLAGS" | \
8507         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8508                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8509
8510                                 ;;
8511                         esac
8512                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8513                         ;;
8514                 esac
8515                 ;;
8516         *)
8517                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8518                 ;;
8519         esac
8520         ;;
8521 yes)
8522         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8523
8524         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8525
8526         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8527                 && test -z "${cf_tst_cflags}" \
8528                 && cf_fix_cppflags=no
8529         ;;
8530 esac
8531 done
8532
8533 if test -n "$cf_new_cflags" ; then
8534
8535         CFLAGS="$CFLAGS $cf_new_cflags"
8536 fi
8537
8538 if test -n "$cf_new_cppflags" ; then
8539
8540         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8541 fi
8542
8543 if test -n "$cf_new_extra_cppflags" ; then
8544
8545         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8546 fi
8547
8548 fi
8549
8550         fi
8551 fi
8552
8553 # Work around breakage on OS X
8554
8555 echo "$as_me:8555: checking if SIGWINCH is defined" >&5
8556 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8557 if test "${cf_cv_define_sigwinch+set}" = set; then
8558   echo $ECHO_N "(cached) $ECHO_C" >&6
8559 else
8560
8561         cat >conftest.$ac_ext <<_ACEOF
8562 #line 8562 "configure"
8563 #include "confdefs.h"
8564
8565 #include <sys/types.h>
8566 #include <sys/signal.h>
8567
8568 int
8569 main ()
8570 {
8571 int x = SIGWINCH
8572   ;
8573   return 0;
8574 }
8575 _ACEOF
8576 rm -f conftest.$ac_objext
8577 if { (eval echo "$as_me:8577: \"$ac_compile\"") >&5
8578   (eval $ac_compile) 2>&5
8579   ac_status=$?
8580   echo "$as_me:8580: \$? = $ac_status" >&5
8581   (exit $ac_status); } &&
8582          { ac_try='test -s conftest.$ac_objext'
8583   { (eval echo "$as_me:8583: \"$ac_try\"") >&5
8584   (eval $ac_try) 2>&5
8585   ac_status=$?
8586   echo "$as_me:8586: \$? = $ac_status" >&5
8587   (exit $ac_status); }; }; then
8588   cf_cv_define_sigwinch=yes
8589 else
8590   echo "$as_me: failed program was:" >&5
8591 cat conftest.$ac_ext >&5
8592 cat >conftest.$ac_ext <<_ACEOF
8593 #line 8593 "configure"
8594 #include "confdefs.h"
8595
8596 #undef _XOPEN_SOURCE
8597 #undef _POSIX_SOURCE
8598 #undef _POSIX_C_SOURCE
8599 #include <sys/types.h>
8600 #include <sys/signal.h>
8601
8602 int
8603 main ()
8604 {
8605 int x = SIGWINCH
8606   ;
8607   return 0;
8608 }
8609 _ACEOF
8610 rm -f conftest.$ac_objext
8611 if { (eval echo "$as_me:8611: \"$ac_compile\"") >&5
8612   (eval $ac_compile) 2>&5
8613   ac_status=$?
8614   echo "$as_me:8614: \$? = $ac_status" >&5
8615   (exit $ac_status); } &&
8616          { ac_try='test -s conftest.$ac_objext'
8617   { (eval echo "$as_me:8617: \"$ac_try\"") >&5
8618   (eval $ac_try) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); }; }; then
8622   cf_cv_define_sigwinch=maybe
8623 else
8624   echo "$as_me: failed program was:" >&5
8625 cat conftest.$ac_ext >&5
8626 cf_cv_define_sigwinch=no
8627 fi
8628 rm -f conftest.$ac_objext conftest.$ac_ext
8629
8630 fi
8631 rm -f conftest.$ac_objext conftest.$ac_ext
8632
8633 fi
8634 echo "$as_me:8634: result: $cf_cv_define_sigwinch" >&5
8635 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8636
8637 if test "$cf_cv_define_sigwinch" = maybe ; then
8638 echo "$as_me:8638: checking for actual SIGWINCH definition" >&5
8639 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8640 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8641   echo $ECHO_N "(cached) $ECHO_C" >&6
8642 else
8643
8644 cf_cv_fixup_sigwinch=unknown
8645 cf_sigwinch=32
8646 while test $cf_sigwinch != 1
8647 do
8648         cat >conftest.$ac_ext <<_ACEOF
8649 #line 8649 "configure"
8650 #include "confdefs.h"
8651
8652 #undef _XOPEN_SOURCE
8653 #undef _POSIX_SOURCE
8654 #undef _POSIX_C_SOURCE
8655 #include <sys/types.h>
8656 #include <sys/signal.h>
8657
8658 int
8659 main ()
8660 {
8661
8662 #if SIGWINCH != $cf_sigwinch
8663 make an error
8664 #endif
8665 int x = SIGWINCH
8666   ;
8667   return 0;
8668 }
8669 _ACEOF
8670 rm -f conftest.$ac_objext
8671 if { (eval echo "$as_me:8671: \"$ac_compile\"") >&5
8672   (eval $ac_compile) 2>&5
8673   ac_status=$?
8674   echo "$as_me:8674: \$? = $ac_status" >&5
8675   (exit $ac_status); } &&
8676          { ac_try='test -s conftest.$ac_objext'
8677   { (eval echo "$as_me:8677: \"$ac_try\"") >&5
8678   (eval $ac_try) 2>&5
8679   ac_status=$?
8680   echo "$as_me:8680: \$? = $ac_status" >&5
8681   (exit $ac_status); }; }; then
8682   cf_cv_fixup_sigwinch=$cf_sigwinch
8683          break
8684 else
8685   echo "$as_me: failed program was:" >&5
8686 cat conftest.$ac_ext >&5
8687 fi
8688 rm -f conftest.$ac_objext conftest.$ac_ext
8689
8690 cf_sigwinch=`expr $cf_sigwinch - 1`
8691 done
8692
8693 fi
8694 echo "$as_me:8694: result: $cf_cv_fixup_sigwinch" >&5
8695 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8696
8697         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8698                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8699         fi
8700 fi
8701
8702 # Checks for CODESET support.
8703
8704   echo "$as_me:8704: checking for nl_langinfo and CODESET" >&5
8705 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8706 if test "${am_cv_langinfo_codeset+set}" = set; then
8707   echo $ECHO_N "(cached) $ECHO_C" >&6
8708 else
8709   cat >conftest.$ac_ext <<_ACEOF
8710 #line 8710 "configure"
8711 #include "confdefs.h"
8712 #include <langinfo.h>
8713 int
8714 main ()
8715 {
8716 char* cs = nl_langinfo(CODESET);
8717   ;
8718   return 0;
8719 }
8720 _ACEOF
8721 rm -f conftest.$ac_objext conftest$ac_exeext
8722 if { (eval echo "$as_me:8722: \"$ac_link\"") >&5
8723   (eval $ac_link) 2>&5
8724   ac_status=$?
8725   echo "$as_me:8725: \$? = $ac_status" >&5
8726   (exit $ac_status); } &&
8727          { ac_try='test -s conftest$ac_exeext'
8728   { (eval echo "$as_me:8728: \"$ac_try\"") >&5
8729   (eval $ac_try) 2>&5
8730   ac_status=$?
8731   echo "$as_me:8731: \$? = $ac_status" >&5
8732   (exit $ac_status); }; }; then
8733   am_cv_langinfo_codeset=yes
8734 else
8735   echo "$as_me: failed program was:" >&5
8736 cat conftest.$ac_ext >&5
8737 am_cv_langinfo_codeset=no
8738 fi
8739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8740
8741 fi
8742 echo "$as_me:8742: result: $am_cv_langinfo_codeset" >&5
8743 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8744   if test $am_cv_langinfo_codeset = yes; then
8745
8746 cat >>confdefs.h <<\EOF
8747 #define HAVE_LANGINFO_CODESET 1
8748 EOF
8749
8750   fi
8751
8752 # use these variables to work around a defect in gcc's fixincludes.
8753 NCURSES_OK_WCHAR_T=
8754 NCURSES_OK_WINT_T=
8755
8756 echo "$as_me:8756: checking if you want wide-character code" >&5
8757 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8758
8759 # Check whether --enable-widec or --disable-widec was given.
8760 if test "${enable_widec+set}" = set; then
8761   enableval="$enable_widec"
8762   with_widec=$enableval
8763 else
8764   with_widec=no
8765 fi;
8766 echo "$as_me:8766: result: $with_widec" >&5
8767 echo "${ECHO_T}$with_widec" >&6
8768 if test "x$with_widec" = xyes ; then
8769         if test "x$disable_lib_suffixes" = xno ; then
8770                 LIB_SUFFIX="w${LIB_SUFFIX}"
8771         fi
8772
8773 cat >>confdefs.h <<\EOF
8774 #define USE_WIDEC_SUPPORT 1
8775 EOF
8776
8777 cat >>confdefs.h <<\EOF
8778 #define NCURSES_WIDECHAR 1
8779 EOF
8780
8781 echo "$as_me:8781: checking if wchar.h can be used as is" >&5
8782 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8783 if test "${cf_cv_wchar_h_okay+set}" = set; then
8784   echo $ECHO_N "(cached) $ECHO_C" >&6
8785 else
8786
8787 cat >conftest.$ac_ext <<_ACEOF
8788 #line 8788 "configure"
8789 #include "confdefs.h"
8790
8791 #include <stdlib.h>
8792 #include <wchar.h>
8793
8794 int
8795 main ()
8796 {
8797
8798         wint_t foo = 0;
8799         int bar = iswpunct(foo)
8800   ;
8801   return 0;
8802 }
8803 _ACEOF
8804 rm -f conftest.$ac_objext
8805 if { (eval echo "$as_me:8805: \"$ac_compile\"") >&5
8806   (eval $ac_compile) 2>&5
8807   ac_status=$?
8808   echo "$as_me:8808: \$? = $ac_status" >&5
8809   (exit $ac_status); } &&
8810          { ac_try='test -s conftest.$ac_objext'
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_wchar_h_okay=yes
8817 else
8818   echo "$as_me: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8820 cf_cv_wchar_h_okay=no
8821 fi
8822 rm -f conftest.$ac_objext conftest.$ac_ext
8823 fi
8824 echo "$as_me:8824: result: $cf_cv_wchar_h_okay" >&5
8825 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8826
8827 if test $cf_cv_wchar_h_okay = no
8828 then
8829
8830 echo "$as_me:8830: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8831 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8832 cat >conftest.$ac_ext <<_ACEOF
8833 #line 8833 "configure"
8834 #include "confdefs.h"
8835 #include <sys/types.h>
8836
8837 int
8838 main ()
8839 {
8840
8841 #ifndef _XOPEN_SOURCE_EXTENDED
8842 make an error
8843 #endif
8844   ;
8845   return 0;
8846 }
8847 _ACEOF
8848 rm -f conftest.$ac_objext
8849 if { (eval echo "$as_me:8849: \"$ac_compile\"") >&5
8850   (eval $ac_compile) 2>&5
8851   ac_status=$?
8852   echo "$as_me:8852: \$? = $ac_status" >&5
8853   (exit $ac_status); } &&
8854          { ac_try='test -s conftest.$ac_objext'
8855   { (eval echo "$as_me:8855: \"$ac_try\"") >&5
8856   (eval $ac_try) 2>&5
8857   ac_status=$?
8858   echo "$as_me:8858: \$? = $ac_status" >&5
8859   (exit $ac_status); }; }; then
8860   cf_result=no
8861 else
8862   echo "$as_me: failed program was:" >&5
8863 cat conftest.$ac_ext >&5
8864 cf_result=yes
8865 fi
8866 rm -f conftest.$ac_objext conftest.$ac_ext
8867 echo "$as_me:8867: result: $cf_result" >&5
8868 echo "${ECHO_T}$cf_result" >&6
8869
8870 if test "$cf_result" = yes ; then
8871         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8872 elif test "x" != "x" ; then
8873         echo "$as_me:8873: checking checking for compatible value versus " >&5
8874 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8875         cat >conftest.$ac_ext <<_ACEOF
8876 #line 8876 "configure"
8877 #include "confdefs.h"
8878 #include <sys/types.h>
8879
8880 int
8881 main ()
8882 {
8883
8884 #if _XOPEN_SOURCE_EXTENDED- < 0
8885 make an error
8886 #endif
8887   ;
8888   return 0;
8889 }
8890 _ACEOF
8891 rm -f conftest.$ac_objext
8892 if { (eval echo "$as_me:8892: \"$ac_compile\"") >&5
8893   (eval $ac_compile) 2>&5
8894   ac_status=$?
8895   echo "$as_me:8895: \$? = $ac_status" >&5
8896   (exit $ac_status); } &&
8897          { ac_try='test -s conftest.$ac_objext'
8898   { (eval echo "$as_me:8898: \"$ac_try\"") >&5
8899   (eval $ac_try) 2>&5
8900   ac_status=$?
8901   echo "$as_me:8901: \$? = $ac_status" >&5
8902   (exit $ac_status); }; }; then
8903   cf_result=yes
8904 else
8905   echo "$as_me: failed program was:" >&5
8906 cat conftest.$ac_ext >&5
8907 cf_result=no
8908 fi
8909 rm -f conftest.$ac_objext conftest.$ac_ext
8910         echo "$as_me:8910: result: $cf_result" >&5
8911 echo "${ECHO_T}$cf_result" >&6
8912         if test "$cf_result" = no ; then
8913                 # perhaps we can override it - try...
8914                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8915         fi
8916 fi
8917
8918 fi
8919
8920         # with_overwrite=no
8921         NCURSES_CH_T=cchar_t
8922
8923 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8924 do
8925 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8926 echo "$as_me:8926: checking for $ac_func" >&5
8927 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8928 if eval "test \"\${$as_ac_var+set}\" = set"; then
8929   echo $ECHO_N "(cached) $ECHO_C" >&6
8930 else
8931   cat >conftest.$ac_ext <<_ACEOF
8932 #line 8932 "configure"
8933 #include "confdefs.h"
8934 /* System header to define __stub macros and hopefully few prototypes,
8935     which can conflict with char $ac_func (); below.  */
8936 #include <assert.h>
8937 /* Override any gcc2 internal prototype to avoid an error.  */
8938 #ifdef __cplusplus
8939 extern "C"
8940 #endif
8941 /* We use char because int might match the return type of a gcc2
8942    builtin and then its argument prototype would still apply.  */
8943 char $ac_func ();
8944 char (*f) ();
8945
8946 int
8947 main ()
8948 {
8949 /* The GNU C library defines this for functions which it implements
8950     to always fail with ENOSYS.  Some functions are actually named
8951     something starting with __ and the normal name is an alias.  */
8952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8953 choke me
8954 #else
8955 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8956 #endif
8957
8958   ;
8959   return 0;
8960 }
8961 _ACEOF
8962 rm -f conftest.$ac_objext conftest$ac_exeext
8963 if { (eval echo "$as_me:8963: \"$ac_link\"") >&5
8964   (eval $ac_link) 2>&5
8965   ac_status=$?
8966   echo "$as_me:8966: \$? = $ac_status" >&5
8967   (exit $ac_status); } &&
8968          { ac_try='test -s conftest$ac_exeext'
8969   { (eval echo "$as_me:8969: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:8972: \$? = $ac_status" >&5
8973   (exit $ac_status); }; }; then
8974   eval "$as_ac_var=yes"
8975 else
8976   echo "$as_me: failed program was:" >&5
8977 cat conftest.$ac_ext >&5
8978 eval "$as_ac_var=no"
8979 fi
8980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8981 fi
8982 echo "$as_me:8982: result: `eval echo '${'$as_ac_var'}'`" >&5
8983 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8984 if test `eval echo '${'$as_ac_var'}'` = yes; then
8985   cat >>confdefs.h <<EOF
8986 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8987 EOF
8988
8989 fi
8990 done
8991
8992         if test "x$ac_cv_func_putwc" != xyes ; then
8993
8994 echo "$as_me:8994: checking for multibyte character support" >&5
8995 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8996 if test "${cf_cv_utf8_lib+set}" = set; then
8997   echo $ECHO_N "(cached) $ECHO_C" >&6
8998 else
8999
9000         cf_save_LIBS="$LIBS"
9001         cat >conftest.$ac_ext <<_ACEOF
9002 #line 9002 "configure"
9003 #include "confdefs.h"
9004
9005 #include <stdlib.h>
9006 int
9007 main ()
9008 {
9009 putwc(0,0);
9010   ;
9011   return 0;
9012 }
9013 _ACEOF
9014 rm -f conftest.$ac_objext conftest$ac_exeext
9015 if { (eval echo "$as_me:9015: \"$ac_link\"") >&5
9016   (eval $ac_link) 2>&5
9017   ac_status=$?
9018   echo "$as_me:9018: \$? = $ac_status" >&5
9019   (exit $ac_status); } &&
9020          { ac_try='test -s conftest$ac_exeext'
9021   { (eval echo "$as_me:9021: \"$ac_try\"") >&5
9022   (eval $ac_try) 2>&5
9023   ac_status=$?
9024   echo "$as_me:9024: \$? = $ac_status" >&5
9025   (exit $ac_status); }; }; then
9026   cf_cv_utf8_lib=yes
9027 else
9028   echo "$as_me: failed program was:" >&5
9029 cat conftest.$ac_ext >&5
9030
9031 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9032 # will be set on completion of the AC_TRY_LINK below.
9033 cf_cv_header_path_utf8=
9034 cf_cv_library_path_utf8=
9035
9036 echo "${as_me:-configure}:9036: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9037
9038 cf_save_LIBS="$LIBS"
9039
9040 cat >conftest.$ac_ext <<_ACEOF
9041 #line 9041 "configure"
9042 #include "confdefs.h"
9043
9044 #include <libutf8.h>
9045 int
9046 main ()
9047 {
9048 putwc(0,0);
9049   ;
9050   return 0;
9051 }
9052 _ACEOF
9053 rm -f conftest.$ac_objext conftest$ac_exeext
9054 if { (eval echo "$as_me:9054: \"$ac_link\"") >&5
9055   (eval $ac_link) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); } &&
9059          { ac_try='test -s conftest$ac_exeext'
9060   { (eval echo "$as_me:9060: \"$ac_try\"") >&5
9061   (eval $ac_try) 2>&5
9062   ac_status=$?
9063   echo "$as_me:9063: \$? = $ac_status" >&5
9064   (exit $ac_status); }; }; then
9065
9066         cf_cv_find_linkage_utf8=yes
9067         cf_cv_header_path_utf8=/usr/include
9068         cf_cv_library_path_utf8=/usr/lib
9069
9070 else
9071   echo "$as_me: failed program was:" >&5
9072 cat conftest.$ac_ext >&5
9073
9074 LIBS="-lutf8  $cf_save_LIBS"
9075
9076 cat >conftest.$ac_ext <<_ACEOF
9077 #line 9077 "configure"
9078 #include "confdefs.h"
9079
9080 #include <libutf8.h>
9081 int
9082 main ()
9083 {
9084 putwc(0,0);
9085   ;
9086   return 0;
9087 }
9088 _ACEOF
9089 rm -f conftest.$ac_objext conftest$ac_exeext
9090 if { (eval echo "$as_me:9090: \"$ac_link\"") >&5
9091   (eval $ac_link) 2>&5
9092   ac_status=$?
9093   echo "$as_me:9093: \$? = $ac_status" >&5
9094   (exit $ac_status); } &&
9095          { ac_try='test -s conftest$ac_exeext'
9096   { (eval echo "$as_me:9096: \"$ac_try\"") >&5
9097   (eval $ac_try) 2>&5
9098   ac_status=$?
9099   echo "$as_me:9099: \$? = $ac_status" >&5
9100   (exit $ac_status); }; }; then
9101
9102         cf_cv_find_linkage_utf8=yes
9103         cf_cv_header_path_utf8=/usr/include
9104         cf_cv_library_path_utf8=/usr/lib
9105         cf_cv_library_file_utf8="-lutf8"
9106
9107 else
9108   echo "$as_me: failed program was:" >&5
9109 cat conftest.$ac_ext >&5
9110
9111         cf_cv_find_linkage_utf8=no
9112         LIBS="$cf_save_LIBS"
9113
9114     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9115
9116 echo "${as_me:-configure}:9116: testing find linkage for utf8 library ..." 1>&5
9117
9118 echo "${as_me:-configure}:9118: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9119
9120     cf_save_CPPFLAGS="$CPPFLAGS"
9121     cf_test_CPPFLAGS="$CPPFLAGS"
9122
9123 cf_search=
9124
9125 # collect the current set of include-directories from compiler flags
9126 cf_header_path_list=""
9127 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9128         for cf_header_path in $CPPFLAGS $CFLAGS
9129         do
9130                 case $cf_header_path in #(vi
9131                 -I*)
9132                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9133
9134 test "x$cf_header_path" != "xNONE" && \
9135 test -d "$cf_header_path" && \
9136  {
9137         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9138         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9139         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9140         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9141         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9142         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9143 }
9144
9145                         cf_header_path_list="$cf_header_path_list $cf_search"
9146                         ;;
9147                 esac
9148         done
9149 fi
9150
9151 # add the variations for the package we are looking for
9152
9153 cf_search=
9154
9155 test "x/usr" != "x$prefix" && \
9156 test -d "/usr" && \
9157 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9158         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9159         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9160         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9161         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9162         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9163         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9164 }
9165
9166 test "x$prefix" != "xNONE" && \
9167 test -d "$prefix" && \
9168  {
9169         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9170         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9171         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9172         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9173         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9174         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9175 }
9176
9177 test "x/usr/local" != "x$prefix" && \
9178 test -d "/usr/local" && \
9179 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9180         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9181         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9182         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9183         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9184         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9185         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9186 }
9187
9188 test "x/opt" != "x$prefix" && \
9189 test -d "/opt" && \
9190 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9191         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9192         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9193         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9194         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9195         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9196         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9197 }
9198
9199 test "x$HOME" != "x$prefix" && \
9200 test -d "$HOME" && \
9201 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9202         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9203         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9204         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9205         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9206         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9207         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9208 }
9209
9210 test "$includedir" != NONE && \
9211 test "$includedir" != "/usr/include" && \
9212 test -d "$includedir" && {
9213         test -d $includedir &&    cf_search="$cf_search $includedir"
9214         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9215 }
9216
9217 test "$oldincludedir" != NONE && \
9218 test "$oldincludedir" != "/usr/include" && \
9219 test -d "$oldincludedir" && {
9220         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9221         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9222 }
9223
9224 cf_search="$cf_search $cf_header_path_list"
9225
9226     for cf_cv_header_path_utf8 in $cf_search
9227     do
9228       if test -d $cf_cv_header_path_utf8 ; then
9229         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9230
9231 echo "${as_me:-configure}:9231: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9232
9233         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9234         cat >conftest.$ac_ext <<_ACEOF
9235 #line 9235 "configure"
9236 #include "confdefs.h"
9237
9238 #include <libutf8.h>
9239 int
9240 main ()
9241 {
9242 putwc(0,0);
9243   ;
9244   return 0;
9245 }
9246 _ACEOF
9247 rm -f conftest.$ac_objext
9248 if { (eval echo "$as_me:9248: \"$ac_compile\"") >&5
9249   (eval $ac_compile) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); } &&
9253          { ac_try='test -s conftest.$ac_objext'
9254   { (eval echo "$as_me:9254: \"$ac_try\"") >&5
9255   (eval $ac_try) 2>&5
9256   ac_status=$?
9257   echo "$as_me:9257: \$? = $ac_status" >&5
9258   (exit $ac_status); }; }; then
9259
9260             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9261
9262 echo "${as_me:-configure}:9262: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9263
9264             cf_cv_find_linkage_utf8=maybe
9265             cf_test_CPPFLAGS="$CPPFLAGS"
9266             break
9267 else
9268   echo "$as_me: failed program was:" >&5
9269 cat conftest.$ac_ext >&5
9270
9271             CPPFLAGS="$cf_save_CPPFLAGS"
9272
9273 fi
9274 rm -f conftest.$ac_objext conftest.$ac_ext
9275       fi
9276     done
9277
9278     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9279
9280 echo "${as_me:-configure}:9280: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9281
9282       cf_save_LIBS="$LIBS"
9283       cf_save_LDFLAGS="$LDFLAGS"
9284
9285       if test "$cf_cv_find_linkage_utf8" != yes ; then
9286
9287 cf_search=
9288 cf_library_path_list=""
9289 if test -n "${LDFLAGS}${LIBS}" ; then
9290         for cf_library_path in $LDFLAGS $LIBS
9291         do
9292                 case $cf_library_path in #(vi
9293                 -L*)
9294                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9295
9296 test "x$cf_library_path" != "xNONE" && \
9297 test -d "$cf_library_path" && \
9298  {
9299         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9300         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9301         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9302         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9303         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9304         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9305 }
9306
9307                         cf_library_path_list="$cf_library_path_list $cf_search"
9308                         ;;
9309                 esac
9310         done
9311 fi
9312
9313 cf_search=
9314
9315 test "x/usr" != "x$prefix" && \
9316 test -d "/usr" && \
9317 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9318         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9319         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9320         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9321         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9322         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9323         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9324 }
9325
9326 test "x$prefix" != "xNONE" && \
9327 test -d "$prefix" && \
9328  {
9329         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9330         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9331         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9332         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9333         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9334         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9335 }
9336
9337 test "x/usr/local" != "x$prefix" && \
9338 test -d "/usr/local" && \
9339 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9340         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9341         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9342         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9343         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9344         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9345         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9346 }
9347
9348 test "x/opt" != "x$prefix" && \
9349 test -d "/opt" && \
9350 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9351         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9352         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9353         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9354         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9355         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9356         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9357 }
9358
9359 test "x$HOME" != "x$prefix" && \
9360 test -d "$HOME" && \
9361 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9362         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9363         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9364         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9365         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9366         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9367         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9368 }
9369
9370 cf_search="$cf_library_path_list $cf_search"
9371
9372         for cf_cv_library_path_utf8 in $cf_search
9373         do
9374           if test -d $cf_cv_library_path_utf8 ; then
9375             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9376
9377 echo "${as_me:-configure}:9377: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9378
9379             CPPFLAGS="$cf_test_CPPFLAGS"
9380             LIBS="-lutf8  $cf_save_LIBS"
9381             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9382             cat >conftest.$ac_ext <<_ACEOF
9383 #line 9383 "configure"
9384 #include "confdefs.h"
9385
9386 #include <libutf8.h>
9387 int
9388 main ()
9389 {
9390 putwc(0,0);
9391   ;
9392   return 0;
9393 }
9394 _ACEOF
9395 rm -f conftest.$ac_objext conftest$ac_exeext
9396 if { (eval echo "$as_me:9396: \"$ac_link\"") >&5
9397   (eval $ac_link) 2>&5
9398   ac_status=$?
9399   echo "$as_me:9399: \$? = $ac_status" >&5
9400   (exit $ac_status); } &&
9401          { ac_try='test -s conftest$ac_exeext'
9402   { (eval echo "$as_me:9402: \"$ac_try\"") >&5
9403   (eval $ac_try) 2>&5
9404   ac_status=$?
9405   echo "$as_me:9405: \$? = $ac_status" >&5
9406   (exit $ac_status); }; }; then
9407
9408                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9409
9410 echo "${as_me:-configure}:9410: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9411
9412                 cf_cv_find_linkage_utf8=yes
9413                 cf_cv_library_file_utf8="-lutf8"
9414                 break
9415 else
9416   echo "$as_me: failed program was:" >&5
9417 cat conftest.$ac_ext >&5
9418
9419                 CPPFLAGS="$cf_save_CPPFLAGS"
9420                 LIBS="$cf_save_LIBS"
9421                 LDFLAGS="$cf_save_LDFLAGS"
9422
9423 fi
9424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9425           fi
9426         done
9427         CPPFLAGS="$cf_save_CPPFLAGS"
9428         LDFLAGS="$cf_save_LDFLAGS"
9429       fi
9430
9431     else
9432       cf_cv_find_linkage_utf8=no
9433     fi
9434
9435 fi
9436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9437
9438 fi
9439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9440
9441 LIBS="$cf_save_LIBS"
9442
9443 if test "$cf_cv_find_linkage_utf8" = yes ; then
9444 cf_cv_utf8_lib=add-on
9445 else
9446 cf_cv_utf8_lib=no
9447 fi
9448
9449 fi
9450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9451 fi
9452 echo "$as_me:9452: result: $cf_cv_utf8_lib" >&5
9453 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9454
9455 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9456 # ncurses/ncursesw:
9457 if test "$cf_cv_utf8_lib" = "add-on" ; then
9458
9459 cat >>confdefs.h <<\EOF
9460 #define HAVE_LIBUTF8_H 1
9461 EOF
9462
9463 if test -n "$cf_cv_header_path_utf8" ; then
9464   for cf_add_incdir in $cf_cv_header_path_utf8
9465   do
9466         while test $cf_add_incdir != /usr/include
9467         do
9468           if test -d $cf_add_incdir
9469           then
9470                 cf_have_incdir=no
9471                 if test -n "$CFLAGS$CPPFLAGS" ; then
9472                   # a loop is needed to ensure we can add subdirs of existing dirs
9473                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9474                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9475                           cf_have_incdir=yes; break
9476                         fi
9477                   done
9478                 fi
9479
9480                 if test "$cf_have_incdir" = no ; then
9481                   if test "$cf_add_incdir" = /usr/local/include ; then
9482                         if test "$GCC" = yes
9483                         then
9484                           cf_save_CPPFLAGS=$CPPFLAGS
9485                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9486                           cat >conftest.$ac_ext <<_ACEOF
9487 #line 9487 "configure"
9488 #include "confdefs.h"
9489 #include <stdio.h>
9490 int
9491 main ()
9492 {
9493 printf("Hello")
9494   ;
9495   return 0;
9496 }
9497 _ACEOF
9498 rm -f conftest.$ac_objext
9499 if { (eval echo "$as_me:9499: \"$ac_compile\"") >&5
9500   (eval $ac_compile) 2>&5
9501   ac_status=$?
9502   echo "$as_me:9502: \$? = $ac_status" >&5
9503   (exit $ac_status); } &&
9504          { ac_try='test -s conftest.$ac_objext'
9505   { (eval echo "$as_me:9505: \"$ac_try\"") >&5
9506   (eval $ac_try) 2>&5
9507   ac_status=$?
9508   echo "$as_me:9508: \$? = $ac_status" >&5
9509   (exit $ac_status); }; }; then
9510   :
9511 else
9512   echo "$as_me: failed program was:" >&5
9513 cat conftest.$ac_ext >&5
9514 cf_have_incdir=yes
9515 fi
9516 rm -f conftest.$ac_objext conftest.$ac_ext
9517                           CPPFLAGS=$cf_save_CPPFLAGS
9518                         fi
9519                   fi
9520                 fi
9521
9522                 if test "$cf_have_incdir" = no ; then
9523                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9524
9525 echo "${as_me:-configure}:9525: testing adding $cf_add_incdir to include-path ..." 1>&5
9526
9527                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9528
9529                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9530                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9531                   cf_add_incdir="$cf_top_incdir"
9532                 else
9533                   break
9534                 fi
9535           fi
9536         done
9537   done
9538 fi
9539
9540 if test -n "$cf_cv_library_path_utf8" ; then
9541   for cf_add_libdir in $cf_cv_library_path_utf8
9542   do
9543     if test $cf_add_libdir = /usr/lib ; then
9544       :
9545     elif test -d $cf_add_libdir
9546     then
9547       cf_have_libdir=no
9548       if test -n "$LDFLAGS$LIBS" ; then
9549         # a loop is needed to ensure we can add subdirs of existing dirs
9550         for cf_test_libdir in $LDFLAGS $LIBS ; do
9551           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9552             cf_have_libdir=yes; break
9553           fi
9554         done
9555       fi
9556       if test "$cf_have_libdir" = no ; then
9557         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9558
9559 echo "${as_me:-configure}:9559: testing adding $cf_add_libdir to library-path ..." 1>&5
9560
9561         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9562       fi
9563     fi
9564   done
9565 fi
9566
9567 cf_add_libs="$cf_cv_library_file_utf8"
9568 # Filter out duplicates - this happens with badly-designed ".pc" files...
9569 for cf_add_1lib in $LIBS
9570 do
9571         for cf_add_2lib in $cf_add_libs
9572         do
9573                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9574                 then
9575                         cf_add_1lib=
9576                         break
9577                 fi
9578         done
9579         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9580 done
9581 LIBS="$cf_add_libs"
9582
9583 fi
9584
9585                 if test "$cf_cv_utf8_lib" != no ; then
9586                         NCURSES_LIBUTF8=1
9587                 fi
9588         fi
9589
9590 # This is needed on Tru64 5.0 to declare mbstate_t
9591 echo "$as_me:9591: checking if we must include wchar.h to declare mbstate_t" >&5
9592 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9593 if test "${cf_cv_mbstate_t+set}" = set; then
9594   echo $ECHO_N "(cached) $ECHO_C" >&6
9595 else
9596
9597 cat >conftest.$ac_ext <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600
9601 #include <stdlib.h>
9602 #include <stdarg.h>
9603 #include <stdio.h>
9604 #ifdef HAVE_LIBUTF8_H
9605 #include <libutf8.h>
9606 #endif
9607 int
9608 main ()
9609 {
9610 mbstate_t state
9611   ;
9612   return 0;
9613 }
9614 _ACEOF
9615 rm -f conftest.$ac_objext
9616 if { (eval echo "$as_me:9616: \"$ac_compile\"") >&5
9617   (eval $ac_compile) 2>&5
9618   ac_status=$?
9619   echo "$as_me:9619: \$? = $ac_status" >&5
9620   (exit $ac_status); } &&
9621          { ac_try='test -s conftest.$ac_objext'
9622   { (eval echo "$as_me:9622: \"$ac_try\"") >&5
9623   (eval $ac_try) 2>&5
9624   ac_status=$?
9625   echo "$as_me:9625: \$? = $ac_status" >&5
9626   (exit $ac_status); }; }; then
9627   cf_cv_mbstate_t=no
9628 else
9629   echo "$as_me: failed program was:" >&5
9630 cat conftest.$ac_ext >&5
9631 cat >conftest.$ac_ext <<_ACEOF
9632 #line 9632 "configure"
9633 #include "confdefs.h"
9634
9635 #include <stdlib.h>
9636 #include <stdarg.h>
9637 #include <stdio.h>
9638 #include <wchar.h>
9639 #ifdef HAVE_LIBUTF8_H
9640 #include <libutf8.h>
9641 #endif
9642 int
9643 main ()
9644 {
9645 mbstate_t value
9646   ;
9647   return 0;
9648 }
9649 _ACEOF
9650 rm -f conftest.$ac_objext
9651 if { (eval echo "$as_me:9651: \"$ac_compile\"") >&5
9652   (eval $ac_compile) 2>&5
9653   ac_status=$?
9654   echo "$as_me:9654: \$? = $ac_status" >&5
9655   (exit $ac_status); } &&
9656          { ac_try='test -s conftest.$ac_objext'
9657   { (eval echo "$as_me:9657: \"$ac_try\"") >&5
9658   (eval $ac_try) 2>&5
9659   ac_status=$?
9660   echo "$as_me:9660: \$? = $ac_status" >&5
9661   (exit $ac_status); }; }; then
9662   cf_cv_mbstate_t=yes
9663 else
9664   echo "$as_me: failed program was:" >&5
9665 cat conftest.$ac_ext >&5
9666 cf_cv_mbstate_t=unknown
9667 fi
9668 rm -f conftest.$ac_objext conftest.$ac_ext
9669 fi
9670 rm -f conftest.$ac_objext conftest.$ac_ext
9671 fi
9672 echo "$as_me:9672: result: $cf_cv_mbstate_t" >&5
9673 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9674
9675 if test "$cf_cv_mbstate_t" = yes ; then
9676
9677 cat >>confdefs.h <<\EOF
9678 #define NEED_WCHAR_H 1
9679 EOF
9680
9681         NEED_WCHAR_H=1
9682 fi
9683
9684 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9685 if test "$cf_cv_mbstate_t" = unknown ; then
9686         NCURSES_MBSTATE_T=1
9687 fi
9688
9689 # This is needed on Tru64 5.0 to declare wchar_t
9690 echo "$as_me:9690: checking if we must include wchar.h to declare wchar_t" >&5
9691 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9692 if test "${cf_cv_wchar_t+set}" = set; then
9693   echo $ECHO_N "(cached) $ECHO_C" >&6
9694 else
9695
9696 cat >conftest.$ac_ext <<_ACEOF
9697 #line 9697 "configure"
9698 #include "confdefs.h"
9699
9700 #include <stdlib.h>
9701 #include <stdarg.h>
9702 #include <stdio.h>
9703 #ifdef HAVE_LIBUTF8_H
9704 #include <libutf8.h>
9705 #endif
9706 int
9707 main ()
9708 {
9709 wchar_t state
9710   ;
9711   return 0;
9712 }
9713 _ACEOF
9714 rm -f conftest.$ac_objext
9715 if { (eval echo "$as_me:9715: \"$ac_compile\"") >&5
9716   (eval $ac_compile) 2>&5
9717   ac_status=$?
9718   echo "$as_me:9718: \$? = $ac_status" >&5
9719   (exit $ac_status); } &&
9720          { ac_try='test -s conftest.$ac_objext'
9721   { (eval echo "$as_me:9721: \"$ac_try\"") >&5
9722   (eval $ac_try) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); }; }; then
9726   cf_cv_wchar_t=no
9727 else
9728   echo "$as_me: failed program was:" >&5
9729 cat conftest.$ac_ext >&5
9730 cat >conftest.$ac_ext <<_ACEOF
9731 #line 9731 "configure"
9732 #include "confdefs.h"
9733
9734 #include <stdlib.h>
9735 #include <stdarg.h>
9736 #include <stdio.h>
9737 #include <wchar.h>
9738 #ifdef HAVE_LIBUTF8_H
9739 #include <libutf8.h>
9740 #endif
9741 int
9742 main ()
9743 {
9744 wchar_t value
9745   ;
9746   return 0;
9747 }
9748 _ACEOF
9749 rm -f conftest.$ac_objext
9750 if { (eval echo "$as_me:9750: \"$ac_compile\"") >&5
9751   (eval $ac_compile) 2>&5
9752   ac_status=$?
9753   echo "$as_me:9753: \$? = $ac_status" >&5
9754   (exit $ac_status); } &&
9755          { ac_try='test -s conftest.$ac_objext'
9756   { (eval echo "$as_me:9756: \"$ac_try\"") >&5
9757   (eval $ac_try) 2>&5
9758   ac_status=$?
9759   echo "$as_me:9759: \$? = $ac_status" >&5
9760   (exit $ac_status); }; }; then
9761   cf_cv_wchar_t=yes
9762 else
9763   echo "$as_me: failed program was:" >&5
9764 cat conftest.$ac_ext >&5
9765 cf_cv_wchar_t=unknown
9766 fi
9767 rm -f conftest.$ac_objext conftest.$ac_ext
9768 fi
9769 rm -f conftest.$ac_objext conftest.$ac_ext
9770 fi
9771 echo "$as_me:9771: result: $cf_cv_wchar_t" >&5
9772 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9773
9774 if test "$cf_cv_wchar_t" = yes ; then
9775
9776 cat >>confdefs.h <<\EOF
9777 #define NEED_WCHAR_H 1
9778 EOF
9779
9780         NEED_WCHAR_H=1
9781 fi
9782
9783 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9784 if test "$cf_cv_wchar_t" = unknown ; then
9785         NCURSES_WCHAR_T=1
9786 fi
9787
9788 # if we find wchar_t in either place, use substitution to provide a fallback.
9789 if test "$cf_cv_wchar_t" != unknown ; then
9790         NCURSES_OK_WCHAR_T=1
9791 fi
9792
9793 # This is needed on Tru64 5.0 to declare wint_t
9794 echo "$as_me:9794: checking if we must include wchar.h to declare wint_t" >&5
9795 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9796 if test "${cf_cv_wint_t+set}" = set; then
9797   echo $ECHO_N "(cached) $ECHO_C" >&6
9798 else
9799
9800 cat >conftest.$ac_ext <<_ACEOF
9801 #line 9801 "configure"
9802 #include "confdefs.h"
9803
9804 #include <stdlib.h>
9805 #include <stdarg.h>
9806 #include <stdio.h>
9807 #ifdef HAVE_LIBUTF8_H
9808 #include <libutf8.h>
9809 #endif
9810 int
9811 main ()
9812 {
9813 wint_t state
9814   ;
9815   return 0;
9816 }
9817 _ACEOF
9818 rm -f conftest.$ac_objext
9819 if { (eval echo "$as_me:9819: \"$ac_compile\"") >&5
9820   (eval $ac_compile) 2>&5
9821   ac_status=$?
9822   echo "$as_me:9822: \$? = $ac_status" >&5
9823   (exit $ac_status); } &&
9824          { ac_try='test -s conftest.$ac_objext'
9825   { (eval echo "$as_me:9825: \"$ac_try\"") >&5
9826   (eval $ac_try) 2>&5
9827   ac_status=$?
9828   echo "$as_me:9828: \$? = $ac_status" >&5
9829   (exit $ac_status); }; }; then
9830   cf_cv_wint_t=no
9831 else
9832   echo "$as_me: failed program was:" >&5
9833 cat conftest.$ac_ext >&5
9834 cat >conftest.$ac_ext <<_ACEOF
9835 #line 9835 "configure"
9836 #include "confdefs.h"
9837
9838 #include <stdlib.h>
9839 #include <stdarg.h>
9840 #include <stdio.h>
9841 #include <wchar.h>
9842 #ifdef HAVE_LIBUTF8_H
9843 #include <libutf8.h>
9844 #endif
9845 int
9846 main ()
9847 {
9848 wint_t value
9849   ;
9850   return 0;
9851 }
9852 _ACEOF
9853 rm -f conftest.$ac_objext
9854 if { (eval echo "$as_me:9854: \"$ac_compile\"") >&5
9855   (eval $ac_compile) 2>&5
9856   ac_status=$?
9857   echo "$as_me:9857: \$? = $ac_status" >&5
9858   (exit $ac_status); } &&
9859          { ac_try='test -s conftest.$ac_objext'
9860   { (eval echo "$as_me:9860: \"$ac_try\"") >&5
9861   (eval $ac_try) 2>&5
9862   ac_status=$?
9863   echo "$as_me:9863: \$? = $ac_status" >&5
9864   (exit $ac_status); }; }; then
9865   cf_cv_wint_t=yes
9866 else
9867   echo "$as_me: failed program was:" >&5
9868 cat conftest.$ac_ext >&5
9869 cf_cv_wint_t=unknown
9870 fi
9871 rm -f conftest.$ac_objext conftest.$ac_ext
9872 fi
9873 rm -f conftest.$ac_objext conftest.$ac_ext
9874 fi
9875 echo "$as_me:9875: result: $cf_cv_wint_t" >&5
9876 echo "${ECHO_T}$cf_cv_wint_t" >&6
9877
9878 if test "$cf_cv_wint_t" = yes ; then
9879
9880 cat >>confdefs.h <<\EOF
9881 #define NEED_WCHAR_H 1
9882 EOF
9883
9884         NEED_WCHAR_H=1
9885 fi
9886
9887 # if we do not find wint_t in either place, use substitution to provide a fallback.
9888 if test "$cf_cv_wint_t" = unknown ; then
9889         NCURSES_WINT_T=1
9890 fi
9891
9892 # if we find wint_t in either place, use substitution to provide a fallback.
9893 if test "$cf_cv_wint_t" != unknown ; then
9894         NCURSES_OK_WINT_T=1
9895 fi
9896
9897         if test "$NCURSES_MBSTATE_T" != 0; then
9898
9899 cat >>confdefs.h <<\EOF
9900 #define NEED_MBSTATE_T_DEF 1
9901 EOF
9902
9903         fi
9904 fi
9905
9906 ###   use option --disable-lp64 to allow long chtype
9907 case $cf_cv_abi_version in
9908 [345]*)
9909         default_with_lp64=no
9910         ;;
9911 *)
9912         default_with_lp64=yes
9913         ;;
9914 esac
9915
9916 echo "$as_me:9916: checking whether to enable _LP64 definition in curses.h" >&5
9917 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9918
9919 # Check whether --enable-lp64 or --disable-lp64 was given.
9920 if test "${enable_lp64+set}" = set; then
9921   enableval="$enable_lp64"
9922   with_lp64=$enableval
9923 else
9924   with_lp64=$default_with_lp64
9925 fi;
9926 echo "$as_me:9926: result: $with_lp64" >&5
9927 echo "${ECHO_T}$with_lp64" >&6
9928
9929 if test "x$with_lp64" = xyes ; then
9930         cf_cv_enable_lp64=1
9931 else
9932         cf_cv_enable_lp64=0
9933 fi
9934
9935 # Check whether --enable-largefile or --disable-largefile was given.
9936 if test "${enable_largefile+set}" = set; then
9937   enableval="$enable_largefile"
9938
9939 fi;
9940 if test "$enable_largefile" != no; then
9941
9942   echo "$as_me:9942: checking for special C compiler options needed for large files" >&5
9943 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9944 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9945   echo $ECHO_N "(cached) $ECHO_C" >&6
9946 else
9947   ac_cv_sys_largefile_CC=no
9948      if test "$GCC" != yes; then
9949        ac_save_CC=$CC
9950        while :; do
9951          # IRIX 6.2 and later do not support large files by default,
9952          # so use the C compiler's -n32 option if that helps.
9953          cat >conftest.$ac_ext <<_ACEOF
9954 #line 9954 "configure"
9955 #include "confdefs.h"
9956 #include <sys/types.h>
9957  /* Check that off_t can represent 2**63 - 1 correctly.
9958     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9959     since some C++ compilers masquerading as C compilers
9960     incorrectly reject 9223372036854775807.  */
9961 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9962   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9963                        && LARGE_OFF_T % 2147483647 == 1)
9964                       ? 1 : -1];
9965 int
9966 main ()
9967 {
9968
9969   ;
9970   return 0;
9971 }
9972 _ACEOF
9973          rm -f conftest.$ac_objext
9974 if { (eval echo "$as_me:9974: \"$ac_compile\"") >&5
9975   (eval $ac_compile) 2>&5
9976   ac_status=$?
9977   echo "$as_me:9977: \$? = $ac_status" >&5
9978   (exit $ac_status); } &&
9979          { ac_try='test -s conftest.$ac_objext'
9980   { (eval echo "$as_me:9980: \"$ac_try\"") >&5
9981   (eval $ac_try) 2>&5
9982   ac_status=$?
9983   echo "$as_me:9983: \$? = $ac_status" >&5
9984   (exit $ac_status); }; }; then
9985   break
9986 else
9987   echo "$as_me: failed program was:" >&5
9988 cat conftest.$ac_ext >&5
9989 fi
9990 rm -f conftest.$ac_objext
9991          CC="$CC -n32"
9992          rm -f conftest.$ac_objext
9993 if { (eval echo "$as_me:9993: \"$ac_compile\"") >&5
9994   (eval $ac_compile) 2>&5
9995   ac_status=$?
9996   echo "$as_me:9996: \$? = $ac_status" >&5
9997   (exit $ac_status); } &&
9998          { ac_try='test -s conftest.$ac_objext'
9999   { (eval echo "$as_me:9999: \"$ac_try\"") >&5
10000   (eval $ac_try) 2>&5
10001   ac_status=$?
10002   echo "$as_me:10002: \$? = $ac_status" >&5
10003   (exit $ac_status); }; }; then
10004   ac_cv_sys_largefile_CC=' -n32'; break
10005 else
10006   echo "$as_me: failed program was:" >&5
10007 cat conftest.$ac_ext >&5
10008 fi
10009 rm -f conftest.$ac_objext
10010          break
10011        done
10012        CC=$ac_save_CC
10013        rm -f conftest.$ac_ext
10014     fi
10015 fi
10016 echo "$as_me:10016: result: $ac_cv_sys_largefile_CC" >&5
10017 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10018   if test "$ac_cv_sys_largefile_CC" != no; then
10019     CC=$CC$ac_cv_sys_largefile_CC
10020   fi
10021
10022   echo "$as_me:10022: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10023 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10024 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10025   echo $ECHO_N "(cached) $ECHO_C" >&6
10026 else
10027   while :; do
10028   ac_cv_sys_file_offset_bits=no
10029   cat >conftest.$ac_ext <<_ACEOF
10030 #line 10030 "configure"
10031 #include "confdefs.h"
10032 #include <sys/types.h>
10033  /* Check that off_t can represent 2**63 - 1 correctly.
10034     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10035     since some C++ compilers masquerading as C compilers
10036     incorrectly reject 9223372036854775807.  */
10037 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10038   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10039                        && LARGE_OFF_T % 2147483647 == 1)
10040                       ? 1 : -1];
10041 int
10042 main ()
10043 {
10044
10045   ;
10046   return 0;
10047 }
10048 _ACEOF
10049 rm -f conftest.$ac_objext
10050 if { (eval echo "$as_me:10050: \"$ac_compile\"") >&5
10051   (eval $ac_compile) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); } &&
10055          { ac_try='test -s conftest.$ac_objext'
10056   { (eval echo "$as_me:10056: \"$ac_try\"") >&5
10057   (eval $ac_try) 2>&5
10058   ac_status=$?
10059   echo "$as_me:10059: \$? = $ac_status" >&5
10060   (exit $ac_status); }; }; then
10061   break
10062 else
10063   echo "$as_me: failed program was:" >&5
10064 cat conftest.$ac_ext >&5
10065 fi
10066 rm -f conftest.$ac_objext conftest.$ac_ext
10067   cat >conftest.$ac_ext <<_ACEOF
10068 #line 10068 "configure"
10069 #include "confdefs.h"
10070 #define _FILE_OFFSET_BITS 64
10071 #include <sys/types.h>
10072  /* Check that off_t can represent 2**63 - 1 correctly.
10073     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10074     since some C++ compilers masquerading as C compilers
10075     incorrectly reject 9223372036854775807.  */
10076 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10077   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10078                        && LARGE_OFF_T % 2147483647 == 1)
10079                       ? 1 : -1];
10080 int
10081 main ()
10082 {
10083
10084   ;
10085   return 0;
10086 }
10087 _ACEOF
10088 rm -f conftest.$ac_objext
10089 if { (eval echo "$as_me:10089: \"$ac_compile\"") >&5
10090   (eval $ac_compile) 2>&5
10091   ac_status=$?
10092   echo "$as_me:10092: \$? = $ac_status" >&5
10093   (exit $ac_status); } &&
10094          { ac_try='test -s conftest.$ac_objext'
10095   { (eval echo "$as_me:10095: \"$ac_try\"") >&5
10096   (eval $ac_try) 2>&5
10097   ac_status=$?
10098   echo "$as_me:10098: \$? = $ac_status" >&5
10099   (exit $ac_status); }; }; then
10100   ac_cv_sys_file_offset_bits=64; break
10101 else
10102   echo "$as_me: failed program was:" >&5
10103 cat conftest.$ac_ext >&5
10104 fi
10105 rm -f conftest.$ac_objext conftest.$ac_ext
10106   break
10107 done
10108 fi
10109 echo "$as_me:10109: result: $ac_cv_sys_file_offset_bits" >&5
10110 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10111 if test "$ac_cv_sys_file_offset_bits" != no; then
10112
10113 cat >>confdefs.h <<EOF
10114 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10115 EOF
10116
10117 fi
10118 rm -rf conftest*
10119   echo "$as_me:10119: checking for _LARGE_FILES value needed for large files" >&5
10120 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10121 if test "${ac_cv_sys_large_files+set}" = set; then
10122   echo $ECHO_N "(cached) $ECHO_C" >&6
10123 else
10124   while :; do
10125   ac_cv_sys_large_files=no
10126   cat >conftest.$ac_ext <<_ACEOF
10127 #line 10127 "configure"
10128 #include "confdefs.h"
10129 #include <sys/types.h>
10130  /* Check that off_t can represent 2**63 - 1 correctly.
10131     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10132     since some C++ compilers masquerading as C compilers
10133     incorrectly reject 9223372036854775807.  */
10134 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10135   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10136                        && LARGE_OFF_T % 2147483647 == 1)
10137                       ? 1 : -1];
10138 int
10139 main ()
10140 {
10141
10142   ;
10143   return 0;
10144 }
10145 _ACEOF
10146 rm -f conftest.$ac_objext
10147 if { (eval echo "$as_me:10147: \"$ac_compile\"") >&5
10148   (eval $ac_compile) 2>&5
10149   ac_status=$?
10150   echo "$as_me:10150: \$? = $ac_status" >&5
10151   (exit $ac_status); } &&
10152          { ac_try='test -s conftest.$ac_objext'
10153   { (eval echo "$as_me:10153: \"$ac_try\"") >&5
10154   (eval $ac_try) 2>&5
10155   ac_status=$?
10156   echo "$as_me:10156: \$? = $ac_status" >&5
10157   (exit $ac_status); }; }; then
10158   break
10159 else
10160   echo "$as_me: failed program was:" >&5
10161 cat conftest.$ac_ext >&5
10162 fi
10163 rm -f conftest.$ac_objext conftest.$ac_ext
10164   cat >conftest.$ac_ext <<_ACEOF
10165 #line 10165 "configure"
10166 #include "confdefs.h"
10167 #define _LARGE_FILES 1
10168 #include <sys/types.h>
10169  /* Check that off_t can represent 2**63 - 1 correctly.
10170     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10171     since some C++ compilers masquerading as C compilers
10172     incorrectly reject 9223372036854775807.  */
10173 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10174   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10175                        && LARGE_OFF_T % 2147483647 == 1)
10176                       ? 1 : -1];
10177 int
10178 main ()
10179 {
10180
10181   ;
10182   return 0;
10183 }
10184 _ACEOF
10185 rm -f conftest.$ac_objext
10186 if { (eval echo "$as_me:10186: \"$ac_compile\"") >&5
10187   (eval $ac_compile) 2>&5
10188   ac_status=$?
10189   echo "$as_me:10189: \$? = $ac_status" >&5
10190   (exit $ac_status); } &&
10191          { ac_try='test -s conftest.$ac_objext'
10192   { (eval echo "$as_me:10192: \"$ac_try\"") >&5
10193   (eval $ac_try) 2>&5
10194   ac_status=$?
10195   echo "$as_me:10195: \$? = $ac_status" >&5
10196   (exit $ac_status); }; }; then
10197   ac_cv_sys_large_files=1; break
10198 else
10199   echo "$as_me: failed program was:" >&5
10200 cat conftest.$ac_ext >&5
10201 fi
10202 rm -f conftest.$ac_objext conftest.$ac_ext
10203   break
10204 done
10205 fi
10206 echo "$as_me:10206: result: $ac_cv_sys_large_files" >&5
10207 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10208 if test "$ac_cv_sys_large_files" != no; then
10209
10210 cat >>confdefs.h <<EOF
10211 #define _LARGE_FILES $ac_cv_sys_large_files
10212 EOF
10213
10214 fi
10215 rm -rf conftest*
10216 fi
10217
10218     if test "$enable_largefile" != no ; then
10219         echo "$as_me:10219: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10220 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10221 if test "${ac_cv_sys_largefile_source+set}" = set; then
10222   echo $ECHO_N "(cached) $ECHO_C" >&6
10223 else
10224   while :; do
10225   ac_cv_sys_largefile_source=no
10226   cat >conftest.$ac_ext <<_ACEOF
10227 #line 10227 "configure"
10228 #include "confdefs.h"
10229 #include <stdio.h>
10230 int
10231 main ()
10232 {
10233 return !fseeko;
10234   ;
10235   return 0;
10236 }
10237 _ACEOF
10238 rm -f conftest.$ac_objext
10239 if { (eval echo "$as_me:10239: \"$ac_compile\"") >&5
10240   (eval $ac_compile) 2>&5
10241   ac_status=$?
10242   echo "$as_me:10242: \$? = $ac_status" >&5
10243   (exit $ac_status); } &&
10244          { ac_try='test -s conftest.$ac_objext'
10245   { (eval echo "$as_me:10245: \"$ac_try\"") >&5
10246   (eval $ac_try) 2>&5
10247   ac_status=$?
10248   echo "$as_me:10248: \$? = $ac_status" >&5
10249   (exit $ac_status); }; }; then
10250   break
10251 else
10252   echo "$as_me: failed program was:" >&5
10253 cat conftest.$ac_ext >&5
10254 fi
10255 rm -f conftest.$ac_objext conftest.$ac_ext
10256   cat >conftest.$ac_ext <<_ACEOF
10257 #line 10257 "configure"
10258 #include "confdefs.h"
10259 #define _LARGEFILE_SOURCE 1
10260 #include <stdio.h>
10261 int
10262 main ()
10263 {
10264 return !fseeko;
10265   ;
10266   return 0;
10267 }
10268 _ACEOF
10269 rm -f conftest.$ac_objext
10270 if { (eval echo "$as_me:10270: \"$ac_compile\"") >&5
10271   (eval $ac_compile) 2>&5
10272   ac_status=$?
10273   echo "$as_me:10273: \$? = $ac_status" >&5
10274   (exit $ac_status); } &&
10275          { ac_try='test -s conftest.$ac_objext'
10276   { (eval echo "$as_me:10276: \"$ac_try\"") >&5
10277   (eval $ac_try) 2>&5
10278   ac_status=$?
10279   echo "$as_me:10279: \$? = $ac_status" >&5
10280   (exit $ac_status); }; }; then
10281   ac_cv_sys_largefile_source=1; break
10282 else
10283   echo "$as_me: failed program was:" >&5
10284 cat conftest.$ac_ext >&5
10285 fi
10286 rm -f conftest.$ac_objext conftest.$ac_ext
10287   break
10288 done
10289 fi
10290 echo "$as_me:10290: result: $ac_cv_sys_largefile_source" >&5
10291 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10292 if test "$ac_cv_sys_largefile_source" != no; then
10293
10294 cat >>confdefs.h <<EOF
10295 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10296 EOF
10297
10298 fi
10299 rm -rf conftest*
10300
10301 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10302 # in glibc 2.1.3, but that breaks too many other things.
10303 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10304 echo "$as_me:10304: checking for fseeko" >&5
10305 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10306 if test "${ac_cv_func_fseeko+set}" = set; then
10307   echo $ECHO_N "(cached) $ECHO_C" >&6
10308 else
10309   cat >conftest.$ac_ext <<_ACEOF
10310 #line 10310 "configure"
10311 #include "confdefs.h"
10312 #include <stdio.h>
10313 int
10314 main ()
10315 {
10316 return fseeko && fseeko (stdin, 0, 0);
10317   ;
10318   return 0;
10319 }
10320 _ACEOF
10321 rm -f conftest.$ac_objext conftest$ac_exeext
10322 if { (eval echo "$as_me:10322: \"$ac_link\"") >&5
10323   (eval $ac_link) 2>&5
10324   ac_status=$?
10325   echo "$as_me:10325: \$? = $ac_status" >&5
10326   (exit $ac_status); } &&
10327          { ac_try='test -s conftest$ac_exeext'
10328   { (eval echo "$as_me:10328: \"$ac_try\"") >&5
10329   (eval $ac_try) 2>&5
10330   ac_status=$?
10331   echo "$as_me:10331: \$? = $ac_status" >&5
10332   (exit $ac_status); }; }; then
10333   ac_cv_func_fseeko=yes
10334 else
10335   echo "$as_me: failed program was:" >&5
10336 cat conftest.$ac_ext >&5
10337 ac_cv_func_fseeko=no
10338 fi
10339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10340 fi
10341 echo "$as_me:10341: result: $ac_cv_func_fseeko" >&5
10342 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10343 if test $ac_cv_func_fseeko = yes; then
10344
10345 cat >>confdefs.h <<\EOF
10346 #define HAVE_FSEEKO 1
10347 EOF
10348
10349 fi
10350
10351         # Normally we would collect these definitions in the config.h,
10352         # but (like _XOPEN_SOURCE), some environments rely on having these
10353         # defined before any of the system headers are included.  Another
10354         # case comes up with C++, e.g., on AIX the compiler compiles the
10355         # header files by themselves before looking at the body files it is
10356         # told to compile.  For ncurses, those header files do not include
10357         # the config.h
10358         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10359         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10360         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10361
10362         echo "$as_me:10362: checking whether to use struct dirent64" >&5
10363 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10364 if test "${cf_cv_struct_dirent64+set}" = set; then
10365   echo $ECHO_N "(cached) $ECHO_C" >&6
10366 else
10367
10368                 cat >conftest.$ac_ext <<_ACEOF
10369 #line 10369 "configure"
10370 #include "confdefs.h"
10371
10372 #include <sys/types.h>
10373 #include <dirent.h>
10374
10375 int
10376 main ()
10377 {
10378
10379                 /* if transitional largefile support is setup, this is true */
10380                 extern struct dirent64 * readdir(DIR *);
10381                 struct dirent64 *x = readdir((DIR *)0);
10382                 struct dirent *y = readdir((DIR *)0);
10383                 int z = x - y;
10384
10385   ;
10386   return 0;
10387 }
10388 _ACEOF
10389 rm -f conftest.$ac_objext
10390 if { (eval echo "$as_me:10390: \"$ac_compile\"") >&5
10391   (eval $ac_compile) 2>&5
10392   ac_status=$?
10393   echo "$as_me:10393: \$? = $ac_status" >&5
10394   (exit $ac_status); } &&
10395          { ac_try='test -s conftest.$ac_objext'
10396   { (eval echo "$as_me:10396: \"$ac_try\"") >&5
10397   (eval $ac_try) 2>&5
10398   ac_status=$?
10399   echo "$as_me:10399: \$? = $ac_status" >&5
10400   (exit $ac_status); }; }; then
10401   cf_cv_struct_dirent64=yes
10402 else
10403   echo "$as_me: failed program was:" >&5
10404 cat conftest.$ac_ext >&5
10405 cf_cv_struct_dirent64=no
10406 fi
10407 rm -f conftest.$ac_objext conftest.$ac_ext
10408
10409 fi
10410 echo "$as_me:10410: result: $cf_cv_struct_dirent64" >&5
10411 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10412         test "$cf_cv_struct_dirent64" = yes &&
10413 cat >>confdefs.h <<\EOF
10414 #define HAVE_STRUCT_DIRENT64 1
10415 EOF
10416
10417     fi
10418
10419 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10420 echo "$as_me:10420: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10421 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10422
10423 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10424 if test "${enable_tparm_varargs+set}" = set; then
10425   enableval="$enable_tparm_varargs"
10426   with_tparm_varargs=$enableval
10427 else
10428   with_tparm_varargs=yes
10429 fi;
10430 echo "$as_me:10430: result: $with_tparm_varargs" >&5
10431 echo "${ECHO_T}$with_tparm_varargs" >&6
10432 NCURSES_TPARM_VARARGS=0
10433 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10434
10435 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10436 if test "$with_ticlib" != no ; then
10437 echo "$as_me:10437: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10438 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10439
10440 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10441 if test "${enable_tic_depends+set}" = set; then
10442   enableval="$enable_tic_depends"
10443   with_tic_depends=$enableval
10444 else
10445   with_tic_depends=yes
10446 fi;
10447 echo "$as_me:10447: result: $with_tic_depends" >&5
10448 echo "${ECHO_T}$with_tic_depends" >&6
10449 else
10450         with_tic_depends=no
10451 fi
10452
10453 ###   use option --with-bool to override bool's type
10454 echo "$as_me:10454: checking for type of bool" >&5
10455 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10456
10457 # Check whether --with-bool or --without-bool was given.
10458 if test "${with_bool+set}" = set; then
10459   withval="$with_bool"
10460   NCURSES_BOOL="$withval"
10461 else
10462   NCURSES_BOOL=auto
10463 fi;
10464 echo "$as_me:10464: result: $NCURSES_BOOL" >&5
10465 echo "${ECHO_T}$NCURSES_BOOL" >&6
10466
10467 echo "$as_me:10467: checking for alternate terminal capabilities file" >&5
10468 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10469
10470 # Check whether --with-caps or --without-caps was given.
10471 if test "${with_caps+set}" = set; then
10472   withval="$with_caps"
10473   TERMINFO_CAPS=Caps.$withval
10474 else
10475   TERMINFO_CAPS=Caps
10476 fi;
10477 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10478 echo "$as_me:10478: result: $TERMINFO_CAPS" >&5
10479 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10480
10481 ###   use option --with-chtype to override chtype's type
10482 echo "$as_me:10482: checking for type of chtype" >&5
10483 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10484
10485 # Check whether --with-chtype or --without-chtype was given.
10486 if test "${with_chtype+set}" = set; then
10487   withval="$with_chtype"
10488   NCURSES_CHTYPE="$withval"
10489 else
10490   NCURSES_CHTYPE=auto
10491 fi;
10492 echo "$as_me:10492: result: $NCURSES_CHTYPE" >&5
10493 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10494
10495 ###   use option --with-ospeed to override ospeed's type
10496 echo "$as_me:10496: checking for type of ospeed" >&5
10497 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10498
10499 # Check whether --with-ospeed or --without-ospeed was given.
10500 if test "${with_ospeed+set}" = set; then
10501   withval="$with_ospeed"
10502   NCURSES_OSPEED="$withval"
10503 else
10504   NCURSES_OSPEED=short
10505 fi;
10506 echo "$as_me:10506: result: $NCURSES_OSPEED" >&5
10507 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10508
10509 ###   use option --with-mmask-t to override mmask_t's type
10510 echo "$as_me:10510: checking for type of mmask_t" >&5
10511 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10512
10513 # Check whether --with-mmask-t or --without-mmask-t was given.
10514 if test "${with_mmask_t+set}" = set; then
10515   withval="$with_mmask_t"
10516   NCURSES_MMASK_T="$withval"
10517 else
10518   NCURSES_MMASK_T=auto
10519 fi;
10520 echo "$as_me:10520: result: $NCURSES_MMASK_T" >&5
10521 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10522
10523 ###   use option --with-ccharw-max to override CCHARW_MAX size
10524 echo "$as_me:10524: checking for size CCHARW_MAX" >&5
10525 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10526
10527 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10528 if test "${with_ccharw_max+set}" = set; then
10529   withval="$with_ccharw_max"
10530   NCURSES_CCHARW_MAX="$withval"
10531 else
10532   NCURSES_CCHARW_MAX=5
10533 fi;
10534 echo "$as_me:10534: result: $NCURSES_CCHARW_MAX" >&5
10535 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10536
10537 ###   use option --with-tparm-arg to override tparm's argument type
10538 echo "$as_me:10538: checking for type of tparm args" >&5
10539 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10540
10541 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10542 if test "${with_tparm_arg+set}" = set; then
10543   withval="$with_tparm_arg"
10544   NCURSES_TPARM_ARG="$withval"
10545 else
10546   NCURSES_TPARM_ARG=long
10547 fi;
10548 echo "$as_me:10548: result: $NCURSES_TPARM_ARG" >&5
10549 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10550
10551 ### Enable compiling-in rcs id's
10552 echo "$as_me:10552: checking if RCS identifiers should be compiled-in" >&5
10553 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10554
10555 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10556 if test "${with_rcs_ids+set}" = set; then
10557   withval="$with_rcs_ids"
10558   with_rcs_ids=$withval
10559 else
10560   with_rcs_ids=no
10561 fi;
10562 echo "$as_me:10562: result: $with_rcs_ids" >&5
10563 echo "${ECHO_T}$with_rcs_ids" >&6
10564 test "x$with_rcs_ids" = xyes &&
10565 cat >>confdefs.h <<\EOF
10566 #define USE_RCS_IDS 1
10567 EOF
10568
10569 ###############################################################################
10570
10571 echo "$as_me:10571: checking format of man-pages" >&5
10572 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10573
10574 # Check whether --with-manpage-format or --without-manpage-format was given.
10575 if test "${with_manpage_format+set}" = set; then
10576   withval="$with_manpage_format"
10577   MANPAGE_FORMAT=$withval
10578 else
10579   MANPAGE_FORMAT=unknown
10580 fi;
10581
10582 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10583 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10584
10585 cf_unknown=
10586
10587 case $MANPAGE_FORMAT in
10588 unknown)
10589   if test -z "$MANPATH" ; then
10590     MANPATH="/usr/man:/usr/share/man"
10591   fi
10592
10593   # look for the 'date' man-page (it's most likely to be installed!)
10594   MANPAGE_FORMAT=
10595   cf_preform=no
10596   cf_catonly=yes
10597   cf_example=date
10598
10599   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10600   for cf_dir in $MANPATH; do
10601     test -z "$cf_dir" && cf_dir=/usr/man
10602     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
10603     do
10604       cf_test=`echo $cf_name | sed -e 's/*//'`
10605       if test "x$cf_test" = "x$cf_name" ; then
10606
10607         case "$cf_name" in
10608         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10609         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10610         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10611         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10612         esac
10613
10614         case "$cf_name" in
10615         $cf_dir/man*)
10616           cf_catonly=no
10617           ;;
10618         $cf_dir/cat*)
10619           cf_preform=yes
10620           ;;
10621         esac
10622         break
10623       fi
10624
10625       # if we found a match in either man* or cat*, stop looking
10626       if test -n "$MANPAGE_FORMAT" ; then
10627         cf_found=no
10628         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10629         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10630         case "$cf_name" in
10631         $cf_dir/cat*)
10632           cf_found=yes
10633           ;;
10634         esac
10635         test $cf_found=yes && break
10636       fi
10637     done
10638     # only check the first directory in $MANPATH where we find manpages
10639     if test -n "$MANPAGE_FORMAT" ; then
10640        break
10641     fi
10642   done
10643   # if we did not find the example, just assume it is normal
10644   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10645   IFS="$ac_save_ifs"
10646   ;;
10647 *)
10648   for cf_option in $MANPAGE_FORMAT; do
10649      case $cf_option in #(vi
10650      gzip|compress|BSDI|normal|formatted|catonly)
10651        ;;
10652      *)
10653        cf_unknown="$cf_unknown $cf_option"
10654        ;;
10655      esac
10656   done
10657   ;;
10658 esac
10659
10660 echo "$as_me:10660: result: $MANPAGE_FORMAT" >&5
10661 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10662 if test -n "$cf_unknown" ; then
10663   { echo "$as_me:10663: WARNING: Unexpected manpage-format $cf_unknown" >&5
10664 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10665 fi
10666
10667 echo "$as_me:10667: checking for manpage renaming" >&5
10668 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10669
10670 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10671 if test "${with_manpage_renames+set}" = set; then
10672   withval="$with_manpage_renames"
10673   MANPAGE_RENAMES=$withval
10674 else
10675   MANPAGE_RENAMES=yes
10676 fi;
10677
10678 case ".$MANPAGE_RENAMES" in #(vi
10679 .no) #(vi
10680   ;;
10681 .|.yes)
10682   # Debian 'man' program?
10683   if test -f /etc/debian_version ; then
10684     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10685   else
10686     MANPAGE_RENAMES=no
10687   fi
10688   ;;
10689 esac
10690
10691 if test "$MANPAGE_RENAMES" != no ; then
10692   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10693     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10694   elif test ! -f $MANPAGE_RENAMES ; then
10695     { { echo "$as_me:10695: error: not a filename: $MANPAGE_RENAMES" >&5
10696 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10697    { (exit 1); exit 1; }; }
10698   fi
10699
10700   test ! -d man && mkdir man
10701
10702   # Construct a sed-script to perform renaming within man-pages
10703   if test -n "$MANPAGE_RENAMES" ; then
10704     test ! -d man && mkdir man
10705     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10706   fi
10707 fi
10708
10709 echo "$as_me:10709: result: $MANPAGE_RENAMES" >&5
10710 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10711
10712 echo "$as_me:10712: checking if manpage aliases will be installed" >&5
10713 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10714
10715 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10716 if test "${with_manpage_aliases+set}" = set; then
10717   withval="$with_manpage_aliases"
10718   MANPAGE_ALIASES=$withval
10719 else
10720   MANPAGE_ALIASES=yes
10721 fi;
10722
10723 echo "$as_me:10723: result: $MANPAGE_ALIASES" >&5
10724 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10725
10726 case "x$LN_S" in #(vi
10727 xln*) #(vi
10728         cf_use_symlinks=yes
10729         ;;
10730 *)
10731         cf_use_symlinks=no
10732         ;;
10733 esac
10734
10735 MANPAGE_SYMLINKS=no
10736 if test "$MANPAGE_ALIASES" = yes ; then
10737 echo "$as_me:10737: checking if manpage symlinks should be used" >&5
10738 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10739
10740 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10741 if test "${with_manpage_symlinks+set}" = set; then
10742   withval="$with_manpage_symlinks"
10743   MANPAGE_SYMLINKS=$withval
10744 else
10745   MANPAGE_SYMLINKS=$cf_use_symlinks
10746 fi;
10747
10748 if test "$$cf_use_symlinks" = no; then
10749 if test "$MANPAGE_SYMLINKS" = yes ; then
10750         { echo "$as_me:10750: WARNING: cannot make symlinks" >&5
10751 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10752         MANPAGE_SYMLINKS=no
10753 fi
10754 fi
10755
10756 echo "$as_me:10756: result: $MANPAGE_SYMLINKS" >&5
10757 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10758 fi
10759
10760 echo "$as_me:10760: checking for manpage tbl" >&5
10761 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10762
10763 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10764 if test "${with_manpage_tbl+set}" = set; then
10765   withval="$with_manpage_tbl"
10766   MANPAGE_TBL=$withval
10767 else
10768   MANPAGE_TBL=no
10769 fi;
10770
10771 echo "$as_me:10771: result: $MANPAGE_TBL" >&5
10772 echo "${ECHO_T}$MANPAGE_TBL" >&6
10773
10774   if test "$prefix" = "NONE" ; then
10775      cf_prefix="$ac_default_prefix"
10776   else
10777      cf_prefix="$prefix"
10778   fi
10779
10780   case "$MANPAGE_FORMAT" in # (vi
10781   *catonly*) # (vi
10782     cf_format=yes
10783     cf_inboth=no
10784     ;;
10785   *formatted*) # (vi
10786     cf_format=yes
10787     cf_inboth=yes
10788     ;;
10789   *)
10790     cf_format=no
10791     cf_inboth=no
10792     ;;
10793   esac
10794
10795 test ! -d man && mkdir man
10796
10797 cf_so_strip=
10798 cf_compress=
10799 case "$MANPAGE_FORMAT" in #(vi
10800 *compress*) #(vi
10801         cf_so_strip="Z"
10802         cf_compress=compress
10803   ;;
10804 *gzip*)
10805         cf_so_strip="gz"
10806         cf_compress=gzip
10807   ;;
10808 esac
10809
10810 cf_edit_man=./edit_man.sh
10811 cf_man_alias=`pwd`/man_alias.sed
10812
10813 cat >$cf_edit_man <<CF_EOF
10814 #! /bin/sh
10815 # this script is generated by the configure-script CF_MAN_PAGES macro.
10816
10817 prefix="$cf_prefix"
10818 datarootdir="$datarootdir"
10819 datadir="$datadir"
10820
10821 NCURSES_MAJOR="$NCURSES_MAJOR"
10822 NCURSES_MINOR="$NCURSES_MINOR"
10823 NCURSES_PATCH="$NCURSES_PATCH"
10824
10825 NCURSES_OSPEED="$NCURSES_OSPEED"
10826 TERMINFO="$TERMINFO"
10827
10828 INSTALL="$INSTALL"
10829 INSTALL_DATA="$INSTALL_DATA"
10830
10831 transform="$program_transform_name"
10832
10833 TMP=\${TMPDIR:=/tmp}/man\$\$
10834 trap "rm -f \$TMP" 0 1 2 5 15
10835
10836 form=\$1
10837 shift || exit 1
10838
10839 verb=\$1
10840 shift || exit 1
10841
10842 mandir=\$1
10843 shift || exit 1
10844
10845 srcdir=\$1
10846 top_srcdir=\$srcdir/..
10847 shift || exit 1
10848
10849 if test "\$form" = normal ; then
10850         if test "$cf_format" = yes ; then
10851         if test "$cf_inboth" = no ; then
10852                 sh \$0 format \$verb \$mandir \$srcdir \$*
10853                 exit $?
10854         fi
10855         fi
10856         cf_subdir=\$mandir/man
10857         cf_tables=$MANPAGE_TBL
10858 else
10859         cf_subdir=\$mandir/cat
10860         cf_tables=yes
10861 fi
10862
10863 # process the list of source-files
10864 for i in \$* ; do
10865 case \$i in #(vi
10866 *.orig|*.rej) ;; #(vi
10867 *.[0-9]*)
10868         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10869         if test \$verb = installing ; then
10870         if test ! -d \$cf_subdir\${section} ; then
10871                 mkdir -p \$cf_subdir\$section
10872         fi
10873         fi
10874
10875         # replace variables in man page
10876         if test ! -f $cf_man_alias ; then
10877 cat >>$cf_man_alias <<-CF_EOF2
10878                 s,@DATADIR@,\$datadir,g
10879                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10880                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10881                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10882                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10883                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10884                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10885 CF_EOF
10886
10887         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10888         do
10889                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10890                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10891 cat >>$cf_edit_man <<-CF_EOF
10892                 s,@$cf_NAME@,$cf_name,g
10893 CF_EOF
10894         done
10895
10896 cat >>$cf_edit_man <<CF_EOF
10897 CF_EOF2
10898                 echo "...made $cf_man_alias"
10899         fi
10900
10901         aliases=
10902         cf_source=\`basename \$i\`
10903         inalias=\$cf_source
10904         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10905         if test ! -f \$inalias ; then
10906                 echo .. skipped \$cf_source
10907                 continue
10908         fi
10909 CF_EOF
10910
10911 if test "$MANPAGE_ALIASES" != no ; then
10912 cat >>$cf_edit_man <<CF_EOF
10913         nCurses=ignore.3x
10914         test $with_curses_h = yes && nCurses=ncurses.3x
10915         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10916 CF_EOF
10917 fi
10918
10919 if test "$MANPAGE_RENAMES" = no ; then
10920 cat >>$cf_edit_man <<CF_EOF
10921         # perform program transformations for section 1 man pages
10922         if test \$section = 1 ; then
10923                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10924         else
10925                 cf_target=\$cf_subdir\${section}/\$cf_source
10926         fi
10927 CF_EOF
10928 else
10929 cat >>$cf_edit_man <<CF_EOF
10930         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10931         if test -z "\$cf_target" ; then
10932                 echo '? missing rename for '\$cf_source
10933                 cf_target="\$cf_source"
10934         fi
10935         cf_target="\$cf_subdir\${section}/\${cf_target}"
10936
10937 CF_EOF
10938 fi
10939
10940 cat >>$cf_edit_man <<CF_EOF
10941         sed     -f $cf_man_alias \\
10942 CF_EOF
10943
10944 if test -f $MANPAGE_RENAMES ; then
10945 cat >>$cf_edit_man <<CF_EOF
10946                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10947 CF_EOF
10948 else
10949 cat >>$cf_edit_man <<CF_EOF
10950                 < \$i >\$TMP
10951 CF_EOF
10952 fi
10953
10954 cat >>$cf_edit_man <<CF_EOF
10955 if test \$cf_tables = yes ; then
10956         tbl \$TMP >\$TMP.out
10957         mv \$TMP.out \$TMP
10958 fi
10959 CF_EOF
10960
10961 if test $with_overwrite != yes ; then
10962 cat >>$cf_edit_man <<CF_EOF
10963         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10964         mv \$TMP.out \$TMP
10965 CF_EOF
10966 fi
10967
10968 if test $with_curses_h != yes ; then
10969 cat >>$cf_edit_man <<CF_EOF
10970         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10971         mv \$TMP.out \$TMP
10972 CF_EOF
10973 fi
10974
10975 cat >>$cf_edit_man <<CF_EOF
10976         if test \$form = format ; then
10977                 nroff -man \$TMP >\$TMP.out
10978                 mv \$TMP.out \$TMP
10979         fi
10980 CF_EOF
10981
10982 if test -n "$cf_compress" ; then
10983 cat >>$cf_edit_man <<CF_EOF
10984         if test \$verb = installing ; then
10985         if ( $cf_compress -f \$TMP )
10986         then
10987                 mv \$TMP.$cf_so_strip \$TMP
10988         fi
10989         fi
10990         cf_target="\$cf_target.$cf_so_strip"
10991 CF_EOF
10992 fi
10993
10994 case "$MANPAGE_FORMAT" in #(vi
10995 *BSDI*)
10996 cat >>$cf_edit_man <<CF_EOF
10997         if test \$form = format ; then
10998                 # BSDI installs only .0 suffixes in the cat directories
10999                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11000         fi
11001 CF_EOF
11002   ;;
11003 esac
11004
11005 cat >>$cf_edit_man <<CF_EOF
11006         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11007         if test \$verb = installing ; then
11008                 echo \$verb \$cf_target
11009                 \$INSTALL_DATA \$TMP \$cf_target
11010                 test -d \$cf_subdir\${section} &&
11011                 test -n "\$aliases" && (
11012                         cd \$cf_subdir\${section} && (
11013                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11014                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11015                                 cf_target=\`basename \$cf_target\`
11016                                 for cf_alias in \$aliases
11017                                 do
11018                                         if test \$section = 1 ; then
11019                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11020                                         fi
11021
11022                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11023                                                 if test -f \$cf_alias\${suffix} ; then
11024                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11025                                                         then
11026                                                                 continue
11027                                                         fi
11028                                                 fi
11029                                                 echo .. \$verb alias \$cf_alias\${suffix}
11030 CF_EOF
11031 case "x$LN_S" in #(vi
11032 *-f) #(vi
11033 cat >>$cf_edit_man <<CF_EOF
11034                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11035 CF_EOF
11036         ;;
11037 *)
11038 cat >>$cf_edit_man <<CF_EOF
11039                                                 rm -f \$cf_alias\${suffix}
11040                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11041 CF_EOF
11042         ;;
11043 esac
11044 cat >>$cf_edit_man <<CF_EOF
11045                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11046                                                 echo ".so \$cf_source" >\$TMP
11047 CF_EOF
11048 if test -n "$cf_compress" ; then
11049 cat >>$cf_edit_man <<CF_EOF
11050                                                 if test -n "$cf_so_strip" ; then
11051                                                         $cf_compress -f \$TMP
11052                                                         mv \$TMP.$cf_so_strip \$TMP
11053                                                 fi
11054 CF_EOF
11055 fi
11056 cat >>$cf_edit_man <<CF_EOF
11057                                                 echo .. \$verb alias \$cf_alias\${suffix}
11058                                                 rm -f \$cf_alias\${suffix}
11059                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11060                                         fi
11061                                 done
11062                         )
11063                 )
11064         elif test \$verb = removing ; then
11065                 test -f \$cf_target && (
11066                         echo \$verb \$cf_target
11067                         rm -f \$cf_target
11068                 )
11069                 test -d \$cf_subdir\${section} &&
11070                 test -n "\$aliases" && (
11071                         cd \$cf_subdir\${section} && (
11072                                 for cf_alias in \$aliases
11073                                 do
11074                                         if test \$section = 1 ; then
11075                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11076                                         fi
11077
11078                                         echo .. \$verb alias \$cf_alias\${suffix}
11079                                         rm -f \$cf_alias\${suffix}
11080                                 done
11081                         )
11082                 )
11083         else
11084 #               echo ".hy 0"
11085                 cat \$TMP
11086         fi
11087         ;;
11088 esac
11089 done
11090
11091 if test $cf_inboth = yes ; then
11092 if test \$form != format ; then
11093         sh \$0 format \$verb \$mandir \$srcdir \$*
11094 fi
11095 fi
11096
11097 exit 0
11098 CF_EOF
11099 chmod 755 $cf_edit_man
11100
11101 ###############################################################################
11102
11103 ### Note that some functions (such as const) are normally disabled anyway.
11104 echo "$as_me:11104: checking if you want to build with function extensions" >&5
11105 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11106
11107 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11108 if test "${enable_ext_funcs+set}" = set; then
11109   enableval="$enable_ext_funcs"
11110   with_ext_funcs=$enableval
11111 else
11112   with_ext_funcs=yes
11113 fi;
11114 echo "$as_me:11114: result: $with_ext_funcs" >&5
11115 echo "${ECHO_T}$with_ext_funcs" >&6
11116 if test "x$with_ext_funcs" = xyes ; then
11117         NCURSES_EXT_FUNCS=1
11118
11119 cat >>confdefs.h <<\EOF
11120 #define HAVE_ASSUME_DEFAULT_COLORS 1
11121 EOF
11122
11123 cat >>confdefs.h <<\EOF
11124 #define HAVE_CURSES_VERSION 1
11125 EOF
11126
11127 cat >>confdefs.h <<\EOF
11128 #define HAVE_HAS_KEY 1
11129 EOF
11130
11131 cat >>confdefs.h <<\EOF
11132 #define HAVE_RESIZETERM 1
11133 EOF
11134
11135 cat >>confdefs.h <<\EOF
11136 #define HAVE_RESIZE_TERM 1
11137 EOF
11138
11139 cat >>confdefs.h <<\EOF
11140 #define HAVE_TERM_ENTRY_H 1
11141 EOF
11142
11143 cat >>confdefs.h <<\EOF
11144 #define HAVE_USE_DEFAULT_COLORS 1
11145 EOF
11146
11147 cat >>confdefs.h <<\EOF
11148 #define HAVE_USE_SCREEN 1
11149 EOF
11150
11151 cat >>confdefs.h <<\EOF
11152 #define HAVE_USE_WINDOW 1
11153 EOF
11154
11155 cat >>confdefs.h <<\EOF
11156 #define HAVE_WRESIZE 1
11157 EOF
11158
11159 cat >>confdefs.h <<\EOF
11160 #define NCURSES_EXT_FUNCS 1
11161 EOF
11162
11163         GENERATED_EXT_FUNCS=generated
11164 else
11165         NCURSES_EXT_FUNCS=0
11166         GENERATED_EXT_FUNCS=
11167 fi
11168
11169 echo "$as_me:11169: checking if you want to build with experimental SCREEN extensions" >&5
11170 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11171
11172 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11173 if test "${enable_sp_funcs+set}" = set; then
11174   enableval="$enable_sp_funcs"
11175   with_sp_funcs=$enableval
11176 else
11177   with_sp_funcs=no
11178 fi;
11179 echo "$as_me:11179: result: $with_sp_funcs" >&5
11180 echo "${ECHO_T}$with_sp_funcs" >&6
11181 if test "x$with_sp_funcs" = xyes ; then
11182         NCURSES_SP_FUNCS=1
11183
11184 cat >>confdefs.h <<\EOF
11185 #define NCURSES_SP_FUNCS 1
11186 EOF
11187
11188         GENERATED_SP_FUNCS=generated
11189 else
11190         NCURSES_SP_FUNCS=0
11191         GENERATED_SP_FUNCS=
11192 fi
11193
11194 echo "$as_me:11194: checking if you want to build with experimental terminal-driver" >&5
11195 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11196
11197 # Check whether --enable-term-driver or --disable-term-driver was given.
11198 if test "${enable_term_driver+set}" = set; then
11199   enableval="$enable_term_driver"
11200   with_term_driver=$enableval
11201 else
11202   with_term_driver=no
11203 fi;
11204 echo "$as_me:11204: result: $with_term_driver" >&5
11205 echo "${ECHO_T}$with_term_driver" >&6
11206 if test "x$with_term_driver" = xyes ; then
11207
11208 cat >>confdefs.h <<\EOF
11209 #define USE_TERM_DRIVER 1
11210 EOF
11211
11212         if test "x$with_sp_funcs" != xyes ; then
11213                 { { echo "$as_me:11213: error: The term-driver option relies upon sp-funcs" >&5
11214 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11215    { (exit 1); exit 1; }; }
11216         fi
11217 fi
11218
11219 ###   use option --enable-const to turn on use of const beyond that in XSI.
11220 echo "$as_me:11220: checking for extended use of const keyword" >&5
11221 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11222
11223 # Check whether --enable-const or --disable-const was given.
11224 if test "${enable_const+set}" = set; then
11225   enableval="$enable_const"
11226   with_ext_const=$enableval
11227 else
11228   with_ext_const=no
11229 fi;
11230 echo "$as_me:11230: result: $with_ext_const" >&5
11231 echo "${ECHO_T}$with_ext_const" >&6
11232 NCURSES_CONST='/*nothing*/'
11233 if test "x$with_ext_const" = xyes ; then
11234         NCURSES_CONST=const
11235 fi
11236
11237 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11238 echo "$as_me:11238: checking if you want to use extended colors" >&5
11239 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11240
11241 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11242 if test "${enable_ext_colors+set}" = set; then
11243   enableval="$enable_ext_colors"
11244   with_ext_colors=$enableval
11245 else
11246   with_ext_colors=no
11247 fi;
11248 echo "$as_me:11248: result: $with_ext_colors" >&5
11249 echo "${ECHO_T}$with_ext_colors" >&6
11250 NCURSES_EXT_COLORS=0
11251 if test "x$with_ext_colors" = xyes ; then
11252         if test "x$with_widec" != xyes ; then
11253                 { { echo "$as_me:11253: error: This option applies only to wide-character library" >&5
11254 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11255    { (exit 1); exit 1; }; }
11256         else
11257                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11258
11259 if test "${with_abi_version+set}" != set; then
11260         case $cf_cv_rel_version in
11261         5.*)
11262                 cf_cv_rel_version=6.0
11263                 cf_cv_abi_version=6
11264                 { echo "$as_me:11264: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11265 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11266                 ;;
11267         esac
11268 fi
11269
11270         fi
11271         NCURSES_EXT_COLORS=1
11272
11273 cat >>confdefs.h <<\EOF
11274 #define NCURSES_EXT_COLORS 1
11275 EOF
11276
11277 fi
11278
11279 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11280 echo "$as_me:11280: checking if you want to use extended mouse encoding" >&5
11281 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11282
11283 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11284 if test "${enable_ext_mouse+set}" = set; then
11285   enableval="$enable_ext_mouse"
11286   with_ext_mouse=$enableval
11287 else
11288   with_ext_mouse=no
11289 fi;
11290 echo "$as_me:11290: result: $with_ext_mouse" >&5
11291 echo "${ECHO_T}$with_ext_mouse" >&6
11292 NCURSES_MOUSE_VERSION=1
11293 if test "x$with_ext_mouse" = xyes ; then
11294         NCURSES_MOUSE_VERSION=2
11295
11296 if test "${with_abi_version+set}" != set; then
11297         case $cf_cv_rel_version in
11298         5.*)
11299                 cf_cv_rel_version=6.0
11300                 cf_cv_abi_version=6
11301                 { echo "$as_me:11301: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11302 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11303                 ;;
11304         esac
11305 fi
11306
11307 fi
11308
11309 echo "$as_me:11309: checking if you want \$NCURSES_NO_PADDING code" >&5
11310 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11311
11312 # Check whether --enable-no-padding or --disable-no-padding was given.
11313 if test "${enable_no_padding+set}" = set; then
11314   enableval="$enable_no_padding"
11315   with_no_padding=$enableval
11316 else
11317   with_no_padding=$with_ext_funcs
11318 fi;
11319 echo "$as_me:11319: result: $with_no_padding" >&5
11320 echo "${ECHO_T}$with_no_padding" >&6
11321 test "x$with_no_padding" = xyes &&
11322 cat >>confdefs.h <<\EOF
11323 #define NCURSES_NO_PADDING 1
11324 EOF
11325
11326 echo "$as_me:11326: checking for ANSI C header files" >&5
11327 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11328 if test "${ac_cv_header_stdc+set}" = set; then
11329   echo $ECHO_N "(cached) $ECHO_C" >&6
11330 else
11331   cat >conftest.$ac_ext <<_ACEOF
11332 #line 11332 "configure"
11333 #include "confdefs.h"
11334 #include <stdlib.h>
11335 #include <stdarg.h>
11336 #include <string.h>
11337 #include <float.h>
11338
11339 _ACEOF
11340 if { (eval echo "$as_me:11340: \"$ac_cpp conftest.$ac_ext\"") >&5
11341   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11342   ac_status=$?
11343   egrep -v '^ *\+' conftest.er1 >conftest.err
11344   rm -f conftest.er1
11345   cat conftest.err >&5
11346   echo "$as_me:11346: \$? = $ac_status" >&5
11347   (exit $ac_status); } >/dev/null; then
11348   if test -s conftest.err; then
11349     ac_cpp_err=$ac_c_preproc_warn_flag
11350   else
11351     ac_cpp_err=
11352   fi
11353 else
11354   ac_cpp_err=yes
11355 fi
11356 if test -z "$ac_cpp_err"; then
11357   ac_cv_header_stdc=yes
11358 else
11359   echo "$as_me: failed program was:" >&5
11360   cat conftest.$ac_ext >&5
11361   ac_cv_header_stdc=no
11362 fi
11363 rm -f conftest.err conftest.$ac_ext
11364
11365 if test $ac_cv_header_stdc = yes; then
11366   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11367   cat >conftest.$ac_ext <<_ACEOF
11368 #line 11368 "configure"
11369 #include "confdefs.h"
11370 #include <string.h>
11371
11372 _ACEOF
11373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11374   egrep "memchr" >/dev/null 2>&1; then
11375   :
11376 else
11377   ac_cv_header_stdc=no
11378 fi
11379 rm -rf conftest*
11380
11381 fi
11382
11383 if test $ac_cv_header_stdc = yes; then
11384   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11385   cat >conftest.$ac_ext <<_ACEOF
11386 #line 11386 "configure"
11387 #include "confdefs.h"
11388 #include <stdlib.h>
11389
11390 _ACEOF
11391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11392   egrep "free" >/dev/null 2>&1; then
11393   :
11394 else
11395   ac_cv_header_stdc=no
11396 fi
11397 rm -rf conftest*
11398
11399 fi
11400
11401 if test $ac_cv_header_stdc = yes; then
11402   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11403   if test "$cross_compiling" = yes; then
11404   :
11405 else
11406   cat >conftest.$ac_ext <<_ACEOF
11407 #line 11407 "configure"
11408 #include "confdefs.h"
11409 #include <ctype.h>
11410 #if ((' ' & 0x0FF) == 0x020)
11411 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11412 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11413 #else
11414 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11415                      || ('j' <= (c) && (c) <= 'r') \
11416                      || ('s' <= (c) && (c) <= 'z'))
11417 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11418 #endif
11419
11420 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11421 int
11422 main ()
11423 {
11424   int i;
11425   for (i = 0; i < 256; i++)
11426     if (XOR (islower (i), ISLOWER (i))
11427         || toupper (i) != TOUPPER (i))
11428       $ac_main_return(2);
11429   $ac_main_return (0);
11430 }
11431 _ACEOF
11432 rm -f conftest$ac_exeext
11433 if { (eval echo "$as_me:11433: \"$ac_link\"") >&5
11434   (eval $ac_link) 2>&5
11435   ac_status=$?
11436   echo "$as_me:11436: \$? = $ac_status" >&5
11437   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11438   { (eval echo "$as_me:11438: \"$ac_try\"") >&5
11439   (eval $ac_try) 2>&5
11440   ac_status=$?
11441   echo "$as_me:11441: \$? = $ac_status" >&5
11442   (exit $ac_status); }; }; then
11443   :
11444 else
11445   echo "$as_me: program exited with status $ac_status" >&5
11446 echo "$as_me: failed program was:" >&5
11447 cat conftest.$ac_ext >&5
11448 ac_cv_header_stdc=no
11449 fi
11450 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11451 fi
11452 fi
11453 fi
11454 echo "$as_me:11454: result: $ac_cv_header_stdc" >&5
11455 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11456 if test $ac_cv_header_stdc = yes; then
11457
11458 cat >>confdefs.h <<\EOF
11459 #define STDC_HEADERS 1
11460 EOF
11461
11462 fi
11463
11464 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11465
11466 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11467                   inttypes.h stdint.h unistd.h
11468 do
11469 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11470 echo "$as_me:11470: checking for $ac_header" >&5
11471 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11472 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11473   echo $ECHO_N "(cached) $ECHO_C" >&6
11474 else
11475   cat >conftest.$ac_ext <<_ACEOF
11476 #line 11476 "configure"
11477 #include "confdefs.h"
11478 $ac_includes_default
11479 #include <$ac_header>
11480 _ACEOF
11481 rm -f conftest.$ac_objext
11482 if { (eval echo "$as_me:11482: \"$ac_compile\"") >&5
11483   (eval $ac_compile) 2>&5
11484   ac_status=$?
11485   echo "$as_me:11485: \$? = $ac_status" >&5
11486   (exit $ac_status); } &&
11487          { ac_try='test -s conftest.$ac_objext'
11488   { (eval echo "$as_me:11488: \"$ac_try\"") >&5
11489   (eval $ac_try) 2>&5
11490   ac_status=$?
11491   echo "$as_me:11491: \$? = $ac_status" >&5
11492   (exit $ac_status); }; }; then
11493   eval "$as_ac_Header=yes"
11494 else
11495   echo "$as_me: failed program was:" >&5
11496 cat conftest.$ac_ext >&5
11497 eval "$as_ac_Header=no"
11498 fi
11499 rm -f conftest.$ac_objext conftest.$ac_ext
11500 fi
11501 echo "$as_me:11501: result: `eval echo '${'$as_ac_Header'}'`" >&5
11502 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11503 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11504   cat >>confdefs.h <<EOF
11505 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11506 EOF
11507
11508 fi
11509 done
11510
11511 echo "$as_me:11511: checking for signed char" >&5
11512 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11513 if test "${ac_cv_type_signed_char+set}" = set; then
11514   echo $ECHO_N "(cached) $ECHO_C" >&6
11515 else
11516   cat >conftest.$ac_ext <<_ACEOF
11517 #line 11517 "configure"
11518 #include "confdefs.h"
11519 $ac_includes_default
11520 int
11521 main ()
11522 {
11523 if ((signed char *) 0)
11524   return 0;
11525 if (sizeof (signed char))
11526   return 0;
11527   ;
11528   return 0;
11529 }
11530 _ACEOF
11531 rm -f conftest.$ac_objext
11532 if { (eval echo "$as_me:11532: \"$ac_compile\"") >&5
11533   (eval $ac_compile) 2>&5
11534   ac_status=$?
11535   echo "$as_me:11535: \$? = $ac_status" >&5
11536   (exit $ac_status); } &&
11537          { ac_try='test -s conftest.$ac_objext'
11538   { (eval echo "$as_me:11538: \"$ac_try\"") >&5
11539   (eval $ac_try) 2>&5
11540   ac_status=$?
11541   echo "$as_me:11541: \$? = $ac_status" >&5
11542   (exit $ac_status); }; }; then
11543   ac_cv_type_signed_char=yes
11544 else
11545   echo "$as_me: failed program was:" >&5
11546 cat conftest.$ac_ext >&5
11547 ac_cv_type_signed_char=no
11548 fi
11549 rm -f conftest.$ac_objext conftest.$ac_ext
11550 fi
11551 echo "$as_me:11551: result: $ac_cv_type_signed_char" >&5
11552 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11553
11554 echo "$as_me:11554: checking size of signed char" >&5
11555 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11556 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11557   echo $ECHO_N "(cached) $ECHO_C" >&6
11558 else
11559   if test "$ac_cv_type_signed_char" = yes; then
11560   if test "$cross_compiling" = yes; then
11561   # Depending upon the size, compute the lo and hi bounds.
11562 cat >conftest.$ac_ext <<_ACEOF
11563 #line 11563 "configure"
11564 #include "confdefs.h"
11565 $ac_includes_default
11566 int
11567 main ()
11568 {
11569 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11570   ;
11571   return 0;
11572 }
11573 _ACEOF
11574 rm -f conftest.$ac_objext
11575 if { (eval echo "$as_me:11575: \"$ac_compile\"") >&5
11576   (eval $ac_compile) 2>&5
11577   ac_status=$?
11578   echo "$as_me:11578: \$? = $ac_status" >&5
11579   (exit $ac_status); } &&
11580          { ac_try='test -s conftest.$ac_objext'
11581   { (eval echo "$as_me:11581: \"$ac_try\"") >&5
11582   (eval $ac_try) 2>&5
11583   ac_status=$?
11584   echo "$as_me:11584: \$? = $ac_status" >&5
11585   (exit $ac_status); }; }; then
11586   ac_lo=0 ac_mid=0
11587   while :; do
11588     cat >conftest.$ac_ext <<_ACEOF
11589 #line 11589 "configure"
11590 #include "confdefs.h"
11591 $ac_includes_default
11592 int
11593 main ()
11594 {
11595 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11596   ;
11597   return 0;
11598 }
11599 _ACEOF
11600 rm -f conftest.$ac_objext
11601 if { (eval echo "$as_me:11601: \"$ac_compile\"") >&5
11602   (eval $ac_compile) 2>&5
11603   ac_status=$?
11604   echo "$as_me:11604: \$? = $ac_status" >&5
11605   (exit $ac_status); } &&
11606          { ac_try='test -s conftest.$ac_objext'
11607   { (eval echo "$as_me:11607: \"$ac_try\"") >&5
11608   (eval $ac_try) 2>&5
11609   ac_status=$?
11610   echo "$as_me:11610: \$? = $ac_status" >&5
11611   (exit $ac_status); }; }; then
11612   ac_hi=$ac_mid; break
11613 else
11614   echo "$as_me: failed program was:" >&5
11615 cat conftest.$ac_ext >&5
11616 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11617 fi
11618 rm -f conftest.$ac_objext conftest.$ac_ext
11619   done
11620 else
11621   echo "$as_me: failed program was:" >&5
11622 cat conftest.$ac_ext >&5
11623 ac_hi=-1 ac_mid=-1
11624   while :; do
11625     cat >conftest.$ac_ext <<_ACEOF
11626 #line 11626 "configure"
11627 #include "confdefs.h"
11628 $ac_includes_default
11629 int
11630 main ()
11631 {
11632 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11633   ;
11634   return 0;
11635 }
11636 _ACEOF
11637 rm -f conftest.$ac_objext
11638 if { (eval echo "$as_me:11638: \"$ac_compile\"") >&5
11639   (eval $ac_compile) 2>&5
11640   ac_status=$?
11641   echo "$as_me:11641: \$? = $ac_status" >&5
11642   (exit $ac_status); } &&
11643          { ac_try='test -s conftest.$ac_objext'
11644   { (eval echo "$as_me:11644: \"$ac_try\"") >&5
11645   (eval $ac_try) 2>&5
11646   ac_status=$?
11647   echo "$as_me:11647: \$? = $ac_status" >&5
11648   (exit $ac_status); }; }; then
11649   ac_lo=$ac_mid; break
11650 else
11651   echo "$as_me: failed program was:" >&5
11652 cat conftest.$ac_ext >&5
11653 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11654 fi
11655 rm -f conftest.$ac_objext conftest.$ac_ext
11656   done
11657 fi
11658 rm -f conftest.$ac_objext conftest.$ac_ext
11659 # Binary search between lo and hi bounds.
11660 while test "x$ac_lo" != "x$ac_hi"; do
11661   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11662   cat >conftest.$ac_ext <<_ACEOF
11663 #line 11663 "configure"
11664 #include "confdefs.h"
11665 $ac_includes_default
11666 int
11667 main ()
11668 {
11669 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11670   ;
11671   return 0;
11672 }
11673 _ACEOF
11674 rm -f conftest.$ac_objext
11675 if { (eval echo "$as_me:11675: \"$ac_compile\"") >&5
11676   (eval $ac_compile) 2>&5
11677   ac_status=$?
11678   echo "$as_me:11678: \$? = $ac_status" >&5
11679   (exit $ac_status); } &&
11680          { ac_try='test -s conftest.$ac_objext'
11681   { (eval echo "$as_me:11681: \"$ac_try\"") >&5
11682   (eval $ac_try) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit $ac_status); }; }; then
11686   ac_hi=$ac_mid
11687 else
11688   echo "$as_me: failed program was:" >&5
11689 cat conftest.$ac_ext >&5
11690 ac_lo=`expr $ac_mid + 1`
11691 fi
11692 rm -f conftest.$ac_objext conftest.$ac_ext
11693 done
11694 ac_cv_sizeof_signed_char=$ac_lo
11695 else
11696   if test "$cross_compiling" = yes; then
11697   { { echo "$as_me:11697: error: cannot run test program while cross compiling" >&5
11698 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11699    { (exit 1); exit 1; }; }
11700 else
11701   cat >conftest.$ac_ext <<_ACEOF
11702 #line 11702 "configure"
11703 #include "confdefs.h"
11704 $ac_includes_default
11705 int
11706 main ()
11707 {
11708 FILE *f = fopen ("conftest.val", "w");
11709 if (!f)
11710   $ac_main_return (1);
11711 fprintf (f, "%d", (sizeof (signed char)));
11712 fclose (f);
11713   ;
11714   return 0;
11715 }
11716 _ACEOF
11717 rm -f conftest$ac_exeext
11718 if { (eval echo "$as_me:11718: \"$ac_link\"") >&5
11719   (eval $ac_link) 2>&5
11720   ac_status=$?
11721   echo "$as_me:11721: \$? = $ac_status" >&5
11722   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11723   { (eval echo "$as_me:11723: \"$ac_try\"") >&5
11724   (eval $ac_try) 2>&5
11725   ac_status=$?
11726   echo "$as_me:11726: \$? = $ac_status" >&5
11727   (exit $ac_status); }; }; then
11728   ac_cv_sizeof_signed_char=`cat conftest.val`
11729 else
11730   echo "$as_me: program exited with status $ac_status" >&5
11731 echo "$as_me: failed program was:" >&5
11732 cat conftest.$ac_ext >&5
11733 fi
11734 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11735 fi
11736 fi
11737 rm -f conftest.val
11738 else
11739   ac_cv_sizeof_signed_char=0
11740 fi
11741 fi
11742 echo "$as_me:11742: result: $ac_cv_sizeof_signed_char" >&5
11743 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11744 cat >>confdefs.h <<EOF
11745 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11746 EOF
11747
11748 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11749         NCURSES_SBOOL="signed char"
11750 else
11751         NCURSES_SBOOL="char"
11752 fi
11753 echo "$as_me:11753: checking if you want to use signed Boolean array in term.h" >&5
11754 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11755
11756 # Check whether --enable-signed-char or --disable-signed-char was given.
11757 if test "${enable_signed_char+set}" = set; then
11758   enableval="$enable_signed_char"
11759   with_signed_char=$enableval
11760 else
11761   with_signed_char=no
11762 fi;
11763 echo "$as_me:11763: result: $with_signed_char" >&5
11764 echo "${ECHO_T}$with_signed_char" >&6
11765 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11766
11767 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11768 echo "$as_me:11768: checking if you want SIGWINCH handler" >&5
11769 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11770
11771 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11772 if test "${enable_sigwinch+set}" = set; then
11773   enableval="$enable_sigwinch"
11774   with_sigwinch=$enableval
11775 else
11776   with_sigwinch=$with_ext_funcs
11777 fi;
11778 echo "$as_me:11778: result: $with_sigwinch" >&5
11779 echo "${ECHO_T}$with_sigwinch" >&6
11780 test "x$with_sigwinch" = xyes &&
11781 cat >>confdefs.h <<\EOF
11782 #define USE_SIGWINCH 1
11783 EOF
11784
11785 ###   use option --enable-tcap-names to allow user to define new capabilities
11786 echo "$as_me:11786: checking if you want user-definable terminal capabilities like termcap" >&5
11787 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11788
11789 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11790 if test "${enable_tcap_names+set}" = set; then
11791   enableval="$enable_tcap_names"
11792   with_tcap_names=$enableval
11793 else
11794   with_tcap_names=$with_ext_funcs
11795 fi;
11796 echo "$as_me:11796: result: $with_tcap_names" >&5
11797 echo "${ECHO_T}$with_tcap_names" >&6
11798 NCURSES_XNAMES=0
11799 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11800
11801 ###############################################################################
11802 # These options are relatively safe to experiment with.
11803
11804 echo "$as_me:11804: checking if you want all development code" >&5
11805 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11806
11807 # Check whether --with-develop or --without-develop was given.
11808 if test "${with_develop+set}" = set; then
11809   withval="$with_develop"
11810   with_develop=$withval
11811 else
11812   with_develop=no
11813 fi;
11814 echo "$as_me:11814: result: $with_develop" >&5
11815 echo "${ECHO_T}$with_develop" >&6
11816
11817 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11818 echo "$as_me:11818: checking if you want hard-tabs code" >&5
11819 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11820
11821 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11822 if test "${enable_hard_tabs+set}" = set; then
11823   enableval="$enable_hard_tabs"
11824
11825 else
11826   enable_hard_tabs=$with_develop
11827 fi;
11828 echo "$as_me:11828: result: $enable_hard_tabs" >&5
11829 echo "${ECHO_T}$enable_hard_tabs" >&6
11830 test "x$enable_hard_tabs" = xyes &&
11831 cat >>confdefs.h <<\EOF
11832 #define USE_HARD_TABS 1
11833 EOF
11834
11835 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11836 echo "$as_me:11836: checking if you want limited support for xmc" >&5
11837 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11838
11839 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11840 if test "${enable_xmc_glitch+set}" = set; then
11841   enableval="$enable_xmc_glitch"
11842
11843 else
11844   enable_xmc_glitch=$with_develop
11845 fi;
11846 echo "$as_me:11846: result: $enable_xmc_glitch" >&5
11847 echo "${ECHO_T}$enable_xmc_glitch" >&6
11848 test "x$enable_xmc_glitch" = xyes &&
11849 cat >>confdefs.h <<\EOF
11850 #define USE_XMC_SUPPORT 1
11851 EOF
11852
11853 ###############################################################################
11854 # These are just experimental, probably should not be in a package:
11855
11856 echo "$as_me:11856: checking if you do not want to assume colors are white-on-black" >&5
11857 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11858
11859 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11860 if test "${enable_assumed_color+set}" = set; then
11861   enableval="$enable_assumed_color"
11862   with_assumed_color=$enableval
11863 else
11864   with_assumed_color=yes
11865 fi;
11866 echo "$as_me:11866: result: $with_assumed_color" >&5
11867 echo "${ECHO_T}$with_assumed_color" >&6
11868 test "x$with_assumed_color" = xyes &&
11869 cat >>confdefs.h <<\EOF
11870 #define USE_ASSUMED_COLOR 1
11871 EOF
11872
11873 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11874 echo "$as_me:11874: checking if you want hashmap scrolling-optimization code" >&5
11875 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11876
11877 # Check whether --enable-hashmap or --disable-hashmap was given.
11878 if test "${enable_hashmap+set}" = set; then
11879   enableval="$enable_hashmap"
11880   with_hashmap=$enableval
11881 else
11882   with_hashmap=yes
11883 fi;
11884 echo "$as_me:11884: result: $with_hashmap" >&5
11885 echo "${ECHO_T}$with_hashmap" >&6
11886 test "x$with_hashmap" = xyes &&
11887 cat >>confdefs.h <<\EOF
11888 #define USE_HASHMAP 1
11889 EOF
11890
11891 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11892 echo "$as_me:11892: checking if you want colorfgbg code" >&5
11893 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11894
11895 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11896 if test "${enable_colorfgbg+set}" = set; then
11897   enableval="$enable_colorfgbg"
11898   with_colorfgbg=$enableval
11899 else
11900   with_colorfgbg=no
11901 fi;
11902 echo "$as_me:11902: result: $with_colorfgbg" >&5
11903 echo "${ECHO_T}$with_colorfgbg" >&6
11904 test "x$with_colorfgbg" = xyes &&
11905 cat >>confdefs.h <<\EOF
11906 #define USE_COLORFGBG 1
11907 EOF
11908
11909 ###   use option --enable-interop to turn on use of bindings used for interop
11910 echo "$as_me:11910: checking if you want interop bindings" >&5
11911 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11912
11913 # Check whether --enable-interop or --disable-interop was given.
11914 if test "${enable_interop+set}" = set; then
11915   enableval="$enable_interop"
11916   with_exp_interop=$enableval
11917 else
11918   with_exp_interop=no
11919 fi;
11920 echo "$as_me:11920: result: $with_exp_interop" >&5
11921 echo "${ECHO_T}$with_exp_interop" >&6
11922
11923 NCURSES_INTEROP_FUNCS=0
11924 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11925
11926 # This is still experimental (20080329), but should ultimately be moved to
11927 # the script-block --with-normal, etc.
11928
11929 echo "$as_me:11929: checking if you want to link with the pthread library" >&5
11930 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11931
11932 # Check whether --with-pthread or --without-pthread was given.
11933 if test "${with_pthread+set}" = set; then
11934   withval="$with_pthread"
11935   with_pthread=$withval
11936 else
11937   with_pthread=no
11938 fi;
11939 echo "$as_me:11939: result: $with_pthread" >&5
11940 echo "${ECHO_T}$with_pthread" >&6
11941
11942 if test "$with_pthread" != no ; then
11943     echo "$as_me:11943: checking for pthread.h" >&5
11944 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11945 if test "${ac_cv_header_pthread_h+set}" = set; then
11946   echo $ECHO_N "(cached) $ECHO_C" >&6
11947 else
11948   cat >conftest.$ac_ext <<_ACEOF
11949 #line 11949 "configure"
11950 #include "confdefs.h"
11951 #include <pthread.h>
11952 _ACEOF
11953 if { (eval echo "$as_me:11953: \"$ac_cpp conftest.$ac_ext\"") >&5
11954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11955   ac_status=$?
11956   egrep -v '^ *\+' conftest.er1 >conftest.err
11957   rm -f conftest.er1
11958   cat conftest.err >&5
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit $ac_status); } >/dev/null; then
11961   if test -s conftest.err; then
11962     ac_cpp_err=$ac_c_preproc_warn_flag
11963   else
11964     ac_cpp_err=
11965   fi
11966 else
11967   ac_cpp_err=yes
11968 fi
11969 if test -z "$ac_cpp_err"; then
11970   ac_cv_header_pthread_h=yes
11971 else
11972   echo "$as_me: failed program was:" >&5
11973   cat conftest.$ac_ext >&5
11974   ac_cv_header_pthread_h=no
11975 fi
11976 rm -f conftest.err conftest.$ac_ext
11977 fi
11978 echo "$as_me:11978: result: $ac_cv_header_pthread_h" >&5
11979 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11980 if test $ac_cv_header_pthread_h = yes; then
11981
11982 cat >>confdefs.h <<\EOF
11983 #define HAVE_PTHREADS_H 1
11984 EOF
11985
11986         for cf_lib_pthread in pthread c_r
11987         do
11988             echo "$as_me:11988: checking if we can link with the $cf_lib_pthread library" >&5
11989 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11990             cf_save_LIBS="$LIBS"
11991
11992 cf_add_libs="-l$cf_lib_pthread"
11993 # Filter out duplicates - this happens with badly-designed ".pc" files...
11994 for cf_add_1lib in $LIBS
11995 do
11996         for cf_add_2lib in $cf_add_libs
11997         do
11998                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11999                 then
12000                         cf_add_1lib=
12001                         break
12002                 fi
12003         done
12004         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12005 done
12006 LIBS="$cf_add_libs"
12007
12008             cat >conftest.$ac_ext <<_ACEOF
12009 #line 12009 "configure"
12010 #include "confdefs.h"
12011
12012 #include <pthread.h>
12013
12014 int
12015 main ()
12016 {
12017
12018                 int rc = pthread_create(0,0,0,0);
12019                 int r2 = pthread_mutexattr_settype(0, 0);
12020
12021   ;
12022   return 0;
12023 }
12024 _ACEOF
12025 rm -f conftest.$ac_objext conftest$ac_exeext
12026 if { (eval echo "$as_me:12026: \"$ac_link\"") >&5
12027   (eval $ac_link) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); } &&
12031          { ac_try='test -s conftest$ac_exeext'
12032   { (eval echo "$as_me:12032: \"$ac_try\"") >&5
12033   (eval $ac_try) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit $ac_status); }; }; then
12037   with_pthread=yes
12038 else
12039   echo "$as_me: failed program was:" >&5
12040 cat conftest.$ac_ext >&5
12041 with_pthread=no
12042 fi
12043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12044             LIBS="$cf_save_LIBS"
12045             echo "$as_me:12045: result: $with_pthread" >&5
12046 echo "${ECHO_T}$with_pthread" >&6
12047             test "$with_pthread" = yes && break
12048         done
12049
12050         if test "$with_pthread" = yes ; then
12051
12052 cf_add_libs="-l$cf_lib_pthread"
12053 # Filter out duplicates - this happens with badly-designed ".pc" files...
12054 for cf_add_1lib in $LIBS
12055 do
12056         for cf_add_2lib in $cf_add_libs
12057         do
12058                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12059                 then
12060                         cf_add_1lib=
12061                         break
12062                 fi
12063         done
12064         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12065 done
12066 LIBS="$cf_add_libs"
12067
12068 cat >>confdefs.h <<\EOF
12069 #define HAVE_LIBPTHREADS 1
12070 EOF
12071
12072         else
12073             { { echo "$as_me:12073: error: Cannot link with pthread library" >&5
12074 echo "$as_me: error: Cannot link with pthread library" >&2;}
12075    { (exit 1); exit 1; }; }
12076         fi
12077
12078 fi
12079
12080 fi
12081
12082 if test "x$with_pthread" != xno; then
12083         echo "$as_me:12083: checking for pthread_kill" >&5
12084 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12085 if test "${ac_cv_func_pthread_kill+set}" = set; then
12086   echo $ECHO_N "(cached) $ECHO_C" >&6
12087 else
12088   cat >conftest.$ac_ext <<_ACEOF
12089 #line 12089 "configure"
12090 #include "confdefs.h"
12091 /* System header to define __stub macros and hopefully few prototypes,
12092     which can conflict with char pthread_kill (); below.  */
12093 #include <assert.h>
12094 /* Override any gcc2 internal prototype to avoid an error.  */
12095 #ifdef __cplusplus
12096 extern "C"
12097 #endif
12098 /* We use char because int might match the return type of a gcc2
12099    builtin and then its argument prototype would still apply.  */
12100 char pthread_kill ();
12101 char (*f) ();
12102
12103 int
12104 main ()
12105 {
12106 /* The GNU C library defines this for functions which it implements
12107     to always fail with ENOSYS.  Some functions are actually named
12108     something starting with __ and the normal name is an alias.  */
12109 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12110 choke me
12111 #else
12112 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12113 #endif
12114
12115   ;
12116   return 0;
12117 }
12118 _ACEOF
12119 rm -f conftest.$ac_objext conftest$ac_exeext
12120 if { (eval echo "$as_me:12120: \"$ac_link\"") >&5
12121   (eval $ac_link) 2>&5
12122   ac_status=$?
12123   echo "$as_me:12123: \$? = $ac_status" >&5
12124   (exit $ac_status); } &&
12125          { ac_try='test -s conftest$ac_exeext'
12126   { (eval echo "$as_me:12126: \"$ac_try\"") >&5
12127   (eval $ac_try) 2>&5
12128   ac_status=$?
12129   echo "$as_me:12129: \$? = $ac_status" >&5
12130   (exit $ac_status); }; }; then
12131   ac_cv_func_pthread_kill=yes
12132 else
12133   echo "$as_me: failed program was:" >&5
12134 cat conftest.$ac_ext >&5
12135 ac_cv_func_pthread_kill=no
12136 fi
12137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12138 fi
12139 echo "$as_me:12139: result: $ac_cv_func_pthread_kill" >&5
12140 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12141 if test $ac_cv_func_pthread_kill = yes; then
12142
12143                 echo "$as_me:12143: checking if you want to allow EINTR in wgetch with pthreads" >&5
12144 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12145
12146 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12147 if test "${enable_pthreads_eintr+set}" = set; then
12148   enableval="$enable_pthreads_eintr"
12149   use_pthreads_eintr=$enableval
12150 else
12151   use_pthreads_eintr=no
12152 fi;
12153                 echo "$as_me:12153: result: $use_pthreads_eintr" >&5
12154 echo "${ECHO_T}$use_pthreads_eintr" >&6
12155                 if test "x$use_pthreads_eintr" = xyes ; then
12156
12157 cat >>confdefs.h <<\EOF
12158 #define USE_PTHREADS_EINTR 1
12159 EOF
12160
12161                 fi
12162 fi
12163
12164         echo "$as_me:12164: checking if you want to use weak-symbols for pthreads" >&5
12165 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12166
12167 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12168 if test "${enable_weak_symbols+set}" = set; then
12169   enableval="$enable_weak_symbols"
12170   use_weak_symbols=$enableval
12171 else
12172   use_weak_symbols=no
12173 fi;
12174         echo "$as_me:12174: result: $use_weak_symbols" >&5
12175 echo "${ECHO_T}$use_weak_symbols" >&6
12176         if test "x$use_weak_symbols" = xyes ; then
12177
12178 echo "$as_me:12178: checking if $CC supports weak symbols" >&5
12179 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12180 if test "${cf_cv_weak_symbols+set}" = set; then
12181   echo $ECHO_N "(cached) $ECHO_C" >&6
12182 else
12183
12184 cat >conftest.$ac_ext <<_ACEOF
12185 #line 12185 "configure"
12186 #include "confdefs.h"
12187
12188 #include <stdio.h>
12189 int
12190 main ()
12191 {
12192
12193 #if defined(__GNUC__)
12194 #  if defined __USE_ISOC99
12195 #    define _cat_pragma(exp)    _Pragma(#exp)
12196 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12197 #  else
12198 #    define _weak_pragma(exp)
12199 #  endif
12200 #  define _declare(name)        __extension__ extern __typeof__(name) name
12201 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12202 #endif
12203
12204 weak_symbol(fopen);
12205
12206   ;
12207   return 0;
12208 }
12209 _ACEOF
12210 rm -f conftest.$ac_objext
12211 if { (eval echo "$as_me:12211: \"$ac_compile\"") >&5
12212   (eval $ac_compile) 2>&5
12213   ac_status=$?
12214   echo "$as_me:12214: \$? = $ac_status" >&5
12215   (exit $ac_status); } &&
12216          { ac_try='test -s conftest.$ac_objext'
12217   { (eval echo "$as_me:12217: \"$ac_try\"") >&5
12218   (eval $ac_try) 2>&5
12219   ac_status=$?
12220   echo "$as_me:12220: \$? = $ac_status" >&5
12221   (exit $ac_status); }; }; then
12222   cf_cv_weak_symbols=yes
12223 else
12224   echo "$as_me: failed program was:" >&5
12225 cat conftest.$ac_ext >&5
12226 cf_cv_weak_symbols=no
12227 fi
12228 rm -f conftest.$ac_objext conftest.$ac_ext
12229
12230 fi
12231 echo "$as_me:12231: result: $cf_cv_weak_symbols" >&5
12232 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12233
12234         else
12235                 cf_cv_weak_symbols=no
12236         fi
12237
12238         if test "x$cf_cv_weak_symbols" = xyes ; then
12239
12240 cat >>confdefs.h <<\EOF
12241 #define USE_WEAK_SYMBOLS 1
12242 EOF
12243
12244         fi
12245 fi
12246
12247 PTHREAD=
12248 if test "x$with_pthread" = "xyes" ; then
12249
12250 cat >>confdefs.h <<\EOF
12251 #define USE_PTHREADS 1
12252 EOF
12253
12254     enable_reentrant=yes
12255     if test "x$cf_cv_weak_symbols" = xyes ; then
12256         PTHREAD=-lpthread
12257     fi
12258 fi
12259
12260 # Reentrant code has to be opaque; there's little advantage to making ncurses
12261 # opaque outside of that, so there is no --enable-opaque option.  We can use
12262 # this option without --with-pthreads, but this will be always set for
12263 # pthreads.
12264 echo "$as_me:12264: checking if you want experimental reentrant code" >&5
12265 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12266
12267 # Check whether --enable-reentrant or --disable-reentrant was given.
12268 if test "${enable_reentrant+set}" = set; then
12269   enableval="$enable_reentrant"
12270   with_reentrant=$enableval
12271 else
12272   with_reentrant=no
12273 fi;
12274 echo "$as_me:12274: result: $with_reentrant" >&5
12275 echo "${ECHO_T}$with_reentrant" >&6
12276 if test "x$with_reentrant" = xyes ; then
12277         cf_cv_enable_reentrant=1
12278         cf_cv_enable_opaque="NCURSES_INTERNALS"
12279         NCURSES_OPAQUE=1
12280         NCURSES_SIZE_T=int
12281         if test "x$cf_cv_weak_symbols" = xyes ; then
12282
12283 # remove pthread library from $LIBS
12284 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12285
12286 cf_add_libs="-lpthread"
12287 # Filter out duplicates - this happens with badly-designed ".pc" files...
12288 for cf_add_1lib in $TEST_LIBS
12289 do
12290         for cf_add_2lib in $cf_add_libs
12291         do
12292                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12293                 then
12294                         cf_add_1lib=
12295                         break
12296                 fi
12297         done
12298         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12299 done
12300 TEST_LIBS="$cf_add_libs"
12301
12302 cf_add_libs="-lpthread"
12303 # Filter out duplicates - this happens with badly-designed ".pc" files...
12304 for cf_add_1lib in $TEST_LIBS2
12305 do
12306         for cf_add_2lib in $cf_add_libs
12307         do
12308                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12309                 then
12310                         cf_add_1lib=
12311                         break
12312                 fi
12313         done
12314         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12315 done
12316 TEST_LIBS2="$cf_add_libs"
12317
12318         else
12319                 # when not using weak symbols but with_reentrant,
12320                 # add 't' to the library suffix on all platforms
12321                 # except cygwin, where we only do that if ALSO
12322                 # compiling with full thread support.
12323                 case "$host" in
12324                 *cygwin* | *msys*) #(vi
12325                         if test "$with_pthread" = "yes" ; then
12326                                 if test "x$disable_lib_suffixes" = "xno" ; then
12327                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12328                                 fi
12329                         fi ;;
12330                 *)
12331                         if test "x$disable_lib_suffixes" = "xno" ; then
12332                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12333                         fi
12334                         ;;
12335                 esac
12336         fi
12337
12338 cat >>confdefs.h <<\EOF
12339 #define USE_REENTRANT 1
12340 EOF
12341
12342 if test "${with_abi_version+set}" != set; then
12343         case $cf_cv_rel_version in
12344         5.*)
12345                 cf_cv_rel_version=6.0
12346                 cf_cv_abi_version=6
12347                 { echo "$as_me:12347: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12348 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12349                 ;;
12350         esac
12351 fi
12352
12353 else
12354         cf_cv_enable_reentrant=0
12355         cf_cv_enable_opaque="NCURSES_OPAQUE"
12356         NCURSES_OPAQUE=0
12357         NCURSES_SIZE_T=short
12358 fi
12359
12360 ### Allow using a different wrap-prefix
12361 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12362         echo "$as_me:12362: checking for prefix used to wrap public variables" >&5
12363 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12364
12365 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12366 if test "${with_wrap_prefix+set}" = set; then
12367   withval="$with_wrap_prefix"
12368   NCURSES_WRAP_PREFIX=$withval
12369 else
12370   NCURSES_WRAP_PREFIX=_nc_
12371 fi;
12372         echo "$as_me:12372: result: $NCURSES_WRAP_PREFIX" >&5
12373 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12374 else
12375         NCURSES_WRAP_PREFIX=_nc_
12376 fi
12377
12378 cat >>confdefs.h <<EOF
12379 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12380 EOF
12381
12382 echo "$as_me:12382: checking if you want experimental safe-sprintf code" >&5
12383 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12384
12385 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12386 if test "${enable_safe_sprintf+set}" = set; then
12387   enableval="$enable_safe_sprintf"
12388   with_safe_sprintf=$enableval
12389 else
12390   with_safe_sprintf=no
12391 fi;
12392 echo "$as_me:12392: result: $with_safe_sprintf" >&5
12393 echo "${ECHO_T}$with_safe_sprintf" >&6
12394 test "x$with_safe_sprintf" = xyes &&
12395 cat >>confdefs.h <<\EOF
12396 #define USE_SAFE_SPRINTF 1
12397 EOF
12398
12399 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12400 # when hashmap is used scroll hints are useless
12401 if test "$with_hashmap" = no ; then
12402 echo "$as_me:12402: checking if you want to experiment without scrolling-hints code" >&5
12403 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12404
12405 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12406 if test "${enable_scroll_hints+set}" = set; then
12407   enableval="$enable_scroll_hints"
12408   with_scroll_hints=$enableval
12409 else
12410   with_scroll_hints=yes
12411 fi;
12412 echo "$as_me:12412: result: $with_scroll_hints" >&5
12413 echo "${ECHO_T}$with_scroll_hints" >&6
12414 test "x$with_scroll_hints" = xyes &&
12415 cat >>confdefs.h <<\EOF
12416 #define USE_SCROLL_HINTS 1
12417 EOF
12418
12419 fi
12420
12421 echo "$as_me:12421: checking if you want experimental wgetch-events code" >&5
12422 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12423
12424 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12425 if test "${enable_wgetch_events+set}" = set; then
12426   enableval="$enable_wgetch_events"
12427   with_wgetch_events=$enableval
12428 else
12429   with_wgetch_events=no
12430 fi;
12431 echo "$as_me:12431: result: $with_wgetch_events" >&5
12432 echo "${ECHO_T}$with_wgetch_events" >&6
12433 test "x$with_wgetch_events" = xyes &&
12434 cat >>confdefs.h <<\EOF
12435 #define NCURSES_WGETCH_EVENTS 1
12436 EOF
12437
12438 ###############################################################################
12439
12440 ###     use option --disable-echo to suppress full display compiling commands
12441
12442 echo "$as_me:12442: checking if you want to see long compiling messages" >&5
12443 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12444
12445 # Check whether --enable-echo or --disable-echo was given.
12446 if test "${enable_echo+set}" = set; then
12447   enableval="$enable_echo"
12448   test "$enableval" != no && enableval=yes
12449   if test "$enableval" != "yes" ; then
12450
12451     ECHO_LT='--silent'
12452     ECHO_LD='@echo linking $@;'
12453     RULE_CC='@echo compiling $<'
12454     SHOW_CC='@echo compiling $@'
12455     ECHO_CC='@'
12456
12457   else
12458
12459     ECHO_LT=''
12460     ECHO_LD=''
12461     RULE_CC=''
12462     SHOW_CC=''
12463     ECHO_CC=''
12464
12465   fi
12466 else
12467   enableval=yes
12468
12469     ECHO_LT=''
12470     ECHO_LD=''
12471     RULE_CC=''
12472     SHOW_CC=''
12473     ECHO_CC=''
12474
12475 fi;
12476 echo "$as_me:12476: result: $enableval" >&5
12477 echo "${ECHO_T}$enableval" >&6
12478
12479 if test "x$enable_echo" = xyes; then
12480         ECHO_LINK=
12481 else
12482         ECHO_LINK='@ echo linking $@ ... ;'
12483         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12484         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12485 fi
12486
12487 ###     use option --enable-warnings to turn on all gcc warnings
12488 echo "$as_me:12488: checking if you want to see compiler warnings" >&5
12489 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12490
12491 # Check whether --enable-warnings or --disable-warnings was given.
12492 if test "${enable_warnings+set}" = set; then
12493   enableval="$enable_warnings"
12494   with_warnings=$enableval
12495 fi;
12496 echo "$as_me:12496: result: $with_warnings" >&5
12497 echo "${ECHO_T}$with_warnings" >&6
12498
12499 if test "x$with_warnings" = "xyes"; then
12500
12501         ADAFLAGS="$ADAFLAGS -gnatg"
12502
12503 INTEL_COMPILER=no
12504
12505 if test "$GCC" = yes ; then
12506         case $host_os in
12507         linux*|gnu*)
12508                 echo "$as_me:12508: checking if this is really Intel C compiler" >&5
12509 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12510                 cf_save_CFLAGS="$CFLAGS"
12511                 CFLAGS="$CFLAGS -no-gcc"
12512                 cat >conftest.$ac_ext <<_ACEOF
12513 #line 12513 "configure"
12514 #include "confdefs.h"
12515
12516 int
12517 main ()
12518 {
12519
12520 #ifdef __INTEL_COMPILER
12521 #else
12522 make an error
12523 #endif
12524
12525   ;
12526   return 0;
12527 }
12528 _ACEOF
12529 rm -f conftest.$ac_objext
12530 if { (eval echo "$as_me:12530: \"$ac_compile\"") >&5
12531   (eval $ac_compile) 2>&5
12532   ac_status=$?
12533   echo "$as_me:12533: \$? = $ac_status" >&5
12534   (exit $ac_status); } &&
12535          { ac_try='test -s conftest.$ac_objext'
12536   { (eval echo "$as_me:12536: \"$ac_try\"") >&5
12537   (eval $ac_try) 2>&5
12538   ac_status=$?
12539   echo "$as_me:12539: \$? = $ac_status" >&5
12540   (exit $ac_status); }; }; then
12541   INTEL_COMPILER=yes
12542 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12543
12544 else
12545   echo "$as_me: failed program was:" >&5
12546 cat conftest.$ac_ext >&5
12547 fi
12548 rm -f conftest.$ac_objext conftest.$ac_ext
12549                 CFLAGS="$cf_save_CFLAGS"
12550                 echo "$as_me:12550: result: $INTEL_COMPILER" >&5
12551 echo "${ECHO_T}$INTEL_COMPILER" >&6
12552                 ;;
12553         esac
12554 fi
12555
12556 CLANG_COMPILER=no
12557
12558 if test "$GCC" = yes ; then
12559         echo "$as_me:12559: checking if this is really Clang C compiler" >&5
12560 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12561         cf_save_CFLAGS="$CFLAGS"
12562         CFLAGS="$CFLAGS -Qunused-arguments"
12563         cat >conftest.$ac_ext <<_ACEOF
12564 #line 12564 "configure"
12565 #include "confdefs.h"
12566
12567 int
12568 main ()
12569 {
12570
12571 #ifdef __clang__
12572 #else
12573 make an error
12574 #endif
12575
12576   ;
12577   return 0;
12578 }
12579 _ACEOF
12580 rm -f conftest.$ac_objext
12581 if { (eval echo "$as_me:12581: \"$ac_compile\"") >&5
12582   (eval $ac_compile) 2>&5
12583   ac_status=$?
12584   echo "$as_me:12584: \$? = $ac_status" >&5
12585   (exit $ac_status); } &&
12586          { ac_try='test -s conftest.$ac_objext'
12587   { (eval echo "$as_me:12587: \"$ac_try\"") >&5
12588   (eval $ac_try) 2>&5
12589   ac_status=$?
12590   echo "$as_me:12590: \$? = $ac_status" >&5
12591   (exit $ac_status); }; }; then
12592   CLANG_COMPILER=yes
12593 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12594
12595 else
12596   echo "$as_me: failed program was:" >&5
12597 cat conftest.$ac_ext >&5
12598 fi
12599 rm -f conftest.$ac_objext conftest.$ac_ext
12600         CFLAGS="$cf_save_CFLAGS"
12601         echo "$as_me:12601: result: $CLANG_COMPILER" >&5
12602 echo "${ECHO_T}$CLANG_COMPILER" >&6
12603 fi
12604
12605 cat > conftest.$ac_ext <<EOF
12606 #line 12606 "${as_me:-configure}"
12607 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12608 EOF
12609
12610 if test "$INTEL_COMPILER" = yes
12611 then
12612 # The "-wdXXX" options suppress warnings:
12613 # remark #1419: external declaration in primary source file
12614 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12615 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12616 # remark #193: zero used for undefined preprocessing identifier
12617 # remark #593: variable "curs_sb_left_arrow" was set but never used
12618 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12619 # remark #869: parameter "tw" was never referenced
12620 # remark #981: operands are evaluated in unspecified order
12621 # warning #279: controlling expression is constant
12622
12623         { echo "$as_me:12623: checking for $CC warning options..." >&5
12624 echo "$as_me: checking for $CC warning options..." >&6;}
12625         cf_save_CFLAGS="$CFLAGS"
12626         EXTRA_CFLAGS="-Wall"
12627         for cf_opt in \
12628                 wd1419 \
12629                 wd1683 \
12630                 wd1684 \
12631                 wd193 \
12632                 wd593 \
12633                 wd279 \
12634                 wd810 \
12635                 wd869 \
12636                 wd981
12637         do
12638                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12639                 if { (eval echo "$as_me:12639: \"$ac_compile\"") >&5
12640   (eval $ac_compile) 2>&5
12641   ac_status=$?
12642   echo "$as_me:12642: \$? = $ac_status" >&5
12643   (exit $ac_status); }; then
12644                         test -n "$verbose" && echo "$as_me:12644: result: ... -$cf_opt" >&5
12645 echo "${ECHO_T}... -$cf_opt" >&6
12646                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12647                 fi
12648         done
12649         CFLAGS="$cf_save_CFLAGS"
12650
12651 elif test "$GCC" = yes
12652 then
12653         { echo "$as_me:12653: checking for $CC warning options..." >&5
12654 echo "$as_me: checking for $CC warning options..." >&6;}
12655         cf_save_CFLAGS="$CFLAGS"
12656         EXTRA_CFLAGS=
12657         cf_warn_CONST=""
12658         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12659         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12660         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12661         for cf_opt in W Wall \
12662                 Wbad-function-cast \
12663                 Wcast-align \
12664                 Wcast-qual \
12665                 Wdeclaration-after-statement \
12666                 Wextra \
12667                 Winline \
12668                 Wmissing-declarations \
12669                 Wmissing-prototypes \
12670                 Wnested-externs \
12671                 Wpointer-arith \
12672                 Wshadow \
12673                 Wstrict-prototypes \
12674                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12675         do
12676                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12677                 if { (eval echo "$as_me:12677: \"$ac_compile\"") >&5
12678   (eval $ac_compile) 2>&5
12679   ac_status=$?
12680   echo "$as_me:12680: \$? = $ac_status" >&5
12681   (exit $ac_status); }; then
12682                         test -n "$verbose" && echo "$as_me:12682: result: ... -$cf_opt" >&5
12683 echo "${ECHO_T}... -$cf_opt" >&6
12684                         case $cf_opt in #(vi
12685                         Wcast-qual) #(vi
12686                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12687                                 ;;
12688                         Winline) #(vi
12689                                 case $GCC_VERSION in
12690                                 [34].*)
12691                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12692
12693 echo "${as_me:-configure}:12693: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12694
12695                                         continue;;
12696                                 esac
12697                                 ;;
12698                         Wpointer-arith) #(vi
12699                                 case $GCC_VERSION in
12700                                 [12].*)
12701                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12702
12703 echo "${as_me:-configure}:12703: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12704
12705                                         continue;;
12706                                 esac
12707                                 ;;
12708                         esac
12709                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12710                 fi
12711         done
12712         CFLAGS="$cf_save_CFLAGS"
12713 fi
12714 rm -rf conftest*
12715
12716         if test "x$cf_with_cxx" = xyes ; then
12717
12718 INTEL_CPLUSPLUS=no
12719
12720 if test "$GCC" = yes ; then
12721         case $host_os in
12722         linux*|gnu*)
12723                 echo "$as_me:12723: checking if this is really Intel C++ compiler" >&5
12724 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12725                 cf_save_CFLAGS="$CXXFLAGS"
12726                 CXXFLAGS="$CXXFLAGS -no-gcc"
12727                 cat >conftest.$ac_ext <<_ACEOF
12728 #line 12728 "configure"
12729 #include "confdefs.h"
12730
12731 int
12732 main ()
12733 {
12734
12735 #ifdef __INTEL_COMPILER
12736 #else
12737 make an error
12738 #endif
12739
12740   ;
12741   return 0;
12742 }
12743 _ACEOF
12744 rm -f conftest.$ac_objext
12745 if { (eval echo "$as_me:12745: \"$ac_compile\"") >&5
12746   (eval $ac_compile) 2>&5
12747   ac_status=$?
12748   echo "$as_me:12748: \$? = $ac_status" >&5
12749   (exit $ac_status); } &&
12750          { ac_try='test -s conftest.$ac_objext'
12751   { (eval echo "$as_me:12751: \"$ac_try\"") >&5
12752   (eval $ac_try) 2>&5
12753   ac_status=$?
12754   echo "$as_me:12754: \$? = $ac_status" >&5
12755   (exit $ac_status); }; }; then
12756   INTEL_CPLUSPLUS=yes
12757 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12758
12759 else
12760   echo "$as_me: failed program was:" >&5
12761 cat conftest.$ac_ext >&5
12762 fi
12763 rm -f conftest.$ac_objext conftest.$ac_ext
12764                 CXXFLAGS="$cf_save_CFLAGS"
12765                 echo "$as_me:12765: result: $INTEL_CPLUSPLUS" >&5
12766 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12767                 ;;
12768         esac
12769 fi
12770
12771 CLANG_CPLUSPLUS=no
12772
12773 if test "$GCC" = yes ; then
12774         echo "$as_me:12774: checking if this is really Clang C++ compiler" >&5
12775 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12776         cf_save_CFLAGS="$CXXFLAGS"
12777         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12778         cat >conftest.$ac_ext <<_ACEOF
12779 #line 12779 "configure"
12780 #include "confdefs.h"
12781
12782 int
12783 main ()
12784 {
12785
12786 #ifdef __clang__
12787 #else
12788 make an error
12789 #endif
12790
12791   ;
12792   return 0;
12793 }
12794 _ACEOF
12795 rm -f conftest.$ac_objext
12796 if { (eval echo "$as_me:12796: \"$ac_compile\"") >&5
12797   (eval $ac_compile) 2>&5
12798   ac_status=$?
12799   echo "$as_me:12799: \$? = $ac_status" >&5
12800   (exit $ac_status); } &&
12801          { ac_try='test -s conftest.$ac_objext'
12802   { (eval echo "$as_me:12802: \"$ac_try\"") >&5
12803   (eval $ac_try) 2>&5
12804   ac_status=$?
12805   echo "$as_me:12805: \$? = $ac_status" >&5
12806   (exit $ac_status); }; }; then
12807   CLANG_CPLUSPLUS=yes
12808 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12809
12810 else
12811   echo "$as_me: failed program was:" >&5
12812 cat conftest.$ac_ext >&5
12813 fi
12814 rm -f conftest.$ac_objext conftest.$ac_ext
12815         CXXFLAGS="$cf_save_CFLAGS"
12816         echo "$as_me:12816: result: $CLANG_CPLUSPLUS" >&5
12817 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12818 fi
12819
12820 ac_ext=cc
12821 ac_cpp='$CXXCPP $CPPFLAGS'
12822 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12823 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12824 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12825 ac_main_return=return
12826
12827 cat > conftest.$ac_ext <<EOF
12828 #line 12828 "configure"
12829 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12830 EOF
12831
12832 if test "$INTEL_CPLUSPLUS" = yes
12833 then
12834 # The "-wdXXX" options suppress warnings:
12835 # remark #1419: external declaration in primary source file
12836 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12837 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12838 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12839 # remark #193: zero used for undefined preprocessing identifier
12840 # remark #593: variable "curs_sb_left_arrow" was set but never used
12841 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12842 # remark #869: parameter "tw" was never referenced
12843 # remark #981: operands are evaluated in unspecified order
12844 # warning #269: invalid format string conversion
12845
12846         { echo "$as_me:12846: checking for $CC warning options..." >&5
12847 echo "$as_me: checking for $CC warning options..." >&6;}
12848         cf_save_CXXFLAGS="$CXXFLAGS"
12849         EXTRA_CXXFLAGS="-Wall"
12850         for cf_opt in \
12851                 wd1419 \
12852                 wd1682 \
12853                 wd1683 \
12854                 wd1684 \
12855                 wd193 \
12856                 wd279 \
12857                 wd593 \
12858                 wd810 \
12859                 wd869 \
12860                 wd981
12861         do
12862                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12863                 if { (eval echo "$as_me:12863: \"$ac_compile\"") >&5
12864   (eval $ac_compile) 2>&5
12865   ac_status=$?
12866   echo "$as_me:12866: \$? = $ac_status" >&5
12867   (exit $ac_status); }; then
12868                         test -n "$verbose" && echo "$as_me:12868: result: ... -$cf_opt" >&5
12869 echo "${ECHO_T}... -$cf_opt" >&6
12870                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12871                 fi
12872         done
12873         CXXFLAGS="$cf_save_CXXFLAGS"
12874
12875 elif test "$GXX" = yes
12876 then
12877         { echo "$as_me:12877: checking for $CXX warning options..." >&5
12878 echo "$as_me: checking for $CXX warning options..." >&6;}
12879         cf_save_CXXFLAGS="$CXXFLAGS"
12880         EXTRA_CXXFLAGS="-W -Wall"
12881         cf_gxx_extra_warnings=""
12882         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12883         case "$GCC_VERSION" in
12884         [1-2].*)
12885                 ;;
12886         *)
12887                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12888                 ;;
12889         esac
12890         for cf_opt in \
12891                 Wabi \
12892                 fabi-version=0 \
12893                 Wextra \
12894                 Wignored-qualifiers \
12895                 Wlogical-op \
12896                 Woverloaded-virtual \
12897                 Wsign-promo \
12898                 Wsynth \
12899                 Wold-style-cast \
12900                 Wcast-align \
12901                 Wcast-qual \
12902                 Wpointer-arith \
12903                 Wshadow \
12904                 Wundef $cf_gxx_extra_warnings Wno-unused
12905         do
12906                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12907                 if { (eval echo "$as_me:12907: \"$ac_compile\"") >&5
12908   (eval $ac_compile) 2>&5
12909   ac_status=$?
12910   echo "$as_me:12910: \$? = $ac_status" >&5
12911   (exit $ac_status); }; then
12912                         test -n "$verbose" && echo "$as_me:12912: result: ... -$cf_opt" >&5
12913 echo "${ECHO_T}... -$cf_opt" >&6
12914                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12915                 else
12916                         test -n "$verbose" && echo "$as_me:12916: result: ... no -$cf_opt" >&5
12917 echo "${ECHO_T}... no -$cf_opt" >&6
12918                 fi
12919         done
12920         CXXFLAGS="$cf_save_CXXFLAGS"
12921 fi
12922
12923 rm -rf conftest*
12924 ac_ext=c
12925 ac_cpp='$CPP $CPPFLAGS'
12926 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12927 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12928 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12929 ac_main_return=return
12930
12931         fi
12932 fi
12933
12934 if test "$GCC" = yes
12935 then
12936 cat > conftest.i <<EOF
12937 #ifndef GCC_PRINTF
12938 #define GCC_PRINTF 0
12939 #endif
12940 #ifndef GCC_SCANF
12941 #define GCC_SCANF 0
12942 #endif
12943 #ifndef GCC_NORETURN
12944 #define GCC_NORETURN /* nothing */
12945 #endif
12946 #ifndef GCC_UNUSED
12947 #define GCC_UNUSED /* nothing */
12948 #endif
12949 EOF
12950 if test "$GCC" = yes
12951 then
12952         { echo "$as_me:12952: checking for $CC __attribute__ directives..." >&5
12953 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12954 cat > conftest.$ac_ext <<EOF
12955 #line 12955 "${as_me:-configure}"
12956 #include "confdefs.h"
12957 #include "conftest.h"
12958 #include "conftest.i"
12959 #if     GCC_PRINTF
12960 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12961 #else
12962 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12963 #endif
12964 #if     GCC_SCANF
12965 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12966 #else
12967 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12968 #endif
12969 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12970 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12971 extern void foo(void) GCC_NORETURN;
12972 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12973 EOF
12974         cf_printf_attribute=no
12975         cf_scanf_attribute=no
12976         for cf_attribute in scanf printf unused noreturn
12977         do
12978
12979 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12980
12981                 cf_directive="__attribute__(($cf_attribute))"
12982                 echo "checking for $CC $cf_directive" 1>&5
12983
12984                 case $cf_attribute in #(vi
12985                 printf) #(vi
12986                         cf_printf_attribute=yes
12987                         cat >conftest.h <<EOF
12988 #define GCC_$cf_ATTRIBUTE 1
12989 EOF
12990                         ;;
12991                 scanf) #(vi
12992                         cf_scanf_attribute=yes
12993                         cat >conftest.h <<EOF
12994 #define GCC_$cf_ATTRIBUTE 1
12995 EOF
12996                         ;;
12997                 *) #(vi
12998                         cat >conftest.h <<EOF
12999 #define GCC_$cf_ATTRIBUTE $cf_directive
13000 EOF
13001                         ;;
13002                 esac
13003
13004                 if { (eval echo "$as_me:13004: \"$ac_compile\"") >&5
13005   (eval $ac_compile) 2>&5
13006   ac_status=$?
13007   echo "$as_me:13007: \$? = $ac_status" >&5
13008   (exit $ac_status); }; then
13009                         test -n "$verbose" && echo "$as_me:13009: result: ... $cf_attribute" >&5
13010 echo "${ECHO_T}... $cf_attribute" >&6
13011                         cat conftest.h >>confdefs.h
13012                         case $cf_attribute in #(vi
13013                         noreturn) #(vi
13014
13015 cat >>confdefs.h <<EOF
13016 #define GCC_NORETURN $cf_directive
13017 EOF
13018
13019                                 ;;
13020                         printf) #(vi
13021                                 cf_value='/* nothing */'
13022                                 if test "$cf_printf_attribute" != no ; then
13023                                         cf_value='__attribute__((format(printf,fmt,var)))'
13024
13025 cat >>confdefs.h <<\EOF
13026 #define GCC_PRINTF 1
13027 EOF
13028
13029                                 fi
13030
13031 cat >>confdefs.h <<EOF
13032 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13033 EOF
13034
13035                                 ;;
13036                         scanf) #(vi
13037                                 cf_value='/* nothing */'
13038                                 if test "$cf_scanf_attribute" != no ; then
13039                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13040
13041 cat >>confdefs.h <<\EOF
13042 #define GCC_SCANF 1
13043 EOF
13044
13045                                 fi
13046
13047 cat >>confdefs.h <<EOF
13048 #define GCC_SCANFLIKE(fmt,var) $cf_value
13049 EOF
13050
13051                                 ;;
13052                         unused) #(vi
13053
13054 cat >>confdefs.h <<EOF
13055 #define GCC_UNUSED $cf_directive
13056 EOF
13057
13058                                 ;;
13059                         esac
13060                 fi
13061         done
13062 else
13063         fgrep define conftest.i >>confdefs.h
13064 fi
13065 rm -rf conftest*
13066 fi
13067
13068 echo "$as_me:13068: checking if you want to work around bogus compiler/loader warnings" >&5
13069 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13070
13071 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13072 if test "${enable_string_hacks+set}" = set; then
13073   enableval="$enable_string_hacks"
13074   with_string_hacks=$enableval
13075 else
13076   with_string_hacks=no
13077 fi;
13078 echo "$as_me:13078: result: $with_string_hacks" >&5
13079 echo "${ECHO_T}$with_string_hacks" >&6
13080
13081 if test "x$with_string_hacks" = "xyes"; then
13082
13083 cat >>confdefs.h <<\EOF
13084 #define USE_STRING_HACKS 1
13085 EOF
13086
13087         { echo "$as_me:13087: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13088 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13089
13090 for ac_func in strlcat strlcpy snprintf
13091 do
13092 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13093 echo "$as_me:13093: checking for $ac_func" >&5
13094 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13095 if eval "test \"\${$as_ac_var+set}\" = set"; then
13096   echo $ECHO_N "(cached) $ECHO_C" >&6
13097 else
13098   cat >conftest.$ac_ext <<_ACEOF
13099 #line 13099 "configure"
13100 #include "confdefs.h"
13101 /* System header to define __stub macros and hopefully few prototypes,
13102     which can conflict with char $ac_func (); below.  */
13103 #include <assert.h>
13104 /* Override any gcc2 internal prototype to avoid an error.  */
13105 #ifdef __cplusplus
13106 extern "C"
13107 #endif
13108 /* We use char because int might match the return type of a gcc2
13109    builtin and then its argument prototype would still apply.  */
13110 char $ac_func ();
13111 char (*f) ();
13112
13113 int
13114 main ()
13115 {
13116 /* The GNU C library defines this for functions which it implements
13117     to always fail with ENOSYS.  Some functions are actually named
13118     something starting with __ and the normal name is an alias.  */
13119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13120 choke me
13121 #else
13122 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13123 #endif
13124
13125   ;
13126   return 0;
13127 }
13128 _ACEOF
13129 rm -f conftest.$ac_objext conftest$ac_exeext
13130 if { (eval echo "$as_me:13130: \"$ac_link\"") >&5
13131   (eval $ac_link) 2>&5
13132   ac_status=$?
13133   echo "$as_me:13133: \$? = $ac_status" >&5
13134   (exit $ac_status); } &&
13135          { ac_try='test -s conftest$ac_exeext'
13136   { (eval echo "$as_me:13136: \"$ac_try\"") >&5
13137   (eval $ac_try) 2>&5
13138   ac_status=$?
13139   echo "$as_me:13139: \$? = $ac_status" >&5
13140   (exit $ac_status); }; }; then
13141   eval "$as_ac_var=yes"
13142 else
13143   echo "$as_me: failed program was:" >&5
13144 cat conftest.$ac_ext >&5
13145 eval "$as_ac_var=no"
13146 fi
13147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13148 fi
13149 echo "$as_me:13149: result: `eval echo '${'$as_ac_var'}'`" >&5
13150 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13151 if test `eval echo '${'$as_ac_var'}'` = yes; then
13152   cat >>confdefs.h <<EOF
13153 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13154 EOF
13155
13156 fi
13157 done
13158
13159 fi
13160
13161 ###     use option --enable-assertions to turn on generation of assertion code
13162 echo "$as_me:13162: checking if you want to enable runtime assertions" >&5
13163 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13164
13165 # Check whether --enable-assertions or --disable-assertions was given.
13166 if test "${enable_assertions+set}" = set; then
13167   enableval="$enable_assertions"
13168   with_assertions=$enableval
13169 else
13170   with_assertions=no
13171 fi;
13172 echo "$as_me:13172: result: $with_assertions" >&5
13173 echo "${ECHO_T}$with_assertions" >&6
13174 if test -n "$GCC"
13175 then
13176         if test "$with_assertions" = no
13177         then
13178                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13179         else
13180
13181         ADAFLAGS="$ADAFLAGS -gnata"
13182
13183         fi
13184 fi
13185
13186 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13187
13188 echo "$as_me:13188: checking if you want to use dmalloc for testing" >&5
13189 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13190
13191 # Check whether --with-dmalloc or --without-dmalloc was given.
13192 if test "${with_dmalloc+set}" = set; then
13193   withval="$with_dmalloc"
13194
13195 cat >>confdefs.h <<EOF
13196 #define USE_DMALLOC 1
13197 EOF
13198
13199         : ${with_cflags:=-g}
13200         : ${with_no_leaks:=yes}
13201          with_dmalloc=yes
13202 else
13203   with_dmalloc=
13204 fi;
13205 echo "$as_me:13205: result: ${with_dmalloc:-no}" >&5
13206 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13207
13208 case .$with_cflags in #(vi
13209 .*-g*)
13210         case .$CFLAGS in #(vi
13211         .*-g*) #(vi
13212                 ;;
13213         *)
13214
13215 cf_fix_cppflags=no
13216 cf_new_cflags=
13217 cf_new_cppflags=
13218 cf_new_extra_cppflags=
13219
13220 for cf_add_cflags in -g
13221 do
13222 case $cf_fix_cppflags in
13223 no)
13224         case $cf_add_cflags in #(vi
13225         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13226                 case $cf_add_cflags in
13227                 -D*)
13228                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13229
13230                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13231                                 && test -z "${cf_tst_cflags}" \
13232                                 && cf_fix_cppflags=yes
13233
13234                         if test $cf_fix_cppflags = yes ; then
13235                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13236                                 continue
13237                         elif test "${cf_tst_cflags}" = "\"'" ; then
13238                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13239                                 continue
13240                         fi
13241                         ;;
13242                 esac
13243                 case "$CPPFLAGS" in
13244                 *$cf_add_cflags) #(vi
13245                         ;;
13246                 *) #(vi
13247                         case $cf_add_cflags in #(vi
13248                         -D*)
13249                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13250
13251 CPPFLAGS=`echo "$CPPFLAGS" | \
13252         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13253                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13254
13255                                 ;;
13256                         esac
13257                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13258                         ;;
13259                 esac
13260                 ;;
13261         *)
13262                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13263                 ;;
13264         esac
13265         ;;
13266 yes)
13267         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13268
13269         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13270
13271         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13272                 && test -z "${cf_tst_cflags}" \
13273                 && cf_fix_cppflags=no
13274         ;;
13275 esac
13276 done
13277
13278 if test -n "$cf_new_cflags" ; then
13279
13280         CFLAGS="$CFLAGS $cf_new_cflags"
13281 fi
13282
13283 if test -n "$cf_new_cppflags" ; then
13284
13285         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13286 fi
13287
13288 if test -n "$cf_new_extra_cppflags" ; then
13289
13290         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13291 fi
13292
13293                 ;;
13294         esac
13295         ;;
13296 esac
13297
13298 if test "$with_dmalloc" = yes ; then
13299         echo "$as_me:13299: checking for dmalloc.h" >&5
13300 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13301 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13302   echo $ECHO_N "(cached) $ECHO_C" >&6
13303 else
13304   cat >conftest.$ac_ext <<_ACEOF
13305 #line 13305 "configure"
13306 #include "confdefs.h"
13307 #include <dmalloc.h>
13308 _ACEOF
13309 if { (eval echo "$as_me:13309: \"$ac_cpp conftest.$ac_ext\"") >&5
13310   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13311   ac_status=$?
13312   egrep -v '^ *\+' conftest.er1 >conftest.err
13313   rm -f conftest.er1
13314   cat conftest.err >&5
13315   echo "$as_me:13315: \$? = $ac_status" >&5
13316   (exit $ac_status); } >/dev/null; then
13317   if test -s conftest.err; then
13318     ac_cpp_err=$ac_c_preproc_warn_flag
13319   else
13320     ac_cpp_err=
13321   fi
13322 else
13323   ac_cpp_err=yes
13324 fi
13325 if test -z "$ac_cpp_err"; then
13326   ac_cv_header_dmalloc_h=yes
13327 else
13328   echo "$as_me: failed program was:" >&5
13329   cat conftest.$ac_ext >&5
13330   ac_cv_header_dmalloc_h=no
13331 fi
13332 rm -f conftest.err conftest.$ac_ext
13333 fi
13334 echo "$as_me:13334: result: $ac_cv_header_dmalloc_h" >&5
13335 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13336 if test $ac_cv_header_dmalloc_h = yes; then
13337
13338 echo "$as_me:13338: checking for dmalloc_debug in -ldmalloc" >&5
13339 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13340 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13341   echo $ECHO_N "(cached) $ECHO_C" >&6
13342 else
13343   ac_check_lib_save_LIBS=$LIBS
13344 LIBS="-ldmalloc  $LIBS"
13345 cat >conftest.$ac_ext <<_ACEOF
13346 #line 13346 "configure"
13347 #include "confdefs.h"
13348
13349 /* Override any gcc2 internal prototype to avoid an error.  */
13350 #ifdef __cplusplus
13351 extern "C"
13352 #endif
13353 /* We use char because int might match the return type of a gcc2
13354    builtin and then its argument prototype would still apply.  */
13355 char dmalloc_debug ();
13356 int
13357 main ()
13358 {
13359 dmalloc_debug ();
13360   ;
13361   return 0;
13362 }
13363 _ACEOF
13364 rm -f conftest.$ac_objext conftest$ac_exeext
13365 if { (eval echo "$as_me:13365: \"$ac_link\"") >&5
13366   (eval $ac_link) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit $ac_status); } &&
13370          { ac_try='test -s conftest$ac_exeext'
13371   { (eval echo "$as_me:13371: \"$ac_try\"") >&5
13372   (eval $ac_try) 2>&5
13373   ac_status=$?
13374   echo "$as_me:13374: \$? = $ac_status" >&5
13375   (exit $ac_status); }; }; then
13376   ac_cv_lib_dmalloc_dmalloc_debug=yes
13377 else
13378   echo "$as_me: failed program was:" >&5
13379 cat conftest.$ac_ext >&5
13380 ac_cv_lib_dmalloc_dmalloc_debug=no
13381 fi
13382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13383 LIBS=$ac_check_lib_save_LIBS
13384 fi
13385 echo "$as_me:13385: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13386 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13387 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13388   cat >>confdefs.h <<EOF
13389 #define HAVE_LIBDMALLOC 1
13390 EOF
13391
13392   LIBS="-ldmalloc $LIBS"
13393
13394 fi
13395
13396 fi
13397
13398 fi
13399
13400 echo "$as_me:13400: checking if you want to use dbmalloc for testing" >&5
13401 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13402
13403 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13404 if test "${with_dbmalloc+set}" = set; then
13405   withval="$with_dbmalloc"
13406
13407 cat >>confdefs.h <<EOF
13408 #define USE_DBMALLOC 1
13409 EOF
13410
13411         : ${with_cflags:=-g}
13412         : ${with_no_leaks:=yes}
13413          with_dbmalloc=yes
13414 else
13415   with_dbmalloc=
13416 fi;
13417 echo "$as_me:13417: result: ${with_dbmalloc:-no}" >&5
13418 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13419
13420 case .$with_cflags in #(vi
13421 .*-g*)
13422         case .$CFLAGS in #(vi
13423         .*-g*) #(vi
13424                 ;;
13425         *)
13426
13427 cf_fix_cppflags=no
13428 cf_new_cflags=
13429 cf_new_cppflags=
13430 cf_new_extra_cppflags=
13431
13432 for cf_add_cflags in -g
13433 do
13434 case $cf_fix_cppflags in
13435 no)
13436         case $cf_add_cflags in #(vi
13437         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13438                 case $cf_add_cflags in
13439                 -D*)
13440                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13441
13442                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13443                                 && test -z "${cf_tst_cflags}" \
13444                                 && cf_fix_cppflags=yes
13445
13446                         if test $cf_fix_cppflags = yes ; then
13447                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13448                                 continue
13449                         elif test "${cf_tst_cflags}" = "\"'" ; then
13450                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13451                                 continue
13452                         fi
13453                         ;;
13454                 esac
13455                 case "$CPPFLAGS" in
13456                 *$cf_add_cflags) #(vi
13457                         ;;
13458                 *) #(vi
13459                         case $cf_add_cflags in #(vi
13460                         -D*)
13461                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13462
13463 CPPFLAGS=`echo "$CPPFLAGS" | \
13464         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13465                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13466
13467                                 ;;
13468                         esac
13469                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13470                         ;;
13471                 esac
13472                 ;;
13473         *)
13474                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13475                 ;;
13476         esac
13477         ;;
13478 yes)
13479         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13480
13481         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13482
13483         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13484                 && test -z "${cf_tst_cflags}" \
13485                 && cf_fix_cppflags=no
13486         ;;
13487 esac
13488 done
13489
13490 if test -n "$cf_new_cflags" ; then
13491
13492         CFLAGS="$CFLAGS $cf_new_cflags"
13493 fi
13494
13495 if test -n "$cf_new_cppflags" ; then
13496
13497         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13498 fi
13499
13500 if test -n "$cf_new_extra_cppflags" ; then
13501
13502         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13503 fi
13504
13505                 ;;
13506         esac
13507         ;;
13508 esac
13509
13510 if test "$with_dbmalloc" = yes ; then
13511         echo "$as_me:13511: checking for dbmalloc.h" >&5
13512 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13513 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13514   echo $ECHO_N "(cached) $ECHO_C" >&6
13515 else
13516   cat >conftest.$ac_ext <<_ACEOF
13517 #line 13517 "configure"
13518 #include "confdefs.h"
13519 #include <dbmalloc.h>
13520 _ACEOF
13521 if { (eval echo "$as_me:13521: \"$ac_cpp conftest.$ac_ext\"") >&5
13522   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13523   ac_status=$?
13524   egrep -v '^ *\+' conftest.er1 >conftest.err
13525   rm -f conftest.er1
13526   cat conftest.err >&5
13527   echo "$as_me:13527: \$? = $ac_status" >&5
13528   (exit $ac_status); } >/dev/null; then
13529   if test -s conftest.err; then
13530     ac_cpp_err=$ac_c_preproc_warn_flag
13531   else
13532     ac_cpp_err=
13533   fi
13534 else
13535   ac_cpp_err=yes
13536 fi
13537 if test -z "$ac_cpp_err"; then
13538   ac_cv_header_dbmalloc_h=yes
13539 else
13540   echo "$as_me: failed program was:" >&5
13541   cat conftest.$ac_ext >&5
13542   ac_cv_header_dbmalloc_h=no
13543 fi
13544 rm -f conftest.err conftest.$ac_ext
13545 fi
13546 echo "$as_me:13546: result: $ac_cv_header_dbmalloc_h" >&5
13547 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13548 if test $ac_cv_header_dbmalloc_h = yes; then
13549
13550 echo "$as_me:13550: checking for debug_malloc in -ldbmalloc" >&5
13551 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13552 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13553   echo $ECHO_N "(cached) $ECHO_C" >&6
13554 else
13555   ac_check_lib_save_LIBS=$LIBS
13556 LIBS="-ldbmalloc  $LIBS"
13557 cat >conftest.$ac_ext <<_ACEOF
13558 #line 13558 "configure"
13559 #include "confdefs.h"
13560
13561 /* Override any gcc2 internal prototype to avoid an error.  */
13562 #ifdef __cplusplus
13563 extern "C"
13564 #endif
13565 /* We use char because int might match the return type of a gcc2
13566    builtin and then its argument prototype would still apply.  */
13567 char debug_malloc ();
13568 int
13569 main ()
13570 {
13571 debug_malloc ();
13572   ;
13573   return 0;
13574 }
13575 _ACEOF
13576 rm -f conftest.$ac_objext conftest$ac_exeext
13577 if { (eval echo "$as_me:13577: \"$ac_link\"") >&5
13578   (eval $ac_link) 2>&5
13579   ac_status=$?
13580   echo "$as_me:13580: \$? = $ac_status" >&5
13581   (exit $ac_status); } &&
13582          { ac_try='test -s conftest$ac_exeext'
13583   { (eval echo "$as_me:13583: \"$ac_try\"") >&5
13584   (eval $ac_try) 2>&5
13585   ac_status=$?
13586   echo "$as_me:13586: \$? = $ac_status" >&5
13587   (exit $ac_status); }; }; then
13588   ac_cv_lib_dbmalloc_debug_malloc=yes
13589 else
13590   echo "$as_me: failed program was:" >&5
13591 cat conftest.$ac_ext >&5
13592 ac_cv_lib_dbmalloc_debug_malloc=no
13593 fi
13594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13595 LIBS=$ac_check_lib_save_LIBS
13596 fi
13597 echo "$as_me:13597: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13598 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13599 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13600   cat >>confdefs.h <<EOF
13601 #define HAVE_LIBDBMALLOC 1
13602 EOF
13603
13604   LIBS="-ldbmalloc $LIBS"
13605
13606 fi
13607
13608 fi
13609
13610 fi
13611
13612 echo "$as_me:13612: checking if you want to use valgrind for testing" >&5
13613 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13614
13615 # Check whether --with-valgrind or --without-valgrind was given.
13616 if test "${with_valgrind+set}" = set; then
13617   withval="$with_valgrind"
13618
13619 cat >>confdefs.h <<EOF
13620 #define USE_VALGRIND 1
13621 EOF
13622
13623         : ${with_cflags:=-g}
13624         : ${with_no_leaks:=yes}
13625          with_valgrind=yes
13626 else
13627   with_valgrind=
13628 fi;
13629 echo "$as_me:13629: result: ${with_valgrind:-no}" >&5
13630 echo "${ECHO_T}${with_valgrind:-no}" >&6
13631
13632 case .$with_cflags in #(vi
13633 .*-g*)
13634         case .$CFLAGS in #(vi
13635         .*-g*) #(vi
13636                 ;;
13637         *)
13638
13639 cf_fix_cppflags=no
13640 cf_new_cflags=
13641 cf_new_cppflags=
13642 cf_new_extra_cppflags=
13643
13644 for cf_add_cflags in -g
13645 do
13646 case $cf_fix_cppflags in
13647 no)
13648         case $cf_add_cflags in #(vi
13649         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13650                 case $cf_add_cflags in
13651                 -D*)
13652                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13653
13654                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13655                                 && test -z "${cf_tst_cflags}" \
13656                                 && cf_fix_cppflags=yes
13657
13658                         if test $cf_fix_cppflags = yes ; then
13659                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13660                                 continue
13661                         elif test "${cf_tst_cflags}" = "\"'" ; then
13662                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13663                                 continue
13664                         fi
13665                         ;;
13666                 esac
13667                 case "$CPPFLAGS" in
13668                 *$cf_add_cflags) #(vi
13669                         ;;
13670                 *) #(vi
13671                         case $cf_add_cflags in #(vi
13672                         -D*)
13673                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13674
13675 CPPFLAGS=`echo "$CPPFLAGS" | \
13676         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13677                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13678
13679                                 ;;
13680                         esac
13681                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13682                         ;;
13683                 esac
13684                 ;;
13685         *)
13686                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13687                 ;;
13688         esac
13689         ;;
13690 yes)
13691         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13692
13693         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13694
13695         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13696                 && test -z "${cf_tst_cflags}" \
13697                 && cf_fix_cppflags=no
13698         ;;
13699 esac
13700 done
13701
13702 if test -n "$cf_new_cflags" ; then
13703
13704         CFLAGS="$CFLAGS $cf_new_cflags"
13705 fi
13706
13707 if test -n "$cf_new_cppflags" ; then
13708
13709         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13710 fi
13711
13712 if test -n "$cf_new_extra_cppflags" ; then
13713
13714         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13715 fi
13716
13717                 ;;
13718         esac
13719         ;;
13720 esac
13721
13722 echo "$as_me:13722: checking if you want to perform memory-leak testing" >&5
13723 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13724
13725 # Check whether --enable-leaks or --disable-leaks was given.
13726 if test "${enable_leaks+set}" = set; then
13727   enableval="$enable_leaks"
13728   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13729 else
13730   : ${with_no_leaks:=no}
13731 fi;
13732 echo "$as_me:13732: result: $with_no_leaks" >&5
13733 echo "${ECHO_T}$with_no_leaks" >&6
13734
13735 if test "$with_no_leaks" = yes ; then
13736
13737 cat >>confdefs.h <<\EOF
13738 #define NO_LEAKS 1
13739 EOF
13740
13741 cat >>confdefs.h <<\EOF
13742 #define YY_NO_LEAKS 1
13743 EOF
13744
13745 fi
13746
13747 cat >>confdefs.h <<\EOF
13748 #define HAVE_NC_ALLOC_H 1
13749 EOF
13750
13751 ###     use option --enable-expanded to generate certain macros as functions
13752
13753 # Check whether --enable-expanded or --disable-expanded was given.
13754 if test "${enable_expanded+set}" = set; then
13755   enableval="$enable_expanded"
13756   test "x$enableval" = xyes &&
13757 cat >>confdefs.h <<\EOF
13758 #define NCURSES_EXPANDED 1
13759 EOF
13760
13761 fi;
13762
13763 ###     use option --disable-macros to suppress macros in favor of functions
13764
13765 # Check whether --enable-macros or --disable-macros was given.
13766 if test "${enable_macros+set}" = set; then
13767   enableval="$enable_macros"
13768   test "$enableval" = no &&
13769 cat >>confdefs.h <<\EOF
13770 #define NCURSES_NOMACROS 1
13771 EOF
13772
13773 fi;
13774
13775 # Normally we only add trace() to the debug-library.  Allow this to be
13776 # extended to all models of the ncurses library:
13777 cf_all_traces=no
13778 case "$CFLAGS $CPPFLAGS" in
13779 *-DTRACE*)
13780         cf_all_traces=yes
13781         ;;
13782 esac
13783
13784 echo "$as_me:13784: checking whether to add trace feature to all models" >&5
13785 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13786
13787 # Check whether --with-trace or --without-trace was given.
13788 if test "${with_trace+set}" = set; then
13789   withval="$with_trace"
13790   cf_with_trace=$withval
13791 else
13792   cf_with_trace=$cf_all_traces
13793 fi;
13794 echo "$as_me:13794: result: $cf_with_trace" >&5
13795 echo "${ECHO_T}$cf_with_trace" >&6
13796
13797 if test "x$cf_with_trace" = xyes ; then
13798         LIB_TRACING=all
13799         ADA_TRACE=TRUE
13800
13801 cf_fix_cppflags=no
13802 cf_new_cflags=
13803 cf_new_cppflags=
13804 cf_new_extra_cppflags=
13805
13806 for cf_add_cflags in -DTRACE
13807 do
13808 case $cf_fix_cppflags in
13809 no)
13810         case $cf_add_cflags in #(vi
13811         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13812                 case $cf_add_cflags in
13813                 -D*)
13814                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13815
13816                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13817                                 && test -z "${cf_tst_cflags}" \
13818                                 && cf_fix_cppflags=yes
13819
13820                         if test $cf_fix_cppflags = yes ; then
13821                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13822                                 continue
13823                         elif test "${cf_tst_cflags}" = "\"'" ; then
13824                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13825                                 continue
13826                         fi
13827                         ;;
13828                 esac
13829                 case "$CPPFLAGS" in
13830                 *$cf_add_cflags) #(vi
13831                         ;;
13832                 *) #(vi
13833                         case $cf_add_cflags in #(vi
13834                         -D*)
13835                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13836
13837 CPPFLAGS=`echo "$CPPFLAGS" | \
13838         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13839                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13840
13841                                 ;;
13842                         esac
13843                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13844                         ;;
13845                 esac
13846                 ;;
13847         *)
13848                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13849                 ;;
13850         esac
13851         ;;
13852 yes)
13853         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13854
13855         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13856
13857         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13858                 && test -z "${cf_tst_cflags}" \
13859                 && cf_fix_cppflags=no
13860         ;;
13861 esac
13862 done
13863
13864 if test -n "$cf_new_cflags" ; then
13865
13866         CFLAGS="$CFLAGS $cf_new_cflags"
13867 fi
13868
13869 if test -n "$cf_new_cppflags" ; then
13870
13871         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13872 fi
13873
13874 if test -n "$cf_new_extra_cppflags" ; then
13875
13876         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13877 fi
13878
13879 else
13880         LIB_TRACING=DEBUG
13881         ADA_TRACE=FALSE
13882 fi
13883
13884 echo "$as_me:13884: checking if we want to use GNAT projects" >&5
13885 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
13886
13887 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
13888 if test "${enable_gnat_projects+set}" = set; then
13889   enableval="$enable_gnat_projects"
13890   test "$enableval" != no && enableval=yes
13891   if test "$enableval" != "yes" ; then
13892     enable_gnat_projects=no
13893   else
13894     enable_gnat_projects=yes
13895   fi
13896 else
13897   enableval=yes
13898   enable_gnat_projects=yes
13899
13900 fi;
13901 echo "$as_me:13901: result: $enable_gnat_projects" >&5
13902 echo "${ECHO_T}$enable_gnat_projects" >&6
13903
13904 ###     Checks for libraries.
13905 case $cf_cv_system_name in #(vi
13906 *mingw32*) #(vi
13907         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
13908         LIBS=" -lpsapi $LIBS"
13909         ;;
13910 *)
13911 echo "$as_me:13911: checking for gettimeofday" >&5
13912 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13913 if test "${ac_cv_func_gettimeofday+set}" = set; then
13914   echo $ECHO_N "(cached) $ECHO_C" >&6
13915 else
13916   cat >conftest.$ac_ext <<_ACEOF
13917 #line 13917 "configure"
13918 #include "confdefs.h"
13919 /* System header to define __stub macros and hopefully few prototypes,
13920     which can conflict with char gettimeofday (); below.  */
13921 #include <assert.h>
13922 /* Override any gcc2 internal prototype to avoid an error.  */
13923 #ifdef __cplusplus
13924 extern "C"
13925 #endif
13926 /* We use char because int might match the return type of a gcc2
13927    builtin and then its argument prototype would still apply.  */
13928 char gettimeofday ();
13929 char (*f) ();
13930
13931 int
13932 main ()
13933 {
13934 /* The GNU C library defines this for functions which it implements
13935     to always fail with ENOSYS.  Some functions are actually named
13936     something starting with __ and the normal name is an alias.  */
13937 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13938 choke me
13939 #else
13940 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13941 #endif
13942
13943   ;
13944   return 0;
13945 }
13946 _ACEOF
13947 rm -f conftest.$ac_objext conftest$ac_exeext
13948 if { (eval echo "$as_me:13948: \"$ac_link\"") >&5
13949   (eval $ac_link) 2>&5
13950   ac_status=$?
13951   echo "$as_me:13951: \$? = $ac_status" >&5
13952   (exit $ac_status); } &&
13953          { ac_try='test -s conftest$ac_exeext'
13954   { (eval echo "$as_me:13954: \"$ac_try\"") >&5
13955   (eval $ac_try) 2>&5
13956   ac_status=$?
13957   echo "$as_me:13957: \$? = $ac_status" >&5
13958   (exit $ac_status); }; }; then
13959   ac_cv_func_gettimeofday=yes
13960 else
13961   echo "$as_me: failed program was:" >&5
13962 cat conftest.$ac_ext >&5
13963 ac_cv_func_gettimeofday=no
13964 fi
13965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13966 fi
13967 echo "$as_me:13967: result: $ac_cv_func_gettimeofday" >&5
13968 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13969 if test $ac_cv_func_gettimeofday = yes; then
13970
13971 cat >>confdefs.h <<\EOF
13972 #define HAVE_GETTIMEOFDAY 1
13973 EOF
13974
13975 else
13976
13977 echo "$as_me:13977: checking for gettimeofday in -lbsd" >&5
13978 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13979 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13980   echo $ECHO_N "(cached) $ECHO_C" >&6
13981 else
13982   ac_check_lib_save_LIBS=$LIBS
13983 LIBS="-lbsd  $LIBS"
13984 cat >conftest.$ac_ext <<_ACEOF
13985 #line 13985 "configure"
13986 #include "confdefs.h"
13987
13988 /* Override any gcc2 internal prototype to avoid an error.  */
13989 #ifdef __cplusplus
13990 extern "C"
13991 #endif
13992 /* We use char because int might match the return type of a gcc2
13993    builtin and then its argument prototype would still apply.  */
13994 char gettimeofday ();
13995 int
13996 main ()
13997 {
13998 gettimeofday ();
13999   ;
14000   return 0;
14001 }
14002 _ACEOF
14003 rm -f conftest.$ac_objext conftest$ac_exeext
14004 if { (eval echo "$as_me:14004: \"$ac_link\"") >&5
14005   (eval $ac_link) 2>&5
14006   ac_status=$?
14007   echo "$as_me:14007: \$? = $ac_status" >&5
14008   (exit $ac_status); } &&
14009          { ac_try='test -s conftest$ac_exeext'
14010   { (eval echo "$as_me:14010: \"$ac_try\"") >&5
14011   (eval $ac_try) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit $ac_status); }; }; then
14015   ac_cv_lib_bsd_gettimeofday=yes
14016 else
14017   echo "$as_me: failed program was:" >&5
14018 cat conftest.$ac_ext >&5
14019 ac_cv_lib_bsd_gettimeofday=no
14020 fi
14021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14022 LIBS=$ac_check_lib_save_LIBS
14023 fi
14024 echo "$as_me:14024: result: $ac_cv_lib_bsd_gettimeofday" >&5
14025 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14026 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14027
14028 cat >>confdefs.h <<\EOF
14029 #define HAVE_GETTIMEOFDAY 1
14030 EOF
14031
14032 cf_add_libs="-lbsd"
14033 # Filter out duplicates - this happens with badly-designed ".pc" files...
14034 for cf_add_1lib in $LIBS
14035 do
14036         for cf_add_2lib in $cf_add_libs
14037         do
14038                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14039                 then
14040                         cf_add_1lib=
14041                         break
14042                 fi
14043         done
14044         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14045 done
14046 LIBS="$cf_add_libs"
14047
14048 fi
14049
14050 fi
14051         ;;
14052 esac
14053
14054 echo "$as_me:14054: checking if -lm needed for math functions" >&5
14055 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14056 if test "${cf_cv_need_libm+set}" = set; then
14057   echo $ECHO_N "(cached) $ECHO_C" >&6
14058 else
14059
14060         cat >conftest.$ac_ext <<_ACEOF
14061 #line 14061 "configure"
14062 #include "confdefs.h"
14063
14064         #include <stdio.h>
14065         #include <math.h>
14066
14067 int
14068 main ()
14069 {
14070 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14071   ;
14072   return 0;
14073 }
14074 _ACEOF
14075 rm -f conftest.$ac_objext conftest$ac_exeext
14076 if { (eval echo "$as_me:14076: \"$ac_link\"") >&5
14077   (eval $ac_link) 2>&5
14078   ac_status=$?
14079   echo "$as_me:14079: \$? = $ac_status" >&5
14080   (exit $ac_status); } &&
14081          { ac_try='test -s conftest$ac_exeext'
14082   { (eval echo "$as_me:14082: \"$ac_try\"") >&5
14083   (eval $ac_try) 2>&5
14084   ac_status=$?
14085   echo "$as_me:14085: \$? = $ac_status" >&5
14086   (exit $ac_status); }; }; then
14087   cf_cv_need_libm=no
14088 else
14089   echo "$as_me: failed program was:" >&5
14090 cat conftest.$ac_ext >&5
14091 cf_cv_need_libm=yes
14092 fi
14093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14094 fi
14095 echo "$as_me:14095: result: $cf_cv_need_libm" >&5
14096 echo "${ECHO_T}$cf_cv_need_libm" >&6
14097 if test "$cf_cv_need_libm" = yes
14098 then
14099 MATH_LIB=-lm
14100 fi
14101
14102 ###     Checks for header files.
14103 echo "$as_me:14103: checking for ANSI C header files" >&5
14104 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14105 if test "${ac_cv_header_stdc+set}" = set; then
14106   echo $ECHO_N "(cached) $ECHO_C" >&6
14107 else
14108   cat >conftest.$ac_ext <<_ACEOF
14109 #line 14109 "configure"
14110 #include "confdefs.h"
14111 #include <stdlib.h>
14112 #include <stdarg.h>
14113 #include <string.h>
14114 #include <float.h>
14115
14116 _ACEOF
14117 if { (eval echo "$as_me:14117: \"$ac_cpp conftest.$ac_ext\"") >&5
14118   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14119   ac_status=$?
14120   egrep -v '^ *\+' conftest.er1 >conftest.err
14121   rm -f conftest.er1
14122   cat conftest.err >&5
14123   echo "$as_me:14123: \$? = $ac_status" >&5
14124   (exit $ac_status); } >/dev/null; then
14125   if test -s conftest.err; then
14126     ac_cpp_err=$ac_c_preproc_warn_flag
14127   else
14128     ac_cpp_err=
14129   fi
14130 else
14131   ac_cpp_err=yes
14132 fi
14133 if test -z "$ac_cpp_err"; then
14134   ac_cv_header_stdc=yes
14135 else
14136   echo "$as_me: failed program was:" >&5
14137   cat conftest.$ac_ext >&5
14138   ac_cv_header_stdc=no
14139 fi
14140 rm -f conftest.err conftest.$ac_ext
14141
14142 if test $ac_cv_header_stdc = yes; then
14143   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14144   cat >conftest.$ac_ext <<_ACEOF
14145 #line 14145 "configure"
14146 #include "confdefs.h"
14147 #include <string.h>
14148
14149 _ACEOF
14150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14151   egrep "memchr" >/dev/null 2>&1; then
14152   :
14153 else
14154   ac_cv_header_stdc=no
14155 fi
14156 rm -rf conftest*
14157
14158 fi
14159
14160 if test $ac_cv_header_stdc = yes; then
14161   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14162   cat >conftest.$ac_ext <<_ACEOF
14163 #line 14163 "configure"
14164 #include "confdefs.h"
14165 #include <stdlib.h>
14166
14167 _ACEOF
14168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14169   egrep "free" >/dev/null 2>&1; then
14170   :
14171 else
14172   ac_cv_header_stdc=no
14173 fi
14174 rm -rf conftest*
14175
14176 fi
14177
14178 if test $ac_cv_header_stdc = yes; then
14179   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14180   if test "$cross_compiling" = yes; then
14181   :
14182 else
14183   cat >conftest.$ac_ext <<_ACEOF
14184 #line 14184 "configure"
14185 #include "confdefs.h"
14186 #include <ctype.h>
14187 #if ((' ' & 0x0FF) == 0x020)
14188 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14189 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14190 #else
14191 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14192                      || ('j' <= (c) && (c) <= 'r') \
14193                      || ('s' <= (c) && (c) <= 'z'))
14194 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14195 #endif
14196
14197 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14198 int
14199 main ()
14200 {
14201   int i;
14202   for (i = 0; i < 256; i++)
14203     if (XOR (islower (i), ISLOWER (i))
14204         || toupper (i) != TOUPPER (i))
14205       $ac_main_return(2);
14206   $ac_main_return (0);
14207 }
14208 _ACEOF
14209 rm -f conftest$ac_exeext
14210 if { (eval echo "$as_me:14210: \"$ac_link\"") >&5
14211   (eval $ac_link) 2>&5
14212   ac_status=$?
14213   echo "$as_me:14213: \$? = $ac_status" >&5
14214   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14215   { (eval echo "$as_me:14215: \"$ac_try\"") >&5
14216   (eval $ac_try) 2>&5
14217   ac_status=$?
14218   echo "$as_me:14218: \$? = $ac_status" >&5
14219   (exit $ac_status); }; }; then
14220   :
14221 else
14222   echo "$as_me: program exited with status $ac_status" >&5
14223 echo "$as_me: failed program was:" >&5
14224 cat conftest.$ac_ext >&5
14225 ac_cv_header_stdc=no
14226 fi
14227 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14228 fi
14229 fi
14230 fi
14231 echo "$as_me:14231: result: $ac_cv_header_stdc" >&5
14232 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14233 if test $ac_cv_header_stdc = yes; then
14234
14235 cat >>confdefs.h <<\EOF
14236 #define STDC_HEADERS 1
14237 EOF
14238
14239 fi
14240
14241 ac_header_dirent=no
14242 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14243   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14244 echo "$as_me:14244: checking for $ac_hdr that defines DIR" >&5
14245 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14246 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14247   echo $ECHO_N "(cached) $ECHO_C" >&6
14248 else
14249   cat >conftest.$ac_ext <<_ACEOF
14250 #line 14250 "configure"
14251 #include "confdefs.h"
14252 #include <sys/types.h>
14253 #include <$ac_hdr>
14254
14255 int
14256 main ()
14257 {
14258 if ((DIR *) 0)
14259 return 0;
14260   ;
14261   return 0;
14262 }
14263 _ACEOF
14264 rm -f conftest.$ac_objext
14265 if { (eval echo "$as_me:14265: \"$ac_compile\"") >&5
14266   (eval $ac_compile) 2>&5
14267   ac_status=$?
14268   echo "$as_me:14268: \$? = $ac_status" >&5
14269   (exit $ac_status); } &&
14270          { ac_try='test -s conftest.$ac_objext'
14271   { (eval echo "$as_me:14271: \"$ac_try\"") >&5
14272   (eval $ac_try) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit $ac_status); }; }; then
14276   eval "$as_ac_Header=yes"
14277 else
14278   echo "$as_me: failed program was:" >&5
14279 cat conftest.$ac_ext >&5
14280 eval "$as_ac_Header=no"
14281 fi
14282 rm -f conftest.$ac_objext conftest.$ac_ext
14283 fi
14284 echo "$as_me:14284: result: `eval echo '${'$as_ac_Header'}'`" >&5
14285 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14286 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14287   cat >>confdefs.h <<EOF
14288 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14289 EOF
14290
14291 ac_header_dirent=$ac_hdr; break
14292 fi
14293
14294 done
14295 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14296 if test $ac_header_dirent = dirent.h; then
14297   echo "$as_me:14297: checking for opendir in -ldir" >&5
14298 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14299 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14300   echo $ECHO_N "(cached) $ECHO_C" >&6
14301 else
14302   ac_check_lib_save_LIBS=$LIBS
14303 LIBS="-ldir  $LIBS"
14304 cat >conftest.$ac_ext <<_ACEOF
14305 #line 14305 "configure"
14306 #include "confdefs.h"
14307
14308 /* Override any gcc2 internal prototype to avoid an error.  */
14309 #ifdef __cplusplus
14310 extern "C"
14311 #endif
14312 /* We use char because int might match the return type of a gcc2
14313    builtin and then its argument prototype would still apply.  */
14314 char opendir ();
14315 int
14316 main ()
14317 {
14318 opendir ();
14319   ;
14320   return 0;
14321 }
14322 _ACEOF
14323 rm -f conftest.$ac_objext conftest$ac_exeext
14324 if { (eval echo "$as_me:14324: \"$ac_link\"") >&5
14325   (eval $ac_link) 2>&5
14326   ac_status=$?
14327   echo "$as_me:14327: \$? = $ac_status" >&5
14328   (exit $ac_status); } &&
14329          { ac_try='test -s conftest$ac_exeext'
14330   { (eval echo "$as_me:14330: \"$ac_try\"") >&5
14331   (eval $ac_try) 2>&5
14332   ac_status=$?
14333   echo "$as_me:14333: \$? = $ac_status" >&5
14334   (exit $ac_status); }; }; then
14335   ac_cv_lib_dir_opendir=yes
14336 else
14337   echo "$as_me: failed program was:" >&5
14338 cat conftest.$ac_ext >&5
14339 ac_cv_lib_dir_opendir=no
14340 fi
14341 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14342 LIBS=$ac_check_lib_save_LIBS
14343 fi
14344 echo "$as_me:14344: result: $ac_cv_lib_dir_opendir" >&5
14345 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14346 if test $ac_cv_lib_dir_opendir = yes; then
14347   LIBS="$LIBS -ldir"
14348 fi
14349
14350 else
14351   echo "$as_me:14351: checking for opendir in -lx" >&5
14352 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14353 if test "${ac_cv_lib_x_opendir+set}" = set; then
14354   echo $ECHO_N "(cached) $ECHO_C" >&6
14355 else
14356   ac_check_lib_save_LIBS=$LIBS
14357 LIBS="-lx  $LIBS"
14358 cat >conftest.$ac_ext <<_ACEOF
14359 #line 14359 "configure"
14360 #include "confdefs.h"
14361
14362 /* Override any gcc2 internal prototype to avoid an error.  */
14363 #ifdef __cplusplus
14364 extern "C"
14365 #endif
14366 /* We use char because int might match the return type of a gcc2
14367    builtin and then its argument prototype would still apply.  */
14368 char opendir ();
14369 int
14370 main ()
14371 {
14372 opendir ();
14373   ;
14374   return 0;
14375 }
14376 _ACEOF
14377 rm -f conftest.$ac_objext conftest$ac_exeext
14378 if { (eval echo "$as_me:14378: \"$ac_link\"") >&5
14379   (eval $ac_link) 2>&5
14380   ac_status=$?
14381   echo "$as_me:14381: \$? = $ac_status" >&5
14382   (exit $ac_status); } &&
14383          { ac_try='test -s conftest$ac_exeext'
14384   { (eval echo "$as_me:14384: \"$ac_try\"") >&5
14385   (eval $ac_try) 2>&5
14386   ac_status=$?
14387   echo "$as_me:14387: \$? = $ac_status" >&5
14388   (exit $ac_status); }; }; then
14389   ac_cv_lib_x_opendir=yes
14390 else
14391   echo "$as_me: failed program was:" >&5
14392 cat conftest.$ac_ext >&5
14393 ac_cv_lib_x_opendir=no
14394 fi
14395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14396 LIBS=$ac_check_lib_save_LIBS
14397 fi
14398 echo "$as_me:14398: result: $ac_cv_lib_x_opendir" >&5
14399 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14400 if test $ac_cv_lib_x_opendir = yes; then
14401   LIBS="$LIBS -lx"
14402 fi
14403
14404 fi
14405
14406 echo "$as_me:14406: checking whether time.h and sys/time.h may both be included" >&5
14407 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14408 if test "${ac_cv_header_time+set}" = set; then
14409   echo $ECHO_N "(cached) $ECHO_C" >&6
14410 else
14411   cat >conftest.$ac_ext <<_ACEOF
14412 #line 14412 "configure"
14413 #include "confdefs.h"
14414 #include <sys/types.h>
14415 #include <sys/time.h>
14416 #include <time.h>
14417
14418 int
14419 main ()
14420 {
14421 if ((struct tm *) 0)
14422 return 0;
14423   ;
14424   return 0;
14425 }
14426 _ACEOF
14427 rm -f conftest.$ac_objext
14428 if { (eval echo "$as_me:14428: \"$ac_compile\"") >&5
14429   (eval $ac_compile) 2>&5
14430   ac_status=$?
14431   echo "$as_me:14431: \$? = $ac_status" >&5
14432   (exit $ac_status); } &&
14433          { ac_try='test -s conftest.$ac_objext'
14434   { (eval echo "$as_me:14434: \"$ac_try\"") >&5
14435   (eval $ac_try) 2>&5
14436   ac_status=$?
14437   echo "$as_me:14437: \$? = $ac_status" >&5
14438   (exit $ac_status); }; }; then
14439   ac_cv_header_time=yes
14440 else
14441   echo "$as_me: failed program was:" >&5
14442 cat conftest.$ac_ext >&5
14443 ac_cv_header_time=no
14444 fi
14445 rm -f conftest.$ac_objext conftest.$ac_ext
14446 fi
14447 echo "$as_me:14447: result: $ac_cv_header_time" >&5
14448 echo "${ECHO_T}$ac_cv_header_time" >&6
14449 if test $ac_cv_header_time = yes; then
14450
14451 cat >>confdefs.h <<\EOF
14452 #define TIME_WITH_SYS_TIME 1
14453 EOF
14454
14455 fi
14456
14457 cf_regex_func=no
14458
14459 cf_regex_libs="regex re"
14460 case $host_os in #(vi
14461 mingw*)
14462         cf_regex_libs="gnurx $cf_regex_libs"
14463         ;;
14464 esac
14465
14466 echo "$as_me:14466: checking for regcomp" >&5
14467 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14468 if test "${ac_cv_func_regcomp+set}" = set; then
14469   echo $ECHO_N "(cached) $ECHO_C" >&6
14470 else
14471   cat >conftest.$ac_ext <<_ACEOF
14472 #line 14472 "configure"
14473 #include "confdefs.h"
14474 /* System header to define __stub macros and hopefully few prototypes,
14475     which can conflict with char regcomp (); below.  */
14476 #include <assert.h>
14477 /* Override any gcc2 internal prototype to avoid an error.  */
14478 #ifdef __cplusplus
14479 extern "C"
14480 #endif
14481 /* We use char because int might match the return type of a gcc2
14482    builtin and then its argument prototype would still apply.  */
14483 char regcomp ();
14484 char (*f) ();
14485
14486 int
14487 main ()
14488 {
14489 /* The GNU C library defines this for functions which it implements
14490     to always fail with ENOSYS.  Some functions are actually named
14491     something starting with __ and the normal name is an alias.  */
14492 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14493 choke me
14494 #else
14495 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14496 #endif
14497
14498   ;
14499   return 0;
14500 }
14501 _ACEOF
14502 rm -f conftest.$ac_objext conftest$ac_exeext
14503 if { (eval echo "$as_me:14503: \"$ac_link\"") >&5
14504   (eval $ac_link) 2>&5
14505   ac_status=$?
14506   echo "$as_me:14506: \$? = $ac_status" >&5
14507   (exit $ac_status); } &&
14508          { ac_try='test -s conftest$ac_exeext'
14509   { (eval echo "$as_me:14509: \"$ac_try\"") >&5
14510   (eval $ac_try) 2>&5
14511   ac_status=$?
14512   echo "$as_me:14512: \$? = $ac_status" >&5
14513   (exit $ac_status); }; }; then
14514   ac_cv_func_regcomp=yes
14515 else
14516   echo "$as_me: failed program was:" >&5
14517 cat conftest.$ac_ext >&5
14518 ac_cv_func_regcomp=no
14519 fi
14520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14521 fi
14522 echo "$as_me:14522: result: $ac_cv_func_regcomp" >&5
14523 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14524 if test $ac_cv_func_regcomp = yes; then
14525   cf_regex_func=regcomp
14526 else
14527
14528         for cf_regex_lib in $cf_regex_libs
14529         do
14530                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14531 echo "$as_me:14531: checking for regcomp in -l$cf_regex_lib" >&5
14532 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14533 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14534   echo $ECHO_N "(cached) $ECHO_C" >&6
14535 else
14536   ac_check_lib_save_LIBS=$LIBS
14537 LIBS="-l$cf_regex_lib  $LIBS"
14538 cat >conftest.$ac_ext <<_ACEOF
14539 #line 14539 "configure"
14540 #include "confdefs.h"
14541
14542 /* Override any gcc2 internal prototype to avoid an error.  */
14543 #ifdef __cplusplus
14544 extern "C"
14545 #endif
14546 /* We use char because int might match the return type of a gcc2
14547    builtin and then its argument prototype would still apply.  */
14548 char regcomp ();
14549 int
14550 main ()
14551 {
14552 regcomp ();
14553   ;
14554   return 0;
14555 }
14556 _ACEOF
14557 rm -f conftest.$ac_objext conftest$ac_exeext
14558 if { (eval echo "$as_me:14558: \"$ac_link\"") >&5
14559   (eval $ac_link) 2>&5
14560   ac_status=$?
14561   echo "$as_me:14561: \$? = $ac_status" >&5
14562   (exit $ac_status); } &&
14563          { ac_try='test -s conftest$ac_exeext'
14564   { (eval echo "$as_me:14564: \"$ac_try\"") >&5
14565   (eval $ac_try) 2>&5
14566   ac_status=$?
14567   echo "$as_me:14567: \$? = $ac_status" >&5
14568   (exit $ac_status); }; }; then
14569   eval "$as_ac_Lib=yes"
14570 else
14571   echo "$as_me: failed program was:" >&5
14572 cat conftest.$ac_ext >&5
14573 eval "$as_ac_Lib=no"
14574 fi
14575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14576 LIBS=$ac_check_lib_save_LIBS
14577 fi
14578 echo "$as_me:14578: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14579 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14580 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14581
14582 cf_add_libs="-l$cf_regex_lib"
14583 # Filter out duplicates - this happens with badly-designed ".pc" files...
14584 for cf_add_1lib in $LIBS
14585 do
14586         for cf_add_2lib in $cf_add_libs
14587         do
14588                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14589                 then
14590                         cf_add_1lib=
14591                         break
14592                 fi
14593         done
14594         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14595 done
14596 LIBS="$cf_add_libs"
14597
14598                                 cf_regex_func=regcomp
14599                                 break
14600 fi
14601
14602         done
14603
14604 fi
14605
14606 if test "$cf_regex_func" = no ; then
14607         echo "$as_me:14607: checking for compile" >&5
14608 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14609 if test "${ac_cv_func_compile+set}" = set; then
14610   echo $ECHO_N "(cached) $ECHO_C" >&6
14611 else
14612   cat >conftest.$ac_ext <<_ACEOF
14613 #line 14613 "configure"
14614 #include "confdefs.h"
14615 /* System header to define __stub macros and hopefully few prototypes,
14616     which can conflict with char compile (); below.  */
14617 #include <assert.h>
14618 /* Override any gcc2 internal prototype to avoid an error.  */
14619 #ifdef __cplusplus
14620 extern "C"
14621 #endif
14622 /* We use char because int might match the return type of a gcc2
14623    builtin and then its argument prototype would still apply.  */
14624 char compile ();
14625 char (*f) ();
14626
14627 int
14628 main ()
14629 {
14630 /* The GNU C library defines this for functions which it implements
14631     to always fail with ENOSYS.  Some functions are actually named
14632     something starting with __ and the normal name is an alias.  */
14633 #if defined (__stub_compile) || defined (__stub___compile)
14634 choke me
14635 #else
14636 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14637 #endif
14638
14639   ;
14640   return 0;
14641 }
14642 _ACEOF
14643 rm -f conftest.$ac_objext conftest$ac_exeext
14644 if { (eval echo "$as_me:14644: \"$ac_link\"") >&5
14645   (eval $ac_link) 2>&5
14646   ac_status=$?
14647   echo "$as_me:14647: \$? = $ac_status" >&5
14648   (exit $ac_status); } &&
14649          { ac_try='test -s conftest$ac_exeext'
14650   { (eval echo "$as_me:14650: \"$ac_try\"") >&5
14651   (eval $ac_try) 2>&5
14652   ac_status=$?
14653   echo "$as_me:14653: \$? = $ac_status" >&5
14654   (exit $ac_status); }; }; then
14655   ac_cv_func_compile=yes
14656 else
14657   echo "$as_me: failed program was:" >&5
14658 cat conftest.$ac_ext >&5
14659 ac_cv_func_compile=no
14660 fi
14661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14662 fi
14663 echo "$as_me:14663: result: $ac_cv_func_compile" >&5
14664 echo "${ECHO_T}$ac_cv_func_compile" >&6
14665 if test $ac_cv_func_compile = yes; then
14666   cf_regex_func=compile
14667 else
14668
14669                 echo "$as_me:14669: checking for compile in -lgen" >&5
14670 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14671 if test "${ac_cv_lib_gen_compile+set}" = set; then
14672   echo $ECHO_N "(cached) $ECHO_C" >&6
14673 else
14674   ac_check_lib_save_LIBS=$LIBS
14675 LIBS="-lgen  $LIBS"
14676 cat >conftest.$ac_ext <<_ACEOF
14677 #line 14677 "configure"
14678 #include "confdefs.h"
14679
14680 /* Override any gcc2 internal prototype to avoid an error.  */
14681 #ifdef __cplusplus
14682 extern "C"
14683 #endif
14684 /* We use char because int might match the return type of a gcc2
14685    builtin and then its argument prototype would still apply.  */
14686 char compile ();
14687 int
14688 main ()
14689 {
14690 compile ();
14691   ;
14692   return 0;
14693 }
14694 _ACEOF
14695 rm -f conftest.$ac_objext conftest$ac_exeext
14696 if { (eval echo "$as_me:14696: \"$ac_link\"") >&5
14697   (eval $ac_link) 2>&5
14698   ac_status=$?
14699   echo "$as_me:14699: \$? = $ac_status" >&5
14700   (exit $ac_status); } &&
14701          { ac_try='test -s conftest$ac_exeext'
14702   { (eval echo "$as_me:14702: \"$ac_try\"") >&5
14703   (eval $ac_try) 2>&5
14704   ac_status=$?
14705   echo "$as_me:14705: \$? = $ac_status" >&5
14706   (exit $ac_status); }; }; then
14707   ac_cv_lib_gen_compile=yes
14708 else
14709   echo "$as_me: failed program was:" >&5
14710 cat conftest.$ac_ext >&5
14711 ac_cv_lib_gen_compile=no
14712 fi
14713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14714 LIBS=$ac_check_lib_save_LIBS
14715 fi
14716 echo "$as_me:14716: result: $ac_cv_lib_gen_compile" >&5
14717 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14718 if test $ac_cv_lib_gen_compile = yes; then
14719
14720 cf_add_libs="-lgen"
14721 # Filter out duplicates - this happens with badly-designed ".pc" files...
14722 for cf_add_1lib in $LIBS
14723 do
14724         for cf_add_2lib in $cf_add_libs
14725         do
14726                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14727                 then
14728                         cf_add_1lib=
14729                         break
14730                 fi
14731         done
14732         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14733 done
14734 LIBS="$cf_add_libs"
14735
14736                                 cf_regex_func=compile
14737 fi
14738
14739 fi
14740
14741 fi
14742
14743 if test "$cf_regex_func" = no ; then
14744         { echo "$as_me:14744: WARNING: cannot find regular expression library" >&5
14745 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14746 fi
14747
14748 echo "$as_me:14748: checking for regular-expression headers" >&5
14749 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14750 if test "${cf_cv_regex_hdrs+set}" = set; then
14751   echo $ECHO_N "(cached) $ECHO_C" >&6
14752 else
14753
14754 cf_cv_regex_hdrs=no
14755 case $cf_regex_func in #(vi
14756 compile) #(vi
14757         for cf_regex_hdr in regexp.h regexpr.h
14758         do
14759                 cat >conftest.$ac_ext <<_ACEOF
14760 #line 14760 "configure"
14761 #include "confdefs.h"
14762 #include <$cf_regex_hdr>
14763 int
14764 main ()
14765 {
14766
14767                         char *p = compile("", "", "", 0);
14768                         int x = step("", "");
14769
14770   ;
14771   return 0;
14772 }
14773 _ACEOF
14774 rm -f conftest.$ac_objext conftest$ac_exeext
14775 if { (eval echo "$as_me:14775: \"$ac_link\"") >&5
14776   (eval $ac_link) 2>&5
14777   ac_status=$?
14778   echo "$as_me:14778: \$? = $ac_status" >&5
14779   (exit $ac_status); } &&
14780          { ac_try='test -s conftest$ac_exeext'
14781   { (eval echo "$as_me:14781: \"$ac_try\"") >&5
14782   (eval $ac_try) 2>&5
14783   ac_status=$?
14784   echo "$as_me:14784: \$? = $ac_status" >&5
14785   (exit $ac_status); }; }; then
14786
14787                         cf_cv_regex_hdrs=$cf_regex_hdr
14788                         break
14789
14790 else
14791   echo "$as_me: failed program was:" >&5
14792 cat conftest.$ac_ext >&5
14793 fi
14794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14795         done
14796         ;;
14797 *)
14798         for cf_regex_hdr in regex.h
14799         do
14800                 cat >conftest.$ac_ext <<_ACEOF
14801 #line 14801 "configure"
14802 #include "confdefs.h"
14803 #include <sys/types.h>
14804 #include <$cf_regex_hdr>
14805 int
14806 main ()
14807 {
14808
14809                         regex_t *p;
14810                         int x = regcomp(p, "", 0);
14811                         int y = regexec(p, "", 0, 0, 0);
14812                         regfree(p);
14813
14814   ;
14815   return 0;
14816 }
14817 _ACEOF
14818 rm -f conftest.$ac_objext conftest$ac_exeext
14819 if { (eval echo "$as_me:14819: \"$ac_link\"") >&5
14820   (eval $ac_link) 2>&5
14821   ac_status=$?
14822   echo "$as_me:14822: \$? = $ac_status" >&5
14823   (exit $ac_status); } &&
14824          { ac_try='test -s conftest$ac_exeext'
14825   { (eval echo "$as_me:14825: \"$ac_try\"") >&5
14826   (eval $ac_try) 2>&5
14827   ac_status=$?
14828   echo "$as_me:14828: \$? = $ac_status" >&5
14829   (exit $ac_status); }; }; then
14830
14831                         cf_cv_regex_hdrs=$cf_regex_hdr
14832                         break
14833
14834 else
14835   echo "$as_me: failed program was:" >&5
14836 cat conftest.$ac_ext >&5
14837 fi
14838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14839         done
14840         ;;
14841 esac
14842
14843 fi
14844 echo "$as_me:14844: result: $cf_cv_regex_hdrs" >&5
14845 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14846
14847 case $cf_cv_regex_hdrs in #(vi
14848     no)        { echo "$as_me:14848: WARNING: no regular expression header found" >&5
14849 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14850     regex.h)
14851 cat >>confdefs.h <<\EOF
14852 #define HAVE_REGEX_H_FUNCS 1
14853 EOF
14854  ;; #(vi
14855     regexp.h)
14856 cat >>confdefs.h <<\EOF
14857 #define HAVE_REGEXP_H_FUNCS 1
14858 EOF
14859  ;; #(vi
14860     regexpr.h)
14861 cat >>confdefs.h <<\EOF
14862 #define HAVE_REGEXPR_H_FUNCS 1
14863 EOF
14864  ;;
14865 esac
14866
14867 for ac_header in \
14868 fcntl.h \
14869 getopt.h \
14870 limits.h \
14871 locale.h \
14872 math.h \
14873 poll.h \
14874 sys/bsdtypes.h \
14875 sys/ioctl.h \
14876 sys/param.h \
14877 sys/poll.h \
14878 sys/select.h \
14879 sys/time.h \
14880 sys/times.h \
14881 ttyent.h \
14882 unistd.h \
14883 wctype.h \
14884
14885 do
14886 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14887 echo "$as_me:14887: checking for $ac_header" >&5
14888 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14889 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14890   echo $ECHO_N "(cached) $ECHO_C" >&6
14891 else
14892   cat >conftest.$ac_ext <<_ACEOF
14893 #line 14893 "configure"
14894 #include "confdefs.h"
14895 #include <$ac_header>
14896 _ACEOF
14897 if { (eval echo "$as_me:14897: \"$ac_cpp conftest.$ac_ext\"") >&5
14898   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14899   ac_status=$?
14900   egrep -v '^ *\+' conftest.er1 >conftest.err
14901   rm -f conftest.er1
14902   cat conftest.err >&5
14903   echo "$as_me:14903: \$? = $ac_status" >&5
14904   (exit $ac_status); } >/dev/null; then
14905   if test -s conftest.err; then
14906     ac_cpp_err=$ac_c_preproc_warn_flag
14907   else
14908     ac_cpp_err=
14909   fi
14910 else
14911   ac_cpp_err=yes
14912 fi
14913 if test -z "$ac_cpp_err"; then
14914   eval "$as_ac_Header=yes"
14915 else
14916   echo "$as_me: failed program was:" >&5
14917   cat conftest.$ac_ext >&5
14918   eval "$as_ac_Header=no"
14919 fi
14920 rm -f conftest.err conftest.$ac_ext
14921 fi
14922 echo "$as_me:14922: result: `eval echo '${'$as_ac_Header'}'`" >&5
14923 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14924 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14925   cat >>confdefs.h <<EOF
14926 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14927 EOF
14928
14929 fi
14930 done
14931
14932 for ac_header in unistd.h getopt.h
14933 do
14934 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14935 echo "$as_me:14935: checking for $ac_header" >&5
14936 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14937 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14938   echo $ECHO_N "(cached) $ECHO_C" >&6
14939 else
14940   cat >conftest.$ac_ext <<_ACEOF
14941 #line 14941 "configure"
14942 #include "confdefs.h"
14943 #include <$ac_header>
14944 _ACEOF
14945 if { (eval echo "$as_me:14945: \"$ac_cpp conftest.$ac_ext\"") >&5
14946   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14947   ac_status=$?
14948   egrep -v '^ *\+' conftest.er1 >conftest.err
14949   rm -f conftest.er1
14950   cat conftest.err >&5
14951   echo "$as_me:14951: \$? = $ac_status" >&5
14952   (exit $ac_status); } >/dev/null; then
14953   if test -s conftest.err; then
14954     ac_cpp_err=$ac_c_preproc_warn_flag
14955   else
14956     ac_cpp_err=
14957   fi
14958 else
14959   ac_cpp_err=yes
14960 fi
14961 if test -z "$ac_cpp_err"; then
14962   eval "$as_ac_Header=yes"
14963 else
14964   echo "$as_me: failed program was:" >&5
14965   cat conftest.$ac_ext >&5
14966   eval "$as_ac_Header=no"
14967 fi
14968 rm -f conftest.err conftest.$ac_ext
14969 fi
14970 echo "$as_me:14970: result: `eval echo '${'$as_ac_Header'}'`" >&5
14971 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14972 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14973   cat >>confdefs.h <<EOF
14974 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14975 EOF
14976
14977 fi
14978 done
14979
14980 echo "$as_me:14980: checking for header declaring getopt variables" >&5
14981 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14982 if test "${cf_cv_getopt_header+set}" = set; then
14983   echo $ECHO_N "(cached) $ECHO_C" >&6
14984 else
14985
14986 cf_cv_getopt_header=none
14987 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14988 do
14989 cat >conftest.$ac_ext <<_ACEOF
14990 #line 14990 "configure"
14991 #include "confdefs.h"
14992
14993 #include <$cf_header>
14994 int
14995 main ()
14996 {
14997 int x = optind; char *y = optarg
14998   ;
14999   return 0;
15000 }
15001 _ACEOF
15002 rm -f conftest.$ac_objext
15003 if { (eval echo "$as_me:15003: \"$ac_compile\"") >&5
15004   (eval $ac_compile) 2>&5
15005   ac_status=$?
15006   echo "$as_me:15006: \$? = $ac_status" >&5
15007   (exit $ac_status); } &&
15008          { ac_try='test -s conftest.$ac_objext'
15009   { (eval echo "$as_me:15009: \"$ac_try\"") >&5
15010   (eval $ac_try) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); }; }; then
15014   cf_cv_getopt_header=$cf_header
15015  break
15016 else
15017   echo "$as_me: failed program was:" >&5
15018 cat conftest.$ac_ext >&5
15019 fi
15020 rm -f conftest.$ac_objext conftest.$ac_ext
15021 done
15022
15023 fi
15024 echo "$as_me:15024: result: $cf_cv_getopt_header" >&5
15025 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15026 if test $cf_cv_getopt_header != none ; then
15027
15028 cat >>confdefs.h <<\EOF
15029 #define HAVE_GETOPT_HEADER 1
15030 EOF
15031
15032 fi
15033 if test $cf_cv_getopt_header = getopt.h ; then
15034
15035 cat >>confdefs.h <<\EOF
15036 #define NEED_GETOPT_H 1
15037 EOF
15038
15039 fi
15040
15041 # check for ISC (this may also define _POSIX_SOURCE)
15042 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15043 if test "x$ISC" = xyes ; then
15044
15045 echo "$as_me:15045: checking for main in -lcposix" >&5
15046 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15047 if test "${ac_cv_lib_cposix_main+set}" = set; then
15048   echo $ECHO_N "(cached) $ECHO_C" >&6
15049 else
15050   ac_check_lib_save_LIBS=$LIBS
15051 LIBS="-lcposix  $LIBS"
15052 cat >conftest.$ac_ext <<_ACEOF
15053 #line 15053 "configure"
15054 #include "confdefs.h"
15055
15056 int
15057 main ()
15058 {
15059 main ();
15060   ;
15061   return 0;
15062 }
15063 _ACEOF
15064 rm -f conftest.$ac_objext conftest$ac_exeext
15065 if { (eval echo "$as_me:15065: \"$ac_link\"") >&5
15066   (eval $ac_link) 2>&5
15067   ac_status=$?
15068   echo "$as_me:15068: \$? = $ac_status" >&5
15069   (exit $ac_status); } &&
15070          { ac_try='test -s conftest$ac_exeext'
15071   { (eval echo "$as_me:15071: \"$ac_try\"") >&5
15072   (eval $ac_try) 2>&5
15073   ac_status=$?
15074   echo "$as_me:15074: \$? = $ac_status" >&5
15075   (exit $ac_status); }; }; then
15076   ac_cv_lib_cposix_main=yes
15077 else
15078   echo "$as_me: failed program was:" >&5
15079 cat conftest.$ac_ext >&5
15080 ac_cv_lib_cposix_main=no
15081 fi
15082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15083 LIBS=$ac_check_lib_save_LIBS
15084 fi
15085 echo "$as_me:15085: result: $ac_cv_lib_cposix_main" >&5
15086 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15087 if test $ac_cv_lib_cposix_main = yes; then
15088   cat >>confdefs.h <<EOF
15089 #define HAVE_LIBCPOSIX 1
15090 EOF
15091
15092   LIBS="-lcposix $LIBS"
15093
15094 fi
15095
15096         echo "$as_me:15096: checking for bzero in -linet" >&5
15097 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15098 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15099   echo $ECHO_N "(cached) $ECHO_C" >&6
15100 else
15101   ac_check_lib_save_LIBS=$LIBS
15102 LIBS="-linet  $LIBS"
15103 cat >conftest.$ac_ext <<_ACEOF
15104 #line 15104 "configure"
15105 #include "confdefs.h"
15106
15107 /* Override any gcc2 internal prototype to avoid an error.  */
15108 #ifdef __cplusplus
15109 extern "C"
15110 #endif
15111 /* We use char because int might match the return type of a gcc2
15112    builtin and then its argument prototype would still apply.  */
15113 char bzero ();
15114 int
15115 main ()
15116 {
15117 bzero ();
15118   ;
15119   return 0;
15120 }
15121 _ACEOF
15122 rm -f conftest.$ac_objext conftest$ac_exeext
15123 if { (eval echo "$as_me:15123: \"$ac_link\"") >&5
15124   (eval $ac_link) 2>&5
15125   ac_status=$?
15126   echo "$as_me:15126: \$? = $ac_status" >&5
15127   (exit $ac_status); } &&
15128          { ac_try='test -s conftest$ac_exeext'
15129   { (eval echo "$as_me:15129: \"$ac_try\"") >&5
15130   (eval $ac_try) 2>&5
15131   ac_status=$?
15132   echo "$as_me:15132: \$? = $ac_status" >&5
15133   (exit $ac_status); }; }; then
15134   ac_cv_lib_inet_bzero=yes
15135 else
15136   echo "$as_me: failed program was:" >&5
15137 cat conftest.$ac_ext >&5
15138 ac_cv_lib_inet_bzero=no
15139 fi
15140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15141 LIBS=$ac_check_lib_save_LIBS
15142 fi
15143 echo "$as_me:15143: result: $ac_cv_lib_inet_bzero" >&5
15144 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15145 if test $ac_cv_lib_inet_bzero = yes; then
15146
15147 cf_add_libs="-linet"
15148 # Filter out duplicates - this happens with badly-designed ".pc" files...
15149 for cf_add_1lib in $LIBS
15150 do
15151         for cf_add_2lib in $cf_add_libs
15152         do
15153                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15154                 then
15155                         cf_add_1lib=
15156                         break
15157                 fi
15158         done
15159         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15160 done
15161 LIBS="$cf_add_libs"
15162
15163 fi
15164 fi
15165
15166 echo "$as_me:15166: checking if sys/time.h works with sys/select.h" >&5
15167 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15168 if test "${cf_cv_sys_time_select+set}" = set; then
15169   echo $ECHO_N "(cached) $ECHO_C" >&6
15170 else
15171
15172 cat >conftest.$ac_ext <<_ACEOF
15173 #line 15173 "configure"
15174 #include "confdefs.h"
15175
15176 #include <sys/types.h>
15177 #ifdef HAVE_SYS_TIME_H
15178 #include <sys/time.h>
15179 #endif
15180 #ifdef HAVE_SYS_SELECT_H
15181 #include <sys/select.h>
15182 #endif
15183
15184 int
15185 main ()
15186 {
15187
15188   ;
15189   return 0;
15190 }
15191 _ACEOF
15192 rm -f conftest.$ac_objext
15193 if { (eval echo "$as_me:15193: \"$ac_compile\"") >&5
15194   (eval $ac_compile) 2>&5
15195   ac_status=$?
15196   echo "$as_me:15196: \$? = $ac_status" >&5
15197   (exit $ac_status); } &&
15198          { ac_try='test -s conftest.$ac_objext'
15199   { (eval echo "$as_me:15199: \"$ac_try\"") >&5
15200   (eval $ac_try) 2>&5
15201   ac_status=$?
15202   echo "$as_me:15202: \$? = $ac_status" >&5
15203   (exit $ac_status); }; }; then
15204   cf_cv_sys_time_select=yes
15205 else
15206   echo "$as_me: failed program was:" >&5
15207 cat conftest.$ac_ext >&5
15208 cf_cv_sys_time_select=no
15209 fi
15210 rm -f conftest.$ac_objext conftest.$ac_ext
15211
15212 fi
15213
15214 echo "$as_me:15214: result: $cf_cv_sys_time_select" >&5
15215 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15216 test "$cf_cv_sys_time_select" = yes &&
15217 cat >>confdefs.h <<\EOF
15218 #define HAVE_SYS_TIME_SELECT 1
15219 EOF
15220
15221 ###     checks for compiler characteristics
15222 ac_ext=c
15223 ac_cpp='$CPP $CPPFLAGS'
15224 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15225 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15226 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15227 ac_main_return=return
15228
15229 echo "$as_me:15229: checking for an ANSI C-conforming const" >&5
15230 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15231 if test "${ac_cv_c_const+set}" = set; then
15232   echo $ECHO_N "(cached) $ECHO_C" >&6
15233 else
15234   cat >conftest.$ac_ext <<_ACEOF
15235 #line 15235 "configure"
15236 #include "confdefs.h"
15237
15238 int
15239 main ()
15240 {
15241 /* FIXME: Include the comments suggested by Paul. */
15242 #ifndef __cplusplus
15243   /* Ultrix mips cc rejects this.  */
15244   typedef int charset[2];
15245   const charset x;
15246   /* SunOS 4.1.1 cc rejects this.  */
15247   char const *const *ccp;
15248   char **p;
15249   /* NEC SVR4.0.2 mips cc rejects this.  */
15250   struct point {int x, y;};
15251   static struct point const zero = {0,0};
15252   /* AIX XL C 1.02.0.0 rejects this.
15253      It does not let you subtract one const X* pointer from another in
15254      an arm of an if-expression whose if-part is not a constant
15255      expression */
15256   const char *g = "string";
15257   ccp = &g + (g ? g-g : 0);
15258   /* HPUX 7.0 cc rejects these. */
15259   ++ccp;
15260   p = (char**) ccp;
15261   ccp = (char const *const *) p;
15262   { /* SCO 3.2v4 cc rejects this.  */
15263     char *t;
15264     char const *s = 0 ? (char *) 0 : (char const *) 0;
15265
15266     *t++ = 0;
15267   }
15268   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15269     int x[] = {25, 17};
15270     const int *foo = &x[0];
15271     ++foo;
15272   }
15273   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15274     typedef const int *iptr;
15275     iptr p = 0;
15276     ++p;
15277   }
15278   { /* AIX XL C 1.02.0.0 rejects this saying
15279        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15280     struct s { int j; const int *ap[3]; };
15281     struct s *b; b->j = 5;
15282   }
15283   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15284     const int foo = 10;
15285   }
15286 #endif
15287
15288   ;
15289   return 0;
15290 }
15291 _ACEOF
15292 rm -f conftest.$ac_objext
15293 if { (eval echo "$as_me:15293: \"$ac_compile\"") >&5
15294   (eval $ac_compile) 2>&5
15295   ac_status=$?
15296   echo "$as_me:15296: \$? = $ac_status" >&5
15297   (exit $ac_status); } &&
15298          { ac_try='test -s conftest.$ac_objext'
15299   { (eval echo "$as_me:15299: \"$ac_try\"") >&5
15300   (eval $ac_try) 2>&5
15301   ac_status=$?
15302   echo "$as_me:15302: \$? = $ac_status" >&5
15303   (exit $ac_status); }; }; then
15304   ac_cv_c_const=yes
15305 else
15306   echo "$as_me: failed program was:" >&5
15307 cat conftest.$ac_ext >&5
15308 ac_cv_c_const=no
15309 fi
15310 rm -f conftest.$ac_objext conftest.$ac_ext
15311 fi
15312 echo "$as_me:15312: result: $ac_cv_c_const" >&5
15313 echo "${ECHO_T}$ac_cv_c_const" >&6
15314 if test $ac_cv_c_const = no; then
15315
15316 cat >>confdefs.h <<\EOF
15317 #define const
15318 EOF
15319
15320 fi
15321
15322 echo "$as_me:15322: checking for inline" >&5
15323 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15324 if test "${ac_cv_c_inline+set}" = set; then
15325   echo $ECHO_N "(cached) $ECHO_C" >&6
15326 else
15327   ac_cv_c_inline=no
15328 for ac_kw in inline __inline__ __inline; do
15329   cat >conftest.$ac_ext <<_ACEOF
15330 #line 15330 "configure"
15331 #include "confdefs.h"
15332 #ifndef __cplusplus
15333 static $ac_kw int static_foo () {return 0; }
15334 $ac_kw int foo () {return 0; }
15335 #endif
15336
15337 _ACEOF
15338 rm -f conftest.$ac_objext
15339 if { (eval echo "$as_me:15339: \"$ac_compile\"") >&5
15340   (eval $ac_compile) 2>&5
15341   ac_status=$?
15342   echo "$as_me:15342: \$? = $ac_status" >&5
15343   (exit $ac_status); } &&
15344          { ac_try='test -s conftest.$ac_objext'
15345   { (eval echo "$as_me:15345: \"$ac_try\"") >&5
15346   (eval $ac_try) 2>&5
15347   ac_status=$?
15348   echo "$as_me:15348: \$? = $ac_status" >&5
15349   (exit $ac_status); }; }; then
15350   ac_cv_c_inline=$ac_kw; break
15351 else
15352   echo "$as_me: failed program was:" >&5
15353 cat conftest.$ac_ext >&5
15354 fi
15355 rm -f conftest.$ac_objext conftest.$ac_ext
15356 done
15357
15358 fi
15359 echo "$as_me:15359: result: $ac_cv_c_inline" >&5
15360 echo "${ECHO_T}$ac_cv_c_inline" >&6
15361 case $ac_cv_c_inline in
15362   inline | yes) ;;
15363   no)
15364 cat >>confdefs.h <<\EOF
15365 #define inline
15366 EOF
15367  ;;
15368   *)  cat >>confdefs.h <<EOF
15369 #define inline $ac_cv_c_inline
15370 EOF
15371  ;;
15372 esac
15373
15374 NCURSES_INLINE=
15375 if test "$ac_cv_c_inline" != no ; then
15376   NCURSES_INLINE=inline
15377   if test "$INTEL_COMPILER" = yes
15378   then
15379     :
15380   elif test "$CLANG_COMPILER" = yes
15381   then
15382     :
15383   elif test "$GCC" = yes
15384   then
15385     echo "$as_me:15385: checking if $CC supports options to tune inlining" >&5
15386 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15387 if test "${cf_cv_gcc_inline+set}" = set; then
15388   echo $ECHO_N "(cached) $ECHO_C" >&6
15389 else
15390
15391       cf_save_CFLAGS=$CFLAGS
15392       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15393       cat >conftest.$ac_ext <<_ACEOF
15394 #line 15394 "configure"
15395 #include "confdefs.h"
15396 inline int foo(void) { return 1; }
15397 int
15398 main ()
15399 {
15400 ${cf_cv_main_return:-return} foo()
15401   ;
15402   return 0;
15403 }
15404 _ACEOF
15405 rm -f conftest.$ac_objext
15406 if { (eval echo "$as_me:15406: \"$ac_compile\"") >&5
15407   (eval $ac_compile) 2>&5
15408   ac_status=$?
15409   echo "$as_me:15409: \$? = $ac_status" >&5
15410   (exit $ac_status); } &&
15411          { ac_try='test -s conftest.$ac_objext'
15412   { (eval echo "$as_me:15412: \"$ac_try\"") >&5
15413   (eval $ac_try) 2>&5
15414   ac_status=$?
15415   echo "$as_me:15415: \$? = $ac_status" >&5
15416   (exit $ac_status); }; }; then
15417   cf_cv_gcc_inline=yes
15418 else
15419   echo "$as_me: failed program was:" >&5
15420 cat conftest.$ac_ext >&5
15421 cf_cv_gcc_inline=no
15422 fi
15423 rm -f conftest.$ac_objext conftest.$ac_ext
15424       CFLAGS=$cf_save_CFLAGS
15425
15426 fi
15427 echo "$as_me:15427: result: $cf_cv_gcc_inline" >&5
15428 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15429     if test "$cf_cv_gcc_inline" = yes ; then
15430
15431 cf_fix_cppflags=no
15432 cf_new_cflags=
15433 cf_new_cppflags=
15434 cf_new_extra_cppflags=
15435
15436 for cf_add_cflags in --param max-inline-insns-single=1200
15437 do
15438 case $cf_fix_cppflags in
15439 no)
15440         case $cf_add_cflags in #(vi
15441         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15442                 case $cf_add_cflags in
15443                 -D*)
15444                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15445
15446                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15447                                 && test -z "${cf_tst_cflags}" \
15448                                 && cf_fix_cppflags=yes
15449
15450                         if test $cf_fix_cppflags = yes ; then
15451                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15452                                 continue
15453                         elif test "${cf_tst_cflags}" = "\"'" ; then
15454                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15455                                 continue
15456                         fi
15457                         ;;
15458                 esac
15459                 case "$CPPFLAGS" in
15460                 *$cf_add_cflags) #(vi
15461                         ;;
15462                 *) #(vi
15463                         case $cf_add_cflags in #(vi
15464                         -D*)
15465                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15466
15467 CPPFLAGS=`echo "$CPPFLAGS" | \
15468         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15469                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15470
15471                                 ;;
15472                         esac
15473                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15474                         ;;
15475                 esac
15476                 ;;
15477         *)
15478                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15479                 ;;
15480         esac
15481         ;;
15482 yes)
15483         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15484
15485         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15486
15487         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15488                 && test -z "${cf_tst_cflags}" \
15489                 && cf_fix_cppflags=no
15490         ;;
15491 esac
15492 done
15493
15494 if test -n "$cf_new_cflags" ; then
15495
15496         CFLAGS="$CFLAGS $cf_new_cflags"
15497 fi
15498
15499 if test -n "$cf_new_cppflags" ; then
15500
15501         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15502 fi
15503
15504 if test -n "$cf_new_extra_cppflags" ; then
15505
15506         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15507 fi
15508
15509     fi
15510   fi
15511 fi
15512
15513 echo "$as_me:15513: checking for signal global datatype" >&5
15514 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15515 if test "${cf_cv_sig_atomic_t+set}" = set; then
15516   echo $ECHO_N "(cached) $ECHO_C" >&6
15517 else
15518
15519         for cf_type in \
15520                 "volatile sig_atomic_t" \
15521                 "sig_atomic_t" \
15522                 "int"
15523         do
15524         cat >conftest.$ac_ext <<_ACEOF
15525 #line 15525 "configure"
15526 #include "confdefs.h"
15527
15528 #include <sys/types.h>
15529 #include <signal.h>
15530 #include <stdio.h>
15531
15532 extern $cf_type x;
15533 $cf_type x;
15534 static void handler(int sig)
15535 {
15536         x = 5;
15537 }
15538 int
15539 main ()
15540 {
15541 signal(SIGINT, handler);
15542                  x = 1
15543   ;
15544   return 0;
15545 }
15546 _ACEOF
15547 rm -f conftest.$ac_objext
15548 if { (eval echo "$as_me:15548: \"$ac_compile\"") >&5
15549   (eval $ac_compile) 2>&5
15550   ac_status=$?
15551   echo "$as_me:15551: \$? = $ac_status" >&5
15552   (exit $ac_status); } &&
15553          { ac_try='test -s conftest.$ac_objext'
15554   { (eval echo "$as_me:15554: \"$ac_try\"") >&5
15555   (eval $ac_try) 2>&5
15556   ac_status=$?
15557   echo "$as_me:15557: \$? = $ac_status" >&5
15558   (exit $ac_status); }; }; then
15559   cf_cv_sig_atomic_t=$cf_type
15560 else
15561   echo "$as_me: failed program was:" >&5
15562 cat conftest.$ac_ext >&5
15563 cf_cv_sig_atomic_t=no
15564 fi
15565 rm -f conftest.$ac_objext conftest.$ac_ext
15566                 test "$cf_cv_sig_atomic_t" != no && break
15567         done
15568
15569 fi
15570
15571 echo "$as_me:15571: result: $cf_cv_sig_atomic_t" >&5
15572 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15573 test "$cf_cv_sig_atomic_t" != no &&
15574 cat >>confdefs.h <<EOF
15575 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15576 EOF
15577
15578 if test $NCURSES_CHTYPE = auto ; then
15579
15580 echo "$as_me:15580: checking for type of chtype" >&5
15581 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15582 if test "${cf_cv_typeof_chtype+set}" = set; then
15583   echo $ECHO_N "(cached) $ECHO_C" >&6
15584 else
15585
15586                 if test "$cross_compiling" = yes; then
15587   cf_cv_typeof_chtype=long
15588 else
15589   cat >conftest.$ac_ext <<_ACEOF
15590 #line 15590 "configure"
15591 #include "confdefs.h"
15592
15593 #define WANT_BITS 31
15594 #include <stdio.h>
15595 int main()
15596 {
15597         FILE *fp = fopen("cf_test.out", "w");
15598         if (fp != 0) {
15599                 char *result = "long";
15600                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15601                         int n;
15602                         unsigned int x, y;
15603                         for (n = 0; n < WANT_BITS; n++) {
15604                                 x = (1 << n);
15605                                 y = (x >> n);
15606                                 if (y != 1 || x == 0) {
15607                                         x = 0;
15608                                         break;
15609                                 }
15610                         }
15611                         /*
15612                          * If x is nonzero, an int is big enough for the bits
15613                          * that we want.
15614                          */
15615                         result = (x != 0) ? "int" : "long";
15616                 }
15617                 fputs(result, fp);
15618                 fclose(fp);
15619         }
15620         ${cf_cv_main_return:-return}(0);
15621 }
15622
15623 _ACEOF
15624 rm -f conftest$ac_exeext
15625 if { (eval echo "$as_me:15625: \"$ac_link\"") >&5
15626   (eval $ac_link) 2>&5
15627   ac_status=$?
15628   echo "$as_me:15628: \$? = $ac_status" >&5
15629   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15630   { (eval echo "$as_me:15630: \"$ac_try\"") >&5
15631   (eval $ac_try) 2>&5
15632   ac_status=$?
15633   echo "$as_me:15633: \$? = $ac_status" >&5
15634   (exit $ac_status); }; }; then
15635   cf_cv_typeof_chtype=`cat cf_test.out`
15636 else
15637   echo "$as_me: program exited with status $ac_status" >&5
15638 echo "$as_me: failed program was:" >&5
15639 cat conftest.$ac_ext >&5
15640 cf_cv_typeof_chtype=long
15641 fi
15642 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15643 fi
15644                 rm -f cf_test.out
15645
15646 fi
15647
15648 echo "$as_me:15648: result: $cf_cv_typeof_chtype" >&5
15649 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15650
15651 cat >>confdefs.h <<EOF
15652 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15653 EOF
15654
15655 else
15656         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15657 fi
15658 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15659
15660 echo "$as_me:15660: checking if unsigned literals are legal" >&5
15661 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15662 if test "${cf_cv_unsigned_literals+set}" = set; then
15663   echo $ECHO_N "(cached) $ECHO_C" >&6
15664 else
15665
15666         cat >conftest.$ac_ext <<_ACEOF
15667 #line 15667 "configure"
15668 #include "confdefs.h"
15669
15670 int
15671 main ()
15672 {
15673 long x = 1L + 1UL + 1U + 1
15674   ;
15675   return 0;
15676 }
15677 _ACEOF
15678 rm -f conftest.$ac_objext
15679 if { (eval echo "$as_me:15679: \"$ac_compile\"") >&5
15680   (eval $ac_compile) 2>&5
15681   ac_status=$?
15682   echo "$as_me:15682: \$? = $ac_status" >&5
15683   (exit $ac_status); } &&
15684          { ac_try='test -s conftest.$ac_objext'
15685   { (eval echo "$as_me:15685: \"$ac_try\"") >&5
15686   (eval $ac_try) 2>&5
15687   ac_status=$?
15688   echo "$as_me:15688: \$? = $ac_status" >&5
15689   (exit $ac_status); }; }; then
15690   cf_cv_unsigned_literals=yes
15691 else
15692   echo "$as_me: failed program was:" >&5
15693 cat conftest.$ac_ext >&5
15694 cf_cv_unsigned_literals=no
15695 fi
15696 rm -f conftest.$ac_objext conftest.$ac_ext
15697
15698 fi
15699
15700 echo "$as_me:15700: result: $cf_cv_unsigned_literals" >&5
15701 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15702
15703 cf_cv_1UL="1"
15704 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15705 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15706
15707 if test $NCURSES_MMASK_T = auto ; then
15708         cf_cv_typeof_mmask_t=long
15709 else
15710         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15711 fi
15712 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15713
15714 ###     Checks for external-data
15715
15716 echo "$as_me:15716: checking if external errno is declared" >&5
15717 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15718 if test "${cf_cv_dcl_errno+set}" = set; then
15719   echo $ECHO_N "(cached) $ECHO_C" >&6
15720 else
15721
15722     cat >conftest.$ac_ext <<_ACEOF
15723 #line 15723 "configure"
15724 #include "confdefs.h"
15725
15726 #ifdef HAVE_STDLIB_H
15727 #include <stdlib.h>
15728 #endif
15729 #include <stdio.h>
15730 #include <sys/types.h>
15731 #include <errno.h>
15732 int
15733 main ()
15734 {
15735 int x = (int) errno
15736   ;
15737   return 0;
15738 }
15739 _ACEOF
15740 rm -f conftest.$ac_objext
15741 if { (eval echo "$as_me:15741: \"$ac_compile\"") >&5
15742   (eval $ac_compile) 2>&5
15743   ac_status=$?
15744   echo "$as_me:15744: \$? = $ac_status" >&5
15745   (exit $ac_status); } &&
15746          { ac_try='test -s conftest.$ac_objext'
15747   { (eval echo "$as_me:15747: \"$ac_try\"") >&5
15748   (eval $ac_try) 2>&5
15749   ac_status=$?
15750   echo "$as_me:15750: \$? = $ac_status" >&5
15751   (exit $ac_status); }; }; then
15752   cf_cv_dcl_errno=yes
15753 else
15754   echo "$as_me: failed program was:" >&5
15755 cat conftest.$ac_ext >&5
15756 cf_cv_dcl_errno=no
15757 fi
15758 rm -f conftest.$ac_objext conftest.$ac_ext
15759
15760 fi
15761 echo "$as_me:15761: result: $cf_cv_dcl_errno" >&5
15762 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15763
15764 if test "$cf_cv_dcl_errno" = no ; then
15765
15766 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15767
15768     cat >>confdefs.h <<EOF
15769 #define $cf_result 1
15770 EOF
15771
15772 fi
15773
15774 # It's possible (for near-UNIX clones) that the data doesn't exist
15775
15776 echo "$as_me:15776: checking if external errno exists" >&5
15777 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15778 if test "${cf_cv_have_errno+set}" = set; then
15779   echo $ECHO_N "(cached) $ECHO_C" >&6
15780 else
15781
15782     cat >conftest.$ac_ext <<_ACEOF
15783 #line 15783 "configure"
15784 #include "confdefs.h"
15785
15786 #undef errno
15787 extern int errno;
15788
15789 int
15790 main ()
15791 {
15792 errno = 2
15793   ;
15794   return 0;
15795 }
15796 _ACEOF
15797 rm -f conftest.$ac_objext conftest$ac_exeext
15798 if { (eval echo "$as_me:15798: \"$ac_link\"") >&5
15799   (eval $ac_link) 2>&5
15800   ac_status=$?
15801   echo "$as_me:15801: \$? = $ac_status" >&5
15802   (exit $ac_status); } &&
15803          { ac_try='test -s conftest$ac_exeext'
15804   { (eval echo "$as_me:15804: \"$ac_try\"") >&5
15805   (eval $ac_try) 2>&5
15806   ac_status=$?
15807   echo "$as_me:15807: \$? = $ac_status" >&5
15808   (exit $ac_status); }; }; then
15809   cf_cv_have_errno=yes
15810 else
15811   echo "$as_me: failed program was:" >&5
15812 cat conftest.$ac_ext >&5
15813 cf_cv_have_errno=no
15814 fi
15815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15816
15817 fi
15818 echo "$as_me:15818: result: $cf_cv_have_errno" >&5
15819 echo "${ECHO_T}$cf_cv_have_errno" >&6
15820
15821 if test "$cf_cv_have_errno" = yes ; then
15822
15823 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15824
15825     cat >>confdefs.h <<EOF
15826 #define $cf_result 1
15827 EOF
15828
15829 fi
15830
15831 echo "$as_me:15831: checking if data-only library module links" >&5
15832 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15833 if test "${cf_cv_link_dataonly+set}" = set; then
15834   echo $ECHO_N "(cached) $ECHO_C" >&6
15835 else
15836
15837         rm -f conftest.a
15838         cat >conftest.$ac_ext <<EOF
15839 #line 15839 "configure"
15840 int     testdata[3] = { 123, 456, 789 };
15841 EOF
15842         if { (eval echo "$as_me:15842: \"$ac_compile\"") >&5
15843   (eval $ac_compile) 2>&5
15844   ac_status=$?
15845   echo "$as_me:15845: \$? = $ac_status" >&5
15846   (exit $ac_status); } ; then
15847                 mv conftest.o data.o && \
15848                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15849         fi
15850         rm -f conftest.$ac_ext data.o
15851         cat >conftest.$ac_ext <<EOF
15852 #line 15852 "configure"
15853 int     testfunc()
15854 {
15855 #if defined(NeXT)
15856         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15857 #else
15858         extern int testdata[3];
15859         return testdata[0] == 123
15860            &&  testdata[1] == 456
15861            &&  testdata[2] == 789;
15862 #endif
15863 }
15864 EOF
15865         if { (eval echo "$as_me:15865: \"$ac_compile\"") >&5
15866   (eval $ac_compile) 2>&5
15867   ac_status=$?
15868   echo "$as_me:15868: \$? = $ac_status" >&5
15869   (exit $ac_status); }; then
15870                 mv conftest.o func.o && \
15871                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15872         fi
15873         rm -f conftest.$ac_ext func.o
15874         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15875         cf_saveLIBS="$LIBS"
15876         LIBS="conftest.a $LIBS"
15877         if test "$cross_compiling" = yes; then
15878   cf_cv_link_dataonly=unknown
15879 else
15880   cat >conftest.$ac_ext <<_ACEOF
15881 #line 15881 "configure"
15882 #include "confdefs.h"
15883
15884         int main()
15885         {
15886                 extern int testfunc();
15887                 ${cf_cv_main_return:-return} (!testfunc());
15888         }
15889
15890 _ACEOF
15891 rm -f conftest$ac_exeext
15892 if { (eval echo "$as_me:15892: \"$ac_link\"") >&5
15893   (eval $ac_link) 2>&5
15894   ac_status=$?
15895   echo "$as_me:15895: \$? = $ac_status" >&5
15896   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15897   { (eval echo "$as_me:15897: \"$ac_try\"") >&5
15898   (eval $ac_try) 2>&5
15899   ac_status=$?
15900   echo "$as_me:15900: \$? = $ac_status" >&5
15901   (exit $ac_status); }; }; then
15902   cf_cv_link_dataonly=yes
15903 else
15904   echo "$as_me: program exited with status $ac_status" >&5
15905 echo "$as_me: failed program was:" >&5
15906 cat conftest.$ac_ext >&5
15907 cf_cv_link_dataonly=no
15908 fi
15909 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15910 fi
15911         LIBS="$cf_saveLIBS"
15912
15913 fi
15914
15915 echo "$as_me:15915: result: $cf_cv_link_dataonly" >&5
15916 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15917
15918 if test "$cf_cv_link_dataonly" = no ; then
15919
15920 cat >>confdefs.h <<\EOF
15921 #define BROKEN_LINKER 1
15922 EOF
15923
15924         BROKEN_LINKER=1
15925 fi
15926
15927 ###     Checks for library functions.
15928
15929 for ac_func in \
15930 getcwd \
15931 getegid \
15932 geteuid \
15933 getttynam \
15934 issetugid \
15935 poll \
15936 putenv \
15937 remove \
15938 select \
15939 setbuf \
15940 setbuffer \
15941 setenv \
15942 setvbuf \
15943 sigaction \
15944 sigvec \
15945 strdup \
15946 strstr \
15947 tcgetpgrp \
15948 times \
15949 vsnprintf \
15950
15951 do
15952 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15953 echo "$as_me:15953: checking for $ac_func" >&5
15954 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15955 if eval "test \"\${$as_ac_var+set}\" = set"; then
15956   echo $ECHO_N "(cached) $ECHO_C" >&6
15957 else
15958   cat >conftest.$ac_ext <<_ACEOF
15959 #line 15959 "configure"
15960 #include "confdefs.h"
15961 /* System header to define __stub macros and hopefully few prototypes,
15962     which can conflict with char $ac_func (); below.  */
15963 #include <assert.h>
15964 /* Override any gcc2 internal prototype to avoid an error.  */
15965 #ifdef __cplusplus
15966 extern "C"
15967 #endif
15968 /* We use char because int might match the return type of a gcc2
15969    builtin and then its argument prototype would still apply.  */
15970 char $ac_func ();
15971 char (*f) ();
15972
15973 int
15974 main ()
15975 {
15976 /* The GNU C library defines this for functions which it implements
15977     to always fail with ENOSYS.  Some functions are actually named
15978     something starting with __ and the normal name is an alias.  */
15979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15980 choke me
15981 #else
15982 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15983 #endif
15984
15985   ;
15986   return 0;
15987 }
15988 _ACEOF
15989 rm -f conftest.$ac_objext conftest$ac_exeext
15990 if { (eval echo "$as_me:15990: \"$ac_link\"") >&5
15991   (eval $ac_link) 2>&5
15992   ac_status=$?
15993   echo "$as_me:15993: \$? = $ac_status" >&5
15994   (exit $ac_status); } &&
15995          { ac_try='test -s conftest$ac_exeext'
15996   { (eval echo "$as_me:15996: \"$ac_try\"") >&5
15997   (eval $ac_try) 2>&5
15998   ac_status=$?
15999   echo "$as_me:15999: \$? = $ac_status" >&5
16000   (exit $ac_status); }; }; then
16001   eval "$as_ac_var=yes"
16002 else
16003   echo "$as_me: failed program was:" >&5
16004 cat conftest.$ac_ext >&5
16005 eval "$as_ac_var=no"
16006 fi
16007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16008 fi
16009 echo "$as_me:16009: result: `eval echo '${'$as_ac_var'}'`" >&5
16010 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16011 if test `eval echo '${'$as_ac_var'}'` = yes; then
16012   cat >>confdefs.h <<EOF
16013 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16014 EOF
16015
16016 fi
16017 done
16018
16019 if test "x$with_getcap" = "xyes" ; then
16020
16021 echo "$as_me:16021: checking for terminal-capability database functions" >&5
16022 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16023 if test "${cf_cv_cgetent+set}" = set; then
16024   echo $ECHO_N "(cached) $ECHO_C" >&6
16025 else
16026
16027 cat >conftest.$ac_ext <<_ACEOF
16028 #line 16028 "configure"
16029 #include "confdefs.h"
16030
16031 #include <stdlib.h>
16032 int
16033 main ()
16034 {
16035
16036         char temp[128];
16037         char *buf = temp;
16038         char *db_array = temp;
16039         cgetent(&buf, &db_array, "vt100");
16040         cgetcap(buf, "tc", '=');
16041         cgetmatch(buf, "tc");
16042
16043   ;
16044   return 0;
16045 }
16046 _ACEOF
16047 rm -f conftest.$ac_objext conftest$ac_exeext
16048 if { (eval echo "$as_me:16048: \"$ac_link\"") >&5
16049   (eval $ac_link) 2>&5
16050   ac_status=$?
16051   echo "$as_me:16051: \$? = $ac_status" >&5
16052   (exit $ac_status); } &&
16053          { ac_try='test -s conftest$ac_exeext'
16054   { (eval echo "$as_me:16054: \"$ac_try\"") >&5
16055   (eval $ac_try) 2>&5
16056   ac_status=$?
16057   echo "$as_me:16057: \$? = $ac_status" >&5
16058   (exit $ac_status); }; }; then
16059   cf_cv_cgetent=yes
16060 else
16061   echo "$as_me: failed program was:" >&5
16062 cat conftest.$ac_ext >&5
16063 cf_cv_cgetent=no
16064 fi
16065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16066
16067 fi
16068 echo "$as_me:16068: result: $cf_cv_cgetent" >&5
16069 echo "${ECHO_T}$cf_cv_cgetent" >&6
16070
16071 if test "$cf_cv_cgetent" = yes
16072 then
16073
16074 cat >>confdefs.h <<\EOF
16075 #define HAVE_BSD_CGETENT 1
16076 EOF
16077
16078 echo "$as_me:16078: checking if cgetent uses const parameter" >&5
16079 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16080 if test "${cf_cv_cgetent_const+set}" = set; then
16081   echo $ECHO_N "(cached) $ECHO_C" >&6
16082 else
16083
16084 cat >conftest.$ac_ext <<_ACEOF
16085 #line 16085 "configure"
16086 #include "confdefs.h"
16087
16088 #include <stdlib.h>
16089 int
16090 main ()
16091 {
16092
16093         char temp[128];
16094         char *buf = temp;
16095 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16096         const char *db_array = temp;
16097         cgetent(&buf, &db_array, "vt100");
16098 #endif
16099         cgetcap(buf, "tc", '=');
16100         cgetmatch(buf, "tc");
16101
16102   ;
16103   return 0;
16104 }
16105 _ACEOF
16106 rm -f conftest.$ac_objext conftest$ac_exeext
16107 if { (eval echo "$as_me:16107: \"$ac_link\"") >&5
16108   (eval $ac_link) 2>&5
16109   ac_status=$?
16110   echo "$as_me:16110: \$? = $ac_status" >&5
16111   (exit $ac_status); } &&
16112          { ac_try='test -s conftest$ac_exeext'
16113   { (eval echo "$as_me:16113: \"$ac_try\"") >&5
16114   (eval $ac_try) 2>&5
16115   ac_status=$?
16116   echo "$as_me:16116: \$? = $ac_status" >&5
16117   (exit $ac_status); }; }; then
16118   cf_cv_cgetent_const=yes
16119 else
16120   echo "$as_me: failed program was:" >&5
16121 cat conftest.$ac_ext >&5
16122 cf_cv_cgetent_const=no
16123 fi
16124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16125
16126 fi
16127 echo "$as_me:16127: result: $cf_cv_cgetent_const" >&5
16128 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16129         if test "$cf_cv_cgetent_const" = yes
16130         then
16131
16132 cat >>confdefs.h <<EOF
16133 #define CGETENT_CONST const
16134 EOF
16135
16136         fi
16137 fi
16138
16139 fi
16140
16141 echo "$as_me:16141: checking for isascii" >&5
16142 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16143 if test "${cf_cv_have_isascii+set}" = set; then
16144   echo $ECHO_N "(cached) $ECHO_C" >&6
16145 else
16146
16147         cat >conftest.$ac_ext <<_ACEOF
16148 #line 16148 "configure"
16149 #include "confdefs.h"
16150 #include <ctype.h>
16151 int
16152 main ()
16153 {
16154 int x = isascii(' ')
16155   ;
16156   return 0;
16157 }
16158 _ACEOF
16159 rm -f conftest.$ac_objext conftest$ac_exeext
16160 if { (eval echo "$as_me:16160: \"$ac_link\"") >&5
16161   (eval $ac_link) 2>&5
16162   ac_status=$?
16163   echo "$as_me:16163: \$? = $ac_status" >&5
16164   (exit $ac_status); } &&
16165          { ac_try='test -s conftest$ac_exeext'
16166   { (eval echo "$as_me:16166: \"$ac_try\"") >&5
16167   (eval $ac_try) 2>&5
16168   ac_status=$?
16169   echo "$as_me:16169: \$? = $ac_status" >&5
16170   (exit $ac_status); }; }; then
16171   cf_cv_have_isascii=yes
16172 else
16173   echo "$as_me: failed program was:" >&5
16174 cat conftest.$ac_ext >&5
16175 cf_cv_have_isascii=no
16176 fi
16177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16178
16179 fi
16180 echo "$as_me:16180: result: $cf_cv_have_isascii" >&5
16181 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16182 test "$cf_cv_have_isascii" = yes &&
16183 cat >>confdefs.h <<\EOF
16184 #define HAVE_ISASCII 1
16185 EOF
16186
16187 if test "$ac_cv_func_sigaction" = yes; then
16188 echo "$as_me:16188: checking whether sigaction needs _POSIX_SOURCE" >&5
16189 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16190 cat >conftest.$ac_ext <<_ACEOF
16191 #line 16191 "configure"
16192 #include "confdefs.h"
16193
16194 #include <sys/types.h>
16195 #include <signal.h>
16196 int
16197 main ()
16198 {
16199 struct sigaction act
16200   ;
16201   return 0;
16202 }
16203 _ACEOF
16204 rm -f conftest.$ac_objext
16205 if { (eval echo "$as_me:16205: \"$ac_compile\"") >&5
16206   (eval $ac_compile) 2>&5
16207   ac_status=$?
16208   echo "$as_me:16208: \$? = $ac_status" >&5
16209   (exit $ac_status); } &&
16210          { ac_try='test -s conftest.$ac_objext'
16211   { (eval echo "$as_me:16211: \"$ac_try\"") >&5
16212   (eval $ac_try) 2>&5
16213   ac_status=$?
16214   echo "$as_me:16214: \$? = $ac_status" >&5
16215   (exit $ac_status); }; }; then
16216   sigact_bad=no
16217 else
16218   echo "$as_me: failed program was:" >&5
16219 cat conftest.$ac_ext >&5
16220
16221 cat >conftest.$ac_ext <<_ACEOF
16222 #line 16222 "configure"
16223 #include "confdefs.h"
16224
16225 #define _POSIX_SOURCE
16226 #include <sys/types.h>
16227 #include <signal.h>
16228 int
16229 main ()
16230 {
16231 struct sigaction act
16232   ;
16233   return 0;
16234 }
16235 _ACEOF
16236 rm -f conftest.$ac_objext
16237 if { (eval echo "$as_me:16237: \"$ac_compile\"") >&5
16238   (eval $ac_compile) 2>&5
16239   ac_status=$?
16240   echo "$as_me:16240: \$? = $ac_status" >&5
16241   (exit $ac_status); } &&
16242          { ac_try='test -s conftest.$ac_objext'
16243   { (eval echo "$as_me:16243: \"$ac_try\"") >&5
16244   (eval $ac_try) 2>&5
16245   ac_status=$?
16246   echo "$as_me:16246: \$? = $ac_status" >&5
16247   (exit $ac_status); }; }; then
16248   sigact_bad=yes
16249
16250 cat >>confdefs.h <<\EOF
16251 #define _POSIX_SOURCE 1
16252 EOF
16253
16254 else
16255   echo "$as_me: failed program was:" >&5
16256 cat conftest.$ac_ext >&5
16257 sigact_bad=unknown
16258 fi
16259 rm -f conftest.$ac_objext conftest.$ac_ext
16260 fi
16261 rm -f conftest.$ac_objext conftest.$ac_ext
16262 echo "$as_me:16262: result: $sigact_bad" >&5
16263 echo "${ECHO_T}$sigact_bad" >&6
16264 fi
16265
16266 echo "$as_me:16266: checking if nanosleep really works" >&5
16267 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16268 if test "${cf_cv_func_nanosleep+set}" = set; then
16269   echo $ECHO_N "(cached) $ECHO_C" >&6
16270 else
16271
16272 if test "$cross_compiling" = yes; then
16273   cf_cv_func_nanosleep=unknown
16274 else
16275   cat >conftest.$ac_ext <<_ACEOF
16276 #line 16276 "configure"
16277 #include "confdefs.h"
16278
16279 #include <stdio.h>
16280 #include <errno.h>
16281 #include <time.h>
16282
16283 #ifdef HAVE_SYS_TIME_H
16284 #include <sys/time.h>
16285 #endif
16286
16287 int main() {
16288         struct timespec ts1, ts2;
16289         int code;
16290         ts1.tv_sec  = 0;
16291         ts1.tv_nsec = 750000000;
16292         ts2.tv_sec  = 0;
16293         ts2.tv_nsec = 0;
16294         errno = 0;
16295         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16296         ${cf_cv_main_return:-return}(code != 0);
16297 }
16298
16299 _ACEOF
16300 rm -f conftest$ac_exeext
16301 if { (eval echo "$as_me:16301: \"$ac_link\"") >&5
16302   (eval $ac_link) 2>&5
16303   ac_status=$?
16304   echo "$as_me:16304: \$? = $ac_status" >&5
16305   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16306   { (eval echo "$as_me:16306: \"$ac_try\"") >&5
16307   (eval $ac_try) 2>&5
16308   ac_status=$?
16309   echo "$as_me:16309: \$? = $ac_status" >&5
16310   (exit $ac_status); }; }; then
16311   cf_cv_func_nanosleep=yes
16312 else
16313   echo "$as_me: program exited with status $ac_status" >&5
16314 echo "$as_me: failed program was:" >&5
16315 cat conftest.$ac_ext >&5
16316 cf_cv_func_nanosleep=no
16317 fi
16318 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16319 fi
16320 fi
16321 echo "$as_me:16321: result: $cf_cv_func_nanosleep" >&5
16322 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16323
16324 test "$cf_cv_func_nanosleep" = "yes" &&
16325 cat >>confdefs.h <<\EOF
16326 #define HAVE_NANOSLEEP 1
16327 EOF
16328
16329 for ac_header in \
16330 termio.h \
16331 termios.h \
16332 unistd.h \
16333
16334 do
16335 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16336 echo "$as_me:16336: checking for $ac_header" >&5
16337 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16338 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16339   echo $ECHO_N "(cached) $ECHO_C" >&6
16340 else
16341   cat >conftest.$ac_ext <<_ACEOF
16342 #line 16342 "configure"
16343 #include "confdefs.h"
16344 #include <$ac_header>
16345 _ACEOF
16346 if { (eval echo "$as_me:16346: \"$ac_cpp conftest.$ac_ext\"") >&5
16347   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16348   ac_status=$?
16349   egrep -v '^ *\+' conftest.er1 >conftest.err
16350   rm -f conftest.er1
16351   cat conftest.err >&5
16352   echo "$as_me:16352: \$? = $ac_status" >&5
16353   (exit $ac_status); } >/dev/null; then
16354   if test -s conftest.err; then
16355     ac_cpp_err=$ac_c_preproc_warn_flag
16356   else
16357     ac_cpp_err=
16358   fi
16359 else
16360   ac_cpp_err=yes
16361 fi
16362 if test -z "$ac_cpp_err"; then
16363   eval "$as_ac_Header=yes"
16364 else
16365   echo "$as_me: failed program was:" >&5
16366   cat conftest.$ac_ext >&5
16367   eval "$as_ac_Header=no"
16368 fi
16369 rm -f conftest.err conftest.$ac_ext
16370 fi
16371 echo "$as_me:16371: result: `eval echo '${'$as_ac_Header'}'`" >&5
16372 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16373 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16374   cat >>confdefs.h <<EOF
16375 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16376 EOF
16377
16378 fi
16379 done
16380
16381 if test "$ISC" = yes ; then
16382
16383 for ac_header in sys/termio.h
16384 do
16385 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16386 echo "$as_me:16386: checking for $ac_header" >&5
16387 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16388 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16389   echo $ECHO_N "(cached) $ECHO_C" >&6
16390 else
16391   cat >conftest.$ac_ext <<_ACEOF
16392 #line 16392 "configure"
16393 #include "confdefs.h"
16394 #include <$ac_header>
16395 _ACEOF
16396 if { (eval echo "$as_me:16396: \"$ac_cpp conftest.$ac_ext\"") >&5
16397   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16398   ac_status=$?
16399   egrep -v '^ *\+' conftest.er1 >conftest.err
16400   rm -f conftest.er1
16401   cat conftest.err >&5
16402   echo "$as_me:16402: \$? = $ac_status" >&5
16403   (exit $ac_status); } >/dev/null; then
16404   if test -s conftest.err; then
16405     ac_cpp_err=$ac_c_preproc_warn_flag
16406   else
16407     ac_cpp_err=
16408   fi
16409 else
16410   ac_cpp_err=yes
16411 fi
16412 if test -z "$ac_cpp_err"; then
16413   eval "$as_ac_Header=yes"
16414 else
16415   echo "$as_me: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   eval "$as_ac_Header=no"
16418 fi
16419 rm -f conftest.err conftest.$ac_ext
16420 fi
16421 echo "$as_me:16421: result: `eval echo '${'$as_ac_Header'}'`" >&5
16422 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16423 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16424   cat >>confdefs.h <<EOF
16425 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16426 EOF
16427
16428 fi
16429 done
16430
16431 fi
16432 if test "$ac_cv_header_termios_h" = yes ; then
16433         case "$CFLAGS $CPPFLAGS" in
16434         *-D_POSIX_SOURCE*)
16435                 termios_bad=dunno ;;
16436         *)      termios_bad=maybe ;;
16437         esac
16438         if test "$termios_bad" = maybe ; then
16439         echo "$as_me:16439: checking whether termios.h needs _POSIX_SOURCE" >&5
16440 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16441         cat >conftest.$ac_ext <<_ACEOF
16442 #line 16442 "configure"
16443 #include "confdefs.h"
16444 #include <termios.h>
16445 int
16446 main ()
16447 {
16448 struct termios foo; int x = foo.c_iflag
16449   ;
16450   return 0;
16451 }
16452 _ACEOF
16453 rm -f conftest.$ac_objext
16454 if { (eval echo "$as_me:16454: \"$ac_compile\"") >&5
16455   (eval $ac_compile) 2>&5
16456   ac_status=$?
16457   echo "$as_me:16457: \$? = $ac_status" >&5
16458   (exit $ac_status); } &&
16459          { ac_try='test -s conftest.$ac_objext'
16460   { (eval echo "$as_me:16460: \"$ac_try\"") >&5
16461   (eval $ac_try) 2>&5
16462   ac_status=$?
16463   echo "$as_me:16463: \$? = $ac_status" >&5
16464   (exit $ac_status); }; }; then
16465   termios_bad=no
16466 else
16467   echo "$as_me: failed program was:" >&5
16468 cat conftest.$ac_ext >&5
16469
16470                 cat >conftest.$ac_ext <<_ACEOF
16471 #line 16471 "configure"
16472 #include "confdefs.h"
16473
16474 #define _POSIX_SOURCE
16475 #include <termios.h>
16476 int
16477 main ()
16478 {
16479 struct termios foo; int x = foo.c_iflag
16480   ;
16481   return 0;
16482 }
16483 _ACEOF
16484 rm -f conftest.$ac_objext
16485 if { (eval echo "$as_me:16485: \"$ac_compile\"") >&5
16486   (eval $ac_compile) 2>&5
16487   ac_status=$?
16488   echo "$as_me:16488: \$? = $ac_status" >&5
16489   (exit $ac_status); } &&
16490          { ac_try='test -s conftest.$ac_objext'
16491   { (eval echo "$as_me:16491: \"$ac_try\"") >&5
16492   (eval $ac_try) 2>&5
16493   ac_status=$?
16494   echo "$as_me:16494: \$? = $ac_status" >&5
16495   (exit $ac_status); }; }; then
16496   termios_bad=unknown
16497 else
16498   echo "$as_me: failed program was:" >&5
16499 cat conftest.$ac_ext >&5
16500 termios_bad=yes
16501 cat >>confdefs.h <<\EOF
16502 #define _POSIX_SOURCE 1
16503 EOF
16504
16505 fi
16506 rm -f conftest.$ac_objext conftest.$ac_ext
16507
16508 fi
16509 rm -f conftest.$ac_objext conftest.$ac_ext
16510         echo "$as_me:16510: result: $termios_bad" >&5
16511 echo "${ECHO_T}$termios_bad" >&6
16512         fi
16513 fi
16514
16515 echo "$as_me:16515: checking for tcgetattr" >&5
16516 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16517 if test "${cf_cv_have_tcgetattr+set}" = set; then
16518   echo $ECHO_N "(cached) $ECHO_C" >&6
16519 else
16520
16521 cat >conftest.$ac_ext <<_ACEOF
16522 #line 16522 "configure"
16523 #include "confdefs.h"
16524
16525 #include <sys/types.h>
16526 #ifdef HAVE_UNISTD_H
16527 #include <unistd.h>
16528 #endif
16529 #ifdef HAVE_TERMIOS_H
16530 #include <termios.h>
16531 #define TTY struct termios
16532 #else
16533 #ifdef HAVE_TERMIO_H
16534 #include <termio.h>
16535 #define TTY struct termio
16536 #endif
16537 #endif
16538
16539 int
16540 main ()
16541 {
16542
16543 TTY foo;
16544 tcgetattr(1, &foo);
16545   ;
16546   return 0;
16547 }
16548 _ACEOF
16549 rm -f conftest.$ac_objext conftest$ac_exeext
16550 if { (eval echo "$as_me:16550: \"$ac_link\"") >&5
16551   (eval $ac_link) 2>&5
16552   ac_status=$?
16553   echo "$as_me:16553: \$? = $ac_status" >&5
16554   (exit $ac_status); } &&
16555          { ac_try='test -s conftest$ac_exeext'
16556   { (eval echo "$as_me:16556: \"$ac_try\"") >&5
16557   (eval $ac_try) 2>&5
16558   ac_status=$?
16559   echo "$as_me:16559: \$? = $ac_status" >&5
16560   (exit $ac_status); }; }; then
16561   cf_cv_have_tcgetattr=yes
16562 else
16563   echo "$as_me: failed program was:" >&5
16564 cat conftest.$ac_ext >&5
16565 cf_cv_have_tcgetattr=no
16566 fi
16567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16568 fi
16569 echo "$as_me:16569: result: $cf_cv_have_tcgetattr" >&5
16570 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16571 test "$cf_cv_have_tcgetattr" = yes &&
16572 cat >>confdefs.h <<\EOF
16573 #define HAVE_TCGETATTR 1
16574 EOF
16575
16576 echo "$as_me:16576: checking for vsscanf function or workaround" >&5
16577 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16578 if test "${cf_cv_func_vsscanf+set}" = set; then
16579   echo $ECHO_N "(cached) $ECHO_C" >&6
16580 else
16581
16582 cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585
16586 #include <stdarg.h>
16587 #include <stdio.h>
16588 int
16589 main ()
16590 {
16591
16592         va_list ap;
16593         vsscanf("from", "%d", ap)
16594   ;
16595   return 0;
16596 }
16597 _ACEOF
16598 rm -f conftest.$ac_objext conftest$ac_exeext
16599 if { (eval echo "$as_me:16599: \"$ac_link\"") >&5
16600   (eval $ac_link) 2>&5
16601   ac_status=$?
16602   echo "$as_me:16602: \$? = $ac_status" >&5
16603   (exit $ac_status); } &&
16604          { ac_try='test -s conftest$ac_exeext'
16605   { (eval echo "$as_me:16605: \"$ac_try\"") >&5
16606   (eval $ac_try) 2>&5
16607   ac_status=$?
16608   echo "$as_me:16608: \$? = $ac_status" >&5
16609   (exit $ac_status); }; }; then
16610   cf_cv_func_vsscanf=vsscanf
16611 else
16612   echo "$as_me: failed program was:" >&5
16613 cat conftest.$ac_ext >&5
16614
16615 cat >conftest.$ac_ext <<_ACEOF
16616 #line 16616 "configure"
16617 #include "confdefs.h"
16618
16619 #include <stdarg.h>
16620 #include <stdio.h>
16621 int
16622 main ()
16623 {
16624
16625     FILE strbuf;
16626     char *str = "from";
16627
16628     strbuf._flag = _IOREAD;
16629     strbuf._ptr = strbuf._base = (unsigned char *) str;
16630     strbuf._cnt = strlen(str);
16631     strbuf._file = _NFILE;
16632     return (vfscanf(&strbuf, "%d", ap))
16633   ;
16634   return 0;
16635 }
16636 _ACEOF
16637 rm -f conftest.$ac_objext conftest$ac_exeext
16638 if { (eval echo "$as_me:16638: \"$ac_link\"") >&5
16639   (eval $ac_link) 2>&5
16640   ac_status=$?
16641   echo "$as_me:16641: \$? = $ac_status" >&5
16642   (exit $ac_status); } &&
16643          { ac_try='test -s conftest$ac_exeext'
16644   { (eval echo "$as_me:16644: \"$ac_try\"") >&5
16645   (eval $ac_try) 2>&5
16646   ac_status=$?
16647   echo "$as_me:16647: \$? = $ac_status" >&5
16648   (exit $ac_status); }; }; then
16649   cf_cv_func_vsscanf=vfscanf
16650 else
16651   echo "$as_me: failed program was:" >&5
16652 cat conftest.$ac_ext >&5
16653
16654 cat >conftest.$ac_ext <<_ACEOF
16655 #line 16655 "configure"
16656 #include "confdefs.h"
16657
16658 #include <stdarg.h>
16659 #include <stdio.h>
16660 int
16661 main ()
16662 {
16663
16664     FILE strbuf;
16665     char *str = "from";
16666
16667     strbuf._flag = _IOREAD;
16668     strbuf._ptr = strbuf._base = (unsigned char *) str;
16669     strbuf._cnt = strlen(str);
16670     strbuf._file = _NFILE;
16671     return (_doscan(&strbuf, "%d", ap))
16672   ;
16673   return 0;
16674 }
16675 _ACEOF
16676 rm -f conftest.$ac_objext conftest$ac_exeext
16677 if { (eval echo "$as_me:16677: \"$ac_link\"") >&5
16678   (eval $ac_link) 2>&5
16679   ac_status=$?
16680   echo "$as_me:16680: \$? = $ac_status" >&5
16681   (exit $ac_status); } &&
16682          { ac_try='test -s conftest$ac_exeext'
16683   { (eval echo "$as_me:16683: \"$ac_try\"") >&5
16684   (eval $ac_try) 2>&5
16685   ac_status=$?
16686   echo "$as_me:16686: \$? = $ac_status" >&5
16687   (exit $ac_status); }; }; then
16688   cf_cv_func_vsscanf=_doscan
16689 else
16690   echo "$as_me: failed program was:" >&5
16691 cat conftest.$ac_ext >&5
16692
16693 cf_cv_func_vsscanf=no
16694 fi
16695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16696 fi
16697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16698 fi
16699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16700 fi
16701 echo "$as_me:16701: result: $cf_cv_func_vsscanf" >&5
16702 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16703
16704 case $cf_cv_func_vsscanf in #(vi
16705 vsscanf)
16706 cat >>confdefs.h <<\EOF
16707 #define HAVE_VSSCANF 1
16708 EOF
16709 ;; #(vi
16710 vfscanf)
16711 cat >>confdefs.h <<\EOF
16712 #define HAVE_VFSCANF 1
16713 EOF
16714 ;; #(vi
16715 _doscan)
16716 cat >>confdefs.h <<\EOF
16717 #define HAVE__DOSCAN 1
16718 EOF
16719 ;;
16720 esac
16721
16722 echo "$as_me:16722: checking for working mkstemp" >&5
16723 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16724 if test "${cf_cv_func_mkstemp+set}" = set; then
16725   echo $ECHO_N "(cached) $ECHO_C" >&6
16726 else
16727
16728 rm -rf conftest*
16729 if test "$cross_compiling" = yes; then
16730   cf_cv_func_mkstemp=maybe
16731 else
16732   cat >conftest.$ac_ext <<_ACEOF
16733 #line 16733 "configure"
16734 #include "confdefs.h"
16735
16736 #include <sys/types.h>
16737 #include <stdlib.h>
16738 #include <stdio.h>
16739 #include <string.h>
16740 #include <sys/stat.h>
16741 int main()
16742 {
16743         char *tmpl = "conftestXXXXXX";
16744         char name[2][80];
16745         int n;
16746         int result = 0;
16747         int fd;
16748         struct stat sb;
16749
16750         umask(077);
16751         for (n = 0; n < 2; ++n) {
16752                 strcpy(name[n], tmpl);
16753                 if ((fd = mkstemp(name[n])) >= 0) {
16754                         if (!strcmp(name[n], tmpl)
16755                          || stat(name[n], &sb) != 0
16756                          || (sb.st_mode & S_IFMT) != S_IFREG
16757                          || (sb.st_mode & 077) != 0) {
16758                                 result = 1;
16759                         }
16760                         close(fd);
16761                 }
16762         }
16763         if (result == 0
16764          && !strcmp(name[0], name[1]))
16765                 result = 1;
16766         ${cf_cv_main_return:-return}(result);
16767 }
16768
16769 _ACEOF
16770 rm -f conftest$ac_exeext
16771 if { (eval echo "$as_me:16771: \"$ac_link\"") >&5
16772   (eval $ac_link) 2>&5
16773   ac_status=$?
16774   echo "$as_me:16774: \$? = $ac_status" >&5
16775   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16776   { (eval echo "$as_me:16776: \"$ac_try\"") >&5
16777   (eval $ac_try) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit $ac_status); }; }; then
16781   cf_cv_func_mkstemp=yes
16782
16783 else
16784   echo "$as_me: program exited with status $ac_status" >&5
16785 echo "$as_me: failed program was:" >&5
16786 cat conftest.$ac_ext >&5
16787 cf_cv_func_mkstemp=no
16788
16789 fi
16790 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16791 fi
16792
16793 fi
16794 echo "$as_me:16794: result: $cf_cv_func_mkstemp" >&5
16795 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16796 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16797         echo "$as_me:16797: checking for mkstemp" >&5
16798 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16799 if test "${ac_cv_func_mkstemp+set}" = set; then
16800   echo $ECHO_N "(cached) $ECHO_C" >&6
16801 else
16802   cat >conftest.$ac_ext <<_ACEOF
16803 #line 16803 "configure"
16804 #include "confdefs.h"
16805 /* System header to define __stub macros and hopefully few prototypes,
16806     which can conflict with char mkstemp (); below.  */
16807 #include <assert.h>
16808 /* Override any gcc2 internal prototype to avoid an error.  */
16809 #ifdef __cplusplus
16810 extern "C"
16811 #endif
16812 /* We use char because int might match the return type of a gcc2
16813    builtin and then its argument prototype would still apply.  */
16814 char mkstemp ();
16815 char (*f) ();
16816
16817 int
16818 main ()
16819 {
16820 /* The GNU C library defines this for functions which it implements
16821     to always fail with ENOSYS.  Some functions are actually named
16822     something starting with __ and the normal name is an alias.  */
16823 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16824 choke me
16825 #else
16826 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16827 #endif
16828
16829   ;
16830   return 0;
16831 }
16832 _ACEOF
16833 rm -f conftest.$ac_objext conftest$ac_exeext
16834 if { (eval echo "$as_me:16834: \"$ac_link\"") >&5
16835   (eval $ac_link) 2>&5
16836   ac_status=$?
16837   echo "$as_me:16837: \$? = $ac_status" >&5
16838   (exit $ac_status); } &&
16839          { ac_try='test -s conftest$ac_exeext'
16840   { (eval echo "$as_me:16840: \"$ac_try\"") >&5
16841   (eval $ac_try) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); }; }; then
16845   ac_cv_func_mkstemp=yes
16846 else
16847   echo "$as_me: failed program was:" >&5
16848 cat conftest.$ac_ext >&5
16849 ac_cv_func_mkstemp=no
16850 fi
16851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16852 fi
16853 echo "$as_me:16853: result: $ac_cv_func_mkstemp" >&5
16854 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16855
16856 fi
16857 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16858
16859 cat >>confdefs.h <<\EOF
16860 #define HAVE_MKSTEMP 1
16861 EOF
16862
16863 fi
16864
16865 # setup for prototype of fallback for vsscanf()
16866
16867 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16868         HAVE_VSSCANF=1
16869 else
16870         HAVE_VSSCANF=0
16871 fi
16872
16873 if test "x$cross_compiling" = xyes ; then
16874         { echo "$as_me:16874: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16875 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16876 else
16877         echo "$as_me:16877: checking whether setvbuf arguments are reversed" >&5
16878 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16879 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16880   echo $ECHO_N "(cached) $ECHO_C" >&6
16881 else
16882   if test "$cross_compiling" = yes; then
16883   { { echo "$as_me:16883: error: cannot run test program while cross compiling" >&5
16884 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16885    { (exit 1); exit 1; }; }
16886 else
16887   cat >conftest.$ac_ext <<_ACEOF
16888 #line 16888 "configure"
16889 #include "confdefs.h"
16890 #include <stdio.h>
16891 /* If setvbuf has the reversed format, exit 0. */
16892 int
16893 main ()
16894 {
16895   /* This call has the arguments reversed.
16896      A reversed system may check and see that the address of main
16897      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16898   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16899     $ac_main_return(1);
16900   putc('\r', stdout);
16901   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16902 }
16903 _ACEOF
16904 rm -f conftest$ac_exeext
16905 if { (eval echo "$as_me:16905: \"$ac_link\"") >&5
16906   (eval $ac_link) 2>&5
16907   ac_status=$?
16908   echo "$as_me:16908: \$? = $ac_status" >&5
16909   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16910   { (eval echo "$as_me:16910: \"$ac_try\"") >&5
16911   (eval $ac_try) 2>&5
16912   ac_status=$?
16913   echo "$as_me:16913: \$? = $ac_status" >&5
16914   (exit $ac_status); }; }; then
16915   ac_cv_func_setvbuf_reversed=yes
16916 else
16917   echo "$as_me: program exited with status $ac_status" >&5
16918 echo "$as_me: failed program was:" >&5
16919 cat conftest.$ac_ext >&5
16920 ac_cv_func_setvbuf_reversed=no
16921 fi
16922 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16923 fi
16924 rm -f core core.* *.core
16925 fi
16926 echo "$as_me:16926: result: $ac_cv_func_setvbuf_reversed" >&5
16927 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16928 if test $ac_cv_func_setvbuf_reversed = yes; then
16929
16930 cat >>confdefs.h <<\EOF
16931 #define SETVBUF_REVERSED 1
16932 EOF
16933
16934 fi
16935
16936 fi
16937 echo "$as_me:16937: checking for intptr_t" >&5
16938 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16939 if test "${ac_cv_type_intptr_t+set}" = set; then
16940   echo $ECHO_N "(cached) $ECHO_C" >&6
16941 else
16942   cat >conftest.$ac_ext <<_ACEOF
16943 #line 16943 "configure"
16944 #include "confdefs.h"
16945 $ac_includes_default
16946 int
16947 main ()
16948 {
16949 if ((intptr_t *) 0)
16950   return 0;
16951 if (sizeof (intptr_t))
16952   return 0;
16953   ;
16954   return 0;
16955 }
16956 _ACEOF
16957 rm -f conftest.$ac_objext
16958 if { (eval echo "$as_me:16958: \"$ac_compile\"") >&5
16959   (eval $ac_compile) 2>&5
16960   ac_status=$?
16961   echo "$as_me:16961: \$? = $ac_status" >&5
16962   (exit $ac_status); } &&
16963          { ac_try='test -s conftest.$ac_objext'
16964   { (eval echo "$as_me:16964: \"$ac_try\"") >&5
16965   (eval $ac_try) 2>&5
16966   ac_status=$?
16967   echo "$as_me:16967: \$? = $ac_status" >&5
16968   (exit $ac_status); }; }; then
16969   ac_cv_type_intptr_t=yes
16970 else
16971   echo "$as_me: failed program was:" >&5
16972 cat conftest.$ac_ext >&5
16973 ac_cv_type_intptr_t=no
16974 fi
16975 rm -f conftest.$ac_objext conftest.$ac_ext
16976 fi
16977 echo "$as_me:16977: result: $ac_cv_type_intptr_t" >&5
16978 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16979 if test $ac_cv_type_intptr_t = yes; then
16980   :
16981 else
16982
16983 cat >>confdefs.h <<EOF
16984 #define intptr_t long
16985 EOF
16986
16987 fi
16988
16989 echo "$as_me:16989: checking for type sigaction_t" >&5
16990 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16991 if test "${cf_cv_type_sigaction+set}" = set; then
16992   echo $ECHO_N "(cached) $ECHO_C" >&6
16993 else
16994
16995         cat >conftest.$ac_ext <<_ACEOF
16996 #line 16996 "configure"
16997 #include "confdefs.h"
16998
16999 #include <signal.h>
17000 int
17001 main ()
17002 {
17003 sigaction_t x
17004   ;
17005   return 0;
17006 }
17007 _ACEOF
17008 rm -f conftest.$ac_objext
17009 if { (eval echo "$as_me:17009: \"$ac_compile\"") >&5
17010   (eval $ac_compile) 2>&5
17011   ac_status=$?
17012   echo "$as_me:17012: \$? = $ac_status" >&5
17013   (exit $ac_status); } &&
17014          { ac_try='test -s conftest.$ac_objext'
17015   { (eval echo "$as_me:17015: \"$ac_try\"") >&5
17016   (eval $ac_try) 2>&5
17017   ac_status=$?
17018   echo "$as_me:17018: \$? = $ac_status" >&5
17019   (exit $ac_status); }; }; then
17020   cf_cv_type_sigaction=yes
17021 else
17022   echo "$as_me: failed program was:" >&5
17023 cat conftest.$ac_ext >&5
17024 cf_cv_type_sigaction=no
17025 fi
17026 rm -f conftest.$ac_objext conftest.$ac_ext
17027 fi
17028
17029 echo "$as_me:17029: result: $cf_cv_type_sigaction" >&5
17030 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17031 test "$cf_cv_type_sigaction" = yes &&
17032 cat >>confdefs.h <<\EOF
17033 #define HAVE_TYPE_SIGACTION 1
17034 EOF
17035
17036 echo "$as_me:17036: checking declaration of size-change" >&5
17037 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17038 if test "${cf_cv_sizechange+set}" = set; then
17039   echo $ECHO_N "(cached) $ECHO_C" >&6
17040 else
17041
17042     cf_cv_sizechange=unknown
17043     cf_save_CPPFLAGS="$CPPFLAGS"
17044
17045 for cf_opts in "" "NEED_PTEM_H"
17046 do
17047
17048     CPPFLAGS="$cf_save_CPPFLAGS"
17049     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17050     cat >conftest.$ac_ext <<_ACEOF
17051 #line 17051 "configure"
17052 #include "confdefs.h"
17053 #include <sys/types.h>
17054 #ifdef HAVE_TERMIOS_H
17055 #include <termios.h>
17056 #else
17057 #ifdef HAVE_TERMIO_H
17058 #include <termio.h>
17059 #endif
17060 #endif
17061 #ifdef NEED_PTEM_H
17062 /* This is a workaround for SCO:  they neglected to define struct winsize in
17063  * termios.h -- it's only in termio.h and ptem.h
17064  */
17065 #include        <sys/stream.h>
17066 #include        <sys/ptem.h>
17067 #endif
17068 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17069 #include <sys/ioctl.h>
17070 #endif
17071
17072 int
17073 main ()
17074 {
17075
17076 #ifdef TIOCGSIZE
17077         struct ttysize win;     /* FIXME: what system is this? */
17078         int y = win.ts_lines;
17079         int x = win.ts_cols;
17080 #else
17081 #ifdef TIOCGWINSZ
17082         struct winsize win;
17083         int y = win.ws_row;
17084         int x = win.ws_col;
17085 #else
17086         no TIOCGSIZE or TIOCGWINSZ
17087 #endif /* TIOCGWINSZ */
17088 #endif /* TIOCGSIZE */
17089
17090   ;
17091   return 0;
17092 }
17093 _ACEOF
17094 rm -f conftest.$ac_objext
17095 if { (eval echo "$as_me:17095: \"$ac_compile\"") >&5
17096   (eval $ac_compile) 2>&5
17097   ac_status=$?
17098   echo "$as_me:17098: \$? = $ac_status" >&5
17099   (exit $ac_status); } &&
17100          { ac_try='test -s conftest.$ac_objext'
17101   { (eval echo "$as_me:17101: \"$ac_try\"") >&5
17102   (eval $ac_try) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); }; }; then
17106   cf_cv_sizechange=yes
17107 else
17108   echo "$as_me: failed program was:" >&5
17109 cat conftest.$ac_ext >&5
17110 cf_cv_sizechange=no
17111 fi
17112 rm -f conftest.$ac_objext conftest.$ac_ext
17113
17114         CPPFLAGS="$cf_save_CPPFLAGS"
17115         if test "$cf_cv_sizechange" = yes ; then
17116                 echo "size-change succeeded ($cf_opts)" >&5
17117                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17118                 break
17119         fi
17120 done
17121
17122 fi
17123 echo "$as_me:17123: result: $cf_cv_sizechange" >&5
17124 echo "${ECHO_T}$cf_cv_sizechange" >&6
17125 if test "$cf_cv_sizechange" != no ; then
17126
17127 cat >>confdefs.h <<\EOF
17128 #define HAVE_SIZECHANGE 1
17129 EOF
17130
17131         case $cf_cv_sizechange in #(vi
17132         NEED*)
17133                 cat >>confdefs.h <<EOF
17134 #define $cf_cv_sizechange  1
17135 EOF
17136
17137                 ;;
17138         esac
17139 fi
17140
17141 echo "$as_me:17141: checking for memmove" >&5
17142 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17143 if test "${ac_cv_func_memmove+set}" = set; then
17144   echo $ECHO_N "(cached) $ECHO_C" >&6
17145 else
17146   cat >conftest.$ac_ext <<_ACEOF
17147 #line 17147 "configure"
17148 #include "confdefs.h"
17149 /* System header to define __stub macros and hopefully few prototypes,
17150     which can conflict with char memmove (); below.  */
17151 #include <assert.h>
17152 /* Override any gcc2 internal prototype to avoid an error.  */
17153 #ifdef __cplusplus
17154 extern "C"
17155 #endif
17156 /* We use char because int might match the return type of a gcc2
17157    builtin and then its argument prototype would still apply.  */
17158 char memmove ();
17159 char (*f) ();
17160
17161 int
17162 main ()
17163 {
17164 /* The GNU C library defines this for functions which it implements
17165     to always fail with ENOSYS.  Some functions are actually named
17166     something starting with __ and the normal name is an alias.  */
17167 #if defined (__stub_memmove) || defined (__stub___memmove)
17168 choke me
17169 #else
17170 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17171 #endif
17172
17173   ;
17174   return 0;
17175 }
17176 _ACEOF
17177 rm -f conftest.$ac_objext conftest$ac_exeext
17178 if { (eval echo "$as_me:17178: \"$ac_link\"") >&5
17179   (eval $ac_link) 2>&5
17180   ac_status=$?
17181   echo "$as_me:17181: \$? = $ac_status" >&5
17182   (exit $ac_status); } &&
17183          { ac_try='test -s conftest$ac_exeext'
17184   { (eval echo "$as_me:17184: \"$ac_try\"") >&5
17185   (eval $ac_try) 2>&5
17186   ac_status=$?
17187   echo "$as_me:17187: \$? = $ac_status" >&5
17188   (exit $ac_status); }; }; then
17189   ac_cv_func_memmove=yes
17190 else
17191   echo "$as_me: failed program was:" >&5
17192 cat conftest.$ac_ext >&5
17193 ac_cv_func_memmove=no
17194 fi
17195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17196 fi
17197 echo "$as_me:17197: result: $ac_cv_func_memmove" >&5
17198 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17199 if test $ac_cv_func_memmove = yes; then
17200   :
17201 else
17202
17203 echo "$as_me:17203: checking for bcopy" >&5
17204 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17205 if test "${ac_cv_func_bcopy+set}" = set; then
17206   echo $ECHO_N "(cached) $ECHO_C" >&6
17207 else
17208   cat >conftest.$ac_ext <<_ACEOF
17209 #line 17209 "configure"
17210 #include "confdefs.h"
17211 /* System header to define __stub macros and hopefully few prototypes,
17212     which can conflict with char bcopy (); below.  */
17213 #include <assert.h>
17214 /* Override any gcc2 internal prototype to avoid an error.  */
17215 #ifdef __cplusplus
17216 extern "C"
17217 #endif
17218 /* We use char because int might match the return type of a gcc2
17219    builtin and then its argument prototype would still apply.  */
17220 char bcopy ();
17221 char (*f) ();
17222
17223 int
17224 main ()
17225 {
17226 /* The GNU C library defines this for functions which it implements
17227     to always fail with ENOSYS.  Some functions are actually named
17228     something starting with __ and the normal name is an alias.  */
17229 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17230 choke me
17231 #else
17232 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17233 #endif
17234
17235   ;
17236   return 0;
17237 }
17238 _ACEOF
17239 rm -f conftest.$ac_objext conftest$ac_exeext
17240 if { (eval echo "$as_me:17240: \"$ac_link\"") >&5
17241   (eval $ac_link) 2>&5
17242   ac_status=$?
17243   echo "$as_me:17243: \$? = $ac_status" >&5
17244   (exit $ac_status); } &&
17245          { ac_try='test -s conftest$ac_exeext'
17246   { (eval echo "$as_me:17246: \"$ac_try\"") >&5
17247   (eval $ac_try) 2>&5
17248   ac_status=$?
17249   echo "$as_me:17249: \$? = $ac_status" >&5
17250   (exit $ac_status); }; }; then
17251   ac_cv_func_bcopy=yes
17252 else
17253   echo "$as_me: failed program was:" >&5
17254 cat conftest.$ac_ext >&5
17255 ac_cv_func_bcopy=no
17256 fi
17257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17258 fi
17259 echo "$as_me:17259: result: $ac_cv_func_bcopy" >&5
17260 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17261 if test $ac_cv_func_bcopy = yes; then
17262
17263         echo "$as_me:17263: checking if bcopy does overlapping moves" >&5
17264 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17265 if test "${cf_cv_good_bcopy+set}" = set; then
17266   echo $ECHO_N "(cached) $ECHO_C" >&6
17267 else
17268
17269                 if test "$cross_compiling" = yes; then
17270   cf_cv_good_bcopy=unknown
17271 else
17272   cat >conftest.$ac_ext <<_ACEOF
17273 #line 17273 "configure"
17274 #include "confdefs.h"
17275
17276 int main() {
17277         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17278         char temp[40];
17279         bcopy(data, temp, sizeof(data));
17280         bcopy(temp+10, temp, 15);
17281         bcopy(temp+5, temp+15, 10);
17282         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17283 }
17284
17285 _ACEOF
17286 rm -f conftest$ac_exeext
17287 if { (eval echo "$as_me:17287: \"$ac_link\"") >&5
17288   (eval $ac_link) 2>&5
17289   ac_status=$?
17290   echo "$as_me:17290: \$? = $ac_status" >&5
17291   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17292   { (eval echo "$as_me:17292: \"$ac_try\"") >&5
17293   (eval $ac_try) 2>&5
17294   ac_status=$?
17295   echo "$as_me:17295: \$? = $ac_status" >&5
17296   (exit $ac_status); }; }; then
17297   cf_cv_good_bcopy=yes
17298 else
17299   echo "$as_me: program exited with status $ac_status" >&5
17300 echo "$as_me: failed program was:" >&5
17301 cat conftest.$ac_ext >&5
17302 cf_cv_good_bcopy=no
17303 fi
17304 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17305 fi
17306
17307 fi
17308 echo "$as_me:17308: result: $cf_cv_good_bcopy" >&5
17309 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17310
17311 else
17312   cf_cv_good_bcopy=no
17313 fi
17314
17315         if test "$cf_cv_good_bcopy" = yes ; then
17316
17317 cat >>confdefs.h <<\EOF
17318 #define USE_OK_BCOPY 1
17319 EOF
17320
17321         else
17322
17323 cat >>confdefs.h <<\EOF
17324 #define USE_MY_MEMMOVE 1
17325 EOF
17326
17327         fi
17328
17329 fi
17330
17331 echo "$as_me:17331: checking if poll really works" >&5
17332 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17333 if test "${cf_cv_working_poll+set}" = set; then
17334   echo $ECHO_N "(cached) $ECHO_C" >&6
17335 else
17336
17337 if test "$cross_compiling" = yes; then
17338   cf_cv_working_poll=unknown
17339 else
17340   cat >conftest.$ac_ext <<_ACEOF
17341 #line 17341 "configure"
17342 #include "confdefs.h"
17343
17344 #include <stdlib.h>
17345 #include <stdio.h>
17346 #include <unistd.h>
17347 #include <fcntl.h>
17348 #ifdef HAVE_POLL_H
17349 #include <poll.h>
17350 #else
17351 #include <sys/poll.h>
17352 #endif
17353 int main() {
17354         struct pollfd myfds;
17355         int ret;
17356
17357         /* check for Darwin bug with respect to "devices" */
17358         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17359         if (myfds.fd < 0)
17360                 myfds.fd = 0;
17361         myfds.events = POLLIN;
17362         myfds.revents = 0;
17363
17364         ret = poll(&myfds, 1, 100);
17365
17366         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17367                 ret = -1;
17368         } else {
17369                 int fd = 0;
17370                 if (!isatty(fd)) {
17371                         fd = open("/dev/tty", 2);       /* O_RDWR */
17372                 }
17373
17374                 if (fd >= 0) {
17375                         /* also check with standard input */
17376                         myfds.fd = fd;
17377                         myfds.events = POLLIN;
17378                         myfds.revents = 0;
17379                         ret = poll(&myfds, 1, 100);
17380                 } else {
17381                         ret = -1;
17382                 }
17383         }
17384         ${cf_cv_main_return:-return}(ret < 0);
17385 }
17386 _ACEOF
17387 rm -f conftest$ac_exeext
17388 if { (eval echo "$as_me:17388: \"$ac_link\"") >&5
17389   (eval $ac_link) 2>&5
17390   ac_status=$?
17391   echo "$as_me:17391: \$? = $ac_status" >&5
17392   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17393   { (eval echo "$as_me:17393: \"$ac_try\"") >&5
17394   (eval $ac_try) 2>&5
17395   ac_status=$?
17396   echo "$as_me:17396: \$? = $ac_status" >&5
17397   (exit $ac_status); }; }; then
17398   cf_cv_working_poll=yes
17399 else
17400   echo "$as_me: program exited with status $ac_status" >&5
17401 echo "$as_me: failed program was:" >&5
17402 cat conftest.$ac_ext >&5
17403 cf_cv_working_poll=no
17404 fi
17405 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17406 fi
17407 fi
17408 echo "$as_me:17408: result: $cf_cv_working_poll" >&5
17409 echo "${ECHO_T}$cf_cv_working_poll" >&6
17410 test "$cf_cv_working_poll" = "yes" &&
17411 cat >>confdefs.h <<\EOF
17412 #define HAVE_WORKING_POLL 1
17413 EOF
17414
17415 echo "$as_me:17415: checking for va_copy" >&5
17416 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17417 if test "${cf_cv_have_va_copy+set}" = set; then
17418   echo $ECHO_N "(cached) $ECHO_C" >&6
17419 else
17420
17421 cat >conftest.$ac_ext <<_ACEOF
17422 #line 17422 "configure"
17423 #include "confdefs.h"
17424
17425 #include <stdarg.h>
17426
17427 int
17428 main ()
17429 {
17430
17431         static va_list dst;
17432         static va_list src;
17433         va_copy(dst, src)
17434   ;
17435   return 0;
17436 }
17437 _ACEOF
17438 rm -f conftest.$ac_objext conftest$ac_exeext
17439 if { (eval echo "$as_me:17439: \"$ac_link\"") >&5
17440   (eval $ac_link) 2>&5
17441   ac_status=$?
17442   echo "$as_me:17442: \$? = $ac_status" >&5
17443   (exit $ac_status); } &&
17444          { ac_try='test -s conftest$ac_exeext'
17445   { (eval echo "$as_me:17445: \"$ac_try\"") >&5
17446   (eval $ac_try) 2>&5
17447   ac_status=$?
17448   echo "$as_me:17448: \$? = $ac_status" >&5
17449   (exit $ac_status); }; }; then
17450   cf_cv_have_va_copy=yes
17451 else
17452   echo "$as_me: failed program was:" >&5
17453 cat conftest.$ac_ext >&5
17454 cf_cv_have_va_copy=no
17455 fi
17456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17457 fi
17458 echo "$as_me:17458: result: $cf_cv_have_va_copy" >&5
17459 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17460
17461 test "$cf_cv_have_va_copy" = yes &&
17462 cat >>confdefs.h <<\EOF
17463 #define HAVE_VA_COPY 1
17464 EOF
17465
17466 echo "$as_me:17466: checking for __va_copy" >&5
17467 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17468 if test "${cf_cv_have___va_copy+set}" = set; then
17469   echo $ECHO_N "(cached) $ECHO_C" >&6
17470 else
17471
17472 cat >conftest.$ac_ext <<_ACEOF
17473 #line 17473 "configure"
17474 #include "confdefs.h"
17475
17476 #include <stdarg.h>
17477
17478 int
17479 main ()
17480 {
17481
17482         static va_list dst;
17483         static va_list src;
17484         __va_copy(dst, src)
17485   ;
17486   return 0;
17487 }
17488 _ACEOF
17489 rm -f conftest.$ac_objext conftest$ac_exeext
17490 if { (eval echo "$as_me:17490: \"$ac_link\"") >&5
17491   (eval $ac_link) 2>&5
17492   ac_status=$?
17493   echo "$as_me:17493: \$? = $ac_status" >&5
17494   (exit $ac_status); } &&
17495          { ac_try='test -s conftest$ac_exeext'
17496   { (eval echo "$as_me:17496: \"$ac_try\"") >&5
17497   (eval $ac_try) 2>&5
17498   ac_status=$?
17499   echo "$as_me:17499: \$? = $ac_status" >&5
17500   (exit $ac_status); }; }; then
17501   cf_cv_have___va_copy=yes
17502 else
17503   echo "$as_me: failed program was:" >&5
17504 cat conftest.$ac_ext >&5
17505 cf_cv_have___va_copy=no
17506 fi
17507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17508 fi
17509 echo "$as_me:17509: result: $cf_cv_have___va_copy" >&5
17510 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17511
17512 test "$cf_cv_have___va_copy" = yes &&
17513 cat >>confdefs.h <<\EOF
17514 #define HAVE___VA_COPY 1
17515 EOF
17516
17517 echo "$as_me:17517: checking for pid_t" >&5
17518 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17519 if test "${ac_cv_type_pid_t+set}" = set; then
17520   echo $ECHO_N "(cached) $ECHO_C" >&6
17521 else
17522   cat >conftest.$ac_ext <<_ACEOF
17523 #line 17523 "configure"
17524 #include "confdefs.h"
17525 $ac_includes_default
17526 int
17527 main ()
17528 {
17529 if ((pid_t *) 0)
17530   return 0;
17531 if (sizeof (pid_t))
17532   return 0;
17533   ;
17534   return 0;
17535 }
17536 _ACEOF
17537 rm -f conftest.$ac_objext
17538 if { (eval echo "$as_me:17538: \"$ac_compile\"") >&5
17539   (eval $ac_compile) 2>&5
17540   ac_status=$?
17541   echo "$as_me:17541: \$? = $ac_status" >&5
17542   (exit $ac_status); } &&
17543          { ac_try='test -s conftest.$ac_objext'
17544   { (eval echo "$as_me:17544: \"$ac_try\"") >&5
17545   (eval $ac_try) 2>&5
17546   ac_status=$?
17547   echo "$as_me:17547: \$? = $ac_status" >&5
17548   (exit $ac_status); }; }; then
17549   ac_cv_type_pid_t=yes
17550 else
17551   echo "$as_me: failed program was:" >&5
17552 cat conftest.$ac_ext >&5
17553 ac_cv_type_pid_t=no
17554 fi
17555 rm -f conftest.$ac_objext conftest.$ac_ext
17556 fi
17557 echo "$as_me:17557: result: $ac_cv_type_pid_t" >&5
17558 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17559 if test $ac_cv_type_pid_t = yes; then
17560   :
17561 else
17562
17563 cat >>confdefs.h <<EOF
17564 #define pid_t int
17565 EOF
17566
17567 fi
17568
17569 for ac_header in unistd.h vfork.h
17570 do
17571 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17572 echo "$as_me:17572: checking for $ac_header" >&5
17573 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17574 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17575   echo $ECHO_N "(cached) $ECHO_C" >&6
17576 else
17577   cat >conftest.$ac_ext <<_ACEOF
17578 #line 17578 "configure"
17579 #include "confdefs.h"
17580 #include <$ac_header>
17581 _ACEOF
17582 if { (eval echo "$as_me:17582: \"$ac_cpp conftest.$ac_ext\"") >&5
17583   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17584   ac_status=$?
17585   egrep -v '^ *\+' conftest.er1 >conftest.err
17586   rm -f conftest.er1
17587   cat conftest.err >&5
17588   echo "$as_me:17588: \$? = $ac_status" >&5
17589   (exit $ac_status); } >/dev/null; then
17590   if test -s conftest.err; then
17591     ac_cpp_err=$ac_c_preproc_warn_flag
17592   else
17593     ac_cpp_err=
17594   fi
17595 else
17596   ac_cpp_err=yes
17597 fi
17598 if test -z "$ac_cpp_err"; then
17599   eval "$as_ac_Header=yes"
17600 else
17601   echo "$as_me: failed program was:" >&5
17602   cat conftest.$ac_ext >&5
17603   eval "$as_ac_Header=no"
17604 fi
17605 rm -f conftest.err conftest.$ac_ext
17606 fi
17607 echo "$as_me:17607: result: `eval echo '${'$as_ac_Header'}'`" >&5
17608 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17609 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17610   cat >>confdefs.h <<EOF
17611 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17612 EOF
17613
17614 fi
17615 done
17616
17617 for ac_func in fork vfork
17618 do
17619 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17620 echo "$as_me:17620: checking for $ac_func" >&5
17621 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17622 if eval "test \"\${$as_ac_var+set}\" = set"; then
17623   echo $ECHO_N "(cached) $ECHO_C" >&6
17624 else
17625   cat >conftest.$ac_ext <<_ACEOF
17626 #line 17626 "configure"
17627 #include "confdefs.h"
17628 /* System header to define __stub macros and hopefully few prototypes,
17629     which can conflict with char $ac_func (); below.  */
17630 #include <assert.h>
17631 /* Override any gcc2 internal prototype to avoid an error.  */
17632 #ifdef __cplusplus
17633 extern "C"
17634 #endif
17635 /* We use char because int might match the return type of a gcc2
17636    builtin and then its argument prototype would still apply.  */
17637 char $ac_func ();
17638 char (*f) ();
17639
17640 int
17641 main ()
17642 {
17643 /* The GNU C library defines this for functions which it implements
17644     to always fail with ENOSYS.  Some functions are actually named
17645     something starting with __ and the normal name is an alias.  */
17646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17647 choke me
17648 #else
17649 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17650 #endif
17651
17652   ;
17653   return 0;
17654 }
17655 _ACEOF
17656 rm -f conftest.$ac_objext conftest$ac_exeext
17657 if { (eval echo "$as_me:17657: \"$ac_link\"") >&5
17658   (eval $ac_link) 2>&5
17659   ac_status=$?
17660   echo "$as_me:17660: \$? = $ac_status" >&5
17661   (exit $ac_status); } &&
17662          { ac_try='test -s conftest$ac_exeext'
17663   { (eval echo "$as_me:17663: \"$ac_try\"") >&5
17664   (eval $ac_try) 2>&5
17665   ac_status=$?
17666   echo "$as_me:17666: \$? = $ac_status" >&5
17667   (exit $ac_status); }; }; then
17668   eval "$as_ac_var=yes"
17669 else
17670   echo "$as_me: failed program was:" >&5
17671 cat conftest.$ac_ext >&5
17672 eval "$as_ac_var=no"
17673 fi
17674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17675 fi
17676 echo "$as_me:17676: result: `eval echo '${'$as_ac_var'}'`" >&5
17677 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17678 if test `eval echo '${'$as_ac_var'}'` = yes; then
17679   cat >>confdefs.h <<EOF
17680 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17681 EOF
17682
17683 fi
17684 done
17685
17686 ac_cv_func_fork_works=$ac_cv_func_fork
17687 if test "x$ac_cv_func_fork" = xyes; then
17688   echo "$as_me:17688: checking for working fork" >&5
17689 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17690 if test "${ac_cv_func_fork_works+set}" = set; then
17691   echo $ECHO_N "(cached) $ECHO_C" >&6
17692 else
17693   if test "$cross_compiling" = yes; then
17694   ac_cv_func_fork_works=cross
17695 else
17696   cat >conftest.$ac_ext <<_ACEOF
17697 /* By Rüdiger Kuhlmann. */
17698       #include <sys/types.h>
17699       #if HAVE_UNISTD_H
17700       # include <unistd.h>
17701       #endif
17702       /* Some systems only have a dummy stub for fork() */
17703       int main ()
17704       {
17705         if (fork() < 0)
17706           $ac_main_return (1);
17707         $ac_main_return (0);
17708       }
17709 _ACEOF
17710 rm -f conftest$ac_exeext
17711 if { (eval echo "$as_me:17711: \"$ac_link\"") >&5
17712   (eval $ac_link) 2>&5
17713   ac_status=$?
17714   echo "$as_me:17714: \$? = $ac_status" >&5
17715   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17716   { (eval echo "$as_me:17716: \"$ac_try\"") >&5
17717   (eval $ac_try) 2>&5
17718   ac_status=$?
17719   echo "$as_me:17719: \$? = $ac_status" >&5
17720   (exit $ac_status); }; }; then
17721   ac_cv_func_fork_works=yes
17722 else
17723   echo "$as_me: program exited with status $ac_status" >&5
17724 echo "$as_me: failed program was:" >&5
17725 cat conftest.$ac_ext >&5
17726 ac_cv_func_fork_works=no
17727 fi
17728 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17729 fi
17730 fi
17731 echo "$as_me:17731: result: $ac_cv_func_fork_works" >&5
17732 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17733
17734 fi
17735 if test "x$ac_cv_func_fork_works" = xcross; then
17736   case $host in
17737     *-*-amigaos* | *-*-msdosdjgpp*)
17738       # Override, as these systems have only a dummy fork() stub
17739       ac_cv_func_fork_works=no
17740       ;;
17741     *)
17742       ac_cv_func_fork_works=yes
17743       ;;
17744   esac
17745   { echo "$as_me:17745: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17746 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17747 fi
17748 ac_cv_func_vfork_works=$ac_cv_func_vfork
17749 if test "x$ac_cv_func_vfork" = xyes; then
17750   echo "$as_me:17750: checking for working vfork" >&5
17751 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17752 if test "${ac_cv_func_vfork_works+set}" = set; then
17753   echo $ECHO_N "(cached) $ECHO_C" >&6
17754 else
17755   if test "$cross_compiling" = yes; then
17756   ac_cv_func_vfork_works=cross
17757 else
17758   cat >conftest.$ac_ext <<_ACEOF
17759 #line 17759 "configure"
17760 #include "confdefs.h"
17761 /* Thanks to Paul Eggert for this test.  */
17762 #include <stdio.h>
17763 #include <sys/types.h>
17764 #include <sys/stat.h>
17765 #if HAVE_UNISTD_H
17766 # include <unistd.h>
17767 #endif
17768 #if HAVE_VFORK_H
17769 # include <vfork.h>
17770 #endif
17771 /* On some sparc systems, changes by the child to local and incoming
17772    argument registers are propagated back to the parent.  The compiler
17773    is told about this with #include <vfork.h>, but some compilers
17774    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17775    static variable whose address is put into a register that is
17776    clobbered by the vfork.  */
17777 static
17778 #ifdef __cplusplus
17779 sparc_address_test (int arg)
17780 # else
17781 sparc_address_test (arg) int arg;
17782 #endif
17783 {
17784   static pid_t child;
17785   if (!child) {
17786     child = vfork ();
17787     if (child < 0) {
17788       perror ("vfork");
17789       _exit(2);
17790     }
17791     if (!child) {
17792       arg = getpid();
17793       write(-1, "", 0);
17794       _exit (arg);
17795     }
17796   }
17797 }
17798
17799 int
17800 main ()
17801 {
17802   pid_t parent = getpid ();
17803   pid_t child;
17804
17805   sparc_address_test ();
17806
17807   child = vfork ();
17808
17809   if (child == 0) {
17810     /* Here is another test for sparc vfork register problems.  This
17811        test uses lots of local variables, at least as many local
17812        variables as main has allocated so far including compiler
17813        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17814        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17815        reuse the register of parent for one of the local variables,
17816        since it will think that parent can't possibly be used any more
17817        in this routine.  Assigning to the local variable will thus
17818        munge parent in the parent process.  */
17819     pid_t
17820       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17821       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17822     /* Convince the compiler that p..p7 are live; otherwise, it might
17823        use the same hardware register for all 8 local variables.  */
17824     if (p != p1 || p != p2 || p != p3 || p != p4
17825         || p != p5 || p != p6 || p != p7)
17826       _exit(1);
17827
17828     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17829        from child file descriptors.  If the child closes a descriptor
17830        before it execs or exits, this munges the parent's descriptor
17831        as well.  Test for this by closing stdout in the child.  */
17832     _exit(close(fileno(stdout)) != 0);
17833   } else {
17834     int status;
17835     struct stat st;
17836
17837     while (wait(&status) != child)
17838       ;
17839     $ac_main_return(
17840          /* Was there some problem with vforking?  */
17841          child < 0
17842
17843          /* Did the child fail?  (This shouldn't happen.)  */
17844          || status
17845
17846          /* Did the vfork/compiler bug occur?  */
17847          || parent != getpid()
17848
17849          /* Did the file descriptor bug occur?  */
17850          || fstat(fileno(stdout), &st) != 0
17851          );
17852   }
17853 }
17854 _ACEOF
17855 rm -f conftest$ac_exeext
17856 if { (eval echo "$as_me:17856: \"$ac_link\"") >&5
17857   (eval $ac_link) 2>&5
17858   ac_status=$?
17859   echo "$as_me:17859: \$? = $ac_status" >&5
17860   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17861   { (eval echo "$as_me:17861: \"$ac_try\"") >&5
17862   (eval $ac_try) 2>&5
17863   ac_status=$?
17864   echo "$as_me:17864: \$? = $ac_status" >&5
17865   (exit $ac_status); }; }; then
17866   ac_cv_func_vfork_works=yes
17867 else
17868   echo "$as_me: program exited with status $ac_status" >&5
17869 echo "$as_me: failed program was:" >&5
17870 cat conftest.$ac_ext >&5
17871 ac_cv_func_vfork_works=no
17872 fi
17873 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17874 fi
17875 fi
17876 echo "$as_me:17876: result: $ac_cv_func_vfork_works" >&5
17877 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17878
17879 fi;
17880 if test "x$ac_cv_func_fork_works" = xcross; then
17881   ac_cv_func_vfork_works=ac_cv_func_vfork
17882   { echo "$as_me:17882: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17883 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17884 fi
17885
17886 if test "x$ac_cv_func_vfork_works" = xyes; then
17887
17888 cat >>confdefs.h <<\EOF
17889 #define HAVE_WORKING_VFORK 1
17890 EOF
17891
17892 else
17893
17894 cat >>confdefs.h <<\EOF
17895 #define vfork fork
17896 EOF
17897
17898 fi
17899 if test "x$ac_cv_func_fork_works" = xyes; then
17900
17901 cat >>confdefs.h <<\EOF
17902 #define HAVE_WORKING_FORK 1
17903 EOF
17904
17905 fi
17906
17907 # special check for test/ditto.c
17908
17909 echo "$as_me:17909: checking for openpty in -lutil" >&5
17910 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17911 if test "${ac_cv_lib_util_openpty+set}" = set; then
17912   echo $ECHO_N "(cached) $ECHO_C" >&6
17913 else
17914   ac_check_lib_save_LIBS=$LIBS
17915 LIBS="-lutil  $LIBS"
17916 cat >conftest.$ac_ext <<_ACEOF
17917 #line 17917 "configure"
17918 #include "confdefs.h"
17919
17920 /* Override any gcc2 internal prototype to avoid an error.  */
17921 #ifdef __cplusplus
17922 extern "C"
17923 #endif
17924 /* We use char because int might match the return type of a gcc2
17925    builtin and then its argument prototype would still apply.  */
17926 char openpty ();
17927 int
17928 main ()
17929 {
17930 openpty ();
17931   ;
17932   return 0;
17933 }
17934 _ACEOF
17935 rm -f conftest.$ac_objext conftest$ac_exeext
17936 if { (eval echo "$as_me:17936: \"$ac_link\"") >&5
17937   (eval $ac_link) 2>&5
17938   ac_status=$?
17939   echo "$as_me:17939: \$? = $ac_status" >&5
17940   (exit $ac_status); } &&
17941          { ac_try='test -s conftest$ac_exeext'
17942   { (eval echo "$as_me:17942: \"$ac_try\"") >&5
17943   (eval $ac_try) 2>&5
17944   ac_status=$?
17945   echo "$as_me:17945: \$? = $ac_status" >&5
17946   (exit $ac_status); }; }; then
17947   ac_cv_lib_util_openpty=yes
17948 else
17949   echo "$as_me: failed program was:" >&5
17950 cat conftest.$ac_ext >&5
17951 ac_cv_lib_util_openpty=no
17952 fi
17953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17954 LIBS=$ac_check_lib_save_LIBS
17955 fi
17956 echo "$as_me:17956: result: $ac_cv_lib_util_openpty" >&5
17957 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17958 if test $ac_cv_lib_util_openpty = yes; then
17959   cf_cv_lib_util=yes
17960 else
17961   cf_cv_lib_util=no
17962 fi
17963
17964 echo "$as_me:17964: checking for openpty header" >&5
17965 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17966 if test "${cf_cv_func_openpty+set}" = set; then
17967   echo $ECHO_N "(cached) $ECHO_C" >&6
17968 else
17969
17970     cf_save_LIBS="$LIBS"
17971     test $cf_cv_lib_util = yes &&
17972 cf_add_libs="-lutil"
17973 # Filter out duplicates - this happens with badly-designed ".pc" files...
17974 for cf_add_1lib in $LIBS
17975 do
17976         for cf_add_2lib in $cf_add_libs
17977         do
17978                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17979                 then
17980                         cf_add_1lib=
17981                         break
17982                 fi
17983         done
17984         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17985 done
17986 LIBS="$cf_add_libs"
17987
17988     for cf_header in pty.h libutil.h util.h
17989     do
17990     cat >conftest.$ac_ext <<_ACEOF
17991 #line 17991 "configure"
17992 #include "confdefs.h"
17993
17994 #include <$cf_header>
17995
17996 int
17997 main ()
17998 {
17999
18000     int x = openpty((int *)0, (int *)0, (char *)0,
18001                    (struct termios *)0, (struct winsize *)0);
18002
18003   ;
18004   return 0;
18005 }
18006 _ACEOF
18007 rm -f conftest.$ac_objext conftest$ac_exeext
18008 if { (eval echo "$as_me:18008: \"$ac_link\"") >&5
18009   (eval $ac_link) 2>&5
18010   ac_status=$?
18011   echo "$as_me:18011: \$? = $ac_status" >&5
18012   (exit $ac_status); } &&
18013          { ac_try='test -s conftest$ac_exeext'
18014   { (eval echo "$as_me:18014: \"$ac_try\"") >&5
18015   (eval $ac_try) 2>&5
18016   ac_status=$?
18017   echo "$as_me:18017: \$? = $ac_status" >&5
18018   (exit $ac_status); }; }; then
18019
18020         cf_cv_func_openpty=$cf_header
18021         break
18022
18023 else
18024   echo "$as_me: failed program was:" >&5
18025 cat conftest.$ac_ext >&5
18026
18027         cf_cv_func_openpty=no
18028
18029 fi
18030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18031     done
18032     LIBS="$cf_save_LIBS"
18033
18034 fi
18035 echo "$as_me:18035: result: $cf_cv_func_openpty" >&5
18036 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18037
18038 if test "$cf_cv_func_openpty" != no ; then
18039
18040 cat >>confdefs.h <<EOF
18041 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18042 EOF
18043
18044 cat >>confdefs.h <<\EOF
18045 #define USE_XTERM_PTY 1
18046 EOF
18047
18048     if test "x$cf_cv_lib_util" = xyes ; then
18049
18050 cf_add_libs="-lutil"
18051 # Filter out duplicates - this happens with badly-designed ".pc" files...
18052 for cf_add_1lib in $TEST_LIBS
18053 do
18054         for cf_add_2lib in $cf_add_libs
18055         do
18056                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18057                 then
18058                         cf_add_1lib=
18059                         break
18060                 fi
18061         done
18062         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18063 done
18064 TEST_LIBS="$cf_add_libs"
18065
18066     fi
18067 fi
18068
18069 if test "$with_hashed_db" != no ; then
18070
18071 cat >>confdefs.h <<\EOF
18072 #define USE_HASHED_DB 1
18073 EOF
18074
18075 case $with_hashed_db in #(vi
18076 yes|*able*) #(vi
18077     ;;
18078 *)
18079     if test -d "$with_hashed_db" ; then
18080
18081 if test -n "$with_hashed_db/include" ; then
18082   for cf_add_incdir in $with_hashed_db/include
18083   do
18084         while test $cf_add_incdir != /usr/include
18085         do
18086           if test -d $cf_add_incdir
18087           then
18088                 cf_have_incdir=no
18089                 if test -n "$CFLAGS$CPPFLAGS" ; then
18090                   # a loop is needed to ensure we can add subdirs of existing dirs
18091                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18092                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18093                           cf_have_incdir=yes; break
18094                         fi
18095                   done
18096                 fi
18097
18098                 if test "$cf_have_incdir" = no ; then
18099                   if test "$cf_add_incdir" = /usr/local/include ; then
18100                         if test "$GCC" = yes
18101                         then
18102                           cf_save_CPPFLAGS=$CPPFLAGS
18103                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18104                           cat >conftest.$ac_ext <<_ACEOF
18105 #line 18105 "configure"
18106 #include "confdefs.h"
18107 #include <stdio.h>
18108 int
18109 main ()
18110 {
18111 printf("Hello")
18112   ;
18113   return 0;
18114 }
18115 _ACEOF
18116 rm -f conftest.$ac_objext
18117 if { (eval echo "$as_me:18117: \"$ac_compile\"") >&5
18118   (eval $ac_compile) 2>&5
18119   ac_status=$?
18120   echo "$as_me:18120: \$? = $ac_status" >&5
18121   (exit $ac_status); } &&
18122          { ac_try='test -s conftest.$ac_objext'
18123   { (eval echo "$as_me:18123: \"$ac_try\"") >&5
18124   (eval $ac_try) 2>&5
18125   ac_status=$?
18126   echo "$as_me:18126: \$? = $ac_status" >&5
18127   (exit $ac_status); }; }; then
18128   :
18129 else
18130   echo "$as_me: failed program was:" >&5
18131 cat conftest.$ac_ext >&5
18132 cf_have_incdir=yes
18133 fi
18134 rm -f conftest.$ac_objext conftest.$ac_ext
18135                           CPPFLAGS=$cf_save_CPPFLAGS
18136                         fi
18137                   fi
18138                 fi
18139
18140                 if test "$cf_have_incdir" = no ; then
18141                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18142
18143 echo "${as_me:-configure}:18143: testing adding $cf_add_incdir to include-path ..." 1>&5
18144
18145                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18146
18147                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18148                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18149                   cf_add_incdir="$cf_top_incdir"
18150                 else
18151                   break
18152                 fi
18153           fi
18154         done
18155   done
18156 fi
18157
18158 if test -n "$with_hashed_db/lib" ; then
18159   for cf_add_libdir in $with_hashed_db/lib
18160   do
18161     if test $cf_add_libdir = /usr/lib ; then
18162       :
18163     elif test -d $cf_add_libdir
18164     then
18165       cf_have_libdir=no
18166       if test -n "$LDFLAGS$LIBS" ; then
18167         # a loop is needed to ensure we can add subdirs of existing dirs
18168         for cf_test_libdir in $LDFLAGS $LIBS ; do
18169           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18170             cf_have_libdir=yes; break
18171           fi
18172         done
18173       fi
18174       if test "$cf_have_libdir" = no ; then
18175         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18176
18177 echo "${as_me:-configure}:18177: testing adding $cf_add_libdir to library-path ..." 1>&5
18178
18179         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18180       fi
18181     fi
18182   done
18183 fi
18184
18185         else
18186                 case "$with_hashed_db" in #(vi
18187                 ./*|../*|/*)
18188                         { echo "$as_me:18188: WARNING: no such directory $with_hashed_db" >&5
18189 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18190                         ;; #(vi
18191                 *)
18192
18193 cf_search=
18194
18195 test "x/usr" != "x$prefix" && \
18196 test -d "/usr" && \
18197 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18198         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
18199         test -d /usr/include &&          cf_search="$cf_search /usr/include"
18200         test -d /usr/include/$with_hashed_db &&       cf_search="$cf_search /usr/include/$with_hashed_db"
18201         test -d /usr/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/include/$with_hashed_db/include"
18202         test -d /usr/$with_hashed_db/include &&       cf_search="$cf_search /usr/$with_hashed_db/include"
18203         test -d /usr/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/include/$with_hashed_db"
18204 }
18205
18206 test "x$prefix" != "xNONE" && \
18207 test -d "$prefix" && \
18208  {
18209         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18210         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18211         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18212         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18213         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18214         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18215 }
18216
18217 test "x/usr/local" != "x$prefix" && \
18218 test -d "/usr/local" && \
18219 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18220         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
18221         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
18222         test -d /usr/local/include/$with_hashed_db &&       cf_search="$cf_search /usr/local/include/$with_hashed_db"
18223         test -d /usr/local/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/local/include/$with_hashed_db/include"
18224         test -d /usr/local/$with_hashed_db/include &&       cf_search="$cf_search /usr/local/$with_hashed_db/include"
18225         test -d /usr/local/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/include/$with_hashed_db"
18226 }
18227
18228 test "x/opt" != "x$prefix" && \
18229 test -d "/opt" && \
18230 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18231         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
18232         test -d /opt/include &&          cf_search="$cf_search /opt/include"
18233         test -d /opt/include/$with_hashed_db &&       cf_search="$cf_search /opt/include/$with_hashed_db"
18234         test -d /opt/include/$with_hashed_db/include &&    cf_search="$cf_search /opt/include/$with_hashed_db/include"
18235         test -d /opt/$with_hashed_db/include &&       cf_search="$cf_search /opt/$with_hashed_db/include"
18236         test -d /opt/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/include/$with_hashed_db"
18237 }
18238
18239 test "x$HOME" != "x$prefix" && \
18240 test -d "$HOME" && \
18241 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18242         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
18243         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
18244         test -d $HOME/include/$with_hashed_db &&       cf_search="$cf_search $HOME/include/$with_hashed_db"
18245         test -d $HOME/include/$with_hashed_db/include &&    cf_search="$cf_search $HOME/include/$with_hashed_db/include"
18246         test -d $HOME/$with_hashed_db/include &&       cf_search="$cf_search $HOME/$with_hashed_db/include"
18247         test -d $HOME/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/include/$with_hashed_db"
18248 }
18249
18250         for cf_item in $cf_search
18251         do
18252                 case $cf_item in #(vi
18253                 */$with_hashed_db)
18254
18255 if test -n "$cf_item" ; then
18256   for cf_add_incdir in $cf_item
18257   do
18258         while test $cf_add_incdir != /usr/include
18259         do
18260           if test -d $cf_add_incdir
18261           then
18262                 cf_have_incdir=no
18263                 if test -n "$CFLAGS$CPPFLAGS" ; then
18264                   # a loop is needed to ensure we can add subdirs of existing dirs
18265                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18266                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18267                           cf_have_incdir=yes; break
18268                         fi
18269                   done
18270                 fi
18271
18272                 if test "$cf_have_incdir" = no ; then
18273                   if test "$cf_add_incdir" = /usr/local/include ; then
18274                         if test "$GCC" = yes
18275                         then
18276                           cf_save_CPPFLAGS=$CPPFLAGS
18277                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18278                           cat >conftest.$ac_ext <<_ACEOF
18279 #line 18279 "configure"
18280 #include "confdefs.h"
18281 #include <stdio.h>
18282 int
18283 main ()
18284 {
18285 printf("Hello")
18286   ;
18287   return 0;
18288 }
18289 _ACEOF
18290 rm -f conftest.$ac_objext
18291 if { (eval echo "$as_me:18291: \"$ac_compile\"") >&5
18292   (eval $ac_compile) 2>&5
18293   ac_status=$?
18294   echo "$as_me:18294: \$? = $ac_status" >&5
18295   (exit $ac_status); } &&
18296          { ac_try='test -s conftest.$ac_objext'
18297   { (eval echo "$as_me:18297: \"$ac_try\"") >&5
18298   (eval $ac_try) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit $ac_status); }; }; then
18302   :
18303 else
18304   echo "$as_me: failed program was:" >&5
18305 cat conftest.$ac_ext >&5
18306 cf_have_incdir=yes
18307 fi
18308 rm -f conftest.$ac_objext conftest.$ac_ext
18309                           CPPFLAGS=$cf_save_CPPFLAGS
18310                         fi
18311                   fi
18312                 fi
18313
18314                 if test "$cf_have_incdir" = no ; then
18315                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18316
18317 echo "${as_me:-configure}:18317: testing adding $cf_add_incdir to include-path ..." 1>&5
18318
18319                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18320
18321                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18322                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18323                   cf_add_incdir="$cf_top_incdir"
18324                 else
18325                   break
18326                 fi
18327           fi
18328         done
18329   done
18330 fi
18331
18332                         ;;
18333                 esac
18334         done
18335
18336 cf_search=
18337
18338 test "x/usr" != "x$prefix" && \
18339 test -d "/usr" && \
18340 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18341         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
18342         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
18343         test -d /usr/lib/$with_hashed_db &&       cf_search="$cf_search /usr/lib/$with_hashed_db"
18344         test -d /usr/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/lib/$with_hashed_db/lib"
18345         test -d /usr/$with_hashed_db/lib &&       cf_search="$cf_search /usr/$with_hashed_db/lib"
18346         test -d /usr/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/lib/$with_hashed_db"
18347 }
18348
18349 test "x$prefix" != "xNONE" && \
18350 test -d "$prefix" && \
18351  {
18352         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18353         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18354         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18355         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18356         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18357         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18358 }
18359
18360 test "x/usr/local" != "x$prefix" && \
18361 test -d "/usr/local" && \
18362 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18363         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
18364         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
18365         test -d /usr/local/lib/$with_hashed_db &&       cf_search="$cf_search /usr/local/lib/$with_hashed_db"
18366         test -d /usr/local/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/local/lib/$with_hashed_db/lib"
18367         test -d /usr/local/$with_hashed_db/lib &&       cf_search="$cf_search /usr/local/$with_hashed_db/lib"
18368         test -d /usr/local/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/lib/$with_hashed_db"
18369 }
18370
18371 test "x/opt" != "x$prefix" && \
18372 test -d "/opt" && \
18373 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18374         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
18375         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
18376         test -d /opt/lib/$with_hashed_db &&       cf_search="$cf_search /opt/lib/$with_hashed_db"
18377         test -d /opt/lib/$with_hashed_db/lib &&    cf_search="$cf_search /opt/lib/$with_hashed_db/lib"
18378         test -d /opt/$with_hashed_db/lib &&       cf_search="$cf_search /opt/$with_hashed_db/lib"
18379         test -d /opt/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/lib/$with_hashed_db"
18380 }
18381
18382 test "x$HOME" != "x$prefix" && \
18383 test -d "$HOME" && \
18384 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18385         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
18386         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
18387         test -d $HOME/lib/$with_hashed_db &&       cf_search="$cf_search $HOME/lib/$with_hashed_db"
18388         test -d $HOME/lib/$with_hashed_db/lib &&    cf_search="$cf_search $HOME/lib/$with_hashed_db/lib"
18389         test -d $HOME/$with_hashed_db/lib &&       cf_search="$cf_search $HOME/$with_hashed_db/lib"
18390         test -d $HOME/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/lib/$with_hashed_db"
18391 }
18392
18393         for cf_item in $cf_search
18394         do
18395                 case $cf_item in #(vi
18396                 */$with_hashed_db)
18397
18398 if test -n "$cf_item" ; then
18399   for cf_add_libdir in $cf_item
18400   do
18401     if test $cf_add_libdir = /usr/lib ; then
18402       :
18403     elif test -d $cf_add_libdir
18404     then
18405       cf_have_libdir=no
18406       if test -n "$LDFLAGS$LIBS" ; then
18407         # a loop is needed to ensure we can add subdirs of existing dirs
18408         for cf_test_libdir in $LDFLAGS $LIBS ; do
18409           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18410             cf_have_libdir=yes; break
18411           fi
18412         done
18413       fi
18414       if test "$cf_have_libdir" = no ; then
18415         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18416
18417 echo "${as_me:-configure}:18417: testing adding $cf_add_libdir to library-path ..." 1>&5
18418
18419         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18420       fi
18421     fi
18422   done
18423 fi
18424
18425                         ;;
18426                 esac
18427         done
18428
18429                         ;;
18430                 esac
18431     fi
18432 esac
18433
18434 echo "$as_me:18434: checking for db.h" >&5
18435 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18436 if test "${ac_cv_header_db_h+set}" = set; then
18437   echo $ECHO_N "(cached) $ECHO_C" >&6
18438 else
18439   cat >conftest.$ac_ext <<_ACEOF
18440 #line 18440 "configure"
18441 #include "confdefs.h"
18442 #include <db.h>
18443 _ACEOF
18444 if { (eval echo "$as_me:18444: \"$ac_cpp conftest.$ac_ext\"") >&5
18445   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18446   ac_status=$?
18447   egrep -v '^ *\+' conftest.er1 >conftest.err
18448   rm -f conftest.er1
18449   cat conftest.err >&5
18450   echo "$as_me:18450: \$? = $ac_status" >&5
18451   (exit $ac_status); } >/dev/null; then
18452   if test -s conftest.err; then
18453     ac_cpp_err=$ac_c_preproc_warn_flag
18454   else
18455     ac_cpp_err=
18456   fi
18457 else
18458   ac_cpp_err=yes
18459 fi
18460 if test -z "$ac_cpp_err"; then
18461   ac_cv_header_db_h=yes
18462 else
18463   echo "$as_me: failed program was:" >&5
18464   cat conftest.$ac_ext >&5
18465   ac_cv_header_db_h=no
18466 fi
18467 rm -f conftest.err conftest.$ac_ext
18468 fi
18469 echo "$as_me:18469: result: $ac_cv_header_db_h" >&5
18470 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18471 if test $ac_cv_header_db_h = yes; then
18472
18473 echo "$as_me:18473: checking for version of db" >&5
18474 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18475 if test "${cf_cv_hashed_db_version+set}" = set; then
18476   echo $ECHO_N "(cached) $ECHO_C" >&6
18477 else
18478
18479 cf_cv_hashed_db_version=unknown
18480
18481 for cf_db_version in 1 2 3 4 5 6
18482 do
18483
18484 echo "${as_me:-configure}:18484: testing checking for db version $cf_db_version ..." 1>&5
18485
18486         cat >conftest.$ac_ext <<_ACEOF
18487 #line 18487 "configure"
18488 #include "confdefs.h"
18489
18490 $ac_includes_default
18491 #include <db.h>
18492
18493 #ifdef DB_VERSION_MAJOR
18494         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18495 #if $cf_db_version == DB_VERSION_MAJOR
18496         /* ok */
18497 #else
18498         make an error
18499 #endif
18500 #else
18501 #if $cf_db_version == 1
18502         /* ok: assuming this is DB 1.8.5 */
18503 #else
18504         make an error
18505 #endif
18506 #endif
18507
18508 int
18509 main ()
18510 {
18511 DBT *foo = 0
18512   ;
18513   return 0;
18514 }
18515 _ACEOF
18516 rm -f conftest.$ac_objext
18517 if { (eval echo "$as_me:18517: \"$ac_compile\"") >&5
18518   (eval $ac_compile) 2>&5
18519   ac_status=$?
18520   echo "$as_me:18520: \$? = $ac_status" >&5
18521   (exit $ac_status); } &&
18522          { ac_try='test -s conftest.$ac_objext'
18523   { (eval echo "$as_me:18523: \"$ac_try\"") >&5
18524   (eval $ac_try) 2>&5
18525   ac_status=$?
18526   echo "$as_me:18526: \$? = $ac_status" >&5
18527   (exit $ac_status); }; }; then
18528
18529         cf_cv_hashed_db_version=$cf_db_version
18530         break
18531
18532 else
18533   echo "$as_me: failed program was:" >&5
18534 cat conftest.$ac_ext >&5
18535 fi
18536 rm -f conftest.$ac_objext conftest.$ac_ext
18537 done
18538
18539 fi
18540 echo "$as_me:18540: result: $cf_cv_hashed_db_version" >&5
18541 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18542
18543 if test "$cf_cv_hashed_db_version" = unknown ; then
18544         { { echo "$as_me:18544: error: Cannot determine version of db" >&5
18545 echo "$as_me: error: Cannot determine version of db" >&2;}
18546    { (exit 1); exit 1; }; }
18547 else
18548
18549 echo "$as_me:18549: checking for db libraries" >&5
18550 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18551 if test "${cf_cv_hashed_db_libs+set}" = set; then
18552   echo $ECHO_N "(cached) $ECHO_C" >&6
18553 else
18554
18555 cf_cv_hashed_db_libs=unknown
18556 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18557 do
18558         cf_save_libs="$LIBS"
18559         if test -n "$cf_db_libs"; then
18560
18561 cf_add_libs="-l$cf_db_libs"
18562 # Filter out duplicates - this happens with badly-designed ".pc" files...
18563 for cf_add_1lib in $LIBS
18564 do
18565         for cf_add_2lib in $cf_add_libs
18566         do
18567                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18568                 then
18569                         cf_add_1lib=
18570                         break
18571                 fi
18572         done
18573         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18574 done
18575 LIBS="$cf_add_libs"
18576
18577         fi
18578
18579 echo "${as_me:-configure}:18579: testing checking for library "$cf_db_libs" ..." 1>&5
18580
18581         cat >conftest.$ac_ext <<_ACEOF
18582 #line 18582 "configure"
18583 #include "confdefs.h"
18584
18585 $ac_includes_default
18586 #include <db.h>
18587
18588 int
18589 main ()
18590 {
18591
18592         char *path = "/tmp/foo";
18593 #ifdef DB_VERSION_MAJOR
18594 #if DB_VERSION_MAJOR >= 4
18595         DB *result = 0;
18596         db_create(&result, NULL, 0);
18597         result->open(result,
18598                 NULL,
18599                 path,
18600                 path,
18601                 DB_HASH,
18602                 DB_CREATE,
18603                 0644);
18604 #elif DB_VERSION_MAJOR >= 3
18605         DB *result = 0;
18606         db_create(&result, NULL, 0);
18607         result->open(result,
18608                 path,
18609                 path,
18610                 DB_HASH,
18611                 DB_CREATE,
18612                 0644);
18613 #elif DB_VERSION_MAJOR >= 2
18614         DB *result = 0;
18615         db_open(path,
18616                 DB_HASH,
18617                 DB_CREATE,
18618                 0644,
18619                 (DB_ENV *) 0,
18620                 (DB_INFO *) 0,
18621                 &result);
18622 #endif /* DB_VERSION_MAJOR */
18623 #else
18624         DB *result = dbopen(path,
18625                      2,
18626                      0644,
18627                      DB_HASH,
18628                      0);
18629 #endif
18630         ${cf_cv_main_return:-return}(result != 0)
18631
18632   ;
18633   return 0;
18634 }
18635 _ACEOF
18636 rm -f conftest.$ac_objext conftest$ac_exeext
18637 if { (eval echo "$as_me:18637: \"$ac_link\"") >&5
18638   (eval $ac_link) 2>&5
18639   ac_status=$?
18640   echo "$as_me:18640: \$? = $ac_status" >&5
18641   (exit $ac_status); } &&
18642          { ac_try='test -s conftest$ac_exeext'
18643   { (eval echo "$as_me:18643: \"$ac_try\"") >&5
18644   (eval $ac_try) 2>&5
18645   ac_status=$?
18646   echo "$as_me:18646: \$? = $ac_status" >&5
18647   (exit $ac_status); }; }; then
18648
18649         if test -n "$cf_db_libs" ; then
18650                 cf_cv_hashed_db_libs=$cf_db_libs
18651         else
18652                 cf_cv_hashed_db_libs=default
18653         fi
18654         LIBS="$cf_save_libs"
18655         break
18656
18657 else
18658   echo "$as_me: failed program was:" >&5
18659 cat conftest.$ac_ext >&5
18660 fi
18661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18662         LIBS="$cf_save_libs"
18663 done
18664
18665 fi
18666 echo "$as_me:18666: result: $cf_cv_hashed_db_libs" >&5
18667 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18668
18669         if test "$cf_cv_hashed_db_libs" = unknown ; then
18670                 { { echo "$as_me:18670: error: Cannot determine library for db" >&5
18671 echo "$as_me: error: Cannot determine library for db" >&2;}
18672    { (exit 1); exit 1; }; }
18673         elif test "$cf_cv_hashed_db_libs" != default ; then
18674
18675 cf_add_libs="-l$cf_cv_hashed_db_libs"
18676 # Filter out duplicates - this happens with badly-designed ".pc" files...
18677 for cf_add_1lib in $LIBS
18678 do
18679         for cf_add_2lib in $cf_add_libs
18680         do
18681                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18682                 then
18683                         cf_add_1lib=
18684                         break
18685                 fi
18686         done
18687         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18688 done
18689 LIBS="$cf_add_libs"
18690
18691         fi
18692 fi
18693
18694 else
18695
18696         { { echo "$as_me:18696: error: Cannot find db.h" >&5
18697 echo "$as_me: error: Cannot find db.h" >&2;}
18698    { (exit 1); exit 1; }; }
18699
18700 fi
18701
18702 fi
18703
18704 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18705         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18706         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18707 fi
18708
18709 # Just in case, check if the C compiler has a bool type.
18710
18711 echo "$as_me:18711: checking if we should include stdbool.h" >&5
18712 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18713
18714 if test "${cf_cv_header_stdbool_h+set}" = set; then
18715   echo $ECHO_N "(cached) $ECHO_C" >&6
18716 else
18717
18718         cat >conftest.$ac_ext <<_ACEOF
18719 #line 18719 "configure"
18720 #include "confdefs.h"
18721
18722 int
18723 main ()
18724 {
18725 bool foo = false
18726   ;
18727   return 0;
18728 }
18729 _ACEOF
18730 rm -f conftest.$ac_objext
18731 if { (eval echo "$as_me:18731: \"$ac_compile\"") >&5
18732   (eval $ac_compile) 2>&5
18733   ac_status=$?
18734   echo "$as_me:18734: \$? = $ac_status" >&5
18735   (exit $ac_status); } &&
18736          { ac_try='test -s conftest.$ac_objext'
18737   { (eval echo "$as_me:18737: \"$ac_try\"") >&5
18738   (eval $ac_try) 2>&5
18739   ac_status=$?
18740   echo "$as_me:18740: \$? = $ac_status" >&5
18741   (exit $ac_status); }; }; then
18742   cf_cv_header_stdbool_h=0
18743 else
18744   echo "$as_me: failed program was:" >&5
18745 cat conftest.$ac_ext >&5
18746 cat >conftest.$ac_ext <<_ACEOF
18747 #line 18747 "configure"
18748 #include "confdefs.h"
18749
18750 #ifndef __BEOS__
18751 #include <stdbool.h>
18752 #endif
18753
18754 int
18755 main ()
18756 {
18757 bool foo = false
18758   ;
18759   return 0;
18760 }
18761 _ACEOF
18762 rm -f conftest.$ac_objext
18763 if { (eval echo "$as_me:18763: \"$ac_compile\"") >&5
18764   (eval $ac_compile) 2>&5
18765   ac_status=$?
18766   echo "$as_me:18766: \$? = $ac_status" >&5
18767   (exit $ac_status); } &&
18768          { ac_try='test -s conftest.$ac_objext'
18769   { (eval echo "$as_me:18769: \"$ac_try\"") >&5
18770   (eval $ac_try) 2>&5
18771   ac_status=$?
18772   echo "$as_me:18772: \$? = $ac_status" >&5
18773   (exit $ac_status); }; }; then
18774   cf_cv_header_stdbool_h=1
18775 else
18776   echo "$as_me: failed program was:" >&5
18777 cat conftest.$ac_ext >&5
18778 cf_cv_header_stdbool_h=0
18779 fi
18780 rm -f conftest.$ac_objext conftest.$ac_ext
18781 fi
18782 rm -f conftest.$ac_objext conftest.$ac_ext
18783 fi
18784
18785 if test "$cf_cv_header_stdbool_h" = 1
18786 then    echo "$as_me:18786: result: yes" >&5
18787 echo "${ECHO_T}yes" >&6
18788 else    echo "$as_me:18788: result: no" >&5
18789 echo "${ECHO_T}no" >&6
18790 fi
18791
18792 echo "$as_me:18792: checking for builtin bool type" >&5
18793 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18794
18795 if test "${cf_cv_cc_bool_type+set}" = set; then
18796   echo $ECHO_N "(cached) $ECHO_C" >&6
18797 else
18798
18799         cat >conftest.$ac_ext <<_ACEOF
18800 #line 18800 "configure"
18801 #include "confdefs.h"
18802
18803 #include <stdio.h>
18804 #include <sys/types.h>
18805
18806 int
18807 main ()
18808 {
18809 bool x = false
18810   ;
18811   return 0;
18812 }
18813 _ACEOF
18814 rm -f conftest.$ac_objext
18815 if { (eval echo "$as_me:18815: \"$ac_compile\"") >&5
18816   (eval $ac_compile) 2>&5
18817   ac_status=$?
18818   echo "$as_me:18818: \$? = $ac_status" >&5
18819   (exit $ac_status); } &&
18820          { ac_try='test -s conftest.$ac_objext'
18821   { (eval echo "$as_me:18821: \"$ac_try\"") >&5
18822   (eval $ac_try) 2>&5
18823   ac_status=$?
18824   echo "$as_me:18824: \$? = $ac_status" >&5
18825   (exit $ac_status); }; }; then
18826   cf_cv_cc_bool_type=1
18827 else
18828   echo "$as_me: failed program was:" >&5
18829 cat conftest.$ac_ext >&5
18830 cf_cv_cc_bool_type=0
18831 fi
18832 rm -f conftest.$ac_objext conftest.$ac_ext
18833
18834 fi
18835
18836 if test "$cf_cv_cc_bool_type" = 1
18837 then    echo "$as_me:18837: result: yes" >&5
18838 echo "${ECHO_T}yes" >&6
18839 else    echo "$as_me:18839: result: no" >&5
18840 echo "${ECHO_T}no" >&6
18841 fi
18842
18843 # Check for C++ compiler characteristics (and ensure that it's there!)
18844 if test -n "$CXX" ; then
18845         ac_ext=cc
18846 ac_cpp='$CXXCPP $CPPFLAGS'
18847 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18848 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18849 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18850 ac_main_return=return
18851
18852 if test -n "$GXX" ; then
18853 case $cf_cv_system_name in #(vi
18854 os2*) #(vi
18855         cf_stdcpp_libname=stdcpp
18856         ;;
18857 *)
18858         cf_stdcpp_libname=stdc++
18859         ;;
18860 esac
18861 echo "$as_me:18861: checking for library $cf_stdcpp_libname" >&5
18862 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18863 if test "${cf_cv_libstdcpp+set}" = set; then
18864   echo $ECHO_N "(cached) $ECHO_C" >&6
18865 else
18866
18867         cf_save="$LIBS"
18868
18869 cf_add_libs="-l$cf_stdcpp_libname"
18870 # Filter out duplicates - this happens with badly-designed ".pc" files...
18871 for cf_add_1lib in $LIBS
18872 do
18873         for cf_add_2lib in $cf_add_libs
18874         do
18875                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18876                 then
18877                         cf_add_1lib=
18878                         break
18879                 fi
18880         done
18881         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18882 done
18883 LIBS="$cf_add_libs"
18884
18885 cat >conftest.$ac_ext <<_ACEOF
18886 #line 18886 "configure"
18887 #include "confdefs.h"
18888
18889 #include <strstream.h>
18890 int
18891 main ()
18892 {
18893
18894 char buf[80];
18895 strstreambuf foo(buf, sizeof(buf))
18896
18897   ;
18898   return 0;
18899 }
18900 _ACEOF
18901 rm -f conftest.$ac_objext conftest$ac_exeext
18902 if { (eval echo "$as_me:18902: \"$ac_link\"") >&5
18903   (eval $ac_link) 2>&5
18904   ac_status=$?
18905   echo "$as_me:18905: \$? = $ac_status" >&5
18906   (exit $ac_status); } &&
18907          { ac_try='test -s conftest$ac_exeext'
18908   { (eval echo "$as_me:18908: \"$ac_try\"") >&5
18909   (eval $ac_try) 2>&5
18910   ac_status=$?
18911   echo "$as_me:18911: \$? = $ac_status" >&5
18912   (exit $ac_status); }; }; then
18913   cf_cv_libstdcpp=yes
18914 else
18915   echo "$as_me: failed program was:" >&5
18916 cat conftest.$ac_ext >&5
18917 cf_cv_libstdcpp=no
18918 fi
18919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18920         LIBS="$cf_save"
18921
18922 fi
18923 echo "$as_me:18923: result: $cf_cv_libstdcpp" >&5
18924 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18925 test "$cf_cv_libstdcpp" = yes &&
18926 cf_add_libs="-l$cf_stdcpp_libname"
18927 # Filter out duplicates - this happens with badly-designed ".pc" files...
18928 for cf_add_1lib in $CXXLIBS
18929 do
18930         for cf_add_2lib in $cf_add_libs
18931         do
18932                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18933                 then
18934                         cf_add_1lib=
18935                         break
18936                 fi
18937         done
18938         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18939 done
18940 CXXLIBS="$cf_add_libs"
18941
18942 fi
18943
18944         echo "$as_me:18944: checking whether $CXX understands -c and -o together" >&5
18945 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18946 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18947   echo $ECHO_N "(cached) $ECHO_C" >&6
18948 else
18949
18950 cat > conftest.$ac_ext <<CF_EOF
18951 #include <stdio.h>
18952 int main()
18953 {
18954         ${cf_cv_main_return:-return}(0);
18955 }
18956 CF_EOF
18957 # We do the test twice because some compilers refuse to overwrite an
18958 # existing .o file with -o, though they will create one.
18959 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18960 if { (eval echo "$as_me:18960: \"$ac_try\"") >&5
18961   (eval $ac_try) 2>&5
18962   ac_status=$?
18963   echo "$as_me:18963: \$? = $ac_status" >&5
18964   (exit $ac_status); } &&
18965   test -f conftest2.$ac_objext && { (eval echo "$as_me:18965: \"$ac_try\"") >&5
18966   (eval $ac_try) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit $ac_status); };
18970 then
18971   eval cf_cv_prog_CXX_c_o=yes
18972 else
18973   eval cf_cv_prog_CXX_c_o=no
18974 fi
18975 rm -rf conftest*
18976
18977 fi
18978 if test $cf_cv_prog_CXX_c_o = yes; then
18979   echo "$as_me:18979: result: yes" >&5
18980 echo "${ECHO_T}yes" >&6
18981 else
18982   echo "$as_me:18982: result: no" >&5
18983 echo "${ECHO_T}no" >&6
18984 fi
18985
18986         case $GXX_VERSION in
18987         1*|2.0-6*)
18988                 cf_cxx_library=yes
18989                 ;;
18990         *-2.7*|2.7*)
18991
18992 cf_cxx_library=unknown
18993 case $cf_cv_system_name in #(vi
18994 os2*) #(vi
18995         cf_gpp_libname=gpp
18996         ;;
18997 *)
18998         cf_gpp_libname=g++
18999         ;;
19000 esac
19001 if test "$GXX" = yes; then
19002         echo "$as_me:19002: checking for lib$cf_gpp_libname" >&5
19003 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19004         cf_save="$LIBS"
19005
19006 cf_add_libs="-l$cf_gpp_libname"
19007 # Filter out duplicates - this happens with badly-designed ".pc" files...
19008 for cf_add_1lib in $LIBS
19009 do
19010         for cf_add_2lib in $cf_add_libs
19011         do
19012                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19013                 then
19014                         cf_add_1lib=
19015                         break
19016                 fi
19017         done
19018         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19019 done
19020 LIBS="$cf_add_libs"
19021
19022         cat >conftest.$ac_ext <<_ACEOF
19023 #line 19023 "configure"
19024 #include "confdefs.h"
19025
19026 #include <$cf_gpp_libname/builtin.h>
19027
19028 int
19029 main ()
19030 {
19031 two_arg_error_handler_t foo2 = lib_error_handler
19032   ;
19033   return 0;
19034 }
19035 _ACEOF
19036 rm -f conftest.$ac_objext conftest$ac_exeext
19037 if { (eval echo "$as_me:19037: \"$ac_link\"") >&5
19038   (eval $ac_link) 2>&5
19039   ac_status=$?
19040   echo "$as_me:19040: \$? = $ac_status" >&5
19041   (exit $ac_status); } &&
19042          { ac_try='test -s conftest$ac_exeext'
19043   { (eval echo "$as_me:19043: \"$ac_try\"") >&5
19044   (eval $ac_try) 2>&5
19045   ac_status=$?
19046   echo "$as_me:19046: \$? = $ac_status" >&5
19047   (exit $ac_status); }; }; then
19048   cf_cxx_library=yes
19049
19050 cf_add_libs="-l$cf_gpp_libname"
19051 # Filter out duplicates - this happens with badly-designed ".pc" files...
19052 for cf_add_1lib in $CXXLIBS
19053 do
19054         for cf_add_2lib in $cf_add_libs
19055         do
19056                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19057                 then
19058                         cf_add_1lib=
19059                         break
19060                 fi
19061         done
19062         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19063 done
19064 CXXLIBS="$cf_add_libs"
19065
19066          if test "$cf_gpp_libname" = cpp ; then
19067
19068 cat >>confdefs.h <<\EOF
19069 #define HAVE_GPP_BUILTIN_H 1
19070 EOF
19071
19072          else
19073
19074 cat >>confdefs.h <<\EOF
19075 #define HAVE_GXX_BUILTIN_H 1
19076 EOF
19077
19078          fi
19079 else
19080   echo "$as_me: failed program was:" >&5
19081 cat conftest.$ac_ext >&5
19082 cat >conftest.$ac_ext <<_ACEOF
19083 #line 19083 "configure"
19084 #include "confdefs.h"
19085
19086 #include <builtin.h>
19087
19088 int
19089 main ()
19090 {
19091 two_arg_error_handler_t foo2 = lib_error_handler
19092   ;
19093   return 0;
19094 }
19095 _ACEOF
19096 rm -f conftest.$ac_objext conftest$ac_exeext
19097 if { (eval echo "$as_me:19097: \"$ac_link\"") >&5
19098   (eval $ac_link) 2>&5
19099   ac_status=$?
19100   echo "$as_me:19100: \$? = $ac_status" >&5
19101   (exit $ac_status); } &&
19102          { ac_try='test -s conftest$ac_exeext'
19103   { (eval echo "$as_me:19103: \"$ac_try\"") >&5
19104   (eval $ac_try) 2>&5
19105   ac_status=$?
19106   echo "$as_me:19106: \$? = $ac_status" >&5
19107   (exit $ac_status); }; }; then
19108   cf_cxx_library=yes
19109
19110 cf_add_libs="-l$cf_gpp_libname"
19111 # Filter out duplicates - this happens with badly-designed ".pc" files...
19112 for cf_add_1lib in $CXXLIBS
19113 do
19114         for cf_add_2lib in $cf_add_libs
19115         do
19116                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19117                 then
19118                         cf_add_1lib=
19119                         break
19120                 fi
19121         done
19122         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19123 done
19124 CXXLIBS="$cf_add_libs"
19125
19126 cat >>confdefs.h <<\EOF
19127 #define HAVE_BUILTIN_H 1
19128 EOF
19129
19130 else
19131   echo "$as_me: failed program was:" >&5
19132 cat conftest.$ac_ext >&5
19133 cf_cxx_library=no
19134 fi
19135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19136 fi
19137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19138         LIBS="$cf_save"
19139         echo "$as_me:19139: result: $cf_cxx_library" >&5
19140 echo "${ECHO_T}$cf_cxx_library" >&6
19141 fi
19142
19143                 ;;
19144         *)
19145                 cf_cxx_library=no
19146                 ;;
19147         esac
19148
19149         ac_ext=cc
19150 ac_cpp='$CXXCPP $CPPFLAGS'
19151 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19152 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19153 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19154 ac_main_return=return
19155 echo "$as_me:19155: checking how to run the C++ preprocessor" >&5
19156 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19157 if test -z "$CXXCPP"; then
19158   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19159   echo $ECHO_N "(cached) $ECHO_C" >&6
19160 else
19161       # Double quotes because CXXCPP needs to be expanded
19162     for CXXCPP in "$CXX -E" "/lib/cpp"
19163     do
19164       ac_preproc_ok=false
19165 for ac_cxx_preproc_warn_flag in '' yes
19166 do
19167   # Use a header file that comes with gcc, so configuring glibc
19168   # with a fresh cross-compiler works.
19169   # On the NeXT, cc -E runs the code through the compiler's parser,
19170   # not just through cpp. "Syntax error" is here to catch this case.
19171   cat >conftest.$ac_ext <<_ACEOF
19172 #line 19172 "configure"
19173 #include "confdefs.h"
19174 #include <assert.h>
19175                      Syntax error
19176 _ACEOF
19177 if { (eval echo "$as_me:19177: \"$ac_cpp conftest.$ac_ext\"") >&5
19178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19179   ac_status=$?
19180   egrep -v '^ *\+' conftest.er1 >conftest.err
19181   rm -f conftest.er1
19182   cat conftest.err >&5
19183   echo "$as_me:19183: \$? = $ac_status" >&5
19184   (exit $ac_status); } >/dev/null; then
19185   if test -s conftest.err; then
19186     ac_cpp_err=$ac_cxx_preproc_warn_flag
19187   else
19188     ac_cpp_err=
19189   fi
19190 else
19191   ac_cpp_err=yes
19192 fi
19193 if test -z "$ac_cpp_err"; then
19194   :
19195 else
19196   echo "$as_me: failed program was:" >&5
19197   cat conftest.$ac_ext >&5
19198   # Broken: fails on valid input.
19199 continue
19200 fi
19201 rm -f conftest.err conftest.$ac_ext
19202
19203   # OK, works on sane cases.  Now check whether non-existent headers
19204   # can be detected and how.
19205   cat >conftest.$ac_ext <<_ACEOF
19206 #line 19206 "configure"
19207 #include "confdefs.h"
19208 #include <ac_nonexistent.h>
19209 _ACEOF
19210 if { (eval echo "$as_me:19210: \"$ac_cpp conftest.$ac_ext\"") >&5
19211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19212   ac_status=$?
19213   egrep -v '^ *\+' conftest.er1 >conftest.err
19214   rm -f conftest.er1
19215   cat conftest.err >&5
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit $ac_status); } >/dev/null; then
19218   if test -s conftest.err; then
19219     ac_cpp_err=$ac_cxx_preproc_warn_flag
19220   else
19221     ac_cpp_err=
19222   fi
19223 else
19224   ac_cpp_err=yes
19225 fi
19226 if test -z "$ac_cpp_err"; then
19227   # Broken: success on invalid input.
19228 continue
19229 else
19230   echo "$as_me: failed program was:" >&5
19231   cat conftest.$ac_ext >&5
19232   # Passes both tests.
19233 ac_preproc_ok=:
19234 break
19235 fi
19236 rm -f conftest.err conftest.$ac_ext
19237
19238 done
19239 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19240 rm -f conftest.err conftest.$ac_ext
19241 if $ac_preproc_ok; then
19242   break
19243 fi
19244
19245     done
19246     ac_cv_prog_CXXCPP=$CXXCPP
19247
19248 fi
19249   CXXCPP=$ac_cv_prog_CXXCPP
19250 else
19251   ac_cv_prog_CXXCPP=$CXXCPP
19252 fi
19253 echo "$as_me:19253: result: $CXXCPP" >&5
19254 echo "${ECHO_T}$CXXCPP" >&6
19255 ac_preproc_ok=false
19256 for ac_cxx_preproc_warn_flag in '' yes
19257 do
19258   # Use a header file that comes with gcc, so configuring glibc
19259   # with a fresh cross-compiler works.
19260   # On the NeXT, cc -E runs the code through the compiler's parser,
19261   # not just through cpp. "Syntax error" is here to catch this case.
19262   cat >conftest.$ac_ext <<_ACEOF
19263 #line 19263 "configure"
19264 #include "confdefs.h"
19265 #include <assert.h>
19266                      Syntax error
19267 _ACEOF
19268 if { (eval echo "$as_me:19268: \"$ac_cpp conftest.$ac_ext\"") >&5
19269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19270   ac_status=$?
19271   egrep -v '^ *\+' conftest.er1 >conftest.err
19272   rm -f conftest.er1
19273   cat conftest.err >&5
19274   echo "$as_me:19274: \$? = $ac_status" >&5
19275   (exit $ac_status); } >/dev/null; then
19276   if test -s conftest.err; then
19277     ac_cpp_err=$ac_cxx_preproc_warn_flag
19278   else
19279     ac_cpp_err=
19280   fi
19281 else
19282   ac_cpp_err=yes
19283 fi
19284 if test -z "$ac_cpp_err"; then
19285   :
19286 else
19287   echo "$as_me: failed program was:" >&5
19288   cat conftest.$ac_ext >&5
19289   # Broken: fails on valid input.
19290 continue
19291 fi
19292 rm -f conftest.err conftest.$ac_ext
19293
19294   # OK, works on sane cases.  Now check whether non-existent headers
19295   # can be detected and how.
19296   cat >conftest.$ac_ext <<_ACEOF
19297 #line 19297 "configure"
19298 #include "confdefs.h"
19299 #include <ac_nonexistent.h>
19300 _ACEOF
19301 if { (eval echo "$as_me:19301: \"$ac_cpp conftest.$ac_ext\"") >&5
19302   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19303   ac_status=$?
19304   egrep -v '^ *\+' conftest.er1 >conftest.err
19305   rm -f conftest.er1
19306   cat conftest.err >&5
19307   echo "$as_me:19307: \$? = $ac_status" >&5
19308   (exit $ac_status); } >/dev/null; then
19309   if test -s conftest.err; then
19310     ac_cpp_err=$ac_cxx_preproc_warn_flag
19311   else
19312     ac_cpp_err=
19313   fi
19314 else
19315   ac_cpp_err=yes
19316 fi
19317 if test -z "$ac_cpp_err"; then
19318   # Broken: success on invalid input.
19319 continue
19320 else
19321   echo "$as_me: failed program was:" >&5
19322   cat conftest.$ac_ext >&5
19323   # Passes both tests.
19324 ac_preproc_ok=:
19325 break
19326 fi
19327 rm -f conftest.err conftest.$ac_ext
19328
19329 done
19330 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19331 rm -f conftest.err conftest.$ac_ext
19332 if $ac_preproc_ok; then
19333   :
19334 else
19335   { { echo "$as_me:19335: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19336 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19337    { (exit 1); exit 1; }; }
19338 fi
19339
19340 ac_ext=cc
19341 ac_cpp='$CXXCPP $CPPFLAGS'
19342 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19343 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19344 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19345 ac_main_return=return
19346
19347 for ac_header in typeinfo
19348 do
19349 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19350 echo "$as_me:19350: checking for $ac_header" >&5
19351 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19352 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19353   echo $ECHO_N "(cached) $ECHO_C" >&6
19354 else
19355   cat >conftest.$ac_ext <<_ACEOF
19356 #line 19356 "configure"
19357 #include "confdefs.h"
19358 #include <$ac_header>
19359 _ACEOF
19360 if { (eval echo "$as_me:19360: \"$ac_cpp conftest.$ac_ext\"") >&5
19361   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19362   ac_status=$?
19363   egrep -v '^ *\+' conftest.er1 >conftest.err
19364   rm -f conftest.er1
19365   cat conftest.err >&5
19366   echo "$as_me:19366: \$? = $ac_status" >&5
19367   (exit $ac_status); } >/dev/null; then
19368   if test -s conftest.err; then
19369     ac_cpp_err=$ac_cxx_preproc_warn_flag
19370   else
19371     ac_cpp_err=
19372   fi
19373 else
19374   ac_cpp_err=yes
19375 fi
19376 if test -z "$ac_cpp_err"; then
19377   eval "$as_ac_Header=yes"
19378 else
19379   echo "$as_me: failed program was:" >&5
19380   cat conftest.$ac_ext >&5
19381   eval "$as_ac_Header=no"
19382 fi
19383 rm -f conftest.err conftest.$ac_ext
19384 fi
19385 echo "$as_me:19385: result: `eval echo '${'$as_ac_Header'}'`" >&5
19386 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19387 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19388   cat >>confdefs.h <<EOF
19389 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19390 EOF
19391
19392 fi
19393 done
19394
19395 for ac_header in iostream
19396 do
19397 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19398 echo "$as_me:19398: checking for $ac_header" >&5
19399 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19401   echo $ECHO_N "(cached) $ECHO_C" >&6
19402 else
19403   cat >conftest.$ac_ext <<_ACEOF
19404 #line 19404 "configure"
19405 #include "confdefs.h"
19406 #include <$ac_header>
19407 _ACEOF
19408 if { (eval echo "$as_me:19408: \"$ac_cpp conftest.$ac_ext\"") >&5
19409   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19410   ac_status=$?
19411   egrep -v '^ *\+' conftest.er1 >conftest.err
19412   rm -f conftest.er1
19413   cat conftest.err >&5
19414   echo "$as_me:19414: \$? = $ac_status" >&5
19415   (exit $ac_status); } >/dev/null; then
19416   if test -s conftest.err; then
19417     ac_cpp_err=$ac_cxx_preproc_warn_flag
19418   else
19419     ac_cpp_err=
19420   fi
19421 else
19422   ac_cpp_err=yes
19423 fi
19424 if test -z "$ac_cpp_err"; then
19425   eval "$as_ac_Header=yes"
19426 else
19427   echo "$as_me: failed program was:" >&5
19428   cat conftest.$ac_ext >&5
19429   eval "$as_ac_Header=no"
19430 fi
19431 rm -f conftest.err conftest.$ac_ext
19432 fi
19433 echo "$as_me:19433: result: `eval echo '${'$as_ac_Header'}'`" >&5
19434 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19435 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19436   cat >>confdefs.h <<EOF
19437 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19438 EOF
19439
19440 fi
19441 done
19442
19443 if test x"$ac_cv_header_iostream" = xyes ; then
19444         echo "$as_me:19444: checking if iostream uses std-namespace" >&5
19445 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19446         cat >conftest.$ac_ext <<_ACEOF
19447 #line 19447 "configure"
19448 #include "confdefs.h"
19449
19450 #include <iostream>
19451 using std::endl;
19452 using std::cerr;
19453 int
19454 main ()
19455 {
19456
19457 cerr << "testing" << endl;
19458
19459   ;
19460   return 0;
19461 }
19462 _ACEOF
19463 rm -f conftest.$ac_objext
19464 if { (eval echo "$as_me:19464: \"$ac_compile\"") >&5
19465   (eval $ac_compile) 2>&5
19466   ac_status=$?
19467   echo "$as_me:19467: \$? = $ac_status" >&5
19468   (exit $ac_status); } &&
19469          { ac_try='test -s conftest.$ac_objext'
19470   { (eval echo "$as_me:19470: \"$ac_try\"") >&5
19471   (eval $ac_try) 2>&5
19472   ac_status=$?
19473   echo "$as_me:19473: \$? = $ac_status" >&5
19474   (exit $ac_status); }; }; then
19475   cf_iostream_namespace=yes
19476 else
19477   echo "$as_me: failed program was:" >&5
19478 cat conftest.$ac_ext >&5
19479 cf_iostream_namespace=no
19480 fi
19481 rm -f conftest.$ac_objext conftest.$ac_ext
19482         echo "$as_me:19482: result: $cf_iostream_namespace" >&5
19483 echo "${ECHO_T}$cf_iostream_namespace" >&6
19484         if test "$cf_iostream_namespace" = yes ; then
19485
19486 cat >>confdefs.h <<\EOF
19487 #define IOSTREAM_NAMESPACE 1
19488 EOF
19489
19490         fi
19491 fi
19492
19493 echo "$as_me:19493: checking if we should include stdbool.h" >&5
19494 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19495
19496 if test "${cf_cv_header_stdbool_h+set}" = set; then
19497   echo $ECHO_N "(cached) $ECHO_C" >&6
19498 else
19499
19500         cat >conftest.$ac_ext <<_ACEOF
19501 #line 19501 "configure"
19502 #include "confdefs.h"
19503
19504 int
19505 main ()
19506 {
19507 bool foo = false
19508   ;
19509   return 0;
19510 }
19511 _ACEOF
19512 rm -f conftest.$ac_objext
19513 if { (eval echo "$as_me:19513: \"$ac_compile\"") >&5
19514   (eval $ac_compile) 2>&5
19515   ac_status=$?
19516   echo "$as_me:19516: \$? = $ac_status" >&5
19517   (exit $ac_status); } &&
19518          { ac_try='test -s conftest.$ac_objext'
19519   { (eval echo "$as_me:19519: \"$ac_try\"") >&5
19520   (eval $ac_try) 2>&5
19521   ac_status=$?
19522   echo "$as_me:19522: \$? = $ac_status" >&5
19523   (exit $ac_status); }; }; then
19524   cf_cv_header_stdbool_h=0
19525 else
19526   echo "$as_me: failed program was:" >&5
19527 cat conftest.$ac_ext >&5
19528 cat >conftest.$ac_ext <<_ACEOF
19529 #line 19529 "configure"
19530 #include "confdefs.h"
19531
19532 #ifndef __BEOS__
19533 #include <stdbool.h>
19534 #endif
19535
19536 int
19537 main ()
19538 {
19539 bool foo = false
19540   ;
19541   return 0;
19542 }
19543 _ACEOF
19544 rm -f conftest.$ac_objext
19545 if { (eval echo "$as_me:19545: \"$ac_compile\"") >&5
19546   (eval $ac_compile) 2>&5
19547   ac_status=$?
19548   echo "$as_me:19548: \$? = $ac_status" >&5
19549   (exit $ac_status); } &&
19550          { ac_try='test -s conftest.$ac_objext'
19551   { (eval echo "$as_me:19551: \"$ac_try\"") >&5
19552   (eval $ac_try) 2>&5
19553   ac_status=$?
19554   echo "$as_me:19554: \$? = $ac_status" >&5
19555   (exit $ac_status); }; }; then
19556   cf_cv_header_stdbool_h=1
19557 else
19558   echo "$as_me: failed program was:" >&5
19559 cat conftest.$ac_ext >&5
19560 cf_cv_header_stdbool_h=0
19561 fi
19562 rm -f conftest.$ac_objext conftest.$ac_ext
19563 fi
19564 rm -f conftest.$ac_objext conftest.$ac_ext
19565 fi
19566
19567 if test "$cf_cv_header_stdbool_h" = 1
19568 then    echo "$as_me:19568: result: yes" >&5
19569 echo "${ECHO_T}yes" >&6
19570 else    echo "$as_me:19570: result: no" >&5
19571 echo "${ECHO_T}no" >&6
19572 fi
19573
19574 echo "$as_me:19574: checking for builtin bool type" >&5
19575 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19576
19577 if test "${cf_cv_builtin_bool+set}" = set; then
19578   echo $ECHO_N "(cached) $ECHO_C" >&6
19579 else
19580
19581         cat >conftest.$ac_ext <<_ACEOF
19582 #line 19582 "configure"
19583 #include "confdefs.h"
19584
19585 #include <stdio.h>
19586 #include <sys/types.h>
19587
19588 int
19589 main ()
19590 {
19591 bool x = false
19592   ;
19593   return 0;
19594 }
19595 _ACEOF
19596 rm -f conftest.$ac_objext
19597 if { (eval echo "$as_me:19597: \"$ac_compile\"") >&5
19598   (eval $ac_compile) 2>&5
19599   ac_status=$?
19600   echo "$as_me:19600: \$? = $ac_status" >&5
19601   (exit $ac_status); } &&
19602          { ac_try='test -s conftest.$ac_objext'
19603   { (eval echo "$as_me:19603: \"$ac_try\"") >&5
19604   (eval $ac_try) 2>&5
19605   ac_status=$?
19606   echo "$as_me:19606: \$? = $ac_status" >&5
19607   (exit $ac_status); }; }; then
19608   cf_cv_builtin_bool=1
19609 else
19610   echo "$as_me: failed program was:" >&5
19611 cat conftest.$ac_ext >&5
19612 cf_cv_builtin_bool=0
19613 fi
19614 rm -f conftest.$ac_objext conftest.$ac_ext
19615
19616 fi
19617
19618 if test "$cf_cv_builtin_bool" = 1
19619 then    echo "$as_me:19619: result: yes" >&5
19620 echo "${ECHO_T}yes" >&6
19621 else    echo "$as_me:19621: result: no" >&5
19622 echo "${ECHO_T}no" >&6
19623 fi
19624
19625 echo "$as_me:19625: checking for size of bool" >&5
19626 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19627 if test "${cf_cv_type_of_bool+set}" = set; then
19628   echo $ECHO_N "(cached) $ECHO_C" >&6
19629 else
19630
19631         rm -f cf_test.out
19632         if test "$cross_compiling" = yes; then
19633   cf_cv_type_of_bool=unknown
19634 else
19635   cat >conftest.$ac_ext <<_ACEOF
19636 #line 19636 "configure"
19637 #include "confdefs.h"
19638
19639 #include <stdlib.h>
19640 #include <stdio.h>
19641
19642 #if defined(__cplusplus)
19643
19644 #ifdef HAVE_GXX_BUILTIN_H
19645 #include <g++/builtin.h>
19646 #elif HAVE_GPP_BUILTIN_H
19647 #include <gpp/builtin.h>
19648 #elif HAVE_BUILTIN_H
19649 #include <builtin.h>
19650 #endif
19651
19652 #else
19653
19654 #if $cf_cv_header_stdbool_h
19655 #include <stdbool.h>
19656 #endif
19657
19658 #endif
19659
19660 int main()
19661 {
19662         FILE *fp = fopen("cf_test.out", "w");
19663         if (fp != 0) {
19664                 bool x = true;
19665                 if ((bool)(-x) >= 0)
19666                         fputs("unsigned ", fp);
19667                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19668                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19669                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19670                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19671                 fclose(fp);
19672         }
19673         ${cf_cv_main_return:-return}(0);
19674 }
19675
19676 _ACEOF
19677 rm -f conftest$ac_exeext
19678 if { (eval echo "$as_me:19678: \"$ac_link\"") >&5
19679   (eval $ac_link) 2>&5
19680   ac_status=$?
19681   echo "$as_me:19681: \$? = $ac_status" >&5
19682   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19683   { (eval echo "$as_me:19683: \"$ac_try\"") >&5
19684   (eval $ac_try) 2>&5
19685   ac_status=$?
19686   echo "$as_me:19686: \$? = $ac_status" >&5
19687   (exit $ac_status); }; }; then
19688   cf_cv_type_of_bool=`cat cf_test.out`
19689                  if test -z "$cf_cv_type_of_bool"; then
19690                    cf_cv_type_of_bool=unknown
19691                  fi
19692 else
19693   echo "$as_me: program exited with status $ac_status" >&5
19694 echo "$as_me: failed program was:" >&5
19695 cat conftest.$ac_ext >&5
19696 cf_cv_type_of_bool=unknown
19697 fi
19698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19699 fi
19700
19701 fi
19702
19703         rm -f cf_test.out
19704 echo "$as_me:19704: result: $cf_cv_type_of_bool" >&5
19705 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19706 if test "$cf_cv_type_of_bool" = unknown ; then
19707         case .$NCURSES_BOOL in #(vi
19708         .auto|.) NCURSES_BOOL=unsigned;;
19709         esac
19710         { echo "$as_me:19710: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19711 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19712         cf_cv_type_of_bool=$NCURSES_BOOL
19713 fi
19714
19715 echo "$as_me:19715: checking for special defines needed for etip.h" >&5
19716 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19717 cf_save_CXXFLAGS="$CXXFLAGS"
19718 cf_result="none"
19719
19720 # etip.h includes ncurses.h which includes ncurses_dll.h
19721 # But ncurses_dll.h is generated - fix here.
19722 test -d include || mkdir include
19723 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
19724
19725 for cf_math in "" MATH_H
19726 do
19727 for cf_excp in "" MATH_EXCEPTION
19728 do
19729         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19730         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19731         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19732 cat >conftest.$ac_ext <<_ACEOF
19733 #line 19733 "configure"
19734 #include "confdefs.h"
19735
19736 #include <etip.h.in>
19737
19738 int
19739 main ()
19740 {
19741
19742   ;
19743   return 0;
19744 }
19745 _ACEOF
19746 rm -f conftest.$ac_objext
19747 if { (eval echo "$as_me:19747: \"$ac_compile\"") >&5
19748   (eval $ac_compile) 2>&5
19749   ac_status=$?
19750   echo "$as_me:19750: \$? = $ac_status" >&5
19751   (exit $ac_status); } &&
19752          { ac_try='test -s conftest.$ac_objext'
19753   { (eval echo "$as_me:19753: \"$ac_try\"") >&5
19754   (eval $ac_try) 2>&5
19755   ac_status=$?
19756   echo "$as_me:19756: \$? = $ac_status" >&5
19757   (exit $ac_status); }; }; then
19758
19759         test -n "$cf_math" && cat >>confdefs.h <<EOF
19760 #define ETIP_NEEDS_${cf_math} 1
19761 EOF
19762
19763         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19764 #define ETIP_NEEDS_${cf_excp} 1
19765 EOF
19766
19767         cf_result="$cf_math $cf_excp"
19768         break 2
19769
19770 else
19771   echo "$as_me: failed program was:" >&5
19772 cat conftest.$ac_ext >&5
19773 fi
19774 rm -f conftest.$ac_objext conftest.$ac_ext
19775 done
19776 done
19777 echo "$as_me:19777: result: $cf_result" >&5
19778 echo "${ECHO_T}$cf_result" >&6
19779 CXXFLAGS="$cf_save_CXXFLAGS"
19780
19781 if test -n "$CXX"; then
19782 echo "$as_me:19782: checking if $CXX accepts parameter initialization" >&5
19783 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19784 if test "${cf_cv_cpp_param_init+set}" = set; then
19785   echo $ECHO_N "(cached) $ECHO_C" >&6
19786 else
19787
19788         ac_ext=cc
19789 ac_cpp='$CXXCPP $CPPFLAGS'
19790 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19791 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19792 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19793 ac_main_return=return
19794
19795         if test "$cross_compiling" = yes; then
19796   cf_cv_cpp_param_init=unknown
19797 else
19798   cat >conftest.$ac_ext <<_ACEOF
19799 #line 19799 "configure"
19800 #include "confdefs.h"
19801
19802 class TEST {
19803 private:
19804         int value;
19805 public:
19806         TEST(int x = 1);
19807         ~TEST();
19808 };
19809
19810 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19811 {
19812         value = x;
19813 }
19814 int main() { }
19815
19816 _ACEOF
19817 rm -f conftest$ac_exeext
19818 if { (eval echo "$as_me:19818: \"$ac_link\"") >&5
19819   (eval $ac_link) 2>&5
19820   ac_status=$?
19821   echo "$as_me:19821: \$? = $ac_status" >&5
19822   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19823   { (eval echo "$as_me:19823: \"$ac_try\"") >&5
19824   (eval $ac_try) 2>&5
19825   ac_status=$?
19826   echo "$as_me:19826: \$? = $ac_status" >&5
19827   (exit $ac_status); }; }; then
19828   cf_cv_cpp_param_init=yes
19829 else
19830   echo "$as_me: program exited with status $ac_status" >&5
19831 echo "$as_me: failed program was:" >&5
19832 cat conftest.$ac_ext >&5
19833 cf_cv_cpp_param_init=no
19834 fi
19835 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19836 fi
19837         ac_ext=cc
19838 ac_cpp='$CXXCPP $CPPFLAGS'
19839 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19840 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19841 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19842 ac_main_return=return
19843
19844 fi
19845 echo "$as_me:19845: result: $cf_cv_cpp_param_init" >&5
19846 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19847 fi
19848 test "$cf_cv_cpp_param_init" = yes &&
19849 cat >>confdefs.h <<\EOF
19850 #define CPP_HAS_PARAM_INIT 1
19851 EOF
19852
19853 if test -n "$CXX"; then
19854
19855 echo "$as_me:19855: checking if $CXX accepts static_cast" >&5
19856 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19857 if test "${cf_cv_cpp_static_cast+set}" = set; then
19858   echo $ECHO_N "(cached) $ECHO_C" >&6
19859 else
19860
19861         ac_ext=cc
19862 ac_cpp='$CXXCPP $CPPFLAGS'
19863 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19864 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19865 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19866 ac_main_return=return
19867
19868         cat >conftest.$ac_ext <<_ACEOF
19869 #line 19869 "configure"
19870 #include "confdefs.h"
19871
19872 class NCursesPanel
19873 {
19874 public:
19875   NCursesPanel(int nlines,
19876                int ncols,
19877                int begin_y = 0,
19878                int begin_x = 0)
19879   {
19880   }
19881   NCursesPanel();
19882   ~NCursesPanel();
19883 };
19884
19885 template<class T> class NCursesUserPanel : public NCursesPanel
19886 {
19887 public:
19888   NCursesUserPanel (int nlines,
19889                     int ncols,
19890                     int begin_y = 0,
19891                     int begin_x = 0,
19892                     const T* p_UserData = static_cast<T*>(0))
19893     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19894   {
19895   };
19896   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19897   {
19898   };
19899
19900   virtual ~NCursesUserPanel() {};
19901 };
19902
19903 int
19904 main ()
19905 {
19906
19907         const char* p_UserData = static_cast<char*>(0)
19908   ;
19909   return 0;
19910 }
19911 _ACEOF
19912 rm -f conftest.$ac_objext
19913 if { (eval echo "$as_me:19913: \"$ac_compile\"") >&5
19914   (eval $ac_compile) 2>&5
19915   ac_status=$?
19916   echo "$as_me:19916: \$? = $ac_status" >&5
19917   (exit $ac_status); } &&
19918          { ac_try='test -s conftest.$ac_objext'
19919   { (eval echo "$as_me:19919: \"$ac_try\"") >&5
19920   (eval $ac_try) 2>&5
19921   ac_status=$?
19922   echo "$as_me:19922: \$? = $ac_status" >&5
19923   (exit $ac_status); }; }; then
19924   cf_cv_cpp_static_cast=yes
19925 else
19926   echo "$as_me: failed program was:" >&5
19927 cat conftest.$ac_ext >&5
19928 cf_cv_cpp_static_cast=no
19929 fi
19930 rm -f conftest.$ac_objext conftest.$ac_ext
19931
19932         ac_ext=cc
19933 ac_cpp='$CXXCPP $CPPFLAGS'
19934 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19935 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19936 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19937 ac_main_return=return
19938
19939 fi
19940 echo "$as_me:19940: result: $cf_cv_cpp_static_cast" >&5
19941 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19942
19943 fi
19944
19945 test "$cf_cv_cpp_static_cast" = yes &&
19946 cat >>confdefs.h <<\EOF
19947 #define CPP_HAS_STATIC_CAST 1
19948 EOF
19949
19950         CXX_AR='$(AR)'
19951         CXX_ARFLAGS='$(ARFLAGS)'
19952         case $cf_cv_system_name in #(vi
19953         irix*) #(vi
19954             if test "$GXX" != yes ; then
19955                 CXX_AR='$(CXX)'
19956                 CXX_ARFLAGS='-ar -o'
19957             fi
19958             ;;
19959         sco3.2v5*) #(vi
19960             CXXLDFLAGS="-u main"
19961             ;;
19962         solaris2*)
19963             if test "$GXX" != yes ; then
19964                 CXX_AR='$(CXX)'
19965                 CXX_ARFLAGS='-xar -o'
19966             fi
19967             ;;
19968         esac
19969
19970 else
19971         cf_cxx_library=no
19972         cf_cv_builtin_bool=1
19973
19974         # Just because we are not configuring against C++ right now does not
19975         # mean that a user will not want to use C++.  Some distributors disable
19976         # the C++ portion of this configuration as a shortcut (or just to avoid
19977         # compiling the demo in the c++ directory).  So we need a reasonable
19978         # default for the 'bool' type.
19979         #
19980         # Caveat: since the storage of the bool type is not standardized, it
19981         # may change.
19982
19983         if test "$NCURSES_BOOL" != auto ; then
19984                 cf_cv_type_of_bool=$NCURSES_BOOL
19985                 cf_cv_header_stdbool_h=0
19986         else
19987                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19988
19989 echo "$as_me:19989: checking for size of bool" >&5
19990 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19991 if test "${cf_cv_type_of_bool+set}" = set; then
19992   echo $ECHO_N "(cached) $ECHO_C" >&6
19993 else
19994
19995         rm -f cf_test.out
19996         if test "$cross_compiling" = yes; then
19997   cf_cv_type_of_bool=unknown
19998 else
19999   cat >conftest.$ac_ext <<_ACEOF
20000 #line 20000 "configure"
20001 #include "confdefs.h"
20002
20003 #include <stdlib.h>
20004 #include <stdio.h>
20005
20006 #if defined(__cplusplus)
20007
20008 #ifdef HAVE_GXX_BUILTIN_H
20009 #include <g++/builtin.h>
20010 #elif HAVE_GPP_BUILTIN_H
20011 #include <gpp/builtin.h>
20012 #elif HAVE_BUILTIN_H
20013 #include <builtin.h>
20014 #endif
20015
20016 #else
20017
20018 #if $cf_cv_header_stdbool_h
20019 #include <stdbool.h>
20020 #endif
20021
20022 #endif
20023
20024 int main()
20025 {
20026         FILE *fp = fopen("cf_test.out", "w");
20027         if (fp != 0) {
20028                 bool x = true;
20029                 if ((bool)(-x) >= 0)
20030                         fputs("unsigned ", fp);
20031                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20032                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20033                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20034                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20035                 fclose(fp);
20036         }
20037         ${cf_cv_main_return:-return}(0);
20038 }
20039
20040 _ACEOF
20041 rm -f conftest$ac_exeext
20042 if { (eval echo "$as_me:20042: \"$ac_link\"") >&5
20043   (eval $ac_link) 2>&5
20044   ac_status=$?
20045   echo "$as_me:20045: \$? = $ac_status" >&5
20046   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20047   { (eval echo "$as_me:20047: \"$ac_try\"") >&5
20048   (eval $ac_try) 2>&5
20049   ac_status=$?
20050   echo "$as_me:20050: \$? = $ac_status" >&5
20051   (exit $ac_status); }; }; then
20052   cf_cv_type_of_bool=`cat cf_test.out`
20053                  if test -z "$cf_cv_type_of_bool"; then
20054                    cf_cv_type_of_bool=unknown
20055                  fi
20056 else
20057   echo "$as_me: program exited with status $ac_status" >&5
20058 echo "$as_me: failed program was:" >&5
20059 cat conftest.$ac_ext >&5
20060 cf_cv_type_of_bool=unknown
20061 fi
20062 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20063 fi
20064
20065 fi
20066
20067         rm -f cf_test.out
20068 echo "$as_me:20068: result: $cf_cv_type_of_bool" >&5
20069 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20070 if test "$cf_cv_type_of_bool" = unknown ; then
20071         case .$NCURSES_BOOL in #(vi
20072         .auto|.) NCURSES_BOOL=unsigned;;
20073         esac
20074         { echo "$as_me:20074: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20075 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20076         cf_cv_type_of_bool=$NCURSES_BOOL
20077 fi
20078
20079                 else
20080                         echo "$as_me:20080: checking for fallback type of bool" >&5
20081 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20082                         case "$host_cpu" in #(vi
20083                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20084                         *)      cf_cv_type_of_bool=int  ;;
20085                         esac
20086                         echo "$as_me:20086: result: $cf_cv_type_of_bool" >&5
20087 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20088                 fi
20089         fi
20090 fi
20091
20092 # If the C compiler did not declare bool, and we did not determine that the C++
20093 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20094 # ncurses library use the same type as C++ bool.  Note that this allows one to
20095 # specify the type of bool in a configure-script option and postpone
20096 # integration with the C++ compiler provided that the types are compatible.
20097 USE_CXX_BOOL=1
20098 if test $cf_cv_cc_bool_type = 1
20099 then
20100         # oops: C has a bool.  Unlikely, but C++ could differ.
20101         USE_CXX_BOOL=0
20102 elif test $cf_cv_builtin_bool = 0
20103 then
20104         # C++ has no bool
20105         USE_CXX_BOOL=0
20106 else
20107         # this is the normal case
20108         USE_CXX_BOOL='defined(__cplusplus)'
20109 fi
20110
20111 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20112
20113         if test "$cf_with_ada" != "no" ; then
20114                 if test "$with_libtool" != "no"; then
20115                         { echo "$as_me:20115: WARNING: libtool does not support Ada - disabling feature" >&5
20116 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20117                         cf_with_ada=no
20118                 fi
20119         fi
20120
20121         if test "$cf_with_ada" != "no" ; then
20122
20123 cf_ada_make=gnatmake
20124 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20125 set dummy $cf_ada_make; ac_word=$2
20126 echo "$as_me:20126: checking for $ac_word" >&5
20127 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20128 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20129   echo $ECHO_N "(cached) $ECHO_C" >&6
20130 else
20131   if test -n "$gnat_exists"; then
20132   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20133 else
20134   ac_save_IFS=$IFS; IFS=$ac_path_separator
20135 ac_dummy="$PATH"
20136 for ac_dir in $ac_dummy; do
20137   IFS=$ac_save_IFS
20138   test -z "$ac_dir" && ac_dir=.
20139   $as_executable_p "$ac_dir/$ac_word" || continue
20140 ac_cv_prog_gnat_exists="yes"
20141 echo "$as_me:20141: found $ac_dir/$ac_word" >&5
20142 break
20143 done
20144
20145   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20146 fi
20147 fi
20148 gnat_exists=$ac_cv_prog_gnat_exists
20149 if test -n "$gnat_exists"; then
20150   echo "$as_me:20150: result: $gnat_exists" >&5
20151 echo "${ECHO_T}$gnat_exists" >&6
20152 else
20153   echo "$as_me:20153: result: no" >&5
20154 echo "${ECHO_T}no" >&6
20155 fi
20156
20157 if test "$ac_cv_prog_gnat_exists" = no; then
20158    cf_ada_make=
20159    cf_cv_prog_gnat_correct=no
20160 else
20161
20162 echo "$as_me:20162: checking for gnat version" >&5
20163 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20164 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20165         grep '[0-9].[0-9][0-9]*' |\
20166     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20167 echo "$as_me:20167: result: $cf_gnat_version" >&5
20168 echo "${ECHO_T}$cf_gnat_version" >&6
20169
20170 case $cf_gnat_version in #(vi
20171 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20172         cf_cv_prog_gnat_correct=yes
20173         ;;
20174 *)
20175         { echo "$as_me:20175: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20176 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20177         cf_cv_prog_gnat_correct=no
20178         ;;
20179 esac
20180
20181    # Extract the first word of "m4", so it can be a program name with args.
20182 set dummy m4; ac_word=$2
20183 echo "$as_me:20183: checking for $ac_word" >&5
20184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20185 if test "${ac_cv_prog_M4_exists+set}" = set; then
20186   echo $ECHO_N "(cached) $ECHO_C" >&6
20187 else
20188   if test -n "$M4_exists"; then
20189   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20190 else
20191   ac_save_IFS=$IFS; IFS=$ac_path_separator
20192 ac_dummy="$PATH"
20193 for ac_dir in $ac_dummy; do
20194   IFS=$ac_save_IFS
20195   test -z "$ac_dir" && ac_dir=.
20196   $as_executable_p "$ac_dir/$ac_word" || continue
20197 ac_cv_prog_M4_exists="yes"
20198 echo "$as_me:20198: found $ac_dir/$ac_word" >&5
20199 break
20200 done
20201
20202   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20203 fi
20204 fi
20205 M4_exists=$ac_cv_prog_M4_exists
20206 if test -n "$M4_exists"; then
20207   echo "$as_me:20207: result: $M4_exists" >&5
20208 echo "${ECHO_T}$M4_exists" >&6
20209 else
20210   echo "$as_me:20210: result: no" >&5
20211 echo "${ECHO_T}no" >&6
20212 fi
20213
20214    if test "$ac_cv_prog_M4_exists" = no; then
20215       cf_cv_prog_gnat_correct=no
20216       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20217    fi
20218    if test "$cf_cv_prog_gnat_correct" = yes; then
20219       echo "$as_me:20219: checking if GNAT works" >&5
20220 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20221
20222 rm -rf conftest* *~conftest*
20223 cat >>conftest.ads <<CF_EOF
20224 procedure conftest;
20225 CF_EOF
20226 cat >>conftest.adb <<CF_EOF
20227 with Text_IO;
20228 with GNAT.OS_Lib;
20229 procedure conftest is
20230 begin
20231    Text_IO.Put ("Hello World");
20232    Text_IO.New_Line;
20233    GNAT.OS_Lib.OS_Exit (0);
20234 end conftest;
20235 CF_EOF
20236 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20237    if ( ./conftest 1>&5 2>&1 ) ; then
20238       cf_cv_prog_gnat_correct=yes
20239    else
20240       cf_cv_prog_gnat_correct=no
20241    fi
20242 else
20243    cf_cv_prog_gnat_correct=no
20244 fi
20245 rm -rf conftest* *~conftest*
20246
20247       echo "$as_me:20247: result: $cf_cv_prog_gnat_correct" >&5
20248 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20249    fi
20250 fi
20251
20252                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20253
20254         ADAFLAGS="$ADAFLAGS -gnatpn"
20255
20256         echo "$as_me:20256: checking optimization options for ADAFLAGS" >&5
20257 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20258         case "$CFLAGS" in
20259         *-g*)
20260
20261         ADAFLAGS="$ADAFLAGS -g"
20262
20263                 ;;
20264         esac
20265         case "$CFLAGS" in
20266         *-O*)
20267                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20268
20269         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20270
20271                 ;;
20272         esac
20273         echo "$as_me:20273: result: $ADAFLAGS" >&5
20274 echo "${ECHO_T}$ADAFLAGS" >&6
20275
20276 echo "$as_me:20276: checking if GNATPREP supports -T option" >&5
20277 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20278 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20279   echo $ECHO_N "(cached) $ECHO_C" >&6
20280 else
20281
20282 cf_cv_gnatprep_opt_t=no
20283 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20284
20285 fi
20286 echo "$as_me:20286: result: $cf_cv_gnatprep_opt_t" >&5
20287 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20288 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20289
20290 echo "$as_me:20290: checking if GNAT supports generics" >&5
20291 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20292 case $cf_gnat_version in #(vi
20293 3.[1-9]*|[4-9].*) #(vi
20294         cf_gnat_generics=yes
20295         ;;
20296 *)
20297         cf_gnat_generics=no
20298         ;;
20299 esac
20300 echo "$as_me:20300: result: $cf_gnat_generics" >&5
20301 echo "${ECHO_T}$cf_gnat_generics" >&6
20302
20303 if test "$cf_gnat_generics" = yes
20304 then
20305         cf_compile_generics=generics
20306         cf_generic_objects="\${GENOBJS}"
20307 else
20308         cf_compile_generics=
20309         cf_generic_objects=
20310 fi
20311
20312 echo "$as_me:20312: checking if GNAT supports SIGINT" >&5
20313 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20314 if test "${cf_cv_gnat_sigint+set}" = set; then
20315   echo $ECHO_N "(cached) $ECHO_C" >&6
20316 else
20317
20318 rm -rf conftest* *~conftest*
20319 cat >>conftest.ads <<CF_EOF
20320 with Ada.Interrupts.Names;
20321
20322 package ConfTest is
20323
20324    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20325    pragma Unreserve_All_Interrupts;
20326    pragma Warnings (On);
20327
20328    protected Process is
20329       procedure Stop;
20330       function Continue return Boolean;
20331       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20332    private
20333       Done : Boolean := False;
20334    end Process;
20335
20336 end ConfTest;
20337 CF_EOF
20338 cat >>conftest.adb <<CF_EOF
20339 package body ConfTest is
20340    protected body Process is
20341       procedure Stop is
20342       begin
20343          Done := True;
20344       end Stop;
20345       function Continue return Boolean is
20346       begin
20347          return not Done;
20348       end Continue;
20349    end Process;
20350 end ConfTest;
20351 CF_EOF
20352 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20353       cf_cv_gnat_sigint=yes
20354 else
20355    cf_cv_gnat_sigint=no
20356 fi
20357 rm -rf conftest* *~conftest*
20358
20359 fi
20360 echo "$as_me:20360: result: $cf_cv_gnat_sigint" >&5
20361 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20362
20363 if test $cf_cv_gnat_sigint = yes ; then
20364         USE_GNAT_SIGINT=""
20365 else
20366         USE_GNAT_SIGINT="#"
20367 fi
20368
20369 cf_gnat_libraries=no
20370 cf_gnat_projects=no
20371
20372 if test "$enable_gnat_projects" != no ; then
20373 echo "$as_me:20373: checking if GNAT supports project files" >&5
20374 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20375 case $cf_gnat_version in #(vi
20376 3.[0-9]*) #(vi
20377         ;;
20378 *)
20379         case $cf_cv_system_name in #(vi
20380         cygwin*|msys*) #(vi
20381                 ;;
20382         *)
20383                 mkdir conftest.src conftest.bin conftest.lib
20384                 cd conftest.src
20385                 rm -rf conftest* *~conftest*
20386                 cat >>library.gpr <<CF_EOF
20387 project Library is
20388   Kind := External ("LIB_KIND");
20389   for Library_Name use "ConfTest";
20390   for Object_Dir use ".";
20391   for Library_ALI_Dir use External("LIBRARY_DIR");
20392   for Library_Version use External ("SONAME");
20393   for Library_Kind use Kind;
20394   for Library_Dir use External("BUILD_DIR");
20395   Source_Dir := External ("SOURCE_DIR");
20396   for Source_Dirs use (Source_Dir);
20397 end Library;
20398 CF_EOF
20399                 cat >>confpackage.ads <<CF_EOF
20400 package ConfPackage is
20401    procedure conftest;
20402 end ConfPackage;
20403 CF_EOF
20404                 cat >>confpackage.adb <<CF_EOF
20405 with Text_IO;
20406 package body ConfPackage is
20407    procedure conftest is
20408    begin
20409       Text_IO.Put ("Hello World");
20410       Text_IO.New_Line;
20411    end conftest;
20412 end ConfPackage;
20413 CF_EOF
20414                 if ( $cf_ada_make $ADAFLAGS \
20415                                 -Plibrary.gpr \
20416                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20417                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20418                                 -XSOURCE_DIR=`pwd` \
20419                                 -XSONAME=libConfTest.so.1 \
20420                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20421                         cf_gnat_projects=yes
20422                 fi
20423                 cd ..
20424                 if test -f conftest.lib/confpackage.ali
20425                 then
20426                         cf_gnat_libraries=yes
20427                 fi
20428                 rm -rf conftest* *~conftest*
20429                 ;;
20430         esac
20431         ;;
20432 esac
20433 echo "$as_me:20433: result: $cf_gnat_projects" >&5
20434 echo "${ECHO_T}$cf_gnat_projects" >&6
20435 fi # enable_gnat_projects
20436
20437 if test $cf_gnat_projects = yes
20438 then
20439         echo "$as_me:20439: checking if GNAT supports libraries" >&5
20440 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20441         echo "$as_me:20441: result: $cf_gnat_libraries" >&5
20442 echo "${ECHO_T}$cf_gnat_libraries" >&6
20443 fi
20444
20445 if test "$cf_gnat_projects" = yes
20446 then
20447         USE_OLD_MAKERULES="#"
20448         USE_GNAT_PROJECTS=""
20449 else
20450         USE_OLD_MAKERULES=""
20451         USE_GNAT_PROJECTS="#"
20452 fi
20453
20454 if test "$cf_gnat_libraries" = yes
20455 then
20456         USE_GNAT_LIBRARIES=""
20457 else
20458         USE_GNAT_LIBRARIES="#"
20459 fi
20460
20461 echo "$as_me:20461: checking for ada-compiler" >&5
20462 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20463
20464 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20465 if test "${with_ada_compiler+set}" = set; then
20466   withval="$with_ada_compiler"
20467   cf_ada_compiler=$withval
20468 else
20469   cf_ada_compiler=gnatmake
20470 fi;
20471
20472 echo "$as_me:20472: result: $cf_ada_compiler" >&5
20473 echo "${ECHO_T}$cf_ada_compiler" >&6
20474
20475                         cf_ada_package=terminal_interface
20476
20477 echo "$as_me:20477: checking for ada-include" >&5
20478 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20479
20480 # Check whether --with-ada-include or --without-ada-include was given.
20481 if test "${with_ada_include+set}" = set; then
20482   withval="$with_ada_include"
20483
20484 else
20485   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20486 fi; if test -n "$prefix/share/ada/adainclude" ; then
20487
20488 if test "x$prefix" != xNONE; then
20489   cf_path_syntax="$prefix"
20490 else
20491   cf_path_syntax="$ac_default_prefix"
20492 fi
20493
20494 case ".$withval" in #(vi
20495 .\$\(*\)*|.\'*\'*) #(vi
20496   ;;
20497 ..|./*|.\\*) #(vi
20498   ;;
20499 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20500   ;;
20501 .\${*prefix}*|.\${*dir}*) #(vi
20502   eval withval="$withval"
20503   case ".$withval" in #(vi
20504   .NONE/*)
20505     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20506     ;;
20507   esac
20508   ;; #(vi
20509 .no|.NONE/*)
20510   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20511   ;;
20512 *)
20513   { { echo "$as_me:20513: error: expected a pathname, not \"$withval\"" >&5
20514 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20515    { (exit 1); exit 1; }; }
20516   ;;
20517 esac
20518
20519 fi
20520 eval ADA_INCLUDE="$withval"
20521
20522 echo "$as_me:20522: result: $ADA_INCLUDE" >&5
20523 echo "${ECHO_T}$ADA_INCLUDE" >&6
20524
20525 echo "$as_me:20525: checking for ada-objects" >&5
20526 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20527
20528 # Check whether --with-ada-objects or --without-ada-objects was given.
20529 if test "${with_ada_objects+set}" = set; then
20530   withval="$with_ada_objects"
20531
20532 else
20533   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20534 fi; if test -n "$prefix/lib/ada/adalib" ; then
20535
20536 if test "x$prefix" != xNONE; then
20537   cf_path_syntax="$prefix"
20538 else
20539   cf_path_syntax="$ac_default_prefix"
20540 fi
20541
20542 case ".$withval" in #(vi
20543 .\$\(*\)*|.\'*\'*) #(vi
20544   ;;
20545 ..|./*|.\\*) #(vi
20546   ;;
20547 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20548   ;;
20549 .\${*prefix}*|.\${*dir}*) #(vi
20550   eval withval="$withval"
20551   case ".$withval" in #(vi
20552   .NONE/*)
20553     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20554     ;;
20555   esac
20556   ;; #(vi
20557 .no|.NONE/*)
20558   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20559   ;;
20560 *)
20561   { { echo "$as_me:20561: error: expected a pathname, not \"$withval\"" >&5
20562 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20563    { (exit 1); exit 1; }; }
20564   ;;
20565 esac
20566
20567 fi
20568 eval ADA_OBJECTS="$withval"
20569
20570 echo "$as_me:20570: result: $ADA_OBJECTS" >&5
20571 echo "${ECHO_T}$ADA_OBJECTS" >&6
20572
20573 echo "$as_me:20573: checking if an Ada95 shared-library should be built" >&5
20574 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20575
20576 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20577 if test "${with_ada_sharedlib+set}" = set; then
20578   withval="$with_ada_sharedlib"
20579   with_ada_sharedlib=$withval
20580 else
20581   with_ada_sharedlib=no
20582 fi;
20583 echo "$as_me:20583: result: $with_ada_sharedlib" >&5
20584 echo "${ECHO_T}$with_ada_sharedlib" >&6
20585
20586 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20587 MAKE_ADA_SHAREDLIB="#"
20588
20589 if test "x$with_ada_sharedlib" != xno
20590 then
20591         MAKE_ADA_SHAREDLIB=
20592         if test "x$with_ada_sharedlib" != xyes
20593         then
20594                 ADA_SHAREDLIB="$with_ada_sharedlib"
20595         fi
20596 fi
20597
20598                 fi
20599         fi
20600 else
20601         cf_with_ada=no
20602 fi
20603
20604 # do this "late" to avoid conflict with header-checks
20605 if test "x$with_widec" = xyes ; then
20606         echo "$as_me:20606: checking for wchar_t" >&5
20607 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20608 if test "${ac_cv_type_wchar_t+set}" = set; then
20609   echo $ECHO_N "(cached) $ECHO_C" >&6
20610 else
20611   cat >conftest.$ac_ext <<_ACEOF
20612 #line 20612 "configure"
20613 #include "confdefs.h"
20614 $ac_includes_default
20615 int
20616 main ()
20617 {
20618 if ((wchar_t *) 0)
20619   return 0;
20620 if (sizeof (wchar_t))
20621   return 0;
20622   ;
20623   return 0;
20624 }
20625 _ACEOF
20626 rm -f conftest.$ac_objext
20627 if { (eval echo "$as_me:20627: \"$ac_compile\"") >&5
20628   (eval $ac_compile) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit $ac_status); } &&
20632          { ac_try='test -s conftest.$ac_objext'
20633   { (eval echo "$as_me:20633: \"$ac_try\"") >&5
20634   (eval $ac_try) 2>&5
20635   ac_status=$?
20636   echo "$as_me:20636: \$? = $ac_status" >&5
20637   (exit $ac_status); }; }; then
20638   ac_cv_type_wchar_t=yes
20639 else
20640   echo "$as_me: failed program was:" >&5
20641 cat conftest.$ac_ext >&5
20642 ac_cv_type_wchar_t=no
20643 fi
20644 rm -f conftest.$ac_objext conftest.$ac_ext
20645 fi
20646 echo "$as_me:20646: result: $ac_cv_type_wchar_t" >&5
20647 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20648
20649 echo "$as_me:20649: checking size of wchar_t" >&5
20650 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20651 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20652   echo $ECHO_N "(cached) $ECHO_C" >&6
20653 else
20654   if test "$ac_cv_type_wchar_t" = yes; then
20655   if test "$cross_compiling" = yes; then
20656   # Depending upon the size, compute the lo and hi bounds.
20657 cat >conftest.$ac_ext <<_ACEOF
20658 #line 20658 "configure"
20659 #include "confdefs.h"
20660 $ac_includes_default
20661 int
20662 main ()
20663 {
20664 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20665   ;
20666   return 0;
20667 }
20668 _ACEOF
20669 rm -f conftest.$ac_objext
20670 if { (eval echo "$as_me:20670: \"$ac_compile\"") >&5
20671   (eval $ac_compile) 2>&5
20672   ac_status=$?
20673   echo "$as_me:20673: \$? = $ac_status" >&5
20674   (exit $ac_status); } &&
20675          { ac_try='test -s conftest.$ac_objext'
20676   { (eval echo "$as_me:20676: \"$ac_try\"") >&5
20677   (eval $ac_try) 2>&5
20678   ac_status=$?
20679   echo "$as_me:20679: \$? = $ac_status" >&5
20680   (exit $ac_status); }; }; then
20681   ac_lo=0 ac_mid=0
20682   while :; do
20683     cat >conftest.$ac_ext <<_ACEOF
20684 #line 20684 "configure"
20685 #include "confdefs.h"
20686 $ac_includes_default
20687 int
20688 main ()
20689 {
20690 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20691   ;
20692   return 0;
20693 }
20694 _ACEOF
20695 rm -f conftest.$ac_objext
20696 if { (eval echo "$as_me:20696: \"$ac_compile\"") >&5
20697   (eval $ac_compile) 2>&5
20698   ac_status=$?
20699   echo "$as_me:20699: \$? = $ac_status" >&5
20700   (exit $ac_status); } &&
20701          { ac_try='test -s conftest.$ac_objext'
20702   { (eval echo "$as_me:20702: \"$ac_try\"") >&5
20703   (eval $ac_try) 2>&5
20704   ac_status=$?
20705   echo "$as_me:20705: \$? = $ac_status" >&5
20706   (exit $ac_status); }; }; then
20707   ac_hi=$ac_mid; break
20708 else
20709   echo "$as_me: failed program was:" >&5
20710 cat conftest.$ac_ext >&5
20711 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20712 fi
20713 rm -f conftest.$ac_objext conftest.$ac_ext
20714   done
20715 else
20716   echo "$as_me: failed program was:" >&5
20717 cat conftest.$ac_ext >&5
20718 ac_hi=-1 ac_mid=-1
20719   while :; do
20720     cat >conftest.$ac_ext <<_ACEOF
20721 #line 20721 "configure"
20722 #include "confdefs.h"
20723 $ac_includes_default
20724 int
20725 main ()
20726 {
20727 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20728   ;
20729   return 0;
20730 }
20731 _ACEOF
20732 rm -f conftest.$ac_objext
20733 if { (eval echo "$as_me:20733: \"$ac_compile\"") >&5
20734   (eval $ac_compile) 2>&5
20735   ac_status=$?
20736   echo "$as_me:20736: \$? = $ac_status" >&5
20737   (exit $ac_status); } &&
20738          { ac_try='test -s conftest.$ac_objext'
20739   { (eval echo "$as_me:20739: \"$ac_try\"") >&5
20740   (eval $ac_try) 2>&5
20741   ac_status=$?
20742   echo "$as_me:20742: \$? = $ac_status" >&5
20743   (exit $ac_status); }; }; then
20744   ac_lo=$ac_mid; break
20745 else
20746   echo "$as_me: failed program was:" >&5
20747 cat conftest.$ac_ext >&5
20748 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20749 fi
20750 rm -f conftest.$ac_objext conftest.$ac_ext
20751   done
20752 fi
20753 rm -f conftest.$ac_objext conftest.$ac_ext
20754 # Binary search between lo and hi bounds.
20755 while test "x$ac_lo" != "x$ac_hi"; do
20756   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20757   cat >conftest.$ac_ext <<_ACEOF
20758 #line 20758 "configure"
20759 #include "confdefs.h"
20760 $ac_includes_default
20761 int
20762 main ()
20763 {
20764 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20765   ;
20766   return 0;
20767 }
20768 _ACEOF
20769 rm -f conftest.$ac_objext
20770 if { (eval echo "$as_me:20770: \"$ac_compile\"") >&5
20771   (eval $ac_compile) 2>&5
20772   ac_status=$?
20773   echo "$as_me:20773: \$? = $ac_status" >&5
20774   (exit $ac_status); } &&
20775          { ac_try='test -s conftest.$ac_objext'
20776   { (eval echo "$as_me:20776: \"$ac_try\"") >&5
20777   (eval $ac_try) 2>&5
20778   ac_status=$?
20779   echo "$as_me:20779: \$? = $ac_status" >&5
20780   (exit $ac_status); }; }; then
20781   ac_hi=$ac_mid
20782 else
20783   echo "$as_me: failed program was:" >&5
20784 cat conftest.$ac_ext >&5
20785 ac_lo=`expr $ac_mid + 1`
20786 fi
20787 rm -f conftest.$ac_objext conftest.$ac_ext
20788 done
20789 ac_cv_sizeof_wchar_t=$ac_lo
20790 else
20791   if test "$cross_compiling" = yes; then
20792   { { echo "$as_me:20792: error: cannot run test program while cross compiling" >&5
20793 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20794    { (exit 1); exit 1; }; }
20795 else
20796   cat >conftest.$ac_ext <<_ACEOF
20797 #line 20797 "configure"
20798 #include "confdefs.h"
20799 $ac_includes_default
20800 int
20801 main ()
20802 {
20803 FILE *f = fopen ("conftest.val", "w");
20804 if (!f)
20805   $ac_main_return (1);
20806 fprintf (f, "%d", (sizeof (wchar_t)));
20807 fclose (f);
20808   ;
20809   return 0;
20810 }
20811 _ACEOF
20812 rm -f conftest$ac_exeext
20813 if { (eval echo "$as_me:20813: \"$ac_link\"") >&5
20814   (eval $ac_link) 2>&5
20815   ac_status=$?
20816   echo "$as_me:20816: \$? = $ac_status" >&5
20817   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20818   { (eval echo "$as_me:20818: \"$ac_try\"") >&5
20819   (eval $ac_try) 2>&5
20820   ac_status=$?
20821   echo "$as_me:20821: \$? = $ac_status" >&5
20822   (exit $ac_status); }; }; then
20823   ac_cv_sizeof_wchar_t=`cat conftest.val`
20824 else
20825   echo "$as_me: program exited with status $ac_status" >&5
20826 echo "$as_me: failed program was:" >&5
20827 cat conftest.$ac_ext >&5
20828 fi
20829 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20830 fi
20831 fi
20832 rm -f conftest.val
20833 else
20834   ac_cv_sizeof_wchar_t=0
20835 fi
20836 fi
20837 echo "$as_me:20837: result: $ac_cv_sizeof_wchar_t" >&5
20838 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20839 cat >>confdefs.h <<EOF
20840 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20841 EOF
20842
20843 fi
20844
20845 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20846 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20847 ###
20848 ### ticlib modules may be a separate library, otherwise contained in termlib.
20849 ### termlib modules may be a separate library, otherwise contained in ncurses.
20850 ###
20851 ### The of "+" or " " between the tokens controls the way the script
20852 ### chooses to split module lists into libraries.
20853 ###
20854 ### (see CF_LIB_RULES).
20855 echo "$as_me:20855: checking for library subsets" >&5
20856 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20857 LIB_SUBSETS=
20858
20859 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20860         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20861         if test "$with_ticlib" != no ; then
20862                 LIB_SUBSETS="${LIB_SUBSETS} "
20863         else
20864                 LIB_SUBSETS="${LIB_SUBSETS}+"
20865         fi
20866 fi
20867
20868 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20869 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20870
20871 if test "$with_termlib" != no ; then
20872         LIB_SUBSETS="${LIB_SUBSETS} "
20873 else
20874         LIB_SUBSETS="${LIB_SUBSETS}+"
20875 fi
20876
20877 LIB_SUBSETS="${LIB_SUBSETS}base"
20878
20879 # Most term-driver calls are to tinfo, but some like init_pair are to the
20880 # base library (so it resides in base).
20881 if test "$with_term_driver" != no ; then
20882         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20883         case $cf_cv_system_name in #(vi
20884         *mingw32*) #(vi
20885                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20886                 ;;
20887         *) #(vi
20888                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20889                 ;;
20890         esac
20891 fi
20892
20893 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20894 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20895
20896 echo "$as_me:20896: result: $LIB_SUBSETS" >&5
20897 echo "${ECHO_T}$LIB_SUBSETS" >&6
20898
20899 ### Construct the list of include-directories to be generated
20900
20901 if test "$GCC" != yes; then
20902         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20903 elif test "$includedir" != "/usr/include"; then
20904         if test "$includedir" = '${prefix}/include' ; then
20905                 if test x$prefix != x/usr ; then
20906                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20907                 fi
20908         else
20909                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20910         fi
20911 fi
20912 if test "$srcdir" != "."; then
20913         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20914 fi
20915 CPPFLAGS="-I../include $CPPFLAGS"
20916 if test "$srcdir" != "."; then
20917         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
20918 fi
20919 CPPFLAGS="-I. $CPPFLAGS"
20920
20921 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20922 if test "$srcdir" != "."; then
20923         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20924 fi
20925 if test "$GCC" != yes; then
20926         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20927 elif test "$includedir" != "/usr/include"; then
20928         if test "$includedir" = '${prefix}/include' ; then
20929                 if test x$prefix != x/usr ; then
20930                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20931                 fi
20932         else
20933                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20934         fi
20935 fi
20936
20937 ### Build up pieces for makefile rules
20938 echo "$as_me:20938: checking default library suffix" >&5
20939 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20940
20941         case $DFT_LWR_MODEL in
20942         libtool) DFT_ARG_SUFFIX=''   ;;
20943         normal)  DFT_ARG_SUFFIX=''   ;;
20944         debug)   DFT_ARG_SUFFIX='_g' ;;
20945         profile) DFT_ARG_SUFFIX='_p' ;;
20946         shared)  DFT_ARG_SUFFIX=''   ;;
20947         esac
20948         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20949 echo "$as_me:20949: result: $DFT_ARG_SUFFIX" >&5
20950 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20951
20952 echo "$as_me:20952: checking default library-dependency suffix" >&5
20953 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20954
20955         case X$DFT_LWR_MODEL in #(vi
20956         Xlibtool) #(vi
20957                 DFT_LIB_SUFFIX='.la'
20958                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20959                 ;;
20960         Xdebug) #(vi
20961                 DFT_LIB_SUFFIX='_g.a'
20962                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20963                 ;;
20964         Xprofile) #(vi
20965                 DFT_LIB_SUFFIX='_p.a'
20966                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20967                 ;;
20968         Xshared) #(vi
20969                 case $cf_cv_system_name in
20970                 aix[5-7]*) #(vi
20971                         DFT_LIB_SUFFIX='.so'
20972                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20973                         ;;
20974                 cygwin*|msys*|mingw*) #(vi
20975                         DFT_LIB_SUFFIX='.dll'
20976                         DFT_DEP_SUFFIX='.dll.a'
20977                         ;;
20978                 darwin*) #(vi
20979                         DFT_LIB_SUFFIX='.dylib'
20980                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20981                         ;;
20982                 hpux*) #(vi
20983                         case $target in
20984                         ia64*) #(vi
20985                                 DFT_LIB_SUFFIX='.so'
20986                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20987                                 ;;
20988                         *) #(vi
20989                                 DFT_LIB_SUFFIX='.sl'
20990                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20991                                 ;;
20992                         esac
20993                         ;;
20994                 *) #(vi
20995                         DFT_LIB_SUFFIX='.so'
20996                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20997                         ;;
20998                 esac
20999                 ;;
21000         *)
21001                 DFT_LIB_SUFFIX='.a'
21002                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21003                 ;;
21004         esac
21005         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21006         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21007 echo "$as_me:21007: result: $DFT_DEP_SUFFIX" >&5
21008 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21009
21010 echo "$as_me:21010: checking default object directory" >&5
21011 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21012
21013         case $DFT_LWR_MODEL in
21014         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21015         normal)  DFT_OBJ_SUBDIR='objects' ;;
21016         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21017         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21018         shared)
21019                 case $cf_cv_system_name in #(vi
21020                 cygwin|msys) #(vi
21021                         DFT_OBJ_SUBDIR='objects' ;;
21022                 *)
21023                         DFT_OBJ_SUBDIR='obj_s' ;;
21024                 esac
21025         esac
21026 echo "$as_me:21026: result: $DFT_OBJ_SUBDIR" >&5
21027 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21028
21029 if test "x$cf_with_cxx" = xyes ; then
21030 echo "$as_me:21030: checking c++ library-dependency suffix" >&5
21031 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21032 if test "$with_libtool" != "no"; then
21033         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21034         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21035 elif test "$with_shared_cxx" != "no"; then
21036         # also for g++ users...
21037         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21038 else
21039         # we normally make a static library because C/C++ library rules differ
21040
21041         case Xnormal in #(vi
21042         Xlibtool) #(vi
21043                 CXX_LIB_SUFFIX='.la'
21044                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21045                 ;;
21046         Xdebug) #(vi
21047                 CXX_LIB_SUFFIX='_g.a'
21048                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21049                 ;;
21050         Xprofile) #(vi
21051                 CXX_LIB_SUFFIX='_p.a'
21052                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21053                 ;;
21054         Xshared) #(vi
21055                 case $cf_cv_system_name in
21056                 aix[5-7]*) #(vi
21057                         CXX_LIB_SUFFIX='.so'
21058                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21059                         ;;
21060                 cygwin*|msys*|mingw*) #(vi
21061                         CXX_LIB_SUFFIX='.dll'
21062                         CXX_DEP_SUFFIX='.dll.a'
21063                         ;;
21064                 darwin*) #(vi
21065                         CXX_LIB_SUFFIX='.dylib'
21066                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21067                         ;;
21068                 hpux*) #(vi
21069                         case $target in
21070                         ia64*) #(vi
21071                                 CXX_LIB_SUFFIX='.so'
21072                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21073                                 ;;
21074                         *) #(vi
21075                                 CXX_LIB_SUFFIX='.sl'
21076                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21077                                 ;;
21078                         esac
21079                         ;;
21080                 *) #(vi
21081                         CXX_LIB_SUFFIX='.so'
21082                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21083                         ;;
21084                 esac
21085                 ;;
21086         *)
21087                 CXX_LIB_SUFFIX='.a'
21088                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21089                 ;;
21090         esac
21091         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21092         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21093
21094 fi
21095 echo "$as_me:21095: result: $CXX_LIB_SUFFIX" >&5
21096 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21097
21098 fi
21099
21100 # do not want -ldl in build except as needed for -lncurses dependency
21101 if test "x$with_dlsym" = xyes ; then
21102 if test $DFT_LWR_MODEL = shared || \
21103    test $DFT_LWR_MODEL = libtool ; then
21104
21105 # remove dl library from $LIBS
21106 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21107
21108 fi
21109 fi
21110 ### Set up low-level terminfo dependencies for makefiles.
21111
21112 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21113 # do not need libdl
21114 TICS_LIST=
21115 if test "x$with_dlsym" = xyes ; then
21116
21117 # remove dl library from $SHLIB_LIST
21118 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21119
21120 fi
21121
21122 if test "$with_ticlib" != no ; then
21123
21124         if test "x$with_ticlib" != xyes ; then
21125                 TICS_NAME=$with_ticlib
21126                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21127                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21128                 TICS_LIB_SUFFIX="${with_ticlib}"
21129         else
21130                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21131                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21132                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21133         fi
21134         TICS_LDFLAGS="-L${LIB_DIR}"
21135         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21136 else
21137         TICS_LDFLAGS="-L${LIB_DIR}"
21138         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21139 fi
21140
21141 if test "$with_termlib" != no ; then
21142
21143         if test "x$with_termlib" != xyes ; then
21144                 TINFO_NAME=$with_termlib
21145                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21146                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21147                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21148                 TINFO_LIB_SUFFIX="${with_termlib}"
21149         else
21150                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21151                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21152                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21153                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21154         fi
21155
21156         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21157         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21158         if test "$DFT_LWR_MODEL" = "libtool"; then
21159                 TEST_ARGS="${TEST_DEPS}"
21160                 TEST_ARG2="${TEST_DEP2}"
21161                 TINFO_LDFLAGS="-L${LIB_DIR}"
21162                 TINFO_LIBS="$TEST_ARGS"
21163                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21164                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21165         else
21166                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21167                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21168                 if test "x$with_term_driver" != xno ; then
21169                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21170                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21171                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21172                 else
21173                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21174                         TINFO_LIBS="$TEST_ARGS"
21175                 fi
21176                 TINFO_LDFLAGS="-L${LIB_DIR}"
21177                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21178         fi
21179 else
21180         # the next lines are needed for linking libtic over libncurses
21181         TINFO_NAME=${LIB_NAME}
21182         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21183         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21184         if test "x$with_tic_depends" = xyes ; then
21185                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21186         else
21187                 TICS_LIST="$SHLIB_LIST"
21188         fi
21189
21190         TINFO_LDFLAGS="-L${LIB_DIR}"
21191         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21192 fi
21193
21194 if test "$DFT_LWR_MODEL" = shared ; then
21195         case $cf_cv_system_name in #(vi
21196         cygwin*|msys*)
21197                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21198                 TINFO_SUFFIX=.dll
21199                 ;;
21200         esac
21201 fi
21202
21203 if test "x$with_dlsym" = xyes ; then
21204
21205 # remove dl library from $TICS_LIST
21206 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21207
21208 fi
21209
21210 if test "$DFT_LWR_MODEL" = "libtool"; then
21211     OBJEXT=lo
21212 fi
21213
21214 # needed for Ada95
21215 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21216
21217 case $DFT_LWR_MODEL in
21218 normal|debug|profile)
21219
21220 if test "$GCC" = yes ; then
21221         case $cf_cv_system_name in #(
21222         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21223                 LDFLAGS_STATIC=
21224                 LDFLAGS_SHARED=
21225                 ;;
21226     *)  #( normally, except when broken
21227         LDFLAGS_STATIC=-static
21228         LDFLAGS_SHARED=-dynamic
21229         ;;
21230     esac
21231 else
21232         case $cf_cv_system_name in #(
21233         aix[4-7]*)      #( from ld manpage
21234                 LDFLAGS_STATIC=-bstatic
21235                 LDFLAGS_SHARED=-bdynamic
21236                 ;;
21237         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21238                 # We could also use just "archive" and "shared".
21239                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21240                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21241                 ;;
21242         irix*)          #( from ld manpage IRIX64
21243                 LDFLAGS_STATIC=-Bstatic
21244                 LDFLAGS_SHARED=-Bdynamic
21245                 ;;
21246         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21247                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21248                 LDFLAGS_STATIC=-noso
21249                 LDFLAGS_SHARED=-so_archive
21250                 ;;
21251         solaris2*)
21252                 LDFLAGS_STATIC=-Bstatic
21253                 LDFLAGS_SHARED=-Bdynamic
21254                 ;;
21255         esac
21256 fi
21257
21258 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21259 then
21260         echo "$as_me:21260: checking if linker supports switching between static/dynamic" >&5
21261 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21262
21263         rm -f libconftest.a
21264         cat >conftest.$ac_ext <<EOF
21265 #line 21265 "configure"
21266 #include <stdio.h>
21267 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21268 EOF
21269         if { (eval echo "$as_me:21269: \"$ac_compile\"") >&5
21270   (eval $ac_compile) 2>&5
21271   ac_status=$?
21272   echo "$as_me:21272: \$? = $ac_status" >&5
21273   (exit $ac_status); } ; then
21274                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21275                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21276         fi
21277         rm -f conftest.*
21278
21279         cf_save_LIBS="$LIBS"
21280
21281         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21282         cat >conftest.$ac_ext <<_ACEOF
21283 #line 21283 "configure"
21284 #include "confdefs.h"
21285
21286 #line 21286 "configure"
21287 #include <stdio.h>
21288 int cf_ldflags_static(FILE *fp);
21289
21290 int
21291 main ()
21292 {
21293
21294         return cf_ldflags_static(stdin);
21295
21296   ;
21297   return 0;
21298 }
21299 _ACEOF
21300 rm -f conftest.$ac_objext conftest$ac_exeext
21301 if { (eval echo "$as_me:21301: \"$ac_link\"") >&5
21302   (eval $ac_link) 2>&5
21303   ac_status=$?
21304   echo "$as_me:21304: \$? = $ac_status" >&5
21305   (exit $ac_status); } &&
21306          { ac_try='test -s conftest$ac_exeext'
21307   { (eval echo "$as_me:21307: \"$ac_try\"") >&5
21308   (eval $ac_try) 2>&5
21309   ac_status=$?
21310   echo "$as_me:21310: \$? = $ac_status" >&5
21311   (exit $ac_status); }; }; then
21312
21313         # some linkers simply ignore the -dynamic
21314         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21315         *static*) # (vi
21316                 cf_ldflags_static=no
21317                 ;;
21318         *)
21319                 cf_ldflags_static=yes
21320                 ;;
21321         esac
21322
21323 else
21324   echo "$as_me: failed program was:" >&5
21325 cat conftest.$ac_ext >&5
21326 cf_ldflags_static=no
21327 fi
21328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21329
21330         rm -f libconftest.*
21331         LIBS="$cf_save_LIBS"
21332
21333         echo "$as_me:21333: result: $cf_ldflags_static" >&5
21334 echo "${ECHO_T}$cf_ldflags_static" >&6
21335
21336         if test $cf_ldflags_static != yes
21337         then
21338                 LDFLAGS_STATIC=
21339                 LDFLAGS_SHARED=
21340         fi
21341 else
21342         LDFLAGS_STATIC=
21343         LDFLAGS_SHARED=
21344 fi
21345
21346         ;;
21347 esac
21348
21349 echo "$as_me:21349: checking where we will install curses.h" >&5
21350 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21351
21352 includesubdir=
21353 if test "$with_overwrite" = no && \
21354  ( test "x$includedir" = 'x${prefix}/include' || \
21355    test "x$includedir" = "x${prefix}/include" )
21356 then
21357         includesubdir="/ncurses${LIB_SUFFIX}"
21358 fi
21359 echo "$as_me:21359: result: ${includedir}${includesubdir}" >&5
21360 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21361
21362 ### Resolve a conflict between normal and wide-curses by forcing applications
21363 ### that will need libutf8 to add it to their configure script.
21364 if test "$with_overwrite" != no ; then
21365 if test "$NCURSES_LIBUTF8" = 1 ; then
21366         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21367         { echo "$as_me:21367: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21368 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21369 fi
21370 fi
21371 WITH_OVERWRITE=$with_overwrite
21372
21373 # used to separate tack out of the tree
21374 NCURSES_TREE=
21375
21376 ### predefined stuff for the test programs
21377
21378 cat >>confdefs.h <<\EOF
21379 #define HAVE_SLK_COLOR 1
21380 EOF
21381
21382 ### Construct the list of subdirectories for which we'll customize makefiles
21383 ### with the appropriate compile-rules.
21384
21385 echo "$as_me:21385: checking for src modules" >&5
21386 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21387
21388 # dependencies and linker-arguments for test-programs
21389 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21390 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21391 if test "$DFT_LWR_MODEL" = "libtool"; then
21392         TEST_ARGS="${TEST_DEPS}"
21393         TEST_ARG2="${TEST_DEP2}"
21394 else
21395         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21396         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21397 fi
21398
21399 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21400 cf_cv_src_modules=
21401 for cf_dir in $modules_to_build
21402 do
21403         if test -f $srcdir/$cf_dir/modules; then
21404
21405                 # We may/may not have tack in the distribution, though the
21406                 # makefile is.
21407                 if test $cf_dir = tack ; then
21408                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21409                                 continue
21410                         fi
21411                 fi
21412
21413                 if test -z "$cf_cv_src_modules"; then
21414                         cf_cv_src_modules=$cf_dir
21415                 else
21416                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21417                 fi
21418
21419                 # Make the ncurses_cfg.h file record the library interface files as
21420                 # well.  These are header files that are the same name as their
21421                 # directory.  Ncurses is the only library that does not follow
21422                 # that pattern.
21423                 if test $cf_dir = tack ; then
21424                         continue
21425                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21426
21427 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21428
21429                         cat >>confdefs.h <<EOF
21430 #define HAVE_${cf_have_include}_H 1
21431 EOF
21432
21433                         cat >>confdefs.h <<EOF
21434 #define HAVE_LIB${cf_have_include} 1
21435 EOF
21436
21437                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21438                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21439                         if test "$DFT_LWR_MODEL" = "libtool"; then
21440                                 TEST_ARGS="${TEST_DEPS}"
21441                                 TEST_ARG2="${TEST_DEP2}"
21442                         else
21443                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21444                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21445                         fi
21446                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21447                 fi
21448         fi
21449 done
21450 echo "$as_me:21450: result: $cf_cv_src_modules" >&5
21451 echo "${ECHO_T}$cf_cv_src_modules" >&6
21452
21453 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21454 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21455
21456 SRC_SUBDIRS=
21457 if test "x$cf_with_manpages" != xno ; then
21458         SRC_SUBDIRS="$SRC_SUBDIRS man"
21459 fi
21460 SRC_SUBDIRS="$SRC_SUBDIRS include"
21461 for cf_dir in $cf_cv_src_modules
21462 do
21463         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21464 done
21465 if test "x$cf_with_tests" != "xno" ; then
21466         SRC_SUBDIRS="$SRC_SUBDIRS test"
21467 fi
21468 if test "x$cf_with_db_install" = xyes; then
21469         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
21470 fi
21471 if test "$cf_with_cxx_binding" != no; then
21472         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21473         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21474 fi
21475
21476 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21477 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21478
21479 ADA_SUBDIRS=
21480 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21481         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21482         ADA_SUBDIRS="gen src"
21483         if test "x$cf_with_tests" != "xno" ; then
21484                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21485         fi
21486 fi
21487
21488 SUB_MAKEFILES=
21489 for cf_dir in $SRC_SUBDIRS
21490 do
21491         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21492 done
21493
21494 if test -n "$ADA_SUBDIRS"; then
21495         for cf_dir in $ADA_SUBDIRS
21496         do
21497                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21498         done
21499
21500 fi
21501
21502 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21503    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21504    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21505 fi
21506
21507 DIRS_TO_MAKE="lib"
21508 for cf_item in $cf_list_models
21509 do
21510
21511         case $cf_item in
21512         libtool) cf_subdir='obj_lo'  ;;
21513         normal)  cf_subdir='objects' ;;
21514         debug)   cf_subdir='obj_g' ;;
21515         profile) cf_subdir='obj_p' ;;
21516         shared)
21517                 case $cf_cv_system_name in #(vi
21518                 cygwin|msys) #(vi
21519                         cf_subdir='objects' ;;
21520                 *)
21521                         cf_subdir='obj_s' ;;
21522                 esac
21523         esac
21524
21525         for cf_item2 in $DIRS_TO_MAKE
21526         do
21527                 test $cf_item2 = $cf_subdir && break
21528         done
21529         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21530 done
21531 for cf_dir in $DIRS_TO_MAKE
21532 do
21533         test ! -d $cf_dir && mkdir $cf_dir
21534 done
21535
21536 # symbols that differ when compiling Ada95 by itself.
21537 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21538
21539 # values to use as strings
21540
21541 cat >>confdefs.h <<EOF
21542 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21543 EOF
21544
21545 cat >>confdefs.h <<EOF
21546 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21547 EOF
21548
21549 ### Now that we're done running tests, add the compiler-warnings, if any
21550
21551 cf_fix_cppflags=no
21552 cf_new_cflags=
21553 cf_new_cppflags=
21554 cf_new_extra_cppflags=
21555
21556 for cf_add_cflags in $EXTRA_CFLAGS
21557 do
21558 case $cf_fix_cppflags in
21559 no)
21560         case $cf_add_cflags in #(vi
21561         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21562                 case $cf_add_cflags in
21563                 -D*)
21564                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21565
21566                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21567                                 && test -z "${cf_tst_cflags}" \
21568                                 && cf_fix_cppflags=yes
21569
21570                         if test $cf_fix_cppflags = yes ; then
21571                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21572                                 continue
21573                         elif test "${cf_tst_cflags}" = "\"'" ; then
21574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21575                                 continue
21576                         fi
21577                         ;;
21578                 esac
21579                 case "$CPPFLAGS" in
21580                 *$cf_add_cflags) #(vi
21581                         ;;
21582                 *) #(vi
21583                         case $cf_add_cflags in #(vi
21584                         -D*)
21585                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21586
21587 CPPFLAGS=`echo "$CPPFLAGS" | \
21588         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21589                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21590
21591                                 ;;
21592                         esac
21593                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21594                         ;;
21595                 esac
21596                 ;;
21597         *)
21598                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21599                 ;;
21600         esac
21601         ;;
21602 yes)
21603         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21604
21605         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21606
21607         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21608                 && test -z "${cf_tst_cflags}" \
21609                 && cf_fix_cppflags=no
21610         ;;
21611 esac
21612 done
21613
21614 if test -n "$cf_new_cflags" ; then
21615
21616         CFLAGS="$CFLAGS $cf_new_cflags"
21617 fi
21618
21619 if test -n "$cf_new_cppflags" ; then
21620
21621         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21622 fi
21623
21624 if test -n "$cf_new_extra_cppflags" ; then
21625
21626         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21627 fi
21628
21629 ### Define substitutions for header files to avoid name-pollution
21630
21631 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21632         HAVE_TCGETATTR=1
21633 else
21634         HAVE_TCGETATTR=0
21635 fi
21636
21637 if test "x$ac_cv_header_stdint_h" = xyes ; then
21638         HAVE_STDINT_H=1
21639 else
21640         HAVE_STDINT_H=0
21641 fi
21642
21643 if test "x$ac_cv_header_termio_h" = xyes ; then
21644         HAVE_TERMIO_H=1
21645 else
21646         HAVE_TERMIO_H=0
21647 fi
21648
21649 if test "x$ac_cv_header_termios_h" = xyes ; then
21650         HAVE_TERMIOS_H=1
21651 else
21652         HAVE_TERMIOS_H=0
21653 fi
21654
21655 ################################################################################
21656 test "x$use_database" = xyes && \
21657 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21658
21659 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21660 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21661
21662 if test "x$enable_pc_files" = xyes ; then \
21663 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21664 MAKE_PC_FILES=
21665 else
21666 MAKE_PC_FILES="#"
21667 fi
21668
21669 # Extract the first word of "tic", so it can be a program name with args.
21670 set dummy tic; ac_word=$2
21671 echo "$as_me:21671: checking for $ac_word" >&5
21672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21673 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21674   echo $ECHO_N "(cached) $ECHO_C" >&6
21675 else
21676   case $TIC_PATH in
21677   [\\/]* | ?:[\\/]*)
21678   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21679   ;;
21680   *)
21681   ac_save_IFS=$IFS; IFS=$ac_path_separator
21682 ac_dummy="$PATH:/usr/local/ncurses/bin"
21683 for ac_dir in $ac_dummy; do
21684   IFS=$ac_save_IFS
21685   test -z "$ac_dir" && ac_dir=.
21686   if $as_executable_p "$ac_dir/$ac_word"; then
21687    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21688    echo "$as_me:21688: found $ac_dir/$ac_word" >&5
21689    break
21690 fi
21691 done
21692
21693   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21694   ;;
21695 esac
21696 fi
21697 TIC_PATH=$ac_cv_path_TIC_PATH
21698
21699 if test -n "$TIC_PATH"; then
21700   echo "$as_me:21700: result: $TIC_PATH" >&5
21701 echo "${ECHO_T}$TIC_PATH" >&6
21702 else
21703   echo "$as_me:21703: result: no" >&5
21704 echo "${ECHO_T}no" >&6
21705 fi
21706
21707 if test -n "$FALLBACK_LIST"
21708 then
21709         if test "$TIC_PATH" = unknown
21710         then
21711                 { echo "$as_me:21711: WARNING: no tic program found for fallbacks" >&5
21712 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21713         fi
21714 fi
21715
21716 if test "x$cf_with_tests" != xno ; then
21717         MAKE_TESTS=
21718 else
21719         MAKE_TESTS="#"
21720 fi
21721
21722 ADAHTML_DIR=../../doc/html/ada
21723
21724 # these could be configurable, but are not currently
21725 PANEL_NAME=panel
21726 MENU_NAME=menu
21727 FORM_NAME=form
21728 CXX_NAME=ncurses++
21729
21730 # workaround for g++ versus Solaris (20131116)
21731 case $cf_cv_system_name in #(vi
21732 solaris2*) #(vi
21733         case "x$CPPFLAGS" in #(vi
21734         *-D_XOPEN_SOURCE_EXTENDED*)
21735                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21736
21737 echo "${as_me:-configure}:21737: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21738
21739                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21740                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21741                 ;;
21742         esac
21743         ;;
21744 esac
21745
21746 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21747 case "x$NCURSES_OSPEED" in #(vi
21748 *short*) #(vi
21749         cf_compatible=1
21750         ;;
21751 *)
21752         cf_compatible=0
21753         ;;
21754 esac
21755
21756 cat >>confdefs.h <<EOF
21757 #define NCURSES_OSPEED_COMPAT $cf_compatible
21758 EOF
21759
21760 case "x$cf_cv_typeof_chtype" in
21761 xshort|xint|xlong)
21762         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21763         ;;
21764 esac
21765
21766 case "x$cf_cv_typeof_mmask_t" in
21767 xshort|xint|xlong)
21768         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21769         ;;
21770 esac
21771
21772 SUB_SCRIPTS=
21773
21774 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"
21775 ac_config_commands="$ac_config_commands default"
21776 cat >confcache <<\_ACEOF
21777 # This file is a shell script that caches the results of configure
21778 # tests run on this system so they can be shared between configure
21779 # scripts and configure runs, see configure's option --config-cache.
21780 # It is not useful on other systems.  If it contains results you don't
21781 # want to keep, you may remove or edit it.
21782 #
21783 # config.status only pays attention to the cache file if you give it
21784 # the --recheck option to rerun configure.
21785 #
21786 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21787 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21788 # following values.
21789
21790 _ACEOF
21791
21792 # The following way of writing the cache mishandles newlines in values,
21793 # but we know of no workaround that is simple, portable, and efficient.
21794 # So, don't put newlines in cache variables' values.
21795 # Ultrix sh set writes to stderr and can't be redirected directly,
21796 # and sets the high bit in the cache file unless we assign to the vars.
21797 {
21798   (set) 2>&1 |
21799     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21800     *ac_space=\ *)
21801       # `set' does not quote correctly, so add quotes (double-quote
21802       # substitution turns \\\\ into \\, and sed turns \\ into \).
21803       sed -n \
21804         "s/'/'\\\\''/g;
21805           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21806       ;;
21807     *)
21808       # `set' quotes correctly as required by POSIX, so do not add quotes.
21809       sed -n \
21810         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21811       ;;
21812     esac;
21813 } |
21814   sed '
21815      t clear
21816      : clear
21817      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21818      t end
21819      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21820      : end' >>confcache
21821 if cmp -s $cache_file confcache; then :; else
21822   if test -w $cache_file; then
21823     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21824     cat confcache >$cache_file
21825   else
21826     echo "not updating unwritable cache $cache_file"
21827   fi
21828 fi
21829 rm -f confcache
21830
21831 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21832 # Let make expand exec_prefix.
21833 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21834
21835 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21836 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21837 # trailing colons and then remove the whole line if VPATH becomes empty
21838 # (actually we leave an empty line to preserve line numbers).
21839 if test "x$srcdir" = x.; then
21840   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21841 s/:*\$(srcdir):*/:/;
21842 s/:*\${srcdir}:*/:/;
21843 s/:*@srcdir@:*/:/;
21844 s/^\([^=]*=[    ]*\):*/\1/;
21845 s/:*$//;
21846 s/^[^=]*=[      ]*$//;
21847 }'
21848 fi
21849
21850 DEFS=-DHAVE_CONFIG_H
21851
21852 : ${CONFIG_STATUS=./config.status}
21853 ac_clean_files_save=$ac_clean_files
21854 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21855 { echo "$as_me:21855: creating $CONFIG_STATUS" >&5
21856 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21857 cat >$CONFIG_STATUS <<_ACEOF
21858 #! $SHELL
21859 # Generated automatically by configure.
21860 # Run this file to recreate the current configuration.
21861 # Compiler output produced by configure, useful for debugging
21862 # configure, is in config.log if it exists.
21863
21864 debug=false
21865 SHELL=\${CONFIG_SHELL-$SHELL}
21866 ac_cs_invocation="\$0 \$@"
21867
21868 _ACEOF
21869
21870 cat >>$CONFIG_STATUS <<\_ACEOF
21871 # Be Bourne compatible
21872 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21873   emulate sh
21874   NULLCMD=:
21875 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21876   set -o posix
21877 fi
21878
21879 # Name of the executable.
21880 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21881
21882 if expr a : '\(a\)' >/dev/null 2>&1; then
21883   as_expr=expr
21884 else
21885   as_expr=false
21886 fi
21887
21888 rm -f conf$$ conf$$.exe conf$$.file
21889 echo >conf$$.file
21890 if ln -s conf$$.file conf$$ 2>/dev/null; then
21891   # We could just check for DJGPP; but this test a) works b) is more generic
21892   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21893   if test -f conf$$.exe; then
21894     # Don't use ln at all; we don't have any links
21895     as_ln_s='cp -p'
21896   else
21897     as_ln_s='ln -s'
21898   fi
21899 elif ln conf$$.file conf$$ 2>/dev/null; then
21900   as_ln_s=ln
21901 else
21902   as_ln_s='cp -p'
21903 fi
21904 rm -f conf$$ conf$$.exe conf$$.file
21905
21906 as_executable_p="test -f"
21907
21908 # Support unset when possible.
21909 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21910   as_unset=unset
21911 else
21912   as_unset=false
21913 fi
21914
21915 # NLS nuisances.
21916 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21917 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21918 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21919 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21920 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21921 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21922 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21923 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21924
21925 # IFS
21926 # We need space, tab and new line, in precisely that order.
21927 as_nl='
21928 '
21929 IFS="   $as_nl"
21930
21931 # CDPATH.
21932 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21933
21934 exec 6>&1
21935
21936 _ACEOF
21937
21938 # Files that config.status was made for.
21939 if test -n "$ac_config_files"; then
21940   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21941 fi
21942
21943 if test -n "$ac_config_headers"; then
21944   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21945 fi
21946
21947 if test -n "$ac_config_links"; then
21948   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21949 fi
21950
21951 if test -n "$ac_config_commands"; then
21952   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21953 fi
21954
21955 cat >>$CONFIG_STATUS <<\EOF
21956
21957 ac_cs_usage="\
21958 \`$as_me' instantiates files from templates according to the
21959 current configuration.
21960
21961 Usage: $0 [OPTIONS] [FILE]...
21962
21963   -h, --help       print this help, then exit
21964   -V, --version    print version number, then exit
21965   -d, --debug      don't remove temporary files
21966       --recheck    update $as_me by reconfiguring in the same conditions
21967   --file=FILE[:TEMPLATE]
21968                    instantiate the configuration file FILE
21969   --header=FILE[:TEMPLATE]
21970                    instantiate the configuration header FILE
21971
21972 Configuration files:
21973 $config_files
21974
21975 Configuration headers:
21976 $config_headers
21977
21978 Configuration commands:
21979 $config_commands
21980
21981 Report bugs to <dickey@invisible-island.net>."
21982 EOF
21983
21984 cat >>$CONFIG_STATUS <<EOF
21985 ac_cs_version="\\
21986 config.status
21987 configured by $0, generated by GNU Autoconf 2.52.20121002,
21988   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21989
21990 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21991 Free Software Foundation, Inc.
21992 This config.status script is free software; the Free Software Foundation
21993 gives unlimited permission to copy, distribute and modify it."
21994 srcdir=$srcdir
21995 INSTALL="$INSTALL"
21996 EOF
21997
21998 cat >>$CONFIG_STATUS <<\EOF
21999 # If no file are specified by the user, then we need to provide default
22000 # value.  By we need to know if files were specified by the user.
22001 ac_need_defaults=:
22002 while test $# != 0
22003 do
22004   case $1 in
22005   --*=*)
22006     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22007     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22008     shift
22009     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22010     shift
22011     ;;
22012   -*);;
22013   *) # This is not an option, so the user has probably given explicit
22014      # arguments.
22015      ac_need_defaults=false;;
22016   esac
22017
22018   case $1 in
22019   # Handling of the options.
22020 EOF
22021 cat >>$CONFIG_STATUS <<EOF
22022   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22023     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22024     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22025 EOF
22026 cat >>$CONFIG_STATUS <<\EOF
22027   --version | --vers* | -V )
22028     echo "$ac_cs_version"; exit 0 ;;
22029   --he | --h)
22030     # Conflict between --help and --header
22031     { { echo "$as_me:22031: error: ambiguous option: $1
22032 Try \`$0 --help' for more information." >&5
22033 echo "$as_me: error: ambiguous option: $1
22034 Try \`$0 --help' for more information." >&2;}
22035    { (exit 1); exit 1; }; };;
22036   --help | --hel | -h )
22037     echo "$ac_cs_usage"; exit 0 ;;
22038   --debug | --d* | -d )
22039     debug=: ;;
22040   --file | --fil | --fi | --f )
22041     shift
22042     CONFIG_FILES="$CONFIG_FILES $1"
22043     ac_need_defaults=false;;
22044   --header | --heade | --head | --hea )
22045     shift
22046     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22047     ac_need_defaults=false;;
22048
22049   # This is an error.
22050   -*) { { echo "$as_me:22050: error: unrecognized option: $1
22051 Try \`$0 --help' for more information." >&5
22052 echo "$as_me: error: unrecognized option: $1
22053 Try \`$0 --help' for more information." >&2;}
22054    { (exit 1); exit 1; }; } ;;
22055
22056   *) ac_config_targets="$ac_config_targets $1" ;;
22057
22058   esac
22059   shift
22060 done
22061
22062 exec 5>>config.log
22063 cat >&5 << _ACEOF
22064
22065 ## ----------------------- ##
22066 ## Running config.status.  ##
22067 ## ----------------------- ##
22068
22069 This file was extended by $as_me 2.52.20121002, executed with
22070   CONFIG_FILES    = $CONFIG_FILES
22071   CONFIG_HEADERS  = $CONFIG_HEADERS
22072   CONFIG_LINKS    = $CONFIG_LINKS
22073   CONFIG_COMMANDS = $CONFIG_COMMANDS
22074   > $ac_cs_invocation
22075 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22076
22077 _ACEOF
22078 EOF
22079
22080 cat >>$CONFIG_STATUS <<EOF
22081 #
22082 # INIT-COMMANDS section.
22083 #
22084
22085 ### Special initialization commands, used to pass information from the
22086 ### configuration-run into config.status
22087
22088 AWK="$AWK"
22089 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22090 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22091 ECHO_LD="$ECHO_LD"
22092 LDCONFIG="$LDCONFIG"
22093 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22094 LIB_NAME="$LIB_NAME"
22095 LIB_PREFIX="$LIB_PREFIX"
22096 LIB_SUBSETS="$LIB_SUBSETS"
22097 LIB_SUFFIX="$LIB_SUFFIX"
22098 LIB_TRACING="$LIB_TRACING"
22099 LN_S="$LN_S"
22100 MAKE_TERMINFO="$MAKE_TERMINFO"
22101 NCURSES_MAJOR="$NCURSES_MAJOR"
22102 NCURSES_MINOR="$NCURSES_MINOR"
22103 NCURSES_OSPEED="$NCURSES_OSPEED"
22104 NCURSES_PATCH="$NCURSES_PATCH"
22105 SRC_SUBDIRS="$SRC_SUBDIRS"
22106 TERMINFO="$TERMINFO"
22107 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22108 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22109 TICS_NAME="$TICS_NAME"
22110 TIC_PATH="$TIC_PATH"
22111 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22112 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22113 TINFO_NAME="$TINFO_NAME"
22114 TINFO_SUFFIX="$TINFO_SUFFIX"
22115 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22116 WITH_CURSES_H="$with_curses_h"
22117 WITH_ECHO="${enable_echo:=yes}"
22118 WITH_OVERWRITE="$with_overwrite"
22119 cf_LIST_MODELS="$cf_list_models"
22120 cf_cv_abi_version="$cf_cv_abi_version"
22121 cf_cv_do_relink="$cf_cv_do_relink"
22122 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22123 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22124 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22125 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22126 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22127 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22128 cf_cv_rel_version="$cf_cv_rel_version"
22129 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22130 cf_cv_shared_soname='$cf_cv_shared_soname'
22131 cf_cv_shlib_version="$cf_cv_shlib_version"
22132 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22133 cf_cv_system_name="$cf_cv_system_name"
22134 cf_cv_term_driver="$with_term_driver"
22135 cf_with_ada="$cf_with_ada"
22136 cf_with_cxx_binding="$cf_with_cxx_binding"
22137 cf_with_db_install="$cf_with_db_install"
22138 cf_with_manpages="$cf_with_manpages"
22139 cf_with_tests="$cf_with_tests"
22140 with_shared_cxx="$with_shared_cxx"
22141 host="$host"
22142 target="$target"
22143
22144 EOF
22145
22146 cat >>$CONFIG_STATUS <<\EOF
22147 for ac_config_target in $ac_config_targets
22148 do
22149   case "$ac_config_target" in
22150   # Handling of arguments.
22151   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22152   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22153   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22154   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22155   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22156   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22157   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22158   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22159   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22160   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22161   *) { { echo "$as_me:22161: error: invalid argument: $ac_config_target" >&5
22162 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22163    { (exit 1); exit 1; }; };;
22164   esac
22165 done
22166
22167 # If the user did not use the arguments to specify the items to instantiate,
22168 # then the envvar interface is used.  Set only those that are not.
22169 # We use the long form for the default assignment because of an extremely
22170 # bizarre bug on SunOS 4.1.3.
22171 if $ac_need_defaults; then
22172   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22173   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22174   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22175 fi
22176
22177 # Create a temporary directory, and hook for its removal unless debugging.
22178 $debug ||
22179 {
22180   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22181   trap '{ (exit 1); exit 1; }' 1 2 13 15
22182 }
22183
22184 # Create a (secure) tmp directory for tmp files.
22185 : ${TMPDIR=/tmp}
22186 {
22187   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22188   test -n "$tmp" && test -d "$tmp"
22189 }  ||
22190 {
22191   tmp=$TMPDIR/cs$$-$RANDOM
22192   (umask 077 && mkdir $tmp)
22193 } ||
22194 {
22195    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22196    { (exit 1); exit 1; }
22197 }
22198
22199 EOF
22200
22201 cat >>$CONFIG_STATUS <<EOF
22202
22203 #
22204 # CONFIG_FILES section.
22205 #
22206
22207 # No need to generate the scripts if there are no CONFIG_FILES.
22208 # This happens for instance when ./config.status config.h
22209 if test -n "\$CONFIG_FILES"; then
22210   # Protect against being on the right side of a sed subst in config.status.
22211   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22212    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22213 s,@SHELL@,$SHELL,;t t
22214 s,@exec_prefix@,$exec_prefix,;t t
22215 s,@prefix@,$prefix,;t t
22216 s,@program_transform_name@,$program_transform_name,;t t
22217 s,@bindir@,$bindir,;t t
22218 s,@sbindir@,$sbindir,;t t
22219 s,@libexecdir@,$libexecdir,;t t
22220 s,@datarootdir@,$datarootdir,;t t
22221 s,@datadir@,$datadir,;t t
22222 s,@sysconfdir@,$sysconfdir,;t t
22223 s,@sharedstatedir@,$sharedstatedir,;t t
22224 s,@localstatedir@,$localstatedir,;t t
22225 s,@libdir@,$libdir,;t t
22226 s,@includedir@,$includedir,;t t
22227 s,@oldincludedir@,$oldincludedir,;t t
22228 s,@infodir@,$infodir,;t t
22229 s,@mandir@,$mandir,;t t
22230 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22231 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22232 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22233 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22234 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22235 s,@build_alias@,$build_alias,;t t
22236 s,@host_alias@,$host_alias,;t t
22237 s,@target_alias@,$target_alias,;t t
22238 s,@ECHO_C@,$ECHO_C,;t t
22239 s,@ECHO_N@,$ECHO_N,;t t
22240 s,@ECHO_T@,$ECHO_T,;t t
22241 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22242 s,@DEFS@,$DEFS,;t t
22243 s,@LIBS@,$LIBS,;t t
22244 s,@top_builddir@,$top_builddir,;t t
22245 s,@EGREP@,$EGREP,;t t
22246 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22247 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22248 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22249 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22250 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22251 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22252 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22253 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22254 s,@build@,$build,;t t
22255 s,@build_cpu@,$build_cpu,;t t
22256 s,@build_vendor@,$build_vendor,;t t
22257 s,@build_os@,$build_os,;t t
22258 s,@host@,$host,;t t
22259 s,@host_cpu@,$host_cpu,;t t
22260 s,@host_vendor@,$host_vendor,;t t
22261 s,@host_os@,$host_os,;t t
22262 s,@target@,$target,;t t
22263 s,@target_cpu@,$target_cpu,;t t
22264 s,@target_vendor@,$target_vendor,;t t
22265 s,@target_os@,$target_os,;t t
22266 s,@CC@,$CC,;t t
22267 s,@CFLAGS@,$CFLAGS,;t t
22268 s,@LDFLAGS@,$LDFLAGS,;t t
22269 s,@CPPFLAGS@,$CPPFLAGS,;t t
22270 s,@ac_ct_CC@,$ac_ct_CC,;t t
22271 s,@EXEEXT@,$EXEEXT,;t t
22272 s,@OBJEXT@,$OBJEXT,;t t
22273 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22274 s,@CPP@,$CPP,;t t
22275 s,@LDCONFIG@,$LDCONFIG,;t t
22276 s,@CXX@,$CXX,;t t
22277 s,@CXXFLAGS@,$CXXFLAGS,;t t
22278 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22279 s,@AWK@,$AWK,;t t
22280 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22281 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22282 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22283 s,@LINT@,$LINT,;t t
22284 s,@LINT_OPTS@,$LINT_OPTS,;t t
22285 s,@LN_S@,$LN_S,;t t
22286 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22287 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22288 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22289 s,@SET_MAKE@,$SET_MAKE,;t t
22290 s,@CTAGS@,$CTAGS,;t t
22291 s,@ETAGS@,$ETAGS,;t t
22292 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22293 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22294 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22295 s,@RANLIB@,$RANLIB,;t t
22296 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22297 s,@LD@,$LD,;t t
22298 s,@ac_ct_LD@,$ac_ct_LD,;t t
22299 s,@AR@,$AR,;t t
22300 s,@ac_ct_AR@,$ac_ct_AR,;t t
22301 s,@NM@,$NM,;t t
22302 s,@ac_ct_NM@,$ac_ct_NM,;t t
22303 s,@ARFLAGS@,$ARFLAGS,;t t
22304 s,@DESTDIR@,$DESTDIR,;t t
22305 s,@BUILD_CC@,$BUILD_CC,;t t
22306 s,@BUILD_CPP@,$BUILD_CPP,;t t
22307 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22308 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22309 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22310 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22311 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22312 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22313 s,@cf_list_models@,$cf_list_models,;t t
22314 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22315 s,@LIBTOOL@,$LIBTOOL,;t t
22316 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22317 s,@LT_UNDEF@,$LT_UNDEF,;t t
22318 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22319 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22320 s,@LIB_CREATE@,$LIB_CREATE,;t t
22321 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22322 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22323 s,@LIB_PREP@,$LIB_PREP,;t t
22324 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22325 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22326 s,@LIB_LINK@,$LIB_LINK,;t t
22327 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22328 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22329 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22330 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22331 s,@TICS_NAME@,$TICS_NAME,;t t
22332 s,@TINFO_NAME@,$TINFO_NAME,;t t
22333 s,@LIB_NAME@,$LIB_NAME,;t t
22334 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22335 s,@CC_G_OPT@,$CC_G_OPT,;t t
22336 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22337 s,@LD_MODEL@,$LD_MODEL,;t t
22338 s,@shlibdir@,$shlibdir,;t t
22339 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22340 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22341 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22342 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22343 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22344 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22345 s,@LINK_PROGS@,$LINK_PROGS,;t t
22346 s,@LINK_TESTS@,$LINK_TESTS,;t t
22347 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22348 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22349 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22350 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22351 s,@RPATH_LIST@,$RPATH_LIST,;t t
22352 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22353 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22354 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22355 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22356 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22357 s,@XTERM_KBS@,$XTERM_KBS,;t t
22358 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22359 s,@TERMINFO@,$TERMINFO,;t t
22360 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22361 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22362 s,@TERMPATH@,$TERMPATH,;t t
22363 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22364 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22365 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22366 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22367 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22368 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22369 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22370 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22371 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22372 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22373 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22374 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22375 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22376 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22377 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22378 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22379 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22380 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22381 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22382 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22383 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22384 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22385 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22386 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22387 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22388 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22389 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22390 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22391 s,@PTHREAD@,$PTHREAD,;t t
22392 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22393 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22394 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22395 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22396 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22397 s,@ECHO_LT@,$ECHO_LT,;t t
22398 s,@ECHO_LD@,$ECHO_LD,;t t
22399 s,@RULE_CC@,$RULE_CC,;t t
22400 s,@SHOW_CC@,$SHOW_CC,;t t
22401 s,@ECHO_CC@,$ECHO_CC,;t t
22402 s,@ECHO_LINK@,$ECHO_LINK,;t t
22403 s,@ADAFLAGS@,$ADAFLAGS,;t t
22404 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22405 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22406 s,@ADA_TRACE@,$ADA_TRACE,;t t
22407 s,@MATH_LIB@,$MATH_LIB,;t t
22408 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22409 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22410 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22411 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22412 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22413 s,@TEST_LIBS@,$TEST_LIBS,;t t
22414 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22415 s,@CXXCPP@,$CXXCPP,;t t
22416 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22417 s,@CXX_AR@,$CXX_AR,;t t
22418 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22419 s,@CXXLIBS@,$CXXLIBS,;t t
22420 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22421 s,@gnat_exists@,$gnat_exists,;t t
22422 s,@M4_exists@,$M4_exists,;t t
22423 s,@cf_ada_make@,$cf_ada_make,;t t
22424 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22425 s,@cf_compile_generics@,$cf_compile_generics,;t t
22426 s,@cf_generic_objects@,$cf_generic_objects,;t t
22427 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22428 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22429 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22430 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22431 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22432 s,@cf_ada_package@,$cf_ada_package,;t t
22433 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22434 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22435 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22436 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22437 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22438 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22439 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22440 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22441 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22442 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22443 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22444 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22445 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22446 s,@TICS_LIBS@,$TICS_LIBS,;t t
22447 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22448 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22449 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22450 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22451 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22452 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22453 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22454 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22455 s,@includesubdir@,$includesubdir,;t t
22456 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22457 s,@TICS_LIST@,$TICS_LIST,;t t
22458 s,@TINFO_LIST@,$TINFO_LIST,;t t
22459 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22460 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22461 s,@TEST_ARGS@,$TEST_ARGS,;t t
22462 s,@TEST_DEPS@,$TEST_DEPS,;t t
22463 s,@TEST_ARG2@,$TEST_ARG2,;t t
22464 s,@TEST_DEP2@,$TEST_DEP2,;t t
22465 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22466 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22467 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22468 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22469 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22470 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22471 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22472 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22473 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22474 s,@cross_compiling@,$cross_compiling,;t t
22475 s,@TIC_PATH@,$TIC_PATH,;t t
22476 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22477 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22478 s,@PANEL_NAME@,$PANEL_NAME,;t t
22479 s,@MENU_NAME@,$MENU_NAME,;t t
22480 s,@FORM_NAME@,$FORM_NAME,;t t
22481 s,@CXX_NAME@,$CXX_NAME,;t t
22482 CEOF
22483
22484 EOF
22485
22486   cat >>$CONFIG_STATUS <<\EOF
22487   # Split the substitutions into bite-sized pieces for seds with
22488   # small command number limits, like on Digital OSF/1 and HP-UX.
22489   ac_max_sed_lines=48
22490   ac_sed_frag=1 # Number of current file.
22491   ac_beg=1 # First line for current file.
22492   ac_end=$ac_max_sed_lines # Line after last line for current file.
22493   ac_more_lines=:
22494   ac_sed_cmds=
22495   while $ac_more_lines; do
22496     if test $ac_beg -gt 1; then
22497       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22498     else
22499       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22500     fi
22501     if test ! -s $tmp/subs.frag; then
22502       ac_more_lines=false
22503     else
22504       # The purpose of the label and of the branching condition is to
22505       # speed up the sed processing (if there are no `@' at all, there
22506       # is no need to browse any of the substitutions).
22507       # These are the two extra sed commands mentioned above.
22508       (echo ':t
22509   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22510       if test -z "$ac_sed_cmds"; then
22511         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22512       else
22513         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22514       fi
22515       ac_sed_frag=`expr $ac_sed_frag + 1`
22516       ac_beg=$ac_end
22517       ac_end=`expr $ac_end + $ac_max_sed_lines`
22518     fi
22519   done
22520   if test -z "$ac_sed_cmds"; then
22521     ac_sed_cmds=cat
22522   fi
22523 fi # test -n "$CONFIG_FILES"
22524
22525 EOF
22526 cat >>$CONFIG_STATUS <<\EOF
22527 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22528   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22529   case $ac_file in
22530   - | *:- | *:-:* ) # input from stdin
22531         cat >$tmp/stdin
22532         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22533         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22534   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22535         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22536   * )   ac_file_in=$ac_file.in ;;
22537   esac
22538
22539   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22540   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22541          X"$ac_file" : 'X\(//\)[^/]' \| \
22542          X"$ac_file" : 'X\(//\)$' \| \
22543          X"$ac_file" : 'X\(/\)' \| \
22544          .     : '\(.\)' 2>/dev/null ||
22545 echo X"$ac_file" |
22546     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22547           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22548           /^X\(\/\/\)$/{ s//\1/; q; }
22549           /^X\(\/\).*/{ s//\1/; q; }
22550           s/.*/./; q'`
22551   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22552     { case "$ac_dir" in
22553   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22554   *)                      as_incr_dir=.;;
22555 esac
22556 as_dummy="$ac_dir"
22557 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22558   case $as_mkdir_dir in
22559     # Skip DOS drivespec
22560     ?:) as_incr_dir=$as_mkdir_dir ;;
22561     *)
22562       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22563       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22564     ;;
22565   esac
22566 done; }
22567
22568     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22569     # A "../" for each directory in $ac_dir_suffix.
22570     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22571   else
22572     ac_dir_suffix= ac_dots=
22573   fi
22574
22575   case $srcdir in
22576   .)  ac_srcdir=.
22577       if test -z "$ac_dots"; then
22578          ac_top_srcdir=.
22579       else
22580          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22581       fi ;;
22582   [\\/]* | ?:[\\/]* )
22583       ac_srcdir=$srcdir$ac_dir_suffix;
22584       ac_top_srcdir=$srcdir ;;
22585   *) # Relative path.
22586     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22587     ac_top_srcdir=$ac_dots$srcdir ;;
22588   esac
22589
22590   case $INSTALL in
22591   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22592   *) ac_INSTALL=$ac_dots$INSTALL ;;
22593   esac
22594
22595   if test x"$ac_file" != x-; then
22596     { echo "$as_me:22596: creating $ac_file" >&5
22597 echo "$as_me: creating $ac_file" >&6;}
22598     rm -f "$ac_file"
22599   fi
22600   # Let's still pretend it is `configure' which instantiates (i.e., don't
22601   # use $as_me), people would be surprised to read:
22602   #    /* config.h.  Generated automatically by config.status.  */
22603   configure_input="Generated automatically from `echo $ac_file_in |
22604                                                  sed 's,.*/,,'` by configure."
22605
22606   # First look for the input files in the build tree, otherwise in the
22607   # src tree.
22608   ac_file_inputs=`IFS=:
22609     for f in $ac_file_in; do
22610       case $f in
22611       -) echo $tmp/stdin ;;
22612       [\\/$]*)
22613          # Absolute (can't be DOS-style, as IFS=:)
22614          test -f "$f" || { { echo "$as_me:22614: error: cannot find input file: $f" >&5
22615 echo "$as_me: error: cannot find input file: $f" >&2;}
22616    { (exit 1); exit 1; }; }
22617          echo $f;;
22618       *) # Relative
22619          if test -f "$f"; then
22620            # Build tree
22621            echo $f
22622          elif test -f "$srcdir/$f"; then
22623            # Source tree
22624            echo $srcdir/$f
22625          else
22626            # /dev/null tree
22627            { { echo "$as_me:22627: error: cannot find input file: $f" >&5
22628 echo "$as_me: error: cannot find input file: $f" >&2;}
22629    { (exit 1); exit 1; }; }
22630          fi;;
22631       esac
22632     done` || { (exit 1); exit 1; }
22633 EOF
22634 cat >>$CONFIG_STATUS <<\EOF
22635   ac_warn_datarootdir=no
22636   if test x"$ac_file" != x-; then
22637     for ac_item in $ac_file_inputs
22638     do
22639       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22640       if test -n "$ac_seen"; then
22641         ac_used=`grep '@datarootdir@' $ac_item`
22642         if test -z "$ac_used"; then
22643           { echo "$as_me:22643: WARNING: datarootdir was used implicitly but not set:
22644 $ac_seen" >&5
22645 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22646 $ac_seen" >&2;}
22647           ac_warn_datarootdir=yes
22648         fi
22649       fi
22650       ac_seen=`grep '${datarootdir}' $ac_item`
22651       if test -n "$ac_seen"; then
22652         { echo "$as_me:22652: WARNING: datarootdir was used explicitly but not set:
22653 $ac_seen" >&5
22654 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22655 $ac_seen" >&2;}
22656         ac_warn_datarootdir=yes
22657       fi
22658     done
22659   fi
22660
22661 if test "x$ac_warn_datarootdir" = xyes; then
22662   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22663 fi
22664
22665 EOF
22666 cat >>$CONFIG_STATUS <<EOF
22667   sed "$ac_vpsub
22668 $extrasub
22669 EOF
22670 cat >>$CONFIG_STATUS <<\EOF
22671 :t
22672 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22673 s,@configure_input@,$configure_input,;t t
22674 s,@srcdir@,$ac_srcdir,;t t
22675 s,@top_srcdir@,$ac_top_srcdir,;t t
22676 s,@INSTALL@,$ac_INSTALL,;t t
22677 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22678   rm -f $tmp/stdin
22679   if test x"$ac_file" != x-; then
22680     cp $tmp/out $ac_file
22681
22682     for ac_name in prefix exec_prefix datarootdir
22683     do
22684         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22685         if test -n "$ac_seen"; then
22686             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22687             if test -z "$ac_init"; then
22688               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22689               { echo "$as_me:22689: WARNING: Variable $ac_name is used but was not set:
22690 $ac_seen" >&5
22691 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22692 $ac_seen" >&2;}
22693             fi
22694         fi
22695     done
22696     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22697     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22698     if test -s $tmp/out; then
22699       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22700       { echo "$as_me:22700: WARNING: Some variables may not be substituted:
22701 $ac_seen" >&5
22702 echo "$as_me: WARNING: Some variables may not be substituted:
22703 $ac_seen" >&2;}
22704     fi
22705   else
22706     cat $tmp/out
22707   fi
22708   rm -f $tmp/out
22709
22710 done
22711 EOF
22712 cat >>$CONFIG_STATUS <<\EOF
22713
22714 #
22715 # CONFIG_HEADER section.
22716 #
22717
22718 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22719 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22720 #
22721 # ac_d sets the value in "#define NAME VALUE" lines.
22722 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22723 ac_dB='[        ].*$,\1#\2'
22724 ac_dC=' '
22725 ac_dD=',;t'
22726 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22727 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22728 ac_iB='\([      ]\),\1#\2define\3'
22729 ac_iC=' '
22730 ac_iD='\4,;t'
22731 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22732 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22733 ac_uB='$,\1#\2define\3'
22734 ac_uC=' '
22735 ac_uD=',;t'
22736
22737 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22738   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22739   case $ac_file in
22740   - | *:- | *:-:* ) # input from stdin
22741         cat >$tmp/stdin
22742         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22743         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22744   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22745         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22746   * )   ac_file_in=$ac_file.in ;;
22747   esac
22748
22749   test x"$ac_file" != x- && { echo "$as_me:22749: creating $ac_file" >&5
22750 echo "$as_me: creating $ac_file" >&6;}
22751
22752   # First look for the input files in the build tree, otherwise in the
22753   # src tree.
22754   ac_file_inputs=`IFS=:
22755     for f in $ac_file_in; do
22756       case $f in
22757       -) echo $tmp/stdin ;;
22758       [\\/$]*)
22759          # Absolute (can't be DOS-style, as IFS=:)
22760          test -f "$f" || { { echo "$as_me:22760: error: cannot find input file: $f" >&5
22761 echo "$as_me: error: cannot find input file: $f" >&2;}
22762    { (exit 1); exit 1; }; }
22763          echo $f;;
22764       *) # Relative
22765          if test -f "$f"; then
22766            # Build tree
22767            echo $f
22768          elif test -f "$srcdir/$f"; then
22769            # Source tree
22770            echo $srcdir/$f
22771          else
22772            # /dev/null tree
22773            { { echo "$as_me:22773: error: cannot find input file: $f" >&5
22774 echo "$as_me: error: cannot find input file: $f" >&2;}
22775    { (exit 1); exit 1; }; }
22776          fi;;
22777       esac
22778     done` || { (exit 1); exit 1; }
22779   # Remove the trailing spaces.
22780   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22781
22782 EOF
22783
22784 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22785 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22786 # be either 'cat' or 'sort'.
22787 cat confdefs.h | uniq >conftest.vals
22788
22789 # Break up conftest.vals because some shells have a limit on
22790 # the size of here documents, and old seds have small limits too.
22791
22792 rm -f conftest.tail
22793 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22794 while grep . conftest.vals >/dev/null
22795 do
22796   # Write chunks of a limited-size here document to conftest.frag.
22797   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22798   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22799   echo 'CEOF' >> $CONFIG_STATUS
22800   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22801   rm -f conftest.vals
22802   mv conftest.tail conftest.vals
22803 done
22804 rm -f conftest.vals
22805
22806 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22807 # marker @DEFS@.
22808 echo '  cat >> conftest.edit <<CEOF
22809 /@DEFS@/r conftest.frag
22810 /@DEFS@/d
22811 CEOF
22812 sed -f conftest.edit $tmp/in > $tmp/out
22813 rm -f $tmp/in
22814 mv $tmp/out $tmp/in
22815 rm -f conftest.edit conftest.frag
22816 ' >> $CONFIG_STATUS
22817
22818 cat >>$CONFIG_STATUS <<\EOF
22819   # Let's still pretend it is `configure' which instantiates (i.e., don't
22820   # use $as_me), people would be surprised to read:
22821   #    /* config.h.  Generated automatically by config.status.  */
22822   if test x"$ac_file" = x-; then
22823     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22824   else
22825     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22826   fi
22827   cat $tmp/in >>$tmp/config.h
22828   rm -f $tmp/in
22829   if test x"$ac_file" != x-; then
22830     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22831       { echo "$as_me:22831: $ac_file is unchanged" >&5
22832 echo "$as_me: $ac_file is unchanged" >&6;}
22833     else
22834       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22835          X"$ac_file" : 'X\(//\)[^/]' \| \
22836          X"$ac_file" : 'X\(//\)$' \| \
22837          X"$ac_file" : 'X\(/\)' \| \
22838          .     : '\(.\)' 2>/dev/null ||
22839 echo X"$ac_file" |
22840     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22841           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22842           /^X\(\/\/\)$/{ s//\1/; q; }
22843           /^X\(\/\).*/{ s//\1/; q; }
22844           s/.*/./; q'`
22845       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22846         { case "$ac_dir" in
22847   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22848   *)                      as_incr_dir=.;;
22849 esac
22850 as_dummy="$ac_dir"
22851 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22852   case $as_mkdir_dir in
22853     # Skip DOS drivespec
22854     ?:) as_incr_dir=$as_mkdir_dir ;;
22855     *)
22856       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22857       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22858     ;;
22859   esac
22860 done; }
22861
22862       fi
22863       rm -f $ac_file
22864       mv $tmp/config.h $ac_file
22865     fi
22866   else
22867     cat $tmp/config.h
22868     rm -f $tmp/config.h
22869   fi
22870 done
22871 EOF
22872 cat >>$CONFIG_STATUS <<\EOF
22873 #
22874 # CONFIG_COMMANDS section.
22875 #
22876 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22877   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22878   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22879
22880   case $ac_dest in
22881     default )
22882 if test "x$cf_with_tests" != xno ; then
22883
22884 for cf_dir in test
22885 do
22886         if test ! -d $srcdir/$cf_dir; then
22887                 continue
22888         elif test -f $srcdir/$cf_dir/programs; then
22889                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22890         fi
22891 done
22892
22893 fi
22894
22895 cf_prefix=$LIB_PREFIX
22896
22897 case $cf_cv_shlib_version in #(vi
22898 cygdll|msysdll|mingw)
22899         TINFO_NAME=$TINFO_ARG_SUFFIX
22900         TINFO_SUFFIX=.dll
22901         ;;
22902 esac
22903
22904 if test -n "$TINFO_SUFFIX" ; then
22905         case $TINFO_SUFFIX in
22906         tw*)
22907                 TINFO_NAME="${TINFO_NAME}tw"
22908                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22909                 ;;
22910         t*)
22911                 TINFO_NAME="${TINFO_NAME}t"
22912                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22913                 ;;
22914         w*)
22915                 TINFO_NAME="${TINFO_NAME}w"
22916                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22917                 ;;
22918         esac
22919 fi
22920
22921 for cf_dir in $SRC_SUBDIRS
22922 do
22923         if test ! -d $srcdir/$cf_dir ; then
22924                 continue
22925         elif test -f $srcdir/$cf_dir/modules; then
22926
22927                 SHARED_LIB=
22928                 Libs_To_Make=
22929                 for cf_item in $cf_LIST_MODELS
22930                 do
22931
22932         case X$cf_item in #(vi
22933         Xlibtool) #(vi
22934                 cf_suffix='.la'
22935                 cf_depsuf=$cf_suffix
22936                 ;;
22937         Xdebug) #(vi
22938                 cf_suffix='_g.a'
22939                 cf_depsuf=$cf_suffix
22940                 ;;
22941         Xprofile) #(vi
22942                 cf_suffix='_p.a'
22943                 cf_depsuf=$cf_suffix
22944                 ;;
22945         Xshared) #(vi
22946                 case $cf_cv_system_name in
22947                 aix[5-7]*) #(vi
22948                         cf_suffix='.so'
22949                         cf_depsuf=$cf_suffix
22950                         ;;
22951                 cygwin*|msys*|mingw*) #(vi
22952                         cf_suffix='.dll'
22953                         cf_depsuf='.dll.a'
22954                         ;;
22955                 darwin*) #(vi
22956                         cf_suffix='.dylib'
22957                         cf_depsuf=$cf_suffix
22958                         ;;
22959                 hpux*) #(vi
22960                         case $target in
22961                         ia64*) #(vi
22962                                 cf_suffix='.so'
22963                                 cf_depsuf=$cf_suffix
22964                                 ;;
22965                         *) #(vi
22966                                 cf_suffix='.sl'
22967                                 cf_depsuf=$cf_suffix
22968                                 ;;
22969                         esac
22970                         ;;
22971                 *) #(vi
22972                         cf_suffix='.so'
22973                         cf_depsuf=$cf_suffix
22974                         ;;
22975                 esac
22976                 ;;
22977         *)
22978                 cf_suffix='.a'
22979                 cf_depsuf=$cf_suffix
22980                 ;;
22981         esac
22982         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22983         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22984
22985                         cf_libname=$cf_dir
22986                         test "$cf_dir" = c++ && cf_libname=ncurses++
22987                         if test $cf_item = shared ; then
22988                                 if test -n "${LIB_SUFFIX}"
22989                                 then
22990                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22991                                 else
22992                                         cf_shared_suffix="$cf_suffix"
22993                                 fi
22994                                 if test "$cf_cv_do_symlinks" = yes ; then
22995                                         cf_version_name=
22996
22997                                         case "$cf_cv_shlib_version" in #(vi
22998                                         rel) #(vi
22999                                                 cf_version_name=REL_VERSION
23000                                                 ;;
23001                                         abi)
23002                                                 cf_version_name=ABI_VERSION
23003                                                 ;;
23004                                         esac
23005
23006                                         if test -n "$cf_version_name"
23007                                         then
23008                                                 case "$cf_cv_system_name" in #(vi
23009                                                 darwin*)
23010                                                         # "w", etc?
23011                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23012                                                         ;; #(vi
23013                                                 *)
23014                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23015                                                         ;;
23016                                                 esac
23017                                         fi
23018                                         if test -n "${LIB_SUFFIX}"
23019                                         then
23020                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23021                                         else
23022                                                 cf_shared_suffix="$cf_suffix"
23023                                         fi
23024                                 fi
23025                                 # cygwin needs import library, and has unique naming convention
23026                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23027                                 # use 'cyg' prefix for shared lib.
23028                                 case $cf_cv_shlib_version in #(vi
23029                                 cygdll) #(vi
23030                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23031                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23032                                         continue
23033                                         ;;
23034                                 msysdll) #(vi
23035                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23036                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23037                                         continue
23038                                         ;;
23039                                 mingw)
23040                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23041                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23042                                         continue
23043                                         ;;
23044                                 esac
23045                         fi
23046                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23047                 done
23048
23049                 if test $cf_dir = ncurses ; then
23050                         cf_subsets="$LIB_SUBSETS"
23051                         cf_r_parts="$cf_subsets"
23052                         cf_liblist="$Libs_To_Make"
23053
23054                         while test -n "$cf_r_parts"
23055                         do
23056                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23057                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23058                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23059                                         cf_item=
23060                                         case $cf_l_parts in #(vi
23061                                         *termlib*) #(vi
23062                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23063                                                 ;;
23064                                         *ticlib*)
23065                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23066                                                 ;;
23067                                         *)
23068                                                 break
23069                                                 ;;
23070                                         esac
23071                                         if test -n "$cf_item"; then
23072                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23073                                         fi
23074                                 else
23075                                         break
23076                                 fi
23077                         done
23078                 else
23079                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23080                 fi
23081
23082                 if test $cf_dir = c++; then
23083                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23084                                 cf_list=
23085                                 for cf_item in $Libs_To_Make
23086                                 do
23087                                         case $cf_item in
23088                                         *.a)
23089                                                 ;;
23090                                         *)
23091                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23092                                                 ;;
23093                                         esac
23094                                         for cf_test in $cf_list
23095                                         do
23096                                                 if test "$cf_test" = "$cf_item"
23097                                                 then
23098                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23099                                                         cf_item=
23100                                                         break
23101                                                 fi
23102                                         done
23103                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23104                                 done
23105                                 Libs_To_Make="$cf_list"
23106                         fi
23107                 fi
23108
23109                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23110                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23111                         $cf_dir/Makefile >$cf_dir/Makefile.out
23112                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23113
23114                 $AWK -f $srcdir/mk-0th.awk \
23115                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23116                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23117
23118                 for cf_subset in $cf_subsets
23119                 do
23120                         cf_subdirs=
23121                         for cf_item in $cf_LIST_MODELS
23122                         do
23123
23124                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23125
23126 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23127
23128                         CXX_MODEL=$cf_ITEM
23129                         if test "$CXX_MODEL" = SHARED; then
23130                                 case $cf_cv_shlib_version in #(vi
23131                                 cygdll|msysdll|mingw) #(vi
23132                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23133
23134 echo "${as_me:-configure}:23134: testing overriding CXX_MODEL to SHARED ..." 1>&5
23135
23136                                         with_shared_cxx=yes
23137                                         ;;
23138                                 *)
23139                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23140                                         ;;
23141                                 esac
23142                         fi
23143
23144         case X$cf_item in #(vi
23145         Xlibtool) #(vi
23146                 cf_suffix='.la'
23147                 cf_depsuf=$cf_suffix
23148                 ;;
23149         Xdebug) #(vi
23150                 cf_suffix='_g.a'
23151                 cf_depsuf=$cf_suffix
23152                 ;;
23153         Xprofile) #(vi
23154                 cf_suffix='_p.a'
23155                 cf_depsuf=$cf_suffix
23156                 ;;
23157         Xshared) #(vi
23158                 case $cf_cv_system_name in
23159                 aix[5-7]*) #(vi
23160                         cf_suffix='.so'
23161                         cf_depsuf=$cf_suffix
23162                         ;;
23163                 cygwin*|msys*|mingw*) #(vi
23164                         cf_suffix='.dll'
23165                         cf_depsuf='.dll.a'
23166                         ;;
23167                 darwin*) #(vi
23168                         cf_suffix='.dylib'
23169                         cf_depsuf=$cf_suffix
23170                         ;;
23171                 hpux*) #(vi
23172                         case $target in
23173                         ia64*) #(vi
23174                                 cf_suffix='.so'
23175                                 cf_depsuf=$cf_suffix
23176                                 ;;
23177                         *) #(vi
23178                                 cf_suffix='.sl'
23179                                 cf_depsuf=$cf_suffix
23180                                 ;;
23181                         esac
23182                         ;;
23183                 *) #(vi
23184                         cf_suffix='.so'
23185                         cf_depsuf=$cf_suffix
23186                         ;;
23187                 esac
23188                 ;;
23189         *)
23190                 cf_suffix='.a'
23191                 cf_depsuf=$cf_suffix
23192                 ;;
23193         esac
23194         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23195         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23196
23197         case $cf_item in
23198         libtool) cf_subdir='obj_lo'  ;;
23199         normal)  cf_subdir='objects' ;;
23200         debug)   cf_subdir='obj_g' ;;
23201         profile) cf_subdir='obj_p' ;;
23202         shared)
23203                 case $cf_cv_system_name in #(vi
23204                 cygwin|msys) #(vi
23205                         cf_subdir='objects' ;;
23206                 *)
23207                         cf_subdir='obj_s' ;;
23208                 esac
23209         esac
23210
23211                         # Test for case where we build libtinfo with a different name.
23212                         cf_libname=$cf_dir
23213                         if test $cf_dir = ncurses ; then
23214                                 case $cf_subset in
23215                                 *base*)
23216                                         cf_libname=${cf_libname}$LIB_SUFFIX
23217                                         ;;
23218                                 *termlib*)
23219                                         cf_libname=$TINFO_LIB_SUFFIX
23220                                         ;;
23221                                 ticlib*)
23222                                         cf_libname=$TICS_LIB_SUFFIX
23223                                         ;;
23224                                 esac
23225                         elif test $cf_dir = c++ ; then
23226                                 cf_libname=ncurses++$LIB_SUFFIX
23227                         else
23228                                 cf_libname=${cf_libname}$LIB_SUFFIX
23229                         fi
23230                         if test -n "${DFT_ARG_SUFFIX}" ; then
23231                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23232                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23233                         fi
23234
23235                         # These dependencies really are for development, not
23236                         # builds, but they are useful in porting, too.
23237                         cf_depend="../include/ncurses_cfg.h"
23238                         if test "$srcdir" = "."; then
23239                                 cf_reldir="."
23240                         else
23241                                 cf_reldir="\${srcdir}"
23242                         fi
23243
23244                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23245                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23246                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23247                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23248                         fi
23249
23250                         cf_dir_suffix=
23251                         old_cf_suffix="$cf_suffix"
23252                         if test "$cf_cv_shlib_version_infix" = yes ; then
23253                         if test -n "$LIB_SUFFIX" ; then
23254                                 case $LIB_SUFFIX in
23255                                 tw*)
23256                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23257                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23258                                         cf_dir_suffix=tw
23259                                         ;;
23260                                 t*)
23261                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23262                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23263                                         cf_dir_suffix=t
23264                                         ;;
23265                                 w*)
23266                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23267                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23268                                         cf_dir_suffix=w
23269                                         ;;
23270                                 esac
23271                         fi
23272                         fi
23273
23274                         $AWK -f $srcdir/mk-1st.awk \
23275                                 name=${cf_libname}${cf_dir_suffix} \
23276                                 traces=$LIB_TRACING \
23277                                 MODEL=$cf_ITEM \
23278                                 CXX_MODEL=$CXX_MODEL \
23279                                 model=$cf_subdir \
23280                                 prefix=$cf_prefix \
23281                                 suffix=$cf_suffix \
23282                                 subset=$cf_subset \
23283                                 driver=$cf_cv_term_driver \
23284                                 SymLink="$LN_S" \
23285                                 TermlibRoot=$TINFO_NAME \
23286                                 TermlibSuffix=$TINFO_SUFFIX \
23287                                 ShlibVer=$cf_cv_shlib_version \
23288                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23289                                 ReLink=${cf_cv_do_relink:-no} \
23290                                 DoLinks=$cf_cv_do_symlinks \
23291                                 rmSoLocs=$cf_cv_rm_so_locs \
23292                                 ldconfig="$LDCONFIG" \
23293                                 overwrite=$WITH_OVERWRITE \
23294                                 depend="$cf_depend" \
23295                                 host="$host" \
23296                                 libtool_version="$LIBTOOL_VERSION" \
23297                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23298
23299                         cf_suffix="$old_cf_suffix"
23300
23301                         for cf_subdir2 in $cf_subdirs lib
23302                         do
23303                                 test $cf_subdir = $cf_subdir2 && break
23304                         done
23305                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23306                         $AWK -f $srcdir/mk-2nd.awk \
23307                                 name=$cf_dir \
23308                                 traces=$LIB_TRACING \
23309                                 MODEL=$cf_ITEM \
23310                                 model=$cf_subdir \
23311                                 subset=$cf_subset \
23312                                 srcdir=$srcdir \
23313                                 echo=$WITH_ECHO \
23314                                 crenames=$cf_cv_prog_CC_c_o \
23315                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23316                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23317                         cf_subdirs="$cf_subdirs $cf_subdir"
23318                         done
23319                 done
23320         fi
23321
23322         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23323 done
23324
23325 for cf_dir in $SRC_SUBDIRS
23326 do
23327         if test ! -d $srcdir/$cf_dir ; then
23328                 continue
23329         fi
23330
23331         if test -f $cf_dir/Makefile ; then
23332                 case "$cf_dir" in
23333                 Ada95) #(vi
23334                         echo 'libs \' >> Makefile
23335                         echo 'install.libs \' >> Makefile
23336                         echo 'uninstall.libs ::' >> Makefile
23337                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23338                         ;;
23339                 esac
23340         fi
23341
23342         if test -f $srcdir/$cf_dir/modules; then
23343                 echo >> Makefile
23344                 if test -f $srcdir/$cf_dir/headers; then
23345 cat >> Makefile <<CF_EOF
23346 install.includes \\
23347 uninstall.includes \\
23348 CF_EOF
23349                 fi
23350 if test "$cf_dir" != "c++" ; then
23351 echo 'lint \' >> Makefile
23352 fi
23353 cat >> Makefile <<CF_EOF
23354 libs \\
23355 lintlib \\
23356 install.libs \\
23357 uninstall.libs \\
23358 install.$cf_dir \\
23359 uninstall.$cf_dir ::
23360         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23361 CF_EOF
23362         elif test -f $srcdir/$cf_dir/headers; then
23363 cat >> Makefile <<CF_EOF
23364
23365 libs \\
23366 install.libs \\
23367 uninstall.libs \\
23368 install.includes \\
23369 uninstall.includes ::
23370         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23371 CF_EOF
23372 fi
23373 done
23374
23375 if test "x$cf_with_db_install" = xyes; then
23376 cat >> Makefile <<CF_EOF
23377
23378 install.libs uninstall.libs \\
23379 install.data uninstall.data ::
23380 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23381 CF_EOF
23382 fi
23383
23384 if test "x$cf_with_manpages" = xyes; then
23385 cat >> Makefile <<CF_EOF
23386
23387 install.man \\
23388 uninstall.man ::
23389         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23390 CF_EOF
23391 fi
23392
23393 cat >> Makefile <<CF_EOF
23394
23395 distclean ::
23396         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23397         rm -f headers.sh headers.sed mk_shared_lib.sh
23398         rm -f edit_man.* man_alias.*
23399         rm -rf \${DIRS_TO_MAKE}
23400 CF_EOF
23401
23402 # Special case: tack's manpage lives in its own directory.
23403 if test "x$cf_with_manpages" = xyes; then
23404 if test -d tack ; then
23405 if test -f $srcdir/$tack.h; then
23406 cat >> Makefile <<CF_EOF
23407
23408 install.man \\
23409 uninstall.man ::
23410         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23411 CF_EOF
23412 fi
23413 fi
23414 fi
23415
23416 rm -f headers.sed headers.sh
23417
23418 echo creating headers.sh
23419 cat >headers.sh <<CF_EOF
23420 #! /bin/sh
23421 # This shell script is generated by the 'configure' script.  It is invoked in a
23422 # subdirectory of the build tree.  It generates a sed-script in the parent
23423 # directory that is used to adjust includes for header files that reside in a
23424 # subdirectory of /usr/include, etc.
23425 PRG=""
23426 while test \$# != 3
23427 do
23428 PRG="\$PRG \$1"; shift
23429 done
23430 DST=\$1
23431 REF=\$2
23432 SRC=\$3
23433 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23434 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23435 echo installing \$SRC in \$DST
23436 CF_EOF
23437
23438 if test $WITH_CURSES_H = yes; then
23439         cat >>headers.sh <<CF_EOF
23440 case \$DST in
23441 /*/include/*)
23442         END=\`basename \$DST\`
23443         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23444         do
23445                 NAME=\`basename \$i\`
23446                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23447         done
23448         ;;
23449 *)
23450         echo "" >> \$TMPSED
23451         ;;
23452 esac
23453 CF_EOF
23454
23455 else
23456         cat >>headers.sh <<CF_EOF
23457 case \$DST in
23458 /*/include/*)
23459         END=\`basename \$DST\`
23460         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23461         do
23462                 NAME=\`basename \$i\`
23463                 if test "\$NAME" = "curses.h"
23464                 then
23465                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23466                         NAME=ncurses.h
23467                 fi
23468                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23469         done
23470         ;;
23471 *)
23472         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23473         ;;
23474 esac
23475 CF_EOF
23476 fi
23477 cat >>headers.sh <<CF_EOF
23478 rm -f \$TMPSRC
23479 sed -f \$TMPSED \$SRC > \$TMPSRC
23480 NAME=\`basename \$SRC\`
23481 CF_EOF
23482 if test $WITH_CURSES_H != yes; then
23483         cat >>headers.sh <<CF_EOF
23484 test "\$NAME" = "curses.h" && NAME=ncurses.h
23485 CF_EOF
23486 fi
23487 cat >>headers.sh <<CF_EOF
23488 # Just in case someone gzip'd manpages, remove the conflicting copy.
23489 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23490
23491 eval \$PRG \$TMPSRC \$DST/\$NAME
23492 rm -f \$TMPSRC \$TMPSED
23493 CF_EOF
23494
23495 chmod 0755 headers.sh
23496
23497 for cf_dir in $SRC_SUBDIRS
23498 do
23499         if test ! -d $srcdir/$cf_dir ; then
23500                 continue
23501         fi
23502
23503         if test -f $srcdir/$cf_dir/headers; then
23504                 $AWK -f $srcdir/mk-hdr.awk \
23505                         subset="$LIB_SUBSETS" \
23506                         compat="$WITH_CURSES_H" \
23507                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23508         fi
23509
23510         if test -f $srcdir/$cf_dir/modules; then
23511                 if test "$cf_dir" != "c++" ; then
23512                         cat >>$cf_dir/Makefile <<"CF_EOF"
23513 depend : ${AUTO_SRC}
23514         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23515
23516 # DO NOT DELETE THIS LINE -- make depend depends on it.
23517 CF_EOF
23518                 fi
23519         fi
23520 done
23521
23522 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23523 if test -z "$USE_OLD_MAKERULES" ; then
23524         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23525 fi
23526 fi
23527  ;;
23528   esac
23529 done
23530 EOF
23531
23532 cat >>$CONFIG_STATUS <<\EOF
23533
23534 { (exit 0); exit 0; }
23535 EOF
23536 chmod +x $CONFIG_STATUS
23537 ac_clean_files=$ac_clean_files_save
23538
23539 # configure is writing to config.log, and then calls config.status.
23540 # config.status does its own redirection, appending to config.log.
23541 # Unfortunately, on DOS this fails, as config.log is still kept open
23542 # by configure, so config.status won't be able to write to it; its
23543 # output is simply discarded.  So we exec the FD to /dev/null,
23544 # effectively closing config.log, so it can be properly (re)opened and
23545 # appended to by config.status.  When coming back to configure, we
23546 # need to make the FD available again.
23547 if test "$no_create" != yes; then
23548   ac_cs_success=:
23549   exec 5>/dev/null
23550   $SHELL $CONFIG_STATUS || ac_cs_success=false
23551   exec 5>>config.log
23552   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23553   # would make configure fail if this is the last instruction.
23554   $ac_cs_success || { (exit 1); exit 1; }
23555 fi
23556 ${MAKE:-make} preinstall