]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
7057522092263698d73f14bc9128f9a947d259c6
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.564 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --without-manpages      suppress install of manpages
710   --without-progs         suppress build with programs (e.g., tic)
711   --without-tests         suppress build with test-programs
712   --without-curses-h      install curses.h as ncurses.h only
713   --with-pkg-config{=path} enable/disable use of pkg-config
714   --with-pkg-config-libdir=XXX use given directory for installing pc-files
715   --enable-pc-files       generate and install .pc files for pkg-config
716   --enable-mixed-case     tic should assume mixed-case filenames
717   --with-install-prefix   prefixes actual install-location ($DESTDIR)
718 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
719   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
720   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
721   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
722   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
723   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
724   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
725 Options to Specify the Libraries Built/Used:
726   --disable-libtool-version  enable to use libtool's incompatible naming scheme
727   --with-libtool          generate libraries with libtool
728   --with-shared           generate shared-libraries
729   --with-normal           generate normal-libraries (default)
730   --with-debug            generate debug-libraries (default)
731   --with-profile          generate profile-libraries
732   --with-cxx-shared       generate C++ shared-libraries
733   --with-lib-prefix       override library-prefix
734   --with-termlib          generate separate terminfo library
735   --with-ticlib           generate separate tic library
736   --with-gpm              use Alessandro Rubini's GPM library
737   --without-dlsym         do not use dlsym() to load GPM dynamically
738   --with-sysmouse         use sysmouse (FreeBSD console)
739   --enable-rpath          use rpath option when generating shared libraries
740   --disable-relink        relink shared libraries during install
741   --with-shlib-version=X  Specify rel or abi version for shared libs
742   --disable-rpath-hack    don't add rpath options for additional libraries
743 Fine-Tuning Your Configuration:
744   --disable-overwrite     leave out the link to -lcurses
745   --disable-database      do not use terminfo, only fallbacks/termcap
746   --with-database=XXX     specify terminfo source to install
747   --with-hashed-db        specify hashed-database library
748   --with-fallbacks=XXX    specify list of fallback terminal descriptions
749   --without-xterm-new     specify if xterm terminfo should be old version
750   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
751   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
752   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
753   --disable-big-core      assume machine has little memory
754   --disable-big-strings   assume compiler has only standard-size strings
755   --enable-termcap        compile in termcap fallback support
756   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
757   --enable-getcap         fast termcap load, no xrefs to terminfo
758   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
759   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
760   --disable-root-environ  restrict environment when running as root
761   --enable-symlinks       make tic use symbolic links not hard links
762   --enable-broken_linker  compile with broken-linker support code
763   --enable-bsdpad         recognize BSD-style prefix padding
764   --enable-widec          compile with wide-char/UTF-8 code
765   --disable-lp64          allow chtype to be long (ignore _LP64)
766   --disable-largefile     omit support for large files
767   --disable-tparm-varargs compile tparm() without varargs interface
768   --disable-tic-depends   link tic library without explicit dependency on ncurses library
769   --with-bool=TYPE        override fallback type of bool variable
770   --with-caps=alt         compile with alternate Caps file
771   --with-chtype=TYPE      override type of chtype
772   --with-ospeed=TYPE      override type of ospeed variable
773   --with-mmask-t=TYPE     override type of mmask_t
774   --with-ccharw-max=XXX   override size CCHARW_MAX
775   --with-tparm-arg=TYPE   override parameter type of tparm
776   --with-rcs-ids          compile-in RCS identifiers
777 Options to Specify How Manpages are Installed:
778   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
779                           optionally formatted/catonly, e.g., gzip,formatted
780   --with-manpage-renames  specify manpage-renaming
781   --with-manpage-aliases  specify manpage-aliases using .so
782   --with-manpage-symlinks specify manpage-aliases using symlinks
783   --with-manpage-tbl      specify manpage processing with tbl
784 Extensions:
785   --disable-ext-funcs     disable function-extensions
786   --enable-sp-funcs       enable experimental SCREEN-extensions
787   --enable-term-driver    enable experimental terminal-driver
788   --enable-const          compile with extra/non-standard const
789   --enable-ext-colors     compile for 256-color support
790   --enable-ext-mouse      compile for extended mouse-encoding
791   --enable-no-padding     compile with $NCURSES_NO_PADDING code
792   --enable-signed-char    compile using signed Boolean's in term.h
793   --enable-sigwinch       compile with SIGWINCH handler
794   --enable-tcap-names     compile with user-definable terminal capabilities
795 Development Code:
796   --without-develop       disable development options
797   --enable-hard-tabs      compile with hard-tabs code
798   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
799 Experimental Code:
800   --disable-assumed-color do not assume anything about default-colors
801   --disable-hashmap       compile without hashmap scrolling-optimization
802   --enable-colorfgbg      compile-in experimental $COLORFGBG code
803   --enable-interop        compile-in experimental interop bindings
804   --with-pthread          use POSIX thread library
805   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
806   --enable-weak-symbols   enable weak-symbols for pthreads
807   --enable-reentrant      compile with experimental reentrant code
808   --with-wrap-prefix=XXX  override prefix used for public variables
809   --enable-safe-sprintf   compile with experimental safe-sprintf code
810   --disable-scroll-hints  compile without scroll-hints code
811   --enable-wgetch-events  compile with experimental wgetch-events code
812 Testing/development Options:
813   --disable-echo          do not display "compiling" commands
814   --enable-warnings       build: turn on GCC compiler warnings
815   --enable-string-hacks   work around bogus compiler/loader warnings
816   --enable-assertions     test: turn on generation of assertion code
817   --with-dmalloc          test: use Gray Watson's dmalloc library
818   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
819   --with-valgrind         test: use valgrind
820   --disable-leaks         test: free permanent memory, analyze leaks
821   --enable-expanded       test: generate functions for certain macros
822   --disable-macros        test: use functions rather than macros
823   --with-trace            test: add trace() function to all models of ncurses
824 Ada95 Binding Options:
825   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
826   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
827   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
828   --with-ada-sharedlib=XX build Ada95 shared-library
829
830 Some influential environment variables:
831   CC          C compiler command
832   CFLAGS      C compiler flags
833   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
834               nonstandard directory <lib dir>
835   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
836               headers in a nonstandard directory <include dir>
837   CPP         C preprocessor
838   CXX         C++ compiler command
839   CXXFLAGS    C++ compiler flags
840   CXXCPP      C++ preprocessor
841
842 Use these variables to override the choices made by `configure' or to help
843 it to find libraries and programs with nonstandard names/locations.
844
845 EOF
846 fi
847
848 if test "$ac_init_help" = "recursive"; then
849   # If there are subdirs, report their specific --help.
850   ac_popdir=`pwd`
851   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
852     cd $ac_subdir
853     # A "../" for each directory in /$ac_subdir.
854     ac_dots=`echo $ac_subdir |
855              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
856
857     case $srcdir in
858     .) # No --srcdir option.  We are building in place.
859       ac_sub_srcdir=$srcdir ;;
860     [\\/]* | ?:[\\/]* ) # Absolute path.
861       ac_sub_srcdir=$srcdir/$ac_subdir ;;
862     *) # Relative path.
863       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
864     esac
865
866     # Check for guested configure; otherwise get Cygnus style configure.
867     if test -f $ac_sub_srcdir/configure.gnu; then
868       echo
869       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
870     elif test -f $ac_sub_srcdir/configure; then
871       echo
872       $SHELL $ac_sub_srcdir/configure  --help=recursive
873     elif test -f $ac_sub_srcdir/configure.ac ||
874            test -f $ac_sub_srcdir/configure.in; then
875       echo
876       $ac_configure --help
877     else
878       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
879     fi
880     cd $ac_popdir
881   done
882 fi
883
884 test -n "$ac_init_help" && exit 0
885 if $ac_init_version; then
886   cat <<\EOF
887
888 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
889 Free Software Foundation, Inc.
890 This configure script is free software; the Free Software Foundation
891 gives unlimited permission to copy, distribute and modify it.
892 EOF
893   exit 0
894 fi
895 exec 5>config.log
896 cat >&5 <<EOF
897 This file contains any messages produced by compilers while
898 running configure, to aid debugging if configure makes a mistake.
899
900 It was created by $as_me, which was
901 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
902
903   $ $0 $@
904
905 EOF
906 {
907 cat <<_ASUNAME
908 ## ---------- ##
909 ## Platform.  ##
910 ## ---------- ##
911
912 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
913 uname -m = `(uname -m) 2>/dev/null || echo unknown`
914 uname -r = `(uname -r) 2>/dev/null || echo unknown`
915 uname -s = `(uname -s) 2>/dev/null || echo unknown`
916 uname -v = `(uname -v) 2>/dev/null || echo unknown`
917
918 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
919 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
920
921 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
922 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
923 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
924 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
925 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
926 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
927 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
928
929 PATH = $PATH
930
931 _ASUNAME
932 } >&5
933
934 cat >&5 <<EOF
935 ## ------------ ##
936 ## Core tests.  ##
937 ## ------------ ##
938
939 EOF
940
941 # Keep a trace of the command line.
942 # Strip out --no-create and --no-recursion so they do not pile up.
943 # Also quote any args containing shell meta-characters.
944 ac_configure_args=
945 ac_sep=
946 for ac_arg
947 do
948   case $ac_arg in
949   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
950   | --no-cr | --no-c) ;;
951   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
952   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
953   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
955     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
956     ac_sep=" " ;;
957   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
958      ac_sep=" " ;;
959   esac
960   # Get rid of the leading space.
961 done
962
963 # When interrupted or exit'd, cleanup temporary files, and complete
964 # config.log.  We remove comments because anyway the quotes in there
965 # would cause problems or look ugly.
966 trap 'exit_status=$?
967   # Save into config.log some information that might help in debugging.
968   echo >&5
969   echo "## ----------------- ##" >&5
970   echo "## Cache variables.  ##" >&5
971   echo "## ----------------- ##" >&5
972   echo >&5
973   # The following way of writing the cache mishandles newlines in values,
974 {
975   (set) 2>&1 |
976     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
977     *ac_space=\ *)
978       sed -n \
979         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
980           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
981       ;;
982     *)
983       sed -n \
984         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
985       ;;
986     esac;
987 } >&5
988   sed "/^$/d" confdefs.h >conftest.log
989   if test -s conftest.log; then
990     echo >&5
991     echo "## ------------ ##" >&5
992     echo "## confdefs.h.  ##" >&5
993     echo "## ------------ ##" >&5
994     echo >&5
995     cat conftest.log >&5
996   fi
997   (echo; echo) >&5
998   test "$ac_signal" != 0 &&
999     echo "$as_me: caught signal $ac_signal" >&5
1000   echo "$as_me: exit $exit_status" >&5
1001   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1002     exit $exit_status
1003      ' 0
1004 for ac_signal in 1 2 13 15; do
1005   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1006 done
1007 ac_signal=0
1008
1009 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1010 rm -rf conftest* confdefs.h
1011 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1012 echo >confdefs.h
1013
1014 # Let the site file select an alternate cache file if it wants to.
1015 # Prefer explicitly selected file to automatically selected ones.
1016 if test -z "$CONFIG_SITE"; then
1017   if test "x$prefix" != xNONE; then
1018     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1019   else
1020     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1021   fi
1022 fi
1023 for ac_site_file in $CONFIG_SITE; do
1024   if test -r "$ac_site_file"; then
1025     { echo "$as_me:1025: loading site script $ac_site_file" >&5
1026 echo "$as_me: loading site script $ac_site_file" >&6;}
1027     cat "$ac_site_file" >&5
1028     . "$ac_site_file"
1029   fi
1030 done
1031
1032 if test -r "$cache_file"; then
1033   # Some versions of bash will fail to source /dev/null (special
1034   # files actually), so we avoid doing that.
1035   if test -f "$cache_file"; then
1036     { echo "$as_me:1036: loading cache $cache_file" >&5
1037 echo "$as_me: loading cache $cache_file" >&6;}
1038     case $cache_file in
1039       [\\/]* | ?:[\\/]* ) . $cache_file;;
1040       *)                      . ./$cache_file;;
1041     esac
1042   fi
1043 else
1044   { echo "$as_me:1044: creating cache $cache_file" >&5
1045 echo "$as_me: creating cache $cache_file" >&6;}
1046   >$cache_file
1047 fi
1048
1049 # Check that the precious variables saved in the cache have kept the same
1050 # value.
1051 ac_cache_corrupted=false
1052 for ac_var in `(set) 2>&1 |
1053                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1054   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1055   eval ac_new_set=\$ac_env_${ac_var}_set
1056   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1057   eval ac_new_val="\$ac_env_${ac_var}_value"
1058   case $ac_old_set,$ac_new_set in
1059     set,)
1060       { echo "$as_me:1060: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1061 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1062       ac_cache_corrupted=: ;;
1063     ,set)
1064       { echo "$as_me:1064: error: \`$ac_var' was not set in the previous run" >&5
1065 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1066       ac_cache_corrupted=: ;;
1067     ,);;
1068     *)
1069       if test "x$ac_old_val" != "x$ac_new_val"; then
1070         { echo "$as_me:1070: error: \`$ac_var' has changed since the previous run:" >&5
1071 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1072         { echo "$as_me:1072:   former value:  $ac_old_val" >&5
1073 echo "$as_me:   former value:  $ac_old_val" >&2;}
1074         { echo "$as_me:1074:   current value: $ac_new_val" >&5
1075 echo "$as_me:   current value: $ac_new_val" >&2;}
1076         ac_cache_corrupted=:
1077       fi;;
1078   esac
1079   # Pass precious variables to config.status.  It doesn't matter if
1080   # we pass some twice (in addition to the command line arguments).
1081   if test "$ac_new_set" = set; then
1082     case $ac_new_val in
1083     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1084       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1085       ac_configure_args="$ac_configure_args '$ac_arg'"
1086       ;;
1087     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1088        ;;
1089     esac
1090   fi
1091 done
1092 if $ac_cache_corrupted; then
1093   { echo "$as_me:1093: error: changes in the environment can compromise the build" >&5
1094 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1095   { { echo "$as_me:1095: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1096 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1097    { (exit 1); exit 1; }; }
1098 fi
1099
1100 ac_ext=c
1101 ac_cpp='$CPP $CPPFLAGS'
1102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1105 ac_main_return=return
1106
1107 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1108   *c*,-n*) ECHO_N= ECHO_C='
1109 ' ECHO_T='      ' ;;
1110   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1111   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1112 esac
1113 echo "#! $SHELL" >conftest.sh
1114 echo  "exit 0"   >>conftest.sh
1115 chmod +x conftest.sh
1116 if { (echo "$as_me:1116: PATH=\".;.\"; conftest.sh") >&5
1117   (PATH=".;."; conftest.sh) 2>&5
1118   ac_status=$?
1119   echo "$as_me:1119: \$? = $ac_status" >&5
1120   (exit $ac_status); }; then
1121   ac_path_separator=';'
1122 else
1123   ac_path_separator=:
1124 fi
1125 PATH_SEPARATOR="$ac_path_separator"
1126 rm -f conftest.sh
1127
1128 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1129
1130 top_builddir=`pwd`
1131
1132 echo "$as_me:1132: checking for egrep" >&5
1133 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1134 if test "${ac_cv_prog_egrep+set}" = set; then
1135   echo $ECHO_N "(cached) $ECHO_C" >&6
1136 else
1137   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1138     then ac_cv_prog_egrep='grep -E'
1139     else ac_cv_prog_egrep='egrep'
1140     fi
1141 fi
1142 echo "$as_me:1142: result: $ac_cv_prog_egrep" >&5
1143 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1144  EGREP=$ac_cv_prog_egrep
1145
1146 test -z "$EGREP" && { { echo "$as_me:1146: error: No egrep program found" >&5
1147 echo "$as_me: error: No egrep program found" >&2;}
1148    { (exit 1); exit 1; }; }
1149
1150 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1151 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1153 cf_cv_abi_version=${NCURSES_MAJOR}
1154 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1155 cf_cv_timestamp=`date`
1156 echo "$as_me:1156: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1157 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1158
1159 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1160
1161 # Check whether --with-rel-version or --without-rel-version was given.
1162 if test "${with_rel_version+set}" = set; then
1163   withval="$with_rel_version"
1164   { echo "$as_me:1164: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1165 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1166  cf_cv_rel_version=$withval
1167 fi;
1168
1169  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1170  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1171
1172 if test -n "$NCURSES_MAJOR" ; then
1173   case $NCURSES_MAJOR in #(vi
1174   [0-9]*) #(vi
1175         ;;
1176   *)
1177         { { echo "$as_me:1177: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1178 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1179    { (exit 1); exit 1; }; }
1180         ;;
1181   esac
1182 else
1183   { { echo "$as_me:1183: error: Release major-version value is empty" >&5
1184 echo "$as_me: error: Release major-version value is empty" >&2;}
1185    { (exit 1); exit 1; }; }
1186 fi
1187
1188 if test -n "$NCURSES_MINOR" ; then
1189   case $NCURSES_MINOR in #(vi
1190   [0-9]*) #(vi
1191         ;;
1192   *)
1193         { { echo "$as_me:1193: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1194 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1195    { (exit 1); exit 1; }; }
1196         ;;
1197   esac
1198 else
1199   { { echo "$as_me:1199: error: Release minor-version value is empty" >&5
1200 echo "$as_me: error: Release minor-version value is empty" >&2;}
1201    { (exit 1); exit 1; }; }
1202 fi
1203
1204 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1205
1206 # Check whether --with-abi-version or --without-abi-version was given.
1207 if test "${with_abi_version+set}" = set; then
1208   withval="$with_abi_version"
1209   { echo "$as_me:1209: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1210 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1211  cf_cv_abi_version=$withval
1212 fi;
1213
1214 if test -n "$cf_cv_abi_version" ; then
1215   case $cf_cv_abi_version in #(vi
1216   [0-9]*) #(vi
1217         ;;
1218   *)
1219         { { echo "$as_me:1219: error: ABI version is not a number: $cf_cv_abi_version" >&5
1220 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1221    { (exit 1); exit 1; }; }
1222         ;;
1223   esac
1224 else
1225   { { echo "$as_me:1225: error: ABI version value is empty" >&5
1226 echo "$as_me: error: ABI version value is empty" >&2;}
1227    { (exit 1); exit 1; }; }
1228 fi
1229
1230 ac_aux_dir=
1231 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1232   if test -f $ac_dir/install-sh; then
1233     ac_aux_dir=$ac_dir
1234     ac_install_sh="$ac_aux_dir/install-sh -c"
1235     break
1236   elif test -f $ac_dir/install.sh; then
1237     ac_aux_dir=$ac_dir
1238     ac_install_sh="$ac_aux_dir/install.sh -c"
1239     break
1240   elif test -f $ac_dir/shtool; then
1241     ac_aux_dir=$ac_dir
1242     ac_install_sh="$ac_aux_dir/shtool install -c"
1243     break
1244   fi
1245 done
1246 if test -z "$ac_aux_dir"; then
1247   { { echo "$as_me:1247: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1248 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1249    { (exit 1); exit 1; }; }
1250 fi
1251 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1252 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1253 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1254
1255 # Make sure we can run config.sub.
1256 $ac_config_sub sun4 >/dev/null 2>&1 ||
1257   { { echo "$as_me:1257: error: cannot run $ac_config_sub" >&5
1258 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1259    { (exit 1); exit 1; }; }
1260
1261 echo "$as_me:1261: checking build system type" >&5
1262 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1263 if test "${ac_cv_build+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   ac_cv_build_alias=$build_alias
1267 test -z "$ac_cv_build_alias" &&
1268   ac_cv_build_alias=`$ac_config_guess`
1269 test -z "$ac_cv_build_alias" &&
1270   { { echo "$as_me:1270: error: cannot guess build type; you must specify one" >&5
1271 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1272    { (exit 1); exit 1; }; }
1273 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1274   { { echo "$as_me:1274: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1275 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1276    { (exit 1); exit 1; }; }
1277
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_build" >&5
1280 echo "${ECHO_T}$ac_cv_build" >&6
1281 build=$ac_cv_build
1282 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1283 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1284 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1285
1286 echo "$as_me:1286: checking host system type" >&5
1287 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1288 if test "${ac_cv_host+set}" = set; then
1289   echo $ECHO_N "(cached) $ECHO_C" >&6
1290 else
1291   ac_cv_host_alias=$host_alias
1292 test -z "$ac_cv_host_alias" &&
1293   ac_cv_host_alias=$ac_cv_build_alias
1294 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1295   { { echo "$as_me:1295: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1296 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1297    { (exit 1); exit 1; }; }
1298
1299 fi
1300 echo "$as_me:1300: result: $ac_cv_host" >&5
1301 echo "${ECHO_T}$ac_cv_host" >&6
1302 host=$ac_cv_host
1303 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1304 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1305 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1306
1307 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1308         echo "$as_me:1308: checking target system type" >&5
1309 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1310 if test "${ac_cv_target+set}" = set; then
1311   echo $ECHO_N "(cached) $ECHO_C" >&6
1312 else
1313   ac_cv_target_alias=$target_alias
1314 test "x$ac_cv_target_alias" = "x" &&
1315   ac_cv_target_alias=$ac_cv_host_alias
1316 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1317   { { echo "$as_me:1317: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1318 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1319    { (exit 1); exit 1; }; }
1320
1321 fi
1322 echo "$as_me:1322: result: $ac_cv_target" >&5
1323 echo "${ECHO_T}$ac_cv_target" >&6
1324 target=$ac_cv_target
1325 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1326 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1327 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1328
1329 # The aliases save the names the user supplied, while $host etc.
1330 # will get canonicalized.
1331 test -n "$target_alias" &&
1332   test "$program_prefix$program_suffix$program_transform_name" = \
1333     NONENONEs,x,x, &&
1334   program_prefix=${target_alias}-
1335         system_name="$host_os"
1336 else
1337         system_name="`(uname -s -r) 2>/dev/null`"
1338         if test -z "$system_name" ; then
1339                 system_name="`(hostname) 2>/dev/null`"
1340         fi
1341 fi
1342 test -n "$system_name" &&
1343 cat >>confdefs.h <<EOF
1344 #define SYSTEM_NAME "$system_name"
1345 EOF
1346
1347 if test "${cf_cv_system_name+set}" = set; then
1348   echo $ECHO_N "(cached) $ECHO_C" >&6
1349 else
1350   cf_cv_system_name="$system_name"
1351 fi
1352
1353 test -z "$system_name" && system_name="$cf_cv_system_name"
1354 test -n "$cf_cv_system_name" && echo "$as_me:1354: result: Configuring for $cf_cv_system_name" >&5
1355 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1356
1357 if test ".$system_name" != ".$cf_cv_system_name" ; then
1358         echo "$as_me:1358: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1359 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1360         { { echo "$as_me:1360: error: \"Please remove config.cache and try again.\"" >&5
1361 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1362    { (exit 1); exit 1; }; }
1363 fi
1364
1365 # Check whether --with-system-type or --without-system-type was given.
1366 if test "${with_system_type+set}" = set; then
1367   withval="$with_system_type"
1368   { echo "$as_me:1368: WARNING: overriding system type to $withval" >&5
1369 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1370         cf_cv_system_name=$withval
1371         host_os=$withval
1372
1373 fi;
1374
1375 ###     Save the given $CFLAGS to allow user-override.
1376 cf_user_CFLAGS="$CFLAGS"
1377
1378 ###     Default install-location
1379
1380 echo "$as_me:1380: checking for prefix" >&5
1381 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1382 if test "x$prefix" = "xNONE" ; then
1383         case "$cf_cv_system_name" in
1384                 # non-vendor systems don't have a conflict
1385         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1386                 prefix=/usr
1387                 ;;
1388         *)      prefix=$ac_default_prefix
1389                 ;;
1390         esac
1391 fi
1392 echo "$as_me:1392: result: $prefix" >&5
1393 echo "${ECHO_T}$prefix" >&6
1394
1395 if test "x$prefix" = "xNONE" ; then
1396 echo "$as_me:1396: checking for default include-directory" >&5
1397 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1398 test -n "$verbose" && echo 1>&6
1399 for cf_symbol in \
1400         $includedir \
1401         $includedir/ncurses \
1402         $prefix/include \
1403         $prefix/include/ncurses \
1404         /usr/local/include \
1405         /usr/local/include/ncurses \
1406         /usr/include \
1407         /usr/include/ncurses
1408 do
1409         cf_dir=`eval echo $cf_symbol`
1410         if test -f $cf_dir/curses.h ; then
1411         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1412                 includedir="$cf_symbol"
1413                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1414                 break
1415         fi
1416         fi
1417         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1418 done
1419 echo "$as_me:1419: result: $includedir" >&5
1420 echo "${ECHO_T}$includedir" >&6
1421 fi
1422
1423 ###     Checks for programs.
1424
1425 # Check whether --with-ada or --without-ada was given.
1426 if test "${with_ada+set}" = set; then
1427   withval="$with_ada"
1428   cf_with_ada=$withval
1429 else
1430   cf_with_ada=yes
1431 fi;
1432 if test "x$cf_with_ada" = xyes
1433 then
1434         cf_PROG_CC="gnatgcc gcc cc"
1435 else
1436         cf_PROG_CC="gcc cc"
1437 fi
1438
1439 ac_ext=c
1440 ac_cpp='$CPP $CPPFLAGS'
1441 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1442 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1444 ac_main_return=return
1445 if test -n "$ac_tool_prefix"; then
1446   for ac_prog in $cf_PROG_CC
1447   do
1448     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1449 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$CC"; then
1456   ac_cv_prog_CC="$CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 CC=$ac_cv_prog_CC
1472 if test -n "$CC"; then
1473   echo "$as_me:1473: result: $CC" >&5
1474 echo "${ECHO_T}$CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480     test -n "$CC" && break
1481   done
1482 fi
1483 if test -z "$CC"; then
1484   ac_ct_CC=$CC
1485   for ac_prog in $cf_PROG_CC
1486 do
1487   # Extract the first word of "$ac_prog", so it can be a program name with args.
1488 set dummy $ac_prog; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$ac_ct_CC"; then
1495   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_ac_ct_CC="$ac_prog"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1511 if test -n "$ac_ct_CC"; then
1512   echo "$as_me:1512: result: $ac_ct_CC" >&5
1513 echo "${ECHO_T}$ac_ct_CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519   test -n "$ac_ct_CC" && break
1520 done
1521
1522   CC=$ac_ct_CC
1523 fi
1524
1525 test -z "$CC" && { { echo "$as_me:1525: error: no acceptable cc found in \$PATH" >&5
1526 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1527    { (exit 1); exit 1; }; }
1528
1529 # Provide some information about the compiler.
1530 echo "$as_me:1530:" \
1531      "checking for C compiler version" >&5
1532 ac_compiler=`set X $ac_compile; echo $2`
1533 { (eval echo "$as_me:1533: \"$ac_compiler --version </dev/null >&5\"") >&5
1534   (eval $ac_compiler --version </dev/null >&5) 2>&5
1535   ac_status=$?
1536   echo "$as_me:1536: \$? = $ac_status" >&5
1537   (exit $ac_status); }
1538 { (eval echo "$as_me:1538: \"$ac_compiler -v </dev/null >&5\"") >&5
1539   (eval $ac_compiler -v </dev/null >&5) 2>&5
1540   ac_status=$?
1541   echo "$as_me:1541: \$? = $ac_status" >&5
1542   (exit $ac_status); }
1543 { (eval echo "$as_me:1543: \"$ac_compiler -V </dev/null >&5\"") >&5
1544   (eval $ac_compiler -V </dev/null >&5) 2>&5
1545   ac_status=$?
1546   echo "$as_me:1546: \$? = $ac_status" >&5
1547   (exit $ac_status); }
1548
1549 cat >conftest.$ac_ext <<_ACEOF
1550 #line 1550 "configure"
1551 #include "confdefs.h"
1552
1553 int
1554 main ()
1555 {
1556
1557   ;
1558   return 0;
1559 }
1560 _ACEOF
1561 ac_clean_files_save=$ac_clean_files
1562 ac_clean_files="$ac_clean_files a.out a.exe"
1563 # Try to create an executable without -o first, disregard a.out.
1564 # It will help us diagnose broken compilers, and finding out an intuition
1565 # of exeext.
1566 echo "$as_me:1566: checking for C compiler default output" >&5
1567 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1568 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1569 if { (eval echo "$as_me:1569: \"$ac_link_default\"") >&5
1570   (eval $ac_link_default) 2>&5
1571   ac_status=$?
1572   echo "$as_me:1572: \$? = $ac_status" >&5
1573   (exit $ac_status); }; then
1574   # Find the output, starting from the most likely.  This scheme is
1575 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1576 # resort.
1577 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1578                 ls a.out conftest 2>/dev/null;
1579                 ls a.* conftest.* 2>/dev/null`; do
1580   case $ac_file in
1581     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1582     a.out ) # We found the default executable, but exeext='' is most
1583             # certainly right.
1584             break;;
1585     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1586           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1587           export ac_cv_exeext
1588           break;;
1589     * ) break;;
1590   esac
1591 done
1592 else
1593   echo "$as_me: failed program was:" >&5
1594 cat conftest.$ac_ext >&5
1595 { { echo "$as_me:1595: error: C compiler cannot create executables" >&5
1596 echo "$as_me: error: C compiler cannot create executables" >&2;}
1597    { (exit 77); exit 77; }; }
1598 fi
1599
1600 ac_exeext=$ac_cv_exeext
1601 echo "$as_me:1601: result: $ac_file" >&5
1602 echo "${ECHO_T}$ac_file" >&6
1603
1604 # Check the compiler produces executables we can run.  If not, either
1605 # the compiler is broken, or we cross compile.
1606 echo "$as_me:1606: checking whether the C compiler works" >&5
1607 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1608 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1609 # If not cross compiling, check that we can run a simple program.
1610 if test "$cross_compiling" != yes; then
1611   if { ac_try='./$ac_file'
1612   { (eval echo "$as_me:1612: \"$ac_try\"") >&5
1613   (eval $ac_try) 2>&5
1614   ac_status=$?
1615   echo "$as_me:1615: \$? = $ac_status" >&5
1616   (exit $ac_status); }; }; then
1617     cross_compiling=no
1618   else
1619     if test "$cross_compiling" = maybe; then
1620         cross_compiling=yes
1621     else
1622         { { echo "$as_me:1622: error: cannot run C compiled programs.
1623 If you meant to cross compile, use \`--host'." >&5
1624 echo "$as_me: error: cannot run C compiled programs.
1625 If you meant to cross compile, use \`--host'." >&2;}
1626    { (exit 1); exit 1; }; }
1627     fi
1628   fi
1629 fi
1630 echo "$as_me:1630: result: yes" >&5
1631 echo "${ECHO_T}yes" >&6
1632
1633 rm -f a.out a.exe conftest$ac_cv_exeext
1634 ac_clean_files=$ac_clean_files_save
1635 # Check the compiler produces executables we can run.  If not, either
1636 # the compiler is broken, or we cross compile.
1637 echo "$as_me:1637: checking whether we are cross compiling" >&5
1638 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1639 echo "$as_me:1639: result: $cross_compiling" >&5
1640 echo "${ECHO_T}$cross_compiling" >&6
1641
1642 echo "$as_me:1642: checking for executable suffix" >&5
1643 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1644 if { (eval echo "$as_me:1644: \"$ac_link\"") >&5
1645   (eval $ac_link) 2>&5
1646   ac_status=$?
1647   echo "$as_me:1647: \$? = $ac_status" >&5
1648   (exit $ac_status); }; then
1649   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1650 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1651 # work properly (i.e., refer to `conftest.exe'), while it won't with
1652 # `rm'.
1653 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1654   case $ac_file in
1655     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1656     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1657           export ac_cv_exeext
1658           break;;
1659     * ) break;;
1660   esac
1661 done
1662 else
1663   { { echo "$as_me:1663: error: cannot compute EXEEXT: cannot compile and link" >&5
1664 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1665    { (exit 1); exit 1; }; }
1666 fi
1667
1668 rm -f conftest$ac_cv_exeext
1669 echo "$as_me:1669: result: $ac_cv_exeext" >&5
1670 echo "${ECHO_T}$ac_cv_exeext" >&6
1671
1672 rm -f conftest.$ac_ext
1673 EXEEXT=$ac_cv_exeext
1674 ac_exeext=$EXEEXT
1675 echo "$as_me:1675: checking for object suffix" >&5
1676 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1677 if test "${ac_cv_objext+set}" = set; then
1678   echo $ECHO_N "(cached) $ECHO_C" >&6
1679 else
1680   cat >conftest.$ac_ext <<_ACEOF
1681 #line 1681 "configure"
1682 #include "confdefs.h"
1683
1684 int
1685 main ()
1686 {
1687
1688   ;
1689   return 0;
1690 }
1691 _ACEOF
1692 rm -f conftest.o conftest.obj
1693 if { (eval echo "$as_me:1693: \"$ac_compile\"") >&5
1694   (eval $ac_compile) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; then
1698   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1699   case $ac_file in
1700     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1701     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1702        break;;
1703   esac
1704 done
1705 else
1706   echo "$as_me: failed program was:" >&5
1707 cat conftest.$ac_ext >&5
1708 { { echo "$as_me:1708: error: cannot compute OBJEXT: cannot compile" >&5
1709 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1710    { (exit 1); exit 1; }; }
1711 fi
1712
1713 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1714 fi
1715 echo "$as_me:1715: result: $ac_cv_objext" >&5
1716 echo "${ECHO_T}$ac_cv_objext" >&6
1717 OBJEXT=$ac_cv_objext
1718 ac_objext=$OBJEXT
1719 echo "$as_me:1719: checking whether we are using the GNU C compiler" >&5
1720 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1721 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1722   echo $ECHO_N "(cached) $ECHO_C" >&6
1723 else
1724   cat >conftest.$ac_ext <<_ACEOF
1725 #line 1725 "configure"
1726 #include "confdefs.h"
1727
1728 int
1729 main ()
1730 {
1731 #ifndef __GNUC__
1732        choke me
1733 #endif
1734
1735   ;
1736   return 0;
1737 }
1738 _ACEOF
1739 rm -f conftest.$ac_objext
1740 if { (eval echo "$as_me:1740: \"$ac_compile\"") >&5
1741   (eval $ac_compile) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); } &&
1745          { ac_try='test -s conftest.$ac_objext'
1746   { (eval echo "$as_me:1746: \"$ac_try\"") >&5
1747   (eval $ac_try) 2>&5
1748   ac_status=$?
1749   echo "$as_me:1749: \$? = $ac_status" >&5
1750   (exit $ac_status); }; }; then
1751   ac_compiler_gnu=yes
1752 else
1753   echo "$as_me: failed program was:" >&5
1754 cat conftest.$ac_ext >&5
1755 ac_compiler_gnu=no
1756 fi
1757 rm -f conftest.$ac_objext conftest.$ac_ext
1758 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1759
1760 fi
1761 echo "$as_me:1761: result: $ac_cv_c_compiler_gnu" >&5
1762 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1763 GCC=`test $ac_compiler_gnu = yes && echo yes`
1764 ac_test_CFLAGS=${CFLAGS+set}
1765 ac_save_CFLAGS=$CFLAGS
1766 CFLAGS="-g"
1767 echo "$as_me:1767: checking whether $CC accepts -g" >&5
1768 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1769 if test "${ac_cv_prog_cc_g+set}" = set; then
1770   echo $ECHO_N "(cached) $ECHO_C" >&6
1771 else
1772   cat >conftest.$ac_ext <<_ACEOF
1773 #line 1773 "configure"
1774 #include "confdefs.h"
1775
1776 int
1777 main ()
1778 {
1779
1780   ;
1781   return 0;
1782 }
1783 _ACEOF
1784 rm -f conftest.$ac_objext
1785 if { (eval echo "$as_me:1785: \"$ac_compile\"") >&5
1786   (eval $ac_compile) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); } &&
1790          { ac_try='test -s conftest.$ac_objext'
1791   { (eval echo "$as_me:1791: \"$ac_try\"") >&5
1792   (eval $ac_try) 2>&5
1793   ac_status=$?
1794   echo "$as_me:1794: \$? = $ac_status" >&5
1795   (exit $ac_status); }; }; then
1796   ac_cv_prog_cc_g=yes
1797 else
1798   echo "$as_me: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1800 ac_cv_prog_cc_g=no
1801 fi
1802 rm -f conftest.$ac_objext conftest.$ac_ext
1803 fi
1804 echo "$as_me:1804: result: $ac_cv_prog_cc_g" >&5
1805 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1806 if test "$ac_test_CFLAGS" = set; then
1807   CFLAGS=$ac_save_CFLAGS
1808 elif test $ac_cv_prog_cc_g = yes; then
1809   if test "$GCC" = yes; then
1810     CFLAGS="-g -O2"
1811   else
1812     CFLAGS="-g"
1813   fi
1814 else
1815   if test "$GCC" = yes; then
1816     CFLAGS="-O2"
1817   else
1818     CFLAGS=
1819   fi
1820 fi
1821 # Some people use a C++ compiler to compile C.  Since we use `exit',
1822 # in C++ we need to declare it.  In case someone uses the same compiler
1823 # for both compiling C and C++ we need to have the C++ compiler decide
1824 # the declaration of exit, since it's the most demanding environment.
1825 cat >conftest.$ac_ext <<_ACEOF
1826 #ifndef __cplusplus
1827   choke me
1828 #endif
1829 _ACEOF
1830 rm -f conftest.$ac_objext
1831 if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
1832   (eval $ac_compile) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -s conftest.$ac_objext'
1837   { (eval echo "$as_me:1837: \"$ac_try\"") >&5
1838   (eval $ac_try) 2>&5
1839   ac_status=$?
1840   echo "$as_me:1840: \$? = $ac_status" >&5
1841   (exit $ac_status); }; }; then
1842   for ac_declaration in \
1843    ''\
1844    '#include <stdlib.h>' \
1845    'extern "C" void std::exit (int) throw (); using std::exit;' \
1846    'extern "C" void std::exit (int); using std::exit;' \
1847    'extern "C" void exit (int) throw ();' \
1848    'extern "C" void exit (int);' \
1849    'void exit (int);'
1850 do
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854 #include <stdlib.h>
1855 $ac_declaration
1856 int
1857 main ()
1858 {
1859 exit (42);
1860   ;
1861   return 0;
1862 }
1863 _ACEOF
1864 rm -f conftest.$ac_objext
1865 if { (eval echo "$as_me:1865: \"$ac_compile\"") >&5
1866   (eval $ac_compile) 2>&5
1867   ac_status=$?
1868   echo "$as_me:1868: \$? = $ac_status" >&5
1869   (exit $ac_status); } &&
1870          { ac_try='test -s conftest.$ac_objext'
1871   { (eval echo "$as_me:1871: \"$ac_try\"") >&5
1872   (eval $ac_try) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit $ac_status); }; }; then
1876   :
1877 else
1878   echo "$as_me: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1880 continue
1881 fi
1882 rm -f conftest.$ac_objext conftest.$ac_ext
1883   cat >conftest.$ac_ext <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1886 $ac_declaration
1887 int
1888 main ()
1889 {
1890 exit (42);
1891   ;
1892   return 0;
1893 }
1894 _ACEOF
1895 rm -f conftest.$ac_objext
1896 if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
1897   (eval $ac_compile) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); } &&
1901          { ac_try='test -s conftest.$ac_objext'
1902   { (eval echo "$as_me:1902: \"$ac_try\"") >&5
1903   (eval $ac_try) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); }; }; then
1907   break
1908 else
1909   echo "$as_me: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 done
1914 rm -rf conftest*
1915 if test -n "$ac_declaration"; then
1916   echo '#ifdef __cplusplus' >>confdefs.h
1917   echo $ac_declaration      >>confdefs.h
1918   echo '#endif'             >>confdefs.h
1919 fi
1920
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1924 fi
1925 rm -f conftest.$ac_objext conftest.$ac_ext
1926 ac_ext=c
1927 ac_cpp='$CPP $CPPFLAGS'
1928 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1929 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1931 ac_main_return=return
1932
1933 GCC_VERSION=none
1934 if test "$GCC" = yes ; then
1935         echo "$as_me:1935: checking version of $CC" >&5
1936 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1937         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1938         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1939         echo "$as_me:1939: result: $GCC_VERSION" >&5
1940 echo "${ECHO_T}$GCC_VERSION" >&6
1941 fi
1942
1943 echo "$as_me:1943: checking for $CC option to accept ANSI C" >&5
1944 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1945 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1946   echo $ECHO_N "(cached) $ECHO_C" >&6
1947 else
1948   ac_cv_prog_cc_stdc=no
1949 ac_save_CC=$CC
1950 cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953 #include <stdarg.h>
1954 #include <stdio.h>
1955 #include <sys/types.h>
1956 #include <sys/stat.h>
1957 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1958 struct buf { int x; };
1959 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1960 static char *e (p, i)
1961      char **p;
1962      int i;
1963 {
1964   return p[i];
1965 }
1966 static char *f (char * (*g) (char **, int), char **p, ...)
1967 {
1968   char *s;
1969   va_list v;
1970   va_start (v,p);
1971   s = g (p, va_arg (v,int));
1972   va_end (v);
1973   return s;
1974 }
1975 int test (int i, double x);
1976 struct s1 {int (*f) (int a);};
1977 struct s2 {int (*f) (double a);};
1978 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1979 int argc;
1980 char **argv;
1981 int
1982 main ()
1983 {
1984 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1985   ;
1986   return 0;
1987 }
1988 _ACEOF
1989 # Don't try gcc -ansi; that turns off useful extensions and
1990 # breaks some systems' header files.
1991 # AIX                   -qlanglvl=ansi
1992 # Ultrix and OSF/1      -std1
1993 # HP-UX 10.20 and later -Ae
1994 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1995 # SVR4                  -Xc -D__EXTENSIONS__
1996 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1997 do
1998   CC="$ac_save_CC $ac_arg"
1999   rm -f conftest.$ac_objext
2000 if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5
2001   (eval $ac_compile) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit $ac_status); } &&
2005          { ac_try='test -s conftest.$ac_objext'
2006   { (eval echo "$as_me:2006: \"$ac_try\"") >&5
2007   (eval $ac_try) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); }; }; then
2011   ac_cv_prog_cc_stdc=$ac_arg
2012 break
2013 else
2014   echo "$as_me: failed program was:" >&5
2015 cat conftest.$ac_ext >&5
2016 fi
2017 rm -f conftest.$ac_objext
2018 done
2019 rm -f conftest.$ac_ext conftest.$ac_objext
2020 CC=$ac_save_CC
2021
2022 fi
2023
2024 case "x$ac_cv_prog_cc_stdc" in
2025   x|xno)
2026     echo "$as_me:2026: result: none needed" >&5
2027 echo "${ECHO_T}none needed" >&6 ;;
2028   *)
2029     echo "$as_me:2029: result: $ac_cv_prog_cc_stdc" >&5
2030 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2031     CC="$CC $ac_cv_prog_cc_stdc" ;;
2032 esac
2033
2034 # This should have been defined by AC_PROG_CC
2035 : ${CC:=cc}
2036
2037 echo "$as_me:2037: checking \$CC variable" >&5
2038 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2039 case "$CC" in #(vi
2040 *[\ \   ]-[IUD]*)
2041         echo "$as_me:2041: result: broken" >&5
2042 echo "${ECHO_T}broken" >&6
2043         { echo "$as_me:2043: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2044 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2045         # humor him...
2046         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2047         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2048
2049 cf_fix_cppflags=no
2050 cf_new_cflags=
2051 cf_new_cppflags=
2052 cf_new_extra_cppflags=
2053
2054 for cf_add_cflags in $cf_flags
2055 do
2056 case $cf_fix_cppflags in
2057 no)
2058         case $cf_add_cflags in #(vi
2059         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2060                 case $cf_add_cflags in
2061                 -D*)
2062                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2063
2064                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2065                                 && test -z "${cf_tst_cflags}" \
2066                                 && cf_fix_cppflags=yes
2067
2068                         if test $cf_fix_cppflags = yes ; then
2069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2070                                 continue
2071                         elif test "${cf_tst_cflags}" = "\"'" ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         fi
2075                         ;;
2076                 esac
2077                 case "$CPPFLAGS" in
2078                 *$cf_add_cflags) #(vi
2079                         ;;
2080                 *) #(vi
2081                         case $cf_add_cflags in #(vi
2082                         -D*)
2083                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2084
2085 CPPFLAGS=`echo "$CPPFLAGS" | \
2086         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2087                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2088
2089                                 ;;
2090                         esac
2091                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2092                         ;;
2093                 esac
2094                 ;;
2095         *)
2096                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2097                 ;;
2098         esac
2099         ;;
2100 yes)
2101         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2102
2103         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2104
2105         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2106                 && test -z "${cf_tst_cflags}" \
2107                 && cf_fix_cppflags=no
2108         ;;
2109 esac
2110 done
2111
2112 if test -n "$cf_new_cflags" ; then
2113
2114         CFLAGS="$CFLAGS $cf_new_cflags"
2115 fi
2116
2117 if test -n "$cf_new_cppflags" ; then
2118
2119         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2120 fi
2121
2122 if test -n "$cf_new_extra_cppflags" ; then
2123
2124         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2125 fi
2126
2127         ;;
2128 *)
2129         echo "$as_me:2129: result: ok" >&5
2130 echo "${ECHO_T}ok" >&6
2131         ;;
2132 esac
2133
2134 ac_ext=c
2135 ac_cpp='$CPP $CPPFLAGS'
2136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2139 ac_main_return=return
2140 echo "$as_me:2140: checking how to run the C preprocessor" >&5
2141 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2142 # On Suns, sometimes $CPP names a directory.
2143 if test -n "$CPP" && test -d "$CPP"; then
2144   CPP=
2145 fi
2146 if test -z "$CPP"; then
2147   if test "${ac_cv_prog_CPP+set}" = set; then
2148   echo $ECHO_N "(cached) $ECHO_C" >&6
2149 else
2150       # Double quotes because CPP needs to be expanded
2151     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2152     do
2153       ac_preproc_ok=false
2154 for ac_c_preproc_warn_flag in '' yes
2155 do
2156   # Use a header file that comes with gcc, so configuring glibc
2157   # with a fresh cross-compiler works.
2158   # On the NeXT, cc -E runs the code through the compiler's parser,
2159   # not just through cpp. "Syntax error" is here to catch this case.
2160   cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2163 #include <assert.h>
2164                      Syntax error
2165 _ACEOF
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2168   ac_status=$?
2169   egrep -v '^ *\+' conftest.er1 >conftest.err
2170   rm -f conftest.er1
2171   cat conftest.err >&5
2172   echo "$as_me:2172: \$? = $ac_status" >&5
2173   (exit $ac_status); } >/dev/null; then
2174   if test -s conftest.err; then
2175     ac_cpp_err=$ac_c_preproc_warn_flag
2176   else
2177     ac_cpp_err=
2178   fi
2179 else
2180   ac_cpp_err=yes
2181 fi
2182 if test -z "$ac_cpp_err"; then
2183   :
2184 else
2185   echo "$as_me: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   # Broken: fails on valid input.
2188 continue
2189 fi
2190 rm -f conftest.err conftest.$ac_ext
2191
2192   # OK, works on sane cases.  Now check whether non-existent headers
2193   # can be detected and how.
2194   cat >conftest.$ac_ext <<_ACEOF
2195 #line 2195 "configure"
2196 #include "confdefs.h"
2197 #include <ac_nonexistent.h>
2198 _ACEOF
2199 if { (eval echo "$as_me:2199: \"$ac_cpp conftest.$ac_ext\"") >&5
2200   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2201   ac_status=$?
2202   egrep -v '^ *\+' conftest.er1 >conftest.err
2203   rm -f conftest.er1
2204   cat conftest.err >&5
2205   echo "$as_me:2205: \$? = $ac_status" >&5
2206   (exit $ac_status); } >/dev/null; then
2207   if test -s conftest.err; then
2208     ac_cpp_err=$ac_c_preproc_warn_flag
2209   else
2210     ac_cpp_err=
2211   fi
2212 else
2213   ac_cpp_err=yes
2214 fi
2215 if test -z "$ac_cpp_err"; then
2216   # Broken: success on invalid input.
2217 continue
2218 else
2219   echo "$as_me: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   # Passes both tests.
2222 ac_preproc_ok=:
2223 break
2224 fi
2225 rm -f conftest.err conftest.$ac_ext
2226
2227 done
2228 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2229 rm -f conftest.err conftest.$ac_ext
2230 if $ac_preproc_ok; then
2231   break
2232 fi
2233
2234     done
2235     ac_cv_prog_CPP=$CPP
2236
2237 fi
2238   CPP=$ac_cv_prog_CPP
2239 else
2240   ac_cv_prog_CPP=$CPP
2241 fi
2242 echo "$as_me:2242: result: $CPP" >&5
2243 echo "${ECHO_T}$CPP" >&6
2244 ac_preproc_ok=false
2245 for ac_c_preproc_warn_flag in '' yes
2246 do
2247   # Use a header file that comes with gcc, so configuring glibc
2248   # with a fresh cross-compiler works.
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp. "Syntax error" is here to catch this case.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255                      Syntax error
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   :
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Broken: fails on valid input.
2279 continue
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283   # OK, works on sane cases.  Now check whether non-existent headers
2284   # can be detected and how.
2285   cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2289 _ACEOF
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2292   ac_status=$?
2293   egrep -v '^ *\+' conftest.er1 >conftest.err
2294   rm -f conftest.er1
2295   cat conftest.err >&5
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); } >/dev/null; then
2298   if test -s conftest.err; then
2299     ac_cpp_err=$ac_c_preproc_warn_flag
2300   else
2301     ac_cpp_err=
2302   fi
2303 else
2304   ac_cpp_err=yes
2305 fi
2306 if test -z "$ac_cpp_err"; then
2307   # Broken: success on invalid input.
2308 continue
2309 else
2310   echo "$as_me: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   # Passes both tests.
2313 ac_preproc_ok=:
2314 break
2315 fi
2316 rm -f conftest.err conftest.$ac_ext
2317
2318 done
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2322   :
2323 else
2324   { { echo "$as_me:2324: error: C preprocessor \"$CPP\" fails sanity check" >&5
2325 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2326    { (exit 1); exit 1; }; }
2327 fi
2328
2329 ac_ext=c
2330 ac_cpp='$CPP $CPPFLAGS'
2331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334 ac_main_return=return
2335
2336 if test $ac_cv_c_compiler_gnu = yes; then
2337     echo "$as_me:2337: checking whether $CC needs -traditional" >&5
2338 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2339 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2340   echo $ECHO_N "(cached) $ECHO_C" >&6
2341 else
2342     ac_pattern="Autoconf.*'x'"
2343   cat >conftest.$ac_ext <<_ACEOF
2344 #line 2344 "configure"
2345 #include "confdefs.h"
2346 #include <sgtty.h>
2347 int Autoconf = TIOCGETP;
2348 _ACEOF
2349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2350   egrep "$ac_pattern" >/dev/null 2>&1; then
2351   ac_cv_prog_gcc_traditional=yes
2352 else
2353   ac_cv_prog_gcc_traditional=no
2354 fi
2355 rm -rf conftest*
2356
2357   if test $ac_cv_prog_gcc_traditional = no; then
2358     cat >conftest.$ac_ext <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2361 #include <termio.h>
2362 int Autoconf = TCGETA;
2363 _ACEOF
2364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2365   egrep "$ac_pattern" >/dev/null 2>&1; then
2366   ac_cv_prog_gcc_traditional=yes
2367 fi
2368 rm -rf conftest*
2369
2370   fi
2371 fi
2372 echo "$as_me:2372: result: $ac_cv_prog_gcc_traditional" >&5
2373 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2374   if test $ac_cv_prog_gcc_traditional = yes; then
2375     CC="$CC -traditional"
2376   fi
2377 fi
2378
2379 echo "$as_me:2379: checking whether $CC understands -c and -o together" >&5
2380 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2381 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2382   echo $ECHO_N "(cached) $ECHO_C" >&6
2383 else
2384
2385 cat > conftest.$ac_ext <<CF_EOF
2386 #include <stdio.h>
2387 int main()
2388 {
2389         ${cf_cv_main_return:-return}(0);
2390 }
2391 CF_EOF
2392 # We do the test twice because some compilers refuse to overwrite an
2393 # existing .o file with -o, though they will create one.
2394 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2395 if { (eval echo "$as_me:2395: \"$ac_try\"") >&5
2396   (eval $ac_try) 2>&5
2397   ac_status=$?
2398   echo "$as_me:2398: \$? = $ac_status" >&5
2399   (exit $ac_status); } &&
2400   test -f conftest2.$ac_objext && { (eval echo "$as_me:2400: \"$ac_try\"") >&5
2401   (eval $ac_try) 2>&5
2402   ac_status=$?
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); };
2405 then
2406   eval cf_cv_prog_CC_c_o=yes
2407 else
2408   eval cf_cv_prog_CC_c_o=no
2409 fi
2410 rm -rf conftest*
2411
2412 fi
2413 if test $cf_cv_prog_CC_c_o = yes; then
2414   echo "$as_me:2414: result: yes" >&5
2415 echo "${ECHO_T}yes" >&6
2416 else
2417   echo "$as_me:2417: result: no" >&5
2418 echo "${ECHO_T}no" >&6
2419 fi
2420
2421 if test "$cross_compiling" = yes ; then
2422   LDCONFIG=:
2423 else
2424 case "$cf_cv_system_name" in #(vi
2425 dragonfly*|mirbsd*|freebsd*) #(vi
2426   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2427   ;;
2428 *) LDPATH=$PATH:/sbin:/usr/sbin
2429   # Extract the first word of "ldconfig", so it can be a program name with args.
2430 set dummy ldconfig; ac_word=$2
2431 echo "$as_me:2431: checking for $ac_word" >&5
2432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2433 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2434   echo $ECHO_N "(cached) $ECHO_C" >&6
2435 else
2436   case $LDCONFIG in
2437   [\\/]* | ?:[\\/]*)
2438   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2439   ;;
2440   *)
2441   ac_save_IFS=$IFS; IFS=$ac_path_separator
2442 ac_dummy="$LDPATH"
2443 for ac_dir in $ac_dummy; do
2444   IFS=$ac_save_IFS
2445   test -z "$ac_dir" && ac_dir=.
2446   if $as_executable_p "$ac_dir/$ac_word"; then
2447    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2448    echo "$as_me:2448: found $ac_dir/$ac_word" >&5
2449    break
2450 fi
2451 done
2452
2453   ;;
2454 esac
2455 fi
2456 LDCONFIG=$ac_cv_path_LDCONFIG
2457
2458 if test -n "$LDCONFIG"; then
2459   echo "$as_me:2459: result: $LDCONFIG" >&5
2460 echo "${ECHO_T}$LDCONFIG" >&6
2461 else
2462   echo "$as_me:2462: result: no" >&5
2463 echo "${ECHO_T}no" >&6
2464 fi
2465
2466   ;;
2467 esac
2468 fi
2469
2470 echo "$as_me:2470: checking if you want to ensure bool is consistent with C++" >&5
2471 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2472
2473 # Check whether --with-cxx or --without-cxx was given.
2474 if test "${with_cxx+set}" = set; then
2475   withval="$with_cxx"
2476   cf_with_cxx=$withval
2477 else
2478   cf_with_cxx=yes
2479 fi;
2480 echo "$as_me:2480: result: $cf_with_cxx" >&5
2481 echo "${ECHO_T}$cf_with_cxx" >&6
2482 if test "X$cf_with_cxx" = Xno ; then
2483         CXX=""
2484         GXX=""
2485 else
2486         # with autoconf 2.13, we can change the error to a warning:
2487                 ac_ext=cc
2488 ac_cpp='$CXXCPP $CPPFLAGS'
2489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2492 ac_main_return=return
2493 if test -n "$ac_tool_prefix"; then
2494   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2495   do
2496     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2497 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2498 echo "$as_me:2498: checking for $ac_word" >&5
2499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2500 if test "${ac_cv_prog_CXX+set}" = set; then
2501   echo $ECHO_N "(cached) $ECHO_C" >&6
2502 else
2503   if test -n "$CXX"; then
2504   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2505 else
2506   ac_save_IFS=$IFS; IFS=$ac_path_separator
2507 ac_dummy="$PATH"
2508 for ac_dir in $ac_dummy; do
2509   IFS=$ac_save_IFS
2510   test -z "$ac_dir" && ac_dir=.
2511   $as_executable_p "$ac_dir/$ac_word" || continue
2512 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2513 echo "$as_me:2513: found $ac_dir/$ac_word" >&5
2514 break
2515 done
2516
2517 fi
2518 fi
2519 CXX=$ac_cv_prog_CXX
2520 if test -n "$CXX"; then
2521   echo "$as_me:2521: result: $CXX" >&5
2522 echo "${ECHO_T}$CXX" >&6
2523 else
2524   echo "$as_me:2524: result: no" >&5
2525 echo "${ECHO_T}no" >&6
2526 fi
2527
2528     test -n "$CXX" && break
2529   done
2530 fi
2531 if test -z "$CXX"; then
2532   ac_ct_CXX=$CXX
2533   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2534 do
2535   # Extract the first word of "$ac_prog", so it can be a program name with args.
2536 set dummy $ac_prog; ac_word=$2
2537 echo "$as_me:2537: checking for $ac_word" >&5
2538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2539 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2540   echo $ECHO_N "(cached) $ECHO_C" >&6
2541 else
2542   if test -n "$ac_ct_CXX"; then
2543   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2544 else
2545   ac_save_IFS=$IFS; IFS=$ac_path_separator
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548   IFS=$ac_save_IFS
2549   test -z "$ac_dir" && ac_dir=.
2550   $as_executable_p "$ac_dir/$ac_word" || continue
2551 ac_cv_prog_ac_ct_CXX="$ac_prog"
2552 echo "$as_me:2552: found $ac_dir/$ac_word" >&5
2553 break
2554 done
2555
2556 fi
2557 fi
2558 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2559 if test -n "$ac_ct_CXX"; then
2560   echo "$as_me:2560: result: $ac_ct_CXX" >&5
2561 echo "${ECHO_T}$ac_ct_CXX" >&6
2562 else
2563   echo "$as_me:2563: result: no" >&5
2564 echo "${ECHO_T}no" >&6
2565 fi
2566
2567   test -n "$ac_ct_CXX" && break
2568 done
2569 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2570
2571   CXX=$ac_ct_CXX
2572 fi
2573
2574 # Provide some information about the compiler.
2575 echo "$as_me:2575:" \
2576      "checking for C++ compiler version" >&5
2577 ac_compiler=`set X $ac_compile; echo $2`
2578 { (eval echo "$as_me:2578: \"$ac_compiler --version </dev/null >&5\"") >&5
2579   (eval $ac_compiler --version </dev/null >&5) 2>&5
2580   ac_status=$?
2581   echo "$as_me:2581: \$? = $ac_status" >&5
2582   (exit $ac_status); }
2583 { (eval echo "$as_me:2583: \"$ac_compiler -v </dev/null >&5\"") >&5
2584   (eval $ac_compiler -v </dev/null >&5) 2>&5
2585   ac_status=$?
2586   echo "$as_me:2586: \$? = $ac_status" >&5
2587   (exit $ac_status); }
2588 { (eval echo "$as_me:2588: \"$ac_compiler -V </dev/null >&5\"") >&5
2589   (eval $ac_compiler -V </dev/null >&5) 2>&5
2590   ac_status=$?
2591   echo "$as_me:2591: \$? = $ac_status" >&5
2592   (exit $ac_status); }
2593
2594 echo "$as_me:2594: checking whether we are using the GNU C++ compiler" >&5
2595 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2596 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2597   echo $ECHO_N "(cached) $ECHO_C" >&6
2598 else
2599   cat >conftest.$ac_ext <<_ACEOF
2600 #line 2600 "configure"
2601 #include "confdefs.h"
2602
2603 int
2604 main ()
2605 {
2606 #ifndef __GNUC__
2607        choke me
2608 #endif
2609
2610   ;
2611   return 0;
2612 }
2613 _ACEOF
2614 rm -f conftest.$ac_objext
2615 if { (eval echo "$as_me:2615: \"$ac_compile\"") >&5
2616   (eval $ac_compile) 2>&5
2617   ac_status=$?
2618   echo "$as_me:2618: \$? = $ac_status" >&5
2619   (exit $ac_status); } &&
2620          { ac_try='test -s conftest.$ac_objext'
2621   { (eval echo "$as_me:2621: \"$ac_try\"") >&5
2622   (eval $ac_try) 2>&5
2623   ac_status=$?
2624   echo "$as_me:2624: \$? = $ac_status" >&5
2625   (exit $ac_status); }; }; then
2626   ac_compiler_gnu=yes
2627 else
2628   echo "$as_me: failed program was:" >&5
2629 cat conftest.$ac_ext >&5
2630 ac_compiler_gnu=no
2631 fi
2632 rm -f conftest.$ac_objext conftest.$ac_ext
2633 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2634
2635 fi
2636 echo "$as_me:2636: result: $ac_cv_cxx_compiler_gnu" >&5
2637 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2638 GXX=`test $ac_compiler_gnu = yes && echo yes`
2639 ac_test_CXXFLAGS=${CXXFLAGS+set}
2640 ac_save_CXXFLAGS=$CXXFLAGS
2641 CXXFLAGS="-g"
2642 echo "$as_me:2642: checking whether $CXX accepts -g" >&5
2643 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2644 if test "${ac_cv_prog_cxx_g+set}" = set; then
2645   echo $ECHO_N "(cached) $ECHO_C" >&6
2646 else
2647   cat >conftest.$ac_ext <<_ACEOF
2648 #line 2648 "configure"
2649 #include "confdefs.h"
2650
2651 int
2652 main ()
2653 {
2654
2655   ;
2656   return 0;
2657 }
2658 _ACEOF
2659 rm -f conftest.$ac_objext
2660 if { (eval echo "$as_me:2660: \"$ac_compile\"") >&5
2661   (eval $ac_compile) 2>&5
2662   ac_status=$?
2663   echo "$as_me:2663: \$? = $ac_status" >&5
2664   (exit $ac_status); } &&
2665          { ac_try='test -s conftest.$ac_objext'
2666   { (eval echo "$as_me:2666: \"$ac_try\"") >&5
2667   (eval $ac_try) 2>&5
2668   ac_status=$?
2669   echo "$as_me:2669: \$? = $ac_status" >&5
2670   (exit $ac_status); }; }; then
2671   ac_cv_prog_cxx_g=yes
2672 else
2673   echo "$as_me: failed program was:" >&5
2674 cat conftest.$ac_ext >&5
2675 ac_cv_prog_cxx_g=no
2676 fi
2677 rm -f conftest.$ac_objext conftest.$ac_ext
2678 fi
2679 echo "$as_me:2679: result: $ac_cv_prog_cxx_g" >&5
2680 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2681 if test "$ac_test_CXXFLAGS" = set; then
2682   CXXFLAGS=$ac_save_CXXFLAGS
2683 elif test $ac_cv_prog_cxx_g = yes; then
2684   if test "$GXX" = yes; then
2685     CXXFLAGS="-g -O2"
2686   else
2687     CXXFLAGS="-g"
2688   fi
2689 else
2690   if test "$GXX" = yes; then
2691     CXXFLAGS="-O2"
2692   else
2693     CXXFLAGS=
2694   fi
2695 fi
2696 for ac_declaration in \
2697    ''\
2698    '#include <stdlib.h>' \
2699    'extern "C" void std::exit (int) throw (); using std::exit;' \
2700    'extern "C" void std::exit (int); using std::exit;' \
2701    'extern "C" void exit (int) throw ();' \
2702    'extern "C" void exit (int);' \
2703    'void exit (int);'
2704 do
2705   cat >conftest.$ac_ext <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2708 #include <stdlib.h>
2709 $ac_declaration
2710 int
2711 main ()
2712 {
2713 exit (42);
2714   ;
2715   return 0;
2716 }
2717 _ACEOF
2718 rm -f conftest.$ac_objext
2719 if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5
2720   (eval $ac_compile) 2>&5
2721   ac_status=$?
2722   echo "$as_me:2722: \$? = $ac_status" >&5
2723   (exit $ac_status); } &&
2724          { ac_try='test -s conftest.$ac_objext'
2725   { (eval echo "$as_me:2725: \"$ac_try\"") >&5
2726   (eval $ac_try) 2>&5
2727   ac_status=$?
2728   echo "$as_me:2728: \$? = $ac_status" >&5
2729   (exit $ac_status); }; }; then
2730   :
2731 else
2732   echo "$as_me: failed program was:" >&5
2733 cat conftest.$ac_ext >&5
2734 continue
2735 fi
2736 rm -f conftest.$ac_objext conftest.$ac_ext
2737   cat >conftest.$ac_ext <<_ACEOF
2738 #line 2738 "configure"
2739 #include "confdefs.h"
2740 $ac_declaration
2741 int
2742 main ()
2743 {
2744 exit (42);
2745   ;
2746   return 0;
2747 }
2748 _ACEOF
2749 rm -f conftest.$ac_objext
2750 if { (eval echo "$as_me:2750: \"$ac_compile\"") >&5
2751   (eval $ac_compile) 2>&5
2752   ac_status=$?
2753   echo "$as_me:2753: \$? = $ac_status" >&5
2754   (exit $ac_status); } &&
2755          { ac_try='test -s conftest.$ac_objext'
2756   { (eval echo "$as_me:2756: \"$ac_try\"") >&5
2757   (eval $ac_try) 2>&5
2758   ac_status=$?
2759   echo "$as_me:2759: \$? = $ac_status" >&5
2760   (exit $ac_status); }; }; then
2761   break
2762 else
2763   echo "$as_me: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 fi
2766 rm -f conftest.$ac_objext conftest.$ac_ext
2767 done
2768 rm -rf conftest*
2769 if test -n "$ac_declaration"; then
2770   echo '#ifdef __cplusplus' >>confdefs.h
2771   echo $ac_declaration      >>confdefs.h
2772   echo '#endif'             >>confdefs.h
2773 fi
2774
2775 ac_ext=c
2776 ac_cpp='$CPP $CPPFLAGS'
2777 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2780 ac_main_return=return
2781
2782                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2783         if test "$CXX" = "g++" ; then
2784                 # Extract the first word of "g++", so it can be a program name with args.
2785 set dummy g++; ac_word=$2
2786 echo "$as_me:2786: checking for $ac_word" >&5
2787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2788 if test "${ac_cv_path_CXX+set}" = set; then
2789   echo $ECHO_N "(cached) $ECHO_C" >&6
2790 else
2791   case $CXX in
2792   [\\/]* | ?:[\\/]*)
2793   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2794   ;;
2795   *)
2796   ac_save_IFS=$IFS; IFS=$ac_path_separator
2797 ac_dummy="$PATH"
2798 for ac_dir in $ac_dummy; do
2799   IFS=$ac_save_IFS
2800   test -z "$ac_dir" && ac_dir=.
2801   if $as_executable_p "$ac_dir/$ac_word"; then
2802    ac_cv_path_CXX="$ac_dir/$ac_word"
2803    echo "$as_me:2803: found $ac_dir/$ac_word" >&5
2804    break
2805 fi
2806 done
2807
2808   ;;
2809 esac
2810 fi
2811 CXX=$ac_cv_path_CXX
2812
2813 if test -n "$CXX"; then
2814   echo "$as_me:2814: result: $CXX" >&5
2815 echo "${ECHO_T}$CXX" >&6
2816 else
2817   echo "$as_me:2817: result: no" >&5
2818 echo "${ECHO_T}no" >&6
2819 fi
2820
2821         fi
2822         case "x$CXX" in #(vi
2823         x|xg++)
2824                 { echo "$as_me:2824: WARNING: You don't have any C++ compiler, too bad" >&5
2825 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2826                 cf_with_cxx=no; CXX=""; GXX="";
2827                 ;;
2828         esac
2829 fi
2830
2831 GXX_VERSION=none
2832 if test "$GXX" = yes; then
2833         echo "$as_me:2833: checking version of ${CXX:-g++}" >&5
2834 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2835         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2836         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2837         echo "$as_me:2837: result: $GXX_VERSION" >&5
2838 echo "${ECHO_T}$GXX_VERSION" >&6
2839 fi
2840
2841 case $GXX_VERSION in
2842 1*|2.[0-6]*)
2843         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2844         # cf_cxx_library=no
2845         { echo "$as_me:2845: WARNING: templates do not work" >&5
2846 echo "$as_me: WARNING: templates do not work" >&2;}
2847         ;;
2848 esac
2849
2850 echo "$as_me:2850: checking if you want to build C++ binding and demo" >&5
2851 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2852
2853 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2854 if test "${with_cxx_binding+set}" = set; then
2855   withval="$with_cxx_binding"
2856   cf_with_cxx_binding=$withval
2857 else
2858   cf_with_cxx_binding=$cf_with_cxx
2859 fi;
2860 echo "$as_me:2860: result: $cf_with_cxx_binding" >&5
2861 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2862
2863 echo "$as_me:2863: checking if you want to build with Ada95" >&5
2864 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2865 echo "$as_me:2865: result: $cf_with_ada" >&5
2866 echo "${ECHO_T}$cf_with_ada" >&6
2867
2868 echo "$as_me:2868: checking if you want to install manpages" >&5
2869 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2870
2871 # Check whether --with-manpages or --without-manpages was given.
2872 if test "${with_manpages+set}" = set; then
2873   withval="$with_manpages"
2874   cf_with_manpages=$withval
2875 else
2876   cf_with_manpages=yes
2877 fi;
2878 echo "$as_me:2878: result: $cf_with_manpages" >&5
2879 echo "${ECHO_T}$cf_with_manpages" >&6
2880
2881 echo "$as_me:2881: checking if you want to build programs such as tic" >&5
2882 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2883
2884 # Check whether --with-progs or --without-progs was given.
2885 if test "${with_progs+set}" = set; then
2886   withval="$with_progs"
2887   cf_with_progs=$withval
2888 else
2889   cf_with_progs=yes
2890 fi;
2891 echo "$as_me:2891: result: $cf_with_progs" >&5
2892 echo "${ECHO_T}$cf_with_progs" >&6
2893
2894 echo "$as_me:2894: checking if you want to build test-programs" >&5
2895 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2896
2897 # Check whether --with-tests or --without-tests was given.
2898 if test "${with_tests+set}" = set; then
2899   withval="$with_tests"
2900   cf_with_tests=$withval
2901 else
2902   cf_with_tests=yes
2903 fi;
2904 echo "$as_me:2904: result: $cf_with_tests" >&5
2905 echo "${ECHO_T}$cf_with_tests" >&6
2906
2907 echo "$as_me:2907: checking if you wish to install curses.h" >&5
2908 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2909
2910 # Check whether --with-curses-h or --without-curses-h was given.
2911 if test "${with_curses_h+set}" = set; then
2912   withval="$with_curses_h"
2913   with_curses_h=$withval
2914 else
2915   with_curses_h=yes
2916 fi;
2917 echo "$as_me:2917: result: $with_curses_h" >&5
2918 echo "${ECHO_T}$with_curses_h" >&6
2919
2920 modules_to_build="ncurses"
2921 if test "X$cf_with_progs" != Xno ; then
2922 modules_to_build="$modules_to_build progs tack"
2923 fi
2924 modules_to_build="$modules_to_build panel menu form"
2925
2926 test "$program_prefix" != NONE &&
2927   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2928 # Use a double $ so make ignores it.
2929 test "$program_suffix" != NONE &&
2930   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2931 # Double any \ or $.  echo might interpret backslashes.
2932 # By default was `s,x,x', remove it if useless.
2933 cat <<\_ACEOF >conftest.sed
2934 s/[\\$]/&&/g;s/;s,x,x,$//
2935 _ACEOF
2936 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2937 rm conftest.sed
2938
2939 for ac_prog in mawk gawk nawk awk
2940 do
2941   # Extract the first word of "$ac_prog", so it can be a program name with args.
2942 set dummy $ac_prog; ac_word=$2
2943 echo "$as_me:2943: checking for $ac_word" >&5
2944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2945 if test "${ac_cv_prog_AWK+set}" = set; then
2946   echo $ECHO_N "(cached) $ECHO_C" >&6
2947 else
2948   if test -n "$AWK"; then
2949   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2950 else
2951   ac_save_IFS=$IFS; IFS=$ac_path_separator
2952 ac_dummy="$PATH"
2953 for ac_dir in $ac_dummy; do
2954   IFS=$ac_save_IFS
2955   test -z "$ac_dir" && ac_dir=.
2956   $as_executable_p "$ac_dir/$ac_word" || continue
2957 ac_cv_prog_AWK="$ac_prog"
2958 echo "$as_me:2958: found $ac_dir/$ac_word" >&5
2959 break
2960 done
2961
2962 fi
2963 fi
2964 AWK=$ac_cv_prog_AWK
2965 if test -n "$AWK"; then
2966   echo "$as_me:2966: result: $AWK" >&5
2967 echo "${ECHO_T}$AWK" >&6
2968 else
2969   echo "$as_me:2969: result: no" >&5
2970 echo "${ECHO_T}no" >&6
2971 fi
2972
2973   test -n "$AWK" && break
2974 done
2975
2976 test -z "$AWK" && { { echo "$as_me:2976: error: No awk program found" >&5
2977 echo "$as_me: error: No awk program found" >&2;}
2978    { (exit 1); exit 1; }; }
2979
2980 echo "$as_me:2980: checking for egrep" >&5
2981 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2982 if test "${ac_cv_prog_egrep+set}" = set; then
2983   echo $ECHO_N "(cached) $ECHO_C" >&6
2984 else
2985   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2986     then ac_cv_prog_egrep='grep -E'
2987     else ac_cv_prog_egrep='egrep'
2988     fi
2989 fi
2990 echo "$as_me:2990: result: $ac_cv_prog_egrep" >&5
2991 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2992  EGREP=$ac_cv_prog_egrep
2993
2994 test -z "$EGREP" && { { echo "$as_me:2994: error: No egrep program found" >&5
2995 echo "$as_me: error: No egrep program found" >&2;}
2996    { (exit 1); exit 1; }; }
2997
2998 # Find a good install program.  We prefer a C program (faster),
2999 # so one script is as good as another.  But avoid the broken or
3000 # incompatible versions:
3001 # SysV /etc/install, /usr/sbin/install
3002 # SunOS /usr/etc/install
3003 # IRIX /sbin/install
3004 # AIX /bin/install
3005 # AmigaOS /C/install, which installs bootblocks on floppy discs
3006 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3007 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3008 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3009 # ./install, which can be erroneously created by make from ./install.sh.
3010 echo "$as_me:3010: checking for a BSD compatible install" >&5
3011 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3012 if test -z "$INSTALL"; then
3013 if test "${ac_cv_path_install+set}" = set; then
3014   echo $ECHO_N "(cached) $ECHO_C" >&6
3015 else
3016     ac_save_IFS=$IFS; IFS=$ac_path_separator
3017   for ac_dir in $PATH; do
3018     IFS=$ac_save_IFS
3019     # Account for people who put trailing slashes in PATH elements.
3020     case $ac_dir/ in
3021     / | ./ | .// | /cC/* \
3022     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3023     | /usr/ucb/* ) ;;
3024     *)
3025       # OSF1 and SCO ODT 3.0 have their own names for install.
3026       # Don't use installbsd from OSF since it installs stuff as root
3027       # by default.
3028       for ac_prog in ginstall scoinst install; do
3029         if $as_executable_p "$ac_dir/$ac_prog"; then
3030           if test $ac_prog = install &&
3031             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3032             # AIX install.  It has an incompatible calling convention.
3033             :
3034           elif test $ac_prog = install &&
3035             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3036             # program-specific install script used by HP pwplus--don't use.
3037             :
3038           else
3039             ac_cv_path_install="$ac_dir/$ac_prog -c"
3040             break 2
3041           fi
3042         fi
3043       done
3044       ;;
3045     esac
3046   done
3047
3048 fi
3049   if test "${ac_cv_path_install+set}" = set; then
3050     INSTALL=$ac_cv_path_install
3051   else
3052     # As a last resort, use the slow shell script.  We don't cache a
3053     # path for INSTALL within a source directory, because that will
3054     # break other packages using the cache if that directory is
3055     # removed, or if the path is relative.
3056     INSTALL=$ac_install_sh
3057   fi
3058 fi
3059 echo "$as_me:3059: result: $INSTALL" >&5
3060 echo "${ECHO_T}$INSTALL" >&6
3061
3062 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3063 # It thinks the first close brace ends the variable substitution.
3064 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3065
3066 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3067
3068 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3069
3070 case $INSTALL in
3071 /*)
3072   ;;
3073 *)
3074   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3075   test -z "$cf_dir" && cf_dir=.
3076   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3077   ;;
3078 esac
3079
3080 for ac_prog in tdlint lint alint splint lclint
3081 do
3082   # Extract the first word of "$ac_prog", so it can be a program name with args.
3083 set dummy $ac_prog; ac_word=$2
3084 echo "$as_me:3084: checking for $ac_word" >&5
3085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3086 if test "${ac_cv_prog_LINT+set}" = set; then
3087   echo $ECHO_N "(cached) $ECHO_C" >&6
3088 else
3089   if test -n "$LINT"; then
3090   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3091 else
3092   ac_save_IFS=$IFS; IFS=$ac_path_separator
3093 ac_dummy="$PATH"
3094 for ac_dir in $ac_dummy; do
3095   IFS=$ac_save_IFS
3096   test -z "$ac_dir" && ac_dir=.
3097   $as_executable_p "$ac_dir/$ac_word" || continue
3098 ac_cv_prog_LINT="$ac_prog"
3099 echo "$as_me:3099: found $ac_dir/$ac_word" >&5
3100 break
3101 done
3102
3103 fi
3104 fi
3105 LINT=$ac_cv_prog_LINT
3106 if test -n "$LINT"; then
3107   echo "$as_me:3107: result: $LINT" >&5
3108 echo "${ECHO_T}$LINT" >&6
3109 else
3110   echo "$as_me:3110: result: no" >&5
3111 echo "${ECHO_T}no" >&6
3112 fi
3113
3114   test -n "$LINT" && break
3115 done
3116
3117 echo "$as_me:3117: checking whether ln -s works" >&5
3118 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3119 LN_S=$as_ln_s
3120 if test "$LN_S" = "ln -s"; then
3121   echo "$as_me:3121: result: yes" >&5
3122 echo "${ECHO_T}yes" >&6
3123 else
3124   echo "$as_me:3124: result: no, using $LN_S" >&5
3125 echo "${ECHO_T}no, using $LN_S" >&6
3126 fi
3127
3128 echo "$as_me:3128: checking if $LN_S -f options work" >&5
3129 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3130
3131 rm -f conf$$.src conf$$dst
3132 echo >conf$$.dst
3133 echo first >conf$$.src
3134 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3135         cf_prog_ln_sf=yes
3136 else
3137         cf_prog_ln_sf=no
3138 fi
3139 rm -f conf$$.dst conf$$src
3140 echo "$as_me:3140: result: $cf_prog_ln_sf" >&5
3141 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3142
3143 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3144
3145 echo "$as_me:3145: checking for long file names" >&5
3146 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3147 if test "${ac_cv_sys_long_file_names+set}" = set; then
3148   echo $ECHO_N "(cached) $ECHO_C" >&6
3149 else
3150   ac_cv_sys_long_file_names=yes
3151 # Test for long file names in all the places we know might matter:
3152 #      .                the current directory, where building will happen
3153 #      $prefix/lib      where we will be installing things
3154 #      $exec_prefix/lib likewise
3155 # eval it to expand exec_prefix.
3156 #      $TMPDIR          if set, where it might want to write temporary files
3157 # if $TMPDIR is not set:
3158 #      /tmp             where it might want to write temporary files
3159 #      /var/tmp         likewise
3160 #      /usr/tmp         likewise
3161 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3162   ac_tmpdirs=$TMPDIR
3163 else
3164   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3165 fi
3166 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3167   test -d $ac_dir || continue
3168   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3169   ac_xdir=$ac_dir/cf$$
3170   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3171   ac_tf1=$ac_xdir/conftest9012345
3172   ac_tf2=$ac_xdir/conftest9012346
3173   (echo 1 >$ac_tf1) 2>/dev/null
3174   (echo 2 >$ac_tf2) 2>/dev/null
3175   ac_val=`cat $ac_tf1 2>/dev/null`
3176   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3177     ac_cv_sys_long_file_names=no
3178     rm -rf $ac_xdir 2>/dev/null
3179     break
3180   fi
3181   rm -rf $ac_xdir 2>/dev/null
3182 done
3183 fi
3184 echo "$as_me:3184: result: $ac_cv_sys_long_file_names" >&5
3185 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3186 if test $ac_cv_sys_long_file_names = yes; then
3187
3188 cat >>confdefs.h <<\EOF
3189 #define HAVE_LONG_FILE_NAMES 1
3190 EOF
3191
3192 fi
3193
3194 # if we find pkg-config, check if we should install the ".pc" files.
3195
3196 echo "$as_me:3196: checking if you want to use pkg-config" >&5
3197 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3198
3199 # Check whether --with-pkg-config or --without-pkg-config was given.
3200 if test "${with_pkg_config+set}" = set; then
3201   withval="$with_pkg_config"
3202   cf_pkg_config=$withval
3203 else
3204   cf_pkg_config=yes
3205 fi;
3206 echo "$as_me:3206: result: $cf_pkg_config" >&5
3207 echo "${ECHO_T}$cf_pkg_config" >&6
3208
3209 case $cf_pkg_config in #(vi
3210 no) #(vi
3211         PKG_CONFIG=none
3212         ;;
3213 yes) #(vi
3214
3215 if test -n "$ac_tool_prefix"; then
3216   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3217 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3218 echo "$as_me:3218: checking for $ac_word" >&5
3219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3220 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223   case $PKG_CONFIG in
3224   [\\/]* | ?:[\\/]*)
3225   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3226   ;;
3227   *)
3228   ac_save_IFS=$IFS; IFS=$ac_path_separator
3229 ac_dummy="$PATH"
3230 for ac_dir in $ac_dummy; do
3231   IFS=$ac_save_IFS
3232   test -z "$ac_dir" && ac_dir=.
3233   if $as_executable_p "$ac_dir/$ac_word"; then
3234    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3235    echo "$as_me:3235: found $ac_dir/$ac_word" >&5
3236    break
3237 fi
3238 done
3239
3240   ;;
3241 esac
3242 fi
3243 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3244
3245 if test -n "$PKG_CONFIG"; then
3246   echo "$as_me:3246: result: $PKG_CONFIG" >&5
3247 echo "${ECHO_T}$PKG_CONFIG" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253 fi
3254 if test -z "$ac_cv_path_PKG_CONFIG"; then
3255   ac_pt_PKG_CONFIG=$PKG_CONFIG
3256   # Extract the first word of "pkg-config", so it can be a program name with args.
3257 set dummy pkg-config; ac_word=$2
3258 echo "$as_me:3258: checking for $ac_word" >&5
3259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3260 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3261   echo $ECHO_N "(cached) $ECHO_C" >&6
3262 else
3263   case $ac_pt_PKG_CONFIG in
3264   [\\/]* | ?:[\\/]*)
3265   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3266   ;;
3267   *)
3268   ac_save_IFS=$IFS; IFS=$ac_path_separator
3269 ac_dummy="$PATH"
3270 for ac_dir in $ac_dummy; do
3271   IFS=$ac_save_IFS
3272   test -z "$ac_dir" && ac_dir=.
3273   if $as_executable_p "$ac_dir/$ac_word"; then
3274    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3275    echo "$as_me:3275: found $ac_dir/$ac_word" >&5
3276    break
3277 fi
3278 done
3279
3280   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3281   ;;
3282 esac
3283 fi
3284 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3285
3286 if test -n "$ac_pt_PKG_CONFIG"; then
3287   echo "$as_me:3287: result: $ac_pt_PKG_CONFIG" >&5
3288 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3289 else
3290   echo "$as_me:3290: result: no" >&5
3291 echo "${ECHO_T}no" >&6
3292 fi
3293
3294   PKG_CONFIG=$ac_pt_PKG_CONFIG
3295 else
3296   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3297 fi
3298
3299         ;;
3300 *)
3301         PKG_CONFIG=$withval
3302         ;;
3303 esac
3304
3305 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3306 if test "$PKG_CONFIG" != none ; then
3307
3308 if test "x$prefix" != xNONE; then
3309   cf_path_syntax="$prefix"
3310 else
3311   cf_path_syntax="$ac_default_prefix"
3312 fi
3313
3314 case ".$PKG_CONFIG" in #(vi
3315 .\$\(*\)*|.\'*\'*) #(vi
3316   ;;
3317 ..|./*|.\\*) #(vi
3318   ;;
3319 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3320   ;;
3321 .\${*prefix}*|.\${*dir}*) #(vi
3322   eval PKG_CONFIG="$PKG_CONFIG"
3323   case ".$PKG_CONFIG" in #(vi
3324   .NONE/*)
3325     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3326     ;;
3327   esac
3328   ;; #(vi
3329 .no|.NONE/*)
3330   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3331   ;;
3332 *)
3333   { { echo "$as_me:3333: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3334 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3335    { (exit 1); exit 1; }; }
3336   ;;
3337 esac
3338
3339 fi
3340
3341 if test "$PKG_CONFIG" != none ; then
3342         echo "$as_me:3342: checking for $PKG_CONFIG library directory" >&5
3343 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3344
3345 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3346 if test "${with_pkg_config_libdir+set}" = set; then
3347   withval="$with_pkg_config_libdir"
3348   PKG_CONFIG_LIBDIR=$withval
3349 else
3350   PKG_CONFIG_LIBDIR=yes
3351 fi;
3352
3353         case x$PKG_CONFIG_LIBDIR in #(vi
3354         x/*) #(vi
3355                 ;;
3356         xyes) #(vi
3357                 # look for the library directory using the same prefix as the executable
3358                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3359                 case x`(arch) 2>/dev/null` in #(vi
3360                 *64) #(vi
3361                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3362                         do
3363                                 if test -d $cf_config/pkgconfig
3364                                 then
3365                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3366                                         break
3367                                 fi
3368                         done
3369                         ;;
3370                 *)
3371                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3372                         ;;
3373                 esac
3374                 ;;
3375         *)
3376                 ;;
3377         esac
3378
3379         echo "$as_me:3379: result: $PKG_CONFIG_LIBDIR" >&5
3380 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3381 fi
3382
3383 if test "$PKG_CONFIG" != none ; then
3384         echo "$as_me:3384: checking if we should install .pc files for $PKG_CONFIG" >&5
3385 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3386
3387 # Check whether --enable-pc-files or --disable-pc-files was given.
3388 if test "${enable_pc_files+set}" = set; then
3389   enableval="$enable_pc_files"
3390   enable_pc_files=$enableval
3391 else
3392   enable_pc_files=no
3393 fi;
3394         echo "$as_me:3394: result: $enable_pc_files" >&5
3395 echo "${ECHO_T}$enable_pc_files" >&6
3396         if test "$enable_pc_files" != no
3397         then
3398
3399 if test "x$prefix" != xNONE; then
3400   cf_path_syntax="$prefix"
3401 else
3402   cf_path_syntax="$ac_default_prefix"
3403 fi
3404
3405 case ".$PKG_CONFIG_LIBDIR" in #(vi
3406 .\$\(*\)*|.\'*\'*) #(vi
3407   ;;
3408 ..|./*|.\\*) #(vi
3409   ;;
3410 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3411   ;;
3412 .\${*prefix}*|.\${*dir}*) #(vi
3413   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3414   case ".$PKG_CONFIG_LIBDIR" in #(vi
3415   .NONE/*)
3416     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3417     ;;
3418   esac
3419   ;; #(vi
3420 .no|.NONE/*)
3421   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3422   ;;
3423 *)
3424   { { echo "$as_me:3424: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3425 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3426    { (exit 1); exit 1; }; }
3427   ;;
3428 esac
3429
3430         fi
3431 else
3432         enable_pc_files=no
3433 fi
3434
3435 echo "$as_me:3435: checking if we should assume mixed-case filenames" >&5
3436 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3437
3438 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3439 if test "${enable_mixed_case+set}" = set; then
3440   enableval="$enable_mixed_case"
3441   enable_mixedcase=$enableval
3442 else
3443   enable_mixedcase=auto
3444 fi;
3445 echo "$as_me:3445: result: $enable_mixedcase" >&5
3446 echo "${ECHO_T}$enable_mixedcase" >&6
3447 if test "$enable_mixedcase" = "auto" ; then
3448
3449 echo "$as_me:3449: checking if filesystem supports mixed-case filenames" >&5
3450 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3451 if test "${cf_cv_mixedcase+set}" = set; then
3452   echo $ECHO_N "(cached) $ECHO_C" >&6
3453 else
3454
3455 if test "$cross_compiling" = yes ; then
3456         case $target_alias in #(vi
3457         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3458                 cf_cv_mixedcase=no
3459                 ;;
3460         *)
3461                 cf_cv_mixedcase=yes
3462                 ;;
3463         esac
3464 else
3465         rm -f conftest CONFTEST
3466         echo test >conftest
3467         if test -f CONFTEST ; then
3468                 cf_cv_mixedcase=no
3469         else
3470                 cf_cv_mixedcase=yes
3471         fi
3472         rm -f conftest CONFTEST
3473 fi
3474
3475 fi
3476 echo "$as_me:3476: result: $cf_cv_mixedcase" >&5
3477 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3478 test "$cf_cv_mixedcase" = yes &&
3479 cat >>confdefs.h <<\EOF
3480 #define MIXEDCASE_FILENAMES 1
3481 EOF
3482
3483 else
3484     cf_cv_mixedcase=$enable_mixedcase
3485     if test "x$enable_mixedcase" = "xyes" ; then
3486
3487 cat >>confdefs.h <<\EOF
3488 #define MIXEDCASE_FILENAMES 1
3489 EOF
3490
3491     fi
3492 fi
3493
3494 # do this after mixed-case option (tags/TAGS is not as important as tic).
3495 echo "$as_me:3495: checking whether ${MAKE-make} sets \${MAKE}" >&5
3496 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3497 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3498 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   cat >conftest.make <<\EOF
3502 all:
3503         @echo 'ac_maketemp="${MAKE}"'
3504 EOF
3505 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3506 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3507 if test -n "$ac_maketemp"; then
3508   eval ac_cv_prog_make_${ac_make}_set=yes
3509 else
3510   eval ac_cv_prog_make_${ac_make}_set=no
3511 fi
3512 rm -f conftest.make
3513 fi
3514 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3515   echo "$as_me:3515: result: yes" >&5
3516 echo "${ECHO_T}yes" >&6
3517   SET_MAKE=
3518 else
3519   echo "$as_me:3519: result: no" >&5
3520 echo "${ECHO_T}no" >&6
3521   SET_MAKE="MAKE=${MAKE-make}"
3522 fi
3523
3524 for ac_prog in exctags ctags
3525 do
3526   # Extract the first word of "$ac_prog", so it can be a program name with args.
3527 set dummy $ac_prog; ac_word=$2
3528 echo "$as_me:3528: checking for $ac_word" >&5
3529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3530 if test "${ac_cv_prog_CTAGS+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   if test -n "$CTAGS"; then
3534   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3535 else
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   $as_executable_p "$ac_dir/$ac_word" || continue
3542 ac_cv_prog_CTAGS="$ac_prog"
3543 echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544 break
3545 done
3546
3547 fi
3548 fi
3549 CTAGS=$ac_cv_prog_CTAGS
3550 if test -n "$CTAGS"; then
3551   echo "$as_me:3551: result: $CTAGS" >&5
3552 echo "${ECHO_T}$CTAGS" >&6
3553 else
3554   echo "$as_me:3554: result: no" >&5
3555 echo "${ECHO_T}no" >&6
3556 fi
3557
3558   test -n "$CTAGS" && break
3559 done
3560
3561 for ac_prog in exetags etags
3562 do
3563   # Extract the first word of "$ac_prog", so it can be a program name with args.
3564 set dummy $ac_prog; ac_word=$2
3565 echo "$as_me:3565: checking for $ac_word" >&5
3566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3567 if test "${ac_cv_prog_ETAGS+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570   if test -n "$ETAGS"; then
3571   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3572 else
3573   ac_save_IFS=$IFS; IFS=$ac_path_separator
3574 ac_dummy="$PATH"
3575 for ac_dir in $ac_dummy; do
3576   IFS=$ac_save_IFS
3577   test -z "$ac_dir" && ac_dir=.
3578   $as_executable_p "$ac_dir/$ac_word" || continue
3579 ac_cv_prog_ETAGS="$ac_prog"
3580 echo "$as_me:3580: found $ac_dir/$ac_word" >&5
3581 break
3582 done
3583
3584 fi
3585 fi
3586 ETAGS=$ac_cv_prog_ETAGS
3587 if test -n "$ETAGS"; then
3588   echo "$as_me:3588: result: $ETAGS" >&5
3589 echo "${ECHO_T}$ETAGS" >&6
3590 else
3591   echo "$as_me:3591: result: no" >&5
3592 echo "${ECHO_T}no" >&6
3593 fi
3594
3595   test -n "$ETAGS" && break
3596 done
3597
3598 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3599 set dummy ${CTAGS:-ctags}; ac_word=$2
3600 echo "$as_me:3600: checking for $ac_word" >&5
3601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3602 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3603   echo $ECHO_N "(cached) $ECHO_C" >&6
3604 else
3605   if test -n "$MAKE_LOWER_TAGS"; then
3606   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3607 else
3608   ac_save_IFS=$IFS; IFS=$ac_path_separator
3609 ac_dummy="$PATH"
3610 for ac_dir in $ac_dummy; do
3611   IFS=$ac_save_IFS
3612   test -z "$ac_dir" && ac_dir=.
3613   $as_executable_p "$ac_dir/$ac_word" || continue
3614 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3615 echo "$as_me:3615: found $ac_dir/$ac_word" >&5
3616 break
3617 done
3618
3619   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3620 fi
3621 fi
3622 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3623 if test -n "$MAKE_LOWER_TAGS"; then
3624   echo "$as_me:3624: result: $MAKE_LOWER_TAGS" >&5
3625 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3626 else
3627   echo "$as_me:3627: result: no" >&5
3628 echo "${ECHO_T}no" >&6
3629 fi
3630
3631 if test "$cf_cv_mixedcase" = yes ; then
3632         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3633 set dummy ${ETAGS:-etags}; ac_word=$2
3634 echo "$as_me:3634: checking for $ac_word" >&5
3635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3636 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3637   echo $ECHO_N "(cached) $ECHO_C" >&6
3638 else
3639   if test -n "$MAKE_UPPER_TAGS"; then
3640   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3641 else
3642   ac_save_IFS=$IFS; IFS=$ac_path_separator
3643 ac_dummy="$PATH"
3644 for ac_dir in $ac_dummy; do
3645   IFS=$ac_save_IFS
3646   test -z "$ac_dir" && ac_dir=.
3647   $as_executable_p "$ac_dir/$ac_word" || continue
3648 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3649 echo "$as_me:3649: found $ac_dir/$ac_word" >&5
3650 break
3651 done
3652
3653   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3654 fi
3655 fi
3656 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3657 if test -n "$MAKE_UPPER_TAGS"; then
3658   echo "$as_me:3658: result: $MAKE_UPPER_TAGS" >&5
3659 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3660 else
3661   echo "$as_me:3661: result: no" >&5
3662 echo "${ECHO_T}no" >&6
3663 fi
3664
3665 else
3666         MAKE_UPPER_TAGS=no
3667 fi
3668
3669 if test "$MAKE_UPPER_TAGS" = yes ; then
3670         MAKE_UPPER_TAGS=
3671 else
3672         MAKE_UPPER_TAGS="#"
3673 fi
3674
3675 if test "$MAKE_LOWER_TAGS" = yes ; then
3676         MAKE_LOWER_TAGS=
3677 else
3678         MAKE_LOWER_TAGS="#"
3679 fi
3680
3681 echo "$as_me:3681: checking for makeflags variable" >&5
3682 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3683 if test "${cf_cv_makeflags+set}" = set; then
3684   echo $ECHO_N "(cached) $ECHO_C" >&6
3685 else
3686
3687         cf_cv_makeflags=''
3688         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3689         do
3690                 cat >cf_makeflags.tmp <<CF_EOF
3691 SHELL = /bin/sh
3692 all :
3693         @ echo '.$cf_option'
3694 CF_EOF
3695                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3696                 case "$cf_result" in
3697                 .*k)
3698                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3699                         case "$cf_result" in
3700                         .*CC=*) cf_cv_makeflags=
3701                                 ;;
3702                         *)      cf_cv_makeflags=$cf_option
3703                                 ;;
3704                         esac
3705                         break
3706                         ;;
3707                 .-)     ;;
3708                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3709                         ;;
3710                 esac
3711         done
3712         rm -f cf_makeflags.tmp
3713
3714 fi
3715 echo "$as_me:3715: result: $cf_cv_makeflags" >&5
3716 echo "${ECHO_T}$cf_cv_makeflags" >&6
3717
3718 if test -n "$ac_tool_prefix"; then
3719   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3720 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3721 echo "$as_me:3721: checking for $ac_word" >&5
3722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3723 if test "${ac_cv_prog_RANLIB+set}" = set; then
3724   echo $ECHO_N "(cached) $ECHO_C" >&6
3725 else
3726   if test -n "$RANLIB"; then
3727   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3728 else
3729   ac_save_IFS=$IFS; IFS=$ac_path_separator
3730 ac_dummy="$PATH"
3731 for ac_dir in $ac_dummy; do
3732   IFS=$ac_save_IFS
3733   test -z "$ac_dir" && ac_dir=.
3734   $as_executable_p "$ac_dir/$ac_word" || continue
3735 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3736 echo "$as_me:3736: found $ac_dir/$ac_word" >&5
3737 break
3738 done
3739
3740 fi
3741 fi
3742 RANLIB=$ac_cv_prog_RANLIB
3743 if test -n "$RANLIB"; then
3744   echo "$as_me:3744: result: $RANLIB" >&5
3745 echo "${ECHO_T}$RANLIB" >&6
3746 else
3747   echo "$as_me:3747: result: no" >&5
3748 echo "${ECHO_T}no" >&6
3749 fi
3750
3751 fi
3752 if test -z "$ac_cv_prog_RANLIB"; then
3753   ac_ct_RANLIB=$RANLIB
3754   # Extract the first word of "ranlib", so it can be a program name with args.
3755 set dummy ranlib; ac_word=$2
3756 echo "$as_me:3756: checking for $ac_word" >&5
3757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$ac_ct_RANLIB"; then
3762   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3763 else
3764   ac_save_IFS=$IFS; IFS=$ac_path_separator
3765 ac_dummy="$PATH"
3766 for ac_dir in $ac_dummy; do
3767   IFS=$ac_save_IFS
3768   test -z "$ac_dir" && ac_dir=.
3769   $as_executable_p "$ac_dir/$ac_word" || continue
3770 ac_cv_prog_ac_ct_RANLIB="ranlib"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3776 fi
3777 fi
3778 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3779 if test -n "$ac_ct_RANLIB"; then
3780   echo "$as_me:3780: result: $ac_ct_RANLIB" >&5
3781 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3782 else
3783   echo "$as_me:3783: result: no" >&5
3784 echo "${ECHO_T}no" >&6
3785 fi
3786
3787   RANLIB=$ac_ct_RANLIB
3788 else
3789   RANLIB="$ac_cv_prog_RANLIB"
3790 fi
3791
3792 if test -n "$ac_tool_prefix"; then
3793   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3794 set dummy ${ac_tool_prefix}ld; ac_word=$2
3795 echo "$as_me:3795: checking for $ac_word" >&5
3796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797 if test "${ac_cv_prog_LD+set}" = set; then
3798   echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800   if test -n "$LD"; then
3801   ac_cv_prog_LD="$LD" # Let the user override the test.
3802 else
3803   ac_save_IFS=$IFS; IFS=$ac_path_separator
3804 ac_dummy="$PATH"
3805 for ac_dir in $ac_dummy; do
3806   IFS=$ac_save_IFS
3807   test -z "$ac_dir" && ac_dir=.
3808   $as_executable_p "$ac_dir/$ac_word" || continue
3809 ac_cv_prog_LD="${ac_tool_prefix}ld"
3810 echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811 break
3812 done
3813
3814 fi
3815 fi
3816 LD=$ac_cv_prog_LD
3817 if test -n "$LD"; then
3818   echo "$as_me:3818: result: $LD" >&5
3819 echo "${ECHO_T}$LD" >&6
3820 else
3821   echo "$as_me:3821: result: no" >&5
3822 echo "${ECHO_T}no" >&6
3823 fi
3824
3825 fi
3826 if test -z "$ac_cv_prog_LD"; then
3827   ac_ct_LD=$LD
3828   # Extract the first word of "ld", so it can be a program name with args.
3829 set dummy ld; ac_word=$2
3830 echo "$as_me:3830: checking for $ac_word" >&5
3831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3832 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3833   echo $ECHO_N "(cached) $ECHO_C" >&6
3834 else
3835   if test -n "$ac_ct_LD"; then
3836   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3837 else
3838   ac_save_IFS=$IFS; IFS=$ac_path_separator
3839 ac_dummy="$PATH"
3840 for ac_dir in $ac_dummy; do
3841   IFS=$ac_save_IFS
3842   test -z "$ac_dir" && ac_dir=.
3843   $as_executable_p "$ac_dir/$ac_word" || continue
3844 ac_cv_prog_ac_ct_LD="ld"
3845 echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846 break
3847 done
3848
3849   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3850 fi
3851 fi
3852 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3853 if test -n "$ac_ct_LD"; then
3854   echo "$as_me:3854: result: $ac_ct_LD" >&5
3855 echo "${ECHO_T}$ac_ct_LD" >&6
3856 else
3857   echo "$as_me:3857: result: no" >&5
3858 echo "${ECHO_T}no" >&6
3859 fi
3860
3861   LD=$ac_ct_LD
3862 else
3863   LD="$ac_cv_prog_LD"
3864 fi
3865
3866 if test -n "$ac_tool_prefix"; then
3867   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3868 set dummy ${ac_tool_prefix}ar; ac_word=$2
3869 echo "$as_me:3869: checking for $ac_word" >&5
3870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3871 if test "${ac_cv_prog_AR+set}" = set; then
3872   echo $ECHO_N "(cached) $ECHO_C" >&6
3873 else
3874   if test -n "$AR"; then
3875   ac_cv_prog_AR="$AR" # Let the user override the test.
3876 else
3877   ac_save_IFS=$IFS; IFS=$ac_path_separator
3878 ac_dummy="$PATH"
3879 for ac_dir in $ac_dummy; do
3880   IFS=$ac_save_IFS
3881   test -z "$ac_dir" && ac_dir=.
3882   $as_executable_p "$ac_dir/$ac_word" || continue
3883 ac_cv_prog_AR="${ac_tool_prefix}ar"
3884 echo "$as_me:3884: found $ac_dir/$ac_word" >&5
3885 break
3886 done
3887
3888 fi
3889 fi
3890 AR=$ac_cv_prog_AR
3891 if test -n "$AR"; then
3892   echo "$as_me:3892: result: $AR" >&5
3893 echo "${ECHO_T}$AR" >&6
3894 else
3895   echo "$as_me:3895: result: no" >&5
3896 echo "${ECHO_T}no" >&6
3897 fi
3898
3899 fi
3900 if test -z "$ac_cv_prog_AR"; then
3901   ac_ct_AR=$AR
3902   # Extract the first word of "ar", so it can be a program name with args.
3903 set dummy ar; ac_word=$2
3904 echo "$as_me:3904: checking for $ac_word" >&5
3905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3906 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3907   echo $ECHO_N "(cached) $ECHO_C" >&6
3908 else
3909   if test -n "$ac_ct_AR"; then
3910   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3911 else
3912   ac_save_IFS=$IFS; IFS=$ac_path_separator
3913 ac_dummy="$PATH"
3914 for ac_dir in $ac_dummy; do
3915   IFS=$ac_save_IFS
3916   test -z "$ac_dir" && ac_dir=.
3917   $as_executable_p "$ac_dir/$ac_word" || continue
3918 ac_cv_prog_ac_ct_AR="ar"
3919 echo "$as_me:3919: found $ac_dir/$ac_word" >&5
3920 break
3921 done
3922
3923   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3924 fi
3925 fi
3926 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3927 if test -n "$ac_ct_AR"; then
3928   echo "$as_me:3928: result: $ac_ct_AR" >&5
3929 echo "${ECHO_T}$ac_ct_AR" >&6
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933 fi
3934
3935   AR=$ac_ct_AR
3936 else
3937   AR="$ac_cv_prog_AR"
3938 fi
3939
3940 if test -n "$ac_tool_prefix"; then
3941   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3942 set dummy ${ac_tool_prefix}ar; ac_word=$2
3943 echo "$as_me:3943: checking for $ac_word" >&5
3944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3945 if test "${ac_cv_prog_AR+set}" = set; then
3946   echo $ECHO_N "(cached) $ECHO_C" >&6
3947 else
3948   if test -n "$AR"; then
3949   ac_cv_prog_AR="$AR" # Let the user override the test.
3950 else
3951   ac_save_IFS=$IFS; IFS=$ac_path_separator
3952 ac_dummy="$PATH"
3953 for ac_dir in $ac_dummy; do
3954   IFS=$ac_save_IFS
3955   test -z "$ac_dir" && ac_dir=.
3956   $as_executable_p "$ac_dir/$ac_word" || continue
3957 ac_cv_prog_AR="${ac_tool_prefix}ar"
3958 echo "$as_me:3958: found $ac_dir/$ac_word" >&5
3959 break
3960 done
3961
3962 fi
3963 fi
3964 AR=$ac_cv_prog_AR
3965 if test -n "$AR"; then
3966   echo "$as_me:3966: result: $AR" >&5
3967 echo "${ECHO_T}$AR" >&6
3968 else
3969   echo "$as_me:3969: result: no" >&5
3970 echo "${ECHO_T}no" >&6
3971 fi
3972
3973 fi
3974 if test -z "$ac_cv_prog_AR"; then
3975   ac_ct_AR=$AR
3976   # Extract the first word of "ar", so it can be a program name with args.
3977 set dummy ar; ac_word=$2
3978 echo "$as_me:3978: checking for $ac_word" >&5
3979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3980 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3981   echo $ECHO_N "(cached) $ECHO_C" >&6
3982 else
3983   if test -n "$ac_ct_AR"; then
3984   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3985 else
3986   ac_save_IFS=$IFS; IFS=$ac_path_separator
3987 ac_dummy="$PATH"
3988 for ac_dir in $ac_dummy; do
3989   IFS=$ac_save_IFS
3990   test -z "$ac_dir" && ac_dir=.
3991   $as_executable_p "$ac_dir/$ac_word" || continue
3992 ac_cv_prog_ac_ct_AR="ar"
3993 echo "$as_me:3993: found $ac_dir/$ac_word" >&5
3994 break
3995 done
3996
3997   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3998 fi
3999 fi
4000 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4001 if test -n "$ac_ct_AR"; then
4002   echo "$as_me:4002: result: $ac_ct_AR" >&5
4003 echo "${ECHO_T}$ac_ct_AR" >&6
4004 else
4005   echo "$as_me:4005: result: no" >&5
4006 echo "${ECHO_T}no" >&6
4007 fi
4008
4009   AR=$ac_ct_AR
4010 else
4011   AR="$ac_cv_prog_AR"
4012 fi
4013
4014 echo "$as_me:4014: checking for options to update archives" >&5
4015 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4016 if test "${cf_cv_ar_flags+set}" = set; then
4017   echo $ECHO_N "(cached) $ECHO_C" >&6
4018 else
4019
4020         cf_cv_ar_flags=unknown
4021         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4022         do
4023
4024                 # check if $ARFLAGS already contains this choice
4025                 if test "x$ARFLAGS" != "x" ; then
4026                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4027                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4028                                 cf_cv_ar_flags=
4029                                 break
4030                         fi
4031                 fi
4032
4033                 rm -f conftest.$ac_cv_objext
4034                 rm -f conftest.a
4035
4036                 cat >conftest.$ac_ext <<EOF
4037 #line 4037 "configure"
4038 int     testdata[3] = { 123, 456, 789 };
4039 EOF
4040                 if { (eval echo "$as_me:4040: \"$ac_compile\"") >&5
4041   (eval $ac_compile) 2>&5
4042   ac_status=$?
4043   echo "$as_me:4043: \$? = $ac_status" >&5
4044   (exit $ac_status); } ; then
4045                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4046                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4047                         if test -f conftest.a ; then
4048                                 cf_cv_ar_flags=$cf_ar_flags
4049                                 break
4050                         fi
4051                 else
4052                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4053
4054 echo "${as_me:-configure}:4054: testing cannot compile test-program ..." 1>&5
4055
4056                         break
4057                 fi
4058         done
4059         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4060
4061 fi
4062 echo "$as_me:4062: result: $cf_cv_ar_flags" >&5
4063 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4064
4065 if test -n "$ARFLAGS" ; then
4066         if test -n "$cf_cv_ar_flags" ; then
4067                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4068         fi
4069 else
4070         ARFLAGS=$cf_cv_ar_flags
4071 fi
4072
4073 echo "$as_me:4073: checking if you have specified an install-prefix" >&5
4074 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4075
4076 # Check whether --with-install-prefix or --without-install-prefix was given.
4077 if test "${with_install_prefix+set}" = set; then
4078   withval="$with_install_prefix"
4079   case "x$withval" in #(vi
4080         xyes|xno) #(vi
4081                 ;;
4082         *)      DESTDIR="$withval"
4083                 ;;
4084         esac
4085 fi;
4086 echo "$as_me:4086: result: $DESTDIR" >&5
4087 echo "${ECHO_T}$DESTDIR" >&6
4088
4089 ###############################################################################
4090
4091 # If we're cross-compiling, allow the user to override the tools and their
4092 # options.  The configure script is oriented toward identifying the host
4093 # compiler, etc., but we need a build compiler to generate parts of the source.
4094
4095 if test "$cross_compiling" = yes ; then
4096
4097         # defaults that we might want to override
4098         : ${BUILD_CFLAGS:=''}
4099         : ${BUILD_CPPFLAGS:=''}
4100         : ${BUILD_LDFLAGS:=''}
4101         : ${BUILD_LIBS:=''}
4102         : ${BUILD_EXEEXT:='$x'}
4103         : ${BUILD_OBJEXT:='o'}
4104
4105 # Check whether --with-build-cc or --without-build-cc was given.
4106 if test "${with_build_cc+set}" = set; then
4107   withval="$with_build_cc"
4108   BUILD_CC="$withval"
4109 else
4110   for ac_prog in gcc cc cl
4111 do
4112   # Extract the first word of "$ac_prog", so it can be a program name with args.
4113 set dummy $ac_prog; ac_word=$2
4114 echo "$as_me:4114: checking for $ac_word" >&5
4115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4116 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4117   echo $ECHO_N "(cached) $ECHO_C" >&6
4118 else
4119   if test -n "$BUILD_CC"; then
4120   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4121 else
4122   ac_save_IFS=$IFS; IFS=$ac_path_separator
4123 ac_dummy="$PATH"
4124 for ac_dir in $ac_dummy; do
4125   IFS=$ac_save_IFS
4126   test -z "$ac_dir" && ac_dir=.
4127   $as_executable_p "$ac_dir/$ac_word" || continue
4128 ac_cv_prog_BUILD_CC="$ac_prog"
4129 echo "$as_me:4129: found $ac_dir/$ac_word" >&5
4130 break
4131 done
4132
4133 fi
4134 fi
4135 BUILD_CC=$ac_cv_prog_BUILD_CC
4136 if test -n "$BUILD_CC"; then
4137   echo "$as_me:4137: result: $BUILD_CC" >&5
4138 echo "${ECHO_T}$BUILD_CC" >&6
4139 else
4140   echo "$as_me:4140: result: no" >&5
4141 echo "${ECHO_T}no" >&6
4142 fi
4143
4144   test -n "$BUILD_CC" && break
4145 done
4146
4147 fi;
4148         echo "$as_me:4148: checking for native build C compiler" >&5
4149 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4150         echo "$as_me:4150: result: $BUILD_CC" >&5
4151 echo "${ECHO_T}$BUILD_CC" >&6
4152
4153         echo "$as_me:4153: checking for native build C preprocessor" >&5
4154 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4155
4156 # Check whether --with-build-cpp or --without-build-cpp was given.
4157 if test "${with_build_cpp+set}" = set; then
4158   withval="$with_build_cpp"
4159   BUILD_CPP="$withval"
4160 else
4161   BUILD_CPP='${BUILD_CC} -E'
4162 fi;
4163         echo "$as_me:4163: result: $BUILD_CPP" >&5
4164 echo "${ECHO_T}$BUILD_CPP" >&6
4165
4166         echo "$as_me:4166: checking for native build C flags" >&5
4167 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4168
4169 # Check whether --with-build-cflags or --without-build-cflags was given.
4170 if test "${with_build_cflags+set}" = set; then
4171   withval="$with_build_cflags"
4172   BUILD_CFLAGS="$withval"
4173 fi;
4174         echo "$as_me:4174: result: $BUILD_CFLAGS" >&5
4175 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4176
4177         echo "$as_me:4177: checking for native build C preprocessor-flags" >&5
4178 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4179
4180 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4181 if test "${with_build_cppflags+set}" = set; then
4182   withval="$with_build_cppflags"
4183   BUILD_CPPFLAGS="$withval"
4184 fi;
4185         echo "$as_me:4185: result: $BUILD_CPPFLAGS" >&5
4186 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4187
4188         echo "$as_me:4188: checking for native build linker-flags" >&5
4189 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4190
4191 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4192 if test "${with_build_ldflags+set}" = set; then
4193   withval="$with_build_ldflags"
4194   BUILD_LDFLAGS="$withval"
4195 fi;
4196         echo "$as_me:4196: result: $BUILD_LDFLAGS" >&5
4197 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4198
4199         echo "$as_me:4199: checking for native build linker-libraries" >&5
4200 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-build-libs or --without-build-libs was given.
4203 if test "${with_build_libs+set}" = set; then
4204   withval="$with_build_libs"
4205   BUILD_LIBS="$withval"
4206 fi;
4207         echo "$as_me:4207: result: $BUILD_LIBS" >&5
4208 echo "${ECHO_T}$BUILD_LIBS" >&6
4209
4210         # this assumes we're on Unix.
4211         BUILD_EXEEXT=
4212         BUILD_OBJEXT=o
4213
4214         : ${BUILD_CC:='${CC}'}
4215
4216         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4217                 { { echo "$as_me:4217: error: Cross-build requires two compilers.
4218 Use --with-build-cc to specify the native compiler." >&5
4219 echo "$as_me: error: Cross-build requires two compilers.
4220 Use --with-build-cc to specify the native compiler." >&2;}
4221    { (exit 1); exit 1; }; }
4222         fi
4223
4224 else
4225         : ${BUILD_CC:='${CC}'}
4226         : ${BUILD_CPP:='${CPP}'}
4227         : ${BUILD_CFLAGS:='${CFLAGS}'}
4228         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4229         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4230         : ${BUILD_LIBS:='${LIBS}'}
4231         : ${BUILD_EXEEXT:='$x'}
4232         : ${BUILD_OBJEXT:='o'}
4233 fi
4234
4235 ###############################################################################
4236
4237 ### Options to allow the user to specify the set of libraries which are used.
4238 ### Use "--without-normal --with-shared" to allow the default model to be
4239 ### shared, for example.
4240 cf_list_models=""
4241
4242 echo "$as_me:4242: checking if libtool -version-number should be used" >&5
4243 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4244
4245 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4246 if test "${enable_libtool_version+set}" = set; then
4247   enableval="$enable_libtool_version"
4248   test "$enableval" != no && enableval=yes
4249   if test "$enableval" != "yes" ; then
4250     cf_libtool_version=no
4251   else
4252     cf_libtool_version=yes
4253   fi
4254 else
4255   enableval=yes
4256   cf_libtool_version=yes
4257
4258 fi;
4259 echo "$as_me:4259: result: $cf_libtool_version" >&5
4260 echo "${ECHO_T}$cf_libtool_version" >&6
4261
4262 if test "$cf_libtool_version" = yes ; then
4263         LIBTOOL_VERSION="-version-number"
4264 else
4265         LIBTOOL_VERSION="-version-info"
4266 fi
4267
4268 LIBTOOL=
4269
4270 # common library maintenance symbols that are convenient for libtool scripts:
4271 LIB_CREATE='${AR} -cr'
4272 LIB_OBJECT='${OBJECTS}'
4273 LIB_SUFFIX=.a
4274 LIB_PREP="$RANLIB"
4275
4276 # symbols used to prop libtool up to enable it to determine what it should be
4277 # doing:
4278 LIB_CLEAN=
4279 LIB_COMPILE=
4280 LIB_LINK='${CC}'
4281 LIB_INSTALL=
4282 LIB_UNINSTALL=
4283
4284 echo "$as_me:4284: checking if you want to build libraries with libtool" >&5
4285 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4286
4287 # Check whether --with-libtool or --without-libtool was given.
4288 if test "${with_libtool+set}" = set; then
4289   withval="$with_libtool"
4290   with_libtool=$withval
4291 else
4292   with_libtool=no
4293 fi;
4294 echo "$as_me:4294: result: $with_libtool" >&5
4295 echo "${ECHO_T}$with_libtool" >&6
4296 if test "$with_libtool" != "no"; then
4297
4298         if test "$with_libtool" != "yes" ; then
4299
4300 if test "x$prefix" != xNONE; then
4301   cf_path_syntax="$prefix"
4302 else
4303   cf_path_syntax="$ac_default_prefix"
4304 fi
4305
4306 case ".$with_libtool" in #(vi
4307 .\$\(*\)*|.\'*\'*) #(vi
4308   ;;
4309 ..|./*|.\\*) #(vi
4310   ;;
4311 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4312   ;;
4313 .\${*prefix}*|.\${*dir}*) #(vi
4314   eval with_libtool="$with_libtool"
4315   case ".$with_libtool" in #(vi
4316   .NONE/*)
4317     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4318     ;;
4319   esac
4320   ;; #(vi
4321 .no|.NONE/*)
4322   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4323   ;;
4324 *)
4325   { { echo "$as_me:4325: error: expected a pathname, not \"$with_libtool\"" >&5
4326 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4327    { (exit 1); exit 1; }; }
4328   ;;
4329 esac
4330
4331                 LIBTOOL=$with_libtool
4332         else
4333                 if test -n "$ac_tool_prefix"; then
4334   for ac_prog in libtool glibtool
4335   do
4336     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4337 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4338 echo "$as_me:4338: checking for $ac_word" >&5
4339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4340 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343   if test -n "$LIBTOOL"; then
4344   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4345 else
4346   ac_save_IFS=$IFS; IFS=$ac_path_separator
4347 ac_dummy="$PATH"
4348 for ac_dir in $ac_dummy; do
4349   IFS=$ac_save_IFS
4350   test -z "$ac_dir" && ac_dir=.
4351   $as_executable_p "$ac_dir/$ac_word" || continue
4352 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4353 echo "$as_me:4353: found $ac_dir/$ac_word" >&5
4354 break
4355 done
4356
4357 fi
4358 fi
4359 LIBTOOL=$ac_cv_prog_LIBTOOL
4360 if test -n "$LIBTOOL"; then
4361   echo "$as_me:4361: result: $LIBTOOL" >&5
4362 echo "${ECHO_T}$LIBTOOL" >&6
4363 else
4364   echo "$as_me:4364: result: no" >&5
4365 echo "${ECHO_T}no" >&6
4366 fi
4367
4368     test -n "$LIBTOOL" && break
4369   done
4370 fi
4371 if test -z "$LIBTOOL"; then
4372   ac_ct_LIBTOOL=$LIBTOOL
4373   for ac_prog in libtool glibtool
4374 do
4375   # Extract the first word of "$ac_prog", so it can be a program name with args.
4376 set dummy $ac_prog; ac_word=$2
4377 echo "$as_me:4377: checking for $ac_word" >&5
4378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4379 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4380   echo $ECHO_N "(cached) $ECHO_C" >&6
4381 else
4382   if test -n "$ac_ct_LIBTOOL"; then
4383   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4384 else
4385   ac_save_IFS=$IFS; IFS=$ac_path_separator
4386 ac_dummy="$PATH"
4387 for ac_dir in $ac_dummy; do
4388   IFS=$ac_save_IFS
4389   test -z "$ac_dir" && ac_dir=.
4390   $as_executable_p "$ac_dir/$ac_word" || continue
4391 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4392 echo "$as_me:4392: found $ac_dir/$ac_word" >&5
4393 break
4394 done
4395
4396 fi
4397 fi
4398 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4399 if test -n "$ac_ct_LIBTOOL"; then
4400   echo "$as_me:4400: result: $ac_ct_LIBTOOL" >&5
4401 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4402 else
4403   echo "$as_me:4403: result: no" >&5
4404 echo "${ECHO_T}no" >&6
4405 fi
4406
4407   test -n "$ac_ct_LIBTOOL" && break
4408 done
4409 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4410
4411   LIBTOOL=$ac_ct_LIBTOOL
4412 fi
4413
4414 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4415 then
4416         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4417 else
4418         cf_cv_libtool_version=
4419 fi
4420 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4421
4422                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4423                 then
4424
4425 unset ac_cv_prog_ac_ct_LIBTOOL
4426 unset ac_ct_LIBTOOL
4427 unset LIBTOOL
4428
4429                         if test -n "$ac_tool_prefix"; then
4430   for ac_prog in glibtool
4431   do
4432     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4433 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4434 echo "$as_me:4434: checking for $ac_word" >&5
4435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4436 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   if test -n "$LIBTOOL"; then
4440   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4441 else
4442   ac_save_IFS=$IFS; IFS=$ac_path_separator
4443 ac_dummy="$PATH"
4444 for ac_dir in $ac_dummy; do
4445   IFS=$ac_save_IFS
4446   test -z "$ac_dir" && ac_dir=.
4447   $as_executable_p "$ac_dir/$ac_word" || continue
4448 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4449 echo "$as_me:4449: found $ac_dir/$ac_word" >&5
4450 break
4451 done
4452
4453 fi
4454 fi
4455 LIBTOOL=$ac_cv_prog_LIBTOOL
4456 if test -n "$LIBTOOL"; then
4457   echo "$as_me:4457: result: $LIBTOOL" >&5
4458 echo "${ECHO_T}$LIBTOOL" >&6
4459 else
4460   echo "$as_me:4460: result: no" >&5
4461 echo "${ECHO_T}no" >&6
4462 fi
4463
4464     test -n "$LIBTOOL" && break
4465   done
4466 fi
4467 if test -z "$LIBTOOL"; then
4468   ac_ct_LIBTOOL=$LIBTOOL
4469   for ac_prog in glibtool
4470 do
4471   # Extract the first word of "$ac_prog", so it can be a program name with args.
4472 set dummy $ac_prog; ac_word=$2
4473 echo "$as_me:4473: checking for $ac_word" >&5
4474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4475 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4476   echo $ECHO_N "(cached) $ECHO_C" >&6
4477 else
4478   if test -n "$ac_ct_LIBTOOL"; then
4479   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4480 else
4481   ac_save_IFS=$IFS; IFS=$ac_path_separator
4482 ac_dummy="$PATH"
4483 for ac_dir in $ac_dummy; do
4484   IFS=$ac_save_IFS
4485   test -z "$ac_dir" && ac_dir=.
4486   $as_executable_p "$ac_dir/$ac_word" || continue
4487 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4488 echo "$as_me:4488: found $ac_dir/$ac_word" >&5
4489 break
4490 done
4491
4492 fi
4493 fi
4494 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4495 if test -n "$ac_ct_LIBTOOL"; then
4496   echo "$as_me:4496: result: $ac_ct_LIBTOOL" >&5
4497 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4498 else
4499   echo "$as_me:4499: result: no" >&5
4500 echo "${ECHO_T}no" >&6
4501 fi
4502
4503   test -n "$ac_ct_LIBTOOL" && break
4504 done
4505 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4506
4507   LIBTOOL=$ac_ct_LIBTOOL
4508 fi
4509
4510 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4511 then
4512         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4513 else
4514         cf_cv_libtool_version=
4515 fi
4516 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4517
4518                 fi
4519         fi
4520         if test -z "$LIBTOOL" ; then
4521                 { { echo "$as_me:4521: error: Cannot find libtool" >&5
4522 echo "$as_me: error: Cannot find libtool" >&2;}
4523    { (exit 1); exit 1; }; }
4524         fi
4525         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4526         LIB_OBJECT='${OBJECTS:.o=.lo}'
4527         LIB_SUFFIX=.la
4528         LIB_CLEAN='${LIBTOOL} --mode=clean'
4529         LIB_COMPILE='${LIBTOOL} --mode=compile'
4530         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4531         LIB_INSTALL='${LIBTOOL} --mode=install'
4532         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4533         LIB_PREP=:
4534
4535 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4536 then
4537         echo "$as_me:4537: checking version of $LIBTOOL" >&5
4538 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4539
4540 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4541 then
4542         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4543 else
4544         cf_cv_libtool_version=
4545 fi
4546 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4547
4548         echo "$as_me:4548: result: $cf_cv_libtool_version" >&5
4549 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4550         if test -z "$cf_cv_libtool_version" ; then
4551                 { { echo "$as_me:4551: error: This is not GNU libtool" >&5
4552 echo "$as_me: error: This is not GNU libtool" >&2;}
4553    { (exit 1); exit 1; }; }
4554         fi
4555 else
4556         { { echo "$as_me:4556: error: GNU libtool has not been found" >&5
4557 echo "$as_me: error: GNU libtool has not been found" >&2;}
4558    { (exit 1); exit 1; }; }
4559 fi
4560
4561         # special hack to add -no-undefined (which libtool should do for itself)
4562         LT_UNDEF=
4563         case "$cf_cv_system_name" in #(vi
4564         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4565                 LT_UNDEF=-no-undefined
4566                 ;;
4567         esac
4568
4569         # special hack to add --tag option for C++ compiler
4570         case $cf_cv_libtool_version in #(vi
4571         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4572                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4573                 LIBTOOL="$LIBTOOL --tag=CC"
4574                 ;;
4575         *)
4576                 LIBTOOL_CXX="$LIBTOOL"
4577                 ;;
4578         esac
4579 else
4580         LIBTOOL=""
4581         LIBTOOL_CXX=""
4582 fi
4583
4584 test -z "$LIBTOOL" && ECHO_LT=
4585
4586 if test "$with_libtool" != "no" ; then
4587
4588 cf_list_models="$cf_list_models libtool"
4589
4590 else
4591
4592 echo "$as_me:4592: checking if you want to build shared libraries" >&5
4593 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4594
4595 # Check whether --with-shared or --without-shared was given.
4596 if test "${with_shared+set}" = set; then
4597   withval="$with_shared"
4598   with_shared=$withval
4599 else
4600   with_shared=no
4601 fi;
4602 echo "$as_me:4602: result: $with_shared" >&5
4603 echo "${ECHO_T}$with_shared" >&6
4604 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4605
4606 echo "$as_me:4606: checking if you want to build static libraries" >&5
4607 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4608
4609 # Check whether --with-normal or --without-normal was given.
4610 if test "${with_normal+set}" = set; then
4611   withval="$with_normal"
4612   with_normal=$withval
4613 else
4614   with_normal=yes
4615 fi;
4616 echo "$as_me:4616: result: $with_normal" >&5
4617 echo "${ECHO_T}$with_normal" >&6
4618 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4619
4620 echo "$as_me:4620: checking if you want to build debug libraries" >&5
4621 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4622
4623 # Check whether --with-debug or --without-debug was given.
4624 if test "${with_debug+set}" = set; then
4625   withval="$with_debug"
4626   with_debug=$withval
4627 else
4628   with_debug=yes
4629 fi;
4630 echo "$as_me:4630: result: $with_debug" >&5
4631 echo "${ECHO_T}$with_debug" >&6
4632 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4633
4634 echo "$as_me:4634: checking if you want to build profiling libraries" >&5
4635 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4636
4637 # Check whether --with-profile or --without-profile was given.
4638 if test "${with_profile+set}" = set; then
4639   withval="$with_profile"
4640   with_profile=$withval
4641 else
4642   with_profile=no
4643 fi;
4644 echo "$as_me:4644: result: $with_profile" >&5
4645 echo "${ECHO_T}$with_profile" >&6
4646 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4647
4648 fi
4649
4650 if test "X$cf_with_cxx_binding" != Xno; then
4651 if test "x$with_shared" = "xyes"; then
4652 echo "$as_me:4652: checking if you want to build C++ shared libraries" >&5
4653 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4654
4655 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4656 if test "${with_cxx_shared+set}" = set; then
4657   withval="$with_cxx_shared"
4658   with_shared_cxx=$withval
4659 else
4660   with_shared_cxx=no
4661 fi;
4662 echo "$as_me:4662: result: $with_shared_cxx" >&5
4663 echo "${ECHO_T}$with_shared_cxx" >&6
4664 fi
4665 fi
4666
4667 ###############################################################################
4668
4669 echo "$as_me:4669: checking for specified models" >&5
4670 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4671 test -z "$cf_list_models" && cf_list_models=normal
4672 test "$with_libtool" != "no" && cf_list_models=libtool
4673 echo "$as_me:4673: result: $cf_list_models" >&5
4674 echo "${ECHO_T}$cf_list_models" >&6
4675
4676 ### Use the first model as the default, and save its suffix for use in building
4677 ### up test-applications.
4678 echo "$as_me:4678: checking for default model" >&5
4679 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4680 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4681 echo "$as_me:4681: result: $DFT_LWR_MODEL" >&5
4682 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4683
4684 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4685
4686 TICS_NAME=tic
4687
4688 TINFO_NAME=tinfo
4689
4690 LIB_NAME=ncurses
4691
4692 LIB_DIR=../lib
4693 LIB_2ND=../../lib
4694
4695 echo "$as_me:4695: checking if you want to have a library-prefix" >&5
4696 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4697
4698 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4699 if test "${with_lib_prefix+set}" = set; then
4700   withval="$with_lib_prefix"
4701   with_lib_prefix=$withval
4702 else
4703   with_lib_prefix=auto
4704 fi;
4705 echo "$as_me:4705: result: $with_lib_prefix" >&5
4706 echo "${ECHO_T}$with_lib_prefix" >&6
4707
4708 if test $with_lib_prefix = auto
4709 then
4710
4711         case $cf_cv_system_name in #(vi
4712         OS/2*|os2*) #(vi
4713         LIB_PREFIX=''
4714         ;;
4715         *)      LIB_PREFIX='lib'
4716         ;;
4717         esac
4718 cf_prefix=$LIB_PREFIX
4719
4720 elif test $with_lib_prefix = no
4721 then
4722         LIB_PREFIX=
4723 else
4724         LIB_PREFIX=$with_lib_prefix
4725 fi
4726
4727 LIB_SUFFIX=
4728
4729         echo "$as_me:4729: checking for PATH separator" >&5
4730 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4731         case $cf_cv_system_name in
4732         os2*)   PATH_SEPARATOR=';'  ;;
4733         *)      ${PATH_SEPARATOR:=':'}  ;;
4734         esac
4735
4736         echo "$as_me:4736: result: $PATH_SEPARATOR" >&5
4737 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4738
4739 ###############################################################################
4740
4741 echo "$as_me:4741: checking if you want to build a separate terminfo library" >&5
4742 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4743
4744 # Check whether --with-termlib or --without-termlib was given.
4745 if test "${with_termlib+set}" = set; then
4746   withval="$with_termlib"
4747   with_termlib=$withval
4748 else
4749   with_termlib=no
4750 fi;
4751 echo "$as_me:4751: result: $with_termlib" >&5
4752 echo "${ECHO_T}$with_termlib" >&6
4753
4754 echo "$as_me:4754: checking if you want to build a separate tic library" >&5
4755 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4756
4757 # Check whether --with-ticlib or --without-ticlib was given.
4758 if test "${with_ticlib+set}" = set; then
4759   withval="$with_ticlib"
4760   with_ticlib=$withval
4761 else
4762   with_ticlib=no
4763 fi;
4764 echo "$as_me:4764: result: $with_ticlib" >&5
4765 echo "${ECHO_T}$with_ticlib" >&6
4766
4767 ### Checks for special libraries, must be done up-front.
4768 SHLIB_LIST=""
4769
4770 echo "$as_me:4770: checking if you want to link with the GPM mouse library" >&5
4771 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4772
4773 # Check whether --with-gpm or --without-gpm was given.
4774 if test "${with_gpm+set}" = set; then
4775   withval="$with_gpm"
4776   with_gpm=$withval
4777 else
4778   with_gpm=maybe
4779 fi;
4780 echo "$as_me:4780: result: $with_gpm" >&5
4781 echo "${ECHO_T}$with_gpm" >&6
4782
4783 if test "$with_gpm" != no ; then
4784         echo "$as_me:4784: checking for gpm.h" >&5
4785 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4786 if test "${ac_cv_header_gpm_h+set}" = set; then
4787   echo $ECHO_N "(cached) $ECHO_C" >&6
4788 else
4789   cat >conftest.$ac_ext <<_ACEOF
4790 #line 4790 "configure"
4791 #include "confdefs.h"
4792 #include <gpm.h>
4793 _ACEOF
4794 if { (eval echo "$as_me:4794: \"$ac_cpp conftest.$ac_ext\"") >&5
4795   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4796   ac_status=$?
4797   egrep -v '^ *\+' conftest.er1 >conftest.err
4798   rm -f conftest.er1
4799   cat conftest.err >&5
4800   echo "$as_me:4800: \$? = $ac_status" >&5
4801   (exit $ac_status); } >/dev/null; then
4802   if test -s conftest.err; then
4803     ac_cpp_err=$ac_c_preproc_warn_flag
4804   else
4805     ac_cpp_err=
4806   fi
4807 else
4808   ac_cpp_err=yes
4809 fi
4810 if test -z "$ac_cpp_err"; then
4811   ac_cv_header_gpm_h=yes
4812 else
4813   echo "$as_me: failed program was:" >&5
4814   cat conftest.$ac_ext >&5
4815   ac_cv_header_gpm_h=no
4816 fi
4817 rm -f conftest.err conftest.$ac_ext
4818 fi
4819 echo "$as_me:4819: result: $ac_cv_header_gpm_h" >&5
4820 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4821 if test $ac_cv_header_gpm_h = yes; then
4822
4823 cat >>confdefs.h <<\EOF
4824 #define HAVE_GPM_H 1
4825 EOF
4826
4827                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4828                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4829
4830 echo "${as_me:-configure}:4830: testing assuming we really have GPM library ..." 1>&5
4831
4832 cat >>confdefs.h <<\EOF
4833 #define HAVE_LIBGPM 1
4834 EOF
4835
4836                 else
4837                         echo "$as_me:4837: checking for Gpm_Open in -lgpm" >&5
4838 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4839 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4840   echo $ECHO_N "(cached) $ECHO_C" >&6
4841 else
4842   ac_check_lib_save_LIBS=$LIBS
4843 LIBS="-lgpm  $LIBS"
4844 cat >conftest.$ac_ext <<_ACEOF
4845 #line 4845 "configure"
4846 #include "confdefs.h"
4847
4848 /* Override any gcc2 internal prototype to avoid an error.  */
4849 #ifdef __cplusplus
4850 extern "C"
4851 #endif
4852 /* We use char because int might match the return type of a gcc2
4853    builtin and then its argument prototype would still apply.  */
4854 char Gpm_Open ();
4855 int
4856 main ()
4857 {
4858 Gpm_Open ();
4859   ;
4860   return 0;
4861 }
4862 _ACEOF
4863 rm -f conftest.$ac_objext conftest$ac_exeext
4864 if { (eval echo "$as_me:4864: \"$ac_link\"") >&5
4865   (eval $ac_link) 2>&5
4866   ac_status=$?
4867   echo "$as_me:4867: \$? = $ac_status" >&5
4868   (exit $ac_status); } &&
4869          { ac_try='test -s conftest$ac_exeext'
4870   { (eval echo "$as_me:4870: \"$ac_try\"") >&5
4871   (eval $ac_try) 2>&5
4872   ac_status=$?
4873   echo "$as_me:4873: \$? = $ac_status" >&5
4874   (exit $ac_status); }; }; then
4875   ac_cv_lib_gpm_Gpm_Open=yes
4876 else
4877   echo "$as_me: failed program was:" >&5
4878 cat conftest.$ac_ext >&5
4879 ac_cv_lib_gpm_Gpm_Open=no
4880 fi
4881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4882 LIBS=$ac_check_lib_save_LIBS
4883 fi
4884 echo "$as_me:4884: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4885 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4886 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4887   :
4888 else
4889
4890                                 { { echo "$as_me:4890: error: Cannot link with GPM library" >&5
4891 echo "$as_me: error: Cannot link with GPM library" >&2;}
4892    { (exit 1); exit 1; }; }
4893                 fi
4894                 with_gpm=yes
4895
4896 fi
4897
4898 else
4899
4900                 test "$with_gpm" != maybe && { echo "$as_me:4900: WARNING: Cannot find GPM header" >&5
4901 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4902                 with_gpm=no
4903
4904 fi
4905
4906 fi
4907
4908 if test "$with_gpm" != no ; then
4909         echo "$as_me:4909: checking if you want to load GPM dynamically" >&5
4910 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4911
4912 # Check whether --with-dlsym or --without-dlsym was given.
4913 if test "${with_dlsym+set}" = set; then
4914   withval="$with_dlsym"
4915   with_dlsym=$withval
4916 else
4917   with_dlsym=yes
4918 fi;
4919         echo "$as_me:4919: result: $with_dlsym" >&5
4920 echo "${ECHO_T}$with_dlsym" >&6
4921         if test "x$with_dlsym" = xyes ; then
4922
4923 cf_have_dlsym=no
4924 echo "$as_me:4924: checking for dlsym" >&5
4925 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4926 if test "${ac_cv_func_dlsym+set}" = set; then
4927   echo $ECHO_N "(cached) $ECHO_C" >&6
4928 else
4929   cat >conftest.$ac_ext <<_ACEOF
4930 #line 4930 "configure"
4931 #include "confdefs.h"
4932 /* System header to define __stub macros and hopefully few prototypes,
4933     which can conflict with char dlsym (); below.  */
4934 #include <assert.h>
4935 /* Override any gcc2 internal prototype to avoid an error.  */
4936 #ifdef __cplusplus
4937 extern "C"
4938 #endif
4939 /* We use char because int might match the return type of a gcc2
4940    builtin and then its argument prototype would still apply.  */
4941 char dlsym ();
4942 char (*f) ();
4943
4944 int
4945 main ()
4946 {
4947 /* The GNU C library defines this for functions which it implements
4948     to always fail with ENOSYS.  Some functions are actually named
4949     something starting with __ and the normal name is an alias.  */
4950 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4951 choke me
4952 #else
4953 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4954 #endif
4955
4956   ;
4957   return 0;
4958 }
4959 _ACEOF
4960 rm -f conftest.$ac_objext conftest$ac_exeext
4961 if { (eval echo "$as_me:4961: \"$ac_link\"") >&5
4962   (eval $ac_link) 2>&5
4963   ac_status=$?
4964   echo "$as_me:4964: \$? = $ac_status" >&5
4965   (exit $ac_status); } &&
4966          { ac_try='test -s conftest$ac_exeext'
4967   { (eval echo "$as_me:4967: \"$ac_try\"") >&5
4968   (eval $ac_try) 2>&5
4969   ac_status=$?
4970   echo "$as_me:4970: \$? = $ac_status" >&5
4971   (exit $ac_status); }; }; then
4972   ac_cv_func_dlsym=yes
4973 else
4974   echo "$as_me: failed program was:" >&5
4975 cat conftest.$ac_ext >&5
4976 ac_cv_func_dlsym=no
4977 fi
4978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4979 fi
4980 echo "$as_me:4980: result: $ac_cv_func_dlsym" >&5
4981 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4982 if test $ac_cv_func_dlsym = yes; then
4983   cf_have_dlsym=yes
4984 else
4985
4986 cf_have_libdl=no
4987 echo "$as_me:4987: checking for dlsym in -ldl" >&5
4988 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4989 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4990   echo $ECHO_N "(cached) $ECHO_C" >&6
4991 else
4992   ac_check_lib_save_LIBS=$LIBS
4993 LIBS="-ldl  $LIBS"
4994 cat >conftest.$ac_ext <<_ACEOF
4995 #line 4995 "configure"
4996 #include "confdefs.h"
4997
4998 /* Override any gcc2 internal prototype to avoid an error.  */
4999 #ifdef __cplusplus
5000 extern "C"
5001 #endif
5002 /* We use char because int might match the return type of a gcc2
5003    builtin and then its argument prototype would still apply.  */
5004 char dlsym ();
5005 int
5006 main ()
5007 {
5008 dlsym ();
5009   ;
5010   return 0;
5011 }
5012 _ACEOF
5013 rm -f conftest.$ac_objext conftest$ac_exeext
5014 if { (eval echo "$as_me:5014: \"$ac_link\"") >&5
5015   (eval $ac_link) 2>&5
5016   ac_status=$?
5017   echo "$as_me:5017: \$? = $ac_status" >&5
5018   (exit $ac_status); } &&
5019          { ac_try='test -s conftest$ac_exeext'
5020   { (eval echo "$as_me:5020: \"$ac_try\"") >&5
5021   (eval $ac_try) 2>&5
5022   ac_status=$?
5023   echo "$as_me:5023: \$? = $ac_status" >&5
5024   (exit $ac_status); }; }; then
5025   ac_cv_lib_dl_dlsym=yes
5026 else
5027   echo "$as_me: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5029 ac_cv_lib_dl_dlsym=no
5030 fi
5031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5032 LIBS=$ac_check_lib_save_LIBS
5033 fi
5034 echo "$as_me:5034: result: $ac_cv_lib_dl_dlsym" >&5
5035 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5036 if test $ac_cv_lib_dl_dlsym = yes; then
5037
5038         cf_have_dlsym=yes
5039         cf_have_libdl=yes
5040 fi
5041
5042 fi
5043
5044 if test "$cf_have_dlsym" = yes ; then
5045         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5046
5047         echo "$as_me:5047: checking whether able to link to dl*() functions" >&5
5048 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5049         cat >conftest.$ac_ext <<_ACEOF
5050 #line 5050 "configure"
5051 #include "confdefs.h"
5052 #include <dlfcn.h>
5053 int
5054 main ()
5055 {
5056
5057                 void *obj;
5058                 if ((obj = dlopen("filename", 0)) != 0) {
5059                         if (dlsym(obj, "symbolname") == 0) {
5060                         dlclose(obj);
5061                         }
5062                 }
5063   ;
5064   return 0;
5065 }
5066 _ACEOF
5067 rm -f conftest.$ac_objext conftest$ac_exeext
5068 if { (eval echo "$as_me:5068: \"$ac_link\"") >&5
5069   (eval $ac_link) 2>&5
5070   ac_status=$?
5071   echo "$as_me:5071: \$? = $ac_status" >&5
5072   (exit $ac_status); } &&
5073          { ac_try='test -s conftest$ac_exeext'
5074   { (eval echo "$as_me:5074: \"$ac_try\"") >&5
5075   (eval $ac_try) 2>&5
5076   ac_status=$?
5077   echo "$as_me:5077: \$? = $ac_status" >&5
5078   (exit $ac_status); }; }; then
5079
5080 cat >>confdefs.h <<\EOF
5081 #define HAVE_LIBDL 1
5082 EOF
5083
5084 else
5085   echo "$as_me: failed program was:" >&5
5086 cat conftest.$ac_ext >&5
5087
5088                 { { echo "$as_me:5088: error: Cannot link test program for libdl" >&5
5089 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5090    { (exit 1); exit 1; }; }
5091 fi
5092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5093         echo "$as_me:5093: result: ok" >&5
5094 echo "${ECHO_T}ok" >&6
5095 else
5096         { { echo "$as_me:5096: error: Cannot find dlsym function" >&5
5097 echo "$as_me: error: Cannot find dlsym function" >&2;}
5098    { (exit 1); exit 1; }; }
5099 fi
5100
5101                 if test "x$with_gpm" != xyes ; then
5102                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5103
5104 echo "${as_me:-configure}:5104: testing assuming soname for gpm is $with_gpm ..." 1>&5
5105
5106                         cf_cv_gpm_soname="$with_gpm"
5107                 else
5108
5109 echo "$as_me:5109: checking for soname of gpm library" >&5
5110 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5111 if test "${cf_cv_gpm_soname+set}" = set; then
5112   echo $ECHO_N "(cached) $ECHO_C" >&6
5113 else
5114
5115 cf_cv_gpm_soname=unknown
5116 if test "$cross_compiling" != yes ; then
5117 cat >conftest.$ac_ext <<CF_EOF
5118 #include <gpm.h>
5119 int main()
5120 {
5121 if (Gpm_Open(0,0)) Gpm_Close();
5122         ${cf_cv_main_return:-return}(0);
5123 }
5124 CF_EOF
5125 cf_save_LIBS="$LIBS"
5126         LIBS="-lgpm $LIBS"
5127         if { (eval echo "$as_me:5127: \"$ac_compile\"") >&5
5128   (eval $ac_compile) 2>&5
5129   ac_status=$?
5130   echo "$as_me:5130: \$? = $ac_status" >&5
5131   (exit $ac_status); } ; then
5132                 if { (eval echo "$as_me:5132: \"$ac_link\"") >&5
5133   (eval $ac_link) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } ; then
5137                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5138                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5139                 fi
5140         fi
5141 rm -rf conftest*
5142 LIBS="$cf_save_LIBS"
5143 fi
5144
5145 fi
5146 echo "$as_me:5146: result: $cf_cv_gpm_soname" >&5
5147 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5148
5149                 fi
5150                 test "$cf_cv_gpm_soname" != "unknown" &&
5151 cat >>confdefs.h <<EOF
5152 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5153 EOF
5154
5155                 SHLIB_LIST="-ldl $SHLIB_LIST"
5156         else
5157                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5158                 TEST_LIBS="-lgpm $TEST_LIBS"
5159         fi
5160
5161 cat >>confdefs.h <<\EOF
5162 #define HAVE_LIBGPM 1
5163 EOF
5164
5165 echo "$as_me:5165: checking for Gpm_Wgetch in -lgpm" >&5
5166 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5167 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170   ac_check_lib_save_LIBS=$LIBS
5171 LIBS="-lgpm  $LIBS"
5172 cat >conftest.$ac_ext <<_ACEOF
5173 #line 5173 "configure"
5174 #include "confdefs.h"
5175
5176 /* Override any gcc2 internal prototype to avoid an error.  */
5177 #ifdef __cplusplus
5178 extern "C"
5179 #endif
5180 /* We use char because int might match the return type of a gcc2
5181    builtin and then its argument prototype would still apply.  */
5182 char Gpm_Wgetch ();
5183 int
5184 main ()
5185 {
5186 Gpm_Wgetch ();
5187   ;
5188   return 0;
5189 }
5190 _ACEOF
5191 rm -f conftest.$ac_objext conftest$ac_exeext
5192 if { (eval echo "$as_me:5192: \"$ac_link\"") >&5
5193   (eval $ac_link) 2>&5
5194   ac_status=$?
5195   echo "$as_me:5195: \$? = $ac_status" >&5
5196   (exit $ac_status); } &&
5197          { ac_try='test -s conftest$ac_exeext'
5198   { (eval echo "$as_me:5198: \"$ac_try\"") >&5
5199   (eval $ac_try) 2>&5
5200   ac_status=$?
5201   echo "$as_me:5201: \$? = $ac_status" >&5
5202   (exit $ac_status); }; }; then
5203   ac_cv_lib_gpm_Gpm_Wgetch=yes
5204 else
5205   echo "$as_me: failed program was:" >&5
5206 cat conftest.$ac_ext >&5
5207 ac_cv_lib_gpm_Gpm_Wgetch=no
5208 fi
5209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5210 LIBS=$ac_check_lib_save_LIBS
5211 fi
5212 echo "$as_me:5212: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5213 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5214 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5215
5216 echo "$as_me:5216: checking if GPM is weakly bound to curses library" >&5
5217 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5218 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5219   echo $ECHO_N "(cached) $ECHO_C" >&6
5220 else
5221
5222 cf_cv_check_gpm_wgetch=unknown
5223 if test "$cross_compiling" != yes ; then
5224
5225 cat >conftest.$ac_ext <<CF_EOF
5226 #include <gpm.h>
5227 int main()
5228 {
5229         Gpm_Wgetch();
5230         ${cf_cv_main_return:-return}(0);
5231 }
5232 CF_EOF
5233
5234         cf_save_LIBS="$LIBS"
5235         # This only works if we can look at the symbol table.  If a shared
5236         # library is stripped for install, we cannot use that.  So we're forced
5237         # to rely on the static library, noting that some packagers may not
5238         # include it.
5239         LIBS="-static -lgpm -dynamic $LIBS"
5240         if { (eval echo "$as_me:5240: \"$ac_compile\"") >&5
5241   (eval $ac_compile) 2>&5
5242   ac_status=$?
5243   echo "$as_me:5243: \$? = $ac_status" >&5
5244   (exit $ac_status); } ; then
5245                 if { (eval echo "$as_me:5245: \"$ac_link\"") >&5
5246   (eval $ac_link) 2>&5
5247   ac_status=$?
5248   echo "$as_me:5248: \$? = $ac_status" >&5
5249   (exit $ac_status); } ; then
5250                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5251                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5252                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5253                 fi
5254         fi
5255         rm -rf conftest*
5256         LIBS="$cf_save_LIBS"
5257 fi
5258
5259 fi
5260 echo "$as_me:5260: result: $cf_cv_check_gpm_wgetch" >&5
5261 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5262
5263 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5264         { echo "$as_me:5264: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5265 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5266 fi
5267
5268 fi
5269
5270 fi
5271
5272 # not everyone has "test -c"
5273 if test -c /dev/sysmouse 2>/dev/null ; then
5274 echo "$as_me:5274: checking if you want to use sysmouse" >&5
5275 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5276
5277 # Check whether --with-sysmouse or --without-sysmouse was given.
5278 if test "${with_sysmouse+set}" = set; then
5279   withval="$with_sysmouse"
5280   cf_with_sysmouse=$withval
5281 else
5282   cf_with_sysmouse=maybe
5283 fi;
5284         if test "$cf_with_sysmouse" != no ; then
5285         cat >conftest.$ac_ext <<_ACEOF
5286 #line 5286 "configure"
5287 #include "confdefs.h"
5288
5289 #include <osreldate.h>
5290 #if (__FreeBSD_version >= 400017)
5291 #include <sys/consio.h>
5292 #include <sys/fbio.h>
5293 #else
5294 #include <machine/console.h>
5295 #endif
5296
5297 int
5298 main ()
5299 {
5300
5301         struct mouse_info the_mouse;
5302         ioctl(0, CONS_MOUSECTL, &the_mouse);
5303
5304   ;
5305   return 0;
5306 }
5307 _ACEOF
5308 rm -f conftest.$ac_objext
5309 if { (eval echo "$as_me:5309: \"$ac_compile\"") >&5
5310   (eval $ac_compile) 2>&5
5311   ac_status=$?
5312   echo "$as_me:5312: \$? = $ac_status" >&5
5313   (exit $ac_status); } &&
5314          { ac_try='test -s conftest.$ac_objext'
5315   { (eval echo "$as_me:5315: \"$ac_try\"") >&5
5316   (eval $ac_try) 2>&5
5317   ac_status=$?
5318   echo "$as_me:5318: \$? = $ac_status" >&5
5319   (exit $ac_status); }; }; then
5320   cf_with_sysmouse=yes
5321 else
5322   echo "$as_me: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 cf_with_sysmouse=no
5325 fi
5326 rm -f conftest.$ac_objext conftest.$ac_ext
5327         fi
5328 echo "$as_me:5328: result: $cf_with_sysmouse" >&5
5329 echo "${ECHO_T}$cf_with_sysmouse" >&6
5330 test "$cf_with_sysmouse" = yes &&
5331 cat >>confdefs.h <<\EOF
5332 #define USE_SYSMOUSE 1
5333 EOF
5334
5335 fi
5336
5337 if test X"$CC_G_OPT" = X"" ; then
5338         CC_G_OPT='-g'
5339         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5340 fi
5341
5342 if test X"$CXX_G_OPT" = X"" ; then
5343         CXX_G_OPT='-g'
5344         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5345 fi
5346
5347 echo "$as_me:5347: checking for default loader flags" >&5
5348 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5349 case $DFT_LWR_MODEL in
5350 libtool) LD_MODEL=''   ;;
5351 normal)  LD_MODEL=''   ;;
5352 debug)   LD_MODEL=$CC_G_OPT ;;
5353 profile) LD_MODEL='-pg';;
5354 shared)  LD_MODEL=''   ;;
5355 esac
5356 echo "$as_me:5356: result: $LD_MODEL" >&5
5357 echo "${ECHO_T}$LD_MODEL" >&6
5358
5359 case $DFT_LWR_MODEL in
5360 shared)
5361
5362 echo "$as_me:5362: checking if rpath option should be used" >&5
5363 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5364
5365 # Check whether --enable-rpath or --disable-rpath was given.
5366 if test "${enable_rpath+set}" = set; then
5367   enableval="$enable_rpath"
5368   cf_cv_enable_rpath=$enableval
5369 else
5370   cf_cv_enable_rpath=no
5371 fi;
5372 echo "$as_me:5372: result: $cf_cv_enable_rpath" >&5
5373 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5374
5375 echo "$as_me:5375: checking if shared libraries should be relinked during install" >&5
5376 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5377
5378 # Check whether --enable-relink or --disable-relink was given.
5379 if test "${enable_relink+set}" = set; then
5380   enableval="$enable_relink"
5381   cf_cv_do_relink=$enableval
5382 else
5383   cf_cv_do_relink=yes
5384 fi;
5385 echo "$as_me:5385: result: $cf_cv_do_relink" >&5
5386 echo "${ECHO_T}$cf_cv_do_relink" >&6
5387         ;;
5388 esac
5389
5390 LD_RPATH_OPT=
5391 echo "$as_me:5391: checking for an rpath option" >&5
5392 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5393 case $cf_cv_system_name in #(vi
5394 irix*) #(vi
5395         if test "$GCC" = yes; then
5396                 LD_RPATH_OPT="-Wl,-rpath,"
5397         else
5398                 LD_RPATH_OPT="-rpath "
5399         fi
5400         ;;
5401 linux*|gnu*|k*bsd*-gnu) #(vi
5402         LD_RPATH_OPT="-Wl,-rpath,"
5403         ;;
5404 openbsd[2-9].*|mirbsd*) #(vi
5405         LD_RPATH_OPT="-Wl,-rpath,"
5406         ;;
5407 dragonfly*|freebsd*) #(vi
5408         LD_RPATH_OPT="-rpath "
5409         ;;
5410 netbsd*) #(vi
5411         LD_RPATH_OPT="-Wl,-rpath,"
5412         ;;
5413 osf*|mls+*) #(vi
5414         LD_RPATH_OPT="-rpath "
5415         ;;
5416 solaris2*) #(vi
5417         LD_RPATH_OPT="-R"
5418         ;;
5419 *)
5420         ;;
5421 esac
5422 echo "$as_me:5422: result: $LD_RPATH_OPT" >&5
5423 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5424
5425 case "x$LD_RPATH_OPT" in #(vi
5426 x-R*)
5427         echo "$as_me:5427: checking if we need a space after rpath option" >&5
5428 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5429         cf_save_LIBS="$LIBS"
5430         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5431         cat >conftest.$ac_ext <<_ACEOF
5432 #line 5432 "configure"
5433 #include "confdefs.h"
5434
5435 int
5436 main ()
5437 {
5438
5439   ;
5440   return 0;
5441 }
5442 _ACEOF
5443 rm -f conftest.$ac_objext conftest$ac_exeext
5444 if { (eval echo "$as_me:5444: \"$ac_link\"") >&5
5445   (eval $ac_link) 2>&5
5446   ac_status=$?
5447   echo "$as_me:5447: \$? = $ac_status" >&5
5448   (exit $ac_status); } &&
5449          { ac_try='test -s conftest$ac_exeext'
5450   { (eval echo "$as_me:5450: \"$ac_try\"") >&5
5451   (eval $ac_try) 2>&5
5452   ac_status=$?
5453   echo "$as_me:5453: \$? = $ac_status" >&5
5454   (exit $ac_status); }; }; then
5455   cf_rpath_space=no
5456 else
5457   echo "$as_me: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 cf_rpath_space=yes
5460 fi
5461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5462         LIBS="$cf_save_LIBS"
5463         echo "$as_me:5463: result: $cf_rpath_space" >&5
5464 echo "${ECHO_T}$cf_rpath_space" >&6
5465         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5466         ;;
5467 esac
5468
5469         LOCAL_LDFLAGS=
5470         LOCAL_LDFLAGS2=
5471         LD_SHARED_OPTS=
5472         INSTALL_LIB="-m 644"
5473
5474         cf_cv_do_symlinks=no
5475         cf_ld_rpath_opt=
5476         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5477
5478         echo "$as_me:5478: checking if release/abi version should be used for shared libs" >&5
5479 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5480
5481 # Check whether --with-shlib-version or --without-shlib-version was given.
5482 if test "${with_shlib_version+set}" = set; then
5483   withval="$with_shlib_version"
5484   test -z "$withval" && withval=auto
5485         case $withval in #(vi
5486         yes) #(vi
5487                 cf_cv_shlib_version=auto
5488                 ;;
5489         rel|abi|auto|no) #(vi
5490                 cf_cv_shlib_version=$withval
5491                 ;;
5492         *)
5493                 { { echo "$as_me:5493: error: option value must be one of: rel, abi, auto or no" >&5
5494 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5495    { (exit 1); exit 1; }; }
5496                 ;;
5497         esac
5498
5499 else
5500   cf_cv_shlib_version=auto
5501 fi;
5502         echo "$as_me:5502: result: $cf_cv_shlib_version" >&5
5503 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5504
5505         cf_cv_rm_so_locs=no
5506         cf_try_cflags=
5507
5508         # Some less-capable ports of gcc support only -fpic
5509         CC_SHARED_OPTS=
5510         if test "$GCC" = yes
5511         then
5512                 echo "$as_me:5512: checking which $CC option to use" >&5
5513 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5514                 cf_save_CFLAGS="$CFLAGS"
5515                 for CC_SHARED_OPTS in -fPIC -fpic ''
5516                 do
5517                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5518                         cat >conftest.$ac_ext <<_ACEOF
5519 #line 5519 "configure"
5520 #include "confdefs.h"
5521 #include <stdio.h>
5522 int
5523 main ()
5524 {
5525 int x = 1
5526   ;
5527   return 0;
5528 }
5529 _ACEOF
5530 rm -f conftest.$ac_objext
5531 if { (eval echo "$as_me:5531: \"$ac_compile\"") >&5
5532   (eval $ac_compile) 2>&5
5533   ac_status=$?
5534   echo "$as_me:5534: \$? = $ac_status" >&5
5535   (exit $ac_status); } &&
5536          { ac_try='test -s conftest.$ac_objext'
5537   { (eval echo "$as_me:5537: \"$ac_try\"") >&5
5538   (eval $ac_try) 2>&5
5539   ac_status=$?
5540   echo "$as_me:5540: \$? = $ac_status" >&5
5541   (exit $ac_status); }; }; then
5542   break
5543 else
5544   echo "$as_me: failed program was:" >&5
5545 cat conftest.$ac_ext >&5
5546 fi
5547 rm -f conftest.$ac_objext conftest.$ac_ext
5548                 done
5549                 echo "$as_me:5549: result: $CC_SHARED_OPTS" >&5
5550 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5551                 CFLAGS="$cf_save_CFLAGS"
5552         fi
5553
5554         cf_cv_shlib_version_infix=no
5555
5556         case $cf_cv_system_name in #(vi
5557         aix4.3-9*|aix[5-7]*) #(vi
5558                 if test "$GCC" = yes; then
5559                         CC_SHARED_OPTS=
5560                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5561                 else
5562                         # CC_SHARED_OPTS='-qpic=large -G'
5563                         # perhaps "-bM:SRE -bnoentry -bexpall"
5564                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5565                 fi
5566                 ;;
5567         beos*) #(vi
5568                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5569                 ;;
5570         cygwin*) #(vi
5571                 CC_SHARED_OPTS=
5572                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5573                 cf_cv_shlib_version=cygdll
5574                 cf_cv_shlib_version_infix=cygdll
5575                 cat >mk_shared_lib.sh <<-CF_EOF
5576                 #!/bin/sh
5577                 SHARED_LIB=\$1
5578                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5579                 shift
5580                 cat <<-EOF
5581                 Linking shared library
5582                 ** SHARED_LIB \$SHARED_LIB
5583                 ** IMPORT_LIB \$IMPORT_LIB
5584 EOF
5585                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5586 CF_EOF
5587                 chmod +x mk_shared_lib.sh
5588                 ;;
5589         darwin*) #(vi
5590                 cf_try_cflags="no-cpp-precomp"
5591                 CC_SHARED_OPTS="-dynamic"
5592                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5593                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5594                 cf_cv_shlib_version_infix=yes
5595                 echo "$as_me:5595: checking if ld -search_paths_first works" >&5
5596 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5597 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5598   echo $ECHO_N "(cached) $ECHO_C" >&6
5599 else
5600
5601                         cf_save_LDFLAGS=$LDFLAGS
5602                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5603                         cat >conftest.$ac_ext <<_ACEOF
5604 #line 5604 "configure"
5605 #include "confdefs.h"
5606
5607 int
5608 main ()
5609 {
5610 int i;
5611   ;
5612   return 0;
5613 }
5614 _ACEOF
5615 rm -f conftest.$ac_objext conftest$ac_exeext
5616 if { (eval echo "$as_me:5616: \"$ac_link\"") >&5
5617   (eval $ac_link) 2>&5
5618   ac_status=$?
5619   echo "$as_me:5619: \$? = $ac_status" >&5
5620   (exit $ac_status); } &&
5621          { ac_try='test -s conftest$ac_exeext'
5622   { (eval echo "$as_me:5622: \"$ac_try\"") >&5
5623   (eval $ac_try) 2>&5
5624   ac_status=$?
5625   echo "$as_me:5625: \$? = $ac_status" >&5
5626   (exit $ac_status); }; }; then
5627   cf_cv_ldflags_search_paths_first=yes
5628 else
5629   echo "$as_me: failed program was:" >&5
5630 cat conftest.$ac_ext >&5
5631 cf_cv_ldflags_search_paths_first=no
5632 fi
5633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5634                                 LDFLAGS=$cf_save_LDFLAGS
5635 fi
5636 echo "$as_me:5636: result: $cf_cv_ldflags_search_paths_first" >&5
5637 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5638                 if test $cf_cv_ldflags_search_paths_first = yes; then
5639                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5640                 fi
5641                 ;;
5642         hpux[7-8]*) #(vi
5643                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5644                 if test "$GCC" != yes; then
5645                         CC_SHARED_OPTS='+Z'
5646                 fi
5647                 MK_SHARED_LIB='${LD} -b -o $@'
5648                 INSTALL_LIB="-m 555"
5649                 ;;
5650         hpux*) #(vi
5651                 # (tested with gcc 2.7.2 -- I don't have c89)
5652                 if test "$GCC" = yes; then
5653                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5654                 else
5655                         CC_SHARED_OPTS='+Z'
5656                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5657                 fi
5658                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5659                 # HP-UX shared libraries must be executable, and should be
5660                 # readonly to exploit a quirk in the memory manager.
5661                 INSTALL_LIB="-m 555"
5662                 ;;
5663         interix*)
5664                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5665                 if test "$cf_cv_shlib_version" = rel; then
5666                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5667                 else
5668                         cf_shared_soname='`basename `'
5669                 fi
5670                 CC_SHARED_OPTS=
5671                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5672                 ;;
5673         irix*) #(vi
5674                 if test "$cf_cv_enable_rpath" = yes ; then
5675                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5676                 fi
5677                 # tested with IRIX 5.2 and 'cc'.
5678                 if test "$GCC" != yes; then
5679                         CC_SHARED_OPTS='-KPIC'
5680                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5681                 else
5682                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5683                 fi
5684                 cf_cv_rm_so_locs=yes
5685                 ;;
5686         linux*|gnu*|k*bsd*-gnu) #(vi
5687                 if test "$DFT_LWR_MODEL" = "shared" ; then
5688                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5689                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5690                 fi
5691                 if test "$cf_cv_enable_rpath" = yes ; then
5692                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5693                 fi
5694
5695         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5696         if test "$cf_cv_shlib_version" = rel; then
5697                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5698         else
5699                 cf_cv_shared_soname='`basename $@`'
5700         fi
5701
5702                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5703                 ;;
5704         mingw*) #(vi
5705                 cf_cv_shlib_version=mingw
5706                 cf_cv_shlib_version_infix=mingw
5707                 CC_SHARED_OPTS=
5708                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5709                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5710                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5711                 cat >mk_shared_lib.sh <<-CF_EOF
5712                 #!/bin/sh
5713                 SHARED_LIB=\$1
5714                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5715                 shift
5716                 cat <<-EOF
5717                 Linking shared library
5718                 ** SHARED_LIB \$SHARED_LIB
5719                 ** IMPORT_LIB \$IMPORT_LIB
5720 EOF
5721                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5722 CF_EOF
5723                 chmod +x mk_shared_lib.sh
5724                 ;;
5725         openbsd[2-9].*|mirbsd*) #(vi
5726                 if test "$DFT_LWR_MODEL" = "shared" ; then
5727                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5728                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5729                 fi
5730                 if test "$cf_cv_enable_rpath" = yes ; then
5731                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5732                 fi
5733                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5734
5735         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5736         if test "$cf_cv_shlib_version" = rel; then
5737                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5738         else
5739                 cf_cv_shared_soname='`basename $@`'
5740         fi
5741
5742                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5743                 ;;
5744         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5745                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5746                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5747                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5748                 ;;
5749         dragonfly*|freebsd*) #(vi
5750                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5751                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5752                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5753                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5754                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5755                 fi
5756
5757         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5758         if test "$cf_cv_shlib_version" = rel; then
5759                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5760         else
5761                 cf_cv_shared_soname='`basename $@`'
5762         fi
5763
5764                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5765                 ;;
5766         netbsd*) #(vi
5767                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5768                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5769                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5770                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5771                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5772                         if test "$cf_cv_shlib_version" = auto; then
5773                         if test -f /usr/libexec/ld.elf_so; then
5774                                 cf_cv_shlib_version=abi
5775                         else
5776                                 cf_cv_shlib_version=rel
5777                         fi
5778                         fi
5779
5780         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5781         if test "$cf_cv_shlib_version" = rel; then
5782                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5783         else
5784                 cf_cv_shared_soname='`basename $@`'
5785         fi
5786
5787                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5788                 else
5789                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5790                 fi
5791                 ;;
5792         osf*|mls+*) #(vi
5793                 # tested with OSF/1 V3.2 and 'cc'
5794                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5795                 # link with shared libs).
5796                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5797                 case $host_os in #(vi
5798                 osf4*)
5799                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5800                         ;;
5801                 esac
5802                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5803                 if test "$DFT_LWR_MODEL" = "shared" ; then
5804                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5805                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5806                 fi
5807                 cf_cv_rm_so_locs=yes
5808                 ;;
5809         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5810                 # tested with osr5.0.5
5811                 if test "$GCC" != yes; then
5812                         CC_SHARED_OPTS='-belf -KPIC'
5813                 fi
5814                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5815                 if test "$cf_cv_enable_rpath" = yes ; then
5816                         # only way is to set LD_RUN_PATH but no switch for it
5817                         RUN_PATH=$libdir
5818                 fi
5819                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5820                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5821                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5822                 ;;
5823         sunos4*) #(vi
5824                 # tested with SunOS 4.1.1 and gcc 2.7.0
5825                 if test "$GCC" != yes; then
5826                         CC_SHARED_OPTS='-KPIC'
5827                 fi
5828                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5829                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5830                 ;;
5831         solaris2*) #(vi
5832                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5833                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5834                 if test "$DFT_LWR_MODEL" = "shared" ; then
5835                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5836                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5837                 fi
5838                 if test "$cf_cv_enable_rpath" = yes ; then
5839                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5840                 fi
5841
5842         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5843         if test "$cf_cv_shlib_version" = rel; then
5844                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5845         else
5846                 cf_cv_shared_soname='`basename $@`'
5847         fi
5848
5849                 if test "$GCC" != yes; then
5850                         cf_save_CFLAGS="$CFLAGS"
5851                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5852                         do
5853                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5854                                 cat >conftest.$ac_ext <<_ACEOF
5855 #line 5855 "configure"
5856 #include "confdefs.h"
5857 #include <stdio.h>
5858 int
5859 main ()
5860 {
5861 printf("Hello\n");
5862   ;
5863   return 0;
5864 }
5865 _ACEOF
5866 rm -f conftest.$ac_objext
5867 if { (eval echo "$as_me:5867: \"$ac_compile\"") >&5
5868   (eval $ac_compile) 2>&5
5869   ac_status=$?
5870   echo "$as_me:5870: \$? = $ac_status" >&5
5871   (exit $ac_status); } &&
5872          { ac_try='test -s conftest.$ac_objext'
5873   { (eval echo "$as_me:5873: \"$ac_try\"") >&5
5874   (eval $ac_try) 2>&5
5875   ac_status=$?
5876   echo "$as_me:5876: \$? = $ac_status" >&5
5877   (exit $ac_status); }; }; then
5878   break
5879 else
5880   echo "$as_me: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5882 fi
5883 rm -f conftest.$ac_objext conftest.$ac_ext
5884                         done
5885                         CFLAGS="$cf_save_CFLAGS"
5886                         CC_SHARED_OPTS=$cf_shared_opts
5887                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5888                 else
5889                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5890                 fi
5891                 ;;
5892         sysv5uw7*|unix_sv*) #(vi
5893                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5894                 if test "$GCC" != yes; then
5895                         CC_SHARED_OPTS='-KPIC'
5896                 fi
5897                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5898                 ;;
5899         *)
5900                 CC_SHARED_OPTS='unknown'
5901                 MK_SHARED_LIB='echo unknown'
5902                 ;;
5903         esac
5904
5905         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5906         case "$cf_cv_shlib_version" in #(vi
5907         rel|abi)
5908                 case "$MK_SHARED_LIB" in #(vi
5909                 *'-o $@') #(vi
5910                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5911                         ;;
5912                 *)
5913                         { echo "$as_me:5913: WARNING: ignored --with-shlib-version" >&5
5914 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5915                         ;;
5916                 esac
5917                 ;;
5918         esac
5919
5920         if test -n "$cf_try_cflags"
5921         then
5922 cat > conftest.$ac_ext <<EOF
5923 #line 5923 "${as_me:-configure}"
5924 #include <stdio.h>
5925 int main(int argc, char *argv[])
5926 {
5927         printf("hello\n");
5928         return (argv[argc-1] == 0) ;
5929 }
5930 EOF
5931                 cf_save_CFLAGS="$CFLAGS"
5932                 for cf_opt in $cf_try_cflags
5933                 do
5934                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5935                         echo "$as_me:5935: checking if CFLAGS option -$cf_opt works" >&5
5936 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5937                         if { (eval echo "$as_me:5937: \"$ac_compile\"") >&5
5938   (eval $ac_compile) 2>&5
5939   ac_status=$?
5940   echo "$as_me:5940: \$? = $ac_status" >&5
5941   (exit $ac_status); }; then
5942                                 echo "$as_me:5942: result: yes" >&5
5943 echo "${ECHO_T}yes" >&6
5944                                 cf_save_CFLAGS="$CFLAGS"
5945                         else
5946                                 echo "$as_me:5946: result: no" >&5
5947 echo "${ECHO_T}no" >&6
5948                         fi
5949                 done
5950                 CFLAGS="$cf_save_CFLAGS"
5951         fi
5952
5953         # RPATH_LIST is a colon-separated list of directories
5954         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5955         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5956
5957         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5958
5959 echo "${as_me:-configure}:5959: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5960
5961         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5962
5963 echo "${as_me:-configure}:5963: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5964
5965 if test "$CC_SHARED_OPTS" = "unknown"; then
5966         for model in $cf_list_models; do
5967                 if test "$model" = "shared"; then
5968                         { { echo "$as_me:5968: error: Shared libraries are not supported in this version" >&5
5969 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5970    { (exit 1); exit 1; }; }
5971                 fi
5972         done
5973 fi
5974
5975 ### If we're building with rpath, try to link non-standard libs that way too.
5976 if test "$DFT_LWR_MODEL" = "shared"; then
5977
5978 echo "$as_me:5978: checking if rpath-hack should be disabled" >&5
5979 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5980
5981 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5982 if test "${enable_rpath_hack+set}" = set; then
5983   enableval="$enable_rpath_hack"
5984   test "$enableval" != no && enableval=yes
5985   if test "$enableval" != "yes" ; then
5986     cf_disable_rpath_hack=yes
5987   else
5988     cf_disable_rpath_hack=no
5989   fi
5990 else
5991   enableval=yes
5992   cf_disable_rpath_hack=no
5993
5994 fi;
5995 echo "$as_me:5995: result: $cf_disable_rpath_hack" >&5
5996 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5997 if test "$cf_disable_rpath_hack" = no ; then
5998
5999 echo "$as_me:5999: checking for updated LDFLAGS" >&5
6000 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6001 if test -n "$LD_RPATH_OPT" ; then
6002         echo "$as_me:6002: result: maybe" >&5
6003 echo "${ECHO_T}maybe" >&6
6004
6005         for ac_prog in ldd
6006 do
6007   # Extract the first word of "$ac_prog", so it can be a program name with args.
6008 set dummy $ac_prog; ac_word=$2
6009 echo "$as_me:6009: checking for $ac_word" >&5
6010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6011 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6012   echo $ECHO_N "(cached) $ECHO_C" >&6
6013 else
6014   if test -n "$cf_ldd_prog"; then
6015   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6016 else
6017   ac_save_IFS=$IFS; IFS=$ac_path_separator
6018 ac_dummy="$PATH"
6019 for ac_dir in $ac_dummy; do
6020   IFS=$ac_save_IFS
6021   test -z "$ac_dir" && ac_dir=.
6022   $as_executable_p "$ac_dir/$ac_word" || continue
6023 ac_cv_prog_cf_ldd_prog="$ac_prog"
6024 echo "$as_me:6024: found $ac_dir/$ac_word" >&5
6025 break
6026 done
6027
6028 fi
6029 fi
6030 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6031 if test -n "$cf_ldd_prog"; then
6032   echo "$as_me:6032: result: $cf_ldd_prog" >&5
6033 echo "${ECHO_T}$cf_ldd_prog" >&6
6034 else
6035   echo "$as_me:6035: result: no" >&5
6036 echo "${ECHO_T}no" >&6
6037 fi
6038
6039   test -n "$cf_ldd_prog" && break
6040 done
6041 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6042
6043         cf_rpath_list="/usr/lib /lib"
6044         if test "$cf_ldd_prog" != no
6045         then
6046                 cf_rpath_oops=
6047
6048 cat >conftest.$ac_ext <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6051 #include <stdio.h>
6052 int
6053 main ()
6054 {
6055 printf("Hello");
6056   ;
6057   return 0;
6058 }
6059 _ACEOF
6060 rm -f conftest.$ac_objext conftest$ac_exeext
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062   (eval $ac_link) 2>&5
6063   ac_status=$?
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit $ac_status); } &&
6066          { ac_try='test -s conftest$ac_exeext'
6067   { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit $ac_status); }; }; then
6072   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6073                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6074 else
6075   echo "$as_me: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 fi
6078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6079
6080                 # If we passed the link-test, but get a "not found" on a given library,
6081                 # this could be due to inept reconfiguration of gcc to make it only
6082                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6083                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6084                 # /usr/local libraries.
6085                 if test -n "$cf_rpath_oops"
6086                 then
6087                         for cf_rpath_src in $cf_rpath_oops
6088                         do
6089                                 for cf_rpath_dir in \
6090                                         /usr/local \
6091                                         /usr/pkg \
6092                                         /opt/sfw
6093                                 do
6094                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6095                                         then
6096                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6097
6098 echo "${as_me:-configure}:6098: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6099
6100                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6101                                                 break
6102                                         fi
6103                                 done
6104                         done
6105                 fi
6106         fi
6107
6108         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6109
6110 echo "${as_me:-configure}:6110: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6111
6112 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6113
6114 echo "${as_me:-configure}:6114: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6115
6116 cf_rpath_dst=
6117 for cf_rpath_src in $LDFLAGS
6118 do
6119         case $cf_rpath_src in #(vi
6120         -L*) #(vi
6121
6122                 # check if this refers to a directory which we will ignore
6123                 cf_rpath_skip=no
6124                 if test -n "$cf_rpath_list"
6125                 then
6126                         for cf_rpath_item in $cf_rpath_list
6127                         do
6128                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6129                                 then
6130                                         cf_rpath_skip=yes
6131                                         break
6132                                 fi
6133                         done
6134                 fi
6135
6136                 if test "$cf_rpath_skip" = no
6137                 then
6138                         # transform the option
6139                         if test "$LD_RPATH_OPT" = "-R " ; then
6140                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6141                         else
6142                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6143                         fi
6144
6145                         # if we have not already added this, add it now
6146                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6147                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6148                         then
6149                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6150
6151 echo "${as_me:-configure}:6151: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6152
6153                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6154                         fi
6155                 fi
6156                 ;;
6157         esac
6158         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6159 done
6160 LDFLAGS=$cf_rpath_dst
6161
6162 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6163
6164 echo "${as_me:-configure}:6164: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6165
6166 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6167
6168 echo "${as_me:-configure}:6168: testing ...checking LIBS $LIBS ..." 1>&5
6169
6170 cf_rpath_dst=
6171 for cf_rpath_src in $LIBS
6172 do
6173         case $cf_rpath_src in #(vi
6174         -L*) #(vi
6175
6176                 # check if this refers to a directory which we will ignore
6177                 cf_rpath_skip=no
6178                 if test -n "$cf_rpath_list"
6179                 then
6180                         for cf_rpath_item in $cf_rpath_list
6181                         do
6182                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6183                                 then
6184                                         cf_rpath_skip=yes
6185                                         break
6186                                 fi
6187                         done
6188                 fi
6189
6190                 if test "$cf_rpath_skip" = no
6191                 then
6192                         # transform the option
6193                         if test "$LD_RPATH_OPT" = "-R " ; then
6194                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6195                         else
6196                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6197                         fi
6198
6199                         # if we have not already added this, add it now
6200                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6201                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6202                         then
6203                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6204
6205 echo "${as_me:-configure}:6205: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6206
6207                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6208                         fi
6209                 fi
6210                 ;;
6211         esac
6212         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6213 done
6214 LIBS=$cf_rpath_dst
6215
6216 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6217
6218 echo "${as_me:-configure}:6218: testing ...checked LIBS $LIBS ..." 1>&5
6219
6220         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6221
6222 echo "${as_me:-configure}:6222: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6223
6224 fi
6225
6226 fi
6227
6228 fi
6229
6230 ###############################################################################
6231
6232 ###     use option --disable-overwrite to leave out the link to -lcurses
6233 echo "$as_me:6233: checking if you wish to install ncurses overwriting curses" >&5
6234 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6235
6236 # Check whether --enable-overwrite or --disable-overwrite was given.
6237 if test "${enable_overwrite+set}" = set; then
6238   enableval="$enable_overwrite"
6239   with_overwrite=$enableval
6240 else
6241   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6242 fi;
6243 echo "$as_me:6243: result: $with_overwrite" >&5
6244 echo "${ECHO_T}$with_overwrite" >&6
6245
6246 echo "$as_me:6246: checking if external terminfo-database is used" >&5
6247 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6248
6249 # Check whether --enable-database or --disable-database was given.
6250 if test "${enable_database+set}" = set; then
6251   enableval="$enable_database"
6252   use_database=$enableval
6253 else
6254   use_database=yes
6255 fi;
6256 echo "$as_me:6256: result: $use_database" >&5
6257 echo "${ECHO_T}$use_database" >&6
6258
6259 case $host_os in #(vi
6260 os2*) #(vi
6261         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6262         ;;
6263 *) #(vi
6264         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6265         ;;
6266 esac
6267
6268 if test "$use_database" != no ; then
6269
6270 cat >>confdefs.h <<\EOF
6271 #define USE_DATABASE 1
6272 EOF
6273
6274         echo "$as_me:6274: checking which terminfo source-file will be installed" >&5
6275 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6276
6277 # Check whether --with-database or --without-database was given.
6278 if test "${with_database+set}" = set; then
6279   withval="$with_database"
6280   TERMINFO_SRC=$withval
6281 fi;
6282         echo "$as_me:6282: result: $TERMINFO_SRC" >&5
6283 echo "${ECHO_T}$TERMINFO_SRC" >&6
6284
6285         echo "$as_me:6285: checking whether to use hashed database instead of directory/tree" >&5
6286 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6287
6288 # Check whether --with-hashed-db or --without-hashed-db was given.
6289 if test "${with_hashed_db+set}" = set; then
6290   withval="$with_hashed_db"
6291
6292 else
6293   with_hashed_db=no
6294 fi;
6295         echo "$as_me:6295: result: $with_hashed_db" >&5
6296 echo "${ECHO_T}$with_hashed_db" >&6
6297 else
6298         with_hashed_db=no
6299 fi
6300
6301 echo "$as_me:6301: checking for list of fallback descriptions" >&5
6302 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6303
6304 # Check whether --with-fallbacks or --without-fallbacks was given.
6305 if test "${with_fallbacks+set}" = set; then
6306   withval="$with_fallbacks"
6307   with_fallback=$withval
6308 else
6309   with_fallback=
6310 fi;
6311 echo "$as_me:6311: result: $with_fallback" >&5
6312 echo "${ECHO_T}$with_fallback" >&6
6313 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6314
6315 echo "$as_me:6315: checking if you want modern xterm or antique" >&5
6316 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6317
6318 # Check whether --with-xterm-new or --without-xterm-new was given.
6319 if test "${with_xterm_new+set}" = set; then
6320   withval="$with_xterm_new"
6321   with_xterm_new=$withval
6322 else
6323   with_xterm_new=yes
6324 fi;
6325 case $with_xterm_new in
6326 no)     with_xterm_new=xterm-old;;
6327 *)      with_xterm_new=xterm-new;;
6328 esac
6329 echo "$as_me:6329: result: $with_xterm_new" >&5
6330 echo "${ECHO_T}$with_xterm_new" >&6
6331 WHICH_XTERM=$with_xterm_new
6332
6333 echo "$as_me:6333: checking if xterm backspace sends BS or DEL" >&5
6334 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6335
6336 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6337 if test "${with_xterm_kbs+set}" = set; then
6338   withval="$with_xterm_kbs"
6339   with_xterm_kbs=$withval
6340 else
6341   with_xterm_kbs=BS
6342 fi;
6343 case x$with_xterm_kbs in
6344 xyes|xno|xBS|xbs|x8)
6345         with_xterm_kbs=BS
6346         ;;
6347 xDEL|xdel|x127)
6348         with_xterm_kbs=DEL
6349         ;;
6350 *)
6351         with_xterm_kbs=$withval
6352         ;;
6353 esac
6354 echo "$as_me:6354: result: $with_xterm_kbs" >&5
6355 echo "${ECHO_T}$with_xterm_kbs" >&6
6356 XTERM_KBS=$with_xterm_kbs
6357
6358 MAKE_TERMINFO=
6359 if test "$use_database" = no ; then
6360         TERMINFO="${datadir}/terminfo"
6361         MAKE_TERMINFO="#"
6362 else
6363
6364 echo "$as_me:6364: checking for list of terminfo directories" >&5
6365 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6366
6367 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6368 if test "${with_terminfo_dirs+set}" = set; then
6369   withval="$with_terminfo_dirs"
6370
6371 else
6372   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6373 fi;
6374 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6375 cf_dst_path=
6376 for cf_src_path in $withval
6377 do
6378
6379 if test "x$prefix" != xNONE; then
6380   cf_path_syntax="$prefix"
6381 else
6382   cf_path_syntax="$ac_default_prefix"
6383 fi
6384
6385 case ".$cf_src_path" in #(vi
6386 .\$\(*\)*|.\'*\'*) #(vi
6387   ;;
6388 ..|./*|.\\*) #(vi
6389   ;;
6390 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6391   ;;
6392 .\${*prefix}*|.\${*dir}*) #(vi
6393   eval cf_src_path="$cf_src_path"
6394   case ".$cf_src_path" in #(vi
6395   .NONE/*)
6396     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6397     ;;
6398   esac
6399   ;; #(vi
6400 .no|.NONE/*)
6401   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6402   ;;
6403 *)
6404   { { echo "$as_me:6404: error: expected a pathname, not \"$cf_src_path\"" >&5
6405 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6406    { (exit 1); exit 1; }; }
6407   ;;
6408 esac
6409
6410   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6411   cf_dst_path="${cf_dst_path}${cf_src_path}"
6412 done
6413 IFS="$ac_save_ifs"
6414
6415 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6416 # so we have to check/work around.  We do prefer the result of "eval"...
6417 eval cf_dst_eval="$cf_dst_path"
6418 case "x$cf_dst_eval" in #(vi
6419 xNONE*) #(vi
6420         TERMINFO_DIRS=$cf_dst_path
6421         ;;
6422 *)
6423         TERMINFO_DIRS="$cf_dst_eval"
6424         ;;
6425 esac
6426
6427 echo "$as_me:6427: result: $TERMINFO_DIRS" >&5
6428 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6429 test -n "$TERMINFO_DIRS" &&
6430 cat >>confdefs.h <<EOF
6431 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6432 EOF
6433
6434 echo "$as_me:6434: checking for default terminfo directory" >&5
6435 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6436
6437 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6438 if test "${with_default_terminfo_dir+set}" = set; then
6439   withval="$with_default_terminfo_dir"
6440
6441 else
6442   withval="${TERMINFO:-${datadir}/terminfo}"
6443 fi; if test -n "${datadir}/terminfo" ; then
6444
6445 if test "x$prefix" != xNONE; then
6446   cf_path_syntax="$prefix"
6447 else
6448   cf_path_syntax="$ac_default_prefix"
6449 fi
6450
6451 case ".$withval" in #(vi
6452 .\$\(*\)*|.\'*\'*) #(vi
6453   ;;
6454 ..|./*|.\\*) #(vi
6455   ;;
6456 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6457   ;;
6458 .\${*prefix}*|.\${*dir}*) #(vi
6459   eval withval="$withval"
6460   case ".$withval" in #(vi
6461   .NONE/*)
6462     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6463     ;;
6464   esac
6465   ;; #(vi
6466 .no|.NONE/*)
6467   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6468   ;;
6469 *)
6470   { { echo "$as_me:6470: error: expected a pathname, not \"$withval\"" >&5
6471 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6472    { (exit 1); exit 1; }; }
6473   ;;
6474 esac
6475
6476 fi
6477 eval TERMINFO="$withval"
6478
6479 echo "$as_me:6479: result: $TERMINFO" >&5
6480 echo "${ECHO_T}$TERMINFO" >&6
6481
6482 cat >>confdefs.h <<EOF
6483 #define TERMINFO "$TERMINFO"
6484 EOF
6485
6486 fi
6487
6488 ###     use option --disable-big-core to make tic run on small machines
6489 ###     We need 4Mb, check if we can allocate 50% more than that.
6490 echo "$as_me:6490: checking if big-core option selected" >&5
6491 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6492
6493 # Check whether --enable-big-core or --disable-big-core was given.
6494 if test "${enable_big_core+set}" = set; then
6495   enableval="$enable_big_core"
6496   with_big_core=$enableval
6497 else
6498   if test "$cross_compiling" = yes; then
6499   with_big_core=no
6500 else
6501   cat >conftest.$ac_ext <<_ACEOF
6502 #line 6502 "configure"
6503 #include "confdefs.h"
6504
6505 #include <stdlib.h>
6506 #include <string.h>
6507 int main() {
6508         unsigned long n = 6000000L;
6509         char *s = malloc(n);
6510         if (s != 0)
6511                 s[0] = s[n-1] = 0;
6512         ${cf_cv_main_return:-return}(s == 0);
6513 }
6514 _ACEOF
6515 rm -f conftest$ac_exeext
6516 if { (eval echo "$as_me:6516: \"$ac_link\"") >&5
6517   (eval $ac_link) 2>&5
6518   ac_status=$?
6519   echo "$as_me:6519: \$? = $ac_status" >&5
6520   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6521   { (eval echo "$as_me:6521: \"$ac_try\"") >&5
6522   (eval $ac_try) 2>&5
6523   ac_status=$?
6524   echo "$as_me:6524: \$? = $ac_status" >&5
6525   (exit $ac_status); }; }; then
6526   with_big_core=yes
6527 else
6528   echo "$as_me: program exited with status $ac_status" >&5
6529 echo "$as_me: failed program was:" >&5
6530 cat conftest.$ac_ext >&5
6531 with_big_core=no
6532 fi
6533 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6534 fi
6535 fi;
6536 echo "$as_me:6536: result: $with_big_core" >&5
6537 echo "${ECHO_T}$with_big_core" >&6
6538 test "x$with_big_core" = "xyes" &&
6539 cat >>confdefs.h <<\EOF
6540 #define HAVE_BIG_CORE 1
6541 EOF
6542
6543 ### ISO C only guarantees 512-char strings, we have tables which load faster
6544 ### when constructed using "big" strings.  More than the C compiler, the awk
6545 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6546 echo "$as_me:6546: checking if big-strings option selected" >&5
6547 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6548
6549 # Check whether --enable-big-strings or --disable-big-strings was given.
6550 if test "${enable_big_strings+set}" = set; then
6551   enableval="$enable_big_strings"
6552   with_big_strings=$enableval
6553 else
6554
6555         case x$AWK in #(vi
6556         x)
6557                 eval with_big_strings=no
6558                 ;;
6559         *) #(vi
6560                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6561                         | $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
6562                         eval with_big_strings=yes
6563                 else
6564                         eval with_big_strings=no
6565                 fi
6566                 ;;
6567         esac
6568
6569 fi;
6570 echo "$as_me:6570: result: $with_big_strings" >&5
6571 echo "${ECHO_T}$with_big_strings" >&6
6572
6573 USE_BIG_STRINGS=0
6574 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6575
6576 ###     use option --enable-termcap to compile in the termcap fallback support
6577 echo "$as_me:6577: checking if you want termcap-fallback support" >&5
6578 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6579
6580 # Check whether --enable-termcap or --disable-termcap was given.
6581 if test "${enable_termcap+set}" = set; then
6582   enableval="$enable_termcap"
6583   with_termcap=$enableval
6584 else
6585   with_termcap=no
6586 fi;
6587 echo "$as_me:6587: result: $with_termcap" >&5
6588 echo "${ECHO_T}$with_termcap" >&6
6589
6590 if test "x$with_termcap" != "xyes" ; then
6591         if test "$use_database" = no ; then
6592                 if test -z "$with_fallback" ; then
6593                         { { echo "$as_me:6593: error: You have disabled the database w/o specifying fallbacks" >&5
6594 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6595    { (exit 1); exit 1; }; }
6596                 fi
6597         fi
6598
6599 cat >>confdefs.h <<\EOF
6600 #define PURE_TERMINFO 1
6601 EOF
6602
6603 else
6604
6605 if test "$with_ticlib" != no ; then
6606         { { echo "$as_me:6606: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6607 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6608    { (exit 1); exit 1; }; }
6609 fi
6610
6611 cat >>confdefs.h <<\EOF
6612 #define USE_TERMCAP 1
6613 EOF
6614
6615 echo "$as_me:6615: checking for list of termcap files" >&5
6616 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6617
6618 # Check whether --with-termpath or --without-termpath was given.
6619 if test "${with_termpath+set}" = set; then
6620   withval="$with_termpath"
6621
6622 else
6623   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6624 fi;
6625 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6626 cf_dst_path=
6627 for cf_src_path in $withval
6628 do
6629
6630 if test "x$prefix" != xNONE; then
6631   cf_path_syntax="$prefix"
6632 else
6633   cf_path_syntax="$ac_default_prefix"
6634 fi
6635
6636 case ".$cf_src_path" in #(vi
6637 .\$\(*\)*|.\'*\'*) #(vi
6638   ;;
6639 ..|./*|.\\*) #(vi
6640   ;;
6641 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6642   ;;
6643 .\${*prefix}*|.\${*dir}*) #(vi
6644   eval cf_src_path="$cf_src_path"
6645   case ".$cf_src_path" in #(vi
6646   .NONE/*)
6647     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6648     ;;
6649   esac
6650   ;; #(vi
6651 .no|.NONE/*)
6652   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6653   ;;
6654 *)
6655   { { echo "$as_me:6655: error: expected a pathname, not \"$cf_src_path\"" >&5
6656 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6657    { (exit 1); exit 1; }; }
6658   ;;
6659 esac
6660
6661   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6662   cf_dst_path="${cf_dst_path}${cf_src_path}"
6663 done
6664 IFS="$ac_save_ifs"
6665
6666 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6667 # so we have to check/work around.  We do prefer the result of "eval"...
6668 eval cf_dst_eval="$cf_dst_path"
6669 case "x$cf_dst_eval" in #(vi
6670 xNONE*) #(vi
6671         TERMPATH=$cf_dst_path
6672         ;;
6673 *)
6674         TERMPATH="$cf_dst_eval"
6675         ;;
6676 esac
6677
6678 echo "$as_me:6678: result: $TERMPATH" >&5
6679 echo "${ECHO_T}$TERMPATH" >&6
6680 test -n "$TERMPATH" &&
6681 cat >>confdefs.h <<EOF
6682 #define TERMPATH "$TERMPATH"
6683 EOF
6684
6685 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6686 echo "$as_me:6686: checking if fast termcap-loader is needed" >&5
6687 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6688
6689 # Check whether --enable-getcap or --disable-getcap was given.
6690 if test "${enable_getcap+set}" = set; then
6691   enableval="$enable_getcap"
6692   with_getcap=$enableval
6693 else
6694   with_getcap=no
6695 fi;
6696 echo "$as_me:6696: result: $with_getcap" >&5
6697 echo "${ECHO_T}$with_getcap" >&6
6698 test "x$with_getcap" = "xyes" &&
6699 cat >>confdefs.h <<\EOF
6700 #define USE_GETCAP 1
6701 EOF
6702
6703 echo "$as_me:6703: checking if translated termcaps will be cached in ~/.terminfo" >&5
6704 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6705
6706 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6707 if test "${enable_getcap_cache+set}" = set; then
6708   enableval="$enable_getcap_cache"
6709   with_getcap_cache=$enableval
6710 else
6711   with_getcap_cache=no
6712 fi;
6713 echo "$as_me:6713: result: $with_getcap_cache" >&5
6714 echo "${ECHO_T}$with_getcap_cache" >&6
6715 test "x$with_getcap_cache" = "xyes" &&
6716 cat >>confdefs.h <<\EOF
6717 #define USE_GETCAP_CACHE 1
6718 EOF
6719
6720 fi
6721
6722 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6723 echo "$as_me:6723: checking if ~/.terminfo is wanted" >&5
6724 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6725
6726 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6727 if test "${enable_home_terminfo+set}" = set; then
6728   enableval="$enable_home_terminfo"
6729   with_home_terminfo=$enableval
6730 else
6731   with_home_terminfo=yes
6732 fi;
6733 echo "$as_me:6733: result: $with_home_terminfo" >&5
6734 echo "${ECHO_T}$with_home_terminfo" >&6
6735 test "x$with_home_terminfo" = "xyes" &&
6736 cat >>confdefs.h <<\EOF
6737 #define USE_HOME_TERMINFO 1
6738 EOF
6739
6740 echo "$as_me:6740: checking if you want to use restricted environment when running as root" >&5
6741 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6742
6743 # Check whether --enable-root-environ or --disable-root-environ was given.
6744 if test "${enable_root_environ+set}" = set; then
6745   enableval="$enable_root_environ"
6746   with_root_environ=$enableval
6747 else
6748   with_root_environ=yes
6749 fi;
6750 echo "$as_me:6750: result: $with_root_environ" >&5
6751 echo "${ECHO_T}$with_root_environ" >&6
6752 test "x$with_root_environ" = xyes &&
6753 cat >>confdefs.h <<\EOF
6754 #define USE_ROOT_ENVIRON 1
6755 EOF
6756
6757 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6758 ###   to reduce storage requirements for the terminfo database.
6759
6760 for ac_func in \
6761         remove \
6762         unlink
6763 do
6764 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6765 echo "$as_me:6765: checking for $ac_func" >&5
6766 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6767 if eval "test \"\${$as_ac_var+set}\" = set"; then
6768   echo $ECHO_N "(cached) $ECHO_C" >&6
6769 else
6770   cat >conftest.$ac_ext <<_ACEOF
6771 #line 6771 "configure"
6772 #include "confdefs.h"
6773 /* System header to define __stub macros and hopefully few prototypes,
6774     which can conflict with char $ac_func (); below.  */
6775 #include <assert.h>
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 #ifdef __cplusplus
6778 extern "C"
6779 #endif
6780 /* We use char because int might match the return type of a gcc2
6781    builtin and then its argument prototype would still apply.  */
6782 char $ac_func ();
6783 char (*f) ();
6784
6785 int
6786 main ()
6787 {
6788 /* The GNU C library defines this for functions which it implements
6789     to always fail with ENOSYS.  Some functions are actually named
6790     something starting with __ and the normal name is an alias.  */
6791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6792 choke me
6793 #else
6794 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6795 #endif
6796
6797   ;
6798   return 0;
6799 }
6800 _ACEOF
6801 rm -f conftest.$ac_objext conftest$ac_exeext
6802 if { (eval echo "$as_me:6802: \"$ac_link\"") >&5
6803   (eval $ac_link) 2>&5
6804   ac_status=$?
6805   echo "$as_me:6805: \$? = $ac_status" >&5
6806   (exit $ac_status); } &&
6807          { ac_try='test -s conftest$ac_exeext'
6808   { (eval echo "$as_me:6808: \"$ac_try\"") >&5
6809   (eval $ac_try) 2>&5
6810   ac_status=$?
6811   echo "$as_me:6811: \$? = $ac_status" >&5
6812   (exit $ac_status); }; }; then
6813   eval "$as_ac_var=yes"
6814 else
6815   echo "$as_me: failed program was:" >&5
6816 cat conftest.$ac_ext >&5
6817 eval "$as_ac_var=no"
6818 fi
6819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6820 fi
6821 echo "$as_me:6821: result: `eval echo '${'$as_ac_var'}'`" >&5
6822 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6823 if test `eval echo '${'$as_ac_var'}'` = yes; then
6824   cat >>confdefs.h <<EOF
6825 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6826 EOF
6827
6828 fi
6829 done
6830
6831 if test "$cross_compiling" = yes ; then
6832
6833 for ac_func in \
6834                 link \
6835                 symlink
6836 do
6837 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6838 echo "$as_me:6838: checking for $ac_func" >&5
6839 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6840 if eval "test \"\${$as_ac_var+set}\" = set"; then
6841   echo $ECHO_N "(cached) $ECHO_C" >&6
6842 else
6843   cat >conftest.$ac_ext <<_ACEOF
6844 #line 6844 "configure"
6845 #include "confdefs.h"
6846 /* System header to define __stub macros and hopefully few prototypes,
6847     which can conflict with char $ac_func (); below.  */
6848 #include <assert.h>
6849 /* Override any gcc2 internal prototype to avoid an error.  */
6850 #ifdef __cplusplus
6851 extern "C"
6852 #endif
6853 /* We use char because int might match the return type of a gcc2
6854    builtin and then its argument prototype would still apply.  */
6855 char $ac_func ();
6856 char (*f) ();
6857
6858 int
6859 main ()
6860 {
6861 /* The GNU C library defines this for functions which it implements
6862     to always fail with ENOSYS.  Some functions are actually named
6863     something starting with __ and the normal name is an alias.  */
6864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6865 choke me
6866 #else
6867 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6868 #endif
6869
6870   ;
6871   return 0;
6872 }
6873 _ACEOF
6874 rm -f conftest.$ac_objext conftest$ac_exeext
6875 if { (eval echo "$as_me:6875: \"$ac_link\"") >&5
6876   (eval $ac_link) 2>&5
6877   ac_status=$?
6878   echo "$as_me:6878: \$? = $ac_status" >&5
6879   (exit $ac_status); } &&
6880          { ac_try='test -s conftest$ac_exeext'
6881   { (eval echo "$as_me:6881: \"$ac_try\"") >&5
6882   (eval $ac_try) 2>&5
6883   ac_status=$?
6884   echo "$as_me:6884: \$? = $ac_status" >&5
6885   (exit $ac_status); }; }; then
6886   eval "$as_ac_var=yes"
6887 else
6888   echo "$as_me: failed program was:" >&5
6889 cat conftest.$ac_ext >&5
6890 eval "$as_ac_var=no"
6891 fi
6892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6893 fi
6894 echo "$as_me:6894: result: `eval echo '${'$as_ac_var'}'`" >&5
6895 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6896 if test `eval echo '${'$as_ac_var'}'` = yes; then
6897   cat >>confdefs.h <<EOF
6898 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6899 EOF
6900
6901 fi
6902 done
6903
6904 else
6905         echo "$as_me:6905: checking if link/symlink functions work" >&5
6906 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6907 if test "${cf_cv_link_funcs+set}" = set; then
6908   echo $ECHO_N "(cached) $ECHO_C" >&6
6909 else
6910
6911                 cf_cv_link_funcs=
6912                 for cf_func in link symlink ; do
6913                         if test "$cross_compiling" = yes; then
6914
6915                         eval 'ac_cv_func_'$cf_func'=error'
6916 else
6917   cat >conftest.$ac_ext <<_ACEOF
6918 #line 6918 "configure"
6919 #include "confdefs.h"
6920
6921 #include <sys/types.h>
6922 #include <sys/stat.h>
6923 #ifdef HAVE_UNISTD_H
6924 #include <unistd.h>
6925 #endif
6926 int main()
6927 {
6928         int fail = 0;
6929         char *src = "config.log";
6930         char *dst = "conftest.chk";
6931         struct stat src_sb;
6932         struct stat dst_sb;
6933
6934         stat(src, &src_sb);
6935         fail = ($cf_func("config.log", "conftest.chk") < 0)
6936             || (stat(dst, &dst_sb) < 0)
6937             || (dst_sb.st_mtime != src_sb.st_mtime);
6938 #ifdef HAVE_UNLINK
6939         unlink(dst);
6940 #else
6941         remove(dst);
6942 #endif
6943         ${cf_cv_main_return:-return} (fail);
6944 }
6945
6946 _ACEOF
6947 rm -f conftest$ac_exeext
6948 if { (eval echo "$as_me:6948: \"$ac_link\"") >&5
6949   (eval $ac_link) 2>&5
6950   ac_status=$?
6951   echo "$as_me:6951: \$? = $ac_status" >&5
6952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6953   { (eval echo "$as_me:6953: \"$ac_try\"") >&5
6954   (eval $ac_try) 2>&5
6955   ac_status=$?
6956   echo "$as_me:6956: \$? = $ac_status" >&5
6957   (exit $ac_status); }; }; then
6958
6959                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6960                         eval 'ac_cv_func_'$cf_func'=yes'
6961 else
6962   echo "$as_me: program exited with status $ac_status" >&5
6963 echo "$as_me: failed program was:" >&5
6964 cat conftest.$ac_ext >&5
6965
6966                         eval 'ac_cv_func_'$cf_func'=no'
6967 fi
6968 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6969 fi
6970                 done
6971                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6972
6973 fi
6974 echo "$as_me:6974: result: $cf_cv_link_funcs" >&5
6975 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6976         test "$ac_cv_func_link"    = yes &&
6977 cat >>confdefs.h <<\EOF
6978 #define HAVE_LINK 1
6979 EOF
6980
6981         test "$ac_cv_func_symlink" = yes &&
6982 cat >>confdefs.h <<\EOF
6983 #define HAVE_SYMLINK 1
6984 EOF
6985
6986 fi
6987
6988 with_links=no
6989 with_symlinks=no
6990
6991 # soft links (symbolic links) are useful for some systems where hard links do
6992 # not work, or to make it simpler to copy terminfo trees around.
6993 if test "x$ac_cv_func_symlink" = xyes ; then
6994     echo "$as_me:6994: checking if tic should use symbolic links" >&5
6995 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6996
6997 # Check whether --enable-symlinks or --disable-symlinks was given.
6998 if test "${enable_symlinks+set}" = set; then
6999   enableval="$enable_symlinks"
7000   with_symlinks=$enableval
7001 else
7002   with_symlinks=no
7003 fi;
7004     echo "$as_me:7004: result: $with_symlinks" >&5
7005 echo "${ECHO_T}$with_symlinks" >&6
7006 fi
7007
7008 # If we have hard links and did not choose to use soft links instead, there is
7009 # no reason to make this choice optional - use the hard links.
7010 if test "$with_symlinks" = no ; then
7011     echo "$as_me:7011: checking if tic should use hard links" >&5
7012 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7013     if test "x$ac_cv_func_link" = xyes ; then
7014         with_links=yes
7015     else
7016         with_links=no
7017     fi
7018     echo "$as_me:7018: result: $with_links" >&5
7019 echo "${ECHO_T}$with_links" >&6
7020 fi
7021
7022 test "x$with_links" = xyes &&
7023 cat >>confdefs.h <<\EOF
7024 #define USE_LINKS 1
7025 EOF
7026
7027 test "x$with_symlinks" = xyes &&
7028 cat >>confdefs.h <<\EOF
7029 #define USE_SYMLINKS 1
7030 EOF
7031
7032 ###   use option --enable-broken-linker to force on use of broken-linker support
7033 echo "$as_me:7033: checking if you want broken-linker support code" >&5
7034 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7035
7036 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7037 if test "${enable_broken_linker+set}" = set; then
7038   enableval="$enable_broken_linker"
7039   with_broken_linker=$enableval
7040 else
7041   with_broken_linker=${BROKEN_LINKER:-no}
7042 fi;
7043 echo "$as_me:7043: result: $with_broken_linker" >&5
7044 echo "${ECHO_T}$with_broken_linker" >&6
7045
7046 BROKEN_LINKER=0
7047 if test "x$with_broken_linker" = xyes ; then
7048
7049 cat >>confdefs.h <<\EOF
7050 #define BROKEN_LINKER 1
7051 EOF
7052
7053         BROKEN_LINKER=1
7054 elif test "$DFT_LWR_MODEL" = shared ; then
7055         case $cf_cv_system_name in #(vi
7056         cygwin*)
7057
7058 cat >>confdefs.h <<\EOF
7059 #define BROKEN_LINKER 1
7060 EOF
7061
7062                 BROKEN_LINKER=1
7063                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7064
7065 echo "${as_me:-configure}:7065: testing cygwin linker is broken anyway ..." 1>&5
7066
7067                 ;;
7068         esac
7069 fi
7070
7071 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7072 echo "$as_me:7072: checking if tputs should process BSD-style prefix padding" >&5
7073 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7074
7075 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7076 if test "${enable_bsdpad+set}" = set; then
7077   enableval="$enable_bsdpad"
7078   with_bsdpad=$enableval
7079 else
7080   with_bsdpad=no
7081 fi;
7082 echo "$as_me:7082: result: $with_bsdpad" >&5
7083 echo "${ECHO_T}$with_bsdpad" >&6
7084 test "x$with_bsdpad" = xyes &&
7085 cat >>confdefs.h <<\EOF
7086 #define BSD_TPUTS 1
7087 EOF
7088
7089 ###   use option --enable-widec to turn on use of wide-character support
7090 NCURSES_CH_T=chtype
7091 NCURSES_LIBUTF8=0
7092
7093 NEED_WCHAR_H=0
7094 NCURSES_MBSTATE_T=0
7095 NCURSES_WCHAR_T=0
7096 NCURSES_WINT_T=0
7097
7098 # Check to define _XOPEN_SOURCE "automatically"
7099
7100 cf_XOPEN_SOURCE=500
7101 cf_POSIX_C_SOURCE=199506L
7102 cf_xopen_source=
7103
7104 case $host_os in #(vi
7105 aix[4-7]*) #(vi
7106         cf_xopen_source="-D_ALL_SOURCE"
7107         ;;
7108 cygwin) #(vi
7109         cf_XOPEN_SOURCE=600
7110         ;;
7111 darwin[0-8].*) #(vi
7112         cf_xopen_source="-D_APPLE_C_SOURCE"
7113         ;;
7114 darwin*) #(vi
7115         cf_xopen_source="-D_DARWIN_C_SOURCE"
7116         cf_XOPEN_SOURCE=
7117         ;;
7118 freebsd*|dragonfly*) #(vi
7119         # 5.x headers associate
7120         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7121         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7122         cf_POSIX_C_SOURCE=200112L
7123         cf_XOPEN_SOURCE=600
7124         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7125         ;;
7126 hpux11*) #(vi
7127         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7128         ;;
7129 hpux*) #(vi
7130         cf_xopen_source="-D_HPUX_SOURCE"
7131         ;;
7132 irix[56].*) #(vi
7133         cf_xopen_source="-D_SGI_SOURCE"
7134         cf_XOPEN_SOURCE=
7135         ;;
7136 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7137
7138 echo "$as_me:7138: checking if we must define _GNU_SOURCE" >&5
7139 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7140 if test "${cf_cv_gnu_source+set}" = set; then
7141   echo $ECHO_N "(cached) $ECHO_C" >&6
7142 else
7143
7144 cat >conftest.$ac_ext <<_ACEOF
7145 #line 7145 "configure"
7146 #include "confdefs.h"
7147 #include <sys/types.h>
7148 int
7149 main ()
7150 {
7151
7152 #ifndef _XOPEN_SOURCE
7153 make an error
7154 #endif
7155   ;
7156   return 0;
7157 }
7158 _ACEOF
7159 rm -f conftest.$ac_objext
7160 if { (eval echo "$as_me:7160: \"$ac_compile\"") >&5
7161   (eval $ac_compile) 2>&5
7162   ac_status=$?
7163   echo "$as_me:7163: \$? = $ac_status" >&5
7164   (exit $ac_status); } &&
7165          { ac_try='test -s conftest.$ac_objext'
7166   { (eval echo "$as_me:7166: \"$ac_try\"") >&5
7167   (eval $ac_try) 2>&5
7168   ac_status=$?
7169   echo "$as_me:7169: \$? = $ac_status" >&5
7170   (exit $ac_status); }; }; then
7171   cf_cv_gnu_source=no
7172 else
7173   echo "$as_me: failed program was:" >&5
7174 cat conftest.$ac_ext >&5
7175 cf_save="$CPPFLAGS"
7176          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7177          cat >conftest.$ac_ext <<_ACEOF
7178 #line 7178 "configure"
7179 #include "confdefs.h"
7180 #include <sys/types.h>
7181 int
7182 main ()
7183 {
7184
7185 #ifdef _XOPEN_SOURCE
7186 make an error
7187 #endif
7188   ;
7189   return 0;
7190 }
7191 _ACEOF
7192 rm -f conftest.$ac_objext
7193 if { (eval echo "$as_me:7193: \"$ac_compile\"") >&5
7194   (eval $ac_compile) 2>&5
7195   ac_status=$?
7196   echo "$as_me:7196: \$? = $ac_status" >&5
7197   (exit $ac_status); } &&
7198          { ac_try='test -s conftest.$ac_objext'
7199   { (eval echo "$as_me:7199: \"$ac_try\"") >&5
7200   (eval $ac_try) 2>&5
7201   ac_status=$?
7202   echo "$as_me:7202: \$? = $ac_status" >&5
7203   (exit $ac_status); }; }; then
7204   cf_cv_gnu_source=no
7205 else
7206   echo "$as_me: failed program was:" >&5
7207 cat conftest.$ac_ext >&5
7208 cf_cv_gnu_source=yes
7209 fi
7210 rm -f conftest.$ac_objext conftest.$ac_ext
7211         CPPFLAGS="$cf_save"
7212
7213 fi
7214 rm -f conftest.$ac_objext conftest.$ac_ext
7215
7216 fi
7217 echo "$as_me:7217: result: $cf_cv_gnu_source" >&5
7218 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7219 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7220
7221         ;;
7222 mirbsd*) #(vi
7223         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7224         cf_XOPEN_SOURCE=
7225
7226 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7227
7228 cf_save_CFLAGS="$CFLAGS"
7229 cf_save_CPPFLAGS="$CPPFLAGS"
7230
7231 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7232         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7233                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7234
7235 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7236         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7237                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7238
7239 echo "$as_me:7239: checking if we should define _POSIX_C_SOURCE" >&5
7240 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7241 if test "${cf_cv_posix_c_source+set}" = set; then
7242   echo $ECHO_N "(cached) $ECHO_C" >&6
7243 else
7244
7245 echo "${as_me:-configure}:7245: testing if the symbol is already defined go no further ..." 1>&5
7246
7247         cat >conftest.$ac_ext <<_ACEOF
7248 #line 7248 "configure"
7249 #include "confdefs.h"
7250 #include <sys/types.h>
7251 int
7252 main ()
7253 {
7254
7255 #ifndef _POSIX_C_SOURCE
7256 make an error
7257 #endif
7258   ;
7259   return 0;
7260 }
7261 _ACEOF
7262 rm -f conftest.$ac_objext
7263 if { (eval echo "$as_me:7263: \"$ac_compile\"") >&5
7264   (eval $ac_compile) 2>&5
7265   ac_status=$?
7266   echo "$as_me:7266: \$? = $ac_status" >&5
7267   (exit $ac_status); } &&
7268          { ac_try='test -s conftest.$ac_objext'
7269   { (eval echo "$as_me:7269: \"$ac_try\"") >&5
7270   (eval $ac_try) 2>&5
7271   ac_status=$?
7272   echo "$as_me:7272: \$? = $ac_status" >&5
7273   (exit $ac_status); }; }; then
7274   cf_cv_posix_c_source=no
7275 else
7276   echo "$as_me: failed program was:" >&5
7277 cat conftest.$ac_ext >&5
7278 cf_want_posix_source=no
7279          case .$cf_POSIX_C_SOURCE in #(vi
7280          .[12]??*) #(vi
7281                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7282                 ;;
7283          .2) #(vi
7284                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7285                 cf_want_posix_source=yes
7286                 ;;
7287          .*)
7288                 cf_want_posix_source=yes
7289                 ;;
7290          esac
7291          if test "$cf_want_posix_source" = yes ; then
7292                 cat >conftest.$ac_ext <<_ACEOF
7293 #line 7293 "configure"
7294 #include "confdefs.h"
7295 #include <sys/types.h>
7296 int
7297 main ()
7298 {
7299
7300 #ifdef _POSIX_SOURCE
7301 make an error
7302 #endif
7303   ;
7304   return 0;
7305 }
7306 _ACEOF
7307 rm -f conftest.$ac_objext
7308 if { (eval echo "$as_me:7308: \"$ac_compile\"") >&5
7309   (eval $ac_compile) 2>&5
7310   ac_status=$?
7311   echo "$as_me:7311: \$? = $ac_status" >&5
7312   (exit $ac_status); } &&
7313          { ac_try='test -s conftest.$ac_objext'
7314   { (eval echo "$as_me:7314: \"$ac_try\"") >&5
7315   (eval $ac_try) 2>&5
7316   ac_status=$?
7317   echo "$as_me:7317: \$? = $ac_status" >&5
7318   (exit $ac_status); }; }; then
7319   :
7320 else
7321   echo "$as_me: failed program was:" >&5
7322 cat conftest.$ac_ext >&5
7323 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7324 fi
7325 rm -f conftest.$ac_objext conftest.$ac_ext
7326          fi
7327
7328 echo "${as_me:-configure}:7328: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7329
7330          CFLAGS="$cf_trim_CFLAGS"
7331          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7332
7333 echo "${as_me:-configure}:7333: testing if the second compile does not leave our definition intact error ..." 1>&5
7334
7335          cat >conftest.$ac_ext <<_ACEOF
7336 #line 7336 "configure"
7337 #include "confdefs.h"
7338 #include <sys/types.h>
7339 int
7340 main ()
7341 {
7342
7343 #ifndef _POSIX_C_SOURCE
7344 make an error
7345 #endif
7346   ;
7347   return 0;
7348 }
7349 _ACEOF
7350 rm -f conftest.$ac_objext
7351 if { (eval echo "$as_me:7351: \"$ac_compile\"") >&5
7352   (eval $ac_compile) 2>&5
7353   ac_status=$?
7354   echo "$as_me:7354: \$? = $ac_status" >&5
7355   (exit $ac_status); } &&
7356          { ac_try='test -s conftest.$ac_objext'
7357   { (eval echo "$as_me:7357: \"$ac_try\"") >&5
7358   (eval $ac_try) 2>&5
7359   ac_status=$?
7360   echo "$as_me:7360: \$? = $ac_status" >&5
7361   (exit $ac_status); }; }; then
7362   :
7363 else
7364   echo "$as_me: failed program was:" >&5
7365 cat conftest.$ac_ext >&5
7366 cf_cv_posix_c_source=no
7367 fi
7368 rm -f conftest.$ac_objext conftest.$ac_ext
7369          CFLAGS="$cf_save_CFLAGS"
7370          CPPFLAGS="$cf_save_CPPFLAGS"
7371
7372 fi
7373 rm -f conftest.$ac_objext conftest.$ac_ext
7374
7375 fi
7376 echo "$as_me:7376: result: $cf_cv_posix_c_source" >&5
7377 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7378
7379 if test "$cf_cv_posix_c_source" != no ; then
7380         CFLAGS="$cf_trim_CFLAGS"
7381         CPPFLAGS="$cf_trim_CPPFLAGS"
7382
7383 cf_fix_cppflags=no
7384 cf_new_cflags=
7385 cf_new_cppflags=
7386 cf_new_extra_cppflags=
7387
7388 for cf_add_cflags in $cf_cv_posix_c_source
7389 do
7390 case $cf_fix_cppflags in
7391 no)
7392         case $cf_add_cflags in #(vi
7393         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7394                 case $cf_add_cflags in
7395                 -D*)
7396                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7397
7398                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7399                                 && test -z "${cf_tst_cflags}" \
7400                                 && cf_fix_cppflags=yes
7401
7402                         if test $cf_fix_cppflags = yes ; then
7403                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7404                                 continue
7405                         elif test "${cf_tst_cflags}" = "\"'" ; then
7406                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7407                                 continue
7408                         fi
7409                         ;;
7410                 esac
7411                 case "$CPPFLAGS" in
7412                 *$cf_add_cflags) #(vi
7413                         ;;
7414                 *) #(vi
7415                         case $cf_add_cflags in #(vi
7416                         -D*)
7417                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7418
7419 CPPFLAGS=`echo "$CPPFLAGS" | \
7420         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7421                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7422
7423                                 ;;
7424                         esac
7425                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7426                         ;;
7427                 esac
7428                 ;;
7429         *)
7430                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7431                 ;;
7432         esac
7433         ;;
7434 yes)
7435         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7436
7437         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7438
7439         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7440                 && test -z "${cf_tst_cflags}" \
7441                 && cf_fix_cppflags=no
7442         ;;
7443 esac
7444 done
7445
7446 if test -n "$cf_new_cflags" ; then
7447
7448         CFLAGS="$CFLAGS $cf_new_cflags"
7449 fi
7450
7451 if test -n "$cf_new_cppflags" ; then
7452
7453         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7454 fi
7455
7456 if test -n "$cf_new_extra_cppflags" ; then
7457
7458         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7459 fi
7460
7461 fi
7462
7463         ;;
7464 netbsd*) #(vi
7465         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7466         ;;
7467 openbsd[4-9]*) #(vi
7468         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7469         cf_xopen_source="-D_BSD_SOURCE"
7470         cf_XOPEN_SOURCE=600
7471         ;;
7472 openbsd*) #(vi
7473         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7474         ;;
7475 osf[45]*) #(vi
7476         cf_xopen_source="-D_OSF_SOURCE"
7477         ;;
7478 nto-qnx*) #(vi
7479         cf_xopen_source="-D_QNX_SOURCE"
7480         ;;
7481 sco*) #(vi
7482         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7483         ;;
7484 solaris2.*) #(vi
7485         cf_xopen_source="-D__EXTENSIONS__"
7486         ;;
7487 *)
7488
7489 echo "$as_me:7489: checking if we should define _XOPEN_SOURCE" >&5
7490 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7491 if test "${cf_cv_xopen_source+set}" = set; then
7492   echo $ECHO_N "(cached) $ECHO_C" >&6
7493 else
7494
7495         cat >conftest.$ac_ext <<_ACEOF
7496 #line 7496 "configure"
7497 #include "confdefs.h"
7498
7499 #include <stdlib.h>
7500 #include <string.h>
7501 #include <sys/types.h>
7502
7503 int
7504 main ()
7505 {
7506
7507 #ifndef _XOPEN_SOURCE
7508 make an error
7509 #endif
7510   ;
7511   return 0;
7512 }
7513 _ACEOF
7514 rm -f conftest.$ac_objext
7515 if { (eval echo "$as_me:7515: \"$ac_compile\"") >&5
7516   (eval $ac_compile) 2>&5
7517   ac_status=$?
7518   echo "$as_me:7518: \$? = $ac_status" >&5
7519   (exit $ac_status); } &&
7520          { ac_try='test -s conftest.$ac_objext'
7521   { (eval echo "$as_me:7521: \"$ac_try\"") >&5
7522   (eval $ac_try) 2>&5
7523   ac_status=$?
7524   echo "$as_me:7524: \$? = $ac_status" >&5
7525   (exit $ac_status); }; }; then
7526   cf_cv_xopen_source=no
7527 else
7528   echo "$as_me: failed program was:" >&5
7529 cat conftest.$ac_ext >&5
7530 cf_save="$CPPFLAGS"
7531          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7532          cat >conftest.$ac_ext <<_ACEOF
7533 #line 7533 "configure"
7534 #include "confdefs.h"
7535
7536 #include <stdlib.h>
7537 #include <string.h>
7538 #include <sys/types.h>
7539
7540 int
7541 main ()
7542 {
7543
7544 #ifdef _XOPEN_SOURCE
7545 make an error
7546 #endif
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 rm -f conftest.$ac_objext
7552 if { (eval echo "$as_me:7552: \"$ac_compile\"") >&5
7553   (eval $ac_compile) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); } &&
7557          { ac_try='test -s conftest.$ac_objext'
7558   { (eval echo "$as_me:7558: \"$ac_try\"") >&5
7559   (eval $ac_try) 2>&5
7560   ac_status=$?
7561   echo "$as_me:7561: \$? = $ac_status" >&5
7562   (exit $ac_status); }; }; then
7563   cf_cv_xopen_source=no
7564 else
7565   echo "$as_me: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7568 fi
7569 rm -f conftest.$ac_objext conftest.$ac_ext
7570         CPPFLAGS="$cf_save"
7571
7572 fi
7573 rm -f conftest.$ac_objext conftest.$ac_ext
7574
7575 fi
7576 echo "$as_me:7576: result: $cf_cv_xopen_source" >&5
7577 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7578
7579 if test "$cf_cv_xopen_source" != no ; then
7580
7581 CFLAGS=`echo "$CFLAGS" | \
7582         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7583                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7584
7585 CPPFLAGS=`echo "$CPPFLAGS" | \
7586         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7587                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7588
7589         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7590
7591 cf_fix_cppflags=no
7592 cf_new_cflags=
7593 cf_new_cppflags=
7594 cf_new_extra_cppflags=
7595
7596 for cf_add_cflags in $cf_temp_xopen_source
7597 do
7598 case $cf_fix_cppflags in
7599 no)
7600         case $cf_add_cflags in #(vi
7601         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7602                 case $cf_add_cflags in
7603                 -D*)
7604                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7605
7606                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7607                                 && test -z "${cf_tst_cflags}" \
7608                                 && cf_fix_cppflags=yes
7609
7610                         if test $cf_fix_cppflags = yes ; then
7611                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7612                                 continue
7613                         elif test "${cf_tst_cflags}" = "\"'" ; then
7614                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7615                                 continue
7616                         fi
7617                         ;;
7618                 esac
7619                 case "$CPPFLAGS" in
7620                 *$cf_add_cflags) #(vi
7621                         ;;
7622                 *) #(vi
7623                         case $cf_add_cflags in #(vi
7624                         -D*)
7625                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7626
7627 CPPFLAGS=`echo "$CPPFLAGS" | \
7628         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7629                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7630
7631                                 ;;
7632                         esac
7633                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7634                         ;;
7635                 esac
7636                 ;;
7637         *)
7638                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7639                 ;;
7640         esac
7641         ;;
7642 yes)
7643         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7644
7645         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7646
7647         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7648                 && test -z "${cf_tst_cflags}" \
7649                 && cf_fix_cppflags=no
7650         ;;
7651 esac
7652 done
7653
7654 if test -n "$cf_new_cflags" ; then
7655
7656         CFLAGS="$CFLAGS $cf_new_cflags"
7657 fi
7658
7659 if test -n "$cf_new_cppflags" ; then
7660
7661         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7662 fi
7663
7664 if test -n "$cf_new_extra_cppflags" ; then
7665
7666         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7667 fi
7668
7669 fi
7670
7671 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7672
7673 cf_save_CFLAGS="$CFLAGS"
7674 cf_save_CPPFLAGS="$CPPFLAGS"
7675
7676 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7677         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7678                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7679
7680 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7681         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7682                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7683
7684 echo "$as_me:7684: checking if we should define _POSIX_C_SOURCE" >&5
7685 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7686 if test "${cf_cv_posix_c_source+set}" = set; then
7687   echo $ECHO_N "(cached) $ECHO_C" >&6
7688 else
7689
7690 echo "${as_me:-configure}:7690: testing if the symbol is already defined go no further ..." 1>&5
7691
7692         cat >conftest.$ac_ext <<_ACEOF
7693 #line 7693 "configure"
7694 #include "confdefs.h"
7695 #include <sys/types.h>
7696 int
7697 main ()
7698 {
7699
7700 #ifndef _POSIX_C_SOURCE
7701 make an error
7702 #endif
7703   ;
7704   return 0;
7705 }
7706 _ACEOF
7707 rm -f conftest.$ac_objext
7708 if { (eval echo "$as_me:7708: \"$ac_compile\"") >&5
7709   (eval $ac_compile) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit $ac_status); } &&
7713          { ac_try='test -s conftest.$ac_objext'
7714   { (eval echo "$as_me:7714: \"$ac_try\"") >&5
7715   (eval $ac_try) 2>&5
7716   ac_status=$?
7717   echo "$as_me:7717: \$? = $ac_status" >&5
7718   (exit $ac_status); }; }; then
7719   cf_cv_posix_c_source=no
7720 else
7721   echo "$as_me: failed program was:" >&5
7722 cat conftest.$ac_ext >&5
7723 cf_want_posix_source=no
7724          case .$cf_POSIX_C_SOURCE in #(vi
7725          .[12]??*) #(vi
7726                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7727                 ;;
7728          .2) #(vi
7729                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7730                 cf_want_posix_source=yes
7731                 ;;
7732          .*)
7733                 cf_want_posix_source=yes
7734                 ;;
7735          esac
7736          if test "$cf_want_posix_source" = yes ; then
7737                 cat >conftest.$ac_ext <<_ACEOF
7738 #line 7738 "configure"
7739 #include "confdefs.h"
7740 #include <sys/types.h>
7741 int
7742 main ()
7743 {
7744
7745 #ifdef _POSIX_SOURCE
7746 make an error
7747 #endif
7748   ;
7749   return 0;
7750 }
7751 _ACEOF
7752 rm -f conftest.$ac_objext
7753 if { (eval echo "$as_me:7753: \"$ac_compile\"") >&5
7754   (eval $ac_compile) 2>&5
7755   ac_status=$?
7756   echo "$as_me:7756: \$? = $ac_status" >&5
7757   (exit $ac_status); } &&
7758          { ac_try='test -s conftest.$ac_objext'
7759   { (eval echo "$as_me:7759: \"$ac_try\"") >&5
7760   (eval $ac_try) 2>&5
7761   ac_status=$?
7762   echo "$as_me:7762: \$? = $ac_status" >&5
7763   (exit $ac_status); }; }; then
7764   :
7765 else
7766   echo "$as_me: failed program was:" >&5
7767 cat conftest.$ac_ext >&5
7768 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7769 fi
7770 rm -f conftest.$ac_objext conftest.$ac_ext
7771          fi
7772
7773 echo "${as_me:-configure}:7773: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7774
7775          CFLAGS="$cf_trim_CFLAGS"
7776          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7777
7778 echo "${as_me:-configure}:7778: testing if the second compile does not leave our definition intact error ..." 1>&5
7779
7780          cat >conftest.$ac_ext <<_ACEOF
7781 #line 7781 "configure"
7782 #include "confdefs.h"
7783 #include <sys/types.h>
7784 int
7785 main ()
7786 {
7787
7788 #ifndef _POSIX_C_SOURCE
7789 make an error
7790 #endif
7791   ;
7792   return 0;
7793 }
7794 _ACEOF
7795 rm -f conftest.$ac_objext
7796 if { (eval echo "$as_me:7796: \"$ac_compile\"") >&5
7797   (eval $ac_compile) 2>&5
7798   ac_status=$?
7799   echo "$as_me:7799: \$? = $ac_status" >&5
7800   (exit $ac_status); } &&
7801          { ac_try='test -s conftest.$ac_objext'
7802   { (eval echo "$as_me:7802: \"$ac_try\"") >&5
7803   (eval $ac_try) 2>&5
7804   ac_status=$?
7805   echo "$as_me:7805: \$? = $ac_status" >&5
7806   (exit $ac_status); }; }; then
7807   :
7808 else
7809   echo "$as_me: failed program was:" >&5
7810 cat conftest.$ac_ext >&5
7811 cf_cv_posix_c_source=no
7812 fi
7813 rm -f conftest.$ac_objext conftest.$ac_ext
7814          CFLAGS="$cf_save_CFLAGS"
7815          CPPFLAGS="$cf_save_CPPFLAGS"
7816
7817 fi
7818 rm -f conftest.$ac_objext conftest.$ac_ext
7819
7820 fi
7821 echo "$as_me:7821: result: $cf_cv_posix_c_source" >&5
7822 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7823
7824 if test "$cf_cv_posix_c_source" != no ; then
7825         CFLAGS="$cf_trim_CFLAGS"
7826         CPPFLAGS="$cf_trim_CPPFLAGS"
7827
7828 cf_fix_cppflags=no
7829 cf_new_cflags=
7830 cf_new_cppflags=
7831 cf_new_extra_cppflags=
7832
7833 for cf_add_cflags in $cf_cv_posix_c_source
7834 do
7835 case $cf_fix_cppflags in
7836 no)
7837         case $cf_add_cflags in #(vi
7838         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7839                 case $cf_add_cflags in
7840                 -D*)
7841                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7842
7843                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7844                                 && test -z "${cf_tst_cflags}" \
7845                                 && cf_fix_cppflags=yes
7846
7847                         if test $cf_fix_cppflags = yes ; then
7848                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7849                                 continue
7850                         elif test "${cf_tst_cflags}" = "\"'" ; then
7851                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7852                                 continue
7853                         fi
7854                         ;;
7855                 esac
7856                 case "$CPPFLAGS" in
7857                 *$cf_add_cflags) #(vi
7858                         ;;
7859                 *) #(vi
7860                         case $cf_add_cflags in #(vi
7861                         -D*)
7862                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7863
7864 CPPFLAGS=`echo "$CPPFLAGS" | \
7865         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7866                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7867
7868                                 ;;
7869                         esac
7870                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7871                         ;;
7872                 esac
7873                 ;;
7874         *)
7875                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7876                 ;;
7877         esac
7878         ;;
7879 yes)
7880         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7881
7882         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7883
7884         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7885                 && test -z "${cf_tst_cflags}" \
7886                 && cf_fix_cppflags=no
7887         ;;
7888 esac
7889 done
7890
7891 if test -n "$cf_new_cflags" ; then
7892
7893         CFLAGS="$CFLAGS $cf_new_cflags"
7894 fi
7895
7896 if test -n "$cf_new_cppflags" ; then
7897
7898         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7899 fi
7900
7901 if test -n "$cf_new_extra_cppflags" ; then
7902
7903         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7904 fi
7905
7906 fi
7907
7908         ;;
7909 esac
7910
7911 if test -n "$cf_xopen_source" ; then
7912
7913 cf_fix_cppflags=no
7914 cf_new_cflags=
7915 cf_new_cppflags=
7916 cf_new_extra_cppflags=
7917
7918 for cf_add_cflags in $cf_xopen_source
7919 do
7920 case $cf_fix_cppflags in
7921 no)
7922         case $cf_add_cflags in #(vi
7923         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7924                 case $cf_add_cflags in
7925                 -D*)
7926                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7927
7928                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7929                                 && test -z "${cf_tst_cflags}" \
7930                                 && cf_fix_cppflags=yes
7931
7932                         if test $cf_fix_cppflags = yes ; then
7933                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7934                                 continue
7935                         elif test "${cf_tst_cflags}" = "\"'" ; then
7936                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7937                                 continue
7938                         fi
7939                         ;;
7940                 esac
7941                 case "$CPPFLAGS" in
7942                 *$cf_add_cflags) #(vi
7943                         ;;
7944                 *) #(vi
7945                         case $cf_add_cflags in #(vi
7946                         -D*)
7947                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7948
7949 CPPFLAGS=`echo "$CPPFLAGS" | \
7950         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7951                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7952
7953                                 ;;
7954                         esac
7955                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7956                         ;;
7957                 esac
7958                 ;;
7959         *)
7960                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7961                 ;;
7962         esac
7963         ;;
7964 yes)
7965         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7966
7967         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7968
7969         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7970                 && test -z "${cf_tst_cflags}" \
7971                 && cf_fix_cppflags=no
7972         ;;
7973 esac
7974 done
7975
7976 if test -n "$cf_new_cflags" ; then
7977
7978         CFLAGS="$CFLAGS $cf_new_cflags"
7979 fi
7980
7981 if test -n "$cf_new_cppflags" ; then
7982
7983         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7984 fi
7985
7986 if test -n "$cf_new_extra_cppflags" ; then
7987
7988         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7989 fi
7990
7991 fi
7992
7993 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7994         echo "$as_me:7994: checking if _XOPEN_SOURCE really is set" >&5
7995 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7996         cat >conftest.$ac_ext <<_ACEOF
7997 #line 7997 "configure"
7998 #include "confdefs.h"
7999 #include <stdlib.h>
8000 int
8001 main ()
8002 {
8003
8004 #ifndef _XOPEN_SOURCE
8005 make an error
8006 #endif
8007   ;
8008   return 0;
8009 }
8010 _ACEOF
8011 rm -f conftest.$ac_objext
8012 if { (eval echo "$as_me:8012: \"$ac_compile\"") >&5
8013   (eval $ac_compile) 2>&5
8014   ac_status=$?
8015   echo "$as_me:8015: \$? = $ac_status" >&5
8016   (exit $ac_status); } &&
8017          { ac_try='test -s conftest.$ac_objext'
8018   { (eval echo "$as_me:8018: \"$ac_try\"") >&5
8019   (eval $ac_try) 2>&5
8020   ac_status=$?
8021   echo "$as_me:8021: \$? = $ac_status" >&5
8022   (exit $ac_status); }; }; then
8023   cf_XOPEN_SOURCE_set=yes
8024 else
8025   echo "$as_me: failed program was:" >&5
8026 cat conftest.$ac_ext >&5
8027 cf_XOPEN_SOURCE_set=no
8028 fi
8029 rm -f conftest.$ac_objext conftest.$ac_ext
8030         echo "$as_me:8030: result: $cf_XOPEN_SOURCE_set" >&5
8031 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8032         if test $cf_XOPEN_SOURCE_set = yes
8033         then
8034                 cat >conftest.$ac_ext <<_ACEOF
8035 #line 8035 "configure"
8036 #include "confdefs.h"
8037 #include <stdlib.h>
8038 int
8039 main ()
8040 {
8041
8042 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8043 make an error
8044 #endif
8045   ;
8046   return 0;
8047 }
8048 _ACEOF
8049 rm -f conftest.$ac_objext
8050 if { (eval echo "$as_me:8050: \"$ac_compile\"") >&5
8051   (eval $ac_compile) 2>&5
8052   ac_status=$?
8053   echo "$as_me:8053: \$? = $ac_status" >&5
8054   (exit $ac_status); } &&
8055          { ac_try='test -s conftest.$ac_objext'
8056   { (eval echo "$as_me:8056: \"$ac_try\"") >&5
8057   (eval $ac_try) 2>&5
8058   ac_status=$?
8059   echo "$as_me:8059: \$? = $ac_status" >&5
8060   (exit $ac_status); }; }; then
8061   cf_XOPEN_SOURCE_set_ok=yes
8062 else
8063   echo "$as_me: failed program was:" >&5
8064 cat conftest.$ac_ext >&5
8065 cf_XOPEN_SOURCE_set_ok=no
8066 fi
8067 rm -f conftest.$ac_objext conftest.$ac_ext
8068                 if test $cf_XOPEN_SOURCE_set_ok = no
8069                 then
8070                         { echo "$as_me:8070: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8071 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8072                 fi
8073         else
8074
8075 echo "$as_me:8075: checking if we should define _XOPEN_SOURCE" >&5
8076 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8077 if test "${cf_cv_xopen_source+set}" = set; then
8078   echo $ECHO_N "(cached) $ECHO_C" >&6
8079 else
8080
8081         cat >conftest.$ac_ext <<_ACEOF
8082 #line 8082 "configure"
8083 #include "confdefs.h"
8084
8085 #include <stdlib.h>
8086 #include <string.h>
8087 #include <sys/types.h>
8088
8089 int
8090 main ()
8091 {
8092
8093 #ifndef _XOPEN_SOURCE
8094 make an error
8095 #endif
8096   ;
8097   return 0;
8098 }
8099 _ACEOF
8100 rm -f conftest.$ac_objext
8101 if { (eval echo "$as_me:8101: \"$ac_compile\"") >&5
8102   (eval $ac_compile) 2>&5
8103   ac_status=$?
8104   echo "$as_me:8104: \$? = $ac_status" >&5
8105   (exit $ac_status); } &&
8106          { ac_try='test -s conftest.$ac_objext'
8107   { (eval echo "$as_me:8107: \"$ac_try\"") >&5
8108   (eval $ac_try) 2>&5
8109   ac_status=$?
8110   echo "$as_me:8110: \$? = $ac_status" >&5
8111   (exit $ac_status); }; }; then
8112   cf_cv_xopen_source=no
8113 else
8114   echo "$as_me: failed program was:" >&5
8115 cat conftest.$ac_ext >&5
8116 cf_save="$CPPFLAGS"
8117          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8118          cat >conftest.$ac_ext <<_ACEOF
8119 #line 8119 "configure"
8120 #include "confdefs.h"
8121
8122 #include <stdlib.h>
8123 #include <string.h>
8124 #include <sys/types.h>
8125
8126 int
8127 main ()
8128 {
8129
8130 #ifdef _XOPEN_SOURCE
8131 make an error
8132 #endif
8133   ;
8134   return 0;
8135 }
8136 _ACEOF
8137 rm -f conftest.$ac_objext
8138 if { (eval echo "$as_me:8138: \"$ac_compile\"") >&5
8139   (eval $ac_compile) 2>&5
8140   ac_status=$?
8141   echo "$as_me:8141: \$? = $ac_status" >&5
8142   (exit $ac_status); } &&
8143          { ac_try='test -s conftest.$ac_objext'
8144   { (eval echo "$as_me:8144: \"$ac_try\"") >&5
8145   (eval $ac_try) 2>&5
8146   ac_status=$?
8147   echo "$as_me:8147: \$? = $ac_status" >&5
8148   (exit $ac_status); }; }; then
8149   cf_cv_xopen_source=no
8150 else
8151   echo "$as_me: failed program was:" >&5
8152 cat conftest.$ac_ext >&5
8153 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8154 fi
8155 rm -f conftest.$ac_objext conftest.$ac_ext
8156         CPPFLAGS="$cf_save"
8157
8158 fi
8159 rm -f conftest.$ac_objext conftest.$ac_ext
8160
8161 fi
8162 echo "$as_me:8162: result: $cf_cv_xopen_source" >&5
8163 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8164
8165 if test "$cf_cv_xopen_source" != no ; then
8166
8167 CFLAGS=`echo "$CFLAGS" | \
8168         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8169                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8170
8171 CPPFLAGS=`echo "$CPPFLAGS" | \
8172         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8173                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8174
8175         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8176
8177 cf_fix_cppflags=no
8178 cf_new_cflags=
8179 cf_new_cppflags=
8180 cf_new_extra_cppflags=
8181
8182 for cf_add_cflags in $cf_temp_xopen_source
8183 do
8184 case $cf_fix_cppflags in
8185 no)
8186         case $cf_add_cflags in #(vi
8187         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8188                 case $cf_add_cflags in
8189                 -D*)
8190                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8191
8192                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8193                                 && test -z "${cf_tst_cflags}" \
8194                                 && cf_fix_cppflags=yes
8195
8196                         if test $cf_fix_cppflags = yes ; then
8197                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8198                                 continue
8199                         elif test "${cf_tst_cflags}" = "\"'" ; then
8200                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8201                                 continue
8202                         fi
8203                         ;;
8204                 esac
8205                 case "$CPPFLAGS" in
8206                 *$cf_add_cflags) #(vi
8207                         ;;
8208                 *) #(vi
8209                         case $cf_add_cflags in #(vi
8210                         -D*)
8211                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8212
8213 CPPFLAGS=`echo "$CPPFLAGS" | \
8214         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8215                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8216
8217                                 ;;
8218                         esac
8219                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8220                         ;;
8221                 esac
8222                 ;;
8223         *)
8224                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8225                 ;;
8226         esac
8227         ;;
8228 yes)
8229         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8230
8231         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8232
8233         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8234                 && test -z "${cf_tst_cflags}" \
8235                 && cf_fix_cppflags=no
8236         ;;
8237 esac
8238 done
8239
8240 if test -n "$cf_new_cflags" ; then
8241
8242         CFLAGS="$CFLAGS $cf_new_cflags"
8243 fi
8244
8245 if test -n "$cf_new_cppflags" ; then
8246
8247         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8248 fi
8249
8250 if test -n "$cf_new_extra_cppflags" ; then
8251
8252         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8253 fi
8254
8255 fi
8256
8257         fi
8258 fi
8259
8260 # Work around breakage on OS X
8261
8262 echo "$as_me:8262: checking if SIGWINCH is defined" >&5
8263 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8264 if test "${cf_cv_define_sigwinch+set}" = set; then
8265   echo $ECHO_N "(cached) $ECHO_C" >&6
8266 else
8267
8268         cat >conftest.$ac_ext <<_ACEOF
8269 #line 8269 "configure"
8270 #include "confdefs.h"
8271
8272 #include <sys/types.h>
8273 #include <sys/signal.h>
8274
8275 int
8276 main ()
8277 {
8278 int x = SIGWINCH
8279   ;
8280   return 0;
8281 }
8282 _ACEOF
8283 rm -f conftest.$ac_objext
8284 if { (eval echo "$as_me:8284: \"$ac_compile\"") >&5
8285   (eval $ac_compile) 2>&5
8286   ac_status=$?
8287   echo "$as_me:8287: \$? = $ac_status" >&5
8288   (exit $ac_status); } &&
8289          { ac_try='test -s conftest.$ac_objext'
8290   { (eval echo "$as_me:8290: \"$ac_try\"") >&5
8291   (eval $ac_try) 2>&5
8292   ac_status=$?
8293   echo "$as_me:8293: \$? = $ac_status" >&5
8294   (exit $ac_status); }; }; then
8295   cf_cv_define_sigwinch=yes
8296 else
8297   echo "$as_me: failed program was:" >&5
8298 cat conftest.$ac_ext >&5
8299 cat >conftest.$ac_ext <<_ACEOF
8300 #line 8300 "configure"
8301 #include "confdefs.h"
8302
8303 #undef _XOPEN_SOURCE
8304 #undef _POSIX_SOURCE
8305 #undef _POSIX_C_SOURCE
8306 #include <sys/types.h>
8307 #include <sys/signal.h>
8308
8309 int
8310 main ()
8311 {
8312 int x = SIGWINCH
8313   ;
8314   return 0;
8315 }
8316 _ACEOF
8317 rm -f conftest.$ac_objext
8318 if { (eval echo "$as_me:8318: \"$ac_compile\"") >&5
8319   (eval $ac_compile) 2>&5
8320   ac_status=$?
8321   echo "$as_me:8321: \$? = $ac_status" >&5
8322   (exit $ac_status); } &&
8323          { ac_try='test -s conftest.$ac_objext'
8324   { (eval echo "$as_me:8324: \"$ac_try\"") >&5
8325   (eval $ac_try) 2>&5
8326   ac_status=$?
8327   echo "$as_me:8327: \$? = $ac_status" >&5
8328   (exit $ac_status); }; }; then
8329   cf_cv_define_sigwinch=maybe
8330 else
8331   echo "$as_me: failed program was:" >&5
8332 cat conftest.$ac_ext >&5
8333 cf_cv_define_sigwinch=no
8334 fi
8335 rm -f conftest.$ac_objext conftest.$ac_ext
8336
8337 fi
8338 rm -f conftest.$ac_objext conftest.$ac_ext
8339
8340 fi
8341 echo "$as_me:8341: result: $cf_cv_define_sigwinch" >&5
8342 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8343
8344 if test "$cf_cv_define_sigwinch" = maybe ; then
8345 echo "$as_me:8345: checking for actual SIGWINCH definition" >&5
8346 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8347 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8348   echo $ECHO_N "(cached) $ECHO_C" >&6
8349 else
8350
8351 cf_cv_fixup_sigwinch=unknown
8352 cf_sigwinch=32
8353 while test $cf_sigwinch != 1
8354 do
8355         cat >conftest.$ac_ext <<_ACEOF
8356 #line 8356 "configure"
8357 #include "confdefs.h"
8358
8359 #undef _XOPEN_SOURCE
8360 #undef _POSIX_SOURCE
8361 #undef _POSIX_C_SOURCE
8362 #include <sys/types.h>
8363 #include <sys/signal.h>
8364
8365 int
8366 main ()
8367 {
8368
8369 #if SIGWINCH != $cf_sigwinch
8370 make an error
8371 #endif
8372 int x = SIGWINCH
8373   ;
8374   return 0;
8375 }
8376 _ACEOF
8377 rm -f conftest.$ac_objext
8378 if { (eval echo "$as_me:8378: \"$ac_compile\"") >&5
8379   (eval $ac_compile) 2>&5
8380   ac_status=$?
8381   echo "$as_me:8381: \$? = $ac_status" >&5
8382   (exit $ac_status); } &&
8383          { ac_try='test -s conftest.$ac_objext'
8384   { (eval echo "$as_me:8384: \"$ac_try\"") >&5
8385   (eval $ac_try) 2>&5
8386   ac_status=$?
8387   echo "$as_me:8387: \$? = $ac_status" >&5
8388   (exit $ac_status); }; }; then
8389   cf_cv_fixup_sigwinch=$cf_sigwinch
8390          break
8391 else
8392   echo "$as_me: failed program was:" >&5
8393 cat conftest.$ac_ext >&5
8394 fi
8395 rm -f conftest.$ac_objext conftest.$ac_ext
8396
8397 cf_sigwinch=`expr $cf_sigwinch - 1`
8398 done
8399
8400 fi
8401 echo "$as_me:8401: result: $cf_cv_fixup_sigwinch" >&5
8402 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8403
8404         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8405                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8406         fi
8407 fi
8408
8409 # Checks for CODESET support.
8410
8411   echo "$as_me:8411: checking for nl_langinfo and CODESET" >&5
8412 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8413 if test "${am_cv_langinfo_codeset+set}" = set; then
8414   echo $ECHO_N "(cached) $ECHO_C" >&6
8415 else
8416   cat >conftest.$ac_ext <<_ACEOF
8417 #line 8417 "configure"
8418 #include "confdefs.h"
8419 #include <langinfo.h>
8420 int
8421 main ()
8422 {
8423 char* cs = nl_langinfo(CODESET);
8424   ;
8425   return 0;
8426 }
8427 _ACEOF
8428 rm -f conftest.$ac_objext conftest$ac_exeext
8429 if { (eval echo "$as_me:8429: \"$ac_link\"") >&5
8430   (eval $ac_link) 2>&5
8431   ac_status=$?
8432   echo "$as_me:8432: \$? = $ac_status" >&5
8433   (exit $ac_status); } &&
8434          { ac_try='test -s conftest$ac_exeext'
8435   { (eval echo "$as_me:8435: \"$ac_try\"") >&5
8436   (eval $ac_try) 2>&5
8437   ac_status=$?
8438   echo "$as_me:8438: \$? = $ac_status" >&5
8439   (exit $ac_status); }; }; then
8440   am_cv_langinfo_codeset=yes
8441 else
8442   echo "$as_me: failed program was:" >&5
8443 cat conftest.$ac_ext >&5
8444 am_cv_langinfo_codeset=no
8445 fi
8446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8447
8448 fi
8449 echo "$as_me:8449: result: $am_cv_langinfo_codeset" >&5
8450 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8451   if test $am_cv_langinfo_codeset = yes; then
8452
8453 cat >>confdefs.h <<\EOF
8454 #define HAVE_LANGINFO_CODESET 1
8455 EOF
8456
8457   fi
8458
8459 # use these variables to work around a defect in gcc's fixincludes.
8460 NCURSES_OK_WCHAR_T=
8461 NCURSES_OK_WINT_T=
8462
8463 echo "$as_me:8463: checking if you want wide-character code" >&5
8464 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8465
8466 # Check whether --enable-widec or --disable-widec was given.
8467 if test "${enable_widec+set}" = set; then
8468   enableval="$enable_widec"
8469   with_widec=$enableval
8470 else
8471   with_widec=no
8472 fi;
8473 echo "$as_me:8473: result: $with_widec" >&5
8474 echo "${ECHO_T}$with_widec" >&6
8475 if test "x$with_widec" = xyes ; then
8476         LIB_SUFFIX="w${LIB_SUFFIX}"
8477
8478 cat >>confdefs.h <<\EOF
8479 #define USE_WIDEC_SUPPORT 1
8480 EOF
8481
8482 cat >>confdefs.h <<\EOF
8483 #define NCURSES_WIDECHAR 1
8484 EOF
8485
8486 echo "$as_me:8486: checking if wchar.h can be used as is" >&5
8487 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8488 if test "${cf_cv_wchar_h_okay+set}" = set; then
8489   echo $ECHO_N "(cached) $ECHO_C" >&6
8490 else
8491
8492 cat >conftest.$ac_ext <<_ACEOF
8493 #line 8493 "configure"
8494 #include "confdefs.h"
8495
8496 #include <stdlib.h>
8497 #include <wchar.h>
8498
8499 int
8500 main ()
8501 {
8502
8503         wint_t foo = 0;
8504         int bar = iswpunct(foo)
8505   ;
8506   return 0;
8507 }
8508 _ACEOF
8509 rm -f conftest.$ac_objext
8510 if { (eval echo "$as_me:8510: \"$ac_compile\"") >&5
8511   (eval $ac_compile) 2>&5
8512   ac_status=$?
8513   echo "$as_me:8513: \$? = $ac_status" >&5
8514   (exit $ac_status); } &&
8515          { ac_try='test -s conftest.$ac_objext'
8516   { (eval echo "$as_me:8516: \"$ac_try\"") >&5
8517   (eval $ac_try) 2>&5
8518   ac_status=$?
8519   echo "$as_me:8519: \$? = $ac_status" >&5
8520   (exit $ac_status); }; }; then
8521   cf_cv_wchar_h_okay=yes
8522 else
8523   echo "$as_me: failed program was:" >&5
8524 cat conftest.$ac_ext >&5
8525 cf_cv_wchar_h_okay=no
8526 fi
8527 rm -f conftest.$ac_objext conftest.$ac_ext
8528 fi
8529 echo "$as_me:8529: result: $cf_cv_wchar_h_okay" >&5
8530 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8531
8532 if test $cf_cv_wchar_h_okay = no
8533 then
8534
8535 echo "$as_me:8535: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8536 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8537 cat >conftest.$ac_ext <<_ACEOF
8538 #line 8538 "configure"
8539 #include "confdefs.h"
8540 #include <sys/types.h>
8541
8542 int
8543 main ()
8544 {
8545
8546 #ifndef _XOPEN_SOURCE_EXTENDED
8547 make an error
8548 #endif
8549   ;
8550   return 0;
8551 }
8552 _ACEOF
8553 rm -f conftest.$ac_objext
8554 if { (eval echo "$as_me:8554: \"$ac_compile\"") >&5
8555   (eval $ac_compile) 2>&5
8556   ac_status=$?
8557   echo "$as_me:8557: \$? = $ac_status" >&5
8558   (exit $ac_status); } &&
8559          { ac_try='test -s conftest.$ac_objext'
8560   { (eval echo "$as_me:8560: \"$ac_try\"") >&5
8561   (eval $ac_try) 2>&5
8562   ac_status=$?
8563   echo "$as_me:8563: \$? = $ac_status" >&5
8564   (exit $ac_status); }; }; then
8565   cf_result=no
8566 else
8567   echo "$as_me: failed program was:" >&5
8568 cat conftest.$ac_ext >&5
8569 cf_result=yes
8570 fi
8571 rm -f conftest.$ac_objext conftest.$ac_ext
8572 echo "$as_me:8572: result: $cf_result" >&5
8573 echo "${ECHO_T}$cf_result" >&6
8574
8575 if test "$cf_result" = yes ; then
8576         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8577 elif test "x" != "x" ; then
8578         echo "$as_me:8578: checking checking for compatible value versus " >&5
8579 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8580         cat >conftest.$ac_ext <<_ACEOF
8581 #line 8581 "configure"
8582 #include "confdefs.h"
8583 #include <sys/types.h>
8584
8585 int
8586 main ()
8587 {
8588
8589 #if _XOPEN_SOURCE_EXTENDED- < 0
8590 make an error
8591 #endif
8592   ;
8593   return 0;
8594 }
8595 _ACEOF
8596 rm -f conftest.$ac_objext
8597 if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5
8598   (eval $ac_compile) 2>&5
8599   ac_status=$?
8600   echo "$as_me:8600: \$? = $ac_status" >&5
8601   (exit $ac_status); } &&
8602          { ac_try='test -s conftest.$ac_objext'
8603   { (eval echo "$as_me:8603: \"$ac_try\"") >&5
8604   (eval $ac_try) 2>&5
8605   ac_status=$?
8606   echo "$as_me:8606: \$? = $ac_status" >&5
8607   (exit $ac_status); }; }; then
8608   cf_result=yes
8609 else
8610   echo "$as_me: failed program was:" >&5
8611 cat conftest.$ac_ext >&5
8612 cf_result=no
8613 fi
8614 rm -f conftest.$ac_objext conftest.$ac_ext
8615         echo "$as_me:8615: result: $cf_result" >&5
8616 echo "${ECHO_T}$cf_result" >&6
8617         if test "$cf_result" = no ; then
8618                 # perhaps we can override it - try...
8619                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8620         fi
8621 fi
8622
8623 fi
8624
8625         # with_overwrite=no
8626         NCURSES_CH_T=cchar_t
8627
8628 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8629 do
8630 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8631 echo "$as_me:8631: checking for $ac_func" >&5
8632 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8633 if eval "test \"\${$as_ac_var+set}\" = set"; then
8634   echo $ECHO_N "(cached) $ECHO_C" >&6
8635 else
8636   cat >conftest.$ac_ext <<_ACEOF
8637 #line 8637 "configure"
8638 #include "confdefs.h"
8639 /* System header to define __stub macros and hopefully few prototypes,
8640     which can conflict with char $ac_func (); below.  */
8641 #include <assert.h>
8642 /* Override any gcc2 internal prototype to avoid an error.  */
8643 #ifdef __cplusplus
8644 extern "C"
8645 #endif
8646 /* We use char because int might match the return type of a gcc2
8647    builtin and then its argument prototype would still apply.  */
8648 char $ac_func ();
8649 char (*f) ();
8650
8651 int
8652 main ()
8653 {
8654 /* The GNU C library defines this for functions which it implements
8655     to always fail with ENOSYS.  Some functions are actually named
8656     something starting with __ and the normal name is an alias.  */
8657 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8658 choke me
8659 #else
8660 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8661 #endif
8662
8663   ;
8664   return 0;
8665 }
8666 _ACEOF
8667 rm -f conftest.$ac_objext conftest$ac_exeext
8668 if { (eval echo "$as_me:8668: \"$ac_link\"") >&5
8669   (eval $ac_link) 2>&5
8670   ac_status=$?
8671   echo "$as_me:8671: \$? = $ac_status" >&5
8672   (exit $ac_status); } &&
8673          { ac_try='test -s conftest$ac_exeext'
8674   { (eval echo "$as_me:8674: \"$ac_try\"") >&5
8675   (eval $ac_try) 2>&5
8676   ac_status=$?
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit $ac_status); }; }; then
8679   eval "$as_ac_var=yes"
8680 else
8681   echo "$as_me: failed program was:" >&5
8682 cat conftest.$ac_ext >&5
8683 eval "$as_ac_var=no"
8684 fi
8685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8686 fi
8687 echo "$as_me:8687: result: `eval echo '${'$as_ac_var'}'`" >&5
8688 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8689 if test `eval echo '${'$as_ac_var'}'` = yes; then
8690   cat >>confdefs.h <<EOF
8691 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8692 EOF
8693
8694 fi
8695 done
8696
8697         if test "x$ac_cv_func_putwc" != xyes ; then
8698
8699 echo "$as_me:8699: checking for multibyte character support" >&5
8700 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8701 if test "${cf_cv_utf8_lib+set}" = set; then
8702   echo $ECHO_N "(cached) $ECHO_C" >&6
8703 else
8704
8705         cf_save_LIBS="$LIBS"
8706         cat >conftest.$ac_ext <<_ACEOF
8707 #line 8707 "configure"
8708 #include "confdefs.h"
8709
8710 #include <stdlib.h>
8711 int
8712 main ()
8713 {
8714 putwc(0,0);
8715   ;
8716   return 0;
8717 }
8718 _ACEOF
8719 rm -f conftest.$ac_objext conftest$ac_exeext
8720 if { (eval echo "$as_me:8720: \"$ac_link\"") >&5
8721   (eval $ac_link) 2>&5
8722   ac_status=$?
8723   echo "$as_me:8723: \$? = $ac_status" >&5
8724   (exit $ac_status); } &&
8725          { ac_try='test -s conftest$ac_exeext'
8726   { (eval echo "$as_me:8726: \"$ac_try\"") >&5
8727   (eval $ac_try) 2>&5
8728   ac_status=$?
8729   echo "$as_me:8729: \$? = $ac_status" >&5
8730   (exit $ac_status); }; }; then
8731   cf_cv_utf8_lib=yes
8732 else
8733   echo "$as_me: failed program was:" >&5
8734 cat conftest.$ac_ext >&5
8735
8736 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8737 # will be set on completion of the AC_TRY_LINK below.
8738 cf_cv_header_path_utf8=
8739 cf_cv_library_path_utf8=
8740
8741 echo "${as_me:-configure}:8741: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8742
8743 cf_save_LIBS="$LIBS"
8744
8745 cat >conftest.$ac_ext <<_ACEOF
8746 #line 8746 "configure"
8747 #include "confdefs.h"
8748
8749 #include <libutf8.h>
8750 int
8751 main ()
8752 {
8753 putwc(0,0);
8754   ;
8755   return 0;
8756 }
8757 _ACEOF
8758 rm -f conftest.$ac_objext conftest$ac_exeext
8759 if { (eval echo "$as_me:8759: \"$ac_link\"") >&5
8760   (eval $ac_link) 2>&5
8761   ac_status=$?
8762   echo "$as_me:8762: \$? = $ac_status" >&5
8763   (exit $ac_status); } &&
8764          { ac_try='test -s conftest$ac_exeext'
8765   { (eval echo "$as_me:8765: \"$ac_try\"") >&5
8766   (eval $ac_try) 2>&5
8767   ac_status=$?
8768   echo "$as_me:8768: \$? = $ac_status" >&5
8769   (exit $ac_status); }; }; then
8770
8771         cf_cv_find_linkage_utf8=yes
8772         cf_cv_header_path_utf8=/usr/include
8773         cf_cv_library_path_utf8=/usr/lib
8774
8775 else
8776   echo "$as_me: failed program was:" >&5
8777 cat conftest.$ac_ext >&5
8778
8779 LIBS="-lutf8  $cf_save_LIBS"
8780
8781 cat >conftest.$ac_ext <<_ACEOF
8782 #line 8782 "configure"
8783 #include "confdefs.h"
8784
8785 #include <libutf8.h>
8786 int
8787 main ()
8788 {
8789 putwc(0,0);
8790   ;
8791   return 0;
8792 }
8793 _ACEOF
8794 rm -f conftest.$ac_objext conftest$ac_exeext
8795 if { (eval echo "$as_me:8795: \"$ac_link\"") >&5
8796   (eval $ac_link) 2>&5
8797   ac_status=$?
8798   echo "$as_me:8798: \$? = $ac_status" >&5
8799   (exit $ac_status); } &&
8800          { ac_try='test -s conftest$ac_exeext'
8801   { (eval echo "$as_me:8801: \"$ac_try\"") >&5
8802   (eval $ac_try) 2>&5
8803   ac_status=$?
8804   echo "$as_me:8804: \$? = $ac_status" >&5
8805   (exit $ac_status); }; }; then
8806
8807         cf_cv_find_linkage_utf8=yes
8808         cf_cv_header_path_utf8=/usr/include
8809         cf_cv_library_path_utf8=/usr/lib
8810         cf_cv_library_file_utf8="-lutf8"
8811
8812 else
8813   echo "$as_me: failed program was:" >&5
8814 cat conftest.$ac_ext >&5
8815
8816         cf_cv_find_linkage_utf8=no
8817         LIBS="$cf_save_LIBS"
8818
8819     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8820
8821 echo "${as_me:-configure}:8821: testing find linkage for utf8 library ..." 1>&5
8822
8823 echo "${as_me:-configure}:8823: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8824
8825     cf_save_CPPFLAGS="$CPPFLAGS"
8826     cf_test_CPPFLAGS="$CPPFLAGS"
8827
8828 cf_search=
8829
8830 # collect the current set of include-directories from compiler flags
8831 cf_header_path_list=""
8832 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8833         for cf_header_path in $CPPFLAGS $CFLAGS
8834         do
8835                 case $cf_header_path in #(vi
8836                 -I*)
8837                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8838
8839 test "$cf_header_path" != "NONE" && \
8840 test -d "$cf_header_path" && \
8841  {
8842         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8843         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8844         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8845         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8846         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8847         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8848 }
8849
8850                         cf_header_path_list="$cf_header_path_list $cf_search"
8851                         ;;
8852                 esac
8853         done
8854 fi
8855
8856 # add the variations for the package we are looking for
8857
8858 cf_search=
8859
8860 test "/usr" != "$prefix" && \
8861 test -d "/usr" && \
8862 (test $prefix = NONE || test "/usr" != "$prefix") && {
8863         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8864         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8865         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8866         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8867         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8868         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8869 }
8870
8871 test "$prefix" != "NONE" && \
8872 test -d "$prefix" && \
8873  {
8874         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8875         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8876         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8877         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8878         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8879         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8880 }
8881
8882 test "/usr/local" != "$prefix" && \
8883 test -d "/usr/local" && \
8884 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8885         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8886         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8887         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8888         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8889         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8890         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8891 }
8892
8893 test "/opt" != "$prefix" && \
8894 test -d "/opt" && \
8895 (test $prefix = NONE || test "/opt" != "$prefix") && {
8896         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8897         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8898         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8899         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8900         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8901         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8902 }
8903
8904 test "$HOME" != "$prefix" && \
8905 test -d "$HOME" && \
8906 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8907         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8908         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8909         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8910         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8911         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8912         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8913 }
8914
8915 test "$includedir" != NONE && \
8916 test "$includedir" != "/usr/include" && \
8917 test -d "$includedir" && {
8918         test -d $includedir &&    cf_search="$cf_search $includedir"
8919         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8920 }
8921
8922 test "$oldincludedir" != NONE && \
8923 test "$oldincludedir" != "/usr/include" && \
8924 test -d "$oldincludedir" && {
8925         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8926         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8927 }
8928
8929 cf_search="$cf_search $cf_header_path_list"
8930
8931     for cf_cv_header_path_utf8 in $cf_search
8932     do
8933       if test -d $cf_cv_header_path_utf8 ; then
8934         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8935
8936 echo "${as_me:-configure}:8936: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8937
8938         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8939         cat >conftest.$ac_ext <<_ACEOF
8940 #line 8940 "configure"
8941 #include "confdefs.h"
8942
8943 #include <libutf8.h>
8944 int
8945 main ()
8946 {
8947 putwc(0,0);
8948   ;
8949   return 0;
8950 }
8951 _ACEOF
8952 rm -f conftest.$ac_objext
8953 if { (eval echo "$as_me:8953: \"$ac_compile\"") >&5
8954   (eval $ac_compile) 2>&5
8955   ac_status=$?
8956   echo "$as_me:8956: \$? = $ac_status" >&5
8957   (exit $ac_status); } &&
8958          { ac_try='test -s conftest.$ac_objext'
8959   { (eval echo "$as_me:8959: \"$ac_try\"") >&5
8960   (eval $ac_try) 2>&5
8961   ac_status=$?
8962   echo "$as_me:8962: \$? = $ac_status" >&5
8963   (exit $ac_status); }; }; then
8964
8965             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8966
8967 echo "${as_me:-configure}:8967: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8968
8969             cf_cv_find_linkage_utf8=maybe
8970             cf_test_CPPFLAGS="$CPPFLAGS"
8971             break
8972 else
8973   echo "$as_me: failed program was:" >&5
8974 cat conftest.$ac_ext >&5
8975
8976             CPPFLAGS="$cf_save_CPPFLAGS"
8977
8978 fi
8979 rm -f conftest.$ac_objext conftest.$ac_ext
8980       fi
8981     done
8982
8983     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8984
8985 echo "${as_me:-configure}:8985: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8986
8987       cf_save_LIBS="$LIBS"
8988       cf_save_LDFLAGS="$LDFLAGS"
8989
8990       if test "$cf_cv_find_linkage_utf8" != yes ; then
8991
8992 cf_search=
8993 cf_library_path_list=""
8994 if test -n "${LDFLAGS}${LIBS}" ; then
8995         for cf_library_path in $LDFLAGS $LIBS
8996         do
8997                 case $cf_library_path in #(vi
8998                 -L*)
8999                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9000
9001 test "$cf_library_path" != "NONE" && \
9002 test -d "$cf_library_path" && \
9003  {
9004         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9005         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9006         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9007         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9008         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9009         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9010 }
9011
9012                         cf_library_path_list="$cf_library_path_list $cf_search"
9013                         ;;
9014                 esac
9015         done
9016 fi
9017
9018 cf_search=
9019
9020 test "/usr" != "$prefix" && \
9021 test -d "/usr" && \
9022 (test $prefix = NONE || test "/usr" != "$prefix") && {
9023         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9024         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9025         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9026         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9027         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9028         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9029 }
9030
9031 test "$prefix" != "NONE" && \
9032 test -d "$prefix" && \
9033  {
9034         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9035         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9036         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9037         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9038         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9039         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9040 }
9041
9042 test "/usr/local" != "$prefix" && \
9043 test -d "/usr/local" && \
9044 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9045         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9046         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9047         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9048         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9049         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9050         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9051 }
9052
9053 test "/opt" != "$prefix" && \
9054 test -d "/opt" && \
9055 (test $prefix = NONE || test "/opt" != "$prefix") && {
9056         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9057         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9058         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9059         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9060         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9061         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9062 }
9063
9064 test "$HOME" != "$prefix" && \
9065 test -d "$HOME" && \
9066 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9067         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9068         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9069         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9070         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9071         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9072         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9073 }
9074
9075 cf_search="$cf_library_path_list $cf_search"
9076
9077         for cf_cv_library_path_utf8 in $cf_search
9078         do
9079           if test -d $cf_cv_library_path_utf8 ; then
9080             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9081
9082 echo "${as_me:-configure}:9082: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9083
9084             CPPFLAGS="$cf_test_CPPFLAGS"
9085             LIBS="-lutf8  $cf_save_LIBS"
9086             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9087             cat >conftest.$ac_ext <<_ACEOF
9088 #line 9088 "configure"
9089 #include "confdefs.h"
9090
9091 #include <libutf8.h>
9092 int
9093 main ()
9094 {
9095 putwc(0,0);
9096   ;
9097   return 0;
9098 }
9099 _ACEOF
9100 rm -f conftest.$ac_objext conftest$ac_exeext
9101 if { (eval echo "$as_me:9101: \"$ac_link\"") >&5
9102   (eval $ac_link) 2>&5
9103   ac_status=$?
9104   echo "$as_me:9104: \$? = $ac_status" >&5
9105   (exit $ac_status); } &&
9106          { ac_try='test -s conftest$ac_exeext'
9107   { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108   (eval $ac_try) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); }; }; then
9112
9113                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9114
9115 echo "${as_me:-configure}:9115: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9116
9117                 cf_cv_find_linkage_utf8=yes
9118                 cf_cv_library_file_utf8="-lutf8"
9119                 break
9120 else
9121   echo "$as_me: failed program was:" >&5
9122 cat conftest.$ac_ext >&5
9123
9124                 CPPFLAGS="$cf_save_CPPFLAGS"
9125                 LIBS="$cf_save_LIBS"
9126                 LDFLAGS="$cf_save_LDFLAGS"
9127
9128 fi
9129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9130           fi
9131         done
9132         CPPFLAGS="$cf_save_CPPFLAGS"
9133         LDFLAGS="$cf_save_LDFLAGS"
9134       fi
9135
9136     else
9137       cf_cv_find_linkage_utf8=no
9138     fi
9139
9140 fi
9141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9142
9143 fi
9144 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9145
9146 LIBS="$cf_save_LIBS"
9147
9148 if test "$cf_cv_find_linkage_utf8" = yes ; then
9149 cf_cv_utf8_lib=add-on
9150 else
9151 cf_cv_utf8_lib=no
9152 fi
9153
9154 fi
9155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9156 fi
9157 echo "$as_me:9157: result: $cf_cv_utf8_lib" >&5
9158 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9159
9160 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9161 # ncurses/ncursesw:
9162 if test "$cf_cv_utf8_lib" = "add-on" ; then
9163
9164 cat >>confdefs.h <<\EOF
9165 #define HAVE_LIBUTF8_H 1
9166 EOF
9167
9168 if test -n "$cf_cv_header_path_utf8" ; then
9169   for cf_add_incdir in $cf_cv_header_path_utf8
9170   do
9171         while test $cf_add_incdir != /usr/include
9172         do
9173           if test -d $cf_add_incdir
9174           then
9175                 cf_have_incdir=no
9176                 if test -n "$CFLAGS$CPPFLAGS" ; then
9177                   # a loop is needed to ensure we can add subdirs of existing dirs
9178                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9179                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9180                           cf_have_incdir=yes; break
9181                         fi
9182                   done
9183                 fi
9184
9185                 if test "$cf_have_incdir" = no ; then
9186                   if test "$cf_add_incdir" = /usr/local/include ; then
9187                         if test "$GCC" = yes
9188                         then
9189                           cf_save_CPPFLAGS=$CPPFLAGS
9190                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9191                           cat >conftest.$ac_ext <<_ACEOF
9192 #line 9192 "configure"
9193 #include "confdefs.h"
9194 #include <stdio.h>
9195 int
9196 main ()
9197 {
9198 printf("Hello")
9199   ;
9200   return 0;
9201 }
9202 _ACEOF
9203 rm -f conftest.$ac_objext
9204 if { (eval echo "$as_me:9204: \"$ac_compile\"") >&5
9205   (eval $ac_compile) 2>&5
9206   ac_status=$?
9207   echo "$as_me:9207: \$? = $ac_status" >&5
9208   (exit $ac_status); } &&
9209          { ac_try='test -s conftest.$ac_objext'
9210   { (eval echo "$as_me:9210: \"$ac_try\"") >&5
9211   (eval $ac_try) 2>&5
9212   ac_status=$?
9213   echo "$as_me:9213: \$? = $ac_status" >&5
9214   (exit $ac_status); }; }; then
9215   :
9216 else
9217   echo "$as_me: failed program was:" >&5
9218 cat conftest.$ac_ext >&5
9219 cf_have_incdir=yes
9220 fi
9221 rm -f conftest.$ac_objext conftest.$ac_ext
9222                           CPPFLAGS=$cf_save_CPPFLAGS
9223                         fi
9224                   fi
9225                 fi
9226
9227                 if test "$cf_have_incdir" = no ; then
9228                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9229
9230 echo "${as_me:-configure}:9230: testing adding $cf_add_incdir to include-path ..." 1>&5
9231
9232                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9233
9234                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9235                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9236                   cf_add_incdir="$cf_top_incdir"
9237                 else
9238                   break
9239                 fi
9240           fi
9241         done
9242   done
9243 fi
9244
9245 if test -n "$cf_cv_library_path_utf8" ; then
9246   for cf_add_libdir in $cf_cv_library_path_utf8
9247   do
9248     if test $cf_add_libdir = /usr/lib ; then
9249       :
9250     elif test -d $cf_add_libdir
9251     then
9252       cf_have_libdir=no
9253       if test -n "$LDFLAGS$LIBS" ; then
9254         # a loop is needed to ensure we can add subdirs of existing dirs
9255         for cf_test_libdir in $LDFLAGS $LIBS ; do
9256           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9257             cf_have_libdir=yes; break
9258           fi
9259         done
9260       fi
9261       if test "$cf_have_libdir" = no ; then
9262         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9263
9264 echo "${as_me:-configure}:9264: testing adding $cf_add_libdir to library-path ..." 1>&5
9265
9266         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9267       fi
9268     fi
9269   done
9270 fi
9271
9272         LIBS="$cf_cv_library_file_utf8 $LIBS"
9273 fi
9274
9275                 if test "$cf_cv_utf8_lib" != no ; then
9276                         NCURSES_LIBUTF8=1
9277                 fi
9278         fi
9279
9280 # This is needed on Tru64 5.0 to declare mbstate_t
9281 echo "$as_me:9281: checking if we must include wchar.h to declare mbstate_t" >&5
9282 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9283 if test "${cf_cv_mbstate_t+set}" = set; then
9284   echo $ECHO_N "(cached) $ECHO_C" >&6
9285 else
9286
9287 cat >conftest.$ac_ext <<_ACEOF
9288 #line 9288 "configure"
9289 #include "confdefs.h"
9290
9291 #include <stdlib.h>
9292 #include <stdarg.h>
9293 #include <stdio.h>
9294 #ifdef HAVE_LIBUTF8_H
9295 #include <libutf8.h>
9296 #endif
9297 int
9298 main ()
9299 {
9300 mbstate_t state
9301   ;
9302   return 0;
9303 }
9304 _ACEOF
9305 rm -f conftest.$ac_objext
9306 if { (eval echo "$as_me:9306: \"$ac_compile\"") >&5
9307   (eval $ac_compile) 2>&5
9308   ac_status=$?
9309   echo "$as_me:9309: \$? = $ac_status" >&5
9310   (exit $ac_status); } &&
9311          { ac_try='test -s conftest.$ac_objext'
9312   { (eval echo "$as_me:9312: \"$ac_try\"") >&5
9313   (eval $ac_try) 2>&5
9314   ac_status=$?
9315   echo "$as_me:9315: \$? = $ac_status" >&5
9316   (exit $ac_status); }; }; then
9317   cf_cv_mbstate_t=no
9318 else
9319   echo "$as_me: failed program was:" >&5
9320 cat conftest.$ac_ext >&5
9321 cat >conftest.$ac_ext <<_ACEOF
9322 #line 9322 "configure"
9323 #include "confdefs.h"
9324
9325 #include <stdlib.h>
9326 #include <stdarg.h>
9327 #include <stdio.h>
9328 #include <wchar.h>
9329 #ifdef HAVE_LIBUTF8_H
9330 #include <libutf8.h>
9331 #endif
9332 int
9333 main ()
9334 {
9335 mbstate_t value
9336   ;
9337   return 0;
9338 }
9339 _ACEOF
9340 rm -f conftest.$ac_objext
9341 if { (eval echo "$as_me:9341: \"$ac_compile\"") >&5
9342   (eval $ac_compile) 2>&5
9343   ac_status=$?
9344   echo "$as_me:9344: \$? = $ac_status" >&5
9345   (exit $ac_status); } &&
9346          { ac_try='test -s conftest.$ac_objext'
9347   { (eval echo "$as_me:9347: \"$ac_try\"") >&5
9348   (eval $ac_try) 2>&5
9349   ac_status=$?
9350   echo "$as_me:9350: \$? = $ac_status" >&5
9351   (exit $ac_status); }; }; then
9352   cf_cv_mbstate_t=yes
9353 else
9354   echo "$as_me: failed program was:" >&5
9355 cat conftest.$ac_ext >&5
9356 cf_cv_mbstate_t=unknown
9357 fi
9358 rm -f conftest.$ac_objext conftest.$ac_ext
9359 fi
9360 rm -f conftest.$ac_objext conftest.$ac_ext
9361 fi
9362 echo "$as_me:9362: result: $cf_cv_mbstate_t" >&5
9363 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9364
9365 if test "$cf_cv_mbstate_t" = yes ; then
9366
9367 cat >>confdefs.h <<\EOF
9368 #define NEED_WCHAR_H 1
9369 EOF
9370
9371         NEED_WCHAR_H=1
9372 fi
9373
9374 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9375 if test "$cf_cv_mbstate_t" = unknown ; then
9376         NCURSES_MBSTATE_T=1
9377 fi
9378
9379 # This is needed on Tru64 5.0 to declare wchar_t
9380 echo "$as_me:9380: checking if we must include wchar.h to declare wchar_t" >&5
9381 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9382 if test "${cf_cv_wchar_t+set}" = set; then
9383   echo $ECHO_N "(cached) $ECHO_C" >&6
9384 else
9385
9386 cat >conftest.$ac_ext <<_ACEOF
9387 #line 9387 "configure"
9388 #include "confdefs.h"
9389
9390 #include <stdlib.h>
9391 #include <stdarg.h>
9392 #include <stdio.h>
9393 #ifdef HAVE_LIBUTF8_H
9394 #include <libutf8.h>
9395 #endif
9396 int
9397 main ()
9398 {
9399 wchar_t state
9400   ;
9401   return 0;
9402 }
9403 _ACEOF
9404 rm -f conftest.$ac_objext
9405 if { (eval echo "$as_me:9405: \"$ac_compile\"") >&5
9406   (eval $ac_compile) 2>&5
9407   ac_status=$?
9408   echo "$as_me:9408: \$? = $ac_status" >&5
9409   (exit $ac_status); } &&
9410          { ac_try='test -s conftest.$ac_objext'
9411   { (eval echo "$as_me:9411: \"$ac_try\"") >&5
9412   (eval $ac_try) 2>&5
9413   ac_status=$?
9414   echo "$as_me:9414: \$? = $ac_status" >&5
9415   (exit $ac_status); }; }; then
9416   cf_cv_wchar_t=no
9417 else
9418   echo "$as_me: failed program was:" >&5
9419 cat conftest.$ac_ext >&5
9420 cat >conftest.$ac_ext <<_ACEOF
9421 #line 9421 "configure"
9422 #include "confdefs.h"
9423
9424 #include <stdlib.h>
9425 #include <stdarg.h>
9426 #include <stdio.h>
9427 #include <wchar.h>
9428 #ifdef HAVE_LIBUTF8_H
9429 #include <libutf8.h>
9430 #endif
9431 int
9432 main ()
9433 {
9434 wchar_t value
9435   ;
9436   return 0;
9437 }
9438 _ACEOF
9439 rm -f conftest.$ac_objext
9440 if { (eval echo "$as_me:9440: \"$ac_compile\"") >&5
9441   (eval $ac_compile) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit $ac_status); } &&
9445          { ac_try='test -s conftest.$ac_objext'
9446   { (eval echo "$as_me:9446: \"$ac_try\"") >&5
9447   (eval $ac_try) 2>&5
9448   ac_status=$?
9449   echo "$as_me:9449: \$? = $ac_status" >&5
9450   (exit $ac_status); }; }; then
9451   cf_cv_wchar_t=yes
9452 else
9453   echo "$as_me: failed program was:" >&5
9454 cat conftest.$ac_ext >&5
9455 cf_cv_wchar_t=unknown
9456 fi
9457 rm -f conftest.$ac_objext conftest.$ac_ext
9458 fi
9459 rm -f conftest.$ac_objext conftest.$ac_ext
9460 fi
9461 echo "$as_me:9461: result: $cf_cv_wchar_t" >&5
9462 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9463
9464 if test "$cf_cv_wchar_t" = yes ; then
9465
9466 cat >>confdefs.h <<\EOF
9467 #define NEED_WCHAR_H 1
9468 EOF
9469
9470         NEED_WCHAR_H=1
9471 fi
9472
9473 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9474 if test "$cf_cv_wchar_t" = unknown ; then
9475         NCURSES_WCHAR_T=1
9476 fi
9477
9478 # if we find wchar_t in either place, use substitution to provide a fallback.
9479 if test "$cf_cv_wchar_t" != unknown ; then
9480         NCURSES_OK_WCHAR_T=1
9481 fi
9482
9483 # This is needed on Tru64 5.0 to declare wint_t
9484 echo "$as_me:9484: checking if we must include wchar.h to declare wint_t" >&5
9485 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9486 if test "${cf_cv_wint_t+set}" = set; then
9487   echo $ECHO_N "(cached) $ECHO_C" >&6
9488 else
9489
9490 cat >conftest.$ac_ext <<_ACEOF
9491 #line 9491 "configure"
9492 #include "confdefs.h"
9493
9494 #include <stdlib.h>
9495 #include <stdarg.h>
9496 #include <stdio.h>
9497 #ifdef HAVE_LIBUTF8_H
9498 #include <libutf8.h>
9499 #endif
9500 int
9501 main ()
9502 {
9503 wint_t state
9504   ;
9505   return 0;
9506 }
9507 _ACEOF
9508 rm -f conftest.$ac_objext
9509 if { (eval echo "$as_me:9509: \"$ac_compile\"") >&5
9510   (eval $ac_compile) 2>&5
9511   ac_status=$?
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit $ac_status); } &&
9514          { ac_try='test -s conftest.$ac_objext'
9515   { (eval echo "$as_me:9515: \"$ac_try\"") >&5
9516   (eval $ac_try) 2>&5
9517   ac_status=$?
9518   echo "$as_me:9518: \$? = $ac_status" >&5
9519   (exit $ac_status); }; }; then
9520   cf_cv_wint_t=no
9521 else
9522   echo "$as_me: failed program was:" >&5
9523 cat conftest.$ac_ext >&5
9524 cat >conftest.$ac_ext <<_ACEOF
9525 #line 9525 "configure"
9526 #include "confdefs.h"
9527
9528 #include <stdlib.h>
9529 #include <stdarg.h>
9530 #include <stdio.h>
9531 #include <wchar.h>
9532 #ifdef HAVE_LIBUTF8_H
9533 #include <libutf8.h>
9534 #endif
9535 int
9536 main ()
9537 {
9538 wint_t value
9539   ;
9540   return 0;
9541 }
9542 _ACEOF
9543 rm -f conftest.$ac_objext
9544 if { (eval echo "$as_me:9544: \"$ac_compile\"") >&5
9545   (eval $ac_compile) 2>&5
9546   ac_status=$?
9547   echo "$as_me:9547: \$? = $ac_status" >&5
9548   (exit $ac_status); } &&
9549          { ac_try='test -s conftest.$ac_objext'
9550   { (eval echo "$as_me:9550: \"$ac_try\"") >&5
9551   (eval $ac_try) 2>&5
9552   ac_status=$?
9553   echo "$as_me:9553: \$? = $ac_status" >&5
9554   (exit $ac_status); }; }; then
9555   cf_cv_wint_t=yes
9556 else
9557   echo "$as_me: failed program was:" >&5
9558 cat conftest.$ac_ext >&5
9559 cf_cv_wint_t=unknown
9560 fi
9561 rm -f conftest.$ac_objext conftest.$ac_ext
9562 fi
9563 rm -f conftest.$ac_objext conftest.$ac_ext
9564 fi
9565 echo "$as_me:9565: result: $cf_cv_wint_t" >&5
9566 echo "${ECHO_T}$cf_cv_wint_t" >&6
9567
9568 if test "$cf_cv_wint_t" = yes ; then
9569
9570 cat >>confdefs.h <<\EOF
9571 #define NEED_WCHAR_H 1
9572 EOF
9573
9574         NEED_WCHAR_H=1
9575 fi
9576
9577 # if we do not find wint_t in either place, use substitution to provide a fallback.
9578 if test "$cf_cv_wint_t" = unknown ; then
9579         NCURSES_WINT_T=1
9580 fi
9581
9582 # if we find wint_t in either place, use substitution to provide a fallback.
9583 if test "$cf_cv_wint_t" != unknown ; then
9584         NCURSES_OK_WINT_T=1
9585 fi
9586
9587         if test "$NCURSES_MBSTATE_T" != 0; then
9588
9589 cat >>confdefs.h <<\EOF
9590 #define NEED_MBSTATE_T_DEF 1
9591 EOF
9592
9593         fi
9594 fi
9595
9596 ###   use option --disable-lp64 to allow long chtype
9597 case $cf_cv_abi_version in
9598 [345]*)
9599         default_with_lp64=no
9600         ;;
9601 *)
9602         default_with_lp64=yes
9603         ;;
9604 esac
9605
9606 echo "$as_me:9606: checking whether to enable _LP64 definition in curses.h" >&5
9607 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9608
9609 # Check whether --enable-lp64 or --disable-lp64 was given.
9610 if test "${enable_lp64+set}" = set; then
9611   enableval="$enable_lp64"
9612   with_lp64=$enableval
9613 else
9614   with_lp64=$default_with_lp64
9615 fi;
9616 echo "$as_me:9616: result: $with_lp64" >&5
9617 echo "${ECHO_T}$with_lp64" >&6
9618
9619 if test "x$with_lp64" = xyes ; then
9620         cf_cv_enable_lp64=1
9621 else
9622         cf_cv_enable_lp64=0
9623 fi
9624
9625 # Check whether --enable-largefile or --disable-largefile was given.
9626 if test "${enable_largefile+set}" = set; then
9627   enableval="$enable_largefile"
9628
9629 fi;
9630 if test "$enable_largefile" != no; then
9631
9632   echo "$as_me:9632: checking for special C compiler options needed for large files" >&5
9633 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9634 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9635   echo $ECHO_N "(cached) $ECHO_C" >&6
9636 else
9637   ac_cv_sys_largefile_CC=no
9638      if test "$GCC" != yes; then
9639        ac_save_CC=$CC
9640        while :; do
9641          # IRIX 6.2 and later do not support large files by default,
9642          # so use the C compiler's -n32 option if that helps.
9643          cat >conftest.$ac_ext <<_ACEOF
9644 #line 9644 "configure"
9645 #include "confdefs.h"
9646 #include <sys/types.h>
9647  /* Check that off_t can represent 2**63 - 1 correctly.
9648     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9649     since some C++ compilers masquerading as C compilers
9650     incorrectly reject 9223372036854775807.  */
9651 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9652   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9653                        && LARGE_OFF_T % 2147483647 == 1)
9654                       ? 1 : -1];
9655 int
9656 main ()
9657 {
9658
9659   ;
9660   return 0;
9661 }
9662 _ACEOF
9663          rm -f conftest.$ac_objext
9664 if { (eval echo "$as_me:9664: \"$ac_compile\"") >&5
9665   (eval $ac_compile) 2>&5
9666   ac_status=$?
9667   echo "$as_me:9667: \$? = $ac_status" >&5
9668   (exit $ac_status); } &&
9669          { ac_try='test -s conftest.$ac_objext'
9670   { (eval echo "$as_me:9670: \"$ac_try\"") >&5
9671   (eval $ac_try) 2>&5
9672   ac_status=$?
9673   echo "$as_me:9673: \$? = $ac_status" >&5
9674   (exit $ac_status); }; }; then
9675   break
9676 else
9677   echo "$as_me: failed program was:" >&5
9678 cat conftest.$ac_ext >&5
9679 fi
9680 rm -f conftest.$ac_objext
9681          CC="$CC -n32"
9682          rm -f conftest.$ac_objext
9683 if { (eval echo "$as_me:9683: \"$ac_compile\"") >&5
9684   (eval $ac_compile) 2>&5
9685   ac_status=$?
9686   echo "$as_me:9686: \$? = $ac_status" >&5
9687   (exit $ac_status); } &&
9688          { ac_try='test -s conftest.$ac_objext'
9689   { (eval echo "$as_me:9689: \"$ac_try\"") >&5
9690   (eval $ac_try) 2>&5
9691   ac_status=$?
9692   echo "$as_me:9692: \$? = $ac_status" >&5
9693   (exit $ac_status); }; }; then
9694   ac_cv_sys_largefile_CC=' -n32'; break
9695 else
9696   echo "$as_me: failed program was:" >&5
9697 cat conftest.$ac_ext >&5
9698 fi
9699 rm -f conftest.$ac_objext
9700          break
9701        done
9702        CC=$ac_save_CC
9703        rm -f conftest.$ac_ext
9704     fi
9705 fi
9706 echo "$as_me:9706: result: $ac_cv_sys_largefile_CC" >&5
9707 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9708   if test "$ac_cv_sys_largefile_CC" != no; then
9709     CC=$CC$ac_cv_sys_largefile_CC
9710   fi
9711
9712   echo "$as_me:9712: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9713 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9714 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9715   echo $ECHO_N "(cached) $ECHO_C" >&6
9716 else
9717   while :; do
9718   ac_cv_sys_file_offset_bits=no
9719   cat >conftest.$ac_ext <<_ACEOF
9720 #line 9720 "configure"
9721 #include "confdefs.h"
9722 #include <sys/types.h>
9723  /* Check that off_t can represent 2**63 - 1 correctly.
9724     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9725     since some C++ compilers masquerading as C compilers
9726     incorrectly reject 9223372036854775807.  */
9727 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9728   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9729                        && LARGE_OFF_T % 2147483647 == 1)
9730                       ? 1 : -1];
9731 int
9732 main ()
9733 {
9734
9735   ;
9736   return 0;
9737 }
9738 _ACEOF
9739 rm -f conftest.$ac_objext
9740 if { (eval echo "$as_me:9740: \"$ac_compile\"") >&5
9741   (eval $ac_compile) 2>&5
9742   ac_status=$?
9743   echo "$as_me:9743: \$? = $ac_status" >&5
9744   (exit $ac_status); } &&
9745          { ac_try='test -s conftest.$ac_objext'
9746   { (eval echo "$as_me:9746: \"$ac_try\"") >&5
9747   (eval $ac_try) 2>&5
9748   ac_status=$?
9749   echo "$as_me:9749: \$? = $ac_status" >&5
9750   (exit $ac_status); }; }; then
9751   break
9752 else
9753   echo "$as_me: failed program was:" >&5
9754 cat conftest.$ac_ext >&5
9755 fi
9756 rm -f conftest.$ac_objext conftest.$ac_ext
9757   cat >conftest.$ac_ext <<_ACEOF
9758 #line 9758 "configure"
9759 #include "confdefs.h"
9760 #define _FILE_OFFSET_BITS 64
9761 #include <sys/types.h>
9762  /* Check that off_t can represent 2**63 - 1 correctly.
9763     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9764     since some C++ compilers masquerading as C compilers
9765     incorrectly reject 9223372036854775807.  */
9766 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9767   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9768                        && LARGE_OFF_T % 2147483647 == 1)
9769                       ? 1 : -1];
9770 int
9771 main ()
9772 {
9773
9774   ;
9775   return 0;
9776 }
9777 _ACEOF
9778 rm -f conftest.$ac_objext
9779 if { (eval echo "$as_me:9779: \"$ac_compile\"") >&5
9780   (eval $ac_compile) 2>&5
9781   ac_status=$?
9782   echo "$as_me:9782: \$? = $ac_status" >&5
9783   (exit $ac_status); } &&
9784          { ac_try='test -s conftest.$ac_objext'
9785   { (eval echo "$as_me:9785: \"$ac_try\"") >&5
9786   (eval $ac_try) 2>&5
9787   ac_status=$?
9788   echo "$as_me:9788: \$? = $ac_status" >&5
9789   (exit $ac_status); }; }; then
9790   ac_cv_sys_file_offset_bits=64; break
9791 else
9792   echo "$as_me: failed program was:" >&5
9793 cat conftest.$ac_ext >&5
9794 fi
9795 rm -f conftest.$ac_objext conftest.$ac_ext
9796   break
9797 done
9798 fi
9799 echo "$as_me:9799: result: $ac_cv_sys_file_offset_bits" >&5
9800 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9801 if test "$ac_cv_sys_file_offset_bits" != no; then
9802
9803 cat >>confdefs.h <<EOF
9804 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9805 EOF
9806
9807 fi
9808 rm -rf conftest*
9809   echo "$as_me:9809: checking for _LARGE_FILES value needed for large files" >&5
9810 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9811 if test "${ac_cv_sys_large_files+set}" = set; then
9812   echo $ECHO_N "(cached) $ECHO_C" >&6
9813 else
9814   while :; do
9815   ac_cv_sys_large_files=no
9816   cat >conftest.$ac_ext <<_ACEOF
9817 #line 9817 "configure"
9818 #include "confdefs.h"
9819 #include <sys/types.h>
9820  /* Check that off_t can represent 2**63 - 1 correctly.
9821     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9822     since some C++ compilers masquerading as C compilers
9823     incorrectly reject 9223372036854775807.  */
9824 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9825   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9826                        && LARGE_OFF_T % 2147483647 == 1)
9827                       ? 1 : -1];
9828 int
9829 main ()
9830 {
9831
9832   ;
9833   return 0;
9834 }
9835 _ACEOF
9836 rm -f conftest.$ac_objext
9837 if { (eval echo "$as_me:9837: \"$ac_compile\"") >&5
9838   (eval $ac_compile) 2>&5
9839   ac_status=$?
9840   echo "$as_me:9840: \$? = $ac_status" >&5
9841   (exit $ac_status); } &&
9842          { ac_try='test -s conftest.$ac_objext'
9843   { (eval echo "$as_me:9843: \"$ac_try\"") >&5
9844   (eval $ac_try) 2>&5
9845   ac_status=$?
9846   echo "$as_me:9846: \$? = $ac_status" >&5
9847   (exit $ac_status); }; }; then
9848   break
9849 else
9850   echo "$as_me: failed program was:" >&5
9851 cat conftest.$ac_ext >&5
9852 fi
9853 rm -f conftest.$ac_objext conftest.$ac_ext
9854   cat >conftest.$ac_ext <<_ACEOF
9855 #line 9855 "configure"
9856 #include "confdefs.h"
9857 #define _LARGE_FILES 1
9858 #include <sys/types.h>
9859  /* Check that off_t can represent 2**63 - 1 correctly.
9860     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9861     since some C++ compilers masquerading as C compilers
9862     incorrectly reject 9223372036854775807.  */
9863 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9864   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9865                        && LARGE_OFF_T % 2147483647 == 1)
9866                       ? 1 : -1];
9867 int
9868 main ()
9869 {
9870
9871   ;
9872   return 0;
9873 }
9874 _ACEOF
9875 rm -f conftest.$ac_objext
9876 if { (eval echo "$as_me:9876: \"$ac_compile\"") >&5
9877   (eval $ac_compile) 2>&5
9878   ac_status=$?
9879   echo "$as_me:9879: \$? = $ac_status" >&5
9880   (exit $ac_status); } &&
9881          { ac_try='test -s conftest.$ac_objext'
9882   { (eval echo "$as_me:9882: \"$ac_try\"") >&5
9883   (eval $ac_try) 2>&5
9884   ac_status=$?
9885   echo "$as_me:9885: \$? = $ac_status" >&5
9886   (exit $ac_status); }; }; then
9887   ac_cv_sys_large_files=1; break
9888 else
9889   echo "$as_me: failed program was:" >&5
9890 cat conftest.$ac_ext >&5
9891 fi
9892 rm -f conftest.$ac_objext conftest.$ac_ext
9893   break
9894 done
9895 fi
9896 echo "$as_me:9896: result: $ac_cv_sys_large_files" >&5
9897 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9898 if test "$ac_cv_sys_large_files" != no; then
9899
9900 cat >>confdefs.h <<EOF
9901 #define _LARGE_FILES $ac_cv_sys_large_files
9902 EOF
9903
9904 fi
9905 rm -rf conftest*
9906 fi
9907
9908     if test "$enable_largefile" != no ; then
9909         echo "$as_me:9909: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9910 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9911 if test "${ac_cv_sys_largefile_source+set}" = set; then
9912   echo $ECHO_N "(cached) $ECHO_C" >&6
9913 else
9914   while :; do
9915   ac_cv_sys_largefile_source=no
9916   cat >conftest.$ac_ext <<_ACEOF
9917 #line 9917 "configure"
9918 #include "confdefs.h"
9919 #include <stdio.h>
9920 int
9921 main ()
9922 {
9923 return !fseeko;
9924   ;
9925   return 0;
9926 }
9927 _ACEOF
9928 rm -f conftest.$ac_objext
9929 if { (eval echo "$as_me:9929: \"$ac_compile\"") >&5
9930   (eval $ac_compile) 2>&5
9931   ac_status=$?
9932   echo "$as_me:9932: \$? = $ac_status" >&5
9933   (exit $ac_status); } &&
9934          { ac_try='test -s conftest.$ac_objext'
9935   { (eval echo "$as_me:9935: \"$ac_try\"") >&5
9936   (eval $ac_try) 2>&5
9937   ac_status=$?
9938   echo "$as_me:9938: \$? = $ac_status" >&5
9939   (exit $ac_status); }; }; then
9940   break
9941 else
9942   echo "$as_me: failed program was:" >&5
9943 cat conftest.$ac_ext >&5
9944 fi
9945 rm -f conftest.$ac_objext conftest.$ac_ext
9946   cat >conftest.$ac_ext <<_ACEOF
9947 #line 9947 "configure"
9948 #include "confdefs.h"
9949 #define _LARGEFILE_SOURCE 1
9950 #include <stdio.h>
9951 int
9952 main ()
9953 {
9954 return !fseeko;
9955   ;
9956   return 0;
9957 }
9958 _ACEOF
9959 rm -f conftest.$ac_objext
9960 if { (eval echo "$as_me:9960: \"$ac_compile\"") >&5
9961   (eval $ac_compile) 2>&5
9962   ac_status=$?
9963   echo "$as_me:9963: \$? = $ac_status" >&5
9964   (exit $ac_status); } &&
9965          { ac_try='test -s conftest.$ac_objext'
9966   { (eval echo "$as_me:9966: \"$ac_try\"") >&5
9967   (eval $ac_try) 2>&5
9968   ac_status=$?
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit $ac_status); }; }; then
9971   ac_cv_sys_largefile_source=1; break
9972 else
9973   echo "$as_me: failed program was:" >&5
9974 cat conftest.$ac_ext >&5
9975 fi
9976 rm -f conftest.$ac_objext conftest.$ac_ext
9977   break
9978 done
9979 fi
9980 echo "$as_me:9980: result: $ac_cv_sys_largefile_source" >&5
9981 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9982 if test "$ac_cv_sys_largefile_source" != no; then
9983
9984 cat >>confdefs.h <<EOF
9985 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9986 EOF
9987
9988 fi
9989 rm -rf conftest*
9990
9991 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9992 # in glibc 2.1.3, but that breaks too many other things.
9993 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9994 echo "$as_me:9994: checking for fseeko" >&5
9995 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9996 if test "${ac_cv_func_fseeko+set}" = set; then
9997   echo $ECHO_N "(cached) $ECHO_C" >&6
9998 else
9999   cat >conftest.$ac_ext <<_ACEOF
10000 #line 10000 "configure"
10001 #include "confdefs.h"
10002 #include <stdio.h>
10003 int
10004 main ()
10005 {
10006 return fseeko && fseeko (stdin, 0, 0);
10007   ;
10008   return 0;
10009 }
10010 _ACEOF
10011 rm -f conftest.$ac_objext conftest$ac_exeext
10012 if { (eval echo "$as_me:10012: \"$ac_link\"") >&5
10013   (eval $ac_link) 2>&5
10014   ac_status=$?
10015   echo "$as_me:10015: \$? = $ac_status" >&5
10016   (exit $ac_status); } &&
10017          { ac_try='test -s conftest$ac_exeext'
10018   { (eval echo "$as_me:10018: \"$ac_try\"") >&5
10019   (eval $ac_try) 2>&5
10020   ac_status=$?
10021   echo "$as_me:10021: \$? = $ac_status" >&5
10022   (exit $ac_status); }; }; then
10023   ac_cv_func_fseeko=yes
10024 else
10025   echo "$as_me: failed program was:" >&5
10026 cat conftest.$ac_ext >&5
10027 ac_cv_func_fseeko=no
10028 fi
10029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10030 fi
10031 echo "$as_me:10031: result: $ac_cv_func_fseeko" >&5
10032 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10033 if test $ac_cv_func_fseeko = yes; then
10034
10035 cat >>confdefs.h <<\EOF
10036 #define HAVE_FSEEKO 1
10037 EOF
10038
10039 fi
10040
10041         # Normally we would collect these definitions in the config.h,
10042         # but (like _XOPEN_SOURCE), some environments rely on having these
10043         # defined before any of the system headers are included.  Another
10044         # case comes up with C++, e.g., on AIX the compiler compiles the
10045         # header files by themselves before looking at the body files it is
10046         # told to compile.  For ncurses, those header files do not include
10047         # the config.h
10048         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10049         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10050         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10051
10052         echo "$as_me:10052: checking whether to use struct dirent64" >&5
10053 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10054 if test "${cf_cv_struct_dirent64+set}" = set; then
10055   echo $ECHO_N "(cached) $ECHO_C" >&6
10056 else
10057
10058                 cat >conftest.$ac_ext <<_ACEOF
10059 #line 10059 "configure"
10060 #include "confdefs.h"
10061
10062 #include <sys/types.h>
10063 #include <dirent.h>
10064
10065 int
10066 main ()
10067 {
10068
10069                 /* if transitional largefile support is setup, this is true */
10070                 extern struct dirent64 * readdir(DIR *);
10071                 struct dirent64 *x = readdir((DIR *)0);
10072                 struct dirent *y = readdir((DIR *)0);
10073                 int z = x - y;
10074
10075   ;
10076   return 0;
10077 }
10078 _ACEOF
10079 rm -f conftest.$ac_objext
10080 if { (eval echo "$as_me:10080: \"$ac_compile\"") >&5
10081   (eval $ac_compile) 2>&5
10082   ac_status=$?
10083   echo "$as_me:10083: \$? = $ac_status" >&5
10084   (exit $ac_status); } &&
10085          { ac_try='test -s conftest.$ac_objext'
10086   { (eval echo "$as_me:10086: \"$ac_try\"") >&5
10087   (eval $ac_try) 2>&5
10088   ac_status=$?
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); }; }; then
10091   cf_cv_struct_dirent64=yes
10092 else
10093   echo "$as_me: failed program was:" >&5
10094 cat conftest.$ac_ext >&5
10095 cf_cv_struct_dirent64=no
10096 fi
10097 rm -f conftest.$ac_objext conftest.$ac_ext
10098
10099 fi
10100 echo "$as_me:10100: result: $cf_cv_struct_dirent64" >&5
10101 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10102         test "$cf_cv_struct_dirent64" = yes &&
10103 cat >>confdefs.h <<\EOF
10104 #define HAVE_STRUCT_DIRENT64 1
10105 EOF
10106
10107     fi
10108
10109 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10110 echo "$as_me:10110: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10111 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10112
10113 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10114 if test "${enable_tparm_varargs+set}" = set; then
10115   enableval="$enable_tparm_varargs"
10116   with_tparm_varargs=$enableval
10117 else
10118   with_tparm_varargs=yes
10119 fi;
10120 echo "$as_me:10120: result: $with_tparm_varargs" >&5
10121 echo "${ECHO_T}$with_tparm_varargs" >&6
10122 NCURSES_TPARM_VARARGS=0
10123 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10124
10125 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10126 if test "$with_ticlib" != no ; then
10127 echo "$as_me:10127: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10128 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10129
10130 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10131 if test "${enable_tic_depends+set}" = set; then
10132   enableval="$enable_tic_depends"
10133   with_tic_depends=$enableval
10134 else
10135   with_tic_depends=yes
10136 fi;
10137 echo "$as_me:10137: result: $with_tic_depends" >&5
10138 echo "${ECHO_T}$with_tic_depends" >&6
10139 else
10140         with_tic_depends=no
10141 fi
10142
10143 ###   use option --with-bool to override bool's type
10144 echo "$as_me:10144: checking for type of bool" >&5
10145 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10146
10147 # Check whether --with-bool or --without-bool was given.
10148 if test "${with_bool+set}" = set; then
10149   withval="$with_bool"
10150   NCURSES_BOOL="$withval"
10151 else
10152   NCURSES_BOOL=auto
10153 fi;
10154 echo "$as_me:10154: result: $NCURSES_BOOL" >&5
10155 echo "${ECHO_T}$NCURSES_BOOL" >&6
10156
10157 echo "$as_me:10157: checking for alternate terminal capabilities file" >&5
10158 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10159
10160 # Check whether --with-caps or --without-caps was given.
10161 if test "${with_caps+set}" = set; then
10162   withval="$with_caps"
10163   TERMINFO_CAPS=Caps.$withval
10164 else
10165   TERMINFO_CAPS=Caps
10166 fi;
10167 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10168 echo "$as_me:10168: result: $TERMINFO_CAPS" >&5
10169 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10170
10171 ###   use option --with-chtype to override chtype's type
10172 echo "$as_me:10172: checking for type of chtype" >&5
10173 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10174
10175 # Check whether --with-chtype or --without-chtype was given.
10176 if test "${with_chtype+set}" = set; then
10177   withval="$with_chtype"
10178   NCURSES_CHTYPE="$withval"
10179 else
10180   NCURSES_CHTYPE=auto
10181 fi;
10182 echo "$as_me:10182: result: $NCURSES_CHTYPE" >&5
10183 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10184
10185 ###   use option --with-ospeed to override ospeed's type
10186 echo "$as_me:10186: checking for type of ospeed" >&5
10187 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10188
10189 # Check whether --with-ospeed or --without-ospeed was given.
10190 if test "${with_ospeed+set}" = set; then
10191   withval="$with_ospeed"
10192   NCURSES_OSPEED="$withval"
10193 else
10194   NCURSES_OSPEED=short
10195 fi;
10196 echo "$as_me:10196: result: $NCURSES_OSPEED" >&5
10197 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10198
10199 ###   use option --with-mmask-t to override mmask_t's type
10200 echo "$as_me:10200: checking for type of mmask_t" >&5
10201 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10202
10203 # Check whether --with-mmask-t or --without-mmask-t was given.
10204 if test "${with_mmask_t+set}" = set; then
10205   withval="$with_mmask_t"
10206   NCURSES_MMASK_T="$withval"
10207 else
10208   NCURSES_MMASK_T=auto
10209 fi;
10210 echo "$as_me:10210: result: $NCURSES_MMASK_T" >&5
10211 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10212
10213 ###   use option --with-ccharw-max to override CCHARW_MAX size
10214 echo "$as_me:10214: checking for size CCHARW_MAX" >&5
10215 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10216
10217 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10218 if test "${with_ccharw_max+set}" = set; then
10219   withval="$with_ccharw_max"
10220   NCURSES_CCHARW_MAX="$withval"
10221 else
10222   NCURSES_CCHARW_MAX=5
10223 fi;
10224 echo "$as_me:10224: result: $NCURSES_CCHARW_MAX" >&5
10225 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10226
10227 ###   use option --with-tparm-arg to override tparm's argument type
10228 echo "$as_me:10228: checking for type of tparm args" >&5
10229 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10230
10231 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10232 if test "${with_tparm_arg+set}" = set; then
10233   withval="$with_tparm_arg"
10234   NCURSES_TPARM_ARG="$withval"
10235 else
10236   NCURSES_TPARM_ARG=long
10237 fi;
10238 echo "$as_me:10238: result: $NCURSES_TPARM_ARG" >&5
10239 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10240
10241 ### Enable compiling-in rcs id's
10242 echo "$as_me:10242: checking if RCS identifiers should be compiled-in" >&5
10243 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10244
10245 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10246 if test "${with_rcs_ids+set}" = set; then
10247   withval="$with_rcs_ids"
10248   with_rcs_ids=$withval
10249 else
10250   with_rcs_ids=no
10251 fi;
10252 echo "$as_me:10252: result: $with_rcs_ids" >&5
10253 echo "${ECHO_T}$with_rcs_ids" >&6
10254 test "x$with_rcs_ids" = xyes &&
10255 cat >>confdefs.h <<\EOF
10256 #define USE_RCS_IDS 1
10257 EOF
10258
10259 ###############################################################################
10260
10261 echo "$as_me:10261: checking format of man-pages" >&5
10262 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10263
10264 # Check whether --with-manpage-format or --without-manpage-format was given.
10265 if test "${with_manpage_format+set}" = set; then
10266   withval="$with_manpage_format"
10267   MANPAGE_FORMAT=$withval
10268 else
10269   MANPAGE_FORMAT=unknown
10270 fi;
10271
10272 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10273 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10274
10275 cf_unknown=
10276
10277 case $MANPAGE_FORMAT in
10278 unknown)
10279   if test -z "$MANPATH" ; then
10280     MANPATH="/usr/man:/usr/share/man"
10281   fi
10282
10283   # look for the 'date' man-page (it's most likely to be installed!)
10284   MANPAGE_FORMAT=
10285   cf_preform=no
10286   cf_catonly=yes
10287   cf_example=date
10288
10289   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10290   for cf_dir in $MANPATH; do
10291     test -z "$cf_dir" && cf_dir=/usr/man
10292     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
10293     do
10294       cf_test=`echo $cf_name | sed -e 's/*//'`
10295       if test "x$cf_test" = "x$cf_name" ; then
10296
10297         case "$cf_name" in
10298         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10299         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10300         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10301         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10302         esac
10303
10304         case "$cf_name" in
10305         $cf_dir/man*)
10306           cf_catonly=no
10307           ;;
10308         $cf_dir/cat*)
10309           cf_preform=yes
10310           ;;
10311         esac
10312         break
10313       fi
10314
10315       # if we found a match in either man* or cat*, stop looking
10316       if test -n "$MANPAGE_FORMAT" ; then
10317         cf_found=no
10318         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10319         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10320         case "$cf_name" in
10321         $cf_dir/cat*)
10322           cf_found=yes
10323           ;;
10324         esac
10325         test $cf_found=yes && break
10326       fi
10327     done
10328     # only check the first directory in $MANPATH where we find manpages
10329     if test -n "$MANPAGE_FORMAT" ; then
10330        break
10331     fi
10332   done
10333   # if we did not find the example, just assume it is normal
10334   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10335   IFS="$ac_save_ifs"
10336   ;;
10337 *)
10338   for cf_option in $MANPAGE_FORMAT; do
10339      case $cf_option in #(vi
10340      gzip|compress|BSDI|normal|formatted|catonly)
10341        ;;
10342      *)
10343        cf_unknown="$cf_unknown $cf_option"
10344        ;;
10345      esac
10346   done
10347   ;;
10348 esac
10349
10350 echo "$as_me:10350: result: $MANPAGE_FORMAT" >&5
10351 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10352 if test -n "$cf_unknown" ; then
10353   { echo "$as_me:10353: WARNING: Unexpected manpage-format $cf_unknown" >&5
10354 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10355 fi
10356
10357 echo "$as_me:10357: checking for manpage renaming" >&5
10358 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10359
10360 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10361 if test "${with_manpage_renames+set}" = set; then
10362   withval="$with_manpage_renames"
10363   MANPAGE_RENAMES=$withval
10364 else
10365   MANPAGE_RENAMES=yes
10366 fi;
10367
10368 case ".$MANPAGE_RENAMES" in #(vi
10369 .no) #(vi
10370   ;;
10371 .|.yes)
10372   # Debian 'man' program?
10373   if test -f /etc/debian_version ; then
10374     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10375   else
10376     MANPAGE_RENAMES=no
10377   fi
10378   ;;
10379 esac
10380
10381 if test "$MANPAGE_RENAMES" != no ; then
10382   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10383     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10384   elif test ! -f $MANPAGE_RENAMES ; then
10385     { { echo "$as_me:10385: error: not a filename: $MANPAGE_RENAMES" >&5
10386 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10387    { (exit 1); exit 1; }; }
10388   fi
10389
10390   test ! -d man && mkdir man
10391
10392   # Construct a sed-script to perform renaming within man-pages
10393   if test -n "$MANPAGE_RENAMES" ; then
10394     test ! -d man && mkdir man
10395     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10396   fi
10397 fi
10398
10399 echo "$as_me:10399: result: $MANPAGE_RENAMES" >&5
10400 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10401
10402 echo "$as_me:10402: checking if manpage aliases will be installed" >&5
10403 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10404
10405 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10406 if test "${with_manpage_aliases+set}" = set; then
10407   withval="$with_manpage_aliases"
10408   MANPAGE_ALIASES=$withval
10409 else
10410   MANPAGE_ALIASES=yes
10411 fi;
10412
10413 echo "$as_me:10413: result: $MANPAGE_ALIASES" >&5
10414 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10415
10416 case "x$LN_S" in #(vi
10417 xln*) #(vi
10418         cf_use_symlinks=yes
10419         ;;
10420 *)
10421         cf_use_symlinks=no
10422         ;;
10423 esac
10424
10425 MANPAGE_SYMLINKS=no
10426 if test "$MANPAGE_ALIASES" = yes ; then
10427 echo "$as_me:10427: checking if manpage symlinks should be used" >&5
10428 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10429
10430 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10431 if test "${with_manpage_symlinks+set}" = set; then
10432   withval="$with_manpage_symlinks"
10433   MANPAGE_SYMLINKS=$withval
10434 else
10435   MANPAGE_SYMLINKS=$cf_use_symlinks
10436 fi;
10437
10438 if test "$$cf_use_symlinks" = no; then
10439 if test "$MANPAGE_SYMLINKS" = yes ; then
10440         { echo "$as_me:10440: WARNING: cannot make symlinks" >&5
10441 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10442         MANPAGE_SYMLINKS=no
10443 fi
10444 fi
10445
10446 echo "$as_me:10446: result: $MANPAGE_SYMLINKS" >&5
10447 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10448 fi
10449
10450 echo "$as_me:10450: checking for manpage tbl" >&5
10451 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10452
10453 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10454 if test "${with_manpage_tbl+set}" = set; then
10455   withval="$with_manpage_tbl"
10456   MANPAGE_TBL=$withval
10457 else
10458   MANPAGE_TBL=no
10459 fi;
10460
10461 echo "$as_me:10461: result: $MANPAGE_TBL" >&5
10462 echo "${ECHO_T}$MANPAGE_TBL" >&6
10463
10464   if test "$prefix" = "NONE" ; then
10465      cf_prefix="$ac_default_prefix"
10466   else
10467      cf_prefix="$prefix"
10468   fi
10469
10470   case "$MANPAGE_FORMAT" in # (vi
10471   *catonly*) # (vi
10472     cf_format=yes
10473     cf_inboth=no
10474     ;;
10475   *formatted*) # (vi
10476     cf_format=yes
10477     cf_inboth=yes
10478     ;;
10479   *)
10480     cf_format=no
10481     cf_inboth=no
10482     ;;
10483   esac
10484
10485 test ! -d man && mkdir man
10486
10487 cf_so_strip=
10488 cf_compress=
10489 case "$MANPAGE_FORMAT" in #(vi
10490 *compress*) #(vi
10491         cf_so_strip="Z"
10492         cf_compress=compress
10493   ;;
10494 *gzip*)
10495         cf_so_strip="gz"
10496         cf_compress=gzip
10497   ;;
10498 esac
10499
10500 cf_edit_man=./edit_man.sh
10501 cf_man_alias=`pwd`/man_alias.sed
10502
10503 cat >$cf_edit_man <<CF_EOF
10504 #! /bin/sh
10505 # this script is generated by the configure-script CF_MAN_PAGES macro.
10506
10507 prefix="$cf_prefix"
10508 datarootdir="$datarootdir"
10509 datadir="$datadir"
10510
10511 NCURSES_MAJOR="$NCURSES_MAJOR"
10512 NCURSES_MINOR="$NCURSES_MINOR"
10513 NCURSES_PATCH="$NCURSES_PATCH"
10514
10515 NCURSES_OSPEED="$NCURSES_OSPEED"
10516 TERMINFO="$TERMINFO"
10517
10518 INSTALL="$INSTALL"
10519 INSTALL_DATA="$INSTALL_DATA"
10520
10521 transform="$program_transform_name"
10522
10523 TMP=\${TMPDIR:=/tmp}/man\$\$
10524 trap "rm -f \$TMP" 0 1 2 5 15
10525
10526 form=\$1
10527 shift || exit 1
10528
10529 verb=\$1
10530 shift || exit 1
10531
10532 mandir=\$1
10533 shift || exit 1
10534
10535 srcdir=\$1
10536 top_srcdir=\$srcdir/..
10537 shift || exit 1
10538
10539 if test "\$form" = normal ; then
10540         if test "$cf_format" = yes ; then
10541         if test "$cf_inboth" = no ; then
10542                 sh \$0 format \$verb \$mandir \$srcdir \$*
10543                 exit $?
10544         fi
10545         fi
10546         cf_subdir=\$mandir/man
10547         cf_tables=$MANPAGE_TBL
10548 else
10549         cf_subdir=\$mandir/cat
10550         cf_tables=yes
10551 fi
10552
10553 # process the list of source-files
10554 for i in \$* ; do
10555 case \$i in #(vi
10556 *.orig|*.rej) ;; #(vi
10557 *.[0-9]*)
10558         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10559         if test \$verb = installing ; then
10560         if test ! -d \$cf_subdir\${section} ; then
10561                 mkdir -p \$cf_subdir\$section
10562         fi
10563         fi
10564
10565         # replace variables in man page
10566         if test ! -f $cf_man_alias ; then
10567 cat >>$cf_man_alias <<-CF_EOF2
10568                 s,@DATADIR@,\$datadir,g
10569                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10570                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10571                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10572                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10573                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10574                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10575 CF_EOF
10576
10577         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10578         do
10579                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10580                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10581 cat >>$cf_edit_man <<-CF_EOF
10582                 s,@$cf_NAME@,$cf_name,g
10583 CF_EOF
10584         done
10585
10586 cat >>$cf_edit_man <<CF_EOF
10587 CF_EOF2
10588                 echo "...made $cf_man_alias"
10589         fi
10590
10591         aliases=
10592         cf_source=\`basename \$i\`
10593         inalias=\$cf_source
10594         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10595         if test ! -f \$inalias ; then
10596                 echo .. skipped \$cf_source
10597                 continue
10598         fi
10599 CF_EOF
10600
10601 if test "$MANPAGE_ALIASES" != no ; then
10602 cat >>$cf_edit_man <<CF_EOF
10603         nCurses=ignore.3x
10604         test $with_curses_h = yes && nCurses=ncurses.3x
10605         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10606 CF_EOF
10607 fi
10608
10609 if test "$MANPAGE_RENAMES" = no ; then
10610 cat >>$cf_edit_man <<CF_EOF
10611         # perform program transformations for section 1 man pages
10612         if test \$section = 1 ; then
10613                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10614         else
10615                 cf_target=\$cf_subdir\${section}/\$cf_source
10616         fi
10617 CF_EOF
10618 else
10619 cat >>$cf_edit_man <<CF_EOF
10620         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10621         if test -z "\$cf_target" ; then
10622                 echo '? missing rename for '\$cf_source
10623                 cf_target="\$cf_source"
10624         fi
10625         cf_target="\$cf_subdir\${section}/\${cf_target}"
10626
10627 CF_EOF
10628 fi
10629
10630 cat >>$cf_edit_man <<CF_EOF
10631         sed     -f $cf_man_alias \\
10632 CF_EOF
10633
10634 if test -f $MANPAGE_RENAMES ; then
10635 cat >>$cf_edit_man <<CF_EOF
10636                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10637 CF_EOF
10638 else
10639 cat >>$cf_edit_man <<CF_EOF
10640                 < \$i >\$TMP
10641 CF_EOF
10642 fi
10643
10644 cat >>$cf_edit_man <<CF_EOF
10645 if test \$cf_tables = yes ; then
10646         tbl \$TMP >\$TMP.out
10647         mv \$TMP.out \$TMP
10648 fi
10649 CF_EOF
10650
10651 if test $with_overwrite != yes ; then
10652 cat >>$cf_edit_man <<CF_EOF
10653         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10654         mv \$TMP.out \$TMP
10655 CF_EOF
10656 fi
10657
10658 if test $with_curses_h != yes ; then
10659 cat >>$cf_edit_man <<CF_EOF
10660         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10661         mv \$TMP.out \$TMP
10662 CF_EOF
10663 fi
10664
10665 cat >>$cf_edit_man <<CF_EOF
10666         if test \$form = format ; then
10667                 nroff -man \$TMP >\$TMP.out
10668                 mv \$TMP.out \$TMP
10669         fi
10670 CF_EOF
10671
10672 if test -n "$cf_compress" ; then
10673 cat >>$cf_edit_man <<CF_EOF
10674         if test \$verb = installing ; then
10675         if ( $cf_compress -f \$TMP )
10676         then
10677                 mv \$TMP.$cf_so_strip \$TMP
10678         fi
10679         fi
10680         cf_target="\$cf_target.$cf_so_strip"
10681 CF_EOF
10682 fi
10683
10684 case "$MANPAGE_FORMAT" in #(vi
10685 *BSDI*)
10686 cat >>$cf_edit_man <<CF_EOF
10687         if test \$form = format ; then
10688                 # BSDI installs only .0 suffixes in the cat directories
10689                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10690         fi
10691 CF_EOF
10692   ;;
10693 esac
10694
10695 cat >>$cf_edit_man <<CF_EOF
10696         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10697         if test \$verb = installing ; then
10698                 echo \$verb \$cf_target
10699                 \$INSTALL_DATA \$TMP \$cf_target
10700                 test -d \$cf_subdir\${section} &&
10701                 test -n "\$aliases" && (
10702                         cd \$cf_subdir\${section} && (
10703                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10704                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10705                                 cf_target=\`basename \$cf_target\`
10706                                 for cf_alias in \$aliases
10707                                 do
10708                                         if test \$section = 1 ; then
10709                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10710                                         fi
10711
10712                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10713                                                 if test -f \$cf_alias\${suffix} ; then
10714                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10715                                                         then
10716                                                                 continue
10717                                                         fi
10718                                                 fi
10719                                                 echo .. \$verb alias \$cf_alias\${suffix}
10720 CF_EOF
10721 case "x$LN_S" in #(vi
10722 *-f) #(vi
10723 cat >>$cf_edit_man <<CF_EOF
10724                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10725 CF_EOF
10726         ;;
10727 *)
10728 cat >>$cf_edit_man <<CF_EOF
10729                                                 rm -f \$cf_alias\${suffix}
10730                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10731 CF_EOF
10732         ;;
10733 esac
10734 cat >>$cf_edit_man <<CF_EOF
10735                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10736                                                 echo ".so \$cf_source" >\$TMP
10737 CF_EOF
10738 if test -n "$cf_compress" ; then
10739 cat >>$cf_edit_man <<CF_EOF
10740                                                 if test -n "$cf_so_strip" ; then
10741                                                         $cf_compress -f \$TMP
10742                                                         mv \$TMP.$cf_so_strip \$TMP
10743                                                 fi
10744 CF_EOF
10745 fi
10746 cat >>$cf_edit_man <<CF_EOF
10747                                                 echo .. \$verb alias \$cf_alias\${suffix}
10748                                                 rm -f \$cf_alias\${suffix}
10749                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10750                                         fi
10751                                 done
10752                         )
10753                 )
10754         elif test \$verb = removing ; then
10755                 test -f \$cf_target && (
10756                         echo \$verb \$cf_target
10757                         rm -f \$cf_target
10758                 )
10759                 test -d \$cf_subdir\${section} &&
10760                 test -n "\$aliases" && (
10761                         cd \$cf_subdir\${section} && (
10762                                 for cf_alias in \$aliases
10763                                 do
10764                                         if test \$section = 1 ; then
10765                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10766                                         fi
10767
10768                                         echo .. \$verb alias \$cf_alias\${suffix}
10769                                         rm -f \$cf_alias\${suffix}
10770                                 done
10771                         )
10772                 )
10773         else
10774 #               echo ".hy 0"
10775                 cat \$TMP
10776         fi
10777         ;;
10778 esac
10779 done
10780
10781 if test $cf_inboth = yes ; then
10782 if test \$form != format ; then
10783         sh \$0 format \$verb \$mandir \$srcdir \$*
10784 fi
10785 fi
10786
10787 exit 0
10788 CF_EOF
10789 chmod 755 $cf_edit_man
10790
10791 ###############################################################################
10792
10793 ### Note that some functions (such as const) are normally disabled anyway.
10794 echo "$as_me:10794: checking if you want to build with function extensions" >&5
10795 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10796
10797 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10798 if test "${enable_ext_funcs+set}" = set; then
10799   enableval="$enable_ext_funcs"
10800   with_ext_funcs=$enableval
10801 else
10802   with_ext_funcs=yes
10803 fi;
10804 echo "$as_me:10804: result: $with_ext_funcs" >&5
10805 echo "${ECHO_T}$with_ext_funcs" >&6
10806 if test "x$with_ext_funcs" = xyes ; then
10807         NCURSES_EXT_FUNCS=1
10808
10809 cat >>confdefs.h <<\EOF
10810 #define HAVE_ASSUME_DEFAULT_COLORS 1
10811 EOF
10812
10813 cat >>confdefs.h <<\EOF
10814 #define HAVE_CURSES_VERSION 1
10815 EOF
10816
10817 cat >>confdefs.h <<\EOF
10818 #define HAVE_HAS_KEY 1
10819 EOF
10820
10821 cat >>confdefs.h <<\EOF
10822 #define HAVE_RESIZETERM 1
10823 EOF
10824
10825 cat >>confdefs.h <<\EOF
10826 #define HAVE_RESIZE_TERM 1
10827 EOF
10828
10829 cat >>confdefs.h <<\EOF
10830 #define HAVE_TERM_ENTRY_H 1
10831 EOF
10832
10833 cat >>confdefs.h <<\EOF
10834 #define HAVE_USE_DEFAULT_COLORS 1
10835 EOF
10836
10837 cat >>confdefs.h <<\EOF
10838 #define HAVE_USE_SCREEN 1
10839 EOF
10840
10841 cat >>confdefs.h <<\EOF
10842 #define HAVE_USE_WINDOW 1
10843 EOF
10844
10845 cat >>confdefs.h <<\EOF
10846 #define HAVE_WRESIZE 1
10847 EOF
10848
10849 cat >>confdefs.h <<\EOF
10850 #define NCURSES_EXT_FUNCS 1
10851 EOF
10852
10853         GENERATED_EXT_FUNCS=generated
10854 else
10855         NCURSES_EXT_FUNCS=0
10856         GENERATED_EXT_FUNCS=
10857 fi
10858
10859 echo "$as_me:10859: checking if you want to build with experimental SCREEN extensions" >&5
10860 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10861
10862 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10863 if test "${enable_sp_funcs+set}" = set; then
10864   enableval="$enable_sp_funcs"
10865   with_sp_funcs=$enableval
10866 else
10867   with_sp_funcs=no
10868 fi;
10869 echo "$as_me:10869: result: $with_sp_funcs" >&5
10870 echo "${ECHO_T}$with_sp_funcs" >&6
10871 if test "x$with_sp_funcs" = xyes ; then
10872         NCURSES_SP_FUNCS=1
10873
10874 cat >>confdefs.h <<\EOF
10875 #define NCURSES_SP_FUNCS 1
10876 EOF
10877
10878         GENERATED_SP_FUNCS=generated
10879 else
10880         NCURSES_SP_FUNCS=0
10881         GENERATED_SP_FUNCS=
10882 fi
10883
10884 echo "$as_me:10884: checking if you want to build with experimental terminal-driver" >&5
10885 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10886
10887 # Check whether --enable-term-driver or --disable-term-driver was given.
10888 if test "${enable_term_driver+set}" = set; then
10889   enableval="$enable_term_driver"
10890   with_term_driver=$enableval
10891 else
10892   with_term_driver=no
10893 fi;
10894 echo "$as_me:10894: result: $with_term_driver" >&5
10895 echo "${ECHO_T}$with_term_driver" >&6
10896 if test "x$with_term_driver" = xyes ; then
10897
10898 cat >>confdefs.h <<\EOF
10899 #define USE_TERM_DRIVER 1
10900 EOF
10901
10902         if test "x$with_sp_funcs" != xyes ; then
10903                 { { echo "$as_me:10903: error: The term-driver option relies upon sp-funcs" >&5
10904 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10905    { (exit 1); exit 1; }; }
10906         fi
10907 fi
10908
10909 ###   use option --enable-const to turn on use of const beyond that in XSI.
10910 echo "$as_me:10910: checking for extended use of const keyword" >&5
10911 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10912
10913 # Check whether --enable-const or --disable-const was given.
10914 if test "${enable_const+set}" = set; then
10915   enableval="$enable_const"
10916   with_ext_const=$enableval
10917 else
10918   with_ext_const=no
10919 fi;
10920 echo "$as_me:10920: result: $with_ext_const" >&5
10921 echo "${ECHO_T}$with_ext_const" >&6
10922 NCURSES_CONST='/*nothing*/'
10923 if test "x$with_ext_const" = xyes ; then
10924         NCURSES_CONST=const
10925 fi
10926
10927 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10928 echo "$as_me:10928: checking if you want to use extended colors" >&5
10929 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10930
10931 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10932 if test "${enable_ext_colors+set}" = set; then
10933   enableval="$enable_ext_colors"
10934   with_ext_colors=$enableval
10935 else
10936   with_ext_colors=no
10937 fi;
10938 echo "$as_me:10938: result: $with_ext_colors" >&5
10939 echo "${ECHO_T}$with_ext_colors" >&6
10940 NCURSES_EXT_COLORS=0
10941 if test "x$with_ext_colors" = xyes ; then
10942         if test "x$with_widec" != xyes ; then
10943                 { { echo "$as_me:10943: error: This option applies only to wide-character library" >&5
10944 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10945    { (exit 1); exit 1; }; }
10946         else
10947                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10948
10949 if test "${with_abi_version+set}" != set; then
10950         case $cf_cv_rel_version in
10951         5.*)
10952                 cf_cv_rel_version=6.0
10953                 cf_cv_abi_version=6
10954                 { echo "$as_me:10954: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10955 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10956                 ;;
10957         esac
10958 fi
10959
10960         fi
10961         NCURSES_EXT_COLORS=1
10962
10963 cat >>confdefs.h <<\EOF
10964 #define NCURSES_EXT_COLORS 1
10965 EOF
10966
10967 fi
10968
10969 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10970 echo "$as_me:10970: checking if you want to use extended mouse encoding" >&5
10971 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10972
10973 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10974 if test "${enable_ext_mouse+set}" = set; then
10975   enableval="$enable_ext_mouse"
10976   with_ext_mouse=$enableval
10977 else
10978   with_ext_mouse=no
10979 fi;
10980 echo "$as_me:10980: result: $with_ext_mouse" >&5
10981 echo "${ECHO_T}$with_ext_mouse" >&6
10982 NCURSES_MOUSE_VERSION=1
10983 if test "x$with_ext_mouse" = xyes ; then
10984         NCURSES_MOUSE_VERSION=2
10985
10986 if test "${with_abi_version+set}" != set; then
10987         case $cf_cv_rel_version in
10988         5.*)
10989                 cf_cv_rel_version=6.0
10990                 cf_cv_abi_version=6
10991                 { echo "$as_me:10991: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10992 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10993                 ;;
10994         esac
10995 fi
10996
10997 fi
10998
10999 echo "$as_me:10999: checking if you want \$NCURSES_NO_PADDING code" >&5
11000 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11001
11002 # Check whether --enable-no-padding or --disable-no-padding was given.
11003 if test "${enable_no_padding+set}" = set; then
11004   enableval="$enable_no_padding"
11005   with_no_padding=$enableval
11006 else
11007   with_no_padding=$with_ext_funcs
11008 fi;
11009 echo "$as_me:11009: result: $with_no_padding" >&5
11010 echo "${ECHO_T}$with_no_padding" >&6
11011 test "x$with_no_padding" = xyes &&
11012 cat >>confdefs.h <<\EOF
11013 #define NCURSES_NO_PADDING 1
11014 EOF
11015
11016 echo "$as_me:11016: checking for ANSI C header files" >&5
11017 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11018 if test "${ac_cv_header_stdc+set}" = set; then
11019   echo $ECHO_N "(cached) $ECHO_C" >&6
11020 else
11021   cat >conftest.$ac_ext <<_ACEOF
11022 #line 11022 "configure"
11023 #include "confdefs.h"
11024 #include <stdlib.h>
11025 #include <stdarg.h>
11026 #include <string.h>
11027 #include <float.h>
11028
11029 _ACEOF
11030 if { (eval echo "$as_me:11030: \"$ac_cpp conftest.$ac_ext\"") >&5
11031   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11032   ac_status=$?
11033   egrep -v '^ *\+' conftest.er1 >conftest.err
11034   rm -f conftest.er1
11035   cat conftest.err >&5
11036   echo "$as_me:11036: \$? = $ac_status" >&5
11037   (exit $ac_status); } >/dev/null; then
11038   if test -s conftest.err; then
11039     ac_cpp_err=$ac_c_preproc_warn_flag
11040   else
11041     ac_cpp_err=
11042   fi
11043 else
11044   ac_cpp_err=yes
11045 fi
11046 if test -z "$ac_cpp_err"; then
11047   ac_cv_header_stdc=yes
11048 else
11049   echo "$as_me: failed program was:" >&5
11050   cat conftest.$ac_ext >&5
11051   ac_cv_header_stdc=no
11052 fi
11053 rm -f conftest.err conftest.$ac_ext
11054
11055 if test $ac_cv_header_stdc = yes; then
11056   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11057   cat >conftest.$ac_ext <<_ACEOF
11058 #line 11058 "configure"
11059 #include "confdefs.h"
11060 #include <string.h>
11061
11062 _ACEOF
11063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11064   egrep "memchr" >/dev/null 2>&1; then
11065   :
11066 else
11067   ac_cv_header_stdc=no
11068 fi
11069 rm -rf conftest*
11070
11071 fi
11072
11073 if test $ac_cv_header_stdc = yes; then
11074   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11075   cat >conftest.$ac_ext <<_ACEOF
11076 #line 11076 "configure"
11077 #include "confdefs.h"
11078 #include <stdlib.h>
11079
11080 _ACEOF
11081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11082   egrep "free" >/dev/null 2>&1; then
11083   :
11084 else
11085   ac_cv_header_stdc=no
11086 fi
11087 rm -rf conftest*
11088
11089 fi
11090
11091 if test $ac_cv_header_stdc = yes; then
11092   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11093   if test "$cross_compiling" = yes; then
11094   :
11095 else
11096   cat >conftest.$ac_ext <<_ACEOF
11097 #line 11097 "configure"
11098 #include "confdefs.h"
11099 #include <ctype.h>
11100 #if ((' ' & 0x0FF) == 0x020)
11101 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11102 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11103 #else
11104 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11105                      || ('j' <= (c) && (c) <= 'r') \
11106                      || ('s' <= (c) && (c) <= 'z'))
11107 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11108 #endif
11109
11110 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11111 int
11112 main ()
11113 {
11114   int i;
11115   for (i = 0; i < 256; i++)
11116     if (XOR (islower (i), ISLOWER (i))
11117         || toupper (i) != TOUPPER (i))
11118       $ac_main_return(2);
11119   $ac_main_return (0);
11120 }
11121 _ACEOF
11122 rm -f conftest$ac_exeext
11123 if { (eval echo "$as_me:11123: \"$ac_link\"") >&5
11124   (eval $ac_link) 2>&5
11125   ac_status=$?
11126   echo "$as_me:11126: \$? = $ac_status" >&5
11127   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11128   { (eval echo "$as_me:11128: \"$ac_try\"") >&5
11129   (eval $ac_try) 2>&5
11130   ac_status=$?
11131   echo "$as_me:11131: \$? = $ac_status" >&5
11132   (exit $ac_status); }; }; then
11133   :
11134 else
11135   echo "$as_me: program exited with status $ac_status" >&5
11136 echo "$as_me: failed program was:" >&5
11137 cat conftest.$ac_ext >&5
11138 ac_cv_header_stdc=no
11139 fi
11140 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11141 fi
11142 fi
11143 fi
11144 echo "$as_me:11144: result: $ac_cv_header_stdc" >&5
11145 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11146 if test $ac_cv_header_stdc = yes; then
11147
11148 cat >>confdefs.h <<\EOF
11149 #define STDC_HEADERS 1
11150 EOF
11151
11152 fi
11153
11154 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11155
11156 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11157                   inttypes.h stdint.h unistd.h
11158 do
11159 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11160 echo "$as_me:11160: checking for $ac_header" >&5
11161 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11162 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11163   echo $ECHO_N "(cached) $ECHO_C" >&6
11164 else
11165   cat >conftest.$ac_ext <<_ACEOF
11166 #line 11166 "configure"
11167 #include "confdefs.h"
11168 $ac_includes_default
11169 #include <$ac_header>
11170 _ACEOF
11171 rm -f conftest.$ac_objext
11172 if { (eval echo "$as_me:11172: \"$ac_compile\"") >&5
11173   (eval $ac_compile) 2>&5
11174   ac_status=$?
11175   echo "$as_me:11175: \$? = $ac_status" >&5
11176   (exit $ac_status); } &&
11177          { ac_try='test -s conftest.$ac_objext'
11178   { (eval echo "$as_me:11178: \"$ac_try\"") >&5
11179   (eval $ac_try) 2>&5
11180   ac_status=$?
11181   echo "$as_me:11181: \$? = $ac_status" >&5
11182   (exit $ac_status); }; }; then
11183   eval "$as_ac_Header=yes"
11184 else
11185   echo "$as_me: failed program was:" >&5
11186 cat conftest.$ac_ext >&5
11187 eval "$as_ac_Header=no"
11188 fi
11189 rm -f conftest.$ac_objext conftest.$ac_ext
11190 fi
11191 echo "$as_me:11191: result: `eval echo '${'$as_ac_Header'}'`" >&5
11192 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11193 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11194   cat >>confdefs.h <<EOF
11195 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11196 EOF
11197
11198 fi
11199 done
11200
11201 echo "$as_me:11201: checking for signed char" >&5
11202 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11203 if test "${ac_cv_type_signed_char+set}" = set; then
11204   echo $ECHO_N "(cached) $ECHO_C" >&6
11205 else
11206   cat >conftest.$ac_ext <<_ACEOF
11207 #line 11207 "configure"
11208 #include "confdefs.h"
11209 $ac_includes_default
11210 int
11211 main ()
11212 {
11213 if ((signed char *) 0)
11214   return 0;
11215 if (sizeof (signed char))
11216   return 0;
11217   ;
11218   return 0;
11219 }
11220 _ACEOF
11221 rm -f conftest.$ac_objext
11222 if { (eval echo "$as_me:11222: \"$ac_compile\"") >&5
11223   (eval $ac_compile) 2>&5
11224   ac_status=$?
11225   echo "$as_me:11225: \$? = $ac_status" >&5
11226   (exit $ac_status); } &&
11227          { ac_try='test -s conftest.$ac_objext'
11228   { (eval echo "$as_me:11228: \"$ac_try\"") >&5
11229   (eval $ac_try) 2>&5
11230   ac_status=$?
11231   echo "$as_me:11231: \$? = $ac_status" >&5
11232   (exit $ac_status); }; }; then
11233   ac_cv_type_signed_char=yes
11234 else
11235   echo "$as_me: failed program was:" >&5
11236 cat conftest.$ac_ext >&5
11237 ac_cv_type_signed_char=no
11238 fi
11239 rm -f conftest.$ac_objext conftest.$ac_ext
11240 fi
11241 echo "$as_me:11241: result: $ac_cv_type_signed_char" >&5
11242 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11243
11244 echo "$as_me:11244: checking size of signed char" >&5
11245 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11246 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11247   echo $ECHO_N "(cached) $ECHO_C" >&6
11248 else
11249   if test "$ac_cv_type_signed_char" = yes; then
11250   if test "$cross_compiling" = yes; then
11251   # Depending upon the size, compute the lo and hi bounds.
11252 cat >conftest.$ac_ext <<_ACEOF
11253 #line 11253 "configure"
11254 #include "confdefs.h"
11255 $ac_includes_default
11256 int
11257 main ()
11258 {
11259 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11260   ;
11261   return 0;
11262 }
11263 _ACEOF
11264 rm -f conftest.$ac_objext
11265 if { (eval echo "$as_me:11265: \"$ac_compile\"") >&5
11266   (eval $ac_compile) 2>&5
11267   ac_status=$?
11268   echo "$as_me:11268: \$? = $ac_status" >&5
11269   (exit $ac_status); } &&
11270          { ac_try='test -s conftest.$ac_objext'
11271   { (eval echo "$as_me:11271: \"$ac_try\"") >&5
11272   (eval $ac_try) 2>&5
11273   ac_status=$?
11274   echo "$as_me:11274: \$? = $ac_status" >&5
11275   (exit $ac_status); }; }; then
11276   ac_lo=0 ac_mid=0
11277   while :; do
11278     cat >conftest.$ac_ext <<_ACEOF
11279 #line 11279 "configure"
11280 #include "confdefs.h"
11281 $ac_includes_default
11282 int
11283 main ()
11284 {
11285 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11286   ;
11287   return 0;
11288 }
11289 _ACEOF
11290 rm -f conftest.$ac_objext
11291 if { (eval echo "$as_me:11291: \"$ac_compile\"") >&5
11292   (eval $ac_compile) 2>&5
11293   ac_status=$?
11294   echo "$as_me:11294: \$? = $ac_status" >&5
11295   (exit $ac_status); } &&
11296          { ac_try='test -s conftest.$ac_objext'
11297   { (eval echo "$as_me:11297: \"$ac_try\"") >&5
11298   (eval $ac_try) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); }; }; then
11302   ac_hi=$ac_mid; break
11303 else
11304   echo "$as_me: failed program was:" >&5
11305 cat conftest.$ac_ext >&5
11306 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11307 fi
11308 rm -f conftest.$ac_objext conftest.$ac_ext
11309   done
11310 else
11311   echo "$as_me: failed program was:" >&5
11312 cat conftest.$ac_ext >&5
11313 ac_hi=-1 ac_mid=-1
11314   while :; do
11315     cat >conftest.$ac_ext <<_ACEOF
11316 #line 11316 "configure"
11317 #include "confdefs.h"
11318 $ac_includes_default
11319 int
11320 main ()
11321 {
11322 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11323   ;
11324   return 0;
11325 }
11326 _ACEOF
11327 rm -f conftest.$ac_objext
11328 if { (eval echo "$as_me:11328: \"$ac_compile\"") >&5
11329   (eval $ac_compile) 2>&5
11330   ac_status=$?
11331   echo "$as_me:11331: \$? = $ac_status" >&5
11332   (exit $ac_status); } &&
11333          { ac_try='test -s conftest.$ac_objext'
11334   { (eval echo "$as_me:11334: \"$ac_try\"") >&5
11335   (eval $ac_try) 2>&5
11336   ac_status=$?
11337   echo "$as_me:11337: \$? = $ac_status" >&5
11338   (exit $ac_status); }; }; then
11339   ac_lo=$ac_mid; break
11340 else
11341   echo "$as_me: failed program was:" >&5
11342 cat conftest.$ac_ext >&5
11343 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11344 fi
11345 rm -f conftest.$ac_objext conftest.$ac_ext
11346   done
11347 fi
11348 rm -f conftest.$ac_objext conftest.$ac_ext
11349 # Binary search between lo and hi bounds.
11350 while test "x$ac_lo" != "x$ac_hi"; do
11351   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11352   cat >conftest.$ac_ext <<_ACEOF
11353 #line 11353 "configure"
11354 #include "confdefs.h"
11355 $ac_includes_default
11356 int
11357 main ()
11358 {
11359 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11360   ;
11361   return 0;
11362 }
11363 _ACEOF
11364 rm -f conftest.$ac_objext
11365 if { (eval echo "$as_me:11365: \"$ac_compile\"") >&5
11366   (eval $ac_compile) 2>&5
11367   ac_status=$?
11368   echo "$as_me:11368: \$? = $ac_status" >&5
11369   (exit $ac_status); } &&
11370          { ac_try='test -s conftest.$ac_objext'
11371   { (eval echo "$as_me:11371: \"$ac_try\"") >&5
11372   (eval $ac_try) 2>&5
11373   ac_status=$?
11374   echo "$as_me:11374: \$? = $ac_status" >&5
11375   (exit $ac_status); }; }; then
11376   ac_hi=$ac_mid
11377 else
11378   echo "$as_me: failed program was:" >&5
11379 cat conftest.$ac_ext >&5
11380 ac_lo=`expr $ac_mid + 1`
11381 fi
11382 rm -f conftest.$ac_objext conftest.$ac_ext
11383 done
11384 ac_cv_sizeof_signed_char=$ac_lo
11385 else
11386   if test "$cross_compiling" = yes; then
11387   { { echo "$as_me:11387: error: cannot run test program while cross compiling" >&5
11388 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11389    { (exit 1); exit 1; }; }
11390 else
11391   cat >conftest.$ac_ext <<_ACEOF
11392 #line 11392 "configure"
11393 #include "confdefs.h"
11394 $ac_includes_default
11395 int
11396 main ()
11397 {
11398 FILE *f = fopen ("conftest.val", "w");
11399 if (!f)
11400   $ac_main_return (1);
11401 fprintf (f, "%d", (sizeof (signed char)));
11402 fclose (f);
11403   ;
11404   return 0;
11405 }
11406 _ACEOF
11407 rm -f conftest$ac_exeext
11408 if { (eval echo "$as_me:11408: \"$ac_link\"") >&5
11409   (eval $ac_link) 2>&5
11410   ac_status=$?
11411   echo "$as_me:11411: \$? = $ac_status" >&5
11412   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11413   { (eval echo "$as_me:11413: \"$ac_try\"") >&5
11414   (eval $ac_try) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); }; }; then
11418   ac_cv_sizeof_signed_char=`cat conftest.val`
11419 else
11420   echo "$as_me: program exited with status $ac_status" >&5
11421 echo "$as_me: failed program was:" >&5
11422 cat conftest.$ac_ext >&5
11423 fi
11424 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11425 fi
11426 fi
11427 rm -f conftest.val
11428 else
11429   ac_cv_sizeof_signed_char=0
11430 fi
11431 fi
11432 echo "$as_me:11432: result: $ac_cv_sizeof_signed_char" >&5
11433 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11434 cat >>confdefs.h <<EOF
11435 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11436 EOF
11437
11438 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11439         NCURSES_SBOOL="signed char"
11440 else
11441         NCURSES_SBOOL="char"
11442 fi
11443 echo "$as_me:11443: checking if you want to use signed Boolean array in term.h" >&5
11444 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11445
11446 # Check whether --enable-signed-char or --disable-signed-char was given.
11447 if test "${enable_signed_char+set}" = set; then
11448   enableval="$enable_signed_char"
11449   with_signed_char=$enableval
11450 else
11451   with_signed_char=no
11452 fi;
11453 echo "$as_me:11453: result: $with_signed_char" >&5
11454 echo "${ECHO_T}$with_signed_char" >&6
11455 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11456
11457 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11458 echo "$as_me:11458: checking if you want SIGWINCH handler" >&5
11459 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11460
11461 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11462 if test "${enable_sigwinch+set}" = set; then
11463   enableval="$enable_sigwinch"
11464   with_sigwinch=$enableval
11465 else
11466   with_sigwinch=$with_ext_funcs
11467 fi;
11468 echo "$as_me:11468: result: $with_sigwinch" >&5
11469 echo "${ECHO_T}$with_sigwinch" >&6
11470 test "x$with_sigwinch" = xyes &&
11471 cat >>confdefs.h <<\EOF
11472 #define USE_SIGWINCH 1
11473 EOF
11474
11475 ###   use option --enable-tcap-names to allow user to define new capabilities
11476 echo "$as_me:11476: checking if you want user-definable terminal capabilities like termcap" >&5
11477 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11478
11479 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11480 if test "${enable_tcap_names+set}" = set; then
11481   enableval="$enable_tcap_names"
11482   with_tcap_names=$enableval
11483 else
11484   with_tcap_names=$with_ext_funcs
11485 fi;
11486 echo "$as_me:11486: result: $with_tcap_names" >&5
11487 echo "${ECHO_T}$with_tcap_names" >&6
11488 NCURSES_XNAMES=0
11489 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11490
11491 ###############################################################################
11492 # These options are relatively safe to experiment with.
11493
11494 echo "$as_me:11494: checking if you want all development code" >&5
11495 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11496
11497 # Check whether --with-develop or --without-develop was given.
11498 if test "${with_develop+set}" = set; then
11499   withval="$with_develop"
11500   with_develop=$withval
11501 else
11502   with_develop=no
11503 fi;
11504 echo "$as_me:11504: result: $with_develop" >&5
11505 echo "${ECHO_T}$with_develop" >&6
11506
11507 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11508 echo "$as_me:11508: checking if you want hard-tabs code" >&5
11509 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11510
11511 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11512 if test "${enable_hard_tabs+set}" = set; then
11513   enableval="$enable_hard_tabs"
11514
11515 else
11516   enable_hard_tabs=$with_develop
11517 fi;
11518 echo "$as_me:11518: result: $enable_hard_tabs" >&5
11519 echo "${ECHO_T}$enable_hard_tabs" >&6
11520 test "x$enable_hard_tabs" = xyes &&
11521 cat >>confdefs.h <<\EOF
11522 #define USE_HARD_TABS 1
11523 EOF
11524
11525 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11526 echo "$as_me:11526: checking if you want limited support for xmc" >&5
11527 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11528
11529 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11530 if test "${enable_xmc_glitch+set}" = set; then
11531   enableval="$enable_xmc_glitch"
11532
11533 else
11534   enable_xmc_glitch=$with_develop
11535 fi;
11536 echo "$as_me:11536: result: $enable_xmc_glitch" >&5
11537 echo "${ECHO_T}$enable_xmc_glitch" >&6
11538 test "x$enable_xmc_glitch" = xyes &&
11539 cat >>confdefs.h <<\EOF
11540 #define USE_XMC_SUPPORT 1
11541 EOF
11542
11543 ###############################################################################
11544 # These are just experimental, probably should not be in a package:
11545
11546 echo "$as_me:11546: checking if you do not want to assume colors are white-on-black" >&5
11547 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11548
11549 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11550 if test "${enable_assumed_color+set}" = set; then
11551   enableval="$enable_assumed_color"
11552   with_assumed_color=$enableval
11553 else
11554   with_assumed_color=yes
11555 fi;
11556 echo "$as_me:11556: result: $with_assumed_color" >&5
11557 echo "${ECHO_T}$with_assumed_color" >&6
11558 test "x$with_assumed_color" = xyes &&
11559 cat >>confdefs.h <<\EOF
11560 #define USE_ASSUMED_COLOR 1
11561 EOF
11562
11563 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11564 echo "$as_me:11564: checking if you want hashmap scrolling-optimization code" >&5
11565 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11566
11567 # Check whether --enable-hashmap or --disable-hashmap was given.
11568 if test "${enable_hashmap+set}" = set; then
11569   enableval="$enable_hashmap"
11570   with_hashmap=$enableval
11571 else
11572   with_hashmap=yes
11573 fi;
11574 echo "$as_me:11574: result: $with_hashmap" >&5
11575 echo "${ECHO_T}$with_hashmap" >&6
11576 test "x$with_hashmap" = xyes &&
11577 cat >>confdefs.h <<\EOF
11578 #define USE_HASHMAP 1
11579 EOF
11580
11581 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11582 echo "$as_me:11582: checking if you want colorfgbg code" >&5
11583 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11584
11585 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11586 if test "${enable_colorfgbg+set}" = set; then
11587   enableval="$enable_colorfgbg"
11588   with_colorfgbg=$enableval
11589 else
11590   with_colorfgbg=no
11591 fi;
11592 echo "$as_me:11592: result: $with_colorfgbg" >&5
11593 echo "${ECHO_T}$with_colorfgbg" >&6
11594 test "x$with_colorfgbg" = xyes &&
11595 cat >>confdefs.h <<\EOF
11596 #define USE_COLORFGBG 1
11597 EOF
11598
11599 ###   use option --enable-interop to turn on use of bindings used for interop
11600 echo "$as_me:11600: checking if you want interop bindings" >&5
11601 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11602
11603 # Check whether --enable-interop or --disable-interop was given.
11604 if test "${enable_interop+set}" = set; then
11605   enableval="$enable_interop"
11606   with_exp_interop=$enableval
11607 else
11608   with_exp_interop=no
11609 fi;
11610 echo "$as_me:11610: result: $with_exp_interop" >&5
11611 echo "${ECHO_T}$with_exp_interop" >&6
11612
11613 NCURSES_INTEROP_FUNCS=0
11614 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11615
11616 # This is still experimental (20080329), but should ultimately be moved to
11617 # the script-block --with-normal, etc.
11618
11619 echo "$as_me:11619: checking if you want to link with the pthread library" >&5
11620 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11621
11622 # Check whether --with-pthread or --without-pthread was given.
11623 if test "${with_pthread+set}" = set; then
11624   withval="$with_pthread"
11625   with_pthread=$withval
11626 else
11627   with_pthread=no
11628 fi;
11629 echo "$as_me:11629: result: $with_pthread" >&5
11630 echo "${ECHO_T}$with_pthread" >&6
11631
11632 if test "$with_pthread" != no ; then
11633     echo "$as_me:11633: checking for pthread.h" >&5
11634 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11635 if test "${ac_cv_header_pthread_h+set}" = set; then
11636   echo $ECHO_N "(cached) $ECHO_C" >&6
11637 else
11638   cat >conftest.$ac_ext <<_ACEOF
11639 #line 11639 "configure"
11640 #include "confdefs.h"
11641 #include <pthread.h>
11642 _ACEOF
11643 if { (eval echo "$as_me:11643: \"$ac_cpp conftest.$ac_ext\"") >&5
11644   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11645   ac_status=$?
11646   egrep -v '^ *\+' conftest.er1 >conftest.err
11647   rm -f conftest.er1
11648   cat conftest.err >&5
11649   echo "$as_me:11649: \$? = $ac_status" >&5
11650   (exit $ac_status); } >/dev/null; then
11651   if test -s conftest.err; then
11652     ac_cpp_err=$ac_c_preproc_warn_flag
11653   else
11654     ac_cpp_err=
11655   fi
11656 else
11657   ac_cpp_err=yes
11658 fi
11659 if test -z "$ac_cpp_err"; then
11660   ac_cv_header_pthread_h=yes
11661 else
11662   echo "$as_me: failed program was:" >&5
11663   cat conftest.$ac_ext >&5
11664   ac_cv_header_pthread_h=no
11665 fi
11666 rm -f conftest.err conftest.$ac_ext
11667 fi
11668 echo "$as_me:11668: result: $ac_cv_header_pthread_h" >&5
11669 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11670 if test $ac_cv_header_pthread_h = yes; then
11671
11672 cat >>confdefs.h <<\EOF
11673 #define HAVE_PTHREADS_H 1
11674 EOF
11675
11676         for cf_lib_pthread in pthread c_r
11677         do
11678             echo "$as_me:11678: checking if we can link with the $cf_lib_pthread library" >&5
11679 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11680             cf_save_LIBS="$LIBS"
11681             LIBS="-l$cf_lib_pthread $LIBS"
11682             cat >conftest.$ac_ext <<_ACEOF
11683 #line 11683 "configure"
11684 #include "confdefs.h"
11685
11686 #include <pthread.h>
11687
11688 int
11689 main ()
11690 {
11691
11692                 int rc = pthread_create(0,0,0,0);
11693                 int r2 = pthread_mutexattr_settype(0, 0);
11694
11695   ;
11696   return 0;
11697 }
11698 _ACEOF
11699 rm -f conftest.$ac_objext conftest$ac_exeext
11700 if { (eval echo "$as_me:11700: \"$ac_link\"") >&5
11701   (eval $ac_link) 2>&5
11702   ac_status=$?
11703   echo "$as_me:11703: \$? = $ac_status" >&5
11704   (exit $ac_status); } &&
11705          { ac_try='test -s conftest$ac_exeext'
11706   { (eval echo "$as_me:11706: \"$ac_try\"") >&5
11707   (eval $ac_try) 2>&5
11708   ac_status=$?
11709   echo "$as_me:11709: \$? = $ac_status" >&5
11710   (exit $ac_status); }; }; then
11711   with_pthread=yes
11712 else
11713   echo "$as_me: failed program was:" >&5
11714 cat conftest.$ac_ext >&5
11715 with_pthread=no
11716 fi
11717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11718             LIBS="$cf_save_LIBS"
11719             echo "$as_me:11719: result: $with_pthread" >&5
11720 echo "${ECHO_T}$with_pthread" >&6
11721             test "$with_pthread" = yes && break
11722         done
11723
11724         if test "$with_pthread" = yes ; then
11725             LIBS="-l$cf_lib_pthread $LIBS"
11726
11727 cat >>confdefs.h <<\EOF
11728 #define HAVE_LIBPTHREADS 1
11729 EOF
11730
11731         else
11732             { { echo "$as_me:11732: error: Cannot link with pthread library" >&5
11733 echo "$as_me: error: Cannot link with pthread library" >&2;}
11734    { (exit 1); exit 1; }; }
11735         fi
11736
11737 fi
11738
11739 fi
11740
11741 if test "x$with_pthread" != xno; then
11742         echo "$as_me:11742: checking for pthread_kill" >&5
11743 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11744 if test "${ac_cv_func_pthread_kill+set}" = set; then
11745   echo $ECHO_N "(cached) $ECHO_C" >&6
11746 else
11747   cat >conftest.$ac_ext <<_ACEOF
11748 #line 11748 "configure"
11749 #include "confdefs.h"
11750 /* System header to define __stub macros and hopefully few prototypes,
11751     which can conflict with char pthread_kill (); below.  */
11752 #include <assert.h>
11753 /* Override any gcc2 internal prototype to avoid an error.  */
11754 #ifdef __cplusplus
11755 extern "C"
11756 #endif
11757 /* We use char because int might match the return type of a gcc2
11758    builtin and then its argument prototype would still apply.  */
11759 char pthread_kill ();
11760 char (*f) ();
11761
11762 int
11763 main ()
11764 {
11765 /* The GNU C library defines this for functions which it implements
11766     to always fail with ENOSYS.  Some functions are actually named
11767     something starting with __ and the normal name is an alias.  */
11768 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11769 choke me
11770 #else
11771 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11772 #endif
11773
11774   ;
11775   return 0;
11776 }
11777 _ACEOF
11778 rm -f conftest.$ac_objext conftest$ac_exeext
11779 if { (eval echo "$as_me:11779: \"$ac_link\"") >&5
11780   (eval $ac_link) 2>&5
11781   ac_status=$?
11782   echo "$as_me:11782: \$? = $ac_status" >&5
11783   (exit $ac_status); } &&
11784          { ac_try='test -s conftest$ac_exeext'
11785   { (eval echo "$as_me:11785: \"$ac_try\"") >&5
11786   (eval $ac_try) 2>&5
11787   ac_status=$?
11788   echo "$as_me:11788: \$? = $ac_status" >&5
11789   (exit $ac_status); }; }; then
11790   ac_cv_func_pthread_kill=yes
11791 else
11792   echo "$as_me: failed program was:" >&5
11793 cat conftest.$ac_ext >&5
11794 ac_cv_func_pthread_kill=no
11795 fi
11796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11797 fi
11798 echo "$as_me:11798: result: $ac_cv_func_pthread_kill" >&5
11799 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11800 if test $ac_cv_func_pthread_kill = yes; then
11801
11802                 echo "$as_me:11802: checking if you want to allow EINTR in wgetch with pthreads" >&5
11803 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11804
11805 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11806 if test "${enable_pthreads_eintr+set}" = set; then
11807   enableval="$enable_pthreads_eintr"
11808   use_pthreads_eintr=$enableval
11809 else
11810   use_pthreads_eintr=no
11811 fi;
11812                 echo "$as_me:11812: result: $use_pthreads_eintr" >&5
11813 echo "${ECHO_T}$use_pthreads_eintr" >&6
11814                 if test "x$use_pthreads_eintr" = xyes ; then
11815
11816 cat >>confdefs.h <<\EOF
11817 #define USE_PTHREADS_EINTR 1
11818 EOF
11819
11820                 fi
11821 fi
11822
11823         echo "$as_me:11823: checking if you want to use weak-symbols for pthreads" >&5
11824 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11825
11826 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11827 if test "${enable_weak_symbols+set}" = set; then
11828   enableval="$enable_weak_symbols"
11829   use_weak_symbols=$enableval
11830 else
11831   use_weak_symbols=no
11832 fi;
11833         echo "$as_me:11833: result: $use_weak_symbols" >&5
11834 echo "${ECHO_T}$use_weak_symbols" >&6
11835         if test "x$use_weak_symbols" = xyes ; then
11836
11837 echo "$as_me:11837: checking if $CC supports weak symbols" >&5
11838 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11839 if test "${cf_cv_weak_symbols+set}" = set; then
11840   echo $ECHO_N "(cached) $ECHO_C" >&6
11841 else
11842
11843 cat >conftest.$ac_ext <<_ACEOF
11844 #line 11844 "configure"
11845 #include "confdefs.h"
11846
11847 #include <stdio.h>
11848 int
11849 main ()
11850 {
11851
11852 #if defined(__GNUC__)
11853 #  if defined __USE_ISOC99
11854 #    define _cat_pragma(exp)    _Pragma(#exp)
11855 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11856 #  else
11857 #    define _weak_pragma(exp)
11858 #  endif
11859 #  define _declare(name)        __extension__ extern __typeof__(name) name
11860 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11861 #endif
11862
11863 weak_symbol(fopen);
11864
11865   ;
11866   return 0;
11867 }
11868 _ACEOF
11869 rm -f conftest.$ac_objext
11870 if { (eval echo "$as_me:11870: \"$ac_compile\"") >&5
11871   (eval $ac_compile) 2>&5
11872   ac_status=$?
11873   echo "$as_me:11873: \$? = $ac_status" >&5
11874   (exit $ac_status); } &&
11875          { ac_try='test -s conftest.$ac_objext'
11876   { (eval echo "$as_me:11876: \"$ac_try\"") >&5
11877   (eval $ac_try) 2>&5
11878   ac_status=$?
11879   echo "$as_me:11879: \$? = $ac_status" >&5
11880   (exit $ac_status); }; }; then
11881   cf_cv_weak_symbols=yes
11882 else
11883   echo "$as_me: failed program was:" >&5
11884 cat conftest.$ac_ext >&5
11885 cf_cv_weak_symbols=no
11886 fi
11887 rm -f conftest.$ac_objext conftest.$ac_ext
11888
11889 fi
11890 echo "$as_me:11890: result: $cf_cv_weak_symbols" >&5
11891 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11892
11893         else
11894                 cf_cv_weak_symbols=no
11895         fi
11896
11897         if test "x$cf_cv_weak_symbols" = xyes ; then
11898
11899 cat >>confdefs.h <<\EOF
11900 #define USE_WEAK_SYMBOLS 1
11901 EOF
11902
11903         fi
11904 fi
11905
11906 PTHREAD=
11907 if test "x$with_pthread" = "xyes" ; then
11908
11909 cat >>confdefs.h <<\EOF
11910 #define USE_PTHREADS 1
11911 EOF
11912
11913     enable_reentrant=yes
11914     if test "x$cf_cv_weak_symbols" = xyes ; then
11915         PTHREAD=-lpthread
11916     fi
11917 fi
11918
11919 # Reentrant code has to be opaque; there's little advantage to making ncurses
11920 # opaque outside of that, so there is no --enable-opaque option.  We can use
11921 # this option without --with-pthreads, but this will be always set for
11922 # pthreads.
11923 echo "$as_me:11923: checking if you want experimental reentrant code" >&5
11924 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11925
11926 # Check whether --enable-reentrant or --disable-reentrant was given.
11927 if test "${enable_reentrant+set}" = set; then
11928   enableval="$enable_reentrant"
11929   with_reentrant=$enableval
11930 else
11931   with_reentrant=no
11932 fi;
11933 echo "$as_me:11933: result: $with_reentrant" >&5
11934 echo "${ECHO_T}$with_reentrant" >&6
11935 if test "x$with_reentrant" = xyes ; then
11936         cf_cv_enable_reentrant=1
11937         cf_cv_enable_opaque="NCURSES_INTERNALS"
11938         NCURSES_OPAQUE=1
11939         NCURSES_SIZE_T=int
11940         if test "x$cf_cv_weak_symbols" = xyes ; then
11941
11942 # remove pthread library from $LIBS
11943 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11944
11945                 TEST_LIBS="-lpthread $TEST_LIBS"
11946                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11947         else
11948                 LIB_SUFFIX="t${LIB_SUFFIX}"
11949         fi
11950
11951 cat >>confdefs.h <<\EOF
11952 #define USE_REENTRANT 1
11953 EOF
11954
11955 if test "${with_abi_version+set}" != set; then
11956         case $cf_cv_rel_version in
11957         5.*)
11958                 cf_cv_rel_version=6.0
11959                 cf_cv_abi_version=6
11960                 { echo "$as_me:11960: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11961 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11962                 ;;
11963         esac
11964 fi
11965
11966 else
11967         cf_cv_enable_reentrant=0
11968         cf_cv_enable_opaque="NCURSES_OPAQUE"
11969         NCURSES_OPAQUE=0
11970         NCURSES_SIZE_T=short
11971 fi
11972
11973 ### Allow using a different wrap-prefix
11974 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11975         echo "$as_me:11975: checking for prefix used to wrap public variables" >&5
11976 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11977
11978 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11979 if test "${with_wrap_prefix+set}" = set; then
11980   withval="$with_wrap_prefix"
11981   NCURSES_WRAP_PREFIX=$withval
11982 else
11983   NCURSES_WRAP_PREFIX=_nc_
11984 fi;
11985         echo "$as_me:11985: result: $NCURSES_WRAP_PREFIX" >&5
11986 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11987 else
11988         NCURSES_WRAP_PREFIX=_nc_
11989 fi
11990
11991 cat >>confdefs.h <<EOF
11992 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11993 EOF
11994
11995 echo "$as_me:11995: checking if you want experimental safe-sprintf code" >&5
11996 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11997
11998 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11999 if test "${enable_safe_sprintf+set}" = set; then
12000   enableval="$enable_safe_sprintf"
12001   with_safe_sprintf=$enableval
12002 else
12003   with_safe_sprintf=no
12004 fi;
12005 echo "$as_me:12005: result: $with_safe_sprintf" >&5
12006 echo "${ECHO_T}$with_safe_sprintf" >&6
12007 test "x$with_safe_sprintf" = xyes &&
12008 cat >>confdefs.h <<\EOF
12009 #define USE_SAFE_SPRINTF 1
12010 EOF
12011
12012 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12013 # when hashmap is used scroll hints are useless
12014 if test "$with_hashmap" = no ; then
12015 echo "$as_me:12015: checking if you want to experiment without scrolling-hints code" >&5
12016 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12017
12018 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12019 if test "${enable_scroll_hints+set}" = set; then
12020   enableval="$enable_scroll_hints"
12021   with_scroll_hints=$enableval
12022 else
12023   with_scroll_hints=yes
12024 fi;
12025 echo "$as_me:12025: result: $with_scroll_hints" >&5
12026 echo "${ECHO_T}$with_scroll_hints" >&6
12027 test "x$with_scroll_hints" = xyes &&
12028 cat >>confdefs.h <<\EOF
12029 #define USE_SCROLL_HINTS 1
12030 EOF
12031
12032 fi
12033
12034 echo "$as_me:12034: checking if you want experimental wgetch-events code" >&5
12035 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12036
12037 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12038 if test "${enable_wgetch_events+set}" = set; then
12039   enableval="$enable_wgetch_events"
12040   with_wgetch_events=$enableval
12041 else
12042   with_wgetch_events=no
12043 fi;
12044 echo "$as_me:12044: result: $with_wgetch_events" >&5
12045 echo "${ECHO_T}$with_wgetch_events" >&6
12046 test "x$with_wgetch_events" = xyes &&
12047 cat >>confdefs.h <<\EOF
12048 #define NCURSES_WGETCH_EVENTS 1
12049 EOF
12050
12051 ###############################################################################
12052
12053 ###     use option --disable-echo to suppress full display compiling commands
12054
12055 echo "$as_me:12055: checking if you want to see long compiling messages" >&5
12056 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12057
12058 # Check whether --enable-echo or --disable-echo was given.
12059 if test "${enable_echo+set}" = set; then
12060   enableval="$enable_echo"
12061   test "$enableval" != no && enableval=yes
12062   if test "$enableval" != "yes" ; then
12063
12064     ECHO_LT='--silent'
12065     ECHO_LD='@echo linking $@;'
12066     RULE_CC='@echo compiling $<'
12067     SHOW_CC='@echo compiling $@'
12068     ECHO_CC='@'
12069
12070   else
12071
12072     ECHO_LT=''
12073     ECHO_LD=''
12074     RULE_CC=''
12075     SHOW_CC=''
12076     ECHO_CC=''
12077
12078   fi
12079 else
12080   enableval=yes
12081
12082     ECHO_LT=''
12083     ECHO_LD=''
12084     RULE_CC=''
12085     SHOW_CC=''
12086     ECHO_CC=''
12087
12088 fi;
12089 echo "$as_me:12089: result: $enableval" >&5
12090 echo "${ECHO_T}$enableval" >&6
12091
12092 if test "x$enable_echo" = xyes; then
12093         ECHO_LINK=
12094 else
12095         ECHO_LINK='@ echo linking $@ ... ;'
12096         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12097         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12098 fi
12099
12100 ###     use option --enable-warnings to turn on all gcc warnings
12101 echo "$as_me:12101: checking if you want to see compiler warnings" >&5
12102 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12103
12104 # Check whether --enable-warnings or --disable-warnings was given.
12105 if test "${enable_warnings+set}" = set; then
12106   enableval="$enable_warnings"
12107   with_warnings=$enableval
12108 fi;
12109 echo "$as_me:12109: result: $with_warnings" >&5
12110 echo "${ECHO_T}$with_warnings" >&6
12111
12112 if test "x$with_warnings" = "xyes"; then
12113
12114         ADAFLAGS="$ADAFLAGS -gnatg"
12115
12116 INTEL_COMPILER=no
12117
12118 if test "$GCC" = yes ; then
12119         case $host_os in
12120         linux*|gnu*)
12121                 echo "$as_me:12121: checking if this is really Intel C compiler" >&5
12122 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12123                 cf_save_CFLAGS="$CFLAGS"
12124                 CFLAGS="$CFLAGS -no-gcc"
12125                 cat >conftest.$ac_ext <<_ACEOF
12126 #line 12126 "configure"
12127 #include "confdefs.h"
12128
12129 int
12130 main ()
12131 {
12132
12133 #ifdef __INTEL_COMPILER
12134 #else
12135 make an error
12136 #endif
12137
12138   ;
12139   return 0;
12140 }
12141 _ACEOF
12142 rm -f conftest.$ac_objext
12143 if { (eval echo "$as_me:12143: \"$ac_compile\"") >&5
12144   (eval $ac_compile) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit $ac_status); } &&
12148          { ac_try='test -s conftest.$ac_objext'
12149   { (eval echo "$as_me:12149: \"$ac_try\"") >&5
12150   (eval $ac_try) 2>&5
12151   ac_status=$?
12152   echo "$as_me:12152: \$? = $ac_status" >&5
12153   (exit $ac_status); }; }; then
12154   INTEL_COMPILER=yes
12155 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12156
12157 else
12158   echo "$as_me: failed program was:" >&5
12159 cat conftest.$ac_ext >&5
12160 fi
12161 rm -f conftest.$ac_objext conftest.$ac_ext
12162                 CFLAGS="$cf_save_CFLAGS"
12163                 echo "$as_me:12163: result: $INTEL_COMPILER" >&5
12164 echo "${ECHO_T}$INTEL_COMPILER" >&6
12165                 ;;
12166         esac
12167 fi
12168
12169 CLANG_COMPILER=no
12170
12171 if test "$GCC" = yes ; then
12172         echo "$as_me:12172: checking if this is really Clang C compiler" >&5
12173 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12174         cf_save_CFLAGS="$CFLAGS"
12175         CFLAGS="$CFLAGS -Qunused-arguments"
12176         cat >conftest.$ac_ext <<_ACEOF
12177 #line 12177 "configure"
12178 #include "confdefs.h"
12179
12180 int
12181 main ()
12182 {
12183
12184 #ifdef __clang__
12185 #else
12186 make an error
12187 #endif
12188
12189   ;
12190   return 0;
12191 }
12192 _ACEOF
12193 rm -f conftest.$ac_objext
12194 if { (eval echo "$as_me:12194: \"$ac_compile\"") >&5
12195   (eval $ac_compile) 2>&5
12196   ac_status=$?
12197   echo "$as_me:12197: \$? = $ac_status" >&5
12198   (exit $ac_status); } &&
12199          { ac_try='test -s conftest.$ac_objext'
12200   { (eval echo "$as_me:12200: \"$ac_try\"") >&5
12201   (eval $ac_try) 2>&5
12202   ac_status=$?
12203   echo "$as_me:12203: \$? = $ac_status" >&5
12204   (exit $ac_status); }; }; then
12205   CLANG_COMPILER=yes
12206 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12207
12208 else
12209   echo "$as_me: failed program was:" >&5
12210 cat conftest.$ac_ext >&5
12211 fi
12212 rm -f conftest.$ac_objext conftest.$ac_ext
12213         CFLAGS="$cf_save_CFLAGS"
12214         echo "$as_me:12214: result: $CLANG_COMPILER" >&5
12215 echo "${ECHO_T}$CLANG_COMPILER" >&6
12216 fi
12217
12218 cat > conftest.$ac_ext <<EOF
12219 #line 12219 "${as_me:-configure}"
12220 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12221 EOF
12222
12223 if test "$INTEL_COMPILER" = yes
12224 then
12225 # The "-wdXXX" options suppress warnings:
12226 # remark #1419: external declaration in primary source file
12227 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12228 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12229 # remark #193: zero used for undefined preprocessing identifier
12230 # remark #593: variable "curs_sb_left_arrow" was set but never used
12231 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12232 # remark #869: parameter "tw" was never referenced
12233 # remark #981: operands are evaluated in unspecified order
12234 # warning #279: controlling expression is constant
12235
12236         { echo "$as_me:12236: checking for $CC warning options..." >&5
12237 echo "$as_me: checking for $CC warning options..." >&6;}
12238         cf_save_CFLAGS="$CFLAGS"
12239         EXTRA_CFLAGS="-Wall"
12240         for cf_opt in \
12241                 wd1419 \
12242                 wd1683 \
12243                 wd1684 \
12244                 wd193 \
12245                 wd593 \
12246                 wd279 \
12247                 wd810 \
12248                 wd869 \
12249                 wd981
12250         do
12251                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12252                 if { (eval echo "$as_me:12252: \"$ac_compile\"") >&5
12253   (eval $ac_compile) 2>&5
12254   ac_status=$?
12255   echo "$as_me:12255: \$? = $ac_status" >&5
12256   (exit $ac_status); }; then
12257                         test -n "$verbose" && echo "$as_me:12257: result: ... -$cf_opt" >&5
12258 echo "${ECHO_T}... -$cf_opt" >&6
12259                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12260                 fi
12261         done
12262         CFLAGS="$cf_save_CFLAGS"
12263
12264 elif test "$GCC" = yes
12265 then
12266         { echo "$as_me:12266: checking for $CC warning options..." >&5
12267 echo "$as_me: checking for $CC warning options..." >&6;}
12268         cf_save_CFLAGS="$CFLAGS"
12269         EXTRA_CFLAGS=
12270         cf_warn_CONST=""
12271         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12272         for cf_opt in W Wall \
12273                 Wbad-function-cast \
12274                 Wcast-align \
12275                 Wcast-qual \
12276                 Winline \
12277                 Wmissing-declarations \
12278                 Wmissing-prototypes \
12279                 Wnested-externs \
12280                 Wpointer-arith \
12281                 Wshadow \
12282                 Wstrict-prototypes \
12283                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12284         do
12285                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12286                 if { (eval echo "$as_me:12286: \"$ac_compile\"") >&5
12287   (eval $ac_compile) 2>&5
12288   ac_status=$?
12289   echo "$as_me:12289: \$? = $ac_status" >&5
12290   (exit $ac_status); }; then
12291                         test -n "$verbose" && echo "$as_me:12291: result: ... -$cf_opt" >&5
12292 echo "${ECHO_T}... -$cf_opt" >&6
12293                         case $cf_opt in #(vi
12294                         Wcast-qual) #(vi
12295                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12296                                 ;;
12297                         Winline) #(vi
12298                                 case $GCC_VERSION in
12299                                 [34].*)
12300                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12301
12302 echo "${as_me:-configure}:12302: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12303
12304                                         continue;;
12305                                 esac
12306                                 ;;
12307                         Wpointer-arith) #(vi
12308                                 case $GCC_VERSION in
12309                                 [12].*)
12310                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12311
12312 echo "${as_me:-configure}:12312: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12313
12314                                         continue;;
12315                                 esac
12316                                 ;;
12317                         esac
12318                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12319                 fi
12320         done
12321         CFLAGS="$cf_save_CFLAGS"
12322 fi
12323 rm -rf conftest*
12324
12325         if test "x$cf_with_cxx" = xyes ; then
12326
12327 INTEL_CPLUSPLUS=no
12328
12329 if test "$GCC" = yes ; then
12330         case $host_os in
12331         linux*|gnu*)
12332                 echo "$as_me:12332: checking if this is really Intel C++ compiler" >&5
12333 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12334                 cf_save_CFLAGS="$CXXFLAGS"
12335                 CXXFLAGS="$CXXFLAGS -no-gcc"
12336                 cat >conftest.$ac_ext <<_ACEOF
12337 #line 12337 "configure"
12338 #include "confdefs.h"
12339
12340 int
12341 main ()
12342 {
12343
12344 #ifdef __INTEL_COMPILER
12345 #else
12346 make an error
12347 #endif
12348
12349   ;
12350   return 0;
12351 }
12352 _ACEOF
12353 rm -f conftest.$ac_objext
12354 if { (eval echo "$as_me:12354: \"$ac_compile\"") >&5
12355   (eval $ac_compile) 2>&5
12356   ac_status=$?
12357   echo "$as_me:12357: \$? = $ac_status" >&5
12358   (exit $ac_status); } &&
12359          { ac_try='test -s conftest.$ac_objext'
12360   { (eval echo "$as_me:12360: \"$ac_try\"") >&5
12361   (eval $ac_try) 2>&5
12362   ac_status=$?
12363   echo "$as_me:12363: \$? = $ac_status" >&5
12364   (exit $ac_status); }; }; then
12365   INTEL_CPLUSPLUS=yes
12366 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12367
12368 else
12369   echo "$as_me: failed program was:" >&5
12370 cat conftest.$ac_ext >&5
12371 fi
12372 rm -f conftest.$ac_objext conftest.$ac_ext
12373                 CXXFLAGS="$cf_save_CFLAGS"
12374                 echo "$as_me:12374: result: $INTEL_CPLUSPLUS" >&5
12375 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12376                 ;;
12377         esac
12378 fi
12379
12380 CLANG_CPLUSPLUS=no
12381
12382 if test "$GCC" = yes ; then
12383         echo "$as_me:12383: checking if this is really Clang C++ compiler" >&5
12384 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12385         cf_save_CFLAGS="$CXXFLAGS"
12386         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12387         cat >conftest.$ac_ext <<_ACEOF
12388 #line 12388 "configure"
12389 #include "confdefs.h"
12390
12391 int
12392 main ()
12393 {
12394
12395 #ifdef __clang__
12396 #else
12397 make an error
12398 #endif
12399
12400   ;
12401   return 0;
12402 }
12403 _ACEOF
12404 rm -f conftest.$ac_objext
12405 if { (eval echo "$as_me:12405: \"$ac_compile\"") >&5
12406   (eval $ac_compile) 2>&5
12407   ac_status=$?
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit $ac_status); } &&
12410          { ac_try='test -s conftest.$ac_objext'
12411   { (eval echo "$as_me:12411: \"$ac_try\"") >&5
12412   (eval $ac_try) 2>&5
12413   ac_status=$?
12414   echo "$as_me:12414: \$? = $ac_status" >&5
12415   (exit $ac_status); }; }; then
12416   CLANG_CPLUSPLUS=yes
12417 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12418
12419 else
12420   echo "$as_me: failed program was:" >&5
12421 cat conftest.$ac_ext >&5
12422 fi
12423 rm -f conftest.$ac_objext conftest.$ac_ext
12424         CXXFLAGS="$cf_save_CFLAGS"
12425         echo "$as_me:12425: result: $CLANG_CPLUSPLUS" >&5
12426 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12427 fi
12428
12429 ac_ext=cc
12430 ac_cpp='$CXXCPP $CPPFLAGS'
12431 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12432 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12433 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12434 ac_main_return=return
12435
12436 cat > conftest.$ac_ext <<EOF
12437 #line 12437 "configure"
12438 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12439 EOF
12440
12441 if test "$INTEL_CPLUSPLUS" = yes
12442 then
12443 # The "-wdXXX" options suppress warnings:
12444 # remark #1419: external declaration in primary source file
12445 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12446 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12447 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12448 # remark #193: zero used for undefined preprocessing identifier
12449 # remark #593: variable "curs_sb_left_arrow" was set but never used
12450 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12451 # remark #869: parameter "tw" was never referenced
12452 # remark #981: operands are evaluated in unspecified order
12453 # warning #269: invalid format string conversion
12454
12455         { echo "$as_me:12455: checking for $CC warning options..." >&5
12456 echo "$as_me: checking for $CC warning options..." >&6;}
12457         cf_save_CXXFLAGS="$CXXFLAGS"
12458         EXTRA_CXXFLAGS="-Wall"
12459         for cf_opt in \
12460                 wd1419 \
12461                 wd1682 \
12462                 wd1683 \
12463                 wd1684 \
12464                 wd193 \
12465                 wd279 \
12466                 wd593 \
12467                 wd810 \
12468                 wd869 \
12469                 wd981
12470         do
12471                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12472                 if { (eval echo "$as_me:12472: \"$ac_compile\"") >&5
12473   (eval $ac_compile) 2>&5
12474   ac_status=$?
12475   echo "$as_me:12475: \$? = $ac_status" >&5
12476   (exit $ac_status); }; then
12477                         test -n "$verbose" && echo "$as_me:12477: result: ... -$cf_opt" >&5
12478 echo "${ECHO_T}... -$cf_opt" >&6
12479                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12480                 fi
12481         done
12482         CXXFLAGS="$cf_save_CXXFLAGS"
12483
12484 elif test "$GXX" = yes
12485 then
12486         { echo "$as_me:12486: checking for $CXX warning options..." >&5
12487 echo "$as_me: checking for $CXX warning options..." >&6;}
12488         cf_save_CXXFLAGS="$CXXFLAGS"
12489         EXTRA_CXXFLAGS="-W -Wall"
12490         cf_gxx_extra_warnings=""
12491         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12492         case "$GCC_VERSION" in
12493         [1-2].*)
12494                 ;;
12495         *)
12496                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12497                 ;;
12498         esac
12499         for cf_opt in \
12500                 Wabi \
12501                 fabi-version=0 \
12502                 Woverloaded-virtual \
12503                 Wsign-promo \
12504                 Wsynth \
12505                 Wold-style-cast \
12506                 Wcast-align \
12507                 Wcast-qual \
12508                 Wmissing-prototypes \
12509                 Wpointer-arith \
12510                 Wshadow \
12511                 Wstrict-prototypes \
12512                 Wundef $cf_gxx_extra_warnings Wno-unused
12513         do
12514                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12515                 if { (eval echo "$as_me:12515: \"$ac_compile\"") >&5
12516   (eval $ac_compile) 2>&5
12517   ac_status=$?
12518   echo "$as_me:12518: \$? = $ac_status" >&5
12519   (exit $ac_status); }; then
12520                         test -n "$verbose" && echo "$as_me:12520: result: ... -$cf_opt" >&5
12521 echo "${ECHO_T}... -$cf_opt" >&6
12522                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12523                 else
12524                         test -n "$verbose" && echo "$as_me:12524: result: ... no -$cf_opt" >&5
12525 echo "${ECHO_T}... no -$cf_opt" >&6
12526                 fi
12527         done
12528         CXXFLAGS="$cf_save_CXXFLAGS"
12529 fi
12530
12531 rm -rf conftest*
12532 ac_ext=c
12533 ac_cpp='$CPP $CPPFLAGS'
12534 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12535 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12537 ac_main_return=return
12538
12539         fi
12540 fi
12541
12542 if test "$GCC" = yes
12543 then
12544 cat > conftest.i <<EOF
12545 #ifndef GCC_PRINTF
12546 #define GCC_PRINTF 0
12547 #endif
12548 #ifndef GCC_SCANF
12549 #define GCC_SCANF 0
12550 #endif
12551 #ifndef GCC_NORETURN
12552 #define GCC_NORETURN /* nothing */
12553 #endif
12554 #ifndef GCC_UNUSED
12555 #define GCC_UNUSED /* nothing */
12556 #endif
12557 EOF
12558 if test "$GCC" = yes
12559 then
12560         { echo "$as_me:12560: checking for $CC __attribute__ directives..." >&5
12561 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12562 cat > conftest.$ac_ext <<EOF
12563 #line 12563 "${as_me:-configure}"
12564 #include "confdefs.h"
12565 #include "conftest.h"
12566 #include "conftest.i"
12567 #if     GCC_PRINTF
12568 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12569 #else
12570 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12571 #endif
12572 #if     GCC_SCANF
12573 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12574 #else
12575 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12576 #endif
12577 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12578 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12579 extern void foo(void) GCC_NORETURN;
12580 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12581 EOF
12582         cf_printf_attribute=no
12583         cf_scanf_attribute=no
12584         for cf_attribute in scanf printf unused noreturn
12585         do
12586
12587 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12588
12589                 cf_directive="__attribute__(($cf_attribute))"
12590                 echo "checking for $CC $cf_directive" 1>&5
12591
12592                 case $cf_attribute in #(vi
12593                 printf) #(vi
12594                         cf_printf_attribute=yes
12595                         cat >conftest.h <<EOF
12596 #define GCC_$cf_ATTRIBUTE 1
12597 EOF
12598                         ;;
12599                 scanf) #(vi
12600                         cf_scanf_attribute=yes
12601                         cat >conftest.h <<EOF
12602 #define GCC_$cf_ATTRIBUTE 1
12603 EOF
12604                         ;;
12605                 *) #(vi
12606                         cat >conftest.h <<EOF
12607 #define GCC_$cf_ATTRIBUTE $cf_directive
12608 EOF
12609                         ;;
12610                 esac
12611
12612                 if { (eval echo "$as_me:12612: \"$ac_compile\"") >&5
12613   (eval $ac_compile) 2>&5
12614   ac_status=$?
12615   echo "$as_me:12615: \$? = $ac_status" >&5
12616   (exit $ac_status); }; then
12617                         test -n "$verbose" && echo "$as_me:12617: result: ... $cf_attribute" >&5
12618 echo "${ECHO_T}... $cf_attribute" >&6
12619                         cat conftest.h >>confdefs.h
12620                         case $cf_attribute in #(vi
12621                         noreturn) #(vi
12622
12623 cat >>confdefs.h <<EOF
12624 #define GCC_NORETURN $cf_directive
12625 EOF
12626
12627                                 ;;
12628                         printf) #(vi
12629                                 cf_value='/* nothing */'
12630                                 if test "$cf_printf_attribute" != no ; then
12631                                         cf_value='__attribute__((format(printf,fmt,var)))'
12632
12633 cat >>confdefs.h <<\EOF
12634 #define GCC_PRINTF 1
12635 EOF
12636
12637                                 fi
12638
12639 cat >>confdefs.h <<EOF
12640 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12641 EOF
12642
12643                                 ;;
12644                         scanf) #(vi
12645                                 cf_value='/* nothing */'
12646                                 if test "$cf_scanf_attribute" != no ; then
12647                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12648
12649 cat >>confdefs.h <<\EOF
12650 #define GCC_SCANF 1
12651 EOF
12652
12653                                 fi
12654
12655 cat >>confdefs.h <<EOF
12656 #define GCC_SCANFLIKE(fmt,var) $cf_value
12657 EOF
12658
12659                                 ;;
12660                         unused) #(vi
12661
12662 cat >>confdefs.h <<EOF
12663 #define GCC_UNUSED $cf_directive
12664 EOF
12665
12666                                 ;;
12667                         esac
12668                 fi
12669         done
12670 else
12671         fgrep define conftest.i >>confdefs.h
12672 fi
12673 rm -rf conftest*
12674 fi
12675
12676 echo "$as_me:12676: checking if you want to work around bogus compiler/loader warnings" >&5
12677 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12678
12679 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12680 if test "${enable_string_hacks+set}" = set; then
12681   enableval="$enable_string_hacks"
12682   with_string_hacks=$enableval
12683 else
12684   with_string_hacks=no
12685 fi;
12686 echo "$as_me:12686: result: $with_string_hacks" >&5
12687 echo "${ECHO_T}$with_string_hacks" >&6
12688
12689 if test "x$with_string_hacks" = "xyes"; then
12690
12691 cat >>confdefs.h <<\EOF
12692 #define USE_STRING_HACKS 1
12693 EOF
12694
12695         { echo "$as_me:12695: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12696 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12697
12698 for ac_func in strlcat strlcpy snprintf
12699 do
12700 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12701 echo "$as_me:12701: checking for $ac_func" >&5
12702 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12703 if eval "test \"\${$as_ac_var+set}\" = set"; then
12704   echo $ECHO_N "(cached) $ECHO_C" >&6
12705 else
12706   cat >conftest.$ac_ext <<_ACEOF
12707 #line 12707 "configure"
12708 #include "confdefs.h"
12709 /* System header to define __stub macros and hopefully few prototypes,
12710     which can conflict with char $ac_func (); below.  */
12711 #include <assert.h>
12712 /* Override any gcc2 internal prototype to avoid an error.  */
12713 #ifdef __cplusplus
12714 extern "C"
12715 #endif
12716 /* We use char because int might match the return type of a gcc2
12717    builtin and then its argument prototype would still apply.  */
12718 char $ac_func ();
12719 char (*f) ();
12720
12721 int
12722 main ()
12723 {
12724 /* The GNU C library defines this for functions which it implements
12725     to always fail with ENOSYS.  Some functions are actually named
12726     something starting with __ and the normal name is an alias.  */
12727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12728 choke me
12729 #else
12730 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12731 #endif
12732
12733   ;
12734   return 0;
12735 }
12736 _ACEOF
12737 rm -f conftest.$ac_objext conftest$ac_exeext
12738 if { (eval echo "$as_me:12738: \"$ac_link\"") >&5
12739   (eval $ac_link) 2>&5
12740   ac_status=$?
12741   echo "$as_me:12741: \$? = $ac_status" >&5
12742   (exit $ac_status); } &&
12743          { ac_try='test -s conftest$ac_exeext'
12744   { (eval echo "$as_me:12744: \"$ac_try\"") >&5
12745   (eval $ac_try) 2>&5
12746   ac_status=$?
12747   echo "$as_me:12747: \$? = $ac_status" >&5
12748   (exit $ac_status); }; }; then
12749   eval "$as_ac_var=yes"
12750 else
12751   echo "$as_me: failed program was:" >&5
12752 cat conftest.$ac_ext >&5
12753 eval "$as_ac_var=no"
12754 fi
12755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12756 fi
12757 echo "$as_me:12757: result: `eval echo '${'$as_ac_var'}'`" >&5
12758 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12759 if test `eval echo '${'$as_ac_var'}'` = yes; then
12760   cat >>confdefs.h <<EOF
12761 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12762 EOF
12763
12764 fi
12765 done
12766
12767 fi
12768
12769 ###     use option --enable-assertions to turn on generation of assertion code
12770 echo "$as_me:12770: checking if you want to enable runtime assertions" >&5
12771 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12772
12773 # Check whether --enable-assertions or --disable-assertions was given.
12774 if test "${enable_assertions+set}" = set; then
12775   enableval="$enable_assertions"
12776   with_assertions=$enableval
12777 else
12778   with_assertions=no
12779 fi;
12780 echo "$as_me:12780: result: $with_assertions" >&5
12781 echo "${ECHO_T}$with_assertions" >&6
12782 if test -n "$GCC"
12783 then
12784         if test "$with_assertions" = no
12785         then
12786                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12787         else
12788
12789         ADAFLAGS="$ADAFLAGS -gnata"
12790
12791         fi
12792 fi
12793
12794 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12795
12796 echo "$as_me:12796: checking if you want to use dmalloc for testing" >&5
12797 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12798
12799 # Check whether --with-dmalloc or --without-dmalloc was given.
12800 if test "${with_dmalloc+set}" = set; then
12801   withval="$with_dmalloc"
12802
12803 cat >>confdefs.h <<EOF
12804 #define USE_DMALLOC 1
12805 EOF
12806
12807         : ${with_cflags:=-g}
12808         : ${with_no_leaks:=yes}
12809          with_dmalloc=yes
12810 else
12811   with_dmalloc=
12812 fi;
12813 echo "$as_me:12813: result: ${with_dmalloc:-no}" >&5
12814 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12815
12816 case .$with_cflags in #(vi
12817 .*-g*)
12818         case .$CFLAGS in #(vi
12819         .*-g*) #(vi
12820                 ;;
12821         *)
12822
12823 cf_fix_cppflags=no
12824 cf_new_cflags=
12825 cf_new_cppflags=
12826 cf_new_extra_cppflags=
12827
12828 for cf_add_cflags in -g
12829 do
12830 case $cf_fix_cppflags in
12831 no)
12832         case $cf_add_cflags in #(vi
12833         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12834                 case $cf_add_cflags in
12835                 -D*)
12836                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12837
12838                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12839                                 && test -z "${cf_tst_cflags}" \
12840                                 && cf_fix_cppflags=yes
12841
12842                         if test $cf_fix_cppflags = yes ; then
12843                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12844                                 continue
12845                         elif test "${cf_tst_cflags}" = "\"'" ; then
12846                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12847                                 continue
12848                         fi
12849                         ;;
12850                 esac
12851                 case "$CPPFLAGS" in
12852                 *$cf_add_cflags) #(vi
12853                         ;;
12854                 *) #(vi
12855                         case $cf_add_cflags in #(vi
12856                         -D*)
12857                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12858
12859 CPPFLAGS=`echo "$CPPFLAGS" | \
12860         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12861                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12862
12863                                 ;;
12864                         esac
12865                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12866                         ;;
12867                 esac
12868                 ;;
12869         *)
12870                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12871                 ;;
12872         esac
12873         ;;
12874 yes)
12875         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12876
12877         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12878
12879         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12880                 && test -z "${cf_tst_cflags}" \
12881                 && cf_fix_cppflags=no
12882         ;;
12883 esac
12884 done
12885
12886 if test -n "$cf_new_cflags" ; then
12887
12888         CFLAGS="$CFLAGS $cf_new_cflags"
12889 fi
12890
12891 if test -n "$cf_new_cppflags" ; then
12892
12893         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12894 fi
12895
12896 if test -n "$cf_new_extra_cppflags" ; then
12897
12898         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12899 fi
12900
12901                 ;;
12902         esac
12903         ;;
12904 esac
12905
12906 if test "$with_dmalloc" = yes ; then
12907         echo "$as_me:12907: checking for dmalloc.h" >&5
12908 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12909 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12910   echo $ECHO_N "(cached) $ECHO_C" >&6
12911 else
12912   cat >conftest.$ac_ext <<_ACEOF
12913 #line 12913 "configure"
12914 #include "confdefs.h"
12915 #include <dmalloc.h>
12916 _ACEOF
12917 if { (eval echo "$as_me:12917: \"$ac_cpp conftest.$ac_ext\"") >&5
12918   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12919   ac_status=$?
12920   egrep -v '^ *\+' conftest.er1 >conftest.err
12921   rm -f conftest.er1
12922   cat conftest.err >&5
12923   echo "$as_me:12923: \$? = $ac_status" >&5
12924   (exit $ac_status); } >/dev/null; then
12925   if test -s conftest.err; then
12926     ac_cpp_err=$ac_c_preproc_warn_flag
12927   else
12928     ac_cpp_err=
12929   fi
12930 else
12931   ac_cpp_err=yes
12932 fi
12933 if test -z "$ac_cpp_err"; then
12934   ac_cv_header_dmalloc_h=yes
12935 else
12936   echo "$as_me: failed program was:" >&5
12937   cat conftest.$ac_ext >&5
12938   ac_cv_header_dmalloc_h=no
12939 fi
12940 rm -f conftest.err conftest.$ac_ext
12941 fi
12942 echo "$as_me:12942: result: $ac_cv_header_dmalloc_h" >&5
12943 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12944 if test $ac_cv_header_dmalloc_h = yes; then
12945
12946 echo "$as_me:12946: checking for dmalloc_debug in -ldmalloc" >&5
12947 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12948 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12949   echo $ECHO_N "(cached) $ECHO_C" >&6
12950 else
12951   ac_check_lib_save_LIBS=$LIBS
12952 LIBS="-ldmalloc  $LIBS"
12953 cat >conftest.$ac_ext <<_ACEOF
12954 #line 12954 "configure"
12955 #include "confdefs.h"
12956
12957 /* Override any gcc2 internal prototype to avoid an error.  */
12958 #ifdef __cplusplus
12959 extern "C"
12960 #endif
12961 /* We use char because int might match the return type of a gcc2
12962    builtin and then its argument prototype would still apply.  */
12963 char dmalloc_debug ();
12964 int
12965 main ()
12966 {
12967 dmalloc_debug ();
12968   ;
12969   return 0;
12970 }
12971 _ACEOF
12972 rm -f conftest.$ac_objext conftest$ac_exeext
12973 if { (eval echo "$as_me:12973: \"$ac_link\"") >&5
12974   (eval $ac_link) 2>&5
12975   ac_status=$?
12976   echo "$as_me:12976: \$? = $ac_status" >&5
12977   (exit $ac_status); } &&
12978          { ac_try='test -s conftest$ac_exeext'
12979   { (eval echo "$as_me:12979: \"$ac_try\"") >&5
12980   (eval $ac_try) 2>&5
12981   ac_status=$?
12982   echo "$as_me:12982: \$? = $ac_status" >&5
12983   (exit $ac_status); }; }; then
12984   ac_cv_lib_dmalloc_dmalloc_debug=yes
12985 else
12986   echo "$as_me: failed program was:" >&5
12987 cat conftest.$ac_ext >&5
12988 ac_cv_lib_dmalloc_dmalloc_debug=no
12989 fi
12990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12991 LIBS=$ac_check_lib_save_LIBS
12992 fi
12993 echo "$as_me:12993: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12994 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12995 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12996   cat >>confdefs.h <<EOF
12997 #define HAVE_LIBDMALLOC 1
12998 EOF
12999
13000   LIBS="-ldmalloc $LIBS"
13001
13002 fi
13003
13004 fi
13005
13006 fi
13007
13008 echo "$as_me:13008: checking if you want to use dbmalloc for testing" >&5
13009 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13010
13011 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13012 if test "${with_dbmalloc+set}" = set; then
13013   withval="$with_dbmalloc"
13014
13015 cat >>confdefs.h <<EOF
13016 #define USE_DBMALLOC 1
13017 EOF
13018
13019         : ${with_cflags:=-g}
13020         : ${with_no_leaks:=yes}
13021          with_dbmalloc=yes
13022 else
13023   with_dbmalloc=
13024 fi;
13025 echo "$as_me:13025: result: ${with_dbmalloc:-no}" >&5
13026 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13027
13028 case .$with_cflags in #(vi
13029 .*-g*)
13030         case .$CFLAGS in #(vi
13031         .*-g*) #(vi
13032                 ;;
13033         *)
13034
13035 cf_fix_cppflags=no
13036 cf_new_cflags=
13037 cf_new_cppflags=
13038 cf_new_extra_cppflags=
13039
13040 for cf_add_cflags in -g
13041 do
13042 case $cf_fix_cppflags in
13043 no)
13044         case $cf_add_cflags in #(vi
13045         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13046                 case $cf_add_cflags in
13047                 -D*)
13048                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13049
13050                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13051                                 && test -z "${cf_tst_cflags}" \
13052                                 && cf_fix_cppflags=yes
13053
13054                         if test $cf_fix_cppflags = yes ; then
13055                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13056                                 continue
13057                         elif test "${cf_tst_cflags}" = "\"'" ; then
13058                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13059                                 continue
13060                         fi
13061                         ;;
13062                 esac
13063                 case "$CPPFLAGS" in
13064                 *$cf_add_cflags) #(vi
13065                         ;;
13066                 *) #(vi
13067                         case $cf_add_cflags in #(vi
13068                         -D*)
13069                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13070
13071 CPPFLAGS=`echo "$CPPFLAGS" | \
13072         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13073                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13074
13075                                 ;;
13076                         esac
13077                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13078                         ;;
13079                 esac
13080                 ;;
13081         *)
13082                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13083                 ;;
13084         esac
13085         ;;
13086 yes)
13087         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13088
13089         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13090
13091         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13092                 && test -z "${cf_tst_cflags}" \
13093                 && cf_fix_cppflags=no
13094         ;;
13095 esac
13096 done
13097
13098 if test -n "$cf_new_cflags" ; then
13099
13100         CFLAGS="$CFLAGS $cf_new_cflags"
13101 fi
13102
13103 if test -n "$cf_new_cppflags" ; then
13104
13105         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13106 fi
13107
13108 if test -n "$cf_new_extra_cppflags" ; then
13109
13110         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13111 fi
13112
13113                 ;;
13114         esac
13115         ;;
13116 esac
13117
13118 if test "$with_dbmalloc" = yes ; then
13119         echo "$as_me:13119: checking for dbmalloc.h" >&5
13120 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13121 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13122   echo $ECHO_N "(cached) $ECHO_C" >&6
13123 else
13124   cat >conftest.$ac_ext <<_ACEOF
13125 #line 13125 "configure"
13126 #include "confdefs.h"
13127 #include <dbmalloc.h>
13128 _ACEOF
13129 if { (eval echo "$as_me:13129: \"$ac_cpp conftest.$ac_ext\"") >&5
13130   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13131   ac_status=$?
13132   egrep -v '^ *\+' conftest.er1 >conftest.err
13133   rm -f conftest.er1
13134   cat conftest.err >&5
13135   echo "$as_me:13135: \$? = $ac_status" >&5
13136   (exit $ac_status); } >/dev/null; then
13137   if test -s conftest.err; then
13138     ac_cpp_err=$ac_c_preproc_warn_flag
13139   else
13140     ac_cpp_err=
13141   fi
13142 else
13143   ac_cpp_err=yes
13144 fi
13145 if test -z "$ac_cpp_err"; then
13146   ac_cv_header_dbmalloc_h=yes
13147 else
13148   echo "$as_me: failed program was:" >&5
13149   cat conftest.$ac_ext >&5
13150   ac_cv_header_dbmalloc_h=no
13151 fi
13152 rm -f conftest.err conftest.$ac_ext
13153 fi
13154 echo "$as_me:13154: result: $ac_cv_header_dbmalloc_h" >&5
13155 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13156 if test $ac_cv_header_dbmalloc_h = yes; then
13157
13158 echo "$as_me:13158: checking for debug_malloc in -ldbmalloc" >&5
13159 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13160 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13161   echo $ECHO_N "(cached) $ECHO_C" >&6
13162 else
13163   ac_check_lib_save_LIBS=$LIBS
13164 LIBS="-ldbmalloc  $LIBS"
13165 cat >conftest.$ac_ext <<_ACEOF
13166 #line 13166 "configure"
13167 #include "confdefs.h"
13168
13169 /* Override any gcc2 internal prototype to avoid an error.  */
13170 #ifdef __cplusplus
13171 extern "C"
13172 #endif
13173 /* We use char because int might match the return type of a gcc2
13174    builtin and then its argument prototype would still apply.  */
13175 char debug_malloc ();
13176 int
13177 main ()
13178 {
13179 debug_malloc ();
13180   ;
13181   return 0;
13182 }
13183 _ACEOF
13184 rm -f conftest.$ac_objext conftest$ac_exeext
13185 if { (eval echo "$as_me:13185: \"$ac_link\"") >&5
13186   (eval $ac_link) 2>&5
13187   ac_status=$?
13188   echo "$as_me:13188: \$? = $ac_status" >&5
13189   (exit $ac_status); } &&
13190          { ac_try='test -s conftest$ac_exeext'
13191   { (eval echo "$as_me:13191: \"$ac_try\"") >&5
13192   (eval $ac_try) 2>&5
13193   ac_status=$?
13194   echo "$as_me:13194: \$? = $ac_status" >&5
13195   (exit $ac_status); }; }; then
13196   ac_cv_lib_dbmalloc_debug_malloc=yes
13197 else
13198   echo "$as_me: failed program was:" >&5
13199 cat conftest.$ac_ext >&5
13200 ac_cv_lib_dbmalloc_debug_malloc=no
13201 fi
13202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13203 LIBS=$ac_check_lib_save_LIBS
13204 fi
13205 echo "$as_me:13205: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13206 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13207 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13208   cat >>confdefs.h <<EOF
13209 #define HAVE_LIBDBMALLOC 1
13210 EOF
13211
13212   LIBS="-ldbmalloc $LIBS"
13213
13214 fi
13215
13216 fi
13217
13218 fi
13219
13220 echo "$as_me:13220: checking if you want to use valgrind for testing" >&5
13221 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13222
13223 # Check whether --with-valgrind or --without-valgrind was given.
13224 if test "${with_valgrind+set}" = set; then
13225   withval="$with_valgrind"
13226
13227 cat >>confdefs.h <<EOF
13228 #define USE_VALGRIND 1
13229 EOF
13230
13231         : ${with_cflags:=-g}
13232         : ${with_no_leaks:=yes}
13233          with_valgrind=yes
13234 else
13235   with_valgrind=
13236 fi;
13237 echo "$as_me:13237: result: ${with_valgrind:-no}" >&5
13238 echo "${ECHO_T}${with_valgrind:-no}" >&6
13239
13240 case .$with_cflags in #(vi
13241 .*-g*)
13242         case .$CFLAGS in #(vi
13243         .*-g*) #(vi
13244                 ;;
13245         *)
13246
13247 cf_fix_cppflags=no
13248 cf_new_cflags=
13249 cf_new_cppflags=
13250 cf_new_extra_cppflags=
13251
13252 for cf_add_cflags in -g
13253 do
13254 case $cf_fix_cppflags in
13255 no)
13256         case $cf_add_cflags in #(vi
13257         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13258                 case $cf_add_cflags in
13259                 -D*)
13260                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13261
13262                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13263                                 && test -z "${cf_tst_cflags}" \
13264                                 && cf_fix_cppflags=yes
13265
13266                         if test $cf_fix_cppflags = yes ; then
13267                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13268                                 continue
13269                         elif test "${cf_tst_cflags}" = "\"'" ; then
13270                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13271                                 continue
13272                         fi
13273                         ;;
13274                 esac
13275                 case "$CPPFLAGS" in
13276                 *$cf_add_cflags) #(vi
13277                         ;;
13278                 *) #(vi
13279                         case $cf_add_cflags in #(vi
13280                         -D*)
13281                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13282
13283 CPPFLAGS=`echo "$CPPFLAGS" | \
13284         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13285                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13286
13287                                 ;;
13288                         esac
13289                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13290                         ;;
13291                 esac
13292                 ;;
13293         *)
13294                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13295                 ;;
13296         esac
13297         ;;
13298 yes)
13299         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13300
13301         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13302
13303         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13304                 && test -z "${cf_tst_cflags}" \
13305                 && cf_fix_cppflags=no
13306         ;;
13307 esac
13308 done
13309
13310 if test -n "$cf_new_cflags" ; then
13311
13312         CFLAGS="$CFLAGS $cf_new_cflags"
13313 fi
13314
13315 if test -n "$cf_new_cppflags" ; then
13316
13317         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13318 fi
13319
13320 if test -n "$cf_new_extra_cppflags" ; then
13321
13322         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13323 fi
13324
13325                 ;;
13326         esac
13327         ;;
13328 esac
13329
13330 echo "$as_me:13330: checking if you want to perform memory-leak testing" >&5
13331 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13332
13333 # Check whether --enable-leaks or --disable-leaks was given.
13334 if test "${enable_leaks+set}" = set; then
13335   enableval="$enable_leaks"
13336   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13337 else
13338   : ${with_no_leaks:=no}
13339 fi;
13340 echo "$as_me:13340: result: $with_no_leaks" >&5
13341 echo "${ECHO_T}$with_no_leaks" >&6
13342
13343 if test "$with_no_leaks" = yes ; then
13344
13345 cat >>confdefs.h <<\EOF
13346 #define NO_LEAKS 1
13347 EOF
13348
13349 cat >>confdefs.h <<\EOF
13350 #define YY_NO_LEAKS 1
13351 EOF
13352
13353 fi
13354
13355 cat >>confdefs.h <<\EOF
13356 #define HAVE_NC_ALLOC_H 1
13357 EOF
13358
13359 ###     use option --enable-expanded to generate certain macros as functions
13360
13361 # Check whether --enable-expanded or --disable-expanded was given.
13362 if test "${enable_expanded+set}" = set; then
13363   enableval="$enable_expanded"
13364   test "x$enableval" = xyes &&
13365 cat >>confdefs.h <<\EOF
13366 #define NCURSES_EXPANDED 1
13367 EOF
13368
13369 fi;
13370
13371 ###     use option --disable-macros to suppress macros in favor of functions
13372
13373 # Check whether --enable-macros or --disable-macros was given.
13374 if test "${enable_macros+set}" = set; then
13375   enableval="$enable_macros"
13376   test "$enableval" = no &&
13377 cat >>confdefs.h <<\EOF
13378 #define NCURSES_NOMACROS 1
13379 EOF
13380
13381 fi;
13382
13383 # Normally we only add trace() to the debug-library.  Allow this to be
13384 # extended to all models of the ncurses library:
13385 cf_all_traces=no
13386 case "$CFLAGS $CPPFLAGS" in
13387 *-DTRACE*)
13388         cf_all_traces=yes
13389         ;;
13390 esac
13391
13392 echo "$as_me:13392: checking whether to add trace feature to all models" >&5
13393 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13394
13395 # Check whether --with-trace or --without-trace was given.
13396 if test "${with_trace+set}" = set; then
13397   withval="$with_trace"
13398   cf_with_trace=$withval
13399 else
13400   cf_with_trace=$cf_all_traces
13401 fi;
13402 echo "$as_me:13402: result: $cf_with_trace" >&5
13403 echo "${ECHO_T}$cf_with_trace" >&6
13404
13405 if test "x$cf_with_trace" = xyes ; then
13406         LIB_TRACING=all
13407         ADA_TRACE=TRUE
13408
13409 cf_fix_cppflags=no
13410 cf_new_cflags=
13411 cf_new_cppflags=
13412 cf_new_extra_cppflags=
13413
13414 for cf_add_cflags in -DTRACE
13415 do
13416 case $cf_fix_cppflags in
13417 no)
13418         case $cf_add_cflags in #(vi
13419         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13420                 case $cf_add_cflags in
13421                 -D*)
13422                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13423
13424                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13425                                 && test -z "${cf_tst_cflags}" \
13426                                 && cf_fix_cppflags=yes
13427
13428                         if test $cf_fix_cppflags = yes ; then
13429                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13430                                 continue
13431                         elif test "${cf_tst_cflags}" = "\"'" ; then
13432                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13433                                 continue
13434                         fi
13435                         ;;
13436                 esac
13437                 case "$CPPFLAGS" in
13438                 *$cf_add_cflags) #(vi
13439                         ;;
13440                 *) #(vi
13441                         case $cf_add_cflags in #(vi
13442                         -D*)
13443                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13444
13445 CPPFLAGS=`echo "$CPPFLAGS" | \
13446         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13447                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13448
13449                                 ;;
13450                         esac
13451                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13452                         ;;
13453                 esac
13454                 ;;
13455         *)
13456                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13457                 ;;
13458         esac
13459         ;;
13460 yes)
13461         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13462
13463         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13464
13465         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13466                 && test -z "${cf_tst_cflags}" \
13467                 && cf_fix_cppflags=no
13468         ;;
13469 esac
13470 done
13471
13472 if test -n "$cf_new_cflags" ; then
13473
13474         CFLAGS="$CFLAGS $cf_new_cflags"
13475 fi
13476
13477 if test -n "$cf_new_cppflags" ; then
13478
13479         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13480 fi
13481
13482 if test -n "$cf_new_extra_cppflags" ; then
13483
13484         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13485 fi
13486
13487 else
13488         LIB_TRACING=DEBUG
13489         ADA_TRACE=FALSE
13490 fi
13491
13492 ###     Checks for libraries.
13493 case $cf_cv_system_name in #(vi
13494 *mingw32*) #(vi
13495         ;;
13496 *)
13497 echo "$as_me:13497: checking for gettimeofday" >&5
13498 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13499 if test "${ac_cv_func_gettimeofday+set}" = set; then
13500   echo $ECHO_N "(cached) $ECHO_C" >&6
13501 else
13502   cat >conftest.$ac_ext <<_ACEOF
13503 #line 13503 "configure"
13504 #include "confdefs.h"
13505 /* System header to define __stub macros and hopefully few prototypes,
13506     which can conflict with char gettimeofday (); below.  */
13507 #include <assert.h>
13508 /* Override any gcc2 internal prototype to avoid an error.  */
13509 #ifdef __cplusplus
13510 extern "C"
13511 #endif
13512 /* We use char because int might match the return type of a gcc2
13513    builtin and then its argument prototype would still apply.  */
13514 char gettimeofday ();
13515 char (*f) ();
13516
13517 int
13518 main ()
13519 {
13520 /* The GNU C library defines this for functions which it implements
13521     to always fail with ENOSYS.  Some functions are actually named
13522     something starting with __ and the normal name is an alias.  */
13523 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13524 choke me
13525 #else
13526 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13527 #endif
13528
13529   ;
13530   return 0;
13531 }
13532 _ACEOF
13533 rm -f conftest.$ac_objext conftest$ac_exeext
13534 if { (eval echo "$as_me:13534: \"$ac_link\"") >&5
13535   (eval $ac_link) 2>&5
13536   ac_status=$?
13537   echo "$as_me:13537: \$? = $ac_status" >&5
13538   (exit $ac_status); } &&
13539          { ac_try='test -s conftest$ac_exeext'
13540   { (eval echo "$as_me:13540: \"$ac_try\"") >&5
13541   (eval $ac_try) 2>&5
13542   ac_status=$?
13543   echo "$as_me:13543: \$? = $ac_status" >&5
13544   (exit $ac_status); }; }; then
13545   ac_cv_func_gettimeofday=yes
13546 else
13547   echo "$as_me: failed program was:" >&5
13548 cat conftest.$ac_ext >&5
13549 ac_cv_func_gettimeofday=no
13550 fi
13551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13552 fi
13553 echo "$as_me:13553: result: $ac_cv_func_gettimeofday" >&5
13554 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13555 if test $ac_cv_func_gettimeofday = yes; then
13556
13557 cat >>confdefs.h <<\EOF
13558 #define HAVE_GETTIMEOFDAY 1
13559 EOF
13560
13561 else
13562
13563 echo "$as_me:13563: checking for gettimeofday in -lbsd" >&5
13564 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13565 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13566   echo $ECHO_N "(cached) $ECHO_C" >&6
13567 else
13568   ac_check_lib_save_LIBS=$LIBS
13569 LIBS="-lbsd  $LIBS"
13570 cat >conftest.$ac_ext <<_ACEOF
13571 #line 13571 "configure"
13572 #include "confdefs.h"
13573
13574 /* Override any gcc2 internal prototype to avoid an error.  */
13575 #ifdef __cplusplus
13576 extern "C"
13577 #endif
13578 /* We use char because int might match the return type of a gcc2
13579    builtin and then its argument prototype would still apply.  */
13580 char gettimeofday ();
13581 int
13582 main ()
13583 {
13584 gettimeofday ();
13585   ;
13586   return 0;
13587 }
13588 _ACEOF
13589 rm -f conftest.$ac_objext conftest$ac_exeext
13590 if { (eval echo "$as_me:13590: \"$ac_link\"") >&5
13591   (eval $ac_link) 2>&5
13592   ac_status=$?
13593   echo "$as_me:13593: \$? = $ac_status" >&5
13594   (exit $ac_status); } &&
13595          { ac_try='test -s conftest$ac_exeext'
13596   { (eval echo "$as_me:13596: \"$ac_try\"") >&5
13597   (eval $ac_try) 2>&5
13598   ac_status=$?
13599   echo "$as_me:13599: \$? = $ac_status" >&5
13600   (exit $ac_status); }; }; then
13601   ac_cv_lib_bsd_gettimeofday=yes
13602 else
13603   echo "$as_me: failed program was:" >&5
13604 cat conftest.$ac_ext >&5
13605 ac_cv_lib_bsd_gettimeofday=no
13606 fi
13607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13608 LIBS=$ac_check_lib_save_LIBS
13609 fi
13610 echo "$as_me:13610: result: $ac_cv_lib_bsd_gettimeofday" >&5
13611 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13612 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13613
13614 cat >>confdefs.h <<\EOF
13615 #define HAVE_GETTIMEOFDAY 1
13616 EOF
13617
13618         LIBS="-lbsd $LIBS"
13619 fi
13620
13621 fi
13622         ;;
13623 esac
13624
13625 echo "$as_me:13625: checking if -lm needed for math functions" >&5
13626 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13627 if test "${cf_cv_need_libm+set}" = set; then
13628   echo $ECHO_N "(cached) $ECHO_C" >&6
13629 else
13630
13631         cat >conftest.$ac_ext <<_ACEOF
13632 #line 13632 "configure"
13633 #include "confdefs.h"
13634
13635         #include <stdio.h>
13636         #include <math.h>
13637
13638 int
13639 main ()
13640 {
13641 double x = rand(); printf("result = %g\n", sin(x))
13642   ;
13643   return 0;
13644 }
13645 _ACEOF
13646 rm -f conftest.$ac_objext conftest$ac_exeext
13647 if { (eval echo "$as_me:13647: \"$ac_link\"") >&5
13648   (eval $ac_link) 2>&5
13649   ac_status=$?
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit $ac_status); } &&
13652          { ac_try='test -s conftest$ac_exeext'
13653   { (eval echo "$as_me:13653: \"$ac_try\"") >&5
13654   (eval $ac_try) 2>&5
13655   ac_status=$?
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit $ac_status); }; }; then
13658   cf_cv_need_libm=no
13659 else
13660   echo "$as_me: failed program was:" >&5
13661 cat conftest.$ac_ext >&5
13662 cf_cv_need_libm=yes
13663 fi
13664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13665 fi
13666 echo "$as_me:13666: result: $cf_cv_need_libm" >&5
13667 echo "${ECHO_T}$cf_cv_need_libm" >&6
13668 if test "$cf_cv_need_libm" = yes
13669 then
13670 MATH_LIB=-lm
13671 fi
13672
13673 ###     Checks for header files.
13674 echo "$as_me:13674: checking for ANSI C header files" >&5
13675 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13676 if test "${ac_cv_header_stdc+set}" = set; then
13677   echo $ECHO_N "(cached) $ECHO_C" >&6
13678 else
13679   cat >conftest.$ac_ext <<_ACEOF
13680 #line 13680 "configure"
13681 #include "confdefs.h"
13682 #include <stdlib.h>
13683 #include <stdarg.h>
13684 #include <string.h>
13685 #include <float.h>
13686
13687 _ACEOF
13688 if { (eval echo "$as_me:13688: \"$ac_cpp conftest.$ac_ext\"") >&5
13689   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13690   ac_status=$?
13691   egrep -v '^ *\+' conftest.er1 >conftest.err
13692   rm -f conftest.er1
13693   cat conftest.err >&5
13694   echo "$as_me:13694: \$? = $ac_status" >&5
13695   (exit $ac_status); } >/dev/null; then
13696   if test -s conftest.err; then
13697     ac_cpp_err=$ac_c_preproc_warn_flag
13698   else
13699     ac_cpp_err=
13700   fi
13701 else
13702   ac_cpp_err=yes
13703 fi
13704 if test -z "$ac_cpp_err"; then
13705   ac_cv_header_stdc=yes
13706 else
13707   echo "$as_me: failed program was:" >&5
13708   cat conftest.$ac_ext >&5
13709   ac_cv_header_stdc=no
13710 fi
13711 rm -f conftest.err conftest.$ac_ext
13712
13713 if test $ac_cv_header_stdc = yes; then
13714   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13715   cat >conftest.$ac_ext <<_ACEOF
13716 #line 13716 "configure"
13717 #include "confdefs.h"
13718 #include <string.h>
13719
13720 _ACEOF
13721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13722   egrep "memchr" >/dev/null 2>&1; then
13723   :
13724 else
13725   ac_cv_header_stdc=no
13726 fi
13727 rm -rf conftest*
13728
13729 fi
13730
13731 if test $ac_cv_header_stdc = yes; then
13732   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13733   cat >conftest.$ac_ext <<_ACEOF
13734 #line 13734 "configure"
13735 #include "confdefs.h"
13736 #include <stdlib.h>
13737
13738 _ACEOF
13739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13740   egrep "free" >/dev/null 2>&1; then
13741   :
13742 else
13743   ac_cv_header_stdc=no
13744 fi
13745 rm -rf conftest*
13746
13747 fi
13748
13749 if test $ac_cv_header_stdc = yes; then
13750   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13751   if test "$cross_compiling" = yes; then
13752   :
13753 else
13754   cat >conftest.$ac_ext <<_ACEOF
13755 #line 13755 "configure"
13756 #include "confdefs.h"
13757 #include <ctype.h>
13758 #if ((' ' & 0x0FF) == 0x020)
13759 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13760 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13761 #else
13762 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13763                      || ('j' <= (c) && (c) <= 'r') \
13764                      || ('s' <= (c) && (c) <= 'z'))
13765 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13766 #endif
13767
13768 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13769 int
13770 main ()
13771 {
13772   int i;
13773   for (i = 0; i < 256; i++)
13774     if (XOR (islower (i), ISLOWER (i))
13775         || toupper (i) != TOUPPER (i))
13776       $ac_main_return(2);
13777   $ac_main_return (0);
13778 }
13779 _ACEOF
13780 rm -f conftest$ac_exeext
13781 if { (eval echo "$as_me:13781: \"$ac_link\"") >&5
13782   (eval $ac_link) 2>&5
13783   ac_status=$?
13784   echo "$as_me:13784: \$? = $ac_status" >&5
13785   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13786   { (eval echo "$as_me:13786: \"$ac_try\"") >&5
13787   (eval $ac_try) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit $ac_status); }; }; then
13791   :
13792 else
13793   echo "$as_me: program exited with status $ac_status" >&5
13794 echo "$as_me: failed program was:" >&5
13795 cat conftest.$ac_ext >&5
13796 ac_cv_header_stdc=no
13797 fi
13798 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13799 fi
13800 fi
13801 fi
13802 echo "$as_me:13802: result: $ac_cv_header_stdc" >&5
13803 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13804 if test $ac_cv_header_stdc = yes; then
13805
13806 cat >>confdefs.h <<\EOF
13807 #define STDC_HEADERS 1
13808 EOF
13809
13810 fi
13811
13812 ac_header_dirent=no
13813 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13814   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13815 echo "$as_me:13815: checking for $ac_hdr that defines DIR" >&5
13816 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13817 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13818   echo $ECHO_N "(cached) $ECHO_C" >&6
13819 else
13820   cat >conftest.$ac_ext <<_ACEOF
13821 #line 13821 "configure"
13822 #include "confdefs.h"
13823 #include <sys/types.h>
13824 #include <$ac_hdr>
13825
13826 int
13827 main ()
13828 {
13829 if ((DIR *) 0)
13830 return 0;
13831   ;
13832   return 0;
13833 }
13834 _ACEOF
13835 rm -f conftest.$ac_objext
13836 if { (eval echo "$as_me:13836: \"$ac_compile\"") >&5
13837   (eval $ac_compile) 2>&5
13838   ac_status=$?
13839   echo "$as_me:13839: \$? = $ac_status" >&5
13840   (exit $ac_status); } &&
13841          { ac_try='test -s conftest.$ac_objext'
13842   { (eval echo "$as_me:13842: \"$ac_try\"") >&5
13843   (eval $ac_try) 2>&5
13844   ac_status=$?
13845   echo "$as_me:13845: \$? = $ac_status" >&5
13846   (exit $ac_status); }; }; then
13847   eval "$as_ac_Header=yes"
13848 else
13849   echo "$as_me: failed program was:" >&5
13850 cat conftest.$ac_ext >&5
13851 eval "$as_ac_Header=no"
13852 fi
13853 rm -f conftest.$ac_objext conftest.$ac_ext
13854 fi
13855 echo "$as_me:13855: result: `eval echo '${'$as_ac_Header'}'`" >&5
13856 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13857 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13858   cat >>confdefs.h <<EOF
13859 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13860 EOF
13861
13862 ac_header_dirent=$ac_hdr; break
13863 fi
13864
13865 done
13866 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13867 if test $ac_header_dirent = dirent.h; then
13868   echo "$as_me:13868: checking for opendir in -ldir" >&5
13869 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13870 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13871   echo $ECHO_N "(cached) $ECHO_C" >&6
13872 else
13873   ac_check_lib_save_LIBS=$LIBS
13874 LIBS="-ldir  $LIBS"
13875 cat >conftest.$ac_ext <<_ACEOF
13876 #line 13876 "configure"
13877 #include "confdefs.h"
13878
13879 /* Override any gcc2 internal prototype to avoid an error.  */
13880 #ifdef __cplusplus
13881 extern "C"
13882 #endif
13883 /* We use char because int might match the return type of a gcc2
13884    builtin and then its argument prototype would still apply.  */
13885 char opendir ();
13886 int
13887 main ()
13888 {
13889 opendir ();
13890   ;
13891   return 0;
13892 }
13893 _ACEOF
13894 rm -f conftest.$ac_objext conftest$ac_exeext
13895 if { (eval echo "$as_me:13895: \"$ac_link\"") >&5
13896   (eval $ac_link) 2>&5
13897   ac_status=$?
13898   echo "$as_me:13898: \$? = $ac_status" >&5
13899   (exit $ac_status); } &&
13900          { ac_try='test -s conftest$ac_exeext'
13901   { (eval echo "$as_me:13901: \"$ac_try\"") >&5
13902   (eval $ac_try) 2>&5
13903   ac_status=$?
13904   echo "$as_me:13904: \$? = $ac_status" >&5
13905   (exit $ac_status); }; }; then
13906   ac_cv_lib_dir_opendir=yes
13907 else
13908   echo "$as_me: failed program was:" >&5
13909 cat conftest.$ac_ext >&5
13910 ac_cv_lib_dir_opendir=no
13911 fi
13912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13913 LIBS=$ac_check_lib_save_LIBS
13914 fi
13915 echo "$as_me:13915: result: $ac_cv_lib_dir_opendir" >&5
13916 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13917 if test $ac_cv_lib_dir_opendir = yes; then
13918   LIBS="$LIBS -ldir"
13919 fi
13920
13921 else
13922   echo "$as_me:13922: checking for opendir in -lx" >&5
13923 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13924 if test "${ac_cv_lib_x_opendir+set}" = set; then
13925   echo $ECHO_N "(cached) $ECHO_C" >&6
13926 else
13927   ac_check_lib_save_LIBS=$LIBS
13928 LIBS="-lx  $LIBS"
13929 cat >conftest.$ac_ext <<_ACEOF
13930 #line 13930 "configure"
13931 #include "confdefs.h"
13932
13933 /* Override any gcc2 internal prototype to avoid an error.  */
13934 #ifdef __cplusplus
13935 extern "C"
13936 #endif
13937 /* We use char because int might match the return type of a gcc2
13938    builtin and then its argument prototype would still apply.  */
13939 char opendir ();
13940 int
13941 main ()
13942 {
13943 opendir ();
13944   ;
13945   return 0;
13946 }
13947 _ACEOF
13948 rm -f conftest.$ac_objext conftest$ac_exeext
13949 if { (eval echo "$as_me:13949: \"$ac_link\"") >&5
13950   (eval $ac_link) 2>&5
13951   ac_status=$?
13952   echo "$as_me:13952: \$? = $ac_status" >&5
13953   (exit $ac_status); } &&
13954          { ac_try='test -s conftest$ac_exeext'
13955   { (eval echo "$as_me:13955: \"$ac_try\"") >&5
13956   (eval $ac_try) 2>&5
13957   ac_status=$?
13958   echo "$as_me:13958: \$? = $ac_status" >&5
13959   (exit $ac_status); }; }; then
13960   ac_cv_lib_x_opendir=yes
13961 else
13962   echo "$as_me: failed program was:" >&5
13963 cat conftest.$ac_ext >&5
13964 ac_cv_lib_x_opendir=no
13965 fi
13966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13967 LIBS=$ac_check_lib_save_LIBS
13968 fi
13969 echo "$as_me:13969: result: $ac_cv_lib_x_opendir" >&5
13970 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13971 if test $ac_cv_lib_x_opendir = yes; then
13972   LIBS="$LIBS -lx"
13973 fi
13974
13975 fi
13976
13977 echo "$as_me:13977: checking whether time.h and sys/time.h may both be included" >&5
13978 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13979 if test "${ac_cv_header_time+set}" = set; then
13980   echo $ECHO_N "(cached) $ECHO_C" >&6
13981 else
13982   cat >conftest.$ac_ext <<_ACEOF
13983 #line 13983 "configure"
13984 #include "confdefs.h"
13985 #include <sys/types.h>
13986 #include <sys/time.h>
13987 #include <time.h>
13988
13989 int
13990 main ()
13991 {
13992 if ((struct tm *) 0)
13993 return 0;
13994   ;
13995   return 0;
13996 }
13997 _ACEOF
13998 rm -f conftest.$ac_objext
13999 if { (eval echo "$as_me:13999: \"$ac_compile\"") >&5
14000   (eval $ac_compile) 2>&5
14001   ac_status=$?
14002   echo "$as_me:14002: \$? = $ac_status" >&5
14003   (exit $ac_status); } &&
14004          { ac_try='test -s conftest.$ac_objext'
14005   { (eval echo "$as_me:14005: \"$ac_try\"") >&5
14006   (eval $ac_try) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); }; }; then
14010   ac_cv_header_time=yes
14011 else
14012   echo "$as_me: failed program was:" >&5
14013 cat conftest.$ac_ext >&5
14014 ac_cv_header_time=no
14015 fi
14016 rm -f conftest.$ac_objext conftest.$ac_ext
14017 fi
14018 echo "$as_me:14018: result: $ac_cv_header_time" >&5
14019 echo "${ECHO_T}$ac_cv_header_time" >&6
14020 if test $ac_cv_header_time = yes; then
14021
14022 cat >>confdefs.h <<\EOF
14023 #define TIME_WITH_SYS_TIME 1
14024 EOF
14025
14026 fi
14027
14028 cf_regex_func=no
14029
14030 cf_regex_libs="regex re"
14031 case $host_os in #(vi
14032 mingw*)
14033         cf_regex_libs="gnurx $cf_regex_libs"
14034         ;;
14035 esac
14036
14037 echo "$as_me:14037: checking for regcomp" >&5
14038 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14039 if test "${ac_cv_func_regcomp+set}" = set; then
14040   echo $ECHO_N "(cached) $ECHO_C" >&6
14041 else
14042   cat >conftest.$ac_ext <<_ACEOF
14043 #line 14043 "configure"
14044 #include "confdefs.h"
14045 /* System header to define __stub macros and hopefully few prototypes,
14046     which can conflict with char regcomp (); below.  */
14047 #include <assert.h>
14048 /* Override any gcc2 internal prototype to avoid an error.  */
14049 #ifdef __cplusplus
14050 extern "C"
14051 #endif
14052 /* We use char because int might match the return type of a gcc2
14053    builtin and then its argument prototype would still apply.  */
14054 char regcomp ();
14055 char (*f) ();
14056
14057 int
14058 main ()
14059 {
14060 /* The GNU C library defines this for functions which it implements
14061     to always fail with ENOSYS.  Some functions are actually named
14062     something starting with __ and the normal name is an alias.  */
14063 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14064 choke me
14065 #else
14066 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14067 #endif
14068
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 rm -f conftest.$ac_objext conftest$ac_exeext
14074 if { (eval echo "$as_me:14074: \"$ac_link\"") >&5
14075   (eval $ac_link) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit $ac_status); } &&
14079          { ac_try='test -s conftest$ac_exeext'
14080   { (eval echo "$as_me:14080: \"$ac_try\"") >&5
14081   (eval $ac_try) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); }; }; then
14085   ac_cv_func_regcomp=yes
14086 else
14087   echo "$as_me: failed program was:" >&5
14088 cat conftest.$ac_ext >&5
14089 ac_cv_func_regcomp=no
14090 fi
14091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14092 fi
14093 echo "$as_me:14093: result: $ac_cv_func_regcomp" >&5
14094 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14095 if test $ac_cv_func_regcomp = yes; then
14096   cf_regex_func=regcomp
14097 else
14098
14099         for cf_regex_lib in $cf_regex_libs
14100         do
14101                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14102 echo "$as_me:14102: checking for regcomp in -l$cf_regex_lib" >&5
14103 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14104 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14105   echo $ECHO_N "(cached) $ECHO_C" >&6
14106 else
14107   ac_check_lib_save_LIBS=$LIBS
14108 LIBS="-l$cf_regex_lib  $LIBS"
14109 cat >conftest.$ac_ext <<_ACEOF
14110 #line 14110 "configure"
14111 #include "confdefs.h"
14112
14113 /* Override any gcc2 internal prototype to avoid an error.  */
14114 #ifdef __cplusplus
14115 extern "C"
14116 #endif
14117 /* We use char because int might match the return type of a gcc2
14118    builtin and then its argument prototype would still apply.  */
14119 char regcomp ();
14120 int
14121 main ()
14122 {
14123 regcomp ();
14124   ;
14125   return 0;
14126 }
14127 _ACEOF
14128 rm -f conftest.$ac_objext conftest$ac_exeext
14129 if { (eval echo "$as_me:14129: \"$ac_link\"") >&5
14130   (eval $ac_link) 2>&5
14131   ac_status=$?
14132   echo "$as_me:14132: \$? = $ac_status" >&5
14133   (exit $ac_status); } &&
14134          { ac_try='test -s conftest$ac_exeext'
14135   { (eval echo "$as_me:14135: \"$ac_try\"") >&5
14136   (eval $ac_try) 2>&5
14137   ac_status=$?
14138   echo "$as_me:14138: \$? = $ac_status" >&5
14139   (exit $ac_status); }; }; then
14140   eval "$as_ac_Lib=yes"
14141 else
14142   echo "$as_me: failed program was:" >&5
14143 cat conftest.$ac_ext >&5
14144 eval "$as_ac_Lib=no"
14145 fi
14146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14147 LIBS=$ac_check_lib_save_LIBS
14148 fi
14149 echo "$as_me:14149: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14150 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14151 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14152
14153                                 LIBS="-l$cf_regex_lib $LIBS"
14154                                 cf_regex_func=regcomp
14155                                 break
14156 fi
14157
14158         done
14159
14160 fi
14161
14162 if test "$cf_regex_func" = no ; then
14163         echo "$as_me:14163: checking for compile" >&5
14164 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14165 if test "${ac_cv_func_compile+set}" = set; then
14166   echo $ECHO_N "(cached) $ECHO_C" >&6
14167 else
14168   cat >conftest.$ac_ext <<_ACEOF
14169 #line 14169 "configure"
14170 #include "confdefs.h"
14171 /* System header to define __stub macros and hopefully few prototypes,
14172     which can conflict with char compile (); below.  */
14173 #include <assert.h>
14174 /* Override any gcc2 internal prototype to avoid an error.  */
14175 #ifdef __cplusplus
14176 extern "C"
14177 #endif
14178 /* We use char because int might match the return type of a gcc2
14179    builtin and then its argument prototype would still apply.  */
14180 char compile ();
14181 char (*f) ();
14182
14183 int
14184 main ()
14185 {
14186 /* The GNU C library defines this for functions which it implements
14187     to always fail with ENOSYS.  Some functions are actually named
14188     something starting with __ and the normal name is an alias.  */
14189 #if defined (__stub_compile) || defined (__stub___compile)
14190 choke me
14191 #else
14192 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14193 #endif
14194
14195   ;
14196   return 0;
14197 }
14198 _ACEOF
14199 rm -f conftest.$ac_objext conftest$ac_exeext
14200 if { (eval echo "$as_me:14200: \"$ac_link\"") >&5
14201   (eval $ac_link) 2>&5
14202   ac_status=$?
14203   echo "$as_me:14203: \$? = $ac_status" >&5
14204   (exit $ac_status); } &&
14205          { ac_try='test -s conftest$ac_exeext'
14206   { (eval echo "$as_me:14206: \"$ac_try\"") >&5
14207   (eval $ac_try) 2>&5
14208   ac_status=$?
14209   echo "$as_me:14209: \$? = $ac_status" >&5
14210   (exit $ac_status); }; }; then
14211   ac_cv_func_compile=yes
14212 else
14213   echo "$as_me: failed program was:" >&5
14214 cat conftest.$ac_ext >&5
14215 ac_cv_func_compile=no
14216 fi
14217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14218 fi
14219 echo "$as_me:14219: result: $ac_cv_func_compile" >&5
14220 echo "${ECHO_T}$ac_cv_func_compile" >&6
14221 if test $ac_cv_func_compile = yes; then
14222   cf_regex_func=compile
14223 else
14224
14225                 echo "$as_me:14225: checking for compile in -lgen" >&5
14226 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14227 if test "${ac_cv_lib_gen_compile+set}" = set; then
14228   echo $ECHO_N "(cached) $ECHO_C" >&6
14229 else
14230   ac_check_lib_save_LIBS=$LIBS
14231 LIBS="-lgen  $LIBS"
14232 cat >conftest.$ac_ext <<_ACEOF
14233 #line 14233 "configure"
14234 #include "confdefs.h"
14235
14236 /* Override any gcc2 internal prototype to avoid an error.  */
14237 #ifdef __cplusplus
14238 extern "C"
14239 #endif
14240 /* We use char because int might match the return type of a gcc2
14241    builtin and then its argument prototype would still apply.  */
14242 char compile ();
14243 int
14244 main ()
14245 {
14246 compile ();
14247   ;
14248   return 0;
14249 }
14250 _ACEOF
14251 rm -f conftest.$ac_objext conftest$ac_exeext
14252 if { (eval echo "$as_me:14252: \"$ac_link\"") >&5
14253   (eval $ac_link) 2>&5
14254   ac_status=$?
14255   echo "$as_me:14255: \$? = $ac_status" >&5
14256   (exit $ac_status); } &&
14257          { ac_try='test -s conftest$ac_exeext'
14258   { (eval echo "$as_me:14258: \"$ac_try\"") >&5
14259   (eval $ac_try) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit $ac_status); }; }; then
14263   ac_cv_lib_gen_compile=yes
14264 else
14265   echo "$as_me: failed program was:" >&5
14266 cat conftest.$ac_ext >&5
14267 ac_cv_lib_gen_compile=no
14268 fi
14269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14270 LIBS=$ac_check_lib_save_LIBS
14271 fi
14272 echo "$as_me:14272: result: $ac_cv_lib_gen_compile" >&5
14273 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14274 if test $ac_cv_lib_gen_compile = yes; then
14275
14276                                 LIBS="-lgen $LIBS"
14277                                 cf_regex_func=compile
14278 fi
14279
14280 fi
14281
14282 fi
14283
14284 if test "$cf_regex_func" = no ; then
14285         { echo "$as_me:14285: WARNING: cannot find regular expression library" >&5
14286 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14287 fi
14288
14289 echo "$as_me:14289: checking for regular-expression headers" >&5
14290 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14291 if test "${cf_cv_regex_hdrs+set}" = set; then
14292   echo $ECHO_N "(cached) $ECHO_C" >&6
14293 else
14294
14295 cf_cv_regex_hdrs=no
14296 case $cf_regex_func in #(vi
14297 compile) #(vi
14298         for cf_regex_hdr in regexp.h regexpr.h
14299         do
14300                 cat >conftest.$ac_ext <<_ACEOF
14301 #line 14301 "configure"
14302 #include "confdefs.h"
14303 #include <$cf_regex_hdr>
14304 int
14305 main ()
14306 {
14307
14308                         char *p = compile("", "", "", 0);
14309                         int x = step("", "");
14310
14311   ;
14312   return 0;
14313 }
14314 _ACEOF
14315 rm -f conftest.$ac_objext conftest$ac_exeext
14316 if { (eval echo "$as_me:14316: \"$ac_link\"") >&5
14317   (eval $ac_link) 2>&5
14318   ac_status=$?
14319   echo "$as_me:14319: \$? = $ac_status" >&5
14320   (exit $ac_status); } &&
14321          { ac_try='test -s conftest$ac_exeext'
14322   { (eval echo "$as_me:14322: \"$ac_try\"") >&5
14323   (eval $ac_try) 2>&5
14324   ac_status=$?
14325   echo "$as_me:14325: \$? = $ac_status" >&5
14326   (exit $ac_status); }; }; then
14327
14328                         cf_cv_regex_hdrs=$cf_regex_hdr
14329                         break
14330
14331 else
14332   echo "$as_me: failed program was:" >&5
14333 cat conftest.$ac_ext >&5
14334 fi
14335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14336         done
14337         ;;
14338 *)
14339         for cf_regex_hdr in regex.h
14340         do
14341                 cat >conftest.$ac_ext <<_ACEOF
14342 #line 14342 "configure"
14343 #include "confdefs.h"
14344 #include <sys/types.h>
14345 #include <$cf_regex_hdr>
14346 int
14347 main ()
14348 {
14349
14350                         regex_t *p;
14351                         int x = regcomp(p, "", 0);
14352                         int y = regexec(p, "", 0, 0, 0);
14353                         regfree(p);
14354
14355   ;
14356   return 0;
14357 }
14358 _ACEOF
14359 rm -f conftest.$ac_objext conftest$ac_exeext
14360 if { (eval echo "$as_me:14360: \"$ac_link\"") >&5
14361   (eval $ac_link) 2>&5
14362   ac_status=$?
14363   echo "$as_me:14363: \$? = $ac_status" >&5
14364   (exit $ac_status); } &&
14365          { ac_try='test -s conftest$ac_exeext'
14366   { (eval echo "$as_me:14366: \"$ac_try\"") >&5
14367   (eval $ac_try) 2>&5
14368   ac_status=$?
14369   echo "$as_me:14369: \$? = $ac_status" >&5
14370   (exit $ac_status); }; }; then
14371
14372                         cf_cv_regex_hdrs=$cf_regex_hdr
14373                         break
14374
14375 else
14376   echo "$as_me: failed program was:" >&5
14377 cat conftest.$ac_ext >&5
14378 fi
14379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14380         done
14381         ;;
14382 esac
14383
14384 fi
14385 echo "$as_me:14385: result: $cf_cv_regex_hdrs" >&5
14386 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14387
14388 case $cf_cv_regex_hdrs in #(vi
14389     no)        { echo "$as_me:14389: WARNING: no regular expression header found" >&5
14390 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14391     regex.h)
14392 cat >>confdefs.h <<\EOF
14393 #define HAVE_REGEX_H_FUNCS 1
14394 EOF
14395  ;; #(vi
14396     regexp.h)
14397 cat >>confdefs.h <<\EOF
14398 #define HAVE_REGEXP_H_FUNCS 1
14399 EOF
14400  ;; #(vi
14401     regexpr.h)
14402 cat >>confdefs.h <<\EOF
14403 #define HAVE_REGEXPR_H_FUNCS 1
14404 EOF
14405  ;;
14406 esac
14407
14408 for ac_header in \
14409 fcntl.h \
14410 getopt.h \
14411 limits.h \
14412 locale.h \
14413 math.h \
14414 poll.h \
14415 sys/bsdtypes.h \
14416 sys/ioctl.h \
14417 sys/param.h \
14418 sys/poll.h \
14419 sys/select.h \
14420 sys/time.h \
14421 sys/times.h \
14422 ttyent.h \
14423 unistd.h \
14424 wctype.h \
14425
14426 do
14427 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14428 echo "$as_me:14428: checking for $ac_header" >&5
14429 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14430 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14431   echo $ECHO_N "(cached) $ECHO_C" >&6
14432 else
14433   cat >conftest.$ac_ext <<_ACEOF
14434 #line 14434 "configure"
14435 #include "confdefs.h"
14436 #include <$ac_header>
14437 _ACEOF
14438 if { (eval echo "$as_me:14438: \"$ac_cpp conftest.$ac_ext\"") >&5
14439   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14440   ac_status=$?
14441   egrep -v '^ *\+' conftest.er1 >conftest.err
14442   rm -f conftest.er1
14443   cat conftest.err >&5
14444   echo "$as_me:14444: \$? = $ac_status" >&5
14445   (exit $ac_status); } >/dev/null; then
14446   if test -s conftest.err; then
14447     ac_cpp_err=$ac_c_preproc_warn_flag
14448   else
14449     ac_cpp_err=
14450   fi
14451 else
14452   ac_cpp_err=yes
14453 fi
14454 if test -z "$ac_cpp_err"; then
14455   eval "$as_ac_Header=yes"
14456 else
14457   echo "$as_me: failed program was:" >&5
14458   cat conftest.$ac_ext >&5
14459   eval "$as_ac_Header=no"
14460 fi
14461 rm -f conftest.err conftest.$ac_ext
14462 fi
14463 echo "$as_me:14463: result: `eval echo '${'$as_ac_Header'}'`" >&5
14464 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14465 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14466   cat >>confdefs.h <<EOF
14467 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14468 EOF
14469
14470 fi
14471 done
14472
14473 for ac_header in unistd.h getopt.h
14474 do
14475 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14476 echo "$as_me:14476: checking for $ac_header" >&5
14477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14479   echo $ECHO_N "(cached) $ECHO_C" >&6
14480 else
14481   cat >conftest.$ac_ext <<_ACEOF
14482 #line 14482 "configure"
14483 #include "confdefs.h"
14484 #include <$ac_header>
14485 _ACEOF
14486 if { (eval echo "$as_me:14486: \"$ac_cpp conftest.$ac_ext\"") >&5
14487   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14488   ac_status=$?
14489   egrep -v '^ *\+' conftest.er1 >conftest.err
14490   rm -f conftest.er1
14491   cat conftest.err >&5
14492   echo "$as_me:14492: \$? = $ac_status" >&5
14493   (exit $ac_status); } >/dev/null; then
14494   if test -s conftest.err; then
14495     ac_cpp_err=$ac_c_preproc_warn_flag
14496   else
14497     ac_cpp_err=
14498   fi
14499 else
14500   ac_cpp_err=yes
14501 fi
14502 if test -z "$ac_cpp_err"; then
14503   eval "$as_ac_Header=yes"
14504 else
14505   echo "$as_me: failed program was:" >&5
14506   cat conftest.$ac_ext >&5
14507   eval "$as_ac_Header=no"
14508 fi
14509 rm -f conftest.err conftest.$ac_ext
14510 fi
14511 echo "$as_me:14511: result: `eval echo '${'$as_ac_Header'}'`" >&5
14512 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14513 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14514   cat >>confdefs.h <<EOF
14515 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14516 EOF
14517
14518 fi
14519 done
14520
14521 echo "$as_me:14521: checking for header declaring getopt variables" >&5
14522 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14523 if test "${cf_cv_getopt_header+set}" = set; then
14524   echo $ECHO_N "(cached) $ECHO_C" >&6
14525 else
14526
14527 cf_cv_getopt_header=none
14528 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14529 do
14530 cat >conftest.$ac_ext <<_ACEOF
14531 #line 14531 "configure"
14532 #include "confdefs.h"
14533
14534 #include <$cf_header>
14535 int
14536 main ()
14537 {
14538 int x = optind; char *y = optarg
14539   ;
14540   return 0;
14541 }
14542 _ACEOF
14543 rm -f conftest.$ac_objext
14544 if { (eval echo "$as_me:14544: \"$ac_compile\"") >&5
14545   (eval $ac_compile) 2>&5
14546   ac_status=$?
14547   echo "$as_me:14547: \$? = $ac_status" >&5
14548   (exit $ac_status); } &&
14549          { ac_try='test -s conftest.$ac_objext'
14550   { (eval echo "$as_me:14550: \"$ac_try\"") >&5
14551   (eval $ac_try) 2>&5
14552   ac_status=$?
14553   echo "$as_me:14553: \$? = $ac_status" >&5
14554   (exit $ac_status); }; }; then
14555   cf_cv_getopt_header=$cf_header
14556  break
14557 else
14558   echo "$as_me: failed program was:" >&5
14559 cat conftest.$ac_ext >&5
14560 fi
14561 rm -f conftest.$ac_objext conftest.$ac_ext
14562 done
14563
14564 fi
14565 echo "$as_me:14565: result: $cf_cv_getopt_header" >&5
14566 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14567 if test $cf_cv_getopt_header != none ; then
14568
14569 cat >>confdefs.h <<\EOF
14570 #define HAVE_GETOPT_HEADER 1
14571 EOF
14572
14573 fi
14574
14575 # check for ISC (this may also define _POSIX_SOURCE)
14576 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14577 if test "x$ISC" = xyes ; then
14578
14579 echo "$as_me:14579: checking for main in -lcposix" >&5
14580 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14581 if test "${ac_cv_lib_cposix_main+set}" = set; then
14582   echo $ECHO_N "(cached) $ECHO_C" >&6
14583 else
14584   ac_check_lib_save_LIBS=$LIBS
14585 LIBS="-lcposix  $LIBS"
14586 cat >conftest.$ac_ext <<_ACEOF
14587 #line 14587 "configure"
14588 #include "confdefs.h"
14589
14590 int
14591 main ()
14592 {
14593 main ();
14594   ;
14595   return 0;
14596 }
14597 _ACEOF
14598 rm -f conftest.$ac_objext conftest$ac_exeext
14599 if { (eval echo "$as_me:14599: \"$ac_link\"") >&5
14600   (eval $ac_link) 2>&5
14601   ac_status=$?
14602   echo "$as_me:14602: \$? = $ac_status" >&5
14603   (exit $ac_status); } &&
14604          { ac_try='test -s conftest$ac_exeext'
14605   { (eval echo "$as_me:14605: \"$ac_try\"") >&5
14606   (eval $ac_try) 2>&5
14607   ac_status=$?
14608   echo "$as_me:14608: \$? = $ac_status" >&5
14609   (exit $ac_status); }; }; then
14610   ac_cv_lib_cposix_main=yes
14611 else
14612   echo "$as_me: failed program was:" >&5
14613 cat conftest.$ac_ext >&5
14614 ac_cv_lib_cposix_main=no
14615 fi
14616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14617 LIBS=$ac_check_lib_save_LIBS
14618 fi
14619 echo "$as_me:14619: result: $ac_cv_lib_cposix_main" >&5
14620 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14621 if test $ac_cv_lib_cposix_main = yes; then
14622   cat >>confdefs.h <<EOF
14623 #define HAVE_LIBCPOSIX 1
14624 EOF
14625
14626   LIBS="-lcposix $LIBS"
14627
14628 fi
14629
14630         echo "$as_me:14630: checking for bzero in -linet" >&5
14631 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14632 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14633   echo $ECHO_N "(cached) $ECHO_C" >&6
14634 else
14635   ac_check_lib_save_LIBS=$LIBS
14636 LIBS="-linet  $LIBS"
14637 cat >conftest.$ac_ext <<_ACEOF
14638 #line 14638 "configure"
14639 #include "confdefs.h"
14640
14641 /* Override any gcc2 internal prototype to avoid an error.  */
14642 #ifdef __cplusplus
14643 extern "C"
14644 #endif
14645 /* We use char because int might match the return type of a gcc2
14646    builtin and then its argument prototype would still apply.  */
14647 char bzero ();
14648 int
14649 main ()
14650 {
14651 bzero ();
14652   ;
14653   return 0;
14654 }
14655 _ACEOF
14656 rm -f conftest.$ac_objext conftest$ac_exeext
14657 if { (eval echo "$as_me:14657: \"$ac_link\"") >&5
14658   (eval $ac_link) 2>&5
14659   ac_status=$?
14660   echo "$as_me:14660: \$? = $ac_status" >&5
14661   (exit $ac_status); } &&
14662          { ac_try='test -s conftest$ac_exeext'
14663   { (eval echo "$as_me:14663: \"$ac_try\"") >&5
14664   (eval $ac_try) 2>&5
14665   ac_status=$?
14666   echo "$as_me:14666: \$? = $ac_status" >&5
14667   (exit $ac_status); }; }; then
14668   ac_cv_lib_inet_bzero=yes
14669 else
14670   echo "$as_me: failed program was:" >&5
14671 cat conftest.$ac_ext >&5
14672 ac_cv_lib_inet_bzero=no
14673 fi
14674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14675 LIBS=$ac_check_lib_save_LIBS
14676 fi
14677 echo "$as_me:14677: result: $ac_cv_lib_inet_bzero" >&5
14678 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14679 if test $ac_cv_lib_inet_bzero = yes; then
14680   LIBS="-linet $LIBS"
14681 fi
14682 fi
14683
14684 echo "$as_me:14684: checking if sys/time.h works with sys/select.h" >&5
14685 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14686 if test "${cf_cv_sys_time_select+set}" = set; then
14687   echo $ECHO_N "(cached) $ECHO_C" >&6
14688 else
14689
14690 cat >conftest.$ac_ext <<_ACEOF
14691 #line 14691 "configure"
14692 #include "confdefs.h"
14693
14694 #include <sys/types.h>
14695 #ifdef HAVE_SYS_TIME_H
14696 #include <sys/time.h>
14697 #endif
14698 #ifdef HAVE_SYS_SELECT_H
14699 #include <sys/select.h>
14700 #endif
14701
14702 int
14703 main ()
14704 {
14705
14706   ;
14707   return 0;
14708 }
14709 _ACEOF
14710 rm -f conftest.$ac_objext
14711 if { (eval echo "$as_me:14711: \"$ac_compile\"") >&5
14712   (eval $ac_compile) 2>&5
14713   ac_status=$?
14714   echo "$as_me:14714: \$? = $ac_status" >&5
14715   (exit $ac_status); } &&
14716          { ac_try='test -s conftest.$ac_objext'
14717   { (eval echo "$as_me:14717: \"$ac_try\"") >&5
14718   (eval $ac_try) 2>&5
14719   ac_status=$?
14720   echo "$as_me:14720: \$? = $ac_status" >&5
14721   (exit $ac_status); }; }; then
14722   cf_cv_sys_time_select=yes
14723 else
14724   echo "$as_me: failed program was:" >&5
14725 cat conftest.$ac_ext >&5
14726 cf_cv_sys_time_select=no
14727 fi
14728 rm -f conftest.$ac_objext conftest.$ac_ext
14729
14730 fi
14731
14732 echo "$as_me:14732: result: $cf_cv_sys_time_select" >&5
14733 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14734 test "$cf_cv_sys_time_select" = yes &&
14735 cat >>confdefs.h <<\EOF
14736 #define HAVE_SYS_TIME_SELECT 1
14737 EOF
14738
14739 ###     checks for compiler characteristics
14740 ac_ext=c
14741 ac_cpp='$CPP $CPPFLAGS'
14742 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14743 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14744 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14745 ac_main_return=return
14746
14747 echo "$as_me:14747: checking for an ANSI C-conforming const" >&5
14748 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14749 if test "${ac_cv_c_const+set}" = set; then
14750   echo $ECHO_N "(cached) $ECHO_C" >&6
14751 else
14752   cat >conftest.$ac_ext <<_ACEOF
14753 #line 14753 "configure"
14754 #include "confdefs.h"
14755
14756 int
14757 main ()
14758 {
14759 /* FIXME: Include the comments suggested by Paul. */
14760 #ifndef __cplusplus
14761   /* Ultrix mips cc rejects this.  */
14762   typedef int charset[2];
14763   const charset x;
14764   /* SunOS 4.1.1 cc rejects this.  */
14765   char const *const *ccp;
14766   char **p;
14767   /* NEC SVR4.0.2 mips cc rejects this.  */
14768   struct point {int x, y;};
14769   static struct point const zero = {0,0};
14770   /* AIX XL C 1.02.0.0 rejects this.
14771      It does not let you subtract one const X* pointer from another in
14772      an arm of an if-expression whose if-part is not a constant
14773      expression */
14774   const char *g = "string";
14775   ccp = &g + (g ? g-g : 0);
14776   /* HPUX 7.0 cc rejects these. */
14777   ++ccp;
14778   p = (char**) ccp;
14779   ccp = (char const *const *) p;
14780   { /* SCO 3.2v4 cc rejects this.  */
14781     char *t;
14782     char const *s = 0 ? (char *) 0 : (char const *) 0;
14783
14784     *t++ = 0;
14785   }
14786   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14787     int x[] = {25, 17};
14788     const int *foo = &x[0];
14789     ++foo;
14790   }
14791   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14792     typedef const int *iptr;
14793     iptr p = 0;
14794     ++p;
14795   }
14796   { /* AIX XL C 1.02.0.0 rejects this saying
14797        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14798     struct s { int j; const int *ap[3]; };
14799     struct s *b; b->j = 5;
14800   }
14801   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14802     const int foo = 10;
14803   }
14804 #endif
14805
14806   ;
14807   return 0;
14808 }
14809 _ACEOF
14810 rm -f conftest.$ac_objext
14811 if { (eval echo "$as_me:14811: \"$ac_compile\"") >&5
14812   (eval $ac_compile) 2>&5
14813   ac_status=$?
14814   echo "$as_me:14814: \$? = $ac_status" >&5
14815   (exit $ac_status); } &&
14816          { ac_try='test -s conftest.$ac_objext'
14817   { (eval echo "$as_me:14817: \"$ac_try\"") >&5
14818   (eval $ac_try) 2>&5
14819   ac_status=$?
14820   echo "$as_me:14820: \$? = $ac_status" >&5
14821   (exit $ac_status); }; }; then
14822   ac_cv_c_const=yes
14823 else
14824   echo "$as_me: failed program was:" >&5
14825 cat conftest.$ac_ext >&5
14826 ac_cv_c_const=no
14827 fi
14828 rm -f conftest.$ac_objext conftest.$ac_ext
14829 fi
14830 echo "$as_me:14830: result: $ac_cv_c_const" >&5
14831 echo "${ECHO_T}$ac_cv_c_const" >&6
14832 if test $ac_cv_c_const = no; then
14833
14834 cat >>confdefs.h <<\EOF
14835 #define const
14836 EOF
14837
14838 fi
14839
14840 echo "$as_me:14840: checking for inline" >&5
14841 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14842 if test "${ac_cv_c_inline+set}" = set; then
14843   echo $ECHO_N "(cached) $ECHO_C" >&6
14844 else
14845   ac_cv_c_inline=no
14846 for ac_kw in inline __inline__ __inline; do
14847   cat >conftest.$ac_ext <<_ACEOF
14848 #line 14848 "configure"
14849 #include "confdefs.h"
14850 #ifndef __cplusplus
14851 static $ac_kw int static_foo () {return 0; }
14852 $ac_kw int foo () {return 0; }
14853 #endif
14854
14855 _ACEOF
14856 rm -f conftest.$ac_objext
14857 if { (eval echo "$as_me:14857: \"$ac_compile\"") >&5
14858   (eval $ac_compile) 2>&5
14859   ac_status=$?
14860   echo "$as_me:14860: \$? = $ac_status" >&5
14861   (exit $ac_status); } &&
14862          { ac_try='test -s conftest.$ac_objext'
14863   { (eval echo "$as_me:14863: \"$ac_try\"") >&5
14864   (eval $ac_try) 2>&5
14865   ac_status=$?
14866   echo "$as_me:14866: \$? = $ac_status" >&5
14867   (exit $ac_status); }; }; then
14868   ac_cv_c_inline=$ac_kw; break
14869 else
14870   echo "$as_me: failed program was:" >&5
14871 cat conftest.$ac_ext >&5
14872 fi
14873 rm -f conftest.$ac_objext conftest.$ac_ext
14874 done
14875
14876 fi
14877 echo "$as_me:14877: result: $ac_cv_c_inline" >&5
14878 echo "${ECHO_T}$ac_cv_c_inline" >&6
14879 case $ac_cv_c_inline in
14880   inline | yes) ;;
14881   no)
14882 cat >>confdefs.h <<\EOF
14883 #define inline
14884 EOF
14885  ;;
14886   *)  cat >>confdefs.h <<EOF
14887 #define inline $ac_cv_c_inline
14888 EOF
14889  ;;
14890 esac
14891
14892 NCURSES_INLINE=
14893 if test "$ac_cv_c_inline" != no ; then
14894   NCURSES_INLINE=inline
14895   if test "$INTEL_COMPILER" = yes
14896   then
14897     :
14898   elif test "$CLANG_COMPILER" = yes
14899   then
14900     :
14901   elif test "$GCC" = yes
14902   then
14903     echo "$as_me:14903: checking if $CC supports options to tune inlining" >&5
14904 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14905 if test "${cf_cv_gcc_inline+set}" = set; then
14906   echo $ECHO_N "(cached) $ECHO_C" >&6
14907 else
14908
14909       cf_save_CFLAGS=$CFLAGS
14910       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14911       cat >conftest.$ac_ext <<_ACEOF
14912 #line 14912 "configure"
14913 #include "confdefs.h"
14914 inline int foo(void) { return 1; }
14915 int
14916 main ()
14917 {
14918 ${cf_cv_main_return:-return} foo()
14919   ;
14920   return 0;
14921 }
14922 _ACEOF
14923 rm -f conftest.$ac_objext
14924 if { (eval echo "$as_me:14924: \"$ac_compile\"") >&5
14925   (eval $ac_compile) 2>&5
14926   ac_status=$?
14927   echo "$as_me:14927: \$? = $ac_status" >&5
14928   (exit $ac_status); } &&
14929          { ac_try='test -s conftest.$ac_objext'
14930   { (eval echo "$as_me:14930: \"$ac_try\"") >&5
14931   (eval $ac_try) 2>&5
14932   ac_status=$?
14933   echo "$as_me:14933: \$? = $ac_status" >&5
14934   (exit $ac_status); }; }; then
14935   cf_cv_gcc_inline=yes
14936 else
14937   echo "$as_me: failed program was:" >&5
14938 cat conftest.$ac_ext >&5
14939 cf_cv_gcc_inline=no
14940 fi
14941 rm -f conftest.$ac_objext conftest.$ac_ext
14942       CFLAGS=$cf_save_CFLAGS
14943
14944 fi
14945 echo "$as_me:14945: result: $cf_cv_gcc_inline" >&5
14946 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14947     if test "$cf_cv_gcc_inline" = yes ; then
14948
14949 cf_fix_cppflags=no
14950 cf_new_cflags=
14951 cf_new_cppflags=
14952 cf_new_extra_cppflags=
14953
14954 for cf_add_cflags in --param max-inline-insns-single=1200
14955 do
14956 case $cf_fix_cppflags in
14957 no)
14958         case $cf_add_cflags in #(vi
14959         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14960                 case $cf_add_cflags in
14961                 -D*)
14962                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14963
14964                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14965                                 && test -z "${cf_tst_cflags}" \
14966                                 && cf_fix_cppflags=yes
14967
14968                         if test $cf_fix_cppflags = yes ; then
14969                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14970                                 continue
14971                         elif test "${cf_tst_cflags}" = "\"'" ; then
14972                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14973                                 continue
14974                         fi
14975                         ;;
14976                 esac
14977                 case "$CPPFLAGS" in
14978                 *$cf_add_cflags) #(vi
14979                         ;;
14980                 *) #(vi
14981                         case $cf_add_cflags in #(vi
14982                         -D*)
14983                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14984
14985 CPPFLAGS=`echo "$CPPFLAGS" | \
14986         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14987                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14988
14989                                 ;;
14990                         esac
14991                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14992                         ;;
14993                 esac
14994                 ;;
14995         *)
14996                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14997                 ;;
14998         esac
14999         ;;
15000 yes)
15001         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15002
15003         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15004
15005         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15006                 && test -z "${cf_tst_cflags}" \
15007                 && cf_fix_cppflags=no
15008         ;;
15009 esac
15010 done
15011
15012 if test -n "$cf_new_cflags" ; then
15013
15014         CFLAGS="$CFLAGS $cf_new_cflags"
15015 fi
15016
15017 if test -n "$cf_new_cppflags" ; then
15018
15019         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15020 fi
15021
15022 if test -n "$cf_new_extra_cppflags" ; then
15023
15024         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15025 fi
15026
15027     fi
15028   fi
15029 fi
15030
15031 echo "$as_me:15031: checking for signal global datatype" >&5
15032 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15033 if test "${cf_cv_sig_atomic_t+set}" = set; then
15034   echo $ECHO_N "(cached) $ECHO_C" >&6
15035 else
15036
15037         for cf_type in \
15038                 "volatile sig_atomic_t" \
15039                 "sig_atomic_t" \
15040                 "int"
15041         do
15042         cat >conftest.$ac_ext <<_ACEOF
15043 #line 15043 "configure"
15044 #include "confdefs.h"
15045
15046 #include <sys/types.h>
15047 #include <signal.h>
15048 #include <stdio.h>
15049
15050 extern $cf_type x;
15051 $cf_type x;
15052 static void handler(int sig)
15053 {
15054         x = 5;
15055 }
15056 int
15057 main ()
15058 {
15059 signal(SIGINT, handler);
15060                  x = 1
15061   ;
15062   return 0;
15063 }
15064 _ACEOF
15065 rm -f conftest.$ac_objext
15066 if { (eval echo "$as_me:15066: \"$ac_compile\"") >&5
15067   (eval $ac_compile) 2>&5
15068   ac_status=$?
15069   echo "$as_me:15069: \$? = $ac_status" >&5
15070   (exit $ac_status); } &&
15071          { ac_try='test -s conftest.$ac_objext'
15072   { (eval echo "$as_me:15072: \"$ac_try\"") >&5
15073   (eval $ac_try) 2>&5
15074   ac_status=$?
15075   echo "$as_me:15075: \$? = $ac_status" >&5
15076   (exit $ac_status); }; }; then
15077   cf_cv_sig_atomic_t=$cf_type
15078 else
15079   echo "$as_me: failed program was:" >&5
15080 cat conftest.$ac_ext >&5
15081 cf_cv_sig_atomic_t=no
15082 fi
15083 rm -f conftest.$ac_objext conftest.$ac_ext
15084                 test "$cf_cv_sig_atomic_t" != no && break
15085         done
15086
15087 fi
15088
15089 echo "$as_me:15089: result: $cf_cv_sig_atomic_t" >&5
15090 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15091 test "$cf_cv_sig_atomic_t" != no &&
15092 cat >>confdefs.h <<EOF
15093 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15094 EOF
15095
15096 if test $NCURSES_CHTYPE = auto ; then
15097
15098 echo "$as_me:15098: checking for type of chtype" >&5
15099 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15100 if test "${cf_cv_typeof_chtype+set}" = set; then
15101   echo $ECHO_N "(cached) $ECHO_C" >&6
15102 else
15103
15104                 if test "$cross_compiling" = yes; then
15105   cf_cv_typeof_chtype=long
15106 else
15107   cat >conftest.$ac_ext <<_ACEOF
15108 #line 15108 "configure"
15109 #include "confdefs.h"
15110
15111 #define WANT_BITS 31
15112 #include <stdio.h>
15113 int main()
15114 {
15115         FILE *fp = fopen("cf_test.out", "w");
15116         if (fp != 0) {
15117                 char *result = "long";
15118                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15119                         int n;
15120                         unsigned int x, y;
15121                         for (n = 0; n < WANT_BITS; n++) {
15122                                 x = (1 << n);
15123                                 y = (x >> n);
15124                                 if (y != 1 || x == 0) {
15125                                         x = 0;
15126                                         break;
15127                                 }
15128                         }
15129                         /*
15130                          * If x is nonzero, an int is big enough for the bits
15131                          * that we want.
15132                          */
15133                         result = (x != 0) ? "int" : "long";
15134                 }
15135                 fputs(result, fp);
15136                 fclose(fp);
15137         }
15138         ${cf_cv_main_return:-return}(0);
15139 }
15140
15141 _ACEOF
15142 rm -f conftest$ac_exeext
15143 if { (eval echo "$as_me:15143: \"$ac_link\"") >&5
15144   (eval $ac_link) 2>&5
15145   ac_status=$?
15146   echo "$as_me:15146: \$? = $ac_status" >&5
15147   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15148   { (eval echo "$as_me:15148: \"$ac_try\"") >&5
15149   (eval $ac_try) 2>&5
15150   ac_status=$?
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit $ac_status); }; }; then
15153   cf_cv_typeof_chtype=`cat cf_test.out`
15154 else
15155   echo "$as_me: program exited with status $ac_status" >&5
15156 echo "$as_me: failed program was:" >&5
15157 cat conftest.$ac_ext >&5
15158 cf_cv_typeof_chtype=long
15159 fi
15160 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15161 fi
15162                 rm -f cf_test.out
15163
15164 fi
15165
15166 echo "$as_me:15166: result: $cf_cv_typeof_chtype" >&5
15167 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15168
15169 cat >>confdefs.h <<EOF
15170 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15171 EOF
15172
15173 else
15174         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15175 fi
15176 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15177
15178 echo "$as_me:15178: checking if unsigned literals are legal" >&5
15179 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15180 if test "${cf_cv_unsigned_literals+set}" = set; then
15181   echo $ECHO_N "(cached) $ECHO_C" >&6
15182 else
15183
15184         cat >conftest.$ac_ext <<_ACEOF
15185 #line 15185 "configure"
15186 #include "confdefs.h"
15187
15188 int
15189 main ()
15190 {
15191 long x = 1L + 1UL + 1U + 1
15192   ;
15193   return 0;
15194 }
15195 _ACEOF
15196 rm -f conftest.$ac_objext
15197 if { (eval echo "$as_me:15197: \"$ac_compile\"") >&5
15198   (eval $ac_compile) 2>&5
15199   ac_status=$?
15200   echo "$as_me:15200: \$? = $ac_status" >&5
15201   (exit $ac_status); } &&
15202          { ac_try='test -s conftest.$ac_objext'
15203   { (eval echo "$as_me:15203: \"$ac_try\"") >&5
15204   (eval $ac_try) 2>&5
15205   ac_status=$?
15206   echo "$as_me:15206: \$? = $ac_status" >&5
15207   (exit $ac_status); }; }; then
15208   cf_cv_unsigned_literals=yes
15209 else
15210   echo "$as_me: failed program was:" >&5
15211 cat conftest.$ac_ext >&5
15212 cf_cv_unsigned_literals=no
15213 fi
15214 rm -f conftest.$ac_objext conftest.$ac_ext
15215
15216 fi
15217
15218 echo "$as_me:15218: result: $cf_cv_unsigned_literals" >&5
15219 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15220
15221 cf_cv_1UL="1"
15222 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15223 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15224
15225 if test $NCURSES_MMASK_T = auto ; then
15226         cf_cv_typeof_mmask_t=long
15227 else
15228         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15229 fi
15230 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15231
15232 ###     Checks for external-data
15233
15234 echo "$as_me:15234: checking if external errno is declared" >&5
15235 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15236 if test "${cf_cv_dcl_errno+set}" = set; then
15237   echo $ECHO_N "(cached) $ECHO_C" >&6
15238 else
15239
15240     cat >conftest.$ac_ext <<_ACEOF
15241 #line 15241 "configure"
15242 #include "confdefs.h"
15243
15244 #ifdef HAVE_STDLIB_H
15245 #include <stdlib.h>
15246 #endif
15247 #include <stdio.h>
15248 #include <sys/types.h>
15249 #include <errno.h>
15250 int
15251 main ()
15252 {
15253 int x = (int) errno
15254   ;
15255   return 0;
15256 }
15257 _ACEOF
15258 rm -f conftest.$ac_objext
15259 if { (eval echo "$as_me:15259: \"$ac_compile\"") >&5
15260   (eval $ac_compile) 2>&5
15261   ac_status=$?
15262   echo "$as_me:15262: \$? = $ac_status" >&5
15263   (exit $ac_status); } &&
15264          { ac_try='test -s conftest.$ac_objext'
15265   { (eval echo "$as_me:15265: \"$ac_try\"") >&5
15266   (eval $ac_try) 2>&5
15267   ac_status=$?
15268   echo "$as_me:15268: \$? = $ac_status" >&5
15269   (exit $ac_status); }; }; then
15270   cf_cv_dcl_errno=yes
15271 else
15272   echo "$as_me: failed program was:" >&5
15273 cat conftest.$ac_ext >&5
15274 cf_cv_dcl_errno=no
15275 fi
15276 rm -f conftest.$ac_objext conftest.$ac_ext
15277
15278 fi
15279 echo "$as_me:15279: result: $cf_cv_dcl_errno" >&5
15280 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15281
15282 if test "$cf_cv_dcl_errno" = no ; then
15283
15284 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15285
15286     cat >>confdefs.h <<EOF
15287 #define $cf_result 1
15288 EOF
15289
15290 fi
15291
15292 # It's possible (for near-UNIX clones) that the data doesn't exist
15293
15294 echo "$as_me:15294: checking if external errno exists" >&5
15295 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15296 if test "${cf_cv_have_errno+set}" = set; then
15297   echo $ECHO_N "(cached) $ECHO_C" >&6
15298 else
15299
15300     cat >conftest.$ac_ext <<_ACEOF
15301 #line 15301 "configure"
15302 #include "confdefs.h"
15303
15304 #undef errno
15305 extern int errno;
15306
15307 int
15308 main ()
15309 {
15310 errno = 2
15311   ;
15312   return 0;
15313 }
15314 _ACEOF
15315 rm -f conftest.$ac_objext conftest$ac_exeext
15316 if { (eval echo "$as_me:15316: \"$ac_link\"") >&5
15317   (eval $ac_link) 2>&5
15318   ac_status=$?
15319   echo "$as_me:15319: \$? = $ac_status" >&5
15320   (exit $ac_status); } &&
15321          { ac_try='test -s conftest$ac_exeext'
15322   { (eval echo "$as_me:15322: \"$ac_try\"") >&5
15323   (eval $ac_try) 2>&5
15324   ac_status=$?
15325   echo "$as_me:15325: \$? = $ac_status" >&5
15326   (exit $ac_status); }; }; then
15327   cf_cv_have_errno=yes
15328 else
15329   echo "$as_me: failed program was:" >&5
15330 cat conftest.$ac_ext >&5
15331 cf_cv_have_errno=no
15332 fi
15333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15334
15335 fi
15336 echo "$as_me:15336: result: $cf_cv_have_errno" >&5
15337 echo "${ECHO_T}$cf_cv_have_errno" >&6
15338
15339 if test "$cf_cv_have_errno" = yes ; then
15340
15341 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15342
15343     cat >>confdefs.h <<EOF
15344 #define $cf_result 1
15345 EOF
15346
15347 fi
15348
15349 echo "$as_me:15349: checking if data-only library module links" >&5
15350 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15351 if test "${cf_cv_link_dataonly+set}" = set; then
15352   echo $ECHO_N "(cached) $ECHO_C" >&6
15353 else
15354
15355         rm -f conftest.a
15356         cat >conftest.$ac_ext <<EOF
15357 #line 15357 "configure"
15358 int     testdata[3] = { 123, 456, 789 };
15359 EOF
15360         if { (eval echo "$as_me:15360: \"$ac_compile\"") >&5
15361   (eval $ac_compile) 2>&5
15362   ac_status=$?
15363   echo "$as_me:15363: \$? = $ac_status" >&5
15364   (exit $ac_status); } ; then
15365                 mv conftest.o data.o && \
15366                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15367         fi
15368         rm -f conftest.$ac_ext data.o
15369         cat >conftest.$ac_ext <<EOF
15370 #line 15370 "configure"
15371 int     testfunc()
15372 {
15373 #if defined(NeXT)
15374         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15375 #else
15376         extern int testdata[3];
15377         return testdata[0] == 123
15378            &&  testdata[1] == 456
15379            &&  testdata[2] == 789;
15380 #endif
15381 }
15382 EOF
15383         if { (eval echo "$as_me:15383: \"$ac_compile\"") >&5
15384   (eval $ac_compile) 2>&5
15385   ac_status=$?
15386   echo "$as_me:15386: \$? = $ac_status" >&5
15387   (exit $ac_status); }; then
15388                 mv conftest.o func.o && \
15389                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15390         fi
15391         rm -f conftest.$ac_ext func.o
15392         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15393         cf_saveLIBS="$LIBS"
15394         LIBS="conftest.a $LIBS"
15395         if test "$cross_compiling" = yes; then
15396   cf_cv_link_dataonly=unknown
15397 else
15398   cat >conftest.$ac_ext <<_ACEOF
15399 #line 15399 "configure"
15400 #include "confdefs.h"
15401
15402         int main()
15403         {
15404                 extern int testfunc();
15405                 ${cf_cv_main_return:-return} (!testfunc());
15406         }
15407
15408 _ACEOF
15409 rm -f conftest$ac_exeext
15410 if { (eval echo "$as_me:15410: \"$ac_link\"") >&5
15411   (eval $ac_link) 2>&5
15412   ac_status=$?
15413   echo "$as_me:15413: \$? = $ac_status" >&5
15414   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15415   { (eval echo "$as_me:15415: \"$ac_try\"") >&5
15416   (eval $ac_try) 2>&5
15417   ac_status=$?
15418   echo "$as_me:15418: \$? = $ac_status" >&5
15419   (exit $ac_status); }; }; then
15420   cf_cv_link_dataonly=yes
15421 else
15422   echo "$as_me: program exited with status $ac_status" >&5
15423 echo "$as_me: failed program was:" >&5
15424 cat conftest.$ac_ext >&5
15425 cf_cv_link_dataonly=no
15426 fi
15427 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15428 fi
15429         LIBS="$cf_saveLIBS"
15430
15431 fi
15432
15433 echo "$as_me:15433: result: $cf_cv_link_dataonly" >&5
15434 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15435
15436 if test "$cf_cv_link_dataonly" = no ; then
15437
15438 cat >>confdefs.h <<\EOF
15439 #define BROKEN_LINKER 1
15440 EOF
15441
15442         BROKEN_LINKER=1
15443 fi
15444
15445 ###     Checks for library functions.
15446
15447 for ac_func in \
15448 getcwd \
15449 getegid \
15450 geteuid \
15451 getttynam \
15452 issetugid \
15453 poll \
15454 putenv \
15455 remove \
15456 select \
15457 setbuf \
15458 setbuffer \
15459 setenv \
15460 setvbuf \
15461 sigaction \
15462 sigvec \
15463 strdup \
15464 strstr \
15465 tcgetpgrp \
15466 times \
15467 vsnprintf \
15468
15469 do
15470 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15471 echo "$as_me:15471: checking for $ac_func" >&5
15472 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15473 if eval "test \"\${$as_ac_var+set}\" = set"; then
15474   echo $ECHO_N "(cached) $ECHO_C" >&6
15475 else
15476   cat >conftest.$ac_ext <<_ACEOF
15477 #line 15477 "configure"
15478 #include "confdefs.h"
15479 /* System header to define __stub macros and hopefully few prototypes,
15480     which can conflict with char $ac_func (); below.  */
15481 #include <assert.h>
15482 /* Override any gcc2 internal prototype to avoid an error.  */
15483 #ifdef __cplusplus
15484 extern "C"
15485 #endif
15486 /* We use char because int might match the return type of a gcc2
15487    builtin and then its argument prototype would still apply.  */
15488 char $ac_func ();
15489 char (*f) ();
15490
15491 int
15492 main ()
15493 {
15494 /* The GNU C library defines this for functions which it implements
15495     to always fail with ENOSYS.  Some functions are actually named
15496     something starting with __ and the normal name is an alias.  */
15497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15498 choke me
15499 #else
15500 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15501 #endif
15502
15503   ;
15504   return 0;
15505 }
15506 _ACEOF
15507 rm -f conftest.$ac_objext conftest$ac_exeext
15508 if { (eval echo "$as_me:15508: \"$ac_link\"") >&5
15509   (eval $ac_link) 2>&5
15510   ac_status=$?
15511   echo "$as_me:15511: \$? = $ac_status" >&5
15512   (exit $ac_status); } &&
15513          { ac_try='test -s conftest$ac_exeext'
15514   { (eval echo "$as_me:15514: \"$ac_try\"") >&5
15515   (eval $ac_try) 2>&5
15516   ac_status=$?
15517   echo "$as_me:15517: \$? = $ac_status" >&5
15518   (exit $ac_status); }; }; then
15519   eval "$as_ac_var=yes"
15520 else
15521   echo "$as_me: failed program was:" >&5
15522 cat conftest.$ac_ext >&5
15523 eval "$as_ac_var=no"
15524 fi
15525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15526 fi
15527 echo "$as_me:15527: result: `eval echo '${'$as_ac_var'}'`" >&5
15528 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15529 if test `eval echo '${'$as_ac_var'}'` = yes; then
15530   cat >>confdefs.h <<EOF
15531 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15532 EOF
15533
15534 fi
15535 done
15536
15537 if test "x$with_getcap" = "xyes" ; then
15538
15539 echo "$as_me:15539: checking for terminal-capability database functions" >&5
15540 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15541 if test "${cf_cv_cgetent+set}" = set; then
15542   echo $ECHO_N "(cached) $ECHO_C" >&6
15543 else
15544
15545 cat >conftest.$ac_ext <<_ACEOF
15546 #line 15546 "configure"
15547 #include "confdefs.h"
15548
15549 #include <stdlib.h>
15550 int
15551 main ()
15552 {
15553
15554         char temp[128];
15555         char *buf = temp;
15556         char *db_array = temp;
15557         cgetent(&buf, &db_array, "vt100");
15558         cgetcap(buf, "tc", '=');
15559         cgetmatch(buf, "tc");
15560
15561   ;
15562   return 0;
15563 }
15564 _ACEOF
15565 rm -f conftest.$ac_objext conftest$ac_exeext
15566 if { (eval echo "$as_me:15566: \"$ac_link\"") >&5
15567   (eval $ac_link) 2>&5
15568   ac_status=$?
15569   echo "$as_me:15569: \$? = $ac_status" >&5
15570   (exit $ac_status); } &&
15571          { ac_try='test -s conftest$ac_exeext'
15572   { (eval echo "$as_me:15572: \"$ac_try\"") >&5
15573   (eval $ac_try) 2>&5
15574   ac_status=$?
15575   echo "$as_me:15575: \$? = $ac_status" >&5
15576   (exit $ac_status); }; }; then
15577   cf_cv_cgetent=yes
15578 else
15579   echo "$as_me: failed program was:" >&5
15580 cat conftest.$ac_ext >&5
15581 cf_cv_cgetent=no
15582 fi
15583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15584
15585 fi
15586 echo "$as_me:15586: result: $cf_cv_cgetent" >&5
15587 echo "${ECHO_T}$cf_cv_cgetent" >&6
15588
15589 if test "$cf_cv_cgetent" = yes
15590 then
15591
15592 cat >>confdefs.h <<\EOF
15593 #define HAVE_BSD_CGETENT 1
15594 EOF
15595
15596 echo "$as_me:15596: checking if cgetent uses const parameter" >&5
15597 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15598 if test "${cf_cv_cgetent_const+set}" = set; then
15599   echo $ECHO_N "(cached) $ECHO_C" >&6
15600 else
15601
15602 cat >conftest.$ac_ext <<_ACEOF
15603 #line 15603 "configure"
15604 #include "confdefs.h"
15605
15606 #include <stdlib.h>
15607 int
15608 main ()
15609 {
15610
15611         char temp[128];
15612         char *buf = temp;
15613 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15614         const char *db_array = temp;
15615         cgetent(&buf, &db_array, "vt100");
15616 #endif
15617         cgetcap(buf, "tc", '=');
15618         cgetmatch(buf, "tc");
15619
15620   ;
15621   return 0;
15622 }
15623 _ACEOF
15624 rm -f conftest.$ac_objext 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); } &&
15630          { ac_try='test -s conftest$ac_exeext'
15631   { (eval echo "$as_me:15631: \"$ac_try\"") >&5
15632   (eval $ac_try) 2>&5
15633   ac_status=$?
15634   echo "$as_me:15634: \$? = $ac_status" >&5
15635   (exit $ac_status); }; }; then
15636   cf_cv_cgetent_const=yes
15637 else
15638   echo "$as_me: failed program was:" >&5
15639 cat conftest.$ac_ext >&5
15640 cf_cv_cgetent_const=no
15641 fi
15642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15643
15644 fi
15645 echo "$as_me:15645: result: $cf_cv_cgetent_const" >&5
15646 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15647         if test "$cf_cv_cgetent_const" = yes
15648         then
15649
15650 cat >>confdefs.h <<EOF
15651 #define CGETENT_CONST const
15652 EOF
15653
15654         fi
15655 fi
15656
15657 fi
15658
15659 echo "$as_me:15659: checking for isascii" >&5
15660 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15661 if test "${cf_cv_have_isascii+set}" = set; then
15662   echo $ECHO_N "(cached) $ECHO_C" >&6
15663 else
15664
15665         cat >conftest.$ac_ext <<_ACEOF
15666 #line 15666 "configure"
15667 #include "confdefs.h"
15668 #include <ctype.h>
15669 int
15670 main ()
15671 {
15672 int x = isascii(' ')
15673   ;
15674   return 0;
15675 }
15676 _ACEOF
15677 rm -f conftest.$ac_objext conftest$ac_exeext
15678 if { (eval echo "$as_me:15678: \"$ac_link\"") >&5
15679   (eval $ac_link) 2>&5
15680   ac_status=$?
15681   echo "$as_me:15681: \$? = $ac_status" >&5
15682   (exit $ac_status); } &&
15683          { ac_try='test -s conftest$ac_exeext'
15684   { (eval echo "$as_me:15684: \"$ac_try\"") >&5
15685   (eval $ac_try) 2>&5
15686   ac_status=$?
15687   echo "$as_me:15687: \$? = $ac_status" >&5
15688   (exit $ac_status); }; }; then
15689   cf_cv_have_isascii=yes
15690 else
15691   echo "$as_me: failed program was:" >&5
15692 cat conftest.$ac_ext >&5
15693 cf_cv_have_isascii=no
15694 fi
15695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15696
15697 fi
15698 echo "$as_me:15698: result: $cf_cv_have_isascii" >&5
15699 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15700 test "$cf_cv_have_isascii" = yes &&
15701 cat >>confdefs.h <<\EOF
15702 #define HAVE_ISASCII 1
15703 EOF
15704
15705 if test "$ac_cv_func_sigaction" = yes; then
15706 echo "$as_me:15706: checking whether sigaction needs _POSIX_SOURCE" >&5
15707 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15708 cat >conftest.$ac_ext <<_ACEOF
15709 #line 15709 "configure"
15710 #include "confdefs.h"
15711
15712 #include <sys/types.h>
15713 #include <signal.h>
15714 int
15715 main ()
15716 {
15717 struct sigaction act
15718   ;
15719   return 0;
15720 }
15721 _ACEOF
15722 rm -f conftest.$ac_objext
15723 if { (eval echo "$as_me:15723: \"$ac_compile\"") >&5
15724   (eval $ac_compile) 2>&5
15725   ac_status=$?
15726   echo "$as_me:15726: \$? = $ac_status" >&5
15727   (exit $ac_status); } &&
15728          { ac_try='test -s conftest.$ac_objext'
15729   { (eval echo "$as_me:15729: \"$ac_try\"") >&5
15730   (eval $ac_try) 2>&5
15731   ac_status=$?
15732   echo "$as_me:15732: \$? = $ac_status" >&5
15733   (exit $ac_status); }; }; then
15734   sigact_bad=no
15735 else
15736   echo "$as_me: failed program was:" >&5
15737 cat conftest.$ac_ext >&5
15738
15739 cat >conftest.$ac_ext <<_ACEOF
15740 #line 15740 "configure"
15741 #include "confdefs.h"
15742
15743 #define _POSIX_SOURCE
15744 #include <sys/types.h>
15745 #include <signal.h>
15746 int
15747 main ()
15748 {
15749 struct sigaction act
15750   ;
15751   return 0;
15752 }
15753 _ACEOF
15754 rm -f conftest.$ac_objext
15755 if { (eval echo "$as_me:15755: \"$ac_compile\"") >&5
15756   (eval $ac_compile) 2>&5
15757   ac_status=$?
15758   echo "$as_me:15758: \$? = $ac_status" >&5
15759   (exit $ac_status); } &&
15760          { ac_try='test -s conftest.$ac_objext'
15761   { (eval echo "$as_me:15761: \"$ac_try\"") >&5
15762   (eval $ac_try) 2>&5
15763   ac_status=$?
15764   echo "$as_me:15764: \$? = $ac_status" >&5
15765   (exit $ac_status); }; }; then
15766   sigact_bad=yes
15767
15768 cat >>confdefs.h <<\EOF
15769 #define _POSIX_SOURCE 1
15770 EOF
15771
15772 else
15773   echo "$as_me: failed program was:" >&5
15774 cat conftest.$ac_ext >&5
15775 sigact_bad=unknown
15776 fi
15777 rm -f conftest.$ac_objext conftest.$ac_ext
15778 fi
15779 rm -f conftest.$ac_objext conftest.$ac_ext
15780 echo "$as_me:15780: result: $sigact_bad" >&5
15781 echo "${ECHO_T}$sigact_bad" >&6
15782 fi
15783
15784 echo "$as_me:15784: checking if nanosleep really works" >&5
15785 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15786 if test "${cf_cv_func_nanosleep+set}" = set; then
15787   echo $ECHO_N "(cached) $ECHO_C" >&6
15788 else
15789
15790 if test "$cross_compiling" = yes; then
15791   cf_cv_func_nanosleep=unknown
15792 else
15793   cat >conftest.$ac_ext <<_ACEOF
15794 #line 15794 "configure"
15795 #include "confdefs.h"
15796
15797 #include <stdio.h>
15798 #include <errno.h>
15799 #include <time.h>
15800
15801 #ifdef HAVE_SYS_TIME_H
15802 #include <sys/time.h>
15803 #endif
15804
15805 int main() {
15806         struct timespec ts1, ts2;
15807         int code;
15808         ts1.tv_sec  = 0;
15809         ts1.tv_nsec = 750000000;
15810         ts2.tv_sec  = 0;
15811         ts2.tv_nsec = 0;
15812         errno = 0;
15813         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15814         ${cf_cv_main_return:-return}(code != 0);
15815 }
15816
15817 _ACEOF
15818 rm -f conftest$ac_exeext
15819 if { (eval echo "$as_me:15819: \"$ac_link\"") >&5
15820   (eval $ac_link) 2>&5
15821   ac_status=$?
15822   echo "$as_me:15822: \$? = $ac_status" >&5
15823   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15824   { (eval echo "$as_me:15824: \"$ac_try\"") >&5
15825   (eval $ac_try) 2>&5
15826   ac_status=$?
15827   echo "$as_me:15827: \$? = $ac_status" >&5
15828   (exit $ac_status); }; }; then
15829   cf_cv_func_nanosleep=yes
15830 else
15831   echo "$as_me: program exited with status $ac_status" >&5
15832 echo "$as_me: failed program was:" >&5
15833 cat conftest.$ac_ext >&5
15834 cf_cv_func_nanosleep=no
15835 fi
15836 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15837 fi
15838 fi
15839 echo "$as_me:15839: result: $cf_cv_func_nanosleep" >&5
15840 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15841
15842 test "$cf_cv_func_nanosleep" = "yes" &&
15843 cat >>confdefs.h <<\EOF
15844 #define HAVE_NANOSLEEP 1
15845 EOF
15846
15847 for ac_header in \
15848 termio.h \
15849 termios.h \
15850 unistd.h \
15851
15852 do
15853 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15854 echo "$as_me:15854: checking for $ac_header" >&5
15855 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15856 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15857   echo $ECHO_N "(cached) $ECHO_C" >&6
15858 else
15859   cat >conftest.$ac_ext <<_ACEOF
15860 #line 15860 "configure"
15861 #include "confdefs.h"
15862 #include <$ac_header>
15863 _ACEOF
15864 if { (eval echo "$as_me:15864: \"$ac_cpp conftest.$ac_ext\"") >&5
15865   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15866   ac_status=$?
15867   egrep -v '^ *\+' conftest.er1 >conftest.err
15868   rm -f conftest.er1
15869   cat conftest.err >&5
15870   echo "$as_me:15870: \$? = $ac_status" >&5
15871   (exit $ac_status); } >/dev/null; then
15872   if test -s conftest.err; then
15873     ac_cpp_err=$ac_c_preproc_warn_flag
15874   else
15875     ac_cpp_err=
15876   fi
15877 else
15878   ac_cpp_err=yes
15879 fi
15880 if test -z "$ac_cpp_err"; then
15881   eval "$as_ac_Header=yes"
15882 else
15883   echo "$as_me: failed program was:" >&5
15884   cat conftest.$ac_ext >&5
15885   eval "$as_ac_Header=no"
15886 fi
15887 rm -f conftest.err conftest.$ac_ext
15888 fi
15889 echo "$as_me:15889: result: `eval echo '${'$as_ac_Header'}'`" >&5
15890 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15891 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15892   cat >>confdefs.h <<EOF
15893 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15894 EOF
15895
15896 fi
15897 done
15898
15899 if test "$ISC" = yes ; then
15900
15901 for ac_header in sys/termio.h
15902 do
15903 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15904 echo "$as_me:15904: checking for $ac_header" >&5
15905 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15906 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15907   echo $ECHO_N "(cached) $ECHO_C" >&6
15908 else
15909   cat >conftest.$ac_ext <<_ACEOF
15910 #line 15910 "configure"
15911 #include "confdefs.h"
15912 #include <$ac_header>
15913 _ACEOF
15914 if { (eval echo "$as_me:15914: \"$ac_cpp conftest.$ac_ext\"") >&5
15915   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15916   ac_status=$?
15917   egrep -v '^ *\+' conftest.er1 >conftest.err
15918   rm -f conftest.er1
15919   cat conftest.err >&5
15920   echo "$as_me:15920: \$? = $ac_status" >&5
15921   (exit $ac_status); } >/dev/null; then
15922   if test -s conftest.err; then
15923     ac_cpp_err=$ac_c_preproc_warn_flag
15924   else
15925     ac_cpp_err=
15926   fi
15927 else
15928   ac_cpp_err=yes
15929 fi
15930 if test -z "$ac_cpp_err"; then
15931   eval "$as_ac_Header=yes"
15932 else
15933   echo "$as_me: failed program was:" >&5
15934   cat conftest.$ac_ext >&5
15935   eval "$as_ac_Header=no"
15936 fi
15937 rm -f conftest.err conftest.$ac_ext
15938 fi
15939 echo "$as_me:15939: result: `eval echo '${'$as_ac_Header'}'`" >&5
15940 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15941 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15942   cat >>confdefs.h <<EOF
15943 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15944 EOF
15945
15946 fi
15947 done
15948
15949 fi
15950 if test "$ac_cv_header_termios_h" = yes ; then
15951         case "$CFLAGS $CPPFLAGS" in
15952         *-D_POSIX_SOURCE*)
15953                 termios_bad=dunno ;;
15954         *)      termios_bad=maybe ;;
15955         esac
15956         if test "$termios_bad" = maybe ; then
15957         echo "$as_me:15957: checking whether termios.h needs _POSIX_SOURCE" >&5
15958 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15959         cat >conftest.$ac_ext <<_ACEOF
15960 #line 15960 "configure"
15961 #include "confdefs.h"
15962 #include <termios.h>
15963 int
15964 main ()
15965 {
15966 struct termios foo; int x = foo.c_iflag
15967   ;
15968   return 0;
15969 }
15970 _ACEOF
15971 rm -f conftest.$ac_objext
15972 if { (eval echo "$as_me:15972: \"$ac_compile\"") >&5
15973   (eval $ac_compile) 2>&5
15974   ac_status=$?
15975   echo "$as_me:15975: \$? = $ac_status" >&5
15976   (exit $ac_status); } &&
15977          { ac_try='test -s conftest.$ac_objext'
15978   { (eval echo "$as_me:15978: \"$ac_try\"") >&5
15979   (eval $ac_try) 2>&5
15980   ac_status=$?
15981   echo "$as_me:15981: \$? = $ac_status" >&5
15982   (exit $ac_status); }; }; then
15983   termios_bad=no
15984 else
15985   echo "$as_me: failed program was:" >&5
15986 cat conftest.$ac_ext >&5
15987
15988                 cat >conftest.$ac_ext <<_ACEOF
15989 #line 15989 "configure"
15990 #include "confdefs.h"
15991
15992 #define _POSIX_SOURCE
15993 #include <termios.h>
15994 int
15995 main ()
15996 {
15997 struct termios foo; int x = foo.c_iflag
15998   ;
15999   return 0;
16000 }
16001 _ACEOF
16002 rm -f conftest.$ac_objext
16003 if { (eval echo "$as_me:16003: \"$ac_compile\"") >&5
16004   (eval $ac_compile) 2>&5
16005   ac_status=$?
16006   echo "$as_me:16006: \$? = $ac_status" >&5
16007   (exit $ac_status); } &&
16008          { ac_try='test -s conftest.$ac_objext'
16009   { (eval echo "$as_me:16009: \"$ac_try\"") >&5
16010   (eval $ac_try) 2>&5
16011   ac_status=$?
16012   echo "$as_me:16012: \$? = $ac_status" >&5
16013   (exit $ac_status); }; }; then
16014   termios_bad=unknown
16015 else
16016   echo "$as_me: failed program was:" >&5
16017 cat conftest.$ac_ext >&5
16018 termios_bad=yes
16019 cat >>confdefs.h <<\EOF
16020 #define _POSIX_SOURCE 1
16021 EOF
16022
16023 fi
16024 rm -f conftest.$ac_objext conftest.$ac_ext
16025
16026 fi
16027 rm -f conftest.$ac_objext conftest.$ac_ext
16028         echo "$as_me:16028: result: $termios_bad" >&5
16029 echo "${ECHO_T}$termios_bad" >&6
16030         fi
16031 fi
16032
16033 echo "$as_me:16033: checking for tcgetattr" >&5
16034 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16035 if test "${cf_cv_have_tcgetattr+set}" = set; then
16036   echo $ECHO_N "(cached) $ECHO_C" >&6
16037 else
16038
16039 cat >conftest.$ac_ext <<_ACEOF
16040 #line 16040 "configure"
16041 #include "confdefs.h"
16042
16043 #include <sys/types.h>
16044 #ifdef HAVE_UNISTD_H
16045 #include <unistd.h>
16046 #endif
16047 #ifdef HAVE_TERMIOS_H
16048 #include <termios.h>
16049 #define TTY struct termios
16050 #else
16051 #ifdef HAVE_TERMIO_H
16052 #include <termio.h>
16053 #define TTY struct termio
16054 #endif
16055 #endif
16056
16057 int
16058 main ()
16059 {
16060
16061 TTY foo;
16062 tcgetattr(1, &foo);
16063   ;
16064   return 0;
16065 }
16066 _ACEOF
16067 rm -f conftest.$ac_objext conftest$ac_exeext
16068 if { (eval echo "$as_me:16068: \"$ac_link\"") >&5
16069   (eval $ac_link) 2>&5
16070   ac_status=$?
16071   echo "$as_me:16071: \$? = $ac_status" >&5
16072   (exit $ac_status); } &&
16073          { ac_try='test -s conftest$ac_exeext'
16074   { (eval echo "$as_me:16074: \"$ac_try\"") >&5
16075   (eval $ac_try) 2>&5
16076   ac_status=$?
16077   echo "$as_me:16077: \$? = $ac_status" >&5
16078   (exit $ac_status); }; }; then
16079   cf_cv_have_tcgetattr=yes
16080 else
16081   echo "$as_me: failed program was:" >&5
16082 cat conftest.$ac_ext >&5
16083 cf_cv_have_tcgetattr=no
16084 fi
16085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16086 fi
16087 echo "$as_me:16087: result: $cf_cv_have_tcgetattr" >&5
16088 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16089 test "$cf_cv_have_tcgetattr" = yes &&
16090 cat >>confdefs.h <<\EOF
16091 #define HAVE_TCGETATTR 1
16092 EOF
16093
16094 echo "$as_me:16094: checking for vsscanf function or workaround" >&5
16095 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16096 if test "${cf_cv_func_vsscanf+set}" = set; then
16097   echo $ECHO_N "(cached) $ECHO_C" >&6
16098 else
16099
16100 cat >conftest.$ac_ext <<_ACEOF
16101 #line 16101 "configure"
16102 #include "confdefs.h"
16103
16104 #include <stdarg.h>
16105 #include <stdio.h>
16106 int
16107 main ()
16108 {
16109
16110         va_list ap;
16111         vsscanf("from", "%d", ap)
16112   ;
16113   return 0;
16114 }
16115 _ACEOF
16116 rm -f conftest.$ac_objext conftest$ac_exeext
16117 if { (eval echo "$as_me:16117: \"$ac_link\"") >&5
16118   (eval $ac_link) 2>&5
16119   ac_status=$?
16120   echo "$as_me:16120: \$? = $ac_status" >&5
16121   (exit $ac_status); } &&
16122          { ac_try='test -s conftest$ac_exeext'
16123   { (eval echo "$as_me:16123: \"$ac_try\"") >&5
16124   (eval $ac_try) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); }; }; then
16128   cf_cv_func_vsscanf=vsscanf
16129 else
16130   echo "$as_me: failed program was:" >&5
16131 cat conftest.$ac_ext >&5
16132
16133 cat >conftest.$ac_ext <<_ACEOF
16134 #line 16134 "configure"
16135 #include "confdefs.h"
16136
16137 #include <stdarg.h>
16138 #include <stdio.h>
16139 int
16140 main ()
16141 {
16142
16143     FILE strbuf;
16144     char *str = "from";
16145
16146     strbuf._flag = _IOREAD;
16147     strbuf._ptr = strbuf._base = (unsigned char *) str;
16148     strbuf._cnt = strlen(str);
16149     strbuf._file = _NFILE;
16150     return (vfscanf(&strbuf, "%d", ap))
16151   ;
16152   return 0;
16153 }
16154 _ACEOF
16155 rm -f conftest.$ac_objext conftest$ac_exeext
16156 if { (eval echo "$as_me:16156: \"$ac_link\"") >&5
16157   (eval $ac_link) 2>&5
16158   ac_status=$?
16159   echo "$as_me:16159: \$? = $ac_status" >&5
16160   (exit $ac_status); } &&
16161          { ac_try='test -s conftest$ac_exeext'
16162   { (eval echo "$as_me:16162: \"$ac_try\"") >&5
16163   (eval $ac_try) 2>&5
16164   ac_status=$?
16165   echo "$as_me:16165: \$? = $ac_status" >&5
16166   (exit $ac_status); }; }; then
16167   cf_cv_func_vsscanf=vfscanf
16168 else
16169   echo "$as_me: failed program was:" >&5
16170 cat conftest.$ac_ext >&5
16171
16172 cat >conftest.$ac_ext <<_ACEOF
16173 #line 16173 "configure"
16174 #include "confdefs.h"
16175
16176 #include <stdarg.h>
16177 #include <stdio.h>
16178 int
16179 main ()
16180 {
16181
16182     FILE strbuf;
16183     char *str = "from";
16184
16185     strbuf._flag = _IOREAD;
16186     strbuf._ptr = strbuf._base = (unsigned char *) str;
16187     strbuf._cnt = strlen(str);
16188     strbuf._file = _NFILE;
16189     return (_doscan(&strbuf, "%d", ap))
16190   ;
16191   return 0;
16192 }
16193 _ACEOF
16194 rm -f conftest.$ac_objext conftest$ac_exeext
16195 if { (eval echo "$as_me:16195: \"$ac_link\"") >&5
16196   (eval $ac_link) 2>&5
16197   ac_status=$?
16198   echo "$as_me:16198: \$? = $ac_status" >&5
16199   (exit $ac_status); } &&
16200          { ac_try='test -s conftest$ac_exeext'
16201   { (eval echo "$as_me:16201: \"$ac_try\"") >&5
16202   (eval $ac_try) 2>&5
16203   ac_status=$?
16204   echo "$as_me:16204: \$? = $ac_status" >&5
16205   (exit $ac_status); }; }; then
16206   cf_cv_func_vsscanf=_doscan
16207 else
16208   echo "$as_me: failed program was:" >&5
16209 cat conftest.$ac_ext >&5
16210
16211 cf_cv_func_vsscanf=no
16212 fi
16213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16214 fi
16215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16216 fi
16217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16218 fi
16219 echo "$as_me:16219: result: $cf_cv_func_vsscanf" >&5
16220 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16221
16222 case $cf_cv_func_vsscanf in #(vi
16223 vsscanf)
16224 cat >>confdefs.h <<\EOF
16225 #define HAVE_VSSCANF 1
16226 EOF
16227 ;; #(vi
16228 vfscanf)
16229 cat >>confdefs.h <<\EOF
16230 #define HAVE_VFSCANF 1
16231 EOF
16232 ;; #(vi
16233 _doscan)
16234 cat >>confdefs.h <<\EOF
16235 #define HAVE__DOSCAN 1
16236 EOF
16237 ;;
16238 esac
16239
16240 echo "$as_me:16240: checking for working mkstemp" >&5
16241 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16242 if test "${cf_cv_func_mkstemp+set}" = set; then
16243   echo $ECHO_N "(cached) $ECHO_C" >&6
16244 else
16245
16246 rm -rf conftest*
16247 if test "$cross_compiling" = yes; then
16248   cf_cv_func_mkstemp=maybe
16249 else
16250   cat >conftest.$ac_ext <<_ACEOF
16251 #line 16251 "configure"
16252 #include "confdefs.h"
16253
16254 #include <sys/types.h>
16255 #include <stdlib.h>
16256 #include <stdio.h>
16257 #include <string.h>
16258 #include <sys/stat.h>
16259 int main()
16260 {
16261         char *tmpl = "conftestXXXXXX";
16262         char name[2][80];
16263         int n;
16264         int result = 0;
16265         int fd;
16266         struct stat sb;
16267
16268         umask(077);
16269         for (n = 0; n < 2; ++n) {
16270                 strcpy(name[n], tmpl);
16271                 if ((fd = mkstemp(name[n])) >= 0) {
16272                         if (!strcmp(name[n], tmpl)
16273                          || stat(name[n], &sb) != 0
16274                          || (sb.st_mode & S_IFMT) != S_IFREG
16275                          || (sb.st_mode & 077) != 0) {
16276                                 result = 1;
16277                         }
16278                         close(fd);
16279                 }
16280         }
16281         if (result == 0
16282          && !strcmp(name[0], name[1]))
16283                 result = 1;
16284         ${cf_cv_main_return:-return}(result);
16285 }
16286
16287 _ACEOF
16288 rm -f conftest$ac_exeext
16289 if { (eval echo "$as_me:16289: \"$ac_link\"") >&5
16290   (eval $ac_link) 2>&5
16291   ac_status=$?
16292   echo "$as_me:16292: \$? = $ac_status" >&5
16293   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16294   { (eval echo "$as_me:16294: \"$ac_try\"") >&5
16295   (eval $ac_try) 2>&5
16296   ac_status=$?
16297   echo "$as_me:16297: \$? = $ac_status" >&5
16298   (exit $ac_status); }; }; then
16299   cf_cv_func_mkstemp=yes
16300
16301 else
16302   echo "$as_me: program exited with status $ac_status" >&5
16303 echo "$as_me: failed program was:" >&5
16304 cat conftest.$ac_ext >&5
16305 cf_cv_func_mkstemp=no
16306
16307 fi
16308 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16309 fi
16310
16311 fi
16312 echo "$as_me:16312: result: $cf_cv_func_mkstemp" >&5
16313 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16314 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16315         echo "$as_me:16315: checking for mkstemp" >&5
16316 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16317 if test "${ac_cv_func_mkstemp+set}" = set; then
16318   echo $ECHO_N "(cached) $ECHO_C" >&6
16319 else
16320   cat >conftest.$ac_ext <<_ACEOF
16321 #line 16321 "configure"
16322 #include "confdefs.h"
16323 /* System header to define __stub macros and hopefully few prototypes,
16324     which can conflict with char mkstemp (); below.  */
16325 #include <assert.h>
16326 /* Override any gcc2 internal prototype to avoid an error.  */
16327 #ifdef __cplusplus
16328 extern "C"
16329 #endif
16330 /* We use char because int might match the return type of a gcc2
16331    builtin and then its argument prototype would still apply.  */
16332 char mkstemp ();
16333 char (*f) ();
16334
16335 int
16336 main ()
16337 {
16338 /* The GNU C library defines this for functions which it implements
16339     to always fail with ENOSYS.  Some functions are actually named
16340     something starting with __ and the normal name is an alias.  */
16341 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16342 choke me
16343 #else
16344 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16345 #endif
16346
16347   ;
16348   return 0;
16349 }
16350 _ACEOF
16351 rm -f conftest.$ac_objext conftest$ac_exeext
16352 if { (eval echo "$as_me:16352: \"$ac_link\"") >&5
16353   (eval $ac_link) 2>&5
16354   ac_status=$?
16355   echo "$as_me:16355: \$? = $ac_status" >&5
16356   (exit $ac_status); } &&
16357          { ac_try='test -s conftest$ac_exeext'
16358   { (eval echo "$as_me:16358: \"$ac_try\"") >&5
16359   (eval $ac_try) 2>&5
16360   ac_status=$?
16361   echo "$as_me:16361: \$? = $ac_status" >&5
16362   (exit $ac_status); }; }; then
16363   ac_cv_func_mkstemp=yes
16364 else
16365   echo "$as_me: failed program was:" >&5
16366 cat conftest.$ac_ext >&5
16367 ac_cv_func_mkstemp=no
16368 fi
16369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16370 fi
16371 echo "$as_me:16371: result: $ac_cv_func_mkstemp" >&5
16372 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16373
16374 fi
16375 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16376
16377 cat >>confdefs.h <<\EOF
16378 #define HAVE_MKSTEMP 1
16379 EOF
16380
16381 fi
16382
16383 # setup for prototype of fallback for vsscanf()
16384
16385 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16386         HAVE_VSSCANF=1
16387 else
16388         HAVE_VSSCANF=0
16389 fi
16390
16391 if test "x$cross_compiling" = xyes ; then
16392         { echo "$as_me:16392: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16393 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16394 else
16395         echo "$as_me:16395: checking whether setvbuf arguments are reversed" >&5
16396 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16397 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16398   echo $ECHO_N "(cached) $ECHO_C" >&6
16399 else
16400   if test "$cross_compiling" = yes; then
16401   { { echo "$as_me:16401: error: cannot run test program while cross compiling" >&5
16402 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16403    { (exit 1); exit 1; }; }
16404 else
16405   cat >conftest.$ac_ext <<_ACEOF
16406 #line 16406 "configure"
16407 #include "confdefs.h"
16408 #include <stdio.h>
16409 /* If setvbuf has the reversed format, exit 0. */
16410 int
16411 main ()
16412 {
16413   /* This call has the arguments reversed.
16414      A reversed system may check and see that the address of main
16415      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16416   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16417     $ac_main_return(1);
16418   putc('\r', stdout);
16419   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16420 }
16421 _ACEOF
16422 rm -f conftest$ac_exeext
16423 if { (eval echo "$as_me:16423: \"$ac_link\"") >&5
16424   (eval $ac_link) 2>&5
16425   ac_status=$?
16426   echo "$as_me:16426: \$? = $ac_status" >&5
16427   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16428   { (eval echo "$as_me:16428: \"$ac_try\"") >&5
16429   (eval $ac_try) 2>&5
16430   ac_status=$?
16431   echo "$as_me:16431: \$? = $ac_status" >&5
16432   (exit $ac_status); }; }; then
16433   ac_cv_func_setvbuf_reversed=yes
16434 else
16435   echo "$as_me: program exited with status $ac_status" >&5
16436 echo "$as_me: failed program was:" >&5
16437 cat conftest.$ac_ext >&5
16438 ac_cv_func_setvbuf_reversed=no
16439 fi
16440 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16441 fi
16442 rm -f core core.* *.core
16443 fi
16444 echo "$as_me:16444: result: $ac_cv_func_setvbuf_reversed" >&5
16445 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16446 if test $ac_cv_func_setvbuf_reversed = yes; then
16447
16448 cat >>confdefs.h <<\EOF
16449 #define SETVBUF_REVERSED 1
16450 EOF
16451
16452 fi
16453
16454 fi
16455 echo "$as_me:16455: checking return type of signal handlers" >&5
16456 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16457 if test "${ac_cv_type_signal+set}" = set; then
16458   echo $ECHO_N "(cached) $ECHO_C" >&6
16459 else
16460   cat >conftest.$ac_ext <<_ACEOF
16461 #line 16461 "configure"
16462 #include "confdefs.h"
16463 #include <sys/types.h>
16464 #include <signal.h>
16465 #ifdef signal
16466 # undef signal
16467 #endif
16468 #ifdef __cplusplus
16469 extern "C" void (*signal (int, void (*)(int)))(int);
16470 #else
16471 void (*signal ()) ();
16472 #endif
16473
16474 int
16475 main ()
16476 {
16477 int i;
16478   ;
16479   return 0;
16480 }
16481 _ACEOF
16482 rm -f conftest.$ac_objext
16483 if { (eval echo "$as_me:16483: \"$ac_compile\"") >&5
16484   (eval $ac_compile) 2>&5
16485   ac_status=$?
16486   echo "$as_me:16486: \$? = $ac_status" >&5
16487   (exit $ac_status); } &&
16488          { ac_try='test -s conftest.$ac_objext'
16489   { (eval echo "$as_me:16489: \"$ac_try\"") >&5
16490   (eval $ac_try) 2>&5
16491   ac_status=$?
16492   echo "$as_me:16492: \$? = $ac_status" >&5
16493   (exit $ac_status); }; }; then
16494   ac_cv_type_signal=void
16495 else
16496   echo "$as_me: failed program was:" >&5
16497 cat conftest.$ac_ext >&5
16498 ac_cv_type_signal=int
16499 fi
16500 rm -f conftest.$ac_objext conftest.$ac_ext
16501 fi
16502 echo "$as_me:16502: result: $ac_cv_type_signal" >&5
16503 echo "${ECHO_T}$ac_cv_type_signal" >&6
16504
16505 cat >>confdefs.h <<EOF
16506 #define RETSIGTYPE $ac_cv_type_signal
16507 EOF
16508
16509 echo "$as_me:16509: checking for intptr_t" >&5
16510 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16511 if test "${ac_cv_type_intptr_t+set}" = set; then
16512   echo $ECHO_N "(cached) $ECHO_C" >&6
16513 else
16514   cat >conftest.$ac_ext <<_ACEOF
16515 #line 16515 "configure"
16516 #include "confdefs.h"
16517 $ac_includes_default
16518 int
16519 main ()
16520 {
16521 if ((intptr_t *) 0)
16522   return 0;
16523 if (sizeof (intptr_t))
16524   return 0;
16525   ;
16526   return 0;
16527 }
16528 _ACEOF
16529 rm -f conftest.$ac_objext
16530 if { (eval echo "$as_me:16530: \"$ac_compile\"") >&5
16531   (eval $ac_compile) 2>&5
16532   ac_status=$?
16533   echo "$as_me:16533: \$? = $ac_status" >&5
16534   (exit $ac_status); } &&
16535          { ac_try='test -s conftest.$ac_objext'
16536   { (eval echo "$as_me:16536: \"$ac_try\"") >&5
16537   (eval $ac_try) 2>&5
16538   ac_status=$?
16539   echo "$as_me:16539: \$? = $ac_status" >&5
16540   (exit $ac_status); }; }; then
16541   ac_cv_type_intptr_t=yes
16542 else
16543   echo "$as_me: failed program was:" >&5
16544 cat conftest.$ac_ext >&5
16545 ac_cv_type_intptr_t=no
16546 fi
16547 rm -f conftest.$ac_objext conftest.$ac_ext
16548 fi
16549 echo "$as_me:16549: result: $ac_cv_type_intptr_t" >&5
16550 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16551 if test $ac_cv_type_intptr_t = yes; then
16552   :
16553 else
16554
16555 cat >>confdefs.h <<EOF
16556 #define intptr_t long
16557 EOF
16558
16559 fi
16560
16561 echo "$as_me:16561: checking for type sigaction_t" >&5
16562 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16563 if test "${cf_cv_type_sigaction+set}" = set; then
16564   echo $ECHO_N "(cached) $ECHO_C" >&6
16565 else
16566
16567         cat >conftest.$ac_ext <<_ACEOF
16568 #line 16568 "configure"
16569 #include "confdefs.h"
16570
16571 #include <signal.h>
16572 int
16573 main ()
16574 {
16575 sigaction_t x
16576   ;
16577   return 0;
16578 }
16579 _ACEOF
16580 rm -f conftest.$ac_objext
16581 if { (eval echo "$as_me:16581: \"$ac_compile\"") >&5
16582   (eval $ac_compile) 2>&5
16583   ac_status=$?
16584   echo "$as_me:16584: \$? = $ac_status" >&5
16585   (exit $ac_status); } &&
16586          { ac_try='test -s conftest.$ac_objext'
16587   { (eval echo "$as_me:16587: \"$ac_try\"") >&5
16588   (eval $ac_try) 2>&5
16589   ac_status=$?
16590   echo "$as_me:16590: \$? = $ac_status" >&5
16591   (exit $ac_status); }; }; then
16592   cf_cv_type_sigaction=yes
16593 else
16594   echo "$as_me: failed program was:" >&5
16595 cat conftest.$ac_ext >&5
16596 cf_cv_type_sigaction=no
16597 fi
16598 rm -f conftest.$ac_objext conftest.$ac_ext
16599 fi
16600
16601 echo "$as_me:16601: result: $cf_cv_type_sigaction" >&5
16602 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16603 test "$cf_cv_type_sigaction" = yes &&
16604 cat >>confdefs.h <<\EOF
16605 #define HAVE_TYPE_SIGACTION 1
16606 EOF
16607
16608 echo "$as_me:16608: checking declaration of size-change" >&5
16609 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16610 if test "${cf_cv_sizechange+set}" = set; then
16611   echo $ECHO_N "(cached) $ECHO_C" >&6
16612 else
16613
16614     cf_cv_sizechange=unknown
16615     cf_save_CPPFLAGS="$CPPFLAGS"
16616
16617 for cf_opts in "" "NEED_PTEM_H"
16618 do
16619
16620     CPPFLAGS="$cf_save_CPPFLAGS"
16621     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16622     cat >conftest.$ac_ext <<_ACEOF
16623 #line 16623 "configure"
16624 #include "confdefs.h"
16625 #include <sys/types.h>
16626 #ifdef HAVE_TERMIOS_H
16627 #include <termios.h>
16628 #else
16629 #ifdef HAVE_TERMIO_H
16630 #include <termio.h>
16631 #endif
16632 #endif
16633 #ifdef NEED_PTEM_H
16634 /* This is a workaround for SCO:  they neglected to define struct winsize in
16635  * termios.h -- it's only in termio.h and ptem.h
16636  */
16637 #include        <sys/stream.h>
16638 #include        <sys/ptem.h>
16639 #endif
16640 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16641 #include <sys/ioctl.h>
16642 #endif
16643
16644 int
16645 main ()
16646 {
16647
16648 #ifdef TIOCGSIZE
16649         struct ttysize win;     /* FIXME: what system is this? */
16650         int y = win.ts_lines;
16651         int x = win.ts_cols;
16652 #else
16653 #ifdef TIOCGWINSZ
16654         struct winsize win;
16655         int y = win.ws_row;
16656         int x = win.ws_col;
16657 #else
16658         no TIOCGSIZE or TIOCGWINSZ
16659 #endif /* TIOCGWINSZ */
16660 #endif /* TIOCGSIZE */
16661
16662   ;
16663   return 0;
16664 }
16665 _ACEOF
16666 rm -f conftest.$ac_objext
16667 if { (eval echo "$as_me:16667: \"$ac_compile\"") >&5
16668   (eval $ac_compile) 2>&5
16669   ac_status=$?
16670   echo "$as_me:16670: \$? = $ac_status" >&5
16671   (exit $ac_status); } &&
16672          { ac_try='test -s conftest.$ac_objext'
16673   { (eval echo "$as_me:16673: \"$ac_try\"") >&5
16674   (eval $ac_try) 2>&5
16675   ac_status=$?
16676   echo "$as_me:16676: \$? = $ac_status" >&5
16677   (exit $ac_status); }; }; then
16678   cf_cv_sizechange=yes
16679 else
16680   echo "$as_me: failed program was:" >&5
16681 cat conftest.$ac_ext >&5
16682 cf_cv_sizechange=no
16683 fi
16684 rm -f conftest.$ac_objext conftest.$ac_ext
16685
16686         CPPFLAGS="$cf_save_CPPFLAGS"
16687         if test "$cf_cv_sizechange" = yes ; then
16688                 echo "size-change succeeded ($cf_opts)" >&5
16689                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16690                 break
16691         fi
16692 done
16693
16694 fi
16695 echo "$as_me:16695: result: $cf_cv_sizechange" >&5
16696 echo "${ECHO_T}$cf_cv_sizechange" >&6
16697 if test "$cf_cv_sizechange" != no ; then
16698
16699 cat >>confdefs.h <<\EOF
16700 #define HAVE_SIZECHANGE 1
16701 EOF
16702
16703         case $cf_cv_sizechange in #(vi
16704         NEED*)
16705                 cat >>confdefs.h <<EOF
16706 #define $cf_cv_sizechange  1
16707 EOF
16708
16709                 ;;
16710         esac
16711 fi
16712
16713 echo "$as_me:16713: checking for memmove" >&5
16714 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16715 if test "${ac_cv_func_memmove+set}" = set; then
16716   echo $ECHO_N "(cached) $ECHO_C" >&6
16717 else
16718   cat >conftest.$ac_ext <<_ACEOF
16719 #line 16719 "configure"
16720 #include "confdefs.h"
16721 /* System header to define __stub macros and hopefully few prototypes,
16722     which can conflict with char memmove (); below.  */
16723 #include <assert.h>
16724 /* Override any gcc2 internal prototype to avoid an error.  */
16725 #ifdef __cplusplus
16726 extern "C"
16727 #endif
16728 /* We use char because int might match the return type of a gcc2
16729    builtin and then its argument prototype would still apply.  */
16730 char memmove ();
16731 char (*f) ();
16732
16733 int
16734 main ()
16735 {
16736 /* The GNU C library defines this for functions which it implements
16737     to always fail with ENOSYS.  Some functions are actually named
16738     something starting with __ and the normal name is an alias.  */
16739 #if defined (__stub_memmove) || defined (__stub___memmove)
16740 choke me
16741 #else
16742 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16743 #endif
16744
16745   ;
16746   return 0;
16747 }
16748 _ACEOF
16749 rm -f conftest.$ac_objext conftest$ac_exeext
16750 if { (eval echo "$as_me:16750: \"$ac_link\"") >&5
16751   (eval $ac_link) 2>&5
16752   ac_status=$?
16753   echo "$as_me:16753: \$? = $ac_status" >&5
16754   (exit $ac_status); } &&
16755          { ac_try='test -s conftest$ac_exeext'
16756   { (eval echo "$as_me:16756: \"$ac_try\"") >&5
16757   (eval $ac_try) 2>&5
16758   ac_status=$?
16759   echo "$as_me:16759: \$? = $ac_status" >&5
16760   (exit $ac_status); }; }; then
16761   ac_cv_func_memmove=yes
16762 else
16763   echo "$as_me: failed program was:" >&5
16764 cat conftest.$ac_ext >&5
16765 ac_cv_func_memmove=no
16766 fi
16767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16768 fi
16769 echo "$as_me:16769: result: $ac_cv_func_memmove" >&5
16770 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16771 if test $ac_cv_func_memmove = yes; then
16772   :
16773 else
16774
16775 echo "$as_me:16775: checking for bcopy" >&5
16776 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16777 if test "${ac_cv_func_bcopy+set}" = set; then
16778   echo $ECHO_N "(cached) $ECHO_C" >&6
16779 else
16780   cat >conftest.$ac_ext <<_ACEOF
16781 #line 16781 "configure"
16782 #include "confdefs.h"
16783 /* System header to define __stub macros and hopefully few prototypes,
16784     which can conflict with char bcopy (); below.  */
16785 #include <assert.h>
16786 /* Override any gcc2 internal prototype to avoid an error.  */
16787 #ifdef __cplusplus
16788 extern "C"
16789 #endif
16790 /* We use char because int might match the return type of a gcc2
16791    builtin and then its argument prototype would still apply.  */
16792 char bcopy ();
16793 char (*f) ();
16794
16795 int
16796 main ()
16797 {
16798 /* The GNU C library defines this for functions which it implements
16799     to always fail with ENOSYS.  Some functions are actually named
16800     something starting with __ and the normal name is an alias.  */
16801 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16802 choke me
16803 #else
16804 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16805 #endif
16806
16807   ;
16808   return 0;
16809 }
16810 _ACEOF
16811 rm -f conftest.$ac_objext conftest$ac_exeext
16812 if { (eval echo "$as_me:16812: \"$ac_link\"") >&5
16813   (eval $ac_link) 2>&5
16814   ac_status=$?
16815   echo "$as_me:16815: \$? = $ac_status" >&5
16816   (exit $ac_status); } &&
16817          { ac_try='test -s conftest$ac_exeext'
16818   { (eval echo "$as_me:16818: \"$ac_try\"") >&5
16819   (eval $ac_try) 2>&5
16820   ac_status=$?
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); }; }; then
16823   ac_cv_func_bcopy=yes
16824 else
16825   echo "$as_me: failed program was:" >&5
16826 cat conftest.$ac_ext >&5
16827 ac_cv_func_bcopy=no
16828 fi
16829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16830 fi
16831 echo "$as_me:16831: result: $ac_cv_func_bcopy" >&5
16832 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16833 if test $ac_cv_func_bcopy = yes; then
16834
16835         echo "$as_me:16835: checking if bcopy does overlapping moves" >&5
16836 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16837 if test "${cf_cv_good_bcopy+set}" = set; then
16838   echo $ECHO_N "(cached) $ECHO_C" >&6
16839 else
16840
16841                 if test "$cross_compiling" = yes; then
16842   cf_cv_good_bcopy=unknown
16843 else
16844   cat >conftest.$ac_ext <<_ACEOF
16845 #line 16845 "configure"
16846 #include "confdefs.h"
16847
16848 int main() {
16849         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16850         char temp[40];
16851         bcopy(data, temp, sizeof(data));
16852         bcopy(temp+10, temp, 15);
16853         bcopy(temp+5, temp+15, 10);
16854         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16855 }
16856
16857 _ACEOF
16858 rm -f conftest$ac_exeext
16859 if { (eval echo "$as_me:16859: \"$ac_link\"") >&5
16860   (eval $ac_link) 2>&5
16861   ac_status=$?
16862   echo "$as_me:16862: \$? = $ac_status" >&5
16863   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16864   { (eval echo "$as_me:16864: \"$ac_try\"") >&5
16865   (eval $ac_try) 2>&5
16866   ac_status=$?
16867   echo "$as_me:16867: \$? = $ac_status" >&5
16868   (exit $ac_status); }; }; then
16869   cf_cv_good_bcopy=yes
16870 else
16871   echo "$as_me: program exited with status $ac_status" >&5
16872 echo "$as_me: failed program was:" >&5
16873 cat conftest.$ac_ext >&5
16874 cf_cv_good_bcopy=no
16875 fi
16876 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16877 fi
16878
16879 fi
16880 echo "$as_me:16880: result: $cf_cv_good_bcopy" >&5
16881 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16882
16883 else
16884   cf_cv_good_bcopy=no
16885 fi
16886
16887         if test "$cf_cv_good_bcopy" = yes ; then
16888
16889 cat >>confdefs.h <<\EOF
16890 #define USE_OK_BCOPY 1
16891 EOF
16892
16893         else
16894
16895 cat >>confdefs.h <<\EOF
16896 #define USE_MY_MEMMOVE 1
16897 EOF
16898
16899         fi
16900
16901 fi
16902
16903 echo "$as_me:16903: checking if poll really works" >&5
16904 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16905 if test "${cf_cv_working_poll+set}" = set; then
16906   echo $ECHO_N "(cached) $ECHO_C" >&6
16907 else
16908
16909 if test "$cross_compiling" = yes; then
16910   cf_cv_working_poll=unknown
16911 else
16912   cat >conftest.$ac_ext <<_ACEOF
16913 #line 16913 "configure"
16914 #include "confdefs.h"
16915
16916 #include <stdlib.h>
16917 #include <stdio.h>
16918 #include <unistd.h>
16919 #include <fcntl.h>
16920 #ifdef HAVE_POLL_H
16921 #include <poll.h>
16922 #else
16923 #include <sys/poll.h>
16924 #endif
16925 int main() {
16926         struct pollfd myfds;
16927         int ret;
16928
16929         /* check for Darwin bug with respect to "devices" */
16930         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16931         if (myfds.fd < 0)
16932                 myfds.fd = 0;
16933         myfds.events = POLLIN;
16934         myfds.revents = 0;
16935
16936         ret = poll(&myfds, 1, 100);
16937
16938         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16939                 ret = -1;
16940         } else {
16941                 int fd = 0;
16942                 if (!isatty(fd)) {
16943                         fd = open("/dev/tty", 2);       /* O_RDWR */
16944                 }
16945
16946                 if (fd >= 0) {
16947                         /* also check with standard input */
16948                         myfds.fd = fd;
16949                         myfds.events = POLLIN;
16950                         myfds.revents = 0;
16951                         ret = poll(&myfds, 1, 100);
16952                 } else {
16953                         ret = -1;
16954                 }
16955         }
16956         ${cf_cv_main_return:-return}(ret < 0);
16957 }
16958 _ACEOF
16959 rm -f conftest$ac_exeext
16960 if { (eval echo "$as_me:16960: \"$ac_link\"") >&5
16961   (eval $ac_link) 2>&5
16962   ac_status=$?
16963   echo "$as_me:16963: \$? = $ac_status" >&5
16964   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16965   { (eval echo "$as_me:16965: \"$ac_try\"") >&5
16966   (eval $ac_try) 2>&5
16967   ac_status=$?
16968   echo "$as_me:16968: \$? = $ac_status" >&5
16969   (exit $ac_status); }; }; then
16970   cf_cv_working_poll=yes
16971 else
16972   echo "$as_me: program exited with status $ac_status" >&5
16973 echo "$as_me: failed program was:" >&5
16974 cat conftest.$ac_ext >&5
16975 cf_cv_working_poll=no
16976 fi
16977 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16978 fi
16979 fi
16980 echo "$as_me:16980: result: $cf_cv_working_poll" >&5
16981 echo "${ECHO_T}$cf_cv_working_poll" >&6
16982 test "$cf_cv_working_poll" = "yes" &&
16983 cat >>confdefs.h <<\EOF
16984 #define HAVE_WORKING_POLL 1
16985 EOF
16986
16987 echo "$as_me:16987: checking for va_copy" >&5
16988 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16989 if test "${cf_cv_have_va_copy+set}" = set; then
16990   echo $ECHO_N "(cached) $ECHO_C" >&6
16991 else
16992
16993 cat >conftest.$ac_ext <<_ACEOF
16994 #line 16994 "configure"
16995 #include "confdefs.h"
16996
16997 #include <stdarg.h>
16998
16999 int
17000 main ()
17001 {
17002
17003         static va_list dst;
17004         static va_list src;
17005         va_copy(dst, src)
17006   ;
17007   return 0;
17008 }
17009 _ACEOF
17010 rm -f conftest.$ac_objext conftest$ac_exeext
17011 if { (eval echo "$as_me:17011: \"$ac_link\"") >&5
17012   (eval $ac_link) 2>&5
17013   ac_status=$?
17014   echo "$as_me:17014: \$? = $ac_status" >&5
17015   (exit $ac_status); } &&
17016          { ac_try='test -s conftest$ac_exeext'
17017   { (eval echo "$as_me:17017: \"$ac_try\"") >&5
17018   (eval $ac_try) 2>&5
17019   ac_status=$?
17020   echo "$as_me:17020: \$? = $ac_status" >&5
17021   (exit $ac_status); }; }; then
17022   cf_cv_have_va_copy=yes
17023 else
17024   echo "$as_me: failed program was:" >&5
17025 cat conftest.$ac_ext >&5
17026 cf_cv_have_va_copy=no
17027 fi
17028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17029 fi
17030 echo "$as_me:17030: result: $cf_cv_have_va_copy" >&5
17031 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17032
17033 test "$cf_cv_have_va_copy" = yes &&
17034 cat >>confdefs.h <<\EOF
17035 #define HAVE_VA_COPY 1
17036 EOF
17037
17038 echo "$as_me:17038: checking for __va_copy" >&5
17039 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17040 if test "${cf_cv_have___va_copy+set}" = set; then
17041   echo $ECHO_N "(cached) $ECHO_C" >&6
17042 else
17043
17044 cat >conftest.$ac_ext <<_ACEOF
17045 #line 17045 "configure"
17046 #include "confdefs.h"
17047
17048 #include <stdarg.h>
17049
17050 int
17051 main ()
17052 {
17053
17054         static va_list dst;
17055         static va_list src;
17056         __va_copy(dst, src)
17057   ;
17058   return 0;
17059 }
17060 _ACEOF
17061 rm -f conftest.$ac_objext conftest$ac_exeext
17062 if { (eval echo "$as_me:17062: \"$ac_link\"") >&5
17063   (eval $ac_link) 2>&5
17064   ac_status=$?
17065   echo "$as_me:17065: \$? = $ac_status" >&5
17066   (exit $ac_status); } &&
17067          { ac_try='test -s conftest$ac_exeext'
17068   { (eval echo "$as_me:17068: \"$ac_try\"") >&5
17069   (eval $ac_try) 2>&5
17070   ac_status=$?
17071   echo "$as_me:17071: \$? = $ac_status" >&5
17072   (exit $ac_status); }; }; then
17073   cf_cv_have___va_copy=yes
17074 else
17075   echo "$as_me: failed program was:" >&5
17076 cat conftest.$ac_ext >&5
17077 cf_cv_have___va_copy=no
17078 fi
17079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17080 fi
17081 echo "$as_me:17081: result: $cf_cv_have___va_copy" >&5
17082 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17083
17084 test "$cf_cv_have___va_copy" = yes &&
17085 cat >>confdefs.h <<\EOF
17086 #define HAVE___VA_COPY 1
17087 EOF
17088
17089 echo "$as_me:17089: checking for pid_t" >&5
17090 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17091 if test "${ac_cv_type_pid_t+set}" = set; then
17092   echo $ECHO_N "(cached) $ECHO_C" >&6
17093 else
17094   cat >conftest.$ac_ext <<_ACEOF
17095 #line 17095 "configure"
17096 #include "confdefs.h"
17097 $ac_includes_default
17098 int
17099 main ()
17100 {
17101 if ((pid_t *) 0)
17102   return 0;
17103 if (sizeof (pid_t))
17104   return 0;
17105   ;
17106   return 0;
17107 }
17108 _ACEOF
17109 rm -f conftest.$ac_objext
17110 if { (eval echo "$as_me:17110: \"$ac_compile\"") >&5
17111   (eval $ac_compile) 2>&5
17112   ac_status=$?
17113   echo "$as_me:17113: \$? = $ac_status" >&5
17114   (exit $ac_status); } &&
17115          { ac_try='test -s conftest.$ac_objext'
17116   { (eval echo "$as_me:17116: \"$ac_try\"") >&5
17117   (eval $ac_try) 2>&5
17118   ac_status=$?
17119   echo "$as_me:17119: \$? = $ac_status" >&5
17120   (exit $ac_status); }; }; then
17121   ac_cv_type_pid_t=yes
17122 else
17123   echo "$as_me: failed program was:" >&5
17124 cat conftest.$ac_ext >&5
17125 ac_cv_type_pid_t=no
17126 fi
17127 rm -f conftest.$ac_objext conftest.$ac_ext
17128 fi
17129 echo "$as_me:17129: result: $ac_cv_type_pid_t" >&5
17130 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17131 if test $ac_cv_type_pid_t = yes; then
17132   :
17133 else
17134
17135 cat >>confdefs.h <<EOF
17136 #define pid_t int
17137 EOF
17138
17139 fi
17140
17141 for ac_header in unistd.h vfork.h
17142 do
17143 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17144 echo "$as_me:17144: checking for $ac_header" >&5
17145 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17146 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17147   echo $ECHO_N "(cached) $ECHO_C" >&6
17148 else
17149   cat >conftest.$ac_ext <<_ACEOF
17150 #line 17150 "configure"
17151 #include "confdefs.h"
17152 #include <$ac_header>
17153 _ACEOF
17154 if { (eval echo "$as_me:17154: \"$ac_cpp conftest.$ac_ext\"") >&5
17155   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17156   ac_status=$?
17157   egrep -v '^ *\+' conftest.er1 >conftest.err
17158   rm -f conftest.er1
17159   cat conftest.err >&5
17160   echo "$as_me:17160: \$? = $ac_status" >&5
17161   (exit $ac_status); } >/dev/null; then
17162   if test -s conftest.err; then
17163     ac_cpp_err=$ac_c_preproc_warn_flag
17164   else
17165     ac_cpp_err=
17166   fi
17167 else
17168   ac_cpp_err=yes
17169 fi
17170 if test -z "$ac_cpp_err"; then
17171   eval "$as_ac_Header=yes"
17172 else
17173   echo "$as_me: failed program was:" >&5
17174   cat conftest.$ac_ext >&5
17175   eval "$as_ac_Header=no"
17176 fi
17177 rm -f conftest.err conftest.$ac_ext
17178 fi
17179 echo "$as_me:17179: result: `eval echo '${'$as_ac_Header'}'`" >&5
17180 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17181 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17182   cat >>confdefs.h <<EOF
17183 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17184 EOF
17185
17186 fi
17187 done
17188
17189 for ac_func in fork vfork
17190 do
17191 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17192 echo "$as_me:17192: checking for $ac_func" >&5
17193 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17194 if eval "test \"\${$as_ac_var+set}\" = set"; then
17195   echo $ECHO_N "(cached) $ECHO_C" >&6
17196 else
17197   cat >conftest.$ac_ext <<_ACEOF
17198 #line 17198 "configure"
17199 #include "confdefs.h"
17200 /* System header to define __stub macros and hopefully few prototypes,
17201     which can conflict with char $ac_func (); below.  */
17202 #include <assert.h>
17203 /* Override any gcc2 internal prototype to avoid an error.  */
17204 #ifdef __cplusplus
17205 extern "C"
17206 #endif
17207 /* We use char because int might match the return type of a gcc2
17208    builtin and then its argument prototype would still apply.  */
17209 char $ac_func ();
17210 char (*f) ();
17211
17212 int
17213 main ()
17214 {
17215 /* The GNU C library defines this for functions which it implements
17216     to always fail with ENOSYS.  Some functions are actually named
17217     something starting with __ and the normal name is an alias.  */
17218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17219 choke me
17220 #else
17221 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17222 #endif
17223
17224   ;
17225   return 0;
17226 }
17227 _ACEOF
17228 rm -f conftest.$ac_objext conftest$ac_exeext
17229 if { (eval echo "$as_me:17229: \"$ac_link\"") >&5
17230   (eval $ac_link) 2>&5
17231   ac_status=$?
17232   echo "$as_me:17232: \$? = $ac_status" >&5
17233   (exit $ac_status); } &&
17234          { ac_try='test -s conftest$ac_exeext'
17235   { (eval echo "$as_me:17235: \"$ac_try\"") >&5
17236   (eval $ac_try) 2>&5
17237   ac_status=$?
17238   echo "$as_me:17238: \$? = $ac_status" >&5
17239   (exit $ac_status); }; }; then
17240   eval "$as_ac_var=yes"
17241 else
17242   echo "$as_me: failed program was:" >&5
17243 cat conftest.$ac_ext >&5
17244 eval "$as_ac_var=no"
17245 fi
17246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17247 fi
17248 echo "$as_me:17248: result: `eval echo '${'$as_ac_var'}'`" >&5
17249 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17250 if test `eval echo '${'$as_ac_var'}'` = yes; then
17251   cat >>confdefs.h <<EOF
17252 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17253 EOF
17254
17255 fi
17256 done
17257
17258 ac_cv_func_fork_works=$ac_cv_func_fork
17259 if test "x$ac_cv_func_fork" = xyes; then
17260   echo "$as_me:17260: checking for working fork" >&5
17261 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17262 if test "${ac_cv_func_fork_works+set}" = set; then
17263   echo $ECHO_N "(cached) $ECHO_C" >&6
17264 else
17265   if test "$cross_compiling" = yes; then
17266   ac_cv_func_fork_works=cross
17267 else
17268   cat >conftest.$ac_ext <<_ACEOF
17269 /* By Rüdiger Kuhlmann. */
17270       #include <sys/types.h>
17271       #if HAVE_UNISTD_H
17272       # include <unistd.h>
17273       #endif
17274       /* Some systems only have a dummy stub for fork() */
17275       int main ()
17276       {
17277         if (fork() < 0)
17278           $ac_main_return (1);
17279         $ac_main_return (0);
17280       }
17281 _ACEOF
17282 rm -f conftest$ac_exeext
17283 if { (eval echo "$as_me:17283: \"$ac_link\"") >&5
17284   (eval $ac_link) 2>&5
17285   ac_status=$?
17286   echo "$as_me:17286: \$? = $ac_status" >&5
17287   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17288   { (eval echo "$as_me:17288: \"$ac_try\"") >&5
17289   (eval $ac_try) 2>&5
17290   ac_status=$?
17291   echo "$as_me:17291: \$? = $ac_status" >&5
17292   (exit $ac_status); }; }; then
17293   ac_cv_func_fork_works=yes
17294 else
17295   echo "$as_me: program exited with status $ac_status" >&5
17296 echo "$as_me: failed program was:" >&5
17297 cat conftest.$ac_ext >&5
17298 ac_cv_func_fork_works=no
17299 fi
17300 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17301 fi
17302 fi
17303 echo "$as_me:17303: result: $ac_cv_func_fork_works" >&5
17304 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17305
17306 fi
17307 if test "x$ac_cv_func_fork_works" = xcross; then
17308   case $host in
17309     *-*-amigaos* | *-*-msdosdjgpp*)
17310       # Override, as these systems have only a dummy fork() stub
17311       ac_cv_func_fork_works=no
17312       ;;
17313     *)
17314       ac_cv_func_fork_works=yes
17315       ;;
17316   esac
17317   { echo "$as_me:17317: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17318 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17319 fi
17320 ac_cv_func_vfork_works=$ac_cv_func_vfork
17321 if test "x$ac_cv_func_vfork" = xyes; then
17322   echo "$as_me:17322: checking for working vfork" >&5
17323 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17324 if test "${ac_cv_func_vfork_works+set}" = set; then
17325   echo $ECHO_N "(cached) $ECHO_C" >&6
17326 else
17327   if test "$cross_compiling" = yes; then
17328   ac_cv_func_vfork_works=cross
17329 else
17330   cat >conftest.$ac_ext <<_ACEOF
17331 #line 17331 "configure"
17332 #include "confdefs.h"
17333 /* Thanks to Paul Eggert for this test.  */
17334 #include <stdio.h>
17335 #include <sys/types.h>
17336 #include <sys/stat.h>
17337 #if HAVE_UNISTD_H
17338 # include <unistd.h>
17339 #endif
17340 #if HAVE_VFORK_H
17341 # include <vfork.h>
17342 #endif
17343 /* On some sparc systems, changes by the child to local and incoming
17344    argument registers are propagated back to the parent.  The compiler
17345    is told about this with #include <vfork.h>, but some compilers
17346    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17347    static variable whose address is put into a register that is
17348    clobbered by the vfork.  */
17349 static
17350 #ifdef __cplusplus
17351 sparc_address_test (int arg)
17352 # else
17353 sparc_address_test (arg) int arg;
17354 #endif
17355 {
17356   static pid_t child;
17357   if (!child) {
17358     child = vfork ();
17359     if (child < 0) {
17360       perror ("vfork");
17361       _exit(2);
17362     }
17363     if (!child) {
17364       arg = getpid();
17365       write(-1, "", 0);
17366       _exit (arg);
17367     }
17368   }
17369 }
17370
17371 int
17372 main ()
17373 {
17374   pid_t parent = getpid ();
17375   pid_t child;
17376
17377   sparc_address_test ();
17378
17379   child = vfork ();
17380
17381   if (child == 0) {
17382     /* Here is another test for sparc vfork register problems.  This
17383        test uses lots of local variables, at least as many local
17384        variables as main has allocated so far including compiler
17385        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17386        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17387        reuse the register of parent for one of the local variables,
17388        since it will think that parent can't possibly be used any more
17389        in this routine.  Assigning to the local variable will thus
17390        munge parent in the parent process.  */
17391     pid_t
17392       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17393       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17394     /* Convince the compiler that p..p7 are live; otherwise, it might
17395        use the same hardware register for all 8 local variables.  */
17396     if (p != p1 || p != p2 || p != p3 || p != p4
17397         || p != p5 || p != p6 || p != p7)
17398       _exit(1);
17399
17400     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17401        from child file descriptors.  If the child closes a descriptor
17402        before it execs or exits, this munges the parent's descriptor
17403        as well.  Test for this by closing stdout in the child.  */
17404     _exit(close(fileno(stdout)) != 0);
17405   } else {
17406     int status;
17407     struct stat st;
17408
17409     while (wait(&status) != child)
17410       ;
17411     $ac_main_return(
17412          /* Was there some problem with vforking?  */
17413          child < 0
17414
17415          /* Did the child fail?  (This shouldn't happen.)  */
17416          || status
17417
17418          /* Did the vfork/compiler bug occur?  */
17419          || parent != getpid()
17420
17421          /* Did the file descriptor bug occur?  */
17422          || fstat(fileno(stdout), &st) != 0
17423          );
17424   }
17425 }
17426 _ACEOF
17427 rm -f conftest$ac_exeext
17428 if { (eval echo "$as_me:17428: \"$ac_link\"") >&5
17429   (eval $ac_link) 2>&5
17430   ac_status=$?
17431   echo "$as_me:17431: \$? = $ac_status" >&5
17432   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17433   { (eval echo "$as_me:17433: \"$ac_try\"") >&5
17434   (eval $ac_try) 2>&5
17435   ac_status=$?
17436   echo "$as_me:17436: \$? = $ac_status" >&5
17437   (exit $ac_status); }; }; then
17438   ac_cv_func_vfork_works=yes
17439 else
17440   echo "$as_me: program exited with status $ac_status" >&5
17441 echo "$as_me: failed program was:" >&5
17442 cat conftest.$ac_ext >&5
17443 ac_cv_func_vfork_works=no
17444 fi
17445 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17446 fi
17447 fi
17448 echo "$as_me:17448: result: $ac_cv_func_vfork_works" >&5
17449 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17450
17451 fi;
17452 if test "x$ac_cv_func_fork_works" = xcross; then
17453   ac_cv_func_vfork_works=ac_cv_func_vfork
17454   { echo "$as_me:17454: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17455 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17456 fi
17457
17458 if test "x$ac_cv_func_vfork_works" = xyes; then
17459
17460 cat >>confdefs.h <<\EOF
17461 #define HAVE_WORKING_VFORK 1
17462 EOF
17463
17464 else
17465
17466 cat >>confdefs.h <<\EOF
17467 #define vfork fork
17468 EOF
17469
17470 fi
17471 if test "x$ac_cv_func_fork_works" = xyes; then
17472
17473 cat >>confdefs.h <<\EOF
17474 #define HAVE_WORKING_FORK 1
17475 EOF
17476
17477 fi
17478
17479 # special check for test/ditto.c
17480
17481 echo "$as_me:17481: checking for openpty in -lutil" >&5
17482 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17483 if test "${ac_cv_lib_util_openpty+set}" = set; then
17484   echo $ECHO_N "(cached) $ECHO_C" >&6
17485 else
17486   ac_check_lib_save_LIBS=$LIBS
17487 LIBS="-lutil  $LIBS"
17488 cat >conftest.$ac_ext <<_ACEOF
17489 #line 17489 "configure"
17490 #include "confdefs.h"
17491
17492 /* Override any gcc2 internal prototype to avoid an error.  */
17493 #ifdef __cplusplus
17494 extern "C"
17495 #endif
17496 /* We use char because int might match the return type of a gcc2
17497    builtin and then its argument prototype would still apply.  */
17498 char openpty ();
17499 int
17500 main ()
17501 {
17502 openpty ();
17503   ;
17504   return 0;
17505 }
17506 _ACEOF
17507 rm -f conftest.$ac_objext conftest$ac_exeext
17508 if { (eval echo "$as_me:17508: \"$ac_link\"") >&5
17509   (eval $ac_link) 2>&5
17510   ac_status=$?
17511   echo "$as_me:17511: \$? = $ac_status" >&5
17512   (exit $ac_status); } &&
17513          { ac_try='test -s conftest$ac_exeext'
17514   { (eval echo "$as_me:17514: \"$ac_try\"") >&5
17515   (eval $ac_try) 2>&5
17516   ac_status=$?
17517   echo "$as_me:17517: \$? = $ac_status" >&5
17518   (exit $ac_status); }; }; then
17519   ac_cv_lib_util_openpty=yes
17520 else
17521   echo "$as_me: failed program was:" >&5
17522 cat conftest.$ac_ext >&5
17523 ac_cv_lib_util_openpty=no
17524 fi
17525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17526 LIBS=$ac_check_lib_save_LIBS
17527 fi
17528 echo "$as_me:17528: result: $ac_cv_lib_util_openpty" >&5
17529 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17530 if test $ac_cv_lib_util_openpty = yes; then
17531   cf_cv_lib_util=yes
17532 else
17533   cf_cv_lib_util=no
17534 fi
17535
17536 echo "$as_me:17536: checking for openpty header" >&5
17537 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17538 if test "${cf_cv_func_openpty+set}" = set; then
17539   echo $ECHO_N "(cached) $ECHO_C" >&6
17540 else
17541
17542     cf_save_LIBS="$LIBS"
17543     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17544     for cf_header in pty.h libutil.h util.h
17545     do
17546     cat >conftest.$ac_ext <<_ACEOF
17547 #line 17547 "configure"
17548 #include "confdefs.h"
17549
17550 #include <$cf_header>
17551
17552 int
17553 main ()
17554 {
17555
17556     int x = openpty((int *)0, (int *)0, (char *)0,
17557                    (struct termios *)0, (struct winsize *)0);
17558
17559   ;
17560   return 0;
17561 }
17562 _ACEOF
17563 rm -f conftest.$ac_objext conftest$ac_exeext
17564 if { (eval echo "$as_me:17564: \"$ac_link\"") >&5
17565   (eval $ac_link) 2>&5
17566   ac_status=$?
17567   echo "$as_me:17567: \$? = $ac_status" >&5
17568   (exit $ac_status); } &&
17569          { ac_try='test -s conftest$ac_exeext'
17570   { (eval echo "$as_me:17570: \"$ac_try\"") >&5
17571   (eval $ac_try) 2>&5
17572   ac_status=$?
17573   echo "$as_me:17573: \$? = $ac_status" >&5
17574   (exit $ac_status); }; }; then
17575
17576         cf_cv_func_openpty=$cf_header
17577         break
17578
17579 else
17580   echo "$as_me: failed program was:" >&5
17581 cat conftest.$ac_ext >&5
17582
17583         cf_cv_func_openpty=no
17584
17585 fi
17586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17587     done
17588     LIBS="$cf_save_LIBS"
17589
17590 fi
17591 echo "$as_me:17591: result: $cf_cv_func_openpty" >&5
17592 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17593
17594 if test "$cf_cv_func_openpty" != no ; then
17595
17596 cat >>confdefs.h <<EOF
17597 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17598 EOF
17599
17600 cat >>confdefs.h <<\EOF
17601 #define USE_XTERM_PTY 1
17602 EOF
17603
17604     if test "x$cf_cv_lib_util" = xyes ; then
17605         TEST_LIBS="-lutil $TEST_LIBS"
17606     fi
17607 fi
17608
17609 if test "$with_hashed_db" != no ; then
17610
17611 cat >>confdefs.h <<\EOF
17612 #define USE_HASHED_DB 1
17613 EOF
17614
17615 case $with_hashed_db in #(vi
17616 yes|*able*) #(vi
17617     ;;
17618 *)
17619     if test -d "$with_hashed_db" ; then
17620
17621 if test -n "$with_hashed_db/include" ; then
17622   for cf_add_incdir in $with_hashed_db/include
17623   do
17624         while test $cf_add_incdir != /usr/include
17625         do
17626           if test -d $cf_add_incdir
17627           then
17628                 cf_have_incdir=no
17629                 if test -n "$CFLAGS$CPPFLAGS" ; then
17630                   # a loop is needed to ensure we can add subdirs of existing dirs
17631                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17632                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17633                           cf_have_incdir=yes; break
17634                         fi
17635                   done
17636                 fi
17637
17638                 if test "$cf_have_incdir" = no ; then
17639                   if test "$cf_add_incdir" = /usr/local/include ; then
17640                         if test "$GCC" = yes
17641                         then
17642                           cf_save_CPPFLAGS=$CPPFLAGS
17643                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17644                           cat >conftest.$ac_ext <<_ACEOF
17645 #line 17645 "configure"
17646 #include "confdefs.h"
17647 #include <stdio.h>
17648 int
17649 main ()
17650 {
17651 printf("Hello")
17652   ;
17653   return 0;
17654 }
17655 _ACEOF
17656 rm -f conftest.$ac_objext
17657 if { (eval echo "$as_me:17657: \"$ac_compile\"") >&5
17658   (eval $ac_compile) 2>&5
17659   ac_status=$?
17660   echo "$as_me:17660: \$? = $ac_status" >&5
17661   (exit $ac_status); } &&
17662          { ac_try='test -s conftest.$ac_objext'
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   :
17669 else
17670   echo "$as_me: failed program was:" >&5
17671 cat conftest.$ac_ext >&5
17672 cf_have_incdir=yes
17673 fi
17674 rm -f conftest.$ac_objext conftest.$ac_ext
17675                           CPPFLAGS=$cf_save_CPPFLAGS
17676                         fi
17677                   fi
17678                 fi
17679
17680                 if test "$cf_have_incdir" = no ; then
17681                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17682
17683 echo "${as_me:-configure}:17683: testing adding $cf_add_incdir to include-path ..." 1>&5
17684
17685                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17686
17687                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17688                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17689                   cf_add_incdir="$cf_top_incdir"
17690                 else
17691                   break
17692                 fi
17693           fi
17694         done
17695   done
17696 fi
17697
17698 if test -n "$with_hashed_db/lib" ; then
17699   for cf_add_libdir in $with_hashed_db/lib
17700   do
17701     if test $cf_add_libdir = /usr/lib ; then
17702       :
17703     elif test -d $cf_add_libdir
17704     then
17705       cf_have_libdir=no
17706       if test -n "$LDFLAGS$LIBS" ; then
17707         # a loop is needed to ensure we can add subdirs of existing dirs
17708         for cf_test_libdir in $LDFLAGS $LIBS ; do
17709           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17710             cf_have_libdir=yes; break
17711           fi
17712         done
17713       fi
17714       if test "$cf_have_libdir" = no ; then
17715         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17716
17717 echo "${as_me:-configure}:17717: testing adding $cf_add_libdir to library-path ..." 1>&5
17718
17719         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17720       fi
17721     fi
17722   done
17723 fi
17724
17725     fi
17726 esac
17727
17728 echo "$as_me:17728: checking for db.h" >&5
17729 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17730 if test "${ac_cv_header_db_h+set}" = set; then
17731   echo $ECHO_N "(cached) $ECHO_C" >&6
17732 else
17733   cat >conftest.$ac_ext <<_ACEOF
17734 #line 17734 "configure"
17735 #include "confdefs.h"
17736 #include <db.h>
17737 _ACEOF
17738 if { (eval echo "$as_me:17738: \"$ac_cpp conftest.$ac_ext\"") >&5
17739   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17740   ac_status=$?
17741   egrep -v '^ *\+' conftest.er1 >conftest.err
17742   rm -f conftest.er1
17743   cat conftest.err >&5
17744   echo "$as_me:17744: \$? = $ac_status" >&5
17745   (exit $ac_status); } >/dev/null; then
17746   if test -s conftest.err; then
17747     ac_cpp_err=$ac_c_preproc_warn_flag
17748   else
17749     ac_cpp_err=
17750   fi
17751 else
17752   ac_cpp_err=yes
17753 fi
17754 if test -z "$ac_cpp_err"; then
17755   ac_cv_header_db_h=yes
17756 else
17757   echo "$as_me: failed program was:" >&5
17758   cat conftest.$ac_ext >&5
17759   ac_cv_header_db_h=no
17760 fi
17761 rm -f conftest.err conftest.$ac_ext
17762 fi
17763 echo "$as_me:17763: result: $ac_cv_header_db_h" >&5
17764 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17765 if test $ac_cv_header_db_h = yes; then
17766
17767 echo "$as_me:17767: checking for version of db" >&5
17768 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17769 if test "${cf_cv_hashed_db_version+set}" = set; then
17770   echo $ECHO_N "(cached) $ECHO_C" >&6
17771 else
17772
17773 cf_cv_hashed_db_version=unknown
17774
17775 for cf_db_version in 1 2 3 4 5
17776 do
17777
17778 echo "${as_me:-configure}:17778: testing checking for db version $cf_db_version ..." 1>&5
17779
17780         cat >conftest.$ac_ext <<_ACEOF
17781 #line 17781 "configure"
17782 #include "confdefs.h"
17783
17784 $ac_includes_default
17785 #include <db.h>
17786
17787 #ifdef DB_VERSION_MAJOR
17788         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17789 #if $cf_db_version == DB_VERSION_MAJOR
17790         /* ok */
17791 #else
17792         make an error
17793 #endif
17794 #else
17795 #if $cf_db_version == 1
17796         /* ok: assuming this is DB 1.8.5 */
17797 #else
17798         make an error
17799 #endif
17800 #endif
17801
17802 int
17803 main ()
17804 {
17805 DBT *foo = 0
17806   ;
17807   return 0;
17808 }
17809 _ACEOF
17810 rm -f conftest.$ac_objext
17811 if { (eval echo "$as_me:17811: \"$ac_compile\"") >&5
17812   (eval $ac_compile) 2>&5
17813   ac_status=$?
17814   echo "$as_me:17814: \$? = $ac_status" >&5
17815   (exit $ac_status); } &&
17816          { ac_try='test -s conftest.$ac_objext'
17817   { (eval echo "$as_me:17817: \"$ac_try\"") >&5
17818   (eval $ac_try) 2>&5
17819   ac_status=$?
17820   echo "$as_me:17820: \$? = $ac_status" >&5
17821   (exit $ac_status); }; }; then
17822
17823         cf_cv_hashed_db_version=$cf_db_version
17824         break
17825
17826 else
17827   echo "$as_me: failed program was:" >&5
17828 cat conftest.$ac_ext >&5
17829 fi
17830 rm -f conftest.$ac_objext conftest.$ac_ext
17831 done
17832
17833 fi
17834 echo "$as_me:17834: result: $cf_cv_hashed_db_version" >&5
17835 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17836
17837 if test "$cf_cv_hashed_db_version" = unknown ; then
17838         { { echo "$as_me:17838: error: Cannot determine version of db" >&5
17839 echo "$as_me: error: Cannot determine version of db" >&2;}
17840    { (exit 1); exit 1; }; }
17841 else
17842
17843 echo "$as_me:17843: checking for db libraries" >&5
17844 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17845 if test "${cf_cv_hashed_db_libs+set}" = set; then
17846   echo $ECHO_N "(cached) $ECHO_C" >&6
17847 else
17848
17849 cf_cv_hashed_db_libs=unknown
17850 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17851 do
17852         cf_save_libs="$LIBS"
17853         if test -n "$cf_db_libs"; then
17854                 LIBS="-l$cf_db_libs $LIBS"
17855         fi
17856
17857 echo "${as_me:-configure}:17857: testing checking for library "$cf_db_libs" ..." 1>&5
17858
17859         cat >conftest.$ac_ext <<_ACEOF
17860 #line 17860 "configure"
17861 #include "confdefs.h"
17862
17863 $ac_includes_default
17864 #include <db.h>
17865
17866 int
17867 main ()
17868 {
17869
17870         char *path = "/tmp/foo";
17871 #ifdef DB_VERSION_MAJOR
17872 #if DB_VERSION_MAJOR >= 4
17873         DB *result = 0;
17874         db_create(&result, NULL, 0);
17875         result->open(result,
17876                 NULL,
17877                 path,
17878                 path,
17879                 DB_HASH,
17880                 DB_CREATE,
17881                 0644);
17882 #elif DB_VERSION_MAJOR >= 3
17883         DB *result = 0;
17884         db_create(&result, NULL, 0);
17885         result->open(result,
17886                 path,
17887                 path,
17888                 DB_HASH,
17889                 DB_CREATE,
17890                 0644);
17891 #elif DB_VERSION_MAJOR >= 2
17892         DB *result = 0;
17893         db_open(path,
17894                 DB_HASH,
17895                 DB_CREATE,
17896                 0644,
17897                 (DB_ENV *) 0,
17898                 (DB_INFO *) 0,
17899                 &result);
17900 #endif /* DB_VERSION_MAJOR */
17901 #else
17902         DB *result = dbopen(path,
17903                      2,
17904                      0644,
17905                      DB_HASH,
17906                      0);
17907 #endif
17908         ${cf_cv_main_return:-return}(result != 0)
17909
17910   ;
17911   return 0;
17912 }
17913 _ACEOF
17914 rm -f conftest.$ac_objext conftest$ac_exeext
17915 if { (eval echo "$as_me:17915: \"$ac_link\"") >&5
17916   (eval $ac_link) 2>&5
17917   ac_status=$?
17918   echo "$as_me:17918: \$? = $ac_status" >&5
17919   (exit $ac_status); } &&
17920          { ac_try='test -s conftest$ac_exeext'
17921   { (eval echo "$as_me:17921: \"$ac_try\"") >&5
17922   (eval $ac_try) 2>&5
17923   ac_status=$?
17924   echo "$as_me:17924: \$? = $ac_status" >&5
17925   (exit $ac_status); }; }; then
17926
17927         if test -n "$cf_db_libs" ; then
17928                 cf_cv_hashed_db_libs=$cf_db_libs
17929         else
17930                 cf_cv_hashed_db_libs=default
17931         fi
17932         LIBS="$cf_save_libs"
17933         break
17934
17935 else
17936   echo "$as_me: failed program was:" >&5
17937 cat conftest.$ac_ext >&5
17938 fi
17939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17940         LIBS="$cf_save_libs"
17941 done
17942
17943 fi
17944 echo "$as_me:17944: result: $cf_cv_hashed_db_libs" >&5
17945 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17946
17947         if test "$cf_cv_hashed_db_libs" = unknown ; then
17948                 { { echo "$as_me:17948: error: Cannot determine library for db" >&5
17949 echo "$as_me: error: Cannot determine library for db" >&2;}
17950    { (exit 1); exit 1; }; }
17951         elif test "$cf_cv_hashed_db_libs" != default ; then
17952                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17953         fi
17954 fi
17955
17956 else
17957
17958         { { echo "$as_me:17958: error: Cannot find db.h" >&5
17959 echo "$as_me: error: Cannot find db.h" >&2;}
17960    { (exit 1); exit 1; }; }
17961
17962 fi
17963
17964 fi
17965
17966 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17967         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17968         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17969 fi
17970
17971 # Just in case, check if the C compiler has a bool type.
17972
17973 echo "$as_me:17973: checking if we should include stdbool.h" >&5
17974 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17975
17976 if test "${cf_cv_header_stdbool_h+set}" = set; then
17977   echo $ECHO_N "(cached) $ECHO_C" >&6
17978 else
17979
17980         cat >conftest.$ac_ext <<_ACEOF
17981 #line 17981 "configure"
17982 #include "confdefs.h"
17983
17984 int
17985 main ()
17986 {
17987 bool foo = false
17988   ;
17989   return 0;
17990 }
17991 _ACEOF
17992 rm -f conftest.$ac_objext
17993 if { (eval echo "$as_me:17993: \"$ac_compile\"") >&5
17994   (eval $ac_compile) 2>&5
17995   ac_status=$?
17996   echo "$as_me:17996: \$? = $ac_status" >&5
17997   (exit $ac_status); } &&
17998          { ac_try='test -s conftest.$ac_objext'
17999   { (eval echo "$as_me:17999: \"$ac_try\"") >&5
18000   (eval $ac_try) 2>&5
18001   ac_status=$?
18002   echo "$as_me:18002: \$? = $ac_status" >&5
18003   (exit $ac_status); }; }; then
18004   cf_cv_header_stdbool_h=0
18005 else
18006   echo "$as_me: failed program was:" >&5
18007 cat conftest.$ac_ext >&5
18008 cat >conftest.$ac_ext <<_ACEOF
18009 #line 18009 "configure"
18010 #include "confdefs.h"
18011
18012 #ifndef __BEOS__
18013 #include <stdbool.h>
18014 #endif
18015
18016 int
18017 main ()
18018 {
18019 bool foo = false
18020   ;
18021   return 0;
18022 }
18023 _ACEOF
18024 rm -f conftest.$ac_objext
18025 if { (eval echo "$as_me:18025: \"$ac_compile\"") >&5
18026   (eval $ac_compile) 2>&5
18027   ac_status=$?
18028   echo "$as_me:18028: \$? = $ac_status" >&5
18029   (exit $ac_status); } &&
18030          { ac_try='test -s conftest.$ac_objext'
18031   { (eval echo "$as_me:18031: \"$ac_try\"") >&5
18032   (eval $ac_try) 2>&5
18033   ac_status=$?
18034   echo "$as_me:18034: \$? = $ac_status" >&5
18035   (exit $ac_status); }; }; then
18036   cf_cv_header_stdbool_h=1
18037 else
18038   echo "$as_me: failed program was:" >&5
18039 cat conftest.$ac_ext >&5
18040 cf_cv_header_stdbool_h=0
18041 fi
18042 rm -f conftest.$ac_objext conftest.$ac_ext
18043 fi
18044 rm -f conftest.$ac_objext conftest.$ac_ext
18045 fi
18046
18047 if test "$cf_cv_header_stdbool_h" = 1
18048 then    echo "$as_me:18048: result: yes" >&5
18049 echo "${ECHO_T}yes" >&6
18050 else    echo "$as_me:18050: result: no" >&5
18051 echo "${ECHO_T}no" >&6
18052 fi
18053
18054 echo "$as_me:18054: checking for builtin bool type" >&5
18055 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18056
18057 if test "${cf_cv_cc_bool_type+set}" = set; then
18058   echo $ECHO_N "(cached) $ECHO_C" >&6
18059 else
18060
18061         cat >conftest.$ac_ext <<_ACEOF
18062 #line 18062 "configure"
18063 #include "confdefs.h"
18064
18065 #include <stdio.h>
18066 #include <sys/types.h>
18067
18068 int
18069 main ()
18070 {
18071 bool x = false
18072   ;
18073   return 0;
18074 }
18075 _ACEOF
18076 rm -f conftest.$ac_objext
18077 if { (eval echo "$as_me:18077: \"$ac_compile\"") >&5
18078   (eval $ac_compile) 2>&5
18079   ac_status=$?
18080   echo "$as_me:18080: \$? = $ac_status" >&5
18081   (exit $ac_status); } &&
18082          { ac_try='test -s conftest.$ac_objext'
18083   { (eval echo "$as_me:18083: \"$ac_try\"") >&5
18084   (eval $ac_try) 2>&5
18085   ac_status=$?
18086   echo "$as_me:18086: \$? = $ac_status" >&5
18087   (exit $ac_status); }; }; then
18088   cf_cv_cc_bool_type=1
18089 else
18090   echo "$as_me: failed program was:" >&5
18091 cat conftest.$ac_ext >&5
18092 cf_cv_cc_bool_type=0
18093 fi
18094 rm -f conftest.$ac_objext conftest.$ac_ext
18095
18096 fi
18097
18098 if test "$cf_cv_cc_bool_type" = 1
18099 then    echo "$as_me:18099: result: yes" >&5
18100 echo "${ECHO_T}yes" >&6
18101 else    echo "$as_me:18101: result: no" >&5
18102 echo "${ECHO_T}no" >&6
18103 fi
18104
18105 # Check for C++ compiler characteristics (and ensure that it's there!)
18106 if test -n "$CXX" ; then
18107         ac_ext=cc
18108 ac_cpp='$CXXCPP $CPPFLAGS'
18109 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18110 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18111 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18112 ac_main_return=return
18113
18114 if test -n "$GXX" ; then
18115 case $cf_cv_system_name in #(vi
18116 os2*) #(vi
18117         cf_stdcpp_libname=stdcpp
18118         ;;
18119 *)
18120         cf_stdcpp_libname=stdc++
18121         ;;
18122 esac
18123 echo "$as_me:18123: checking for library $cf_stdcpp_libname" >&5
18124 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18125 if test "${cf_cv_libstdcpp+set}" = set; then
18126   echo $ECHO_N "(cached) $ECHO_C" >&6
18127 else
18128
18129         cf_save="$LIBS"
18130         LIBS="-l$cf_stdcpp_libname $LIBS"
18131 cat >conftest.$ac_ext <<_ACEOF
18132 #line 18132 "configure"
18133 #include "confdefs.h"
18134
18135 #include <strstream.h>
18136 int
18137 main ()
18138 {
18139
18140 char buf[80];
18141 strstreambuf foo(buf, sizeof(buf))
18142
18143   ;
18144   return 0;
18145 }
18146 _ACEOF
18147 rm -f conftest.$ac_objext conftest$ac_exeext
18148 if { (eval echo "$as_me:18148: \"$ac_link\"") >&5
18149   (eval $ac_link) 2>&5
18150   ac_status=$?
18151   echo "$as_me:18151: \$? = $ac_status" >&5
18152   (exit $ac_status); } &&
18153          { ac_try='test -s conftest$ac_exeext'
18154   { (eval echo "$as_me:18154: \"$ac_try\"") >&5
18155   (eval $ac_try) 2>&5
18156   ac_status=$?
18157   echo "$as_me:18157: \$? = $ac_status" >&5
18158   (exit $ac_status); }; }; then
18159   cf_cv_libstdcpp=yes
18160 else
18161   echo "$as_me: failed program was:" >&5
18162 cat conftest.$ac_ext >&5
18163 cf_cv_libstdcpp=no
18164 fi
18165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18166         LIBS="$cf_save"
18167
18168 fi
18169 echo "$as_me:18169: result: $cf_cv_libstdcpp" >&5
18170 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18171 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18172 fi
18173
18174         echo "$as_me:18174: checking whether $CXX understands -c and -o together" >&5
18175 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18176 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18177   echo $ECHO_N "(cached) $ECHO_C" >&6
18178 else
18179
18180 cat > conftest.$ac_ext <<CF_EOF
18181 #include <stdio.h>
18182 int main()
18183 {
18184         ${cf_cv_main_return:-return}(0);
18185 }
18186 CF_EOF
18187 # We do the test twice because some compilers refuse to overwrite an
18188 # existing .o file with -o, though they will create one.
18189 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18190 if { (eval echo "$as_me:18190: \"$ac_try\"") >&5
18191   (eval $ac_try) 2>&5
18192   ac_status=$?
18193   echo "$as_me:18193: \$? = $ac_status" >&5
18194   (exit $ac_status); } &&
18195   test -f conftest2.$ac_objext && { (eval echo "$as_me:18195: \"$ac_try\"") >&5
18196   (eval $ac_try) 2>&5
18197   ac_status=$?
18198   echo "$as_me:18198: \$? = $ac_status" >&5
18199   (exit $ac_status); };
18200 then
18201   eval cf_cv_prog_CXX_c_o=yes
18202 else
18203   eval cf_cv_prog_CXX_c_o=no
18204 fi
18205 rm -rf conftest*
18206
18207 fi
18208 if test $cf_cv_prog_CXX_c_o = yes; then
18209   echo "$as_me:18209: result: yes" >&5
18210 echo "${ECHO_T}yes" >&6
18211 else
18212   echo "$as_me:18212: result: no" >&5
18213 echo "${ECHO_T}no" >&6
18214 fi
18215
18216         case $GXX_VERSION in
18217         1*|2.0-6*)
18218                 cf_cxx_library=yes
18219                 ;;
18220         *-2.7*|2.7*)
18221
18222 cf_cxx_library=unknown
18223 case $cf_cv_system_name in #(vi
18224 os2*) #(vi
18225         cf_gpp_libname=gpp
18226         ;;
18227 *)
18228         cf_gpp_libname=g++
18229         ;;
18230 esac
18231 if test "$GXX" = yes; then
18232         echo "$as_me:18232: checking for lib$cf_gpp_libname" >&5
18233 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18234         cf_save="$LIBS"
18235         LIBS="-l$cf_gpp_libname $LIBS"
18236         cat >conftest.$ac_ext <<_ACEOF
18237 #line 18237 "configure"
18238 #include "confdefs.h"
18239
18240 #include <$cf_gpp_libname/builtin.h>
18241
18242 int
18243 main ()
18244 {
18245 two_arg_error_handler_t foo2 = lib_error_handler
18246   ;
18247   return 0;
18248 }
18249 _ACEOF
18250 rm -f conftest.$ac_objext conftest$ac_exeext
18251 if { (eval echo "$as_me:18251: \"$ac_link\"") >&5
18252   (eval $ac_link) 2>&5
18253   ac_status=$?
18254   echo "$as_me:18254: \$? = $ac_status" >&5
18255   (exit $ac_status); } &&
18256          { ac_try='test -s conftest$ac_exeext'
18257   { (eval echo "$as_me:18257: \"$ac_try\"") >&5
18258   (eval $ac_try) 2>&5
18259   ac_status=$?
18260   echo "$as_me:18260: \$? = $ac_status" >&5
18261   (exit $ac_status); }; }; then
18262   cf_cxx_library=yes
18263          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18264          if test "$cf_gpp_libname" = cpp ; then
18265
18266 cat >>confdefs.h <<\EOF
18267 #define HAVE_GPP_BUILTIN_H 1
18268 EOF
18269
18270          else
18271
18272 cat >>confdefs.h <<\EOF
18273 #define HAVE_GXX_BUILTIN_H 1
18274 EOF
18275
18276          fi
18277 else
18278   echo "$as_me: failed program was:" >&5
18279 cat conftest.$ac_ext >&5
18280 cat >conftest.$ac_ext <<_ACEOF
18281 #line 18281 "configure"
18282 #include "confdefs.h"
18283
18284 #include <builtin.h>
18285
18286 int
18287 main ()
18288 {
18289 two_arg_error_handler_t foo2 = lib_error_handler
18290   ;
18291   return 0;
18292 }
18293 _ACEOF
18294 rm -f conftest.$ac_objext conftest$ac_exeext
18295 if { (eval echo "$as_me:18295: \"$ac_link\"") >&5
18296   (eval $ac_link) 2>&5
18297   ac_status=$?
18298   echo "$as_me:18298: \$? = $ac_status" >&5
18299   (exit $ac_status); } &&
18300          { ac_try='test -s conftest$ac_exeext'
18301   { (eval echo "$as_me:18301: \"$ac_try\"") >&5
18302   (eval $ac_try) 2>&5
18303   ac_status=$?
18304   echo "$as_me:18304: \$? = $ac_status" >&5
18305   (exit $ac_status); }; }; then
18306   cf_cxx_library=yes
18307          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18308
18309 cat >>confdefs.h <<\EOF
18310 #define HAVE_BUILTIN_H 1
18311 EOF
18312
18313 else
18314   echo "$as_me: failed program was:" >&5
18315 cat conftest.$ac_ext >&5
18316 cf_cxx_library=no
18317 fi
18318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18319 fi
18320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18321         LIBS="$cf_save"
18322         echo "$as_me:18322: result: $cf_cxx_library" >&5
18323 echo "${ECHO_T}$cf_cxx_library" >&6
18324 fi
18325
18326                 ;;
18327         *)
18328                 cf_cxx_library=no
18329                 ;;
18330         esac
18331
18332         ac_ext=cc
18333 ac_cpp='$CXXCPP $CPPFLAGS'
18334 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18335 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18336 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18337 ac_main_return=return
18338 echo "$as_me:18338: checking how to run the C++ preprocessor" >&5
18339 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18340 if test -z "$CXXCPP"; then
18341   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18342   echo $ECHO_N "(cached) $ECHO_C" >&6
18343 else
18344       # Double quotes because CXXCPP needs to be expanded
18345     for CXXCPP in "$CXX -E" "/lib/cpp"
18346     do
18347       ac_preproc_ok=false
18348 for ac_cxx_preproc_warn_flag in '' yes
18349 do
18350   # Use a header file that comes with gcc, so configuring glibc
18351   # with a fresh cross-compiler works.
18352   # On the NeXT, cc -E runs the code through the compiler's parser,
18353   # not just through cpp. "Syntax error" is here to catch this case.
18354   cat >conftest.$ac_ext <<_ACEOF
18355 #line 18355 "configure"
18356 #include "confdefs.h"
18357 #include <assert.h>
18358                      Syntax error
18359 _ACEOF
18360 if { (eval echo "$as_me:18360: \"$ac_cpp conftest.$ac_ext\"") >&5
18361   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18362   ac_status=$?
18363   egrep -v '^ *\+' conftest.er1 >conftest.err
18364   rm -f conftest.er1
18365   cat conftest.err >&5
18366   echo "$as_me:18366: \$? = $ac_status" >&5
18367   (exit $ac_status); } >/dev/null; then
18368   if test -s conftest.err; then
18369     ac_cpp_err=$ac_cxx_preproc_warn_flag
18370   else
18371     ac_cpp_err=
18372   fi
18373 else
18374   ac_cpp_err=yes
18375 fi
18376 if test -z "$ac_cpp_err"; then
18377   :
18378 else
18379   echo "$as_me: failed program was:" >&5
18380   cat conftest.$ac_ext >&5
18381   # Broken: fails on valid input.
18382 continue
18383 fi
18384 rm -f conftest.err conftest.$ac_ext
18385
18386   # OK, works on sane cases.  Now check whether non-existent headers
18387   # can be detected and how.
18388   cat >conftest.$ac_ext <<_ACEOF
18389 #line 18389 "configure"
18390 #include "confdefs.h"
18391 #include <ac_nonexistent.h>
18392 _ACEOF
18393 if { (eval echo "$as_me:18393: \"$ac_cpp conftest.$ac_ext\"") >&5
18394   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18395   ac_status=$?
18396   egrep -v '^ *\+' conftest.er1 >conftest.err
18397   rm -f conftest.er1
18398   cat conftest.err >&5
18399   echo "$as_me:18399: \$? = $ac_status" >&5
18400   (exit $ac_status); } >/dev/null; then
18401   if test -s conftest.err; then
18402     ac_cpp_err=$ac_cxx_preproc_warn_flag
18403   else
18404     ac_cpp_err=
18405   fi
18406 else
18407   ac_cpp_err=yes
18408 fi
18409 if test -z "$ac_cpp_err"; then
18410   # Broken: success on invalid input.
18411 continue
18412 else
18413   echo "$as_me: failed program was:" >&5
18414   cat conftest.$ac_ext >&5
18415   # Passes both tests.
18416 ac_preproc_ok=:
18417 break
18418 fi
18419 rm -f conftest.err conftest.$ac_ext
18420
18421 done
18422 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18423 rm -f conftest.err conftest.$ac_ext
18424 if $ac_preproc_ok; then
18425   break
18426 fi
18427
18428     done
18429     ac_cv_prog_CXXCPP=$CXXCPP
18430
18431 fi
18432   CXXCPP=$ac_cv_prog_CXXCPP
18433 else
18434   ac_cv_prog_CXXCPP=$CXXCPP
18435 fi
18436 echo "$as_me:18436: result: $CXXCPP" >&5
18437 echo "${ECHO_T}$CXXCPP" >&6
18438 ac_preproc_ok=false
18439 for ac_cxx_preproc_warn_flag in '' yes
18440 do
18441   # Use a header file that comes with gcc, so configuring glibc
18442   # with a fresh cross-compiler works.
18443   # On the NeXT, cc -E runs the code through the compiler's parser,
18444   # not just through cpp. "Syntax error" is here to catch this case.
18445   cat >conftest.$ac_ext <<_ACEOF
18446 #line 18446 "configure"
18447 #include "confdefs.h"
18448 #include <assert.h>
18449                      Syntax error
18450 _ACEOF
18451 if { (eval echo "$as_me:18451: \"$ac_cpp conftest.$ac_ext\"") >&5
18452   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18453   ac_status=$?
18454   egrep -v '^ *\+' conftest.er1 >conftest.err
18455   rm -f conftest.er1
18456   cat conftest.err >&5
18457   echo "$as_me:18457: \$? = $ac_status" >&5
18458   (exit $ac_status); } >/dev/null; then
18459   if test -s conftest.err; then
18460     ac_cpp_err=$ac_cxx_preproc_warn_flag
18461   else
18462     ac_cpp_err=
18463   fi
18464 else
18465   ac_cpp_err=yes
18466 fi
18467 if test -z "$ac_cpp_err"; then
18468   :
18469 else
18470   echo "$as_me: failed program was:" >&5
18471   cat conftest.$ac_ext >&5
18472   # Broken: fails on valid input.
18473 continue
18474 fi
18475 rm -f conftest.err conftest.$ac_ext
18476
18477   # OK, works on sane cases.  Now check whether non-existent headers
18478   # can be detected and how.
18479   cat >conftest.$ac_ext <<_ACEOF
18480 #line 18480 "configure"
18481 #include "confdefs.h"
18482 #include <ac_nonexistent.h>
18483 _ACEOF
18484 if { (eval echo "$as_me:18484: \"$ac_cpp conftest.$ac_ext\"") >&5
18485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18486   ac_status=$?
18487   egrep -v '^ *\+' conftest.er1 >conftest.err
18488   rm -f conftest.er1
18489   cat conftest.err >&5
18490   echo "$as_me:18490: \$? = $ac_status" >&5
18491   (exit $ac_status); } >/dev/null; then
18492   if test -s conftest.err; then
18493     ac_cpp_err=$ac_cxx_preproc_warn_flag
18494   else
18495     ac_cpp_err=
18496   fi
18497 else
18498   ac_cpp_err=yes
18499 fi
18500 if test -z "$ac_cpp_err"; then
18501   # Broken: success on invalid input.
18502 continue
18503 else
18504   echo "$as_me: failed program was:" >&5
18505   cat conftest.$ac_ext >&5
18506   # Passes both tests.
18507 ac_preproc_ok=:
18508 break
18509 fi
18510 rm -f conftest.err conftest.$ac_ext
18511
18512 done
18513 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18514 rm -f conftest.err conftest.$ac_ext
18515 if $ac_preproc_ok; then
18516   :
18517 else
18518   { { echo "$as_me:18518: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18519 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18520    { (exit 1); exit 1; }; }
18521 fi
18522
18523 ac_ext=cc
18524 ac_cpp='$CXXCPP $CPPFLAGS'
18525 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18526 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18527 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18528 ac_main_return=return
18529
18530 for ac_header in typeinfo
18531 do
18532 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18533 echo "$as_me:18533: checking for $ac_header" >&5
18534 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18535 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18536   echo $ECHO_N "(cached) $ECHO_C" >&6
18537 else
18538   cat >conftest.$ac_ext <<_ACEOF
18539 #line 18539 "configure"
18540 #include "confdefs.h"
18541 #include <$ac_header>
18542 _ACEOF
18543 if { (eval echo "$as_me:18543: \"$ac_cpp conftest.$ac_ext\"") >&5
18544   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18545   ac_status=$?
18546   egrep -v '^ *\+' conftest.er1 >conftest.err
18547   rm -f conftest.er1
18548   cat conftest.err >&5
18549   echo "$as_me:18549: \$? = $ac_status" >&5
18550   (exit $ac_status); } >/dev/null; then
18551   if test -s conftest.err; then
18552     ac_cpp_err=$ac_cxx_preproc_warn_flag
18553   else
18554     ac_cpp_err=
18555   fi
18556 else
18557   ac_cpp_err=yes
18558 fi
18559 if test -z "$ac_cpp_err"; then
18560   eval "$as_ac_Header=yes"
18561 else
18562   echo "$as_me: failed program was:" >&5
18563   cat conftest.$ac_ext >&5
18564   eval "$as_ac_Header=no"
18565 fi
18566 rm -f conftest.err conftest.$ac_ext
18567 fi
18568 echo "$as_me:18568: result: `eval echo '${'$as_ac_Header'}'`" >&5
18569 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18570 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18571   cat >>confdefs.h <<EOF
18572 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18573 EOF
18574
18575 fi
18576 done
18577
18578 for ac_header in iostream
18579 do
18580 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18581 echo "$as_me:18581: checking for $ac_header" >&5
18582 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18584   echo $ECHO_N "(cached) $ECHO_C" >&6
18585 else
18586   cat >conftest.$ac_ext <<_ACEOF
18587 #line 18587 "configure"
18588 #include "confdefs.h"
18589 #include <$ac_header>
18590 _ACEOF
18591 if { (eval echo "$as_me:18591: \"$ac_cpp conftest.$ac_ext\"") >&5
18592   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18593   ac_status=$?
18594   egrep -v '^ *\+' conftest.er1 >conftest.err
18595   rm -f conftest.er1
18596   cat conftest.err >&5
18597   echo "$as_me:18597: \$? = $ac_status" >&5
18598   (exit $ac_status); } >/dev/null; then
18599   if test -s conftest.err; then
18600     ac_cpp_err=$ac_cxx_preproc_warn_flag
18601   else
18602     ac_cpp_err=
18603   fi
18604 else
18605   ac_cpp_err=yes
18606 fi
18607 if test -z "$ac_cpp_err"; then
18608   eval "$as_ac_Header=yes"
18609 else
18610   echo "$as_me: failed program was:" >&5
18611   cat conftest.$ac_ext >&5
18612   eval "$as_ac_Header=no"
18613 fi
18614 rm -f conftest.err conftest.$ac_ext
18615 fi
18616 echo "$as_me:18616: result: `eval echo '${'$as_ac_Header'}'`" >&5
18617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18618 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18619   cat >>confdefs.h <<EOF
18620 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18621 EOF
18622
18623 fi
18624 done
18625
18626 if test x"$ac_cv_header_iostream" = xyes ; then
18627         echo "$as_me:18627: checking if iostream uses std-namespace" >&5
18628 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18629         cat >conftest.$ac_ext <<_ACEOF
18630 #line 18630 "configure"
18631 #include "confdefs.h"
18632
18633 #include <iostream>
18634 using std::endl;
18635 using std::cerr;
18636 int
18637 main ()
18638 {
18639
18640 cerr << "testing" << endl;
18641
18642   ;
18643   return 0;
18644 }
18645 _ACEOF
18646 rm -f conftest.$ac_objext
18647 if { (eval echo "$as_me:18647: \"$ac_compile\"") >&5
18648   (eval $ac_compile) 2>&5
18649   ac_status=$?
18650   echo "$as_me:18650: \$? = $ac_status" >&5
18651   (exit $ac_status); } &&
18652          { ac_try='test -s conftest.$ac_objext'
18653   { (eval echo "$as_me:18653: \"$ac_try\"") >&5
18654   (eval $ac_try) 2>&5
18655   ac_status=$?
18656   echo "$as_me:18656: \$? = $ac_status" >&5
18657   (exit $ac_status); }; }; then
18658   cf_iostream_namespace=yes
18659 else
18660   echo "$as_me: failed program was:" >&5
18661 cat conftest.$ac_ext >&5
18662 cf_iostream_namespace=no
18663 fi
18664 rm -f conftest.$ac_objext conftest.$ac_ext
18665         echo "$as_me:18665: result: $cf_iostream_namespace" >&5
18666 echo "${ECHO_T}$cf_iostream_namespace" >&6
18667         if test "$cf_iostream_namespace" = yes ; then
18668
18669 cat >>confdefs.h <<\EOF
18670 #define IOSTREAM_NAMESPACE 1
18671 EOF
18672
18673         fi
18674 fi
18675
18676 echo "$as_me:18676: checking if we should include stdbool.h" >&5
18677 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18678
18679 if test "${cf_cv_header_stdbool_h+set}" = set; then
18680   echo $ECHO_N "(cached) $ECHO_C" >&6
18681 else
18682
18683         cat >conftest.$ac_ext <<_ACEOF
18684 #line 18684 "configure"
18685 #include "confdefs.h"
18686
18687 int
18688 main ()
18689 {
18690 bool foo = false
18691   ;
18692   return 0;
18693 }
18694 _ACEOF
18695 rm -f conftest.$ac_objext
18696 if { (eval echo "$as_me:18696: \"$ac_compile\"") >&5
18697   (eval $ac_compile) 2>&5
18698   ac_status=$?
18699   echo "$as_me:18699: \$? = $ac_status" >&5
18700   (exit $ac_status); } &&
18701          { ac_try='test -s conftest.$ac_objext'
18702   { (eval echo "$as_me:18702: \"$ac_try\"") >&5
18703   (eval $ac_try) 2>&5
18704   ac_status=$?
18705   echo "$as_me:18705: \$? = $ac_status" >&5
18706   (exit $ac_status); }; }; then
18707   cf_cv_header_stdbool_h=0
18708 else
18709   echo "$as_me: failed program was:" >&5
18710 cat conftest.$ac_ext >&5
18711 cat >conftest.$ac_ext <<_ACEOF
18712 #line 18712 "configure"
18713 #include "confdefs.h"
18714
18715 #ifndef __BEOS__
18716 #include <stdbool.h>
18717 #endif
18718
18719 int
18720 main ()
18721 {
18722 bool foo = false
18723   ;
18724   return 0;
18725 }
18726 _ACEOF
18727 rm -f conftest.$ac_objext
18728 if { (eval echo "$as_me:18728: \"$ac_compile\"") >&5
18729   (eval $ac_compile) 2>&5
18730   ac_status=$?
18731   echo "$as_me:18731: \$? = $ac_status" >&5
18732   (exit $ac_status); } &&
18733          { ac_try='test -s conftest.$ac_objext'
18734   { (eval echo "$as_me:18734: \"$ac_try\"") >&5
18735   (eval $ac_try) 2>&5
18736   ac_status=$?
18737   echo "$as_me:18737: \$? = $ac_status" >&5
18738   (exit $ac_status); }; }; then
18739   cf_cv_header_stdbool_h=1
18740 else
18741   echo "$as_me: failed program was:" >&5
18742 cat conftest.$ac_ext >&5
18743 cf_cv_header_stdbool_h=0
18744 fi
18745 rm -f conftest.$ac_objext conftest.$ac_ext
18746 fi
18747 rm -f conftest.$ac_objext conftest.$ac_ext
18748 fi
18749
18750 if test "$cf_cv_header_stdbool_h" = 1
18751 then    echo "$as_me:18751: result: yes" >&5
18752 echo "${ECHO_T}yes" >&6
18753 else    echo "$as_me:18753: result: no" >&5
18754 echo "${ECHO_T}no" >&6
18755 fi
18756
18757 echo "$as_me:18757: checking for builtin bool type" >&5
18758 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18759
18760 if test "${cf_cv_builtin_bool+set}" = set; then
18761   echo $ECHO_N "(cached) $ECHO_C" >&6
18762 else
18763
18764         cat >conftest.$ac_ext <<_ACEOF
18765 #line 18765 "configure"
18766 #include "confdefs.h"
18767
18768 #include <stdio.h>
18769 #include <sys/types.h>
18770
18771 int
18772 main ()
18773 {
18774 bool x = false
18775   ;
18776   return 0;
18777 }
18778 _ACEOF
18779 rm -f conftest.$ac_objext
18780 if { (eval echo "$as_me:18780: \"$ac_compile\"") >&5
18781   (eval $ac_compile) 2>&5
18782   ac_status=$?
18783   echo "$as_me:18783: \$? = $ac_status" >&5
18784   (exit $ac_status); } &&
18785          { ac_try='test -s conftest.$ac_objext'
18786   { (eval echo "$as_me:18786: \"$ac_try\"") >&5
18787   (eval $ac_try) 2>&5
18788   ac_status=$?
18789   echo "$as_me:18789: \$? = $ac_status" >&5
18790   (exit $ac_status); }; }; then
18791   cf_cv_builtin_bool=1
18792 else
18793   echo "$as_me: failed program was:" >&5
18794 cat conftest.$ac_ext >&5
18795 cf_cv_builtin_bool=0
18796 fi
18797 rm -f conftest.$ac_objext conftest.$ac_ext
18798
18799 fi
18800
18801 if test "$cf_cv_builtin_bool" = 1
18802 then    echo "$as_me:18802: result: yes" >&5
18803 echo "${ECHO_T}yes" >&6
18804 else    echo "$as_me:18804: result: no" >&5
18805 echo "${ECHO_T}no" >&6
18806 fi
18807
18808 echo "$as_me:18808: checking for size of bool" >&5
18809 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18810 if test "${cf_cv_type_of_bool+set}" = set; then
18811   echo $ECHO_N "(cached) $ECHO_C" >&6
18812 else
18813
18814         rm -f cf_test.out
18815         if test "$cross_compiling" = yes; then
18816   cf_cv_type_of_bool=unknown
18817 else
18818   cat >conftest.$ac_ext <<_ACEOF
18819 #line 18819 "configure"
18820 #include "confdefs.h"
18821
18822 #include <stdlib.h>
18823 #include <stdio.h>
18824
18825 #if defined(__cplusplus)
18826
18827 #ifdef HAVE_GXX_BUILTIN_H
18828 #include <g++/builtin.h>
18829 #elif HAVE_GPP_BUILTIN_H
18830 #include <gpp/builtin.h>
18831 #elif HAVE_BUILTIN_H
18832 #include <builtin.h>
18833 #endif
18834
18835 #else
18836
18837 #if $cf_cv_header_stdbool_h
18838 #include <stdbool.h>
18839 #endif
18840
18841 #endif
18842
18843 main()
18844 {
18845         FILE *fp = fopen("cf_test.out", "w");
18846         if (fp != 0) {
18847                 bool x = true;
18848                 if ((bool)(-x) >= 0)
18849                         fputs("unsigned ", fp);
18850                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18851                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18852                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18853                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18854                 fclose(fp);
18855         }
18856         ${cf_cv_main_return:-return}(0);
18857 }
18858
18859 _ACEOF
18860 rm -f conftest$ac_exeext
18861 if { (eval echo "$as_me:18861: \"$ac_link\"") >&5
18862   (eval $ac_link) 2>&5
18863   ac_status=$?
18864   echo "$as_me:18864: \$? = $ac_status" >&5
18865   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18866   { (eval echo "$as_me:18866: \"$ac_try\"") >&5
18867   (eval $ac_try) 2>&5
18868   ac_status=$?
18869   echo "$as_me:18869: \$? = $ac_status" >&5
18870   (exit $ac_status); }; }; then
18871   cf_cv_type_of_bool=`cat cf_test.out`
18872                  if test -z "$cf_cv_type_of_bool"; then
18873                    cf_cv_type_of_bool=unknown
18874                  fi
18875 else
18876   echo "$as_me: program exited with status $ac_status" >&5
18877 echo "$as_me: failed program was:" >&5
18878 cat conftest.$ac_ext >&5
18879 cf_cv_type_of_bool=unknown
18880 fi
18881 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18882 fi
18883
18884 fi
18885
18886         rm -f cf_test.out
18887 echo "$as_me:18887: result: $cf_cv_type_of_bool" >&5
18888 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18889 if test "$cf_cv_type_of_bool" = unknown ; then
18890         case .$NCURSES_BOOL in #(vi
18891         .auto|.) NCURSES_BOOL=unsigned;;
18892         esac
18893         { echo "$as_me:18893: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18894 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18895         cf_cv_type_of_bool=$NCURSES_BOOL
18896 fi
18897
18898 echo "$as_me:18898: checking for special defines needed for etip.h" >&5
18899 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18900 cf_save_CXXFLAGS="$CXXFLAGS"
18901 cf_result="none"
18902
18903 # etip.h includes ncurses.h which includes ncurses_dll.h
18904 # But ncurses_dll.h is generated - fix here.
18905 test -d include || mkdir include
18906 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
18907
18908 for cf_math in "" MATH_H
18909 do
18910 for cf_excp in "" MATH_EXCEPTION
18911 do
18912         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18913         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18914         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18915 cat >conftest.$ac_ext <<_ACEOF
18916 #line 18916 "configure"
18917 #include "confdefs.h"
18918
18919 #include <etip.h.in>
18920
18921 int
18922 main ()
18923 {
18924
18925   ;
18926   return 0;
18927 }
18928 _ACEOF
18929 rm -f conftest.$ac_objext
18930 if { (eval echo "$as_me:18930: \"$ac_compile\"") >&5
18931   (eval $ac_compile) 2>&5
18932   ac_status=$?
18933   echo "$as_me:18933: \$? = $ac_status" >&5
18934   (exit $ac_status); } &&
18935          { ac_try='test -s conftest.$ac_objext'
18936   { (eval echo "$as_me:18936: \"$ac_try\"") >&5
18937   (eval $ac_try) 2>&5
18938   ac_status=$?
18939   echo "$as_me:18939: \$? = $ac_status" >&5
18940   (exit $ac_status); }; }; then
18941
18942         test -n "$cf_math" && cat >>confdefs.h <<EOF
18943 #define ETIP_NEEDS_${cf_math} 1
18944 EOF
18945
18946         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18947 #define ETIP_NEEDS_${cf_excp} 1
18948 EOF
18949
18950         cf_result="$cf_math $cf_excp"
18951         break 2
18952
18953 else
18954   echo "$as_me: failed program was:" >&5
18955 cat conftest.$ac_ext >&5
18956 fi
18957 rm -f conftest.$ac_objext conftest.$ac_ext
18958 done
18959 done
18960 echo "$as_me:18960: result: $cf_result" >&5
18961 echo "${ECHO_T}$cf_result" >&6
18962 CXXFLAGS="$cf_save_CXXFLAGS"
18963
18964 if test -n "$CXX"; then
18965 echo "$as_me:18965: checking if $CXX accepts parameter initialization" >&5
18966 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18967 if test "${cf_cv_cpp_param_init+set}" = set; then
18968   echo $ECHO_N "(cached) $ECHO_C" >&6
18969 else
18970
18971         ac_ext=cc
18972 ac_cpp='$CXXCPP $CPPFLAGS'
18973 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18974 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18975 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18976 ac_main_return=return
18977
18978         if test "$cross_compiling" = yes; then
18979   cf_cv_cpp_param_init=unknown
18980 else
18981   cat >conftest.$ac_ext <<_ACEOF
18982 #line 18982 "configure"
18983 #include "confdefs.h"
18984
18985 class TEST {
18986 private:
18987         int value;
18988 public:
18989         TEST(int x = 1);
18990         ~TEST();
18991 };
18992
18993 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18994 {
18995         value = x;
18996 }
18997 int main() { }
18998
18999 _ACEOF
19000 rm -f conftest$ac_exeext
19001 if { (eval echo "$as_me:19001: \"$ac_link\"") >&5
19002   (eval $ac_link) 2>&5
19003   ac_status=$?
19004   echo "$as_me:19004: \$? = $ac_status" >&5
19005   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19006   { (eval echo "$as_me:19006: \"$ac_try\"") >&5
19007   (eval $ac_try) 2>&5
19008   ac_status=$?
19009   echo "$as_me:19009: \$? = $ac_status" >&5
19010   (exit $ac_status); }; }; then
19011   cf_cv_cpp_param_init=yes
19012 else
19013   echo "$as_me: program exited with status $ac_status" >&5
19014 echo "$as_me: failed program was:" >&5
19015 cat conftest.$ac_ext >&5
19016 cf_cv_cpp_param_init=no
19017 fi
19018 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19019 fi
19020         ac_ext=cc
19021 ac_cpp='$CXXCPP $CPPFLAGS'
19022 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19023 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19024 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19025 ac_main_return=return
19026
19027 fi
19028 echo "$as_me:19028: result: $cf_cv_cpp_param_init" >&5
19029 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19030 fi
19031 test "$cf_cv_cpp_param_init" = yes &&
19032 cat >>confdefs.h <<\EOF
19033 #define CPP_HAS_PARAM_INIT 1
19034 EOF
19035
19036 if test -n "$CXX"; then
19037
19038 echo "$as_me:19038: checking if $CXX accepts static_cast" >&5
19039 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19040 if test "${cf_cv_cpp_static_cast+set}" = set; then
19041   echo $ECHO_N "(cached) $ECHO_C" >&6
19042 else
19043
19044         ac_ext=cc
19045 ac_cpp='$CXXCPP $CPPFLAGS'
19046 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19047 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19048 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19049 ac_main_return=return
19050
19051         cat >conftest.$ac_ext <<_ACEOF
19052 #line 19052 "configure"
19053 #include "confdefs.h"
19054
19055 class NCursesPanel
19056 {
19057 public:
19058   NCursesPanel(int nlines,
19059                int ncols,
19060                int begin_y = 0,
19061                int begin_x = 0)
19062   {
19063   }
19064
19065   ~NCursesPanel();
19066 };
19067
19068 template<class T> class NCursesUserPanel : public NCursesPanel
19069 {
19070 public:
19071   NCursesUserPanel (int nlines,
19072                     int ncols,
19073                     int begin_y = 0,
19074                     int begin_x = 0,
19075                     const T* p_UserData = static_cast<T*>(0))
19076     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19077   {
19078   };
19079   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19080   {
19081   };
19082
19083   virtual ~NCursesUserPanel() {};
19084 };
19085
19086 int
19087 main ()
19088 {
19089
19090         const char* p_UserData = static_cast<char*>(0)
19091   ;
19092   return 0;
19093 }
19094 _ACEOF
19095 rm -f conftest.$ac_objext
19096 if { (eval echo "$as_me:19096: \"$ac_compile\"") >&5
19097   (eval $ac_compile) 2>&5
19098   ac_status=$?
19099   echo "$as_me:19099: \$? = $ac_status" >&5
19100   (exit $ac_status); } &&
19101          { ac_try='test -s conftest.$ac_objext'
19102   { (eval echo "$as_me:19102: \"$ac_try\"") >&5
19103   (eval $ac_try) 2>&5
19104   ac_status=$?
19105   echo "$as_me:19105: \$? = $ac_status" >&5
19106   (exit $ac_status); }; }; then
19107   cf_cv_cpp_static_cast=yes
19108 else
19109   echo "$as_me: failed program was:" >&5
19110 cat conftest.$ac_ext >&5
19111 cf_cv_cpp_static_cast=no
19112 fi
19113 rm -f conftest.$ac_objext conftest.$ac_ext
19114
19115         ac_ext=cc
19116 ac_cpp='$CXXCPP $CPPFLAGS'
19117 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19118 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19119 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19120 ac_main_return=return
19121
19122 fi
19123 echo "$as_me:19123: result: $cf_cv_cpp_static_cast" >&5
19124 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19125
19126 fi
19127
19128 test "$cf_cv_cpp_static_cast" = yes &&
19129 cat >>confdefs.h <<\EOF
19130 #define CPP_HAS_STATIC_CAST 1
19131 EOF
19132
19133         CXX_AR='$(AR)'
19134         CXX_ARFLAGS='$(ARFLAGS)'
19135         case $cf_cv_system_name in #(vi
19136         irix*) #(vi
19137             if test "$GXX" != yes ; then
19138                 CXX_AR='$(CXX)'
19139                 CXX_ARFLAGS='-ar -o'
19140             fi
19141             ;;
19142         sco3.2v5*) #(vi
19143             CXXLDFLAGS="-u main"
19144             ;;
19145         solaris2*)
19146             if test "$GXX" != yes ; then
19147                 CXX_AR='$(CXX)'
19148                 CXX_ARFLAGS='-xar -o'
19149             fi
19150             ;;
19151         esac
19152
19153 else
19154         cf_cxx_library=no
19155         cf_cv_builtin_bool=1
19156
19157         # Just because we are not configuring against C++ right now does not
19158         # mean that a user will not want to use C++.  Some distributors disable
19159         # the C++ portion of this configuration as a shortcut (or just to avoid
19160         # compiling the demo in the c++ directory).  So we need a reasonable
19161         # default for the 'bool' type.
19162         #
19163         # Caveat: since the storage of the bool type is not standardized, it
19164         # may change.
19165
19166         if test "$NCURSES_BOOL" != auto ; then
19167                 cf_cv_type_of_bool=$NCURSES_BOOL
19168                 cf_cv_header_stdbool_h=0
19169         else
19170                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19171
19172 echo "$as_me:19172: checking for size of bool" >&5
19173 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19174 if test "${cf_cv_type_of_bool+set}" = set; then
19175   echo $ECHO_N "(cached) $ECHO_C" >&6
19176 else
19177
19178         rm -f cf_test.out
19179         if test "$cross_compiling" = yes; then
19180   cf_cv_type_of_bool=unknown
19181 else
19182   cat >conftest.$ac_ext <<_ACEOF
19183 #line 19183 "configure"
19184 #include "confdefs.h"
19185
19186 #include <stdlib.h>
19187 #include <stdio.h>
19188
19189 #if defined(__cplusplus)
19190
19191 #ifdef HAVE_GXX_BUILTIN_H
19192 #include <g++/builtin.h>
19193 #elif HAVE_GPP_BUILTIN_H
19194 #include <gpp/builtin.h>
19195 #elif HAVE_BUILTIN_H
19196 #include <builtin.h>
19197 #endif
19198
19199 #else
19200
19201 #if $cf_cv_header_stdbool_h
19202 #include <stdbool.h>
19203 #endif
19204
19205 #endif
19206
19207 main()
19208 {
19209         FILE *fp = fopen("cf_test.out", "w");
19210         if (fp != 0) {
19211                 bool x = true;
19212                 if ((bool)(-x) >= 0)
19213                         fputs("unsigned ", fp);
19214                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19215                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19216                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19217                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19218                 fclose(fp);
19219         }
19220         ${cf_cv_main_return:-return}(0);
19221 }
19222
19223 _ACEOF
19224 rm -f conftest$ac_exeext
19225 if { (eval echo "$as_me:19225: \"$ac_link\"") >&5
19226   (eval $ac_link) 2>&5
19227   ac_status=$?
19228   echo "$as_me:19228: \$? = $ac_status" >&5
19229   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19230   { (eval echo "$as_me:19230: \"$ac_try\"") >&5
19231   (eval $ac_try) 2>&5
19232   ac_status=$?
19233   echo "$as_me:19233: \$? = $ac_status" >&5
19234   (exit $ac_status); }; }; then
19235   cf_cv_type_of_bool=`cat cf_test.out`
19236                  if test -z "$cf_cv_type_of_bool"; then
19237                    cf_cv_type_of_bool=unknown
19238                  fi
19239 else
19240   echo "$as_me: program exited with status $ac_status" >&5
19241 echo "$as_me: failed program was:" >&5
19242 cat conftest.$ac_ext >&5
19243 cf_cv_type_of_bool=unknown
19244 fi
19245 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19246 fi
19247
19248 fi
19249
19250         rm -f cf_test.out
19251 echo "$as_me:19251: result: $cf_cv_type_of_bool" >&5
19252 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19253 if test "$cf_cv_type_of_bool" = unknown ; then
19254         case .$NCURSES_BOOL in #(vi
19255         .auto|.) NCURSES_BOOL=unsigned;;
19256         esac
19257         { echo "$as_me:19257: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19258 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19259         cf_cv_type_of_bool=$NCURSES_BOOL
19260 fi
19261
19262                 else
19263                         echo "$as_me:19263: checking for fallback type of bool" >&5
19264 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19265                         case "$host_cpu" in #(vi
19266                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19267                         *)      cf_cv_type_of_bool=int  ;;
19268                         esac
19269                         echo "$as_me:19269: result: $cf_cv_type_of_bool" >&5
19270 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19271                 fi
19272         fi
19273 fi
19274
19275 # If the C compiler did not declare bool, and we did not determine that the C++
19276 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19277 # ncurses library use the same type as C++ bool.  Note that this allows one to
19278 # specify the type of bool in a configure-script option and postpone
19279 # integration with the C++ compiler provided that the types are compatible.
19280 USE_CXX_BOOL=1
19281 if test $cf_cv_cc_bool_type = 1
19282 then
19283         # oops: C has a bool.  Unlikely, but C++ could differ.
19284         USE_CXX_BOOL=0
19285 elif test $cf_cv_builtin_bool = 0
19286 then
19287         # C++ has no bool
19288         USE_CXX_BOOL=0
19289 else
19290         # this is the normal case
19291         USE_CXX_BOOL='defined(__cplusplus)'
19292 fi
19293
19294 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19295
19296         if test "$cf_with_ada" != "no" ; then
19297                 if test "$with_libtool" != "no"; then
19298                         { echo "$as_me:19298: WARNING: libtool does not support Ada - disabling feature" >&5
19299 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19300                         cf_with_ada=no
19301                 fi
19302         fi
19303
19304         if test "$cf_with_ada" != "no" ; then
19305
19306 cf_ada_make=gnatmake
19307 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19308 set dummy $cf_ada_make; ac_word=$2
19309 echo "$as_me:19309: checking for $ac_word" >&5
19310 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19311 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19312   echo $ECHO_N "(cached) $ECHO_C" >&6
19313 else
19314   if test -n "$gnat_exists"; then
19315   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19316 else
19317   ac_save_IFS=$IFS; IFS=$ac_path_separator
19318 ac_dummy="$PATH"
19319 for ac_dir in $ac_dummy; do
19320   IFS=$ac_save_IFS
19321   test -z "$ac_dir" && ac_dir=.
19322   $as_executable_p "$ac_dir/$ac_word" || continue
19323 ac_cv_prog_gnat_exists="yes"
19324 echo "$as_me:19324: found $ac_dir/$ac_word" >&5
19325 break
19326 done
19327
19328   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19329 fi
19330 fi
19331 gnat_exists=$ac_cv_prog_gnat_exists
19332 if test -n "$gnat_exists"; then
19333   echo "$as_me:19333: result: $gnat_exists" >&5
19334 echo "${ECHO_T}$gnat_exists" >&6
19335 else
19336   echo "$as_me:19336: result: no" >&5
19337 echo "${ECHO_T}no" >&6
19338 fi
19339
19340 if test "$ac_cv_prog_gnat_exists" = no; then
19341    cf_ada_make=
19342    cf_cv_prog_gnat_correct=no
19343 else
19344
19345 echo "$as_me:19345: checking for gnat version" >&5
19346 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19347 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19348         grep '[0-9].[0-9][0-9]*' |\
19349     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19350 echo "$as_me:19350: result: $cf_gnat_version" >&5
19351 echo "${ECHO_T}$cf_gnat_version" >&6
19352
19353 case $cf_gnat_version in #(vi
19354 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19355         cf_cv_prog_gnat_correct=yes
19356         ;;
19357 *)
19358         { echo "$as_me:19358: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19359 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19360         cf_cv_prog_gnat_correct=no
19361         ;;
19362 esac
19363
19364    # Extract the first word of "m4", so it can be a program name with args.
19365 set dummy m4; ac_word=$2
19366 echo "$as_me:19366: checking for $ac_word" >&5
19367 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19368 if test "${ac_cv_prog_M4_exists+set}" = set; then
19369   echo $ECHO_N "(cached) $ECHO_C" >&6
19370 else
19371   if test -n "$M4_exists"; then
19372   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19373 else
19374   ac_save_IFS=$IFS; IFS=$ac_path_separator
19375 ac_dummy="$PATH"
19376 for ac_dir in $ac_dummy; do
19377   IFS=$ac_save_IFS
19378   test -z "$ac_dir" && ac_dir=.
19379   $as_executable_p "$ac_dir/$ac_word" || continue
19380 ac_cv_prog_M4_exists="yes"
19381 echo "$as_me:19381: found $ac_dir/$ac_word" >&5
19382 break
19383 done
19384
19385   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19386 fi
19387 fi
19388 M4_exists=$ac_cv_prog_M4_exists
19389 if test -n "$M4_exists"; then
19390   echo "$as_me:19390: result: $M4_exists" >&5
19391 echo "${ECHO_T}$M4_exists" >&6
19392 else
19393   echo "$as_me:19393: result: no" >&5
19394 echo "${ECHO_T}no" >&6
19395 fi
19396
19397    if test "$ac_cv_prog_M4_exists" = no; then
19398       cf_cv_prog_gnat_correct=no
19399       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19400    fi
19401    if test "$cf_cv_prog_gnat_correct" = yes; then
19402       echo "$as_me:19402: checking if GNAT works" >&5
19403 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19404
19405 rm -rf conftest* *~conftest*
19406 cat >>conftest.ads <<CF_EOF
19407 procedure conftest;
19408 CF_EOF
19409 cat >>conftest.adb <<CF_EOF
19410 with Text_IO;
19411 with GNAT.OS_Lib;
19412 procedure conftest is
19413 begin
19414    Text_IO.Put ("Hello World");
19415    Text_IO.New_Line;
19416    GNAT.OS_Lib.OS_Exit (0);
19417 end conftest;
19418 CF_EOF
19419 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19420    if ( ./conftest 1>&5 2>&1 ) ; then
19421       cf_cv_prog_gnat_correct=yes
19422    else
19423       cf_cv_prog_gnat_correct=no
19424    fi
19425 else
19426    cf_cv_prog_gnat_correct=no
19427 fi
19428 rm -rf conftest* *~conftest*
19429
19430       echo "$as_me:19430: result: $cf_cv_prog_gnat_correct" >&5
19431 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19432    fi
19433 fi
19434
19435                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19436
19437         ADAFLAGS="$ADAFLAGS -gnatpn"
19438
19439         echo "$as_me:19439: checking optimization options for ADAFLAGS" >&5
19440 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19441         case "$CFLAGS" in
19442         *-g*)
19443
19444         ADAFLAGS="$ADAFLAGS -g"
19445
19446                 ;;
19447         esac
19448         case "$CFLAGS" in
19449         *-O*)
19450                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19451
19452         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19453
19454                 ;;
19455         esac
19456         echo "$as_me:19456: result: $ADAFLAGS" >&5
19457 echo "${ECHO_T}$ADAFLAGS" >&6
19458
19459 echo "$as_me:19459: checking if GNAT supports generics" >&5
19460 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19461 case $cf_gnat_version in #(vi
19462 3.[1-9]*|[4-9].*) #(vi
19463         cf_gnat_generics=yes
19464         ;;
19465 *)
19466         cf_gnat_generics=no
19467         ;;
19468 esac
19469 echo "$as_me:19469: result: $cf_gnat_generics" >&5
19470 echo "${ECHO_T}$cf_gnat_generics" >&6
19471
19472 if test "$cf_gnat_generics" = yes
19473 then
19474         cf_compile_generics=generics
19475         cf_generic_objects="\${GENOBJS}"
19476 else
19477         cf_compile_generics=
19478         cf_generic_objects=
19479 fi
19480
19481 echo "$as_me:19481: checking if GNAT supports SIGINT" >&5
19482 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19483 if test "${cf_cv_gnat_sigint+set}" = set; then
19484   echo $ECHO_N "(cached) $ECHO_C" >&6
19485 else
19486
19487 rm -rf conftest* *~conftest*
19488 cat >>conftest.ads <<CF_EOF
19489 with Ada.Interrupts.Names;
19490
19491 package ConfTest is
19492
19493    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19494    pragma Unreserve_All_Interrupts;
19495    pragma Warnings (On);
19496
19497    protected Process is
19498       procedure Stop;
19499       function Continue return Boolean;
19500       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19501    private
19502       Done : Boolean := False;
19503    end Process;
19504
19505 end ConfTest;
19506 CF_EOF
19507 cat >>conftest.adb <<CF_EOF
19508 package body ConfTest is
19509    protected body Process is
19510       procedure Stop is
19511       begin
19512          Done := True;
19513       end Stop;
19514       function Continue return Boolean is
19515       begin
19516          return not Done;
19517       end Continue;
19518    end Process;
19519 end ConfTest;
19520 CF_EOF
19521 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19522       cf_cv_gnat_sigint=yes
19523 else
19524    cf_cv_gnat_sigint=no
19525 fi
19526 rm -rf conftest* *~conftest*
19527
19528 fi
19529 echo "$as_me:19529: result: $cf_cv_gnat_sigint" >&5
19530 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19531
19532 if test $cf_cv_gnat_sigint = yes ; then
19533         USE_GNAT_SIGINT=""
19534 else
19535         USE_GNAT_SIGINT="#"
19536 fi
19537
19538 echo "$as_me:19538: checking if GNAT pragma Unreferenced works" >&5
19539 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19540 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19541   echo $ECHO_N "(cached) $ECHO_C" >&6
19542 else
19543
19544 rm -rf conftest* *~conftest*
19545 cat >>conftest.ads <<CF_EOF
19546 procedure conftest;
19547 CF_EOF
19548 cat >>conftest.adb <<CF_EOF
19549 with Text_IO;
19550 with GNAT.OS_Lib;
19551 procedure conftest is
19552    test : Integer;
19553    pragma Unreferenced (test);
19554 begin
19555    test := 1;
19556    Text_IO.Put ("Hello World");
19557    Text_IO.New_Line;
19558    GNAT.OS_Lib.OS_Exit (0);
19559 end conftest;
19560 CF_EOF
19561 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19562       cf_cv_pragma_unreferenced=yes
19563 else
19564    cf_cv_pragma_unreferenced=no
19565 fi
19566 rm -rf conftest* *~conftest*
19567
19568 fi
19569 echo "$as_me:19569: result: $cf_cv_pragma_unreferenced" >&5
19570 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19571
19572 # if the pragma is supported, use it (needed in the Trace code).
19573 if test $cf_cv_pragma_unreferenced = yes ; then
19574         PRAGMA_UNREF=TRUE
19575 else
19576         PRAGMA_UNREF=FALSE
19577 fi
19578
19579 cf_gnat_libraries=no
19580 cf_gnat_projects=no
19581
19582 echo "$as_me:19582: checking if GNAT supports project files" >&5
19583 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19584 case $cf_gnat_version in #(vi
19585 3.[0-9]*) #(vi
19586         ;;
19587 *)
19588         case $cf_cv_system_name in #(vi
19589         cygwin*) #(vi
19590                 ;;
19591         *)
19592                 mkdir conftest.src conftest.bin conftest.lib
19593                 cd conftest.src
19594                 rm -rf conftest* *~conftest*
19595                 cat >>library.gpr <<CF_EOF
19596 project Library is
19597   Kind := External ("LIB_KIND");
19598   for Library_Name use "ConfTest";
19599   for Object_Dir use ".";
19600   for Library_ALI_Dir use External("LIBRARY_DIR");
19601   for Library_Version use External ("SONAME");
19602   for Library_Kind use Kind;
19603   for Library_Dir use External("BUILD_DIR");
19604   Source_Dir := External ("SOURCE_DIR");
19605   for Source_Dirs use (Source_Dir);
19606   package Compiler is
19607      for Default_Switches ("Ada") use
19608        ("-g",
19609         "-O2",
19610         "-gnatafno",
19611         "-gnatVa",   -- All validity checks
19612         "-gnatwa");  -- Activate all optional errors
19613   end Compiler;
19614 end Library;
19615 CF_EOF
19616                 cat >>confpackage.ads <<CF_EOF
19617 package ConfPackage is
19618    procedure conftest;
19619 end ConfPackage;
19620 CF_EOF
19621                 cat >>confpackage.adb <<CF_EOF
19622 with Text_IO;
19623 package body ConfPackage is
19624    procedure conftest is
19625    begin
19626       Text_IO.Put ("Hello World");
19627       Text_IO.New_Line;
19628    end conftest;
19629 end ConfPackage;
19630 CF_EOF
19631                 if ( $cf_ada_make $ADAFLAGS \
19632                                 -Plibrary.gpr \
19633                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19634                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19635                                 -XSOURCE_DIR=`pwd` \
19636                                 -XSONAME=libConfTest.so.1 \
19637                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19638                         cf_gnat_projects=yes
19639                 fi
19640                 cd ..
19641                 if test -f conftest.lib/confpackage.ali
19642                 then
19643                         cf_gnat_libraries=yes
19644                 fi
19645                 rm -rf conftest* *~conftest*
19646                 ;;
19647         esac
19648         ;;
19649 esac
19650 echo "$as_me:19650: result: $cf_gnat_projects" >&5
19651 echo "${ECHO_T}$cf_gnat_projects" >&6
19652
19653 if test $cf_gnat_projects = yes
19654 then
19655         echo "$as_me:19655: checking if GNAT supports libraries" >&5
19656 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19657         echo "$as_me:19657: result: $cf_gnat_libraries" >&5
19658 echo "${ECHO_T}$cf_gnat_libraries" >&6
19659 fi
19660
19661 if test "$cf_gnat_projects" = yes
19662 then
19663         USE_OLD_MAKERULES="#"
19664         USE_GNAT_PROJECTS=""
19665 else
19666         USE_OLD_MAKERULES=""
19667         USE_GNAT_PROJECTS="#"
19668 fi
19669
19670 if test "$cf_gnat_libraries" = yes
19671 then
19672         USE_GNAT_LIBRARIES=""
19673 else
19674         USE_GNAT_LIBRARIES="#"
19675 fi
19676
19677 echo "$as_me:19677: checking for ada-compiler" >&5
19678 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19679
19680 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19681 if test "${with_ada_compiler+set}" = set; then
19682   withval="$with_ada_compiler"
19683   cf_ada_compiler=$withval
19684 else
19685   cf_ada_compiler=gnatmake
19686 fi;
19687
19688 echo "$as_me:19688: result: $cf_ada_compiler" >&5
19689 echo "${ECHO_T}$cf_ada_compiler" >&6
19690
19691                         cf_ada_package=terminal_interface
19692
19693 echo "$as_me:19693: checking for ada-include" >&5
19694 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19695
19696 # Check whether --with-ada-include or --without-ada-include was given.
19697 if test "${with_ada_include+set}" = set; then
19698   withval="$with_ada_include"
19699
19700 else
19701   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19702 fi; if test -n "$prefix/share/ada/adainclude" ; then
19703
19704 if test "x$prefix" != xNONE; then
19705   cf_path_syntax="$prefix"
19706 else
19707   cf_path_syntax="$ac_default_prefix"
19708 fi
19709
19710 case ".$withval" in #(vi
19711 .\$\(*\)*|.\'*\'*) #(vi
19712   ;;
19713 ..|./*|.\\*) #(vi
19714   ;;
19715 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19716   ;;
19717 .\${*prefix}*|.\${*dir}*) #(vi
19718   eval withval="$withval"
19719   case ".$withval" in #(vi
19720   .NONE/*)
19721     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19722     ;;
19723   esac
19724   ;; #(vi
19725 .no|.NONE/*)
19726   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19727   ;;
19728 *)
19729   { { echo "$as_me:19729: error: expected a pathname, not \"$withval\"" >&5
19730 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19731    { (exit 1); exit 1; }; }
19732   ;;
19733 esac
19734
19735 fi
19736 eval ADA_INCLUDE="$withval"
19737
19738 echo "$as_me:19738: result: $ADA_INCLUDE" >&5
19739 echo "${ECHO_T}$ADA_INCLUDE" >&6
19740
19741 echo "$as_me:19741: checking for ada-objects" >&5
19742 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19743
19744 # Check whether --with-ada-objects or --without-ada-objects was given.
19745 if test "${with_ada_objects+set}" = set; then
19746   withval="$with_ada_objects"
19747
19748 else
19749   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19750 fi; if test -n "$prefix/lib/ada/adalib" ; then
19751
19752 if test "x$prefix" != xNONE; then
19753   cf_path_syntax="$prefix"
19754 else
19755   cf_path_syntax="$ac_default_prefix"
19756 fi
19757
19758 case ".$withval" in #(vi
19759 .\$\(*\)*|.\'*\'*) #(vi
19760   ;;
19761 ..|./*|.\\*) #(vi
19762   ;;
19763 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19764   ;;
19765 .\${*prefix}*|.\${*dir}*) #(vi
19766   eval withval="$withval"
19767   case ".$withval" in #(vi
19768   .NONE/*)
19769     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19770     ;;
19771   esac
19772   ;; #(vi
19773 .no|.NONE/*)
19774   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19775   ;;
19776 *)
19777   { { echo "$as_me:19777: error: expected a pathname, not \"$withval\"" >&5
19778 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19779    { (exit 1); exit 1; }; }
19780   ;;
19781 esac
19782
19783 fi
19784 eval ADA_OBJECTS="$withval"
19785
19786 echo "$as_me:19786: result: $ADA_OBJECTS" >&5
19787 echo "${ECHO_T}$ADA_OBJECTS" >&6
19788
19789 echo "$as_me:19789: checking if an Ada95 shared-library should be built" >&5
19790 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19791
19792 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19793 if test "${with_ada_sharedlib+set}" = set; then
19794   withval="$with_ada_sharedlib"
19795   with_ada_sharedlib=$withval
19796 else
19797   with_ada_sharedlib=no
19798 fi;
19799 echo "$as_me:19799: result: $with_ada_sharedlib" >&5
19800 echo "${ECHO_T}$with_ada_sharedlib" >&6
19801
19802 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19803 MAKE_ADA_SHAREDLIB="#"
19804
19805 if test "x$with_ada_sharedlib" != xno
19806 then
19807         MAKE_ADA_SHAREDLIB=
19808         if test "x$with_ada_sharedlib" != xyes
19809         then
19810                 ADA_SHAREDLIB="$with_ada_sharedlib"
19811         fi
19812 fi
19813
19814                 fi
19815         fi
19816 else
19817         cf_with_ada=no
19818 fi
19819
19820 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19821 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19822 ###
19823 ### ticlib modules may be a separate library, otherwise contained in termlib.
19824 ### termlib modules may be a separate library, otherwise contained in ncurses.
19825 ###
19826 ### The of "+" or " " between the tokens controls the way the script
19827 ### chooses to split module lists into libraries.
19828 ###
19829 ### (see CF_LIB_RULES).
19830 echo "$as_me:19830: checking for library subsets" >&5
19831 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19832 LIB_SUBSETS=
19833
19834 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19835         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19836         if test "$with_ticlib" != no ; then
19837                 LIB_SUBSETS="${LIB_SUBSETS} "
19838         else
19839                 LIB_SUBSETS="${LIB_SUBSETS}+"
19840         fi
19841 fi
19842
19843 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19844 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19845
19846 if test "$with_termlib" != no ; then
19847         LIB_SUBSETS="${LIB_SUBSETS} "
19848 else
19849         LIB_SUBSETS="${LIB_SUBSETS}+"
19850 fi
19851
19852 LIB_SUBSETS="${LIB_SUBSETS}base"
19853
19854 # Most term-driver calls are to tinfo, but some like init_pair are to the
19855 # base library (so it resides in base).
19856 if test "$with_term_driver" != no ; then
19857         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19858         case $cf_cv_system_name in #(vi
19859         *mingw32*) #(vi
19860                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19861                 ;;
19862         *) #(vi
19863                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19864                 ;;
19865         esac
19866 fi
19867
19868 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19869 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19870
19871 echo "$as_me:19871: result: $LIB_SUBSETS" >&5
19872 echo "${ECHO_T}$LIB_SUBSETS" >&6
19873
19874 ### Construct the list of include-directories to be generated
19875
19876 if test "$GCC" != yes; then
19877         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19878 elif test "$includedir" != "/usr/include"; then
19879         if test "$includedir" = '${prefix}/include' ; then
19880                 if test $prefix != /usr ; then
19881                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19882                 fi
19883         else
19884                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
19885         fi
19886 fi
19887 if test "$srcdir" != "."; then
19888         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19889 fi
19890 CPPFLAGS="-I. -I../include $CPPFLAGS"
19891
19892 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19893 if test "$srcdir" != "."; then
19894         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19895 fi
19896 if test "$GCC" != yes; then
19897         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19898 elif test "$includedir" != "/usr/include"; then
19899         if test "$includedir" = '${prefix}/include' ; then
19900                 if test $prefix != /usr ; then
19901                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19902                 fi
19903         else
19904                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19905         fi
19906 fi
19907
19908 ### Build up pieces for makefile rules
19909 echo "$as_me:19909: checking default library suffix" >&5
19910 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19911
19912         case $DFT_LWR_MODEL in
19913         libtool) DFT_ARG_SUFFIX=''   ;;
19914         normal)  DFT_ARG_SUFFIX=''   ;;
19915         debug)   DFT_ARG_SUFFIX='_g' ;;
19916         profile) DFT_ARG_SUFFIX='_p' ;;
19917         shared)  DFT_ARG_SUFFIX=''   ;;
19918         esac
19919         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19920 echo "$as_me:19920: result: $DFT_ARG_SUFFIX" >&5
19921 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19922
19923 echo "$as_me:19923: checking default library-dependency suffix" >&5
19924 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19925
19926         case $DFT_LWR_MODEL in #(vi
19927         libtool) #(vi
19928                 DFT_LIB_SUFFIX='.la'
19929                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19930                 ;;
19931         normal) #(vi
19932                 DFT_LIB_SUFFIX='.a'
19933                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19934                 ;;
19935         debug) #(vi
19936                 DFT_LIB_SUFFIX='_g.a'
19937                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19938                 ;;
19939         profile) #(vi
19940                 DFT_LIB_SUFFIX='_p.a'
19941                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19942                 ;;
19943         shared) #(vi
19944                 case $cf_cv_system_name in
19945                 aix[5-7]*) #(vi
19946                         DFT_LIB_SUFFIX='.a'
19947                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19948                         ;;
19949                 cygwin*|mingw*) #(vi
19950                         DFT_LIB_SUFFIX='.dll'
19951                         DFT_DEP_SUFFIX='.dll.a'
19952                         ;;
19953                 darwin*) #(vi
19954                         DFT_LIB_SUFFIX='.dylib'
19955                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19956                         ;;
19957                 hpux*) #(vi
19958                         case $target in
19959                         ia64*) #(vi
19960                                 DFT_LIB_SUFFIX='.so'
19961                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19962                                 ;;
19963                         *) #(vi
19964                                 DFT_LIB_SUFFIX='.sl'
19965                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19966                                 ;;
19967                         esac
19968                         ;;
19969                 *)      DFT_LIB_SUFFIX='.so'
19970                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19971                         ;;
19972                 esac
19973         esac
19974         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19975         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19976 echo "$as_me:19976: result: $DFT_DEP_SUFFIX" >&5
19977 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19978
19979 echo "$as_me:19979: checking default object directory" >&5
19980 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19981
19982         case $DFT_LWR_MODEL in
19983         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19984         normal)  DFT_OBJ_SUBDIR='objects' ;;
19985         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19986         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19987         shared)
19988                 case $cf_cv_system_name in #(vi
19989                 cygwin) #(vi
19990                         DFT_OBJ_SUBDIR='objects' ;;
19991                 *)
19992                         DFT_OBJ_SUBDIR='obj_s' ;;
19993                 esac
19994         esac
19995 echo "$as_me:19995: result: $DFT_OBJ_SUBDIR" >&5
19996 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19997
19998 if test "x$cf_with_cxx" = xyes ; then
19999 echo "$as_me:19999: checking c++ library-dependency suffix" >&5
20000 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20001 if test "$with_libtool" != "no"; then
20002         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20003         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20004 elif test "$with_shared_cxx" != "no"; then
20005         # also for g++ users...
20006         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20007 else
20008         # we normally make a static library because C/C++ library rules differ
20009
20010         case normal in #(vi
20011         libtool) #(vi
20012                 CXX_LIB_SUFFIX='.la'
20013                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20014                 ;;
20015         normal) #(vi
20016                 CXX_LIB_SUFFIX='.a'
20017                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20018                 ;;
20019         debug) #(vi
20020                 CXX_LIB_SUFFIX='_g.a'
20021                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20022                 ;;
20023         profile) #(vi
20024                 CXX_LIB_SUFFIX='_p.a'
20025                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20026                 ;;
20027         shared) #(vi
20028                 case $cf_cv_system_name in
20029                 aix[5-7]*) #(vi
20030                         CXX_LIB_SUFFIX='.a'
20031                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20032                         ;;
20033                 cygwin*|mingw*) #(vi
20034                         CXX_LIB_SUFFIX='.dll'
20035                         CXX_DEP_SUFFIX='.dll.a'
20036                         ;;
20037                 darwin*) #(vi
20038                         CXX_LIB_SUFFIX='.dylib'
20039                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20040                         ;;
20041                 hpux*) #(vi
20042                         case $target in
20043                         ia64*) #(vi
20044                                 CXX_LIB_SUFFIX='.so'
20045                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20046                                 ;;
20047                         *) #(vi
20048                                 CXX_LIB_SUFFIX='.sl'
20049                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20050                                 ;;
20051                         esac
20052                         ;;
20053                 *)      CXX_LIB_SUFFIX='.so'
20054                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20055                         ;;
20056                 esac
20057         esac
20058         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20059         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20060
20061 fi
20062 echo "$as_me:20062: result: $CXX_LIB_SUFFIX" >&5
20063 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20064
20065 fi
20066
20067 # do not want -ldl in build except as needed for -lncurses dependency
20068 if test "x$with_dlsym" = xyes ; then
20069 if test $DFT_LWR_MODEL = shared || \
20070    test $DFT_LWR_MODEL = libtool ; then
20071
20072 # remove dl library from $LIBS
20073 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20074
20075 fi
20076 fi
20077 ### Set up low-level terminfo dependencies for makefiles.
20078
20079 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20080 # do not need libdl
20081 TICS_LIST=
20082 if test "x$with_dlsym" = xyes ; then
20083
20084 # remove dl library from $SHLIB_LIST
20085 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20086
20087 fi
20088
20089 if test "$with_ticlib" != no ; then
20090
20091         if test "x$with_ticlib" != xyes ; then
20092                 TICS_NAME=$with_ticlib
20093                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20094                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20095                 TICS_LIB_SUFFIX="${with_ticlib}"
20096         else
20097                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20098                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20099                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20100         fi
20101         TICS_LDFLAGS="-L${LIB_DIR}"
20102         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20103 else
20104         TICS_LDFLAGS="-L${LIB_DIR}"
20105         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20106 fi
20107
20108 if test "$with_termlib" != no ; then
20109
20110         if test "x$with_termlib" != xyes ; then
20111                 TINFO_NAME=$with_termlib
20112                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20113                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20114                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20115                 TINFO_LIB_SUFFIX="${with_termlib}"
20116         else
20117                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20118                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20119                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20120                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20121         fi
20122
20123         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20124         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20125         if test "$DFT_LWR_MODEL" = "libtool"; then
20126                 TEST_ARGS="${TEST_DEPS}"
20127                 TEST_ARG2="${TEST_DEP2}"
20128                 TINFO_LDFLAGS="-L${LIB_DIR}"
20129                 TINFO_LIBS="$TEST_ARGS"
20130                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20131                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20132         else
20133                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20134                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20135                 if test "x$with_term_driver" != xno ; then
20136                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20137                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20138                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20139                 else
20140                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20141                         TINFO_LIBS="$TEST_ARGS"
20142                 fi
20143                 TINFO_LDFLAGS="-L${LIB_DIR}"
20144                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20145         fi
20146 else
20147         # the next lines are needed for linking libtic over libncurses
20148         TINFO_NAME=${LIB_NAME}
20149         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20150         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20151         if test "x$with_tic_depends" = xyes ; then
20152                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20153         else
20154                 TICS_LIST="$SHLIB_LIST"
20155         fi
20156
20157         TINFO_LDFLAGS="-L${LIB_DIR}"
20158         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20159 fi
20160
20161 if test "$DFT_LWR_MODEL" = shared ; then
20162         case $cf_cv_system_name in #(vi
20163         cygwin*)
20164                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20165                 TINFO_SUFFIX=.dll
20166                 ;;
20167         esac
20168 fi
20169
20170 if test "x$with_dlsym" = xyes ; then
20171
20172 # remove dl library from $TICS_LIST
20173 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20174
20175 fi
20176
20177 if test "$DFT_LWR_MODEL" = "libtool"; then
20178     OBJEXT=lo
20179 fi
20180
20181 # needed for Ada95
20182 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20183
20184 case $DFT_LWR_MODEL in
20185 normal|debug|profile)
20186
20187 if test "$GCC" = yes ; then
20188         case $cf_cv_system_name in #(
20189         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20190                 LDFLAGS_STATIC=
20191                 LDFLAGS_SHARED=
20192                 ;;
20193     *)  #( normally, except when broken
20194         LDFLAGS_STATIC=-static
20195         LDFLAGS_SHARED=-dynamic
20196         ;;
20197     esac
20198 else
20199         case $cf_cv_system_name in #(
20200         aix[4-7]*)      #( from ld manpage
20201                 LDFLAGS_STATIC=-bstatic
20202                 LDFLAGS_SHARED=-bdynamic
20203                 ;;
20204         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20205                 # We could also use just "archive" and "shared".
20206                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20207                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20208                 ;;
20209         irix*)          #( from ld manpage IRIX64
20210                 LDFLAGS_STATIC=-Bstatic
20211                 LDFLAGS_SHARED=-Bdynamic
20212                 ;;
20213         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20214                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20215                 LDFLAGS_STATIC=-noso
20216                 LDFLAGS_SHARED=-so_archive
20217                 ;;
20218         solaris2*)
20219                 LDFLAGS_STATIC=-Bstatic
20220                 LDFLAGS_SHARED=-Bdynamic
20221                 ;;
20222         esac
20223 fi
20224
20225 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20226 then
20227         echo "$as_me:20227: checking if linker supports switching between static/dynamic" >&5
20228 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20229
20230         rm -f libconftest.a
20231         cat >conftest.$ac_ext <<EOF
20232 #line 20232 "configure"
20233 #include <stdio.h>
20234 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20235 EOF
20236         if { (eval echo "$as_me:20236: \"$ac_compile\"") >&5
20237   (eval $ac_compile) 2>&5
20238   ac_status=$?
20239   echo "$as_me:20239: \$? = $ac_status" >&5
20240   (exit $ac_status); } ; then
20241                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20242                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20243         fi
20244         rm -f conftest.*
20245
20246         cf_save_LIBS="$LIBS"
20247
20248         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20249         cat >conftest.$ac_ext <<_ACEOF
20250 #line 20250 "configure"
20251 #include "confdefs.h"
20252
20253 #line 20253 "configure"
20254 #include <stdio.h>
20255 int cf_ldflags_static(FILE *fp);
20256
20257 int
20258 main ()
20259 {
20260
20261         return cf_ldflags_static(stdin);
20262
20263   ;
20264   return 0;
20265 }
20266 _ACEOF
20267 rm -f conftest.$ac_objext conftest$ac_exeext
20268 if { (eval echo "$as_me:20268: \"$ac_link\"") >&5
20269   (eval $ac_link) 2>&5
20270   ac_status=$?
20271   echo "$as_me:20271: \$? = $ac_status" >&5
20272   (exit $ac_status); } &&
20273          { ac_try='test -s conftest$ac_exeext'
20274   { (eval echo "$as_me:20274: \"$ac_try\"") >&5
20275   (eval $ac_try) 2>&5
20276   ac_status=$?
20277   echo "$as_me:20277: \$? = $ac_status" >&5
20278   (exit $ac_status); }; }; then
20279
20280         # some linkers simply ignore the -dynamic
20281         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20282         *static*) # (vi
20283                 cf_ldflags_static=no
20284                 ;;
20285         *)
20286                 cf_ldflags_static=yes
20287                 ;;
20288         esac
20289
20290 else
20291   echo "$as_me: failed program was:" >&5
20292 cat conftest.$ac_ext >&5
20293 cf_ldflags_static=no
20294 fi
20295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20296
20297         rm -f libconftest.*
20298         LIBS="$cf_save_LIBS"
20299
20300         echo "$as_me:20300: result: $cf_ldflags_static" >&5
20301 echo "${ECHO_T}$cf_ldflags_static" >&6
20302
20303         if test $cf_ldflags_static != yes
20304         then
20305                 LDFLAGS_STATIC=
20306                 LDFLAGS_SHARED=
20307         fi
20308 else
20309         LDFLAGS_STATIC=
20310         LDFLAGS_SHARED=
20311 fi
20312
20313         ;;
20314 esac
20315
20316 echo "$as_me:20316: checking where we will install curses.h" >&5
20317 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20318 test "$with_overwrite" = no && \
20319 test "x$includedir" = 'x${prefix}/include' && \
20320         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20321 echo "$as_me:20321: result: $includedir" >&5
20322 echo "${ECHO_T}$includedir" >&6
20323
20324 ### Resolve a conflict between normal and wide-curses by forcing applications
20325 ### that will need libutf8 to add it to their configure script.
20326 if test "$with_overwrite" != no ; then
20327 if test "$NCURSES_LIBUTF8" = 1 ; then
20328         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20329         { echo "$as_me:20329: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20330 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20331 fi
20332 fi
20333 WITH_OVERWRITE=$with_overwrite
20334
20335 # used to separate tack out of the tree
20336 NCURSES_TREE=
20337
20338 ### predefined stuff for the test programs
20339
20340 cat >>confdefs.h <<\EOF
20341 #define HAVE_SLK_COLOR 1
20342 EOF
20343
20344 ### Construct the list of subdirectories for which we'll customize makefiles
20345 ### with the appropriate compile-rules.
20346
20347 echo "$as_me:20347: checking for src modules" >&5
20348 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20349
20350 # dependencies and linker-arguments for test-programs
20351 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20352 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20353 if test "$DFT_LWR_MODEL" = "libtool"; then
20354         TEST_ARGS="${TEST_DEPS}"
20355         TEST_ARG2="${TEST_DEP2}"
20356 else
20357         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20358         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20359 fi
20360
20361 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20362 cf_cv_src_modules=
20363 for cf_dir in $modules_to_build
20364 do
20365         if test -f $srcdir/$cf_dir/modules; then
20366
20367                 # We may/may not have tack in the distribution, though the
20368                 # makefile is.
20369                 if test $cf_dir = tack ; then
20370                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20371                                 continue
20372                         fi
20373                 fi
20374
20375                 if test -z "$cf_cv_src_modules"; then
20376                         cf_cv_src_modules=$cf_dir
20377                 else
20378                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20379                 fi
20380
20381                 # Make the ncurses_cfg.h file record the library interface files as
20382                 # well.  These are header files that are the same name as their
20383                 # directory.  Ncurses is the only library that does not follow
20384                 # that pattern.
20385                 if test $cf_dir = tack ; then
20386                         continue
20387                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20388
20389 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20390
20391                         cat >>confdefs.h <<EOF
20392 #define HAVE_${cf_have_include}_H 1
20393 EOF
20394
20395                         cat >>confdefs.h <<EOF
20396 #define HAVE_LIB${cf_have_include} 1
20397 EOF
20398
20399                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20400                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20401                         if test "$DFT_LWR_MODEL" = "libtool"; then
20402                                 TEST_ARGS="${TEST_DEPS}"
20403                                 TEST_ARG2="${TEST_DEP2}"
20404                         else
20405                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20406                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20407                         fi
20408                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20409                 fi
20410         fi
20411 done
20412 echo "$as_me:20412: result: $cf_cv_src_modules" >&5
20413 echo "${ECHO_T}$cf_cv_src_modules" >&6
20414
20415 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20416 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20417
20418 SRC_SUBDIRS=
20419 if test "x$cf_with_manpages" != xno ; then
20420         SRC_SUBDIRS="$SRC_SUBDIRS man"
20421 fi
20422 SRC_SUBDIRS="$SRC_SUBDIRS include"
20423 for cf_dir in $cf_cv_src_modules
20424 do
20425         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20426 done
20427 if test "x$cf_with_tests" != "xno" ; then
20428         SRC_SUBDIRS="$SRC_SUBDIRS test"
20429 fi
20430 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20431 if test "$cf_with_cxx_binding" != no; then
20432         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20433         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20434 fi
20435
20436 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20437 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20438
20439 ADA_SUBDIRS=
20440 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20441         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20442         ADA_SUBDIRS="gen src"
20443         if test "x$cf_with_tests" != "xno" ; then
20444                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20445         fi
20446 fi
20447
20448 SUB_MAKEFILES=
20449 for cf_dir in $SRC_SUBDIRS
20450 do
20451         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20452 done
20453
20454 if test -n "$ADA_SUBDIRS"; then
20455         for cf_dir in $ADA_SUBDIRS
20456         do
20457                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20458         done
20459
20460 fi
20461
20462 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20463    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20464    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20465 fi
20466
20467 DIRS_TO_MAKE="lib"
20468 for cf_item in $cf_list_models
20469 do
20470
20471         case $cf_item in
20472         libtool) cf_subdir='obj_lo'  ;;
20473         normal)  cf_subdir='objects' ;;
20474         debug)   cf_subdir='obj_g' ;;
20475         profile) cf_subdir='obj_p' ;;
20476         shared)
20477                 case $cf_cv_system_name in #(vi
20478                 cygwin) #(vi
20479                         cf_subdir='objects' ;;
20480                 *)
20481                         cf_subdir='obj_s' ;;
20482                 esac
20483         esac
20484
20485         for cf_item2 in $DIRS_TO_MAKE
20486         do
20487                 test $cf_item2 = $cf_subdir && break
20488         done
20489         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20490 done
20491 for cf_dir in $DIRS_TO_MAKE
20492 do
20493         test ! -d $cf_dir && mkdir $cf_dir
20494 done
20495
20496 # symbols that differ when compiling Ada95 by itself.
20497 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20498
20499 # values to use as strings
20500
20501 cat >>confdefs.h <<EOF
20502 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20503 EOF
20504
20505 cat >>confdefs.h <<EOF
20506 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20507 EOF
20508
20509 ### Now that we're done running tests, add the compiler-warnings, if any
20510
20511 cf_fix_cppflags=no
20512 cf_new_cflags=
20513 cf_new_cppflags=
20514 cf_new_extra_cppflags=
20515
20516 for cf_add_cflags in $EXTRA_CFLAGS
20517 do
20518 case $cf_fix_cppflags in
20519 no)
20520         case $cf_add_cflags in #(vi
20521         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20522                 case $cf_add_cflags in
20523                 -D*)
20524                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20525
20526                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20527                                 && test -z "${cf_tst_cflags}" \
20528                                 && cf_fix_cppflags=yes
20529
20530                         if test $cf_fix_cppflags = yes ; then
20531                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20532                                 continue
20533                         elif test "${cf_tst_cflags}" = "\"'" ; then
20534                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20535                                 continue
20536                         fi
20537                         ;;
20538                 esac
20539                 case "$CPPFLAGS" in
20540                 *$cf_add_cflags) #(vi
20541                         ;;
20542                 *) #(vi
20543                         case $cf_add_cflags in #(vi
20544                         -D*)
20545                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20546
20547 CPPFLAGS=`echo "$CPPFLAGS" | \
20548         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20549                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20550
20551                                 ;;
20552                         esac
20553                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20554                         ;;
20555                 esac
20556                 ;;
20557         *)
20558                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20559                 ;;
20560         esac
20561         ;;
20562 yes)
20563         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20564
20565         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20566
20567         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20568                 && test -z "${cf_tst_cflags}" \
20569                 && cf_fix_cppflags=no
20570         ;;
20571 esac
20572 done
20573
20574 if test -n "$cf_new_cflags" ; then
20575
20576         CFLAGS="$CFLAGS $cf_new_cflags"
20577 fi
20578
20579 if test -n "$cf_new_cppflags" ; then
20580
20581         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20582 fi
20583
20584 if test -n "$cf_new_extra_cppflags" ; then
20585
20586         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20587 fi
20588
20589 ### Define substitutions for header files to avoid name-pollution
20590
20591 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20592         HAVE_TCGETATTR=1
20593 else
20594         HAVE_TCGETATTR=0
20595 fi
20596
20597 if test "x$ac_cv_header_termio_h" = xyes ; then
20598         HAVE_TERMIO_H=1
20599 else
20600         HAVE_TERMIO_H=0
20601 fi
20602
20603 if test "x$ac_cv_header_termios_h" = xyes ; then
20604         HAVE_TERMIOS_H=1
20605 else
20606         HAVE_TERMIOS_H=0
20607 fi
20608
20609 ################################################################################
20610 test "x$use_database" = xyes && \
20611 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20612
20613 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20614 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20615
20616 if test "x$enable_pc_files" = xyes ; then \
20617 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20618 MAKE_PC_FILES=
20619 else
20620 MAKE_PC_FILES="#"
20621 fi
20622
20623 # Extract the first word of "tic", so it can be a program name with args.
20624 set dummy tic; ac_word=$2
20625 echo "$as_me:20625: checking for $ac_word" >&5
20626 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20627 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20628   echo $ECHO_N "(cached) $ECHO_C" >&6
20629 else
20630   case $TIC_PATH in
20631   [\\/]* | ?:[\\/]*)
20632   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20633   ;;
20634   *)
20635   ac_save_IFS=$IFS; IFS=$ac_path_separator
20636 ac_dummy="$PATH:/usr/local/ncurses/bin"
20637 for ac_dir in $ac_dummy; do
20638   IFS=$ac_save_IFS
20639   test -z "$ac_dir" && ac_dir=.
20640   if $as_executable_p "$ac_dir/$ac_word"; then
20641    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20642    echo "$as_me:20642: found $ac_dir/$ac_word" >&5
20643    break
20644 fi
20645 done
20646
20647   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20648   ;;
20649 esac
20650 fi
20651 TIC_PATH=$ac_cv_path_TIC_PATH
20652
20653 if test -n "$TIC_PATH"; then
20654   echo "$as_me:20654: result: $TIC_PATH" >&5
20655 echo "${ECHO_T}$TIC_PATH" >&6
20656 else
20657   echo "$as_me:20657: result: no" >&5
20658 echo "${ECHO_T}no" >&6
20659 fi
20660
20661 if test -n "$FALLBACK_LIST"
20662 then
20663         if test "$TIC_PATH" = unknown
20664         then
20665                 { echo "$as_me:20665: WARNING: no tic program found for fallbacks" >&5
20666 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20667         fi
20668 fi
20669
20670 if test "x$cf_with_tests" != xno ; then
20671         MAKE_TESTS=
20672 else
20673         MAKE_TESTS="#"
20674 fi
20675
20676 ADAHTML_DIR=../../doc/html/ada
20677
20678 # these could be configurable, but are not currently
20679 PANEL_NAME=panel
20680 MENU_NAME=menu
20681 FORM_NAME=form
20682 CXX_NAME=ncurses++
20683
20684 SUB_SCRIPTS=
20685
20686 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"
20687 ac_config_commands="$ac_config_commands default"
20688 cat >confcache <<\_ACEOF
20689 # This file is a shell script that caches the results of configure
20690 # tests run on this system so they can be shared between configure
20691 # scripts and configure runs, see configure's option --config-cache.
20692 # It is not useful on other systems.  If it contains results you don't
20693 # want to keep, you may remove or edit it.
20694 #
20695 # config.status only pays attention to the cache file if you give it
20696 # the --recheck option to rerun configure.
20697 #
20698 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20699 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20700 # following values.
20701
20702 _ACEOF
20703
20704 # The following way of writing the cache mishandles newlines in values,
20705 # but we know of no workaround that is simple, portable, and efficient.
20706 # So, don't put newlines in cache variables' values.
20707 # Ultrix sh set writes to stderr and can't be redirected directly,
20708 # and sets the high bit in the cache file unless we assign to the vars.
20709 {
20710   (set) 2>&1 |
20711     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20712     *ac_space=\ *)
20713       # `set' does not quote correctly, so add quotes (double-quote
20714       # substitution turns \\\\ into \\, and sed turns \\ into \).
20715       sed -n \
20716         "s/'/'\\\\''/g;
20717           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20718       ;;
20719     *)
20720       # `set' quotes correctly as required by POSIX, so do not add quotes.
20721       sed -n \
20722         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20723       ;;
20724     esac;
20725 } |
20726   sed '
20727      t clear
20728      : clear
20729      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20730      t end
20731      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20732      : end' >>confcache
20733 if cmp -s $cache_file confcache; then :; else
20734   if test -w $cache_file; then
20735     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20736     cat confcache >$cache_file
20737   else
20738     echo "not updating unwritable cache $cache_file"
20739   fi
20740 fi
20741 rm -f confcache
20742
20743 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20744 # Let make expand exec_prefix.
20745 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20746
20747 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20748 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20749 # trailing colons and then remove the whole line if VPATH becomes empty
20750 # (actually we leave an empty line to preserve line numbers).
20751 if test "x$srcdir" = x.; then
20752   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20753 s/:*\$(srcdir):*/:/;
20754 s/:*\${srcdir}:*/:/;
20755 s/:*@srcdir@:*/:/;
20756 s/^\([^=]*=[    ]*\):*/\1/;
20757 s/:*$//;
20758 s/^[^=]*=[      ]*$//;
20759 }'
20760 fi
20761
20762 DEFS=-DHAVE_CONFIG_H
20763
20764 : ${CONFIG_STATUS=./config.status}
20765 ac_clean_files_save=$ac_clean_files
20766 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20767 { echo "$as_me:20767: creating $CONFIG_STATUS" >&5
20768 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20769 cat >$CONFIG_STATUS <<_ACEOF
20770 #! $SHELL
20771 # Generated automatically by configure.
20772 # Run this file to recreate the current configuration.
20773 # Compiler output produced by configure, useful for debugging
20774 # configure, is in config.log if it exists.
20775
20776 debug=false
20777 SHELL=\${CONFIG_SHELL-$SHELL}
20778 ac_cs_invocation="\$0 \$@"
20779
20780 _ACEOF
20781
20782 cat >>$CONFIG_STATUS <<\_ACEOF
20783 # Be Bourne compatible
20784 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20785   emulate sh
20786   NULLCMD=:
20787 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20788   set -o posix
20789 fi
20790
20791 # Name of the executable.
20792 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20793
20794 if expr a : '\(a\)' >/dev/null 2>&1; then
20795   as_expr=expr
20796 else
20797   as_expr=false
20798 fi
20799
20800 rm -f conf$$ conf$$.exe conf$$.file
20801 echo >conf$$.file
20802 if ln -s conf$$.file conf$$ 2>/dev/null; then
20803   # We could just check for DJGPP; but this test a) works b) is more generic
20804   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20805   if test -f conf$$.exe; then
20806     # Don't use ln at all; we don't have any links
20807     as_ln_s='cp -p'
20808   else
20809     as_ln_s='ln -s'
20810   fi
20811 elif ln conf$$.file conf$$ 2>/dev/null; then
20812   as_ln_s=ln
20813 else
20814   as_ln_s='cp -p'
20815 fi
20816 rm -f conf$$ conf$$.exe conf$$.file
20817
20818 as_executable_p="test -f"
20819
20820 # Support unset when possible.
20821 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20822   as_unset=unset
20823 else
20824   as_unset=false
20825 fi
20826
20827 # NLS nuisances.
20828 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20829 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20830 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20831 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20832 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20833 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20834 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20835 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20836
20837 # IFS
20838 # We need space, tab and new line, in precisely that order.
20839 as_nl='
20840 '
20841 IFS="   $as_nl"
20842
20843 # CDPATH.
20844 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20845
20846 exec 6>&1
20847
20848 _ACEOF
20849
20850 # Files that config.status was made for.
20851 if test -n "$ac_config_files"; then
20852   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20853 fi
20854
20855 if test -n "$ac_config_headers"; then
20856   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20857 fi
20858
20859 if test -n "$ac_config_links"; then
20860   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20861 fi
20862
20863 if test -n "$ac_config_commands"; then
20864   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20865 fi
20866
20867 cat >>$CONFIG_STATUS <<\EOF
20868
20869 ac_cs_usage="\
20870 \`$as_me' instantiates files from templates according to the
20871 current configuration.
20872
20873 Usage: $0 [OPTIONS] [FILE]...
20874
20875   -h, --help       print this help, then exit
20876   -V, --version    print version number, then exit
20877   -d, --debug      don't remove temporary files
20878       --recheck    update $as_me by reconfiguring in the same conditions
20879   --file=FILE[:TEMPLATE]
20880                    instantiate the configuration file FILE
20881   --header=FILE[:TEMPLATE]
20882                    instantiate the configuration header FILE
20883
20884 Configuration files:
20885 $config_files
20886
20887 Configuration headers:
20888 $config_headers
20889
20890 Configuration commands:
20891 $config_commands
20892
20893 Report bugs to <dickey@invisible-island.net>."
20894 EOF
20895
20896 cat >>$CONFIG_STATUS <<EOF
20897 ac_cs_version="\\
20898 config.status
20899 configured by $0, generated by GNU Autoconf 2.52.20121002,
20900   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20901
20902 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20903 Free Software Foundation, Inc.
20904 This config.status script is free software; the Free Software Foundation
20905 gives unlimited permission to copy, distribute and modify it."
20906 srcdir=$srcdir
20907 INSTALL="$INSTALL"
20908 EOF
20909
20910 cat >>$CONFIG_STATUS <<\EOF
20911 # If no file are specified by the user, then we need to provide default
20912 # value.  By we need to know if files were specified by the user.
20913 ac_need_defaults=:
20914 while test $# != 0
20915 do
20916   case $1 in
20917   --*=*)
20918     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20919     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20920     shift
20921     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20922     shift
20923     ;;
20924   -*);;
20925   *) # This is not an option, so the user has probably given explicit
20926      # arguments.
20927      ac_need_defaults=false;;
20928   esac
20929
20930   case $1 in
20931   # Handling of the options.
20932 EOF
20933 cat >>$CONFIG_STATUS <<EOF
20934   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20935     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20936     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20937 EOF
20938 cat >>$CONFIG_STATUS <<\EOF
20939   --version | --vers* | -V )
20940     echo "$ac_cs_version"; exit 0 ;;
20941   --he | --h)
20942     # Conflict between --help and --header
20943     { { echo "$as_me:20943: error: ambiguous option: $1
20944 Try \`$0 --help' for more information." >&5
20945 echo "$as_me: error: ambiguous option: $1
20946 Try \`$0 --help' for more information." >&2;}
20947    { (exit 1); exit 1; }; };;
20948   --help | --hel | -h )
20949     echo "$ac_cs_usage"; exit 0 ;;
20950   --debug | --d* | -d )
20951     debug=: ;;
20952   --file | --fil | --fi | --f )
20953     shift
20954     CONFIG_FILES="$CONFIG_FILES $1"
20955     ac_need_defaults=false;;
20956   --header | --heade | --head | --hea )
20957     shift
20958     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20959     ac_need_defaults=false;;
20960
20961   # This is an error.
20962   -*) { { echo "$as_me:20962: error: unrecognized option: $1
20963 Try \`$0 --help' for more information." >&5
20964 echo "$as_me: error: unrecognized option: $1
20965 Try \`$0 --help' for more information." >&2;}
20966    { (exit 1); exit 1; }; } ;;
20967
20968   *) ac_config_targets="$ac_config_targets $1" ;;
20969
20970   esac
20971   shift
20972 done
20973
20974 exec 5>>config.log
20975 cat >&5 << _ACEOF
20976
20977 ## ----------------------- ##
20978 ## Running config.status.  ##
20979 ## ----------------------- ##
20980
20981 This file was extended by $as_me 2.52.20121002, executed with
20982   CONFIG_FILES    = $CONFIG_FILES
20983   CONFIG_HEADERS  = $CONFIG_HEADERS
20984   CONFIG_LINKS    = $CONFIG_LINKS
20985   CONFIG_COMMANDS = $CONFIG_COMMANDS
20986   > $ac_cs_invocation
20987 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20988
20989 _ACEOF
20990 EOF
20991
20992 cat >>$CONFIG_STATUS <<EOF
20993 #
20994 # INIT-COMMANDS section.
20995 #
20996
20997 ### Special initialization commands, used to pass information from the
20998 ### configuration-run into config.status
20999
21000 AWK="$AWK"
21001 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21002 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21003 ECHO_LD="$ECHO_LD"
21004 LDCONFIG="$LDCONFIG"
21005 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21006 LIB_NAME="$LIB_NAME"
21007 LIB_PREFIX="$LIB_PREFIX"
21008 LIB_SUBSETS="$LIB_SUBSETS"
21009 LIB_SUFFIX="$LIB_SUFFIX"
21010 LIB_TRACING="$LIB_TRACING"
21011 LN_S="$LN_S"
21012 MAKE_TERMINFO="$MAKE_TERMINFO"
21013 NCURSES_MAJOR="$NCURSES_MAJOR"
21014 NCURSES_MINOR="$NCURSES_MINOR"
21015 NCURSES_OSPEED="$NCURSES_OSPEED"
21016 NCURSES_PATCH="$NCURSES_PATCH"
21017 SRC_SUBDIRS="$SRC_SUBDIRS"
21018 TERMINFO="$TERMINFO"
21019 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21020 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21021 TICS_NAME="$TICS_NAME"
21022 TIC_PATH="$TIC_PATH"
21023 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21024 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21025 TINFO_NAME="$TINFO_NAME"
21026 TINFO_SUFFIX="$TINFO_SUFFIX"
21027 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
21028 WITH_CURSES_H="$with_curses_h"
21029 WITH_ECHO="${enable_echo:=yes}"
21030 WITH_OVERWRITE="$with_overwrite"
21031 cf_LIST_MODELS="$cf_list_models"
21032 cf_cv_abi_version="$cf_cv_abi_version"
21033 cf_cv_do_relink="$cf_cv_do_relink"
21034 cf_cv_do_symlinks="$cf_cv_do_symlinks"
21035 cf_cv_enable_lp64="$cf_cv_enable_lp64"
21036 cf_cv_enable_opaque="$cf_cv_enable_opaque"
21037 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21038 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21039 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21040 cf_cv_rel_version="$cf_cv_rel_version"
21041 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21042 cf_cv_shared_soname='$cf_cv_shared_soname'
21043 cf_cv_shlib_version="$cf_cv_shlib_version"
21044 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21045 cf_cv_system_name="$cf_cv_system_name"
21046 cf_cv_term_driver="$with_term_driver"
21047 cf_with_ada="$cf_with_ada"
21048 cf_with_cxx_binding="$cf_with_cxx_binding"
21049 cf_with_manpages="$cf_with_manpages"
21050 cf_with_tests="$cf_with_tests"
21051 with_shared_cxx="$with_shared_cxx"
21052 host="$host"
21053 target="$target"
21054
21055 EOF
21056
21057 cat >>$CONFIG_STATUS <<\EOF
21058 for ac_config_target in $ac_config_targets
21059 do
21060   case "$ac_config_target" in
21061   # Handling of arguments.
21062   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21063   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21064   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21065   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21066   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21067   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21068   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21069   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21070   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21071   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21072   *) { { echo "$as_me:21072: error: invalid argument: $ac_config_target" >&5
21073 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21074    { (exit 1); exit 1; }; };;
21075   esac
21076 done
21077
21078 # If the user did not use the arguments to specify the items to instantiate,
21079 # then the envvar interface is used.  Set only those that are not.
21080 # We use the long form for the default assignment because of an extremely
21081 # bizarre bug on SunOS 4.1.3.
21082 if $ac_need_defaults; then
21083   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21084   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21085   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21086 fi
21087
21088 # Create a temporary directory, and hook for its removal unless debugging.
21089 $debug ||
21090 {
21091   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21092   trap '{ (exit 1); exit 1; }' 1 2 13 15
21093 }
21094
21095 # Create a (secure) tmp directory for tmp files.
21096 : ${TMPDIR=/tmp}
21097 {
21098   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21099   test -n "$tmp" && test -d "$tmp"
21100 }  ||
21101 {
21102   tmp=$TMPDIR/cs$$-$RANDOM
21103   (umask 077 && mkdir $tmp)
21104 } ||
21105 {
21106    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21107    { (exit 1); exit 1; }
21108 }
21109
21110 EOF
21111
21112 cat >>$CONFIG_STATUS <<EOF
21113
21114 #
21115 # CONFIG_FILES section.
21116 #
21117
21118 # No need to generate the scripts if there are no CONFIG_FILES.
21119 # This happens for instance when ./config.status config.h
21120 if test -n "\$CONFIG_FILES"; then
21121   # Protect against being on the right side of a sed subst in config.status.
21122   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21123    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21124 s,@SHELL@,$SHELL,;t t
21125 s,@exec_prefix@,$exec_prefix,;t t
21126 s,@prefix@,$prefix,;t t
21127 s,@program_transform_name@,$program_transform_name,;t t
21128 s,@bindir@,$bindir,;t t
21129 s,@sbindir@,$sbindir,;t t
21130 s,@libexecdir@,$libexecdir,;t t
21131 s,@datarootdir@,$datarootdir,;t t
21132 s,@datadir@,$datadir,;t t
21133 s,@sysconfdir@,$sysconfdir,;t t
21134 s,@sharedstatedir@,$sharedstatedir,;t t
21135 s,@localstatedir@,$localstatedir,;t t
21136 s,@libdir@,$libdir,;t t
21137 s,@includedir@,$includedir,;t t
21138 s,@oldincludedir@,$oldincludedir,;t t
21139 s,@infodir@,$infodir,;t t
21140 s,@mandir@,$mandir,;t t
21141 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21142 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21143 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21144 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21145 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21146 s,@build_alias@,$build_alias,;t t
21147 s,@host_alias@,$host_alias,;t t
21148 s,@target_alias@,$target_alias,;t t
21149 s,@ECHO_C@,$ECHO_C,;t t
21150 s,@ECHO_N@,$ECHO_N,;t t
21151 s,@ECHO_T@,$ECHO_T,;t t
21152 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21153 s,@DEFS@,$DEFS,;t t
21154 s,@LIBS@,$LIBS,;t t
21155 s,@top_builddir@,$top_builddir,;t t
21156 s,@EGREP@,$EGREP,;t t
21157 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21158 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21159 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21160 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21161 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21162 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21163 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21164 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21165 s,@build@,$build,;t t
21166 s,@build_cpu@,$build_cpu,;t t
21167 s,@build_vendor@,$build_vendor,;t t
21168 s,@build_os@,$build_os,;t t
21169 s,@host@,$host,;t t
21170 s,@host_cpu@,$host_cpu,;t t
21171 s,@host_vendor@,$host_vendor,;t t
21172 s,@host_os@,$host_os,;t t
21173 s,@target@,$target,;t t
21174 s,@target_cpu@,$target_cpu,;t t
21175 s,@target_vendor@,$target_vendor,;t t
21176 s,@target_os@,$target_os,;t t
21177 s,@CC@,$CC,;t t
21178 s,@CFLAGS@,$CFLAGS,;t t
21179 s,@LDFLAGS@,$LDFLAGS,;t t
21180 s,@CPPFLAGS@,$CPPFLAGS,;t t
21181 s,@ac_ct_CC@,$ac_ct_CC,;t t
21182 s,@EXEEXT@,$EXEEXT,;t t
21183 s,@OBJEXT@,$OBJEXT,;t t
21184 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21185 s,@CPP@,$CPP,;t t
21186 s,@LDCONFIG@,$LDCONFIG,;t t
21187 s,@CXX@,$CXX,;t t
21188 s,@CXXFLAGS@,$CXXFLAGS,;t t
21189 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21190 s,@AWK@,$AWK,;t t
21191 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21192 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21193 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21194 s,@LINT@,$LINT,;t t
21195 s,@LINT_OPTS@,$LINT_OPTS,;t t
21196 s,@LN_S@,$LN_S,;t t
21197 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21198 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21199 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21200 s,@SET_MAKE@,$SET_MAKE,;t t
21201 s,@CTAGS@,$CTAGS,;t t
21202 s,@ETAGS@,$ETAGS,;t t
21203 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21204 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21205 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21206 s,@RANLIB@,$RANLIB,;t t
21207 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21208 s,@LD@,$LD,;t t
21209 s,@ac_ct_LD@,$ac_ct_LD,;t t
21210 s,@AR@,$AR,;t t
21211 s,@ac_ct_AR@,$ac_ct_AR,;t t
21212 s,@ARFLAGS@,$ARFLAGS,;t t
21213 s,@DESTDIR@,$DESTDIR,;t t
21214 s,@BUILD_CC@,$BUILD_CC,;t t
21215 s,@BUILD_CPP@,$BUILD_CPP,;t t
21216 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21217 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21218 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21219 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21220 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21221 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21222 s,@cf_list_models@,$cf_list_models,;t t
21223 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21224 s,@LIBTOOL@,$LIBTOOL,;t t
21225 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21226 s,@LT_UNDEF@,$LT_UNDEF,;t t
21227 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21228 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21229 s,@LIB_CREATE@,$LIB_CREATE,;t t
21230 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21231 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21232 s,@LIB_PREP@,$LIB_PREP,;t t
21233 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21234 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21235 s,@LIB_LINK@,$LIB_LINK,;t t
21236 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21237 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21238 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21239 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21240 s,@TICS_NAME@,$TICS_NAME,;t t
21241 s,@TINFO_NAME@,$TINFO_NAME,;t t
21242 s,@LIB_NAME@,$LIB_NAME,;t t
21243 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21244 s,@CC_G_OPT@,$CC_G_OPT,;t t
21245 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21246 s,@LD_MODEL@,$LD_MODEL,;t t
21247 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21248 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21249 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21250 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21251 s,@LINK_PROGS@,$LINK_PROGS,;t t
21252 s,@LINK_TESTS@,$LINK_TESTS,;t t
21253 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21254 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21255 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21256 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21257 s,@RPATH_LIST@,$RPATH_LIST,;t t
21258 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21259 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21260 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21261 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21262 s,@XTERM_KBS@,$XTERM_KBS,;t t
21263 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21264 s,@TERMINFO@,$TERMINFO,;t t
21265 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21266 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21267 s,@TERMPATH@,$TERMPATH,;t t
21268 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21269 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21270 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21271 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21272 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21273 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21274 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21275 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21276 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21277 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21278 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21279 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21280 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21281 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21282 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21283 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21284 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21285 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21286 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21287 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21288 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21289 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21290 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21291 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21292 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21293 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21294 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21295 s,@PTHREAD@,$PTHREAD,;t t
21296 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21297 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21298 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21299 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21300 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21301 s,@ECHO_LT@,$ECHO_LT,;t t
21302 s,@ECHO_LD@,$ECHO_LD,;t t
21303 s,@RULE_CC@,$RULE_CC,;t t
21304 s,@SHOW_CC@,$SHOW_CC,;t t
21305 s,@ECHO_CC@,$ECHO_CC,;t t
21306 s,@ECHO_LINK@,$ECHO_LINK,;t t
21307 s,@ADAFLAGS@,$ADAFLAGS,;t t
21308 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21309 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21310 s,@ADA_TRACE@,$ADA_TRACE,;t t
21311 s,@MATH_LIB@,$MATH_LIB,;t t
21312 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21313 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21314 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21315 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21316 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21317 s,@TEST_LIBS@,$TEST_LIBS,;t t
21318 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21319 s,@CXXCPP@,$CXXCPP,;t t
21320 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21321 s,@CXX_AR@,$CXX_AR,;t t
21322 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21323 s,@CXXLIBS@,$CXXLIBS,;t t
21324 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21325 s,@gnat_exists@,$gnat_exists,;t t
21326 s,@M4_exists@,$M4_exists,;t t
21327 s,@cf_ada_make@,$cf_ada_make,;t t
21328 s,@cf_compile_generics@,$cf_compile_generics,;t t
21329 s,@cf_generic_objects@,$cf_generic_objects,;t t
21330 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21331 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21332 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21333 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21334 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21335 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21336 s,@cf_ada_package@,$cf_ada_package,;t t
21337 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21338 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21339 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21340 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21341 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21342 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21343 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21344 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21345 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21346 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21347 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21348 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21349 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21350 s,@TICS_LIBS@,$TICS_LIBS,;t t
21351 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21352 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21353 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21354 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21355 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21356 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21357 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21358 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21359 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21360 s,@TICS_LIST@,$TICS_LIST,;t t
21361 s,@TINFO_LIST@,$TINFO_LIST,;t t
21362 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21363 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21364 s,@TEST_ARGS@,$TEST_ARGS,;t t
21365 s,@TEST_DEPS@,$TEST_DEPS,;t t
21366 s,@TEST_ARG2@,$TEST_ARG2,;t t
21367 s,@TEST_DEP2@,$TEST_DEP2,;t t
21368 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21369 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21370 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21371 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21372 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21373 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21374 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21375 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21376 s,@cross_compiling@,$cross_compiling,;t t
21377 s,@TIC_PATH@,$TIC_PATH,;t t
21378 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21379 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21380 s,@PANEL_NAME@,$PANEL_NAME,;t t
21381 s,@MENU_NAME@,$MENU_NAME,;t t
21382 s,@FORM_NAME@,$FORM_NAME,;t t
21383 s,@CXX_NAME@,$CXX_NAME,;t t
21384 CEOF
21385
21386 EOF
21387
21388   cat >>$CONFIG_STATUS <<\EOF
21389   # Split the substitutions into bite-sized pieces for seds with
21390   # small command number limits, like on Digital OSF/1 and HP-UX.
21391   ac_max_sed_lines=48
21392   ac_sed_frag=1 # Number of current file.
21393   ac_beg=1 # First line for current file.
21394   ac_end=$ac_max_sed_lines # Line after last line for current file.
21395   ac_more_lines=:
21396   ac_sed_cmds=
21397   while $ac_more_lines; do
21398     if test $ac_beg -gt 1; then
21399       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21400     else
21401       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21402     fi
21403     if test ! -s $tmp/subs.frag; then
21404       ac_more_lines=false
21405     else
21406       # The purpose of the label and of the branching condition is to
21407       # speed up the sed processing (if there are no `@' at all, there
21408       # is no need to browse any of the substitutions).
21409       # These are the two extra sed commands mentioned above.
21410       (echo ':t
21411   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21412       if test -z "$ac_sed_cmds"; then
21413         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21414       else
21415         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21416       fi
21417       ac_sed_frag=`expr $ac_sed_frag + 1`
21418       ac_beg=$ac_end
21419       ac_end=`expr $ac_end + $ac_max_sed_lines`
21420     fi
21421   done
21422   if test -z "$ac_sed_cmds"; then
21423     ac_sed_cmds=cat
21424   fi
21425 fi # test -n "$CONFIG_FILES"
21426
21427 EOF
21428 cat >>$CONFIG_STATUS <<\EOF
21429 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21430   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21431   case $ac_file in
21432   - | *:- | *:-:* ) # input from stdin
21433         cat >$tmp/stdin
21434         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21435         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21436   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21437         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21438   * )   ac_file_in=$ac_file.in ;;
21439   esac
21440
21441   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21442   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21443          X"$ac_file" : 'X\(//\)[^/]' \| \
21444          X"$ac_file" : 'X\(//\)$' \| \
21445          X"$ac_file" : 'X\(/\)' \| \
21446          .     : '\(.\)' 2>/dev/null ||
21447 echo X"$ac_file" |
21448     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21449           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21450           /^X\(\/\/\)$/{ s//\1/; q; }
21451           /^X\(\/\).*/{ s//\1/; q; }
21452           s/.*/./; q'`
21453   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21454     { case "$ac_dir" in
21455   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21456   *)                      as_incr_dir=.;;
21457 esac
21458 as_dummy="$ac_dir"
21459 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21460   case $as_mkdir_dir in
21461     # Skip DOS drivespec
21462     ?:) as_incr_dir=$as_mkdir_dir ;;
21463     *)
21464       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21465       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21466     ;;
21467   esac
21468 done; }
21469
21470     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21471     # A "../" for each directory in $ac_dir_suffix.
21472     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21473   else
21474     ac_dir_suffix= ac_dots=
21475   fi
21476
21477   case $srcdir in
21478   .)  ac_srcdir=.
21479       if test -z "$ac_dots"; then
21480          ac_top_srcdir=.
21481       else
21482          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21483       fi ;;
21484   [\\/]* | ?:[\\/]* )
21485       ac_srcdir=$srcdir$ac_dir_suffix;
21486       ac_top_srcdir=$srcdir ;;
21487   *) # Relative path.
21488     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21489     ac_top_srcdir=$ac_dots$srcdir ;;
21490   esac
21491
21492   case $INSTALL in
21493   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21494   *) ac_INSTALL=$ac_dots$INSTALL ;;
21495   esac
21496
21497   if test x"$ac_file" != x-; then
21498     { echo "$as_me:21498: creating $ac_file" >&5
21499 echo "$as_me: creating $ac_file" >&6;}
21500     rm -f "$ac_file"
21501   fi
21502   # Let's still pretend it is `configure' which instantiates (i.e., don't
21503   # use $as_me), people would be surprised to read:
21504   #    /* config.h.  Generated automatically by config.status.  */
21505   configure_input="Generated automatically from `echo $ac_file_in |
21506                                                  sed 's,.*/,,'` by configure."
21507
21508   # First look for the input files in the build tree, otherwise in the
21509   # src tree.
21510   ac_file_inputs=`IFS=:
21511     for f in $ac_file_in; do
21512       case $f in
21513       -) echo $tmp/stdin ;;
21514       [\\/$]*)
21515          # Absolute (can't be DOS-style, as IFS=:)
21516          test -f "$f" || { { echo "$as_me:21516: error: cannot find input file: $f" >&5
21517 echo "$as_me: error: cannot find input file: $f" >&2;}
21518    { (exit 1); exit 1; }; }
21519          echo $f;;
21520       *) # Relative
21521          if test -f "$f"; then
21522            # Build tree
21523            echo $f
21524          elif test -f "$srcdir/$f"; then
21525            # Source tree
21526            echo $srcdir/$f
21527          else
21528            # /dev/null tree
21529            { { echo "$as_me:21529: error: cannot find input file: $f" >&5
21530 echo "$as_me: error: cannot find input file: $f" >&2;}
21531    { (exit 1); exit 1; }; }
21532          fi;;
21533       esac
21534     done` || { (exit 1); exit 1; }
21535 EOF
21536 cat >>$CONFIG_STATUS <<\EOF
21537   ac_warn_datarootdir=no
21538   if test x"$ac_file" != x-; then
21539     for ac_item in $ac_file_inputs
21540     do
21541       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21542       if test -n "$ac_seen"; then
21543         ac_used=`grep '@datarootdir@' $ac_item`
21544         if test -z "$ac_used"; then
21545           { echo "$as_me:21545: WARNING: datarootdir was used implicitly but not set:
21546 $ac_seen" >&5
21547 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21548 $ac_seen" >&2;}
21549           ac_warn_datarootdir=yes
21550         fi
21551       fi
21552       ac_seen=`grep '${datarootdir}' $ac_item`
21553       if test -n "$ac_seen"; then
21554         { echo "$as_me:21554: WARNING: datarootdir was used explicitly but not set:
21555 $ac_seen" >&5
21556 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21557 $ac_seen" >&2;}
21558         ac_warn_datarootdir=yes
21559       fi
21560     done
21561   fi
21562
21563 if test "x$ac_warn_datarootdir" = xyes; then
21564   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21565 fi
21566
21567 EOF
21568 cat >>$CONFIG_STATUS <<EOF
21569   sed "$ac_vpsub
21570 $extrasub
21571 EOF
21572 cat >>$CONFIG_STATUS <<\EOF
21573 :t
21574 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21575 s,@configure_input@,$configure_input,;t t
21576 s,@srcdir@,$ac_srcdir,;t t
21577 s,@top_srcdir@,$ac_top_srcdir,;t t
21578 s,@INSTALL@,$ac_INSTALL,;t t
21579 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21580   rm -f $tmp/stdin
21581   if test x"$ac_file" != x-; then
21582     cp $tmp/out $ac_file
21583
21584     for ac_name in prefix exec_prefix datarootdir
21585     do
21586         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21587         if test -n "$ac_seen"; then
21588             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21589             if test -z "$ac_init"; then
21590               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21591               { echo "$as_me:21591: WARNING: Variable $ac_name is used but was not set:
21592 $ac_seen" >&5
21593 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21594 $ac_seen" >&2;}
21595             fi
21596         fi
21597     done
21598     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21599     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21600     if test -s $tmp/out; then
21601       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21602       { echo "$as_me:21602: WARNING: Some variables may not be substituted:
21603 $ac_seen" >&5
21604 echo "$as_me: WARNING: Some variables may not be substituted:
21605 $ac_seen" >&2;}
21606     fi
21607   else
21608     cat $tmp/out
21609   fi
21610   rm -f $tmp/out
21611
21612 done
21613 EOF
21614 cat >>$CONFIG_STATUS <<\EOF
21615
21616 #
21617 # CONFIG_HEADER section.
21618 #
21619
21620 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21621 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21622 #
21623 # ac_d sets the value in "#define NAME VALUE" lines.
21624 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21625 ac_dB='[        ].*$,\1#\2'
21626 ac_dC=' '
21627 ac_dD=',;t'
21628 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21629 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21630 ac_iB='\([      ]\),\1#\2define\3'
21631 ac_iC=' '
21632 ac_iD='\4,;t'
21633 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21634 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21635 ac_uB='$,\1#\2define\3'
21636 ac_uC=' '
21637 ac_uD=',;t'
21638
21639 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21640   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21641   case $ac_file in
21642   - | *:- | *:-:* ) # input from stdin
21643         cat >$tmp/stdin
21644         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21645         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21646   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21647         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21648   * )   ac_file_in=$ac_file.in ;;
21649   esac
21650
21651   test x"$ac_file" != x- && { echo "$as_me:21651: creating $ac_file" >&5
21652 echo "$as_me: creating $ac_file" >&6;}
21653
21654   # First look for the input files in the build tree, otherwise in the
21655   # src tree.
21656   ac_file_inputs=`IFS=:
21657     for f in $ac_file_in; do
21658       case $f in
21659       -) echo $tmp/stdin ;;
21660       [\\/$]*)
21661          # Absolute (can't be DOS-style, as IFS=:)
21662          test -f "$f" || { { echo "$as_me:21662: error: cannot find input file: $f" >&5
21663 echo "$as_me: error: cannot find input file: $f" >&2;}
21664    { (exit 1); exit 1; }; }
21665          echo $f;;
21666       *) # Relative
21667          if test -f "$f"; then
21668            # Build tree
21669            echo $f
21670          elif test -f "$srcdir/$f"; then
21671            # Source tree
21672            echo $srcdir/$f
21673          else
21674            # /dev/null tree
21675            { { echo "$as_me:21675: error: cannot find input file: $f" >&5
21676 echo "$as_me: error: cannot find input file: $f" >&2;}
21677    { (exit 1); exit 1; }; }
21678          fi;;
21679       esac
21680     done` || { (exit 1); exit 1; }
21681   # Remove the trailing spaces.
21682   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21683
21684 EOF
21685
21686 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21687 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21688 # be either 'cat' or 'sort'.
21689 cat confdefs.h | uniq >conftest.vals
21690
21691 # Break up conftest.vals because some shells have a limit on
21692 # the size of here documents, and old seds have small limits too.
21693
21694 rm -f conftest.tail
21695 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21696 while grep . conftest.vals >/dev/null
21697 do
21698   # Write chunks of a limited-size here document to conftest.frag.
21699   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21700   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21701   echo 'CEOF' >> $CONFIG_STATUS
21702   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21703   rm -f conftest.vals
21704   mv conftest.tail conftest.vals
21705 done
21706 rm -f conftest.vals
21707
21708 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21709 # marker @DEFS@.
21710 echo '  cat >> conftest.edit <<CEOF
21711 /@DEFS@/r conftest.frag
21712 /@DEFS@/d
21713 CEOF
21714 sed -f conftest.edit $tmp/in > $tmp/out
21715 rm -f $tmp/in
21716 mv $tmp/out $tmp/in
21717 rm -f conftest.edit conftest.frag
21718 ' >> $CONFIG_STATUS
21719
21720 cat >>$CONFIG_STATUS <<\EOF
21721   # Let's still pretend it is `configure' which instantiates (i.e., don't
21722   # use $as_me), people would be surprised to read:
21723   #    /* config.h.  Generated automatically by config.status.  */
21724   if test x"$ac_file" = x-; then
21725     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21726   else
21727     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21728   fi
21729   cat $tmp/in >>$tmp/config.h
21730   rm -f $tmp/in
21731   if test x"$ac_file" != x-; then
21732     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21733       { echo "$as_me:21733: $ac_file is unchanged" >&5
21734 echo "$as_me: $ac_file is unchanged" >&6;}
21735     else
21736       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21737          X"$ac_file" : 'X\(//\)[^/]' \| \
21738          X"$ac_file" : 'X\(//\)$' \| \
21739          X"$ac_file" : 'X\(/\)' \| \
21740          .     : '\(.\)' 2>/dev/null ||
21741 echo X"$ac_file" |
21742     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21743           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21744           /^X\(\/\/\)$/{ s//\1/; q; }
21745           /^X\(\/\).*/{ s//\1/; q; }
21746           s/.*/./; q'`
21747       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21748         { case "$ac_dir" in
21749   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21750   *)                      as_incr_dir=.;;
21751 esac
21752 as_dummy="$ac_dir"
21753 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21754   case $as_mkdir_dir in
21755     # Skip DOS drivespec
21756     ?:) as_incr_dir=$as_mkdir_dir ;;
21757     *)
21758       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21759       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21760     ;;
21761   esac
21762 done; }
21763
21764       fi
21765       rm -f $ac_file
21766       mv $tmp/config.h $ac_file
21767     fi
21768   else
21769     cat $tmp/config.h
21770     rm -f $tmp/config.h
21771   fi
21772 done
21773 EOF
21774 cat >>$CONFIG_STATUS <<\EOF
21775 #
21776 # CONFIG_COMMANDS section.
21777 #
21778 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21779   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21780   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21781
21782   case $ac_dest in
21783     default )
21784 if test "x$cf_with_tests" != xno ; then
21785
21786 for cf_dir in test
21787 do
21788         if test ! -d $srcdir/$cf_dir; then
21789                 continue
21790         elif test -f $srcdir/$cf_dir/programs; then
21791                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21792         fi
21793 done
21794
21795 fi
21796
21797 cf_prefix=$LIB_PREFIX
21798
21799 case $cf_cv_shlib_version in #(vi
21800 cygdll|mingw)
21801         TINFO_NAME=$TINFO_ARG_SUFFIX
21802         TINFO_SUFFIX=.dll
21803         ;;
21804 esac
21805
21806 if test -n "$TINFO_SUFFIX" ; then
21807         case $TINFO_SUFFIX in
21808         tw*)
21809                 TINFO_NAME="${TINFO_NAME}tw"
21810                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21811                 ;;
21812         t*)
21813                 TINFO_NAME="${TINFO_NAME}t"
21814                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21815                 ;;
21816         w*)
21817                 TINFO_NAME="${TINFO_NAME}w"
21818                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21819                 ;;
21820         esac
21821 fi
21822
21823 for cf_dir in $SRC_SUBDIRS
21824 do
21825         if test ! -d $srcdir/$cf_dir ; then
21826                 continue
21827         elif test -f $srcdir/$cf_dir/modules; then
21828
21829                 SHARED_LIB=
21830                 Libs_To_Make=
21831                 for cf_item in $cf_LIST_MODELS
21832                 do
21833
21834         case $cf_item in #(vi
21835         libtool) #(vi
21836                 cf_suffix='.la'
21837                 cf_depsuf=$cf_suffix
21838                 ;;
21839         normal) #(vi
21840                 cf_suffix='.a'
21841                 cf_depsuf=$cf_suffix
21842                 ;;
21843         debug) #(vi
21844                 cf_suffix='_g.a'
21845                 cf_depsuf=$cf_suffix
21846                 ;;
21847         profile) #(vi
21848                 cf_suffix='_p.a'
21849                 cf_depsuf=$cf_suffix
21850                 ;;
21851         shared) #(vi
21852                 case $cf_cv_system_name in
21853                 aix[5-7]*) #(vi
21854                         cf_suffix='.a'
21855                         cf_depsuf=$cf_suffix
21856                         ;;
21857                 cygwin*|mingw*) #(vi
21858                         cf_suffix='.dll'
21859                         cf_depsuf='.dll.a'
21860                         ;;
21861                 darwin*) #(vi
21862                         cf_suffix='.dylib'
21863                         cf_depsuf=$cf_suffix
21864                         ;;
21865                 hpux*) #(vi
21866                         case $target in
21867                         ia64*) #(vi
21868                                 cf_suffix='.so'
21869                                 cf_depsuf=$cf_suffix
21870                                 ;;
21871                         *) #(vi
21872                                 cf_suffix='.sl'
21873                                 cf_depsuf=$cf_suffix
21874                                 ;;
21875                         esac
21876                         ;;
21877                 *)      cf_suffix='.so'
21878                         cf_depsuf=$cf_suffix
21879                         ;;
21880                 esac
21881         esac
21882         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21883         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21884
21885                         cf_libname=$cf_dir
21886                         test "$cf_dir" = c++ && cf_libname=ncurses++
21887                         if test $cf_item = shared ; then
21888                                 if test -n "${LIB_SUFFIX}"
21889                                 then
21890                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
21891                                 else
21892                                         cf_shared_suffix="$cf_suffix"
21893                                 fi
21894                                 if test "$cf_cv_do_symlinks" = yes ; then
21895                                         cf_version_name=
21896
21897                                         case "$cf_cv_shlib_version" in #(vi
21898                                         rel) #(vi
21899                                                 cf_version_name=REL_VERSION
21900                                                 ;;
21901                                         abi)
21902                                                 cf_version_name=ABI_VERSION
21903                                                 ;;
21904                                         esac
21905
21906                                         if test -n "$cf_version_name"
21907                                         then
21908                                                 case "$cf_cv_system_name" in #(vi
21909                                                 darwin*)
21910                                                         # "w", etc?
21911                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
21912                                                         ;; #(vi
21913                                                 *)
21914                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
21915                                                         ;;
21916                                                 esac
21917                                         fi
21918                                         if test -n "${LIB_SUFFIX}"
21919                                         then
21920                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
21921                                         else
21922                                                 cf_shared_suffix="$cf_suffix"
21923                                         fi
21924                                 fi
21925                                 # cygwin needs import library, and has unique naming convention
21926                                 # use autodetected ${cf_prefix} for import lib and static lib, but
21927                                 # use 'cyg' prefix for shared lib.
21928                                 case $cf_cv_shlib_version in #(vi
21929                                 cygdll) #(vi
21930                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21931                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
21932                                         continue
21933                                         ;;
21934                                 mingw)
21935                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21936                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
21937                                         continue
21938                                         ;;
21939                                 esac
21940                         fi
21941                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
21942                 done
21943
21944                 if test $cf_dir = ncurses ; then
21945                         cf_subsets="$LIB_SUBSETS"
21946                         cf_r_parts="$cf_subsets"
21947                         cf_liblist="$Libs_To_Make"
21948
21949                         while test -n "$cf_r_parts"
21950                         do
21951                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21952                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21953                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21954                                         cf_item=
21955                                         case $cf_l_parts in #(vi
21956                                         *termlib*) #(vi
21957                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21958                                                 ;;
21959                                         *ticlib*)
21960                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21961                                                 ;;
21962                                         *)
21963                                                 break
21964                                                 ;;
21965                                         esac
21966                                         if test -n "$cf_item"; then
21967                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21968                                         fi
21969                                 else
21970                                         break
21971                                 fi
21972                         done
21973                 else
21974                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21975                 fi
21976
21977                 if test $cf_dir = c++; then
21978                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
21979                                 cf_list=
21980                                 for cf_item in $Libs_To_Make
21981                                 do
21982                                         case $cf_item in
21983                                         *.a)
21984                                                 ;;
21985                                         *)
21986                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
21987                                                 ;;
21988                                         esac
21989                                         for cf_test in $cf_list
21990                                         do
21991                                                 if test "$cf_test" = "$cf_item"
21992                                                 then
21993                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
21994                                                         cf_item=
21995                                                         break
21996                                                 fi
21997                                         done
21998                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
21999                                 done
22000                                 Libs_To_Make="$cf_list"
22001                         fi
22002                 fi
22003
22004                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22005                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22006                         $cf_dir/Makefile >$cf_dir/Makefile.out
22007                 mv $cf_dir/Makefile.out $cf_dir/Makefile
22008
22009                 $AWK -f $srcdir/mk-0th.awk \
22010                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22011                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22012
22013                 for cf_subset in $cf_subsets
22014                 do
22015                         cf_subdirs=
22016                         for cf_item in $cf_LIST_MODELS
22017                         do
22018
22019                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22020
22021 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22022
22023                         CXX_MODEL=$cf_ITEM
22024                         if test "$CXX_MODEL" = SHARED; then
22025                                 case $cf_cv_shlib_version in #(vi
22026                                 cygdll|mingw) #(vi
22027                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
22028
22029 echo "${as_me:-configure}:22029: testing overriding CXX_MODEL to SHARED ..." 1>&5
22030
22031                                         with_shared_cxx=yes
22032                                         ;;
22033                                 *)
22034                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22035                                         ;;
22036                                 esac
22037                         fi
22038
22039         case $cf_item in #(vi
22040         libtool) #(vi
22041                 cf_suffix='.la'
22042                 cf_depsuf=$cf_suffix
22043                 ;;
22044         normal) #(vi
22045                 cf_suffix='.a'
22046                 cf_depsuf=$cf_suffix
22047                 ;;
22048         debug) #(vi
22049                 cf_suffix='_g.a'
22050                 cf_depsuf=$cf_suffix
22051                 ;;
22052         profile) #(vi
22053                 cf_suffix='_p.a'
22054                 cf_depsuf=$cf_suffix
22055                 ;;
22056         shared) #(vi
22057                 case $cf_cv_system_name in
22058                 aix[5-7]*) #(vi
22059                         cf_suffix='.a'
22060                         cf_depsuf=$cf_suffix
22061                         ;;
22062                 cygwin*|mingw*) #(vi
22063                         cf_suffix='.dll'
22064                         cf_depsuf='.dll.a'
22065                         ;;
22066                 darwin*) #(vi
22067                         cf_suffix='.dylib'
22068                         cf_depsuf=$cf_suffix
22069                         ;;
22070                 hpux*) #(vi
22071                         case $target in
22072                         ia64*) #(vi
22073                                 cf_suffix='.so'
22074                                 cf_depsuf=$cf_suffix
22075                                 ;;
22076                         *) #(vi
22077                                 cf_suffix='.sl'
22078                                 cf_depsuf=$cf_suffix
22079                                 ;;
22080                         esac
22081                         ;;
22082                 *)      cf_suffix='.so'
22083                         cf_depsuf=$cf_suffix
22084                         ;;
22085                 esac
22086         esac
22087         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22088         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22089
22090         case $cf_item in
22091         libtool) cf_subdir='obj_lo'  ;;
22092         normal)  cf_subdir='objects' ;;
22093         debug)   cf_subdir='obj_g' ;;
22094         profile) cf_subdir='obj_p' ;;
22095         shared)
22096                 case $cf_cv_system_name in #(vi
22097                 cygwin) #(vi
22098                         cf_subdir='objects' ;;
22099                 *)
22100                         cf_subdir='obj_s' ;;
22101                 esac
22102         esac
22103
22104                         # Test for case where we build libtinfo with a different name.
22105                         cf_libname=$cf_dir
22106                         if test $cf_dir = ncurses ; then
22107                                 case $cf_subset in
22108                                 *base*)
22109                                         cf_libname=${cf_libname}$LIB_SUFFIX
22110                                         ;;
22111                                 *termlib*)
22112                                         cf_libname=$TINFO_LIB_SUFFIX
22113                                         ;;
22114                                 ticlib*)
22115                                         cf_libname=$TICS_LIB_SUFFIX
22116                                         ;;
22117                                 esac
22118                         elif test $cf_dir = c++ ; then
22119                                 cf_libname=ncurses++$LIB_SUFFIX
22120                         else
22121                                 cf_libname=${cf_libname}$LIB_SUFFIX
22122                         fi
22123                         if test -n "${DFT_ARG_SUFFIX}" ; then
22124                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22125                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22126                         fi
22127
22128                         # These dependencies really are for development, not
22129                         # builds, but they are useful in porting, too.
22130                         cf_depend="../include/ncurses_cfg.h"
22131                         if test "$srcdir" = "."; then
22132                                 cf_reldir="."
22133                         else
22134                                 cf_reldir="\${srcdir}"
22135                         fi
22136
22137                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22138                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22139                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22140                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22141                         fi
22142
22143                         cf_dir_suffix=
22144                         old_cf_suffix="$cf_suffix"
22145                         if test "$cf_cv_shlib_version_infix" = yes ; then
22146                         if test -n "$LIB_SUFFIX" ; then
22147                                 case $LIB_SUFFIX in
22148                                 tw*)
22149                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22150                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22151                                         cf_dir_suffix=tw
22152                                         ;;
22153                                 t*)
22154                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22155                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22156                                         cf_dir_suffix=t
22157                                         ;;
22158                                 w*)
22159                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22160                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22161                                         cf_dir_suffix=w
22162                                         ;;
22163                                 esac
22164                         fi
22165                         fi
22166
22167                         $AWK -f $srcdir/mk-1st.awk \
22168                                 name=${cf_libname}${cf_dir_suffix} \
22169                                 traces=$LIB_TRACING \
22170                                 MODEL=$cf_ITEM \
22171                                 CXX_MODEL=$CXX_MODEL \
22172                                 model=$cf_subdir \
22173                                 prefix=$cf_prefix \
22174                                 suffix=$cf_suffix \
22175                                 subset=$cf_subset \
22176                                 driver=$cf_cv_term_driver \
22177                                 SymLink="$LN_S" \
22178                                 TermlibRoot=$TINFO_NAME \
22179                                 TermlibSuffix=$TINFO_SUFFIX \
22180                                 ShlibVer=$cf_cv_shlib_version \
22181                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22182                                 ReLink=${cf_cv_do_relink:-no} \
22183                                 DoLinks=$cf_cv_do_symlinks \
22184                                 rmSoLocs=$cf_cv_rm_so_locs \
22185                                 ldconfig="$LDCONFIG" \
22186                                 overwrite=$WITH_OVERWRITE \
22187                                 depend="$cf_depend" \
22188                                 host="$host" \
22189                                 libtool_version="$LIBTOOL_VERSION" \
22190                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22191
22192                         cf_suffix="$old_cf_suffix"
22193
22194                         for cf_subdir2 in $cf_subdirs lib
22195                         do
22196                                 test $cf_subdir = $cf_subdir2 && break
22197                         done
22198                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22199                         $AWK -f $srcdir/mk-2nd.awk \
22200                                 name=$cf_dir \
22201                                 traces=$LIB_TRACING \
22202                                 MODEL=$cf_ITEM \
22203                                 model=$cf_subdir \
22204                                 subset=$cf_subset \
22205                                 srcdir=$srcdir \
22206                                 echo=$WITH_ECHO \
22207                                 crenames=$cf_cv_prog_CC_c_o \
22208                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22209                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22210                         cf_subdirs="$cf_subdirs $cf_subdir"
22211                         done
22212                 done
22213         fi
22214
22215         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22216 done
22217
22218 for cf_dir in $SRC_SUBDIRS
22219 do
22220         if test ! -d $srcdir/$cf_dir ; then
22221                 continue
22222         fi
22223
22224         if test -f $cf_dir/Makefile ; then
22225                 case "$cf_dir" in
22226                 Ada95) #(vi
22227                         echo 'libs \' >> Makefile
22228                         echo 'install.libs \' >> Makefile
22229                         echo 'uninstall.libs ::' >> Makefile
22230                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22231                         ;;
22232                 esac
22233         fi
22234
22235         if test -f $srcdir/$cf_dir/modules; then
22236                 echo >> Makefile
22237                 if test -f $srcdir/$cf_dir/headers; then
22238 cat >> Makefile <<CF_EOF
22239 install.includes \\
22240 uninstall.includes \\
22241 CF_EOF
22242                 fi
22243 if test "$cf_dir" != "c++" ; then
22244 echo 'lint \' >> Makefile
22245 fi
22246 cat >> Makefile <<CF_EOF
22247 libs \\
22248 lintlib \\
22249 install.libs \\
22250 uninstall.libs \\
22251 install.$cf_dir \\
22252 uninstall.$cf_dir ::
22253         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22254 CF_EOF
22255         elif test -f $srcdir/$cf_dir/headers; then
22256 cat >> Makefile <<CF_EOF
22257
22258 libs \\
22259 install.libs \\
22260 uninstall.libs \\
22261 install.includes \\
22262 uninstall.includes ::
22263         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22264 CF_EOF
22265 fi
22266 done
22267
22268 cat >> Makefile <<CF_EOF
22269
22270 install.libs uninstall.libs \\
22271 install.data uninstall.data ::
22272 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22273 CF_EOF
22274
22275 if test "x$cf_with_manpages" = xyes; then
22276 cat >> Makefile <<CF_EOF
22277
22278 install.man \\
22279 uninstall.man ::
22280         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22281 CF_EOF
22282 fi
22283
22284 cat >> Makefile <<CF_EOF
22285
22286 distclean ::
22287         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22288         rm -f headers.sh headers.sed mk_shared_lib.sh
22289         rm -f edit_man.* man_alias.*
22290         rm -rf \${DIRS_TO_MAKE}
22291 CF_EOF
22292
22293 # Special case: tack's manpage lives in its own directory.
22294 if test "x$cf_with_manpages" = xyes; then
22295 if test -d tack ; then
22296 if test -f $srcdir/$tack.h; then
22297 cat >> Makefile <<CF_EOF
22298
22299 install.man \\
22300 uninstall.man ::
22301         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22302 CF_EOF
22303 fi
22304 fi
22305 fi
22306
22307 rm -f headers.sed headers.sh
22308
22309 echo creating headers.sh
22310 cat >headers.sh <<CF_EOF
22311 #! /bin/sh
22312 # This shell script is generated by the 'configure' script.  It is invoked in a
22313 # subdirectory of the build tree.  It generates a sed-script in the parent
22314 # directory that is used to adjust includes for header files that reside in a
22315 # subdirectory of /usr/include, etc.
22316 PRG=""
22317 while test \$# != 3
22318 do
22319 PRG="\$PRG \$1"; shift
22320 done
22321 DST=\$1
22322 REF=\$2
22323 SRC=\$3
22324 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22325 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22326 echo installing \$SRC in \$DST
22327 CF_EOF
22328
22329 if test $WITH_CURSES_H = yes; then
22330         cat >>headers.sh <<CF_EOF
22331 case \$DST in
22332 /*/include/*)
22333         END=\`basename \$DST\`
22334         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22335         do
22336                 NAME=\`basename \$i\`
22337                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22338         done
22339         ;;
22340 *)
22341         echo "" >> \$TMPSED
22342         ;;
22343 esac
22344 CF_EOF
22345
22346 else
22347         cat >>headers.sh <<CF_EOF
22348 case \$DST in
22349 /*/include/*)
22350         END=\`basename \$DST\`
22351         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22352         do
22353                 NAME=\`basename \$i\`
22354                 if test "\$NAME" = "curses.h"
22355                 then
22356                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22357                         NAME=ncurses.h
22358                 fi
22359                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22360         done
22361         ;;
22362 *)
22363         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22364         ;;
22365 esac
22366 CF_EOF
22367 fi
22368 cat >>headers.sh <<CF_EOF
22369 rm -f \$TMPSRC
22370 sed -f \$TMPSED \$SRC > \$TMPSRC
22371 NAME=\`basename \$SRC\`
22372 CF_EOF
22373 if test $WITH_CURSES_H != yes; then
22374         cat >>headers.sh <<CF_EOF
22375 test "\$NAME" = "curses.h" && NAME=ncurses.h
22376 CF_EOF
22377 fi
22378 cat >>headers.sh <<CF_EOF
22379 # Just in case someone gzip'd manpages, remove the conflicting copy.
22380 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22381
22382 eval \$PRG \$TMPSRC \$DST/\$NAME
22383 rm -f \$TMPSRC \$TMPSED
22384 CF_EOF
22385
22386 chmod 0755 headers.sh
22387
22388 for cf_dir in $SRC_SUBDIRS
22389 do
22390         if test ! -d $srcdir/$cf_dir ; then
22391                 continue
22392         fi
22393
22394         if test -f $srcdir/$cf_dir/headers; then
22395                 $AWK -f $srcdir/mk-hdr.awk \
22396                         subset="$LIB_SUBSETS" \
22397                         compat="$WITH_CURSES_H" \
22398                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22399         fi
22400
22401         if test -f $srcdir/$cf_dir/modules; then
22402                 if test "$cf_dir" != "c++" ; then
22403                         cat >>$cf_dir/Makefile <<"CF_EOF"
22404 depend : ${AUTO_SRC}
22405         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22406
22407 # DO NOT DELETE THIS LINE -- make depend depends on it.
22408 CF_EOF
22409                 fi
22410         fi
22411 done
22412
22413 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22414 if test -z "$USE_OLD_MAKERULES" ; then
22415         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22416 fi
22417 fi
22418  ;;
22419   esac
22420 done
22421 EOF
22422
22423 cat >>$CONFIG_STATUS <<\EOF
22424
22425 { (exit 0); exit 0; }
22426 EOF
22427 chmod +x $CONFIG_STATUS
22428 ac_clean_files=$ac_clean_files_save
22429
22430 # configure is writing to config.log, and then calls config.status.
22431 # config.status does its own redirection, appending to config.log.
22432 # Unfortunately, on DOS this fails, as config.log is still kept open
22433 # by configure, so config.status won't be able to write to it; its
22434 # output is simply discarded.  So we exec the FD to /dev/null,
22435 # effectively closing config.log, so it can be properly (re)opened and
22436 # appended to by config.status.  When coming back to configure, we
22437 # need to make the FD available again.
22438 if test "$no_create" != yes; then
22439   ac_cs_success=:
22440   exec 5>/dev/null
22441   $SHELL $CONFIG_STATUS || ac_cs_success=false
22442   exec 5>>config.log
22443   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22444   # would make configure fail if this is the last instruction.
22445   $ac_cs_success || { (exit 1); exit 1; }
22446 fi
22447 ${MAKE:-make} preinstall